mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge pull request #8926 from jfbu/latex_maxunderfull
LaTeX: let underfull calculation in wrapped code lines ignore last line
This commit is contained in:
commit
13341c77f8
2
CHANGES
2
CHANGES
@ -75,6 +75,8 @@ Bugs fixed
|
||||
change) with late TeXLive 2019
|
||||
* #8253: LaTeX: Figures with no size defined get overscaled (compared to images
|
||||
with size explicitly set in pixels) (fixed for ``'pdflatex'/'lualatex'`` only)
|
||||
* #8925: LaTeX: 3.5.0 ``verbatimmaxunderfull`` setting does not work as
|
||||
expected
|
||||
* #8911: C++: remove the longest matching prefix in
|
||||
:confval:`cpp_index_common_prefix` instead of the first that matches.
|
||||
* C, properly reject function declarations when a keyword is used
|
||||
|
@ -343,8 +343,21 @@
|
||||
\fi\fi
|
||||
}%
|
||||
% auxiliary paragraph dissector to get max and min widths
|
||||
% but minwidth must not take into account the last line
|
||||
\newbox\spx@scratchbox
|
||||
\def\spx@verb@getwidths {%
|
||||
\unskip\unpenalty
|
||||
\setbox\spx@scratchbox\lastbox
|
||||
\ifvoid\spx@scratchbox
|
||||
\else
|
||||
\setbox\spx@scratchbox\hbox{\unhbox\spx@scratchbox}%
|
||||
\ifdim\spx@verb@maxwidth<\wd\spx@scratchbox
|
||||
\xdef\spx@verb@maxwidth{\number\wd\spx@scratchbox sp}%
|
||||
\fi
|
||||
\expandafter\spx@verb@getwidths@loop
|
||||
\fi
|
||||
}%
|
||||
\def\spx@verb@getwidths@loop {%
|
||||
\unskip\unpenalty
|
||||
\setbox\spx@scratchbox\lastbox
|
||||
\ifvoid\spx@scratchbox
|
||||
@ -356,7 +369,7 @@
|
||||
\ifdim\spx@verb@minwidth>\wd\spx@scratchbox
|
||||
\xdef\spx@verb@minwidth{\number\wd\spx@scratchbox sp}%
|
||||
\fi
|
||||
\expandafter\spx@verb@getwidths
|
||||
\expandafter\spx@verb@getwidths@loop
|
||||
\fi
|
||||
}%
|
||||
% auxiliary macros to implement "cut long line even in middle of word"
|
||||
|
Loading…
Reference in New Issue
Block a user