Consider the following MWE:
\documentclass{article}
\usepackage{lipsum}
\usepackage{tcolorbox}
%%% this two following packages are used in the format I have to use
\usepackage[parfill]{parskip}
\begin{document}
\lipsum[1]
\begin{tcolorbox}
checking content
\end{tcolorbox}
\lipsum[1]
\end{document}
it compiles well, with correctly aligned boxes, but it gives a
mwe-tcbox.tex|12 warning| Overfull \hbox (30.0pt too wide) in paragraph at lines 12--12
I tried the tcbset
trick adapted from this answer, but it does not work; the line
\tcbset{before app=\parfillskip0pt}
(adding [hooks]
to the tcolorbox
package) is silent, but does not solve the warning.
If I remove the \usepackage[parfill]{parskip}
from the code all is well --- but I really can't do that, because it is in the format I have to use for this document. I can hack it with something like width=0.9\linewidth
in the options of the tcolorbox, but well --- It's a hack.
I also could manage to silence the warnings using the silence
package --- but again, this will also shut off real warnings.
Can I avoid the warning and still using the full textwidth for the color boxes?