Conversation
de3b145 to
444ee90
Compare
|
The
Adding an additional API that serves the same purpose is redundant and will lead to confusion. Moreover, it will cause problems down the road if people use this API instead of the contextual API in packages because then their code will not compose correctly with The |
|
I'll close it, since it's highly unlikely something will come out of it, fix- or proposal-wise. But I think it's still a nice workaround and a feature for those who really want the ability to check the output format of the document (and use it conditionally for virtually anything). For example, you can just change background or margin, or make completely different outputs. |
|
Oops, already closed. |
|
You can always use |
|
Since you've mentioned it, this doesn't work in the web app. I think the web app uses a different |
|
in the web app this depends on typst/webapp-issues#391, yes (sort of, that issue is specifically about batch |
|
Yeah. |
Since currently it's not possible to conditionally use paged output (e.g., PDF) and HTML output (e.g., when overriding body tag), I whipped up this workaround.
It adds
sys.output-formatthat can be"pdf","png","svg", or"html". Fortypst queryit will use"pdf"since we can't resolve the output format for that command (could potentially change it to none or"query").I thought that instead of just providing the same
target()output but non-contextual, I would just add all inputs. This can make the document more customizable. Which is actually kind of a separate proposal, though it is not really how Typst should work.