-
Notifications
You must be signed in to change notification settings - Fork 2k
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
missing line break in pysigline #8980
Comments
Thanks for report. This is related to #7241. Maybe #7241 (comment) will help you with better workaround for time being. |
Fixed at 2934aac |
Reason is that mark-up such as this: .. attribute:: state state_machine The state and state machine which controls the parsing. Used for ``nested_parse``. generates two `\pysigline` each with `\phantomsection`. The latex code to get good vertical spacing between label and its description, if label ``\parbox`` is multi-line, cause in this context the two (generally, single-line) labels to be stacked vertically with no spacing. This commit keeps the ``\parbox`` which fixes sphinx-doc#8980, but drops the attempt to correct vertical distance to description, so as to not alter the possibly more common use case of items with common description.
Reason is that mark-up such as this: .. attribute:: state state_machine The state and state machine which controls the parsing. Used for ``nested_parse``. generates two `\pysigline` each with `\phantomsection`. The latex code to get good vertical spacing between label and its description, if label ``\parbox`` is multi-line, cause in this context the two (generally, single-line) labels to be stacked vertically with no spacing. This commit keeps the ``\parbox`` which fixes sphinx-doc#8980, but drops the attempt to correct vertical distance to description, so as to not alter the possibly more common use case of items with common description.
Hello, this issue is marked as close. \newcommand{\pysigline}[1]{\item[{#1}]} which reproduces the bad behavior (line extending out of page margin) that started the same issue. Thanks for your kind attention. |
Le 12 avr. 2021 à 21:34, ndarmage ***@***.***> a écrit :
Hello, this issue is marked as close.
I retrieved sphinx v.3.5.3 under Py 3.9.2.
Still the file .../sphinx/texinputs/sphinx.sty contains the old line :
\newcommand{\pysigline}[1]{\item[{#1}]}
which reproduces the bad behavior (line extending out of page margin) that started the same issue.
Thanks for your kind attention.
Best regards,
Hi, 2934aac is a merge into 4.x branch. The 4.0 beta is already out which contains this patch.
|
Thanks for your kind reply - c'est noté. |
When producing the documentation for tex by
make latexpdf
with Sphinx v.3.5.2, I've noticed long lines extending out of the right page margin in the output pdf file with dictionaries used as class (or module) attributes. Minimal example:The problem is caused by the following line in the file sphinx.sty:
\newcommand{\pysigline}[1]{\item[{#1}]}
The optional argument of the item, that is the label, is typeset in horizontal mode, so that it is not possible to have line breaks. A possible solution is to use a parbox like:
\newcommand{\pysigline}[1]{\item[{\parbox[b]{\textwidth}{#1}}]}
which fixed my problem.
The text was updated successfully, but these errors were encountered: