9

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.)

1
  • The easiest remedy is not using the option. ;-)
    – egreg
    Commented Jun 30, 2014 at 17:53

1 Answer 1

9

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}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .