python-sphinx - Sphinx 是否支持 MathML(通过 mathjax 扩展)?

标签 python-sphinx mathjax

有没有办法用 Sphinx 在第一个文件中渲染 MathML?

我在 conf.py 中启用了 mathjax 扩展。它与 latex 一起使用效果很好

enter image description here

但是,如果我用 math ML 替换它,它会渲染它,但会显示所有 xml 代码。例如,

enter image description here

产生

enter image description here

在 Sphinx 中,数学由 mathjax 扩展呈现。在 https://www.mathjax.org/ mathjax 声称他们支持 MathML。

最佳答案

在不知道您想要的输出的情况下很难回答,但是从 doc

The "math" directive inserts blocks with mathematical content (display formulas, equations) into the document. The input format is LaTeX math syntax with support for Unicode symbols

因此,无法将 MMl 与 ..math:: 一起使用 如果你输出的是HTML,你可以试试rawliteral指令而不是让 block 保持原样。该 block 将在兼容 MML 的浏览器中正确显示。如果您包含具有正确配置的 mathjax 库,它也会处理。

关于python-sphinx - Sphinx 是否支持 MathML(通过 mathjax 扩展)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50536532/

相关文章:

python - Sphinx 中是否有使用 sphinx.ext.napoleon 记录函数类型参数的标准格式?

latex - 如何为Latex/PDF输出添加图形/表格列表?

python - 如何将模块导入 Sphinx

python - 文档脚本不是狮身人面像中模块的一部分

android - 带有 MathJax 的 ListView 中的 WebViews

python - 使用 IPython.display.Latex 时,LaTeX 方程不会在 google Colaboratory 中呈现

python - 格式化函数名称的简单方法

javascript - MathJax 并不总是使用 Vue 过滤列表进行渲染

javascript - 为后面的页面预加载外部 JavaScript 库

javascript - 使用 pstricks 和 latex2html5 绘制圆弧