Book project: citations stay as @key in HTML output (Typst works)

Open
#1,157 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
rust
Domain
documentation

Research direction

Start by reading the book rendering and citation handling entry points; the issue names no source files or tests, so first trace where book projects collect bibliography metadata for HTML output. Reproduce with the provided two chapter files and refs.bib, then compare with website and Typst renders. Done means HTML renders the citation as “Knuth (1984)” with a bibliography entry.

Written by the indexing model from the issue text.

Description

Summary

In a type: book project rendered to HTML, citations are left as raw @key text and no bibliography is produced. The same project renders correctly to Typst, and the same bibliography setup works in a type: website project and in a single document.

Reproduction

_quarto.yml:

project:
  type: book
book:
  title: "Book"
  chapters:
    - index.qmd
    - ch1.qmd
bibliography: refs.bib

index.qmd:

# Preface {.unnumbered}

Intro

ch1.qmd:

# One

As in @knuth84.

refs.bib:

@book{knuth84, author={Knuth, Donald}, title={The TeXbook}, year={1984}, publisher={Addison-Wesley}}
q2 render --to html

Actual

_book/ch1.html contains <span class="citation" data-cites="knuth84">@knuth84</span>. No "Knuth (1984)" and no references section.

Putting bibliography: refs.bib in the chapter's own front matter does not change the result.

Expected

"Knuth (1984)" linking to a bibliography entry, as with q2 render --to typst on the same project and as in Quarto 1.

What works

  • q2 render --to typst on the same book: citation and bibliography resolve.
  • A type: website project with the same bibliography: citation resolves to a link to #ref-knuth84.

Possibly related

In a slightly larger book (3 chapters with {#sec-...} and {#fig-...} labels), HTML rendering also prints unresolved crossref warnings for labels that are defined in another chapter, although the links in the HTML output are correct. I did not narrow this down separately.

Related, closed: #1026 (citations in HTML stay as @key when bibliography is set), which looks like the same symptom fixed for single documents.

Found with q2 0.43.0 built from origin/main at 929891fa5 (2026-11-10). Also reproduces with the installed 0.40.0.

Dominant language
Rust
Stars
302
Forks
22
Avg merge
5h 2m
Merged PRs (30d)
213

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from quarto-dev/q2

All issues in quarto-dev/q2

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.