Author "roles" column and affiliation "position" field in HTML title block metadata #14776
Replies: 2 comments 1 reply
|
Both fields already reach the template today, so this needs no change in Quarto.
The same fallback exists for an unknown key directly under an author.
A small exampleHere is a project that shows both, with one partial and no Lua filter: It replaces <p class="roles">$for(by-author.roles)$$it.role$$if(it.degree-of-contribution)$ ($it.degree-of-contribution$)$endif$$sep$, $endfor$</p>$if(it.metadata.position)$<span class="affiliation-position">$it.metadata.position$</span>$endif$The example also covers the four layouts in your screenshots: roles without an affiliation, an affiliation without roles, neither, and no affiliation at all. The singular and plural labelThe author and affiliation headings need no work.
A partial can do the same for a role heading with Pandoc's $if(by-author/rest)$$role-title-plural$$else$$role-title-single$$endif$The example takes the two strings from plain metadata, which is how Quarto's own For reference about similar requestsAdditions to the author schema are accepted. Requests to print more data in a default template stay open. Two earlier discussions have the same answer as this one.
The full author schema is a data model for every format. What could belong in QuartoThe default title block only has to be a sensible default. One part of this request is general, and it is small: a pair of One warningReplace
|
|
Thank you, Mickaël Canouil. I really appreciate your help, the detailed explanation and your patience in showing me a much simpler solution. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Description
I want to know if it is possible to add a column between author and affiliation in the HTML title block metadata, and to add a "position" field to affiliation to specify the author's position(s) related to that affiliation.
Expected behavior
See the following minimal reproducible example and the following GitHub repository
Use cases
Roles
When generating a book, you can have the following use cases:
When writing a document in an organization or in an academic environment, you want to specify your role in building it:
Position
When generating a document, you sometimes need to specify at least one position (role/title) in the organization to which you are affiliated.
Feasibility
Roles
Many of the necessary components have already been developed in Quarto, in Roles via authors.lua, including the possibility to add the Contributor Role Taxonomy (CRediT).
However, this feature has not been directly integrated into any of the formats, nor does it take advantage of other Quarto functionalities, such as changing the label depending on whether there is one author or more than one (e.g., "Role" vs. "Roles") in the way it already does for author and affiliation.
I also checked whether this could potentially affect the current layout, using the minimal reproducible example and the GitHub repository, in the following cases:
Missing items
Without affiliation but with role
Without role but with affiliation
Neither of them
Position
In authors.lua the following aspects could potentially be used:
kId'id'idkAffilName'name'namekDepartment'department'departmentkGroup'group'groupkAddress'address'addresskCity'city'citykRegion'region'region,statekCountry'country'countrykPostalCode'postal-code'postal-codekUrl'url'url,affiliation-urlkISNI'isni'isnikRinggold'ringgold'ringgoldkROR'ror'rorBut there is nothing related to "position" that can be used directly, at least not in a template extension, even though this is sometimes needed. I don't know if something like
kPosition,'position', andpositioncould be implemented based on Combinations in authors.lua, so that it could be added like this:All reactions