【发布时间】:2022-01-17 21:03:36
【问题描述】:
我通过the math directive 获得了包含数学块的 Sphinx 文档。默认情况下,它们在 HTML 输出中居中。我希望它们都显示在左侧对齐,但相对于周围的文本有一些缩进。
例如,如果这是在index.rst
For :math:`|r| < 1`:
.. math::
\sum\limits_{k=0}^{\infty} r^k = \frac{1}{1-r}
Text in following paragraph put here to demonstrate that the math block
is in fact centered on the page.
而conf.py 完全为空,然后在同一文件夹中运行sphinx-build . output 会生成在浏览器中查看的以下 HTML 页面:
我希望该公式和所有其他数学块左对齐,例如 2 "em" 缩进。 This question 询问如何左对齐单个数学块。我希望有一种方法可以在整个文档中实现相同的效果,而无需更改 reStructuredText 源中的每个数学指令。
【问题讨论】:
标签: python-sphinx mathjax restructuredtext