3  Scopes

The extension builds two citations for every page: this page and the whole work. This chapter uses position: navbar, so the control lives in the navigation bar at the top of the page.

3.1 Why two

A reader who wants to cite a specific chapter of your book needs a different reference from a reader citing the book as a whole. Most “cite this” widgets offer only one, and it is usually the wrong one.

Citing this page:

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

Citing the whole work:

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

3.2 Choosing

With the default scope: both, the reader picks from the menu and their choice is remembered. To fix a single scope:

extensions:
  cite-this:
    scope: work        # both | work | page
    default-scope: page   # which tab opens first, only meaningful when scope is both

3.3 What goes into each

The page record takes its title from the document, its URL from site-url plus the output path, and names the book or site as the container. When a chapter declares no author or date of its own — which is the normal case in a Quarto book — it inherits them from the work.

The work record comes from the book: or website: block of your _quarto.yml.

Both are webpage in CSL terms. That is deliberate: a Quarto book published on the web is an electronic resource, and it is what makes styles print “Available at” and “Accessed on”. Declaring it as a printed book silently drops both from the ABNT style.

If you are citing an actual printed edition, say so:

extensions:
  cite-this:
    work:
      type: book
      publisher: "Editora Independente"
      publisher-place: "Brasília"

3.4 Chapter numbers

Quarto injects the chapter number into the title before extensions can see it — a chapter titled Fabaceae arrives as 2 Fabaceae. The extension strips that prefix, anchored on the non-breaking space Quarto uses as separator, so titles that legitimately start with a number (“1984 Revisited”) are left alone.

Appendices are the known exception: their label is localised and carries no non-breaking space, so it survives into the citation. Override it when it matters:

extensions:
  cite-this:
    page:
      title: "Field methods"