4.9 Multiple authors in a document
We can add multiple authors to an R Markdown document within the YAML frontmatter in a number of ways. If we simply want to list them on the same line, we can provide a single string to the document, e.g.,
Alternatively, if we wish each entry to be on its own line, we can provide a list of entries to the YAML field. This can be useful if you wish to include further information about each author such as an email address or institution, e.g.,
We can make use of the Markdown syntax ^[]
to add additional information as a footnote to the document. This may be more useful if you have extended information that you wish to include for each author, such as providing a contact Email and address. The exact behavior will depend on the output format:
---
author:
- John Doe^[Institution One, john@example.org]
- Jane Doe^[Institution Two, jane@example.org]
---
Certain R Markdown templates will allow you to specify additional parameters directly within the YAML. For example, the Distill output format allows url
, affiliation
, and affiliation_url
to be specified. After you install the distill package (Dervieux et al. 2022):
you can use the Distill format with detailed author information, e.g.,