diff options
author | jfbu <jfbu@free.fr> | 2021-01-29 15:10:21 +0300 |
---|---|---|
committer | jfbu <jfbu@free.fr> | 2021-01-29 15:10:21 +0300 |
commit | 17642a5e6bbcccc5616da381c10a068c9e09b6d7 (patch) | |
tree | 09ddd157645f8d3d6fb3b30097c4d1a0500bd487 /sphinx/texinputs | |
parent | d6e11b89e9d43120bfd008de5563899e58b80b7d (diff) |
Add \nobreak inside \sphinxAtStartPar
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 #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).
Diffstat (limited to 'sphinx/texinputs')
-rw-r--r-- | sphinx/texinputs/sphinx.sty | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sphinx/texinputs/sphinx.sty b/sphinx/texinputs/sphinx.sty index 33d3cc445..f040fde7f 100644 --- a/sphinx/texinputs/sphinx.sty +++ b/sphinx/texinputs/sphinx.sty @@ -412,7 +412,7 @@ \DisableKeyvalOption{sphinx}{mathnumfig} % To allow hyphenation of first word in narrow contexts; no option, % customization to be done via 'preamble' key -\newcommand*\sphinxAtStartPar{\hskip\z@skip} +\newcommand*\sphinxAtStartPar{\nobreak\hskip\z@skip} % No need for the \hspace{0pt} trick (\hskip\z@skip) with luatex \ifdefined\directlua\let\sphinxAtStartPar\@empty\fi % user interface: options can be changed midway in a document! |