Examples
The Gallery gives a page to each fixture site/gallery.yml lists under shown:, carrying that fixture’s .qmd source, the page it renders to with the index the extension built, and the PDF from the same source. The whole corpus is described below.
examples/book/ is a four-chapter book fixture — a shared term marked in three chapters, a chapter in a subdirectory, a cross-chapter cross-reference, and the marker in the last chapter — and examples/book-nomarker/ is the same idea with no marker at all. examples/demo.qmd exercises every supported form and the full escaping probe set. examples/escaping.qmd and examples/xref-escaping.qmd are the character probes. examples/placement.qmd marks one term in a heading, a table cell and a footnote, where the renderer moves the mark away from where it was written. examples/marker.qmd puts the index between two sections with a placement marker; examples/marker-misuse.qmd and examples/marker-nomarks.qmd are its misuse cases. examples/control.qmd is a negative control: mark-like text inside code, which must never be indexed. examples/dangling-xref.qmd and examples/resolving-xref.qmd are a pair: every cross-reference target in the first names a term nothing indexes, and every target in the second resolves. examples/named-indexes.qmd declares two indexes and puts a cross-reference, a sort key, a range and a placement marker in each of them; examples/named-indexes-twin.qmd writes the same terms with no declaration at all. examples/index-labels.qmd declares the words the index prints for itself and examples/index-labels-twin.qmd is the same document with those declarations deleted; examples/index-labels-misuse.qmd writes every unusable shape of them, and examples/index-labels-clash.qmd declares two indexes that each name the heading over their non-letter entries after a single letter, one of them a letter its own index also heads a group with. The ten examples/index-lang-*.qmd fixtures are the language table’s: one per outcome the tag resolver has — an exact tag, a regional tag falling back to its language, a tag the table does not cover, and a value that is no language tag — plus a language the table covers only in part and one where an author’s own word sits beside the table’s, each of the first four with a twin that is itself with the lang: line removed. examples/book-lang/ is a three-chapter book that declares lang: it, so the index it builds from its chapters prints the table’s Italian words in HTML and in EPUB. examples/index-separators.qmd declares the punctuation the index prints inside an entry — the mark before and between an entry’s locators and the mark between two cross-references — and examples/index-separators-twin.qmd is the same document with that declaration deleted; examples/index-separators-scoped.qmd declares two indexes and resets one of the two marks inside the second, so the nearer declaration wins for that mark while the document’s still supplies the other. examples/unicode.qmd carries the recipe from Terms outside Latin-1 and marks eight terms under it — Greek, a second Greek term carrying a sort= key, Cyrillic, Polish, Vietnamese, a term written with a combining mark, one whose combining sequence has no precomposed form, and one plain ASCII term the suite’s controls read as their positive signal.
quarto render examples/demo.qmd --to pdf
quarto render examples/demo.qmd --to html