diff options
Diffstat (limited to 'Master/texmf-dist/doc/latex')
-rw-r--r-- | Master/texmf-dist/doc/latex/tcolorbox/CHANGES | 100 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/tcolorbox/README | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/tcolorbox/tcolorbox-example.pdf | bin | 105717 -> 105717 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/tcolorbox/tcolorbox-example.tex | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.pdf | bin | 863324 -> 954804 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.tex | 667 |
6 files changed, 620 insertions, 151 deletions
diff --git a/Master/texmf-dist/doc/latex/tcolorbox/CHANGES b/Master/texmf-dist/doc/latex/tcolorbox/CHANGES index 7234ad1cd4f..8095deda740 100644 --- a/Master/texmf-dist/doc/latex/tcolorbox/CHANGES +++ b/Master/texmf-dist/doc/latex/tcolorbox/CHANGES @@ -1,38 +1,62 @@ -%% The LaTeX package tcolorbox - version 1.10 (2012/03/01) -%% -%% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2006-2012 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> -%% ------------------------------------------------------------------------------------------- -%% -%% This work may be distributed and/or modified under the -%% conditions of the LaTeX Project Public License, either version 1.3 -%% of this license or (at your option) any later version. -%% The latest version of this license is in -%% http://www.latex-project.org/lppl.txt -%% and version 1.3 or later is part of all distributions of LaTeX -%% version 2005/12/01 or later. -%% -%% This work has the LPPL maintenance status `author-maintained'. -%% -%% This work consists of all files listed in README -%% - -(2006-2011): pre publication usage - -version 1.00 (2011/12/08): initial public release - -version 1.01 (2012/01/26): -- dates amended to \RequirePackage(s) -- provision of the tcolorbox.tds.zip file for easier installation - -version 1.02 (2012/02/15) -- documentation language changed from German to English -- small correction of the theorem title line appearance - -version 1.10 (2012/03/01) -- tcblatex style for listings changed (nolol added) -- improved hyperref support -- new keys parskip and noparskip -- source code of the documentation added -- new library 'documentation' to support LaTeX documentations - with several library commands, environments and keys (see documentation) +%% The LaTeX package tcolorbox - version 1.20 (2012/03/16)
+%%
+%% -------------------------------------------------------------------------------------------
+%% Copyright (c) 2006-2012 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
+%% -------------------------------------------------------------------------------------------
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This work has the LPPL maintenance status `author-maintained'.
+%%
+%% This work consists of all files listed in README
+%%
+
+(2006-2011): pre publication usage
+
+version 1.00 (2011/12/08): initial public release
+
+version 1.01 (2012/01/26):
+- dates amended to \RequirePackage(s)
+- provision of the tcolorbox.tds.zip file for easier installation
+
+version 1.02 (2012/02/15)
+- documentation language changed from German to English
+- small correction of the theorem title line appearance
+
+version 1.10 (2012/03/01)
+- tcblatex style for listings changed (nolol added)
+- improved hyperref support
+- new keys parskip and noparskip
+- source code of the documentation added
+- new library 'documentation' to support LaTeX documentations
+ with several library commands, environments and keys (see documentation)
+
+version 1.20 (2012/03/16)
+- new geometry keys:
+ 'lefttitle', 'leftupper', 'leftlower', 'righttitle', 'rightupper', 'rightlower'
+ and implementation changed for 'left' and 'right'
+- implementation for tcolorbox changed (adaption to height options)
+- new fixed height option keys:
+ 'natural height', 'height', 'equal height group', 'minimum for equal height group',
+ 'space', 'space to upper', 'space to lower', 'space to both', 'split',
+ 'valign', 'valign lower',
+ 'adjusted title'
+- new bounding box option keys:
+ 'enlarge top by', 'enlarge bottom by', 'enlarge left by', 'enlarge right by',
+ 'toggle enlargement'
+- preparations for a future skin changing option implemented
+- commands \brackets and \docAuxCommand added to the documentation library
+- documentation rearranged
+
+
+
+
+
+
+
diff --git a/Master/texmf-dist/doc/latex/tcolorbox/README b/Master/texmf-dist/doc/latex/tcolorbox/README index 6a1e6fbd554..45a946f6263 100644 --- a/Master/texmf-dist/doc/latex/tcolorbox/README +++ b/Master/texmf-dist/doc/latex/tcolorbox/README @@ -1,4 +1,4 @@ -%% The LaTeX package tcolorbox - version 1.10 (2012/03/01) +%% The LaTeX package tcolorbox - version 1.20 (2012/03/16) %% %% ------------------------------------------------------------------------------------------- %% Copyright (c) 2006-2012 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> 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 6edcd6357b0..d78b510d6e7 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 5775b6c380a..74d6ea386f2 100644 --- a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox-example.tex +++ b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox-example.tex @@ -1,4 +1,4 @@ -%% The LaTeX package tcolorbox - version 1.10 (2012/03/01) +%% The LaTeX package tcolorbox - version 1.20 (2012/03/16) %% tcolorbox-example.tex: an example for tcolorbox %% %% ------------------------------------------------------------------------------------------- diff --git a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.pdf b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.pdf Binary files differindex 134ac11c8ee..9773d5d2c43 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 b7d5422cb86..78d4e5f5bc6 100644 --- a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.tex +++ b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.tex @@ -1,5 +1,5 @@ % \LaTeX-Main\ -%% The LaTeX package tcolorbox - version 1.10 (2012/03/01) +%% The LaTeX package tcolorbox - version 1.20 (2012/03/16) %% tcolorbox.tex: Manual %% %% ------------------------------------------------------------------------------------------- @@ -63,8 +63,8 @@ pdfkeywords={colored boxes, LaTeX examples, theorems} } -\def\version{1.10}% -\def\datum{2012/03/01}% +\def\version{1.20}% +\def\datum{2012/03/16}% \makeindex %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -162,7 +162,6 @@ The following keys are used inside |\tcbuselibrary| respectively \clearpage \section{Macros for Box Creation} -\subsection{The tcolorbox Environment} \begin{docEnvironment}{tcolorbox}{\oarg{options}} This is the main environment to create an accentuated colored text box with rounded corners and, optionally, two parts. The appearance of this box @@ -219,7 +218,6 @@ Here, you see the lower part of the box. the optional lower box part. \end{docCommand} -\enlargethispage*{1cm} \begin{docCommand}{tcbset}{\marg{options}} Sets options for every following \refEnv{tcolorbox} inside the current \TeX\ group. @@ -231,13 +229,15 @@ Here, you see the lower part of the box. \clearpage -\subsection{Option Keys}\label{sec:optkeys} +\section{Option Keys}\label{sec:optkeys} 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 starting from page \pageref{sec:latextutorial}. + +\subsection{Title} \begin{docTcbKey}{title}{=\meta{text}}{no default, initially empty} Creates a heading line with \meta{text} as content. \begin{dispExample} @@ -251,83 +251,157 @@ This is a \textbf{tcolorbox}. Removes the title line if set before. \end{docTcbKey} -\begin{docTcbKey}{width}{=\meta{length}}{no default, initially \cs{linewidth}} - Sets the total width of the colored box to \meta{length}. + +\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 + 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} -\begin{tcolorbox}[width=\linewidth/2] +\tcbset{colback=White,arc=0mm,width=(\linewidth-4pt)/4, +equal height group=AT,before=,after=\hfill,fonttitle=\bfseries} + +The following titles are not adjusted:\\ +\foreach \n in {xxx,ggg,AAA,\"Agypten} +{\begin{tcolorbox}[title=\n,colframe=red!75!black] + Some content.\end{tcolorbox}} +Now, we try again with adjusted titles:\\ +\foreach \n in {xxx,ggg,AAA,\"Agypten} +{\begin{tcolorbox}[adjusted title=\n,colframe=blue!75!black] + Some content.\end{tcolorbox}} +\end{dispExample} +\end{docTcbKey} + + +\clearpage +\subsection{Lower Part} +\begin{docTcbKey}{lowerbox}{=\meta{mode}}{no default, initially \texttt{visible}} + Controls the treatment of the lower part of the box. + Feasible values for \meta{mode} are: + \begin{itemize} + \item |visible|: usual type setting of the lower part, + \item |invisible|: empty space instead of the lower part contents, + \item |ignored|: the lower part is not used (here). + \end{itemize} + The last two values are usually applied in connection with |savelowerto|. +\begin{dispExample} +\begin{tcolorbox}[lowerbox=invisible] This is a \textbf{tcolorbox}. +\tcblower +This is the lower part (but invisible). +\end{tcolorbox} + +\begin{tcolorbox}[lowerbox=ignored] +This is a \textbf{tcolorbox}. +\tcblower +This is the lower part (but ignored). \end{tcolorbox} \end{dispExample} \end{docTcbKey} -\begin{docTcbKey}{boxrule}{=\meta{length}}{no default, initially \texttt{0.5mm}} - Sets the frame width to \meta{length}. + +\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}[boxrule=2mm] +\begin{tcolorbox}[lowerbox=invisible,savelowerto=\jobname_bspsave.tex] This is a \textbf{tcolorbox}. +\tcblower +This is the lower part which may be quite complex: +$\displaystyle f(x)=\frac{1+x^2}{1-x^2}$. \end{tcolorbox} + +Now, we load the saved text:\\ +\input{\jobname_bspsave.tex} \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}. +\begin{docTcbKey}{savedelimiter}{=\meta{name}}{no default, initially \texttt{tcolorbox}} + Used in connection with new environment definitions which extend + |tcolorbox| and use or allow the option |savelowerto|. + To catch the end of the new box environment \meta{name} has to be the name of + this environment. Additionally, the environment definition has to use + |\tcolorbox| instead of + |\begin{tcolorbox}| and |\endtcolorbox| instead of |\end{tcolorbox}|. \begin{dispExample} -\begin{tcolorbox}[arc=0mm] -This is a \textbf{tcolorbox}. +\newenvironment{mybox}[1]{% + \tcolorbox[savedelimiter=mybox, + savelowerto=\jobname_bspsave2.tex, + lowerbox=ignored, + colback=red!5,colframe=red!75!black,fonttitle=\bfseries,title=#1]}% + {\endtcolorbox} + +\begin{mybox}{My Example} +Upper part. +\tcblower +Saved lower part! +\end{mybox} + +Now, the saved part is used: +\begin{tcolorbox}[colback=green!5] +\input{\jobname_bspsave2.tex} \end{tcolorbox} -\begin{tcolorbox}[arc=4mm] +\end{dispExample} +\end{docTcbKey} + + + +\subsection{Colors and Fonts} +\begin{docTcbKey}{colback}{=\meta{color}}{no default, initially \texttt{black!5}} + Sets the background \meta{color} of the box. +\begin{dispExample} +\begin{tcolorbox}[colback=white] This is a \textbf{tcolorbox}. \end{tcolorbox} \end{dispExample} \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{docTcbKey}{colframe}{=\meta{color}}{no default, initially \texttt{black!75}} + Sets the frame \meta{color} of the box. \begin{dispExample} -\begin{tcolorbox}[boxsep=5mm] +\begin{tcolorbox}[colframe=red!50!yellow] This is a \textbf{tcolorbox}. \end{tcolorbox} \end{dispExample} \end{docTcbKey} -\begin{docTcbKey}{left}{=\meta{length}}{no default, initially \texttt{4mm}} - Sets the left space between text and frame (additional to |boxsep|). + +\begin{docTcbKey}{coltext}{=\meta{color}}{no default, initially \texttt{black}} + Sets the text \meta{color} of the box. \begin{dispExample} -\begin{tcolorbox}[left=0mm] +\begin{tcolorbox}[coltext=yellow,colback=blue!50,colframe=blue] This is a \textbf{tcolorbox}. \end{tcolorbox} \end{dispExample} \end{docTcbKey} -\begin{docTcbKey}{right}{=\meta{length}}{no default, initially \texttt{4mm}} - Sets the right space between text and frame (additional to |boxsep|). + +\begin{docTcbKey}{coltitle}{=\meta{color}}{no default, initially \texttt{white}} + Sets the title text \meta{color} of the box. \begin{dispExample} -\begin{tcolorbox}[right=11.7cm] +\begin{tcolorbox}[coltitle=blue!50!black,colframe=blue!25,title=Test] This is a \textbf{tcolorbox}. \end{tcolorbox} \end{dispExample} \end{docTcbKey} -\clearpage -\begin{docTcbKey}{top}{=\meta{length}}{no default, initially \texttt{2mm}} - Sets the top space between text and frame (additional to |boxsep|). +\begin{docTcbKey}{fontupper}{=\meta{text}}{no default, initially empty} + Sets \meta{text} before the content of the upper part (e.\,g.\ font settings). \begin{dispExample} -\begin{tcolorbox}[top=0mm] +\begin{tcolorbox}[fontupper=Hello!~\sffamily] This is a \textbf{tcolorbox}. -\tcblower -This is the lower part. \end{tcolorbox} \end{dispExample} \end{docTcbKey} -\begin{docTcbKey}{bottom}{=\meta{length}}{no default, initially \texttt{2mm}} - Sets the bottom space between text and frame (additional to |boxsep|). + +\begin{docTcbKey}{fontlower}{=\meta{text}}{no default, initially empty} + Sets \meta{text} before the content of the lower part (e.\,g.\ font settings). \begin{dispExample} -\begin{tcolorbox}[bottom=0mm] +\begin{tcolorbox}[fontlower=\sffamily\bfseries] This is a \textbf{tcolorbox}. \tcblower This is the lower part. @@ -336,75 +410,98 @@ This is the lower part. \end{docTcbKey} -\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|). +\clearpage +\begin{docTcbKey}{fonttitle}{=\meta{text}}{no default, initially empty} + Sets \meta{text} before the content of the title text (e.\,g.\ font settings). \begin{dispExample} -\begin{tcolorbox}[middle=0mm,boxsep=0mm] +\begin{tcolorbox}[fonttitle=\sffamily\bfseries\large,title=Hello] This is a \textbf{tcolorbox}. -\tcblower -This is the lower part. \end{tcolorbox} \end{dispExample} \end{docTcbKey} -\begin{docTcbKey}{colback}{=\meta{color}}{no default, initially \texttt{black!5}} - Sets the background \meta{color} of the box. +\subsection{Geometry} +\begin{docTcbKey}{width}{=\meta{length}}{no default, initially \cs{linewidth}} + Sets the total width of the colored box to \meta{length}. + See also \refKey{/tcb/height}. \begin{dispExample} -\begin{tcolorbox}[colback=white] +\begin{tcolorbox}[width=\linewidth/2] This is a \textbf{tcolorbox}. \end{tcolorbox} \end{dispExample} \end{docTcbKey} -\clearpage -\begin{docTcbKey}{colframe}{=\meta{color}}{no default, initially \texttt{black!75}} - Sets the frame \meta{color} of the box. +\begin{docTcbKey}{boxrule}{=\meta{length}}{no default, initially \texttt{0.5mm}} + Sets the frame width to \meta{length}. \begin{dispExample} -\begin{tcolorbox}[colframe=red!50!yellow] +\begin{tcolorbox}[boxrule=2mm] This is a \textbf{tcolorbox}. \end{tcolorbox} \end{dispExample} \end{docTcbKey} -\begin{docTcbKey}{coltext}{=\meta{color}}{no default, initially \texttt{black}} - Sets the text \meta{color} of the box. +\begin{docTcbKey}{arc}{=\meta{length}}{no default, initially \texttt{1mm}} + Sets the radius of the four frame arcs to \meta{length}. \begin{dispExample} -\begin{tcolorbox}[coltext=yellow,colback=blue!50,colframe=blue] +\begin{tcolorbox}[arc=0mm] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\begin{tcolorbox}[arc=4mm] This is a \textbf{tcolorbox}. \end{tcolorbox} \end{dispExample} \end{docTcbKey} - -\begin{docTcbKey}{coltitle}{=\meta{color}}{no default, initially \texttt{white}} - Sets the title text \meta{color} of the box. +\clearpage +\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} -\begin{tcolorbox}[coltitle=blue!50!black,colframe=blue!25,title=Test] +\begin{tcolorbox}[boxsep=5mm] This is a \textbf{tcolorbox}. \end{tcolorbox} \end{dispExample} \end{docTcbKey} -\begin{docTcbKey}{fontupper}{=\meta{text}}{no default, initially empty} - Sets \meta{text} before the content of the upper part (e.\,g.\ font settings). +\begin{docTcbKey}{left}{=\meta{length}}{style, no default, initially \texttt{4mm}} + Sets the left space between all text parts and frame (additional to |boxsep|). + This is an abbreviation for setting + |lefttitle|, |leftupper|, and |leftlower| to the same value. \begin{dispExample} -\begin{tcolorbox}[fontupper=Hello!~\sffamily] +\begin{tcolorbox}[left=0mm] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} + +\begin{docTcbKey}{lefttitle}{=\meta{length}}{no default, initially \texttt{4mm}} + Sets the left space between title text and frame (additional to |boxsep|). +\begin{dispExample} +\begin{tcolorbox}[lefttitle=3cm,title=My Title] This is a \textbf{tcolorbox}. \end{tcolorbox} \end{dispExample} \end{docTcbKey} +\begin{docTcbKey}{leftupper}{=\meta{length}}{no default, initially \texttt{4mm}} + Sets the left space between upper text and frame (additional to |boxsep|). +\begin{dispExample} +\begin{tcolorbox}[leftupper=3cm,title=My Title] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} \clearpage -\begin{docTcbKey}{fontlower}{=\meta{text}}{no default, initially empty} - Sets \meta{text} before the content of the lower part (e.\,g.\ font settings). +\begin{docTcbKey}{leftlower}{=\meta{length}}{no default, initially \texttt{4mm}} + Sets the left space between lower text and frame (additional to |boxsep|). \begin{dispExample} -\begin{tcolorbox}[fontlower=\sffamily\bfseries] +\begin{tcolorbox}[leftlower=3cm] This is a \textbf{tcolorbox}. \tcblower This is the lower part. @@ -413,88 +510,299 @@ This is the lower part. \end{docTcbKey} -\begin{docTcbKey}{fonttitle}{=\meta{text}}{no default, initially empty} - Sets \meta{text} before the content of the title text (e.\,g.\ font settings). +\begin{docTcbKey}{right}{=\meta{length}}{style, no default, initially \texttt{4mm}} + Sets the right space between all text parts and frame (additional to |boxsep|). + This is an abbreviation for setting + |righttitle|, |rightupper|, and |rightlower| to the same value. \begin{dispExample} -\begin{tcolorbox}[fonttitle=\sffamily\bfseries\large,title=Hello] +\begin{tcolorbox}[width=5cm,right=2cm] This is a \textbf{tcolorbox}. \end{tcolorbox} \end{dispExample} \end{docTcbKey} -\begin{docTcbKey}{lowerbox}{=\meta{mode}}{no default, initially \texttt{visible}} - Controls the treatment of the lower part of the box. - Feasible values for \meta{mode} are: - \begin{itemize} - \item |visible|: usual type setting of the lower part, - \item |invisible|: empty space instead of the lower part contents, - \item |ignored|: the lower part is not used (here). - \end{itemize} - The last two values are usually applied in connection with |savelowerto|. + +\begin{docTcbKey}{righttitle}{=\meta{length}}{no default, initially \texttt{4mm}} + Sets the right space between title text and frame (additional to |boxsep|). \begin{dispExample} -\begin{tcolorbox}[lowerbox=invisible] +\begin{tcolorbox}[width=5cm,righttitle=2cm,title=My very long title text] +This is a \textbf{tcolorbox} with standard upper box dimensions. +\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} + + +\begin{docTcbKey}{rightupper}{=\meta{length}}{no default, initially \texttt{4mm}} + Sets the right space between upper text and frame (additional to |boxsep|). +\begin{dispExample} +\begin{tcolorbox}[width=5cm,rightupper=2cm,title=My very long title text] +This is a \textbf{tcolorbox} with compressed upper box dimensions. +\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} + + +\begin{docTcbKey}{rightlower}{=\meta{length}}{no default, initially \texttt{4mm}} + Sets the right space between lower text and frame (additional to |boxsep|). +\begin{dispExample} +\begin{tcolorbox}[width=5cm,rightlower=2cm] +This is a \textbf{tcolorbox} with standard upper box dimensions. +\tcblower +This is the lower part with large space at right. +\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} + + + +\begin{docTcbKey}{top}{=\meta{length}}{no default, initially \texttt{2mm}} + Sets the top space between text and frame (additional to |boxsep|). +\begin{dispExample} +\begin{tcolorbox}[top=0mm] This is a \textbf{tcolorbox}. \tcblower -This is the lower part (but invisible). +This is the lower part. \end{tcolorbox} +\end{dispExample} +\end{docTcbKey} -\begin{tcolorbox}[lowerbox=ignored] +\begin{docTcbKey}{bottom}{=\meta{length}}{no default, initially \texttt{2mm}} + Sets the bottom space between text and frame (additional to |boxsep|). +\begin{dispExample} +\begin{tcolorbox}[bottom=0mm] This is a \textbf{tcolorbox}. \tcblower -This is the lower part (but ignored). +This is the lower part. \end{tcolorbox} \end{dispExample} \end{docTcbKey} \clearpage -\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{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} -\begin{tcolorbox}[lowerbox=invisible,savelowerto=\jobname_bspsave.tex] +\begin{tcolorbox}[middle=0mm,boxsep=0mm] This is a \textbf{tcolorbox}. \tcblower -This is the lower part which may be quite complex: -$\displaystyle f(x)=\frac{1+x^2}{1-x^2}$. +This is the lower part. \end{tcolorbox} +\end{dispExample} +\end{docTcbKey} -Now, we load the saved text:\\ -\input{\jobname_bspsave.tex} + + +\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. + + +\begin{docTcbKey}{natural height}{}{no value, initially set} + Sets the total height of the colored box to its natural height depending + on the box content. +\end{docTcbKey} + +\begin{docTcbKey}{height}{=\meta{length}}{no default} + Sets the total height of the colored box to \meta{length} independent + of the box content. +\begin{dispExample} +\tcbset{width=(\linewidth-2mm)/3,before=,after=\hfill, +colframe=blue!75!black,colback=white} + +\begin{tcolorbox}[height=1cm,valign=center] + This box has a height of 1cm. +\end{tcolorbox} +\begin{tcolorbox}[height=2cm,valign=center] + This box has a height of 2cm. +\end{tcolorbox} +\begin{tcolorbox}[height=3cm,split=0.5,valign=center,valign lower=center] + This box has a height of 3cm. + \tcblower + Lower part. +\end{tcolorbox} \end{dispExample} \end{docTcbKey} +\clearpage +\begin{docTcbKey}{space}{=\meta{fraction}}{no default, initially 0} + If the height of a |tcolorbox| is not the natural height, the space + difference between the forced and the natural size is distributed + between the upper and the lower part of the box. This space could also + be negative. + \meta{fraction} with a value between 0 and 1 is the amount of space + which is added to the upper part, the rest is added to the lower part. + If there is no lower part, then all of the space is added to + the upper part always. +\begin{dispExample} +\tcbset{width=(\linewidth-2mm)/3,before=,after=\hfill, +colframe=blue!75!black,colback=white,height=3cm} + +\foreach \f in {0.2,0.4,0.7} +{\begin{tcolorbox}[space=\f] + This is the upper part. + \tcblower + This is the lower part. +\end{tcolorbox}} +\end{dispExample} +\end{docTcbKey} -\begin{docTcbKey}{savedelimiter}{=\meta{name}}{no default, initially \texttt{tcolorbox}} - Used in connection with new environment definitions which extend - |tcolorbox| and use or allow the option |savelowerto|. - To catch the end of the new box environment \meta{name} has to be the name of - this environment. Additionally, the environment definition has to use - |\tcolorbox| instead of - |\begin{tcolorbox}| and |\endtcolorbox| instead of |\end{tcolorbox}|. +\begin{docTcbKey}{space to upper}{}{style} + This is an abbreviation for |space=1|, i.\,e. all extra space is added + to the upper part. +\end{docTcbKey} + +\begin{docTcbKey}{space to lower}{}{style, initially set} + This is an abbreviation for |space=0|, i.\,e. all extra space is added + to the lower part (if there is any). +\end{docTcbKey} + +\begin{docTcbKey}{space to both}{}{style} + This is an abbreviation for |space=0.5|, i.\,e. the extra space + equally distributed between the upper and the lower part. \begin{dispExample} -\newenvironment{mybox}[1]{% - \tcolorbox[savedelimiter=mybox, - savelowerto=\jobname_bspsave2.tex, - lowerbox=ignored, - colback=red!5,colframe=red!75!black,fonttitle=\bfseries,title=#1]}% - {\endtcolorbox} +\tcbset{width=(\linewidth-2mm)/3,before=,after=\hfill, +colframe=blue!75!black,colback=white,height=3cm} -\begin{mybox}{My Example} -Upper part. +\foreach \myspace in {space to upper,space to both,space to lower} +{\begin{tcolorbox}[\myspace] + This is the upper part. + \tcblower + This is the lower part. +\end{tcolorbox}} +\end{dispExample} +\end{docTcbKey} + + +\clearpage +\begin{docTcbKey}{split}{=\meta{fraction}}{no default} + If the height of a |tcolorbox| is not the natural height, the + \meta{fraction} with a value between 0 and 1 determines the positioning + of the segmentation between the upper and the lower part. Here, 0 stands + for top and 1 for bottom. Note that the box is split regardless of + the actual dimensions of the text parts! +\begin{dispExample} +\tcbset{width=(\linewidth-2mm)/3,before=,after=\hfill,height=3cm, +colback=white,colframe=blue!75!black,valign=center,valign lower=center} + +\foreach \f in {0.1,0.5,0.8} +{\begin{tcolorbox}[split=\f] +This is the upper part. \tcblower -Saved lower part! -\end{mybox} +This is the lower part with a lot of text in several lines. +\end{tcolorbox}} +\end{dispExample} +\end{docTcbKey} -Now, the saved part is used: -\begin{tcolorbox}[colback=green!5] -\input{\jobname_bspsave2.tex} + +\begin{docTcbKey}{valign}{=\meta{alignment}}{no default, initially |top|} + If the height of a |tcolorbox| is not the natural height, |valign| + determines the vertical \meta{alignment} of the upper part. + Feasible values are |top|, |center|, and |bottom|. For a box with natural + height, these values are meaningless. +\begin{dispExample} +\tcbset{width=(\linewidth-2mm)/3,before=,after=\hfill, +colframe=blue!75!black,colback=white,height=2cm} + +\foreach \myalign in {top,center,bottom} +{\begin{tcolorbox}[valign=\myalign] + This is a \textbf{tcolorbox}. +\end{tcolorbox}} +\end{dispExample} +\end{docTcbKey} + + +\begin{docTcbKey}{valign lower}{=\meta{alignment}}{no default, initially |top|} + This key has the same meaning for the lower part as |valign| + for the upper part, i.\,e. it determines + the vertical \meta{alignment} of the lower part with feasible values + |top|, |center|, and |bottom|. +\end{docTcbKey} + + +\clearpage +\begin{docTcbKey}{equal height group}{=\meta{id}}{no default} + Boxes which are members of an |equal height group| will all get the + same height, i.\,e. the maximum of all their natural heights. The + \meta{id} serves to distinguish between different height groups. + This \meta{id} should contain only characters which are feasible + for \TeX\ macro names, typically alphabetic characters but no numerals + and spaces. Note that you have to compile twice to see changes and + that height groups are global definitions. + + +\begin{dispExample} +\tcbset{width=(\linewidth-2mm)/3,before=,after=\hfill,arc=0mm, +colframe=blue!75!black,colback=white,fonttitle=\bfseries} + +\begin{tcolorbox}[equal height group=A,adjusted title={One}] + My smallest box. +\end{tcolorbox}% +\begin{tcolorbox}[equal height group=A,adjusted title={Two}] + This box is also small. + \tcblower + But with a lower part. +\end{tcolorbox}% +\begin{tcolorbox}[equal height group=A,adjusted title={Three}] + This box contains a lot of text just to fill the space + with word flowing and flowing and flowing until the box + is filled with all of it. +\end{tcolorbox}\linebreak +% +\tcbset{width=(\linewidth-1mm)/2,before=,after=\hfill,arc=0mm, +colframe=red!75!black,colback=white} +% +\begin{tcolorbox}[equal height group=B] + Now, we use another equal height group. +\end{tcolorbox}% +\begin{tcolorbox}[equal height group=B] + \begin{equation*} + \int\limits_{0}^{1} x^2 = \frac13. + \end{equation*} \end{tcolorbox} \end{dispExample} \end{docTcbKey} +\clearpage +\begin{docTcbKey}{minimum for equal height group}{=\meta{id}:\meta{length}}{no default, initially unset} + Plants a \meta{length} into the equal height group with + the given \meta{id}. This ensures that the height will not drop below + \meta{length}. Note that you cannot reduce a computed height value + by using this key with a small value. + The difference to applying \refKey{/tcb/height} directly is that the boxes + are never too small for their content. + +\begin{dispExample} +\tcbset{colframe=blue!75!black,colback=white,arc=0mm, + before=,after=\hfill,fonttitle=\bfseries,left=2mm,right=2mm, + width=3.5cm, + equal height group=C, + minimum for equal height group=C:3.5cm} + +\begin{tcolorbox} + My first box. All boxes will get 3.5cm times 3.5cm + if the content height is not too large. +\end{tcolorbox}% +\begin{tcolorbox} + My second box. + \tcblower + This is the lower part. +\end{tcolorbox}% +\begin{tcblisting}{} +\textbf{Mixed} +with a listing. +\end{tcblisting} +\begin{tcolorbox}[title={Fourth box}] + My final box. +\end{tcolorbox}% +\end{dispExample} +\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. @@ -523,6 +831,7 @@ Now, the saved part is used: \end{docTcbKey} +\subsection{Embedding into the Surroundings} \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. @@ -549,13 +858,130 @@ Now, the saved part is used: \end{dispListing} \end{docTcbKey} + + + +\clearpage +\subsection{Bounding Box} +Normally, every |tcolorbox| has a bounding box which fits exactly to the +dimensions of the outer frame. Therefore, \LaTeX\ reserves exactly the space +needed for the box. +This behavior can be changed by enlarging (or shrinking) the bounding box. +If the bounding box is enlarged, the |tcolorbox| will get some clearance +around it. If the bounding box is shrunk, i.\,e.\ enlarged with negative +values, the |tcolorbox| will overlap to other parts of the page. +For example, the |tcolorbox| could be stretched into the page margin. + +\begin{docTcbKey}{enlarge top by}{=\meta{length}}{no default, initially |0mm|} + Enlarges the bounding box distance to the top of the box by \meta{length}. +\begin{dispExample} +\tcbset{colframe=blue!75!black,colback=white} + +\begin{tcolorbox}[enlarge top by=-5mm] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\begin{tcolorbox}[enlarge top by=5mm] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{dispExample} +\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} +\tcbset{colframe=blue!75!black,colback=white} + +\begin{tcolorbox}[enlarge bottom by=5mm] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\begin{tcolorbox}[enlarge bottom by=-5mm] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{dispExample} +\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}. +\begin{dispExample} +\tcbset{colframe=blue!75!black,colback=white} + +\begin{tcolorbox}[enlarge left by=2cm,width=\linewidth-2cm] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\begin{tcolorbox}[enlarge left by=-2cm,width=\linewidth+2cm] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} + +\begin{docTcbKey}{enlarge right by}{=\meta{length}}{no default, initially |0mm|} + Enlarges the bounding box distance to the right side of the box by \meta{length}. +\begin{dispExample} +\tcbset{colframe=blue!75!black,colback=white} + +\begin{tcolorbox}[enlarge right by=-2cm,width=\linewidth+2cm] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\begin{tcolorbox}[enlarge right by=2cm,width=\linewidth-2cm] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} + +\clearpage +\begin{docTcbKey}{toggle enlargement}{=\meta{toggle preset}}{no default, initially |none|} + According to the \meta{toggle preset}, the left and the right enlargements of + the bounding box are switched or not. Feasible values are: + \begin{itemize} + \item |none|: no switching. + \item |forced|: the values of the left and right enlargement are switched. + \item |evenpage|: if the page is an even page, the values of the left and + right enlargement are switched. Note that the page number detection may + fail in certain cases. For these cases, use the |forced| value. + \end{itemize} +\begin{dispExample} +\tcbset{colframe=blue!75!black,colback=white, +enlarge left by=-20mm,enlarge right by=5mm,width=\linewidth+15mm} + +\begin{tcolorbox}[toggle enlargement=none] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\begin{tcolorbox}[toggle enlargement=forced] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\begin{tcolorbox}[toggle enlargement=evenpage] + This page is an \ifthenelse{\isodd{\thepage}}{odd}{even} page. + Therefore, the left and right enlargements + \ifthenelse{\isodd{\thepage}}{are not}{are} toggled (with some luck). +\end{tcolorbox} +\end{dispExample} + +\begin{dispListing} +\begin{tcolorbox}[colframe=red!60!black,colback=red!15!white, + fonttitle=\bfseries,title=Floating box from \texttt{toggle enlargement}, + width=\textwidth+20mm,enlarge right by=-20mm, + toggle enlargement=evenpage,float=t] + This page is an \ifthenelse{\isodd{\thepage}}{odd}{even} page. + Therefore, the left and right enlargements + \ifthenelse{\isodd{\thepage}}{are not}{are} toggled (with some luck; otherwise + use |forced|). This box stretches to the right margin on odd pages and to the left + margin on even pages. The current document is one-sided -- this feature makes + sense for two-sided documents only. +\end{tcolorbox} +\end{dispListing} +\tcbusetemp +\end{docTcbKey} + +\enlargethispage*{1cm} + +\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 \refEnv{tcbwritetemp} and \refCom{tcbusetemp} implicitely. \end{docTcbKey} - \clearpage \section{Saving and Loading of Verbatim Texts} The following macros are slightly modified versions of the original macros @@ -1308,6 +1734,16 @@ and a bunch of packages, namely \end{docEnvironment} +\begin{docCommand}{docAuxCommand}{\marg{name}} + Documents an auxiliary or minor \LaTeX\ macro with given \meta{name} + where \meta{name} is written without backslash. + This macro is automatically indexed. +\begin{dispExample} +The macro \docAuxCommand{fooaux} holds some interesting data. +\end{dispExample} +\end{docCommand} + + \begin{docCommand}{docColor}{\marg{name}} Documents a color with given \meta{name}. The color is automatically indexed. \begin{dispExample} @@ -1339,6 +1775,7 @@ This is a mandatory \marg{argument}. \end{dispExample} \end{docCommand} +\clearpage \begin{docCommand}{oarg}{\marg{text}} Macro from |ltxdoc| \cite{carlisle:2007a} to typeset a \meta{text} with square brackets as an optional argument. The library overwrites the original macro. @@ -1348,7 +1785,15 @@ This is an optional \oarg{argument}. \end{docCommand} -\clearpage +\begin{docCommand}{brackets}{\marg{text}} + Sets the given \meta{text} with curly brackets. +\begin{dispExample} + Here we use \brackets{some text}. +\end{dispExample} +\end{docCommand} + + + {\let\xdispExample\dispExample \let\endxdispExample\enddispExample \begin{docEnvironment}{dispExample}{} @@ -1379,6 +1824,7 @@ This is a \LaTeX\ example. \end{dispExample} \end{docEnvironment} +\clearpage \begin{docEnvironment}{absquote}{} Used to typeset an abstract as quoted and small text. \begin{dispExample} @@ -1389,7 +1835,6 @@ heading line. Optionally, such a box can be split in an upper and a lower part. \end{dispExample} \end{docEnvironment} -\clearpage \begin{docCommand}{tcbmakedocSubKey}{\marg{name}\marg{key path}} Creates a new environment \meta{name} based on \refEnv{docKey} for the documentation of keys with the given \meta{key path} as default. @@ -1427,7 +1872,7 @@ We have created \refKey{/foo/footitle} as an example. \end{dispExample} \end{docCommand} - +\clearpage \begin{docCommand}{colDef}{\marg{text}} Sets \meta{text} with the definition color, see \refKey{/tcb/color definition}. \begin{dispExample} @@ -1502,6 +1947,7 @@ This is my \colOpt{text}. \refKey{/tcb/index level}. \end{docTcbKey} +\clearpage \begin{docTcbKey}{index german settings}{}{style, no value} Sets the |makeindex| values recommended for German language texts. This is identical to setting the following: @@ -1510,7 +1956,6 @@ This is my \colOpt{text}. \end{dispListing} \end{docTcbKey} -\clearpage The following keys are provided for language specific settings. The English language is predefined. |