06.01.2015 Views

Manual for the tcolorbox package

Manual for the tcolorbox package

Manual for the tcolorbox package

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

tcb/savedelimiter=〈name〉<br />

(no default, initially <strong>tcolorbox</strong>)<br />

Used in connection with new environment definitions which extend <strong>tcolorbox</strong> and use<br />

or allow <strong>the</strong> option savelowerto. To catch <strong>the</strong> end of <strong>the</strong> new box environment<br />

〈name〉 has to be <strong>the</strong> name of this environment. Additionally, <strong>the</strong> environment definition<br />

has to use \<strong>tcolorbox</strong> instead of \begin{<strong>tcolorbox</strong>} and \end<strong>tcolorbox</strong> instead of<br />

\end{<strong>tcolorbox</strong>}.<br />

\newenvironment{mybox}[1]{%<br />

\<strong>tcolorbox</strong>[savedelimiter=mybox,<br />

savelowerto=\jobname_bspsave2.tex,lowerbox=ignored,<br />

colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries,<br />

title=#1]}%<br />

{\end<strong>tcolorbox</strong>}<br />

\begin{mybox}{My Example}<br />

Upper part.<br />

\tcblower<br />

Saved lower part!<br />

\end{mybox}<br />

Now, <strong>the</strong> saved part is used:<br />

\begin{<strong>tcolorbox</strong>}[colback=green!5]<br />

\input{\jobname_bspsave2.tex}<br />

\end{<strong>tcolorbox</strong>}<br />

My Example<br />

Upper part.<br />

Now, <strong>the</strong> saved part is used:<br />

Saved lower part!<br />

The savedelimiter is used implicitely with \new<strong>tcolorbox</strong> → P. 12 which allows a more<br />

convenient usage:<br />

\new<strong>tcolorbox</strong>{mybox}[1]{%<br />

savelowerto=\jobname_bspsave2.tex,lowerbox=ignored,<br />

colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries,<br />

title=#1}%<br />

\begin{mybox}{My Example}<br />

Upper part.<br />

\tcblower<br />

Saved lower part!<br />

\end{mybox}<br />

Now, <strong>the</strong> saved part is used:<br />

\begin{<strong>tcolorbox</strong>}[colback=green!5]<br />

\input{\jobname_bspsave2.tex}<br />

\end{<strong>tcolorbox</strong>}<br />

My Example<br />

Upper part.<br />

Now, <strong>the</strong> saved part is used:<br />

Saved lower part!<br />

18

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!