Open janstarke opened 3 months ago
I would suggest to just live with such a small amount of overfull hbox (0.61113pt).
The warning does not occur when
mintinline
is not used inside anenumerate
environment
Given the same left margin, the overfull hbox is reproducible outside of an itemize
environment.
\documentclass{article}
\usepackage{minted}
\begin{document}
\begin{itemize}
\item \mintinline[breaklines,breakanywhere]{output}{This_is_very_very_very_very_very_very_very_very_very_long_verbatim_text}
\end{itemize}
% emulate left margin of \item in first level itemize
% see anatomy of list dimensions in https://latexref.xyz/list.html
\noindent\hskip\dimexpr\leftmargin+\itemindent\relax
\mintinline[breaklines,breakanywhere]{output}{This_is_very_very_very_very_very_very_very_very_very_long_verbatim_text}
\end{document}
As a non-solution workaround, you can enlarge \hfuzz
inside such list environments. For example setting \hfuzz=1pt
. Initially LateX sets \hfuzz=0.1pt
.
From TeX by Topic, sec. 19.1.1 Badness,
Overfull horizontal and vertical boxes are passed unnoticed if their excess width or height is less than
\hfuzz
or\vfuzz
respectively.
Dear all,
we observe
overfull hbox
messages when we're usingmintline
in an enumerate environment. We use this situation when when enumerate a set of file paths, which can be really long and can contain where long parts (e.g. hashes or UUIDs), which is why we don't want to break only at token boundaries, butanywhere
.I was trying to add some glue at the end of the line as a mitigation, but without success. Does anyone have a solution for this problem?
Minimal working example:
Code
Observed result
The output of LaTeX contains the following warning:
The warning does not occur when
mintinline
is not used inside anenumerate
environmentExpected result
No warnings