Open mbertucci47 opened 4 months ago
Using overleaf (use \csname ver@tcolorbox.sty\endcsname
to typeset version of tcolorbox
),
I don't know why but prepending \let\if@nobreak\iffalse
(which is the first assignment in \@arrayparboxrestore
) to \tcb@parbox@false@settings
seems to work.
Still need to find the "why part".
```tex \documentclass{article} \usepackage[skins]{tcolorbox} \makeatletter \preto\tcb@parbox@false@settings{\let\if@nobreak\iffalse} \makeatother \newcommand\test[1][]{% \begin{tcolorbox}[#1, draft] Some text \begin{enumerate} \item First item \item Second item \end{enumerate} \end{tcolorbox} } \begin{document} LaTeX2e \fmtversion\par tcolorbox \csname ver@tcolorbox.sty\endcsname \section{parbox=false} \test[parbox=false] \test[parbox=false] \section{parbox=true} \test[parbox=true] \test[parbox=true] \end{document} ```
I don't know why but prepending
\let\if@nobreak\iffalse
(which is the first assignment in\@arrayparboxrestore
) to\tcb@parbox@false@settings
seems to work.Still need to find the "why part".
I also wonder why the nobreak
setting disturbs at this point.
Nevertheless, adding \let\if@nobreak\iffalse
or \@nobreakfalse
to \tcb@parbox@false@settings
should do no harm and makes sense. If parbox=true
is used, \if@nobreak
equals \iffalse
at begin of the tcolorbox interior of the MWE, but \iftrue
for parbox=false
.
So, I will add \@nobreakfalse
to \tcb@parbox@false@settings
.
Sorry for adding to the list of issues with
parbox=false
, but I think with the fix for #262 a new issue has appeared. If a tcolorbox withparbox=false
comes immediately after a section heading, then the space before a list that's preceded by text is decreased. Here's an example showing the issue:There's no issue with boxes that start with a list.