Worklog for task "Add LaTeX support"
11 сент. 2026 г., 08:30:45
We need to research and refine the current LaTeX support.
Right now, judging by how the integration behaves, the LaTeX/KaTeX plugin tries to parse too large a chunk of content—potentially the entire text. This both slows down rendering and leads to warnings/errors on regular Unicode text, for example:
LaTeX-incompatible input and strict mode is set to 'warn': Unicode text character "а" used in math mode [unicodeTextInMathMode]
We need to investigate how the current plugin is connected and at what stage it receives the AST/content. The goal is to ensure the LaTeX parser only processes explicitly mathematical fragments: inline math and separate math blocks, while regular Markdown/text does not pass through KaTeX at all.
Specifically, check:
- which math syntax markers are already supported (
$...$,$$...$$, possibly fenced/directive blocks); - whether transformation at the Markdown AST level can be restricted to
inlineMath/mathnodes only; - whether a mode/plugin is enabled that incorrectly treats regular text as math mode;
- the performance impact of the current implementation;
- after the fix, verify the absence of
unicodeTextInMathModewarnings on regular Russian text and that formulas render correctly.