Skip to content

Conversation

@gordonwoodhull
Copy link
Contributor

@gordonwoodhull gordonwoodhull commented Jan 13, 2026

Should have feature parity with html and LaTeX on margin layout features and other Tufte layout features, using Typst's marginalia package.

Also includes:

PDF smoke-all test assertions:

  • ensurePdfTextPositions
  • ensurePdfMetadata

typst-gather

New command implemented in Rust for caching @preview Typst packages from the internet, and staging them from @local repos.

  • quarto call typst-gather for extensions; these go into _extensions/ext-name/typst/packages/
  • quarto dev-call typst-gather to gather dependencies of built-in Typst templates; these go to src/resources/formats/typst/packages

draft to test the rust build in ci - currently taking the simple approach and building typst-gather in configure.sh but we could build it in workflows instead.

@posit-snyk-bot
Copy link
Collaborator

posit-snyk-bot commented Jan 13, 2026

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

Base automatically changed from deps/pandoc-2025-08 to main January 14, 2026 10:59
@gordonwoodhull gordonwoodhull force-pushed the feature/typst-tufte-layout branch 3 times, most recently from 7d304ec to 45ade4e Compare January 19, 2026 21:28
@gordonwoodhull gordonwoodhull marked this pull request as ready for review January 19, 2026 22:36
@gordonwoodhull
Copy link
Contributor Author

gordonwoodhull commented Jan 19, 2026

This is about ready to merge - will squash into feature or fix per commit once tests pass.

@gordonwoodhull gordonwoodhull force-pushed the feature/typst-tufte-layout branch 3 times, most recently from 3d029c7 to b7849b9 Compare January 20, 2026 02:36
gordonwoodhull and others added 8 commits January 20, 2026 10:42
Add ensurePdfTextPositions test assertion for verifying element positions
in tagged PDFs. Supports:
- Role-based element selection (P, Figure, Table, H1, Lbl, Reference, Page)
- Spatial relations (left_of, right_of, above, below)
- Distance constraints (within_x, within_y)
- Edge constraints for precise positioning
- Zod schema validation for test specifications

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Implement Tufte-style margin layout for Typst format using the marginalia
package. Features:
- Margin notes, figures, tables, and captions via .column-margin class
- Margin citations with citeproc support (citation-location: margin)
- Full-width content via .column-screen and .column-page classes
- Configurable margin-geometry following marginalia's proportions
- Support for subfigures and panel layouts in margins
- Typst show rule for automatic margin footnote placement

Co-Authored-By: Claude Opus 4.5 <[email protected]>
New Rust tool and Quarto command for gathering Typst packages for offline
use in format extensions. Features:
- Auto-detection from _extension.yml (template and template-partials)
- Config file support (typst-gather.toml) with rootdir option
- @Preview package downloading from Typst package registry
- @Local package copying with exclusion filtering
- --init-config flag to generate starter configuration

Usage:
  quarto call typst-gather              # Auto-detect or use config
  quarto call typst-gather --init-config  # Generate config file

Co-Authored-By: Claude Opus 4.5 <[email protected]>
The keep-typ and keep-tex options place intermediate files alongside
the source file, not in the output directory. In project contexts
(websites, books), the test framework now correctly locates these files.

- Add inputFile parameter to verification functions
- Distinguish keep-typ: true from output-ext: typ (different locations)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Add a flag to preserve test output artifacts (PDF, typ, tex, etc.)
instead of deleting them after tests run.

Usage:
  ./run-fast-tests.sh --keep-outputs docs/smoke-all/test.qmd
  ./run-fast-tests.sh -k docs/smoke-all/test.qmd

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Fix a 2021 bug in cites.lua where resolveCaptionCitations() returned
boolean instead of Inlines/nil. The Inlines walker expects either a
list of Inlines (modified) or nil (no changes), not true/false.

This bug was exposed when margin layout changes preserved column-margin
classes on FloatRefTarget, causing the previously-unreachable code path
to execute.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Closes #13919

The regex for detecting bibliography section start didn't account for
\protect prefix added in Pandoc 3.6+ (pandoc/pandoc@915e3672c), causing
?quarto-cite: placeholders to remain unresolved in PDF margin citations.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@gordonwoodhull gordonwoodhull force-pushed the feature/typst-tufte-layout branch from b7849b9 to de35dee Compare January 20, 2026 15:43
@gordonwoodhull gordonwoodhull merged commit 382f278 into main Jan 20, 2026
51 checks passed
@gordonwoodhull gordonwoodhull deleted the feature/typst-tufte-layout branch January 20, 2026 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants