summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-11-27 22:14:48 +0000
committerKarl Berry <karl@freefriends.org>2015-11-27 22:14:48 +0000
commit4427662beda37c46755590f310ad4cee61d7eccf (patch)
tree3687c7d55e1926d76b433895fe5b3eb2b115e23a /Master
parente030c72cb82752f6348535873fafd292d6b0e2bd (diff)
tcolorbox (27nov15)
git-svn-id: svn://tug.org/texlive/trunk@38959 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/tcolorbox/CHANGES22
-rw-r--r--Master/texmf-dist/doc/latex/tcolorbox/README4
-rw-r--r--Master/texmf-dist/doc/latex/tcolorbox/tcolorbox-example.pdfbin361501 -> 361333 bytes
-rw-r--r--Master/texmf-dist/doc/latex/tcolorbox/tcolorbox-example.tex4
-rw-r--r--Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.coreoptions.tex512
-rw-r--r--Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.listings.tex8
-rw-r--r--Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.raster.tex2
-rw-r--r--Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.s_main.sty8
-rw-r--r--Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.sidebyside.tex408
-rw-r--r--Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.pdfbin6276267 -> 6369898 bytes
-rw-r--r--Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.tex11
-rw-r--r--Master/texmf-dist/tex/latex/tcolorbox/tcbbreakable.code.tex27
-rw-r--r--Master/texmf-dist/tex/latex/tcolorbox/tcbdocumentation.code.tex6
-rw-r--r--Master/texmf-dist/tex/latex/tcolorbox/tcbexternal.code.tex8
-rw-r--r--Master/texmf-dist/tex/latex/tcolorbox/tcbfitting.code.tex9
-rw-r--r--Master/texmf-dist/tex/latex/tcolorbox/tcbhooks.code.tex6
-rw-r--r--Master/texmf-dist/tex/latex/tcolorbox/tcblistings.code.tex6
-rw-r--r--Master/texmf-dist/tex/latex/tcolorbox/tcblistingscore.code.tex9
-rw-r--r--Master/texmf-dist/tex/latex/tcolorbox/tcblistingsutf8.code.tex6
-rw-r--r--Master/texmf-dist/tex/latex/tcolorbox/tcbmagazine.code.tex4
-rw-r--r--Master/texmf-dist/tex/latex/tcolorbox/tcbminted.code.tex6
-rw-r--r--Master/texmf-dist/tex/latex/tcolorbox/tcbraster.code.tex6
-rw-r--r--Master/texmf-dist/tex/latex/tcolorbox/tcbskins.code.tex4
-rw-r--r--Master/texmf-dist/tex/latex/tcolorbox/tcbskinsjigsaw.code.tex4
-rw-r--r--Master/texmf-dist/tex/latex/tcolorbox/tcbtheorems.code.tex6
-rw-r--r--Master/texmf-dist/tex/latex/tcolorbox/tcbxparse.code.tex68
-rw-r--r--Master/texmf-dist/tex/latex/tcolorbox/tcolorbox.sty156
27 files changed, 912 insertions, 398 deletions
diff --git a/Master/texmf-dist/doc/latex/tcolorbox/CHANGES b/Master/texmf-dist/doc/latex/tcolorbox/CHANGES
index da216e3163e..7e680d82456 100644
--- a/Master/texmf-dist/doc/latex/tcolorbox/CHANGES
+++ b/Master/texmf-dist/doc/latex/tcolorbox/CHANGES
@@ -1,7 +1,7 @@
-%% The LaTeX package tcolorbox - version 3.73 (2015/10/16)
+%% The LaTeX package tcolorbox - version 3.80 (2015/11/27)
%%
%% -------------------------------------------------------------------------------------------
-%% Copyright (c) 2006-2014 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
+%% Copyright (c) 2006-2015 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
%% -------------------------------------------------------------------------------------------
%%
%% This work may be distributed and/or modified under the
@@ -830,3 +830,21 @@ version 3.73 (2015/10/16)
'before doc body key', 'after doc body key',
'before doc body', 'after doc body'
+version 3.80 (2015/11/27)
+- superfluous and sometimes troublesome \unskip's were removed.
+ Note that this changed the behavior of 'after upper' and 'after lower'.
+ Some user code may need to apply the new 'after upper*' / 'after lower*'
+ options or insert an \unskip.
+- even/odd page testing completely rewritten.
+- some difference formulas were revised.
+- new macros:
+ '\thetcolorboxnumber', '\thetcolorboxpage',
+ '\tcbifoddpage', '\tcbheightfromgroup'
+- new options:
+ 'after upper*', 'after lower*',
+ 'center', 'flush right', 'flush left',
+ 'if odd page', 'if odd page*',
+ 'use height from group'
+- library 'xparse':
+ * new macro: '\tcbsidebyside'
+ * new options: 'sidebyside adapt', 'sidebyside switch'
diff --git a/Master/texmf-dist/doc/latex/tcolorbox/README b/Master/texmf-dist/doc/latex/tcolorbox/README
index 30acc1aadc0..e4e999d65cb 100644
--- a/Master/texmf-dist/doc/latex/tcolorbox/README
+++ b/Master/texmf-dist/doc/latex/tcolorbox/README
@@ -1,7 +1,7 @@
-%% The LaTeX package tcolorbox - version 3.73 (2015/10/16)
+%% The LaTeX package tcolorbox - version 3.80 (2015/11/27)
%%
%% -------------------------------------------------------------------------------------------
-%% Copyright (c) 2006-2014 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
+%% Copyright (c) 2006-2015 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
%% -------------------------------------------------------------------------------------------
%%
%% This work may be distributed and/or modified under the
diff --git a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox-example.pdf b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox-example.pdf
index b47e90fb1b2..d559c7d3c56 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 354f8df3b4a..f5c4a4e7175 100644
--- a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox-example.tex
+++ b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox-example.tex
@@ -1,8 +1,8 @@
-%% The LaTeX package tcolorbox - version 3.73 (2015/10/16)
+%% The LaTeX package tcolorbox - version 3.80 (2015/11/27)
%% tcolorbox-example.tex: an example for tcolorbox
%%
%% -------------------------------------------------------------------------------------------
-%% Copyright (c) 2006-2014 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
+%% Copyright (c) 2006-2015 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
%% -------------------------------------------------------------------------------------------
%%
%% This work may be distributed and/or modified under the
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 810aaad581c..57a74eb85f2 100644
--- a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.coreoptions.tex
+++ b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.coreoptions.tex
@@ -1321,15 +1321,15 @@ outer arc & auto & auto & auto & auto & 0.0pt & 0.0pt \\
\clearpage
-\begin{docTcbKey}{toggle left and right}{=\meta{toggle preset}}{default |evenpage|, initially |none|}
+\begin{docTcbKey}[][doc updated=2015-11-13]{toggle left and right}{=\meta{toggle preset}}{default |evenpage|, initially |none|}
According to the \meta{toggle preset}, the left and the right settings of
the |tcolorbox| are switched or not. Feasible values are:
\begin{itemize}
\item\docValue{none}: no switching.
\item\docValue{forced}: the values of the left and right rules and spaces are switched.
\item\docValue{evenpage}: if the page is an even page, the values of the left and
- right rules and spaces are switched. It is recommended that you use this setting in
- conjunction with \refKey{/tcb/check odd page}.
+ right rules and spaces are switched. This value also sets
+ \refKey{/tcb/check odd page} to |true|.
\end{itemize}
\begin{marker}
Horizontal bounding box enlargements are not toggled by this option.
@@ -1337,19 +1337,18 @@ They can be toggled independently by \refKey{/tcb/toggle enlargement}.
For example, \refKey{/tcb/oversize} changes the bounding box.
\end{marker}
\begin{dispListing}
-% \usepackage{changepage} for 'check odd page'
% \usepackage{lipsum}
% \usetikzlibrary{patterns}
% \tcbuselibrary{skins,breakable}
\begin{tcolorbox}[skin=enhancedmiddle,breakable,
- check odd page,toggle left and right,
+ toggle left and right,
boxrule=0mm,top=0mm,bottom=0mm,left=1mm,right=1mm,
rightrule=1cm,colupper=blue!25!black,
interior style={fill overzoom image=lichtspiel.jpg,fill image opacity=0.25},
frame style={pattern=crosshatch dots light steel blue},
overlay={%
- \ifoddpage\coordinate (X) at ([xshift=-5mm]frame.east);
- \else\coordinate (X) at ([xshift=5mm]frame.west);\fi
+ \tcbifoddpage{\coordinate (X) at ([xshift=-5mm]frame.east);}
+ {\coordinate (X) at ([xshift=5mm]frame.west);}
\fill[shading=ball,ball color=blue!50!white,opacity=0.5] (X) circle (4mm);}]
\lipsum[1-6]
\end{tcolorbox}
@@ -1851,7 +1850,7 @@ colframe=red!75!black,colback=white}
\begin{tcolorbox}[equal height group=B]
Now, we use another equal height group.
\end{tcolorbox}%
-\begin{tcolorbox}[equal height group=B]
+\begin{tcolorbox}[equal height group=B,after=]
\begin{equation*}
\int\limits_{0}^{1} x^2 = \frac13.
\end{equation*}
@@ -1900,6 +1899,31 @@ with a listing.
\end{docTcbKey}
+\begin{docTcbKey}[][doc new=2015-11-27]{use height from group}{=\meta{id}}{style, no default}
+ Sets the current box to a fixed \refKey{/tcb/height} which is copied from
+ an equal height group with the given \meta{id}. If this height is not
+ available during the current compilation, no fixed height setting is used.\par
+ Note that the natural height of the current box is not considered for
+ computation of the group height. The main application for
+ \refKey{/tcb/use height from group} is that the height can be adapted
+ further by \refKey{/tcb/add to height}.
+
+\begin{dispExample}
+\begin{tcolorbox}[use height from group=C,add to height=-2cm,
+ colframe=blue!75!black,colback=white]
+Height from group 'C' of the previous example, but reduced by 2cm.
+\end{tcolorbox}%
+\end{dispExample}
+\end{docTcbKey}
+
+\enlargethispage*{1cm}
+\begin{docCommand}[doc new=2015-11-27]{tcbheightfromgroup}{\marg{macro}\marg{id}}
+ Saves the height from an equal height group with the given \meta{id}
+ to a \meta{macro}. If this height is not available during the current compilation,
+ \meta{macro} is set to |0pt|.
+\end{docCommand}
+
+
\clearpage
\subsection{Box Content Additions}\label{subsec:contentadditions}
The following options introduce some arbitrary \meta{code} to the content
@@ -1933,6 +1957,7 @@ This is a \textbf{tcolorbox}.
\end{docTcbKey}
+\clearpage
\begin{docTcbKey}{before upper}{=\meta{code}}{no default, initially unset}
The given \meta{code} is placed \emph{after} the color and font settings
and \emph{before} the content of the upper part.
@@ -1946,8 +1971,8 @@ This is a \textbf{tcolorbox}.
\end{dispExample}
\end{docTcbKey}
-\clearpage
-\begin{docTcbKey}{after upper}{=\meta{code}}{no default, initially unset}
+
+\begin{docTcbKey}[][doc updated=2015-11-27]{after upper}{=\meta{code}}{no default, initially unset}
The given \meta{code} is placed \emph{after} the content of the upper part.
\begin{dispExample}
\tcbset{after upper={\par\hfill\textit{Read more next week}},
@@ -1959,7 +1984,23 @@ This is a \textbf{tcolorbox}.
\end{dispExample}
\end{docTcbKey}
+\begin{docTcbKey}[][doc new=2015-11-27]{after upper*}{=\meta{code}}{no default, initially unset}
+ An |\unskip| and the given \meta{code} is placed \emph{after} the content of the upper part.
+\begin{dispExample}
+\begin{tcolorbox}[before upper=\flqq,after upper*=\frqq,
+ colback=red!5!white,colframe=red!75!black]
+This is a \textbf{tcolorbox}.
+\end{tcolorbox}
+\end{dispExample}
+\begin{marker}
+Prior to version 3.80, \refKey{/tcb/after upper} had the functionality
+of \refKey{/tcb/after upper*}.
+\end{marker}
+\end{docTcbKey}
+
+
+\clearpage
\begin{docTcbKey}{before lower}{=\meta{code}}{no default, initially unset}
The given \meta{code} is placed \emph{after} the color and font settings
and \emph{before} the content of the lower part.
@@ -1975,18 +2016,34 @@ This is the lower part.
\end{docTcbKey}
-\begin{docTcbKey}{after lower}{=\meta{code}}{no default, initially unset}
+\begin{docTcbKey}[][doc updated=2015-11-27]{after lower}{=\meta{code}}{no default, initially unset}
The given \meta{code} is placed \emph{after} the content of the lower part.
\begin{dispExample}
-\tcbset{after lower=\ \textit{This is the end.},
- colback=red!5!white,colframe=red!75!black}
+\begin{tcolorbox}[before lower=$,after lower=$,
+ colback=red!5!white,colframe=red!75!black]
+This is a \textbf{tcolorbox}.
+\tcblower
+\sin^2(x)+\cos^2(x)=1.
+\end{tcolorbox}
+\end{dispExample}
+\end{docTcbKey}
-\begin{tcolorbox}
+
+\begin{docTcbKey}[][doc new=2015-11-27]{after lower*}{=\meta{code}}{no default, initially unset}
+ An |\unskip| and the given \meta{code} is placed \emph{after} the content of the lower part.
+\begin{dispExample}
+\begin{tcolorbox}[after lower*=\ \textit{This is the end.},
+ colback=red!5!white,colframe=red!75!black]
This is a \textbf{tcolorbox}.
\tcblower
This is the lower part.
\end{tcolorbox}
\end{dispExample}
+
+\begin{marker}
+Prior to version 3.80, \refKey{/tcb/after lower} had the functionality
+of \refKey{/tcb/after lower*}.
+\end{marker}
\end{docTcbKey}
@@ -2431,218 +2488,6 @@ are drawn by the codes given with
\end{docTcbKey}
-\clearpage
-\subsection{Side by Side}\label{subsec:sidebyside}
-\begin{marker}
- Further side by side options for code examples are
- \refKey{/tcb/listing side text},
- \refKey{/tcb/text side listing},
- \refKey{/tcb/listing outside text}, and
- \refKey{/tcb/text outside listing}.
-\end{marker}
-
-\begin{docTcbKey}{sidebyside}{\colOpt{=true\textbar false}}{default |true|, initially |false|}
-Normally, the upper part and the lower part of the box have their positions
-as their names suggest. If |sidebyside| is set to |true|, the upper part
-is drawn \emph{left-handed} and the lower part is drawn \emph{right-handed}.
-Both parts are drawn together with the geometry settings of the upper part but the
-space is divided horizontally according to the following options.
-Colors, fonts, and box content additions are used individually.
-The resulting box is unbreakable.
-
-\begin{dispExample}
-\tcbset{colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries}
-
-\begin{tcolorbox}[title=My title,sidebyside]
-This is the upper (\textit{left-handed}) part.
-\tcblower
-This is the lower (\textit{right-handed}) part.
-\end{tcolorbox}
-\end{dispExample}
-\end{docTcbKey}
-
-
-\begin{docTcbKey}[][doc updated=2015-02-06]{sidebyside align}{=\meta{alignment}}{no default, initially |center|}
- Sets the vertical \meta{alignment} for the left-handed and right-handed part.
- Feasible values are \docValue{center}, \docValue{top}, \docValue{bottom},
- \docValue{center seam}, \docValue{top seam}, and \docValue{bottom seam}.
-\begin{exdispExample}{sidebyside_align}
-\tcbset{colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries,nobeforeafter,
- left=2mm,right=2mm,sidebyside,sidebyside gap=6mm,width=(\linewidth-2mm)/3}
-
-\begin{tcolorbox}[adjusted title=center,sidebyside align=center]
-This is a text which is too long for one line.
-\tcblower
-This is a short text.
-\end{tcolorbox}\hfill
-\begin{tcolorbox}[adjusted title=top,sidebyside align=top]
-This is a text which is too long for one line.
-\tcblower
-This is a short text.
-\end{tcolorbox}\hfill
-\begin{tcolorbox}[adjusted title=bottom,sidebyside align=bottom]
-This is a text which is too long for one line.
-\tcblower
-This is a short text.
-\end{tcolorbox}
-\end{exdispExample}
-
-\clearpage
-\docValue{center}, \docValue{top}, and \docValue{bottom} are identical
-to the known corresponding |minipage| options. For example, \docValue{top}
-aligns the top lines of the lefthand and righthand side
-according to their baselines.
-While this is the preferred approach for text content, the result for
-boxed content like tables or images may not be as expected.
-
-For such content, one may use \docValue{center seam}, \docValue{top seam},
-and \docValue{bottom seam}. For example, \docValue{top seam} aligns
-the very top seam of the lefthand and righthand side.
-
-
-\begin{dispExample}
-\tcbset{colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries,
- size=small,righthand width=4cm,sidebyside,sidebyside gap=6mm,lower separated=false}
-
-\begin{tcolorbox}[adjusted title=center seam,sidebyside align=center seam]
- This is my description text for the pictures displayed on the righthand side.
- \tcblower
- \includegraphics[width=\linewidth/2]{goldshade}%
- \includegraphics[width=\linewidth/2]{blueshade}
-\end{tcolorbox}
-
-\begin{tcolorbox}[adjusted title=top seam,sidebyside align=top seam]
- This is my description text for the pictures displayed on the righthand side.
- \tcblower
- \includegraphics[width=\linewidth/2]{goldshade}%
- \includegraphics[width=\linewidth/2]{blueshade}
-\end{tcolorbox}
-
-\begin{tcolorbox}[adjusted title=bottom seam,sidebyside align=bottom seam]
- This is my description text for the pictures displayed on the righthand side.
- \tcblower
- \includegraphics[width=\linewidth/2]{goldshade}%
- \includegraphics[width=\linewidth/2]{blueshade}
-\end{tcolorbox}
-\end{dispExample}
-
-
-
-\end{docTcbKey}
-
-\clearpage
-\begin{docTcbKey}{sidebyside gap}{=\meta{length}}{no default, initially |10mm|}
-Sets the horizontal distance between the left-handed and right-handed part to
-\meta{length}.
-\begin{dispExample}
-\tcbset{colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries,nobeforeafter,
- sidebyside,width=(\linewidth-2mm)/2}
-
-\begin{tcolorbox}[adjusted title=Wide gap,sidebyside gap=30mm]
-This is a text which is too long for one line.
-\tcblower
-This is a short text.
-\end{tcolorbox}\hfill
-\begin{tcolorbox}[adjusted title=Narrow gap,sidebyside gap=1mm]
-This is a text which is too long for one line.
-\tcblower
-This is a short text.
-\end{tcolorbox}
-\end{dispExample}
-\end{docTcbKey}
-
-
-\begin{docTcbKey}{lefthand width}{=\meta{length}}{no default, initially unset}
-Sets the width of the left-handed part to the given \meta{length}.
-\begin{dispExample}
-\tcbset{colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries}
-
-\begin{tcolorbox}[title=My title,sidebyside,lefthand width=3cm]
-This is the upper (\textit{left-handed}) part.
-\tcblower
-This is the lower (\textit{right-handed}) part.
-\end{tcolorbox}
-\end{dispExample}
-\end{docTcbKey}
-
-\enlargethispage*{1cm}
-\begin{docTcbKey}{righthand width}{=\meta{length}}{no default, initially unset}
-Sets the width of the right-handed part to the given \meta{length}.
-\begin{dispExample}
-\tcbset{colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries}
-
-\begin{tcolorbox}[title=My title,sidebyside,righthand width=3cm]
-This is the upper (\textit{left-handed}) part.
-\tcblower
-This is the lower (\textit{right-handed}) part.
-\end{tcolorbox}
-\end{dispExample}
-\end{docTcbKey}
-
-\clearpage
-\begin{docTcbKey}{lefthand ratio}{=\meta{fraction}}{no default, initially |0.5|}
-Sets the width of the left-handed part to the given \meta{fraction} of
-the available space. \meta{fraction} is a value between |0| and |1|.
-\begin{dispExample}
-\tcbset{colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries}
-
-\begin{tcolorbox}[title=My title,sidebyside,lefthand ratio=0.25]
-This is the upper (\textit{left-handed}) part.
-\tcblower
-This is the lower (\textit{right-handed}) part.
-\end{tcolorbox}
-\end{dispExample}
-\end{docTcbKey}
-
-
-\begin{docTcbKey}{righthand ratio}{=\meta{fraction}}{no default, initially |0.5|}
-Sets the width of the right-handed part to the given \meta{fraction} of
-the available space. \meta{fraction} is a value between |0| and |1|.
-\begin{dispExample}
-\tcbset{colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries}
-
-\begin{tcolorbox}[title=My title,sidebyside,righthand ratio=0.25]
-This is the upper (\textit{left-handed}) part.
-\tcblower
-This is the lower (\textit{right-handed}) part.
-\end{tcolorbox}
-\end{dispExample}
-\end{docTcbKey}
-
-
-\clearpage
-If one side of a side-by-side box should be adapted to the width of
-its content, this width has to be computed beforehand.
-The following example uses a savebox |\mysavebox| to store the picture to determine
-its width.
-
-\begin{dispExample}
-% \tcbuselibrary{skins,xparse}
-% \usepackage{lipsum}
-% \newsavebox\mysavebox % preamble
-\DeclareTotalTColorBox{\mysidebox}{ O{} +m +m }{
- bicolor,colback=white,colbacklower=yellow!10,
- fonttitle=\bfseries,center title,
- sidebyside,
- code={\sbox{\mysavebox}{#2}},
- lefthand width=\wd\mysavebox,
- drop lifted shadow,
- #1
-}
-{\usebox{\mysavebox}\tcblower#3}
-
-\mysidebox[title=The Triangle]{%
- \begin{tikzpicture}
- \path[fill=red!20,draw=red!50!black]
- (0,0) node[below]{A} -- (3,1) node[right]{B}
- -- (1,4) node[above]{C} -- cycle;
- \end{tikzpicture}%
-}{%
- \lipsum[1]
-}
-\end{dispExample}
-
-
\clearpage
\subsection{Embedding into the Surroundings}\label{subsec:surroundings}
@@ -3022,6 +2867,43 @@ This is a \textbf{tcolorbox}.
\end{docTcbKey}
+
+\begin{docTcbKey}[][doc new=2015-11-20]{flush left}{}{style, no value}
+ Enlarges the bounding box to the right side to fill the line completely.
+\begin{dispExample}
+\tcbset{colframe=blue!75!black,colback=white}
+
+\begin{tcolorbox}[flush left,width=5cm,enhanced,show bounding box]
+This is a \textbf{tcolorbox}.
+\end{tcolorbox}
+\end{dispExample}
+\end{docTcbKey}
+
+
+\begin{docTcbKey}[][doc new=2015-11-20]{flush right}{}{style, no value}
+ Enlarges the bounding box to the left side to fill the line completely.
+\begin{dispExample}
+\tcbset{colframe=blue!75!black,colback=white}
+
+\begin{tcolorbox}[flush right,width=5cm,enhanced,show bounding box]
+This is a \textbf{tcolorbox}.
+\end{tcolorbox}
+\end{dispExample}
+\end{docTcbKey}
+
+
+\begin{docTcbKey}[][doc new=2015-11-20]{center}{}{style, no value}
+ Enlarges the bounding box equally to both sides to fill the line completely.
+\begin{dispExample}
+\tcbset{colframe=blue!75!black,colback=white}
+
+\begin{tcolorbox}[center,width=5cm,enhanced,show bounding box]
+This is a \textbf{tcolorbox}.
+\end{tcolorbox}
+\end{dispExample}
+\end{docTcbKey}
+
+\clearpage
\begin{docTcbKey}{grow to left by}{=\meta{length}}{no default, initially |0mm|}
Enlarges the current box width by \meta{length} and
enlarges (shrinks) the bounding box distance to the left side of the box by
@@ -3058,15 +2940,17 @@ This is a \textbf{tcolorbox}.
\clearpage
-\begin{docTcbKey}{toggle enlargement}{=\meta{toggle preset}}{default |evenpage|, initially |none|}
+\begin{docTcbKey}[][doc updated=2015-11-13]{toggle enlargement}{=\meta{toggle preset}}{default |evenpage|, initially |none|}
According to the \meta{toggle preset}, the left and the right enlargements of
the bounding box are switched or not. Feasible values are:
\begin{itemize}
\item\docValue{none}: no switching.
\item\docValue{forced}: the values of the left and right enlargement are switched.
\item\docValue{evenpage}: if the page is an even page, the values of the left and
- right enlargement are switched. It is recommended that you use this setting in
- conjunction with \refKey{/tcb/check odd page}.
+ right enlargement are switched. This value also sets
+ \refKey{/tcb/check odd page} to |true|.
+ %It is recommended that you use this setting in
+ %conjunction with \refKey{/tcb/check odd page}.
%Note that the page number detection may
%fail in certain cases. For these cases, use the |forced| value.
\end{itemize}
@@ -3075,7 +2959,6 @@ See \refKey{/tcb/toggle left and right} to toggle geometry settings.
\end{marker}
\begin{dispExample}
-% \usepackage{changepage} for 'check odd page'
\tcbset{colframe=blue!75!black,colback=white,
grow to left by=20mm,grow to right by=-5mm}
@@ -3085,22 +2968,20 @@ This is a \textbf{tcolorbox}.
\begin{tcolorbox}[toggle enlargement=forced]
This is a \textbf{tcolorbox}.
\end{tcolorbox}
-\begin{tcolorbox}[toggle enlargement=evenpage,check odd page]
- This page is an \ifthenelse{\isodd{\thepage}}{odd}{even} page.
+\begin{tcolorbox}[toggle enlargement=evenpage]
+ This page is an \tcbifoddpage{odd}{even} page.
Therefore, the left and right enlargements
- \ifthenelse{\isodd{\thepage}}{are not}{are} toggled.
+ \tcbifoddpage{are not}{are} toggled.
\end{tcolorbox}
\end{dispExample}
\begin{dispListing}
-% \usepackage{changepage} for 'check odd page'
-\begin{tcolorbox}[colframe=red!60!black,colback=red!15!white,check odd page,
+\begin{tcolorbox}[colframe=red!60!black,colback=red!15!white,
fonttitle=\bfseries,title=Floating box from \texttt{toggle enlargement},
- width=\textwidth,grow to right by=2cm,toggle enlargement=evenpage,float=t]
- This page is an \ifthenelse{\isodd{\thepage}}{odd}{even} page.
- Therefore, the left and right enlargements
- \ifthenelse{\isodd{\thepage}}{are not}{are} toggled (with some luck; otherwise
- use |forced|). This box stretches to the right margin on odd pages and to the left
+ width=\textwidth,grow to right by=2cm,toggle enlargement,float=t]
+ This page is an \tcbifoddpage{odd}{even} page.
+ Therefore, the left and right enlargements \tcbifoddpage{are not}{are} toggled.
+ This box stretches to the right margin on odd pages and to the left
margin on even pages. The current document is one-sided -- this feature makes
sense for two-sided documents only.
\end{tcolorbox}
@@ -3677,38 +3558,145 @@ This issues:\\
|\addcontentsline|\marg{list}\marg{type}\marg{entry text}
\end{docTcbKey}
+\subsection{Even and Odd Pages}
-\begin{docTcbKey}{check odd page}{\colOpt{=true\textbar false}}{default |true|, initially |false|}
-If set to |true|, the even/odd page testing from the package |changepage|
-is applied. The \refKey{/tcb/toggle enlargement} check
-and the \refKey{/tcb/toggle left and right} check
-will use the |\ifoddpage| macro from this package or another package like
-|ifoddpage|.
-This options is independent from \refKey{/tcb/phantom}.
-Note that you have to include the package |changepage| by hand\footnote{If |changepage| is
-not included, a compilation error will arise.}:
+\begin{marker}
+Also see
+\refKey{/tcb/toggle left and right} and
+\refKey{/tcb/toggle enlargement}
+for further even/odd options.
+\end{marker}
-\begin{dispListing}
-\usepackage{changepage}
-\strictpagecheck
-\end{dispListing}
+\begin{docTcbKey}[][doc updated=2015-11-13]{check odd page}{\colOpt{=true\textbar false}}{default |true|, initially |false|}
+If set to |true|, a precise even/odd page testing for the current box
+is applied. This is done by using labels. If a box moves to another page,
+the document has to be compiled twice for the correct settings.
+If set to |false|, even/odd page tests may give wrong results for the first box
+of a page.
-\medskip
-The macro |\ifoddpage| can be used inside overlay or watermark code to test if the
-box is on an odd page. This will work also for boxes in a break sequence.
-Note that you cannot use the test inside the normal
-box content.
+\refKey{/tcb/toggle left and right},
+\refKey{/tcb/toggle enlargement}, and
+\refKey{/tcb/if odd page}
+automatically set |check odd page|, but for
+\refCom{tcbifoddpage} this option has to be set explicitely.
+\end{docTcbKey}
+
+\enlargethispage*{1cm}
+\begin{docTcbKey}[][doc new=2015-11-13]{if odd page}{=\marg{odd options}\marg{even options}}{style, no default}
+If the current box is on an odd page, the \meta{odd options} are applied.
+On an even page, the \meta{even options} are applied.
+\refKey{/tcb/check odd page} is automatically set for precise even/odd page testing.
\begin{dispExample}
-% \usepackage{changepage}
-\tcbset{colframe=blue!75!black,colback=white}
+\begin{tcolorbox}[if odd page={colback=yellow!50}{colback=red!50}]
+ This box is colored in yellow on an odd page
+ and is colored in red on an even page.
+\end{tcolorbox}
+\end{dispExample}
+
+\begin{marker}
+If a box is \refKey{/tcb/breakable}, using \refKey{/tcb/if odd page}
+only acts upon the \emph{first} box. If the setting should be
+repeated for every partial box of the break sequence, the option should be
+packed into \refKey{/tcb/extras}. In this case, \refKey{/tcb/check odd page}
+has to be set explicitely! Also see \refKey{/tcb/if odd page*}.
+\end{marker}
+\end{docTcbKey}
+
+\clearpage
+\begin{docTcbKey}[][doc new=2015-11-13]{if odd page*}{=\marg{odd options}\marg{even options}}{style, no default}
+\begin{marker}
+This option needs the \mylib{breakable} library, see \Fullref{sec:breakable}.
+\end{marker}
+For breakable boxes, if the current partial box is on an odd page, the \meta{odd options} are applied.
+On an even page, the \meta{even options} are applied.
+\refKey{/tcb/check odd page} is automatically set for precise even/odd page testing.
+
+In contrast to \refKey{/tcb/if odd page}, \refKey{/tcb/if odd page*} is used
+on \emph{every} partial box of a break sequences and not only on the
+\emph{first} box. Another difference is that \refKey{/tcb/if odd page*}
+is applied quite \emph{late} during option processing, while
+\refKey{/tcb/if odd page} is applied immediately.
+
+\refKey{/tcb/if odd page*} is implemented as \refKey{/tcb/if odd page}
+packed into \refKey{/tcb/extras}.
+
+\begin{dispExample}
+% \tcbuselibrary{breakable}
+\begin{tcolorbox}[breakable,if odd page*={colback=yellow!50}{colback=red!50}]
+ This breakable box is colored in yellow on an odd page
+ and is colored in red on an even page. For every partial box, the
+ test is repeated, i.e. this would give a yellow, red, yellow, red, \ldots\
+ sequence for a long content.
+\end{tcolorbox}
+\end{dispExample}
+\end{docTcbKey}
+
+
+\enlargethispage*{2cm}
+\begin{docCommand}[doc new=2015-11-13]{tcbifoddpage}{\marg{odd code}\marg{even code}}
+If the current box is on an odd page, the \meta{odd code} is executed.
+On an even page, the \meta{even code} is executed.
+For precise even/odd page testing, the \refKey{/tcb/check odd page} has to be
+set manually inside the box options.
+
+The macro \refCom{tcbifoddpage} can be used inside underlay, overlay, or watermark code to
+test if the box is on an odd page. This will work also for boxes in a break sequence.
+
+The macro can also be used inside the box \textbf{content text}. For unbreakable boxes,
+the correct page test is applied.
+But for \refKey{/tcb/breakable} boxes, \refCom{tcbifoddpage}
+will always give the result for the page of the \emph{first} box inside
+the box \textbf{content text}. If needed, the methods from the packages
+|changepage| or |ifoddpage| could be used here.
+%To mention it again, for overlays, watermarks, etc, \refCom{tcbifoddpage} gives
+%the correct page test.
+
+\begin{dispExample}
+\tcbset{colframe=blue!75!black,colback=white,fonttitle=\bfseries}
\begin{tcolorbox}[enhanced,check odd page,
- watermark text={\ifoddpage Odd\else Even\fi\ page!}]
+ title={Example for a box on an \tcbifoddpage{odd}{even} page},
+ watermark text={\tcbifoddpage{Odd}{Even} page!}]
\lipsum[1]
\end{tcolorbox}
\end{dispExample}
-\end{docTcbKey}
+\end{docCommand}
+
+
+\clearpage
+\begin{docCommand}[doc new=2015-11-13]{thetcolorboxnumber}{}
+This is a unique identifier (arabic number) for a tcolorbox. It is locally
+defined inside boxes and has no meaning outside. It is used for
+precise even/odd page testing, but may also be valuable for elaborate user
+code.
+
+\begin{dispExample}
+\begin{tcolorbox}[colback=yellow!5,title=Box \thetcolorboxnumber]
+ This box is \thetcolorboxnumber.
+ \tcbox[on line,size=fbox]{This box is \thetcolorboxnumber} and
+ \tcbox[on line,size=fbox]{this box is \thetcolorboxnumber}.
+ This box is \thetcolorboxnumber.
+\end{tcolorbox}
+\end{dispExample}
+\end{docCommand}
+
+
+\begin{docCommand}[doc new=2015-11-13]{thetcolorboxpage}{}
+This macro contains the expanded arabic page number of the current tcolorbox.
+It is locally defined inside boxes and has no meaning outside.
+It is precise only, if \refKey{/tcb/check odd page} was set.
+
+\begin{dispExample}
+\begin{tcolorbox}[colback=yellow!5,check odd page,
+ title=Box on page~\thetcolorboxpage]
+ This box is located on page~\thetcolorboxpage.
+\end{tcolorbox}
+\end{dispExample}
+\end{docCommand}
+
+
+
\clearpage
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 e42499f3ba0..58d614c5f43 100644
--- a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.listings.tex
+++ b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.listings.tex
@@ -709,7 +709,7 @@ and as compiled text outside the box in the right part of the page.
Nevertheless, the outside text is treated as \emph{lower} part of the
|tcolorbox| and can be formatted with all lower part options.
The space partitioning is done with the side by side options from
-Section \ref{subsec:sidebyside}, see page \pageref{subsec:sidebyside}.
+\Fullref{sec:sidebyside}.
\begin{dispExample}
\begin{tcblisting}{colback=red!5!white,colframe=red!75!black,listing outside text}
This is a \LaTeX\ example.
@@ -724,7 +724,7 @@ and as compiled text outside the box in the left part of the page.
Nevertheless, the outside text is treated as \emph{lower} part of the
|tcolorbox| and can be formatted with all lower part options.
The space partitioning is done with the side by side options from
-Section \ref{subsec:sidebyside}, see page \pageref{subsec:sidebyside}.
+\Fullref{sec:sidebyside}.
\begin{dispExample}
\begin{tcblisting}{colback=red!5!white,colframe=red!75!black,text outside listing}
This is a \LaTeX\ example.
@@ -765,7 +765,7 @@ and a given comment outside the box in the right part of the page.
Nevertheless, the outside text is treated as \emph{lower} part of the
|tcolorbox| and can be formatted with all lower part options.
The space partitioning is done with the side by side options from
-Section \ref{subsec:sidebyside}, see page \pageref{subsec:sidebyside}.
+\Fullref{sec:sidebyside}.
\begin{dispExample}
\begin{tcblisting}{colback=red!5!white,colframe=red!75!black,listing outside comment,
righthand width=1.5cm,image comment={width=1.5cm}{example-image-a.pdf}}
@@ -781,7 +781,7 @@ and a given comment outside the box in the left part of the page.
Nevertheless, the outside text is treated as \emph{lower} part of the
|tcolorbox| and can be formatted with all lower part options.
The space partitioning is done with the side by side options from
-Section \ref{subsec:sidebyside}, see page \pageref{subsec:sidebyside}.
+\Fullref{sec:sidebyside}.
\begin{dispExample}
\begin{tcblisting}{colback=red!5!white,colframe=red!75!black,comment outside listing,
lefthand width=1.5cm,image comment={width=1.5cm}{example-image-a.pdf}}
diff --git a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.raster.tex b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.raster.tex
index 4356d662e95..8e54c49b658 100644
--- a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.raster.tex
+++ b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.raster.tex
@@ -160,8 +160,6 @@ This leads to a very compact syntax.
\end{tcbitemize}
\end{dispExample}
-\bigskip
-
\begin{marker}
\refEnv{tcbitemize} has more restrictions than \refEnv{tcbraster}.
Especially, the \refKey{/tcb/capture} mode has to be \docValue{minipage}.
diff --git a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.s_main.sty b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.s_main.sty
index 0ee04a9db88..5238fe00356 100644
--- a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.s_main.sty
+++ b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.s_main.sty
@@ -39,9 +39,6 @@
%\RequirePackage[cache]{minted}% minted 2.0
-\RequirePackage{changepage}
-\strictpagecheck
-
\providecommand{\tcbpkgprefix}{}
\RequirePackage{\tcbpkgprefix tcolorbox}
@@ -128,7 +125,8 @@
endtcolorbox,endtcbverbatimwrite,newtcolorbox,newtcbox,newtcboxfit,tcbusetemp,tcbtitle,tcbtitletext,
tcblower,tcbox,tcboxfit,tcbset,tcbuselibrary,tcolorbox,tcbverbatimwrite,tcbsetforeverylayer,tcbsubtitle,
tcolorboxenvironment,tcblistof,tcbstartrecording,tcbrecord,tcbstoprecording,tcbinputrecords,
- tcbpatcharcangular,tcbpatcharcround,
+ tcbpatcharcangular,tcbpatcharcround,tcbifoddpage,thetcolorboxnumber,thetcolorboxpage,
+ tcbheightfromgroup,
% listings
endtcblisting,newtcblisting,newtcbinputlisting,
tcblisting,tcbinputlisting,tcbuselistingtext,tcbuselistinglisting,tcbusetemplisting,
@@ -159,7 +157,7 @@
DeclareTCBInputListing,NewTCBInputListing,RenewTCBInputListing,ProvideTCBInputListing,
DeclareTCBoxFit,NewTCBoxFit,RenewTCBoxFit,ProvideTCBoxFit,
DeclareTotalTCBoxFit,NewTotalTCBoxFit,RenewTotalTCBoxFit,ProvideTotalTCBoxFit,
- tcboxverb,
+ tcbsidebyside,tcboxverb,
% externalization
tcbEXTERNALIZE,tcbifexternal,newtcbexternalizeenvironment,
renewtcbexternalizeenvironment,extcolorbox,extikzpicture,
diff --git a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.sidebyside.tex b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.sidebyside.tex
new file mode 100644
index 00000000000..b01c299e0c3
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.sidebyside.tex
@@ -0,0 +1,408 @@
+% !TeX root = tcolorbox.tex
+% include file of tcolorbox.tex (manual of the LaTeX package tcolorbox)
+\clearpage
+\section{Side by Side}\label{sec:sidebyside}%
+\tcbset{external/prefix=external/sidebyside_}%
+
+A \emph{side by side} box is a special \refEnv{tcolorbox} where
+the upper and lower part of the box are set side by side.
+All boxes of this kind are unbreakable.
+
+\begin{marker}
+ Further side by side options for code examples are
+ \refKey{/tcb/listing side text},
+ \refKey{/tcb/text side listing},
+ \refKey{/tcb/listing outside text}, and
+ \refKey{/tcb/text outside listing}.
+\end{marker}
+
+\subsection{Basic Settings}\label{subsec:sidebyside_basic}
+
+\begin{docTcbKey}{sidebyside}{\colOpt{=true\textbar false}}{default |true|, initially |false|}
+Normally, the upper part and the lower part of the box have their positions
+as their names suggest. If |sidebyside| is set to |true|, the upper part
+is drawn \emph{left-handed} and the lower part is drawn \emph{right-handed}.
+Both parts are drawn together with the geometry settings of the upper part but the
+space is divided horizontally according to the following options.
+Colors, fonts, and box content additions are used individually.
+The resulting box is unbreakable.
+
+\begin{dispExample}
+\tcbset{colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries}
+
+\begin{tcolorbox}[title=My title,sidebyside]
+ This is the upper (\textit{left-handed}) part.
+\tcblower
+ This is the lower (\textit{right-handed}) part.
+\end{tcolorbox}
+\end{dispExample}
+
+
+\begin{dispExample}
+% \usepackage{lipsum}
+% \tcbuselibrary{skins}
+\begin{tcolorbox}[bicolor,sidebyside,righthand width=3cm,
+ sharp corners,boxrule=.4pt,colback=green!5,colbacklower=green!50!black!50]
+ \lipsum[2]
+\tcblower
+ \includegraphics[width=\linewidth]{goldshade}%
+\end{tcolorbox}
+\end{dispExample}
+\end{docTcbKey}
+
+
+
+\clearpage
+\begin{docTcbKey}[][doc updated=2015-02-06]{sidebyside align}{=\meta{alignment}}{no default, initially |center|}
+ Sets the vertical \meta{alignment} for the left-handed and right-handed part.
+
+ Feasible values for \meta{alignment} are:
+ \begin{itemize}
+ \item\docValue{center}: identical to |minipage| option |c|.
+ \item\docValue{top}: identical to |minipage| option |t| (aligns the top
+ lines of the left-handed and right-handed side according to their baselines).
+ \item\docValue{bottom}: identical to |minipage| option |b| (aligns the bottom
+ lines of the left-handed and right-handed side according to their baselines).
+ \item\docValue{center seam}: aligns the center of the left-handed and right-handed side.
+ \item\docValue{top seam}: aligns the very top seam of the left-handed and right-handed side.
+ \item\docValue{bottom seam}: aligns the very bottom seam of the left-handed and right-handed side.
+ \end{itemize}
+
+\begin{exdispExample}{sidebyside_align}
+\tcbset{colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries,nobeforeafter,
+ left=2mm,right=2mm,sidebyside,sidebyside gap=6mm,width=(\linewidth-2mm)/3}
+
+\begin{tcolorbox}[adjusted title=center,sidebyside align=center]
+This is a text which is too long for one line.
+\tcblower
+This is a short text.
+\end{tcolorbox}\hfill
+\begin{tcolorbox}[adjusted title=top,sidebyside align=top]
+This is a text which is too long for one line.
+\tcblower
+This is a short text.
+\end{tcolorbox}\hfill
+\begin{tcolorbox}[adjusted title=bottom,sidebyside align=bottom]
+This is a text which is too long for one line.
+\tcblower
+This is a short text.
+\end{tcolorbox}
+\end{exdispExample}
+
+
+\docValue{center}, \docValue{top}, and \docValue{bottom} are identical
+to the known corresponding |minipage| options.
+While this is the preferred approach for text content, the result for
+boxed content like tables or images may not be as expected.
+
+For such content, one may use \docValue{center seam}, \docValue{top seam},
+and \docValue{bottom seam}. For example, \docValue{top seam} aligns
+the very top seam of the left-handed and right-handed side.
+
+
+\begin{dispExample}
+\tcbset{colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries,
+ size=small,righthand width=4cm,sidebyside,sidebyside gap=6mm,lower separated=false}
+
+\begin{tcolorbox}[adjusted title=center seam,sidebyside align=center seam]
+ This is my description text for the pictures displayed on the right-handed side.
+ \tcblower
+ \includegraphics[width=\linewidth/2]{goldshade}%
+ \includegraphics[width=\linewidth/2]{blueshade}
+\end{tcolorbox}
+
+\begin{tcolorbox}[adjusted title=top seam,sidebyside align=top seam]
+ This is my description text for the pictures displayed on the right-handed side.
+ \tcblower
+ \includegraphics[width=\linewidth/2]{goldshade}%
+ \includegraphics[width=\linewidth/2]{blueshade}
+\end{tcolorbox}
+
+\begin{tcolorbox}[adjusted title=bottom seam,sidebyside align=bottom seam]
+ This is my description text for the pictures displayed on the right-handed side.
+ \tcblower
+ \includegraphics[width=\linewidth/2]{goldshade}%
+ \includegraphics[width=\linewidth/2]{blueshade}
+\end{tcolorbox}
+\end{dispExample}
+
+
+
+\end{docTcbKey}
+
+\clearpage
+\begin{docTcbKey}{sidebyside gap}{=\meta{length}}{no default, initially |10mm|}
+Sets the horizontal distance between the left-handed and right-handed part to
+\meta{length}.
+\begin{dispExample}
+\tcbset{colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries,nobeforeafter,
+ sidebyside,width=(\linewidth-2mm)/2}
+
+\begin{tcolorbox}[adjusted title=Wide gap,sidebyside gap=30mm]
+This is a text which is too long for one line.
+\tcblower
+This is a short text.
+\end{tcolorbox}\hfill
+\begin{tcolorbox}[adjusted title=Narrow gap,sidebyside gap=1mm]
+This is a text which is too long for one line.
+\tcblower
+This is a short text.
+\end{tcolorbox}
+\end{dispExample}
+\end{docTcbKey}
+
+
+\begin{docTcbKey}{lefthand width}{=\meta{length}}{no default, initially unset}
+Sets the width of the left-handed part to the given \meta{length}.
+\begin{dispExample}
+\tcbset{colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries}
+
+\begin{tcolorbox}[title=My title,sidebyside,lefthand width=3cm]
+This is the upper (\textit{left-handed}) part.
+\tcblower
+This is the lower (\textit{right-handed}) part.
+\end{tcolorbox}
+\end{dispExample}
+\end{docTcbKey}
+
+\enlargethispage*{1cm}
+\begin{docTcbKey}{righthand width}{=\meta{length}}{no default, initially unset}
+Sets the width of the right-handed part to the given \meta{length}.
+\begin{dispExample}
+\tcbset{colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries}
+
+\begin{tcolorbox}[title=My title,sidebyside,righthand width=3cm]
+This is the upper (\textit{left-handed}) part.
+\tcblower
+This is the lower (\textit{right-handed}) part.
+\end{tcolorbox}
+\end{dispExample}
+\end{docTcbKey}
+
+\clearpage
+\begin{docTcbKey}{lefthand ratio}{=\meta{fraction}}{no default, initially |0.5|}
+Sets the width of the left-handed part to the given \meta{fraction} of
+the available space. \meta{fraction} is a value between |0| and |1|.
+\begin{dispExample}
+\tcbset{colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries}
+
+\begin{tcolorbox}[title=My title,sidebyside,lefthand ratio=0.25]
+This is the upper (\textit{left-handed}) part.
+\tcblower
+This is the lower (\textit{right-handed}) part.
+\end{tcolorbox}
+\end{dispExample}
+\end{docTcbKey}
+
+
+\begin{docTcbKey}{righthand ratio}{=\meta{fraction}}{no default, initially |0.5|}
+Sets the width of the right-handed part to the given \meta{fraction} of
+the available space. \meta{fraction} is a value between |0| and |1|.
+\begin{dispExample}
+\tcbset{colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries}
+
+\begin{tcolorbox}[title=My title,sidebyside,righthand ratio=0.25]
+This is the upper (\textit{left-handed}) part.
+\tcblower
+This is the lower (\textit{right-handed}) part.
+\end{tcolorbox}
+\end{dispExample}
+\end{docTcbKey}
+
+
+\clearpage
+If one side of a side-by-side box should be adapted to the width of
+its content, this width has to be computed beforehand.
+The following example uses a savebox |\mysavebox| to store the picture to determine
+its width. A more convenient way to handle this task is to use the
+methods from \Fullref{subsec:sidebyside_xparse}.
+
+\begin{dispExample}
+% \tcbuselibrary{skins,xparse}
+% \usepackage{lipsum}
+% \newsavebox\mysavebox % preamble
+\DeclareTotalTColorBox{\mysidebox}{ O{} +m +m }{
+ bicolor,colback=white,colbacklower=yellow!10,
+ fonttitle=\bfseries,center title,
+ sidebyside,
+ code={\sbox{\mysavebox}{#2}},
+ lefthand width=\wd\mysavebox,
+ drop lifted shadow,
+ #1
+}
+{\usebox{\mysavebox}\tcblower#3}
+
+\mysidebox[title=The Triangle]{%
+ \begin{tikzpicture}
+ \path[fill=red!20,draw=red!50!black]
+ (0,0) node[below]{A} -- (3,1) node[right]{B}
+ -- (1,4) node[above]{C} -- cycle;
+ \end{tikzpicture}%
+}{%
+ \lipsum[1]
+}
+\end{dispExample}
+
+
+\clearpage
+\subsection{Advanced Settings from the \mylib{xparse} Library}\label{subsec:sidebyside_xparse}
+
+\begin{marker}
+All following macros and options need the \mylib{xparse} library to be
+loaded, see \Fullref{sec:xparse}.
+\end{marker}
+
+
+\begin{docCommand}[doc new=2015-11-20]{tcbsidebyside}{\oarg{options}\marg{left-handed content}\marg{right-handed content}}
+Creates a colored box using more or less arbitrary \meta{options} for a \refEnv{tcolorbox}.
+The \refKey{/tcb/sidebyside} option is set to |true| and the
+\meta{left-handed content} and \meta{right-handed content}
+is filled into the box appropriately.
+The resulting box is unbreakable.
+
+\refCom{tcbsidebyside} is not only a shortcut for using
+a normal \refEnv{tcolorbox} with \refKey{/tcb/sidebyside}, but allows
+setting further options like \refKey{/tcb/sidebyside adapt}
+and \refKey{/tcb/sidebyside switch}.
+
+
+\begin{dispExample}
+% \tcbuselibrary{skins,xparse}
+% \usepackage{lipsum}
+\tcbsidebyside[title=The Triangle,
+ sidebyside adapt=left,
+ bicolor,colback=white,colbacklower=yellow!10,
+ fonttitle=\bfseries,center title,drop lifted shadow,
+]{%
+ \begin{tikzpicture}
+ \path[fill=red!20,draw=red!50!black]
+ (0,0) node[below]{A} -- (3,1) node[right]{B}
+ -- (1,4) node[above]{C} -- cycle;
+ \end{tikzpicture}%
+}{%
+ \lipsum[1]
+}
+\end{dispExample}
+\end{docCommand}
+
+
+\clearpage
+\begin{docTcbKey}[][doc new=2015-11-20]{sidebyside adapt}{=\meta{side(s)}}{no default, initially |none|}
+The option allows the left-handed and/or right-handed side to determine the
+dimensions of the box. This option is only valid inside \refCom{tcbsidebyside}.
+
+Feasible values for \meta{side(s)} are:
+\begin{itemize}
+\item\docValue{none}: no measurement of left-handed and right-handed side.
+\item\docValue{left}:
+ the actual width of the left-handed content is used to set \refKey{/tcb/lefthand width}.
+\item\docValue{right}:
+ the actual width of the right-handed content is used to set \refKey{/tcb/righthand width}.
+\item\docValue{both}:
+ the actual width of the left-handed and right-handed content is used to set
+ \refKey{/tcb/lefthand width}, \refKey{/tcb/righthand width}, and
+ the overall \refKey{/tcb/width}.
+\end{itemize}
+
+\begin{dispExample}
+% \tcbuselibrary{skins,xparse}
+\tcbsidebyside[sidebyside adapt=left,
+ title=Very important table,
+ beamer,colframe=blue!50!black,colback=blue!10,
+ lower separated=false,sidebyside gap=5mm
+]{%
+ \begin{tabular}{|l|c|r|}\hline
+ left & center & right\\\hline
+ A & B & C\\\hline
+ D & E & F\\\hline
+ \end{tabular}
+}{%
+ This table contains the most important figures for
+ all future actions. You may notice that B follows A,
+ C follows B, and so on.
+}
+\end{dispExample}
+
+
+
+\begin{dispExample}
+% \tcbuselibrary{skins,xparse}
+\tcbsidebyside[sidebyside adapt=right,
+ blanker,sidebyside gap=5mm
+]{%
+ \lipsum[2]
+}{%
+\begin{tikzpicture}
+ \path[fill=yellow,draw=yellow!75!red] (0,0) circle (1cm);
+ \fill[red] (45:5mm) circle (1mm);
+ \fill[red] (135:5mm) circle (1mm);
+ \draw[line width=1mm,red] (215:5mm) arc (215:325:5mm);
+\end{tikzpicture}
+}
+\end{dispExample}
+
+
+\begin{dispExample}
+% \tcbuselibrary{skins,xparse}
+\tcbsidebyside[sidebyside adapt=both,
+ enhanced,center,
+ title=Both sides adapted,
+ attach boxed title to top center={yshift=-2mm},
+ coltitle=black,boxed title style={colback=red!25},
+ segmentation style=solid,colback=red!5,colframe=red!50
+]{%
+ \begin{tabular}{|l|c|r|}\hline
+ left & center & right\\\hline
+ A & B & C\\\hline
+ D & E & F\\\hline
+ \end{tabular}
+}{%
+\begin{tikzpicture}
+ \path[fill=yellow,draw=yellow!75!red] (0,0) circle (1cm);
+ \fill[red] (45:5mm) circle (1mm);
+ \fill[red] (135:5mm) circle (1mm);
+ \draw[line width=1mm,red] (215:5mm) arc (215:325:5mm);
+\end{tikzpicture}
+}
+\end{dispExample}
+
+\end{docTcbKey}
+
+
+\clearpage
+\begin{docTcbKey}[][doc new=2015-11-20]{sidebyside switch}{\colOpt{=true\textbar false}}{default |true|, initially |false|}
+If set to |true|, the
+\meta{left-handed content} and \meta{right-handed content}
+of \refCom{tcbsidebyside} are switched.
+Obviously, this option is only valid inside \refCom{tcbsidebyside}.
+
+The side switching can be made even/odd page sensitive, if used inside
+\refKey{/tcb/if odd page}.
+
+\begin{dispExample}
+% \tcbuselibrary{skins,xparse}
+\tcbsidebyside{Left}{Right}
+
+\tcbsidebyside[sidebyside switch]{Left}{Right}
+
+\tcbsidebyside[title=Very important table,
+ if odd page={sidebyside switch,sidebyside adapt=right,flushright title}%
+ {sidebyside adapt=left},
+ beamer,colframe=blue!50!black,colback=blue!10,
+ lower separated=false,sidebyside gap=5mm
+]{%
+ \begin{tabular}{|l|c|r|}\hline
+ left & center & right\\\hline
+ A & B & C\\\hline
+ D & E & F\\\hline
+ \end{tabular}
+}{%
+ This table contains the most important figures for
+ all future actions. You may notice that B follows A,
+ C follows B, and so on.
+}
+\end{dispExample}
+
+
+\end{docTcbKey}
+
diff --git a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.pdf b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.pdf
index 3ef4988d062..cc4559e9c78 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 015a788d07d..44e1db33256 100644
--- a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.tex
+++ b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.tex
@@ -1,9 +1,9 @@
% \LaTeX-Main\
-%% The LaTeX package tcolorbox - version 3.73 (2015/10/16)
+%% The LaTeX package tcolorbox - version 3.80 (2015/11/27)
%% tcolorbox.tex: Manual
%%
%% -------------------------------------------------------------------------------------------
-%% Copyright (c) 2006-2014 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
+%% Copyright (c) 2006-2015 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
%% -------------------------------------------------------------------------------------------
%%
%% This work may be distributed and/or modified under the
@@ -35,8 +35,8 @@
\setlength{\bibitemsep}{\smallskipamount}
\addbibresource{tcolorbox.doc.bib}
-\def\version{3.73}%
-\def\datum{2015/10/16}%
+\def\version{3.80}%
+\def\datum{2015/11/27}%
\makeindex
\hypersetup{
@@ -49,7 +49,7 @@
\usepackage{pgfplots}
%\tcbset{draftmode}
-%\includeonly{tcolorbox.doc.listings}
+%\includeonly{tcolorbox.doc.sidebyside}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
@@ -59,6 +59,7 @@
\include{tcolorbox.doc.coremacros}
\include{tcolorbox.doc.coreoptions}
\include{tcolorbox.doc.initoptions}
+\include{tcolorbox.doc.sidebyside}
\include{tcolorbox.doc.verbatim}
\include{tcolorbox.doc.recording}
\include{tcolorbox.doc.technical}
diff --git a/Master/texmf-dist/tex/latex/tcolorbox/tcbbreakable.code.tex b/Master/texmf-dist/tex/latex/tcolorbox/tcbbreakable.code.tex
index 0a9ff5f4d43..51647e2965c 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 3.73 (2015/10/16)
+%% The LaTeX package tcolorbox - version 3.80 (2015/11/27)
%% tcbbreakable.code.tex: Code for breakable colorboxes
%%
%% -------------------------------------------------------------------------------------------
@@ -17,7 +17,7 @@
%%
%% This work consists of all files listed in README
%%
-\tcb@set@library@version{3.73}
+\tcb@set@library@version{3.80}
\let\tcb@parboxrestore@true=\tcb@parboxrestore
\let\tcb@parboxrestore@false\tcb@parbox@false@settings
@@ -87,7 +87,6 @@
}
\def\endtcb@vbox{%
- \unskip%
\par%
\unskip%
\ifvoid\@mpfootins\else%
@@ -594,10 +593,21 @@
\fi%
}
-
-\def\tcb@split@USL{%
+\def\tcb@nextbreakpart{%
\stepcounter{tcbbreakpart}%
+ \tcb@count@boxes%
+ \iftcb@checkpage%
+ \tcb@phantom@savepage%
+ \tcb@hasPhantomtrue%
+ \sbox\tcb@phantombox{\kvtcb@phantom}%
+ \let\kvtcb@phantom\@empty%
+ \fi%
\tcb@following@title%
+}
+
+
+\def\tcb@split@USL{%
+ \tcb@nextbreakpart%
\tcb@comp@h@page%
\tcb@defToTotalHeight\tcb@h@upper{\tcb@totalupperbox}%
\tcbdimto\tcb@h@total{\tcb@h@padding@last+\tcb@h@padtitle+\tcb@h@upper+\tcb@h@segment+\tcb@h@lower}%
@@ -663,8 +673,7 @@
\def\tcb@split@SL{%
- \stepcounter{tcbbreakpart}%
- \tcb@following@title%
+ \tcb@nextbreakpart%
\tcb@comp@h@page%
\let\tcb@h@upper=\tcb@zpt%
\tcb@defToTotalHeight\tcb@h@lower{\tcb@totallowerbox}%
@@ -693,8 +702,7 @@
\def\tcb@split@L{%
- \stepcounter{tcbbreakpart}%
- \tcb@following@title%
+ \tcb@nextbreakpart%
\tcb@comp@h@page%
\let\tcb@h@upper=\tcb@zpt%
\tcb@defToTotalHeight\tcb@h@lower{\tcb@totallowerbox}%
@@ -940,6 +948,7 @@
no extras middle/.code={\let\tcb@extras@middle\@empty},%
no extras last/.code={\let\tcb@extras@last\@empty},%
no extras/.code={\let\tcb@extras@unbroken\@empty\let\tcb@extras@first\@empty\let\tcb@extras@middle\@empty\let\tcb@extras@last\@empty},%
+ if odd page*/.style 2 args={check odd page,extras={if odd page={#1}{#2}}},%
}
diff --git a/Master/texmf-dist/tex/latex/tcolorbox/tcbdocumentation.code.tex b/Master/texmf-dist/tex/latex/tcolorbox/tcbdocumentation.code.tex
index afb70b05f3b..abd5dfb6e8b 100644
--- a/Master/texmf-dist/tex/latex/tcolorbox/tcbdocumentation.code.tex
+++ b/Master/texmf-dist/tex/latex/tcolorbox/tcbdocumentation.code.tex
@@ -1,8 +1,8 @@
-%% The LaTeX package tcolorbox - version 3.73 (2015/10/16)
+%% The LaTeX package tcolorbox - version 3.80 (2015/11/27)
%% tcbdocumentation.code.tex: Code for LaTeX documentations
%%
%% -------------------------------------------------------------------------------------------
-%% Copyright (c) 2006-2014 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
+%% Copyright (c) 2006-2015 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
%% -------------------------------------------------------------------------------------------
%%
%% This work may be distributed and/or modified under the
@@ -17,7 +17,7 @@
%%
%% This work consists of all files listed in README
%%
-\tcb@set@library@version{3.73}
+\tcb@set@library@version{3.80}
\tcbuselibrary{listings,skins,xparse,external}
diff --git a/Master/texmf-dist/tex/latex/tcolorbox/tcbexternal.code.tex b/Master/texmf-dist/tex/latex/tcolorbox/tcbexternal.code.tex
index 1f817d7beba..c196548ff76 100644
--- a/Master/texmf-dist/tex/latex/tcolorbox/tcbexternal.code.tex
+++ b/Master/texmf-dist/tex/latex/tcolorbox/tcbexternal.code.tex
@@ -1,4 +1,4 @@
-%% The LaTeX package tcolorbox - version 3.73 (2015/10/16)
+%% The LaTeX package tcolorbox - version 3.80 (2015/11/27)
%% tcbexternal.code.tex: Code for externalization
%%
%% -------------------------------------------------------------------------------------------
@@ -17,7 +17,7 @@
%%
%% This work consists of all files listed in README
%%
-\tcb@set@library@version{3.73}
+\tcb@set@library@version{3.80}
{
\catcode`\"=12
@@ -197,7 +197,7 @@
\long\def\new@tcb@externalizetcolorbox#1#2#3#4{%
\new@tcb@externalizeenvironment{#1}{#2}%
{preamble tcbset={force nobeforeafter},#3}%
- {\tcb@apply@box@options{#4}\tcb@set@normal@unbroken@beforeafter\tcb@before@unbroken}%
+ {\tcb@layer@pushup\tcb@apply@box@options{#4}\tcb@set@normal@unbroken@beforeafter\tcb@before@unbroken}%
{\tcb@after@unbroken}%
}
@@ -256,7 +256,7 @@
},
minipage/.code={%
\appto\tcbexternal@out@begin{\immediate\write\tcb@out{\string\begin{minipage}{\the\dimexpr#1\relax}\string\ignorespaces\@percentchar}}%
- \preto\tcbexternal@out@end{\immediate\write\tcb@out{\string\unskip\string\end{minipage}\@percentchar}}%
+ \preto\tcbexternal@out@end{\immediate\write\tcb@out{\string\end{minipage}\@percentchar}}%
},
minipage/.default=\linewidth,
%
diff --git a/Master/texmf-dist/tex/latex/tcolorbox/tcbfitting.code.tex b/Master/texmf-dist/tex/latex/tcolorbox/tcbfitting.code.tex
index 58565f323ae..82eb542c73f 100644
--- a/Master/texmf-dist/tex/latex/tcolorbox/tcbfitting.code.tex
+++ b/Master/texmf-dist/tex/latex/tcolorbox/tcbfitting.code.tex
@@ -1,8 +1,8 @@
-%% The LaTeX package tcolorbox - version 3.73 (2015/10/16)
+%% The LaTeX package tcolorbox - version 3.80 (2015/11/27)
%% tcbfitting.code.tex: Code for fit boxes
%%
%% -------------------------------------------------------------------------------------------
-%% Copyright (c) 2006-2014 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
+%% Copyright (c) 2006-2015 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
%% -------------------------------------------------------------------------------------------
%%
%% This work may be distributed and/or modified under the
@@ -18,7 +18,7 @@
%% This work consists of all files listed in README
%%
%\makeatletter
-\tcb@set@library@version{3.73}
+\tcb@set@library@version{3.80}
\newdimen\tcbfitdim
\newdimen\tcb@lowerfitdim
@@ -256,7 +256,8 @@
\tcb@set@color{tcbcol@upper}%
\begin{tcb@savebox}{\tcb@upperbox}{##1}%
\kvtcb@fontupper\fontsize{\tcbfitdim}{\tcb@fit@@line}\selectfont%
- \kvtcb@halignupper\kvtcb@before@upper\ignorespaces#1\unskip\kvtcb@after@upper%
+% \kvtcb@halignupper\kvtcb@before@upper\ignorespaces#1\unskip\kvtcb@after@upper%
+ \kvtcb@halignupper\kvtcb@before@upper\ignorespaces#1\kvtcb@after@upper%
\end{tcb@savebox}%
\tcb@reset@color%
\advance\count@ 1\relax%
diff --git a/Master/texmf-dist/tex/latex/tcolorbox/tcbhooks.code.tex b/Master/texmf-dist/tex/latex/tcolorbox/tcbhooks.code.tex
index f4e80932675..04549bd4554 100644
--- a/Master/texmf-dist/tex/latex/tcolorbox/tcbhooks.code.tex
+++ b/Master/texmf-dist/tex/latex/tcolorbox/tcbhooks.code.tex
@@ -1,8 +1,8 @@
-%% The LaTeX package tcolorbox - version 3.73 (2015/10/16)
+%% The LaTeX package tcolorbox - version 3.80 (2015/11/27)
%% tcbhooks.code.tex: Code for adding hooks
%%
%% -------------------------------------------------------------------------------------------
-%% Copyright (c) 2006-2014 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
+%% Copyright (c) 2006-2015 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
%% -------------------------------------------------------------------------------------------
%%
%% This work may be distributed and/or modified under the
@@ -18,7 +18,7 @@
%% This work consists of all files listed in README
%%
%\makeatletter
-\tcb@set@library@version{3.73}
+\tcb@set@library@version{3.80}
\tcbset{%
before upper app/.code={\appto\kvtcb@before@upper{#1}},%
diff --git a/Master/texmf-dist/tex/latex/tcolorbox/tcblistings.code.tex b/Master/texmf-dist/tex/latex/tcolorbox/tcblistings.code.tex
index 8923e27de03..cdfbebbdff2 100644
--- a/Master/texmf-dist/tex/latex/tcolorbox/tcblistings.code.tex
+++ b/Master/texmf-dist/tex/latex/tcolorbox/tcblistings.code.tex
@@ -1,8 +1,8 @@
-%% The LaTeX package tcolorbox - version 3.73 (2015/10/16)
+%% The LaTeX package tcolorbox - version 3.80 (2015/11/27)
%% tcblistings.code.tex: Code for colorboxes with listings
%%
%% -------------------------------------------------------------------------------------------
-%% Copyright (c) 2006-2014 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
+%% Copyright (c) 2006-2015 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
%% -------------------------------------------------------------------------------------------
%%
%% This work may be distributed and/or modified under the
@@ -18,7 +18,7 @@
%% This work consists of all files listed in README
%%
%\makeatletter
-\tcb@set@library@version{3.73}
+\tcb@set@library@version{3.80}
\RequirePackage{listings}[2007/02/22]
diff --git a/Master/texmf-dist/tex/latex/tcolorbox/tcblistingscore.code.tex b/Master/texmf-dist/tex/latex/tcolorbox/tcblistingscore.code.tex
index 4e5cde12d15..d6d296c9521 100644
--- a/Master/texmf-dist/tex/latex/tcolorbox/tcblistingscore.code.tex
+++ b/Master/texmf-dist/tex/latex/tcolorbox/tcblistingscore.code.tex
@@ -1,8 +1,8 @@
-%% The LaTeX package tcolorbox - version 3.73 (2015/10/16)
+%% The LaTeX package tcolorbox - version 3.80 (2015/11/27)
%% tcblistingscode.code.tex: Auxiliary code for colorboxes with listings
%%
%% -------------------------------------------------------------------------------------------
-%% Copyright (c) 2006-2014 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
+%% Copyright (c) 2006-2015 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
%% -------------------------------------------------------------------------------------------
%%
%% This work may be distributed and/or modified under the
@@ -18,7 +18,7 @@
%% This work consists of all files listed in README
%%
%\makeatletter
-\tcb@set@library@version{3.73}
+\tcb@set@library@version{3.80}
\RequirePackage{pdftexcmds}
@@ -42,7 +42,8 @@
\newenvironment{tcb@lower@outside}[1]{%
\tcbset{savedelimiter=tcb@lower@outside}\tcb@minipage{#1}%
\color{tcbcol@lower}\kvtcb@fontlower\kvtcb@halignlower\kvtcb@before@lower\ignorespaces}%
- {\unskip\kvtcb@after@lower\endminipage}
+% {\unskip\kvtcb@after@lower\endminipage}
+ {\kvtcb@after@lower\endminipage}
\def\tcb@use@listing@other@reset{%
\tcbset{every box on layer 1/.style={reset,every box}}%
diff --git a/Master/texmf-dist/tex/latex/tcolorbox/tcblistingsutf8.code.tex b/Master/texmf-dist/tex/latex/tcolorbox/tcblistingsutf8.code.tex
index 1a07d852cc0..81cf7837dd7 100644
--- a/Master/texmf-dist/tex/latex/tcolorbox/tcblistingsutf8.code.tex
+++ b/Master/texmf-dist/tex/latex/tcolorbox/tcblistingsutf8.code.tex
@@ -1,8 +1,8 @@
-%% The LaTeX package tcolorbox - version 3.73 (2015/10/16)
+%% The LaTeX package tcolorbox - version 3.80 (2015/11/27)
%% tcblistingsutf8.code.tex: Code for colorboxes with listings in UTF-8
%%
%% -------------------------------------------------------------------------------------------
-%% Copyright (c) 2006-2014 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
+%% Copyright (c) 2006-2015 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
%% -------------------------------------------------------------------------------------------
%%
%% This work may be distributed and/or modified under the
@@ -17,7 +17,7 @@
%%
%% This work consists of all files listed in README
%%
-\tcb@set@library@version{3.73}
+\tcb@set@library@version{3.80}
\RequirePackage{listingsutf8}[2011/11/10]
\tcbuselibrary{listings}
diff --git a/Master/texmf-dist/tex/latex/tcolorbox/tcbmagazine.code.tex b/Master/texmf-dist/tex/latex/tcolorbox/tcbmagazine.code.tex
index b9735ea5fae..40a2828956b 100644
--- a/Master/texmf-dist/tex/latex/tcolorbox/tcbmagazine.code.tex
+++ b/Master/texmf-dist/tex/latex/tcolorbox/tcbmagazine.code.tex
@@ -1,4 +1,4 @@
-%% The LaTeX package tcolorbox - version 3.73 (2015/10/16)
+%% The LaTeX package tcolorbox - version 3.80 (2015/11/27)
%% tcbmagazine.code.tex: Code for box sets and magazine styles
%%
%% -------------------------------------------------------------------------------------------
@@ -17,7 +17,7 @@
%%
%% This work consists of all files listed in README
%%
-\tcb@set@library@version{3.73}
+\tcb@set@library@version{3.80}
\tcbuselibrary{breakable}
diff --git a/Master/texmf-dist/tex/latex/tcolorbox/tcbminted.code.tex b/Master/texmf-dist/tex/latex/tcolorbox/tcbminted.code.tex
index 3bae53fb3a9..c02b6fb15c7 100644
--- a/Master/texmf-dist/tex/latex/tcolorbox/tcbminted.code.tex
+++ b/Master/texmf-dist/tex/latex/tcolorbox/tcbminted.code.tex
@@ -1,8 +1,8 @@
-%% The LaTeX package tcolorbox - version 3.73 (2015/10/16)
+%% The LaTeX package tcolorbox - version 3.80 (2015/11/27)
%% tcbminted.code.tex: Code for colorboxes with listings
%%
%% -------------------------------------------------------------------------------------------
-%% Copyright (c) 2006-2014 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
+%% Copyright (c) 2006-2015 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
%% -------------------------------------------------------------------------------------------
%%
%% This work may be distributed and/or modified under the
@@ -18,7 +18,7 @@
%% This work consists of all files listed in README
%%
%\makeatletter
-\tcb@set@library@version{3.73}
+\tcb@set@library@version{3.80}
\RequirePackage{minted}[2011/09/17]
diff --git a/Master/texmf-dist/tex/latex/tcolorbox/tcbraster.code.tex b/Master/texmf-dist/tex/latex/tcolorbox/tcbraster.code.tex
index 7e4e2f08733..3c097718a3b 100644
--- a/Master/texmf-dist/tex/latex/tcolorbox/tcbraster.code.tex
+++ b/Master/texmf-dist/tex/latex/tcolorbox/tcbraster.code.tex
@@ -1,8 +1,8 @@
-%% The LaTeX package tcolorbox - version 3.73 (2015/10/16)
+%% The LaTeX package tcolorbox - version 3.80 (2015/11/27)
%% tcbskinsjigsaw.code.tex: Code for colorboxes with different skins
%%
%% -------------------------------------------------------------------------------------------
-%% Copyright (c) 2006-2014 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
+%% Copyright (c) 2006-2015 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
%% -------------------------------------------------------------------------------------------
%%
%% This work may be distributed and/or modified under the
@@ -17,7 +17,7 @@
%%
%% This work consists of all files listed in README
%%
-\tcb@set@library@version{3.73}
+\tcb@set@library@version{3.80}
\newcounter{tcbrastercolumn}
\newcounter{tcbrasterrow}
diff --git a/Master/texmf-dist/tex/latex/tcolorbox/tcbskins.code.tex b/Master/texmf-dist/tex/latex/tcolorbox/tcbskins.code.tex
index 70580b2eb81..ee765fe33ac 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 3.73 (2015/10/16)
+%% The LaTeX package tcolorbox - version 3.80 (2015/11/27)
%% 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{3.73}
+\tcb@set@library@version{3.80}
\RequirePackage{tikz}[2010/10/13]
diff --git a/Master/texmf-dist/tex/latex/tcolorbox/tcbskinsjigsaw.code.tex b/Master/texmf-dist/tex/latex/tcolorbox/tcbskinsjigsaw.code.tex
index edc382b4a2b..98ec28d47c4 100644
--- a/Master/texmf-dist/tex/latex/tcolorbox/tcbskinsjigsaw.code.tex
+++ b/Master/texmf-dist/tex/latex/tcolorbox/tcbskinsjigsaw.code.tex
@@ -1,4 +1,4 @@
-%% The LaTeX package tcolorbox - version 3.73 (2015/10/16)
+%% The LaTeX package tcolorbox - version 3.80 (2015/11/27)
%% tcbskinsjigsaw.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{3.73}
+\tcb@set@library@version{3.80}
\tcbuselibrary{skins}
diff --git a/Master/texmf-dist/tex/latex/tcolorbox/tcbtheorems.code.tex b/Master/texmf-dist/tex/latex/tcolorbox/tcbtheorems.code.tex
index dd4726b4811..3365d806cbd 100644
--- a/Master/texmf-dist/tex/latex/tcolorbox/tcbtheorems.code.tex
+++ b/Master/texmf-dist/tex/latex/tcolorbox/tcbtheorems.code.tex
@@ -1,8 +1,8 @@
-%% The LaTeX package tcolorbox - version 3.73 (2015/10/16)
+%% The LaTeX package tcolorbox - version 3.80 (2015/11/27)
%% tcbtheorems.code.tex: Code for theorems in colorboxes
%%
%% -------------------------------------------------------------------------------------------
-%% Copyright (c) 2006-2014 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
+%% Copyright (c) 2006-2015 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
%% -------------------------------------------------------------------------------------------
%%
%% This work may be distributed and/or modified under the
@@ -18,7 +18,7 @@
%% This work consists of all files listed in README
%%
%\makeatletter
-\tcb@set@library@version{3.73}
+\tcb@set@library@version{3.80}
\RequirePackage{amsmath}
diff --git a/Master/texmf-dist/tex/latex/tcolorbox/tcbxparse.code.tex b/Master/texmf-dist/tex/latex/tcolorbox/tcbxparse.code.tex
index 775d526581d..9da5627107d 100644
--- a/Master/texmf-dist/tex/latex/tcolorbox/tcbxparse.code.tex
+++ b/Master/texmf-dist/tex/latex/tcolorbox/tcbxparse.code.tex
@@ -1,8 +1,8 @@
-%% The LaTeX package tcolorbox - version 3.73 (2015/10/16)
+%% The LaTeX package tcolorbox - version 3.80 (2015/11/27)
%% tcbxparse.code.tex: Code for xparse features
%%
%% -------------------------------------------------------------------------------------------
-%% Copyright (c) 2006-2014 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
+%% Copyright (c) 2006-2015 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
%% -------------------------------------------------------------------------------------------
%%
%% This work may be distributed and/or modified under the
@@ -18,7 +18,7 @@
%% This work consists of all files listed in README
%%
%\makeatletter
-\tcb@set@library@version{3.73}
+\tcb@set@library@version{3.80}
\RequirePackage{xparse}[2013/12/31]
@@ -224,3 +224,65 @@
\let\tcb@process@newtcolorbox@continue\tcb@New@TCBInputListing%
\tcb@process@newcommand}
+
+%-- sidebyside --
+
+\def\tcb@sbs@content@none{\tcb@sbs@text@left\tcblower\tcb@sbs@text@right}
+\def\tcb@sbs@content@left{\box\tcb@upperbox\tcblower\tcb@sbs@text@right}
+\def\tcb@sbs@content@right{\tcb@sbs@text@left\tcblower\box\tcb@lowerbox}
+\def\tcb@sbs@content@both{\box\tcb@upperbox\tcblower\box\tcb@lowerbox}
+
+\tcbset{%
+ sidebyside adapt/.is choice,
+ sidebyside adapt/none/.style={%
+ sidebyside@adapt@process/.style={%
+ code={\let\tcb@sbs@content\tcb@sbs@content@none},
+ }%
+ },
+ sidebyside adapt/left/.style={%
+ sidebyside@adapt@process/.style={%
+ code={\sbox{\tcb@upperbox}{\tcb@sbs@text@left}\let\tcb@sbs@content\tcb@sbs@content@left},
+ lefthand width=\wd\tcb@upperbox,
+ }%
+ },
+ sidebyside adapt/right/.style={%
+ sidebyside@adapt@process/.style={%
+ code={\sbox{\tcb@lowerbox}{\tcb@sbs@text@right}\let\tcb@sbs@content\tcb@sbs@content@right},
+ righthand width=\wd\tcb@lowerbox,
+ }%
+ },
+ sidebyside adapt/both/.style={%
+ sidebyside@adapt@process/.style={%
+ code={\sbox{\tcb@upperbox}{\tcb@sbs@text@left}\sbox{\tcb@lowerbox}{\tcb@sbs@text@right}\let\tcb@sbs@content\tcb@sbs@content@both},
+ text width=\wd\tcb@upperbox+\kvtcb@sbs@gap+\wd\tcb@lowerbox,
+ lefthand width=\wd\tcb@upperbox,
+ }%
+ },
+ %
+ sidebyside switch/.is choice,
+ sidebyside switch/true/.style={%
+ sidebyside@switch/.code={%
+ \tcb@swap{\tcb@sbs@text@left}{\tcb@sbs@text@right}
+ }%
+ },
+ sidebyside switch/false/.style={%
+ sidebyside@switch/.style=%
+ },
+ sidebyside switch/.default=true
+}
+
+
+\DeclareTotalTColorBox{\tcbsidebyside}{ +O{} +m +m }{%
+ code={\long\def\tcb@sbs@text@left{#2}\long\def\tcb@sbs@text@right{#3}},%
+ #1,%
+ sidebyside,%
+ sidebyside@switch,sidebyside@adapt@process%
+}{\tcb@sbs@content}
+
+
+\tcbset{%
+ reset@xparse/.style={%
+ sidebyside adapt=none,sidebyside switch=false,%
+ },
+ initialize@reset=reset@xparse,
+}
diff --git a/Master/texmf-dist/tex/latex/tcolorbox/tcolorbox.sty b/Master/texmf-dist/tex/latex/tcolorbox/tcolorbox.sty
index ede4f486dc1..7462c504629 100644
--- a/Master/texmf-dist/tex/latex/tcolorbox/tcolorbox.sty
+++ b/Master/texmf-dist/tex/latex/tcolorbox/tcolorbox.sty
@@ -1,8 +1,8 @@
-%% The LaTeX package tcolorbox - version 3.73 (2015/10/16)
+%% The LaTeX package tcolorbox - version 3.80 (2015/11/27)
%% tcolorbox.sty: Text color boxes
%%
%% -------------------------------------------------------------------------------------------
-%% Copyright (c) 2006-2014 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
+%% Copyright (c) 2006-2015 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
%% -------------------------------------------------------------------------------------------
%%
%% This work may be distributed and/or modified under the
@@ -18,8 +18,8 @@
%% This work consists of all files listed in README
%%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{tcolorbox}[2015/10/16 version 3.73 text color boxes]
-\def\tcb@version{3.73}
+\ProvidesPackage{tcolorbox}[2015/11/27 version 3.80 text color boxes]
+\def\tcb@version{3.80}
\RequirePackage{pgf}[2008/01/15]
\RequirePackage{verbatim}[2003/08/22]
@@ -39,6 +39,7 @@
\newif\iftcb@titlefilled
\newif\iftcb@fixedheight
\newif\iftcb@ignorenobreak
+\newif\iftcb@checkpage
\newbox\tcb@titlebox
\newbox\tcb@upperbox
@@ -47,6 +48,7 @@
\newcounter{tcbbreakpart}
\newcounter{tcblayer}
+\newcount\tcolorbox@number
\def\tcb@warning#1{\PackageWarning{tcolorbox}{#1}}
\def\tcb@error#1#2{\PackageError{tcolorbox}{#1}{#2}}
@@ -116,7 +118,7 @@
\def\tcb@set@embed@tcbox#1{%
\long\def\tcb@embed@tcbox##1{%
- \tcbdimto\tcb@w@upper{\kvtcb@width-\kvtcb@left@rule-\kvtcb@leftupper-\kvtcb@boxsep*2-\kvtcb@rightupper-\kvtcb@right@rule}%
+ \tcbdimto\tcb@w@upper{\kvtcb@width-(\kvtcb@left@rule+\kvtcb@leftupper+(\kvtcb@boxsep)*2+\kvtcb@rightupper+\kvtcb@right@rule)}%
#1}%
}
@@ -201,10 +203,10 @@
circular arc/.style={arc=\tcb@innerwidth/2},
bean arc/.code={%
\iftcb@fixedheight%
- \ifdim\dimexpr\kvtcb@width-\kvtcb@left@rule-\kvtcb@right@rule>\dimexpr\kvtcb@height@fixed-\kvtcb@top@rule@stand-\kvtcb@bottom@rule@stand\relax%
- \def\kvtcb@arc{(\kvtcb@height@fixed-\kvtcb@top@rule@stand-\kvtcb@bottom@rule@stand)/2}%
+ \ifdim\dimexpr\kvtcb@width-(\kvtcb@left@rule+\kvtcb@right@rule)>\dimexpr\kvtcb@height@fixed-(\kvtcb@top@rule@stand+\kvtcb@bottom@rule@stand)\relax%
+ \def\kvtcb@arc{(\kvtcb@height@fixed-(\kvtcb@top@rule@stand+\kvtcb@bottom@rule@stand))/2}%
\else%
- \def\kvtcb@arc{(\kvtcb@width-\kvtcb@left@rule-\kvtcb@right@rule)/2}%
+ \def\kvtcb@arc{(\kvtcb@width-(\kvtcb@left@rule+\kvtcb@right@rule))/2}%
\fi%
\else%
\def\kvtcb@arc{\tcb@innerwidth/2}%
@@ -289,12 +291,13 @@
text height/.code={\tcb@fixedheighttrue\tcb@dim@to\kvtcb@height@fixed{#1}\let\tcb@ch=\tcb@ch@innerfixed\let\tcb@height@adjust\@empty},
add to height/.code={\ifdefined\kvtcb@height@fixed\tcbdimto\kvtcb@height@fixed{\kvtcb@height@fixed+(#1)}\fi},
height plus/.dimstore in=\kvtcb@height@fixed@plus,%
- height from/.style args={#1 to #2}{height={#1},height plus={#2-#1}},%
+ height from/.style args={#1 to #2}{height={#1},height plus={#2-(#1)}},%
height fill/.is choice,%
height fill/false/.code={\let\tcb@height@adjust\@empty},%
square/.style={height=\kvtcb@width},
equal height group/.code={\edef\tcb@ehgid{#1}\let\tcb@ch=\tcb@ch@equalheight},
minimum for equal height group/.code args={#1:#2}{\edef\tcb@ehgid{#1}\tcb@ehgadd{#2}},
+ use height from group/.code={\ifcsundef{tcb@ehg@height@#1}{}{\tcbset{height=\csuse{tcb@ehg@height@#1}}}},
space/.code={\def\tcb@height@fraction{#1}\let\tcb@ch@fixed@both=\tcb@ch@fixed@space},
space to upper/.style={space=1},
space to lower/.style={space=0},
@@ -359,17 +362,17 @@
grow to right by/.code={%
\tcbdimto\kvtcb@width{\kvtcb@width+#1}%
\pgfkeysalso{enlarge right by={-\the\dimexpr#1\relax}}},%
- left skip/.style={grow to left by={-#1}},
- right skip/.style={grow to right by={-#1}},
+ left skip/.style={grow to left by={-\dimexpr#1\relax}},
+ right skip/.style={grow to right by={-\dimexpr#1\relax}},
leftright skip/.style={left skip={#1},right skip={#1}},
toggle enlargement/.is choice,
toggle enlargement/none/.code={\let\tcb@setbb@toggle=\tcb@setbb@toggle@none},
- toggle enlargement/evenpage/.code={\let\tcb@setbb@toggle=\tcb@setbb@toggle@evenpage},
+ toggle enlargement/evenpage/.code={\let\tcb@setbb@toggle=\tcb@setbb@toggle@evenpage\tcbset{check odd page}},
toggle enlargement/forced/.code={\let\tcb@setbb@toggle=\tcb@setbb@toggle@forced},
toggle enlargement/.default=evenpage,
toggle left and right/.is choice,
toggle left and right/none/.code={\let\tcb@lrtoggle=\tcb@lrtoggle@none},
- toggle left and right/evenpage/.code={\let\tcb@lrtoggle=\tcb@lrtoggle@evenpage},
+ toggle left and right/evenpage/.code={\let\tcb@lrtoggle=\tcb@lrtoggle@evenpage\tcbset{check odd page}},
toggle left and right/forced/.code={\let\tcb@lrtoggle=\tcb@lrtoggle@forced},
toggle left and right/.default=evenpage,
graphical environment/.store in=\kvtcb@graphenv,
@@ -458,8 +461,10 @@
after title/.store in=\kvtcb@after@title,%
before upper/.store in=\kvtcb@before@upper,%
after upper/.store in=\kvtcb@after@upper,%
+ after upper*/.style={after upper={\unskip#1}},%
before lower/.store in=\kvtcb@before@lower,%
after lower/.store in=\kvtcb@after@lower,%
+ after lower*/.style={after lower={\unskip#1}},%
center title/.style={halign title=flush center},%
center upper/.style={halign upper=flush center},%
center lower/.style={halign lower=flush center},%
@@ -481,7 +486,7 @@
tikznode upper/.style={before upper={\centering\tcb@shield@externalize\begin{tikzpicture}\node[align=center,inner sep=0pt,outer sep=0pt,#1]\bgroup},after upper={\egroup;\end{tikzpicture}}},%
tikznode lower/.style={before lower={\centering\tcb@shield@externalize\begin{tikzpicture}\node[align=center,inner sep=0pt,outer sep=0pt,#1]\bgroup},after lower={\egroup;\end{tikzpicture}}},%
tikznode/.style={tikznode upper={#1},tikznode lower={#1}},%
- varwidth upper/.style={before upper={\tcbdimto\tcb@w@upper{#1-\kvtcb@left@rule-\kvtcb@right@rule-\kvtcb@boxsep*2-\kvtcb@leftupper-\kvtcb@rightupper}%
+ varwidth upper/.style={before upper={\tcbdimto\tcb@w@upper{#1-(\kvtcb@left@rule+\kvtcb@right@rule+(\kvtcb@boxsep)*2+\kvtcb@leftupper+\kvtcb@rightupper)}%
\begin{varwidth}{\tcb@w@upper}},after upper={\end{varwidth}}},%
varwidth upper/.default=\kvtcb@width,
text fill/.style={before upper={%
@@ -499,22 +504,26 @@
after upper=\endminipage},
oversize/.style={%
width=\the\dimexpr\dimexpr\linewidth+#1+\kvtcb@left@rule+\kvtcb@leftupper+\kvtcb@boxsep*2+\kvtcb@rightupper+\kvtcb@right@rule\relax,%
- enlarge left by=\the\dimexpr-\kvtcb@left@rule-\kvtcb@leftupper-\kvtcb@boxsep-#1/2\relax,%
- enlarge right by=\the\dimexpr-\kvtcb@boxsep-\kvtcb@rightupper-\kvtcb@right@rule-#1/2\relax},%
+ enlarge left by=-\the\dimexpr\kvtcb@left@rule+\kvtcb@leftupper+\kvtcb@boxsep+(#1)/2\relax,%
+ enlarge right by=-\the\dimexpr\kvtcb@boxsep+\kvtcb@rightupper+\kvtcb@right@rule+(#1)/2\relax},%
oversize/.default=0pt,%
+ flush right/.style={enlarge left by=\linewidth-(\kvtcb@width)},
+ flush left/.style={enlarge right by=\linewidth-(\kvtcb@width)},
+ center/.style={enlarge left by=(\linewidth-(\kvtcb@width))/2,enlarge right by=\kvtcb@bbleft},
baseline/.store in=\kvtcb@baseline,%
- tcbox raise/.style={baseline=-#1},%
+ tcbox raise/.style={baseline=-\the\dimexpr#1\relax},%
tcbox raise base/.style={baseline=\tcb@val@raisebase},%
box align/.is choice,%
box align/bottom/.style={baseline=0pt},%
box align/top/.style={baseline=\tcb@height},%
box align/center/.style={baseline=\tcb@height/2},%
box align/base/.style={baseline=\tcb@val@raisebase},%
- shrink tight/.style={boxsep=0mm,top=-\kvtcb@top@rule@stand,bottom=-\kvtcb@bottom@rule@stand,left=-\kvtcb@left@rule,right=-\kvtcb@right@rule},%
- extrude left by/.code={\tcbdimto\kvtcb@leftupper{\kvtcb@leftupper+#1}\tcbdimto\kvtcb@bbleft{\kvtcb@bbleft-#1}\tcbdimto\kvtcb@width{\kvtcb@width+#1}},%
- extrude right by/.code={\tcbdimto\kvtcb@rightupper{\kvtcb@rightupper+#1}\tcbdimto\kvtcb@bbright{\kvtcb@bbright-#1}\tcbdimto\kvtcb@width{\kvtcb@width+#1}},%
- extrude top by/.code={\tcbdimto\kvtcb@top{\kvtcb@top+#1}\tcbdimto\kvtcb@bbtop@stand{\kvtcb@bbtop@stand-#1}},%
- extrude bottom by/.code={\tcbdimto\kvtcb@bottom{\kvtcb@bottom+#1}\tcbdimto\kvtcb@bbbottom@stand{\kvtcb@bbbottom@stand-#1}},%
+ shrink tight/.style={boxsep=0mm,top=-\the\dimexpr\kvtcb@top@rule@stand\relax,bottom=-\the\dimexpr\kvtcb@bottom@rule@stand\relax,%
+ left=-\the\dimexpr\kvtcb@left@rule\relax,right=-\the\dimexpr\kvtcb@right@rule\relax},%
+ extrude left by/.code={\tcbdimto\kvtcb@leftupper{\kvtcb@leftupper+#1}\tcbdimto\kvtcb@bbleft{\kvtcb@bbleft-(#1)}\tcbdimto\kvtcb@width{\kvtcb@width+#1}},%
+ extrude right by/.code={\tcbdimto\kvtcb@rightupper{\kvtcb@rightupper+#1}\tcbdimto\kvtcb@bbright{\kvtcb@bbright-(#1)}\tcbdimto\kvtcb@width{\kvtcb@width+#1}},%
+ extrude top by/.code={\tcbdimto\kvtcb@top{\kvtcb@top+#1}\tcbdimto\kvtcb@bbtop@stand{\kvtcb@bbtop@stand-(#1)}},%
+ extrude bottom by/.code={\tcbdimto\kvtcb@bottom{\kvtcb@bottom+#1}\tcbdimto\kvtcb@bbbottom@stand{\kvtcb@bbbottom@stand-(#1)}},%
extrude by/.style={extrude left by=#1,extrude right by=#1,extrude top by=#1,extrude bottom by=#1},%
sidebyside/.is if=tcb@sidebyside,%
sidebyside align/.is choice,%
@@ -538,14 +547,11 @@
capture/.store in=\kvtcb@capture,%
hbox/.style={capture=hbox},%
minipage/.style={capture=minipage},%
- check odd page/.is choice,
- check odd page/true/.code={\let\tcb@checkoddpage=\checkoddpage%
- \def\tcb@evenoddmode{strict}%
- },
- check odd page/false/.code={\let\tcb@checkoddpage=\relax%
- \def\tcb@evenoddmode{easy}%
- },
- check odd page/.default=true,
+ check odd page/.is if=tcb@checkpage,
+ if odd page/.code 2 args={%
+ \tcbset{check odd page}%
+ \ifodd\thetcolorboxpage\tcbset{#1}\else\tcbset{#2}\fi%
+ },
phantom/.code={\appto\kvtcb@phantom{#1}},
step and label/.style 2 args={phantom={\refstepcounter{#1}\tcb@set@label{#2}}},%
step/.style={phantom={\refstepcounter{#1}}},%
@@ -668,7 +674,7 @@
\@endpefalse
\csname tcb@parbox@use@\kvtcb@parbox\endcsname%
\tcb@minipage#2\tcb@hyph@fix\ignorespaces}
-\def\endtcb@lrbox{\unskip\endminipage}
+\let\endtcb@lrbox=\endminipage
\let\tcb@savebox=\tcb@lrbox
\let\endtcb@savebox=\endtcb@lrbox
@@ -700,16 +706,18 @@
\def\tcb@set@@phantom{%
+ \iftcb@checkpage\tcb@phantom@savepage\fi%
\ifx\kvtcb@phantom\@empty\tcb@hasPhantomfalse\else%
\tcb@hasPhantomtrue%
\sbox\tcb@phantombox{\kvtcb@phantom}%
+ \let\kvtcb@phantom\@empty%
\fi%
}
\def\tcb@set@@title{%
\ifx\kvtcb@title\@empty\tcb@hasTitlefalse\tcb@specialtitle@hook\else%
\tcb@hasTitletrue%
- \tcbdimto\tcb@w@title{\kvtcb@width-(\kvtcb@left@rule)-(\kvtcb@right@rule)-(\kvtcb@boxsep)*2-(\kvtcb@lefttitle)-(\kvtcb@righttitle)}%
+ \tcbdimto\tcb@w@title{\kvtcb@width-(\kvtcb@left@rule+\kvtcb@right@rule+(\kvtcb@boxsep)*2+\kvtcb@lefttitle+\kvtcb@righttitle)}%
\begin{tcb@savebox}{\tcb@titlebox}{\tcb@w@title}\color{tcbcol@title}\kvtcb@fonttitle\kvtcb@haligntitle\kvtcb@before@title\kvtcb@title\kvtcb@after@title\end{tcb@savebox}%
\fi%
}
@@ -774,7 +782,7 @@
\let\tcb@after@box=\kvtcb@after@upper%
% switch for lower box
\def\tcblower{%
- \unskip\tcb@after@box%
+ \tcb@after@box%
\end{tcb@savebox}%
\tcb@set@color{tcbcol@lower}%
\unless\iftcb@sidebyside%
@@ -827,6 +835,35 @@
\tcb@finalize@environment%
}
+\def\tcb@count@boxes{%
+ \global\advance\tcolorbox@number by 1\relax%
+ \edef\thetcolorboxnumber{\number\tcolorbox@number}%
+ \expandafter\ifx\csname tcolorboxpage@\thetcolorboxnumber\endcsname\relax%
+ \edef\thetcolorboxpage{\number\c@page}%
+ \else%
+ \expandafter\let\expandafter\thetcolorboxpage\csname tcolorboxpage@\thetcolorboxnumber\endcsname%
+ \fi%
+}
+
+\def\tcolorbox@label{\@newl@bel{tcolorboxpage}}%
+
+\write\@auxout{\string\providecommand\string\tcolorbox@label[2]{}}%
+
+\def\tcolorbox@savepage#1{%
+ \@bsphack%
+ \write\@auxout{\string\tcolorbox@label{#1}{\number\c@page}}%
+ \@esphack%
+}%
+
+\def\tcb@phantom@savepage{\preto\kvtcb@phantom{\expandafter\tcolorbox@savepage\expandafter{\thetcolorboxnumber}}}
+
+\def\tcbifoddpage{%
+ \ifodd\thetcolorboxpage\relax%
+ \expandafter\@firstoftwo%
+ \else%
+ \expandafter\@secondoftwo%
+ \fi%
+}
\def\tcb@managed@layers@max{0}
\def\tcbsetmanagedlayers#1{%
@@ -853,6 +890,7 @@
}
\def\tcb@layer@inc{%
+ \tcb@count@boxes%
\stepcounter{tcblayer}%
\ifnum\c@tcblayer>1%
\tcbset{breakable@true/.code=}%
@@ -869,6 +907,8 @@
}
\def\tcb@layer@pushup{%
+ \tcb@count@boxes%
+ \global\advance\tcolorbox@number by -1\relax%
\stepcounter{tcblayer}%
\ifnum\c@tcblayer>1%
\tcbset{breakable@true/.code=}%
@@ -913,7 +953,7 @@
\let\tcolorbox\tcb@colorbox
\def\tcb@endboxanddraw{%
- \unskip\tcb@after@box%
+ \tcb@after@box%
\end{tcb@savebox}%
\tcb@reset@color%
\tcb@draw@color@box%
@@ -929,7 +969,7 @@
% height computations
\def\tcb@ch@natural{%
- \edef\tcb@height{\tcb@natheight}%
+ \let\tcb@height\tcb@natheight%
\tcbdimto\tcb@height@upper{\ht\tcb@upperbox+\dp\tcb@upperbox}%
\iftcb@lowerspace%
\tcbdimto\tcb@height@lower{\ht\tcb@lowerbox+\dp\tcb@lowerbox}%
@@ -955,13 +995,13 @@
\def\tcb@ch@fixed{%
\ifdim\tcb@natheight<\dimexpr\kvtcb@height@fixed\relax%
- \edef\tcb@height{\kvtcb@height@fixed}%
+ \tcbdimto\tcb@height{\kvtcb@height@fixed}%
\else%
\tcbdimto\tcb@temp{\kvtcb@height@fixed+\kvtcb@height@fixed@plus}%
- \ifdim\tcb@natheight>\tcb@temp%
- \edef\tcb@height{\tcb@temp}%
+ \ifdim\tcb@natheight>\tcb@temp\relax%
+ \let\tcb@height\tcb@temp%
\else%
- \edef\tcb@height{\tcb@natheight}%
+ \let\tcb@height\tcb@natheight%
\fi%
\fi%
\iftcb@lowerspace\tcb@ch@fixed@both\else\tcb@ch@fixed@upper\fi%
@@ -972,6 +1012,14 @@
\tcb@ch@fixed%
}
+\def\tcbheightfromgroup#1#2{%
+ \ifcsundef{tcb@ehg@height@#2}{%
+ \let#1\tcb@zpt%
+ }{%
+ \letcs{#1}{tcb@ehg@height@#2}%
+ }%
+}
+
\def\tcb@saveehg#1{%
\immediate\write\@auxout{\string\csgdef{tcb@ehg@height@#1}{\csuse{tcb@ehg@current@#1}}}%
}
@@ -992,12 +1040,12 @@
\tcb@ehgadd{\tcb@natheight}%
\ifcsdef{tcb@ehg@height@\tcb@ehgid}{%
\ifdim\csuse{tcb@ehg@height@\tcb@ehgid}<\tcb@natheight\relax%
- \edef\tcb@height{\tcb@natheight}%
+ \let\tcb@height\tcb@natheight%
\else%
\letcs{\tcb@height}{tcb@ehg@height@\tcb@ehgid}%
\fi%
}{%
- \edef\tcb@height{\tcb@natheight}%
+ \let\tcb@height\tcb@natheight%
}%
\iftcb@lowerspace\tcb@ch@fixed@both\else\tcb@ch@fixed@upper\fi%
}
@@ -1243,7 +1291,6 @@
\end{pgfscope}%
}
-
\def\tcb@setbb@toggle@none{%
\pgfpathrectanglecorners{\pgfqpoint{\the\dimexpr0pt-\kvtcb@bbleft\relax}{\the\dimexpr0pt-\kvtcb@bbbottom\relax}}%
{\pgfqpoint{\the\dimexpr\tcb@width+\kvtcb@bbright\relax}{\the\dimexpr\tcb@height+\kvtcb@bbtop\relax}}%
@@ -1254,16 +1301,8 @@
{\pgfqpoint{\the\dimexpr\tcb@width+\kvtcb@bbleft\relax}{\the\dimexpr\tcb@height+\kvtcb@bbtop\relax}}%
}
-\def\tcb@setbb@toggle@evenpage@easy{%
- \ifodd\thepage\tcb@setbb@toggle@none\else\tcb@setbb@toggle@forced\fi%
-}
-
-\def\tcb@setbb@toggle@evenpage@strict{%
- \ifoddpage\tcb@setbb@toggle@none\else\tcb@setbb@toggle@forced\fi%
-}
-
\def\tcb@setbb@toggle@evenpage{%
- \csname tcb@setbb@toggle@evenpage@\tcb@evenoddmode\endcsname%
+ \ifodd\thetcolorboxpage\tcb@setbb@toggle@none\else\tcb@setbb@toggle@forced\fi%
}
\def\tcb@creategeonodes@false{}
@@ -1283,20 +1322,11 @@
\tcb@swap{\kvtcb@leftlower}{\kvtcb@rightlower}%
}
-\def\tcb@lrtoggle@evenpage@easy{%
- \unless\ifodd\thepage\tcb@lrtoggle@forced\fi%
-}
-
-\def\tcb@lrtoggle@evenpage@strict{%
- \unless\ifoddpage\tcb@lrtoggle@forced\fi%
-}
-
\def\tcb@lrtoggle@evenpage{%
- \csname tcb@lrtoggle@evenpage@\tcb@evenoddmode\endcsname%
+ \unless\ifodd\thetcolorboxpage\tcb@lrtoggle@forced\fi%
}
\def\tcb@bbdraw{%
- \tcb@checkoddpage%
\tcb@lrtoggle%
\tcb@setbb@toggle%
\pgfusepath{use as bounding box}%
@@ -1511,7 +1541,7 @@
\tcb@set@@phantom%
\colorlet{tcbcol@origin}{.}%
\tcb@set@color{tcbcol@upper}%
- \sbox\tcb@upperbox{\tcb@embed@tcbox{\kvtcb@fontupper\kvtcb@halignupper\kvtcb@before@upper\ignorespaces#1\unskip\kvtcb@after@upper}}%
+ \sbox\tcb@upperbox{\tcb@embed@tcbox{\kvtcb@fontupper\kvtcb@halignupper\kvtcb@before@upper\ignorespaces#1\kvtcb@after@upper}}%
\tcb@reset@color%
\tcbdimto\tcb@val@raisebase{\the\dimexpr\dp\tcb@upperbox+\kvtcb@bottom+\kvtcb@boxsep+\kvtcb@bottom@rule@stand+\kvtcb@bbbottom@stand\relax}%
\tcbdimto\kvtcb@width{\wd\tcb@upperbox+\kvtcb@left@rule+\kvtcb@leftupper+\kvtcb@boxsep*2+\kvtcb@rightupper+\kvtcb@right@rule}%
@@ -1529,7 +1559,7 @@
\tcb@set@@dimensions%
\colorlet{tcbcol@origin}{.}%
\tcb@set@color{tcbcol@upper}%
- \begin{tcb@savebox}{\tcb@upperbox}{\tcb@w@upper}\kvtcb@fontupper\kvtcb@halignupper\kvtcb@before@upper\ignorespaces#1\unskip\kvtcb@after@upper\end{tcb@savebox}%
+ \begin{tcb@savebox}{\tcb@upperbox}{\tcb@w@upper}\kvtcb@fontupper\kvtcb@halignupper\kvtcb@before@upper\ignorespaces#1\kvtcb@after@upper\end{tcb@savebox}%
\tcb@reset@color%
\tcb@hasLowerfalse%
\tcb@draw@color@box%