Skip to content

fix: MathJax rendering in theorem blocks and display math#11

Merged
Navi Bot (project-navi-bot) merged 1 commit into
mainfrom
docs/site-scaffold
Mar 31, 2026
Merged

fix: MathJax rendering in theorem blocks and display math#11
Navi Bot (project-navi-bot) merged 1 commit into
mainfrom
docs/site-scaffold

Conversation

@Fieldnote-Echo
Copy link
Copy Markdown
Member

Summary

Fixes all MathJax rendering failures inside theorem-block divs across all exposition pages.

Root cause: Display math using \[...\] or multi-line $$ inside <div class="theorem-block"> HTML blocks was not being processed by the arithmatex extension, resulting in raw LaTeX appearing as text.

Fix (two parts):

  1. Added markdown attribute to all 44 theorem-block divs so md_in_html processes content
  2. Converted all display math to single-line $$...$$ format which arithmatex reliably recognizes in all contexts

Verified with Playwright on all 5 exposition pages — 0 broken blocks, 522 total MathJax elements rendering:

Page Blocks MathJax Broken
coincidence-length 2 138 0
delay-embedding 11 112 0
ordinal-compression 12 102 0
smooth-embedding 5 54 0
sard-infrastructure 14 116 0

Test plan

  • uv run zensical serve — all theorem blocks render LaTeX, no raw \operatorname visible
  • Force refresh each exposition page to confirm
  • Collapsible Lean blocks still expand/collapse

…ibility

Multi-line \[...\] and multi-line $$ inside <div markdown> blocks were not
being processed by arithmatex, resulting in raw LaTeX in the rendered HTML.
Single-line $$...$$  is reliably recognized by arithmatex in all contexts.

Coding-Agent: claude-code
Model: claude-opus-4-6
@project-navi-bot Navi Bot (project-navi-bot) merged commit c2ea603 into main Mar 31, 2026
4 checks passed
@project-navi-bot Navi Bot (project-navi-bot) deleted the docs/site-scaffold branch March 31, 2026 14:43
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.

2 participants