Repository navigation
Support lof and lot in Typst documents - #15001
Merged
Merged
Conversation
The schema has advertised lof and lot for Typst since book support landed, but the default Typst template never acted on them: only the TOC was mapped into article(), and Pandoc's own Typst template has no lists of figures or tables either. Setting them silently did nothing. The lists are rendered inside article(), right after the TOC, so a format that overrides typst-show.typ (orange-book draws its own lists inside book()) keeps control and does not get a second set. The outlines target Quarto's float kinds, since Quarto emits floats as figure(kind: "quarto-float-fig") and figure(kind: "quarto-float-tbl"), not Typst's native image/table kinds. Titles use the lookup LaTeX already uses: crossref lof-title / lot-title, else the language's crossref-lof-title / crossref-lot-title. An extension that ships its own typst-template.typ with Quarto's typst-show.typ gets "unexpected argument: lof" only when lof is set, the same contract toc-indent already has. Refs #14081
Subfloats are figures of the same kind as their parent, so the new list of figures listed "Figure 2a" and "Figure 2b" as separate entries after "Figure 2". LaTeX lists only the parent, and subpar, which quarto_super is adapted from, defaults to outlined-sub: false. The rule is scoped to the parent's body, so the parent stays listed, and it only affects outlines: references to a subfigure still render its sub-number. This also applies to formats that reuse definitions.typ for their own lists, such as orange-book. Refs #14081
Collaborator
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
cderv
added a commit
to quarto-dev/quarto-web
that referenced
this pull request
Oct 7, 2026
The cross-references page only described LaTeX raw commands for lists of figures and tables, and the Typst page said nothing, although the options were already advertised for Typst. Quarto 1.11 makes them work for Typst documents, so the Typst page gets a section for them and the cross-references page points to it. The custom formats page notes the new template parameters, since a custom typst-template.typ that reuses Quarto's typst-show.typ fails with "unexpected argument: lof" when the option is set and the template does not accept it. Companion to quarto-dev/quarto-cli#15001
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Standalone Typst documents ignore
lof: trueandlot: true, although the schema advertises both options for Typst. The default template only mapstocintoarticle(), and Pandoc only honourslofandlotfor LaTeX, ConTeXt and docx, so nothing was ever rendered (#14081).This adds both lists to the default Typst template, after the table of contents and before the body, as in LaTeX output. They are Typst outlines targeting Quarto's float kinds,
quarto-float-figandquarto-float-tbl, because Quarto emits floats with those kinds instead of Typst's nativeimageandtable. Titles use the lookup LaTeX already uses:crossref: lof-title/lot-title, else the localizedcrossref-lof-title/crossref-lot-titlelanguage strings.Design
The lists are rendered inside
article()rather than by a show rule, so a format that overridestypst-show.typkeeps control. orange-book draws its own lists insidebook()and does not get a second set.Subfigures are left out of the list of figures in a second commit. Subfloats have the same kind as their parent, so they were listed as separate "Figure 2a" / "Figure 2b" entries. LaTeX lists only the parent, and subpar, which
quarto_superis adapted from, defaults tooutlined-sub: false. The rule is scoped to the parent's body, so the parent stays listed and references to a subfigure keep their sub-number. Sincedefinitions.typis shared, this also applies to formats that reuse it for their own lists, such as orange-book.An extension that ships its own
typst-template.typtogether with Quarto'stypst-show.typgetsunexpected argument: lofonly whenlofis set. This is the same contracttoc-indentalready has.This covers standalone documents only. The book case needs a fix in the orange-book package first (it looks for
kind: imageandkind: table), so #14081 stays open for that.Part of #14081
Checklist
I have (if applicable):
AI-assisted PR
Note: autonomous AI agents submitting PRs without human oversight are not permitted — see the Code of Conduct.