The title says it all. I've got \cancel working fine in my org-mode Latex export, but org-mode HTML export doesn't know about, render \cancel. Basically I need to strike through something in a math formula, like I'm "canceling out" a factor. Someone suggested MathJax is the problem, i.e., MathJax doesn't know about \cancel.

#+LATEX_HEADER: \usepackage[makeroom]{cancel}
\frac{1}{(2^3)(5)} + \frac{1}{3^4} + \frac{1}{\cancel{(2^2)}(23)}

What can a poor org-mode beginner do?

  • 2
    mathjax is off-topic here
    – user31729
    Oct 8, 2015 at 13:15

1 Answer 1


Off-topic or no, this is what I finally found, i.e., put this code somewhere at the top of your org-mode file:

<script type="text/x-mathjax-config">
        TeX: {extensions: ["cancel.js"]},
        tex2jax: {
          inlineMath: [ ['$','$'], ['\\(','\\)'] ],
          processEscapes: true

...and \cancel can be used just fine in an HTML export. Also, this

(setq org-html-mathjax-template (concat org-html-mathjax-template "
<script type=\"text/x-mathjax-config\">
MathJax.Hub.Register.StartupHook(\"TeX Jax Ready\",function () {
    cancel: [\"Extension\",\"cancel\"],
    bcancel: [\"Extension\",\"cancel\"],
    xcancel: [\"Extension\",\"cancel\"],
    cancelto: [\"Extension\",\"cancel\"]

can be added to your Emacs init to get the same effect.

Not the answer you're looking for? Browse other questions tagged or ask your own question.