Skip to content

Fix poster template math syntax and logo path for pandoc 3.10#23

Merged
cderv merged 1 commit into
mainfrom
fix/poster-math-example
Jul 16, 2026
Merged

Fix poster template math syntax and logo path for pandoc 3.10#23
cderv merged 1 commit into
mainfrom
fix/poster-math-example

Conversation

@cderv

@cderv cderv commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

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:

  1. The demo formula \sum_(k=1)^n k uses 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 k becomes ^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).
  2. 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

  • Render poster/template.qmd to poster-typst with pandoc 3.10 - should complete without error
  • Confirm the summation formula and institution logo still display correctly in the output PDF

Related to jgm/texmath#291, quarto-dev/quarto-cli#14664

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.
@cderv
cderv merged commit 79fcc3a into main Jul 16, 2026
@cderv
cderv deleted the fix/poster-math-example branch July 16, 2026 10:59
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.

1 participant