summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-07-15 22:46:30 +0000
committerKarl Berry <karl@freefriends.org>2013-07-15 22:46:30 +0000
commitb927b3c4405faf2fc0c1a8b34e07cc7c5dd5b5e8 (patch)
tree3f0b50cbbf4621a283f566948a7f04fe91237876 /Master/texmf-dist
parentbaf92cd2b6a50c9aaf590f0c88a71532f72667dd (diff)
tcolorbox (15jul13)
git-svn-id: svn://tug.org/texlive/trunk@31204 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/latex/tcolorbox/CHANGES32
-rw-r--r--Master/texmf-dist/doc/latex/tcolorbox/README2
-rw-r--r--Master/texmf-dist/doc/latex/tcolorbox/tcolorbox-example.pdfbin274531 -> 274565 bytes
-rw-r--r--Master/texmf-dist/doc/latex/tcolorbox/tcolorbox-example.tex10
-rw-r--r--Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.abstract.tex2
-rw-r--r--Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.bib8
-rw-r--r--Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.coremacros.tex28
-rw-r--r--Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.coreoptions.tex197
-rw-r--r--Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.documentation.tex69
-rw-r--r--Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.fitting.tex9
-rw-r--r--Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.initoptions.tex207
-rw-r--r--Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.intro.tex3
-rw-r--r--Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.listings.tex136
-rw-r--r--Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.theorems.tex119
-rw-r--r--Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.pdfbin2647515 -> 2821113 bytes
-rw-r--r--Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.tex129
-rw-r--r--Master/texmf-dist/tex/latex/tcolorbox/tcbbreakable.code.tex14
-rw-r--r--Master/texmf-dist/tex/latex/tcolorbox/tcbdocumentation.code.tex36
-rw-r--r--Master/texmf-dist/tex/latex/tcolorbox/tcbfitting.code.tex49
-rw-r--r--Master/texmf-dist/tex/latex/tcolorbox/tcbhooks.code.tex72
-rw-r--r--Master/texmf-dist/tex/latex/tcolorbox/tcblistings.code.tex75
-rw-r--r--Master/texmf-dist/tex/latex/tcolorbox/tcblistingsutf8.code.tex4
-rw-r--r--Master/texmf-dist/tex/latex/tcolorbox/tcbskins.code.tex10
-rw-r--r--Master/texmf-dist/tex/latex/tcolorbox/tcbtheorems.code.tex48
-rw-r--r--Master/texmf-dist/tex/latex/tcolorbox/tcolorbox.sty269
25 files changed, 1267 insertions, 261 deletions
diff --git a/Master/texmf-dist/doc/latex/tcolorbox/CHANGES b/Master/texmf-dist/doc/latex/tcolorbox/CHANGES
index 0fac352a7fc..c05aa0ba06d 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.33 (2013/07/04)
+%% The LaTeX package tcolorbox - version 2.40 (2013/07/15)
%%
%% -------------------------------------------------------------------------------------------
%% Copyright (c) 2006-2013 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
@@ -257,3 +257,33 @@ version 2.33 (2013/07/04)
- parameter added to option 'oversize'
- option 'toggle enlargement' has a default value 'evenpage' now
+version 2.40 (2013/07/15)
+- bug fix: wrong footnote text width for breakable boxes
+- bug fix: watermarks were influenced by baseline settings
+- package etoolbox is now loaded by default
+- 'phantom' changed to be stackable (!)
+- introducing the new initialization option type for easy
+ numbering and list generation. New options:
+ 'use counter', 'auto counter', 'use counter from',
+ 'no counter', 'number within', 'number format', 'number freestyle',
+ 'list inside', 'list type'
+- '\newtcolorbox' and 'newtcbox' take initialization options now
+- new macros '\tcblistof', '\tcbsetmanagedlayers'
+- introducing the layered box concept for boxes in boxes improvement:
+ * boxes inside boxes are automatically reset to default values
+ * new option 'every box', 'every box on layer x', 'every box on higher layers'
+ * support for footnotes for boxes in boxes (default: up to layer 4)
+- new options 'step', 'label', 'list entry', 'add to list'
+- library 'listings':
+ * '\newtcblisting' takes initialization options now
+ * new macro '\newtcbinputlisting'
+- library 'theorems':
+ * '\tcbmaketheorem' takes initialization options now
+ * new macro '\newtcbtheorem'
+- library 'fitting':
+ * 'newtcboxfit' takes initialization options now
+- library 'documentation':
+ * the \ref... macros suppress the page numbers now if on the same page
+ * new macros '\refCom*', '\refEnv*', '\refKey*'
+ * docCommand and docEnvironment take options now
+
diff --git a/Master/texmf-dist/doc/latex/tcolorbox/README b/Master/texmf-dist/doc/latex/tcolorbox/README
index f38eca9f9f1..822c82956fe 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.33 (2013/07/04)
+%% The LaTeX package tcolorbox - version 2.40 (2013/07/15)
%%
%% -------------------------------------------------------------------------------------------
%% Copyright (c) 2006-2013 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
index 4c866dc2eff..cb6a19c21c3 100644
--- a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox-example.pdf
+++ b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox-example.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox-example.tex b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox-example.tex
index 90b5a446a39..31e236008de 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.33 (2013/07/04)
+%% The LaTeX package tcolorbox - version 2.40 (2013/07/15)
%% tcolorbox-example.tex: an example for tcolorbox
%%
%% -------------------------------------------------------------------------------------------
@@ -88,11 +88,9 @@ This is a \LaTeX\ example:
%----------------------------------------------------------
\section{Theorems}
-\newcounter{mytheorem}[section]
-\def\themytheorem{\thesection.\arabic{mytheorem}}
-
-\tcbmaketheorem{theo}{Theorem}{fonttitle=\bfseries\upshape, fontupper=\slshape,
- arc=0mm, colback=blue!5!white,colframe=blue!75!black}{mytheorem}{theorem}
+\newtcbtheorem[auto counter,number within=section]{theo}%
+ {Theorem}{fonttitle=\bfseries\upshape, fontupper=\slshape,
+ arc=0mm, colback=blue!5!white,colframe=blue!75!black}{theorem}
\begin{theo}{Summation of Numbers}{summation}
For all natural number $n$ it holds:
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 eaedb8f7bff..c38a0d266b9 100644
--- a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.abstract.tex
+++ b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.abstract.tex
@@ -24,7 +24,7 @@
colback=yellow!10!white,colframe=red!50!black,before=\par\bigskip\noindent,
watermark color=yellow!75!red!25!white,pad at break=3mm,
watermark text={\bfseries\Large Contents},
- enlargepage=2\baselineskip,
+ %enlargepage=2\baselineskip,
drop fuzzy shadow]
\makeatletter
\@starttoc{toc}
diff --git a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.bib b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.bib
index 54b2c68e534..d222847b8ad 100644
--- a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.bib
+++ b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.bib
@@ -122,3 +122,11 @@
date = {2013-04-01},
}
+
+@manual{lehmann:2011a,
+ author = {Philipp Lehman},
+ title = {The etoolbox Package},
+ url = {http://mirror.ctan.org/macros/latex/contrib/etoolbox/etoolbox.pdf},
+ date = {2011-01-03},
+}
+
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 b2a06f43b6c..95c117a5059 100644
--- a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.coremacros.tex
+++ b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.coremacros.tex
@@ -65,6 +65,8 @@ Here, you see the lower part of the box.
\clearpage
\begin{docCommand}{tcbset}{\marg{options}}
Sets options for every following \refEnv{tcolorbox} inside the current \TeX\ group.
+ By default, this does not apply to nested boxes, see
+ Section \ref{subsec:everybox} from page \pageref{subsec:everybox}.\par
For example, the colors of the boxes may be defined for the whole document by this:
\begin{dispListing}
\tcbset{colback=red!5!white,colframe=red!75!black}
@@ -101,7 +103,7 @@ Text \tcbox[tcbox raise base]{Hello World}\hfill
\end{docCommand}
\clearpage
-\begin{docCommand}{newtcolorbox}{\marg{name}\oarg{number}\oarg{default}\marg{options}}
+\begin{docCommand}{newtcolorbox}{\oarg{init options}\marg{name}\oarg{number}\oarg{default}\marg{options}}
Creates a new environment \meta{name} based on \refEnv{tcolorbox}.
Basically, |\newtcolorbox| operates like |\newenvironment|. This means,
the new environment \meta{name} optionally takes \meta{number} arguments, where
@@ -109,6 +111,8 @@ Text \tcbox[tcbox raise base]{Hello World}\hfill
The \meta{options} are given to the underlying |tcolorbox|.
Note that \refKey{/tcb/savedelimiter} is set to the given \meta{name}
automatically.
+ The \meta{init options} allow to set up automatic numbering,
+ see Section \ref{sec:initkeys} from page \pageref{sec:initkeys}.
\begin{dispExample*}{sbs,lefthand ratio=0.6}
\newtcolorbox{mybox}{colback=red!5!white,
colframe=red!75!black}
@@ -138,15 +142,27 @@ This is my own box with a mandatory title
and options.
\end{mybox}
\end{dispExample*}
+
+\inputpreamblelisting{A}
+
+\begin{dispExample*}{sbs,lefthand ratio=0.6}
+\begin{pabox}[colback=yellow]{Hello there}
+This is my own box with a mandatory
+numbered title and options.
+\end{pabox}
+\end{dispExample*}
\end{docCommand}
-\begin{docCommand}{newtcbox}{\marg{\texttt{\textbackslash}name}\oarg{number}\oarg{default}\marg{options}}
+\clearpage
+\begin{docCommand}{newtcbox}{\oarg{init options}\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|.
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 |tcbox|.
+ The \meta{init options} allow to set up automatic numbering,
+ see Section \ref{sec:initkeys} from page \pageref{sec:initkeys}.
\begin{dispExample*}{sbs,lefthand ratio=0.6}
\newtcbox{\mybox}{colback=red!5!white,
colframe=red!75!black}
@@ -170,6 +186,14 @@ and options.
\mybox[colback=yellow]{Hello there}%
{This is my own box.}
\end{dispExample*}
+
+\inputpreamblelisting{B}
+
+\begin{dispExample*}{sbs,lefthand ratio=0.6}
+\pbbox[colback=yellow]{Hello there}%
+ {This is my own box.}
+\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 c220d7ceb70..c96326f8f5e 100644
--- a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.coreoptions.tex
+++ b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.coreoptions.tex
@@ -1357,10 +1357,9 @@ are drawn by the codes given with
%\newlength{\examlen}
\colorlet{colexam}{red!75!black}
-\newtcolorbox{myexample}{%
- phantom={\refstepcounter{example}%
- \settowidth{\global\examlen}{\Large\bfseries Example \arabic{example}}},%
- title={Example \arabic{example}},
+\newtcolorbox[use counter=example]{myexample}{%
+ phantom={\settowidth{\global\examlen}{\Large\bfseries Example \thetcbcounter}},%
+ title={Example \thetcbcounter},
coltitle=colexam,fonttitle=\Large\bfseries,
enhanced,breakable,before=\par\medskip,parbox=false,
frame hidden,interior hidden,segmentation hidden,
@@ -1396,17 +1395,16 @@ are drawn by the codes given with
\begin{dispExample}
% \tcbuselibrary{skins}
% \newcounter{example}
-\newtcolorbox{FancyTitle}[3][]{%
+\newtcolorbox[use counter=example]{FancyTitle}[3][]{%
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,
- step and label={example}{#3},
+ fontupper=\normalsize,label={#3},
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{Example \arabic{example}: #2}};},
+ {\strut\textbf{Example \thetcbcounter: #2}};},
#1}%
\begin{FancyTitle}{My fancy title}{fancy:title}
@@ -1885,6 +1883,133 @@ et malesuada fames ac turpis egestas. \tcbox{Mauris ut leo.}
\end{dispExample}
\end{docTcbKey}
+\clearpage
+\subsection{Layered Boxes and Every Box Settings}\label{subsec:everybox}
+A |tcolorbox| may contain another |tcolorbox| and so on. The package
+takes track of the nesting level using a counter |tcblayer|. Counter values
+may be used for doing some fancy things, but you should never change
+the counter value yourself.
+
+The package takes special care for the first four layers or nesting levels,
+called managed layers.
+Here, footnote texts are administrated to find their intended place
+and specific layer dependent options may be set by changing
+\refKey{/tcb/every box on layer n}.
+If needed, the number of managed layers can be increased by setting
+\refCom{tcbsetmanagedlayer} to a higher value than 4.
+
+The following styles have a considerable influence on how layered boxes
+are processed. Note especially that nested boxes are getting a
+\refKey{/tcb/reset} by default. You can change this, but be prepared for
+suprises if you do.
+
+If the defaults are \emph{not changed}, a |tcolorbox| gets its options
+in the following order. Following options overwrite preceding options.
+\begin{enumerate}
+\item On package load, all options are set to default values.
+\item Every \refCom{tcbset} command adds or changes options for the following boxes
+ inside the current \TeX\ group.
+\item While entering a |tcolorbox|, a \refKey{/tcb/every box on layer n} or
+ \refKey{/tcb/every box on higher layers} option list is applied.
+ With default settings this means:
+ \begin{itemize}
+ \item For layer 1 (lowest layer), the \refKey{/tcb/every box} option list is applied.
+ Not overwritten options given by a preceding \refCom{tcbset} survive.
+ \item For layer 2 and above (nested boxes), a \refKey{/tcb/reset} followed by
+ \refKey{/tcb/every box} option list is applied.
+ Every resettable options given by a preceding \refCom{tcbset}
+ and by the sourrounding box(es) are reset.
+ \end{itemize}
+\item The \meta{options} given to the |tcolorbox| are applied.
+ Or, if the box was generated by \refCom{newtcolorbox} or friends,
+ the \meta{options} given there are applied.
+\item If the box was generated by \refCom{newtcolorbox} or friends,
+ some automated options are applied.
+\end{enumerate}
+
+
+\begin{docTcbKey}{every box}{}{style}
+By default, this style is empty.
+\begin{dispListing}
+% default setting:
+\tcbset{every box/.style={}}
+\end{dispListing}
+It may be changed by redefining this style.
+\begin{dispListing}
+% setting all boxes to be enhanced:
+\tcbset{every box/.style={enhanced}}
+\end{dispListing}
+\end{docTcbKey}
+
+\clearpage
+\begin{docTcbKey}{every box on layer n}{}{style}
+Here, |n| has to be replaced by a number ranging from 1 to the highest
+managed layer number (4 by default).
+\begin{dispListing}
+% default settings:
+\tcbset{
+ every box on layer 1/.style={every box},
+ every box on layer 2/.style={reset,every box},
+ every box on layer 3/.style={reset,every box},
+ every box on layer 4/.style={reset,every box},
+ }
+\end{dispListing}
+\end{docTcbKey}
+
+
+\begin{docTcbKey}{every box on higher layers}{}{style}
+Higher layers are layers above the highest
+managed layer number (4 by default).
+\begin{dispListing}
+\tcbset{every box on higher layers/.style={reset,every box}}
+\end{dispListing}
+\end{docTcbKey}
+
+
+\begin{docCommand}{tcbsetmanagedlayer}{\marg{number}}
+Replaces the highest managed layer number by \meta{number} where 4 is
+the default. This macro can only be used inside the preamble.
+Using a \meta{number} lower than 4 typically makes no sense, but is
+not forbidden.
+\end{docCommand}
+
+\begin{tcboutputlisting}
+% \usepackage{lipsum}
+% \tcbuselibrary{skins,breakable}
+\tcbset{enhanced,breakable,colframe=red!75!black,fonttitle=\bfseries,
+ colback=red!5!white,
+ every box/.style={enhanced,watermark text=\thetcblayer,
+ before=\par\smallskip,after=\par\smallskip},
+ every box on layer 2/.style={reset,every box,colback=yellow!10!white,
+ drop fuzzy shadow}}
+\begin{tcolorbox}[title=Layer 1 Box]
+Here comes a footnote\footnote{Footnote from layer 1 box}.
+\lipsum[2]
+ \begin{tcolorbox}[title=Layer 2 Box]
+ abc\footnote{The footnote of abc}
+ \end{tcolorbox}
+ \begin{tcolorbox}[title=Another Box,ams equation]
+ \tcbhighmath{\sum\limits_{n=1}^{\infty} \frac{1}{n}} = \infty.
+ \end{tcolorbox}
+Some text\footnote{Footnote from some text}.
+ \begin{tcolorbox}[title=Yet Another Box]
+ \tcboxfit[height=2cm]{\lipsum[1]}
+ My text.
+ \begin{tcolorbox}
+ Another lipsum text\footnote{A lipsum text}. \lipsum[3]
+ \begin{tcolorbox}[title=Layer 4,colframe=blue,colback=white]
+ Layer 4\footnote{Layer 4 footnote}
+ \end{tcolorbox}
+ The End\footnote{Last footnote}.
+ \end{tcolorbox}
+ \end{tcolorbox}
+\end{tcolorbox}
+\end{tcboutputlisting}
+
+\tcbinputlisting{base example,listing only,listing style=mydocumentation}
+
+{\tcbuselistingtext}
+
\clearpage
\subsection{Capture Mode}\label{subsec:capture}
@@ -2013,12 +2138,13 @@ the core package are therefore described in section \ref{sec:skincorekeys} from
page \pageref{sec:skincorekeys}.
\clearpage
-\subsection{Counters and Page References}
+\subsection{Counters, Labels and References}
\begin{docTcbKey}{phantom}{=\meta{code}}{no default, initially unset}
The \meta{code} is put in a box at the upper left corner of the |tcolorbox|.
If the |tcolorbox| is breakable, the \meta{code} is executed for the first box of
-the break sequence only.\par
+the break sequence only. If there already was some phantom code given, the
+new \meta{code} is appended.\par
The \meta{code} is intended to be used for counter stepping, labelling, and
related operations which do not produce visible text.
\begin{itemize}
@@ -2042,14 +2168,50 @@ Example \ref{exe:tabular_example} on page \pageref{exe:tabular_example}.
Removes the phantom code if set before.
\end{docTcbKey}
+\begin{docTcbKey}{label}{=\meta{marker}}{no default, initially unset}
+Shortcut for |phantom={\label{#1}}|. The \meta{marker} is set as label text
+for a reference with the |\ref| macro.
+Typically, this option is used for numbered boxes, see Subsection \ref{sec:numberedboxes}
+from page \pageref{sec:numberedboxes}, e.\,g.\ \refKey{/tcb/new/auto counter}.
+\end{docTcbKey}
+
+\begin{docTcbKey}{step}{=\meta{counter}}{no default, initially unset}
+Shortcut for |phantom={\refstepcounter{#1}}|. The given \meta{counter} is
+increased and ready for labelling. This option is not needed when
+using the convenient automated numbering introduced with version 2.40,
+see Subsection \ref{sec:numberedboxes}
+from page \pageref{sec:numberedboxes}.
+\end{docTcbKey}
+
\begin{docTcbKey}{step and label}{=\marg{counter}\marg{marker}}{no default, initially unset}
-Shortcut for |phantom={\refstepcounter{#1}\label{#2}}|. The \meta{counter} is
-increased and the \meta{marker} is set as label text.\par
-Examples for the |phantom| usage are given in Section \ref{sec:latextutorial}
-from page \pageref{sec:latextutorial}, e.\,g.\
-Example \ref{firstExample} on page \pageref{firstExample}.
+Shortcut for using \refKey{/tcb/step} and \refKey{/tcb/label}. This option is not needed when
+using the convenient automated numbering introduced with version 2.40,
+see Subsection \ref{sec:numberedboxes}
+from page \pageref{sec:numberedboxes}.
\end{docTcbKey}
+
+\begin{docTcbKey}{list entry}{=\meta{text}}{no default, initially unset}
+If the \flqq list of tcolorbox(es)\frqq\ feature described in Subsection
+\ref{sec:listsof} from page \pageref{sec:listsof} is used, this key
+describes the \meta{text} for an entry into the generated list, e.\,g.
+\begin{dispListing}
+list entry={\numberline{\thetcbcounter}My beautiful Example}
+\end{dispListing}
+See Section \ref{listing:exercises} from page \pageref{listing:exercises}
+for a complete example.
+\end{docTcbKey}
+
+\begin{docTcbKey}{add to list}{=\marg{list}\marg{type}}{no default, initially unset}
+If the \flqq list of tcolorbox(es)\frqq\ feature described in Subsection
+\ref{sec:listsof} from page \pageref{sec:listsof} is used, list entries are
+generated automatically. With this key, you can enforce an entry to the
+given \meta{list} with the given \meta{type}.
+This issues:\\
+|\addcontentsline|\marg{list}\marg{type}\marg{entry text}
+\end{docTcbKey}
+
+
\clearpage
\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|
@@ -2127,5 +2289,8 @@ Sets (nearly) all |tcolorbox| settings (including loaded libraries) back to thei
\refKey{/tcb/savedelimiter} and \refKey{/tcb/capture} keep their values.
This option is useful for boxes in boxes where the inner box should not inherit
the settings of the outer box.
-See \refCom{tcbhighmath} for an example.
+Note that for boxes inside boxes the |reset| is done automatically, if the
+standard settings of the package are used (v2.40 and above), see
+Section \ref{subsec:everybox} from page \pageref{subsec:everybox}.
+%See \refCom{tcbhighmath} for an example.
\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 24e8e35dffd..4d7fa97d35b 100644
--- a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.documentation.tex
+++ b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.documentation.tex
@@ -14,7 +14,7 @@ The library is loaded by a package option or inside the preamble by:
\end{dispListing}
This also loads the library 'listings', see section \ref{sec:listings},
and a bunch of packages, namely
-|doc|, |pifont|, |marvosym|, |hyperref|, and |makeidx|.
+|doc|, |pifont|, |marvosym|, |hyperref|, |makeidx|, and |refcount|.
For UTF-8 support, load:
\begin{dispListing}
@@ -24,9 +24,10 @@ For UTF-8 support, load:
\subsection{Macros of the Library}
-\begin{docEnvironment}{docCommand}{\marg{name}\marg{parameters}}
+\begin{docEnvironment}[doclang/environment content=command description]{docCommand}{\oarg{options}\marg{name}\marg{parameters}}
Documents a \LaTeX\ macro with given \meta{name} where \meta{name} is
- written without backslash. This macro takes mandatory or optional \meta{parameters}.
+ written without backslash. The given \meta{options} are set with \refCom{tcbset}.
+ This macro takes mandatory or optional \meta{parameters}.
It is automatically indexed and can be referenced with
\refCom{refCom}\marg{name}.
\begin{dispExample}
@@ -35,13 +36,21 @@ For UTF-8 support, load:
documentation of keys with the given \meta{key path}.
\end{docCommand}
\end{dispExample}
+\begin{dispExample}
+\begin{docCommand}[color definition=blue]{foomakedocSubKey*}%
+ {\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}.
+\end{docCommand}
+\end{dispExample}
\end{docEnvironment}
-
+\clearpage
{\let\xdocEnvironment\docEnvironment
\let\endxdocEnvironment\enddocEnvironment
-\begin{xdocEnvironment}{docEnvironment}{\marg{name}\marg{parameters}}
+\begin{xdocEnvironment}[doclang/environment content=environment description]{docEnvironment}{\oarg{options}\marg{name}\marg{parameters}}
Documents a \LaTeX\ environment with given \meta{name}.
+ The given \meta{options} are set with \refCom{tcbset}.
This environment takes mandatory or optional \meta{parameters}.
It is automatically indexed and can be referenced with
\refCom{refEnv}\marg{name}.
@@ -51,10 +60,18 @@ For UTF-8 support, load:
rounded corners and, optionally, two parts.
\end{docEnvironment}
\end{dispExample}
+\begin{dispExample}
+\begin{docEnvironment}%
+ [doclang/environment content=My content text]%
+ {foocolorbox*}{\oarg{options}}
+ This is the main environment to create an accentuated colored text box with
+ rounded corners and, optionally, two parts.
+\end{docEnvironment}
+\end{dispExample}
\end{xdocEnvironment}}
-\clearpage
-\begin{docEnvironment}{docKey}{\oarg{key path}\marg{name}\marg{parameters}\marg{description}}
+
+\begin{docEnvironment}[doclang/environment content=key description]{docKey}{\oarg{key path}\marg{name}\marg{parameters}\marg{description}}
Documents a key with given \meta{name} and an optional \meta{key path}.
This key takes mandatory or optional \meta{parameters} as value
with a short \meta{description}.
@@ -77,7 +94,7 @@ The macro \docAuxCommand{fooaux} holds some interesting data.
\end{dispExample}
\end{docCommand}
-
+\clearpage
\begin{docCommand}{docColor}{\marg{name}}
Documents a color with given \meta{name}. The color is automatically indexed.
\begin{dispExample}
@@ -109,7 +126,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.
@@ -126,7 +143,7 @@ This is an optional \oarg{argument}.
\end{dispExample}
\end{docCommand}
-
+\clearpage
{\let\xdispExample\dispExample
\let\endxdispExample\enddispExample
@@ -214,27 +231,57 @@ Some key.
\begin{docCommand}{refCom}{\marg{name}}
References a documented \LaTeX\ macro with given \meta{name} where \meta{name} is
- written without backslash.
+ written without backslash. The page reference is suppressed if it links
+ to the same page.
\begin{dispExample}
We have created \refCom{foomakedocSubKey} as an example.
\end{dispExample}
\end{docCommand}
+\begin{docCommand}{refCom*}{\marg{name}}
+ References a documented \LaTeX\ macro with given \meta{name} where \meta{name} is
+ written without backslash. There is no page reference.
+\begin{dispExample}
+We have created \refCom*{foomakedocSubKey} as an example.
+\end{dispExample}
+\end{docCommand}
+
+
\begin{docCommand}{refEnv}{\marg{name}}
References a documented \LaTeX\ environment with given \meta{name}.
+ The page reference is suppressed if it links to the same page.
\begin{dispExample}
We have created \refEnv{foocolorbox} as an example.
\end{dispExample}
\end{docCommand}
+\begin{docCommand}{refEnv*}{\marg{name}}
+ References a documented \LaTeX\ environment with given \meta{name}.
+ There is no page reference.
+\begin{dispExample}
+We have created \refEnv*{foocolorbox} as an example.
+\end{dispExample}
+\end{docCommand}
+
+\clearpage
\begin{docCommand}{refKey}{\marg{name}}
References a documented key with given \meta{name} where \meta{name}
is the full path name of the key.
+ The page reference is suppressed if it links to the same page.
\begin{dispExample}
We have created \refKey{/foo/footitle} as an example.
\end{dispExample}
\end{docCommand}
+\begin{docCommand}{refKey*}{\marg{name}}
+ References a documented key with given \meta{name} where \meta{name}
+ is the full path name of the key.
+ There is no page reference.
+\begin{dispExample}
+We have created \refKey*{/foo/footitle} as an example.
+\end{dispExample}
+\end{docCommand}
+
%
\begin{docCommand}{colDef}{\marg{text}}
Sets \meta{text} with the definition color, see \refKey{/tcb/color definition}.
diff --git a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.fitting.tex b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.fitting.tex
index e0d360cfe2c..e3afeacb0f5 100644
--- a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.fitting.tex
+++ b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.fitting.tex
@@ -36,12 +36,14 @@ The library is loaded by a package option or inside the preamble by:
\end{docCommand}
-\begin{docCommand}{newtcboxfit}{\marg{\texttt{\textbackslash}name}\oarg{number}\oarg{default}\marg{options}}
+\begin{docCommand}{newtcboxfit}{\oarg{init options}\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|.
+ The \meta{init options} allow to set up automatic numbering,
+ see Section \ref{sec:initkeys} from page \pageref{sec:initkeys}.
\begin{dispExample*}{sbs,lefthand ratio=0.6}
\newtcboxfit{\mybox}{colback=red!5!white,
colframe=red!75!black,width=4cm,
@@ -134,7 +136,7 @@ The \refCom{tcboxfit} macro uses this algorithm by default.
\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,
+ enhanced,watermark text={\tcbfitsteps},
colframe=blue!75!black,colback=white,#1}
\begin{fitting}{4cm}
@@ -322,7 +324,8 @@ 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.
To avoid this, you are encouraged to use \refKey{/tcb/phantom} or \refKey{/tcb/step and label}
-to set counters.
+to set counters or use automatic numbering, see Subsection \ref{sec:numberedboxes}
+from page \pageref{sec:numberedboxes}.
\end{marker}
diff --git a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.initoptions.tex b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.initoptions.tex
new file mode 100644
index 00000000000..e1335c1f5db
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.initoptions.tex
@@ -0,0 +1,207 @@
+% !TeX root = tcolorbox.tex
+% include file of tcolorbox.tex (manual of the LaTeX package tcolorbox)
+\clearpage
+\section{Initialization Option Keys}\label{sec:initkeys}
+The \emph{initialization} options are only applicable for the generation
+of new environments and commands based on |tcolorbox| and friends.
+Particularly, they can be used for
+\begin{itemize}
+\item\refCom{newtcolorbox},
+\item\refCom{newtcbox},
+\item\refCom{newtcblisting},
+\item\refCom{newtcbinputlisting},
+\item\refCom{newtcbtheorem}, and
+\item\refCom{newtcboxfit}.
+\end{itemize}
+
+\bigskip
+\begin{marker}
+Typically, these options may generate counters and alike.
+It is \textbf{strongly} recommended to use initialization options inside
+the preamble only. Otherwise, you may get trouble when using \LaTeX's |\include| features.
+\end{marker}
+
+
+\subsection{Numbered Boxes}\label{sec:numberedboxes}
+Counters assigned using the initialization options are administrated
+automatically. Especially, they are increased for each new box.
+Independent from the real counter name, the counter value can be
+referenced by \docAuxCommand{thetcbcounter}, e.\,g.\ inside the title of
+the box. The real counter name is stored inside \docAuxCommand{tcbcounter}.
+
+\begin{newTcbKey}{auto counter}{}{no value, initially unset}
+Creates a new counter automatically.
+With \refKey{/tcb/new/number format} and
+\refKey{/tcb/new/number within}, the appearance and behavior of the counter
+can be changed. The counter value is referenced by \docAuxCommand{thetcbcounter}.
+
+\inputpreamblelisting{A}
+
+\begin{dispExample}
+\begin{pabox}[label={myautocounter}]{Title with number}
+This box is automatically numbered with \ref{myautocounter} on page
+\pageref{myautocounter}. Inside the box, the \thetcbcounter\ can
+also be referenced by |\thetcbcounter|.
+The real counter name is \texttt{\tcbcounter}.
+\end{pabox}
+\end{dispExample}
+\end{newTcbKey}
+
+\clearpage
+\begin{newTcbKey}{use counter from}{=\meta{tcolorbox}}{no default, initially unset}
+Here, a counter from another \meta{tcolorbox} is reused.
+Note that the setting for \refKey{/tcb/new/number format} and
+\refKey{/tcb/new/number within} are inherited and cannot be changed.
+The counter value is referenced by \docAuxCommand{thetcbcounter}.
+
+\begin{dispExample}
+\newtcolorbox[use counter from=pabox]{mybox}[2][]{%
+colback=blue!5!white,colframe=blue!75!black,fonttitle=\bfseries,
+title=Some Box \thetcbcounter: #2,#1}
+
+\begin{mybox}[label={myusecounterfrom}]{Title with continued number}
+This box is automatically numbered with \ref{myusecounterfrom} on page
+\pageref{myusecounterfrom}. Inside the box, the \thetcbcounter\ can
+also be referenced by |\thetcbcounter|.
+The real counter name is \texttt{\tcbcounter}.
+\end{mybox}
+\end{dispExample}
+\end{newTcbKey}
+
+
+\begin{newTcbKey}{use counter}{=\meta{counter}}{no default, initially unset}
+Here, an ordinary existing \LaTeX\ counter is used for numbering.
+With \refKey{/tcb/new/number format} and
+\refKey{/tcb/new/number within}, the appearance and behavior of the counter
+can be changed. The counter value is referenced by \docAuxCommand{thetcbcounter}.
+
+\begin{dispExample}
+% \newcounter{myexample}% preamble
+\newtcolorbox[use counter=myexample,number format=\Alph]{mybox}[2][]{%
+colback=green!5!white,colframe=green!55!black,fonttitle=\bfseries,
+title=Some Box \thetcbcounter: #2,#1}
+
+\begin{mybox}[label={myusecounter}]{Title with \LaTeX\ number}
+This box is automatically numbered with \ref{myusecounter} on page
+\pageref{myusecounter}. Inside the box, the \thetcbcounter\ can
+also be referenced by |\thetcbcounter|.
+The real counter name is \texttt{\tcbcounter}.
+\end{mybox}
+\end{dispExample}
+\end{newTcbKey}
+
+
+\begin{newTcbKey}{no counter}{}{no value, initially set}
+The created boxes are not numbered. This is the default. The option may
+be used to overrule a previous option.
+\end{newTcbKey}
+
+\clearpage
+\begin{newTcbKey}{number within}{=\meta{counter}}{no default, initially unset}
+The automatic counter is set to zero, if \meta{counter} is increased.
+Additionally, during output, the value of \meta{counter} is prepended to the value of
+the automatic counter.\par
+To prepend the automatic counter with the chapter number and to reset it
+with every new chapter, use:
+\begin{dispListing}
+number within=chapter
+\end{dispListing}
+See \refKey{/tcb/new/use counter} for a complete example.
+\end{newTcbKey}
+
+
+\begin{newTcbKey}{number format}{=\meta{format macro}}{no default, initially \texttt{\textbackslash arabic}}
+Declares the format of the automatic counter. The \meta{format macro} can be
+any valid \LaTeX\ number formatting macro like |\arabic|, |\roman|, etc.\par
+To display the counter value in large roman numbers, use:
+\begin{dispListing}
+number format=\Roman
+\end{dispListing}
+See \refKey{/tcb/new/auto counter} for a complete example.
+\end{newTcbKey}
+
+
+\begin{newTcbKey}{number freestyle}{=\meta{code}}{no default, initially unset}
+Allows advanced control over the complete number format. This option overrules
+the format given by \refKey{/tcb/new/number within} and \refKey{/tcb/new/number format}.
+Nevertheless, you can combine it with \refKey{/tcb/new/number within} to
+get the desired reset property.\par
+The \meta{code} is some formatting code which should contain |\tcbcounter| to
+reference the automated counter. Since this \meta{code} is expanded, you have
+to secure each macro with |\noexpand| with \emph{exception} of |\tcbcounter|.
+
+\inputpreamblelisting{H}
+
+\begin{dispExample}
+\begin{phbox}[label={myfreestyle}]{Title with freestyle number}
+This box is automatically numbered with \ref{myfreestyle} on page
+\pageref{myfreestyle}. Inside the box, the \thetcbcounter\ can
+also be referenced by |\thetcbcounter|.
+The real counter name is \texttt{\tcbcounter}.
+\end{phbox}
+\end{dispExample}
+\end{newTcbKey}
+
+
+\clearpage
+\subsection{Lists of \texttt{tcolorbox}es}\label{sec:listsof}
+For figures and tables, \LaTeX\ provides the |\listoffigures| and
+|\listoftables| commands to create lists of these numbered entities.
+Also, a |tcolorbox| can be part of such a kind of list.
+\begin{enumerate}
+\item Assign a list \meta{name} by the \emph{initialization} option
+ \refKey{/tcb/new/list inside}.
+\item Optionally, a new \meta{type} for list entries may be assigned
+ by the \emph{initialization} option \refKey{/tcb/new/list type}.
+\item List entries a generated automatically within each new |tcolorbox|
+ using the above initialization.
+ \begin{itemize}
+ \item If \refKey{/tcb/list entry} is set, the entry is generated with it.
+ \item Otherwise, if \refKey{/tcb/title} is set, the entry is generated with it.
+ \item Otherwise, the entry is generated with the current number and the environment name.
+ \end{itemize}
+\item The generated list is displayed by \refCom{tcblistof}.
+\end{enumerate}
+
+\begin{newTcbKey}{list inside}{=\meta{name}}{no default, initially unset}
+Assigns a list or contents file to the generated |tcolorbox|es.
+Entries to this list are saved to a file which gets the \meta{name} as
+file name extension. The list is references by this name in
+\refCom{tcblistof}.
+For example:
+\begin{dispListing}
+list inside=exam
+\end{dispListing}
+See Section \ref{listing:exercises} from page \pageref{listing:exercises}
+for a complete example.
+\end{newTcbKey}
+
+
+\begin{newTcbKey}{list type}{=\meta{type}}{no default, initially |tcolorbox|}
+Optionally, some \meta{type} can be assigned to the list entries.
+For a new \meta{type}, a macro |\l@|\meta{type} has to exist which controls
+the format of the list entry. The default type is defined by
+\begin{dispListing}
+\newcommand*\l@tcolorbox{\@dottedtocline{1}{1.5em}{2.3em}}
+\end{dispListing}
+This is identical to the |\l@section| setting of \LaTeX. |\l@tcolorbox| can
+be redefined or a new \meta{type} can be assigned.
+\end{newTcbKey}
+
+
+\begin{docCommand}{tcblistof}{\oarg{macro}\marg{name}\marg{title text}}
+Displays the generated list of |tcolorbox|es with the given \meta{name}.
+The heading is generated by \meta{macro}\marg{title text} where \texttt{\textbackslash section}
+is the default setting for \meta{macro}.\par
+To display the list inside a subsection, use for example:
+\begin{dispListing}
+\tcblistof[\subsection]{exam}{List of Exercises}
+\end{dispListing}
+The result of the example is found as Subsection \ref{listofexercises} on
+page \pageref{listofexercises}.
+\begin{marker}
+The core of the list is generated by |\@starttoc|\marg{name} which
+can be wrapped into an own macro.
+\end{marker}
+\end{docCommand}
+
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 c6330c6a44a..d009fce353d 100644
--- a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.intro.tex
+++ b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.intro.tex
@@ -44,12 +44,13 @@ 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.
+|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}, |verbatim| \cite{schoepf:2001a},
+|etoolbox| \cite{lehmann:2011a},
and |environ| \cite{robertson:2013a}.
|tcolorbox| itself is loaded in the usual manner in the preamble:
\begin{dispListing}
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 317ad7e5166..6bbac3e8cb5 100644
--- a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.listings.tex
+++ b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.listings.tex
@@ -98,7 +98,7 @@ This \textbf{text} is written to a standardized file for later usage.
\clearpage
-\begin{docCommand}{newtcblisting}{\marg{name}\oarg{number}\oarg{default}\marg{options}}
+\begin{docCommand}{newtcblisting}{\oarg{init options}\marg{name}\oarg{number}\oarg{default}\marg{options}}
Creates a new environment \meta{name} based on \refEnv{tcblisting}.
Basically, |\newtcblisting| operates like |\newenvironment|. This means,
the new environment \meta{name} optionally takes \meta{number} arguments, where
@@ -106,6 +106,8 @@ This \textbf{text} is written to a standardized file for later usage.
The \meta{options} are given to the underlying |tcblisting|.
Note that \refKey{/tcb/savedelimiter} is set to the given \meta{name}
automatically.
+ The \meta{init options} allow to set up automatic numbering,
+ see Section \ref{sec:initkeys} from page \pageref{sec:initkeys}.
\begin{dispExample*}{sbs,lefthand ratio=0.5}
\newtcblisting{mybox}{%
colback=red!5!white,
@@ -146,13 +148,76 @@ This is my \LaTeX\ box.
This is my
\LaTeX\ box.
\end{mybox}
+\end{dispExample*}
+
+\inputpreamblelisting{C}
+\begin{dispExample*}{sbs,lefthand ratio=0.5}
+\begin{mycbox}{Listing Box}
+This is my \LaTeX\ box.
+\end{mycbox}
\end{dispExample*}
+
\end{docCommand}
\clearpage
+\begin{docCommand}{newtcbinputlisting}{\oarg{init options}\marg{\texttt{\textbackslash}name}\oarg{number}\oarg{default}\marg{options}}
+ Creates a new macro \meta{\texttt{\textbackslash}name} based on \refCom{tcbinputlisting}.
+ Basically, |\newtcbinputlisting| 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 |tcbinputlisting|.
+ The \meta{init options} allow to set up automatic numbering,
+ see Section \ref{sec:initkeys} from page \pageref{sec:initkeys}.
+
+\begin{dispExample}
+\newtcbinputlisting[use counter from=mycbox]{\mylisting}[2][]{%
+ listing file={#2},
+ title=Listing (\thetcbcounter) of \texttt{#2},
+ colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries,
+ listing only,breakable,#1}
+
+\mylisting[before upper=\textit{This is the included file content:}]
+ {\jobname.tcbtemp}
+\end{dispExample}
+
+% \begin{dispExample*}{sbs,lefthand ratio=0.6}
+% \newtcbinputlisting{\mybox}{colback=red!5!white,
+ % colframe=red!75!black}
+%
+% \mybox{This is my own box.}
+% \end{dispExample*}
+%
+% \begin{dispExample*}{sbs,lefthand ratio=0.6}
+% \newtcbinputlisting{\mybox}[1]{colback=red!5!white,
+ % colframe=red!75!black,fonttitle=\bfseries,
+ % title=#1}
+%
+% \mybox{Hello there}{This is my own box.}
+% \end{dispExample*}
+%
+% \begin{dispExample*}{sbs,lefthand ratio=0.6}
+% \newtcbinputlisting{\mybox}[2][]{colback=red!5!white,
+ % colframe=red!75!black,fonttitle=\bfseries,
+ % title=#2,#1}
+%
+% \mybox[colback=yellow]{Hello there}%
+ % {This is my own box.}
+% \end{dispExample*}
+%
+% \inputpreamblelisting{B}
+%
+% \begin{dispExample*}{sbs,lefthand ratio=0.6}
+% \pbbox[colback=yellow]{Hello there}%
+ % {This is my own box.}
+% \end{dispExample*}
+
+\end{docCommand}
+
+
+\clearpage
\subsection{Option Keys of the Library}
For the \meta{options} in \refEnv{tcblisting} respectively \refCom{tcbinputlisting}
the following |pgf| keys can be applied. The key tree path |/tcb/| is not to
@@ -360,23 +425,17 @@ The following source code gives a guideline for the creation of \LaTeX\ tutorial
In the next section, a framework for \LaTeX\ exercises is described.
All examples shall be numbered optionally.
-Firstly, some additional |tcb| keys are defined for the appearance and automatic
-numbering.
+Firstly, some additional |tcb| keys are defined for the appearance.
+For the examples, three environments |texexp|, |texexptitled|,
+and |texexptitledspec| are defined with automatic numbering.
-\begin{dispListing}
-%\newcounter{texexp} % preamble
-
-\tcbset{
- 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/.style 2 args={texexp,
- step and label={texexp}{#2},
- title={Example \thetexexp: #1}},
-}
-\end{dispListing}
-\tcbusetemp
+\begin{itemize}
+\item |texexp| is used for untitled examles,
+\item |texexptitled| is used for titled examles,
+\item |texexptitledspec| is used for titled examles with special treatment.
+\end{itemize}
+\inputpreamblelisting{D}
\begin{dispExample}
\begin{tcblisting}{texexp}
@@ -387,27 +446,11 @@ and in compiled form.
\begin{dispExample}
-\begin{tcblisting}{example={Direct application of \texttt{example}}{firstExample}}
+\begin{texexptitled}{First example with a title line}{firstExample}
Here, we use Example \ref{firstExample} with a title line.
-\end{tcblisting}
+\end{texexptitled}
\end{dispExample}
-For the next examples, two environments
-|texexp| and |texexptitled|
-are defined for abbreviation.
-
-\begin{dispListing}
-\newtcblisting{texexp}[1]{texexp,#1}
-
-\newtcblisting{texexptitled}[3][]{example={#2}{#3},#1}
-\end{dispListing}
-\tcbusetemp
-
-For special cases, |tcolorbox| with the key
-|texexp| can be used instead of these two environments.
-
-Now, we have a flexible box for \LaTeX\ examples which is demonstrated in
-the following.
\begin{dispExample}
\begin{texexp}{}
@@ -472,15 +515,15 @@ on page \pageref{heading3}.
\begin{dispExample}
-\begin{tcolorbox}[example={Direct application of the style |texexp|}{texexpbox1}]
+\begin{texexptitledspec}{Special application}{texexpbox1}
\begin{lstlisting}[style=tcblatex]
Some \LaTeX\ source code.
\end{lstlisting}
\tcblower
-For special cases, the environment |tcolorbox| with style
+For special cases, the environment |texexptitledspec| with style
|example| can be used directly. As one can see, the upper and the lower
part of the box can be used uncoupled also.
-\end{tcolorbox}
+\end{texexptitledspec}
\end{dispExample}
@@ -584,7 +627,7 @@ processing. The solution contents themselves are saved to a subdirectory named
\newwrite\solout
\def\openoutsol{\immediate\openout\solout\jobname.sol}
\def\solfile#1{solutions/texercise#1.tex}
-\def\writesol#1{\immediate\write\solout{\noexpand\processsol{\thetexercise}{#1}}}%
+\def\writesol#1{\immediate\write\solout{\noexpand\processsol{\thetcbcounter}{#1}}}%
\def\closeoutsol{\immediate\closeout\solout}
\def\inputsol{\IfFileExists{\jobname.sol}{\input{\jobname.sol}}{}}
\end{dispListing}
@@ -622,6 +665,8 @@ and the label |sol:|\meta{marker} is used to mark the solution.
With these preparations, the kernel environment |texercise| for our
exercises is created quickly:
+\inputpreamblelisting{E}
+
\begin{dispListing}
\newtcolorbox{texercise}[2][]{texercisestyle,
listing file={\solfile\thetexercise},
@@ -629,7 +674,7 @@ exercises is created quickly:
title={Exercise \arabic{texercise}%
\hfill\mdseries Solution on page \pageref{sol:#2}},#1}
\end{dispListing}
-\tcbusetemp
+%\tcbusetemp
The following examples demonstrate the application.
\openoutsol
@@ -727,10 +772,19 @@ total line width.\par\smallskip
\tcbusetemplisting\par\smallskip\tcbusetemp%
\end{texercise}
\end{dispExample}
+\closeoutsol
+\bigskip
+Now, we give a list of all exercises with:
-\closeoutsol
+\begin{dispListing}
+\tcblistof[\subsection]{exam}{List of Exercises%
+ \label{listofexercises}}
+\end{dispListing}
+\tcbusetemp
+
+\clearpage
\subsection{Solutions for the given \LaTeX\ Exercises}
For all solutions, a macro |\processsol| was written to the file |\jobname.sol|.
@@ -742,7 +796,7 @@ Now, we need a definition for this macro to use the solutions.
\tcbinputlisting{texercisestyle,listing only,
phantom={\phantomsection\label{sol:#2}},%
title={Solution for Exercise \ref{exe:#2} on page \pageref{exe:#2}},
- listing file={\solfile#1}}}
+ listing file={\solfile{#1}}}}
\end{dispListing}
\tcbusetemp
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 236d3eb4ff3..8766b6d1eff 100644
--- a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.theorems.tex
+++ b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.theorems.tex
@@ -10,32 +10,69 @@ This also loads the package |amsmath|.
\subsection{Macros of the Library}
-\begin{docCommand}{tcbmaketheorem}{\marg{name}\marg{display name}\marg{options}\marg{counter}\marg{prefix}}
+
+\begin{docCommand}{newtcbtheorem}{\oarg{init options}\marg{name}\marg{display name}\marg{options}\marg{prefix}}
Creates a new environment \meta{name} based on |tcolorbox| to frame a
(mathematical) theorem. The \meta{display name} is used in the title line
with a number, e.\,g. \mbox{\flqq Theorem 5.1\frqq}.
The \meta{options} are given to the underlying |tcolorbox| to control
the appearance.
- The \meta{counter} is used for automatic numbering.
+ %The \meta{counter} is used for automatic numbering.
+ The \meta{init options} allow to set up automatic numbering,
+ see Section \ref{sec:initkeys} from page \pageref{sec:initkeys}.\par
The new environment \meta{name} takes one optional and two mandatory
parameters. The optional parameter supplements the options and should be
used only in rare cases.
The first mandatory parameter is the title text for the theorem and
the second mandatory parameter is a \meta{marker}. The theorem is
automatically labeled with \meta{prefix}|:|\meta{marker}.
+
+\enlargethispage*{20mm}
+\inputpreamblelisting{F}
+\begin{dispExample}
+\begin{mytheo}{This is my title}{theoexample}
+ This is the text of the theorem. The counter is automatically assigned and,
+ in this example, prefixed with the section number. This theorem is numbered with
+ \ref{th:theoexample} and is given on page \pageref{th:theoexample}.
+\end{mytheo}
+\end{dispExample}
+
\begin{dispExample}
-\tcbmaketheorem{theo}{My Theorem}{colback=green!5,colframe=green!35!black,
- fonttitle=\bfseries}{texercise}{th}
-
-\begin{theo}{This is my title}{theoexample}
- This is the text of the theorem. As can be seen, the counter \texttt{texercise}
- is reused. The theorem is numbered with \ref{th:theoexample} and is
- given on page \pageref{th:theoexample}.
-\end{theo}
+\begin{mytheo}[label=myownlabel]{This is my title}{}
+ The label parameter can be left empty without \LaTeX\ error.
+ Or you may use an own label to reference Theorem \ref{myownlabel}.
+\end{mytheo}
+\end{dispExample}
+
+\begin{dispExample}
+\begin{mytheo}{}{}
+ The title can also be left empty without problem. Note that the ':'
+ vanished magically.
+\end{mytheo}
\end{dispExample}
\end{docCommand}
+\clearpage
+\begin{deprecated}
+\begin{docCommand}{tcbmaketheorem}{\oarg{init options}\marg{name}\marg{display name}\marg{options}\marg{counter}\marg{prefix}}
+ Creates a new environment \meta{name} based on |tcolorbox| to frame a
+ (mathematical) theorem. The \meta{display name} is used in the title line
+ with a number, e.\,g. \mbox{\flqq Theorem 5.1\frqq}.
+ The \meta{options} are given to the underlying |tcolorbox| to control
+ the appearance.
+ The \meta{counter} is used for automatic numbering.
+ The \meta{init options} allow to set up automatic numbering,
+ see Section \ref{sec:initkeys} from page \pageref{sec:initkeys}.\par
+ The new environment \meta{name} takes one optional and two mandatory
+ parameters. The optional parameter supplements the options and should be
+ used only in rare cases.
+ The first mandatory parameter is the title text for the theorem and
+ the second mandatory parameter is a \meta{marker}. The theorem is
+ automatically labeled with \meta{prefix}|:|\meta{marker}.
+\end{docCommand}
+\end{deprecated}
+
\begin{docCommand}{tcboxmath}{\oarg{options}\marg{mathematical box content}}
Creates a \refEnv{tcolorbox} which is fitted to the width of the given
\meta{mathematical box content}. This box is intended to be applied as
@@ -54,6 +91,7 @@ This also loads the package |amsmath|.
\end{docCommand}
\clearpage
+
\begin{docCommand}{tcbhighmath}{\oarg{options}\marg{mathematical box content}}
This is a special case of the \refCom{tcboxmath} macro which uses
the style \refKey{/tcb/highlight math}.
@@ -63,7 +101,7 @@ This also loads the package |amsmath|.
\begin{dispExample}
\tcbset{myformula/.style={colback=yellow!10!white,colframe=red!50!black,
- highlight math style={reset,colback=LightBlue!50!white,colframe=Navy}}}
+ highlight math style={colback=LightBlue!50!white,colframe=Navy}}}
\begin{align}
\tcbhighmath{\sum\limits_{n=1}^{\infty} \frac{1}{n}} &= \infty.\\
@@ -330,31 +368,13 @@ the colored boxes. It is assumed that theorems and corollaries should be
identically colored.
All following environments are numbered with a common counter, but this
can be changed easily. Here, the counter output is supplemented by
-the section number.
+the subsection number.
-\begin{dispListing}
-%\newcounter{mytheorem}[section] % preamble
-\def\themytheorem{\thesection.\arabic{mytheorem}}
-
-\tcbset{
- defstyle/.style={fonttitle=\bfseries\upshape, fontupper=\slshape,
- arc=0mm, colback=blue!5!white,colframe=blue!75!black},
- theostyle/.style={fonttitle=\bfseries\upshape, fontupper=\slshape,
- colback=red!10!white,colframe=red!75!black},
-}
-\end{dispListing}
-\tcbusetemp
+\inputpreamblelisting{G}
-By \refCom{tcbmaketheorem}, commonly numbered theorem environments are
+By \refCom{newtcbtheorem}, commonly numbered theorem environments are
created now. |defstyle| and |theostyle| are used for the appearance.
-\begin{dispListing}
-\tcbmaketheorem{Definition}{Definition}{defstyle}{mytheorem}{def}
-\tcbmaketheorem{Theorem}{Theorem}{theostyle}{mytheorem}{theo}
-\tcbmaketheorem{Corollary}{Corollary}{theostyle}{mytheorem}{cor}
-\end{dispListing}
-\tcbusetemp
-
Now, everything is prepared for the following examples.
\begin{dispExample}
@@ -414,12 +434,13 @@ referenced with the marker \texttt{cor:nullstellen}.\bigskip
\begin{dispExample}
% \tcbuselibrary{skins}
-\tcbmaketheorem{YetAnotherTheorem}{Theorem}{enhanced,frame hidden,
+\newtcbtheorem[use counter from=Definition]{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}
+ }{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
@@ -434,14 +455,15 @@ referenced with the marker \texttt{cor:nullstellen}.\bigskip
\begin{dispExample}
% \tcbuselibrary{skins}
-\tcbmaketheorem{YetAnotherTheorem}{Theorem}{enhanced,arc=0mm,outer arc=0mm,
+\newtcbtheorem[use counter from=Definition]{YetAnotherTheorem}{Theorem}%
+ {enhanced,arc=0mm,outer arc=0mm,
boxrule=0mm,toprule=1mm,bottomrule=1mm,left=1mm,right=1mm,
titlerule=0mm,toptitle=0mm,bottomtitle=1mm,top=0mm,
colframe=red!50!black,colback=red!5!white,coltitle=red!50!black,
title style={top color=yellow!50!white,bottom color=red!5!white,
middle color=yellow!50!white},
fonttitle=\bfseries\sffamily\normalsize,fontupper=\normalsize\itshape,
- }{mytheorem}{theo}
+ }{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
@@ -470,5 +492,30 @@ You need more attention for your theorems? Here, you are \ldots
\end{Theorem}
\end{dispExample}
+\clearpage
+Using \refCom{newtcbtheorem} is a convenient way to generate a new
+theorem type. On the other hand, it enforces to use a titled |tcolorbox|.
+If you prefer to have an embedded title, you may create a new theorem
+type with the more flexible \refCom{newtcolorbox} macro:
+\begin{dispExample}
+% \tcbuselibrary{skins}
+\newtcolorbox[use counter from=Definition]{YetAnotherTheorem}[3][%
+ enhanced,colframe=blue!50!black,colback=yellow!20!white,
+ drop fuzzy shadow=blue!50!black!50!white,boxrule=0.4pt,
+ fontupper=\itshape]{%
+ before upper={\textcolor{red!50!black}{\upshape\bfseries
+ Theorem~\thetcbcounter\ (#2)}\quad},
+ list entry={\numberline{\thetcbcounter}#2},%
+ label={theo:#3},#1}
+
+\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}
diff --git a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.pdf b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.pdf
index bbe315426a3..f57d4b89109 100644
--- a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.pdf
+++ b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.tex b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.tex
index cd0f87a6665..94e5b372b2c 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.33 (2013/07/04)
+%% The LaTeX package tcolorbox - version 2.40 (2013/07/15)
%% tcolorbox.tex: Manual
%%
%% -------------------------------------------------------------------------------------------
@@ -67,6 +67,7 @@
\tcbmakedocSubKey{docTcbKey}{tcb}
\tcbmakedocSubKey{langTcbKey}{tcb/doclang}
+\tcbmakedocSubKey{newTcbKey}{tcb/new}
\makeatletter
\def\index@Skin#1{\index{#1\idx@actual\texttt{#1} Skin}\index{Skins\idx@level#1\idx@actual\texttt{#1}}}
@@ -78,8 +79,8 @@
\newtcolorbox{marker}[1][]{marker,#1}
-\def\version{2.33}%
-\def\datum{2013/07/04}%
+\def\version{2.40}%
+\def\datum{2013/07/15}%
\makeindex
\hypersetup{
@@ -93,6 +94,8 @@
\newcounter{texercise}
\newcounter{mytheorem}[section]
+\newcounter{myexample}
+
\newcounter{example}
\newlength{\examlen}
@@ -108,11 +111,11 @@
endtcolorbox,endtcbverbatimwrite,newtcolorbox,newtcbox,newtcboxfit,tcbusetemp,
tcblower,tcbox,tcboxfit,tcbset,tcbuselibrary,tcolorbox,tcbverbatimwrite,
% listings
- endtcblisting,newtcblisting,
+ endtcblisting,newtcblisting,newtcbinputlisting,
tcblisting,tcbinputlisting,tcbuselistingtext,tcbuselistinglisting,tcbusetemplisting,
tcbfitdim,tcbfitsteps,
% theorems
- tcbmaketheorem,tcboxmath,tcbhighmath,
+ tcbmaketheorem,tcboxmath,tcbhighmath,thetcbcounter,newtcbtheorem,
% documentation
brackets,
colDef,colOpt,cs,
@@ -131,14 +134,14 @@
morekeywords={% core
adjusted,adjust,after,arc,auto,autoparskip,align,
before,bottom,boxsep,boxrule,bottomtitle,bottomrule,broken,basedim,
- collower,coltext,coltitle,colback,colframe,colupper,center,code,capture,check,
- equal,enlarge,enlargement,extrude,
- fontupper,fontlower,fonttitle,first,floatplacement,float,fit,fontsize,flushleft,flushright,
+ collower,coltext,coltitle,colback,colframe,colupper,center,code,capture,check,counter,
+ equal,enlarge,enlargement,extrude,every,box,higher,layers,
+ fontupper,fontlower,fonttitle,first,floatplacement,float,fit,fontsize,flushleft,flushright,freestyle,format,
group,gap,
height,
lowerbox,left,leftrule,lefttitle,leftupper,leftlower,lower,last,lefthand,label,
middle,minimum,maxstep,macros,
- notitle,natural,noparskip,nobeforeafter,nofloat,
+ notitle,natural,noparskip,nobeforeafter,nofloat,number,
parskip,parbox,phantom,page,
outer,oversize,overlay,odd,
right,rightrule,righttitle,rightupper,rightlower,righthand,ratio,
@@ -146,7 +149,7 @@
title,top,toptitle,toprule,titlerule,tabularx,tikz,toggle,tight,tempfile,text,
upper,unbroken,
valign,
- width,
+ width,within,
% listings
comment,
file,
@@ -207,14 +210,111 @@
sbs/.style={sidebyside,before lower app={\tcbset{sidebyside=false}}},%
innerbox/.style={reset,documentation listing style=mydocumentation,docexample/.style={docexample original},
},
- docexample/.style={colframe=Navy!50!ExampleFrame,colback=Navy!5!ExampleBack,fontlower=\footnotesize,
- bicolor,colbacklower=ExampleBack!5!white,drop fuzzy shadow,%,
- before upper={\tcbset{innerbox}},before lower={\tcbset{innerbox}}},
+ base example/.style={enhanced,colframe=Navy!50!ExampleFrame,colback=Navy!5!ExampleBack,fontlower=\footnotesize,
+ bicolor,colbacklower=ExampleBack!5!white,drop fuzzy shadow},
+ docexample/.style={base example,%
+ every box on layer 2/.style={every box},
+ before upper={\tcbset{innerbox}},before lower={\tcbset{innerbox}}
+ },
docexample original/.style={colframe=ExampleFrame,colback=ExampleBack,fontlower=\footnotesize,frame style={}},
}
-%\includeonly{tcolorbox.doc.coreoptions}
+\newcommand{\inputpreamblelisting}[1]{%
+ \tcbinputlisting{title=Definition in the preamble:,
+ base example,coltitle=black,fonttitle=\itshape,titlerule=0pt,
+ colbacktitle=Navy!15!ExampleBack,
+ top=0mm,
+ before=\par\smallskip,%
+ listing style=mydocumentation,
+ listing only,listing file={\jobname_preamble_#1.tex}}%
+}
+
+\newtcolorbox{deprecated}{blank,breakable,watermark text=deprecated}
+
+%\tcbset{every box/.style={enhanced}}
+
+\begin{tcbverbatimwrite}{\jobname_preamble_A.tex}
+\newtcolorbox[auto counter,number within=section]{pabox}[2][]{%
+ colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries,
+ title=Examp.~\thetcbcounter: #2,#1}
+\end{tcbverbatimwrite}
+\input{\jobname_preamble_A.tex}
+
+\begin{tcbverbatimwrite}{\jobname_preamble_B.tex}
+% counter from previous example
+\newtcbox[use counter from=pabox]{\pbbox}[2][]{%
+ colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries,
+ title=(\thetcbcounter) #2,#1}
+\end{tcbverbatimwrite}
+\input{\jobname_preamble_B.tex}
+
+\begin{tcbverbatimwrite}{\jobname_preamble_C.tex}
+\newtcblisting[auto counter]{mycbox}[1]{%
+ colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries,
+ title=Listing \thetcbcounter: #1}
+\end{tcbverbatimwrite}
+\input{\jobname_preamble_C.tex}
+
+\begin{tcbverbatimwrite}{\jobname_preamble_D.tex}
+\tcbset{
+ 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/.style 2 args={texexp,
+ title={Example \thetcbcounter: #1},label={#2}},
+}
+
+\newtcblisting{texexp}[1]{texexp,#1}
+\newtcblisting[auto counter,number within=section]{texexptitled}[3][]{%
+ example={#2}{#3},#1}
+\newtcolorbox[use counter from=texexptitled]{texexptitledspec}[3][]{%
+ example={#2}{#3},#1}
+\end{tcbverbatimwrite}
+\input{\jobname_preamble_D.tex}
+
+\begin{tcbverbatimwrite}{\jobname_preamble_E.tex}
+\newtcolorbox[auto counter,number within=section,list inside=exam]%
+ {texercise}[2][]{texercisestyle,
+ listing file={\solfile\thetcbcounter},label={exe:#2},
+ phantom={\writesol{#2}},
+ title={Exercise \thetcbcounter\hfill\mdseries Solution on page \pageref{sol:#2}},
+ list entry={\numberline{\thetcbcounter}Exercise with solution on
+ page \pageref{sol:#2}},#1}
+\end{tcbverbatimwrite}
+\input{\jobname_preamble_E.tex}
+
+\begin{tcbverbatimwrite}{\jobname_preamble_F.tex}
+\newtcbtheorem[number within=section]{mytheo}{My Theorem}%
+ {colback=green!5,colframe=green!35!black,fonttitle=\bfseries}{th}
+\end{tcbverbatimwrite}
+\input{\jobname_preamble_F.tex}
+
+
+\begin{tcbverbatimwrite}{\jobname_preamble_G.tex}
+\tcbset{
+ defstyle/.style={fonttitle=\bfseries\upshape, fontupper=\slshape,
+ arc=0mm, colback=blue!5!white,colframe=blue!75!black},
+ theostyle/.style={fonttitle=\bfseries\upshape, fontupper=\slshape,
+ colback=red!10!white,colframe=red!75!black},
+}
+\newtcbtheorem[number within=subsection]{Definition}{Definition}{defstyle}{def}
+\newtcbtheorem[use counter from=Definition]{Theorem}{Theorem}{theostyle}{theo}
+\newtcbtheorem[use counter from=Definition]{Corollary}{Corollary}{theostyle}{cor}
+\end{tcbverbatimwrite}
+\input{\jobname_preamble_G.tex}
+
+
+\begin{tcbverbatimwrite}{\jobname_preamble_H.tex}
+\newtcolorbox[auto counter,number within=section,
+ number freestyle={(Q/\noexpand\thesection/\noexpand\Alph{\tcbcounter})},
+ ]{phbox}[2][]{%
+ colback=yellow!15!white,colframe=blue!75!black,fonttitle=\bfseries,
+ title=Question~\thetcbcounter: #2,#1}
+\end{tcbverbatimwrite}
+\input{\jobname_preamble_H.tex}
+
+%\includeonly{tcolorbox.doc.abstract,tcolorbox.doc.coreoptions}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -224,6 +324,7 @@
\include{tcolorbox.doc.intro}
\include{tcolorbox.doc.coremacros}
\include{tcolorbox.doc.coreoptions}
+\include{tcolorbox.doc.initoptions}
\include{tcolorbox.doc.verbatim}
\include{tcolorbox.doc.skins}
\include{tcolorbox.doc.listings}
diff --git a/Master/texmf-dist/tex/latex/tcolorbox/tcbbreakable.code.tex b/Master/texmf-dist/tex/latex/tcolorbox/tcbbreakable.code.tex
index 587368a99a4..b4edf570e2c 100644
--- a/Master/texmf-dist/tex/latex/tcolorbox/tcbbreakable.code.tex
+++ b/Master/texmf-dist/tex/latex/tcolorbox/tcbbreakable.code.tex
@@ -1,4 +1,4 @@
-%% The LaTeX package tcolorbox - version 2.33 (2013/07/04)
+%% The LaTeX package tcolorbox - version 2.40 (2013/07/15)
%% tcbbreakable.code.tex: Code for breakable colorboxes
%%
%% -------------------------------------------------------------------------------------------
@@ -17,10 +17,10 @@
%%
%% This work consists of all files listed in README
%%
-\tcb@set@library@version{2.33}
+\tcb@set@library@version{2.40}
\let\tcb@parboxrestore@true=\tcb@parboxrestore
-\def\tcb@parboxrestore@false{\vskip-\parskip}
+\def\tcb@parboxrestore@false{\vskip-\parskip\linewidth\hsize}
\def\tcb@vbox#1#2{%
\edef\reserved@a{%
@@ -32,9 +32,13 @@
\reserved@a%
\@endpefalse%
\color@begingroup%
+ \textwidth\hsize%
+ \columnwidth\hsize%
\csname tcb@parboxrestore@\kvtcv@parbox\endcsname%
- \def\@mpfn{mpfootnote}\def\thempfn{\thempfootnote}\c@mpfootnote\z@%
- \let\@footnotetext\@mpfootnotetext%
+ \def\@mpfn{mpfootnote}%
+ \def\thempfn{\thempfootnote}%
+ \c@mpfootnote\z@%
+ \let\@footnotetext\@mpfootnotetext%
\@setminipage%
\ignorespaces%
\let\tcb@drawcolorbox=\tcb@drawcolorbox@standalone%
diff --git a/Master/texmf-dist/tex/latex/tcolorbox/tcbdocumentation.code.tex b/Master/texmf-dist/tex/latex/tcolorbox/tcbdocumentation.code.tex
index 1aaa04ff63d..9c8de529ae5 100644
--- a/Master/texmf-dist/tex/latex/tcolorbox/tcbdocumentation.code.tex
+++ b/Master/texmf-dist/tex/latex/tcolorbox/tcbdocumentation.code.tex
@@ -1,4 +1,4 @@
-%% The LaTeX package tcolorbox - version 2.33 (2013/07/04)
+%% The LaTeX package tcolorbox - version 2.40 (2013/07/15)
%% tcbdocumentation.code.tex: Code for LaTeX documentations
%%
%% -------------------------------------------------------------------------------------------
@@ -17,7 +17,7 @@
%%
%% This work consists of all files listed in README
%%
-\tcb@set@library@version{2.33}
+\tcb@set@library@version{2.40}
\tcbuselibrary{listings}
@@ -26,6 +26,7 @@
\RequirePackage{marvosym}[2011/07/20]
\RequirePackage{hyperref}[2012/02/06]
\RequirePackage{makeidx}[2000/03/29]
+\RequirePackage{refcount}[2011/10/16]
\definecolor{Option}{rgb}{0.118,0.546,0.222}
\definecolor{Definition}{rgb}{0.784,0.06,0.176}
@@ -160,14 +161,14 @@
\def\manual@top#1{\itemsep=0pt\parskip=0pt\item\strut{#1}\par\topsep=0pt}
% main documentation environments
-\newenvironment{docCommand}[2]{\begin{manual@entry}%
- \hypertarget{com:#1}{\manual@top{\disp@com{\cs{#1}}\index@Com{#1}\protected@edef\@currentlabel{\noexpand\cs{#1}}\label{com:#1}{\ttfamily #2}}}}%
+\newenvironment{docCommand}[3][]{\begin{manual@entry}%
+ \tcbset{#1}\hypertarget{com:#2}{\manual@top{\disp@com{\cs{#2}}\index@Com{#2}\protected@edef\@currentlabel{\noexpand\cs{#2}}\label{com:#2}{\ttfamily #3}}}}%
{\end{manual@entry}}
-\newenvironment{docEnvironment}[2]{\begin{manual@entry}%
- \hypertarget{env:#1}{\manual@top{\cs{begin}\brackets{\disp@com{#1}}\index@Env{#1}\protected@edef\@currentlabel{#1}\label{env:#1}{\ttfamily #2}}}%
+\newenvironment{docEnvironment}[3][]{\begin{manual@entry}%
+ \tcbset{#1}\hypertarget{env:#2}{\manual@top{\cs{begin}\brackets{\disp@com{#2}}\index@Env{#2}\protected@edef\@currentlabel{#2}\label{env:#2}{\ttfamily #3}}}%
\manual@top{~~\meta{\kvtcb@text@envcontent}}%
- \manual@top{\cs{end}\brackets{\disp@com{#1}}}}%
+ \manual@top{\cs{end}\brackets{\disp@com{#2}}}}%
{\end{manual@entry}}
\newenvironment{docKey}[4][\@empty]{\begin{manual@entry}%
@@ -186,11 +187,24 @@
\def\docColor#1{\disp@com{#1}\index@Col{#1}}%
\def\docAuxCommand#1{\disp@com{\cs{#1}}\index@Com{#1}}%
-\def\ref@doc#1{\hyperlink{#1}{\texttt{\ref*{#1}}\textsuperscript{\ding{213}\,\kvtcb@text@pageshort\,\pageref*{#1}}}}
+\setrefcountdefault{-1}
+\def\ref@doc#1{\hyperlink{#1}{\texttt{\ref*{#1}}%
+ \ifnum\getpagerefnumber{#1}=\thepage\else%
+ \textsuperscript{\ding{213}\,\kvtcb@text@pageshort\,\pageref*{#1}}\fi}}
-\def\refCom#1{\ref@doc{com:#1}}
-\def\refEnv#1{\ref@doc{env:#1}}
-\def\refKey#1{\ref@doc{key:#1}}
+\def\ref@doc@star#1{\hyperlink{#1}{\texttt{\ref*{#1}}}}
+
+\def\refCom@#1{\ref@doc{com:#1}}
+\def\refCom@star#1{\ref@doc@star{com:#1}}
+\def\refCom{\@ifstar\refCom@star\refCom@}
+
+\def\refEnv@#1{\ref@doc{env:#1}}
+\def\refEnv@star#1{\ref@doc@star{env:#1}}
+\def\refEnv{\@ifstar\refEnv@star\refEnv@}
+
+\def\refKey@#1{\ref@doc{key:#1}}
+\def\refKey@star#1{\ref@doc@star{key:#1}}
+\def\refKey{\@ifstar\refKey@star\refKey@}
\newenvironment{absquote}
{\list{}{\leftmargin2cm\rightmargin\leftmargin}%
diff --git a/Master/texmf-dist/tex/latex/tcolorbox/tcbfitting.code.tex b/Master/texmf-dist/tex/latex/tcolorbox/tcbfitting.code.tex
index 0ce78004d7b..6305645aa4a 100644
--- a/Master/texmf-dist/tex/latex/tcolorbox/tcbfitting.code.tex
+++ b/Master/texmf-dist/tex/latex/tcolorbox/tcbfitting.code.tex
@@ -1,4 +1,4 @@
-%% The LaTeX package tcolorbox - version 2.33 (2013/07/04)
+%% The LaTeX package tcolorbox - version 2.40 (2013/07/15)
%% tcbfitting.code.tex: Code for fit boxes
%%
%% -------------------------------------------------------------------------------------------
@@ -18,7 +18,7 @@
%% This work consists of all files listed in README
%%
%\makeatletter
-\tcb@set@library@version{2.33}
+\tcb@set@library@version{2.40}
\newdimen\tcbfitdim
\newdimen\tcb@lowerfitdim
@@ -55,13 +55,18 @@
\def\tcb@@capture@fitbox{%
\let\endtcolorbox=\relax%
- \Collect@Body\tcbox@inner@fitbox%
+ \Collect@Body\tcbox@inner@fitbox@collected%
}
\def\tcbfontsize#1{\fontsize{#1\tcbfitdim}{#1\dimexpr\kvtcb@fit@skip\tcbfitdim}\selectfont}
\def\tcb@setfontsize#1#2{\@setfontsize#1{#2\tcbfitdim}{#2\dimexpr\kvtcb@fit@skip\tcbfitdim}}
+\long\def\tcbox@inner@fitbox@collected#1{%
+ \tcbox@inner@fitbox{#1}%
+ \tcb@finalize@environment%
+}
+
\long\def\tcbox@inner@fitbox#1{%
\tcbset{breakable@false,sidebyside=false}%
\let\tcb@val@raisebase=\tcb@zpt%
@@ -246,17 +251,41 @@
\tcb@ox{capture=fitbox,#1}{#2}%
}
-\long\def\tcb@newtcboxfit#1#2{\newcommand{#1}{\tcboxfit[#2]}}
-\long\def\tcb@new@tcboxfit#1[#2]#3{\newcommand{#1}[#2]{\tcboxfit[#3]}}
+\long\def\tcb@newtcboxfit#1#2{\expandafter\newcommand\csname#1\endcsname{\tcboxfit[#2,options@for=#1]}}
+
+\long\def\tcb@newtcboxfit@#1[#2]#3{\expandafter\newcommand\csname#1\endcsname[#2]{\tcboxfit[#3,options@for=#1]}}
+
+\long\def\tcb@newtcboxfit@@#1[#2][#3]#4{\expandafter\newcommand\csname#1\endcsname[#2][#3]{\tcboxfit[#4,options@for=#1]}}
+
+\long\def\tcb@new@tcboxfit@#1[#2]{%
+ \@ifnextchar[{\tcb@newtcboxfit@@{#1}[#2]}{\tcb@newtcboxfit@{#1}[#2]}}
+
+\long\def\tcb@new@tcboxfit#1{%
+ \preto\tcb@new@colopt{savedelimiter=#1}%
+ \cslet{tcb@opt@#1}{\tcb@new@colopt}%
+ \@ifnextchar[{\tcb@new@tcboxfit@{#1}}{\tcb@newtcboxfit{#1}}}
+
+\long\def\tcb@new@tcboxfit@opt[#1]#2{%
+ \tcb@proc@options@init{#1}{#2}%
+ \tcb@new@tcboxfit{#2}%
+}
+
+\long\def\tcb@new@tcboxfit@bs#1{%
+ \edef\temp{\tcb@remove@bs{#1}}%
+ \tcb@new@tcboxfit{\temp}%
+}
+
+\long\def\tcb@new@tcboxfit@opt@bs[#1]#2{%
+ \edef\temp{\tcb@remove@bs{#2}}%
+ \tcb@new@tcboxfit@opt[#1]{\temp}%
+}
-\long\def\tcb@new@@tcboxfit#1[#2][#3]#4{\newcommand{#1}[#2][#3]{\tcboxfit[#4]}}
+\long\def\newtcboxfit{%
+ \def\tcb@new@colopt{}%
+ \@ifnextchar[{\tcb@new@tcboxfit@opt@bs}{\tcb@new@tcboxfit@bs}}
-\long\def\new@tcboxfit#1[#2]{%
- \@ifnextchar[{\tcb@new@@tcboxfit{#1}[#2]}{\tcb@new@tcboxfit{#1}[#2]}}
-\long\def\newtcboxfit#1{%
- \@ifnextchar[{\new@tcboxfit{#1}}{\tcb@newtcboxfit{#1}}}
\tcbset{%
reset@fitting/.style={%
diff --git a/Master/texmf-dist/tex/latex/tcolorbox/tcbhooks.code.tex b/Master/texmf-dist/tex/latex/tcolorbox/tcbhooks.code.tex
index c1530e74ba5..c0cdd6ad05a 100644
--- a/Master/texmf-dist/tex/latex/tcolorbox/tcbhooks.code.tex
+++ b/Master/texmf-dist/tex/latex/tcolorbox/tcbhooks.code.tex
@@ -1,4 +1,4 @@
-%% The LaTeX package tcolorbox - version 2.33 (2013/07/04)
+%% The LaTeX package tcolorbox - version 2.40 (2013/07/15)
%% tcbhooks.code.tex: Code for adding hooks
%%
%% -------------------------------------------------------------------------------------------
@@ -18,36 +18,36 @@
%% This work consists of all files listed in README
%%
%\makeatletter
-\tcb@set@library@version{2.33}
+\tcb@set@library@version{2.40}
\tcbset{%
- before upper app/.code={\tcb@appto\kvtcb@before@upper{#1}},%
- before upper pre/.code={\tcb@preto\kvtcb@before@upper{#1}},%
- after upper app/.code={\tcb@appto\kvtcb@after@upper{#1}},%
- after upper pre/.code={\tcb@preto\kvtcb@after@upper{#1}},%
- before lower app/.code={\tcb@appto\kvtcb@before@lower{#1}},%
- before lower pre/.code={\tcb@preto\kvtcb@before@lower{#1}},%
- after lower app/.code={\tcb@appto\kvtcb@after@lower{#1}},%
- after lower pre/.code={\tcb@preto\kvtcb@after@lower{#1}},%
- before title app/.code={\tcb@appto\kvtcb@before@title{#1}},%
- before title pre/.code={\tcb@preto\kvtcb@before@title{#1}},%
- after title app/.code={\tcb@appto\kvtcb@after@title{#1}},%
- after title pre/.code={\tcb@preto\kvtcb@after@title{#1}},%
+ before upper app/.code={\appto\kvtcb@before@upper{#1}},%
+ before upper pre/.code={\preto\kvtcb@before@upper{#1}},%
+ after upper app/.code={\appto\kvtcb@after@upper{#1}},%
+ after upper pre/.code={\preto\kvtcb@after@upper{#1}},%
+ before lower app/.code={\appto\kvtcb@before@lower{#1}},%
+ before lower pre/.code={\preto\kvtcb@before@lower{#1}},%
+ after lower app/.code={\appto\kvtcb@after@lower{#1}},%
+ after lower pre/.code={\preto\kvtcb@after@lower{#1}},%
+ before title app/.code={\appto\kvtcb@before@title{#1}},%
+ before title pre/.code={\preto\kvtcb@before@title{#1}},%
+ after title app/.code={\appto\kvtcb@after@title{#1}},%
+ after title pre/.code={\preto\kvtcb@after@title{#1}},%
%
% usable inside the document or in the preamble after setting before / after
- before app/.code={\tcb@appto\kvtcb@beforebox{#1}},%
- before pre/.code={\tcb@preto\kvtcb@beforebox{#1}},%
- after app/.code={\tcb@appto\kvtcb@afterbox{#1}},%
- after pre/.code={\tcb@preto\kvtcb@afterbox{#1}},%
+ before app/.code={\appto\kvtcb@beforebox{#1}},%
+ before pre/.code={\preto\kvtcb@beforebox{#1}},%
+ after app/.code={\appto\kvtcb@afterbox{#1}},%
+ after pre/.code={\preto\kvtcb@afterbox{#1}},%
%
- overlay unbroken app/.code={\tcb@appto\tcb@overlay@unbroken{#1}},%
- overlay unbroken pre/.code={\tcb@preto\tcb@overlay@unbroken{#1}},%
- overlay first app/.code={\tcb@appto\tcb@overlay@first{#1}},%
- overlay first pre/.code={\tcb@preto\tcb@overlay@first{#1}},%
- overlay middle app/.code={\tcb@appto\tcb@overlay@middle{#1}},%
- overlay middle pre/.code={\tcb@preto\tcb@overlay@middle{#1}},%
- overlay last app/.code={\tcb@appto\tcb@overlay@last{#1}},%
- overlay last pre/.code={\tcb@preto\tcb@overlay@last{#1}},%
+ overlay unbroken app/.code={\appto\tcb@overlay@unbroken{#1}},%
+ overlay unbroken pre/.code={\preto\tcb@overlay@unbroken{#1}},%
+ overlay first app/.code={\appto\tcb@overlay@first{#1}},%
+ overlay first pre/.code={\preto\tcb@overlay@first{#1}},%
+ overlay middle app/.code={\appto\tcb@overlay@middle{#1}},%
+ overlay middle pre/.code={\preto\tcb@overlay@middle{#1}},%
+ overlay last app/.code={\appto\tcb@overlay@last{#1}},%
+ overlay last pre/.code={\preto\tcb@overlay@last{#1}},%
%
overlay app/.style={overlay unbroken app={#1},overlay first app={#1},overlay middle app={#1},overlay last app={#1}},%
overlay pre/.style={overlay unbroken pre={#1},overlay first pre={#1},overlay middle pre={#1},overlay last pre={#1}},%
@@ -59,16 +59,16 @@
overlay middle and last pre/.style={overlay middle pre={#1},overlay last pre={#1}},%
%
% skins:
- frame code app/.code={\tcb@appto\tcb@frame@code{#1}},%
- frame code pre/.code={\tcb@preto\tcb@frame@code{#1}},%
- interior titled code app/.code={\tcb@appto\tcb@interiortitled@code{#1}},%
- interior titled code pre/.code={\tcb@preto\tcb@interiortitled@code{#1}},%
- interior code app/.code={\tcb@appto\tcb@interior@code{#1}},%
- interior code pre/.code={\tcb@preto\tcb@interior@code{#1}},%
- segmentation code app/.code={\tcb@appto\tcb@segmentation@code{#1}},%
- segmentation code pre/.code={\tcb@preto\tcb@segmentation@code{#1}},%
- title code app/.code={\tcb@appto\tcb@segmentation@code{#1}},%
- title code pre/.code={\tcb@preto\tcb@segmentation@code{#1}},%
+ frame code app/.code={\appto\tcb@frame@code{#1}},%
+ frame code pre/.code={\preto\tcb@frame@code{#1}},%
+ interior titled code app/.code={\appto\tcb@interiortitled@code{#1}},%
+ interior titled code pre/.code={\preto\tcb@interiortitled@code{#1}},%
+ interior code app/.code={\appto\tcb@interior@code{#1}},%
+ interior code pre/.code={\preto\tcb@interior@code{#1}},%
+ segmentation code app/.code={\appto\tcb@segmentation@code{#1}},%
+ segmentation code pre/.code={\preto\tcb@segmentation@code{#1}},%
+ title code app/.code={\appto\tcb@segmentation@code{#1}},%
+ title code pre/.code={\preto\tcb@segmentation@code{#1}},%
%
watermark tikz app/.style={overlay app={\tcb@drawspec@watermark@tikz{#1}}},
watermark tikz pre/.style={overlay pre={\tcb@drawspec@watermark@tikz{#1}}},
diff --git a/Master/texmf-dist/tex/latex/tcolorbox/tcblistings.code.tex b/Master/texmf-dist/tex/latex/tcolorbox/tcblistings.code.tex
index c642a4583c7..9e3d2a12d1d 100644
--- a/Master/texmf-dist/tex/latex/tcolorbox/tcblistings.code.tex
+++ b/Master/texmf-dist/tex/latex/tcolorbox/tcblistings.code.tex
@@ -1,4 +1,4 @@
-%% The LaTeX package tcolorbox - version 2.33 (2013/07/04)
+%% The LaTeX package tcolorbox - version 2.40 (2013/07/15)
%% tcblistings.code.tex: Code for colorboxes with listings
%%
%% -------------------------------------------------------------------------------------------
@@ -18,7 +18,7 @@
%% This work consists of all files listed in README
%%
%\makeatletter
-\tcb@set@library@version{2.33}
+\tcb@set@library@version{2.40}
\RequirePackage{listings}[2007/02/22]
@@ -143,7 +143,16 @@
}
\long\def\tcbinputlisting#1{%
- \begingroup\tcbset{#1}\tcb@inputlisting\endgroup%
+ \begingroup%
+ \stepcounter{tcblayer}%
+ \ifnum\c@tcblayer>\tcb@managed@layers@max%
+ \else%
+ \tcbset{every box on layer \number\c@tcblayer}%
+ \tcbset{every box on layer \number\c@tcblayer/.style={}}%
+ \fi%
+ \addtocounter{tcblayer}{-1}%´
+ \tcbset{#1}%
+ \tcb@inputlisting\endgroup%
}
\newenvironment{tcboutputlisting}{%
@@ -156,17 +165,63 @@
\tcb@temp{\kvtcb@tempfile}%
}%
-\long\def\tcb@newtcblisting#1#2{\newenvironment{#1}{\tcblisting{savedelimiter=#1,#2}}{\endtcblisting}}
+\long\def\tcb@newtcblisting#1#2{\newenvironment{#1}{\tcblisting{#2,options@for=#1}}{\endtcblisting}}
+
+\long\def\tcb@newtcblisting@#1[#2]#3{\newenvironment{#1}[#2]{\tcblisting{#3,options@for=#1}}{\endtcblisting}}
+
+\long\def\tcb@newtcblisting@@#1[#2][#3]#4{\newenvironment{#1}[#2][#3]{\tcblisting{#4,options@for=#1}}{\endtcblisting}}
+
+\long\def\tcb@new@tcblisting@#1[#2]{%
+ \@ifnextchar[{\tcb@newtcblisting@@{#1}[#2]}{\tcb@newtcblisting@{#1}[#2]}}
+
+\long\def\tcb@new@tcblisting#1{%
+ \preto\tcb@new@colopt{savedelimiter=#1}%
+ \cslet{tcb@opt@#1}{\tcb@new@colopt}%
+ \@ifnextchar[{\tcb@new@tcblisting@{#1}}{\tcb@newtcblisting{#1}}}
+
+\long\def\tcb@new@tcblisting@opt[#1]#2{%
+ \tcb@proc@options@init{#1}{#2}%
+ \tcb@new@tcblisting{#2}%
+}
+
+\long\def\newtcblisting{%
+ \def\tcb@new@colopt{}%
+ \@ifnextchar[{\tcb@new@tcblisting@opt}{\tcb@new@tcblisting}}
+
-\long\def\tcb@new@tcblisting#1[#2]#3{\newenvironment{#1}[#2]{\tcblisting{savedelimiter=#1,#3}}{\endtcblisting}}
+\long\def\tcb@newtcbinputlisting#1#2{\expandafter\newcommand\csname#1\endcsname{\tcbinputlisting{#2,options@for=#1}}}
-\long\def\tcb@new@@tcblisting#1[#2][#3]#4{\newenvironment{#1}[#2][#3]{\tcblisting{savedelimiter=#1,#4}}{\endtcblisting}}
+\long\def\tcb@newtcbinputlisting@#1[#2]#3{\expandafter\newcommand\csname#1\endcsname[#2]{\tcbinputlisting{#3,options@for=#1}}}
+
+\long\def\tcb@newtcbinputlisting@@#1[#2][#3]#4{\expandafter\newcommand\csname#1\endcsname[#2][#3]{\tcbinputlisting{#4,options@for=#1}}}
+
+\long\def\tcb@new@tcbinputlisting@#1[#2]{%
+ \@ifnextchar[{\tcb@newtcbinputlisting@@{#1}[#2]}{\tcb@newtcbinputlisting@{#1}[#2]}}
+
+\long\def\tcb@new@tcbinputlisting#1{%
+ \preto\tcb@new@colopt{savedelimiter=#1}%
+ \cslet{tcb@opt@#1}{\tcb@new@colopt}%
+ \@ifnextchar[{\tcb@new@tcbinputlisting@{#1}}{\tcb@newtcbinputlisting{#1}}}
+
+\long\def\tcb@new@tcbinputlisting@opt[#1]#2{%
+ \tcb@proc@options@init{#1}{#2}%
+ \tcb@new@tcbinputlisting{#2}%
+}
+
+\long\def\tcb@new@tcbinputlisting@bs#1{%
+ \edef\temp{\tcb@remove@bs{#1}}%
+ \tcb@new@tcbinputlisting{\temp}%
+}
+
+\long\def\tcb@new@tcbinputlisting@opt@bs[#1]#2{%
+ \edef\temp{\tcb@remove@bs{#2}}%
+ \tcb@new@tcbinputlisting@opt[#1]{\temp}%
+}
-\long\def\new@tcblisting#1[#2]{%
- \@ifnextchar[{\tcb@new@@tcblisting{#1}[#2]}{\tcb@new@tcblisting{#1}[#2]}}
+\long\def\newtcbinputlisting{%
+ \def\tcb@new@colopt{}%
+ \@ifnextchar[{\tcb@new@tcbinputlisting@opt@bs}{\tcb@new@tcbinputlisting@bs}}
-\long\def\newtcblisting#1{%
- \@ifnextchar[{\new@tcblisting{#1}}{\tcb@newtcblisting{#1}}}
\tcbset{%
reset@listings/.style={%
diff --git a/Master/texmf-dist/tex/latex/tcolorbox/tcblistingsutf8.code.tex b/Master/texmf-dist/tex/latex/tcolorbox/tcblistingsutf8.code.tex
index 180a53d3801..e97c59f903b 100644
--- a/Master/texmf-dist/tex/latex/tcolorbox/tcblistingsutf8.code.tex
+++ b/Master/texmf-dist/tex/latex/tcolorbox/tcblistingsutf8.code.tex
@@ -1,4 +1,4 @@
-%% The LaTeX package tcolorbox - version 2.33 (2013/07/04)
+%% The LaTeX package tcolorbox - version 2.40 (2013/07/15)
%% tcblistingsutf8.code.tex: Code for colorboxes with listings in UTF-8
%%
%% -------------------------------------------------------------------------------------------
@@ -17,7 +17,7 @@
%%
%% This work consists of all files listed in README
%%
-\tcb@set@library@version{2.33}
+\tcb@set@library@version{2.40}
\RequirePackage{listingsutf8}[2011/11/10]
\tcbuselibrary{listings}
diff --git a/Master/texmf-dist/tex/latex/tcolorbox/tcbskins.code.tex b/Master/texmf-dist/tex/latex/tcolorbox/tcbskins.code.tex
index 07710cd7b4b..04be331c9ff 100644
--- a/Master/texmf-dist/tex/latex/tcolorbox/tcbskins.code.tex
+++ b/Master/texmf-dist/tex/latex/tcolorbox/tcbskins.code.tex
@@ -1,4 +1,4 @@
-%% The LaTeX package tcolorbox - version 2.33 (2013/07/04)
+%% The LaTeX package tcolorbox - version 2.40 (2013/07/15)
%% tcbskins.code.tex: Code for colorboxes with different skins
%%
%% -------------------------------------------------------------------------------------------
@@ -17,7 +17,7 @@
%%
%% This work consists of all files listed in README
%%
-\tcb@set@library@version{2.33}
+\tcb@set@library@version{2.40}
\RequirePackage{tikz}[2010/10/13]
@@ -765,7 +765,7 @@
}
\def\tcb@drawspec@watermark@tikz#1{%
- \setbox\tcb@waterbox=\hbox{\pgfinterruptpicture{\begin{tikzpicture}[color=\kvtcb@watermark@color]#1\end{tikzpicture}}\endpgfinterruptpicture}%
+ \setbox\tcb@waterbox=\hbox{\pgfinterruptpicture{\pgfsetbaseline{0pt}\begin{tikzpicture}[color=\kvtcb@watermark@color]#1\end{tikzpicture}}\endpgfinterruptpicture}%
\tcb@drawspec@watermark%
}
@@ -919,7 +919,7 @@
}
\tcbset{%
- border@line app/.code={\tcb@appto\kvtcb@borderline{#1}},%
+ border@line app/.code={\appto\kvtcb@borderline{#1}},%
borderline/.style args={#1#2#3}{border@line app={\tcb@border{#1}{#2}{#3}}},%
no borderline/.code={\def\kvtcb@borderline{}},%
}
@@ -989,7 +989,7 @@
\tcbset{%
- shad@w app/.code={\tcb@appto\kvtcb@shadow{#1}},%
+ shad@w app/.code={\appto\kvtcb@shadow{#1}},%
shadow/.style args={#1#2#3#4}{shad@w app={\tcb@shadow{#1}{#2}{#3}{#4}}},%
no shadow/.code={\def\kvtcb@shadow{}},%
fuzzy shadow/.style args={#1#2#3#4#5}{shad@w app={%
diff --git a/Master/texmf-dist/tex/latex/tcolorbox/tcbtheorems.code.tex b/Master/texmf-dist/tex/latex/tcolorbox/tcbtheorems.code.tex
index 9b18811f834..358fa624bf3 100644
--- a/Master/texmf-dist/tex/latex/tcolorbox/tcbtheorems.code.tex
+++ b/Master/texmf-dist/tex/latex/tcolorbox/tcbtheorems.code.tex
@@ -1,4 +1,4 @@
-%% The LaTeX package tcolorbox - version 2.33 (2013/07/04)
+%% The LaTeX package tcolorbox - version 2.40 (2013/07/15)
%% tcbtheorems.code.tex: Code for theorems in colorboxes
%%
%% -------------------------------------------------------------------------------------------
@@ -18,16 +18,41 @@
%% This work consists of all files listed in README
%%
%\makeatletter
-\tcb@set@library@version{2.33}
+\tcb@set@library@version{2.40}
\RequirePackage{amsmath}
\def\tcb@hack@amsmath{\tcb@hack@currenvir\vskip-\abovedisplayskip}
+\def\tcb@theo@title#1#2#3{%
+ \ifdefempty{#2}{\setbox\z@=\hbox{#1}}{\setbox\z@=\hbox{#1~#2}}%
+ \def\temp@a{#3}%
+ \ifx\temp@a\@empty\relax%
+ \unhbox\z@%
+ \else%
+ \setbox\z@=\hbox{\unhbox\z@:\ }%
+ \hangindent\wd\z@%
+ \hangafter=1%
+ \mbox{\unhbox\z@}#3%
+ \fi%
+}
+
+\def\tcb@theo@listentry#1#2#3{%
+ \def\kvtcb@listentry{\numberline{#2}#3}%
+}
+
+\def\tcb@theo@label#1#2{%
+ \def\temp@a{#2}%
+ \ifx\temp@a\@empty%
+ \else%
+ \tcbset{label={#1:#2}}%
+ \fi%
+}
+
\tcbset{
theorem/.style args={#1#2#3#4}{%
step and label={#2}{#4},%
- title={\setbox\z@=\hbox{#1~\csname the#2\endcsname:\ }\hangindent\wd\z@\hangafter=1 \mbox{#1~\csname the#2\endcsname:\ }#3}},%
+ title={\letcs\tcb@temp{the#2}\tcb@theo@title{#1}{\tcb@temp}{#3}}},%
math upper/.style={before upper=$\displaystyle,after upper=$},%
math lower/.style={before lower=$\displaystyle,after lower=$},%
math/.style={math upper,math lower},%
@@ -55,8 +80,21 @@
highlight math style/.style={highlight math/.style={notitle,nophantom,#1}},%
}
-\newcommand{\tcbmaketheorem}[5]{%
- \newtcolorbox{#1}[3][]{#3,theorem={#2}{#4}{##2}{#5:##3},##1}%
+\newcommand{\newtcbtheorem}[5][]{%
+ \newtcolorbox[auto counter,#1]{#2}[3][]{#4,%
+ title={\tcb@theo@title{#3}{\thetcbcounter}{##2}},
+ list entry={\numberline{\thetcbcounter}##2},%
+ code={\tcb@theo@label{#5}{##3}},%
+ ##1}%
+}
+
+
+\newcommand{\tcbmaketheorem}[6][]{%
+ \def\temp@a{#5}\ifx\temp@a\@empty%
+ \newtcbtheorem[#1]{#2}{#3}{#4}{#6}%
+ \else%
+ \newtcbtheorem[use counter=#5,#1]{#2}{#3}{#4}{#6}%
+ \fi%
}
\newtcbox{\tcboxmath}[1][]{nobeforeafter,math upper,tcbox raise base,#1}
diff --git a/Master/texmf-dist/tex/latex/tcolorbox/tcolorbox.sty b/Master/texmf-dist/tex/latex/tcolorbox/tcolorbox.sty
index c9eb2f4b935..59daeeb479a 100644
--- a/Master/texmf-dist/tex/latex/tcolorbox/tcolorbox.sty
+++ b/Master/texmf-dist/tex/latex/tcolorbox/tcolorbox.sty
@@ -1,4 +1,4 @@
-%% The LaTeX package tcolorbox - version 2.33 (2013/07/04)
+%% The LaTeX package tcolorbox - version 2.40 (2013/07/15)
%% tcolorbox.sty: Text color boxes
%%
%% -------------------------------------------------------------------------------------------
@@ -18,12 +18,13 @@
%% This work consists of all files listed in README
%%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{tcolorbox}[2013/07/04 version 2.33 text color boxes]
-\def\tcb@version{2.33}
+\ProvidesPackage{tcolorbox}[2013/07/15 version 2.40 text color boxes]
+\def\tcb@version{2.40}
\RequirePackage{pgf}[2008/01/15]
\RequirePackage{verbatim}[2003/08/22]
\RequirePackage{environ}[2013/04/01]
+\RequirePackage{etoolbox}[2011/01/03]
% register
\newif\iftcb@lowerignored
@@ -41,6 +42,7 @@
\newbox\tcb@phantombox
\newcounter{tcbbreakpart}
+\newcounter{tcblayer}
% key management
\pgfkeys{/tcb/.is family}
@@ -308,14 +310,19 @@
\def\tcb@evenoddmode{easy}%
},
check odd page/.default=true,
- phantom/.store in=\kvtcb@phantom,
+ phantom/.code={\appto\kvtcb@phantom{#1}},
step and label/.style 2 args={phantom={\refstepcounter{#1}\label{#2}}},%
- nophantom/.style={phantom=},%
+ step/.style={phantom={\refstepcounter{#1}}},%
+ label/.style={phantom={\label{#1}}},%
+ add to list/.style 2 args={phantom={\tcb@addcontentsline{#1}{#2}}},
+ nophantom/.code={\def\kvtcb@phantom{}},%
shield externalize/.is choice,
shield externalize/true/.code={\let\tcb@shield@externalize=\tcb@shield@@externalize},
shield externalize/false/.code={\let\tcb@shield@externalize=\relax},
shield externalize/.default=true,
lower separated/.is if=tcb@lowerseparated,
+ options@for/.code={\letcs\tcb@new@colop{tcb@opt@#1}\pgfkeysalsofrom\tcb@new@colop},
+ list entry/.store in=\kvtcb@listentry,
}
\tcbset{%
@@ -326,7 +333,7 @@
\let\tcb@parboxrestore=\@parboxrestore
\def\tcb@parbox@use@false{%
- \def\@parboxrestore{\leavevmode\let\@parboxrestore=\tcb@parboxrestore}%
+ \def\@parboxrestore{\leavevmode\linewidth\hsize\let\@parboxrestore=\tcb@parboxrestore}%
}
\let\tcb@parbox@use@true\relax%
@@ -442,10 +449,61 @@
\def\tcb@@capture@hbox{%
\let\endtcolorbox=\relax%
- \Collect@Body\tcbox@inner@hbox%
+ \Collect@Body\tcbox@inner@hbox@collected%
+}
+
+\long\def\tcbox@inner@hbox@collected#1{%
+ \tcbox@inner@hbox{#1}%
+ \tcb@finalize@environment%
+}
+
+
+\def\tcb@managed@layers@max{0}
+\def\tcbsetmanagedlayers#1{%
+ \setcounter{tcblayer}{\tcb@managed@layers@max}%
+ \ifnum\c@tcblayer<#1\relax%
+ \loop
+ \stepcounter{tcblayer}%
+ \newbox\tcb@temp%
+ \cslet{tcb@footnote@\romannumeral\c@tcblayer}{\tcb@temp}%
+ \tcbset{every box on layer \number\c@tcblayer/.style={reset,every box}}
+ \ifnum\c@tcblayer<#1\repeat%
+ \else%
+ \fi%
+ \xdef\tcb@managed@layers@max{#1}%
+ \setcounter{tcblayer}{0}%
+}
+\@onlypreamble\tcbsetmanagedlayers
+\tcbsetmanagedlayers{4}%
+
+\tcbset{%
+ every box/.style={},
+ every box on layer 1/.style={every box},
+ every box on higher layers/.style={reset,every box},
+}
+
+\def\tcb@layer@inc{%
+ \stepcounter{tcblayer}%
+ \ifnum\c@tcblayer>\tcb@managed@layers@max%
+ \tcbset{every box on higher layers}%
+ \else%
+ \expandafter\setbox\csname tcb@footnote@\romannumeral\c@tcblayer\endcsname\box\@mpfootins%
+ \csedef{tcb@footnote@cnt@\romannumeral\c@tcblayer}{\the\c@mpfootnote}%
+ \tcbset{every box on layer \number\c@tcblayer}%
+ \fi%
+}
+
+\def\tcb@layer@dec{%
+ \ifnum\c@tcblayer>\tcb@managed@layers@max%
+ \else%
+ \expandafter\global\setbox\@mpfootins\box\csname tcb@footnote@\romannumeral\c@tcblayer\endcsname%
+ \setcounter{mpfootnote}{\csname tcb@footnote@cnt@\romannumeral\c@tcblayer\endcsname}%
+ \fi
+ \addtocounter{tcblayer}{-1}%
}
\long\def\tcb@@icolorbox[#1]{%
+ \tcb@layer@inc%
\tcbset{capture=minipage,#1}%
\tcb@hasLowerfalse%
\csname tcb@@capture@\kvtcb@capture\endcsname%
@@ -457,7 +515,12 @@
\unskip\tcb@after@box%
\end{tcb@savebox}%
\tcb@draw@color@box%
+ \tcb@finalize@environment%
+}
+
+\def\tcb@finalize@environment{%
\color{.}% hack for some special cases
+ \tcb@layer@dec%
}
\let\endtcolorbox=\tcb@endboxanddraw
@@ -799,8 +862,10 @@
\long\def\tcb@ox#1#2{%
\begingroup%
+ \tcb@layer@inc%
\tcbset{#1}%
\csname tcbox@inner@\kvtcb@capture\endcsname{#2}%
+ \tcb@layer@dec%
\endgroup%
}
@@ -808,30 +873,164 @@
\tcb@ox{capture=hbox,#1}{#2}%
}
-\long\def\tcb@newtcolorbox#1#2{\newenvironment{#1}{\tcolorbox[savedelimiter=#1,#2]}{\endtcolorbox}}
-\long\def\tcb@new@tcolorbox#1[#2]#3{\newenvironment{#1}[#2]{\tcolorbox[savedelimiter=#1,#3]}{\endtcolorbox}}
+\tcbset{%
+ new/.cd,%
+ use counter/.code={\def\kvtcb@new@counter{#1}\let\tcb@proc@counter=\tcb@proc@counter@use},
+ auto counter/.code={\let\tcb@proc@counter=\tcb@proc@counter@auto},
+ use counter from/.code={\edef\kvtcb@new@counter{\csname tcb@cnt@#1\endcsname}\let\tcb@proc@counter=\tcb@proc@counter@from},
+ no counter/.code={\let\tcb@proc@counter=\tcb@proc@counter@no},
+ %
+ number within/.store in=\kvtcb@new@numberwithin,
+ number format/.store in=\kvtcb@new@format,
+ number freestyle/.store in=\kvtcb@new@freestyle,
+ %
+ list inside/.store in=\kvtcb@new@listof,
+ list type/.store in=\kvtcb@new@listtype,
+ %
+ reset@new/.style={no counter,number within=,number format=\arabic,number freestyle=,list inside=,list type=tcolorbox},
+}
+
+\def\tcb@proc@counter@autoanduse#1{%
+ \letcs\tcbcounter{tcb@cnt@#1}%
+ \ifx\kvtcb@new@numberwithin\@empty%
+ \csxdef{the\tcbcounter}{\expandafter\noexpand\kvtcb@new@format{\tcbcounter}}%
+ \else%
+ \@addtoreset{\tcbcounter}{\kvtcb@new@numberwithin}%
+ \csxdef{the\tcbcounter}{\expandafter\noexpand\csname the\kvtcb@new@numberwithin\endcsname .\expandafter\noexpand\kvtcb@new@format{\tcbcounter}}%
+ \fi%
+ \ifx\kvtcb@new@freestyle\@empty%
+ \else%
+ \csxdef{the\tcbcounter}{\kvtcb@new@freestyle}%
+ \fi%
+ \global\csletcs{thetcb@cnt@#1}{the\tcbcounter}%
+ \appto\tcb@new@colopt{,code={\letcs\tcbcounter{tcb@cnt@\kvtcb@savedelimiter}\letcs\thetcbcounter{thetcb@cnt@\kvtcb@savedelimiter}\preto\kvtcb@phantom{\refstepcounter{\tcbcounter}}}}%
+}
-\long\def\tcb@new@@tcolorbox#1[#2][#3]#4{\newenvironment{#1}[#2][#3]{\tcolorbox[savedelimiter=#1,#4]}{\endtcolorbox}}
+\def\tcb@proc@counter@auto#1{%
+ \newcounter{tcb@cnt@#1}%
+ \csxdef{tcb@cnt@#1}{tcb@cnt@#1}%
+ \tcb@proc@counter@autoanduse{#1}%
+}
-\long\def\new@tcolorbox#1[#2]{%
- \@ifnextchar[{\tcb@new@@tcolorbox{#1}[#2]}{\tcb@new@tcolorbox{#1}[#2]}}
+\def\tcb@proc@counter@use#1{%
+ \csxdef{tcb@cnt@#1}{\kvtcb@new@counter}%
+ \tcb@proc@counter@autoanduse{#1}%
+}
-\long\def\newtcolorbox#1{%
- \@ifnextchar[{\new@tcolorbox{#1}}{\tcb@newtcolorbox{#1}}}
+\def\tcb@proc@counter@from#1{%
+ \csxdef{tcb@cnt@#1}{\kvtcb@new@counter}%
+ \global\csletcs{thetcb@cnt@#1}{the\kvtcb@new@counter}%
+ \appto\tcb@new@colopt{,code={\letcs\tcbcounter{tcb@cnt@\kvtcb@savedelimiter}\letcs\thetcbcounter{thetcb@cnt@\kvtcb@savedelimiter}\preto\kvtcb@phantom{\refstepcounter{\tcbcounter}}}}%
+}
+\def\tcb@proc@counter@no#1{%
+ \appto\tcb@new@colopt{,code={\let\tcbcounter=\@empty\let\thetcbcounter=\@empty}}%
+}%
-\long\def\tcb@newtcbox#1#2{\newcommand{#1}{\tcbox[#2]}}
+\def\tcb@proc@options@init#1#2{%
+ \tcbset{new/.cd,reset@new,#1}%
+ \tcb@proc@counter{#2}%
+ \ifx\kvtcb@new@listof\@empty%
+ \else%
+ \csedef{tcb@lstof@#2}{\kvtcb@new@listof}%
+ \csedef{tcb@lsttp@#2}{\kvtcb@new@listtype}%
+ \appto\tcb@new@colopt{,add to list={\csname tcb@lstof@\kvtcb@savedelimiter\endcsname}{\csname tcb@lsttp@\kvtcb@savedelimiter\endcsname}}%
+ \fi%
+}%
-\long\def\tcb@new@tcbox#1[#2]#3{\newcommand{#1}[#2]{\tcbox[#3]}}
+\long\def\tcb@newtcolorbox#1#2{\newenvironment{#1}{\tcolorbox[#2,options@for=#1]}{\endtcolorbox}}
-\long\def\tcb@new@@tcbox#1[#2][#3]#4{\newcommand{#1}[#2][#3]{\tcbox[#4]}}
+\long\def\tcb@newtcolorbox@#1[#2]#3{\newenvironment{#1}[#2]{\tcolorbox[#3,options@for=#1]}{\endtcolorbox}}
-\long\def\new@tcbox#1[#2]{%
- \@ifnextchar[{\tcb@new@@tcbox{#1}[#2]}{\tcb@new@tcbox{#1}[#2]}}
+\long\def\tcb@newtcolorbox@@#1[#2][#3]#4{\newenvironment{#1}[#2][#3]{\tcolorbox[#4,options@for=#1]}{\endtcolorbox}}
+
+\long\def\tcb@new@tcolorbox@#1[#2]{%
+ \@ifnextchar[{\tcb@newtcolorbox@@{#1}[#2]}{\tcb@newtcolorbox@{#1}[#2]}}
+
+\long\def\tcb@new@tcolorbox#1{%
+ \preto\tcb@new@colopt{savedelimiter=#1}%
+ \cslet{tcb@opt@#1}{\tcb@new@colopt}%
+ \@ifnextchar[{\tcb@new@tcolorbox@{#1}}{\tcb@newtcolorbox{#1}}}
+
+\long\def\tcb@new@tcolorbox@opt[#1]#2{%
+ \tcb@proc@options@init{#1}{#2}%
+ \tcb@new@tcolorbox{#2}%
+}
+
+\long\def\newtcolorbox{%
+ \def\tcb@new@colopt{}%
+ \@ifnextchar[{\tcb@new@tcolorbox@opt}{\tcb@new@tcolorbox}}
+
+% auxiliary code to remove a leading backspace
+\newcommand{\tcb@remove@bs}[1]{%
+ \ifcat\relax\noexpand#1%
+ \expandafter\tcb@remove@bs@aux@i%
+ \fi
+ #1}
+\newcommand*{\tcb@remove@bs@aux@i}{%
+ \romannumeral%
+ \if\string\ \tcb@remove@bs@aux@ii\fi%
+ \expandafter\tcb@remove@bs@aux@iii\string}
+\newcommand{\tcb@remove@bs@aux@ii}{}
+\long\def\tcb@remove@bs@aux@ii#1\tcb@remove@bs@aux@iii{%
+ -\number\fi\expandafter\z@}
+\newcommand{\tcb@remove@bs@aux@iii}[1]{\z@}
+
+
+\long\def\tcb@newtcbox#1#2{\expandafter\newcommand\csname#1\endcsname{\tcbox[#2,options@for=#1]}}
+
+\long\def\tcb@newtcbox@#1[#2]#3{\expandafter\newcommand\csname#1\endcsname[#2]{\tcbox[#3,options@for=#1]}}
+
+\long\def\tcb@newtcbox@@#1[#2][#3]#4{\expandafter\newcommand\csname#1\endcsname[#2][#3]{\tcbox[#4,options@for=#1]}}
+
+\long\def\tcb@new@tcbox@#1[#2]{%
+ \@ifnextchar[{\tcb@newtcbox@@{#1}[#2]}{\tcb@newtcbox@{#1}[#2]}}
+
+\long\def\tcb@new@tcbox#1{%
+ \preto\tcb@new@colopt{savedelimiter=#1}%
+ \cslet{tcb@opt@#1}{\tcb@new@colopt}%
+ \@ifnextchar[{\tcb@new@tcbox@{#1}}{\tcb@newtcbox{#1}}}
+
+\long\def\tcb@new@tcbox@opt[#1]#2{%
+ \tcb@proc@options@init{#1}{#2}%
+ \tcb@new@tcbox{#2}%
+}
+
+\long\def\tcb@new@tcbox@bs#1{%
+ \edef\temp{\tcb@remove@bs{#1}}%
+ \tcb@new@tcbox{\temp}%
+}
+
+\long\def\tcb@new@tcbox@opt@bs[#1]#2{%
+ \edef\temp{\tcb@remove@bs{#2}}%
+ \tcb@new@tcbox@opt[#1]{\temp}%
+}
+
+\long\def\newtcbox{%
+ \def\tcb@new@colopt{}%
+ \@ifnextchar[{\tcb@new@tcbox@opt@bs}{\tcb@new@tcbox@bs}}
+
+
+\def\tcb@addcontentsline#1#2{%
+ \ifx\kvtcb@listentry\@empty%
+ \ifx\kvtcb@title\@empty%
+ \addcontentsline{#1}{#2}{\numberline{\thetcbcounter}\kvtcb@savedelimiter}%
+ \else%
+ \addcontentsline{#1}{#2}{\numberline{\thetcbcounter}\kvtcb@title}%
+ \fi%
+ \else%
+ \addcontentsline{#1}{#2}{\kvtcb@listentry}%
+ \fi%
+}
+
+\newcommand*\l@tcolorbox{\@dottedtocline{1}{1.5em}{2.3em}}
+
+\newcommand{\tcblistof}[3][\section]{%
+ #1{#3}%
+ \@starttoc{#2}%
+}
-\long\def\newtcbox#1{%
- \@ifnextchar[{\new@tcbox{#1}}{\tcb@newtcbox{#1}}}
% verbatim output as in 'verbatim'
@@ -860,6 +1059,7 @@
\def\tcb@endlowerverbatimanddraw{%
\tcb@endlowerverbatim%
\tcb@draw@color@box%
+ \tcb@finalize@environment%
}
\def\tcb@lowerverbatim{%
@@ -881,28 +1081,9 @@
\def\tcbusetemp{\input{\kvtcb@tempfile}}
-% expandonce from etoolbox
-\newcommand{\tcb@expandonce}[1]{\unexpanded\expandafter{#1}}
-
-% slim version of etoolbox'es more general macro
-\newcommand{\tcb@appto}[2]{%
- \ifx#1\relax%
- \edef#1{\unexpanded{#2}}%
- \else%
- \edef#1{\tcb@expandonce#1\unexpanded{#2}}%
- \fi}
-
-% slim version of etoolbox'es more general macro
-\newcommand{\tcb@preto}[2]{%
- \ifx#1\relax%
- \edef#1{\unexpanded{#2}}%
- \else%
- \edef#1{\unexpanded{#2}\tcb@expandonce#1}%
- \fi}
-
\def\tcb@reset{}%
\tcbset{%
- initialize@reset/.code={\tcbset{#1}\tcb@appto\tcb@reset{\tcbset{#1}}},%
+ initialize@reset/.code={\tcbset{#1}\appto\tcb@reset{\tcbset{#1}}},%
reset/.code={\tcb@reset},%
reset@core/.style={notitle,width=\linewidth,
natural height,space to lower,valign=top,valign lower=top,
@@ -918,7 +1099,7 @@
before title=,after title=,before upper=,after upper=,before lower=,after lower=,
sidebyside=false,sidebyside align=center,sidebyside gap=10mm,
lefthand ratio=0.5,check odd page=false,nophantom,
- shield externalize=false,
+ shield externalize=false,list entry=,
},
initialize@reset=reset@core,
}
@@ -957,11 +1138,11 @@
\def\tcb@add@library#1#2{%
\tcbset{library/#1/.code={\tcb@load@library{#1}{#2}}}%
- \DeclareOption{#1}{\tcb@appto\tcb@optionlist{,#1}}%
+ \DeclareOption{#1}{\appto\tcb@optionlist{,#1}}%
}
\def\tcb@add@library@style#1#2{%
\tcbset{library/#1/.style={#2}}%
- \DeclareOption{#1}{\tcb@appto\tcb@optionlist{,#1}}%
+ \DeclareOption{#1}{\appto\tcb@optionlist{,#1}}%
}
\tcb@add@library{listings}{tcblistings.code.tex}