Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #9944 (LaTeX writer visit_desc_content()) #9945

Closed
wants to merge 1 commit into from

Conversation

jfbu
Copy link
Contributor

@jfbu jfbu commented Dec 5, 2021

Relates #9926

With this, the following

.. option:: -mmmx
            -msse
            -msse2

   .. note::

      A note in the option description

.. c:function:: PyObject *PyType_GenericAlloc(PyTypeObject *type, Py_ssize_t nitems)

   .. note::

      Extra vertical space also in this case if note is first item

.. cpp:class:: Data

   .. cpp:union:: @data

      .. cpp:var:: int a

      .. cpp:var:: double b

Explicit ref: :cpp:var:Data::@data::a. Short-hand ref: :cpp:var:Data::a.

produces

Capture d’écran 2021-12-05 à 21 44 56

Comparing to the output shown in issue #9944, it only fixes the vertical space for the option with note and nested declaration case, not for the note at start of function description.

The PR removes from LaTeX markup an ~ which was added 14 years ago at 3761223. The ~ causes LaTeX to enter into paragraph mode and then this causes vertical space if some "display block" type of entity (such as a note) follows).

It seems not to be needed anymore. I could not find an example where the ~ to avoid empty contents would avoid a "formatting bug" and don't know where to look.

The "~" was added 14 years ago at 3761223

Seems not to be needed anymore and causes extra vertical space in some
circumstances.
t
@jfbu jfbu added this to the 4.3.2 milestone Dec 5, 2021
@jfbu
Copy link
Contributor Author

jfbu commented Dec 5, 2021

(I had completely forgotten to check the unit tests, but in fact I see from succesful testing that none existed for a case where latex writer would output the ~ or at least none tested for its presence in output...)

@jfbu jfbu deleted the branch sphinx-doc:4.3.x December 6, 2021 08:13
@jfbu jfbu closed this Dec 6, 2021
@jfbu jfbu deleted the 4.3.x branch December 6, 2021 08:13
@jfbu
Copy link
Contributor Author

jfbu commented Dec 6, 2021

Sorry this got closed from me renaming my local branch via the web interface at my fork. Will open a new PR with the renamed branch.

@jfbu jfbu removed this from the 4.3.2 milestone Dec 13, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant