Repository navigation
Conversation
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. |
Pandoc 3.11 added --math-method=METHOD[:URL] and deprecated --katex, --mathjax, --mathml, --webtex and --gladtex, whose deprecation warning now points users to the new option. Pandoc honours it, but Quarto only looked at the old flags to learn which math method the command line chose, so with --math-method it kept acting on html-math-method (MathJax by default for Bootstrap HTML): - with --embed-resources, the template patch swapped Pandoc's $math$ for Quarto's MathJax loader while Pandoc's KaTeX render call stayed, so the KaTeX library was never embedded and math showed as raw TeX; - the KaTeX post-processor (the require.js define guard) didn't run; - llms.md output lost the math delimiters and doubled backslashes. parseRenderFlags now records the method and optional URL, the HTML math resolver returns it as a command line choice, and the template patch asks the resolver instead of checking the five legacy flags. The rest of mathConfig is left as is, so html-math-method behaves as before. The argument still goes to Pandoc unchanged. Output with --math-method=X is now byte-identical to output with the matching legacy --X flag.
cderv
force-pushed
the
fix/html-math-method
branch
from
November 10, 2026 16:39
c0c74e0 to
b8e7dbc
Compare
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.
Stacked on #15320 (Pandoc 3.13).
Pandoc 3.11 added
--math-method=METHOD[:URL]and deprecated--katex,--mathjax,--mathml,--webtexand--gladtex. With 3.13 bundled,quarto render --katexprints Pandoc's deprecation warning pointing to--math-method, but Quarto ignored that option when deciding which math method the command line chose. It kept acting onhtml-math-method(MathJax by default for Bootstrap HTML):--math-method=katex --embed-resources, Quarto injected its MathJax loader while Pandoc still emitted the KaTeX render call, so KaTeX was never embedded and math showed as raw TeX;--katexdid not run;llms.mdoutput lost the math delimiters and doubled backslashes.Fix
quarto rendernow reads--math-method(and its optional URL) like the legacy flags, and the HTML math handling uses it as the command line choice. The argument still goes to Pandoc unchanged. Output with--math-method=Xis now identical to output with the matching legacy--Xflag.The legacy flags are not translated to
--math-method: they keep working, and Pandoc's deprecation warning stays, as its advice is now accurate.Checklist
I have (if applicable):
AI-assisted PR
Note: autonomous AI agents submitting PRs without human oversight are not permitted — see the Code of Conduct.