7

When I use the tcolorbox package with the KOMA-option parskip=half, I get the error Overfull \hbox every time I use a tcolorbox. This warning appears despite the fit warning=false option of the box.

Everything looks fine, so it's not a big issue, but it's really annoying and "real" warnings get lost between these ones in long documents.

MWE:

\documentclass[parskip=half]{scrartcl}

\usepackage{tcolorbox}

\begin{document}

\begin{tcolorbox}
    foo
\end{tcolorbox}

\end{document}

(fit warning=false is set by default.)

  • The easiest remedy is not using the option. ;-) – egreg Jun 30 '14 at 17:53
8

parskip=half set a non-zero \parfillskip. You could use parskip=half- instead. Or set \parfillskip to 0pt before every tcolorbox:

\documentclass[parskip=half]{scrartcl}

\usepackage{tcolorbox}
\tcbuselibrary{hooks}

\begin{document}
\tcbset{before app=\parfillskip0pt}

\begin{tcolorbox}[]
    foo
\end{tcolorbox}


\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.