1

I'm learning/testing Sphinx and found a possible bug that could be a dealbreaker for my project - anyone know a workaround or can spot an error? The problem is that the link target (anchor) seems to break the formatting in that area.

I set up an arbitrary cross-reference like this:

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

I can successfully reference it via this syntax:

Arbitrary crossreference test: :ref:`Free Software <nonbeer>`

The link looks great when I output PDF, but at the target, the paragraph break between those two items has been ignored. They show up as one paragraph.

picture of munged paragaphs

I tried adding extra lines before or after the reference link, no good there.

This is possibly the same problem in this question, but there isn't an answer there.

Community
  • 1
  • 1
E Kelly
  • 171
  • 9
  • I almost got a workaround with this: `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. ` It separates the paragraphs and doesn't print anything in between, but it uses too much space between them. – E Kelly Nov 23 '15 at 19:58
  • This only affects PDF (LaTeX) output, right? – mzjn Nov 23 '15 at 20:03
  • Actually I hadn't tested the HTML until now and the cross-reference isn't working there (I click the link but nothing happens). But the paragraphs seem fine with the workaround above still in the source. I will mess with that. (I am using the LaTeX-based PDF generation.) – E Kelly Nov 23 '15 at 20:53
  • Yes, after cleaning up the target syntax the HTML link works and the HTML paragraphs are intact. – E Kelly Nov 23 '15 at 21:04
  • 1
    Regarding too much space between paragraphs. This might help: http://stackoverflow.com/a/28375029/407651 – mzjn Nov 24 '15 at 09:17

1 Answers1

1

I didn't try exactly the solution that mzjn suggested, but it got me thinking about sending a LaTeX command to break the paragraph. This worked:

your programs, too.  

.. raw:: latex

    \par

.. _nonbeer:

When we speak of free software,

It didn't break the HTML either.

E Kelly
  • 171
  • 9