You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Inline math ($...$) inside a Hebrew (right-to-left) paragraph of an assistant message renders as broken glyph fragments. The symbols are partly drawn, overlapping, and misplaced.
In the same thread:
display math ($$...$$) renders correctly, including when the surrounding message is Hebrew;
the same inline math renders correctly inside an English (left-to-right) paragraph.
Repro
Have the assistant reply with a Hebrew sentence that contains inline math, for example:
הקבועים הם $e$, $i$ ו-$\pi$.
The formulas are recognized as math (they are typeset, just laid out wrong). This reproduces with the plain sentence above; invisible direction marks (U+200F) around the formulas make no difference.
Expected
Inline math in a right-to-left paragraph renders the same way it does in left-to-right text.
Likely cause
The KaTeX output seems to inherit direction: rtl from the paragraph, while KaTeX lays out each formula's parts assuming left-to-right. Isolating the math should fix it:
Activity