Sie sind auf Seite 1von 4

N 2015-05-04

/tcb/saveto=hfile namei
(no default, initially empty)
Saves the content of the box into a file for an optional later usage. This is the counterpart
of /tcb/savelowerto P. 24 , but is saves not only the upper part but the whole content. If
a lower part is present, it is also saved including \tcblower P. 12 .

! This option cannot be combined with /tcb/savelowerto

P. 24 .

\begin{tcolorbox}[invisible,saveto=\jobname_mysave1.tex,colback=white]
This is a \textbf{tcolorbox} which seems to be empty.
The content is saved for later usage.
\end{tcolorbox}
Now, we load the saved text:\\
\input{\jobname_mysave1.tex}

Now, we load the saved text:


This is a tcolorbox which seems to be empty. The content is saved for later usage.

\begin{tcolorbox}[saveto=\jobname_mysave2.tex]
This is a \textbf{tcolorbox}.
\tcblower
This is the lower part.
\end{tcolorbox}
Now, we load the saved text:
\begin{tcolorbox}[colframe=red,colback=red!10,
coltitle=black,colbacktitle=red!20,sidebyside,
title=Here we see the saved content including the lower part]
\input{\jobname_mysave2.tex}
\end{tcolorbox}

This is a tcolorbox.
This is the lower part.
Now, we load the saved text:
Here we see the saved content including the lower part
This is the lower part.

This is a tcolorbox.

23

4.4

Lower Part

/tcb/lowerbox=hmodei
(no default, initially visible)
Controls the treatment of the lower part of the box. Feasible values for hmodei are:
visible: usual type setting of the lower part,
invisible: empty space instead of the lower part contents,
ignored: the lower part is not used (here).
The last two values are usually applied in connection with savelowerto.
\begin{tcolorbox}[lowerbox=invisible,colback=white]
This is a \textbf{tcolorbox}.
\tcblower
This is the lower part (but invisible).
\end{tcolorbox}
\begin{tcolorbox}[lowerbox=ignored,colback=white]
This is a \textbf{tcolorbox}.
\tcblower
This is the lower part (but ignored).
\end{tcolorbox}

This is a tcolorbox.

This is a tcolorbox.

U 2014-11-28

/tcb/savelowerto=hfile namei
(no default, initially empty)
Saves the content of the lower part into a file for an optional later usage.
\begin{tcolorbox}[lowerbox=invisible,savelowerto=\jobname_bspsave.tex,colback=white]
This is a \textbf{tcolorbox}.
\tcblower
This is the lower part which may be quite complex:
$\displaystyle f(x)=\frac{1+x^2}{1-x^2}$.
\end{tcolorbox}
Now, we load the saved text:\\
\input{\jobname_bspsave.tex}

This is a tcolorbox.

Now, we load the saved text:


This is the lower part which may be quite complex: f (x) =

24

1 + x2
.
1 x2

/tcb/lower separated=true|false
(default true, initially true)
If set to true, the lower part is visually separated from the upper part. It depends on the
chosen skin how the visualization of the separation is done.
% \tcbuselibrary{skins,raster}
\begin{tcbraster}[colback=red!5!white,colframe=red!75!black,
fonttitle=\bfseries,fontlower=\itshape]
%
\begin{tcolorbox}[title=Lower separated]
This is the upper part.
\tcblower
This is the lower part.
\end{tcolorbox}
%
\begin{tcolorbox}[title=Lower not separated,lower separated=false]
This is the upper part.
\tcblower
This is the lower part.
\end{tcolorbox}
%
\begin{tcolorbox}[sidebyside,title=Lower separated]
This is the upper part.
\tcblower
This is the lower part.
\end{tcolorbox}
%
\begin{tcolorbox}[sidebyside,title=Lower not separated,lower separated=false]
This is the upper part.
\tcblower
This is the lower part.
\end{tcolorbox}
%
\begin{tcolorbox}[beamer,title=Lower separated]
This is the upper part.
\tcblower
This is the lower part.
\end{tcolorbox}
%
\begin{tcolorbox}[beamer,title=Lower not separated,lower separated=false]
This is the upper part.
\tcblower
This is the lower part.
\end{tcolorbox}
%
\end{tcbraster}
Lower separated

Lower not separated

This is the upper part.

This is the upper part.

This is the lower part.

This is the lower part.

Lower separated

Lower not separated

This is the upper


part.

This is the upper


part.

This is the lower


part.

Lower separated

Lower not separated

This is the upper part.

This is the upper part.

This is the lower part.

This is the lower part.

25

This is the lower


part.

/tcb/savedelimiter=hnamei
(no default, initially tcolorbox)
Used in connection with new environment definitions which extend tcolorbox and use
or allow the option savelowerto. To catch the end of the new box environment
hnamei has to be the name of this environment. Additionally, the environment definition has to use \tcolorbox instead of \begin{tcolorbox} and \endtcolorbox instead of
\end{tcolorbox}.
\newenvironment{mybox}[1]{%
\tcolorbox[savedelimiter=mybox,
savelowerto=\jobname_bspsave2.tex,lowerbox=ignored,
colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries,
title=#1]}%
{\endtcolorbox}
\begin{mybox}{My Example}
Upper part.
\tcblower
Saved lower part!
\end{mybox}
Now, the saved part is used:
\begin{tcolorbox}[colback=green!5]
\input{\jobname_bspsave2.tex}
\end{tcolorbox}
My Example
Upper part.
Now, the saved part is used:
Saved lower part!

The savedelimiter is used implicitely with \newtcolorbox P. 15 which allows a more


convenient usage:
\newtcolorbox{mybox}[1]{%
savelowerto=\jobname_bspsave2.tex,lowerbox=ignored,
colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries,
title=#1}%
\begin{mybox}{My Example}
Upper part.
\tcblower
Saved lower part!
\end{mybox}
Now, the saved part is used:
\begin{tcolorbox}[colback=green!5]
\input{\jobname_bspsave2.tex}
\end{tcolorbox}
My Example
Upper part.
Now, the saved part is used:
Saved lower part!

26

Das könnte Ihnen auch gefallen