问题
How do I achieve the same effect in mathjax?
Inserting,
\DeclareMathOperator{\E}{\mathbb{E}}
in the html does not work, mathjax throws Undefined control sequence \DeclareMathOperator error. I can, however use `newcommand. Is there a workaround?
回答1:
You need to load the AMSmath extension (which is included in all the pre-defined configuration files, so I'm assuming you are using your own configuration). Add
TeX: {
extensions: ["AMSmath.js","AMSsymbols.js"]
}
to your configuration and that should do it.
EDIT:
Also, it looks like orgmode.org has an ancient version of MathJax installed (v1.0.1) that is several years out of date. The configuration process that I gave you was added in v2.0, so that is why that isn't being loaded. It may also be that \DeclareMathOperator was not in v1.0.1 (I kind of recall that it wasn't). You should switch to http://cdn.mathjax.org/mathjax/latest/MathJax.js to get a current version.
来源:https://stackoverflow.com/questions/25537757/equivalent-of-declaremathoperator-in-mathjax