diff options
author | Karl Berry <karl@freefriends.org> | 2013-12-18 22:04:25 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-12-18 22:04:25 +0000 |
commit | 7edd1b30f6d91c3f4961d8ceca5a9af64668db1b (patch) | |
tree | 3c631b8d49caab36f4b589405ec4766a0f46aa5a /Master/texmf-dist/tex/latex | |
parent | 00be60da8df9f90d4ad3914ed813951c0639b409 (diff) |
tcolorbox (17dec13)
git-svn-id: svn://tug.org/texlive/trunk@32442 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
12 files changed, 692 insertions, 234 deletions
diff --git a/Master/texmf-dist/tex/latex/tcolorbox/tcbbreakable.code.tex b/Master/texmf-dist/tex/latex/tcolorbox/tcbbreakable.code.tex index cd430f9688c..2f2843d08a0 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.51 (2013/09/16) +%% The LaTeX package tcolorbox - version 2.60 (2013/12/17) %% tcbbreakable.code.tex: Code for breakable colorboxes %% %% ------------------------------------------------------------------------------------------- @@ -17,7 +17,7 @@ %% %% This work consists of all files listed in README %% -\tcb@set@library@version{2.51} +\tcb@set@library@version{2.60} \let\tcb@parboxrestore@true=\tcb@parboxrestore \def\tcb@parboxrestore@false{\vskip-\parskip\linewidth\hsize} @@ -39,7 +39,7 @@ \def\thempfn{\thempfootnote}% \c@mpfootnote\z@% \let\@footnotetext\@mpfootnotetext% - \@setminipage% + \@setminipage\tcb@hyph@fix% \ignorespaces% \let\tcb@drawcolorbox=\tcb@drawcolorbox@standalone% } @@ -468,18 +468,12 @@ \tcb@bbdraw% \tcb@extensions@preframe% % draw frame and interior - \csname tcb@drawframe@\kvtcb@engine@frame\endcsname% - \iftcb@hasTitle% - \csname tcb@drawwithtitle@\kvtcb@engine@interiortitled\endcsname% - \else% - \csname tcb@drawwithouttitle@\kvtcb@engine@interior\endcsname% - \fi% + \tcb@adraw@frame% + \tcb@adraw@interior% \iftcb@lowerseparated% \csname tcb@drawlower@\kvtcb@engine@segmentation\endcsname% \fi% - \iftcb@hasTitle% - \csname tcb@drawtitle@\kvtcb@engine@title\endcsname% - \fi% + \tcb@adraw@title% \tcb@extensions@postframe% % draw text boxes \tcb@tdraw@title% @@ -501,15 +495,9 @@ \tcb@bbdraw% \tcb@extensions@preframe% % draw frame and interior - \csname tcb@drawframe@\kvtcb@engine@frame\endcsname% - \iftcb@hasTitle% - \csname tcb@drawwithtitle@\kvtcb@engine@interiortitled\endcsname% - \else% - \csname tcb@drawwithouttitle@\kvtcb@engine@interior\endcsname% - \fi% - \iftcb@hasTitle% - \csname tcb@drawtitle@\kvtcb@engine@title\endcsname% - \fi% + \tcb@adraw@frame% + \tcb@adraw@interior% + \tcb@adraw@title% \tcb@extensions@postframe% % draw text boxes \tcb@tdraw@title% @@ -530,18 +518,12 @@ \tcb@bbdraw% \tcb@extensions@preframe% % draw frame and interior - \csname tcb@drawframe@\kvtcb@engine@frame\endcsname% - \iftcb@hasTitle% - \csname tcb@drawwithtitle@\kvtcb@engine@interiortitled\endcsname% - \else% - \csname tcb@drawwithouttitle@\kvtcb@engine@interior\endcsname% - \fi% + \tcb@adraw@frame% + \tcb@adraw@interior% \iftcb@lowerseparated% \csname tcb@drawlower@\kvtcb@engine@segmentation\endcsname% \fi% - \iftcb@hasTitle% - \csname tcb@drawtitle@\kvtcb@engine@title\endcsname% - \fi% + \tcb@adraw@title% \tcb@extensions@postframe% % draw text boxes \tcb@tdraw@title% @@ -562,15 +544,9 @@ \tcb@bbdraw% \tcb@extensions@preframe% % draw frame and interior - \csname tcb@drawframe@\kvtcb@engine@frame\endcsname% - \iftcb@hasTitle% - \csname tcb@drawwithtitle@\kvtcb@engine@interiortitled\endcsname% - \else% - \csname tcb@drawwithouttitle@\kvtcb@engine@interior\endcsname% - \fi% - \iftcb@hasTitle% - \csname tcb@drawtitle@\kvtcb@engine@title\endcsname% - \fi% + \tcb@adraw@frame% + \tcb@adraw@interior% + \tcb@adraw@title% \tcb@extensions@postframe% % draw text boxes \tcb@tdraw@title% diff --git a/Master/texmf-dist/tex/latex/tcolorbox/tcbdocumentation.code.tex b/Master/texmf-dist/tex/latex/tcolorbox/tcbdocumentation.code.tex index 2f9f794959a..38107a77327 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.51 (2013/09/16) +%% The LaTeX package tcolorbox - version 2.60 (2013/12/17) %% tcbdocumentation.code.tex: Code for LaTeX documentations %% %% ------------------------------------------------------------------------------------------- @@ -17,7 +17,7 @@ %% %% This work consists of all files listed in README %% -\tcb@set@library@version{2.51} +\tcb@set@library@version{2.60} \tcbuselibrary{listings} @@ -215,11 +215,8 @@ {\endlist} %--- index macros taken from pgfmanual-en-macros -\def\tcb@doc@index@pgf{% - \def\index@prologue{\section*{\kvtcb@text@index}\addcontentsline{toc}{section}{\kvtcb@text@index}% - \par\noindent% - }% - \c@IndexColumns=2 +\def\tcb@doc@index@pgf@{% + \c@IndexColumns=2% \def\theindex{\@restonecoltrue \columnseprule \z@ \columnsep 29\p@ \twocolumn[\index@prologue]% @@ -235,6 +232,23 @@ \def\noindexing{\let\index=\@gobble}% } + +\def\tcb@doc@index@pgfsection{% + \def\index@prologue{\section*{\kvtcb@text@index}\addcontentsline{toc}{section}{\kvtcb@text@index}% + \par\noindent% + }% + \tcb@doc@index@pgf@% +} + +\def\tcb@doc@index@pgfchapter{% + \def\index@prologue{\ifdefined\phantomsection\phantomsection\fi\@makeschapterhead{\kvtcb@text@index}\addcontentsline{toc}{chapter}{\kvtcb@text@index}}% + \tcb@doc@index@pgf@% +} + + +\let\tcb@doc@index@pgf=\tcb@doc@index@pgfsection% + + \def\tcb@doc@index@doc{% \let\index@Com=\SpecialMainIndex%% \let\index@Env=\SpecialMainEnvIndex% @@ -243,6 +257,8 @@ \PageIndex% } +\def\tcb@doc@index@off{}% + \tcbset{% reset@documentation/.style={% index format=pgf, diff --git a/Master/texmf-dist/tex/latex/tcolorbox/tcbfitting.code.tex b/Master/texmf-dist/tex/latex/tcolorbox/tcbfitting.code.tex index e10522afe79..85ec5f60284 100644 --- a/Master/texmf-dist/tex/latex/tcolorbox/tcbfitting.code.tex +++ b/Master/texmf-dist/tex/latex/tcolorbox/tcbfitting.code.tex @@ -1,4 +1,4 @@ -%% The LaTeX package tcolorbox - version 2.51 (2013/09/16) +%% The LaTeX package tcolorbox - version 2.60 (2013/12/17) %% tcbfitting.code.tex: Code for fit boxes %% %% ------------------------------------------------------------------------------------------- @@ -18,7 +18,7 @@ %% This work consists of all files listed in README %% %\makeatletter -\tcb@set@library@version{2.51} +\tcb@set@library@version{2.60} \newdimen\tcbfitdim \newdimen\tcb@lowerfitdim @@ -51,6 +51,13 @@ fit maxfontdiffgap/.store in=\kvtcb@fit@maxfontdiffgap,% fit maxwidthdiff/.store in=\kvtcb@fit@maxwidthdiff,% fit maxwidthdiffgap/.store in=\kvtcb@fit@maxwidthdiffgap,% + fit warning/.is choice, + fit warning/on/.code={\let\tcb@fit@warn@begin=\@empty% + \let\tcb@fit@warn@end=\@empty}, + fit warning/off/.code={\def\tcb@fit@warn@begin{\hbadness=10000\relax}% + \let\tcb@fit@warn@end=\@empty}, + fit warning/final/.code={\tcb@cur@hbadness=\hbadness\def\tcb@fit@warn@begin{\hbadness=10000\relax}% + \def\tcb@fit@warn@end{\hbadness=\tcb@cur@hbadness\relax\tcb@fit@@box}}, } \def\tcb@@capture@fitbox{% @@ -67,6 +74,8 @@ \tcb@finalize@environment% } +\newcount\tcb@cur@hbadness + \long\def\tcbox@inner@fitbox#1{% \tcbset{breakable@false,sidebyside=false}% \let\tcb@val@raisebase=\tcb@zpt% @@ -77,7 +86,7 @@ % \count@\z@% \tcbfitdim\kvtcb@fit@basedim% - % + \tcb@fit@warn@begin% % \def\tcb@fit@@box{% \tcbdimto\tcb@fit@@line{\kvtcb@fit@skip\tcbfitdim}% @@ -87,6 +96,11 @@ \kvtcb@fontupper\fontsize{\tcbfitdim}{\tcb@fit@@line}\selectfont% \kvtcb@before@upper\ignorespaces#1\unskip\kvtcb@after@upper% \end{tcb@savebox}% + % + \ifdim\wd\tcb@upperbox>\tcb@w@upper\relax + \message{WARNING!!!!!} + \fi + % \tcbdimto\tcb@fit@@h{\ht\tcb@upperbox+\dp\tcb@upperbox}% \tcbdimto\tcb@fit@@target{\kvtcb@height@fixed-\kvtcb@top@rule@stand-\kvtcb@bottom@rule@stand-\kvtcb@top-\kvtcb@bottom-\kvtcb@boxsep*2-\tcb@h@titletotal}% \advance\count@ 1\relax% @@ -231,6 +245,8 @@ \fi% \fi% % + \tcb@fit@warn@end% + % % last height fit \ifdim\kvtcb@height@fixed@plus>0pt\relax% \ifdim\dimexpr\tcb@fit@@h<\tcb@fit@@target\relax% @@ -300,6 +316,7 @@ fit height plus=0pt,fit width plus=0pt, fit maxstep=20,fit maxfontdiff=0.1pt,fit maxfontdiffgap=1pt, fit maxwidthdiff=1pt,fit maxwidthdiffgap=10pt, + fit warning=off }, initialize@reset=reset@fitting, } diff --git a/Master/texmf-dist/tex/latex/tcolorbox/tcbhooks.code.tex b/Master/texmf-dist/tex/latex/tcolorbox/tcbhooks.code.tex index 539c43ba681..4726ccc8799 100644 --- a/Master/texmf-dist/tex/latex/tcolorbox/tcbhooks.code.tex +++ b/Master/texmf-dist/tex/latex/tcolorbox/tcbhooks.code.tex @@ -1,4 +1,4 @@ -%% The LaTeX package tcolorbox - version 2.51 (2013/09/16) +%% The LaTeX package tcolorbox - version 2.60 (2013/12/17) %% 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{2.51} +\tcb@set@library@version{2.60} \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 2d4bb4d9431..a793223297f 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.51 (2013/09/16) +%% The LaTeX package tcolorbox - version 2.60 (2013/12/17) %% tcblistings.code.tex: Code for colorboxes with listings %% %% ------------------------------------------------------------------------------------------- @@ -18,7 +18,7 @@ %% This work consists of all files listed in README %% %\makeatletter -\tcb@set@library@version{2.51} +\tcb@set@library@version{2.60} \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 35e07392328..5f8286aa7ff 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 2.51 (2013/09/16) +%% The LaTeX package tcolorbox - version 2.60 (2013/12/17) %% 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{2.51} +\tcb@set@library@version{2.60} \def\tcbuselistingtext{\input{\kvtcb@listingfile}}% @@ -50,6 +50,24 @@ \tcbuselistinglisting% } +\def\tcb@inputlisting@out@textAboveListing{% + \kvtcb@beforebox\noindent% + \iftcb@lowervisible\tcb@minipage{\kvtcb@width}\color{\kvtcb@collower}\kvtcb@fontlower\kvtcb@before@lower\ignorespaces% + \begingroup\tcb@layer@inc\tcbuselistingtext\tcb@layer@dec\endgroup% + \unskip\kvtcb@after@lower\endminipage% + \par\vskip-\parskip\vspace*{\kvtcb@middle}\noindent% + \fi% + \begin{tcolorbox}[before=]\tcbuselistinglisting\end{tcolorbox}% +} + +\def\tcb@inputlisting@out@listingAboveText{% + \begin{tcolorbox}[after=]\tcbuselistinglisting\end{tcolorbox}% + \iftcb@lowervisible\par\vskip-\parskip\vspace*{\kvtcb@middle}\noindent% + \tcb@minipage{\kvtcb@width}\color{\kvtcb@collower}\kvtcb@fontlower\kvtcb@before@lower\ignorespaces% + \begingroup\tcb@layer@inc\tcbuselistingtext\tcb@layer@dec\endgroup% + \unskip\kvtcb@after@lower\endminipage\fi% + \kvtcb@afterbox% +} \def\tcb@inputlisting@out@prepare{% \tcbdimto\tcb@width{\kvtcb@width}% @@ -61,8 +79,8 @@ \tcbdimto\tcb@w@upper@real{\tcb@w@upper}% \tcbdimto\tcb@w@sbs{\tcb@w@upper@real-\kvtcb@sbs@gap}% \tcb@sbs@quota% - \ifx\kvtcb@float\@empty% - \newenvironment{tcb@sbsfloat}{\kvtcb@beforebox}{\kvtcb@afterbox}% + \ifx\kvtcb@float\@empty% + \newenvironment{tcb@sbsfloat}{\kvtcb@beforebox}{\kvtcb@afterbox}% \else% \edef\float@start{\noexpand\@float{tcbfloat}[\kvtcb@float]}% \newenvironment{tcb@sbsfloat}{\float@start}{\end@float}% @@ -78,7 +96,8 @@ \begin{tcolorbox}[width=\tcb@w@inside,nobeforeafter,nofloat,sidebyside=false]\tcbuselistinglisting\end{tcolorbox}% \endminipage\hfill% \iftcb@lowervisible\tcb@minipage{\tcb@w@outside}\color{\kvtcb@collower}\kvtcb@fontlower\kvtcb@before@lower\ignorespaces% - \tcbuselistingtext\unskip\kvtcb@after@lower\endminipage\fi% + \begingroup\tcb@layer@inc\tcbuselistingtext\tcb@layer@dec\endgroup% + \unskip\kvtcb@after@lower\endminipage\fi% \end{minipage}\end{tcb@sbsfloat}% } @@ -88,7 +107,8 @@ \tcbdimto\tcb@w@inside{\tcb@width-\tcb@w@upper-\kvtcb@sbs@gap}% \begin{tcb@sbsfloat}\begin{minipage}{\tcb@width}% \iftcb@lowervisible\tcb@minipage{\tcb@w@outside}\color{\kvtcb@collower}\kvtcb@fontlower\kvtcb@before@lower\ignorespaces% - \tcbuselistingtext\unskip\kvtcb@after@lower\endminipage\fi\hfill% + \begingroup\tcb@layer@inc\tcbuselistingtext\tcb@layer@dec\endgroup% + \unskip\kvtcb@after@lower\endminipage\fi\hfill% \tcb@minipage{\tcb@w@inside}% \begin{tcolorbox}[width=\tcb@w@inside,nobeforeafter,nofloat,sidebyside=false]\tcbuselistinglisting\end{tcolorbox}% \endminipage% @@ -115,6 +135,8 @@ comment and listing/.code={\tcb@set@listing@process{\tcb@listing@commentAndListing}},% listing only/.code={\tcb@set@listing@process{\tcb@listing@listing}},% text only/.code={\tcb@set@listing@process{\tcbuselistingtext}},% + text above listing/.code={\let\tcb@inputlisting\tcb@inputlisting@out@textAboveListing},% + listing above text/.code={\let\tcb@inputlisting\tcb@inputlisting@out@listingAboveText},% text side listing/.style={sidebyside,text and listing},% listing side text/.style={sidebyside,listing and text},% text outside listing/.code={\let\tcb@inputlisting\tcb@inputlisting@out@textAndListing},% diff --git a/Master/texmf-dist/tex/latex/tcolorbox/tcblistingsutf8.code.tex b/Master/texmf-dist/tex/latex/tcolorbox/tcblistingsutf8.code.tex index 1d4d4628974..7bc89405ca2 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.51 (2013/09/16) +%% The LaTeX package tcolorbox - version 2.60 (2013/12/17) %% tcblistingsutf8.code.tex: Code for colorboxes with listings in UTF-8 %% %% ------------------------------------------------------------------------------------------- @@ -17,7 +17,7 @@ %% %% This work consists of all files listed in README %% -\tcb@set@library@version{2.51} +\tcb@set@library@version{2.60} \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 1489fca0e0a..58c1ed0553b 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 2.51 (2013/09/16) +%% The LaTeX package tcolorbox - version 2.60 (2013/12/17) %% 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{2.51} +\tcb@set@library@version{2.60} \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 8452146eef8..22242ee750a 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.51 (2013/09/16) +%% The LaTeX package tcolorbox - version 2.60 (2013/12/17) %% tcbskins.code.tex: Code for colorboxes with different skins %% %% ------------------------------------------------------------------------------------------- @@ -17,10 +17,14 @@ %% %% This work consists of all files listed in README %% -\tcb@set@library@version{2.51} +\tcb@set@library@version{2.60} \RequirePackage{tikz}[2010/10/13] +\newenvironment{tikzpicture@tcb@hooked}{% + \edef\tcb@tikzpicture@begin{\noexpand\tikzpicture[\expandonce\tcb@tikz@option@hook]}% + \tcb@tikzpicture@begin\tcb@tikz@begin@hook}{\tcb@tikz@end@hook\endtikzpicture} + \def\tcb@creategeonodes@true{% \begin{scope}[every node/.style={line width=0mm,inner sep=0mm,draw=none,fill=none,rectangle}] \node[name=frame,at={(0,0)},above right,minimum width=\tcb@width,minimum height=\tcb@height]{}; @@ -47,49 +51,57 @@ \edef#3{\the\pgf@y}% } -% absolute coordinates -\def\tcb@pathrect#1#2#3#4#5#6#7{% - \path[#1]% - \pgfextra{% - \tcb@gettikzxy{(#2)}{\tcb@xa}{\tcb@ya}% - \tcb@gettikzxy{(#3)}{\tcb@xb}{\tcb@yb}% - \pgfpathmoveto{\pgfqpoint{\tcb@xa}{\tcb@ya}}% - \pgfsetcornersarced{\pgfpoint{#5}{#5}}\pgfpathlineto{\pgfqpoint{\tcb@xa}{\tcb@yb}}% - \pgfsetcornersarced{\pgfpoint{#6}{#6}}\pgfpathlineto{\pgfqpoint{\tcb@xb}{\tcb@yb}}% - \pgfsetcornersarced{\pgfpoint{#7}{#7}}\pgfpathlineto{\pgfqpoint{\tcb@xb}{\tcb@ya}}% - \pgfsetcornersarced{\pgfpoint{#4}{#4}}\pgfpathclose};% +\def\tcb@boundary@tikzbase#1#2#3#4#5#6{% + \tcb@gettikzxy{(#1)}{\tcb@xa}{\tcb@ya}% + \tcb@gettikzxy{(#2)}{\tcb@xb}{\tcb@yb}% + \pgfpathmoveto{\pgfqpoint{\tcb@xa}{\tcb@ya}}% + #4\pgfpathlineto{\pgfqpoint{\tcb@xa}{\tcb@yb}}% + #5\pgfpathlineto{\pgfqpoint{\tcb@xb}{\tcb@yb}}% + #6\pgfpathlineto{\pgfqpoint{\tcb@xb}{\tcb@ya}}% + #3\pgfpathclose% } -% fill frame -\def\tcb@drawframe@path{% - \tcb@pathrect{fill=\kvtcb@colframe,tcb@spec,frame@style}{frame.south west}{frame.north east}% - {\tcb@outer@arc}{\tcb@outer@arc}{\tcb@outer@arc}{\tcb@outer@arc}% +\def\tcb@pathboundary#1#2{\path[#1]\pgfextra{#2};} + +\def\tcb@pathbase#1#2#3#4#5#6#7{\tcb@pathboundary{#1}{\tcb@boundary@tikzbase{#2}{#3}{#4}{#5}{#6}{#7}}} + +\def\tcb@boundaryframe@pathfirst{% + \tcb@boundary@base{0pt}{0pt}% + {\tcb@width}{\tcb@height}% + {\tcb@arc@zpt}{\tcb@arc@out}{\tcb@arc@out}{\tcb@arc@zpt}% } -\def\tcb@drawframe@pathfirst{% - \tcb@pathrect{fill=\kvtcb@colframe,tcb@spec,frame@style}{frame.south west}{frame.north east}% - {0pt}{\tcb@outer@arc}{\tcb@outer@arc}{0pt}% +\def\tcb@boundaryframe@pathmiddle{% + \tcb@boundary@base{0pt}{0pt}% + {\tcb@width}{\tcb@height}% + {\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}% } -\def\tcb@drawframe@pathmiddle{% - \tcb@pathrect{fill=\kvtcb@colframe,tcb@spec,frame@style}{frame.south west}{frame.north east}% - {0pt}{0pt}{0pt}{0pt}% +\def\tcb@boundaryframe@pathlast{% + \tcb@boundary@base{0pt}{0pt}% + {\tcb@width}{\tcb@height}% + {\tcb@arc@out}{\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@out}% } -\def\tcb@drawframe@pathlast{% - \tcb@pathrect{fill=\kvtcb@colframe,tcb@spec,frame@style}{frame.south west}{frame.north east}% - {\tcb@outer@arc}{0pt}{0pt}{\tcb@outer@arc}% +\tikzset{% + tcb@fill@frame/.style={fill=\kvtcb@colframe,fill opacity=\kvtcb@opacityframe,tcb@spec,frame@style},% + tcb@fill@interior/.style={fill=\kvtcb@colback,fill opacity=\kvtcb@opacityback,tcb@spec,interior@style},% + tcb@fill@title/.style={fill=\kvtcb@colbacktitle,fill opacity=\kvtcb@opacitybacktitle,tcb@spec,title@style},% } +% fill frame +\def\tcb@drawframe@path{\tcb@pathboundary{tcb@fill@frame}{\tcb@outerboundary}} +\let\tcb@drawframe@pathfirst=\tcb@drawframe@path +\let\tcb@drawframe@pathmiddle=\tcb@drawframe@path +\let\tcb@drawframe@pathlast=\tcb@drawframe@path + + % fill inner box with title -\def\tcb@drawwithtitle@path{% - \tcb@pathrect{fill=\kvtcb@colback,tcb@spec,interior@style}{interior.south west}{interior.north east}% - {\kvtcb@arc}{0pt}{0pt}{\kvtcb@arc}% -} +\def\tcb@drawwithtitle@path{\tcb@pathboundary{tcb@fill@interior}{\tcb@boundaryinterior@title@standard}} \def\tcb@drawwithtitle@pathfirst{% - \tcb@pathrect{fill=\kvtcb@colback,tcb@spec,interior@style}{interior.west|-frame.south}{interior.north east}% - {0pt}{0pt}{0pt}{0pt}% + \tcb@pathbase{tcb@fill@interior}{interior.west|-frame.south}{interior.north east}% + {\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}% } \let\tcb@drawwithtitle@pathmiddle=\tcb@drawwithtitle@pathfirst @@ -97,33 +109,42 @@ \let\tcb@drawwithtitle@pathlast=\tcb@drawwithtitle@path % fill inner box without title -\def\tcb@drawwithouttitle@path{% - \tcb@pathrect{fill=\kvtcb@colback,tcb@spec,interior@style}{interior.south west}{interior.north east}% - {\kvtcb@arc}{\kvtcb@arc}{\kvtcb@arc}{\kvtcb@arc}% -} +\def\tcb@drawwithouttitle@path{\tcb@pathboundary{tcb@fill@interior}{\tcb@boundaryinterior@notitle@standard}} \def\tcb@drawwithouttitle@pathfirst{% - \tcb@pathrect{fill=\kvtcb@colback,tcb@spec,interior@style}{interior.west|-frame.south}{interior.north east}% - {0pt}{\kvtcb@arc}{\kvtcb@arc}{0pt}% + \tcb@pathbase{tcb@fill@interior}{interior.west|-frame.south}{interior.north east}% + {\tcb@arc@zpt}{\tcb@arc@ins}{\tcb@arc@ins}{\tcb@arc@zpt}% } \def\tcb@drawwithouttitle@pathmiddle{% - \tcb@pathrect{fill=\kvtcb@colback,tcb@spec,interior@style}{interior.west|-frame.south}{interior.east|-frame.north}% - {0pt}{0pt}{0pt}{0pt}% + \tcb@pathbase{tcb@fill@interior}{interior.west|-frame.south}{interior.east|-frame.north}% + {\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}% } \def\tcb@drawwithouttitle@pathlast{% - \tcb@pathrect{fill=\kvtcb@colback,tcb@spec,interior@style}{interior.south west}{interior.east|-frame.north}% - {\kvtcb@arc}{0pt}{0pt}{\kvtcb@arc}% + \tcb@pathbase{tcb@fill@interior}{interior.south west}{interior.east|-frame.north}% + {\tcb@arc@ins}{\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@ins}% +} + +% draw title box +\def\tcb@drawtitle@path{\tcb@pathboundary{tcb@fill@title}{\tcb@boundarytitle@standard}} + +\let\tcb@drawtitle@pathfirst=\tcb@drawtitle@path + +\def\tcb@drawtitle@pathmiddle{% + \tcb@pathbase{tcb@fill@title}{title.south west}{title.north east}% + {\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}% } +\let\tcb@drawtitle@pathlast=\tcb@drawtitle@pathmiddle + % draw segmentation line \def\tcb@drawlower@path{% \iftcb@sidebyside% - \path[draw=\kvtcb@colframe,dash pattern=on 1mm off 1mm,dash phase=0.5mm,tcb@spec,segmentation@style] + \path[draw=\kvtcb@colframe,fill opacity=\kvtcb@opacityframe,dash pattern=on 1mm off 1mm,dash phase=0.5mm,tcb@spec,segmentation@style] (segmentation.north)--(segmentation.south);% \else% - \path[draw=\kvtcb@colframe,dash pattern=on 1mm off 1mm,dash phase=0.5mm,tcb@spec,segmentation@style] + \path[draw=\kvtcb@colframe,fill opacity=\kvtcb@opacityframe,dash pattern=on 1mm off 1mm,dash phase=0.5mm,tcb@spec,segmentation@style] (segmentation.west)--(segmentation.east);% \fi% } @@ -144,80 +165,66 @@ \def\tcbline{\iftcb@hasLower\tcb@pseudo@segmentation{\kvtcb@leftlower}% \else\tcb@pseudo@segmentation{\kvtcb@leftupper}\fi} -% draw title box -\def\tcb@drawtitle@path{% - \tcb@pathrect{tcb@spec,title@style}{title.south west}{title.north east}% - {0pt}{\kvtcb@arc}{\kvtcb@arc}{0pt}% -} - -\let\tcb@drawtitle@pathfirst=\tcb@drawtitle@path - -\def\tcb@drawtitle@pathmiddle{% - \tcb@pathrect{tcb@spec,title@style}{title.south west}{title.north east}% - {0pt}{0pt}{0pt}{0pt}% -} - -\let\tcb@drawtitle@pathlast=\tcb@drawtitle@pathmiddle % draw special versions \def\tcb@drawspec@UT#1{% - \tcb@pathrect{#1,interior@style}{segmentation.west}{interior.north east}% - {0pt}{0pt}{0pt}{0pt}% + \tcb@pathbase{#1,interior@style}{segmentation.west}{interior.north east}% + {\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}% } \def\tcb@drawspec@UR#1{% - \tcb@pathrect{#1,interior@style}{segmentation.west}{interior.north east}% - {0pt}{\kvtcb@arc}{\kvtcb@arc}{0pt}% + \tcb@pathbase{#1,interior@style}{segmentation.west}{interior.north east}% + {\tcb@arc@zpt}{\tcb@arc@ins}{\tcb@arc@ins}{\tcb@arc@zpt}% } \def\tcb@drawspec@US#1{% - \tcb@pathrect{#1,interior@style}{segmentation.west}{interior.east|-frame.north}% - {0pt}{0pt}{0pt}{0pt}% + \tcb@pathbase{#1,interior@style}{segmentation.west}{interior.east|-frame.north}% + {\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}% } \def\tcb@drawspec@LR#1{% - \tcb@pathrect{#1,segmentation@style}{interior.south west}{[yshift=0.1mm]segmentation.east}% - {\kvtcb@arc}{0pt}{0pt}{\kvtcb@arc}% + \tcb@pathbase{#1,segmentation@style}{interior.south west}{[yshift=0.1mm]segmentation.east}% + {\tcb@arc@ins}{\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@ins}% } \def\tcb@drawspec@LS#1{% - \tcb@pathrect{#1,segmentation@style}{interior.west|-frame.south}{[yshift=0.1mm]segmentation.east}% - {0pt}{0pt}{0pt}{0pt}% + \tcb@pathbase{#1,segmentation@style}{interior.west|-frame.south}{[yshift=0.1mm]segmentation.east}% + {\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}% } \def\tcb@drawspec@sbs@A#1{% - \tcb@pathrect{#1,segmentation@style}{segmentation.south}{interior.north east}% - {0pt}{0pt}{\kvtcb@arc}{\kvtcb@arc}% + \tcb@pathbase{#1,segmentation@style}{segmentation.south}{interior.north east}% + {\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@ins}{\tcb@arc@ins}% } \def\tcb@drawspec@sbs@B#1{% - \tcb@pathrect{#1,segmentation@style}{segmentation.south}{interior.north east}% - {0pt}{0pt}{0pt}{\kvtcb@arc}% + \tcb@pathbase{#1,segmentation@style}{segmentation.south}{interior.north east}% + {\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@ins}% } \def\tcb@drawspec@sbs@C#1{% - \tcb@pathrect{#1,segmentation@style}{segmentation.south|-frame.south}{interior.north east}% - {0pt}{0pt}{\kvtcb@arc}{0pt}% + \tcb@pathbase{#1,segmentation@style}{segmentation.south|-frame.south}{interior.north east}% + {\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@ins}{\tcb@arc@zpt}% } \def\tcb@drawspec@sbs@D#1{% - \tcb@pathrect{#1,segmentation@style}{segmentation.south|-frame.south}{interior.north east}% - {0pt}{0pt}{0pt}{0pt}% + \tcb@pathbase{#1,segmentation@style}{segmentation.south|-frame.south}{interior.north east}% + {\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}% } \def\tcb@drawspec@sbs@E#1{% - \tcb@pathrect{#1,segmentation@style}{segmentation.south|-frame.south}{interior.east|-frame.north}% - {0pt}{0pt}{0pt}{0pt}% + \tcb@pathbase{#1,segmentation@style}{segmentation.south|-frame.south}{interior.east|-frame.north}% + {\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}% } \def\tcb@drawspec@sbs@F#1{% - \tcb@pathrect{#1,segmentation@style}{segmentation.south}{interior.east|-frame.north}% - {0pt}{0pt}{0pt}{\kvtcb@arc}% + \tcb@pathbase{#1,segmentation@style}{segmentation.south}{interior.east|-frame.north}% + {\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@ins}% } \def\tcb@drawspec@T{% - \tcb@pathrect{top color=\kvtcb@colframe,bottom color=\kvtcb@colback}{[yshift=-0.01pt]interior.north west}{[yshift=0.01pt]title.south east}% - {0pt}{0pt}{0pt}{0pt}% + \tcb@pathbase{top color=\kvtcb@colframe,bottom color=\kvtcb@colback}{[yshift=-0.01pt]interior.north west}{[yshift=0.01pt]title.south east}% + {\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}% } \def\tcb@drawframe@freelance{\tcb@frame@code} @@ -241,40 +248,67 @@ segmentation hidden/.style={segmentation style={draw=none,fill=none}}, segmentation code/.code={\def\tcb@segmentation@code{#1}},% segmentation code/.default=\tcb@drawlower@standard,% - title style/.code={\tikzset{title@style/.style={#1}}},% + @title style/.code={\tikzset{title@style/.style={#1}}},% + title style/.style={title filled,@title style={#1}}, title hidden/.style={title style={draw=none,fill=none}}, - colbacktitle/.style={title style={fill=#1}}, - title code/.code={\def\tcb@title@code{#1}},% + @title code/.code={\def\tcb@title@code{#1}},% + @title code/.default=\tcb@drawtitle@standard,% + title code/.style={title filled,@title code={#1}},% title code/.default=\tcb@drawtitle@standard,% colbacklower/.store in=\kvtcb@colbacklower,% clear@spec/.code={\tcb@spec{}},% + tikz/.code={\appto\tcb@tikz@option@hook{,#1}},% + tikz reset/.code={\let\tcb@tikz@option@hook\@empty},% + at begin tikz/.code={\appto\tcb@tikz@begin@hook{#1}},% + at begin tikz reset/.code={\let\tcb@tikz@begin@hook\@empty},% + at end tikz/.code={\appto\tcb@tikz@end@hook{#1}},% + at end tikz reset/.code={\let\tcb@tikz@end@hook\@empty},% + rotate/.style={tikz={rotate=#1,transform shape}},% + scale/.style={tikz={scale=#1,transform shape},% + at begin tikz={% + \tcbdimto\kvtcb@arc{#1\dimexpr\kvtcb@arc}% + \tcbdimto\tcb@outer@arc{#1\dimexpr\tcb@outer@arc}% + \def\tcb@shadow@prepare##1##2{% + \ifdim##2>0pt\relax\tcbdimto\tcb@shadow@ts{##1-##2/2}%% + \else\tcbdimto\tcb@shadow@ts{##1+##2/2}\fi% + \tcbdimto\tcb@shadow@ts{#1\dimexpr\tcb@shadow@ts}% + \ifdim\dimexpr\tcb@outer@arc>\tcb@shadow@ts\relax% + \tcbdimto\tcb@shadow@arc{\tcb@outer@arc-\tcb@shadow@ts}% + \else% + \let\tcb@shadow@arc=\tcb@zpt% + \fi% + }}},% + remember/.style={tikz={remember picture}},% + remember as/.style={tikz={remember picture},at end tikz={\pgfnodealias{#1}{frame}}},% } \tcbset{% base@unbroken/.style={% - clear@spec,graphical environment=tikzpicture,geometry nodes,% + clear@spec,graphical environment=tikzpicture@tcb@hooked,geometry nodes,% + set@outerboundary=\tcb@boundaryframe@standard,% set@extensions@preframe={\tcb@draw@shadow@unbroken},% set@extensions@postframe={\tcb@draw@border@unbroken\tcb@apply@overlay},% },% base@first/.style={% - clear@spec,graphical environment=tikzpicture,geometry nodes,% + clear@spec,graphical environment=tikzpicture@tcb@hooked,geometry nodes,% + set@outerboundary=\tcb@boundaryframe@pathfirst,% set@extensions@preframe={\tcb@draw@shadow@first},% set@extensions@postframe={\tcb@draw@border@first\tcb@apply@overlay},% },% base@middle/.style={% - clear@spec,graphical environment=tikzpicture,geometry nodes,% + clear@spec,graphical environment=tikzpicture@tcb@hooked,geometry nodes,% + set@outerboundary=\tcb@boundaryframe@pathmiddle,% set@extensions@preframe={\tcb@draw@shadow@middle},% set@extensions@postframe={\tcb@draw@border@middle\tcb@apply@overlay},% },% base@last/.style={% - clear@spec,graphical environment=tikzpicture,geometry nodes,% + clear@spec,graphical environment=tikzpicture@tcb@hooked,geometry nodes,% + set@outerboundary=\tcb@boundaryframe@pathlast,% set@extensions@preframe={\tcb@draw@shadow@last},% set@extensions@postframe={\tcb@draw@border@last\tcb@apply@overlay},% },% } -\def\tcb@new@skin#1#2{\tcbset{skin@#1/.style={#2}}} - \tcb@new@skin{enhanced}{base@unbroken,% frame engine=path,interior titled engine=path,interior engine=path,segmentation engine=path,title engine=path,% skin first=enhancedfirst,skin middle=enhancedmiddle,skin last=enhancedlast} @@ -591,10 +625,11 @@ segmentation code={\tcb@drawspec@widgetsegment},% skin first=widgetmiddle,skin middle=widgetmiddle,skin last=widgetlast} -\tcb@new@skin{draft}{clear@spec,graphical environment=tikzpicture,geometry nodes,% +\tcb@new@skin{draft}{clear@spec,graphical environment=tikzpicture@tcb@hooked,geometry nodes,% frame engine=freelance,interior titled engine=freelance,interior engine=freelance,segmentation engine=path,title engine=path,% interior style=,frame style=,segmentation style={draw=black,dashed}, colupper=black!50!white,collower=black!50!white,coltitle=black!50!white, + title hidden,% frame code={% \path[draw=blue!10!white,double,line width=1pt,dashed] (current bounding box.south west) rectangle (current bounding box.north east); {\tcb@spec{fill=black!15!white,draw=black}\tcb@drawframe@path}% @@ -676,10 +711,24 @@ \tcbset{draft/.style={skin=draft}} +\tikzset{% + tcb@forced@clip/.code={\tikz@addmode{\tikz@mode@cliptrue}\let\tikz@options=\pgfutil@empty},% + tcb@invclip/.style={clip,insert path={{[reset cm]\pgfextra{% + \pgfpathmoveto{\pgfqpoint{-16383.99999pt}{-16383.99999pt}}% + \pgfpathlineto{\pgfqpoint{16383.99999pt}{-16383.99999pt}}% + \pgfpathlineto{\pgfqpoint{16383.99999pt}{16383.99999pt}}% + \pgfpathlineto{\pgfqpoint{-16383.99999pt}{16383.99999pt}}% + \pgfpathclose}}}}% +}% + +\def\tcb@clip@frame{\tcb@pathboundary{clip}{\tcb@outerboundary}} + +\def\tcb@invclip@frame{\tcb@pathboundary{tcb@invclip}{\tcb@outerboundary}} + \def\tcb@clip@interior{% \begingroup% \tcbset{interior hidden}% - \tcb@spec{forced clip}% + \tcb@spec{tcb@forced@clip}% \def\tcb@spec##1{}% \iftcb@hasTitle% \csname tcb@drawwithtitle@\kvtcb@engine@interiortitled\endcsname% @@ -689,19 +738,10 @@ \endgroup% } -\def\tcb@clip@frame{% - \begingroup% - \tcbset{frame hidden}% - \tcb@spec{forced clip}% - \def\tcb@spec##1{}% - \csname tcb@drawframe@\kvtcb@engine@frame\endcsname% - \endgroup% -} - \def\tcb@clip@title{% \begingroup% \tcbset{title hidden}% - \tcb@spec{forced clip}% + \tcb@spec{tcb@forced@clip}% \def\tcb@spec##1{}% \iftcb@hasTitle% \csname tcb@drawtitle@\kvtcb@engine@title\endcsname% @@ -709,8 +749,9 @@ \endgroup% } -\newenvironment{tcbclipinterior}{\begin{scope}\tcb@clip@interior}{\end{scope}} \newenvironment{tcbclipframe}{\begin{scope}\tcb@clip@frame}{\end{scope}} +\newenvironment{tcbinvclipframe}{\begin{scope}\tcb@invclip@frame}{\end{scope}} +\newenvironment{tcbclipinterior}{\begin{scope}\tcb@clip@interior}{\end{scope}} \newenvironment{tcbcliptitle}{\begin{scope}\tcb@clip@title}{\end{scope}} \newbox\tcb@waterbox @@ -761,7 +802,6 @@ \tcb@drawspec@watermark@tikz{\node[inner sep=0pt,align=flush center]{#1};}% } -\tikzset{forced clip/.code={\tikz@addmode{\tikz@mode@cliptrue}\let\tikz@options=\pgfutil@empty}} \tcbset{% watermark opacity/.store in=\kvtcb@watermark@opacity,% @@ -781,6 +821,10 @@ clip watermark/true/.code={\let\tcb@drawspec@watermark=\tcb@drawspec@watermark@@clip}, clip watermark/false/.code={\let\tcb@drawspec@watermark=\tcb@drawspec@watermark@@noclip}, clip watermark/.default=true, + show bounding box/.style={overlay={% + \path[preaction={draw,line width=0.1pt,#1},draw,double=white,line width=1pt,dashed,opacity=0.5,#1] + (current bounding box.south west) rectangle (current bounding box.north east);}},% + show bounding box/.default={red},% } \def\tcb@tdraw@title@clip{% @@ -818,7 +862,7 @@ \tcbset{marker/.style={% - skin=enhancedmiddle, + skin=enhancedmiddle jigsaw, breakable,parbox=false, boxrule=0mm,leftrule=5mm,rightrule=5mm,boxsep=0mm, left=3mm,right=3mm,top=1mm,bottom=1mm, @@ -917,28 +961,30 @@ \fi% } +\def\tcb@arc@sha{\pgfsetcornersarced{\pgfqpoint{\tcb@shadow@arc}{\tcb@shadow@arc}}}% + \def\tcb@shadow@unbroken#1#2#3#4{% \tcb@shadow@prepare{#3}{#1}% - \tcb@pathrect{fill,#4}{[xshift=#1+#3,yshift=#2+#3]frame.south west}{[xshift=#1-#3,yshift=#2-#3]frame.north east}% - {\tcb@shadow@arc}{\tcb@shadow@arc}{\tcb@shadow@arc}{\tcb@shadow@arc}% + \tcb@pathbase{fill,#4}{[xshift=#1+#3,yshift=#2+#3]frame.south west}{[xshift=#1-#3,yshift=#2-#3]frame.north east}% + {\tcb@arc@sha}{\tcb@arc@sha}{\tcb@arc@sha}{\tcb@arc@sha}% } \def\tcb@shadow@first#1#2#3#4{% \tcb@shadow@prepare{#3}{#1}% - \tcb@pathrect{fill,#4}{[xshift=#1+#3,yshift=#2+#3]frame.south west}{[xshift=#1-#3,yshift=#2-#3]frame.north east}% - {0pt}{\tcb@shadow@arc}{\tcb@shadow@arc}{0pt}% + \tcb@pathbase{fill,#4}{[xshift=#1+#3,yshift=#2+#3]frame.south west}{[xshift=#1-#3,yshift=#2-#3]frame.north east}% + {\tcb@arc@zpt}{\tcb@arc@sha}{\tcb@arc@sha}{\tcb@arc@zpt}% } \def\tcb@shadow@middle#1#2#3#4{% \tcb@shadow@prepare{#3}{#1}% - \tcb@pathrect{fill,#4}{[xshift=#1+#3,yshift=#2+#3]frame.south west}{[xshift=#1-#3,yshift=#2-#3]frame.north east}% - {0pt}{0pt}{0pt}{0pt}% + \tcb@pathbase{fill,#4}{[xshift=#1+#3,yshift=#2+#3]frame.south west}{[xshift=#1-#3,yshift=#2-#3]frame.north east}% + {\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}% } \def\tcb@shadow@last#1#2#3#4{% \tcb@shadow@prepare{#3}{#1}% - \tcb@pathrect{fill,#4}{[xshift=#1+#3,yshift=#2+#3]frame.south west}{[xshift=#1-#3,yshift=#2-#3]frame.north east}% - {\tcb@shadow@arc}{0pt}{0pt}{\tcb@shadow@arc}% + \tcb@pathbase{fill,#4}{[xshift=#1+#3,yshift=#2+#3]frame.south west}{[xshift=#1-#3,yshift=#2-#3]frame.north east}% + {\tcb@arc@sha}{\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@sha}% } \def\tcb@draw@shadow@unbroken{% @@ -991,23 +1037,56 @@ drop fuzzy midday shadow/.default={black!50!white},% fuzzy halo/.style args={#1 with #2}{fuzzy shadow={0mm}{0mm}{-#1}{0.12mm}{#2}}, fuzzy halo/.default={1.0mm with yellow},% + % + drop shadow southeast/.style={shadow={0.9mm}{-0.9mm}{0mm}{opacity=0.5,#1}},% + drop shadow southeast/.default={black!50!white},% + drop shadow south/.style={shadow={0mm}{-0.8mm}{-0.4mm}{opacity=0.5,#1}},% + drop shadow south/.default={black!50!white},% + drop shadow southwest/.style={shadow={-0.9mm}{-0.9mm}{0mm}{opacity=0.5,#1}},% + drop shadow southwest/.default={black!50!white},% + drop shadow west/.style={shadow={-0.8mm}{0mm}{-0.4mm}{opacity=0.5,#1}},% + drop shadow west/.default={black!50!white},% + drop shadow northwest/.style={shadow={-0.9mm}{0.9mm}{0mm}{opacity=0.5,#1}},% + drop shadow northwest/.default={black!50!white},% + drop shadow north/.style={shadow={0mm}{0.8mm}{-0.4mm}{opacity=0.5,#1}},% + drop shadow north/.default={black!50!white},% + drop shadow northeast/.style={shadow={0.9mm}{0.9mm}{0mm}{opacity=0.5,#1}},% + drop shadow northeast/.default={black!50!white},% + drop shadow east/.style={shadow={0.8mm}{0mm}{-0.4mm}{opacity=0.5,#1}},% + drop shadow east/.default={black!50!white},% + drop fuzzy shadow southeast/.style={fuzzy shadow={1.0mm}{-1.0mm}{0mm}{0.12mm}{#1}}, + drop fuzzy shadow southeast/.default={black!50!white},% + drop fuzzy shadow south/.style={fuzzy shadow={0mm}{-1.0mm}{-0.5mm}{0.12mm}{#1}}, + drop fuzzy shadow south/.default={black!50!white},% + drop fuzzy shadow southwest/.style={fuzzy shadow={-1.0mm}{-1.0mm}{0mm}{0.12mm}{#1}}, + drop fuzzy shadow southwest/.default={black!50!white},% + drop fuzzy shadow west/.style={fuzzy shadow={-1.0mm}{0mm}{-0.5mm}{0.12mm}{#1}}, + drop fuzzy shadow west/.default={black!50!white},% + drop fuzzy shadow northwest/.style={fuzzy shadow={-1.0mm}{1.0mm}{0mm}{0.12mm}{#1}}, + drop fuzzy shadow northwest/.default={black!50!white},% + drop fuzzy shadow north/.style={fuzzy shadow={0mm}{1.0mm}{-0.5mm}{0.12mm}{#1}}, + drop fuzzy shadow north/.default={black!50!white},% + drop fuzzy shadow northeast/.style={fuzzy shadow={1.0mm}{1.0mm}{0mm}{0.12mm}{#1}}, + drop fuzzy shadow northeast/.default={black!50!white},% + drop fuzzy shadow east/.style={fuzzy shadow={1.0mm}{0mm}{-0.5mm}{0.12mm}{#1}}, + drop fuzzy shadow east/.default={black!50!white},% } - \tcbset{% reset@skins/.style={% - frame style=,interior style=,segmentation style=,% + frame style=,interior style=,segmentation style=,@title style=,% frame code,interior titled code,interior code,segmentation code,% - title style=,title code,colbacklower=black!15!white,% + @title code,colbacklower=black!15!white,% extend freelance=,extend freelancefirst=,extend freelancemiddle=,extend freelancelast=,% clear@spec,% watermark opacity=1.00,watermark color=\kvtcb@colback!85!\kvtcb@colframe,% watermark zoom=0.75,clip watermark,% - clip title=false,clip upper=false,clip lower=false, - no borderline,no shadow,% + clip title=false,clip upper=false,clip lower=false,% + no borderline,no shadow,tikz reset,at begin tikz reset,at end tikz reset% }, initialize@reset=reset@skins, } +\tcbuselibrary{skins@jigsaw} diff --git a/Master/texmf-dist/tex/latex/tcolorbox/tcbskinsjigsaw.code.tex b/Master/texmf-dist/tex/latex/tcolorbox/tcbskinsjigsaw.code.tex new file mode 100644 index 00000000000..9e75fb0a731 --- /dev/null +++ b/Master/texmf-dist/tex/latex/tcolorbox/tcbskinsjigsaw.code.tex @@ -0,0 +1,222 @@ +%% The LaTeX package tcolorbox - version 2.60 (2013/12/17) +%% tcbskinsjigsaw.code.tex: Code for colorboxes with different skins +%% +%% ------------------------------------------------------------------------------------------- +%% Copyright (c) 2006-2013 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> +%% ------------------------------------------------------------------------------------------- +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +%% +%% This work has the LPPL maintenance status `author-maintained'. +%% +%% This work consists of all files listed in README +%% +\tcb@set@library@version{2.60} + +\tcbuselibrary{skins} + +\def\tcb@drawframe@pathjigsaw{% + \tcb@pathboundary{tcb@fill@frame}{\tcb@boundaryframe@standardjigsaw}% +} + +\def\tcb@boundary@pathfirstjigsaw@A{% + \tcbdimto\tcb@xa{\tcb@width-\kvtcb@right@rule}% + \tcbdimto\tcb@ya{\tcb@height-\kvtcb@top@rule}% + \pgfpathmoveto{\pgfpointorigin}% + \tcb@arc@out\pgfpathlineto{\pgfqpoint{0pt}{\tcb@height}}% + \pgfpathlineto{\pgfqpoint{\tcb@width}{\tcb@height}}% + \tcb@arc@zpt\pgfpathlineto{\pgfqpoint{\tcb@width}{0pt}}% + \pgfpathlineto{\pgfqpoint{\tcb@xa}{0pt}}% + \tcb@arc@ins\pgfpathlineto{\pgfqpoint{\tcb@xa}{\tcb@ya}}% + \pgfpathlineto{\pgfqpoint{\kvtcb@left@rule}{\tcb@ya}}% + \tcb@arc@zpt\pgfpathlineto{\pgfqpoint{\kvtcb@left@rule}{0pt}}% + \pgfpathclose% +} + +\def\tcb@boundary@pathfirstjigsaw@B{% + \tcbdimto\tcb@xa{\tcb@width-\kvtcb@right@rule}% + \tcbdimto\tcb@ya{\kvtcb@bottom@rule+\tcb@innerheight}% + \pgfpathmoveto{\pgfpointorigin}% + \tcb@arc@out\pgfpathlineto{\pgfqpoint{0pt}{\tcb@height}}% + \pgfpathlineto{\pgfqpoint{\tcb@width}{\tcb@height}}% + \tcb@arc@zpt\pgfpathlineto{\pgfqpoint{\tcb@width}{0pt}}% + \pgfpathlineto{\pgfqpoint{\tcb@xa}{0pt}}% + \pgfpathlineto{\pgfqpoint{\tcb@xa}{\tcb@ya}}% + \pgfpathlineto{\pgfqpoint{\kvtcb@left@rule}{\tcb@ya}}% + \tcb@arc@zpt\pgfpathlineto{\pgfqpoint{\kvtcb@left@rule}{0pt}}% + \pgfpathclose% +} + +\def\tcb@drawframe@pathfirstjigsaw{% + \tcb@pathboundary{tcb@fill@frame}{% + \pgfseteorule% + \iftcb@hasTitle% + \iftcb@titlefilled% + \ifdim\dimexpr\kvtcb@title@rule>0pt\relax% + \tcb@boundary@pathfirstjigsaw@B% + \tcb@boundarytitle@standard% + \else% + \tcb@boundary@pathfirstjigsaw@A% + \fi% + \else% + \tcb@boundary@pathfirstjigsaw@B% + \fi% + \else% + \tcb@boundary@pathfirstjigsaw@A% + \fi% + }% +} + +\def\tcb@boundary@pathmiddlejigsaw@A{% + \tcbdimto\tcb@xa{\tcb@width-\kvtcb@right@rule}% + \pgfpathrectangle{\pgfpointorigin}{\pgfqpoint{\kvtcb@left@rule}{\tcb@height}}% + \pgfpathrectangle{\pgfqpoint{\tcb@xa}{0pt}}{\pgfqpoint{\kvtcb@right@rule}{\tcb@height}}% +} + +\def\tcb@boundary@pathmiddlejigsaw@B{% + \tcbdimto\tcb@xa{\tcb@width-\kvtcb@right@rule}% + \tcbdimto\tcb@ya{\tcb@height-\kvtcb@top@rule}% + \pgfpathmoveto{\pgfpointorigin}% + \tcb@arc@zpt\pgfpathlineto{\pgfqpoint{0pt}{\tcb@height}}% + \pgfpathlineto{\pgfqpoint{\tcb@width}{\tcb@height}}% + \pgfpathlineto{\pgfqpoint{\tcb@width}{0pt}}% + \pgfpathlineto{\pgfqpoint{\tcb@xa}{0pt}}% + \pgfpathlineto{\pgfqpoint{\tcb@xa}{\tcb@ya}}% + \pgfpathlineto{\pgfqpoint{\kvtcb@left@rule}{\tcb@ya}}% + \pgfpathlineto{\pgfqpoint{\kvtcb@left@rule}{0pt}}% + \pgfpathclose% +} + +\def\tcb@boundary@pathmiddlejigsaw@C{% + \tcbdimto\tcb@xa{\tcb@width-\kvtcb@right@rule}% + \tcbdimto\tcb@ya{\kvtcb@bottom@rule+\tcb@innerheight}% + \pgfpathmoveto{\pgfpointorigin}% + \tcb@arc@zpt\pgfpathlineto{\pgfqpoint{0pt}{\tcb@height}}% + \pgfpathlineto{\pgfqpoint{\tcb@width}{\tcb@height}}% + \pgfpathlineto{\pgfqpoint{\tcb@width}{0pt}}% + \pgfpathlineto{\pgfqpoint{\tcb@xa}{0pt}}% + \pgfpathlineto{\pgfqpoint{\tcb@xa}{\tcb@ya}}% + \pgfpathlineto{\pgfqpoint{\kvtcb@left@rule}{\tcb@ya}}% + \pgfpathlineto{\pgfqpoint{\kvtcb@left@rule}{0pt}}% + \pgfpathclose% +} + +\def\tcb@drawframe@pathmiddlejigsaw{% + \tcb@pathboundary{tcb@fill@frame}{% + \pgfseteorule% + \iftcb@hasTitle% + \iftcb@titlefilled% + \ifdim\dimexpr\kvtcb@title@rule>0pt\relax% + \tcb@boundary@pathmiddlejigsaw@C% + \tcb@arc@zpt% + \tcbdimto\tcb@ya{\kvtcb@bottom@rule+\tcb@innerheight+\kvtcb@title@rule}% + \tcbdimto\tcb@xb{\tcb@width-\kvtcb@right@rule}% + \tcbdimto\tcb@yb{\tcb@height-\kvtcb@top@rule}% + \pgfpathrectanglecorners{\pgfqpoint{\kvtcb@left@rule}{\tcb@ya}}{\pgfqpoint{\tcb@xb}{\tcb@yb}}% + \else% + \tcb@boundary@pathmiddlejigsaw@B% + \fi% + \else% + \tcb@boundary@pathmiddlejigsaw@C% + \fi% + \else% + \tcb@boundary@pathmiddlejigsaw@A% + \fi% + }% +} + +\def\tcb@drawframe@pathlastjigsaw{% + \tcb@pathboundary{tcb@fill@frame}{% + \pgfseteorule% + \iftcb@hasTitle% + \iftcb@titlefilled% + \ifdim\dimexpr\kvtcb@title@rule>0pt\relax% + \tcb@boundaryframe@pathlast% + \tcb@arc@zpt% + \tcbdimto\tcb@ya{\kvtcb@bottom@rule+\tcb@innerheight+\kvtcb@title@rule}% + \tcbdimto\tcb@xb{\tcb@width-\kvtcb@right@rule}% + \tcbdimto\tcb@yb{\tcb@height-\kvtcb@top@rule}% + \pgfpathrectanglecorners{\pgfqpoint{\kvtcb@left@rule}{\tcb@ya}}{\pgfqpoint{\tcb@xb}{\tcb@yb}}% + \tcb@boundaryinterior@title@standard% + \else% + \tcb@boundaryframe@pathlast% + \tcb@boundary@base{\kvtcb@left@rule}{\kvtcb@bottom@rule}% + {\tcb@width-\kvtcb@right@rule}{\tcb@height-\kvtcb@top@rule}% + {\tcb@arc@ins}{\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@ins}% + \fi% + \else% + \tcb@boundaryframe@pathlast% + \fi% + \else% + \tcbdimto\tcb@xa{\tcb@width-\kvtcb@right@rule}% + \pgfpathmoveto{\pgfpointorigin}% + \tcb@arc@zpt\pgfpathlineto{\pgfqpoint{0pt}{\tcb@height}}% + \pgfpathlineto{\pgfqpoint{\kvtcb@left@rule}{\tcb@height}}% + \tcb@arc@ins\pgfpathlineto{\pgfqpoint{\kvtcb@left@rule}{\kvtcb@bottom@rule}}% + \pgfpathlineto{\pgfqpoint{\tcb@xa}{\kvtcb@bottom@rule}}% + \tcb@arc@zpt\pgfpathlineto{\pgfqpoint{\tcb@xa}{\tcb@height}}% + \pgfpathlineto{\pgfqpoint{\tcb@width}{\tcb@height}}% + \tcb@arc@out\pgfpathlineto{\pgfqpoint{\tcb@width}{0pt}}% + \pgfpathclose% + \fi% + }% +} + + +\def\tcb@draw@shadowjigsaw@unbroken{% + \let\tcb@shadow=\tcb@shadow@unbroken% + \begin{tcbinvclipframe}% + \kvtcb@shadow% + \end{tcbinvclipframe}% +} + +\def\tcb@draw@shadowjigsaw@first{% + \let\tcb@shadow=\tcb@shadow@first% + \begin{tcbinvclipframe}% + \kvtcb@shadow% + \end{tcbinvclipframe}% +} + +\def\tcb@draw@shadowjigsaw@middle{% + \let\tcb@shadow=\tcb@shadow@middle% + \begin{tcbinvclipframe}% + \kvtcb@shadow% + \end{tcbinvclipframe}% +} + +\def\tcb@draw@shadowjigsaw@last{% + \let\tcb@shadow=\tcb@shadow@last% + \begin{tcbinvclipframe}% + \kvtcb@shadow% + \end{tcbinvclipframe}% +} + +\tcb@new@skin{enhanced jigsaw}{base@unbroken,% + frame engine=pathjigsaw,interior titled engine=path,interior engine=path,segmentation engine=path,title engine=path,% + set@extensions@preframe={\tcb@draw@shadowjigsaw@unbroken},% + skin first=enhancedfirst jigsaw,skin middle=enhancedmiddle jigsaw,skin last=enhancedlast jigsaw} + +\tcb@new@skin{enhancedfirst jigsaw}{base@first,% + frame engine=pathfirstjigsaw,interior titled engine=pathfirst,interior engine=pathfirst,segmentation engine=path,title engine=pathfirst,% + set@extensions@preframe={\tcb@draw@shadowjigsaw@first},% + skin first=enhancedfirst jigsaw,skin middle=enhancedmiddle jigsaw,skin last=enhancedmiddle jigsaw} + +\tcb@new@skin{enhancedmiddle jigsaw}{base@middle,% + frame engine=pathmiddlejigsaw,interior titled engine=pathmiddle,interior engine=pathmiddle,segmentation engine=path,title engine=pathmiddle,% + set@extensions@preframe={\tcb@draw@shadowjigsaw@middle},% + skin first=enhancedmiddle jigsaw,skin middle=enhancedmiddle jigsaw,skin last=enhancedmiddle jigsaw} + +\tcb@new@skin{enhancedlast jigsaw}{base@last,% + frame engine=pathlastjigsaw,interior titled engine=pathlast,interior engine=pathlast,segmentation engine=path,title engine=pathlast,% + set@extensions@preframe={\tcb@draw@shadowjigsaw@last},% + skin first=enhancedmiddle jigsaw,skin middle=enhancedmiddle jigsaw,skin last=enhancedlast jigsaw} + +\tcbset{enhanced jigsaw/.style={skin=enhanced jigsaw}% +} + diff --git a/Master/texmf-dist/tex/latex/tcolorbox/tcbtheorems.code.tex b/Master/texmf-dist/tex/latex/tcolorbox/tcbtheorems.code.tex index 1b080759d7b..ece7cf5b1cd 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.51 (2013/09/16) +%% The LaTeX package tcolorbox - version 2.60 (2013/12/17) %% 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{2.51} +\tcb@set@library@version{2.60} \RequirePackage{amsmath} @@ -85,10 +85,13 @@ \newcommand{\new@tcbtheorem}[5][]{% \@@newtcolorbox[auto counter,#1]{#2}[3][]{#4,% - title={\tcb@theo@title{#3}{\thetcbcounter}{##2}}, + title={\tcb@theo@title{#3}{\thetcbcounter}{##2}},% list entry={\numberline{\thetcbcounter}##2},% code={\tcb@theo@label{#5}{##3}},% ##1}% + \@@newtcolorbox[#1,no counter,list inside=]{#2*}[2][]{#4,% + title={\tcb@theo@title{#3}{\@empty}{##2}},% + ##1}% } \def\newtcbtheorem{\let\@@newtcolorbox\newtcolorbox% diff --git a/Master/texmf-dist/tex/latex/tcolorbox/tcolorbox.sty b/Master/texmf-dist/tex/latex/tcolorbox/tcolorbox.sty index 5c1de5282af..caabe86692a 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.51 (2013/09/16) +%% The LaTeX package tcolorbox - version 2.60 (2013/12/17) %% tcolorbox.sty: Text color boxes %% %% ------------------------------------------------------------------------------------------- @@ -18,8 +18,8 @@ %% This work consists of all files listed in README %% \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{tcolorbox}[2013/09/16 version 2.51 text color boxes] -\def\tcb@version{2.51} +\ProvidesPackage{tcolorbox}[2013/12/17 version 2.60 text color boxes] +\def\tcb@version{2.60} \RequirePackage{pgf}[2008/01/15] \RequirePackage{verbatim}[2003/08/22] @@ -35,6 +35,7 @@ \newif\iftcb@sidebyside \newif\iftcb@hasPhantom \newif\iftcb@lowerseparated +\newif\iftcb@titlefilled \newbox\tcb@titlebox \newbox\tcb@upperbox @@ -103,6 +104,8 @@ \fi% \fi} +\def\tcb@new@skin#1#2{\tcbset{skin@#1/.style={#2}}} + \pgfkeys{/handlers/.dimstore in/.code=\pgfkeysalso{\pgfkeyscurrentpath/.code=\def#1{\the\dimexpr##1\relax}}} \tcbset{% @@ -132,7 +135,7 @@ \let\kvtcb@right@rule=\kvtcb@top@rule@stand% \let\kvtcb@title@rule=\kvtcb@top@rule@stand% }, - arc/.store in=\kvtcb@arc, + arc/.dimstore in=\kvtcb@arc, outer arc/.code={\def\kvtcb@outerarc{#1}\let\tcb@comp@arc=\tcb@comp@arc@fix}, auto outer arc/.code={\let\tcb@comp@arc=\tcb@comp@arc@auto}, lefttitle/.store in=\kvtcb@lefttitle, @@ -197,6 +200,13 @@ }, enlarge left by/.store in=\kvtcb@bbleft, enlarge right by/.store in=\kvtcb@bbright, + enlarge by/.style={enlarge top by={#1},enlarge bottom by={#1},enlarge left by={#1},enlarge right by={#1}},% + grow to left by/.code={% + \tcbdimto\kvtcb@width{\kvtcb@width+#1}% + \pgfkeysalso{enlarge left by={-\the\dimexpr#1\relax}}},% + grow to right by/.code={% + \tcbdimto\kvtcb@width{\kvtcb@width+#1}% + \pgfkeysalso{enlarge right by={-\the\dimexpr#1\relax}}},% 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}, @@ -217,19 +227,17 @@ geometry nodes/.default=true,% set@extensions@preframe/.store in=\tcb@extensions@preframe,% set@extensions@postframe/.store in=\tcb@extensions@postframe,% + set@outerboundary/.store in=\tcb@outerboundary,% skin first/.store in=\kvtcb@skin@first, skin middle/.store in=\kvtcb@skin@middle, skin last/.store in=\kvtcb@skin@last, - skin@standard/.style={frame engine=standard,interior titled engine=standard, - interior engine=standard,segmentation engine=standard,title engine=standard, - graphical environment=pgfpicture, - geometry nodes=false, - set@extensions@preframe=,% - set@extensions@postframe={\tcb@apply@overlay},% - skin first=standard,skin middle=standard,skin last=standard}, skin/.style={skin@#1}, parbox/.store in=\kvtcv@parbox, parbox/.default=true,% + hyphenationfix/.is choice,% + hyphenationfix/.default=true,% + hyphenationfix/true/.code={\def\tcb@hyph@fix{\everypar=\expandafter{\the\everypar\everypar{\hspace{0pt}}\hspace{0pt}}}},% + hyphenationfix/false/.code={\let\tcb@hyph@fix=\@empty},% overlay unbroken/.code={\def\tcb@overlay@unbroken{#1}},% overlay first/.code={\def\tcb@overlay@first{#1}},% overlay middle/.code={\def\tcb@overlay@middle{#1}},% @@ -251,6 +259,7 @@ \let\tcb@overlay@last=\tcb@overlay@temp},% no overlay/.style={overlay=},% standard/.style={skin=standard},% + standard jigsaw/.style={skin=standard jigsaw},% before title/.store in=\kvtcb@before@title,% after title/.store in=\kvtcb@after@title,% before upper/.store in=\kvtcb@before@upper,% @@ -271,7 +280,7 @@ toptitle=1mm,bottomtitle=1mm,boxrule=0.5mm, before upper={\arrayrulecolor{\kvtcb@colframe}\def\arraystretch{1.1}#1% \tcb@hack@currenvir\tabularx{\linewidth}{#2}}, - after upper=\endtabularx}, + after upper=\endtabularx\arrayrulecolor{black}}, tabularx/.style={tabularx*={}{#1}}, tikz upper/.style={before upper=\centering\tcb@shield@externalize\tikzpicture[#1],after upper=\endtikzpicture},% tikz lower/.style={before lower=\centering\tcb@shield@externalize\tikzpicture[#1],after lower=\endtikzpicture},% @@ -327,6 +336,18 @@ lower separated/.is if=tcb@lowerseparated, options@for/.code={\letcs\tcb@new@colop{tcb@opt@#1}\pgfkeysalsofrom\tcb@new@colop}, list entry/.store in=\kvtcb@listentry, + title filled/.is if=tcb@titlefilled,% + @colbacktitle/.store in=\kvtcb@colbacktitle, + colbacktitle/.style={title filled,@colbacktitle={#1}}, + opacityupper/.store in=\kvtcb@opacityupper, + opacitylower/.store in=\kvtcb@opacitylower, + opacitytitle/.store in=\kvtcb@opacitytitle, + opacityframe/.store in=\kvtcb@opacityframe, + opacityback/.store in=\kvtcb@opacityback, + @opacitybacktitle/.store in=\kvtcb@opacitybacktitle, + opacitybacktitle/.style={title filled,@opacitybacktitle={#1}}, + opacityfill/.style={opacityframe={#1},opacityback={#1},@opacitybacktitle={#1}}, + opacitytext/.style={opacityupper={#1},opacitylower={#1}}, } \tcbset{% @@ -367,7 +388,7 @@ \@endpefalse \color@setgroup% \csname tcb@parbox@use@\kvtcv@parbox\endcsname% - \ignorespaces\tcb@minipage#2\ignorespaces} + \ignorespaces\tcb@minipage#2\tcb@hyph@fix\ignorespaces} \def\endtcb@lrbox{\unskip\endminipage\unskip\color@endgroup} \let\tcb@savebox=\tcb@lrbox @@ -620,13 +641,77 @@ \def\tcb@dbox@center#1#2#3#4{\pgftext[x=#1,y=#2+#3/2,left]{\box#4}}% +\def\tcb@arc@zpt{\pgfsetcornersarced{\pgfpointorigin}}% +\def\tcb@arc@ins{\pgfsetcornersarced{\pgfqpoint{\kvtcb@arc}{\kvtcb@arc}}}% +\def\tcb@arc@out{\pgfsetcornersarced{\pgfqpoint{\tcb@outer@arc}{\tcb@outer@arc}}}% + +% boundaries +\def\tcb@boundary@base#1#2#3#4#5#6#7#8{% + \tcbdimto\tcb@xa{#1}% + \tcbdimto\tcb@ya{#2}% + \tcbdimto\tcb@xb{#3}% + \tcbdimto\tcb@yb{#4}% + \pgfpathmoveto{\pgfqpoint{\tcb@xa}{\tcb@ya}}% + #6\pgfpathlineto{\pgfqpoint{\tcb@xa}{\tcb@yb}}% + #7\pgfpathlineto{\pgfqpoint{\tcb@xb}{\tcb@yb}}% + #8\pgfpathlineto{\pgfqpoint{\tcb@xb}{\tcb@ya}}% + #5\pgfpathclose% +} + + +\def\tcb@boundaryframe@standard{% + \tcb@boundary@base{0pt}{0pt}% + {\tcb@width}{\tcb@height}% + {\tcb@arc@out}{\tcb@arc@out}{\tcb@arc@out}{\tcb@arc@out}% +} + +\def\tcb@boundaryframe@standardjigsaw{% + \pgfseteorule% + \tcb@boundaryframe@standard% + \iftcb@hasTitle% + \tcb@boundaryinterior@title@standard% + \iftcb@titlefilled% + \tcb@boundarytitle@standard% + \fi% + \else% + \tcb@boundaryinterior@notitle@standard% + \fi% +} + +\def\tcb@boundaryinterior@title@standard{% + \tcb@boundary@base{\kvtcb@left@rule}{\kvtcb@bottom@rule}% + {\tcb@width-\kvtcb@right@rule}{\kvtcb@bottom@rule+\tcb@innerheight}% + {\tcb@arc@ins}{\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@ins}% +} + +\def\tcb@boundaryinterior@notitle@standard{% + \tcb@boundary@base{\kvtcb@left@rule}{\kvtcb@bottom@rule}% + {\tcb@width-\kvtcb@right@rule}{\tcb@height-\kvtcb@top@rule}% + {\tcb@arc@ins}{\tcb@arc@ins}{\tcb@arc@ins}{\tcb@arc@ins}% +} + +\def\tcb@boundarytitle@standard{% + \tcb@boundary@base{\kvtcb@left@rule}{\kvtcb@bottom@rule+\tcb@innerheight+\kvtcb@title@rule}% + {\tcb@width-\kvtcb@right@rule}{\tcb@height-\kvtcb@top@rule}% + {\tcb@arc@zpt}{\tcb@arc@ins}{\tcb@arc@ins}{\tcb@arc@zpt}% +} % fill frame \def\tcb@drawframe@standard{% \begin{pgfscope}% - \pgfsetcornersarced{\pgfpoint{\tcb@outer@arc}{\tcb@outer@arc}}% + \tcb@boundaryframe@standard% \pgfsetfillcolor{\kvtcb@colframe}% - \pgfpathrectangle{\pgfpoint{0mm}{0mm}}{\pgfpoint{\tcb@width}{\tcb@height}}% + \pgfsetfillopacity{\kvtcb@opacityframe}% + \pgfusepath{fill}% + \end{pgfscope}% +} + +% fill frame +\def\tcb@drawframe@standardjigsaw{% + \begin{pgfscope}% + \tcb@boundaryframe@standardjigsaw% + \pgfsetfillcolor{\kvtcb@colframe}% + \pgfsetfillopacity{\kvtcb@opacityframe}% \pgfusepath{fill}% \end{pgfscope}% } @@ -634,15 +719,9 @@ % fill inner box with title \def\tcb@drawwithtitle@standard{% \begin{pgfscope}% - \pgfsetcornersarced{\pgfpoint{0mm}{0mm}}% - \pgfmoveto{\pgfpoint{\kvtcb@left@rule}{\kvtcb@bottom@rule}}% - \pgflineto{\pgfpoint{\kvtcb@left@rule}{\the\dimexpr\kvtcb@bottom@rule+\tcb@innerheight\relax}}% - \pgflineto{\pgfpoint{\the\dimexpr\tcb@width-\kvtcb@right@rule\relax}{\the\dimexpr\kvtcb@bottom@rule+\tcb@innerheight\relax}}% - \pgfsetcornersarced{\pgfpoint{\kvtcb@arc}{\kvtcb@arc}}% - \pgflineto{\pgfpoint{\the\dimexpr\tcb@width-\kvtcb@right@rule\relax}{\kvtcb@bottom@rule}}% - \pgflineto{\pgfpoint{\kvtcb@left@rule}{\kvtcb@bottom@rule}}% - \pgfpathclose% + \tcb@boundaryinterior@title@standard% \pgfsetfillcolor{\kvtcb@colback}% + \pgfsetfillopacity{\kvtcb@opacityback}% \pgfusepath{fill}% \end{pgfscope}% } @@ -650,10 +729,19 @@ % fill inner box without title \def\tcb@drawwithouttitle@standard{% \begin{pgfscope}% - \pgfsetcornersarced{\pgfpoint{\kvtcb@arc}{\kvtcb@arc}}% + \tcb@boundaryinterior@notitle@standard% \pgfsetfillcolor{\kvtcb@colback}% - \pgfpathrectangle{\pgfpoint{\kvtcb@left@rule}{\kvtcb@bottom@rule}}% - {\pgfpoint{\the\dimexpr\tcb@width-\kvtcb@left@rule-\kvtcb@right@rule\relax}{\tcb@innerheight}}% + \pgfsetfillopacity{\kvtcb@opacityback}% + \pgfusepath{fill}% + \end{pgfscope}% +} + +% draw title box +\def\tcb@drawtitle@standard{% + \begin{pgfscope}% + \tcb@boundarytitle@standard% + \pgfsetfillcolor{\kvtcb@colbacktitle}% + \pgfsetfillopacity{\kvtcb@opacitybacktitle}% \pgfusepath{fill}% \end{pgfscope}% } @@ -661,33 +749,31 @@ % draw segmentation line \def\tcb@drawlower@standard{% \begin{pgfscope}% - \pgfsetcolor{\kvtcb@colframe}% \pgfsetdash{{1mm}{1mm}}{0.5mm}% \iftcb@sidebyside% \tcbdimto\tcb@seg@pos{\kvtcb@left@rule+\kvtcb@boxsep+\kvtcb@leftupper+\tcb@w@upper+\kvtcb@sbs@gap/2}% - \pgfpathmoveto{\pgfpoint{\tcb@seg@pos}{\the\dimexpr\kvtcb@bottom@rule+\tcb@innerheight\relax}}% - \pgfpathlineto{\pgfpoint{\tcb@seg@pos}{\kvtcb@bottom@rule}}% + \pgfpathmoveto{\pgfqpoint{\tcb@seg@pos}{\the\dimexpr\kvtcb@bottom@rule+\tcb@innerheight\relax}}% + \pgfpathlineto{\pgfqpoint{\tcb@seg@pos}{\kvtcb@bottom@rule}}% \else% \tcbdimto\tcb@seg@pos{\kvtcb@bottom@rule+\kvtcb@boxsep*2+\tcb@break@bottomsep+\kvtcb@middle+\kvtcb@bottom+\tcb@height@lower}% - \pgfpathmoveto{\pgfpoint{\kvtcb@left@rule}{\tcb@seg@pos}}% - \pgfpathlineto{\pgfpoint{\the\dimexpr\tcb@width-\kvtcb@right@rule\relax}{\tcb@seg@pos}}% + \pgfpathmoveto{\pgfqpoint{\kvtcb@left@rule}{\tcb@seg@pos}}% + \pgfpathlineto{\pgfqpoint{\the\dimexpr\tcb@width-\kvtcb@right@rule\relax}{\tcb@seg@pos}}% \fi% + \pgfsetcolor{\kvtcb@colframe}% + \pgfsetstrokeopacity{\kvtcb@opacityframe}% \pgfusepath{stroke}% \end{pgfscope}% } -% draw title box -\def\tcb@drawtitle@standard{% -} \def\tcb@setbb@toggle@none{% - \pgfpathrectanglecorners{\pgfpoint{\the\dimexpr0pt-\kvtcb@bbleft\relax}{\the\dimexpr0pt-\kvtcb@bbbottom\relax}}% - {\pgfpoint{\the\dimexpr\tcb@width+\kvtcb@bbright\relax}{\the\dimexpr\tcb@height+\kvtcb@bbtop\relax}}% + \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}}% } \def\tcb@setbb@toggle@forced{% - \pgfpathrectanglecorners{\pgfpoint{\the\dimexpr0pt-\kvtcb@bbright\relax}{\the\dimexpr0pt-\kvtcb@bbbottom\relax}}% - {\pgfpoint{\the\dimexpr\tcb@width+\kvtcb@bbleft\relax}{\the\dimexpr\tcb@height+\kvtcb@bbtop\relax}}% + \pgfpathrectanglecorners{\pgfqpoint{\the\dimexpr0pt-\kvtcb@bbright\relax}{\the\dimexpr0pt-\kvtcb@bbbottom\relax}}% + {\pgfqpoint{\the\dimexpr\tcb@width+\kvtcb@bbleft\relax}{\the\dimexpr\tcb@height+\kvtcb@bbtop\relax}}% } \def\tcb@setbb@toggle@evenpage@easy{% @@ -745,25 +831,34 @@ \def\tcb@tdraw@title@core{% \iftcb@hasTitle% + \begin{pgfscope}% + \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}}% + \end{pgfscope}% \fi% } \let\tcb@tdraw@title=\tcb@tdraw@title@core \def\tcb@tdraw@upper@core{% + \begin{pgfscope}% + \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}% + \end{pgfscope}% } \let\tcb@tdraw@upper=\tcb@tdraw@upper@core \def\tcb@tdraw@lower@core{% \iftcb@lowervisible% + \begin{pgfscope}% + \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}% + \end{pgfscope}% \fi% } \let\tcb@tdraw@lower=\tcb@tdraw@lower@core @@ -811,6 +906,26 @@ \def\tcb@apply@overlay{\csname tcb@overlay@\tcb@split@state\endcsname}% +\def\tcb@adraw@frame{% + \csname tcb@drawframe@\kvtcb@engine@frame\endcsname% +} + +\def\tcb@adraw@interior{% + \iftcb@hasTitle% + \csname tcb@drawwithtitle@\kvtcb@engine@interiortitled\endcsname% + \else% + \csname tcb@drawwithouttitle@\kvtcb@engine@interior\endcsname% + \fi% +} + +\def\tcb@adraw@title{% + \iftcb@hasTitle% + \iftcb@titlefilled% + \csname tcb@drawtitle@\kvtcb@engine@title\endcsname% + \fi% + \fi% +} + \def\tcb@drawcolorbox{% \edef\tcb@split@state{unbroken}% \let\kvtcb@top@rule=\kvtcb@top@rule@stand% @@ -842,12 +957,8 @@ \pgfsetbaseline{\the\dimexpr\kvtcb@baseline-\kvtcb@bbbottom\relax}% \tcb@extensions@preframe% % draw frame and interior - \csname tcb@drawframe@\kvtcb@engine@frame\endcsname% - \iftcb@hasTitle% - \csname tcb@drawwithtitle@\kvtcb@engine@interiortitled\endcsname% - \else% - \csname tcb@drawwithouttitle@\kvtcb@engine@interior\endcsname% - \fi% + \tcb@adraw@frame% + \tcb@adraw@interior% \iftcb@lowerseparated% \iftcb@lowerspace% \csname tcb@drawlower@\kvtcb@engine@segmentation\endcsname% @@ -855,9 +966,7 @@ \csname tcb@drawlower@\kvtcb@engine@segmentation\endcsname% \fi\fi% \fi% - \iftcb@hasTitle% - \csname tcb@drawtitle@\kvtcb@engine@title\endcsname% - \fi% + \tcb@adraw@title% \tcb@extensions@postframe% % draw text boxes \tcb@tdraw@title% @@ -1135,6 +1244,17 @@ \def\tcbusetemp{\input{\kvtcb@tempfile}} +\tcb@new@skin{standard}{frame engine=standard,interior titled engine=standard, + interior engine=standard,segmentation engine=standard,title engine=standard, + graphical environment=pgfpicture,geometry nodes=false, + set@extensions@preframe=,set@extensions@postframe={\tcb@apply@overlay},% + set@outerboundary=\tcb@boundaryframe@standard,% + skin first=standard,skin middle=standard,skin last=standard% +} + +\tcb@new@skin{standard jigsaw}{skin@standard,frame engine=standardjigsaw,% + skin first=standard jigsaw,skin middle=standard jigsaw,skin last=standard jigsaw} + \def\tcb@reset{}% \tcbset{% initialize@reset/.code={\tcbset{#1}\appto\tcb@reset{\tcbset{#1}}},% @@ -1146,14 +1266,16 @@ enlarge top by=0mm,enlarge bottom by=0mm,enlarge left by=0mm,enlarge right by=0mm, toggle enlargement=none,toggle left and right=none,toptitle=0mm,bottomtitle=0mm, baseline=0pt,adjust text={\"Apgjy},lowerbox=visible,lower separated, - colback=black!5!white,colframe=black!75!white,coltext=black,coltitle=white, + colback=black!5!white,colframe=black!75!white,@colbacktitle=black!50!white,coltext=black,coltitle=white, fonttitle=,fontupper=,fontlower=,floatplacement=htb,nofloat,savelowerto=, tempfile={\jobname.tcbtemp}, - standard,parbox,overlay=,auto outer arc, + standard,parbox,hyphenationfix=false,overlay=,auto outer arc, before title=,after title=,before upper=,after upper=,before lower=,after lower=, sidebyside=false,sidebyside align=center,sidebyside gap=10mm, lefthand ratio=0.5,check odd page=false,nophantom, shield externalize=false,list entry=,no label type, + opacityupper=1.0,opacitylower=1.0,opacitytitle=1.0,opacityframe=1.0,opacityback=1.0,@opacitybacktitle=1.0, + title filled=false }, initialize@reset=reset@core, } @@ -1205,6 +1327,7 @@ \tcb@add@library{minted}{tcbminted.code.tex} \tcb@add@library{theorems}{tcbtheorems.code.tex} \tcb@add@library{documentation}{tcbdocumentation.code.tex} +\tcb@add@library{skins@jigsaw}{tcbskinsjigsaw.code.tex} \tcb@add@library{skins}{tcbskins.code.tex} \tcb@add@library{breakable}{tcbbreakable.code.tex} \tcb@add@library{hooks}{tcbhooks.code.tex} |