Passage Cross-References Demo

Author

Yun Jiang

Published

June 19, 2026

Inline Passage Targets

Wrap any inline text with .passage and an ID starting with pas-:

[the square of the hypotenuse...]{.passage #pas-pythagoras}

This chapter demonstrates all theorem-like types: theorems, lemmas, corollaries, propositions, conjectures {1}.

The fundamental result states that the square of the hypotenuse of a right triangle equals the sum of the squares of the other two sides {2}.

In number theory, every even integer greater than 2 can be expressed as the sum of two primes {3}, a claim that remains unproven since 1742.

The derivative of a function at a point is the limit of the difference quotient as the increment approaches zero {4}.

Cross-References

Use .pref with the pas attribute to reference a passage:

See [Passage]{.pref pas="pas-pythagoras"}.

Reference Options

Option Syntax Output
Default prefix [Passage]{.pref pas="pas-xxx"} “Passage N”
Custom prefix [Passage]{.pref pas="pas-xxx" prefix="Stmt"} “Stmt N”
No prefix [Passage]{.pref pas="pas-xxx" noprefix="true"} “N”

Examples targeting the Pythagorean theorem:

Forward References

References can appear before their targets. The filter uses a two-pass design:

Passage 5 is defined below.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

This passage was referenced before it was defined {5}.

Tolerant Spans

The bracket text and its attribute block may be split across lines. The filter merges them before numbering, so this renders the same as the one-line form:

[the square of the hypotenuse equals the sum of the squares of the other two sides]
{.passage #pas-split}

the square of the hypotenuse equals the sum of the squares of the other two sides {6}

Reference it: Passage 6.

Broken References

Unresolved references display a warning:

[?pref:pas-nonexistent] should show an error indicator.