I want to compile a document that uses the tcolorbox
package in two different ways:
- with the option
/tcb/lowerbox
set tovisible
, so that the lower part of thetcolorbox
environment is typeset - with the option
/tcb/lowerbox
set toignored
, so that the lower part of thetcolorbox
environment is not used.
At the beginning of the document there is the command
\tcbset{lowerbox=ignored}
which should be commented for the first case only.
Is it possible to control this behaviour from the command line when compiling the document, so that I do not have to edit the source explicitly in order to have the two versions of the document?
Here is a minimal working example. Let's say it is saved as test.tex
.
\documentclass{standalone}
\usepackage{tcolorbox}
%\tcbset{lowerbox=ignored}
\begin{document}
\begin{tcolorbox}
Upper part.
\tcblower
Lower part.
\end{tcolorbox}
\end{document}
pdflatex '\AtBeginDocument{\tcbset{lowerbox=visible}}\input{file}'
might do. Can you add a short example to play with?