4  BibTeX and styles

This chapter sets position: floating, so there is a pill anchored to the bottom-right corner of your viewport. The block below it comes from a shortcode, showing that the two can coexist on the same page.

Cite this
Jordão, L. S. B. (2026, August 1). BibTeX and styles. Cite-This. https://lsbjordao.github.io/quarto-cite-this/bibtex-and-styles.html

4.1 The .bib entry

The BibTeX is written by hand rather than by pandoc’s writer, for a specific reason: pandoc’s bibtex writer discards the access date, and its biblatex writer emits @online instead of @misc. The requirement here is @misc carrying both dates, so the entry is assembled field by field:

@misc{jordao2026flora,
  author       = {Jordão, Lucas S. B.},
  title        = {Flora do Cerrado},
  year         = {2026},
  month        = {mar},
  howpublished = {\url{https://lsbjordao.github.io/flora-cerrado/}},
  url          = {https://lsbjordao.github.io/flora-cerrado/},
  urldate      = {2026-08-01},
  note         = {Accessed: Aug. 1, 2026}
}

howpublished with \url{} is the classic BibTeX idiom; url and urldate keep biblatex and natbib happy. Both are emitted, because which one your bibliography style reads depends on the style.

URLs and DOIs are written raw. Escaping _, % or # inside \url{} would break the link.

4.2 Keys and filenames

extensions:
  cite-this:
    bibtex:
      type: misc                      # the entry type
      key: "{author}{year}{title}"    # → jordao2026flora
      filename: "{key}.bib"

Both accept the tokens {author}, {year}, {title} and {scope}; filename also accepts {key}. Accents are folded — Jordão becomes jordao — and stop words are skipped, so Flora do Cerrado yields flora, not do.

4.3 Styles

Seven CSL styles ship with the extension:

name style
abnt ABNT NBR 6023 (pt-BR)
apa APA 7th edition
ieee IEEE
mla MLA 9th edition
harvard Cite Them Right (Harvard)
chicago Chicago Manual of Style, author-date
vancouver NLM/Vancouver, citation-sequence

Five are enabled by default, with APA selected initially. Your own .csl files work by path:

extensions:
  cite-this:
    styles: [apa, ieee, styles/my-journal.csl]
    default-style: ieee
    use-document-csl: true

4.3.1 The document’s own style wins

If the document declares a csl: and you do not set default-style, that style becomes the default. The citation your readers copy then matches the reference list of the page they are reading, which is almost always what you want. Setting default-style explicitly turns this off.

4.3.2 Why chicago is not a default

Cost per citeproc call, measured on pandoc 3.6.3:

style ms
ieee 2
abnt 6
mla 8
harvard 10
apa 97
chicago 1481

The cost tracks macro complexity, not file size. Every style in the default list costs under 150 ms; Chicago alone costs more than all the others combined, times ten. In a fifty-chapter book that is minutes of render time, so it ships but stays opt-in.

4.4 Access date

extensions:
  cite-this:
    access-date: build      # build | YYYY-MM-DD

build uses the render date, which is the honest answer for a static site: it is when the content was captured. A fixed date is accepted for reproducible builds. A dynamic mode, reading the reader’s own date in the browser, is reserved but not implemented — setting it warns and falls back to build.