Skip to content

Commit

Permalink
LaTeX: avoid "Overfull \hbox" reports when solved by verbatimforcewraps
Browse files Browse the repository at this point in the history
  • Loading branch information
jfbu committed Aug 5, 2024
1 parent df871ab commit d53262a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ Bugs fixed
* #12514: intersphinx: fix the meaning of a negative value for
:confval:`intersphinx_cache_limit`.
Patch by Shengyu Zhang.
* #12722: LaTeX: avoid TeX reporting ``Overfull \hbox`` from too long
strings in a codeline when the problem has actually been solved thanks
to :ref:`latexsphinxsetupforcewraps`.
Patch by Jean-François B.

Testing
-------
3 changes: 3 additions & 0 deletions sphinx/texinputs/sphinxlatexliterals.sty
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,9 @@
\setbox\spx@tempboxa
\vtop{\raggedright\hyphenpenalty\z@\exhyphenpenalty\z@
\doublehyphendemerits\z@\finalhyphendemerits\z@
% Avoid TeX reporting Overfull \hbox'es during this measuring phase. Setting
% \hbadness to \@M to avoid Underfull reports is unneeded due to \raggedright.
\hfuzz\maxdimen
\spx@everypar{}\noindent\strut\FV@Line\strut\spx@par
\spx@verb@getwidths}%
\ifdim\spx@verb@maxwidth>
Expand Down

0 comments on commit d53262a

Please sign in to comment.