shyamupa
shyamupa

Reputation: 1628

Org html export does not recognize mathjax's DeclareMathOperator?

When I export to html the following block in org-mode,

#+BEGIN_HTML
\(
\renewcommand{\Pr}{\mathbb{P}}
\renewcommand{\vec}[1]{\mathbf{#1}}
\DeclareMathOperator{\E}{\mathbb{E}}
\DeclareMathOperator*{\argmin}{\mathbf{arg\,min}}
\DeclareMathOperator*{\argmax}{\mathbf{arg\,max}}
\DeclareMathOperator*{\sup}{sup}
\)
#+END_HTML

The generated html complains that DeclareMathOperator is a undefined control sequence (it recognizes the newcommand). On examining the html, the mathjax config contains the following extensions.

extensions: ["tex2jax.js","TeX/AMSmath.js","TeX/AMSsymbols.js",
                     "TeX/noUndefined.js"],

So why is mathjax not recognizing the DeclareMathOperator?

Upvotes: 2

Views: 736

Answers (1)

Davide Cervone
Davide Cervone

Reputation: 12250

As I mentioned in this comment, the version of MathJax hosted at orgmode.org is ancient, and predates the inclusion of the \DeclareMathOperator macro. You should change your source for MathJax to the MathJax CDN at http://cdn.mathjax.org/mathjax/latest/Mathjax.js in order to get the most up-to-date version.

Upvotes: 3

Related Questions