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 | |
parent | 95080bc66f5d1022cbcfbe7535a87055d02aa568 (diff) |
tcolorbox (13mar13)
git-svn-id: svn://tug.org/texlive/trunk@29372 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Master/texmf-dist/doc/latex/tcolorbox/CHANGES | 9 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/tcolorbox/README | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/tcolorbox/tcolorbox-example.pdf | bin | 147400 -> 147400 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/tcolorbox/tcolorbox-example.tex | 4 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.pdf | bin | 1520185 -> 1545348 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.tex | 185 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/tcolorbox/tcbbreakable.code.tex | 14 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/tcolorbox/tcbdocumentation.code.tex | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/tcolorbox/tcblistings.code.tex | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/tcolorbox/tcblistingsutf8.code.tex | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/tcolorbox/tcbskins.code.tex | 20 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/tcolorbox/tcbtheorems.code.tex | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/tcolorbox/tcolorbox.sty | 35 |
13 files changed, 215 insertions, 62 deletions
diff --git a/Master/texmf-dist/doc/latex/tcolorbox/CHANGES b/Master/texmf-dist/doc/latex/tcolorbox/CHANGES index 7b505aac700..eff7b2a76f0 100644 --- a/Master/texmf-dist/doc/latex/tcolorbox/CHANGES +++ b/Master/texmf-dist/doc/latex/tcolorbox/CHANGES @@ -1,4 +1,4 @@ -%% The LaTeX package tcolorbox - version 2.01 (2013/03/07)
+%% The LaTeX package tcolorbox - version 2.02 (2013/03/13)
%%
%% -------------------------------------------------------------------------------------------
%% Copyright (c) 2006-2012 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
@@ -115,3 +115,10 @@ version 2.01 (2013/03/07) 'topsep at break', 'bottomsep at break', 'pad before break',
'pad after break', 'pad at break'
+version 2.02 (2013/03/13)
+- minor bug fix: segmentation line of 'enhanced' now matches 'standard'
+- new macro '\tcbox' to draw a colorbox fitted to the content width
+- new key 'autoparskip' to detect usage of package parskip automatically
+- new key 'nobeforeafter'
+- new macro '\tcbline' in the 'skins' library to draw 'just lines'
+- new key 'colbacktitle' for the 'skins' library
diff --git a/Master/texmf-dist/doc/latex/tcolorbox/README b/Master/texmf-dist/doc/latex/tcolorbox/README index f5e5e6fbf9d..ea80478254d 100644 --- a/Master/texmf-dist/doc/latex/tcolorbox/README +++ b/Master/texmf-dist/doc/latex/tcolorbox/README @@ -1,4 +1,4 @@ -%% The LaTeX package tcolorbox - version 2.01 (2013/03/07) +%% The LaTeX package tcolorbox - version 2.02 (2013/03/13) %% %% ------------------------------------------------------------------------------------------- %% Copyright (c) 2006-2013 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> diff --git a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox-example.pdf b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox-example.pdf Binary files differindex 432f7194929..7bdddd52a23 100644 --- a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox-example.pdf +++ b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox-example.pdf diff --git a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox-example.tex b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox-example.tex index 80aae833f4b..88871ada03d 100644 --- a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox-example.tex +++ b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox-example.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) %% tcolorbox-example.tex: an example for tcolorbox %% %% ------------------------------------------------------------------------------------------- @@ -21,8 +21,6 @@ \usepackage{tikz,lipsum} \usepackage[listings,theorems,skins,breakable]{tcolorbox} -\tcbset{noparskip} - \begin{document} %---------------------------------------------------------- diff --git a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.pdf b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.pdf Binary files differindex ad3fbe01abe..bd14a6815b8 100644 --- a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.pdf +++ b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.pdf diff --git a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.tex b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.tex index 42b21104154..3e850e0e023 100644 --- a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.tex +++ b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.tex @@ -1,5 +1,5 @@ % \LaTeX-Main\ -%% The LaTeX package tcolorbox - version 2.01 (2013/03/07) +%% The LaTeX package tcolorbox - version 2.02 (2013/03/13) %% tcolorbox.tex: Manual %% %% ------------------------------------------------------------------------------------------- @@ -58,7 +58,6 @@ \usepackage{lipsum} \usepackage[listings,theorems,documentation,skins,breakable]{tcolorbox} -%\tcbset{skin=enhanced,breakable} \tcbset{skin=enhanced} \tcbmakedocSubKey{docTcbKey}{tcb} @@ -81,8 +80,8 @@ pdfkeywords={colored boxes, LaTeX examples, theorems} } -\def\version{2.01}% -\def\datum{2013/03/07}% +\def\version{2.02}% +\def\datum{2013/03/13}% \makeindex %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -270,10 +269,13 @@ Here, you see the lower part of the box. \begin{docCommand}{tcblower}{} Used inside \refEnv{tcolorbox} to separate the upper box part from - the optional lower box part. + the optional lower box part. The upper and the lower part are treated + as separate functional units. If you only want to draw a line, see + \refCom{tcbline}. \end{docCommand} +\clearpage \begin{docCommand}{tcbset}{\marg{options}} Sets options for every following \refEnv{tcolorbox} inside the current \TeX\ group. For example, the colors of the boxes may be defined for the whole document by this: @@ -283,6 +285,35 @@ Here, you see the lower part of the box. \end{docCommand} +\begin{docCommand}{tcbox}{\oarg{options}\marg{box content}} + Creates a \refEnv{tcolorbox} which is fitted to the width of the given + \meta{box content}. In principal, most \meta{options} for a \refEnv{tcolorbox} + can be used for |tcbox| with some restrictions. A |tcbox| cannot have + a lower part and cannot be broken. + +\begin{dispExample} +\tcbset{colframe=blue!50!black,colback=white,colupper=red!50!black, + fonttitle=\bfseries,before=,after=} + +\tcbox{Hello World}\hfill +% +\tcbox[left=0mm,right=0mm,top=0mm,bottom=0mm,boxsep=0mm, + toptitle=0.5mm,bottomtitle=0.5mm,title=\centering My table]{% + \arrayrulecolor{blue!50!black}\renewcommand{\arraystretch}{1.2}% + \begin{tabular}{r|c|l} + One & Two & Three \\\hline\hline + Men & Mice & Lions \\\hline + Upper & Middle & Lower + \end{tabular}}\hfill +% +\tcbox[colback=blue!85!black, + left=0mm,right=0mm,top=0mm,bottom=0mm,boxsep=1mm,arc=0mm,boxrule=0.5pt, + title=\centering My picture]{% + \includegraphics[width=5cm]{Basilica_5.png}} +\end{dispExample} +\end{docCommand} + + \clearpage \section{Option Keys}\label{sec:optkeys} For the \meta{options} in \refEnv{tcolorbox} respectively \refCom{tcbset} @@ -580,8 +611,8 @@ This is a \textbf{tcolorbox}. \begin{docTcbKey}{titlerule}{=\meta{length}}{no default, initially \texttt{0.5mm}} Sets the line width of the rule below the title to \meta{length}. \begin{dispExample} -\tcbset{colback=red!5!white,colframe=red!75!black,enhanced, - title style={fill=red!90!black}} +\tcbset{enhanced,colback=red!5!white,colframe=red!75!black, + colbacktitle=red!90!black} \begin{tcolorbox}[titlerule=3mm,title=This is the title] This is a \textbf{tcolorbox}. @@ -1189,22 +1220,30 @@ This is the lower part. {\tcbusetemp} +\clearpage \subsection{Embedding into the Surroundings} -\enlargethispage{5mm} -\begin{docTcbKey}{before}{=\meta{macros}}{no default, initially \cs{par}\cs{pagebreak[0]}\cs{noindent}} +Typically, but not necessarily, a |tcolorbox| is put inside a separate paragraph +and has some vertical space before and after it. +This behavior is controlled by the keys |before| and |after|. + +\begin{docTcbKey}{before}{=\meta{macros}}{no default, initially see \refKey{/tcb/autoparskip}} Sets the \meta{macros} which are executed before the colored box. They are not used for floating boxes. \end{docTcbKey} -\begin{docTcbKey}{after}{=\meta{macros}}{no default, initially \cs{par}} +\begin{docTcbKey}{after}{=\meta{macros}}{no default, initially see \refKey{/tcb/autoparskip}} Sets the \meta{macros} which are executed after the colored box. They are not used for floating boxes. \end{docTcbKey} \begin{docTcbKey}{parskip}{}{style, no value} - Sets the keys |before| and |after| to their default values. - This is recommended, if the package |parskip| is used and there is no better + Sets the keys |before| and |after| to values which are + recommended, if the package |parskip| \emph{is} used and there is no better idea for |before| and |after|. +\begin{dispListing} +\tcbset{parskip/.style={before={\par\pagebreak[0]\noindent}, + after={\par}}} +\end{dispListing} \end{docTcbKey} \begin{docTcbKey}{noparskip}{}{style, no value} @@ -1217,7 +1256,31 @@ This is the lower part. \end{dispListing} \end{docTcbKey} +\begin{docTcbKey}{autoparskip}{}{style, no value, initially set} + Tries to detect the usage of the package |parskip| and sets + the keys |before| and |after| accordingly. Actually, the following is done: + \begin{itemize} + \item If the length of |\parskip| is greater than |0pt| at the begin of the document, + \refKey{/tcb/parskip} is executed. Here, the usage of package |parskip| is \emph{assumed}. + \item Otherwise, if the length of |\parskip| is not greater than |0pt| at the begin of the document, + \refKey{/tcb/noparskip} is executed. Here, the absence of package |parskip| is \emph{assumed}. + \end{itemize} + |autoparskip| is the default for the package |tcolorbox|, if |before| or |after| + are not changed otherwise. +\end{docTcbKey} +\begin{docTcbKey}{nobeforeafter}{}{style, no value} + Abbreviation for clearing the keys |before| and |after|. The colored box + is not put into a paragraph and there is no space before or after the box. +\begin{dispExample} +\tcbset{myone/.style={colback=LightGreen,colframe=DarkGreen, + equal height group=nobefaf,width=\linewidth/4,nobeforeafter}} +\begin{tcolorbox}[myone,title=Box 1]Box 1\end{tcolorbox}% +\begin{tcolorbox}[myone,title=Box 2]Box 2\end{tcolorbox}% +\begin{tcolorbox}[myone,title=Box 3]Box 3\end{tcolorbox}% +\begin{tcolorbox}[myone,title=Box 4]Box 4\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} \clearpage @@ -1352,7 +1415,7 @@ This is a \textbf{tcolorbox}. \begin{dispListing} % \usepackage{lipsum} % preamble -\tcbset{width=(\linewidth-2mm)/2,before=,after=,arc=1mm, +\tcbset{width=(\linewidth-2mm)/2,nobeforeafter,arc=1mm, colframe=blue!75!black,colback=white,fonttitle=\bfseries,fontupper=\small, left=2mm,right=2mm,top=1mm,bottom=1mm,equal height group=parbox} @@ -2765,7 +2828,28 @@ This is the lower part. fonttitle=\bfseries} \begin{tcolorbox}[enhanced,title=My title, - title style={fill=blue!15!yellow}] + title style={left color=blue!15!yellow,right color=red!85!black}] +This is a \textbf{tcolorbox}. +\tcblower +This is the lower part. +\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} + + +\clearpage +\begin{docTcbKey}{colbacktitle}{=\meta{color}}{style, no default, initially unset} + Abbreviation for setting \refKey{/tcb/title style} to |fill=|\meta{color}. + This fills the background of the title area with the given \meta{color}.\\ + This option is available if the \refKey{/tcb/title engine} is set to + |path|, |pathfirst|, |pathmiddle|, or |pathlast|. + It is \emph{not} available for |standard| and it \emph{may} be + applicable for |freelance|. +\begin{dispExample} +\tcbset{colback=red!5!white,colframe=red!75!black,coltitle=blue!50!black, + fonttitle=\bfseries} + +\begin{tcolorbox}[enhanced,title=My title,colbacktitle=yellow!50!white] This is a \textbf{tcolorbox}. \tcblower This is the lower part. @@ -2774,6 +2858,7 @@ This is the lower part. \end{docTcbKey} + \clearpage \subsection{Code Option Keys}\label{subsec:addcodeoptions} The following code options are applicable for all skins which @@ -3024,7 +3109,7 @@ This example uses a public domain picture from\\ Sets the opacity value $\in[0,1]$ for a watermark. \begin{dispExample} \tcbset{enhanced,colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries, - watermark text=Watermark,before=,after=,width=(\linewidth-2mm)/2} + watermark text=Watermark,nobeforeafter,width=(\linewidth-2mm)/2} \begin{tcolorbox}[title=Opacity 1.00,watermark opacity=1.00] \lipsum[2] @@ -3041,7 +3126,7 @@ This example uses a public domain picture from\\ The value $1.0$ means to fill the whole box. \begin{dispExample} \tcbset{enhanced,colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries, - watermark text=Watermark,before=,after=,width=(\linewidth-2mm)/2} + watermark text=Watermark,nobeforeafter,width=(\linewidth-2mm)/2} \begin{tcolorbox}[title=Zoom 1.00,watermark zoom=1.00] \lipsum[2] @@ -3061,7 +3146,7 @@ This example uses a public domain picture from\\ \begin{dispExample} \tcbset{enhanced,colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries, watermark graphics=Basilica_5.png,watermark opacity=0.15, - before=,after=,width=(\linewidth-2mm)/2} + nobeforeafter,width=(\linewidth-2mm)/2} \begin{tcolorbox}[title=Stretch 1.00,watermark stretch=1.00] \lipsum[2] @@ -3125,7 +3210,7 @@ This example uses a public domain picture from\\ \begin{dispExample} \tcbset{standard,equal height group=standard, colback=LightGreen,colframe=DarkGreen,colbacklower=LimeGreen!75!LightGreen, - width=(\linewidth-6mm)/4,before=,after=, + width=(\linewidth-6mm)/4,nobeforeafter, left=1mm,right=1mm,top=1mm,bottom=1mm,middle=1mm} % \begin{tcolorbox} @@ -3186,7 +3271,7 @@ have some 'enhanced' features, the |enhanced| skin is what you are looking for. \begin{dispExample} \tcbset{enhanced,equal height group=enhanced, colback=LightGreen,colframe=DarkGreen,colbacklower=LimeGreen!75!LightGreen, - width=(\linewidth-6mm)/4,before=,after=, + width=(\linewidth-6mm)/4,nobeforeafter, left=1mm,right=1mm,top=1mm,bottom=1mm,middle=1mm} % \begin{tcolorbox} @@ -3239,6 +3324,32 @@ Of course, skins can be used for listings also. \end{tcblisting} \end{dispExample} +\clearpage + + +\begin{docCommand}{tcbline}{} + Sometimes, a line is only a line. With \refCom{tcblower} you separate + the box content into two functional units. |\tcbline| draws only a line + which looks like the segmentation line between upper and lower part. + Furthermore, you can use |\tcbline| more than just once. + |\tcbline| always uses the |path| drawing engine. Therefore, + the \refKey{/tcb/segmentation style} can be applied. + +\begin{dispExample} +\tcbset{enhanced,colframe=blue!50!black,colback=white} + +\begin{tcolorbox}[colupper=red!50!black,collower=green!50!black] +\lipsum[1] +\tcbline +\lipsum[2] +\tcblower +\lipsum[3] +\tcbline +\lipsum[4] +\end{tcolorbox} +\end{dispExample} +\end{docCommand} + \clearpage \begin{docSkin}{enhancedfirst} @@ -3262,7 +3373,7 @@ Nevertheless, this skin can be applied independently. \begin{dispExample} \tcbset{skin=enhancedfirst,equal height group=enhancedfirst, colback=LightGreen,colframe=DarkGreen,colbacklower=LimeGreen!75!LightGreen, - width=(\linewidth-6mm)/4,before=,after=, + width=(\linewidth-6mm)/4,nobeforeafter, left=1mm,right=1mm,top=1mm,bottom=1mm,middle=1mm} % \begin{tcolorbox} @@ -3307,7 +3418,7 @@ Nevertheless, this skin can be applied independently. \begin{dispExample} \tcbset{skin=enhancedmiddle,equal height group=enhancedmiddle, colback=LightGreen,colframe=DarkGreen,colbacklower=LimeGreen!75!LightGreen, - width=(\linewidth-6mm)/4,before=,after=, + width=(\linewidth-6mm)/4,nobeforeafter, left=1mm,right=1mm,top=1mm,bottom=1mm,middle=1mm} % \begin{tcolorbox} @@ -3363,7 +3474,7 @@ Nevertheless, this skin can be applied independently. \begin{dispExample} \tcbset{skin=enhancedlast,equal height group=enhancedlast, colback=LightGreen,colframe=DarkGreen,colbacklower=LimeGreen!75!LightGreen, - width=(\linewidth-6mm)/4,before=,after=, + width=(\linewidth-6mm)/4,nobeforeafter, left=1mm,right=1mm,top=1mm,bottom=1mm,middle=1mm} % \begin{tcolorbox} @@ -3418,7 +3529,7 @@ Nevertheless, this skin can be applied independently. \begin{dispExample} \tcbset{freelance,equal height group=freelance, colback=LightGreen,colframe=DarkGreen,colbacklower=LimeGreen!75!LightGreen, - width=(\linewidth-6mm)/4,before=,after=, + width=(\linewidth-6mm)/4,nobeforeafter, left=1mm,right=1mm,top=1mm,bottom=1mm,middle=1mm} % \begin{tcolorbox} @@ -3517,7 +3628,7 @@ Nevertheless, this skin can be applied independently. \begin{dispExample} \tcbset{bicolor,equal height group=bicolor, colback=LightGreen,colframe=DarkGreen,colbacklower=LimeGreen!75!LightGreen, - width=(\linewidth-6mm)/4,before=,after=, + width=(\linewidth-6mm)/4,nobeforeafter, left=1mm,right=1mm,top=1mm,bottom=1mm,middle=1mm} % \begin{tcolorbox} @@ -3587,7 +3698,7 @@ Nevertheless, this skin can be applied independently. \begin{dispExample} \tcbset{skin=bicolorfirst,equal height group=bicolorfirst, colback=LightGreen,colframe=DarkGreen,colbacklower=LimeGreen!75!LightGreen, - width=(\linewidth-6mm)/4,before=,after=, + width=(\linewidth-6mm)/4,nobeforeafter, left=1mm,right=1mm,top=1mm,bottom=1mm,middle=1mm} % \begin{tcolorbox} @@ -3631,7 +3742,7 @@ Nevertheless, this skin can be applied independently. \begin{dispExample} \tcbset{skin=bicolormiddle,equal height group=bicolormiddle, colback=LightGreen,colframe=DarkGreen,colbacklower=LimeGreen!75!LightGreen, - width=(\linewidth-6mm)/4,before=,after=, + width=(\linewidth-6mm)/4,nobeforeafter, left=1mm,right=1mm,top=1mm,bottom=1mm,middle=1mm} % \begin{tcolorbox} @@ -3675,7 +3786,7 @@ Nevertheless, this skin can be applied independently. \begin{dispExample} \tcbset{skin=bicolorlast,equal height group=bicolorlast, colback=LightGreen,colframe=DarkGreen,colbacklower=LimeGreen!75!LightGreen, - width=(\linewidth-6mm)/4,before=,after=, + width=(\linewidth-6mm)/4,nobeforeafter, left=1mm,right=1mm,top=1mm,bottom=1mm,middle=1mm} % \begin{tcolorbox} @@ -3737,7 +3848,7 @@ cannot be controlled by a style. \begin{dispExample} \tcbset{beamer,equal height group=beamer, colback=LightGreen,colframe=DarkGreen,colbacklower=LimeGreen!75!LightGreen, - width=(\linewidth-6mm)/4,before=,after=, + width=(\linewidth-6mm)/4,nobeforeafter, left=1mm,right=1mm,top=1mm,bottom=1mm,middle=1mm} % \begin{tcolorbox} @@ -3791,7 +3902,7 @@ Nevertheless, this skin can be applied independently. \begin{dispExample} \tcbset{beamer,skin=beamerfirst,equal height group=beamerfirst, colback=LightGreen,colframe=DarkGreen,colbacklower=LimeGreen!75!LightGreen, - width=(\linewidth-6mm)/4,before=,after=, + width=(\linewidth-6mm)/4,nobeforeafter, left=1mm,right=1mm,top=1mm,bottom=1mm,middle=1mm} % \begin{tcolorbox} @@ -3836,7 +3947,7 @@ Nevertheless, this skin can be applied independently. \begin{dispExample} \tcbset{beamer,skin=beamermiddle,equal height group=beamermiddle, colback=LightGreen,colframe=DarkGreen,colbacklower=LimeGreen!75!LightGreen, - width=(\linewidth-6mm)/4,before=,after=, + width=(\linewidth-6mm)/4,nobeforeafter, left=1mm,right=1mm,top=1mm,bottom=1mm,middle=1mm} % \begin{tcolorbox} @@ -3879,7 +3990,7 @@ Nevertheless, this skin can be applied independently. \begin{dispExample} \tcbset{beamer,skin=beamerlast,equal height group=beamerlast, colback=LightGreen,colframe=DarkGreen,colbacklower=LimeGreen!75!LightGreen, - width=(\linewidth-6mm)/4,before=,after=, + width=(\linewidth-6mm)/4,nobeforeafter, left=1mm,right=1mm,top=1mm,bottom=1mm,middle=1mm} % \begin{tcolorbox} @@ -3937,7 +4048,7 @@ if needed. \begin{dispExample} \tcbset{widget,equal height group=widget, colback=LightGreen,colframe=DarkGreen,colbacklower=LimeGreen!75!LightGreen, - width=(\linewidth-6mm)/4,before=,after=, + width=(\linewidth-6mm)/4,nobeforeafter, left=1mm,right=1mm,top=1mm,bottom=1mm,middle=1mm} % \begin{tcolorbox} @@ -3989,7 +4100,7 @@ Nevertheless, this skin can be applied independently. \begin{dispExample} \tcbset{widget,skin=widgetfirst,equal height group=widgetfirst, colback=LightGreen,colframe=DarkGreen,colbacklower=LimeGreen!75!LightGreen, - width=(\linewidth-6mm)/4,before=,after=, + width=(\linewidth-6mm)/4,nobeforeafter, left=1mm,right=1mm,top=1mm,bottom=1mm,middle=1mm} % \begin{tcolorbox} @@ -4032,7 +4143,7 @@ Nevertheless, this skin can be applied independently. \begin{dispExample} \tcbset{widget,skin=widgetmiddle,equal height group=widgetmiddle, colback=LightGreen,colframe=DarkGreen,colbacklower=LimeGreen!75!LightGreen, - width=(\linewidth-6mm)/4,before=,after=, + width=(\linewidth-6mm)/4,nobeforeafter, left=1mm,right=1mm,top=1mm,bottom=1mm,middle=1mm} % \begin{tcolorbox} @@ -4076,7 +4187,7 @@ Nevertheless, this skin can be applied independently. \begin{dispExample} \tcbset{widget,skin=widgetlast,equal height group=widgetlast, colback=LightGreen,colframe=DarkGreen,colbacklower=LimeGreen!75!LightGreen, - width=(\linewidth-6mm)/4,before=,after=, + width=(\linewidth-6mm)/4,nobeforeafter, left=1mm,right=1mm,top=1mm,bottom=1mm,middle=1mm} % \begin{tcolorbox} @@ -4126,7 +4237,7 @@ Nevertheless, this skin can be applied independently. \begin{dispExample} \tcbset{draft,equal height group=draft, colback=LightGreen,colframe=DarkGreen,colbacklower=LimeGreen!75!LightGreen, - width=(\linewidth-6mm)/4,before=,after=, + width=(\linewidth-6mm)/4,nobeforeafter, left=1mm,right=1mm,top=1mm,bottom=1mm,middle=1mm} % \begin{tcolorbox} @@ -4463,7 +4574,7 @@ all. \begin{dispExample} \tcbset{enhanced,equal height group=fakedbreak, colback=LightGreen,colframe=DarkGreen,colbacklower=LimeGreen!75!LightGreen, - width=(\linewidth-6mm)/3,before=,after=, + width=(\linewidth-6mm)/3,nobeforeafter, left=1mm,right=1mm,top=1mm,bottom=1mm,middle=1mm} % \begin{tcolorbox}[title=My broken box,skin=enhancedfirst] 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 |