AUTHORING

Cross-References

Numbered figures, tables, and equations with Quarto labels.

Cross-References

Label figures, tables, and equations with Quarto {#prefix-id} labels, then reference them anywhere — including from other pages — with @prefix-id. Numbering is per page and per kind.

Figures

Label an image by appending {#fig-id}:

![The docyard pipeline](/diagram.svg){#fig-pipeline}
The Docyard pipeline
Figure 1: The Docyard pipeline

Reference it as @fig-pipeline: see Figure 1. The reference renders the figure's number and links to its anchor — also from other pages, like the authoring overview.

Tables

Give a Markdown table a caption line starting with : and a {#tbl-id} label:

| Solver  | Complexity   |
| ------- | ------------ |
| Hungarian | O(n³)      |
| Auction | O(n² log n)  |

: Assignment solvers {#tbl-solvers}
Table 1: Assignment solvers
SolverComplexity
HungarianO(n³)
AuctionO(n² log n)

Reference it as @tbl-solvers: Table 1 compares the solvers.

Equations and math

Inline math uses $…$ (eiπ+1=0e^{i\pi} + 1 = 0), display math uses $$…$$, both rendered with KaTeX. Label display math with {#eq-id} to number it:

$$ \mathcal{L}(\theta) = -\sum_i y_i \log \hat{y}_i $$ {#eq-loss}

L(θ)=iyilogy^i\mathcal{L}(\theta) = -\sum_i y_i \log \hat{y}_i

(1)

Reference it as @eq-loss: the objective in Equation 1 is standard cross-entropy.

Behavior and limits

  • Numbering restarts on every page, per kind (Figure 1, Table 1, Equation 1, …). Cross-page references show the target page's number and link to it.
  • An unresolved reference renders visibly as ?@target so broken links are easy to spot while writing.
  • @sec- (sections) and @lst- (listings) are recognized as reference syntax but not yet numbered — they render as unresolved for now.