Search code examples
pandocquarto

Bibiliography style with Quarto documents


The default way of displaying references with Quarto documents seems to put author names in this format: Last1, First1, First2 Last2, First3 Last3, and First4 Last4. So the first author name is displayed differently than the rest. Is that intentional and is there a way to change that?

Here's an example:

---
project:
  type: website
format: html
bibliography: references.bib
---

## Text

@bibitem1

Content of references.bib

@article{bibitem1,
    author = {First1 Last1 and First2 Last2 and First3 Last3 and First4 Last4},
    title = {Article title},
    journal = {Journal name},
    year = {2013},
    volume = {3},
    number = {72},
    pages = {14--18}
}

which is displayed as

Last1, First1, First2 Last2, First3 Last3, and First4 Last4. 2013. “Article Title.” Journal Name 3 (72): 14–18. 

Solution

  • How your references are displayed is entirely determined by the bibliography format you use. Quarto adopts a default one. You can specify a custom one with the csl option, specified in your YAML header as for example:

    csl: biomed-central.csl
    

    Styles for many journals are available with the Zotero project: https://www.zotero.org/styles

    These styles are composed using the Citation Style Language. In principle, you could customize such a style (including the default style used by Quarto). It is not that trivial, though, and would require some effort to understand and use the language.