This question already has an answer here:

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 Liter Oct 5 '14 at 4:28

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    see tex.stackexchange.com/a/185802/2891 look at \VerbMath command in particular. – michal.h21 Oct 4 '14 at 8:45
  • @michal.h21 Thanks! When I have some time later today I will give that a try. And then it looks like this question could be closed as a duplicate. I'll vote to close rather than delete if that turns out to be the case. – alex.jordan Oct 4 '14 at 14:57
  • 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
  • OK, this can be closed as duplicate. – alex.jordan Oct 5 '14 at 2:39

Browse other questions tagged or ask your own question.