You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are considering to change the default math rendering library in Marp Core to MathJax, to avoid many rendering bugs in KaTeX due to auto-scaling (#159, #236) and network access via CDN (marp-team/marp-vscode#170 (comment)).
For keeping nice rendering of exist slides that are expected to use KaTeX, we are planning to add math global directive to fix the math library used in Markdown. Even if broke slides, user can declare to use KaTeX per Markdown just by adding math: katex definition.
---math: katex---
math global directive accepts "katex", "mathjax", and boolean.
katex: Use KaTeX.
mathjax: Use MathJax.
true: Use the default library. (default: KaTeX in v2, and MathJax in the future version)
false: Disable math.
It would bring a troublesome problem if math global directive let to disable: math global directive #243 (comment). Even if just supported to choice the math library, we would achieve an original purpose.
The text was updated successfully, but these errors were encountered:
Marpit parser recognizes global directive after parsing the whole of Markdown so currently we should certainly assume the syntax $...$ and $$...$$ as math before parsing global directive. In this case, supporting math: false in the global directive makes a troublesome in below:
---math: false---
te*st$y=x*2$
It means:
<p>te<em>st$y=x</em>2$</p>
But we cannot recognize * as the syntax for emphasis because $y=x*2$ have already consumed as the math token.
We have to save superposition state in tokens for keeping compatibility with Markdown and some external Marpit/markdown-it plugins. Bluntly it's too complex.
We are considering to change the default math rendering library in Marp Core to MathJax, to avoid many rendering bugs in KaTeX due to auto-scaling (#159, #236) and network access via CDN (marp-team/marp-vscode#170 (comment)).
For keeping nice rendering of exist slides that are expected to use KaTeX, we are planning to add
math
global directive to fix the math library used in Markdown. Even if broke slides, user can declare to use KaTeX per Markdown just by addingmath: katex
definition.math
global directive accepts"katex"
,"mathjax"
, and boolean.katex
: Use KaTeX.mathjax
: Use MathJax.true
: Use the default library. (default: KaTeX in v2, and MathJax in the future version)false
: Disable math.math
global directive let to disable:math
global directive #243 (comment). Even if just supported to choice the math library, we would achieve an original purpose.The text was updated successfully, but these errors were encountered: