Reputation: 1628
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
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