Collapses all author names from a Quarto project or document into a single string.
Usage
collapse_authors(
config = quarto::quarto_inspect()$config,
reverse_first = TRUE,
orcid_style = c("none", "icon", "plain"),
orcid_icon = fontawesome::fa(name = "orcid"),
sep = ", ",
sep2 = " and ",
last = ", and "
)Arguments
- config
Quarto configuration as returned by
quarto::quarto_inspect()$config.- reverse_first
Whether or not to reverse the first and last name from the first author, meaning
Jane DoebecomesDoe, Jane.- orcid_style
How to include the authors' ORCIDs in the output. One of
"none"to omit ORCIDs in the output."icon"to include an ORCID icon (specified viaorcid_icon) after the author name that links to the respective author's ORCID page. Suitable for HTML output."plain"to simply include the ORCID as plain text in parentheses after the author name.
- orcid_icon
SVG icon to be used for
orcid_style = "icon".- sep
Separator. A character string.
- sep2
Separator for the special case that
xcontains only two elements. A character string. Defaults to the value oflastwithout the serial comma.- last
Last separator, if there is no truncation. E.g. use
", and "for the serial comma. A character string.
See also
Other metadata:
cur_profiles(),
default_profiles(),
profiles(),
qmd_layout_classes
Examples
if (quarto::is_using_quarto()) {
quappo::collapse_authors()
}