-
Hi, all, I'm confused about typst templates. I am trying to build a custom template for Pandoc-> PDF using typst. Last time I tried this (a year ago) this was simpler! The default template for typst (as produced with pandoc -D typst) contains a block (25-29):
I found a copy of template.typst in the Pandoc repo, and I see it's an actual typst template - distinct from default.typst, which is a Pandoc template. That makes sense. But how do I get that if statement above to see a typst template? Passing --template=customTemplate specifies a Pandoc template; but that isn't what the block quoted above is looking for (especially since we're ALREADY in a Pandoc template). How/where do I specify to Pandoc that I want to use a custom typst template, so that it doesn't use the default one -- as in the "else" above? Is it a pandoc template partial? Is it a typst include? The docs are silent on this. Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Just set the |
Beta Was this translation helpful? Give feedback.
-
I'll be damned, that does the trick. Thank you. So, the Pandoc templates can be set by "--template=" but the Typst templates can be set by "-V template=" That would be a good thing to disambiguate, maybe in "Variables for Typst" in the manual. Cheers! |
Beta Was this translation helpful? Give feedback.
Just set the
template
variable to the name of your desired template (or set it in metadata).