Skip to content

use _variables.ym to populate author info #12412

Answered by cderv
nithinmkp asked this question in Q&A
Discussion options

You must be logged in to vote

But my issue is that {{ < var author >}} is not working

I think you are expecting something that will not happen. See our doc : https://quarto.org/docs/authoring/variables.html#var

Variables can be either simple values or markdown content.

so you can't expect some sort of metadata expansion, where using var shortcode will magically fill up the whole author field when you do

author: {{< var author >}}

I was thinking of case of starting a new project where only two authors are involved, I could copy the _variables.yml and then use a subset of the authors

Generally to use variable you need to retrieved value by value. So maybe using {{< var author.2.name >}} for the second name. You wo…

Replies: 6 comments 5 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@cderv
Comment options

Answer selected by cderv
Comment options

You must be logged in to vote
1 reply
@cderv
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@mcanouil
Comment options

mcanouil Apr 3, 2025
Collaborator

Comment options

You must be logged in to vote
2 replies
@mcanouil
Comment options

mcanouil Apr 3, 2025
Collaborator

@nithinmkp
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
authors Issues related to author/affiliation normalization
3 participants