diff options
Diffstat (limited to 'macros/latex/contrib/tcolorbox/tcolorbox.sty')
-rw-r--r-- | macros/latex/contrib/tcolorbox/tcolorbox.sty | 72 |
1 files changed, 58 insertions, 14 deletions
diff --git a/macros/latex/contrib/tcolorbox/tcolorbox.sty b/macros/latex/contrib/tcolorbox/tcolorbox.sty index a5f9d23397..9dc3606c0e 100644 --- a/macros/latex/contrib/tcolorbox/tcolorbox.sty +++ b/macros/latex/contrib/tcolorbox/tcolorbox.sty @@ -1,8 +1,8 @@ -%% The LaTeX package tcolorbox - version 4.42 (2020/10/09) +%% The LaTeX package tcolorbox - version 4.50 (2021/05/21) %% tcolorbox.sty: Text color boxes %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2006-2020 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> +%% Copyright (c) 2006-2021 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> %% ------------------------------------------------------------------------------------------- %% %% This work may be distributed and/or modified under the @@ -18,8 +18,8 @@ %% This work consists of all files listed in README %% \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{tcolorbox}[2020/10/09 version 4.42 text color boxes] -\def\tcb@version{4.42} +\ProvidesPackage{tcolorbox}[2021/05/21 version 4.50 text color boxes] +\def\tcb@version{4.50} \RequirePackage{pgf}[2008/01/15] \RequirePackage{verbatim}[2003/08/22] @@ -2105,19 +2105,57 @@ \newcommand*\l@tcolorbox{\@dottedtocline{1}{1.5em}{2.3em}} -\newcommand{\tcblistof}[3][\section]{% - \ifnum\c@tocdepth<1\relax% - \tcb@warning{'tocdepth' value lower than 1 for 'tcblistof'}% - \fi% - #1{#3}% - \@starttoc{#2}% -} - +\ExplSyntaxOn +\NewDocumentCommand{\tcblistof}{ O{\section} m o m } + { + \ifnum\c@tocdepth<1\relax + \tcb@warning{'tocdepth'~value~lower~than~1~for~'tcblistof'} + \fi + \tl_set:Nx \l_tmpa_tl {\tl_trim_spaces:n{#1}} + \tl_set:Nx \l_tmpb_tl {\str_range:Nnn \l_tmpa_tl {2}{8}} + \str_if_eq:VnT \l_tmpb_tl { chapter } + { + \if@twocolumn + \@restonecoltrue\onecolumn + \else + \@restonecolfalse + \fi + } + \tl_set:Nx \l_tmpa_tl {\str_item:Nn \l_tmpa_tl {-1}} + \str_if_eq:VnTF \l_tmpa_tl { * } + { + #1{#4} + \IfNoValueTF{#3} + { + \@mkboth{\MakeUppercase{#4}} + {\MakeUppercase{#4}} + } + { + \@mkboth{\MakeUppercase{#3}} + {\MakeUppercase{#3}} + } + } + { + \IfNoValueTF{#3} + { + #1{#4} + } + { + #1[#3]{#4} + } + } + \@starttoc{#2} + \if@restonecol\twocolumn\fi + } +\ExplSyntaxOff % verbatim output as in 'verbatim' -\newwrite\tcb@out +\def\tcb@allocate@tcb@out{% + \newwrite\tcb@out% + \xdef\tcb@allocate@tcb@out{}% +} \let\tcb@verbatim@begin@hook\@empty \let\tcb@verbatim@end@hook\@empty @@ -2125,6 +2163,7 @@ \def\tcbverbatimwrite#1{% \@bsphack + \tcb@allocate@tcb@out% \immediate\openout\tcb@out #1 \tcb@verbatim@begin@hook% \let\do\@makeother\dospecials @@ -2185,7 +2224,11 @@ % recording -\newwrite\tcb@record@out +\def\tcb@allocate@tcb@record@out{% + \newwrite\tcb@record@out% + \xdef\tcb@allocate@tcb@out{}% +} + \def\tcb@null#1{} \newcommand{\tcb@record}[1]{\immediate\write\tcb@record@out{#1}} @@ -2193,6 +2236,7 @@ \newcommand{\tcbstartrecording}[1][\jobname.records]{% \let\tcbrecord\tcb@record% \edef\tcb@record@file{#1}% + \tcb@allocate@tcb@record@out% \immediate\openout\tcb@record@out\tcb@record@file% } |