diff options
author | Karl Berry <karl@freefriends.org> | 2013-03-13 22:36:05 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-03-13 22:36:05 +0000 |
commit | 65a918d3999ecd54dfbaf82260fdd20ddb3f4520 (patch) | |
tree | ac0a0b20e5c9454ce025baf53471eb45fc145cae /Master/texmf-dist/tex/latex | |
parent | 95080bc66f5d1022cbcfbe7535a87055d02aa568 (diff) |
tcolorbox (13mar13)
git-svn-id: svn://tug.org/texlive/trunk@29372 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
7 files changed, 57 insertions, 20 deletions
diff --git a/Master/texmf-dist/tex/latex/tcolorbox/tcbbreakable.code.tex b/Master/texmf-dist/tex/latex/tcolorbox/tcbbreakable.code.tex index 0764c048932..0a84e4088b4 100644 --- a/Master/texmf-dist/tex/latex/tcolorbox/tcbbreakable.code.tex +++ b/Master/texmf-dist/tex/latex/tcolorbox/tcbbreakable.code.tex @@ -1,4 +1,4 @@ -%% The LaTeX package tcolorbox - version 2.01 (2013/03/07) +%% The LaTeX package tcolorbox - version 2.02 (2013/03/13) %% tcbbreakable.code.tex: Code for breakable colorboxes %% %% ------------------------------------------------------------------------------------------- @@ -57,8 +57,8 @@ \def\tcb@following@title{% \ifx\kvtcb@followingtitle\@empty% \tcb@hasTitlefalse% - \edef\tcb@h@title{0pt}% - \edef\tcb@h@padtitle{0pt}% + \let\tcb@h@title=\tcb@zpt% + \let\tcb@h@padtitle=\tcb@zpt% \else% \tcb@hasTitletrue% \tcbdimto\tcb@w@title{\tcb@innerwidth-\kvtcb@boxsep*2-\kvtcb@lefttitle-\kvtcb@righttitle}% @@ -80,8 +80,8 @@ \tcbdimto\tcb@h@after{\ht\z@+\dp\z@}% % \else% - \edef\tcb@h@before{0pt}% - \edef\tcb@h@after{0pt}% + \let\tcb@h@before=\tcb@zpt% + \let\tcb@h@after=\tcb@zpt% \fi% \tcb@comp@h@page% % @@ -265,7 +265,7 @@ \stepcounter{tcbbreakpart}% \tcb@following@title% \tcb@comp@h@page% - \edef\tcb@h@upper{0pt}% + \let\tcb@h@upper=\tcb@zpt% \tcbdimto\tcb@h@lower{\ht\tcb@totallowerbox+\dp\tcb@totallowerbox}% \tcbdimto\tcb@h@total{\tcb@h@after+\tcb@h@padding@last-\kvtcb@top-\kvtcb@boxsep+\tcb@h@padtitle+\tcb@h@segment+\tcb@h@lower}% % @@ -289,7 +289,7 @@ \stepcounter{tcbbreakpart}% \tcb@following@title% \tcb@comp@h@page% - \edef\tcb@h@upper{0pt}% + \let\tcb@h@upper=\tcb@zpt% \tcbdimto\tcb@h@lower{\ht\tcb@totallowerbox+\dp\tcb@totallowerbox}% \tcbdimto\tcb@h@total{\tcb@h@after+\tcb@h@padding@last+\tcb@h@padtitle+\tcb@h@lower}% % diff --git a/Master/texmf-dist/tex/latex/tcolorbox/tcbdocumentation.code.tex b/Master/texmf-dist/tex/latex/tcolorbox/tcbdocumentation.code.tex index fd4481c5abd..ddcafbbea23 100644 --- a/Master/texmf-dist/tex/latex/tcolorbox/tcbdocumentation.code.tex +++ b/Master/texmf-dist/tex/latex/tcolorbox/tcbdocumentation.code.tex @@ -1,4 +1,4 @@ -%% The LaTeX package tcolorbox - version 2.01 (2013/03/07) +%% The LaTeX package tcolorbox - version 2.02 (2013/03/13) %% tcbdocumentation.code.tex: Code for LaTeX documentations %% %% ------------------------------------------------------------------------------------------- diff --git a/Master/texmf-dist/tex/latex/tcolorbox/tcblistings.code.tex b/Master/texmf-dist/tex/latex/tcolorbox/tcblistings.code.tex index deca862db43..f6c9b92c747 100644 --- a/Master/texmf-dist/tex/latex/tcolorbox/tcblistings.code.tex +++ b/Master/texmf-dist/tex/latex/tcolorbox/tcblistings.code.tex @@ -1,4 +1,4 @@ -%% The LaTeX package tcolorbox - version 2.01 (2013/03/07) +%% The LaTeX package tcolorbox - version 2.02 (2013/03/13) %% tcblistings.code.tex: Code for colorboxes with listings %% %% ------------------------------------------------------------------------------------------- diff --git a/Master/texmf-dist/tex/latex/tcolorbox/tcblistingsutf8.code.tex b/Master/texmf-dist/tex/latex/tcolorbox/tcblistingsutf8.code.tex index 723fd1e6f3e..bcff9d3378b 100644 --- a/Master/texmf-dist/tex/latex/tcolorbox/tcblistingsutf8.code.tex +++ b/Master/texmf-dist/tex/latex/tcolorbox/tcblistingsutf8.code.tex @@ -1,4 +1,4 @@ -%% The LaTeX package tcolorbox - version 2.01 (2013/03/07) +%% The LaTeX package tcolorbox - version 2.02 (2013/03/13) %% tcblistingsutf8.code.tex: Code for colorboxes with listings in UTF-8 %% %% ------------------------------------------------------------------------------------------- diff --git a/Master/texmf-dist/tex/latex/tcolorbox/tcbskins.code.tex b/Master/texmf-dist/tex/latex/tcolorbox/tcbskins.code.tex index 408f0cda0e1..e45efa1954f 100644 --- a/Master/texmf-dist/tex/latex/tcolorbox/tcbskins.code.tex +++ b/Master/texmf-dist/tex/latex/tcolorbox/tcbskins.code.tex @@ -1,4 +1,4 @@ -%% The LaTeX package tcolorbox - version 2.01 (2013/03/07) +%% The LaTeX package tcolorbox - version 2.02 (2013/03/13) %% tcbskins.code.tex: Code for colorboxes with different skins %% %% ------------------------------------------------------------------------------------------- @@ -105,10 +105,25 @@ % draw segmentation line \def\tcb@drawlower@path{% - \path[draw=\kvtcb@colframe,dashed,tcb@spec,segmentation@style] + \path[draw=\kvtcb@colframe,dash pattern=on 1mm off 1mm,dash phase=0.5mm,tcb@spec,segmentation@style] (segmentation.west)--(segmentation.east);% } +\long\def\tcb@pseudo@segmentation#1{% +{\parskip\z@\par\nointerlineskip}\begingroup% +\begin{tikzpicture}% + \path[use as bounding box] (0,{\the\dimexpr-\kvtcb@middle-\kvtcb@boxsep\relax}) rectangle (0,{\the\dimexpr\kvtcb@middle+\kvtcb@boxsep\relax}); + \node[line width=0mm,inner sep=0mm,draw=none,fill=none,rectangle, + name=segmentation,at={({\the\dimexpr-#1-\kvtcb@boxsep\relax},0)},right,% + minimum width=\tcb@innerwidth,minimum height=\the\dimexpr\kvtcb@middle*2\relax]{}; + \tcb@drawlower@path% +\end{tikzpicture}% +\endgroup{\parskip\z@\par\nointerlineskip}% +} + +\def\tcbline{\iftcb@hasLower\tcb@pseudo@segmentation{\kvtcb@leftlower}% + \else\tcb@pseudo@segmentation{\kvtcb@leftupper}\fi} + % draw title box \def\tcb@drawtitle@path{% \path[tcb@spec,title@style] @@ -181,6 +196,7 @@ segmentation code/.code={\def\tcb@segmentation@code{#1}},% segmentation code/.default=\tcb@drawlower@standard,% title style/.code={\tikzset{title@style/.style={#1}}},% + colbacktitle/.style={title style={fill=#1}}, title code/.code={\def\tcb@title@code{#1}},% title code/.default=\tcb@drawtitle@standard,% colbacklower/.store in=\kvtcb@colbacklower,% diff --git a/Master/texmf-dist/tex/latex/tcolorbox/tcbtheorems.code.tex b/Master/texmf-dist/tex/latex/tcolorbox/tcbtheorems.code.tex index d1bad85009c..ed55cf8f570 100644 --- a/Master/texmf-dist/tex/latex/tcolorbox/tcbtheorems.code.tex +++ b/Master/texmf-dist/tex/latex/tcolorbox/tcbtheorems.code.tex @@ -1,4 +1,4 @@ -%% The LaTeX package tcolorbox - version 2.01 (2013/03/07) +%% The LaTeX package tcolorbox - version 2.02 (2013/03/13) %% tcbtheorems.code.tex: Code for theorems in colorboxes %% %% ------------------------------------------------------------------------------------------- diff --git a/Master/texmf-dist/tex/latex/tcolorbox/tcolorbox.sty b/Master/texmf-dist/tex/latex/tcolorbox/tcolorbox.sty index a87b89d674c..8fb0ed7dbef 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.01 (2013/03/07) +%% The LaTeX package tcolorbox - version 2.02 (2013/03/13) %% tcolorbox.sty: Text color boxes %% %% ------------------------------------------------------------------------------------------- @@ -18,7 +18,7 @@ %% This work consists of all files listed in README %% \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{tcolorbox}[2013/03/07 version 2.01 text color boxes] +\ProvidesPackage{tcolorbox}[2013/03/13 version 2.02 text color boxes] \RequirePackage{pgf}[2008/01/15] \RequirePackage{verbatim}[2003/08/22] @@ -60,6 +60,10 @@ \let\tcb@outer@arc=\kvtcb@outerarc% } +\def\tcb@use@auto@parskip{% + \tcbset{autoparskip}% +} + \tcbset{ title/.store in=\kvtcb@title, notitle/.style={title=}, @@ -119,14 +123,16 @@ float/.store in=\kvtcb@float, float/.default=\kvtcb@floatplacement, nofloat/.style={float=}, - before/.store in=\kvtcb@beforebox, - after/.store in=\kvtcb@afterbox, + before/.code={\def\kvtcb@beforebox{#1}\let\tcb@use@autoparskip=\relax}, + after/.code={\def\kvtcb@afterbox{#1}\let\tcb@use@autoparskip=\relax}, + autoparskip/.code={\let\tcb@use@autoparskip=\tcb@use@auto@parskip}, + parskip/.style={before={\par\pagebreak[0]\noindent},after={\par}}, + noparskip/.style={before={\par\smallskip\pagebreak[0]\noindent},after={\par\smallskip}}, + nobeforeafter/.style={before=,after=}, lowerbox/.is choice, lowerbox/visible/.code={\tcb@lowerignoredfalse\tcb@lowervisibletrue}, lowerbox/invisible/.code={\tcb@lowerignoredfalse\tcb@lowervisiblefalse}, lowerbox/ignored/.code={\tcb@lowerignoredtrue\tcb@lowervisiblefalse}, - parskip/.style={before={\par\pagebreak[0]\noindent},after={\par}}, - noparskip/.style={before={\par\smallskip\pagebreak[0]\noindent},after={\par\smallskip}}, natural height/.code={\let\tcb@ch=\tcb@ch@natural}, height/.code={\def\tcb@height@fixed{#1}\let\tcb@ch=\tcb@ch@fixed}, equal height group/.code={\edef\tcb@ehgid{#1}\let\tcb@ch=\tcb@ch@equalheight}, @@ -194,7 +200,7 @@ left=4mm,right=4mm,top=2mm,bottom=2mm,middle=2mm,arc=1mm,lowerbox=visible, colback=black!5!white,colframe=black!75!white,coltext=black,coltitle=white, fonttitle=,fontupper=,fontlower=,floatplacement=htb,nofloat,savelowerto=, - parskip,savedelimiter={tcolorbox},tempfile={\jobname.tcbtemp}, + savedelimiter={tcolorbox},tempfile={\jobname.tcbtemp},autoparskip, enlarge top by=0mm,enlarge bottom by=0mm,enlarge left by=0mm,enlarge right by=0mm, toggle enlargement=none,toptitle=0mm,bottomtitle=0mm, standard,parbox,overlay=,auto outer arc, @@ -240,6 +246,12 @@ {\edef\ftype@tcbfloat{\the\c@float@type}% \addtocounter{float@type}{\value{float@type}}}% \def\c@tcbfloat{\c@float@type}% tricking the caption package +\ifdim\parskip>0pt% + \tcbset{autoparskip/.style=parskip}% +\else% + \tcbset{autoparskip/.style=noparskip}% +\fi% +\tcb@use@autoparskip% } \long\def\tcb@colorbox{% @@ -525,6 +537,15 @@ } +\newcommand{\tcbox}[2][]{% + \setbox0=\hbox{#2}% + \tcbdimto{\tcb@temp@inner}{\wd0}% + \begin{tcolorbox}[#1,width=\the\dimexpr\tcb@temp@inner+\kvtcb@left@rule+\kvtcb@leftupper+\kvtcb@boxsep*2+\kvtcb@rightupper+\kvtcb@right@rule\relax]% + \unhbox0% + \end{tcolorbox}% +} + + % verbatim output as in 'verbatim' \newwrite\tcb@out |