Skip to content

Render handout section and environment titles via MathRendererClient#79

Merged
PatrikBak merged 1 commit into
mainfrom
patrik/handout-title-math
May 8, 2026
Merged

Render handout section and environment titles via MathRendererClient#79
PatrikBak merged 1 commit into
mainfrom
patrik/handout-title-math

Conversation

@PatrikBak
Copy link
Copy Markdown
Owner

Summary

  • Section titles and environment subtitles (theorem/exercise/problem names) now go through MathRendererClient so inline math like \Problem{0}{zhodnosť $Ssu$} renders as KaTeX instead of showing visible dollars or breaking baseline alignment inside the inline-flex pill.
  • Added inlineBlockToMathSource in web/src/components/math/utils/math-render.ts which flattens an inline RawContentBlock back to its raw source string, wrapping math nodes in $...$/$$...$$.
  • renderTitle in HandoutDetail.tsx now reconstructs the title string and feeds it through MathRendererClient, matching how the document title and subtitle already render.
  • Unexports the now-unused renderInlineContent from ContentRenderer.tsx (still used internally).

🤖 Generated with Claude Code

Section titles and environment subtitles (theorem/exercise/problem names)
were rendered as plain strings or as a fragment-per-node tree, so any inline
math like \Problem{0}{zhodnosť $Ssu$} either showed visible dollars or
rendered with broken baseline alignment inside the inline-flex pill.

They now go through MathRendererClient with a reconstructed source string,
matching how the document title and subtitle already render.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 7, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
math-comps Ready Ready Preview, Comment May 7, 2026 11:17pm

@PatrikBak PatrikBak merged commit d5851a2 into main May 8, 2026
4 checks passed
@PatrikBak PatrikBak deleted the patrik/handout-title-math branch May 8, 2026 00:15
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