python-sphinx - 方程式编号如何为狮身人面像工作?
问题描述
我对 sphinx 比较陌生,我刚刚创建了两个文件来测试带有编号的方程交叉引用。
我在 conf.py 中进行以下配置
numfig = True
math_numfig = True
numfig_secnum_depth = 2
math_eqref_format = "Eq.{number}"
第一个文件是
1. Test File 1 Main
=============
Inline math examples: :math:`\color{blue}{\sigma_{1}}` equals :math:`\colorbox{yellow}{\sigma_{2}}` then etc, etc.
Any text.
.. math::
x^2+y^2=1
:label: eq_a
Math block example with label:
.. math::
e^{i\pi} + 1 = 0
:label: eq_b
1.1 Some Examples
****************
.. math::
\color{red}{x^2}+y^2=3
:label: eq_c
第二个是
2. Test File 2 Main
=============
Refer to :eq:`eq_a`
Refer to :eq:`eq_b`
Refer to :eq:`eq_c`
输出是 HTML。它不适用于编号,所有标签都丢失(但链接很好)。
我错过了什么吗?我也很困惑如何自动给章节编号。测试中的部分编号是手动添加的。是因为我需要配置部分编号才能显示方程式编号吗?这样做的正确方法是什么?谢谢!
解决方案
推荐阅读
- loading - 我们可以根据 SNOWFLAKE 中 PIPE 的成功条件来设置任务启动条件吗
- css - 我无法让文本与图像正确交互,这导致我创建了许多断点以使其正确显示
- ubuntu - 无法使用 scp 命令为证书颁发机构传输文件
- oracle - 我如何在 Oracle 19 中以反映玩家在团队中时当前团队排名的方式加入表格?
- c++ - “不可演绎”一词的正式定义是什么
- python - 在 Django 中,如何在使用 generic.CreateView 创建新对象时更新所有对象?
- python - 使用 seaborn 如何绘制包含 70 多个类别的列
- java - 存储在数组 java 中的数字错误
- jsf - JSF 2.1 和 RichFaces 迁移到 JSF 2.2
- javascript - 无法从 js 对象获取内容