summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/tcolorbox/tcolorbox.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-03-31 22:28:56 +0000
committerKarl Berry <karl@freefriends.org>2014-03-31 22:28:56 +0000
commit0b84dfe8877345df35ceb87ec739c298dcc72b92 (patch)
tree5249c2f500210cb8b8d27fbc6fb594a91b5545e7 /Master/texmf-dist/tex/latex/tcolorbox/tcolorbox.sty
parentc17623666aa19d3dda7d2ba547d2a877df300d76 (diff)
tcolorbox (31mar14)
git-svn-id: svn://tug.org/texlive/trunk@33340 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/tcolorbox/tcolorbox.sty')
-rw-r--r--Master/texmf-dist/tex/latex/tcolorbox/tcolorbox.sty98
1 files changed, 47 insertions, 51 deletions
diff --git a/Master/texmf-dist/tex/latex/tcolorbox/tcolorbox.sty b/Master/texmf-dist/tex/latex/tcolorbox/tcolorbox.sty
index c6c39d25d05..4789a631490 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.72 (2014/03/18)
+%% The LaTeX package tcolorbox - version 2.80 (2014/03/31)
%% tcolorbox.sty: Text color boxes
%%
%% -------------------------------------------------------------------------------------------
@@ -18,8 +18,8 @@
%% This work consists of all files listed in README
%%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{tcolorbox}[2014/03/18 version 2.72 text color boxes]
-\def\tcb@version{2.72}
+\ProvidesPackage{tcolorbox}[2014/03/31 version 2.80 text color boxes]
+\def\tcb@version{2.80}
\RequirePackage{pgf}[2008/01/15]
\RequirePackage{verbatim}[2003/08/22]
@@ -187,8 +187,10 @@
savelowerto/.store in=\kvtcb@savelowerto,
savedelimiter/.estore in=\kvtcb@savedelimiter,
floatplacement/.store in=\kvtcb@floatplacement,
- float/.store in=\kvtcb@float,
+ float/.code={\def\kvtcb@float{#1}\def\tcb@float@env@begin{\@float}\def\tcb@float@env@end{\end@float}},
float/.default=\kvtcb@floatplacement,
+ float*/.code={\def\kvtcb@float{#1}\def\tcb@float@env@begin{\@dblfloat}\def\tcb@float@env@end{\end@dblfloat}},
+ float*/.default=\kvtcb@floatplacement,
nofloat/.style={float=},
before/.code={\def\kvtcb@beforebox{#1}\let\tcb@use@autoparskip=\relax},
after/.code={\def\kvtcb@afterbox{#1}\let\tcb@use@autoparskip=\relax},
@@ -973,8 +975,8 @@
\ifx\kvtcb@float\@empty%
\newenvironment{tcb@float}{\kvtcb@beforebox}{\kvtcb@afterbox}%
\else%
- \edef\float@start{\noexpand\@float{tcbfloat}[\kvtcb@float]}%
- \newenvironment{tcb@float}{\float@start}{\end@float}%
+ \edef\tcb@float@env@start{\noexpand\tcb@float@env@begin{tcbfloat}[\kvtcb@float]}%
+ \newenvironment{tcb@float}{\tcb@float@env@start}{\tcb@float@env@end}%
\fi%
\setcounter{tcbbreakpart}{1}%
% computation of total height
@@ -1109,7 +1111,7 @@
\appto\tcb@new@colopt{,code={\let\tcbcounter=\@empty\let\thetcbcounter=\@empty}}%
}%
-\def\tcb@proc@options@init#1#2{%
+\long\def\tcb@proc@options@init#1#2{%
\tcbset{new/.cd,reset@new,#1}%
\tcb@proc@counter{#2}%
\ifx\kvtcb@new@listof\@empty%
@@ -1121,6 +1123,22 @@
\kvtcb@init@hook%
}%
+\long\def\tcb@process@newtcolorbox#1#2{%
+ \def\tcb@new@colopt{}%
+ \long\def\temp@a{#2}%
+ \ifx\temp@a\@empty\relax%
+ \else%
+ \tcb@proc@options@init{#2}{#1}%
+ \fi%
+ \preto\tcb@new@colopt{savedelimiter=#1}%
+ \cslet{tcb@opt@#1}{\tcb@new@colopt}%
+ \tcb@process@newtcolorbox@continue{#1}%
+}
+
+\newcommand\tcb@process@newenvironment[2][]{%
+ \tcb@process@newtcolorbox{#2}{#1}%
+}
+
\long\def\tcb@newtcolorbox#1#2{\tcb@newenvironment{#1}{\tcolorbox[#2,options@for=#1]}{\endtcolorbox}}
\long\def\tcb@newtcolorbox@#1[#2]#3{\tcb@newenvironment{#1}[#2]{\tcolorbox[#3,options@for=#1]}{\endtcolorbox}}
@@ -1130,27 +1148,19 @@
\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}%
+\def\tcb@new@tcolorbox#1{%
\@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\new@tcolorbox{%
- \def\tcb@new@colopt{}%
- \@ifnextchar[{\tcb@new@tcolorbox@opt}{\tcb@new@tcolorbox}}
-
-\long\def\newtcolorbox{%
+\def\newtcolorbox{%
\let\tcb@newenvironment\newenvironment%
- \new@tcolorbox}
+ \let\tcb@process@newtcolorbox@continue\tcb@new@tcolorbox%
+ \tcb@process@newenvironment}
-\long\def\renewtcolorbox{%
+\def\renewtcolorbox{%
\let\tcb@newenvironment\renewenvironment%
- \new@tcolorbox}
+ \let\tcb@process@newtcolorbox@continue\tcb@new@tcolorbox%
+ \tcb@process@newenvironment}
+
% auxiliary code to remove a leading backspace
\newcommand{\tcb@remove@bs}[1]{%
@@ -1167,6 +1177,10 @@
-\number\fi\expandafter\z@}
\newcommand{\tcb@remove@bs@aux@iii}[1]{\z@}
+\newcommand\tcb@process@newcommand[2][]{%
+ \edef\tcb@temp{\noexpand\tcb@process@newtcolorbox{\tcb@remove@bs{#2}}}%
+ \tcb@temp{#1}%
+}
\long\def\tcb@newtcbox#1#2{\expandafter\tcb@newcommand\csname#1\endcsname{\tcbox[#2,options@for=#1]}}
@@ -1177,38 +1191,19 @@
\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}%
+\def\tcb@new@tcbox#1{%
\@ifnextchar[{\tcb@new@tcbox@{#1}}{\tcb@newtcbox{#1}}}
-
-\long\def\tcb@new@tcbox@bs#1{%
- \edef\tcb@temp{\noexpand\tcb@new@tcbox{\tcb@remove@bs{#1}}}%
- \tcb@temp%
-}
-
-\long\def\tcb@new@tcbox@opt#1#2{%
- \tcb@proc@options@init{#2}{#1}%
- \tcb@new@tcbox{#1}%
-}
-
-\long\def\tcb@new@tcbox@opt@bs[#1]#2{%
- \edef\tcb@temp{\noexpand\tcb@new@tcbox@opt{\tcb@remove@bs{#2}}}%
- \tcb@temp{#1}%
-}
-
-\long\def\new@tcbox{%
- \def\tcb@new@colopt{}%
- \@ifnextchar[{\tcb@new@tcbox@opt@bs}{\tcb@new@tcbox@bs}}
-
-\long\def\newtcbox{%
+\def\newtcbox{%
\let\tcb@newcommand\newcommand%
- \new@tcbox}
+ \let\tcb@process@newtcolorbox@continue\tcb@new@tcbox%
+ \tcb@process@newcommand}
-\long\def\renewtcbox{%
+\def\renewtcbox{%
\let\tcb@newcommand\renewcommand%
- \new@tcbox}
+ \let\tcb@process@newtcolorbox@continue\tcb@new@tcbox%
+ \tcb@process@newcommand}
+
\def\tcb@addcontentsline#1#2{%
\ifx\kvtcb@listentry\@empty%
@@ -1385,8 +1380,9 @@
\tcb@add@library{breakable}{tcbbreakable.code.tex}
\tcb@add@library{hooks}{tcbhooks.code.tex}
\tcb@add@library{fitting}{tcbfitting.code.tex}
+\tcb@add@library{xparse}{tcbxparse.code.tex}
-\tcb@add@library@style{many}{skins,breakable,hooks,theorems,fitting}
+\tcb@add@library@style{many}{skins,breakable,hooks,theorems,fitting,xparse}
\tcb@add@library@style{most}{many,listingsutf8}
\tcb@add@library@style{all}{many,minted,listingsutf8,documentation}