Search code examples
latexmathjaxtex

MathJax does not render all tex expression


I have setup MathJax on a application that shows research documents and it works 99% fine with the TeX-AMS-MML_HTMLorMML configuration.

The only issue is that on some rare documents the \varvec expression is not rendered and it's formatted in red.

tex expression in red

I am not a Tex expert and I haven't found anything about this to understand if it's a wrong tex expression or if there is some more configuration to set in MathJax


Solution

  • This macro is not supported out of the box.

    A full list of macros and environments supported by MathJax can be found at http://docs.mathjax.org/en/latest/tex.html#supported-latex-commands. MathJax aims to support all basic math mode macros but cannot support all possible macros out of the box.

    However, you can write your own macros, cf. http://docs.mathjax.org/en/latest/tex.html#defining-tex-macros. For more complex packages, you can write your own extensions, cf. also http://docs.mathjax.org/en/latest/options/ThirdParty.html#mathjax-third-party-extension-repository. Since MathJax is not TeX it cannot import TeX packages (such as sty files) so complex packages usually have to be re-implemented in its extension system.