mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge pull request #2508 from jfbu/latex_frenchlistscompatibility
Fix #2507: French lists in LaTeX-PDF output cause vertical space problems
This commit is contained in:
commit
57149d378f
@ -279,8 +279,9 @@
|
|||||||
\parskip\z@skip
|
\parskip\z@skip
|
||||||
% first, let's check if there is a caption
|
% first, let's check if there is a caption
|
||||||
\ifx\SphinxVerbatimTitle\empty
|
\ifx\SphinxVerbatimTitle\empty
|
||||||
% there was no caption. Check if nevertheless a label was set.
|
\addvspace\z@% counteract possible previous negative skip (French lists!)
|
||||||
\smallskip
|
\smallskip
|
||||||
|
% there was no caption. Check if nevertheless a label was set.
|
||||||
\ifx\SphinxLiteralBlockLabel\empty\else
|
\ifx\SphinxLiteralBlockLabel\empty\else
|
||||||
% we require some space to be sure hyperlink target from \phantomsection
|
% we require some space to be sure hyperlink target from \phantomsection
|
||||||
% will not be separated from upcoming verbatim by a page break
|
% will not be separated from upcoming verbatim by a page break
|
||||||
@ -547,8 +548,11 @@
|
|||||||
{\parskip\z@skip\noindent}%
|
{\parskip\z@skip\noindent}%
|
||||||
}
|
}
|
||||||
\newcommand{\py@endlightbox}{%
|
\newcommand{\py@endlightbox}{%
|
||||||
\par\nobreak
|
\par
|
||||||
{\parskip\z@skip\noindent\rule[.4\baselineskip]{\linewidth}{0.5pt}}\par
|
% counteract previous possible negative skip (French lists!):
|
||||||
|
% (we can't cancel that any earlier \vskip introduced a potential pagebreak)
|
||||||
|
\ifdim\lastskip<\z@\vskip-\lastskip\fi
|
||||||
|
\nobreak\vbox{\noindent\rule[.4\baselineskip]{\linewidth}{0.5pt}}\allowbreak
|
||||||
}
|
}
|
||||||
|
|
||||||
% Some are quite plain:
|
% Some are quite plain:
|
||||||
|
Loading…
Reference in New Issue
Block a user