-
Notifications
You must be signed in to change notification settings - Fork 395
typst: article / margin layout #13879
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
gordonwoodhull
wants to merge
16
commits into
deps/pandoc-2025-08
Choose a base branch
from
feature/typst-tufte-layout
base: deps/pandoc-2025-08
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
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
- configure.sh/configure.cmd: Build typst-gather if Rust is available - prepare-dist.ts: Stage typst-gather binary to distribution - quarto-dev action: Install Rust 1.89 before configure for CI - create-release.yml: Add Rust installation to release jobs - Windows: Add typst-gather.exe to signing list Note: Linux ARM64 distributions will not include typst-gather (cross-compilation not yet supported). Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Detect unconfigured @Local imports during gather and error (not warn) - Add --init-config flag to `quarto call typst-gather` to generate starter typst-gather.toml with discovered imports - Generated config includes [local] section with placeholder paths for any @Local imports found in scanned .typ files Co-Authored-By: Claude Opus 4.5 <[email protected]>
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. |
- Downgrade from Rust edition 2024 to 2021 (2024 requires Rust 1.85+) - Change rust-version from 1.89 to 1.81 (1.81 is available in stable Rust) - Replace error() with console.error() for fatal errors (std/log error() is buffered and doesn't flush before Deno.exit()) Co-Authored-By: Claude Opus 4.5 <[email protected]>
- --init-config now requires extension directory (no fallback to cwd) - If no .typ files in _extension.yml, warn but still generate config - When @Local imports are not configured, suggest running --init-config - Print stdout/stderr from rust tool on failure for better debugging Co-Authored-By: Claude Opus 4.5 <[email protected]>
The typst-gather.toml now supports a rootdir field that specifies the base directory for resolving discover and destination paths. This allows the config file to live in the project root while paths remain relative to the extension directory. Generated config now looks like: rootdir = "_extensions/ext-name" destination = "typst/packages" discover = ["typst-template.typ", "typst-show.typ"] Co-Authored-By: Claude Opus 4.5 <[email protected]>
When typst-gather.toml exists, pass it directly to the rust tool instead of creating a temp file. This ensures [local] and [preview] sections are properly parsed. Also only show --init-config tip when no config file was found. Co-Authored-By: Claude Opus 4.5 <[email protected]>
Tests added: - Config file with rootdir resolves paths correctly - --init-config generates config with rootdir - @Local packages are copied when [local] section configured - --init-config detects @Local imports New fixtures: - with-config/ - extension with typst-gather.toml using rootdir - with-local/ - extension importing @local/my-local-pkg Co-Authored-By: Claude Opus 4.5 <[email protected]>
Update both Quarto wrapper and Rust tool to show paths relative to the current working directory instead of absolute paths for cleaner output. Co-Authored-By: Claude Opus 4.5 <[email protected]>
When copying local packages, typst-gather now respects: 1. The `exclude` field from the package's typst.toml manifest 2. Default excludes for common non-package files (.git/, .github/, .gitignore, .vscode/, .idea/, editor backup files) This prevents .git directories and other development files from being copied into the destination package directory. Co-Authored-By: Claude Opus 4.5 <[email protected]>
When a package is configured in [local], skip downloading the @Preview version even if found in imports. This handles the case where a local package contains template examples that import from @Preview (e.g., `template/main.typ` showing users how to use the published package). Also adds tests for the local override behavior and copy filtering. Co-Authored-By: Claude Opus 4.5 <[email protected]>
Replace threading of multiple parameters (storage, processed, stats, discovered_local, configured_local) with a single GatherContext struct. This simplifies function signatures and makes the code easier to follow. Co-Authored-By: Claude Opus 4.5 <[email protected]>
Test `quarto use template` and render for typst templates from quarto-ext/typst-templates repo. Supports switching between local development path and GitHub for testing. Templates tested: ams, dept-news, fiction, ieee, letter, poster Co-Authored-By: Claude Opus 4.5 <[email protected]>
Check for local/ and preview/ subdirectories before setting the corresponding typst flags: - --package-path only if local/ exists (for @Local packages) - --package-cache-path only if preview/ exists (for @Preview packages) This avoids passing unnecessary flags when only one type of package is staged. Co-Authored-By: Claude Opus 4.5 <[email protected]>
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.
To be merged after #13249
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:
ensurePdfTextPositionsensurePdfMetadatatypst-gatherNew command implemented in Rust for caching
@previewTypst packages from the internet, and staging them from@localrepos.quarto call typst-gatherfor extensions; these go into_extensions/ext-name/typst/packages/quarto dev-call typst-gatherto gather dependencies of built-in Typst templates; these go tosrc/resources/formats/typst/packagesdraft to test the rust build in ci - currently taking the simple approach and building
typst-gatherinconfigure.shbut we could build it in workflows instead.