In my personal experience, pandoc is more reliable than latexml, e.g. the current support for the latter in docutils does not automatically include amsfonts which prevents things like mathbb from working. In pandoc it Just Works.
One big advantage of pandoc is that it supports {align} and {gather}.
Pandoc and latex2mathml.py supports different subsets of latex. For example, latex2mathml.py does not support \gsime, but pandoc does.
The pandoc list of supported symbols is here [1] and it appears to be bigger (~2800 symbols) than the one in latex2mathml.py (~100 symbols), although it does not support some stuff like \underleftrightarrow that latex2mathml does.
Actually it appears [1] is written by yourself, and that version is 8 years old, so if you know where a newer version is I can go file a PR to them to support newer stuff like \underleftrightarrow.
(Another advantage on top of the other external tools, is that it is still under active development; the last commit to the texmath component was 24 days ago.)
One big advantage of pandoc is that it supports {align} and {gather}.
I see. Active development and widespread use is another bonus (especially
over other external tools).
Pandoc and latex2mathml.py supports different subsets of latex. For
example, latex2mathml.py does not support \gsime, but pandoc does.
The pandoc list of supported symbols is here [1] and it appears to be
bigger (~2800 symbols) than the one in latex2mathml.py (~100 symbols)
latex2mathml uses the same database and extracts the about 600 symbols
supported by the most common math packages. It also supports literal
Unicode characters in the input.
Actually it appears [1] is written by yourself, and that version is 8
years old, so if you know where a newer version is I can go file a PR
to them to support newer stuff like \underleftrightarrow.
The "unimathsymbols" database only contains LaTeX math macros that map
directly to Unicode code points. (\underleftrightarrow is implemented
using ↔ (\leftrightarrow) in a <munder> element.)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thank you for the patch.
What are the advantages over the native LaTeX -> MathML converter?
A test of the new conversion route with the maths documentation source
mathematics.txt revealed:
latexml
),(instead of reporting an unknown macro, it tells about expecting "%", "\label", "\nonumber" or whitespace)
BTW: a fix for "amsfonts" commands with
latexml
is ready and will be soon in the repository.(delete double-post; see comment below)
Last edit: Ximin Luo 2022-11-01
One big advantage of pandoc is that it supports {align} and {gather}.
Pandoc and latex2mathml.py supports different subsets of latex. For example, latex2mathml.py does not support \gsime, but pandoc does.
The pandoc list of supported symbols is here [1] and it appears to be bigger (~2800 symbols) than the one in latex2mathml.py (~100 symbols), although it does not support some stuff like \underleftrightarrow that latex2mathml does.
Actually it appears [1] is written by yourself, and that version is 8 years old, so if you know where a newer version is I can go file a PR to them to support newer stuff like \underleftrightarrow.
(Another advantage on top of the other external tools, is that it is still under active development; the last commit to the texmath component was 24 days ago.)
[1] https://github.com/jgm/texmath/blob/master/lib/totexmath/unimathsymbols.txt
I see. Active development and widespread use is another bonus (especially
over other external tools).
latex2mathml uses the same database and extracts the about 600 symbols
supported by the most common math packages. It also supports literal
Unicode characters in the input.
The database and related work is available under
https://milde.users.sourceforge.net/LUCR/Math/
The latest revision is used in latex2mathml but not published yet.
The "unimathsymbols" database only contains LaTeX math macros that map
directly to Unicode code points. (\underleftrightarrow is implemented
using ↔ (\leftrightarrow) in a
<munder>
element.)The patch is committed in [r9216].
Thank you for your contribution.
Related
Commit: [r9216]
Fixed in Docutils 0.20
Thanks again for your contribution.