Skip to content

math global directive #243

Closed
Closed
@yhatt

Description

@yhatt

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions