Refactor/fix HTML math handling.
commita8203a80063cf5283ca9a3b654c5b241dfbcaa21
authormilde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>
Sat, 13 Jan 2024 09:50:07 +0000 (13 09:50 +0000)
committermilde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>
Sat, 13 Jan 2024 09:50:07 +0000 (13 09:50 +0000)
tree3b45260d29f7f129b4a943f594f597180a5628a8
parentf6b129fb18c809371abc7b5509aa4e48b937affc
Refactor/fix HTML math handling.

Use custom exception `utils.math.MathSyntaxError` instead of
abusing `SyntaxError` for LaTeX math syntax errors.

Unify interface of LaTeX -> MathML conversion functions.

Run external MathML converters with `subprocess.run()`.
Revise pre- and post-processing.

Improve error reporting.

Use WARNING instead of ERROR for TeX to MathML conversion errors.
(The source is included in the output as TeX code, so no data is lost.)

Provisional test script for external TeX to MathML converters.
(Placed in a separate directory not to be run by "alltests".
It tests a rather arcane use case, requires optional helpers, and is slow.)

git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@9511 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
docutils/HISTORY.txt
docutils/docutils/utils/math/__init__.py
docutils/docutils/utils/math/latex2mathml.py
docutils/docutils/utils/math/tex2mathml_extern.py
docutils/docutils/writers/_html_base.py
docutils/docutils/writers/html4css1/html4css1.css
docutils/docutils/writers/html5_polyglot/minimal.css
docutils/test/extra/test_math_conversion.py [new file with mode: 0644]
docutils/test/test_writers/test_html5_polyglot_parts.py