I have the following in my document and it works as I expect, scaling the listing to fit the page, but it gives me a spurious Overfull \hbox warning that I would like to get rid of:
\begin{adjustbox}{max width=\linewidth}
\begin{lstlisting}
A long line of code which I want to be scaled to fit the page.
\end{lstlisting}
\end{adjustbox}
Here is the warning:
Overfull \hbox (27.00378pt too wide) in paragraph at lines 8--9
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]
[]
where line 8 is the long line inside the listing.
Is there a clean way to get rid of the warning?
hfuzzin a group? – user11171 Nov 27 '18 at 02:29