Open fredguth opened 1 month ago
roles
is indeed not part of the typst template default. You can indeed add it using partials, but you need to use the right fields.
Some information at : https://quarto.org/docs/journals/authors.html#roles
Especially, it does not have a name field. So
roles: [$for(it.roless)$$it.name$$sep$, $endfor$],
is not correct. Use
roles: [$for(it.roless)$$it.role$$sep$, $endfor$],
if you want the value.
And when modifying a typst template for YAML metadata, there are two places to modify in Typst template
typst-show.typ
as you did, typst-template
so that value is used in typst. #authors.roles
need to be added
https://github.com/quarto-dev/quarto-cli/blob/bfc6da49148c6edf75b31949d6c06ac1a3f767cd/src/resources/formats/typst/pandoc/quarto/typst-template.typ#L41-L55Hope this helps.
Overall, I don't think roles
is used in any of the templates, except for JATS output in Manuscript, so I am not sure we'll add it in default template. It is available to use as partials as you tried.
I created a template github.com/desid-ms/desid_report which uses it.
Bug description
When you create a brand new Manuscript project, Quarto creates an article with
Norah Jones
author and roles:writing
. But when I render withkeep-typ: true
and check the code, I get:I tried to create a custom template and change typst-show.typ to:
But then I get ....
Steps to reproduce
1) create new Manuscript project 2) change format typst with
keep-typ: true
3)quarto preview index.qmd
4) check index.typExpected behavior
Actual behavior
Your environment
IDE: Positron, MacOS Sonoma 14.5
Quarto check output