Repository navigation
Conversation
`math.class("opening", "||")` passes a plain string, which Typst lays out
as two separate `|` glyphs instead of the double bar (U+2016) that `\Vert`
gets from the `||` shorthand, and the pair does not stretch with
`\left ... \right`. Use `math.bar.v.double` instead (`sym` is shadowed by
the helper in prelude.typ, and `std` only exists since Typst 0.12).
Author
|
Gentle ping on this when someone has a moment. It still merges cleanly on current main, and I'm happy to fold the |
This branch has not been deployed
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.
\lVertand\rVertused to render as a double bar (they weredefine-sym("||"), same as\Vert). Since #172 (0.2.5) they aremath.class("opening" / "closing", "||"), and there"||"is a plain string, so Typst sets two separate|glyphs and the pair doesn't grow with\left … \right.This passes the
bar.v.doublesymbol instead and leaves the opening/closing classes from #172 as they are. It is spelledmath.bar.v.doublebecausesymis shadowed by the helper fromprelude.typ, andstd.only exists from Typst 0.12 (CI pins 0.10.0).With Typst 0.14.2, the text of the compiled PDF has two
|around the x for\lVert … \rVertbefore, and one‖(U+2016) after, like\Vert. In the render, the\left\lVert \frac{a}{b} \right\rVertbars used to stay small next to the fraction and now stretch like\left\Vert.Checks:
typst query packages/mitex/specs/mod.typ "<mitex-packages>"(what the spec-gen build script runs) on Typst 0.10.0, 0.11.1, 0.12.0, 0.13.1, 0.14.2 and 0.15.1: only thelVert/rVertscope entries differ, and the string||there becomes U+2016.cargo test --workspace --no-fail-fastpasses before and after with Typst 0.10.0 on PATH, as in CI. The Rust tests don't exercise the Typst scope, so there is no snapshot to add or update.main(chunks_exactlint incrates/mitex/tests/cvt/testset.rs); unrelated to this change.\lvert/\rvertuse the same string pattern ("|") and, on Typst 0.13 and later, don't stretch inside\left … \righteither. I left them alone to keep this focused; happy to include them here or follow up.