Commit 12560f2
committed
Fix multi-line math blocks losing indentation in LaTeX
Multi-line math content (e.g. \begin{align}...\end{align}) from
doxygen XML was emitted as:
.. math:: \begin{align}
\mathbf{v}
= \mathbf{u} + ...
\end{align}
RST requires directive body content to be indented. The
continuation lines at column 0 were parsed as regular text by
docutils, producing garbled LaTeX output with "Runaway argument"
and "Missing $" errors — 164 LaTeX errors on the Notation page
alone.
Fix: in visit_formula, detect multi-line math text and emit it
as a properly indented block:
.. math::
\begin{align}
\mathbf{v}
= \mathbf{u} + ...
\end{align}
Single-line math is unchanged (stays on the .. math:: line).
After fix: `make latexpdf` LaTeX errors drop from 164 to 10.
The remaining 10 are unrelated (9 Unicode Greek characters in
source comments that pdflatex cannot render, 1 duplicate label).1 parent 37e7c73 commit 12560f2
1 file changed
Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
683 | 683 | | |
684 | 684 | | |
685 | 685 | | |
686 | | - | |
687 | 686 | | |
688 | | - | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
689 | 694 | | |
690 | 695 | | |
691 | 696 | | |
| |||
0 commit comments