diff options
author | Karl Berry <karl@freefriends.org> | 2013-03-03 23:40:10 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-03-03 23:40:10 +0000 |
commit | 478d0137b07696f6056d712886278055d4958353 (patch) | |
tree | 5f74544a10f905e6deba73d115551a6b0f3a1d49 /Master/texmf-dist/doc | |
parent | 27cb2152643fd03927bf08cec8dbfdab067e4728 (diff) |
tcolorbox
git-svn-id: svn://tug.org/texlive/trunk@29279 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc')
-rw-r--r-- | Master/texmf-dist/doc/latex/tcolorbox/Basilica_5.png | bin | 0 -> 22407 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/tcolorbox/CHANGES | 33 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/tcolorbox/README | 13 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/tcolorbox/tcolorbox-example.pdf | bin | 105699 -> 147401 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/tcolorbox/tcolorbox-example.tex | 49 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.pdf | bin | 1074299 -> 1500559 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.tex | 2114 |
7 files changed, 2061 insertions, 148 deletions
diff --git a/Master/texmf-dist/doc/latex/tcolorbox/Basilica_5.png b/Master/texmf-dist/doc/latex/tcolorbox/Basilica_5.png Binary files differnew file mode 100644 index 00000000000..1a9f191001d --- /dev/null +++ b/Master/texmf-dist/doc/latex/tcolorbox/Basilica_5.png diff --git a/Master/texmf-dist/doc/latex/tcolorbox/CHANGES b/Master/texmf-dist/doc/latex/tcolorbox/CHANGES index 121d9a42791..f11ff014d33 100644 --- a/Master/texmf-dist/doc/latex/tcolorbox/CHANGES +++ b/Master/texmf-dist/doc/latex/tcolorbox/CHANGES @@ -1,4 +1,4 @@ -%% The LaTeX package tcolorbox - version 1.30 (2012/04/20)
+%% The LaTeX package tcolorbox - version 2.00 (2013/03/01)
%%
%% -------------------------------------------------------------------------------------------
%% Copyright (c) 2006-2012 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
@@ -69,4 +69,35 @@ version 1.30 (2012/04/20) 'frame code', 'interior titled code', 'interior code', 'segmentation code',
'colbacklower'
+version 2.00 (2013/03/01)
+- breaking news: the new library 'breakable' add breaking support to tcolorbox.
+- e-TeX now used instead of calc
+- new key 'adjust text' and new implementation for 'adjusted title'
+- new geometry keys:
+ 'toprule', 'toprule at break', 'bottomrule', 'bottomrule at break',
+ 'leftrule', 'rightrule', 'titlerule', 'outer arc', 'auto outer arc',
+ 'toptitle', 'bottomtitle'
+- new bounding box keys:
+ 'enlarge top at break by', 'enlarge bottom at break by'
+- new overlay keys:
+ 'overlay', 'no overlay', 'overlay broken', 'overlay unbroken',
+ 'overlay first', 'overlay middle', 'overlay last',
+ 'overlay unbroken and first', 'overlay middle and last'
+- new key: 'parbox' to change text behaviour
+- new library 'breakable' for breakable boxes with the new keys:
+ 'breakable', 'unbreakable', 'title after break', 'notitle after break',
+ 'adjusted title after break', 'lines before break', 'shrink break goal'
+- new keys for the 'skins' library
+ 'skin first', 'skin middle', 'skin last', 'title engine', 'pathfirst',
+ 'pathmiddle', 'pathlast', 'title style', 'title code', 'enhancedfirst',
+ 'enhancedmiddle', 'enhancedlast', 'enhanced', 'marker', 'bicolor',
+ 'bicolorfirst', 'bicolormiddle', 'bicolorlast', 'beamer',
+ 'beamerfirst', 'beamermiddle', 'beamerlast', 'draft', 'freelance', 'standard'
+- NOTE: skins 'beamer' and 'widget' changed
+ use the new style options 'beamer' and 'widget' to get the old appearance
+- new watermark keys:
+ 'watermark text', 'watermark text on', 'watermark graphics',
+ 'watermark graphics on', 'watermark tikz', 'watermark tikz on',
+ 'no watermark', 'watermark opacity', 'watermark color',
+ 'watermark zoom', 'watermark stretch',
diff --git a/Master/texmf-dist/doc/latex/tcolorbox/README b/Master/texmf-dist/doc/latex/tcolorbox/README index ed65b1ad367..217e6249343 100644 --- a/Master/texmf-dist/doc/latex/tcolorbox/README +++ b/Master/texmf-dist/doc/latex/tcolorbox/README @@ -1,7 +1,7 @@ -%% The LaTeX package tcolorbox - version 1.30 (2012/04/20) +%% The LaTeX package tcolorbox - version 2.00 (2013/03/01) %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2006-2012 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> +%% Copyright (c) 2006-2013 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> %% ------------------------------------------------------------------------------------------- %% %% This work may be distributed and/or modified under the @@ -29,15 +29,17 @@ Contents of the package 'README' this file 'CHANGES' log of changes (history) 'tcolorbox.sty' LaTeX package file (style file) - 'tcblistings.code.tex' LaTeX package file (library of tcolorbox) - 'tcbtheorems.code.tex' LaTeX package file (library of tcolorbox) + 'tcbbreakable.code.tex' LaTeX package file (library of tcolorbox) 'tcbdocumenation.code.tex' LaTeX package file (library of tcolorbox) + 'tcblistings.code.tex' LaTeX package file (library of tcolorbox) 'tcbskins.code.tex' LaTeX package file (library of tcolorbox) + 'tcbtheorems.code.tex' LaTeX package file (library of tcolorbox) 'tcolorbox.pdf' Documentation for tcolorbox 'tcolorbox.tex' Source code of the documentation 'tcolorbox-example.tex' Example file for package usage 'tcolorbox-example.pdf' Compiled example 'tcolorbox-german.pdf' Outdated documentation in German + 'Basilica_5.png' Example picture Installation ============ @@ -45,8 +47,9 @@ Copy the contents of the 'tcolorbox.tds.zip' from CTAN to your local TeX file tr Alternatively, put the files to their respective locations within the TeX installation: 'tcolorbox.sty' -> /tex/latex/tcolorbox + 'tcbbreakable.code.tex' -> /tex/latex/tcolorbox + 'tcbdocumenation.code.tex' -> /tex/latex/tcolorbox 'tcblistings.code.tex' -> /tex/latex/tcolorbox 'tcbtheorems.code.tex' -> /tex/latex/tcolorbox - 'tcbdocumenation.code.tex' -> /tex/latex/tcolorbox 'tcbskins.code.tex' -> /tex/latex/tcolorbox all other files -> /doc/latex/tcolorbox diff --git a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox-example.pdf b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox-example.pdf Binary files differindex 341d08f4128..22711a6773e 100644 --- a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox-example.pdf +++ b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox-example.pdf diff --git a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox-example.tex b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox-example.tex index 0c5bf93b51c..67b4a3da847 100644 --- a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox-example.tex +++ b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox-example.tex @@ -1,8 +1,8 @@ -%% The LaTeX package tcolorbox - version 1.30 (2012/04/20) +%% The LaTeX package tcolorbox - version 2.00 (2013/03/01) %% tcolorbox-example.tex: an example for tcolorbox %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2006-2012 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> +%% Copyright (c) 2006-2013 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> %% ------------------------------------------------------------------------------------------- %% %% This work may be distributed and/or modified under the @@ -18,7 +18,8 @@ %% This work consists of all files listed in README %% \documentclass{article} -\usepackage[listings,theorems]{tcolorbox} +\usepackage{tikz,lipsum} +\usepackage[listings,theorems,skins,breakable]{tcolorbox} \tcbset{noparskip} @@ -27,39 +28,39 @@ %---------------------------------------------------------- \section{Colored boxes} -\begin{tcolorbox}[colback=red!5,colframe=red!75!black] +\begin{tcolorbox}[colback=red!5!white,colframe=red!75!black] My box. \end{tcolorbox} -\begin{tcolorbox}[colback=blue!5,colframe=blue!75!black,title=My title] +\begin{tcolorbox}[colback=blue!5!white,colframe=blue!75!black,title=My title] My box with my title. \end{tcolorbox} -\begin{tcolorbox}[colback=green!5,colframe=green!75!black] +\begin{tcolorbox}[colback=green!5!white,colframe=green!75!black] Upper part of my box. \tcblower Lower part of my box. \end{tcolorbox} -\begin{tcolorbox}[colback=yellow!5,colframe=yellow!75!black,title=My title] +\begin{tcolorbox}[colback=yellow!5!white,colframe=yellow!75!black,title=My title] I can do this also with a title. \tcblower Lower part of my box. \end{tcolorbox} -\begin{tcolorbox}[colback=yellow!10,colframe=red!75!black,lowerbox=invisible, +\begin{tcolorbox}[colback=yellow!10!white,colframe=red!75!black,lowerbox=invisible, savelowerto=\jobname_ex.tex] Now, we play hide and seek. Where is the lower part? \tcblower I'm invisible until you find me. \end{tcolorbox} -\begin{tcolorbox}[colback=yellow!10,colframe=red!75!black,title=Here I am] +\begin{tcolorbox}[colback=yellow!10!white,colframe=red!75!black,title=Here I am] \input{\jobname_ex.tex} \end{tcolorbox} -\begin{tcolorbox}[colback=blue!50,colframe=blue!25!black,coltext=yellow, +\begin{tcolorbox}[colback=blue!50!white,colframe=blue!25!black,coltext=yellow, fontupper=\Large\bfseries,arc=6mm,boxrule=2mm,boxsep=5mm] Funny settings. \end{tcolorbox} @@ -69,7 +70,7 @@ %---------------------------------------------------------- \section{\LaTeX-Examples} -\begin{tcblisting}{colback=red!5,colframe=red!75!black} +\begin{tcblisting}{colback=red!5!white,colframe=red!75!black} This is a \LaTeX\ example: $\displaystyle\sum\limits_{i=1}^n i = \frac{n(n+1)}{2}$. \end{tcblisting} @@ -82,7 +83,7 @@ $\displaystyle\sum\limits_{i=1}^n i = \frac{n(n+1)}{2}$. \def\themytheorem{\thesection.\arabic{mytheorem}} \tcbmaketheorem{theo}{Theorem}{fonttitle=\bfseries\upshape, fontupper=\slshape, - arc=0mm, colback=blue!5,colframe=blue!75!black}{mytheorem}{theorem} + arc=0mm, colback=blue!5!white,colframe=blue!75!black}{mytheorem}{theorem} \begin{theo}{Summation of Numbers}{summation} For all natural number $n$ it holds:\\[2mm] @@ -91,5 +92,29 @@ $\displaystyle\sum\limits_{i=1}^n i = \frac{n(n+1)}{2}$. We have given Theorem \ref{theorem:summation} on page \pageref{theorem:summation}. + +%---------------------------------------------------------- +\section{Watermarks} + +\begin{tcolorbox}[enhanced,watermark graphics=Basilica_5.png, + watermark opacity=0.3,watermark zoom=0.9, + colback=green!5!white,colframe=green!75!black, + fonttitle=\bfseries, title=Box with a watermark picture] + Here, you see my nice box with a picture as a watermark. + This picture is automatically resized to fit the dimensions + of my box. Instead of a picure, some text could be used or + arbitrary graphical code. See the documentation for more options. +\end{tcolorbox} + +%---------------------------------------------------------- +\section{Breakable Boxes} + +\begin{tcolorbox}[enhanced,breakable, + colback=blue!5!white,colframe=blue!75!black,title=Breakable box, + watermark color=white,watermark text=\Roman{tcbbreakpart}] + \lipsum[1-18] +\end{tcolorbox} + + \end{document} diff --git a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.pdf b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.pdf Binary files differindex 3981d2ab065..2a7701620ad 100644 --- a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.pdf +++ b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.pdf diff --git a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.tex b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.tex index bcd06a4d6cd..1f6ed365176 100644 --- a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.tex +++ b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.tex @@ -1,9 +1,9 @@ % \LaTeX-Main\ -%% The LaTeX package tcolorbox - version 1.30 (2012/04/20) +%% The LaTeX package tcolorbox - version 2.00 (2013/03/01) %% tcolorbox.tex: Manual %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2006-2012 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> +%% Copyright (c) 2006-2013 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> %% ------------------------------------------------------------------------------------------- %% %% This work may be distributed and/or modified under the @@ -43,8 +43,8 @@ \tolerance=2000% \setlength{\emergencystretch}{20pt}% -\RequirePackage{csquotes} -\RequirePackage[style=numeric-comp,sorting=nyt, +\usepackage{csquotes} +\usepackage[style=numeric-comp,sorting=nyt, maxnames=8,minnames=8,abbreviate=false,backend=biber]{biblatex} \DeclareFieldFormat{url}{\newline\url{#1}}% \DeclareListFormat{language}{}% @@ -53,8 +53,13 @@ \usetikzlibrary{shadings,shadows} \usetikzlibrary{decorations.pathmorphing} +\usetikzlibrary{patterns} -\usepackage[listings,theorems,documentation,skins]{tcolorbox} +\usepackage{lipsum} + +\usepackage[listings,theorems,documentation,skins,breakable]{tcolorbox} +%\tcbset{skin=enhanced,breakable} +\tcbset{skin=enhanced} \tcbmakedocSubKey{docTcbKey}{tcb} \tcbmakedocSubKey{langTcbKey}{tcb/doclang} @@ -67,6 +72,7 @@ \def\refSkin#1{\ref@doc{skin:#1}} \makeatother +\newenvironment{marker}[1][]{\begin{tcolorbox}[marker,#1]}{\end{tcolorbox}} \hypersetup{ pdftitle={Manual for the tcolorbox package}, @@ -75,8 +81,8 @@ pdfkeywords={colored boxes, LaTeX examples, theorems} } -\def\version{1.30}% -\def\datum{2012/04/20}% +\def\version{2.00}% +\def\datum{2013/03/01}% \makeindex %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -101,14 +107,21 @@ saving and reuse of source code and text parts. \end{absquote} - -\tableofcontents - +\begin{tcolorbox}[breakable,skin=enhanced,title={Contents},fonttitle=\bfseries\Large, + colback=yellow!10!white,colframe=red!50!black,before=\par\bigskip\noindent, + watermark color=yellow!75!red!25!white, + watermark text={\bfseries\Large Contents}, + frame style={drop shadow} + ] +\makeatletter +\@starttoc{toc} +\makeatother +\end{tcolorbox} \clearpage \section{Introduction} The package originates from the first edition of my book -\flqq{\citetitle{sturm:2011b}\frqq~\cite{sturm:2011b} +\flqq{\citetitle{sturm:2012k}\frqq~\cite{sturm:2012k} in about 2006. For the \LaTeX\ examples and tutorials given there, I wanted to have accentuated and colored boxes to display source code and @@ -119,10 +132,18 @@ mathematics \cite{sturm:2007b,sturm:2008b,sturm:2010a} as well. With this package, you are invited to apply these boxes for similar projects. +Starting with version 2.00, all internal calculations are not longer performed +by the package |calc| \cite{thorub:2007a} but +by $\varepsilon$-\TeX\ \cite{breitenlohner:1998a} expressions since +$\varepsilon$-\TeX\ is assumed to be used by everybody (hopefully). +The breaking news for version 2.00 is the support for breakable boxes. +This new feature allows new applications of the package without +affecting the core package too much if you do not need boxes to break automatically. + \subsection{Loading the Package} The base package |tcolorbox| loads the packages -|pgf| \cite{tantau:2010c}, |calc| \cite{thorub:2007a}, and |verbatim| \cite{schoepf:2001a}. +|pgf| \cite{tantau:2010c} and |verbatim| \cite{schoepf:2001a}. |tcolorbox| itself is loaded in the usual manner in the preamble: \begin{dispListing} \usepackage{tcolorbox} @@ -136,9 +157,10 @@ For example, the key to typeset listings is: \end{dispListing} +\clearpage \subsection{Libraries}\label{sec:bibliothek} The base package |tcolorbox| is extendable by program libraries. -This is done by usage of option keys while loading the package or inside +This is done by using option keys while loading the package or inside the preamble by applying the following macro with the same set of keys. \begin{docCommand}{tcbuselibrary}{\marg{key list}} @@ -176,6 +198,12 @@ The following keys are used inside |\tcbuselibrary| respectively section \ref{sec:skins} from page \pageref{sec:skins}. \end{docTcbKey} +\begin{docTcbKey}[library]{breakable}{}{no value} + Provides support for automatic box breaking from one page to another; + see section \ref{sec:breakable} from page \pageref{sec:breakable}. +\end{docTcbKey} + + \clearpage \section{Macros for Box Creation} @@ -222,7 +250,7 @@ see section \ref{sec:optkeys} for the complete list. A quick example is given here: \begin{dispExample} -\begin{tcolorbox}[colback=red!5,colframe=red!75!black,title=My nice heading] +\begin{tcolorbox}[colback=red!5!white,colframe=red!75!black,title=My nice heading] This is another \textbf{tcolorbox}. \tcblower Here, you see the lower part of the box. @@ -241,7 +269,7 @@ Here, you see the lower part of the box. Sets options for every following \refEnv{tcolorbox} inside the current \TeX\ group. For example, the colors of the boxes may be defined for the whole document by this: \begin{dispListing} -\tcbset{colback=red!5,colframe=red!75!black} +\tcbset{colback=red!5!white,colframe=red!75!black} \end{dispListing} \end{docCommand} @@ -251,7 +279,7 @@ Here, you see the lower part of the box. For the \meta{options} in \refEnv{tcolorbox} respectively \refCom{tcbset} the following |pgf| keys can be applied. The key tree path |/tcb/| is not to be used inside these macros. It is easy to add your own style keys using -the syntax for |pgf| keys, see \cite{tantau:2010c,sturm:2011b} or the examples +the syntax for |pgf| keys, see \cite{tantau:2010c,sturm:2012k} or the examples starting from page \pageref{sec:latextutorial}. @@ -272,7 +300,8 @@ This is a \textbf{tcolorbox}. \begin{docTcbKey}{adjusted title}{=\meta{text}}{style, no default, initially unset} Creates a heading line with \meta{text} as content. The minimal height of - this line is adjusted to fit the text '\"Apgjy'. This option makes sense + this line is adjusted to fit the text given by \refKey{/tcb/adjust text}. + This option makes sense for single line headings if boxes are set side by side with equal height. Note that it is very easy to trick this adjustment. \begin{dispExample} @@ -291,6 +320,13 @@ Now, we try again with adjusted titles:\\ \end{docTcbKey} +\begin{docTcbKey}{adjust text}{=\meta{text}}{no default, initially \texttt{\"Apgjy}} + This sets the reference text for \refKey{/tcb/adjusted title}. If your texts + never exceed '\"Apgjy' in depth and height you don't need to care about this option. +\end{docTcbKey} + + + \clearpage \subsection{Lower Part} \begin{docTcbKey}{lowerbox}{=\meta{mode}}{no default, initially \texttt{visible}} @@ -303,13 +339,13 @@ Now, we try again with adjusted titles:\\ \end{itemize} The last two values are usually applied in connection with |savelowerto|. \begin{dispExample} -\begin{tcolorbox}[lowerbox=invisible] +\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] +\begin{tcolorbox}[lowerbox=ignored,colback=white] This is a \textbf{tcolorbox}. \tcblower This is the lower part (but ignored). @@ -321,7 +357,7 @@ This is the lower part (but ignored). \begin{docTcbKey}{savelowerto}{=\meta{file name}}{no default, initially empty} Saves the content of the lower box in a file for an optional later usage. \begin{dispExample} -\begin{tcolorbox}[lowerbox=invisible,savelowerto=\jobname_bspsave.tex] +\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: @@ -347,7 +383,7 @@ Now, we load the saved text:\\ \tcolorbox[savedelimiter=mybox, savelowerto=\jobname_bspsave2.tex, lowerbox=ignored, - colback=red!5,colframe=red!75!black,fonttitle=\bfseries,title=#1]}% + colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries,title=#1]}% {\endtcolorbox} \begin{mybox}{My Example} @@ -464,6 +500,11 @@ This is a \textbf{tcolorbox}. \end{dispExample} \end{docTcbKey} +\bigskip +\begin{marker} + More color options are provided by using skins documented in + Section \ref{sec:skins} from page \pageref{sec:skins}. +\end{marker} \clearpage \subsection{Geometry} @@ -471,6 +512,8 @@ This is a \textbf{tcolorbox}. Sets the total width of the colored box to \meta{length}. See also \refKey{/tcb/height}. \begin{dispExample} +\tcbset{colback=red!5!white,colframe=red!75!black} + \begin{tcolorbox}[width=\linewidth/2] This is a \textbf{tcolorbox}. \end{tcolorbox} @@ -478,19 +521,99 @@ This is a \textbf{tcolorbox}. \end{docTcbKey} -\begin{docTcbKey}{boxrule}{=\meta{length}}{no default, initially \texttt{0.5mm}} - Sets the frame width to \meta{length}. +\begin{docTcbKey}{toprule}{=\meta{length}}{no default, initially \texttt{0.5mm}} + Sets the line width of the top rule to \meta{length}. +\begin{dispExample} +\tcbset{colback=red!5!white,colframe=red!75!black} + +\begin{tcolorbox}[toprule=3mm] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} + +\begin{docTcbKey}{toprule at break}{=\meta{length}}{no default, initially \texttt{0.5mm}} + Sets the line width of the top rule to \meta{length} \emph{if} the box is \refKey{/tcb/breakable}. + In this case, it is applied to \emph{middle} and \emph{last} parts in a + break sequence. Note that \refKey{/tcb/toprule} overwrites this value + if used afterwards. +\end{docTcbKey} + +\begin{docTcbKey}{bottomrule}{=\meta{length}}{no default, initially \texttt{0.5mm}} + Sets the line width of the bottom rule to \meta{length}. +\begin{dispExample} +\tcbset{colback=red!5!white,colframe=red!75!black} + +\begin{tcolorbox}[bottomrule=3mm] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} + +\begin{docTcbKey}{bottomrule at break}{=\meta{length}}{no default, initially \texttt{0.5mm}} + Sets the line width of the bottom rule to \meta{length} \emph{if} the box is \refKey{/tcb/breakable}. + In this case, it is applied to \emph{first} and \emph{middle} parts in a + break sequence. Note that \refKey{/tcb/bottomrule} overwrites this value + if used afterwards. +\end{docTcbKey} + +\clearpage +\begin{docTcbKey}{leftrule}{=\meta{length}}{no default, initially \texttt{0.5mm}} + Sets the line width of the left rule to \meta{length}. +\begin{dispExample} +\tcbset{colback=red!5!white,colframe=red!75!black} + +\clearpage +\begin{tcolorbox}[leftrule=3mm] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} + +\begin{docTcbKey}{rightrule}{=\meta{length}}{no default, initially \texttt{0.5mm}} + Sets the line width of the right rule to \meta{length}. +\begin{dispExample} +\tcbset{colback=red!5!white,colframe=red!75!black} + +\begin{tcolorbox}[rightrule=3mm] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} + +\begin{docTcbKey}{titlerule}{=\meta{length}}{no default, initially \texttt{0.5mm}} + Sets the line width of the rule below the title to \meta{length}. \begin{dispExample} -\begin{tcolorbox}[boxrule=2mm] +\tcbset{colback=red!5!white,colframe=red!75!black,enhanced, + title style={fill=red!90!black}} + +\begin{tcolorbox}[titlerule=3mm,title=This is the title] This is a \textbf{tcolorbox}. \end{tcolorbox} \end{dispExample} \end{docTcbKey} +\begin{docTcbKey}{boxrule}{=\meta{length}}{style, no default, initially \texttt{0.5mm}} + Sets all rules of the frame to \meta{length}, i.\,e.\ + \refKey{/tcb/toprule}, \refKey{/tcb/bottomrule}, \refKey{/tcb/leftrule}, + \refKey{/tcb/rightrule}, and \refKey{/tcb/titlerule}. +\begin{dispExample} +\tcbset{colback=red!5!white,colframe=red!75!black} + +\begin{tcolorbox}[boxrule=3mm] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} + + +\clearpage \begin{docTcbKey}{arc}{=\meta{length}}{no default, initially \texttt{1mm}} - Sets the radius of the four frame arcs to \meta{length}. + Sets the inner radius of the four frame arcs to \meta{length}. \begin{dispExample} +\tcbset{colback=red!5!white,colframe=red!75!black} + \begin{tcolorbox}[arc=0mm] This is a \textbf{tcolorbox}. \end{tcolorbox} @@ -500,14 +623,39 @@ This is a \textbf{tcolorbox}. \end{dispExample} \end{docTcbKey} + +\begin{docTcbKey}{outer arc}{=\meta{length}}{no default, initially unset} + Sets the outer radius of the four frame arcs to \meta{length}. +\begin{dispExample} +\tcbset{colback=red!5!white,colframe=red!75!black} + +\begin{tcolorbox}[arc=4mm,outer arc=1mm] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} + + +\begin{docTcbKey}{auto outer arc}{}{no value, initially set} + Sets the outer radius of the four frame arcs automatically in + dependency of the inner radius given by \refKey{/tcb/arc}. +\end{docTcbKey} + + \begin{docTcbKey}{boxsep}{=\meta{length}}{no default, initially \texttt{1mm}} Sets a common padding of \meta{length} between the text content and the frame of the box. This value is added to the key values of |left|, |right|, |top|, |bottom|, and |middle| at the appropriate places. \begin{dispExample} +\tcbset{colback=red!5!white,colframe=red!75!black,width=(\linewidth-4mm)/2, + before=,after=\hfill} + \begin{tcolorbox}[boxsep=5mm] This is a \textbf{tcolorbox}. \end{tcolorbox} +\begin{tcolorbox}[boxsep=5mm,draft] +This is a \textbf{tcolorbox}. +\end{tcolorbox} \end{dispExample} \end{docTcbKey} @@ -518,6 +666,8 @@ This is a \textbf{tcolorbox}. This is an abbreviation for setting |lefttitle|, |leftupper|, and |leftlower| to the same value. \begin{dispExample} +\tcbset{colback=red!5!white,colframe=red!75!black} + \begin{tcolorbox}[left=0mm] This is a \textbf{tcolorbox}. \end{tcolorbox} @@ -527,6 +677,8 @@ This is a \textbf{tcolorbox}. \begin{docTcbKey}{lefttitle}{=\meta{length}}{no default, initially \texttt{4mm}} Sets the left space between title text and frame (additional to |boxsep|). \begin{dispExample} +\tcbset{colback=red!5!white,colframe=red!75!black} + \begin{tcolorbox}[lefttitle=3cm,title=My Title] This is a \textbf{tcolorbox}. \end{tcolorbox} @@ -536,6 +688,8 @@ This is a \textbf{tcolorbox}. \begin{docTcbKey}{leftupper}{=\meta{length}}{no default, initially \texttt{4mm}} Sets the left space between upper text and frame (additional to |boxsep|). \begin{dispExample} +\tcbset{colback=red!5!white,colframe=red!75!black} + \begin{tcolorbox}[leftupper=3cm,title=My Title] This is a \textbf{tcolorbox}. \end{tcolorbox} @@ -545,6 +699,8 @@ This is a \textbf{tcolorbox}. \begin{docTcbKey}{leftlower}{=\meta{length}}{no default, initially \texttt{4mm}} Sets the left space between lower text and frame (additional to |boxsep|). \begin{dispExample} +\tcbset{colback=red!5!white,colframe=red!75!black} + \begin{tcolorbox}[leftlower=3cm] This is a \textbf{tcolorbox}. \tcblower @@ -560,6 +716,8 @@ This is the lower part. This is an abbreviation for setting |righttitle|, |rightupper|, and |rightlower| to the same value. \begin{dispExample} +\tcbset{colback=red!5!white,colframe=red!75!black} + \begin{tcolorbox}[width=5cm,right=2cm] This is a \textbf{tcolorbox}. \end{tcolorbox} @@ -571,6 +729,8 @@ This is a \textbf{tcolorbox}. \begin{docTcbKey}{righttitle}{=\meta{length}}{no default, initially \texttt{4mm}} Sets the right space between title text and frame (additional to |boxsep|). \begin{dispExample} +\tcbset{colback=red!5!white,colframe=red!75!black} + \begin{tcolorbox}[width=5cm,righttitle=2cm,title=My very long title text] This is a \textbf{tcolorbox} with standard upper box dimensions. \end{tcolorbox} @@ -581,6 +741,8 @@ This is a \textbf{tcolorbox} with standard upper box dimensions. \begin{docTcbKey}{rightupper}{=\meta{length}}{no default, initially \texttt{4mm}} Sets the right space between upper text and frame (additional to |boxsep|). \begin{dispExample} +\tcbset{colback=red!5!white,colframe=red!75!black} + \begin{tcolorbox}[width=5cm,rightupper=2cm,title=My very long title text] This is a \textbf{tcolorbox} with compressed upper box dimensions. \end{tcolorbox} @@ -592,6 +754,8 @@ This is a \textbf{tcolorbox} with compressed upper box dimensions. \begin{docTcbKey}{rightlower}{=\meta{length}}{no default, initially \texttt{4mm}} Sets the right space between lower text and frame (additional to |boxsep|). \begin{dispExample} +\tcbset{colback=red!5!white,colframe=red!75!black} + \begin{tcolorbox}[width=5cm,rightlower=2cm] This is a \textbf{tcolorbox} with standard upper box dimensions. \tcblower @@ -605,6 +769,8 @@ This is the lower part with large space at right. \begin{docTcbKey}{top}{=\meta{length}}{no default, initially \texttt{2mm}} Sets the top space between text and frame (additional to |boxsep|). \begin{dispExample} +\tcbset{colback=red!5!white,colframe=red!75!black} + \begin{tcolorbox}[top=0mm] This is a \textbf{tcolorbox}. \tcblower @@ -613,9 +779,24 @@ This is the lower part. \end{dispExample} \end{docTcbKey} + +\begin{docTcbKey}{toptitle}{=\meta{length}}{no default, initially \texttt{0mm}} + Sets the top space between title and frame (additional to |boxsep|). +\begin{dispExample} +\tcbset{colback=red!5!white,colframe=red!75!black} + +\begin{tcolorbox}[toptitle=3mm,title=My title] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} + +\clearpage \begin{docTcbKey}{bottom}{=\meta{length}}{no default, initially \texttt{2mm}} Sets the bottom space between text and frame (additional to |boxsep|). \begin{dispExample} +\tcbset{colback=red!5!white,colframe=red!75!black} + \begin{tcolorbox}[bottom=0mm] This is a \textbf{tcolorbox}. \tcblower @@ -624,12 +805,24 @@ This is the lower part. \end{dispExample} \end{docTcbKey} +\begin{docTcbKey}{bottomtitle}{=\meta{length}}{no default, initially \texttt{0mm}} + Sets the bottom space between title and frame (additional to |boxsep|). +\begin{dispExample} +\tcbset{colback=red!5!white,colframe=red!75!black} + +\begin{tcolorbox}[bottomtitle=3mm,title=My title] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} + -\clearpage \begin{docTcbKey}{middle}{=\meta{length}}{no default, initially \texttt{2mm}} Sets the space between upper and lower text to the separation line (additional to |boxsep|). \begin{dispExample} +\tcbset{colback=red!5!white,colframe=red!75!black} + \begin{tcolorbox}[middle=0mm,boxsep=0mm] This is a \textbf{tcolorbox}. \tcblower @@ -639,12 +832,20 @@ This is the lower part. \end{docTcbKey} - +\clearpage \subsection{Height Control} In a typical usage scenario, the height of a |tcolorbox| is computed automatically to fit the content. Nevertheless, the height can be set to a fixed value or to fit commonly for several boxes, e.\,g. if boxes are set side by side. +\bigskip +\begin{marker} + The height control keys are only applicable to unbreakable boxes. + If a box is set to be \refKey{/tcb/breakable}, the height is always + computed according to the \emph{natural height}. +\end{marker} +\bigskip + \begin{docTcbKey}{natural height}{}{no value, initially set} Sets the total height of the colored box to its natural height depending @@ -848,18 +1049,132 @@ with a listing. \clearpage +\subsection{Overlays}\label{subsec:overlays} +With an overlay, arbitrary \meta{graphical code} can be added to a +|tcolorbox|. This code is executed \emph{after} the frame and interior are +drawn and \emph{before} the text content is drawn. Therefore, you can +decorate the |tcolorbox| with your own extensions. +Common special cases are \emph{watermarks} which are implemented using overlays. +See Subsection \ref{subsec:watermarks} from page \pageref{subsec:watermarks} if +you want to add \emph{watermarks}. +\begin{marker} +If you use the core package only, the \meta{graphical code} has to be |pgf| code +and there is not much assistance for positioning. +Therefore, the usage of the \refKey{/tcb/enhanced} mode from the library skins +is recommended which allows |tikz| code and gives access to +\refKey{/tcb/geometry nodes} for positioning. +\end{marker} + +\begin{docTcbKey}{overlay}{=\meta{graphical code}}{no default, initially unset} + Adds \meta{graphical code} to the box drawing process. This \meta{graphical code} + is drawn \emph{after} the frame and interior and \emph{before} the text content. + +\begin{dispExample} +% \tcbuselibrary{skins} % preamble +\tcbset{frogbox/.style={enhanced,colback=green!10,colframe=green!65!black, + enlarge top by=5.5mm, + overlay={\foreach \x in {2cm,3.5cm} { + \begin{scope}[shift={([xshift=\x]frame.north west)}] + \path[draw=green!65!black,fill=green!10,line width=1mm] (0,0) arc (0:180:5mm); + \path[fill=black] (-0.2,0) arc (0:180:1mm); + \end{scope}}}]}} + +\begin{tcolorbox}[frogbox,title=My title] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{dispExample} + +\begin{dispExample} +% \usetikzlibrary{patterns} % preamble +% \tcbuselibrary{skins} % preamble +\tcbset{ribbonbox/.style={enhanced,colback=red!5!white,colframe=red!75!black, + fonttitle=\bfseries, + overlay={\path[fill=blue!75!white,draw=blue,double=white!85!blue, + preaction={opacity=0.6,fill=blue!75!white}, + line width=0.1mm,double distance=0.2mm, + pattern=fivepointed stars,pattern color=white!75!blue] + ([xshift=-0.2mm,yshift=-1.02cm]frame.north east) + -- ++(-1,1) -- ++(-0.5,0) -- ++(1.5,-1.5) -- cycle;}}} + +\begin{tcolorbox}[ribbonbox,title=My title] +This is a \textbf{tcolorbox}. +\tcblower +This is the lower part. +\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} + +\begin{docTcbKey}{no overlay}{}{style, no default, initially set} + Removes the overlay if set before. +\end{docTcbKey} + +\begin{docTcbKey}{overlay broken}{=\meta{graphical code}}{no default, initially unset} + If the box is set to be \refKey{/tcb/breakable} and \emph{is} broken actually, + then the \meta{graphical code} is added to the box drawing process. + \refKey{/tcb/overlay} overwrites this key. +\end{docTcbKey} + +\begin{docTcbKey}{overlay unbroken}{=\meta{graphical code}}{no default, initially unset} + If the box is set to be \refKey{/tcb/breakable} but \emph{is not} broken actually + or if the box is set to be \refKey{/tcb/unbreakable}, + then the \meta{graphical code} is added to the box drawing process. + \refKey{/tcb/overlay} overwrites this key. +\end{docTcbKey} + +\begin{docTcbKey}{overlay first}{=\meta{graphical code}}{no default, initially unset} + If the box is set to be \refKey{/tcb/breakable} and \emph{is} broken actually, + then the \meta{graphical code} is added to the box drawing process for + the \emph{first} part of the break sequence. + \refKey{/tcb/overlay} overwrites this key. +\end{docTcbKey} + +\begin{docTcbKey}{overlay middle}{=\meta{graphical code}}{no default, initially unset} + If the box is set to be \refKey{/tcb/breakable} and \emph{is} broken actually, + then the \meta{graphical code} is added to the box drawing process for + the \emph{middle} parts (if any) of the break sequence. + \refKey{/tcb/overlay} overwrites this key. +\end{docTcbKey} + +\begin{docTcbKey}{overlay last}{=\meta{graphical code}}{no default, initially unset} + If the box is set to be \refKey{/tcb/breakable} and \emph{is} broken actually, + then the \meta{graphical code} is added to the box drawing process for + the \emph{last} part of the break sequence. + \refKey{/tcb/overlay} overwrites this key. +\end{docTcbKey} + +\begin{docTcbKey}{overlay unbroken and first}{=\meta{graphical code}}{no default, initially unset} + This is an optimized abbreviation for setting + \refKey{/tcb/overlay unbroken} and + \refKey{/tcb/overlay first} together. + \refKey{/tcb/overlay} overwrites this key. +\end{docTcbKey} + +\begin{docTcbKey}{overlay middle and last}{=\meta{graphical code}}{no default, initially unset} + This is an optimized abbreviation for setting + \refKey{/tcb/overlay middle} and + \refKey{/tcb/overlay last} together. + \refKey{/tcb/overlay} overwrites this key. +\end{docTcbKey} + + + +\clearpage \subsection{Floating Objects} \begin{docTcbKey}{floatplacement}{=\meta{values}}{no default, initially \texttt{htb}} Sets \meta{values} as default values for the usage of |float|. Feasible are the usual parameters for floating objects. \begin{dispListing} +\tcbset{enhanced,colback=red!5!white,colframe=red!75!black, + watermark color=red!15!white} + \begin{tcolorbox}[floatplacement=t,float, - title=Floating box from |floatplacement|] + title=Floating box from |floatplacement|, + watermark text={I am floating}] This floating box is placed at the top of a page. \end{tcolorbox} \end{dispListing} -\tcbusetemp \end{docTcbKey} +{\tcbusetemp} \begin{docTcbKey}{float}{\colOpt{=\meta{values}}}{default from \texttt{floatplacement}} @@ -868,16 +1183,18 @@ with a listing. If they are not used, the placement uses the default values given by |floatplacement|. \begin{dispListing} -\begin{tcolorbox}[float, title=Floating box from |float|] +\begin{tcolorbox}[float, title=Floating box from |float|, + enhanced,watermark text={I'm also floating}] This box floats to a feasible place automatically. You do not have to use a numbering for this floating object. \end{tcolorbox} \end{dispListing} -\tcbusetemp \end{docTcbKey} +{\tcbusetemp} \subsection{Embedding into the Surroundings} +\enlargethispage{5mm} \begin{docTcbKey}{before}{=\meta{macros}}{no default, initially \cs{par}\cs{pagebreak[0]}\cs{noindent}} Sets the \meta{macros} which are executed before the colored box. They are not used for floating boxes. @@ -932,6 +1249,16 @@ This is a \textbf{tcolorbox}. \end{dispExample} \end{docTcbKey} + +\begin{docTcbKey}{enlarge top at break by}{=\meta{length}}{no default, initially \texttt{0mm}} + Enlarges the bounding box distance to the top of the box by \meta{length} + \emph{if} the box is \refKey{/tcb/breakable}. + In this case, it is applied to \emph{middle} and \emph{last} parts in a + break sequence. + \refKey{/tcb/enlarge top by} overwrites this key. +\end{docTcbKey} + + \begin{docTcbKey}{enlarge bottom by}{=\meta{length}}{no default, initially |0mm|} Enlarges the bounding box distance to the bottom of the box by \meta{length}. \begin{dispExample} @@ -946,6 +1273,15 @@ This is a \textbf{tcolorbox}. \end{dispExample} \end{docTcbKey} + +\begin{docTcbKey}{enlarge bottom at break by}{=\meta{length}}{no default, initially \texttt{0mm}} + Enlarges the bounding box distance to the bottom of the box by \meta{length} + \emph{if} the box is \refKey{/tcb/breakable}. + In this case, it is applied to \emph{first} and \emph{middle} parts in a + break sequence. \refKey{/tcb/enlarge bottom by} overwrites this key. +\end{docTcbKey} + + \clearpage \begin{docTcbKey}{enlarge left by}{=\meta{length}}{no default, initially |0mm|} Enlarges the bounding box distance to the left side of the box by \meta{length}. @@ -1021,6 +1357,33 @@ This is a \textbf{tcolorbox}. \clearpage + +\subsection{Text Characteristics} +\begin{docTcbKey}{parbox}{\colOpt{=\meta{boolean value}}}{default |true|, initially |true|} + The text inside a |tcolorbox| is formatted using a \LaTeX\ |minipage| + if the box is unbreakable. If breakable, the box tries a mimicry of + a |minipage|. In a |minipage| or |parbox|, paragraphs are formatted slightly different + as the main text. If the key value is set to |false|, the normal main text + behavior is restored. In some situations, this has some unwanted side + effects. It is recommended to use this experimental setting only + where you really want to have this feature. +\end{docTcbKey} + +\begin{dispListing} +% \usepackage{lipsum} % preamble +\tcbset{width=(\linewidth-2mm)/2,before=,after=,arc=1mm, + colframe=blue!75!black,colback=white,fonttitle=\bfseries,fontupper=\small, + left=2mm,right=2mm,top=1mm,bottom=1mm,equal height group=parbox} + +\begin{tcolorbox}[parbox,adjusted title={parbox=true (normal)}] + \lipsum[1-2] +\end{tcolorbox}\hfill% +\begin{tcolorbox}[parbox=false,adjusted title={parbox=false}] + \lipsum[1-2] +\end{tcolorbox}% +\end{dispListing} +{\tcbusetemp} + \subsection{Files} \begin{docTcbKey}{tempfile}{=\meta{file name}}{no default, initially \cs{jobname.tcbtemp}} Sets \meta{file name} as name for the temporary file which is used inside @@ -1106,12 +1469,12 @@ This also loads the package |listings| \cite{heinz:2007a}. \begin{docEnvironment}{tcblisting}{\marg{options}} Creates a colored box based on a \refEnv{tcolorbox}. Controlled by the given \meta{options}, the - environment content is typesetted normally and/or as a listing. + environment content is typeset normally and/or as a listing. Furthermore, the \meta{options} control appearance and functions of the |tcolorbox|. By default, the listing is interpreted as a \LaTeX\ listing. \begin{dispExample} -\begin{tcblisting}{colback=red!5,colframe=red!75!black} +\begin{tcblisting}{colback=red!5!white,colframe=red!75!black} This is a \LaTeX\ example which displays the text as source code and in compiled form. \end{tcblisting} @@ -1149,7 +1512,7 @@ This \textbf{text} is written to a standardized file for later usage. from a file named by the key value of |listing file|. Apart from that, the function is equal to that of \refEnv{tcblisting}. \begin{dispExample} -\tcbinputlisting{colback=red!5,colframe=red!75!black,text only} +\tcbinputlisting{colback=red!5!white,colframe=red!75!black,text only} \tcbinputlisting{colback=green!5,colframe=green!75!black,listing only} \end{dispExample} \end{docCommand} @@ -1193,7 +1556,7 @@ be used inside these macros. For \LaTeX\ listings, there is a predefined |listings| style named |tcblatex| which can be used. \begin{dispExample} -\begin{tcblisting}{colback=red!5,colframe=red!25,left=6mm, +\begin{tcblisting}{colback=red!5!white,colframe=red!25,left=6mm, listing options={style=tcblatex,numbers=left,numberstyle=\tiny\color{red!75!black}}} This is a \LaTeX\ example which displays the text as source code and in compiled form. Additionally, we use line numbers here. @@ -1207,7 +1570,7 @@ and in compiled form. Additionally, we use line numbers here. for the |listings| package, see \cite{heinz:2007a}. For \LaTeX, there is a predefined style named |tcblatex|. \begin{dispExample} -\begin{tcblisting}{colback=red!5,colframe=red!75!black, +\begin{tcblisting}{colback=red!5!white,colframe=red!75!black, listing style=tcblatex} Here, we use the predefined style. \end{tcblisting} @@ -1219,7 +1582,7 @@ Here, we use the predefined style. Typesets the environment content as listing in the upper part and as compiled text in the lower part. \begin{dispExample} -\begin{tcblisting}{colback=red!5,colframe=red!75!black,listing and text} +\begin{tcblisting}{colback=red!5!white,colframe=red!75!black,listing and text} This is a \LaTeX\ example. \end{tcblisting} \end{dispExample} @@ -1229,7 +1592,7 @@ This is a \LaTeX\ example. Typesets the environment content as compiled text in the upper part and as listing in the lower part. \begin{dispExample} -\begin{tcblisting}{colback=red!5,colframe=red!75!black,text and listing} +\begin{tcblisting}{colback=red!5!white,colframe=red!75!black,text and listing} This is a \LaTeX\ example. \end{tcblisting} \end{dispExample} @@ -1238,7 +1601,7 @@ This is a \LaTeX\ example. \begin{docTcbKey}{listing only}{}{no value} Typesets the environment content as listing. \begin{dispExample} -\begin{tcblisting}{colback=red!5,colframe=red!75!black,listing only} +\begin{tcblisting}{colback=red!5!white,colframe=red!75!black,listing only} This is a \LaTeX\ example. \end{tcblisting} \end{dispExample} @@ -1247,7 +1610,7 @@ This is a \LaTeX\ example. \begin{docTcbKey}{text only}{}{no value} Typesets the environment content as compiled text. \begin{dispExample} -\begin{tcblisting}{colback=red!5,colframe=red!75!black,text only} +\begin{tcblisting}{colback=red!5!white,colframe=red!75!black,text only} This is a \LaTeX\ example. \end{tcblisting} \end{dispExample} @@ -1261,7 +1624,7 @@ This is a \LaTeX\ example. and \refKey{/tcb/comment and listing}. \begin{dispExample} \begin{tcblisting}{comment={This comment is really only a comment}, - colback=red!5,colframe=red!75!black} + colback=red!5!white,colframe=red!75!black} This is a \textbf{tcolorbox}. \end{tcblisting} \end{dispExample} @@ -1272,7 +1635,7 @@ This is a \textbf{tcolorbox}. Typesets the environment content as listing in the upper part and a given comment in the lower part. \begin{dispExample} -\begin{tcblisting}{colback=red!5,colframe=red!75!black,listing and comment, +\begin{tcblisting}{colback=red!5!white,colframe=red!75!black,listing and comment, comment={This is my comment. It may contain line breaks.\par It can even use the environment content \flqq\ignorespaces\tcbuselistingtext\unskip\frqq}} @@ -1287,7 +1650,7 @@ This is a \LaTeX\ example. Typesets a given comment in the upper part and the environment content as listing in the lower part. \begin{dispExample} -\begin{tcblisting}{colback=red!5,colframe=red!75!black,comment and listing, +\begin{tcblisting}{colback=red!5!white,colframe=red!75!black,comment and listing, comment={This is my comment.}} This is a \LaTeX\ example. \end{tcblisting} @@ -1455,12 +1818,12 @@ processing. The solution contents themselves are saved to a subdirectory named \item The solutions are loaded by |\inputsol|. \end{itemize} -Inside the excercise text, there may be text parts which are needed as +Inside the exercise text, there may be text parts which are needed as \LaTeX\ source code and as compiled text as well. These parts can be saved by \refEnv{tcbwritetemp} and used in compiled form by \refCom{tcbusetemp} or as source code by \refCom{tcbusetemplisting}. -At first, we generate some new keys. Since exercises und solutions should +At first, we generate some new keys. Since exercises and solutions should be numbered, we force to use a label \meta{marker} while using the style |texercise|. Automatically, the label |exe:|\meta{marker} is used to mark the exercise and the label |sol:|\meta{marker} is used to mark the solution. @@ -1689,9 +2052,9 @@ the section number. \tcbset{ defstyle/.style={fonttitle=\bfseries\upshape, fontupper=\slshape, - arc=0mm, colback=blue!5,colframe=blue!75!black}, + arc=0mm, colback=blue!5!white,colframe=blue!75!black}, theostyle/.style={fonttitle=\bfseries\upshape, fontupper=\slshape, - colback=red!10,colframe=red!75!black}, + colback=red!10!white,colframe=red!75!black}, } \end{dispListing} \tcbusetemp @@ -1755,14 +2118,25 @@ referenced with the marker \texttt{cor:nullstellen}.\bigskip \begin{dispExample} -\begin{Theorem}[boxrule=2mm]{Hinreichende Bedingung - f\"{u}r Wendepunkte}{wendehinreichend}% +\begin{Theorem}[boxrule=2mm,toptitle=-1.5mm,bottomtitle=-1.5mm]{% + Hinreichende Bedingung f\"{u}r Wendepunkte}{wendehinreichend}% $f$ sei eine auf einem Intervall $]a,b[$ dreimal stetig differenzierbare Funktion. Ist $f''(x_0)=0$ in $x_0\in]a,b[$ und $f'''(x_0)\ne 0$, so ist $(x_0,f(x_0))$ ein Wendepunkt von $f$. \end{Theorem} \end{dispExample} +You need more attention for your theorems? Here, you are \ldots + +\begin{dispExample} +% tcbuselibrary{skins} % preamble +\begin{Theorem}[enhanced,frame style={circular glow={fill=yellow}}, + watermark color=red!35!white, + watermark text={Overacting\\Fundamental Theorem}]% + {Fundamental Theorem of Theorems}{fundamental}% + \lipsum[1-2] +\end{Theorem} +\end{dispExample} \clearpage @@ -1982,7 +2356,6 @@ This is my \colOpt{text}. \end{docCommand} - \subsection{Option Keys of the Library} \begin{docTcbKey}{docexample}{}{style, no value} @@ -1999,7 +2372,6 @@ This is my \colOpt{text}. \refKey{/tcb/listing style} which is used for 'normal' listings. \end{docTcbKey} - \begin{docTcbKey}{color definition}{=\meta{color}}{no default, initially |Definition|} Sets the highlight color used by macro and key definitions. \end{docTcbKey} @@ -2129,13 +2501,49 @@ option from the core package has to be set. \begin{tcolorbox}[adjusted title=My title] This is my content. \end{tcolorbox} -\begin{tcolorbox}[skin=beamer,adjusted title=My title] +\begin{tcolorbox}[skin=beamer,beamer,adjusted title=My title] This is my content. \end{tcolorbox} \end{dispExample} \end{docTcbKey} +\begin{marker} + On first read, you may skip the rest of this subsection and proceed to + Subsection \ref{subsec:addstyleoptions} on page \pageref{subsec:addstyleoptions}. + All following keys in this subsection are automatically set by the selected skin + and you may never have to temper with them. + Nevertheless, they can be used after a skin was selected to modify + this skin. +\end{marker} + + +\begin{docTcbKey}{skin first}{=\meta{name}}{style, no default, initially \texttt{standard}} + If the box is set to be \refKey{/tcb/breakable} and \emph{is} broken actually, + then the skin for the \emph{first} part of the break sequence + is set to \meta{name}, see Subsection \ref{subsec:breaksequence} on page \pageref{subsec:breaksequence}. + Typically, this key is set by a \refKey{/tcb/skin}. +\end{docTcbKey} + + +\begin{docTcbKey}{skin middle}{=\meta{name}}{style, no default, initially \texttt{standard}} + If the box is set to be \refKey{/tcb/breakable} and \emph{is} broken actually, + then the skin for the \emph{middle} parts (if any) of the break sequence + is set to \meta{name}, see Subsection \ref{subsec:breaksequence} on page \pageref{subsec:breaksequence}. + Typically, this key is set by a \refKey{/tcb/skin}. +\end{docTcbKey} + + +\begin{docTcbKey}{skin last}{=\meta{name}}{style, no default, initially \texttt{standard}} + If the box is set to be \refKey{/tcb/breakable} and \emph{is} broken actually, + then the skin for the \emph{last} part of the break sequence + is set to \meta{name}, see Subsection \ref{subsec:breaksequence} on page \pageref{subsec:breaksequence}. + Typically, this key is set by a \refKey{/tcb/skin}. +\end{docTcbKey} + + + + \begin{docTcbKey}{graphical environment}{=\meta{name}}{no default, initially \texttt{pgfpicture}} Sets the graphical environment for the |tcolorbox| to \meta{name}. Feasible values are |pgfpicture| and |tikzpicture| or environments which @@ -2143,23 +2551,27 @@ option from the core package has to be set. may seldom be used directly. \end{docTcbKey} -The skin of a |tcolorbox| is drawn by up to three \emph{engines}. +The skin of a |tcolorbox| is drawn by up to four \emph{engines}. Afterwards, the text content is drawn which is not part of a skin. -The three steps are: +The four steps are: \begin{enumerate} \item The \emph{frame} of the box. \item The \emph{interior} of the box. The interior of a box with title is drawn differently from a box without title. \item The \emph{segmentation} (line) of the box, if there is a lower part. +\item The \emph{title area} of the box, if there is a title. \end{enumerate} -Every engine for the up to three steps can be set to one of three types: +Every engine for the up to four steps can be set to one of the following types: \begin{enumerate} \item |standard|: the original code from the core package. \item |path|: a |tikz| path which can be controlled by options. +\item |pathfirst|: a |tikz| path which can be controlled by options. +\item |pathmiddle|: a |tikz| path which can be controlled by options. +\item |pathlast|: a |tikz| path which can be controlled by options. \item |freelance|: arbitrary user code. \end{enumerate} -\clearpage +%\clearpage \begin{docTcbKey}{frame engine}{=\meta{name}}{no default, initially \texttt{standard}} Sets the \emph{frame} drawing engine for a box to \meta{name}. @@ -2168,6 +2580,9 @@ Every engine for the up to three steps can be set to one of three types: \begin{itemize} \item |standard|: the original code from the core package, \item |path|: a |tikz| path which is controlled by \refKey{/tcb/frame style}, + \item |pathfirst|: a |tikz| path which is controlled by \refKey{/tcb/frame style}, + \item |pathmiddle|: a |tikz| path which is controlled by \refKey{/tcb/frame style}, + \item |pathlast|: a |tikz| path which is controlled by \refKey{/tcb/frame style}, \item |freelance|: arbitrary user code which is given by \refKey{/tcb/frame code}. \end{itemize} \end{docTcbKey} @@ -2179,6 +2594,9 @@ Every engine for the up to three steps can be set to one of three types: \begin{itemize} \item |standard|: the original code from the core package, \item |path|: a |tikz| path which is controlled by \refKey{/tcb/interior style}, + \item |pathfirst|: a |tikz| path which is controlled by \refKey{/tcb/interior style}, + \item |pathmiddle|: a |tikz| path which is controlled by \refKey{/tcb/interior style}, + \item |pathlast|: a |tikz| path which is controlled by \refKey{/tcb/interior style}, \item |freelance|: arbitrary user code which is given by \refKey{/tcb/interior titled code}. \end{itemize} \end{docTcbKey} @@ -2190,6 +2608,9 @@ Every engine for the up to three steps can be set to one of three types: \begin{itemize} \item |standard|: the original code from the core package, \item |path|: a |tikz| path which is controlled by \refKey{/tcb/interior style}, + \item |pathfirst|: a |tikz| path which is controlled by \refKey{/tcb/interior style}, + \item |pathmiddle|: a |tikz| path which is controlled by \refKey{/tcb/interior style}, + \item |pathlast|: a |tikz| path which is controlled by \refKey{/tcb/interior style}, \item |freelance|: arbitrary user code which is given by \refKey{/tcb/interior code}. \end{itemize} \end{docTcbKey} @@ -2205,9 +2626,23 @@ Every engine for the up to three steps can be set to one of three types: \end{itemize} \end{docTcbKey} +\begin{docTcbKey}{title engine}{=\meta{name}}{no default, initially \texttt{standard}} + Sets the \emph{title area} drawing engine for a titled box to \meta{name}. + Typically, this key is set by a \refKey{/tcb/skin}. + Feasible values for \meta{name} are: + \begin{itemize} + \item |standard|: the original code from the core package, + \item |path|: a |tikz| path which is controlled by \refKey{/tcb/title style}, + \item |pathfirst|: a |tikz| path which is controlled by \refKey{/tcb/title style}, + \item |pathmiddle|: a |tikz| path which is controlled by \refKey{/tcb/title style}, + \item |pathlast|: a |tikz| path which is controlled by \refKey{/tcb/title style}, + \item |freelance|: arbitrary user code which is given by \refKey{/tcb/title code}. + \end{itemize} +\end{docTcbKey} + \begin{docTcbKey}{geometry nodes}{\colOpt{=\meta{boolean value}}}{default |true|, initially |false|} - If set to |true|, three |tikz| nodes are defined for a |tcolorbox| - which are named |frame|, |interior|, and |segmentation|. These nodes + If set to |true|, up to four |tikz| nodes are defined for a |tcolorbox| + which are named |frame|, |interior|, |segmentation|, and |title|. These nodes describe the boundaries of the equally named parts of a |tcolorbox|. They are used by all engines of type |path| and they may be used by engines of type |freelance|. Typically, this key is set by a \refKey{/tcb/skin}. @@ -2224,51 +2659,540 @@ Every engine for the up to three steps can be set to one of three types: interior titled code={\path[draw=blue,fill=blue!25] (interior.south west) rectangle (interior.north east);}, segmentation code={\path[draw=green,fill=green!25] - (segmentation.south west) rectangle (segmentation.north east);}] + (segmentation.south west) rectangle (segmentation.north east);}, + title code={\path[draw=black,fill=brown!75!black] + (title.south west) rectangle (title.north east);}] The upper part.\tcblower The lower part. \end{tcolorbox} \end{dispExample} \end{docTcbKey} -\subsection{Skin 'standard'} +\clearpage +\subsection{Style Option Keys}\label{subsec:addstyleoptions} +The following style options are applicable for all skins which +use engines of type |path|, |pathfirst|, |pathmiddle|, or |pathlast|. +Especially, the skin \refSkin{enhanced} supports \emph{all} of them +and \refSkin{standard} \emph{none}. + +\begin{docTcbKey}{frame style}{=\meta{\texttt{\upshape tikz} keys}}{style, no default} + The \meta{\texttt{\upshape tikz} keys} are used inside the |tikz| path command + for drawing the \emph{frame} of the box.\\ + This option is available if the \refKey{/tcb/frame engine} is set to + |path|, |pathfirst|, |pathmiddle|, or |pathlast|. + It is \emph{not} available for |standard| and it \emph{may} be + applicable for |freelance|. +\begin{dispExample} +\tcbset{colback=red!5!white,fonttitle=\bfseries} + +\begin{tcolorbox}[enhanced,title=My title, + frame style={left color=red!75!black,right color=blue!75!black}] +This is a \textbf{tcolorbox}. +\tcblower +This is the lower part. +\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} + + +\begin{docTcbKey}{interior style}{=\meta{\texttt{\upshape tikz} keys}}{style, no default} + The \meta{\texttt{\upshape tikz} keys} are used inside the |tikz| path command + for drawing the \emph{interior} of the box. They are used for the titled + and for the untitled version as well.\\ + This option is available if the \refKey{/tcb/interior titled engine} + or \refKey{/tcb/interior engine} is set to + |path|, |pathfirst|, |pathmiddle|, or |pathlast|. + It is \emph{not} available for |standard| and it \emph{may} be + applicable for |freelance|. +\begin{dispExample} +\tcbset{colframe=red!75!black,fonttitle=\bfseries} + +\begin{tcolorbox}[enhanced,title=My title, + interior style={left color=red!20!white,right color=yellow!50!white}] +This is a \textbf{tcolorbox}. +\tcblower +This is the lower part. +\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} + +\clearpage +\begin{docTcbKey}{segmentation style}{=\meta{\texttt{\upshape tikz} keys}}{style, no default} + The \meta{\texttt{\upshape tikz} keys} are used inside the |tikz| path command + for drawing the \emph{segmentation} line of the box.\\ + This option is available if the \refKey{/tcb/segmentation engine} + is set to |path|. + It is \emph{not} available for |standard| and it \emph{may} be + applicable for |freelance|. +\begin{dispExample} +\tcbset{colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries} + +\begin{tcolorbox}[enhanced,title=My title, + segmentation style={double=white,draw=blue,double distance=1pt,solid}] +This is a \textbf{tcolorbox}. +\tcblower +This is the lower part. +\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} + + +\begin{docTcbKey}{title style}{=\meta{\texttt{\upshape tikz} keys}}{style, no default} + The \meta{\texttt{\upshape tikz} keys} are used inside the |tikz| path command + for drawing the \emph{title area} of the box.\\ + This option is available if the \refKey{/tcb/title engine} is set to + |path|, |pathfirst|, |pathmiddle|, or |pathlast|. + It is \emph{not} available for |standard| and it \emph{may} be + applicable for |freelance|. +\begin{dispExample} +\tcbset{colback=red!5!white,colframe=red!75!black,coltitle=blue!50!black, + fonttitle=\bfseries} + +\begin{tcolorbox}[enhanced,title=My title, + title style={fill=blue!15!yellow}] +This is a \textbf{tcolorbox}. +\tcblower +This is the lower part. +\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} + + +\clearpage +\subsection{Code Option Keys}\label{subsec:addcodeoptions} +The following code options are applicable for all skins which +use engines of type |freelance|. +Especially, the skin \refSkin{freelance} supports \emph{all} of them, +\refSkin{standard} and \refSkin{enhanced} \emph{none} of them. + + +\begin{docTcbKey}{frame code}{\colOpt{=\meta{graphical code}}}{code, default from |standard|} + The given \meta{graphical code} is used for drawing the \emph{frame} of the box.\\ + This option is available only if the \refKey{/tcb/frame engine} is set to |freelance|. +\begin{dispExample} +\tcbset{colback=red!5!white,colframe=red!75!black} + +\begin{tcolorbox}[freelance,frame code={ + \foreach \n in {north east,north west,south east,south west} + {\path [fill=red!75!black] (interior.\n) circle (3mm); }; }] +This is a \textbf{tcolorbox}. +\tcblower +This is the lower part. +\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} + +\begin{docTcbKey}{interior titled code}{\colOpt{=\meta{graphical code}}}{code, default from |standard|} + The given \meta{graphical code} is used + for drawing the \emph{interior} of the box, if the box comes with a title.\\ + This option is available only if the \refKey{/tcb/interior titled engine} is set to |freelance|. +\begin{dispExample} +\tcbset{colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries} + +\begin{tcolorbox}[freelance,title=My title,interior titled code={ + \path[draw=red!5!white,line width=5mm,line cap=round] + ([xshift=3mm,yshift=-3mm]interior.north west) + --([xshift=-3mm,yshift=3mm]interior.south east) + ([xshift=3mm,yshift=3mm]interior.south west) + --([xshift=-3mm,yshift=-3mm]interior.north east);}] +This is a \textbf{tcolorbox}. +\tcblower +This is the lower part. +\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} + + +\clearpage +\begin{docTcbKey}{interior code}{\colOpt{=\meta{graphical code}}}{code, default from |standard|} + The given \meta{graphical code} is used + for drawing the \emph{interior} of the box, if the box is without a title.\\ + This option is available only if the \refKey{/tcb/interior engine} is set to |freelance|. +\begin{dispExample} +\tcbset{colback=red!5!white,colframe=red!75!black} + +\begin{tcolorbox}[freelance,interior code={ + \path[draw=red!5!white,line width=5mm,line cap=round] + ([xshift=3mm,yshift=-3mm]interior.north west) + --([xshift=-3mm,yshift=3mm]interior.south east) + ([xshift=3mm,yshift=3mm]interior.south west) + --([xshift=-3mm,yshift=-3mm]interior.north east);}] +This is a \textbf{tcolorbox}. +\tcblower +This is the lower part. +\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} + +\begin{docTcbKey}{segmentation code}{\colOpt{=\meta{graphical code}}}{code, default from |standard|} + The given \meta{graphical code} is used for drawing the + \emph{segmentation} area of the box.\\ + This option is available only if the \refKey{/tcb/segmentation engine} is set to |freelance|. +\begin{dispExample} +\tcbset{colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries} + +\begin{tcolorbox}[freelance,title=My title,segmentation code={ + \path[top color=red!5!white,bottom color=red!5!white,middle color=blue] + (segmentation.south west) rectangle (segmentation.north east);}] +This is a \textbf{tcolorbox}. +\tcblower +This is the lower part. +\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} + + +\clearpage +\begin{docTcbKey}{title code}{\colOpt{=\meta{graphical code}}}{code, default from |standard|} + The given \meta{graphical code} is used for drawing the + \emph{title} area of the box.\\ + This option is available only if the \refKey{/tcb/title engine} is set to |freelance|. +\begin{dispExample} +\tcbset{colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries, + coltitle=black} + +\begin{tcolorbox}[freelance,title=My title,title code={ + \path[draw=yellow,solid,decorate,line width=2mm, + decoration={coil,aspect=0,segment length=10.1mm}] + ([xshift=1mm]title.west) -- ([xshift=-1mm]title.east);}] +This is a \textbf{tcolorbox}. +\tcblower +This is the lower part. +\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} + + +\clearpage +\subsection{Watermark Option Keys}\label{subsec:watermarks} +The following watermark options are applicable for all skins which +use |tikzpicture| as \refKey{/tcb/graphical environment}. +Therefore, the skin \refSkin{standard} does not support these watermarks, +but all other skins, e.\,g.\ \refSkin{enhanced}. + +\begin{marker} +The watermark options rely on the more general overlay options described in +Section \ref{subsec:overlays} from page \pageref{subsec:overlays}. +Therefore, \emph{watermarks} and \emph{overlays} cannot be used mixed. +\end{marker} + + +\begin{docTcbKey}{watermark text}{=\meta{text}}{no default, initially unset} + Writes some \meta{text} in the center of the interior region of a |tcolorbox|. + This \meta{text} is written \emph{after} the + frame and interior are drawn and \emph{before} the text content is drawn. + It is zoomed or stretched according the values of + \refKey{/tcb/watermark zoom} or \refKey{/tcb/watermark stretch}. +\begin{dispExample} +\tcbset{colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries} + +\begin{tcolorbox}[enhanced,title=My title,watermark text=My Watermark] +\lipsum[1] +\tcblower +\lipsum[2] +\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} + + +\begin{docTcbKey}{watermark text on}{=\meta{part} is \meta{text}}{no default, initially unset} + This option writes some \meta{text} in the center of the interior region of a |tcolorbox| + as described for \refKey{/tcb/watermark text}. + But this is done only for boxes named \meta{part} of a break sequence, see + \refKey{/tcb/breakable}.\\ + Feasible values for \meta{part} are: + \begin{itemize} + \item |broken|: all broken box parts, + \item |unbroken|: unbroken boxes only, + \item |first|: first parts of a break sequence, + \item |middle|: middle parts of a break sequence, + \item |last|: last parts of a break sequence, + \item |unbroken and first|: unbroken boxes and first parts of a break sequence, + \item |middle and last|: middle and last parts of a break sequence. + \end{itemize} +\end{docTcbKey} + + +\clearpage + + +\begin{docTcbKey}{watermark graphics}{=\meta{file name}}{no default, initially unset} + Draws an external picture referenced by \meta{file name} + in the center of the interior region of a |tcolorbox|. + The picture is drawn \emph{after} the + frame and interior are drawn and \emph{before} the text content is drawn. + It is zoomed or stretched according the values of + \refKey{/tcb/watermark zoom} or \refKey{/tcb/watermark stretch}. +\begin{dispExample} +\tcbset{colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries} + +\begin{tcolorbox}[enhanced,title=My title,watermark graphics=Basilica_5.png, + watermark opacity=0.15] +\lipsum[1-2] +\tcblower +This example uses a public domain picture from\\ +\url{http://commons.wikimedia.org/wiki/File:Basilica_5.png} +\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} + + +\begin{docTcbKey}{watermark graphics on}{=\meta{part} is \meta{file name}}{no default, initially unset} + This option draws a picture referenced by \meta{file name} in the center of the interior region of a |tcolorbox| + as described for \refKey{/tcb/watermark graphics}. + But this is done only for boxes named \meta{part} of a break sequence, see + \refKey{/tcb/breakable}.\\ + Feasible values for \meta{part} are: + \begin{itemize} + \item |broken|: all broken box parts, + \item |unbroken|: unbroken boxes only, + \item |first|: first parts of a break sequence, + \item |middle|: middle parts of a break sequence, + \item |last|: last parts of a break sequence, + \item |unbroken and first|: unbroken boxes and first parts of a break sequence, + \item |middle and last|: middle and last parts of a break sequence. + \end{itemize} +\end{docTcbKey} + + + +\clearpage +\begin{docTcbKey}{watermark tikz}{=\meta{graphical code}}{no default, initially unset} + Draws the given |tikz| \meta{graphical code} + in the center of the interior region of a |tcolorbox|. + The code is executed \emph{after} the + frame and interior are drawn and \emph{before} the text content is drawn. + The result is zoomed or stretched according the values of + \refKey{/tcb/watermark zoom} or \refKey{/tcb/watermark stretch}. +\begin{dispExample} +\tcbset{colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries} + +\begin{tcolorbox}[enhanced,title=My title, + watermark tikz={\draw[line width=2mm] (interior) circle (1cm) + node{\fontfamily{ptm}\fontseries{b}\fontsize{20mm}{20mm}\selectfont ?};}] +\lipsum[1] +\tcblower +\lipsum[2] +\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} + + + +\begin{docTcbKey}{watermark tikz on}{=\meta{part} is \meta{graphical code}}{no default, initially unset} + This option draws the given |tikz| \meta{graphical code} in the center of the interior region of a |tcolorbox| + as described for \refKey{/tcb/watermark tikz}. + But this is done only for boxes named \meta{part} of a break sequence, see + \refKey{/tcb/breakable}.\\ + Feasible values for \meta{part} are: + \begin{itemize} + \item |broken|: all broken box parts, + \item |unbroken|: unbroken boxes only, + \item |first|: first parts of a break sequence, + \item |middle|: middle parts of a break sequence, + \item |last|: last parts of a break sequence, + \item |unbroken and first|: unbroken boxes and first parts of a break sequence, + \item |middle and last|: middle and last parts of a break sequence. + \end{itemize} +\end{docTcbKey} + + +\begin{docTcbKey}{no watermark}{}{style, no default, initially set} + Removes the watermark if set before. This is an alias for + \refKey{/tcb/no overlay}. +\end{docTcbKey} + + +\clearpage +\begin{docTcbKey}{watermark opacity}{=\meta{fraction}}{no default, initially |1.00|} + Sets the opacity value $\in[0,1]$ for a watermark. +\begin{dispExample} +\tcbset{enhanced,colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries, + watermark text=Watermark,before=,after=,width=(\linewidth-2mm)/2} + +\begin{tcolorbox}[title=Opacity 1.00,watermark opacity=1.00] +\lipsum[2] +\end{tcolorbox}\hfill% +\begin{tcolorbox}[title=Opacity 0.50,watermark opacity=0.50] +\lipsum[2] +\end{tcolorbox}% +\end{dispExample} +\end{docTcbKey} + +\enlargethispage{5mm} +\begin{docTcbKey}{watermark zoom}{=\meta{fraction}}{no default, initially |0.75|} + Sets the zoom value for a watermark. The zoom respects the aspect ratio. + The value $1.0$ means to fill the whole box. +\begin{dispExample} +\tcbset{enhanced,colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries, + watermark text=Watermark,before=,after=,width=(\linewidth-2mm)/2} + +\begin{tcolorbox}[title=Zoom 1.00,watermark zoom=1.00] +\lipsum[2] +\end{tcolorbox}\hfill% +\begin{tcolorbox}[title=Zoom 0.50,watermark zoom=0.50] +\lipsum[2] +\end{tcolorbox}% +\end{dispExample} +\end{docTcbKey} + +\clearpage + +\begin{docTcbKey}{watermark stretch}{=\meta{fraction}}{no default, initially unset} + Sets the stretch value for a watermark. The stretch value is applied to width + and height in relation to the box dimensions. It does not respect the aspect ratio. + The value $1.0$ means to fill the whole box. +\begin{dispExample} +\tcbset{enhanced,colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries, + watermark graphics=Basilica_5.png,watermark opacity=0.15, + before=,after=,width=(\linewidth-2mm)/2} + +\begin{tcolorbox}[title=Stretch 1.00,watermark stretch=1.00] +\lipsum[2] +\end{tcolorbox}\hfill% +\begin{tcolorbox}[title=Stretch 0.50,watermark stretch=0.50] +\lipsum[2] +\end{tcolorbox}% +\end{dispExample} +\end{docTcbKey} + +\begin{docTcbKey}{watermark color}{=\meta{color}}{no default, initially mixed background and frame color} + Sets the color for the watermark. +\begin{dispExample} +\tcbset{colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries} + +\begin{tcolorbox}[enhanced,title=My title,watermark text=My Watermark, + watermark color=yellow!50!red] +\lipsum[1] +\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} + + + +\clearpage +\tcbset{skintable/.style={colframe=red!50!yellow!50!black, + colback=red!50!yellow!5!white,coltitle=red!50!yellow!3!white, + fonttitle=\bfseries,before=\par\smallskip, + title=Environment and engines for the skin '\texttt{#1}'}} + +\subsection{Skin 'standard'}\label{subsec:skinstandard} +\begin{marker}Note that the option keys \refKey{/tcb/frame style}, + \refKey{/tcb/interior style}, + \refKey{/tcb/segmentation style}, and + \refKey{/tcb/title style} are not be applicable to the standard skin. + Also, watermarks (see Subsection \ref{subsec:watermarks}) + are not usable with the standard skin. +\end{marker} + \begin{docSkin}{standard} This is the standard skin from the core package. All drawing engines are set to type |standard|. The drawing is based on |pgf| commands and does not need the |tikz| package. +\begin{tcolorbox}[skintable=standard] + \begin{tabbing} + \refKey{/tcb/interior titled engine}: \=\kill + \refKey{/tcb/graphical environment}: \> |pgfpicture|\\ + \refKey{/tcb/frame engine}: \> |standard|\\ + \refKey{/tcb/interior titled engine}: \> |standard|\\ + \refKey{/tcb/interior engine}: \> |standard|\\ + \refKey{/tcb/segmentation engine}: \> |standard|\\ + \refKey{/tcb/title engine}: \> |standard| + \end{tabbing} +\end{tcolorbox} \end{docSkin} +\begin{docTcbKey}{standard}{}{style, no value} + This is an abbreviation for setting |skin=standard|. +\end{docTcbKey} + +\begin{dispExample} +\tcbset{standard,equal height group=standard, + colback=LightGreen,colframe=DarkGreen,colbacklower=LimeGreen!75!LightGreen, + width=(\linewidth-6mm)/4,before=,after=, + left=1mm,right=1mm,top=1mm,bottom=1mm,middle=1mm} +% +\begin{tcolorbox} + This is my content. +\end{tcolorbox}\hfill +\begin{tcolorbox} + This is my content. + \tcblower + More content. +\end{tcolorbox}\hfill +\begin{tcolorbox}[adjusted title=My title] + This is my content. +\end{tcolorbox}\hfill +\begin{tcolorbox}[adjusted title=My title] + This is my content. + \tcblower + More content. +\end{tcolorbox} +\end{dispExample} + + +\clearpage +\subsection{Skin family 'enhanced'} +\begin{marker} +If you like the standard appearance of a |tcolorbox| but you want to +have some 'enhanced' features, the |enhanced| skin is what you are looking for. +\end{marker} -\subsection{Skin 'enhanced'} \begin{docSkin}{enhanced} This skin translates the drawing commands of the core package into |tikz| path commands. Therefore, it allows all |tikz| high level options for these paths and has more flexibility compared to the \refSkin{standard} skin. You pay for this with some prolonged compilation time. - All drawing engines are set to type |path|; they use the |tikz| package - and compute the \refKey{/tcb/geometry nodes}. The |tikz| path options can - be given with the following option keys. + be given with the option keys + \refKey{/tcb/frame style}, + \refKey{/tcb/interior style}, + \refKey{/tcb/segmentation style}, and + \refKey{/tcb/title style}. +\begin{tcolorbox}[skintable=enhanced] + \begin{tabbing} + \refKey{/tcb/interior titled engine}: \=\kill + \refKey{/tcb/graphical environment}: \> |tikzpicture|\\ + \refKey{/tcb/frame engine}: \> |path|\\ + \refKey{/tcb/interior titled engine}: \> |path|\\ + \refKey{/tcb/interior engine}: \> |path|\\ + \refKey{/tcb/segmentation engine}: \> |path|\\ + \refKey{/tcb/title engine}: \> |path| + \end{tabbing} +\end{tcolorbox} \end{docSkin} -\begin{docTcbKey}{frame style}{=\meta{\texttt{\upshape tikz} keys}}{style, no default} - The \meta{\texttt{\upshape tikz} keys} are used inside the |tikz| path command - for drawing the \emph{frame} of the box. -\end{docTcbKey} -\begin{docTcbKey}{interior style}{=\meta{\texttt{\upshape tikz} keys}}{style, no default} - The \meta{\texttt{\upshape tikz} keys} are used inside the |tikz| path command - for drawing the \emph{interior} of the box. They are used for the titled - and for the untitled version as well. +\begin{docTcbKey}{enhanced}{}{style, no value} + This is an abbreviation for setting |skin=enhanced|. \end{docTcbKey} -\begin{docTcbKey}{segmentation style}{=\meta{\texttt{\upshape tikz} keys}}{style, no default} - The \meta{\texttt{\upshape tikz} keys} are used inside the |tikz| path command - for drawing the \emph{segmentation} line of the box. -\end{docTcbKey} +\begin{dispExample} +\tcbset{enhanced,equal height group=enhanced, + colback=LightGreen,colframe=DarkGreen,colbacklower=LimeGreen!75!LightGreen, + width=(\linewidth-6mm)/4,before=,after=, + left=1mm,right=1mm,top=1mm,bottom=1mm,middle=1mm} +% +\begin{tcolorbox} + This is my content. +\end{tcolorbox}\hfill +\begin{tcolorbox} + This is my content. + \tcblower + More content. +\end{tcolorbox}\hfill +\begin{tcolorbox}[adjusted title=My title] + This is my content. +\end{tcolorbox}\hfill +\begin{tcolorbox}[adjusted title=My title] + This is my content. + \tcblower + More content. +\end{tcolorbox} +\end{dispExample} \begin{dispExample} -% needs shadings library +% \usetikzlibrary{shadings} % preamble \tcbset{skin=enhanced,fonttitle=\bfseries, frame style={upper left=blue,upper right=red,lower left=yellow,lower right=green}, interior style={white,opacity=0.5}, @@ -2283,7 +3207,8 @@ Every engine for the up to three steps can be set to one of three types: \begin{dispExample} -% needs shadows and decorations.pathmorphing library +% \usetikzlibrary{shadows} % preamble +% \usetikzlibrary{decorations.pathmorphing} % preamble \tcbset{skin=enhanced,fonttitle=\bfseries,boxrule=1mm, frame style={draw=FireBrick,fill=Salmon,drop shadow}, interior style={draw=FireBrick,top color=Salmon!10,bottom color=Salmon!20}, @@ -2300,6 +3225,153 @@ Of course, skins can be used for listings also. \clearpage +\begin{docSkin}{enhancedfirst} +This is a flavor of \refSkin{enhanced} which is used as a \emph{first} part +in a break sequence for \refSkin{enhanced}. +Nevertheless, this skin can be applied independently. +\begin{tcolorbox}[skintable=enhancedfirst] + \begin{tabbing} + \refKey{/tcb/interior titled engine}: \=\kill + \refKey{/tcb/graphical environment}: \> |tikzpicture|\\ + \refKey{/tcb/frame engine}: \> |pathfirst|\\ + \refKey{/tcb/interior titled engine}: \> |pathfirst|\\ + \refKey{/tcb/interior engine}: \> |pathfirst|\\ + \refKey{/tcb/segmentation engine}: \> |path|\\ + \refKey{/tcb/title engine}: \> |pathfirst| + \end{tabbing} +\end{tcolorbox} +\end{docSkin} + + +\begin{dispExample} +\tcbset{skin=enhancedfirst,equal height group=enhancedfirst, + colback=LightGreen,colframe=DarkGreen,colbacklower=LimeGreen!75!LightGreen, + width=(\linewidth-6mm)/4,before=,after=, + left=1mm,right=1mm,top=1mm,bottom=1mm,middle=1mm} +% +\begin{tcolorbox} + This is my content. +\end{tcolorbox}\hfill +\begin{tcolorbox} + This is my content. + \tcblower + More content. +\end{tcolorbox}\hfill +\begin{tcolorbox}[adjusted title=My title] + This is my content. +\end{tcolorbox}\hfill +\begin{tcolorbox}[adjusted title=My title] + This is my content. + \tcblower + More content. +\end{tcolorbox} +\end{dispExample} + + + +\clearpage +\begin{docSkin}{enhancedmiddle} +This is a flavor of \refSkin{enhanced} which is used as a \emph{middle} part +in a break sequence for \refSkin{enhanced}. +Nevertheless, this skin can be applied independently. +\begin{tcolorbox}[skintable=enhancedmiddle] + \begin{tabbing} + \refKey{/tcb/interior titled engine}: \=\kill + \refKey{/tcb/graphical environment}: \> |tikzpicture|\\ + \refKey{/tcb/frame engine}: \> |pathmiddle|\\ + \refKey{/tcb/interior titled engine}: \> |pathmiddle|\\ + \refKey{/tcb/interior engine}: \> |pathmiddle|\\ + \refKey{/tcb/segmentation engine}: \> |path|\\ + \refKey{/tcb/title engine}: \> |pathmiddle| + \end{tabbing} +\end{tcolorbox} +\end{docSkin} + + +\begin{dispExample} +\tcbset{skin=enhancedmiddle,equal height group=enhancedmiddle, + colback=LightGreen,colframe=DarkGreen,colbacklower=LimeGreen!75!LightGreen, + width=(\linewidth-6mm)/4,before=,after=, + left=1mm,right=1mm,top=1mm,bottom=1mm,middle=1mm} +% +\begin{tcolorbox} + This is my content. +\end{tcolorbox}\hfill +\begin{tcolorbox} + This is my content. + \tcblower + More content. +\end{tcolorbox}\hfill +\begin{tcolorbox}[adjusted title=My title] + This is my content. +\end{tcolorbox}\hfill +\begin{tcolorbox}[adjusted title=My title] + This is my content. + \tcblower + More content. +\end{tcolorbox} +\end{dispExample} + + +\begin{docTcbKey}{marker}{}{style, no value} + This styles relies on the skin \refSkin{enhancedmiddle}. It is + intended to be used as an optical marker like a highlighter pen. +\begin{dispExample} +\begin{marker} +\lipsum[2] +\end{marker} +\end{dispExample} +\end{docTcbKey} + + + + +\clearpage +\begin{docSkin}{enhancedlast} +This is a flavor of \refSkin{enhanced} which is used as a \emph{last} part +in a break sequence for \refSkin{enhanced}. +Nevertheless, this skin can be applied independently. +\begin{tcolorbox}[skintable=enhancedlast] + \begin{tabbing} + \refKey{/tcb/interior titled engine}: \=\kill + \refKey{/tcb/graphical environment}: \> |tikzpicture|\\ + \refKey{/tcb/frame engine}: \> |pathlast|\\ + \refKey{/tcb/interior titled engine}: \> |pathlast|\\ + \refKey{/tcb/interior engine}: \> |pathlast|\\ + \refKey{/tcb/segmentation engine}: \> |path|\\ + \refKey{/tcb/title engine}: \> |pathlast| + \end{tabbing} +\end{tcolorbox} +\end{docSkin} + +\begin{dispExample} +\tcbset{skin=enhancedlast,equal height group=enhancedlast, + colback=LightGreen,colframe=DarkGreen,colbacklower=LimeGreen!75!LightGreen, + width=(\linewidth-6mm)/4,before=,after=, + left=1mm,right=1mm,top=1mm,bottom=1mm,middle=1mm} +% +\begin{tcolorbox} + This is my content. +\end{tcolorbox}\hfill +\begin{tcolorbox} + This is my content. + \tcblower + More content. +\end{tcolorbox}\hfill +\begin{tcolorbox}[adjusted title=My title] + This is my content. +\end{tcolorbox}\hfill +\begin{tcolorbox}[adjusted title=My title] + This is my content. + \tcblower + More content. +\end{tcolorbox} +\end{dispExample} + + + + +\clearpage \subsection{Skin 'freelance'} \begin{docSkin}{freelance} This skin gives full freedom for the appearance of the |tcolorbox|. @@ -2310,29 +3382,48 @@ Of course, skins can be used for listings also. The drawing code can be given with the following option keys. As default value, the code from the |standard| skin is set. +\begin{tcolorbox}[skintable=freelance] + \begin{tabbing} + \refKey{/tcb/interior titled engine}: \=\kill + \refKey{/tcb/graphical environment}: \> |tikzpicture|\\ + \refKey{/tcb/frame engine}: \> |freelance|\\ + \refKey{/tcb/interior titled engine}: \> |freelance|\\ + \refKey{/tcb/interior engine}: \> |freelance|\\ + \refKey{/tcb/segmentation engine}: \> |freelance|\\ + \refKey{/tcb/title engine}: \> |freelance| + \end{tabbing} +\end{tcolorbox} \end{docSkin} - -\begin{docTcbKey}{frame code}{\colOpt{=\meta{graphical code}}}{code, default from |standard|} - The given \meta{graphical code} is used for drawing the \emph{frame} of the box. -\end{docTcbKey} - -\begin{docTcbKey}{interior titled code}{\colOpt{=\meta{graphical code}}}{code, default from |standard|} - The given \meta{graphical code} is used - for drawing the \emph{interior} of the box, if the box comes with a title. -\end{docTcbKey} - -\begin{docTcbKey}{interior code}{\colOpt{=\meta{graphical code}}}{code, default from |standard|} - The given \meta{graphical code} is used - for drawing the \emph{interior} of the box, if the box is without a title. -\end{docTcbKey} - -\begin{docTcbKey}{segmentation code}{\colOpt{=\meta{graphical code}}}{code, default from |standard|} - The given \meta{graphical code} is used for drawing the - \emph{segmentation} area of the box. +\begin{docTcbKey}{freelance}{}{style, no value} + This is an abbreviation for setting |skin=freelance|. \end{docTcbKey} +\begin{dispExample} +\tcbset{freelance,equal height group=freelance, + colback=LightGreen,colframe=DarkGreen,colbacklower=LimeGreen!75!LightGreen, + width=(\linewidth-6mm)/4,before=,after=, + left=1mm,right=1mm,top=1mm,bottom=1mm,middle=1mm} +% +\begin{tcolorbox} + This is my content. +\end{tcolorbox}\hfill +\begin{tcolorbox} + This is my content. + \tcblower + More content. +\end{tcolorbox}\hfill +\begin{tcolorbox}[adjusted title=My title] + This is my content. +\end{tcolorbox}\hfill +\begin{tcolorbox}[adjusted title=My title] + This is my content. + \tcblower + More content. +\end{tcolorbox} +\end{dispExample} +\clearpage \begin{dispExample} \tcbset{skin=freelance,boxrule=2mm,enlarge top by=2mm,enlarge bottom by=2mm, enlarge left by=3mm,enlarge right by=3mm,width=\linewidth-6mm, @@ -2356,11 +3447,22 @@ Of course, skins can be used for listings also. \end{dispExample} \clearpage -\subsection{Skin 'bicolor'} +\subsection{Skin family 'bicolor'} \begin{docSkin}{bicolor} This skin is quite similar to the \refSkin{standard} and \refSkin{enhanced} skin. But instead of a segmentation line, the optional lower part of the box is filled with a different color or drawn with a different style. +\begin{tcolorbox}[skintable=bicolor] + \begin{tabbing} + \refKey{/tcb/interior titled engine}: \=\kill + \refKey{/tcb/graphical environment}: \> |tikzpicture|\\ + \refKey{/tcb/frame engine}: \> |path|\\ + \refKey{/tcb/interior titled engine}: \> |freelance|\\ + \refKey{/tcb/interior engine}: \> |freelance|\\ + \refKey{/tcb/segmentation engine}: \> |freelance|\\ + \refKey{/tcb/title engine}: \> |path| + \end{tabbing} +\end{tcolorbox} \begin{itemize} \item The most basic usage of this skin is to set the background color of the lower part by \refKey{/tcb/colbacklower} and all other options like for @@ -2391,30 +3493,28 @@ Of course, skins can be used for listings also. \end{itemize} \end{docSkin} - -\begin{docTcbKey}{colbacklower}{=\meta{color}}{no default, initially \texttt{black!15!white}} - Sets the background \meta{color} of the lower part. It depends on the skin, - if this value is used. +\begin{docTcbKey}{bicolor}{}{style, no value} + This is an abbreviation for setting |skin=bicolor|. \end{docTcbKey} \begin{dispExample} -\tcbset{skin=bicolor,colback=LightGreen,colframe=DarkGreen, - colbacklower=LimeGreen!75!LightGreen, - width=(\linewidth-8mm)/4,before=,after=\hfill,equal height group=bicolg, +\tcbset{bicolor,equal height group=bicolor, + colback=LightGreen,colframe=DarkGreen,colbacklower=LimeGreen!75!LightGreen, + width=(\linewidth-6mm)/4,before=,after=, left=1mm,right=1mm,top=1mm,bottom=1mm,middle=1mm} - +% \begin{tcolorbox} This is my content. -\end{tcolorbox} +\end{tcolorbox}\hfill \begin{tcolorbox} This is my content. \tcblower More content. -\end{tcolorbox} +\end{tcolorbox}\hfill \begin{tcolorbox}[adjusted title=My title] This is my content. -\end{tcolorbox} +\end{tcolorbox}\hfill \begin{tcolorbox}[adjusted title=My title] This is my content. \tcblower @@ -2422,6 +3522,10 @@ Of course, skins can be used for listings also. \end{tcolorbox} \end{dispExample} +\begin{docTcbKey}{colbacklower}{=\meta{color}}{no default, initially \texttt{black!15!white}} + Sets the background \meta{color} of the lower part. It depends on the skin, + if this value is used. +\end{docTcbKey} \begin{dispExample} \tcbset{gitexample/.style={listing and comment,comment={#1}, @@ -2445,7 +3549,142 @@ git commit -am 'changes to my example' \clearpage -\subsection{Skin 'beamer'} + + +\begin{docSkin}{bicolorfirst} +This is a flavor of \refSkin{bicolor} which is used as a \emph{first} part +in a break sequence for \refSkin{bicolor}. +Nevertheless, this skin can be applied independently. +\begin{tcolorbox}[skintable=bicolorfirst] + \begin{tabbing} + \refKey{/tcb/interior titled engine}: \=\kill + \refKey{/tcb/graphical environment}: \> |tikzpicture|\\ + \refKey{/tcb/frame engine}: \> |pathfirst|\\ + \refKey{/tcb/interior titled engine}: \> |freelance|\\ + \refKey{/tcb/interior engine}: \> |freelance|\\ + \refKey{/tcb/segmentation engine}: \> |freelance|\\ + \refKey{/tcb/title engine}: \> |pathfirst| + \end{tabbing} +\end{tcolorbox} +\end{docSkin} + +\begin{dispExample} +\tcbset{skin=bicolorfirst,equal height group=bicolorfirst, + colback=LightGreen,colframe=DarkGreen,colbacklower=LimeGreen!75!LightGreen, + width=(\linewidth-6mm)/4,before=,after=, + left=1mm,right=1mm,top=1mm,bottom=1mm,middle=1mm} +% +\begin{tcolorbox} + This is my content. +\end{tcolorbox}\hfill +\begin{tcolorbox} + This is my content. + \tcblower + More content. +\end{tcolorbox}\hfill +\begin{tcolorbox}[adjusted title=My title] + This is my content. +\end{tcolorbox}\hfill +\begin{tcolorbox}[adjusted title=My title] + This is my content. + \tcblower + More content. +\end{tcolorbox} +\end{dispExample} + + +\clearpage +\begin{docSkin}{bicolormiddle} +This is a flavor of \refSkin{bicolor} which is used as a \emph{middle} part +in a break sequence for \refSkin{bicolor}. +Nevertheless, this skin can be applied independently. +\begin{tcolorbox}[skintable=bicolormiddle] + \begin{tabbing} + \refKey{/tcb/interior titled engine}: \=\kill + \refKey{/tcb/graphical environment}: \> |tikzpicture|\\ + \refKey{/tcb/frame engine}: \> |pathmiddle|\\ + \refKey{/tcb/interior titled engine}: \> |freelance|\\ + \refKey{/tcb/interior engine}: \> |freelance|\\ + \refKey{/tcb/segmentation engine}: \> |freelance|\\ + \refKey{/tcb/title engine}: \> |pathmiddle| + \end{tabbing} +\end{tcolorbox} +\end{docSkin} + + +\begin{dispExample} +\tcbset{skin=bicolormiddle,equal height group=bicolormiddle, + colback=LightGreen,colframe=DarkGreen,colbacklower=LimeGreen!75!LightGreen, + width=(\linewidth-6mm)/4,before=,after=, + left=1mm,right=1mm,top=1mm,bottom=1mm,middle=1mm} +% +\begin{tcolorbox} + This is my content. +\end{tcolorbox}\hfill +\begin{tcolorbox} + This is my content. + \tcblower + More content. +\end{tcolorbox}\hfill +\begin{tcolorbox}[adjusted title=My title] + This is my content. +\end{tcolorbox}\hfill +\begin{tcolorbox}[adjusted title=My title] + This is my content. + \tcblower + More content. +\end{tcolorbox} +\end{dispExample} + + +\clearpage +\begin{docSkin}{bicolorlast} +This is a flavor of \refSkin{bicolor} which is used as a \emph{last} part +in a break sequence for \refSkin{bicolor}. +Nevertheless, this skin can be applied independently. +\begin{tcolorbox}[skintable=bicolorlast] + \begin{tabbing} + \refKey{/tcb/interior titled engine}: \=\kill + \refKey{/tcb/graphical environment}: \> |tikzpicture|\\ + \refKey{/tcb/frame engine}: \> |pathlast|\\ + \refKey{/tcb/interior titled engine}: \> |freelance|\\ + \refKey{/tcb/interior engine}: \> |freelance|\\ + \refKey{/tcb/segmentation engine}: \> |freelance|\\ + \refKey{/tcb/title engine}: \> |pathlast| + \end{tabbing} +\end{tcolorbox} +\end{docSkin} + + +\begin{dispExample} +\tcbset{skin=bicolorlast,equal height group=bicolorlast, + colback=LightGreen,colframe=DarkGreen,colbacklower=LimeGreen!75!LightGreen, + width=(\linewidth-6mm)/4,before=,after=, + left=1mm,right=1mm,top=1mm,bottom=1mm,middle=1mm} +% +\begin{tcolorbox} + This is my content. +\end{tcolorbox}\hfill +\begin{tcolorbox} + This is my content. + \tcblower + More content. +\end{tcolorbox}\hfill +\begin{tcolorbox}[adjusted title=My title] + This is my content. +\end{tcolorbox}\hfill +\begin{tcolorbox}[adjusted title=My title] + This is my content. + \tcblower + More content. +\end{tcolorbox} +\end{dispExample} + + + +\clearpage +\subsection{Skin family 'beamer'} + \begin{docSkin}{beamer} This skin resembles boxes known from the |beamer| class and therefore is called 'beamer'. It uses the normal colors from the core package but shades @@ -2457,31 +3696,187 @@ git commit -am 'changes to my example' The appearance of the skin can be controlled by \refKey{/tcb/frame style} and \refKey{/tcb/interior style}, if needed. Here, the \emph{segmentation} cannot be controlled by a style. +\begin{tcolorbox}[skintable=beamer] + \begin{tabbing} + \refKey{/tcb/interior titled engine}: \=\kill + \refKey{/tcb/graphical environment}: \> |tikzpicture|\\ + \refKey{/tcb/frame engine}: \> |path|\\ + \refKey{/tcb/interior titled engine}: \> |freelance|\\ + \refKey{/tcb/interior engine}: \> |freelance|\\ + \refKey{/tcb/segmentation engine}: \> |freelance|\\ + \refKey{/tcb/title engine}: \> |path| + \end{tabbing} +\end{tcolorbox} \end{docSkin} + + +\begin{docTcbKey}{beamer}{}{style, no value} + This is an abbreviation for setting |skin=beamer|. + \begin{marker}It also changes the geometry and some style options.\end{marker} +\end{docTcbKey} + + + \begin{dispExample} -\begin{tcolorbox}[skin=beamer,colback=Salmon!50!white,colframe=FireBrick!75!black, +\tcbset{beamer,equal height group=beamer, + colback=LightGreen,colframe=DarkGreen,colbacklower=LimeGreen!75!LightGreen, + width=(\linewidth-6mm)/4,before=,after=, + left=1mm,right=1mm,top=1mm,bottom=1mm,middle=1mm} +% +\begin{tcolorbox} + This is my content. +\end{tcolorbox}\hfill +\begin{tcolorbox} + This is my content. + \tcblower + More content. +\end{tcolorbox}\hfill +\begin{tcolorbox}[adjusted title=My title] + This is my content. +\end{tcolorbox}\hfill +\begin{tcolorbox}[adjusted title=My title] + This is my content. + \tcblower + More content. +\end{tcolorbox} +\end{dispExample} + + + +\begin{dispExample} +\begin{tcolorbox}[beamer,colback=Salmon!50!white,colframe=FireBrick!75!black, adjusted title=A colored box with the 'beamer' skin] This box looks like a box provided by the \texttt{beamer} class. \end{tcolorbox} \end{dispExample} + + + +\begin{docSkin}{beamerfirst} +This is a flavor of \refSkin{beamer} which is used as a \emph{first} part +in a break sequence for \refSkin{beamer}. +Nevertheless, this skin can be applied independently. +\begin{tcolorbox}[skintable=beamerfirst] + \begin{tabbing} + \refKey{/tcb/interior titled engine}: \=\kill + \refKey{/tcb/graphical environment}: \> |tikzpicture|\\ + \refKey{/tcb/frame engine}: \> |pathfirst|\\ + \refKey{/tcb/interior titled engine}: \> |freelance|\\ + \refKey{/tcb/interior engine}: \> |freelance|\\ + \refKey{/tcb/segmentation engine}: \> |freelance|\\ + \refKey{/tcb/title engine}: \> |pathfirst| + \end{tabbing} +\end{tcolorbox} +\end{docSkin} + + \begin{dispExample} -\tcbset{skin=beamer,colback=LightGreen,colframe=DarkGreen, - width=(\linewidth-8mm)/4,before=,after=\hfill,equal height group=beamg, +\tcbset{beamer,skin=beamerfirst,equal height group=beamerfirst, + colback=LightGreen,colframe=DarkGreen,colbacklower=LimeGreen!75!LightGreen, + width=(\linewidth-6mm)/4,before=,after=, left=1mm,right=1mm,top=1mm,bottom=1mm,middle=1mm} - +% \begin{tcolorbox} This is my content. -\end{tcolorbox} +\end{tcolorbox}\hfill \begin{tcolorbox} This is my content. \tcblower More content. +\end{tcolorbox}\hfill +\begin{tcolorbox}[adjusted title=My title] + This is my content. +\end{tcolorbox}\hfill +\begin{tcolorbox}[adjusted title=My title] + This is my content. + \tcblower + More content. +\end{tcolorbox} +\end{dispExample} + + +\clearpage + +\begin{docSkin}{beamermiddle} +This is a flavor of \refSkin{beamer} which is used as a \emph{middle} part +in a break sequence for \refSkin{beamer}. +Nevertheless, this skin can be applied independently. +\begin{tcolorbox}[skintable=beamermiddle] + \begin{tabbing} + \refKey{/tcb/interior titled engine}: \=\kill + \refKey{/tcb/graphical environment}: \> |tikzpicture|\\ + \refKey{/tcb/frame engine}: \> |pathmiddle|\\ + \refKey{/tcb/interior titled engine}: \> |freelance|\\ + \refKey{/tcb/interior engine}: \> |freelance|\\ + \refKey{/tcb/segmentation engine}: \> |freelance|\\ + \refKey{/tcb/title engine}: \> |pathmiddle| + \end{tabbing} \end{tcolorbox} +\end{docSkin} + + +\begin{dispExample} +\tcbset{beamer,skin=beamermiddle,equal height group=beamermiddle, + colback=LightGreen,colframe=DarkGreen,colbacklower=LimeGreen!75!LightGreen, + width=(\linewidth-6mm)/4,before=,after=, + left=1mm,right=1mm,top=1mm,bottom=1mm,middle=1mm} +% +\begin{tcolorbox} + This is my content. +\end{tcolorbox}\hfill +\begin{tcolorbox} + This is my content. + \tcblower + More content. +\end{tcolorbox}\hfill +\begin{tcolorbox}[adjusted title=My title] + This is my content. +\end{tcolorbox}\hfill \begin{tcolorbox}[adjusted title=My title] This is my content. + \tcblower + More content. +\end{tcolorbox} +\end{dispExample} + + +\clearpage +\begin{docSkin}{beamerlast} +This is a flavor of \refSkin{beamer} which is used as a \emph{last} part +in a break sequence for \refSkin{beamer}. +Nevertheless, this skin can be applied independently. +\begin{tcolorbox}[skintable=beamerlast] + \begin{tabbing} + \refKey{/tcb/interior titled engine}: \=\kill + \refKey{/tcb/graphical environment}: \> |tikzpicture|\\ + \refKey{/tcb/frame engine}: \> |pathlast|\\ + \refKey{/tcb/interior titled engine}: \> |freelance|\\ + \refKey{/tcb/interior engine}: \> |freelance|\\ + \refKey{/tcb/segmentation engine}: \> |freelance|\\ + \refKey{/tcb/title engine}: \> |pathlast| + \end{tabbing} \end{tcolorbox} +\end{docSkin} + +\begin{dispExample} +\tcbset{beamer,skin=beamerlast,equal height group=beamerlast, + colback=LightGreen,colframe=DarkGreen,colbacklower=LimeGreen!75!LightGreen, + width=(\linewidth-6mm)/4,before=,after=, + left=1mm,right=1mm,top=1mm,bottom=1mm,middle=1mm} +% +\begin{tcolorbox} + This is my content. +\end{tcolorbox}\hfill +\begin{tcolorbox} + This is my content. + \tcblower + More content. +\end{tcolorbox}\hfill +\begin{tcolorbox}[adjusted title=My title] + This is my content. +\end{tcolorbox}\hfill \begin{tcolorbox}[adjusted title=My title] This is my content. \tcblower @@ -2490,8 +3885,9 @@ This box looks like a box provided by the \texttt{beamer} class. \end{dispExample} + \clearpage -\subsection{Skin 'widget'} +\subsection{Skin family 'widget'} \begin{docSkin}{widget} This skin uses the normal colors from the core package but shades them a little bit. To use this skin, the |tikz| library |shadings| @@ -2502,31 +3898,232 @@ This box looks like a box provided by the \texttt{beamer} class. The appearance of the skin can be controlled by \refKey{/tcb/frame style}, \refKey{/tcb/interior style}, and \refKey{/tcb/segmentation style}, if needed. +\begin{tcolorbox}[skintable=widget] + \begin{tabbing} + \refKey{/tcb/interior titled engine}: \=\kill + \refKey{/tcb/graphical environment}: \> |tikzpicture|\\ + \refKey{/tcb/frame engine}: \> |path|\\ + \refKey{/tcb/interior titled engine}: \> |path|\\ + \refKey{/tcb/interior engine}: \> |path|\\ + \refKey{/tcb/segmentation engine}: \> |freelance|\\ + \refKey{/tcb/title engine}: \> |freelance| + \end{tabbing} +\end{tcolorbox} \end{docSkin} + +\begin{docTcbKey}{widget}{}{style, no value} + This is an abbreviation for setting |skin=widget|. + \begin{marker}It also changes the geometry and some style options.\end{marker} +\end{docTcbKey} + + \begin{dispExample} -\begin{tcolorbox}[skin=widget,colback=Salmon!50!white,colframe=FireBrick!75!black, +\tcbset{widget,equal height group=widget, + colback=LightGreen,colframe=DarkGreen,colbacklower=LimeGreen!75!LightGreen, + width=(\linewidth-6mm)/4,before=,after=, + left=1mm,right=1mm,top=1mm,bottom=1mm,middle=1mm} +% +\begin{tcolorbox} + This is my content. +\end{tcolorbox}\hfill +\begin{tcolorbox} + This is my content. + \tcblower + More content. +\end{tcolorbox}\hfill +\begin{tcolorbox}[adjusted title=My title] + This is my content. +\end{tcolorbox}\hfill +\begin{tcolorbox}[adjusted title=My title] + This is my content. + \tcblower + More content. +\end{tcolorbox} +\end{dispExample} + + +\begin{dispExample} +\begin{tcolorbox}[widget,colback=Salmon!50!white,colframe=FireBrick!75!black, adjusted title=A colored box with the 'widget' skin] This is my content. \end{tcolorbox} \end{dispExample} + + +\begin{docSkin}{widgetfirst} +This is a flavor of \refSkin{widget} which is used as a \emph{first} part +in a break sequence for \refSkin{widget}. +Nevertheless, this skin can be applied independently. +\begin{tcolorbox}[skintable=widgetfirst] + \begin{tabbing} + \refKey{/tcb/interior titled engine}: \=\kill + \refKey{/tcb/graphical environment}: \> |tikzpicture|\\ + \refKey{/tcb/frame engine}: \> |pathfirst|\\ + \refKey{/tcb/interior titled engine}: \> |pathfirst|\\ + \refKey{/tcb/interior engine}: \> |pathfirst|\\ + \refKey{/tcb/segmentation engine}: \> |freelance|\\ + \refKey{/tcb/title engine}: \> |freelance| + \end{tabbing} +\end{tcolorbox} +\end{docSkin} + + \begin{dispExample} -\tcbset{skin=widget,colback=LightGreen,colframe=DarkGreen, - width=(\linewidth-8mm)/4,before=,after=\hfill,equal height group=widg, +\tcbset{widget,skin=widgetfirst,equal height group=widgetfirst, + colback=LightGreen,colframe=DarkGreen,colbacklower=LimeGreen!75!LightGreen, + width=(\linewidth-6mm)/4,before=,after=, left=1mm,right=1mm,top=1mm,bottom=1mm,middle=1mm} - +% +\begin{tcolorbox} + This is my content. +\end{tcolorbox}\hfill \begin{tcolorbox} This is my content. + \tcblower + More content. +\end{tcolorbox}\hfill +\begin{tcolorbox}[adjusted title=My title] + This is my content. +\end{tcolorbox}\hfill +\begin{tcolorbox}[adjusted title=My title] + This is my content. + \tcblower + More content. \end{tcolorbox} +\end{dispExample} + +\clearpage + +\begin{docSkin}{widgetmiddle} +This is a flavor of \refSkin{widget} which is used as a \emph{middle} part +in a break sequence for \refSkin{widget}. +Nevertheless, this skin can be applied independently. +\begin{tcolorbox}[skintable=widgetmiddle] + \begin{tabbing} + \refKey{/tcb/interior titled engine}: \=\kill + \refKey{/tcb/graphical environment}: \> |tikzpicture|\\ + \refKey{/tcb/frame engine}: \> |pathmiddle|\\ + \refKey{/tcb/interior titled engine}: \> |pathmiddle|\\ + \refKey{/tcb/interior engine}: \> |pathmiddle|\\ + \refKey{/tcb/segmentation engine}: \> |freelance|\\ + \refKey{/tcb/title engine}: \> |freelance| + \end{tabbing} +\end{tcolorbox} +\end{docSkin} + +\begin{dispExample} +\tcbset{widget,skin=widgetmiddle,equal height group=widgetmiddle, + colback=LightGreen,colframe=DarkGreen,colbacklower=LimeGreen!75!LightGreen, + width=(\linewidth-6mm)/4,before=,after=, + left=1mm,right=1mm,top=1mm,bottom=1mm,middle=1mm} +% +\begin{tcolorbox} + This is my content. +\end{tcolorbox}\hfill \begin{tcolorbox} This is my content. \tcblower More content. +\end{tcolorbox}\hfill +\begin{tcolorbox}[adjusted title=My title] + This is my content. +\end{tcolorbox}\hfill +\begin{tcolorbox}[adjusted title=My title] + This is my content. + \tcblower + More content. \end{tcolorbox} +\end{dispExample} + + +\clearpage +\begin{docSkin}{widgetlast} +This is a flavor of \refSkin{widget} which is used as a \emph{last} part +in a break sequence for \refSkin{widget}. +Nevertheless, this skin can be applied independently. +\begin{tcolorbox}[skintable=widgetlast] + \begin{tabbing} + \refKey{/tcb/interior titled engine}: \=\kill + \refKey{/tcb/graphical environment}: \> |tikzpicture|\\ + \refKey{/tcb/frame engine}: \> |pathlast|\\ + \refKey{/tcb/interior titled engine}: \> |pathlast|\\ + \refKey{/tcb/interior engine}: \> |pathlast|\\ + \refKey{/tcb/segmentation engine}: \> |freelance|\\ + \refKey{/tcb/title engine}: \> |freelance| + \end{tabbing} +\end{tcolorbox} +\end{docSkin} + + +\begin{dispExample} +\tcbset{widget,skin=widgetlast,equal height group=widgetlast, + colback=LightGreen,colframe=DarkGreen,colbacklower=LimeGreen!75!LightGreen, + width=(\linewidth-6mm)/4,before=,after=, + left=1mm,right=1mm,top=1mm,bottom=1mm,middle=1mm} +% +\begin{tcolorbox} + This is my content. +\end{tcolorbox}\hfill +\begin{tcolorbox} + This is my content. + \tcblower + More content. +\end{tcolorbox}\hfill +\begin{tcolorbox}[adjusted title=My title] + This is my content. +\end{tcolorbox}\hfill \begin{tcolorbox}[adjusted title=My title] This is my content. + \tcblower + More content. +\end{tcolorbox} +\end{dispExample} + + +\clearpage + +\subsection{Skin 'draft'}\label{subsec:draft} + +\begin{docSkin}{draft} + This skin is intended to be used while drafting new geometric settings + for a |tcolorbox|. +\begin{tcolorbox}[skintable=draft] + \begin{tabbing} + \refKey{/tcb/interior titled engine}: \=\kill + \refKey{/tcb/graphical environment}: \> |tikzpicture|\\ + \refKey{/tcb/frame engine}: \> |freelance|\\ + \refKey{/tcb/interior titled engine}: \> |freelance|\\ + \refKey{/tcb/interior engine}: \> |freelance|\\ + \refKey{/tcb/segmentation engine}: \> |path|\\ + \refKey{/tcb/title engine}: \> |path| + \end{tabbing} \end{tcolorbox} +\end{docSkin} + +\begin{docTcbKey}{draft}{}{style, no value} + This is an abbreviation for setting |skin=draft|. +\end{docTcbKey} + + +\begin{dispExample} +\tcbset{draft,equal height group=draft, + colback=LightGreen,colframe=DarkGreen,colbacklower=LimeGreen!75!LightGreen, + width=(\linewidth-6mm)/4,before=,after=, + left=1mm,right=1mm,top=1mm,bottom=1mm,middle=1mm} +% +\begin{tcolorbox} + This is my content. +\end{tcolorbox}\hfill +\begin{tcolorbox} + This is my content. + \tcblower + More content. +\end{tcolorbox}\hfill +\begin{tcolorbox}[adjusted title=My title] + This is my content. +\end{tcolorbox}\hfill \begin{tcolorbox}[adjusted title=My title] This is my content. \tcblower @@ -2535,6 +4132,256 @@ This is my content. \end{dispExample} +\begin{dispExample} +\vspace*{3mm} +\begin{tcolorbox}[draft,title=A colored box with the 'draft' skin] +\lipsum[1-3] +\tcblower +\lipsum[4-6] +\end{tcolorbox} +\end{dispExample} + + +\clearpage +\section{Library 'breakable'}\label{sec:breakable} +The library is loaded by a package option or inside the preamble by: +\begin{dispListing} +\tcbuselibrary{breakable} +\end{dispListing} + +\subsection{Technical Overview} +The library 'breakable' supports the automatic breaking of a |tcolorbox|. +This feature is enabled by \refKey{/tcb/breakable} +and disabled by \refKey{/tcb/unbreakable}. + +{ +\tcbset{colframe=Navy,colback=AliceBlue,fonttitle=\bfseries, + watermark color=AliceBlue!85!Navy,enhanced} +If a |tcolorbox| is set to be \refKey{/tcb/breakable}, then the following +algorithm is executed: +\begin{enumerate} +\item The box content is read to a box register similar but not identical + to the unbreakable case. +\item If the total box fits into the current page, it is shipped out visibly + unbroken and the algorithm stops. + \begin{tcolorbox}[title=Unbroken Box,watermark text=unbroken] + The box. + \end{tcolorbox} +\item Otherwise, it is checked if at least \refKey{/tcb/lines before break} + of the upper box can be placed on the current page. + If not, a page break is inserted and the algorithm goes back to Step 2. +\item Now, the \emph{break sequence} starts. + The upper box part or the lower box part is split such that it fits + into the current page. The fitting part is named \emph{first part} of + the \emph{break sequence} and shipped out. + \begin{tcolorbox}[title=Broken Box,watermark text=first,skin=enhancedfirst] + The box. + \end{tcolorbox} +\item + If the remaining content of the total box + fits into the current page, the algorithm continues with Step 7, else + with Step 6. +\item + The upper box part or the lower box part is split such that it fits + into the current page. The fitting part is named \emph{middle part} of + the \emph{break sequence} and shipped out. + Then, the algorithm goes back to Step 5. + \begin{tcolorbox}[watermark text=middle,skin=enhancedmiddle] + The box. + \end{tcolorbox} +\item + The remaining part is named \emph{last part} of + the \emph{break sequence} and shipped out. The algorithm stops. + \begin{tcolorbox}[watermark text=last,skin=enhancedlast] + The box. + \end{tcolorbox} +\end{enumerate} +} + +The algorithm takes care that the optional segmentation line never appears at +the end of a box. The optional lower box part is also checked to +have at least \refKey{/tcb/lines before break}. + +\clearpage +In principal, all boxes of the \emph{break sequence} share the same geometric +parameters. The differences are: +\begin{itemize} +\item The given \refKey{/tcb/before} and \refKey{/tcb/after} values are + used only before the \emph{first} and after the \emph{last} part + of the \emph{break sequence}. +\item A special behavior between the parts of the \emph{break sequence} can + be given by \refKey{/tcb/toprule at break}, + \refKey{/tcb/bottomrule at break}, + \refKey{/tcb/enlarge top at break by}, and + \refKey{/tcb/enlarge bottom at break by}. +\item The \refKey{/tcb/skin} decides \emph{how} the \emph{first}, \emph{middle}, + and \emph{last} part look like. Actually, every part type has its own + skin given by the options \refKey{/tcb/skin first}, \refKey{/tcb/skin middle}, and + \refKey{/tcb/skin last}. Typically, these options are set automatically by + the main skin, see Subsection \ref{subsec:breaksequence} from + page \pageref{subsec:breaksequence}. +\end{itemize} + + +\subsection{Limitations and Known Bugs} +\begin{itemize} +\item The box content is a \TeX\ |\vbox| register which has a + restricted capacity. Therefore, you cannot place hundreds of pages + inside a |tcolorbox|. +\item Footnotes can be used inside an \refKey{/tcb/unbreakable} box + but not inside a \refKey{/tcb/breakable} box, even if it is not broken + actually. Other different behaviors may and will be effective. +\item You can nest an unbreakable |tcolorbox| inside another |tcolorbox|, + even inside a breakable one. But you should not nest a breakable box + inside a breakable box since this will give a mess. Inside a breakable box, + the further breaking is disabled by default. If you really want to or + have to use the keys \refKey{/tcb/breakable} or \refKey{/tcb/unbreakable} + inside the content of an outer |tcolorbox|, you have to guard this with a + \TeX\ group. +\item If your text content contains some text color changing commands, + your color will not survive the break to the next box\footnote{The reason is that + I am to dumb to catch the current color at the split point. If you know the trick, + let me know.}. +\end{itemize} + + +\clearpage +\subsection{Option Keys} +\begin{docTcbKey}{breakable}{}{no value} + Allows the |tcolorbox| to be breakable. If the box is larger than the + available space at the current page, the box is automatically broken + and continued to the next next page. All sorts of |tcolorbox| can be made + breakable. It depends on the skin how the breaking looks like. + If you do not know better, use \refKey{/tcb/enhanced} for breaking a box. + The parts of the \emph{break sequence} are numbered + by the counter |tcbbreakpart|. + \begin{dispListing} + % \usepackage{lipsum} % preamble + \tcbset{colback=red!5!white,colframe=red!75!black, + watermark color=yellow!25!white,watermark text=\arabic{tcbbreakpart}, + fonttitle=\bfseries} + + \begin{tcolorbox}[breakable,enhanced,title=My breakable box] + \lipsum[1-6] + \end{tcolorbox} + \end{dispListing} +\end{docTcbKey} +{\tcbusetemp} + + +\begin{docTcbKey}{unbreakable}{}{no value, initially set} + Sets the |tcolorbox| to be unbreakable. +\end{docTcbKey} + + +\begin{docTcbKey}{title after break}{=\meta{text}}{no default, initially empty} + The \refKey{/tcb/title} is used only for the \emph{first} part of a + \emph{break sequence}. Use |title after break| to create a heading line + with \meta{text} as content for all following parts. +\end{docTcbKey} + + +\begin{docTcbKey}{notitle after break}{}{no value, initially set} + Removes the title line or following parts in a \emph{break sequence} if set before. +\end{docTcbKey} + + +\begin{docTcbKey}{adjusted title after break}{=\meta{text}}{style, no default, initially unset} + Works like \refKey{/tcb/adjusted title} but applied to \refKey{/tcb/title after break}. +\end{docTcbKey} + + +\begin{docTcbKey}{lines before break}{=\meta{number}}{no default, initially |2|} + Assures that the given \meta{number} of lines of the upper box part or + the lower box part are placed before a break happens. +\end{docTcbKey} + + + +\begin{docTcbKey}{shrink break goal}{=\meta{length}}{no default, initially |0pt|} + This is an emergency parameter if the break algorithm produces unpleasant + breaks. It shrinks the goal height of the current box part by \meta{length} + which may result in smaller boxes. Never use negative values. +\end{docTcbKey} + + + + +\clearpage +\subsection{Break Sequence for the Skins}\label{subsec:breaksequence} +The following diagrams document the \emph{break sequence} for different +skins. Depending on the main skin of a |tcolorbox|, the actual skins of +the \emph{break sequence} parts are displayed. + +\def\tcbbreakskininto#1#2#3#4#5{% +\begin{center}\begin{tikzpicture} +\tcbset{width=5cm,colframe=Navy,colback=AliceBlue,fonttitle=\bfseries, + watermark color=AliceBlue!85!Navy,#5 + } +\node[above] (unbroken) at (0,0) {\begin{tcolorbox}[title=Unbroken Box,skin=#1,watermark text=unbroken,height=3.8cm] +\texttt{skin=#1} +\end{tcolorbox}}; +\node[above] (first) at (8,2.4) {\begin{tcolorbox}[title=Broken Boxes,skin=#2,watermark text=first,height=1.4cm] +\texttt{skin=#2} +\end{tcolorbox}}; +\node[above] (middle) at (8,1.2) {\begin{tcolorbox}[skin=#3,watermark text=middle,height=1cm] +\texttt{skin=#3} +\end{tcolorbox}}; +\node[above] (last) at (8,0) {\begin{tcolorbox}[skin=#4,watermark text=last,height=1cm] +\texttt{skin=#4} +\end{tcolorbox}}; +\path[draw=FireBrick,line width=2pt,->] (unbroken) edge (first.west) edge (middle.west) edge (last.west); +\end{tikzpicture}\end{center}} + +\tcbbreakskininto{standard}{standard}{standard}{standard}{watermark text/.style={}} +\tcbbreakskininto{enhanced}{enhancedfirst}{enhancedmiddle}{enhancedlast}{} +\tcbbreakskininto{enhancedfirst}{enhancedfirst}{enhancedmiddle}{enhancedmiddle}{} +\tcbbreakskininto{enhancedmiddle}{enhancedmiddle}{enhancedmiddle}{enhancedmiddle}{} +\tcbbreakskininto{enhancedlast}{enhancedmiddle}{enhancedmiddle}{enhancedlast}{} +\tcbbreakskininto{freelance}{freelance}{freelance}{freelance}{} +\tcbbreakskininto{bicolor}{bicolorfirst}{bicolormiddle}{bicolorlast}{bicolor} +\tcbbreakskininto{bicolorfirst}{bicolorfirst}{bicolormiddle}{bicolormiddle}{bicolor} +\tcbbreakskininto{bicolormiddle}{bicolormiddle}{bicolormiddle}{bicolormiddle}{bicolor} +\tcbbreakskininto{bicolorlast}{bicolormiddle}{bicolormiddle}{bicolorlast}{bicolor} +\tcbbreakskininto{beamer}{beamerfirst}{beamermiddle}{beamerlast}{beamer} +\tcbbreakskininto{beamerfirst}{beamerfirst}{beamermiddle}{beamermiddle}{beamer} +\tcbbreakskininto{beamermiddle}{beamermiddle}{beamermiddle}{beamermiddle}{beamer} +\tcbbreakskininto{beamerlast}{beamermiddle}{beamermiddle}{beamerlast}{beamer} +\clearpage +\tcbbreakskininto{widget}{widgetfirst}{widgetmiddle}{widgetlast}{widget} +\tcbbreakskininto{widgetfirst}{widgetfirst}{widgetmiddle}{widgetmiddle}{widget} +\tcbbreakskininto{widgetmiddle}{widgetmiddle}{widgetmiddle}{widgetmiddle}{widget} +\tcbbreakskininto{widgetlast}{widgetmiddle}{widgetmiddle}{widgetlast}{widget} +\tcbbreakskininto{draft}{draft}{draft}{draft}{draft} + + +\clearpage +\subsection{Break by Hand (Faked Break)} +Since the appearance of broken boxes is done by skins, it is quite easy +to 'fake a break'. For this, you actually don't need the 'breakable' library at +all. + +\begin{dispExample} +\tcbset{enhanced,equal height group=fakedbreak, + colback=LightGreen,colframe=DarkGreen,colbacklower=LimeGreen!75!LightGreen, + width=(\linewidth-6mm)/3,before=,after=, + left=1mm,right=1mm,top=1mm,bottom=1mm,middle=1mm} +% +\begin{tcolorbox}[title=My broken box,skin=enhancedfirst] +This is a box which breaks from one column to another +\end{tcolorbox}\hfill +\begin{tcolorbox}[skin=enhancedmiddle] +column. I am sorry to say that this is a trick. +Nevertheless, you may use this trick for your +\end{tcolorbox}\hfill +\begin{tcolorbox}[skin=enhancedlast] +own purposes. +\end{tcolorbox} +\end{dispExample} + + + + % Actually, it is not a good idea to include the references like this! % Do not follow this bad example ... \begin{tcbverbatimwrite}{\jobname.bib} @@ -2561,7 +4408,7 @@ This is my content. type = {Vorlesungs-Skriptum}, institution = {Universit{\"a}t der Bundeswehr M{\"u}nchen}, address = {Neubiberg}, - url = {http://www.unibw.de/bw/Fakultat/we2/Sturm}, + url = {http://www.unibw.de/bw/sturm}, year = 2007, language = {german} } @@ -2572,7 +4419,7 @@ This is my content. type = {Vorlesungs-Skriptum}, institution = {Universit{\"a}t der Bundeswehr M{\"u}nchen}, address = {Neubiberg}, - url = {http://www.unibw.de/bw/Fakultat/we2/Sturm}, + url = {http://www.unibw.de/bw/sturm}, year = 2008, language = {german} } @@ -2583,21 +4430,20 @@ This is my content. type = {Vorlesungs-Skriptum}, institution = {Universit{\"a}t der Bundeswehr M{\"u}nchen}, address = {Neubiberg}, - url = {http://www.unibw.de/bw/Fakultat/we2/Sturm}, + url = {http://www.unibw.de/bw/sturm}, year = 2010, language = {german} } -@book{sturm:2011b, +@book{sturm:2012k, author = {Thomas F. Sturm}, - title = {\LaTeX\ -- Einf{\"u}hrung in das Textsatzsystem}, - publisher = {Regionales Rechenzentrum f{\"u}r Niedersachsen (RRZN)}, + title = {\LaTeX\ -- Einführung in das Textsatzsystem}, + publisher = {Regionales Rechenzentrum für Niedersachsen (RRZN)}, address = {Hannover}, - edition = 8, - series = {RRZN-Handb{\"u}cher}, - url = {http://www.rrzn.uni-hannover.de/buecher.html}, - month = sep, - year = 2011, + edition = 9, + series = {RRZN-Handb\"ucher}, + url = {http://www.rrzn.uni-hannover.de/buch.html?&titel=latex}, + date = {2012-05}, language = {german} } @@ -2633,6 +4479,14 @@ This is my content. date = {2011-06-30} } +@manual{breitenlohner:1998a, + author = {Peter Breitenlohner}, + title = {The $\varepsilon$-\TeX\ manual}, + version = {2}, + url = {http://ftp.gwdg.de/pub/ctan/systems/e-tex/v2/doc/etex_man.pdf}, + date = {1998-02}, +} + \end{tcbverbatimwrite} \clearpage |