-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Fix #8072: Directive hlist not implemented in LaTeX #8779
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
Conversation
Adds ``multicol`` LaTeX package requirement, but it is a required part of any latex distribution.
| .. versionadded:: 0.6 | ||
|
|
||
| .. versionchanged:: 3.5.0 | ||
| support by the latex builder. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be 3.5 not 3.5.0? And should I capitalize: "Support", not "support"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both are okay, but I usually use 3.5 and "Support" (no reason and rules :-p)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I did not noticed this is a changes of hlist directive. I don't think this changelog is needed because of this change does not modify the feature of the directive itself.
Else, a non-hyphenatable long word as first word in a narrow column in a
longtable/tabular (with column type e.g. p{1cm} from tabularcolumns
directive) gets shifted downwards vertically in PDF output.
Memo:
1. I did not find other cases where such a vertical shift may occur (I
tried with deeply nested lists and artificial words such as 'A'*32) with
LaTeX mark-up produced by Sphinx,
2. but with the support of hlist directive via PR sphinx-doc#8779 using multicols
environment, there is again this situation of downwards shift of
non-hyphenatable long first words. But it occurs whether or not
\sphinxAtStartPar is used (\nobreak does not modify this).
|
LaTeX (except lualatex engine) does not hyphenate first word of a paragraph (see #8780). So with this PR, the input currently renders as (a4paper): With #8781 merged it will render rather as: However, if in this example |
tk0miya
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
|
Thanks for review @tk0miya as always. I tested that the used LaTeX |


Adds
multicolLaTeX package requirement, but it is a requiredpart of any latex distribution.
(hence I make the PR on 3.x branch)
I think this is bugfix as #8072 was tagged as "bug" :)
I used following test file
index.rst.txt
to check it was possible to use
hlistinside a table, or inside another list (I checked only ahlist, but this is only more stringent).In the test output one sees some phenomenon related to the fact that LaTeX does not hyphenate the first word of a paragraph. This shows here with the word "horizontally" in narrow columns. The non-hyphenated word gets then shifted down...
But this has nothing to do with this PR and I will make another one to address the issue. The bullets in the output may look random but they do match the input which I constructed by random copy paste and adding and suppressing item separators.
Relates