# Leave math content alone with tex4ht for MathJax [duplicate]

This question and answer explain how one could use tex4ht to convert tex to html with MathJax reading the math. One (of several) problem(s) I am having is that my document uses \cancel from the cancel package. Even if I alter my tex4ht configuration file so that the cancel extension is loaded in the head of the html file, it's too late. htlatex has already converted things like \cancel{2} in the tex file into image files and inserted img elements for them, instead of converting \cancel{2} into some kind of mathml equivalent.

Is there a way to have htlatex leave math environments untouched? If the delimiters like \[, \(, \begin{align}, etc., and the commands inside them like \cancel{2} were left alone when htlatex makes the conversion, then MathJax should process the contents as they are, using their raw LaTeX commands and structure (as long as there aren't too many complications.)

## marked as duplicate by alex.jordan, ChrisS, dustin, Jesse, Adam LiterOct 5 '14 at 4:28

• see tex.stackexchange.com/a/185802/2891 look at \VerbMath command in particular. – michal.h21 Oct 4 '14 at 8:45
• sure, let me know if it works and we can close this question, or post mwe and I will modify the cfg file according to your use case – michal.h21 Oct 4 '14 at 15:41
• @michal.h21 In the config file there, is AltlMathiI a typo, and should be AltlMathI? – alex.jordan Oct 4 '14 at 16:10