Sphinx 任意交叉引用破坏段落中断?
Sphinx arbitrary cross-reference destroys paragraph break?
我是 learning/testing Sphinx,我发现了一个可能会破坏我的项目的错误 - 有人知道解决方法或可以发现错误吗?问题是 link 目标(锚点)似乎破坏了该区域的格式。
我像这样设置了一个任意的交叉引用:
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
.. _nonbeer:
When we speak of free software, we are referring to freedom, not price.
Our General Public Licenses are designed to make sure that you have the
freedom to distribute copies of free software (and charge for them if
我可以通过以下语法成功引用它:
Arbitrary crossreference test: :ref:`Free Software <nonbeer>`
当我输出 PDF 时,link 看起来不错,但在目标中,这两项之间的段落分隔符已被忽略。它们显示为一个段落。
我尝试在引用 link 之前或之后添加额外的行,但效果不佳。
这可能与 this question 中的问题相同,但那里没有答案。
我没有完全尝试 mzjn 建议的解决方案,但它让我想到发送 LaTeX 命令来打断段落。这有效:
your programs, too.
.. raw:: latex
\par
.. _nonbeer:
When we speak of free software,
它也没有破坏 HTML。
我是 learning/testing Sphinx,我发现了一个可能会破坏我的项目的错误 - 有人知道解决方法或可以发现错误吗?问题是 link 目标(锚点)似乎破坏了该区域的格式。
我像这样设置了一个任意的交叉引用:
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
.. _nonbeer:
When we speak of free software, we are referring to freedom, not price.
Our General Public Licenses are designed to make sure that you have the
freedom to distribute copies of free software (and charge for them if
我可以通过以下语法成功引用它:
Arbitrary crossreference test: :ref:`Free Software <nonbeer>`
当我输出 PDF 时,link 看起来不错,但在目标中,这两项之间的段落分隔符已被忽略。它们显示为一个段落。
我尝试在引用 link 之前或之后添加额外的行,但效果不佳。
这可能与 this question 中的问题相同,但那里没有答案。
我没有完全尝试 mzjn 建议的解决方案,但它让我想到发送 LaTeX 命令来打断段落。这有效:
your programs, too.
.. raw:: latex
\par
.. _nonbeer:
When we speak of free software,
它也没有破坏 HTML。