Skip to content

[v2.0.34] PR into master from dev/olga/Add-option-to-display-mathml-latex-insted-of-svg#400

Draft
OlgaRedozubova wants to merge 11 commits intomasterfrom
dev/olga/Add-option-to-display-mathml-latex-insted-of-svg
Draft

[v2.0.34] PR into master from dev/olga/Add-option-to-display-mathml-latex-insted-of-svg#400
OlgaRedozubova wants to merge 11 commits intomasterfrom
dev/olga/Add-option-to-display-mathml-latex-insted-of-svg

Conversation

@OlgaRedozubova
Copy link
Contributor

@OlgaRedozubova OlgaRedozubova commented Jan 29, 2026

branch: dev/olga/Add-option-to-display-mathml-latex-insted-of-svg

Related PR https://github.com/Mathpix/monorepo/pull/17963

What's been changed:

  • Math Output Format:

    • Added output_format option to TOutputMath to control which math format is placed in HTML output.
    • 'svg' (default): Pre-rendered SVG with hidden formats, works offline.
    • 'mathml': Native <math> elements only, smaller file size, requires client-side rendering.
    • 'latex': Raw LaTeX with original delimiters, smaller file size, requires client-side rendering.
  • Browser Rendering Script (auto-render.js):

    • New browser bundle for client-side math rendering at es5/browser/auto-render.js.
    • Renders MathML or LaTeX content to SVG.
    • Generates hidden format elements for context menu compatibility.
    • Configurable accessibility support via MathpixAccessibilityConfig:
      • assistive_mml: Add <mjx-assistive-mml> for screen readers.
      • include_speech: Add aria-label with speech text.
  • Docs:

    • Added implementation details in pr-specs/2026-01-html-math-output-options.md.

TODO:

  • Add tests

@OlgaRedozubova OlgaRedozubova self-assigned this Jan 29, 2026
@OlgaRedozubova OlgaRedozubova changed the title Created pr-specrs for TML Math Output Options and Browser Render Script Created pr-specrs for HTML Math Output Options and Browser Render Script Jan 29, 2026
@OlgaRedozubova OlgaRedozubova changed the title Created pr-specrs for HTML Math Output Options and Browser Render Script [v2.0.34] PR into master from dev/olga/Add-option-to-display-mathml-latex-insted-of-svg Feb 4, 2026
…rue, so MathML data is not generated even though the renderer expects it.
…ects mjx-container inside full-width math blocks. To fix the centering issue for equations with numbering while not affecting other layouts.
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