From b425e73e73597d25c058662c7dbf6ee559cbdda5 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 3 Aug 2014 17:42:08 +0000 Subject: tcolorbox git-svn-id: svn://tug.org/texlive/trunk@34818 c570f23f-e606-0410-a88d-b1316a301751 --- .../tex/latex/tcolorbox/tcbbreakable.code.tex | 84 +++++++++++----------- .../tex/latex/tcolorbox/tcbdocumentation.code.tex | 4 +- .../tex/latex/tcolorbox/tcbfitting.code.tex | 4 +- .../tex/latex/tcolorbox/tcbhooks.code.tex | 4 +- .../tex/latex/tcolorbox/tcblistings.code.tex | 4 +- .../tex/latex/tcolorbox/tcblistingscore.code.tex | 4 +- .../tex/latex/tcolorbox/tcblistingsutf8.code.tex | 4 +- .../tex/latex/tcolorbox/tcbminted.code.tex | 4 +- .../tex/latex/tcolorbox/tcbskins.code.tex | 4 +- .../tex/latex/tcolorbox/tcbskinsjigsaw.code.tex | 4 +- .../tex/latex/tcolorbox/tcbtheorems.code.tex | 4 +- .../tex/latex/tcolorbox/tcbxparse.code.tex | 4 +- .../texmf-dist/tex/latex/tcolorbox/tcolorbox.sty | 40 ++++++----- 13 files changed, 86 insertions(+), 82 deletions(-) (limited to 'Master/texmf-dist/tex/latex/tcolorbox') diff --git a/Master/texmf-dist/tex/latex/tcolorbox/tcbbreakable.code.tex b/Master/texmf-dist/tex/latex/tcolorbox/tcbbreakable.code.tex index 25f89ae809a..8aa4f023dfa 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.11 (2014/07/25) +%% The LaTeX package tcolorbox - version 3.12 (2014/07/29) %% tcbbreakable.code.tex: Code for breakable colorboxes %% %% ------------------------------------------------------------------------------------------- @@ -17,13 +17,13 @@ %% %% This work consists of all files listed in README %% -\tcb@set@library@version{3.11} +\tcb@set@library@version{3.12} \let\tcb@parboxrestore@true=\tcb@parboxrestore \def\tcb@parboxrestore@false{\vskip-\parskip\linewidth\hsize\noindent} % total height for boxes smaller than 0.4375\maxdimen and 0.4375\maxdimen else (ca 2.5m) -\def\tcb@defToTotalHeightBreakable#1#2#3{% +\def\tcb@defToTotalHeightBreakable#1#2{% \ifnum\ht#2<0 % \edef#1{7168pt}% \else\ifnum\ht#2<469762048 % @@ -36,32 +36,28 @@ \newbox\tcb@testbox % for oversized boxes height is detected as \textheight or larger -\def\tcb@defToTotalHeightUnlimited#1#2#3{% - \tcb@defToTotalHeightBreakable#1#2#3% +\def\tcb@defToTotalHeightUnlimited#1#2{% + \tcb@defToTotalHeightBreakable#1#2% \ifdim\dimexpr#1<\textheight\relax% \edef\tcb@thevfuzz{\the\vfuzz}% \edef\tcb@thevbadness{\the\vbadness}% \vfuzz=\maxdimen\vbadness=10000% \splittopskip=0pt% \splitmaxdepth=0pt% + \savingvdiscards=1% \setbox\tcb@testbox=\vsplit#2 to \textheight% \vbadness=\tcb@thevbadness\vfuzz=\tcb@thevfuzz% \ifdim\wd#2=0pt\relax% \tcb@swap{#2}{\tcb@testbox}% \tcbdimto#1{\ht#2+\dp#2}% \else% - \setbox#2=\vbox{\color@begingroup% + \setbox#2=\vbox{% \unvbox\tcb@testbox% - \begingroup% - #3% - \dimen@-\f@size \p@% - \dimen@0.888888\dimen@% - \advance\dimen@ by \f@baselineskip% - \vskip\dimen@% - \endgroup% - \unvbox#2\color@endgroup}% + \splitdiscards% + \unvbox#2}% \edef#1{7168pt}% \fi% + \savingvdiscards=0% \fi% } @@ -112,7 +108,7 @@ \tcbdimto\tcb@h@page{\textheight-\kvtcb@shrinkbreakgoal}% \else% \ifdim\pagegoal=16383.99998pt - \tcbdimto\tcb@h@page{\textheight-\kvtcb@shrinkbreakgoal}% + \tcbdimto\tcb@h@page{\vsize-\kvtcb@shrinkbreakgoal}% detects floating objects \else% \tcbdimto\tcb@h@page{\pagegoal-\pagetotal-\kvtcb@shrinkbreakgoal}% \fi% @@ -220,13 +216,14 @@ \newif\iftcb@multicol +\newif\iftcb@vfillbeforefirst \def\tcb@drawcolorbox@breakable{% - \@ifundefined{col@number}{\tcb@multicolfalse}{% - \ifnum\col@number<2 % - \tcb@multicolfalse% - \else% + \@ifundefined{columnbreak}{\tcb@multicolfalse}{% + \ifnum\doublecol@number>\z@ % \tcb@multicoltrue% + \else% + \tcb@multicolfalse% \fi}% \ifx\kvtcb@float\@empty% \kvtcb@beforebox% @@ -261,17 +258,15 @@ \let\tcb@split@next=\relax% \tcb@check@for@final@box% \iftcb@final@box% - %\ifdim\tcb@h@total<\tcb@h@page\relax% no break \tcb@drawcolorbox@standalone% \else \iftcb@break@allowed% \ifdim\dimexpr\tcb@h@page-\tcb@h@padding-\tcb@h@padtitle<\kvtcb@breakminlines\baselineskip\relax% - \iftcb@multicol\columnbreak\else\pagebreak\null\fi% + \iftcb@multicol\columnbreak\else\pagebreak\fi% \tcb@enlbreak@init\tcb@break@allowedfalse% \tcb@comp@h@page% \tcb@check@for@final@box% \iftcb@final@box% - %\ifdim\tcb@h@total<\tcb@h@page\relax% no break! \tcb@drawcolorbox@standalone% \else \let\tcb@split@next=\tcb@split@first% @@ -287,11 +282,17 @@ } -\def\tcb@setbox@upper#1#2{% - \setbox\tcb@upperbox=\vbox{\color@begingroup\color{\kvtcb@colupper}\unvbox#2\color@endgroup}% - \ifdim\dimexpr\ht\tcb@upperbox+\dp\tcb@upperbox>#1\relax% - \setbox\tcb@upperbox=\vbox to\the\dimexpr#1-\dp\tcb@upperbox\relax {\color@begingroup\unvbox\tcb@upperbox\color@endgroup}% +\def\tcb@setbox#1#2#3{% + \setbox#1=\vbox{\unvbox#3}% + \ifdim\dimexpr\ht#1+\dp#1>#2\relax% + %\tcb@warning{Splitted box part too large by \the\dimexpr\ht#1+\dp#1-#2\relax}% switched off (99% useless/annoying) + \setbox#1=\vbox to\the\dimexpr#2-\dp#1\relax{\unvbox#1}% \fi% +} + + +\def\tcb@setbox@upper#1#2{% + \tcb@setbox\tcb@upperbox{#1}{#2}% \tcbdimto\tcb@h@upper{\ht\tcb@upperbox+\dp\tcb@upperbox}% } @@ -303,10 +304,7 @@ } \def\tcb@setbox@lower#1#2{% - \setbox\tcb@lowerbox=\vbox{\color@begingroup\color{\kvtcb@collower}\unvbox#2\color@endgroup}% - \ifdim\dimexpr\ht\tcb@lowerbox+\dp\tcb@lowerbox>#1\relax% - \setbox\tcb@lowerbox=\vbox to\the\dimexpr#1-\dp\tcb@lowerbox\relax {\color@begingroup\unvbox\tcb@lowerbox\color@endgroup}% - \fi% + \tcb@setbox\tcb@lowerbox{#1}{#2}% \tcbdimto\tcb@h@lower{\ht\tcb@lowerbox+\dp\tcb@lowerbox}% } @@ -359,15 +357,20 @@ \def\tcb@split@first{% \setcounter{tcbbreakpart}{1}% \ifx\kvtcb@float\@empty% + \iftcb@vfillbeforefirst% + \let\tcb@before@first=\vfill% + \else% \let\tcb@before@first=\@empty% + \fi% \let\tcb@before@middle=\@empty% \let\tcb@before@last=\@empty% \iftcb@multicol% - \let\tcb@after@first=\par% + \long\def\tcb@after@first{\par}% using \columnbreak here kills multicols' algortihm sometimes + \long\def\tcb@after@middle{\par\vfill}% \else% - \long\def\tcb@after@first{\par\pagebreak\null\tcb@enlbreak@next}% + \long\def\tcb@after@first{\par\pagebreak\tcb@enlbreak@next}% + \long\def\tcb@after@middle{\par\vfill\eject\tcb@enlbreak@next}% \fi% - \let\tcb@after@middle=\tcb@after@first% \let\tcb@after@last=\par% \else% \edef\tcb@before@first{\noexpand\tcb@float@env@begin{tcbfloat}[\kvtcb@float]}% @@ -418,7 +421,7 @@ \tcb@swap{\tcb@totallowerbox}{\tcb@lowerbox}% \tcbdimto\tcb@h@upper{\ht\tcb@upperbox+\dp\tcb@upperbox}% \tcbdimto\tcb@h@lower{\ht\tcb@lowerbox+\dp\tcb@lowerbox}% - \iftcb@multicol\columnbreak\else\pagebreak\null\fi% + \iftcb@multicol\columnbreak\else\pagebreak\fi% \tcb@enlbreak@init\tcb@break@allowedfalse% \let\tcb@split@next=\tcb@split@start% \else% @@ -467,13 +470,12 @@ \stepcounter{tcbbreakpart}% \tcb@following@title% \tcb@comp@h@page% - \tcb@defToTotalHeight\tcb@h@upper{\tcb@totalupperbox}{\kvtcb@fontupper}% + \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}% % \let\tcb@split@next=\relax% \tcb@check@for@final@box% \iftcb@final@box% - %\ifdim\tcb@h@total<\tcb@h@page\relax% no break \tcb@split@setstate@last% \tcb@setbox@upper{\tcb@h@upper}{\tcb@totalupperbox}% \iftcb@lowerspace% @@ -531,13 +533,12 @@ \tcb@following@title% \tcb@comp@h@page% \let\tcb@h@upper=\tcb@zpt% - \tcb@defToTotalHeight\tcb@h@lower{\tcb@totallowerbox}{\kvtcb@fontlower}% + \tcb@defToTotalHeight\tcb@h@lower{\tcb@totallowerbox}% \tcbdimto\tcb@h@total{\tcb@h@padding@last-\kvtcb@top-\kvtcb@boxsep+\tcb@h@padtitle+\tcb@h@segment+\tcb@h@lower}% % \let\tcb@split@next=\relax% \tcb@check@for@final@box% \iftcb@final@box% - %\ifdim\tcb@h@total<\tcb@h@page\relax% no break \tcb@split@setstate@last% \tcb@setbox@lower{\tcb@h@lower}{\tcb@totallowerbox}% \tcb@sdraw@SL% @@ -562,13 +563,12 @@ \tcb@following@title% \tcb@comp@h@page% \let\tcb@h@upper=\tcb@zpt% - \tcb@defToTotalHeight\tcb@h@lower{\tcb@totallowerbox}{\kvtcb@fontflower}% + \tcb@defToTotalHeight\tcb@h@lower{\tcb@totallowerbox}% \tcbdimto\tcb@h@total{\tcb@h@padding@last+\tcb@h@padtitle+\tcb@h@lower}% % \let\tcb@split@next=\relax% \tcb@check@for@final@box% \iftcb@final@box% - %\ifdim\tcb@h@total<\tcb@h@page\relax% no break \tcb@split@setstate@last% \tcb@setbox@lower{\tcb@h@lower}{\tcb@totallowerbox}% \tcb@sdraw@L% @@ -760,6 +760,7 @@ \let\tcb@break@ch@first=\tcb@break@ch@fixed% \let\tcb@break@ch@middle=\tcb@break@ch@fixed% \let\tcb@break@ch@last=\tcb@break@ch@fixed},% + vfill before first/.is if=tcb@vfillbeforefirst,% } @@ -772,7 +773,8 @@ bottomsep at break=0pt, enlargepage=0pt,enlargepage flexible=0pt, break at=0pt, - height fixed for=none + height fixed for=none, + vfill before first=false, }, initialize@reset=reset@breakable, } diff --git a/Master/texmf-dist/tex/latex/tcolorbox/tcbdocumentation.code.tex b/Master/texmf-dist/tex/latex/tcolorbox/tcbdocumentation.code.tex index 110c1a0ca48..e409e62f9e4 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 3.11 (2014/07/25) +%% The LaTeX package tcolorbox - version 3.12 (2014/07/29) %% tcbdocumentation.code.tex: Code for LaTeX documentations %% %% ------------------------------------------------------------------------------------------- @@ -17,7 +17,7 @@ %% %% This work consists of all files listed in README %% -\tcb@set@library@version{3.11} +\tcb@set@library@version{3.12} \tcbuselibrary{listings,skins} diff --git a/Master/texmf-dist/tex/latex/tcolorbox/tcbfitting.code.tex b/Master/texmf-dist/tex/latex/tcolorbox/tcbfitting.code.tex index 80f895be59c..e0603ede7da 100644 --- a/Master/texmf-dist/tex/latex/tcolorbox/tcbfitting.code.tex +++ b/Master/texmf-dist/tex/latex/tcolorbox/tcbfitting.code.tex @@ -1,4 +1,4 @@ -%% The LaTeX package tcolorbox - version 3.11 (2014/07/25) +%% The LaTeX package tcolorbox - version 3.12 (2014/07/29) %% tcbfitting.code.tex: Code for fit boxes %% %% ------------------------------------------------------------------------------------------- @@ -18,7 +18,7 @@ %% This work consists of all files listed in README %% %\makeatletter -\tcb@set@library@version{3.11} +\tcb@set@library@version{3.12} \newdimen\tcbfitdim \newdimen\tcb@lowerfitdim diff --git a/Master/texmf-dist/tex/latex/tcolorbox/tcbhooks.code.tex b/Master/texmf-dist/tex/latex/tcolorbox/tcbhooks.code.tex index 4643945f1bf..c1dfbfa8c90 100644 --- a/Master/texmf-dist/tex/latex/tcolorbox/tcbhooks.code.tex +++ b/Master/texmf-dist/tex/latex/tcolorbox/tcbhooks.code.tex @@ -1,4 +1,4 @@ -%% The LaTeX package tcolorbox - version 3.11 (2014/07/25) +%% The LaTeX package tcolorbox - version 3.12 (2014/07/29) %% tcbhooks.code.tex: Code for adding hooks %% %% ------------------------------------------------------------------------------------------- @@ -18,7 +18,7 @@ %% This work consists of all files listed in README %% %\makeatletter -\tcb@set@library@version{3.11} +\tcb@set@library@version{3.12} \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 746263e03f6..ed80e9828bb 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 3.11 (2014/07/25) +%% The LaTeX package tcolorbox - version 3.12 (2014/07/29) %% tcblistings.code.tex: Code for colorboxes with listings %% %% ------------------------------------------------------------------------------------------- @@ -18,7 +18,7 @@ %% This work consists of all files listed in README %% %\makeatletter -\tcb@set@library@version{3.11} +\tcb@set@library@version{3.12} \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 52ce22e96b7..8fbf0e8989c 100644 --- a/Master/texmf-dist/tex/latex/tcolorbox/tcblistingscore.code.tex +++ b/Master/texmf-dist/tex/latex/tcolorbox/tcblistingscore.code.tex @@ -1,4 +1,4 @@ -%% The LaTeX package tcolorbox - version 3.11 (2014/07/25) +%% The LaTeX package tcolorbox - version 3.12 (2014/07/29) %% tcblistingscode.code.tex: Auxiliary code for colorboxes with listings %% %% ------------------------------------------------------------------------------------------- @@ -18,7 +18,7 @@ %% This work consists of all files listed in README %% %\makeatletter -\tcb@set@library@version{3.11} +\tcb@set@library@version{3.12} \def\tcbuselistingtext{\input{\kvtcb@listingfile}}% \def\tcbuselistingcomment{\kvtcb@listingcomment}% diff --git a/Master/texmf-dist/tex/latex/tcolorbox/tcblistingsutf8.code.tex b/Master/texmf-dist/tex/latex/tcolorbox/tcblistingsutf8.code.tex index 039d3df2438..f52492e9c79 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 3.11 (2014/07/25) +%% The LaTeX package tcolorbox - version 3.12 (2014/07/29) %% tcblistingsutf8.code.tex: Code for colorboxes with listings in UTF-8 %% %% ------------------------------------------------------------------------------------------- @@ -17,7 +17,7 @@ %% %% This work consists of all files listed in README %% -\tcb@set@library@version{3.11} +\tcb@set@library@version{3.12} \RequirePackage{listingsutf8}[2011/11/10] \tcbuselibrary{listings} diff --git a/Master/texmf-dist/tex/latex/tcolorbox/tcbminted.code.tex b/Master/texmf-dist/tex/latex/tcolorbox/tcbminted.code.tex index 5fe0d792eed..2950b0ccc05 100644 --- a/Master/texmf-dist/tex/latex/tcolorbox/tcbminted.code.tex +++ b/Master/texmf-dist/tex/latex/tcolorbox/tcbminted.code.tex @@ -1,4 +1,4 @@ -%% The LaTeX package tcolorbox - version 3.11 (2014/07/25) +%% The LaTeX package tcolorbox - version 3.12 (2014/07/29) %% tcbminted.code.tex: Code for colorboxes with listings %% %% ------------------------------------------------------------------------------------------- @@ -18,7 +18,7 @@ %% This work consists of all files listed in README %% %\makeatletter -\tcb@set@library@version{3.11} +\tcb@set@library@version{3.12} \RequirePackage{minted}[2011/09/17] diff --git a/Master/texmf-dist/tex/latex/tcolorbox/tcbskins.code.tex b/Master/texmf-dist/tex/latex/tcolorbox/tcbskins.code.tex index e7bf3987387..c20c9d9785c 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.11 (2014/07/25) +%% The LaTeX package tcolorbox - version 3.12 (2014/07/29) %% 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.11} +\tcb@set@library@version{3.12} \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 3d2a52de33c..ffba3c635f0 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.11 (2014/07/25) +%% The LaTeX package tcolorbox - version 3.12 (2014/07/29) %% 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.11} +\tcb@set@library@version{3.12} \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 5a81541df03..005715b58db 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 3.11 (2014/07/25) +%% The LaTeX package tcolorbox - version 3.12 (2014/07/29) %% tcbtheorems.code.tex: Code for theorems in colorboxes %% %% ------------------------------------------------------------------------------------------- @@ -18,7 +18,7 @@ %% This work consists of all files listed in README %% %\makeatletter -\tcb@set@library@version{3.11} +\tcb@set@library@version{3.12} \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 d7575c5a242..1507a58e0b2 100644 --- a/Master/texmf-dist/tex/latex/tcolorbox/tcbxparse.code.tex +++ b/Master/texmf-dist/tex/latex/tcolorbox/tcbxparse.code.tex @@ -1,4 +1,4 @@ -%% The LaTeX package tcolorbox - version 3.11 (2014/07/25) +%% The LaTeX package tcolorbox - version 3.12 (2014/07/29) %% tcbhooks.code.tex: Code for adding hooks %% %% ------------------------------------------------------------------------------------------- @@ -18,7 +18,7 @@ %% This work consists of all files listed in README %% %\makeatletter -\tcb@set@library@version{3.11} +\tcb@set@library@version{3.12} \RequirePackage{xparse}[2013/12/31] diff --git a/Master/texmf-dist/tex/latex/tcolorbox/tcolorbox.sty b/Master/texmf-dist/tex/latex/tcolorbox/tcolorbox.sty index 937851d2499..7ec9b8061a3 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 3.11 (2014/07/25) +%% The LaTeX package tcolorbox - version 3.12 (2014/07/29) %% tcolorbox.sty: Text color boxes %% %% ------------------------------------------------------------------------------------------- @@ -18,8 +18,8 @@ %% This work consists of all files listed in README %% \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{tcolorbox}[2014/07/25 version 3.11 text color boxes] -\def\tcb@version{3.11} +\ProvidesPackage{tcolorbox}[2014/07/29 version 3.12 text color boxes] +\def\tcb@version{3.12} \RequirePackage{pgf}[2008/01/15] \RequirePackage{verbatim}[2003/08/22] @@ -45,6 +45,9 @@ \newcounter{tcbbreakpart} \newcounter{tcblayer} +\def\tcb@warning#1{\PackageWarning{tcolorbox}{#1}} +\def\tcb@error#1#2{\PackageError{tcolorbox}{#1}{#2}} + % key management \pgfkeys{/tcb/.is family} @@ -53,7 +56,7 @@ \def\tcb@dim@to#1#2{\def#1{\the\dimexpr#2\relax}} \def\tcbdimto#1#2{\edef#1{\the\dimexpr#2\relax}} -\def\tcb@defToTotalHeightStandard#1#2#3{\tcbdimto#1{\ht#2+\dp#2}} +\def\tcb@defToTotalHeightStandard#1#2{\tcbdimto#1{\ht#2+\dp#2}} \let\tcb@defToTotalHeight\tcb@defToTotalHeightStandard \def\tcb@zpt{0pt} @@ -202,8 +205,8 @@ 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}}, + parskip/.style={before={\par\pagebreak[0]\parindent=0pt},after={\par}}, + noparskip/.style={before={\par\smallskip\pagebreak[0]\parindent=0pt},after={\par\smallskip}}, nobeforeafter/.style={before=,after=}, lowerbox/.is choice, lowerbox/visible/.code={\tcb@lowerignoredfalse\tcb@lowervisibletrue}, @@ -483,19 +486,18 @@ \def\noexpand\@currenvline{\on@line}}% \reserved@a \@endpefalse - \color@setgroup% \csname tcb@parbox@use@\kvtcv@parbox\endcsname% \tcb@minipage#2\tcb@hyph@fix\ignorespaces} -\def\endtcb@lrbox{\unskip\endminipage\color@endgroup} +\def\endtcb@lrbox{\unskip\endminipage} \let\tcb@savebox=\tcb@lrbox \let\endtcb@savebox=\endtcb@lrbox \def\tcb@saveupperbox{% -\begin{tcb@savebox}{\tcb@upperbox}{\tcb@w@upper}\color{\kvtcb@colupper}\kvtcb@fontupper\kvtcb@before@upper\ignorespaces} +\begin{tcb@savebox}{\tcb@upperbox}{\tcb@w@upper}\penalty-\@m\kvtcb@fontupper\kvtcb@before@upper\ignorespaces} \def\tcb@savelowerbox{% -\begin{tcb@savebox}{\tcb@lowerbox}{\tcb@w@lower}\color{\kvtcb@collower}\kvtcb@fontlower\kvtcb@before@lower\ignorespaces} +\begin{tcb@savebox}{\tcb@lowerbox}{\tcb@w@lower}\penalty-\@m\kvtcb@fontlower\kvtcb@before@lower\ignorespaces} % counter for float @@ -738,11 +740,11 @@ \iftcb@lowerspace\tcb@ch@fixed@both\else\tcb@ch@fixed@upper\fi% } -\def\tcb@dbox@top#1#2#3#4{\pgftext[x=#1,y=#2+#3,left,top]{\box#4}}% +\def\tcb@dbox@top#1#2#3#4#5{\pgftext[x=#1,y=#2+#3,left,top]{\color{#5}\box#4}}% -\def\tcb@dbox@bottom#1#2#3#4{\pgftext[x=#1,y=#2,left,bottom]{\box#4}}% +\def\tcb@dbox@bottom#1#2#3#4#5{\pgftext[x=#1,y=#2,left,bottom]{\color{#5}\box#4}}% -\def\tcb@dbox@center#1#2#3#4{\pgftext[x=#1,y=#2+#3/2,left]{\box#4}}% +\def\tcb@dbox@center#1#2#3#4#5{\pgftext[x=#1,y=#2+#3/2,left]{\color{#5}\box#4}}% \def\tcb@arc@zpt{\pgfsetcornersarced{\pgfpointorigin}}% \def\tcb@arc@ins{\pgfsetcornersarced{\pgfqpoint{\kvtcb@arc}{\kvtcb@arc}}}% @@ -987,7 +989,7 @@ \pgfsetfillopacity{\kvtcb@opacitytitle}% \pgftext[x=\the\dimexpr\kvtcb@left@rule+\kvtcb@boxsep+\kvtcb@lefttitle\relax, y=\the\dimexpr\tcb@height-\kvtcb@top@rule-\kvtcb@boxsep-\kvtcb@toptitle\relax, - left,top]{\usebox{\tcb@titlebox}}% + left,top]{\color{\kvtcb@coltitle}\box\tcb@titlebox}% \end{pgfscope}% \fi% } @@ -998,7 +1000,7 @@ \pgfsetfillopacity{\kvtcb@opacityupper}% \csname tcb@dbox@\kvtcb@valign\endcsname{\the\dimexpr\kvtcb@left@rule+\kvtcb@boxsep+\kvtcb@leftupper\relax}% {\the\dimexpr\tcb@innerheight+\kvtcb@bottom@rule-\kvtcb@boxsep-\tcb@break@topsep-\kvtcb@top-\tcb@height@upper\relax}% - {\tcb@height@upper}{\tcb@upperbox}% + {\tcb@height@upper}{\tcb@upperbox}{\kvtcb@colupper}% \end{pgfscope}% } \let\tcb@tdraw@upper=\tcb@tdraw@upper@core @@ -1009,7 +1011,7 @@ \pgfsetfillopacity{\kvtcb@opacitylower}% \csname tcb@dbox@\kvtcb@valignlower\endcsname{\the\dimexpr\kvtcb@left@rule+\kvtcb@boxsep+\kvtcb@leftlower\relax}% {\the\dimexpr\kvtcb@bottom@rule+\kvtcb@boxsep+\tcb@break@bottomsep+\kvtcb@bottom\relax}% - {\tcb@height@lower}{\tcb@lowerbox}% + {\tcb@height@lower}{\tcb@lowerbox}{\kvtcb@collower}% \end{pgfscope}% \fi% } @@ -1020,7 +1022,7 @@ \tcbdimto{\tcb@temp@wd}{\tcb@w@upper-\wd\tcb@upperbox+\kvtcb@sbs@gap}% \noindent\unhbox\tcb@upperbox\kern\tcb@temp@wd% \iftcb@hasLower% - \iftcb@lowervisible\unhbox\tcb@lowerbox% + \iftcb@lowervisible\color{\kvtcb@collower}\unhbox\tcb@lowerbox% \else% \iftcb@lowerignored\else\rule[-\dp\tcb@lowerbox]{0pt}{\the\dimexpr\ht\tcb@lowerbox+\dp\tcb@lowerbox\relax}\fi% \fi% @@ -1040,14 +1042,14 @@ \let\tcb@h@padtitle=\tcb@zpt% \fi% % - \tcb@defToTotalHeight\tcb@h@upper{\tcb@upperbox}{\kvtcb@fontupper}% + \tcb@defToTotalHeight\tcb@h@upper{\tcb@upperbox}% % \iftcb@hasLower% \iftcb@lowerignored\tcb@lowerspacefalse\else\tcb@lowerspacetrue\fi% \else\tcb@lowerspacefalse\fi% \iftcb@lowerspace% \tcbdimto\tcb@h@segment{\kvtcb@boxsep*2+\kvtcb@middle*2}% - \tcb@defToTotalHeight\tcb@h@lower{\tcb@lowerbox}{\kvtcb@fontlower}% + \tcb@defToTotalHeight\tcb@h@lower{\tcb@lowerbox}% \else \let\tcb@h@segment=\tcb@zpt% \let\tcb@h@lower=\tcb@zpt% -- cgit v1.2.3