Fix poster template math syntax and logo path for pandoc 3.10#23
Merged
Conversation
Pandoc 3.10's texmath conversion fuses a superscript immediately
followed by a space into one Typst identifier (e.g. ^n k -> ^nk),
which Typst then rejects as an unknown variable. The demo formula used
paren-grouping (\sum_(k=1)^n) instead of proper LaTeX brace-grouping
(\sum_{k=1}^n), which triggers this. See jgm/texmath#291.
Separately, pandoc 3.10 mis-escapes a leading "./" in metadata
interpolated as raw text (same root cause as
quarto-dev/quarto-cli#14664's bibliography path fix), which broke the
institution-logo path. Dropping the redundant "./" avoids the leading
dot entirely.
Both bugs are pandoc-side and unfixed upstream; adjusting the template
content avoids them without waiting on a pandoc release.
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.
When rendering the poster template with pandoc 3.10, the render fails with a Typst compile error.
Root Cause
Two unrelated pandoc 3.10 regressions compound in this template:
\sum_(k=1)^n kuses paren-grouping instead of proper LaTeX brace-grouping. Pandoc 3.10's texmath conversion fuses a superscript immediately followed by a space into one Typst identifier (^n kbecomes^nk), which Typst then rejects as an unknown variable (Typst writer: superscript fuses with following token when its base is an escaped literal paren jgm/texmath#291).institution-logo: "./images/ncstate.png"starts with./, which pandoc 3.10 mis-escapes as a literal backslash before the dot when interpolated as raw text into the Typst template - the same class of bug already worked around for bibliography paths in Update Pandoc, Typst, Dart Sass, esbuild, and veraPDF quarto-dev/quarto-cli#14664.Fix
Use proper brace-grouping (
\sum_{k=1}^n k) in the demo formula, and drop the redundant leading./from the logo path.Both bugs are upstream in pandoc/texmath and unfixed; adjusting the template content avoids them without waiting on a release.
Test Plan
poster/template.qmdtoposter-typstwith pandoc 3.10 - should complete without errorRelated to jgm/texmath#291, quarto-dev/quarto-cli#14664