狮身人面像任意交叉引用会破坏段落吗?

时间:2015-11-23 19:13:26

标签: python-sphinx restructuredtext

我正在学习/测试Sphinx并发现了一个可能对我的项目造成破坏的错误 - 任何人都知道解决方法或发现错误?问题是链接目标(锚)似乎打破了该区域的格式。

我设置了一个像这样的任意交叉引用:

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时链接看起来很棒,但是在目标处,这两个项之间的段落中断已被忽略。它们显示为一个段落。

picture of munged paragaphs

我尝试在引用链接之前或之后添加额外的行,没有好处。

这可能与this question中的问题相同,但那里没有答案。

1 个答案:

答案 0 :(得分:1)

我没有完全尝试mzjn建议的解决方案,但它让我考虑发送一个LaTeX命令来打破段落。这很有效:

your programs, too.  

.. raw:: latex

    \par

.. _nonbeer:

When we speak of free software,

它也没有破坏HTML。