You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For \tcbox and \tcboxfit, similar capture mode overwriting happen in \tcb@ox, where its #1, a comma-separated style list starting with capture=hbox|fitbox, is applied after \tcb@layer@inc.
This is a long-existing behavior, so long that it's reproducible with Overleaf's TeX Live 2014 mirror. If classified as a feature, only documentation refinement is needed.
\documentclass{article}
\usepackage{tcolorbox}
\tcbset{
every box/.append style={
capture=hbox
}
}
\def\tcbEveryBoxCaptureModeTests{
\begin{tcolorbox}
Use \texttt{hbox} from \texttt{every box}
\end{tcolorbox}
\begin{tcolorbox}[hbox]
Set \texttt{hbox} per box
\end{tcolorbox}
}
\begin{document}
\subsection*{Before}
\tcbEveryBoxCaptureModeTests% set "capture=<mode>" _before_ applying "every box on layer <n>"/"every box on higher layers"% tcolorbox part only\makeatletter\long\def\tcb@@icolorbox[#1]{%\tcbset{capture=minipage}% or pass "capture=<mode>" to \tcb@layer@inc\tcb@layer@inc%\tcb@apply@box@options{#1}\tcb@height@adjust%\tcb@hasLowerfalse%\csname tcb@@capture@\kvtcb@capture\endcsname%
}
\makeatother\subsection*{After \textnormal{(for display only, not really a proposal)}}
\tcbEveryBoxCaptureModeTests\end{document}
The text was updated successfully, but these errors were encountered:
I think the current behavior is not especially intended. I am not sure, if a global every box setting of a capture mode is a good idea, and, maybe, therefore I paid not attention to such a possibility until now.
Nevertheless, changing the code as you have proposed should do no harm to existing documents. So, I will do this (and also for \tcb@ox) for the next version.
For
tcolorbox
environment, in\tcb@@icolorbox
every box
styles,every box on layer <n>
orevery box on higher layers
are used by\tcb@layer@inc
.\tcb@apply@box@options{capture=minipage,#1}
.tcolorbox/tex/latex/tcolorbox/tcolorbox.sty
Lines 1390 to 1395 in 6d98db4
For
\tcbox
and\tcboxfit
, similar capture mode overwriting happen in\tcb@ox
, where its#1
, a comma-separated style list starting withcapture=hbox|fitbox
, is applied after\tcb@layer@inc
.This is a long-existing behavior, so long that it's reproducible with Overleaf's TeX Live 2014 mirror. If classified as a feature, only documentation refinement is needed.
The text was updated successfully, but these errors were encountered: