I use preloaded MathJax components with node.js (
source code) to convert tex to SVG in an html document in
eLabFTW, an open source electronic lab notebook, and it works very well.
MathJax
is a great tool.
Now, I want to convert the html document containing the SVG to a
PDF
with
mpdf and it works very well
most of the time. But there are cases when Mathjax generates nested SVGs. E.g., with the mhchem
extensions:
$\ce{A ->[H2O] B}$So far I think the nesting is limited to stretched
arrows with the optional arguments for text above and below.
PDF generation is not working in these cases due to mpdf
limitations. Nested SVGs are simply not implemented.
For my use case it would be better to have a short error if that avoids the nesting and hence there will be no problems during PDF generation.