diff options
author | Karl Berry <karl@freefriends.org> | 2013-06-23 23:43:36 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-06-23 23:43:36 +0000 |
commit | 3f214aab9775b3253253bc72fa7a58a0278206d4 (patch) | |
tree | 95424a0f9a874d042df4d3762e2a677ea15b010b /Master/texmf-dist/doc/latex/tcolorbox | |
parent | 0ade4baaa2b1857abfa6b1385ca4a72b9c68a08b (diff) |
tcolorbox (23jun13)
git-svn-id: svn://tug.org/texlive/trunk@30869 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/tcolorbox')
17 files changed, 1418 insertions, 93 deletions
diff --git a/Master/texmf-dist/doc/latex/tcolorbox/CHANGES b/Master/texmf-dist/doc/latex/tcolorbox/CHANGES index 8cc95fb1e75..0c1acfe59f0 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 2.22 (2013/05/15)
+%% The LaTeX package tcolorbox - version 2.32 (2013/06/23)
%%
%% -------------------------------------------------------------------------------------------
%% Copyright (c) 2006-2013 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
@@ -198,4 +198,50 @@ version 2.22 (2013/05/15) - new feature: breakable boxes allow footnotes now (like minipages)
- new macro '\newtcbox'
-
+version 2.30 (2013/06/04)
+- bug fix: handling of 'before' and 'after' for \tcbox corrected
+- \tcbline now also works for centered environments
+- implementation for \tcbox made more efficient
+- new capture mode for automated content fit by font size adjustment
+ with the new macros '\tcboxfit' and '\newtcboxfit'
+ and the new keys 'fit', 'fit to', 'fit to height', 'fit basedim', 'fit skip',
+ 'fit maxstep'
+- new keys 'baseline', 'capture', 'hbox', 'minipage'
+- new stackable borderlines with the 'skins' library:
+ 'borderline', 'no borderline'
+- new keys for the 'skins' library:
+ 'enhanced standard', 'blank'
+- new key 'index format' for the 'documentation' library
+
+version 2.31 (2013/06/18)
+- several internal changes
+- library loading mechanism revisited
+- internal label change for '\tcbmaketheorem'
+- new library options 'most' and 'all'
+- \tcbline now also works for ragged environments
+- new keys:
+ 'flushleft title', 'flushleft upper', 'flushleft lower',
+ 'flushright title', 'flushright upper', 'flushright lower'
+- new key 'no listing options' for the 'listings' library
+- new shadow features for the 'skins' library with the options:
+ 'shadow', 'fuzzy shadow', 'drop shadow', 'drop fuzzy shadow', 'halo', 'fuzzy halo'
+- shadows for the 'beamer' skin changed to fuzzy
+- new library 'fitting' for the content fit operations.
+ NOTE: '\tcboxfit' and the fit options introduced in version 2.30 are moved
+ to this new library
+- the fit algorithm is completey revisited and extended
+- new macro '\tcbfontsize' ('fitting library') for relative font sizes
+- new keys for the 'fitting' library:
+ 'fit fontsize macros', 'fit height plus', 'fit width plus',
+ 'fit width from', 'fit height from'
+
+version 2.32 (2013/06/23)
+- bug fix: 'ams nodisplayskip lower' was applied to upper.
+- new option 'check odd page'
+- new environments for the 'skins' library:
+ 'tcbclipinterior', 'tcbclipframe', 'tcbcliptitle'
+- new keys for the 'skins' library:
+ 'watermark overzoom', 'clip watermark'
+ 'clip title', 'clip upper', 'clip lower'
+- NOTE: watermarks are now clipped by default.
+ To get the old behaviour add the option 'clip watermark=false'
diff --git a/Master/texmf-dist/doc/latex/tcolorbox/README b/Master/texmf-dist/doc/latex/tcolorbox/README index 0533f9b9f06..d87f56b89d8 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 2.22 (2013/05/15) +%% The LaTeX package tcolorbox - version 2.32 (2013/06/23) %% %% ------------------------------------------------------------------------------------------- %% Copyright (c) 2006-2013 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> @@ -31,6 +31,7 @@ Contents of the package 'tcolorbox.sty' LaTeX package file (style file) 'tcbbreakable.code.tex' LaTeX package file (library of tcolorbox) 'tcbdocumenation.code.tex' LaTeX package file (library of tcolorbox) + 'tcbfitting.code.tex' LaTeX package file (library of tcolorbox) 'tcbhooks.code.tex' LaTeX package file (library of tcolorbox) 'tcblistings.code.tex' LaTeX package file (library of tcolorbox) 'tcblistingsutf8.code.tex' LaTeX package file (library of tcolorbox) @@ -42,6 +43,7 @@ Contents of the package 'tcolorbox-example.tex' Example file for package usage 'tcolorbox-example.pdf' Compiled example 'Basilica_5.png' Example picture + 'lichtspiel.jpg' Example picture Installation ============ @@ -51,6 +53,7 @@ Alternatively, put the files to their respective locations within the TeX instal 'tcolorbox.sty' -> /tex/latex/tcolorbox 'tcbbreakable.code.tex' -> /tex/latex/tcolorbox 'tcbdocumenation.code.tex' -> /tex/latex/tcolorbox + 'tcbfitting.code.tex' -> /tex/latex/tcolorbox 'tcbhooks.code.tex' -> /tex/latex/tcolorbox 'tcblistings.code.tex' -> /tex/latex/tcolorbox 'tcblistingsutf8.code.tex' -> /tex/latex/tcolorbox diff --git a/Master/texmf-dist/doc/latex/tcolorbox/lichtspiel.jpg b/Master/texmf-dist/doc/latex/tcolorbox/lichtspiel.jpg Binary files differnew file mode 100644 index 00000000000..76fb962f010 --- /dev/null +++ b/Master/texmf-dist/doc/latex/tcolorbox/lichtspiel.jpg 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 90967cf8fd0..811f18687a5 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 6c84a9b1b61..ebad17baa6f 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 2.22 (2013/05/15) +%% The LaTeX package tcolorbox - version 2.32 (2013/06/23) %% tcolorbox-example.tex: an example for tcolorbox %% %% ------------------------------------------------------------------------------------------- @@ -18,8 +18,8 @@ %% This work consists of all files listed in README %% \documentclass{article} -\usepackage{tikz,lipsum} -\usepackage[listings,theorems,skins,breakable]{tcolorbox} +\usepackage{tikz,lipsum,lmodern} +\usepackage[most]{tcolorbox} \begin{document} @@ -122,7 +122,23 @@ We have given Theorem \ref{theorem:summation} on page \pageref{theorem:summation \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] + \lipsum[1-12] +\end{tcolorbox} + +%---------------------------------------------------------- +\clearpage +\section{Fit Boxes} + +\begin{tcolorbox}[enhanced,fit to height=10cm, + colback=green!25!black!10!white,colframe=green!75!black,title=Fit box (10cm), + drop fuzzy shadow,watermark color=white,watermark text=Fit] + \lipsum[1-4] +\end{tcolorbox} + +\begin{tcolorbox}[enhanced,fit to height=5cm, + colback=green!25!black!10!white,colframe=green!75!black,title=Fit box (5cm), + drop fuzzy shadow,watermark color=white,watermark text=Fit] + \lipsum[1-4] \end{tcolorbox} \end{document} diff --git a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.abstract.tex b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.abstract.tex index 7d8ae3860b1..e2108ceb652 100644 --- a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.abstract.tex +++ b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.abstract.tex @@ -20,12 +20,12 @@ saving and reuse of source code and text parts. \end{absquote} -\begin{tcolorbox}[breakable,skin=enhanced,title={Contents},fonttitle=\bfseries\Large, +\begin{tcolorbox}[breakable,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 color=yellow!75!red!25!white,pad at break=3mm, watermark text={\bfseries\Large Contents}, - frame style={drop shadow} - ] + shrink break goal=25pt, + drop fuzzy shadow] \makeatletter \@starttoc{toc} \makeatother diff --git a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.bib b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.bib index 1225e06ac09..54b2c68e534 100644 --- a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.bib +++ b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.bib @@ -115,3 +115,10 @@ date = {2011-11-10}, } +@manual{robertson:2013a, + author = {Will Robertson}, + title = {A couple of things involving environments}, + url = {http://mirror.ctan.org/macros/latex/contrib/environ/environ.pdf}, + date = {2013-04-01}, +} + diff --git a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.coremacros.tex b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.coremacros.tex index 11dca2965f4..b2a06f43b6c 100644 --- a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.coremacros.tex +++ b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.coremacros.tex @@ -73,14 +73,14 @@ Here, you see the lower part of the box. \begin{docCommand}{tcbox}{\oarg{options}\marg{box content}} - Creates a \refEnv{tcolorbox} which is fitted to the width of the given + Creates a colored box which is fitted to the width of the given \meta{box content}. In principal, most \meta{options} for a \refEnv{tcolorbox} can be used for |\tcbox| with some restrictions. A |\tcbox| cannot have a lower part and cannot be broken. \begin{dispExample} \tcbset{colframe=blue!50!black,colback=white,colupper=red!50!black, - fonttitle=\bfseries,before=,after=,center title} + fonttitle=\bfseries,nobeforeafter,center title} Text \tcbox[tcbox raise base]{Hello World}\hfill % @@ -141,7 +141,6 @@ and options. \end{docCommand} - \begin{docCommand}{newtcbox}{\marg{\texttt{\textbackslash}name}\oarg{number}\oarg{default}\marg{options}} Creates a new macro \meta{\texttt{\textbackslash}name} based on \refCom{tcbox}. Basically, |\newtcbox| operates like |\newcommand|. @@ -173,3 +172,5 @@ and options. \end{dispExample*} \end{docCommand} + + diff --git a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.coreoptions.tex b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.coreoptions.tex index cf5c9669d37..9a7b682057d 100644 --- a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.coreoptions.tex +++ b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.coreoptions.tex @@ -344,6 +344,12 @@ This is a \textbf{tcolorbox}. \end{dispExample} \end{docTcbKey} +\bigskip +\begin{marker} + More options for drawing a \refKey{/tcb/borderline} are provided by using skins documented in + Section \ref{sec:skins} from page \pageref{sec:skins}. +\end{marker} + \clearpage \begin{docTcbKey}{arc}{=\meta{length}}{no default, initially \texttt{1mm}} @@ -904,10 +910,10 @@ This is the lower part. \end{dispExample} \end{docTcbKey} + \clearpage \begin{docTcbKey}{center title}{}{style, no value, initially unset} - This style sets \refKey{/tcb/before title} and \refKey{/tcb/after title} - to |\begin{center}| and |\end{center}|. + This style sets \refKey{/tcb/before title} to |\centering|. \begin{dispExample} \tcbset{center title,colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries} @@ -919,8 +925,7 @@ This is a \textbf{tcolorbox}. \begin{docTcbKey}{center upper}{}{style, no value, initially unset} - This style sets \refKey{/tcb/before upper} and \refKey{/tcb/after upper} - to |\begin{center}| and |\end{center}|. + This style sets \refKey{/tcb/before upper} to |\centering|. \begin{dispExample} \tcbset{center upper,colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries} @@ -932,8 +937,7 @@ This is a \textbf{tcolorbox}. \begin{docTcbKey}{center lower}{}{style, no value, initially unset} - This style sets \refKey{/tcb/before lower} and \refKey{/tcb/after lower} - to |\begin{center}| and |\end{center}|. + This style sets \refKey{/tcb/before lower} to |\centering|. \begin{dispExample} \tcbset{center lower,colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries} @@ -947,6 +951,101 @@ This is the lower part. \clearpage +\begin{docTcbKey}{flushleft title}{}{style, no value, initially unset} + This style sets \refKey{/tcb/before title} to |\raggedright|. +\begin{dispExample*}{sbs,lefthand ratio=0.6} +\tcbset{flushleft title,colback=red!5!white, + colframe=red!75!black,fonttitle=\bfseries} + +\begin{tcolorbox}[title=My title which is + quite long but always flushed left] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{dispExample*} +\end{docTcbKey} + + +\begin{docTcbKey}{flushleft upper}{}{style, no value, initially unset} + This style sets \refKey{/tcb/before upper} to |\raggedright|. +\begin{dispExample*}{sbs,lefthand ratio=0.6} +\tcbset{flushleft upper,colback=red!5!white, + colframe=red!75!black,fonttitle=\bfseries} + +\begin{tcolorbox}[title=My title] +This is a \textbf{tcolorbox}. Here, the +content is flushed left. +You see the effect on the right hand side. +\end{tcolorbox} +\end{dispExample*} +\end{docTcbKey} + + +\begin{docTcbKey}{flushleft lower}{}{style, no value, initially unset} + This style sets \refKey{/tcb/before lower} to |\raggedright|. +\begin{dispExample*}{sbs,lefthand ratio=0.6} +\tcbset{flushleft lower,colback=red!5!white, + colframe=red!75!black,fonttitle=\bfseries} + +\begin{tcolorbox}[title=My title] +This is a \textbf{tcolorbox}. The upper part +is not flushed left or right. This could be +unpleasant for small boxes. +\tcblower +This is the lower part. Here, the +content is flushed left. +You see the effect on the right hand side. +\end{tcolorbox} +\end{dispExample*} +\end{docTcbKey} + + +\clearpage +\begin{docTcbKey}{flushright title}{}{style, no value, initially unset} + This style sets \refKey{/tcb/before title} to |\raggedleft|. +\begin{dispExample*}{sbs,lefthand ratio=0.6} +\tcbset{flushright title,colback=red!5!white, + colframe=red!75!black,fonttitle=\bfseries} + +\begin{tcolorbox}[title=My title] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{dispExample*} +\end{docTcbKey} + + +\begin{docTcbKey}{flushright upper}{}{style, no value, initially unset} + This style sets \refKey{/tcb/before upper} to |\raggedleft|. +\begin{dispExample*}{sbs,lefthand ratio=0.6} +\tcbset{flushright upper,colback=red!5!white, + colframe=red!75!black,fonttitle=\bfseries} + +\begin{tcolorbox}[title=My title] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{dispExample*} +\end{docTcbKey} + + +\begin{docTcbKey}{flushright lower}{}{style, no value, initially unset} + This style sets \refKey{/tcb/before lower} to |\raggedleft|. +\begin{dispExample*}{sbs,lefthand ratio=0.6} +\tcbset{flushright lower,colback=red!5!white, + colframe=red!75!black,fonttitle=\bfseries} + +\begin{tcolorbox}[title=My title] +This is a \textbf{tcolorbox}. +\tcblower +This is the lower part. +\end{tcolorbox} +\end{dispExample*} +\end{docTcbKey} + + + + + + +\clearpage \begin{docTcbKey}{tabularx}{=\meta{preamble}}{style} This style sets \refKey{/tcb/before upper} and \refKey{/tcb/after upper} and several geometry keys to support a |tabularx| with the @@ -1081,6 +1180,7 @@ This is a \textbf{tcolorbox}. \end{tcolorbox} \end{dispExample} +\enlargethispage*{5mm} \begin{dispExample} % \usetikzlibrary{patterns} % preamble % \tcbuselibrary{skins} % preamble @@ -1101,6 +1201,7 @@ This is the lower part. \end{dispExample} \end{docTcbKey} +\clearpage \begin{docTcbKey}{no overlay}{}{style, no default, initially set} Removes the overlay if set before. \end{docTcbKey} @@ -1202,14 +1303,32 @@ are drawn by the codes given with \end{myexample} \begin{myexample} -\lipsum[2-14] +\lipsum[2-11] \end{myexample} -\lipsum[15]% following text +\lipsum[12]% following text \end{dispListing*} {\tcbusetemp} +\begin{dispExample} +% \tcbuselibrary{skins} +\newtcolorbox{FancyTitle}[2][]{% + enhanced,colback=blue!10!white,colframe=orange,top=4mm, + enlarge top by=\baselineskip/2+1mm, + enlarge top at break by=0mm,pad at break=2mm, + fontupper=\normalsize, + overlay unbroken and first={% + \node[rectangle,rounded corners,draw=black,fill=blue!20!white, + inner sep=1mm,anchor=west,font=\small] + at ([xshift=4.5mm]frame.north west) {\strut\textbf{#2}};}, + #1}% + +\begin{FancyTitle}{My fancy title} + \lipsum[1] +\end{FancyTitle} +\end{dispExample} + \clearpage \subsection{Floating Objects} \begin{docTcbKey}{floatplacement}{=\meta{values}}{no default, initially \texttt{htb}} @@ -1449,6 +1568,11 @@ This behavior is controlled by the keys |before| and |after|. \end{docTcbKey} +\begin{docTcbKey}{baseline}{=\meta{length}}{no default, initially |0pt|} + Used to set the |\pgfsetbaseline| value of the resulting |tcolorbox|. +\end{docTcbKey} + + \clearpage \subsection{Bounding Box} Normally, every |tcolorbox| has a bounding box which fits exactly to the @@ -1529,10 +1653,13 @@ This is a \textbf{tcolorbox}. \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. + right enlargement are switched. It is recommended to use this setting in + conjunction with \refKey{/tcb/check odd page}. + %Note that the page number detection may + %fail in certain cases. For these cases, use the |forced| value. \end{itemize} \begin{dispExample} +% \usepackage{changepage} for 'check odd page' \tcbset{colframe=blue!75!black,colback=white, enlarge left by=-20mm,enlarge right by=5mm,width=\linewidth+15mm} @@ -1542,7 +1669,7 @@ This is a \textbf{tcolorbox}. \begin{tcolorbox}[toggle enlargement=forced] This is a \textbf{tcolorbox}. \end{tcolorbox} -\begin{tcolorbox}[toggle enlargement=evenpage] +\begin{tcolorbox}[toggle enlargement=evenpage,check odd page] 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). @@ -1580,7 +1707,7 @@ lower part. extrusion keys. \begin{dispExample} \tcbset{colframe=blue!75!black,colback=white,arc=0mm,boxrule=0.4pt, - tcbox raise base,shrink tight} + nobeforeafter,tcbox raise base,shrink tight} \begin{tcolorbox} This is a \textbf{tcolorbox}. @@ -1597,7 +1724,7 @@ Lorem \tcbox{ipsum} dolor sit amet, consectetuer adipiscing elit. \begin{dispExample} \tcbset{enhanced,colframe=red,colback=yellow!25!white, frame style={opacity=0.25},interior style={opacity=0.5}, - tcbox raise base,shrink tight,extrude by=2mm} + nobeforeafter,tcbox raise base,shrink tight,extrude by=2mm} Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis. @@ -1613,7 +1740,7 @@ Nam arcu libero, nonummy eget, consectetuer id, vulputate a, magna. \begin{dispExample} \tcbset{enhanced,colframe=red,colback=yellow!25!white, frame style={opacity=0.25},interior style={opacity=0.5}, - tcbox raise base,shrink tight,extrude by=2mm} + nobeforeafter,tcbox raise base,shrink tight,extrude by=2mm} Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis. @@ -1630,7 +1757,7 @@ Nam arcu libero, nonummy eget, consectetuer id, vulputate a, magna. \begin{dispExample} \tcbset{enhanced,colframe=red,colback=yellow!25!white, frame style={opacity=0.25},interior style={opacity=0.5}, - tcbox raise base,shrink tight,extrude by=2mm} + nobeforeafter,tcbox raise base,shrink tight,extrude by=2mm} Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis. @@ -1646,7 +1773,7 @@ Nam arcu libero, nonummy eget, consectetuer id, vulputate a, magna. \begin{dispExample} \tcbset{enhanced,colframe=red,colback=yellow!25!white, frame style={opacity=0.25},interior style={opacity=0.5}, - tcbox raise base,shrink tight,extrude by=2mm} + nobeforeafter,tcbox raise base,shrink tight,extrude by=2mm} Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis. @@ -1662,7 +1789,7 @@ Nam arcu libero, nonummy eget, consectetuer id, vulputate a, magna. \begin{dispExample} \tcbset{enhanced,colframe=red,colback=yellow!25!white, frame style={opacity=0.25},interior style={opacity=0.5}, - tcbox raise base,shrink tight,extrude by=2mm} + nobeforeafter,tcbox raise base,shrink tight,extrude by=2mm} Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis. \tcbox{Curabitur} dictum @@ -1674,6 +1801,66 @@ et malesuada fames ac turpis egestas. \tcbox{Mauris ut leo.} \end{docTcbKey} +\clearpage +\subsection{Capture Mode}\label{subsec:capture} + +\begin{docTcbKey}{capture}{=\meta{mode}}{no default, initially |minipage|} + The capture \meta{mode} defines how the box content is processed. + +Feasible values for \meta{mode} are: +\begin{itemize} +\item |minipage|:\\ + This is the default \meta{mode} for \refEnv{tcolorbox}. + The content may have an upper and a lower part. Optionally, the box + can be \refKey{/tcb/breakable}. The box content is put into a + minipage or into something similar to a minipage. +\item |hbox|:\\ + This is the default \meta{mode} for \refCom{tcbox}. The content cannot have + a lower part and cannot be broken. The colored box is sized according + to the dimensions of the content. + A shortcut to set this mode is \refKey{/tcb/hbox}. +\item |fitbox|: (needs the 'fitting' library)\\ + This is the default \meta{mode} for \refCom{tcboxfit}. The content cannot have + a lower part and cannot be broken. + The content is sized according to the dimensions of the colored box. + A shortcut to set this mode is \refKey{/tcb/fit}. +\end{itemize} + +\begin{dispExample} +\tcbset{colframe=blue!75!black,colback=white} + +\begin{tcolorbox}[capture=minipage] +This is a tcolorbox. +\end{tcolorbox} + +\begin{tcolorbox}[capture=hbox] +This is a tcolorbox. +\end{tcolorbox} + +\begin{tcolorbox}[capture=fitbox,height=9mm]% needs the 'fitting' library +This is a tcolorbox. +\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} + + + +\begin{docTcbKey}{hbox}{}{style, no default} + Shortcut for |capture=hbox|. +\begin{dispExample} +\tcbset{colframe=blue!75!black,colback=white} + +\begin{tcolorbox}[hbox] +This is a tcolorbox. +\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} + + +\begin{docTcbKey}{minipage}{}{style, no default} + Shortcut for |capture=minipage|. +\end{docTcbKey} + \clearpage \subsection{Text Characteristics} @@ -1740,3 +1927,35 @@ The library 'skins' adds more skins. The appropriate option keys for skins of the core package are therefore described in section \ref{sec:skincorekeys} from page \pageref{sec:skincorekeys}. +\clearpage +\subsection{Miscellaneous} + +\begin{docTcbKey}{check odd page}{\colOpt{=\meta{boolean value}}}{default |true|, initially |false|} +If set to |true|, the even/odd page testing from the package |changepage| +is applied. The \refKey{/tcb/toggle enlargement} check will use the +|\ifoddpage| macro from this package. +Note that you have to include the package |changepage| by hand\footnote{If |changepage| is +not included, a compilation error will arise.}: + +\begin{dispListing} +\usepackage{changepage} +\strictpagecheck +\end{dispListing} + +\medskip +The macro |\ifoddpage| can be used inside overlay or watermark code to test if the +box is on an odd page. This will work also for boxes in a break sequence. +Note that you cannot use the test inside the normal +box content. + +\begin{dispExample} +% \usepackage{changepage} +\tcbset{colframe=blue!75!black,colback=white} + +\begin{tcolorbox}[enhanced, + watermark text={\ifoddpage Odd\else Even\fi\ page!}] +\lipsum[1] +\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} + diff --git a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.documentation.tex b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.documentation.tex index 456556d55d3..24e8e35dffd 100644 --- a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.documentation.tex +++ b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.documentation.tex @@ -290,6 +290,17 @@ This is my \colOpt{text}. additional to \refKey{/tcb/after}. \end{docTcbKey} +\begin{docTcbKey}{index format}{=\meta{format}}{no default, initially |pgf|} + Determines the basic \meta{format} of the generated index. + Feasible values are: + \begin{itemize} + \item |pgf|: The index is formatted like in the |pgf| documentation. + \item |doc|: The index assumed to be formatted by |doc|/|ltxdoc|. A usage of |makeindex| + with |-s gind.ist| is assumed. The package |hypdoc| has to be loaded + \emph{before} |tcolorbox|. + \end{itemize} +\end{docTcbKey} + \begin{docTcbKey}{index actual}{=\meta{character}}{no default, initially |@|} Sets the character for 'actual' in automatic indexing. \end{docTcbKey} diff --git a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.fitting.tex b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.fitting.tex new file mode 100644 index 00000000000..171988fc395 --- /dev/null +++ b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.fitting.tex @@ -0,0 +1,403 @@ +% !TeX root = tcolorbox.tex +% include file of tcolorbox.tex (manual of the LaTeX package tcolorbox) +\clearpage +\section{Library 'fitting'}\label{sec:fitting} +The library is loaded by a package option or inside the preamble by: +\begin{dispListing} +\tcbuselibrary{fitting} +\end{dispListing} + +\subsection{Macros of the Library} + +\begin{docCommand}{tcboxfit}{\oarg{options}\marg{box content}} + Creates a colored box where the given \meta{box content} is fitted to + the width and height of the box. A |tcboxfit| has to have a fixed height. + If no fixed height is given, a square box is constructed. + In principal, most \meta{options} for a \refEnv{tcolorbox} + can be used for |\tcboxfit| with some restrictions. A |\tcboxfit| cannot have + a lower part and cannot be broken. + +\enlargethispage*{1cm} +\begin{dispExample} +% \usepackage{lipsum} +\tcbset{colframe=blue!50!black,colback=red!10!white, + boxsep=0pt,top=1mm,bottom=1mm,left=1mm,right=1mm, + nobeforeafter,width=(\linewidth-2mm)/3} + +\tcboxfit[height=8cm]{\lipsum[1]}\hfill +\tcboxfit[height=4cm]{\lipsum[1]}\hfill +\tcboxfit[height=2cm]{\lipsum[1]} + +\medskip +\tcbset{width=(\linewidth-2mm)/2,colback=green!10!white,boxsep=1mm} +\tcboxfit[height=4cm]{\lipsum[2]}\hfill +\tcboxfit[height=4cm,title=With a title]{\lipsum[2]} +\end{dispExample} +\end{docCommand} + + +\begin{docCommand}{newtcboxfit}{\marg{\texttt{\textbackslash}name}\oarg{number}\oarg{default}\marg{options}} + Creates a new macro \meta{\texttt{\textbackslash}name} based on \refCom{tcboxfit}. + Basically, |\newtcboxfit| operates like |\newcommand|. + The new macro \meta{\texttt{\textbackslash}name} optionally takes \meta{number}$+1$ arguments, where + \meta{default} is the default value for the optional first argument. + The \meta{options} are given to the underlying |tcboxfit|. +\begin{dispExample*}{sbs,lefthand ratio=0.6} +\newtcboxfit{\mybox}{colback=red!5!white, + colframe=red!75!black,width=4cm, + height=1.5cm,center upper} + +\mybox{This is my own box.}\par +\mybox{This is my own box with more text + to be written.} +\end{dispExample*} + +\begin{dispExample*}{sbs,lefthand ratio=0.6} +% \usepackage{lipsum} +\newtcboxfit{\mybox}[2]{colback=red!5!white, + colframe=red!75!black,fonttitle=\bfseries, + boxsep=1mm,left=0mm,right=0mm,top=0mm, + bottom=0mm,center upper,valign=center, + nobeforeafter,width=#1,height=#2} + +\mybox{2.5cm}{1cm}{First box}% +\mybox{2.5cm}{1cm}{Second box with more text}\\ +\mybox{5cm}{2cm}{Third box with text}\\ +\mybox{5cm}{3cm}{\lipsum[1]} +\end{dispExample*} + +\begin{dispExample*}{sbs,lefthand ratio=0.6} +% \usepackage{lipsum} +\newtcboxfit{\mybox}[2][]{colback=red!5!white, + colframe=red!75!black, + width=#2,height=#2/3*2,#1} + +\mybox[colback=yellow]{5cm}% + {\lipsum[2]} +\end{dispExample*} +\end{docCommand} + + +\begin{docCommand}{tcbfontsize}{\marg{factor}} + Selects a font size inside a tcolorbox which is scaled with the given + \meta{factor} relative to \docAuxCommand{tcbfitdim}.% + %, see Subsection \ref{subsec:fit} from page \pageref{subsec:fit}. + +\begin{dispExample*}{sbs,lefthand ratio=0.6} +\tcbset{colback=red!5!white,colframe=red!75!black} +\begin{tcolorbox}[fit basedim=10pt] + {\tcbfontsize{0.25} Very tiny,}\\ + {\tcbfontsize{0.5} Small,}\\ + {\tcbfontsize{1} Normal,}\\ + {\tcbfontsize{2} Large,}\\ + {\tcbfontsize{4} Huge.} +\end{tcolorbox} +\end{dispExample*} +\end{docCommand} + + +\clearpage +\subsection{Option Keys of the Library}\label{subsec:fit} + +The font size for the content of a box with fixed width and fixed height +can be adjusted automatically. This is called the \emph{fitbox capture mode}. +Note that the fit control algorithm +constructs a series of versions for the box and selects the 'best'. +Therefore, the compilation time is quite longer than for a normal box. +The algorithm will fail, if a different selected font size does not change the +overall size of the box content. +The \refCom{tcboxfit} macro uses this algorithm by default. + +\medskip +\begin{marker} + The fit control keys are only applicable to unbreakable boxes without + a lower part. + The box content should not change counters. +\end{marker} +\medskip + +\enlargethispage*{5mm} +\begin{docTcbKey}{fit}{}{style, initially unset} + Sets the \refKey{/tcb/capture} mode to |fitbox|, i.\,e.\ enables the + font size adjustment algorithm. Thereby, a \refEnv{tcolorbox} acts + like \refCom{tcboxfit} where the given \meta{box content} is fitted to + the width and height of the box. Therefore, the box has to have a fixed height. + If no fixed height is given, a square box is constructed. + The font dimension \docAuxCommand{tcbfitdim} can also be used to adjust + the margins of the box since a box with a tiny font may not need large + margins. The number of constructed boxes is saved to the macro \docAuxCommand{tcbfitsteps} + for analysis. + +\begin{dispExample} +% \usepackage{lipsum} +% \tcbuselibrary{skins} +\newtcolorbox{fitting}[2][]{fit,height=#2,boxsep=1pt,valign=center, + top=0.4\tcbfitdim,bottom=0.4\tcbfitdim, + left=0.75\tcbfitdim,right=0.75\tcbfitdim, + enhanced,watermark text=\tcbfitsteps, + colframe=blue!75!black,colback=white,#1} + +\begin{fitting}{4cm} +\lipsum[1] +\end{fitting} + +\begin{fitting}{2cm} +\lipsum[2] +\end{fitting} + +\begin{fitting}{1cm} +\lipsum[3] +\end{fitting} +\end{dispExample} +\end{docTcbKey} + + +\begin{docTcbKey}{fit to}{=\meta{width} and \meta{height}}{style, initially unset} + Shortcut for using \refKey{/tcb/fit} and setting the \meta{width} and \meta{height} values + separately. +\begin{dispExample*}{sbs,lefthand ratio=0.6} +\tcbset{colback=red!5!white,colframe=red!75!black} + +\begin{tcolorbox}[fit to=3cm and 2cm] + This box content is fitted to the given + dimensions. +\end{tcolorbox} +\end{dispExample*} +\end{docTcbKey} + + +\begin{docTcbKey}{fit to height}{=\meta{height}}{style, initially unset} + Shortcut for using \refKey{/tcb/fit} and setting the \meta{height} value separately. +\begin{dispExample*}{sbs,lefthand ratio=0.6} +\tcbset{colback=red!5!white,colframe=red!75!black} + +\begin{tcolorbox}[fit to height=2cm] + This box content is fitted to the given + height. +\end{tcolorbox} +\end{dispExample*} +\end{docTcbKey} + +\begin{docTcbKey}{fit basedim}{=\meta{length}}{no default, initially |10pt|} + Sets the starting font dimension for the font size adjustment algorithm + to \meta{length}. The algorithm never enlarges this dimension. + +\begin{dispExample*}{sbs,lefthand ratio=0.6} +\tcbset{colback=red!5!white,colframe=red!75!black} + +\begin{tcolorbox}[fit to=4cm and 2cm] + Too few words for the box. +\end{tcolorbox} + +\begin{tcolorbox}[fit to=4cm and 2cm, + fit basedim=50pt] + Enough words for the box. +\end{tcolorbox} +\end{dispExample*} +\end{docTcbKey} + + +\begin{docTcbKey}{fit skip}{=\meta{real value}}{no default, initially |1.2|} + Sets the skip value of the selected font to \meta{real value} times \docAuxCommand{tcbfitdim}. + +\begin{dispExample*}{sbs,lefthand ratio=0.6} +% \usepackage{lipsum} +\tcbset{colback=red!5!white, + colframe=red!75!black,left=1mm, + right=1mm,boxsep=0mm} + +\begin{tcolorbox}[fit to=5cm and 4cm, + fit skip=1.0 ] + \lipsum[1] +\end{tcolorbox} +\end{dispExample*} +\end{docTcbKey} + + + +\clearpage +\begin{docTcbKey}{fit fontsize macros}{}{style, initially unset} + Redefines the standard \LaTeX\ font size macros + |\tiny|, |\scriptsize|, |\footnotesize|, |\small|, |\normalsize|, + |\large|, |\Large|, |\LARGE|, |\huge|, and |\Huge|, + to set font sizes relative to + the current \docAuxCommand{tcbfitdim}. Note that the display skip values for + mathematical formulas are respected by the redefined macros. + +\begin{dispExample*}{sbs,lefthand ratio=0.6} +% \usepackage{lipsum} +\tcbset{colback=red!5!white, + colframe=red!75!black,left=1mm, + right=1mm,boxsep=0mm} + +\begin{tcolorbox}[fit to height=4cm] + {\Large\bfseries This text is + not adapted:\par} + \lipsum[2] +\end{tcolorbox} + +\begin{tcolorbox}[fit to height=4cm, + fit fontsize macros ] + {\Large\bfseries This text is adapted:\par} + \lipsum[2] +\end{tcolorbox} +\end{dispExample*} + +\begin{dispExample*}{sbs,lefthand ratio=0.6} +\tcbset{colback=red!5!white, + colframe=red!75!black,left=1mm, + right=1mm,boxsep=0mm} + +\let\realHuge=\Huge + +\begin{tcolorbox}[fit basedim=7pt, + fontupper=\normalsize, + fit fontsize macros] +The relative relative font size macros +are also usable without the +\textit{fit} algorithm.\par +{\Huge Adapted Huge} --- +{\realHuge Original Huge} +\end{tcolorbox} + +\end{dispExample*} +\end{docTcbKey} + + +\clearpage +\begin{docTcbKey}{fit height plus}{=\meta{dimension}}{no default, initially |0pt|} + The box is allowed to enlarge the fixed height up to the given \meta{dimension}, + before a font size fit is applied. An optional \refKey{/tcb/fit width plus} + is tried after the height adaption. +\begin{dispExample} +% \usepackage{lipsum} +\tcbset{colback=red!5!white,colframe=red!75!black,left=1mm,top=1mm,bottom=1mm, + right=1mm,boxsep=0mm,width=3cm,height=3cm,nobeforeafter} + +\begin{tcolorbox}[fit] +This is a tcolorbox. +\end{tcolorbox} +\begin{tcolorbox}[fit,fit height plus=1cm] +This is a tcolorbox. +\end{tcolorbox} +\begin{tcolorbox}[fit] +\lipsum[2] +\end{tcolorbox} +\begin{tcolorbox}[fit,fit height plus=1cm] +\lipsum[2] +\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} + + +\begin{docTcbKey}{fit width plus}{=\meta{dimension}}{no default, initially |0pt|} + The box is allowed to enlarge the fixed width up to the given \meta{dimension}, + before a font size fit is applied. An optional \refKey{/tcb/fit height plus} + is tried before the width adaption. + \enlargethispage*{1cm} +\begin{dispExample} +% \usepackage{lipsum} +\tcbset{colback=red!5!white,colframe=red!75!black,left=1mm,top=1mm,bottom=1mm, + right=1mm,boxsep=0mm,width=3cm,height=3cm,nobeforeafter} + +\begin{tcolorbox}[fit] +This is a tcolorbox. +\end{tcolorbox} +\begin{tcolorbox}[fit,fit width plus=1cm] +This is a tcolorbox. +\end{tcolorbox} +\begin{tcolorbox}[fit] +\lipsum[2] +\end{tcolorbox} +\begin{tcolorbox}[fit,fit width plus=1cm] +\lipsum[2] +\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} + + +\begin{marker} +Typically, the optional title of a |tcolorbox| is not part of the fit operation. +If a \refKey{/tcb/fit width plus} is applied, the title is also adapted to +the new width. If counters are increased inside the title text, they may be +increased more than one time. +\end{marker} + + +\begin{docTcbKey}{fit width from}{=\meta{min} \texttt{to} \meta{max}}{style, no default} + Sets the box width to \meta{min} and allows the width to grow up to \meta{max}. +\begin{dispExample} +% \usepackage{lipsum} +\tcbset{colback=red!5!white,colframe=red!75!black,left=1mm,top=1mm,bottom=1mm, + right=1mm,boxsep=0mm,height=4cm} + +\begin{tcolorbox}[fit,width=\linewidth/2] +\lipsum[2] +\end{tcolorbox}\par +\begin{tcolorbox}[fit width from=\linewidth/2 to \linewidth] +\lipsum[2] +\end{tcolorbox}\par +\end{dispExample} +\end{docTcbKey} + +\clearpage +\begin{docTcbKey}{fit height from}{=\meta{min} \texttt{to} \meta{max}}{style, no default} + Sets the box height to \meta{min} and allows the height to grow up to \meta{max}. +\begin{dispExample} +% \usepackage{lipsum} +\newtcolorbox{mybox}{colback=red!5!white,colframe=red!75!black,left=1mm,top=1mm, + bottom=1mm,right=1mm,boxsep=0mm,width=4cm,nobeforeafter, + fit height from=1cm to 8cm} + +\begin{mybox} +This is a tcolorbox. +\end{mybox} +\begin{mybox} +This is a tcolorbox. This is a tcolorbox. This is a tcolorbox. +\end{mybox} +\begin{mybox} +\lipsum[2] +\end{mybox} +\end{dispExample} +\end{docTcbKey} + + +\clearpage +\begin{marker} +The following options set control parameters for the fit algorithm. +The algorithms is a bisection method which stops if certain stop conditions +are fulfilled. +The options should be seen as experimental and are likely to change in future versions, +if necessary. +\end{marker} + +\begin{docTcbKey}{fit maxstep}{=\meta{number}}{no default, initially |20|} + Sets the maximal step size for the font size adjustment algorithm. + In normal situations, the algorithm stops before reaching the intial value of 20 steps. + If the box content does not shrink, this value prevents an endless loop. +\end{docTcbKey} + + +\begin{docTcbKey}{fit maxfontdiff}{=\meta{dimension}}{no default, initially |0.1pt|} + The algorithm stops, if the font size is determined within a deviation of + \meta{dimension}. +\end{docTcbKey} + + +\begin{docTcbKey}{fit maxfontdiffgap}{=\meta{dimension}}{no default, initially |1pt|} + The algorithm stops, if the number of lines is determined and the font size is + determined within a deviation of \meta{dimension}. +\end{docTcbKey} + + +\begin{docTcbKey}{fit maxwidthdiff}{=\meta{dimension}}{no default, initially |1pt|} + The algorithm stops, if the (optionally) flexible box width + is determined within a deviation of \meta{dimension}. +\end{docTcbKey} + + +\begin{docTcbKey}{fit maxwidthdiffgap}{=\meta{dimension}}{no default, initially |10pt|} + The algorithm stops, if the number of lines is determined and the (optionally) flexible box width + is determined within a deviation of \meta{dimension}. +\end{docTcbKey} + diff --git a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.intro.tex b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.intro.tex index ed4187f3518..c6330c6a44a 100644 --- a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.intro.tex +++ b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.intro.tex @@ -25,6 +25,7 @@ With version 2.20, the often requested 'side by side' mode for listings has been \begin{tcolorbox}[enhanced,boxrule=0mm,boxsep=0mm,frame hidden,interior hidden, left=0mm,right=0mm,top=0mm,bottom=0mm,watermark opacity=0.25,watermark zoom=1.2,before=\par\smallskip, + clip watermark=false, watermark tikz={% \path[fill=yellow,draw=yellow!75!red] (0,0) circle (1cm); \fill[red] (45:5mm) circle (1mm); @@ -36,9 +37,20 @@ and ideas for new or better features. \end{tcolorbox} +\subsection{Installation} +Typically, |tcolorbox| will be installed as part of a major \LaTeX\ distribution +and there is nothing special to do for a user. + +If you intend to make a local +installation \emph{by hand}, see the |README| file of the |tcolorbox| package +for some hints. The short story is: you have to install not only +|tcolorbox.sty| but also all |*.code.tex| files in the local |texmf| tree. + + \subsection{Loading the Package} The base package |tcolorbox| loads the packages -|pgf| \cite{tantau:2010c} and |verbatim| \cite{schoepf:2001a}. +|pgf| \cite{tantau:2010c}, |verbatim| \cite{schoepf:2001a}, +and |environ| \cite{robertson:2013a}. |tcolorbox| itself is loaded in the usual manner in the preamble: \begin{dispListing} \usepackage{tcolorbox} @@ -68,6 +80,12 @@ the preamble by applying the following macro with the same set of keys. The following keys are used inside |\tcbuselibrary| respectively |\usepackage| without the key tree path |/tcb/library/|. +\begin{docTcbKey}[library]{skins}{}{no value} + Loads the package |tikz| \cite{tantau:2010c} and provides additional + styles (skins) for the appearance of the colored boxes; see + Section \ref{sec:skins} from page \pageref{sec:skins}. +\end{docTcbKey} + \begin{docTcbKey}[library]{listings}{}{no value} Loads the package |listings| \cite{heinz:2007a} and provides additional macros for typesetting listings which are described in Section \ref{sec:listings} @@ -89,26 +107,38 @@ The following keys are used inside |\tcbuselibrary| respectively from page \pageref{sec:theorems}. \end{docTcbKey} -\begin{docTcbKey}[library]{documentation}{}{no value} - Provides additional - macros for typesetting \LaTeX\ documentations - which are described in Section \ref{sec:documentation} - from page \pageref{sec:documentation}. -\end{docTcbKey} - -\begin{docTcbKey}[library]{skins}{}{no value} - Loads the package |tikz| \cite{tantau:2010c} and provides additional - styles (skins) for the appearance of the colored boxes; see - 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} +\begin{docTcbKey}[library]{fitting}{}{no value} + Provides support for font size adaption of the box content to + the box dimensions; + see Section \ref{sec:fitting} from page \pageref{sec:fitting}. +\end{docTcbKey} + \begin{docTcbKey}[library]{hooks}{}{no value} Extends several option keys to 'hookable' keys; see Section \ref{sec:hooks} from page \pageref{sec:hooks}. \end{docTcbKey} +\begin{docTcbKey}[library]{documentation}{}{no value} + Provides additional + macros for typesetting \LaTeX\ documentations + which are described in Section \ref{sec:documentation} + from page \pageref{sec:documentation}. +\end{docTcbKey} + +\begin{docTcbKey}[library]{most}{}{style, no value} + Loads all libraries except 'documentation'. + Use this shortcut, if you want to use all features of |tcolorbox| + with exception of the specialized 'documentation' library. +\end{docTcbKey} + +\begin{docTcbKey}[library]{all}{}{style, no value} + Loads all libraries. Use this shortcut only, if you indend to use the + 'documentation' library. +\end{docTcbKey} + diff --git a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.listings.tex b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.listings.tex index 16cbbb6ccf0..c2a6f9ef860 100644 --- a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.listings.tex +++ b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.listings.tex @@ -176,6 +176,20 @@ and in compiled form. Additionally, we use line numbers here. \end{dispExample} \end{docTcbKey} +\begin{docTcbKey}{no listing options}{}{no value, initially unset} + Abbreviation for |listing options={}|. + This removes all options for the |listings| package. + This includes the |tcblisting| standard style |tcblatex| and the encoding presets. + Use this option, if you want to set the |listings| options outside of |tcblisting|, e.\,g.\ globally in + the preamble. +\begin{dispExample} +\begin{tcblisting}{no listing options} +All \textit{listings} options removed. +\end{tcblisting} +\end{dispExample} +\end{docTcbKey} + +\clearpage \begin{docTcbKey}{listing style}{=\meta{style}}{no default, initially |tcblatex|} Abbreviation for |listing options={style=...}|. This key sets a \meta{style} @@ -227,6 +241,7 @@ This is a \LaTeX\ example. \end{dispExample} \end{docTcbKey} + \begin{docTcbKey}{listing only}{}{no value} Typesets the environment content as listing. \begin{dispExample} @@ -274,7 +289,6 @@ This is a \LaTeX\ example. \end{docTcbKey} - \begin{docTcbKey}{comment and listing}{}{no value} Typesets a given comment in the upper part and the environment content as listing in the lower part. @@ -356,8 +370,8 @@ numbering. texexp/.style={colframe=red!50!yellow!50!black, colback=red!50!yellow!5!white, coltitle=red!50!yellow!3!white, fonttitle=\small\sffamily\bfseries, fontupper=\small, fontlower=\small}, - example/.code 2 args={\refstepcounter{texexp}\label{#2}% - \pgfkeysalso{texexp,title={Example \thetexexp: #1}}}, + example/.style 2 args={texexp, + title={Example \refstepcounter{texexp}\label{#2}\thetexexp: #1}}, } \end{dispListing} \tcbusetemp @@ -609,10 +623,10 @@ exercises is created quickly: \begin{dispListing} \newtcolorbox{texercise}[2][]{texercisestyle, - code={\refstepcounter{texercise}\label{exe:#2}\writesol{#2}}, listing file={\solfile\thetexercise}, - title={Exercise \arabic{texercise}\hfill\mdseries Solution on page \pageref{sol:#2}}, - #1} + title={Exercise \refstepcounter{texercise}\label{exe:#2}\writesol{#2}% + \arabic{texercise}% + \hfill\mdseries Solution on page \pageref{sol:#2}},#1} \end{dispListing} \tcbusetemp diff --git a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.skins.tex b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.skins.tex index 0bfdac01ef9..2be4be9a13b 100644 --- a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.skins.tex +++ b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.skins.tex @@ -596,7 +596,7 @@ This example uses a public domain picture from\\ \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) + watermark tikz={\draw[line width=2mm] circle (1cm) node{\fontfamily{ptm}\fontseries{b}\fontsize{20mm}{20mm}\selectfont ?};}] \lipsum[1] \tcblower @@ -650,15 +650,15 @@ This example uses a public domain picture from\\ \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. + The value $1.0$ means to fill the whole box until the watermark touches the frame. \begin{dispExample} \tcbset{enhanced,colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries, watermark text=Watermark,nobeforeafter,width=(\linewidth-2mm)/2} -\begin{tcolorbox}[title=Zoom 1.00,watermark zoom=1.00] +\begin{tcolorbox}[title=Zoom 1.0,watermark zoom=1.0] \lipsum[2] \end{tcolorbox}\hfill% -\begin{tcolorbox}[title=Zoom 0.50,watermark zoom=0.50] +\begin{tcolorbox}[title=Zoom 0.5,watermark zoom=0.5] \lipsum[2] \end{tcolorbox}% \end{dispExample} @@ -666,13 +666,40 @@ This example uses a public domain picture from\\ \clearpage +\begin{docTcbKey}{watermark overzoom}{=\meta{fraction}}{no default, initially unset} + Sets the overzoom value for a watermark. The overzoom respects the aspect ratio. + The value $1.0$ means to fill the whole box until the watermark touches + all four sides of the frame. +\begin{dispExample} +\tcbset{enhanced,colback=white,colframe=blue!50!black,fonttitle=\bfseries, + watermark opacity=0.5, + watermark graphics=lichtspiel.jpg,nobeforeafter,width=(\linewidth-2mm)/2} + +\begin{tcolorbox}[title=Zoom 1.0,watermark zoom=1.0] +\lipsum[1] +\end{tcolorbox}\hfill% +\begin{tcolorbox}[title=Overzoom 1.0,watermark overzoom=1.0] +\lipsum[1] +\end{tcolorbox}% +\end{dispExample} +\end{docTcbKey} + +\begin{marker} +If a \refKey{/tcb/watermark overzoom} value of |1.0| is used in connection +with invisible top and bottom rules which still have a thickness greater than |0pt|, +the space of these invisible rules may not be covered by the watermark. +For example, this situation may occur during the breaking of \refKey{/tcb/enhanced} boxes. +To avoid this optical glitch, just set \refKey{/tcb/pad at break} to any desired value. +\end{marker} + +\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, +\tcbset{enhanced,colback=white,colframe=blue!50!black,fonttitle=\bfseries, + watermark graphics=lichtspiel.jpg,watermark opacity=0.5, nobeforeafter,width=(\linewidth-2mm)/2} \begin{tcolorbox}[title=Stretch 1.00,watermark stretch=1.00] @@ -696,6 +723,476 @@ This example uses a public domain picture from\\ \end{dispExample} \end{docTcbKey} +\clearpage + +\begin{docTcbKey}{clip watermark}{\colOpt{=\meta{boolean value}}}{default |true|, initially |true|} + Sets the watermark to be clipped to the interior area. +\begin{dispExample} +\tcbset{enhanced,colback=white,colframe=blue!50!white,fonttitle=\bfseries, + watermark opacity=0.5,watermark stretch=1.00,arc=3mm, + watermark graphics=lichtspiel.jpg} + +\begin{tcolorbox}[title=Clip (default),clip watermark] +\lipsum[1] +\end{tcolorbox} + +\begin{tcolorbox}[title=No clip,clip watermark=false] +\lipsum[1] +\end{tcolorbox}% +\end{dispExample} +\end{docTcbKey} + + + +\clearpage +\subsection{Clip Environments}\label{subsec:clipping} +The following clip environments 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}. The typical area of application +is inside overlay code, see Section \ref{subsec:overlays} from +page \pageref{subsec:overlays}. + + +\begin{docEnvironment}{tcbclipframe}{} +Defines a |Tikz| scope which clips to the frame area path. +\begin{dispExample} +\makeatletter +\newtcolorbox{picturebox}[2][]{% + enhanced,frame hidden,interior hidden,fonttitle=\bfseries, + overlay={\begin{tcbclipframe}\node at (frame) + {\includegraphics[width=\tcb@width,height=\tcb@height]{#2}};\end{tcbclipframe}% + \begin{tcbclipinterior}\fill[white,opacity=0.75] + (frame.south west) rectangle (frame.north east);\end{tcbclipinterior}},#1} +\makeatother + +\begin{picturebox}[title=My Picture Box]{lichtspiel.jpg} +\lipsum[1] +\end{picturebox} +\end{dispExample} +\end{docEnvironment} + +\clearpage +\begin{docEnvironment}{tcbclipinterior}{} +Defines a |Tikz| scope which clips to the interior area path. +\begin{dispExample} +\begin{tcolorbox}[enhanced,title=My Title, + overlay={\begin{tcbclipinterior} + \draw[red,line width=1cm] (interior.north west)--(interior.south east); + \draw[red,line width=1cm] (interior.south west)--(interior.north east); + \end{tcbclipinterior}}] +\lipsum[1] +\end{tcolorbox} +\end{dispExample} +\end{docEnvironment} + +\begin{docEnvironment}{tcbcliptitle}{} +Defines a |Tikz| scope which clips to the title area path. +\begin{dispExample} +\begin{tcolorbox}[enhanced,title=My Title,colframe=blue,colback=yellow!10!white, + overlay={\begin{tcbcliptitle}\node at (title) + {\includegraphics[width=\linewidth]{lichtspiel.jpg}};\end{tcbcliptitle}}] +\lipsum[1] +\end{tcolorbox} +\end{dispExample} +\end{docEnvironment} + +\clearpage +\begin{docTcbKey}{clip title}{\colOpt{=\meta{boolean value}}}{default |true|, initially |false|} + Sets the title to be clipped to the title area. +\begin{dispExample} +\tcbset{enhanced,width=5cm,colframe=red!50!white,coltitle=black} + +\begin{tcolorbox}[title=\mbox{This is a title which is unbreakable and far too long}] +This is a tcolorbox. +\end{tcolorbox} + +\begin{tcolorbox}[title=\mbox{This is a title which is unbreakable and far too long}, + clip title] +This is a tcolorbox. +\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} + + +\begin{docTcbKey}{clip upper}{\colOpt{=\meta{boolean value}}}{default |true|, initially |false|} + Sets the upper part to be clipped to the interior area. +\begin{dispExample} +\newcommand{\mygraphics}[2][]{% + \tcbox[enhanced,boxsep=0pt,top=0pt,bottom=0pt,left=0pt, + right=0pt,boxrule=0.4pt,drop fuzzy shadow,clip upper, + colback=black!75!white,toptitle=2pt,bottomtitle=2pt,nobeforeafter, + center title,fonttitle=\small\sffamily,title=\detokenize{#2}] + {\includegraphics[width=\the\dimexpr(\linewidth-4mm)/2\relax]{#2}}} + +\mygraphics{lichtspiel.jpg}\hfill +\mygraphics{Basilica_5.png} +\end{dispExample} +\end{docTcbKey} + +\clearpage +The example for \refKey{/tcb/clip upper} sizes the box according to +the dimensions of the picture. To do it the other way around, the watermark +options provide an easy solution. +\begin{dispExample} +\newcommand{\mygraphics}[2][]{% + \tcbox[enhanced,capture=minipage,boxsep=0pt,top=0pt,bottom=0pt,left=0pt, + right=0pt,boxrule=0.4pt,drop fuzzy shadow,nobeforeafter, + colback=black!75!white,toptitle=2pt,bottomtitle=2pt, + center title,fonttitle=\small\sffamily,title=\detokenize{#2}, + width=(\linewidth-4mm)/2,height=6cm,colbacktitle={black}, + watermark zoom=1.0,watermark graphics={#2}]{}} + +\mygraphics{lichtspiel.jpg}\hfill +\mygraphics{Basilica_5.png} +\end{dispExample} + + +\begin{docTcbKey}{clip lower}{\colOpt{=\meta{boolean value}}}{default |true|, initially |false|} + Sets the lower part to be clipped to the interior area. +\begin{dispExample} +\tcbset{enhanced,width=5cm,colframe=red!50!black,text and listing} + +\begin{tcblisting}{} +Donau\-dampf\-schiff\-fahrts\-ka\-pi\-t\"ans\-m\"ut\-zen\-fran\-sen +\end{tcblisting} + +\begin{tcblisting}{clip lower} +Donau\-dampf\-schiff\-fahrts\-ka\-pi\-t\"ans\-m\"ut\-zen\-fran\-sen +\end{tcblisting} +\end{dispExample} +\end{docTcbKey} + + +\clearpage +\subsection{Border Line Option Keys}\label{subsec:borderline} +The following border line options are applicable for most skins which +use |tikzpicture| as \refKey{/tcb/graphical environment}. +Therefore, the skin \refSkin{standard} does not support these border lines, +but most other skins, e.\,g.\ \refSkin{enhanced}. + +The border lines are independent from the normal |tcolorbox| rules. +They may be used with or without the \refKey{/tcb/segmentation engine}. + +The border lines are stackable, i.\,e.\ several different border lines can be +used on the same |tcolorbox|. They are drawn \emph{after} the box frame and box +interior and \emph{before} overlays or watermarks. + +\begin{marker} +Technically, the normal |tcolorbox| rules result from a TikZ \emph{filling} +process. The border lines are created by a TikZ \emph{drawing} process. +This can be used to apply different effects. +\end{marker} + + +\begin{docTcbKey}{borderline}{=\marg{width}\marg{offset}\marg{options}}{no default, initially unset} + Adds a new border line to the stack of border lines. + This border line is drawn with the given \meta{width} and gets a + \meta{offset} computed from the frame outline. A positive \meta{offset} value + moves the borderline inside the |tcolorbox| and a negative \meta{offset} value + moves it outside without changing the bounding box.\\ + The border line is drawn along a TikZ path with the given TikZ \meta{options}. + Note that the TikZ |line width| option should not be used here.\\ + The border lines adapt to the rounded corners of the |tcolorbox|. An inside border + line will switch to sharp corners if necessary, an outside border line will + always be rounded if not set to |sharp corners|. +\begin{dispExample} +\begin{tcolorbox}[enhanced,title=Rounded corners,fonttitle=\bfseries,boxsep=5pt, + arc=8pt, + borderline={0.5pt}{0pt}{red}, + borderline={0.5pt}{5pt}{blue,dotted}, + borderline={0.5pt}{-5pt}{green,dashed} ] +This is a tcolorbox. +\end{tcolorbox} +\bigskip +\begin{tcolorbox}[enhanced,title=Sharp corners,fonttitle=\bfseries,boxsep=5pt, + arc=0pt,outer arc=0pt, + borderline={0.5pt}{0pt}{red}, + borderline={0.5pt}{5pt}{blue,dotted}, + borderline={0.5pt}{-5pt}{green,dashed,sharp corners} ] +This is a tcolorbox. +\end{tcolorbox} +\end{dispExample} + +\begin{dispExample} +% \usepackage{lipsum} +\begin{tcolorbox}[enhanced,arc=3mm,boxrule=1.5mm,boxsep=1.5mm, + colback=yellow!20!white, + colframe=blue, + borderline={1mm}{1mm}{white}, + borderline={1mm}{2mm}{red} ] + \lipsum[1] +\end{tcolorbox} +\end{dispExample} + + +\begin{dispExample} +% \usepackage{lipsum} +\begin{tcolorbox}[enhanced,arc=3mm,boxrule=1.5mm, + frame hidden,colback=blue!10!white, + borderline={1mm}{0mm}{blue,dotted} ] + \lipsum[2] +\end{tcolorbox} +\end{dispExample} + + +\begin{dispExample} +% \usepackage{lipsum} +\begin{tcolorbox}[enhanced,skin=enhancedmiddle, + frame hidden,interior hidden,top=0mm,bottom=0mm,boxsep=0mm, + borderline={0.75mm}{0mm}{red}, + borderline={0.75mm}{0.75mm}{red!50!yellow}, + borderline={0.75mm}{1.5mm}{yellow}, ] + \lipsum[3] +\end{tcolorbox} +\end{dispExample} + +\begin{dispExample} +% \usepackage{lipsum} +\newtcolorbox{mygreenbox}[2][]{% + enhanced,width=\linewidth-6pt, + enlarge top by=3pt,enlarge bottom by=3pt, + enlarge left by=3pt,enlarge right by=3pt, + title={#2},frame hidden,boxrule=0pt,top=1mm,bottom=1mm, + colframe=green!30!black, colbacktitle=green!50!yellow, + coltitle=black, colback=green!25!white, + borderline={0.5pt}{-0.5pt}{green!75!blue}, + borderline={1pt}{-3pt}{green!50!blue},#1} + +\begin{mygreenbox}{My title} + \lipsum[4] +\end{mygreenbox} +\end{dispExample} +\end{docTcbKey} + + +\begin{docTcbKey}{no borderline}{}{no default, initially set} + Removes all border lines if set before. +\end{docTcbKey} + + +\clearpage +\subsection{Shadow Option Keys}\label{subsec:shadows} +The following shadow options are applicable for most skins which +use |tikzpicture| as \refKey{/tcb/graphical environment}. +Therefore, the skin \refSkin{standard} does not support these shadows, +but most other skins, e.\,g.\ \refSkin{enhanced}. + +The shadows are stackable, i.\,e.\ several different shadows can be +used on the same |tcolorbox|. They are drawn \emph{before} the box frame is drawn. + + +\begin{docTcbKey}{shadow}{=\marg{xshift}\marg{yshift}\marg{offset}\marg{options}}{no default} + Adds a new shadow to the stack of shadows. + This shadow is follows the outline of the |tcolorbox| but is shifted by + \meta{xshift} and \meta{yshift}. The \meta{offset} value is a distance value + from the frame outline. A positive \meta{offset} value shrinks the shadow + and a negative \meta{offset} value enlarges the shadow. + The shadow is filled along a TikZ path with the given TikZ \meta{options}.\\ + The shadows adapt to the rounded corners of the |tcolorbox|. An shrinked shadow + will switch to sharp corners if necessary, an enlarged shadow may become + more rounded depending on several factors. + \begin{marker} + Shadows are not considered for the bounding box computation by default. + Large shadows may be overlaped by the following content. But, the + bounding box can be adapted if necessary. + \end{marker} + +\begin{dispExample*}{sbs,lefthand ratio=0.6} +\tcbset{enhanced,colback=red!5!white, + colframe=red!75!black,fonttitle=\bfseries} + +\begin{tcolorbox}[title=My own shadow, + shadow={2mm}{-1mm}{0mm}{black!50!white}] +This is a tcolorbox. +\end{tcolorbox} +\par\bigskip +\begin{tcolorbox}[title=Another shadow, + shadow={-1mm}{-2mm}{0mm}{fill=blue, + opacity=0.5}] +This is a tcolorbox. +\end{tcolorbox} +\par\bigskip +\begin{tcolorbox}[title=Double shadow, + shadow={-1.5mm}{-1.5mm}{0mm}{fill=blue, + opacity=0.25}, + shadow={1.5mm}{-1.5mm}{0mm}{fill=red, + opacity=0.25}] +This is a tcolorbox. +\end{tcolorbox} +\par\bigskip +\begin{tcolorbox}[title=Far shadow, + shadow={5.5mm}{-3.5mm}{2mm}{fill=black, + opacity=0.25}] +This is a tcolorbox. +\end{tcolorbox} +\par\bigskip\bigskip +\begin{tcolorbox}[title=Halo shadow, + shadow={0mm}{0mm}{-1.5mm}% + {fill=yellow!75!red,opacity=0.5}] +This is a tcolorbox. +\end{tcolorbox} +\end{dispExample*} +\end{docTcbKey} + +\clearpage +\begin{docTcbKey}{fuzzy shadow}{=\marg{xshift}\marg{yshift}\marg{offset}\marg{step}\marg{options}}{no default} + Adds a new fuzzy shadow to the stack of shadows. Actually, this option + adds seversal shadows which appear like a shadow with a fuzzy border. + This fuzzy shadow is follows the outline of the |tcolorbox| but is shifted by + \meta{xshift} and \meta{yshift}. The \meta{offset} value is a distance value + from the frame outline. A positive \meta{offset} value shrinks the shadow + and a negative \meta{offset} value enlarges the shadow. + The \marg{step} value describes a shrink + offset used for the combination of the partial shadows. + The shadow is filled along a TikZ path with the given TikZ \meta{options} but + any |opacity| value will be ignored. +\begin{dispExample*}{sbs,lefthand ratio=0.6} +\tcbset{enhanced,colback=red!5!white, + colframe=red!75!black,fonttitle=\bfseries} + +\begin{tcolorbox}[title=My own shadow, + fuzzy shadow={2mm}{-1mm}{0mm}{0.1mm}% + {black!50!white}] +This is a tcolorbox. +\end{tcolorbox} +\par\bigskip +\begin{tcolorbox}[title=Another shadow, + fuzzy shadow={-1mm}{-2mm}{0mm}{0.2mm}% + {fill=blue}] +This is a tcolorbox. +\end{tcolorbox} +\par\bigskip +\begin{tcolorbox}[title=Double shadow, + fuzzy shadow={-1.5mm}{-1.5mm}{0mm}{0.1mm}% + {blue}, + fuzzy shadow={1.5mm}{-1.5mm}{0mm}{0.1mm}% + {red}] +This is a tcolorbox. +\end{tcolorbox} +\par\bigskip +\begin{tcolorbox}[title=Far shadow, + fuzzy shadow={5.5mm}{-3.5mm}{0mm}{0.3mm}% + {black}] +This is a tcolorbox. +\end{tcolorbox} +\par\bigskip\bigskip +\begin{tcolorbox}[title=Glow shadow, + fuzzy shadow={0mm}{0mm}{-1.5mm}{0.15mm}% + {yellow!75!red}] +This is a tcolorbox. +\end{tcolorbox} +\end{dispExample*} + +\begin{dispExample} +\newtcolorbox{mybox}[1][]{enhanced, + fuzzy shadow={1.0mm}{-1.0mm}{0.12mm}{0mm}{blue!50!white}, + fuzzy shadow={-1.0mm}{-1.0mm}{0.12mm}{0mm}{red!50!white}, + fuzzy shadow={-1.0mm}{1.0mm}{0.12mm}{0mm}{green!50!white}, + fuzzy shadow={1.0mm}{1.0mm}{0.12mm}{0mm}{yellow!50!white},#1 +} + +\begin{mybox}[title=A multi shadow box] +This is a tcolorbox. +\end{mybox} +\end{dispExample} +\end{docTcbKey} + + +\clearpage + +\begin{docTcbKey}{drop shadow}{\colOpt{=\meta{color}}}{style, default |black!50!white|} + Adds a new shadow with standard dimensions to the stack of shadows. + Optionally, the \meta{color} for the shadow can be changed. +\begin{dispExample*}{sbs,lefthand ratio=0.6} +\tcbset{enhanced,colback=red!5!white, + colframe=red!75!black,fonttitle=\bfseries} + +\begin{tcolorbox}[title=My own shadow, + drop shadow] +This is a tcolorbox. +\end{tcolorbox} +\par\bigskip +\begin{tcolorbox}[title=Another shadow, + drop shadow=blue] +This is a tcolorbox. +\end{tcolorbox} +\end{dispExample*} +\end{docTcbKey} + + +\begin{docTcbKey}{drop fuzzy shadow}{\colOpt{=\meta{color}}}{style, default |black!50!white|} + Adds a new fuzzy shadow with standard dimensions to the stack of shadows. + Optionally, the \meta{color} for the shadow can be changed. +\begin{dispExample*}{sbs,lefthand ratio=0.6} +\tcbset{enhanced,colback=red!5!white, + colframe=red!75!black,fonttitle=\bfseries} + +\begin{tcolorbox}[title=My own shadow, + drop fuzzy shadow] +This is a tcolorbox. +\end{tcolorbox} +\par\bigskip +\begin{tcolorbox}[title=Another shadow, + drop fuzzy shadow=blue] +This is a tcolorbox. +\end{tcolorbox} +\end{dispExample*} +\end{docTcbKey} + + +\clearpage +\begin{docTcbKey}{halo}{=\meta{size} \texttt{with} \meta{color}}{style, default |0.9mm with yellow|} + Adds a new halo shadow with the given \meta{color} + which overlaps the colorbox an all sides by \meta{size}. +\begin{dispExample*}{sbs,lefthand ratio=0.6} +\tcbset{enhanced,colback=red!5!white, + colframe=red!75!black,fonttitle=\bfseries} + +\begin{tcolorbox}[title=My own halo,halo] +This is a tcolorbox. +\end{tcolorbox} +\par\bigskip\bigskip +\begin{tcolorbox}[title=Another halo, + halo=2mm with green] +This is a tcolorbox. +\end{tcolorbox} +\end{dispExample*} +\end{docTcbKey} + + +\begin{docTcbKey}{fuzzy halo}{=\meta{size} \texttt{with} \meta{color}}{style, default |0.9mm with yellow|} + Adds a new fuzzy halo shadow with the given \meta{color} + which overlaps the colorbox an all sides by \meta{size} plus |0.48mm|. +\begin{dispExample*}{sbs,lefthand ratio=0.6} +\tcbset{enhanced,colback=red!5!white, + colframe=red!75!black,fonttitle=\bfseries} + +\begin{tcolorbox}[title=My own halo,fuzzy halo] +This is a tcolorbox. +\end{tcolorbox} +\par\bigskip\bigskip +\begin{tcolorbox}[title=Another halo, + fuzzy halo=2mm with green] +This is a tcolorbox. +\end{tcolorbox} +\end{dispExample*} + +\begin{dispExample} +\begin{tcolorbox}[blank, + fuzzy halo=2mm with red!50!white, + fuzzy halo=1mm with white,] +\lipsum[1] +\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} + + + +\begin{docTcbKey}{no shadow}{}{no default} + Removes all shadows if set before. +\end{docTcbKey} + \clearpage @@ -759,8 +1256,9 @@ This example uses a public domain picture from\\ \end{dispExample} + \clearpage -\subsection{Skin family 'enhanced'} +\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. @@ -835,10 +1333,9 @@ have some 'enhanced' features, the |enhanced| skin is what you are looking for. \begin{dispExample} -% \usetikzlibrary{shadows} % preamble % \usetikzlibrary{decorations.pathmorphing} % preamble \tcbset{skin=enhanced,fonttitle=\bfseries,boxrule=1mm, - frame style={draw=FireBrick,fill=Salmon,drop shadow}, + frame style={draw=FireBrick,fill=Salmon},drop fuzzy shadow, interior style={draw=FireBrick,top color=Salmon!10,bottom color=Salmon!20}, segmentation style={draw=FireBrick,solid,decorate, decoration={coil,aspect=0,segment length=10.1mm}}} @@ -851,9 +1348,37 @@ Of course, skins can be used for listings also. \end{tcblisting} \end{dispExample} +\begin{docTcbKey}{enhanced standard}{}{style, no value} + For unbreakable boxes, this is identical to using \refKey{/tcb/enhanced}. + But, for breakable boxes, the \emph{break sequence} is identical to the \refSkin{standard} skin, + see Section \ref{subsec:breaksequence} from page \pageref{subsec:breaksequence}. +\end{docTcbKey} + + \clearpage +\begin{docTcbKey}{blank}{}{style, initially unset} + This style relies on the skin \refSkin{enhanced}. All drawing operations + are disabled and all margins are set to |0pt|. +\begin{dispExample} +\begin{tcolorbox}[blank,watermark text=A blank box] +\lipsum[1] +\end{tcolorbox} +\end{dispExample} + +\begin{dispExample} +% \tcbuselibrary{fitting} +\newtcboxfit{\mybox}[1]{blank,width=4cm,height=7cm,top=4pt, + watermark text=#1} + +\begin{tabular}{|c|c|c|}\hline +A & B & C\\\hline +\mybox{A}{\lipsum[1]} & \mybox{B}{\lipsum[2]} & \mybox{C}{\lipsum[3]}\\\hline +\end{tabular} +\end{dispExample} +\end{docTcbKey} +\clearpage \begin{docCommand}{tcbline}{} Sometimes, a line is only a line. With \refCom{tcblower} you separate the box content into two functional units. |\tcbline| draws only a line @@ -1139,7 +1664,7 @@ Nevertheless, this skin can be applied independently. \end{dispExample} \clearpage -\subsection{Skin family '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 @@ -1375,15 +1900,15 @@ Nevertheless, this skin can be applied independently. \clearpage -\subsection{Skin family 'beamer'} +\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 - them a little bit. To use this skin, the |tikz| libraries |shadings| - and |shadows| have to be included in the preamble by: + them a little bit. To use this skin, the |tikz| library |shadings| + has to be included in the preamble by: \begin{dispListing} -\usetikzlibrary{shadings,shadows} +\usetikzlibrary{shadings} \end{dispListing} The appearance of the skin can be controlled by \refKey{/tcb/frame style} and \refKey{/tcb/interior style}, if needed. Here, the \emph{segmentation} @@ -1444,8 +1969,27 @@ This box looks like a box provided by the \texttt{beamer} class. \end{dispExample} +\begin{dispExample} +\begin{tcolorbox}[beamer,colframe=blue,colback=black, + watermark graphics=lichtspiel.jpg, + coltext=white,watermark opacity=0.75,watermark stretch=1.0, + title=Beamer Box with background picture] +\lipsum[1] +\end{tcolorbox} +\end{dispExample} + + +\begin{dispExample} +\newtcolorbox{myblock}[2][]{% + beamer,breakable,colback=LightBlue,colframe=DarkBlue,#1,title=#2}% + +\begin{myblock}{Beamerish \texttt{block}: \texttt{myblock}} +\lipsum[1] +\end{myblock} +\end{dispExample} +\clearpage \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}. @@ -1579,7 +2123,7 @@ Nevertheless, this skin can be applied independently. \clearpage -\subsection{Skin family '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| diff --git a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.theorems.tex b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.theorems.tex index 4700bdc5dbd..ba46a78dfe0 100644 --- a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.theorems.tex +++ b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.theorems.tex @@ -412,11 +412,37 @@ referenced with the marker \texttt{cor:nullstellen}.\bigskip \end{Theorem} \end{dispExample} + +\begin{dispExample} +% \tcbuselibrary{skins} +\tcbmaketheorem{YetAnotherTheorem}{Theorem}{enhanced,frame hidden, + boxrule=2mm,titlerule=0mm,toptitle=1mm,bottomtitle=1mm, + fonttitle=\bfseries\large,fontupper=\normalsize, + coltitle=green!35!black,colbacktitle=green!15!white, + colback=green!50!yellow!15!white, + borderline={1pt}{0pt}{green!25!blue}, + }{mytheorem}{theo} + +\begin{YetAnotherTheorem}{Mittelwertsatz f\"{u}r $n$ Variable}{mittelwertsatz_n}% + Es sei $n\in\mathbb{N}$, $D\subseteq\mathbb{R}^n$ eine offene Menge und + $f\in C^{1}(D,\mathbb{R})$. Dann gibt es auf jeder Strecke + $[x_0,x]\subset D$ einen Punkt $\xi\in[x_0,x]$, so dass gilt + \begin{equation*} + f(x)-f(x_0) = \operatorname{grad} f(\xi)^{\top}(x-x_0) + \end{equation*} +\end{YetAnotherTheorem} +\end{dispExample} + + +\clearpage 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}}, +\begin{Theorem}[enhanced, + fuzzy halo=3mm with yellow, + fuzzy halo=2mm with red, + fuzzy halo=1mm with yellow, watermark color=red!35!white, watermark text={Overacting\\Fundamental Theorem}]% {Fundamental Theorem of Theorems}{fundamental}% diff --git a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.pdf b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.pdf Binary files differindex 08269fd3609..80af6a0abdd 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 2dc6d526ec6..0a157f82294 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 2.22 (2013/05/15) +%% The LaTeX package tcolorbox - version 2.32 (2013/06/23) %% tcolorbox.tex: Manual %% %% ------------------------------------------------------------------------------------------- @@ -28,7 +28,6 @@ \usepackage[svgnames,table,hyperref]{xcolor} \usepackage{tikz} \usepackage[pdftex,bookmarks,raiselinks,pageanchor,hyperindex,colorlinks]{hyperref} -\urlstyle{sf} \usepackage[a4paper,left=2.5cm,right=2.5cm,top=1.5cm,bottom=1.5cm, marginparsep=5mm,marginparwidth=10mm, @@ -59,8 +58,12 @@ \usepackage{amsmath} \usepackage{lipsum} -\usepackage[listings,theorems,documentation,skins,breakable,hooks]{tcolorbox} +\usepackage{changepage} +\strictpagecheck + +\usepackage[all]{tcolorbox} \tcbset{skin=enhanced} +\urlstyle{sf} \tcbmakedocSubKey{docTcbKey}{tcb} \tcbmakedocSubKey{langTcbKey}{tcb/doclang} @@ -73,7 +76,11 @@ \def\refSkin#1{\ref@doc{skin:#1}} \makeatother -\newenvironment{marker}[1][]{\begin{tcolorbox}[marker,#1]}{\end{tcolorbox}} +\newtcolorbox{marker}[1][]{marker,#1} + +\def\version{2.32}% +\def\datum{2013/06/23}% +\makeindex \hypersetup{ pdftitle={Manual for the tcolorbox package}, @@ -82,12 +89,6 @@ pdfkeywords={colored boxes, LaTeX examples, theorems} } -\def\version{2.22}% -\def\datum{2013/05/15}% -\makeindex - - - \newcounter{texexp} \newcounter{texercise} \newcounter{mytheorem}[section] @@ -104,11 +105,12 @@ classoffset=1, % tcolorbox macros moretexcs={% core - endtcolorbox,endtcbverbatimwrite,newtcolorbox,newtcbox,tcbusetemp, - tcblower,tcbox,tcbset,tcbuselibrary,tcolorbox,tcbverbatimwrite, + endtcolorbox,endtcbverbatimwrite,newtcolorbox,newtcbox,newtcboxfit,tcbusetemp, + tcblower,tcbox,tcboxfit,tcbset,tcbuselibrary,tcolorbox,tcbverbatimwrite, % listings endtcblisting,newtcblisting, tcblisting,tcbinputlisting,tcbuselistingtext,tcbuselistinglisting,tcbusetemplisting, + tcbfitdim,tcbfitsteps, % theorems tcbmaketheorem,tcboxmath,tcbhighmath, % documentation @@ -128,19 +130,19 @@ % tcolorbox options morekeywords={% core adjusted,adjust,after,arc,auto,autoparskip,align, - before,bottom,boxsep,boxrule,bottomtitle,bottomrule,broken, - collower,coltext,coltitle,colback,colframe,colupper,center,code, + before,bottom,boxsep,boxrule,bottomtitle,bottomrule,broken,basedim, + collower,coltext,coltitle,colback,colframe,colupper,center,code,capture, equal,enlarge,enlargement,extrude, - fontupper,fontlower,fonttitle,first,floatplacement,float, + fontupper,fontlower,fonttitle,first,floatplacement,float,fit,fontsize,flushleft,flushright, group,gap, height, lowerbox,left,leftrule,lefttitle,leftupper,leftlower,lower,last,lefthand, - middle,minimum, + middle,minimum,maxstep,macros, notitle,natural,noparskip,nobeforeafter,nofloat, parskip,parbox, outer,oversize,overlay, right,rightrule,righttitle,rightupper,rightlower,righthand,ratio, - savelowerto,savedelimiter,space,split,shrink,sidebyside, + savelowerto,savedelimiter,space,split,shrink,sidebyside,skip, title,top,toptitle,toprule,titlerule,tabularx,tikz,toggle,tight,tempfile,text, upper,unbroken, valign, @@ -176,17 +178,17 @@ quote, settings, % skins - beamer,bicolor, + beamer,bicolor,blank,borderline,clip, colbacktitle,code,colbacklower, - draft, + draft,drop, enhanced,engine, - frame,freelance, + frame,freelance,fuzzy, graphical,geometry,graphics, - hidden, + hidden,halo, interior, opacity, nodes, - skin,segmentation,stretch,standard, + skin,segmentation,stretch,standard,shadow, titled, watermark,widget, zoom, @@ -204,28 +206,31 @@ \tcbset{documentation listing style=mydocumentation,% sbs/.style={sidebyside,before lower app={\tcbset{sidebyside=false}}},% innerbox/.style={standard,frame style={},colback=black!5!white,colframe=black!75!white,coltext=black,coltitle=white,docexample/.style={docexample original}, - frame code,interior code,interior titled code,segmentation code}, + frame code,interior code,interior titled code,segmentation code,no shadow}, docexample/.style={colframe=Navy!50!ExampleFrame,colback=Navy!5!ExampleBack,fontlower=\footnotesize, - bicolor,colbacklower=ExampleBack!5!white,frame style={drop shadow}, + bicolor,colbacklower=ExampleBack!5!white,drop fuzzy shadow,%, before upper={\tcbset{innerbox}},before lower={\tcbset{innerbox}}}, docexample original/.style={colframe=ExampleFrame,colback=ExampleBack,fontlower=\footnotesize,frame style={}}, } -%\includeonly{tcolorbox.doc.coremacros,tcolorbox.doc.theorems} +%\includeonly{tcolorbox.doc.abstract} + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{document} + \include{tcolorbox.doc.abstract} \include{tcolorbox.doc.intro} \include{tcolorbox.doc.coremacros} \include{tcolorbox.doc.coreoptions} \include{tcolorbox.doc.verbatim} +\include{tcolorbox.doc.skins} \include{tcolorbox.doc.listings} \include{tcolorbox.doc.theorems} -\include{tcolorbox.doc.documentation} -\include{tcolorbox.doc.skins} \include{tcolorbox.doc.breakable} +\include{tcolorbox.doc.fitting} \include{tcolorbox.doc.hooks} +\include{tcolorbox.doc.documentation} \include{tcolorbox.doc.references} \include{tcolorbox.doc.index} \end{document} |