Equivalent of \DeclareMathOperator in mathjax?

北城以北 提交于 2019-12-11 08:38:21

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!