Tests
tests/run-tests.sh --self-testThe suite renders the examples to LaTeX, HTML, PDF, beamer and GitHub-flavoured markdown, and checks the output against hand-derived manifests. It needs TinyTeX (with kpsewhich on the path and TeX Live’s stix2-otf package installed, which the non-Latin-1 renders load by file name), makeindex and pdftotext, and fails loudly rather than skipping if any is missing.
The Quarto version matrix
.github/workflows/versions.yml renders the fixtures on Quarto 1.5.52, the oldest non-prerelease release the >=1.5.0 range the extension declares admits. It also renders them on the version the documentation site is built with. Weekly and on demand, it adds Quarto’s current release.
On every push, and on the weekly and on-demand runs, the workflow renders five fixtures to HTML on each version: html-index.qmd, named-indexes.qmd, demo.qmd, the book and figure-marks.qmd. The HTML index each version emits is compared byte for byte against the index the pinned version emits. The same job reads the EPUB of two fixtures on each version: figure-marks.qmd and the book. In the HTML and the EPUB of figure-marks.qmd, each alt-text mark the acceptance suite checks must link to a place after its image, in the image’s own block. The book’s EPUB is read against the acceptance suite’s manifest for it. Each of its three index sections must carry exactly the letter and entry rows the manifest states, each entry with its locator count. Every link inside those sections that stays in the publication must resolve.
The same job renders marker-shapes.qmd to GitHub markdown, Word, EPUB and Typst on each version. Among its shapes are containers that hold only a placement marker, which the extension removes. Each of the four renders must exit 0.
Weekly and on demand, and not on every push, a second job renders four fixtures to PDF through LaTeX on each version: demo.qmd, the book, named-indexes.qmd and figure-marks.qmd. It renders four fixtures to Typst: typst-index.qmd, typst-numbering.qmd, typst-order.qmd and figure-marks.qmd. This job is kept off the push path because it installs a TeX distribution and a package from a third-party repository. Its red can therefore trace to upstream mirror state rather than to a commit.
That job reads the printed index of each PDF:
demo.qmdand the book must each print an index with at least one entry. For the book, that is the first of its declared indexes.named-indexes.qmdmust print both of its declared indexes as the acceptance suite’s manifest states them, every entry line compared both ways. The four below-marker cells must read as their manifest states, and one of them is a term that must be absent. The second index is built byimakeidxthrough TeX’s restricted shell escape, so this is where the workflow reads a LaTeX index after the first.figure-marks.qmdmust print its index line by line as its manifest states.typst-index.qmdmust print both of its indexes as the acceptance suite’s manifests state them: every entry in order, each locator on the page the manifest gives.typst-numbering.qmd, whose locators print the page numbering’s own text, andtypst-order.qmd, whose locators print in class and value order, must each print its entries’ text in order as its manifest states.figure-marks.qmdrendered to Typst must print its index as its manifest states.
Where a Typst locator links to is read only by the acceptance suite.
No PDF or EPUB is compared across versions. For the LaTeX PDFs, two Quarto versions typeset through different TeX engines. An engine difference lands in a PDF’s text layer, where a comparison would be red about the engine rather than about this extension. The byte-for-byte comparison is over the HTML index alone. The acceptance suite above renders and reads a printed PDF index on every run, on one Quarto version.