-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve error message thrown by \tcblower
#215
Comments
I will add something quite similar to |
After some more digging, I find that for the in total six box + capture mode combinations (box can be one of tcolorbox, or tcbox and capture mode can be one of minipage, hbox, and fitbox mode), only tcolorbx + minipage supports use of But in Possible (mutually replaceable) solutions:
|
Yes, that's why I moved the error message away from
I think, \def\tcb@error@nolower{\tcb@error{%
\string\tcblower\space cannot be used for \string\tcbox, \string\tcboxfit, and similar box macros,
also not for capture=hbox, capture=fitbox, etc.
I'll drop this `\string\tcblower'}{}}
\long\def\tcb@apply@box@options#1{%
\let\tcb@space\tcb@zpt%
\let\tcb@outer@textheight\tcbtextheight%
\let\tcbtextheight\tcb@zpt%
\let\tcbtextwidth\tcb@zpt%
\tcbset{#1}%
\tcb@lateoptions@hook\let\tcb@lateoptions@hook\@empty%
\tcb@afteroptions@hook%
\iftcb@isbreakable%
\tcb@init@breakable%
\else%
\tcb@init@unbreakable%
\fi%
\let\iftcb@minipage\if@minipage%
\let\iftcb@nobreak\if@nobreak%
\let\tcblower\tcb@error@nolower%
} |
\tcblower
in \tcbox
to give more helpful error message?\tcblower
Just a small improvement.
Although it's already documented that
a low-level "Undefined control sequence ... \tcblower" error raised by using
\tcbox{... \tcblower ...}
may still make new users lost for a while.Therefore I suggest to define
\tcblower
in\tcb@ox
(\tcbox
is a thin wrapper around it by specifying the capture mode) to give a more helpful error message.The raised error
The text was updated successfully, but these errors were encountered: