Skip to content

Fix MathJax rendering for multi-row cases - #74

Merged
Divide-By-0 merged 1 commit into
masterfrom
stack/01-cases-rendering
Sep 29, 2026
Merged

Divide-By-0 merged 1 commit into
masterfrom
stack/01-cases-rendering

Conversation

@Divide-By-0

Copy link
Copy Markdown
Owner

Human intent

Rephrased from the support report and automation request:

  • Make Auto-LaTeX render valid multi-row cases equations that currently fail in the MathJax path.
  • Diagnose from a minimal reproduction, preserve unrelated work, and provide a tested reviewable fix without deploying it.

Summary

Select only top-level MathJax SVG output. Stretchy delimiters in multi-row cases add nested SVG elements, which are parts of the outer equation rather than independent render results.

Evidence

  • On origin/master, the supplied multi-row cases example produces one top-level SVG plus two nested brace SVGs; the old descendant selector rejects it with MathJax returned 3 SVG fragments.
  • The added regression fails on the pre-fix renderer and passes after the change.

Validation

  • node --test tests/mathjax-svg-fragmentation.test.js
  • npm test (153 passing)

Scope and rollout

This changes the shared Docs/Slides/Sheets MathJax client renderer. It does not deploy or publish an Apps Script version; live add-ons remain unchanged until a separate release.

@Divide-By-0
Divide-By-0 merged commit 5058bcc into master Sep 29, 2026
3 checks passed
@Divide-By-0
Divide-By-0 deleted the stack/01-cases-rendering branch September 29, 2026 01:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant