You are on page 1of 1

/tcb/tikznode upper=hoptionsi

(style)
This style places the upper part content into a centered TikZ node. The hoptionsi may be
given as TikZ node options. This style is especially useful for boxes with multiline texts
which are fitted to the text width.
% \usepackage{tikz}
\newtcbox{\headline}[1][]{enhanced,before=\begin{center},after=\end{center},
ignore nobreak,fontupper=\Large\bfseries,
colframe=red!50!black,colback=red!10!white,
drop fuzzy shadow=yellow,tikznode upper,#1}
\headline{Important\\Headline}

Important
Headline
/tcb/tikznode lower=hoptionsi
(style)
This style places the lower part content into a centered TikZ node. The hoptionsi may be
given as TikZ node options.
% \usepackage{tikz}
\begin{tcolorbox}[bicolor,colback=LightBlue!50!white,colbacklower=white,
colframe=black,tikznode lower={inner sep=2pt,draw=red,fill=yellow}]
Upper part.
\tcblower
Lower part.
\end{tcolorbox}

Upper part.
Lower part.

/tcb/tikznode=hoptionsi
(style)
Shortcut for setting /tcb/tikznode upper and /tcb/tikznode lower the same time.
/tcb/varwidth upper=hlengthi
(style, default /tcb/width P. 34 )
This style places the upper part content into a varwidth environment. This style needs
the varwidth package [1] to be loaded manually. The resulting box has a maximal width
of hlengthi. This option is only senseful for a \tcbox P. 14 .
% \usepackage{varwidth}
\newtcbox{\varbox}{colframe=red!50!black,
colback=red!10!white,varwidth upper}
\varbox{Short text.}
\varbox{This box contains is a longer text
which is broken.}

68

Short text.
This box contains is a longer
text which is broken.

You might also like