Typst pass a measurement variable and type conversion #8051
-
DescriptionI have created this minimal example from letter template. In this template, I want the vertical spacing to be passed in a metadata variable. So I have added template.typ
show.typ
letter.qmd
I get this error:
I couldn't really find any information on type conversion in typst type documentation. Alternatively, it would be nice to read in the parameter as a number and then create the unit.
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
This is a typst issue:
You are providing
so this will be
which content type, and you don't want that. You want a fraction or relative length. So based on the doc, you probably only need
and this in your YAML gap: 5cm
Pandoc's templating is just string substition in template doc. So if you do
and in yaml
it would be as if you write in
Overall, you need to learn more about
BTW, typst website has a really cool feature which is an online app that will create the doc https://typst.app/ You can easily check that the When you have a working Hope it helps |
Beta Was this translation helpful? Give feedback.
This is a typst issue:
You are providing
so this will be
which content type, and you don't want that. You want a fraction or relative length.
So based on the doc, you probably only need
and this in your YAML
Pandoc's templating is just string substition in template doc. So if you do
and in yaml
it would be as if you write in
.typ
Overall, you need to learn more about