当我在组织模式下将以下 block 导出为 html 时,
#+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
生成的 html 提示 DeclareMathOperator
是一个未定义的控制序列(它识别 newcommand
)。在检查 html 时,mathjax 配置包含以下扩展。
extensions: ["tex2jax.js","TeX/AMSmath.js","TeX/AMSsymbols.js",
"TeX/noUndefined.js"],
那么为什么 mathjax 无法识别 DeclareMathOperator
?
最佳答案
正如我在 this comment 中提到的,orgmode.org 上托管的 MathJax 版本很古老,并且早于包含 \DeclareMathOperator
宏。您应该将 MathJax 的源更改为位于 http://cdn.mathjax.org/mathjax/latest/Mathjax.js 的 MathJax CDN以获得最新版本。
关于html - Org html 导出无法识别 mathjax 的 DeclareMathOperator?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25552084/