diff options
Diffstat (limited to 'macros/latex')
59 files changed, 1063 insertions, 546 deletions
diff --git a/macros/latex/contrib/ffcode/DEPENDS.txt b/macros/latex/contrib/ffcode/DEPENDS.txt index d55ae167dd..2b69ddd2b9 100644 --- a/macros/latex/contrib/ffcode/DEPENDS.txt +++ b/macros/latex/contrib/ffcode/DEPENDS.txt @@ -1,3 +1,20 @@ +hard listings hard pgfopts -hard minted hard tcolorbox +soft docshots +soft environ +soft href-ul +soft hypdoc +soft iexec +soft l3build +soft libertine +soft mathtools +soft microtype +soft pdfcrop +soft pgf +soft pgfopts +soft scheme-basic +soft tools +soft xetex +soft fvextra +soft upquote
\ No newline at end of file diff --git a/macros/latex/contrib/ffcode/LICENSE.txt b/macros/latex/contrib/ffcode/LICENSE.txt index bd949ffdab..1f211e0287 100644 --- a/macros/latex/contrib/ffcode/LICENSE.txt +++ b/macros/latex/contrib/ffcode/LICENSE.txt @@ -1,6 +1,6 @@ (The MIT License) -Copyright (c) 2021-2022 Yegor Bugayenko +Copyright (c) 2021-2024 Yegor Bugayenko Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal diff --git a/macros/latex/contrib/ffcode/README.md b/macros/latex/contrib/ffcode/README.md index f62fa0aa99..36252a3dfa 100644 --- a/macros/latex/contrib/ffcode/README.md +++ b/macros/latex/contrib/ffcode/README.md @@ -3,7 +3,7 @@ [![License](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/yegor256/ffcode/blob/master/LICENSE.txt) This LaTeX package helps you write source code in your academic papers -and make sure it looks neat. The package uses [`minted`](https://ctan.org/pkg/minted) +and make sure it looks neat. The package uses [`listings`](https://ctan.org/pkg/listings) and [`tcolorbox`](https://ctan.org/pkg/tcolorbox) packages. First, [install it](https://en.wikibooks.org/wiki/LaTeX/Installing_Extra_Packages) @@ -23,7 +23,7 @@ void r() { \end{document} ``` -Otherwise, you can download [`ffcode.sty`](https://raw.githubusercontent.com/yegor256/ffcode/gh-pages/ffcode/ffcode.sty) and add to your project. +Otherwise, you can download [`ffcode.sty`](https://yegor256.github.io/ffcode/ffcode.sty) and add to your project. If you want to contribute yourself, make a fork, then create a branch, then run `l3build ctan` in the root directory. diff --git a/macros/latex/contrib/ffcode/ffcode.dtx b/macros/latex/contrib/ffcode/ffcode.dtx index e8c71aa8ed..ffd57f6d02 100644 --- a/macros/latex/contrib/ffcode/ffcode.dtx +++ b/macros/latex/contrib/ffcode/ffcode.dtx @@ -1,7 +1,7 @@ % \iffalse meta-comment % (The MIT License) % -% Copyright (c) 2021-2022 Yegor Bugayenko +% Copyright (c) 2021-2024 Yegor Bugayenko % % Permission is hereby granted, free of charge, to any person obtaining a copy % of this software and associated documentation files (the 'Software'), to deal @@ -50,7 +50,7 @@ %<package>\NeedsTeXFormat{LaTeX2e} %<package>\ProvidesPackage{ffcode} %<*package> -[2022-12-02 0.8.0 Fixed Font Code] +[2024-01-10 0.9.0 Fixed Font Code] %</package> %<*driver> \documentclass{ltxdoc} @@ -97,7 +97,7 @@ % \begin{ffcode} % int fibo(int n) { % if (n < 2) { -% return n; |\label{ln:ret}| +% return n; (*@ \label{ln:ret} @*) % } % return fibo(n-1)+fibo(n-2); % } @@ -109,12 +109,6 @@ % \section{Package Options} -% \DescribeMacro{nopygments} -% You have to run |pdflatex| with |--shell-escape| flag -% in order to let |minted| (the package we use) to run Pygments -% and format the code. If you don't want this to happen, -% just use |nopygments| option. - % \DescribeMacro{noframes} % If you want to omit the light gray frames around |\ff| % texts, use the package option |noframes|. @@ -194,7 +188,7 @@ % You can highlight some lines in your |ffcode| environment, % or can use any other additional configuration parameters from -% |minted| package: +% |fancyvrb| and |fvextra| packages: % \docshotOptions{firstline=6,lastline=13} % \begin{docshot} % \documentclass{article} @@ -202,19 +196,19 @@ % \usepackage{ffcode} % \pagestyle{empty} % \begin{document} -% \begin{ffcode*}{highlightlines={1,4-5}} +% \begin{ffcode}[backgroundcolor=\color{gray!20}] % while (true) { -% print("Hello!") +% (*@\textcolor{red}{print("Hi!")}@*) % print("Enter your name:") % scan(x) -% print("You name is " + x) +% print("You name | " + x) % } -% \end{ffcode*} +% \end{ffcode} % \end{document} % \end{docshot} -% Using this second argument of |ffcode*| (with the trailing asterisk), -% you can provide any other options from |minted| package to the +% Using this second argument of |ffcode|, +% you can provide any other options from the |listings| package to the % snippet. % \StopEventually{} @@ -237,7 +231,6 @@ /ff/.cd, bold/.store in=\ff@bold, sf/.store in=\ff@sf, - nopygments/.store in=\ff@nopygments, noframes/.store in=\ff@noframes, nonumbers/.store in=\ff@nonumbers, nobars/.store in=\ff@nobars, @@ -247,59 +240,33 @@ \ProcessPgfPackageOptions{/ff} % \end{macrocode} -% Then, we disable pygments for \href{https://ctan.org/pkg/minted}{minted}, if necessary: -% \begin{macrocode} -\makeatletter\ifdefined\ff@nopygments - \PassOptionsToPackage{draft=true}{minted} -\fi\makeatother -% \end{macrocode} - -% Then, we configure \href{https://ctan.org/pkg/minted}{minted} package: +% Then, we configure the \href{https://ctan.org/pkg/listings}{listings} package: +% \changes{v0.9.0}{2024/01/09}{The \texttt{minted} package is replaced by the \texttt{listings} package.} % \begin{macrocode} -\RequirePackage{minted} -\setminted{breaklines} -\setminted{escapeinside=||,mathescape} -\setminted{highlightcolor=gray!25} -\usemintedstyle{bw} +\RequirePackage{xcolor} +\RequirePackage{listings} % \end{macrocode} % \begin{macro}{ffcode} -% Then, we define |ffcode| environment: +% Then, we define the |ffcode| environment and its supplementary |ffcode*| counterpart: % \begin{macrocode} -\makeatletter\ifdefined\ff@nonumbers - \ifdefined\ff@nobars - \newminted[ffcode]{text}{} - \else - \newminted[ffcode]{text}{framesep=6pt, - framerule=1pt,rulecolor=gray,frame=leftline} - \fi -\else - \renewcommand{\theFancyVerbLine}{\textcolor{gray}% - {\tiny\oldstylenums{\ttfamily\arabic{FancyVerbLine}}}} - \ifdefined\ff@nocn - \ifdefined\ff@nobars - \newminted[ffcode]{text}{ - linenos,numbersep=2pt - } - \else - \newminted[ffcode]{text}{ - framesep=6pt,framerule=1pt,rulecolor=gray, - frame=leftline,linenos,numbersep=2pt - } - \fi - \else - \ifdefined\ff@nobars - \newminted[ffcode]{text}{ - firstnumber=last,linenos,numbersep=2pt - } - \else - \newminted[ffcode]{text}{ - framesep=6pt,framerule=1pt,rulecolor=gray, - frame=leftline,firstnumber=last,linenos,numbersep=2pt - } +\makeatletter +\lstnewenvironment{ffcode}[1][] + { + \lstset{breaklines} + \lstset{escapeinside={(*@}{@*)}} + \lstset{basicstyle={\ttfamily}} + \lstset{columns=fullflexible} + \ifdefined\ff@nonumbers\else + \lstset{numbers=left,numbersep=5pt,numberstyle={\tiny\sffamily\color{gray}}} \fi - \fi -\fi\makeatother + \ifdefined\ff@nobars\else + \lstset{frame=leftline,framerule=.3pt,rulecolor={\color{gray}}} + \ifdefined\ff@nocn\else\fi + \lstset{#1} + } + {} +\makeatother % \end{macrocode} % \end{macro} diff --git a/macros/latex/contrib/ffcode/ffcode.ins b/macros/latex/contrib/ffcode/ffcode.ins index 9e7c56593e..4e64b55d73 100644 --- a/macros/latex/contrib/ffcode/ffcode.ins +++ b/macros/latex/contrib/ffcode/ffcode.ins @@ -1,6 +1,6 @@ %% (The MIT License) %% -%% Copyright (c) 2021-2022 Yegor Bugayenko +%% Copyright (c) 2021-2024 Yegor Bugayenko %% %% Permission is hereby granted, free of charge, to any person obtaining a copy %% of this software and associated documentation files (the 'Software'), to deal @@ -26,7 +26,7 @@ \preamble (The MIT License) -Copyright (c) 2021-2022 Yegor Bugayenko +Copyright (c) 2021-2024 Yegor Bugayenko Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal diff --git a/macros/latex/contrib/ffcode/ffcode.pdf b/macros/latex/contrib/ffcode/ffcode.pdf Binary files differindex 81e04f3bf7..5729a423d3 100644 --- a/macros/latex/contrib/ffcode/ffcode.pdf +++ b/macros/latex/contrib/ffcode/ffcode.pdf diff --git a/macros/latex/contrib/physics2/phy2docdef.tex b/macros/latex/contrib/physics2/phy2docdef.tex index 2590823097..8344bec709 100644 --- a/macros/latex/contrib/physics2/phy2docdef.tex +++ b/macros/latex/contrib/physics2/phy2docdef.tex @@ -64,7 +64,7 @@ \newenvironment{example} {\stepcounter{example}\example@start}{\example@end} \author{Zhang Tingxuan} -\date{2023/10/24\quad Version 1.0.0\thanks{% +\date{2024/01/10\quad Version 1.0.1\thanks{% \url{https://www.github.com/AlphaZTX/physics2}}} \makeatother \endinput diff --git a/macros/latex/contrib/physics2/physics2-code.dtx b/macros/latex/contrib/physics2/physics2-code.dtx index f83913530f..8f7beb9d90 100644 --- a/macros/latex/contrib/physics2/physics2-code.dtx +++ b/macros/latex/contrib/physics2/physics2-code.dtx @@ -150,7 +150,7 @@ The Current Maintainer of this work is %</internal> % %<*driver> -\ProvidesFile{fixdif.dtx}[2023/03/20 (c) Copyright 2022-2023 by Zhang Tingxuan] +\ProvidesFile{fixdif.dtx}[2024/01/10 (c) Copyright 2022-2024 by Zhang Tingxuan] \documentclass{l3doc} \usepackage{doc} \hypersetup{hidelinks} @@ -208,7 +208,7 @@ The Current Maintainer of this work is \makeatother \title{Code documentation to the \pkg{physics2} package} \author{Zhang Tingxuan} -\date{2023/10/24 v1.0.0} +\date{2024/01/10 v1.0.1} \begin{document} \DocInput{physics2-code.dtx} \end{document} @@ -226,12 +226,12 @@ The Current Maintainer of this work is %<*package> \NeedsTeXFormat{LaTeX2e}[2020/10/01] \ProvidesPackage{physics2} - [2023/10/24 v1.0.0 Tools for typesetting math for physics.] + [2024/01/10 v1.0.1 Tools for typesetting math for physics.] % \end{macrocode} % \subsection{Common variables} % \begin{variable}{\phy@temp..} % \begin{syntax} -% \cs{phy@temp}\meta{register type}\meta{a|b|c} +% \cs{phy@temp}\meta{register type}\meta{a or b} % \end{syntax} % Some \LaTeXe\ variables starting with ``|\phy@temp|''. % These variables can be shared by any module of \pkg{physics2}. @@ -920,7 +920,7 @@ The Current Maintainer of this work is % \section{The \modu{diagmat} module} % \begin{macrocode} %<*diagmat> -\ProvidesExplFile{phy-diagmat.sty}{2023/10/24}{} +\ProvidesExplFile{phy-diagmat.sty}{2024/01/10}{} {`diagmat' module of physics2} \RequirePackage { amsmath } \phy@define@key { diagmat } { empty } [ 0 ] { \tl_gset:Nn \l_@@_mat_empty_tl { #1 } } @@ -928,9 +928,6 @@ The Current Maintainer of this work is % This module requires some new variables. % \begin{macrocode} \clist_new:N \l_@@_mat_diag_clist -\clist_new:N \l_@@_mat_tmpa_clist -\clist_new:N \l_@@_mat_tmpb_clist -\clist_new:N \l_@@_mat_diagpos_clist \int_new:N \l_@@_mat_dim_int \tl_new:N \l_@@_mat_line_tl \tl_new:N \l_@@_diagmat_tl @@ -976,22 +973,22 @@ The Current Maintainer of this work is { \setcounter { MaxMatrixCols } { \l_@@_mat_dim_int } } \keys_set:nn { phy/diagmat } { #2 } \tl_gclear:N \l_@@_diagmat_tl - \int_step_inline:nnn { 0 } { \l_@@_mat_dim_int - 1 } + \int_step_inline:nnn { 1 } { \l_@@_mat_dim_int } { - \int_step_inline:nnn { 0 } { \l_@@_mat_dim_int - 1 } + \int_step_inline:nnn { 1 } { \l_@@_mat_dim_int } { \int_compare:nNnTF { ##1 } = { ####1 } { \clist_gpop:NN \l_@@_mat_diag_clist \l_@@_tmpa_tl \tl_if_empty:NTF \l_@@_tmpa_tl { \tl_gput_right:Nn \l_@@_mat_line_tl { \l_@@_mat_empty_tl } } - { \tl_gput_right:Nx \l_@@_mat_line_tl { \l_@@_tmpa_tl } } - } - { \tl_gput_right:Nn \l_@@_mat_line_tl { \l_@@_mat_empty_tl } } % \end{macrocode} -% Add |&| (or |\\|) between matrix entries. +% Maybe it's better to use \verb|\expandafter\scantokens\expandafter{\l_@@_tmpa_tl}| in the next line. % \begin{macrocode} - \int_compare:nNnTF { ####1 } = { \l_@@_mat_dim_int - 1 } + { \tl_gput_right:No \l_@@_mat_line_tl { \l_@@_tmpa_tl } } + } + { \tl_gput_right:Nn \l_@@_mat_line_tl { \l_@@_mat_empty_tl } } + \int_compare:nNnTF { ####1 } = { \l_@@_mat_dim_int } { \tl_gput_right:Nn \l_@@_mat_line_tl { \\ } } @@ -999,7 +996,7 @@ The Current Maintainer of this work is \tl_gput_right:Nn \l_@@_mat_line_tl { & } } } - \tl_gput_right:Nx \l_@@_diagmat_tl { \l_@@_mat_line_tl } + \tl_gput_right:No \l_@@_diagmat_tl { \l_@@_mat_line_tl } \tl_gclear:N \l_@@_mat_line_tl } \begin { #1 matrix } diff --git a/macros/latex/contrib/physics2/physics2-code.pdf b/macros/latex/contrib/physics2/physics2-code.pdf Binary files differindex ea4d90cd31..adfcb254ec 100644 --- a/macros/latex/contrib/physics2/physics2-code.pdf +++ b/macros/latex/contrib/physics2/physics2-code.pdf diff --git a/macros/latex/contrib/physics2/physics2-legacy.pdf b/macros/latex/contrib/physics2/physics2-legacy.pdf Binary files differindex 5406b3d748..03a8dc1377 100644 --- a/macros/latex/contrib/physics2/physics2-legacy.pdf +++ b/macros/latex/contrib/physics2/physics2-legacy.pdf diff --git a/macros/latex/contrib/physics2/physics2.pdf b/macros/latex/contrib/physics2/physics2.pdf Binary files differindex d8a1f3a376..d98b1502d6 100644 --- a/macros/latex/contrib/physics2/physics2.pdf +++ b/macros/latex/contrib/physics2/physics2.pdf diff --git a/macros/latex/contrib/physics2/physics2.tex b/macros/latex/contrib/physics2/physics2.tex index c643ab72f9..02458f4cc0 100644 --- a/macros/latex/contrib/physics2/physics2.tex +++ b/macros/latex/contrib/physics2/physics2.tex @@ -169,6 +169,19 @@ Always remember, do not put an \cs{ab} separately at the end of math mode like \verb|$\ab$|, because \cs{ab} will try to absorb the following math shift character (\verb|$|) as its argument. +\pardanger +\textbf{Important Note:} The \modu{ab} module uses ``document commands'' +module of \LaTeXe{} kernel (source file: ltcmd.dtx). This \LaTeXe{} kernel +module provides a document-level command parser. \cs{ab} is a complex +encapsulation of some internal document-level commands. Take an example, +if you define a document-level command like this: +\begin{Verbatim} +\NewDocumentCommand \foo { r() } {::#1::} +\end{Verbatim} +You can write \verb|\foo(bar)| legally, but \verb|\foo(()| will be regarded +illegal when you write another document-level command or end the paragraph. +Similarly, things like \verb|\ab(()| will also cause errors. + The \modu{ab} module also provides \texttt{\textbackslash}$X$\texttt{ab} commands, where $X$ can be \opt{p}, \opt{b}, \opt{B}, \opt{a}, \opt{v} and \opt{V}. These commands take a normal argument but not an argument delimited @@ -266,6 +279,18 @@ is almost no such need). It is quite different from \verb|\mathrel{>}| or \verb|\mathrel{<}| because in these commands' argument, \opt{>} and \opt{<} will be redefined. +\pardanger +\textbf{Important Notes:} Commands provided by \modu{ab.braket} should NOT +be placed barely in \meta{subformula} of \cs{ab}\texttt|\meta{subformula}\texttt|. +Errors will arise if you write such code. To avoid the errors, you can write +like this: +\begin{example} +\[ + \ab| { \braket<\psi|\hat H|\psi> } | +\] +\end{example} +Just add the braces. + Next, the \modu{braket} module will be introduced. Please notice that \modu{braket} is conflict with \modu{ab.braket}, they cannot be used together. @@ -338,7 +363,7 @@ be separated by commas. The \opt{empty} option is optional, with default value \opt{0}. For example, \begin{example} \[ - \diagmat { 1, 2, 3 } + \diagmat { 1, \sqrt2, \sqrt[3]4 } \] \end{example} \cs{pdiagmat}, \cs{bdiagmat}, \cs{Bdiagmat}, \cs{vdiagmat} and \cs{Vdiagmat} @@ -570,6 +595,7 @@ redefine \cs{Re} and \cs{Im}. If you want to reserve the definition of \subsection{The \modu{qtext.legacy} module} This module was written just to offer a method to maintain documents written with the legacy \pkg{physics} package. See \S\ref*{lega-subsec:qtext} of -\href{./physics2-legacy.pdf}{physics2-legacy} for more information. +\href{./physics2-legacy.pdf}{\texttt{texdoc physics2-legacy}} for +more information. \end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tcolorbox/CHANGES.md b/macros/latex/contrib/tcolorbox/CHANGES.md index dc5f00c259..5aaa4f6f21 100644 --- a/macros/latex/contrib/tcolorbox/CHANGES.md +++ b/macros/latex/contrib/tcolorbox/CHANGES.md @@ -22,6 +22,64 @@ and this project adheres to +## [6.2.0] + +### Added +- New convenience options for box content additions (issue #250) + - Option `environment upper` + - Option `environment upper args` + - Option `environment lower` + - Option `environment lower args` + - Option `environment title` + - Option `environment title args` +- Library `hooks`: + - Option `environment upper app` + - Option `environment upper args app` + - Option `environment lower app` + - Option `environment lower args app` + - Option `environment title app` + - Option `environment title args app` + - Option `environment upper pre` + - Option `environment upper args pre` + - Option `environment lower pre` + - Option `environment lower args pre` + - Option `environment title pre` + - Option `environment title args pre` +- Library `documentation`: + - Option `index key formatter` + - Option `index keys formatter` + - Root (`/`) of a documented key made configurable (issue #259): + - Option `doc key prefix` + +### Changed +- Minor implementation change to `redirectlowerto` (issue #240) +- `pgfkeys` mentioned in the documentation (issue #241) +- Distinct `savelowerto`/`redirectlowerto` file names inside the documentation (issue #248) +- Updated documentation and warnings for the interaction between `saveto` + and `savelowerto` (issue #249) +- Improved some `\sarg` examples in the documentation (issue #256) +- Small typos in the documentation (issue #261) +- Recording macros rewritten in expl3 code (part of issue #255) +- Usage of expl3 scratch variables like `\l_tmpa_tl` replaced by package variables like `\l__tcobox_tmpa_tl` +- Library `documentation`: + - Expl3 arg-spec of internal macro corrected (issue #257) + - `\tcbmakedocSubKey` and `\tcbmakedocSubKeys` take options now (issue #259) +- Library `external`: package loading of `pdftexcmds` and `shellesc` removed. + Expl3 functions are used as drop-in replacements (part of issue #255) +- Libraries `listings`, `listingsutf8`, and `minted`: + package loading of `pdftexcmds` and `shellesc` removed (part of issue #255) +- Needed LaTeX version updated to 2021-11-15 + +### Removed +- Loading of the `xparse` library dropped inside the `documentation` library since all + needed features are part of the LaTeX format now (issue #254) + +### Fixed +- Several documentation typos and minor improvements (PR/issue #251 and PR/issue #252) +- Extra top space if `parbox=false` and tcolorbox starts with a list (issue #262) + + + ## [6.1.0] - 2023-09-26 ### Added diff --git a/macros/latex/contrib/tcolorbox/README.md b/macros/latex/contrib/tcolorbox/README.md index 8700b6c322..27f6edf11d 100644 --- a/macros/latex/contrib/tcolorbox/README.md +++ b/macros/latex/contrib/tcolorbox/README.md @@ -1,7 +1,7 @@ -# The LaTeX package tcolorbox - version 6.1.0 (2023/09/26) +# The LaTeX package tcolorbox - version 6.2.0 (2024/01/10) -> Copyright (c) 2006-2023 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> +> Copyright (c) 2006-2024 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 diff --git a/macros/latex/contrib/tcolorbox/tcbbreakable.code.tex b/macros/latex/contrib/tcolorbox/tcbbreakable.code.tex index cd9e6961b2..90ece8e5a5 100644 --- a/macros/latex/contrib/tcolorbox/tcbbreakable.code.tex +++ b/macros/latex/contrib/tcolorbox/tcbbreakable.code.tex @@ -1,8 +1,8 @@ -%% The LaTeX package tcolorbox - version 6.1.0 (2023/09/26) +%% The LaTeX package tcolorbox - version 6.2.0 (2024/01/10) %% tcbbreakable.code.tex: Code for breakable colorboxes %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2006-2023 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> +%% Copyright (c) 2006-2024 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> %% ------------------------------------------------------------------------------------------- %% %% This work may be distributed and/or modified under the @@ -17,7 +17,7 @@ %% %% This work consists of all files listed in README %% -\tcb@set@library@version{6.1.0} +\tcb@set@library@version{6.2.0} \RequirePackage{pdfcol} \pdfcolInitStack{tcb@breakable} diff --git a/macros/latex/contrib/tcolorbox/tcbdocumentation.code.tex b/macros/latex/contrib/tcolorbox/tcbdocumentation.code.tex index f0463342ce..3eff9746f8 100644 --- a/macros/latex/contrib/tcolorbox/tcbdocumentation.code.tex +++ b/macros/latex/contrib/tcolorbox/tcbdocumentation.code.tex @@ -1,8 +1,8 @@ -%% The LaTeX package tcolorbox - version 6.1.0 (2023/09/26) +%% The LaTeX package tcolorbox - version 6.2.0 (2024/01/10) %% tcbdocumentation.code.tex: Code for LaTeX documentations %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2006-2023 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> +%% Copyright (c) 2006-2024 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> %% ------------------------------------------------------------------------------------------- %% %% This work may be distributed and/or modified under the @@ -17,9 +17,9 @@ %% %% This work consists of all files listed in README %% -\tcb@set@library@version{6.1.0} +\tcb@set@library@version{6.2.0} -\tcbuselibrary{listings,skins,xparse,external,raster} +\tcbuselibrary{listings,skins,external,raster} \ifdefined\printindex\else% \RequirePackage{makeidx}[2000/03/29]% @@ -198,6 +198,11 @@ keywords bold/.default=true,% keywords bold/true/.code={\let\tcb@doc@bfseries\bfseries}, keywords bold/false/.code={\let\tcb@doc@bfseries\mdseries}, + doc key prefix/.store in=\kvtcb@doc@keyprefix, + index key formatter/.code={\let\kvtcb@doc@format@key=#1}, + index keys formatter/.code={\let\kvtcb@doc@format@keys=#1}, + index key formatter/.default=\@firstofone, + index keys formatter/.default=\@firstofone, } @@ -289,7 +294,7 @@ \NewDocumentCommand{\tcbIndexPrintEnvCA}{m}{\tcb@Index@Print@CA{#1}{\kvtcb@col@environment}{\kvtcb@text@env}} \NewDocumentCommand{\tcbIndexPrintEnvC}{m}{\tcb@Index@Print@C{#1}{\kvtcb@col@environment}} -\NewDocumentCommand{\tcbIndexPrintKeyCA}{m}{\tcb@Index@Print@CA{#1}{\kvtcb@col@key}{\kvtcb@text@key}} +\NewDocumentCommand{\tcbIndexPrintKeyCA}{m}{\tcb@Index@Print@CA{#1}{\kvtcb@col@key}} \NewDocumentCommand{\tcbIndexPrintKeyC}{m}{\tcb@Index@Print@C{#1}{\kvtcb@col@key}} \NewDocumentCommand{\tcbIndexPrintPathCA}{m}{\tcb@Index@Print@CA{#1}{\kvtcb@col@path}{\kvtcb@text@path}} @@ -333,7 +338,7 @@ \ExplSyntaxOn -\cs_new_nopar:Npn \__tcobox_new_bool_key:nn #1 #2 +\cs_new_nopar:Npn \__tcobox_new_bool_key:Nn #1 #2 { \bool_new:N #1 \tcbset @@ -345,15 +350,15 @@ } } -\__tcobox_new_bool_key:nn \l__tcobox_doc_toindex_bool { doc~into~index } -\__tcobox_new_bool_key:nn \l__tcobox_doc_gather_colors_bool { index~gather~colors } -\__tcobox_new_bool_key:nn \l__tcobox_doc_gather_commands_bool { index~gather~commands } -\__tcobox_new_bool_key:nn \l__tcobox_doc_gather_counters_bool { index~gather~counters } -\__tcobox_new_bool_key:nn \l__tcobox_doc_gather_environments_bool { index~gather~environments } -\__tcobox_new_bool_key:nn \l__tcobox_doc_gather_keys_bool { index~gather~keys } -\__tcobox_new_bool_key:nn \l__tcobox_doc_gather_lengths_bool { index~gather~lengths } -\__tcobox_new_bool_key:nn \l__tcobox_doc_gather_paths_bool { index~gather~paths } -\__tcobox_new_bool_key:nn \l__tcobox_doc_gather_values_bool { index~gather~values } +\__tcobox_new_bool_key:Nn \l__tcobox_doc_toindex_bool { doc~into~index } +\__tcobox_new_bool_key:Nn \l__tcobox_doc_gather_colors_bool { index~gather~colors } +\__tcobox_new_bool_key:Nn \l__tcobox_doc_gather_commands_bool { index~gather~commands } +\__tcobox_new_bool_key:Nn \l__tcobox_doc_gather_counters_bool { index~gather~counters } +\__tcobox_new_bool_key:Nn \l__tcobox_doc_gather_environments_bool { index~gather~environments } +\__tcobox_new_bool_key:Nn \l__tcobox_doc_gather_keys_bool { index~gather~keys } +\__tcobox_new_bool_key:Nn \l__tcobox_doc_gather_lengths_bool { index~gather~lengths } +\__tcobox_new_bool_key:Nn \l__tcobox_doc_gather_paths_bool { index~gather~paths } +\__tcobox_new_bool_key:Nn \l__tcobox_doc_gather_values_bool { index~gather~values } \cs_new_nopar:Npn \__tcobox_sanitize_tl:n #1 @@ -397,7 +402,7 @@ % main documentation environments \seq_new:N \g__tcobox_label_seq - +\seq_new:N \l__tcobox_tmpa_seq \cs_new:Npn \__tcobox_doc_entry_begin:nnn #1#2#3 { @@ -406,12 +411,12 @@ \seq_gclear:N \g__tcobox_label_seq \begin{tcbraster}[raster~columns=1,raster~row~skip=0pt, raster~after~skip=4.1pt,raster~force~size=false,doc@raster@#3] - \seq_set_from_clist:Nn \l_tmpa_seq {#2} - \seq_if_empty:NT \l_tmpa_seq + \seq_set_from_clist:Nn \l__tcobox_tmpa_seq {#2} + \seq_if_empty:NT \l__tcobox_tmpa_seq { - \seq_put_left:Nn \l_tmpa_seq {} + \seq_put_left:Nn \l__tcobox_tmpa_seq {} } - \seq_map_inline:Nn \l_tmpa_seq + \seq_map_inline:Nn \l__tcobox_tmpa_seq { \group_begin: \tcbset{##1} @@ -460,11 +465,11 @@ { \__tcobox_print_command: \__tcobox_index_command: - \seq_if_in:NVF \g__tcobox_label_seq \kvtcb@doc@label + \seq_if_in:NoF \g__tcobox_label_seq { \kvtcb@doc@label } { \protected@edef\@currentlabel{\noexpand\tcb@cs{\kvtcb@doc@name}} \label{com:\kvtcb@doc@label} - \seq_gput_left:NV \g__tcobox_label_seq \kvtcb@doc@label + \seq_gput_right:No \g__tcobox_label_seq { \kvtcb@doc@label } } {\ttfamily\kvtcb@doc@parameter} \tcb@doc@do@description @@ -522,11 +527,11 @@ { \strut\cs{begin}\brackets{\__tcobox_print_environment:} \__tcobox_index_environment: - \seq_if_in:NVF \g__tcobox_label_seq \kvtcb@doc@label + \seq_if_in:NoF \g__tcobox_label_seq { \kvtcb@doc@label } { \protected@edef\@currentlabel{\kvtcb@doc@name} \label{env:\kvtcb@doc@label} - \seq_gput_left:NV \g__tcobox_label_seq \kvtcb@doc@label + \seq_gput_right:No \g__tcobox_label_seq { \kvtcb@doc@label } } {\ttfamily\kvtcb@doc@parameter}\par \strut{\ttfamily\nobreakspace\nobreakspace}\meta{\kvtcb@text@envcontent}\par @@ -570,7 +575,7 @@ \textcolor{\kvtcb@col@key}{\tcb@doc@bfseries\ttfamily \tl_if_empty:NF \kvtcb@doc@keypath { - /\__tcobox_sanitize_tl:V\kvtcb@doc@keypath/ + \kvtcb@doc@keyprefix\__tcobox_sanitize_tl:V\kvtcb@doc@keypath/ } \__tcobox_sanitize_tl:V\kvtcb@doc@name} } @@ -579,15 +584,15 @@ { \bool_if:NT \l__tcobox_doc_toindex_bool { - \kvtcb@index@command{\kvtcb@doc@sortindex\idx@actual\tcbIndexPrintKeyCA{\kvtcb@doc@index}} + \kvtcb@index@command{\kvtcb@doc@sortindex\idx@actual\tcbIndexPrintKeyCA{\kvtcb@doc@index}{\kvtcb@doc@format@key\kvtcb@text@key}} \bool_if:NT \l__tcobox_doc_gather_keys_bool { \tl_if_empty:NTF \kvtcb@doc@keypath { - \kvtcb@index@command{\kvtcb@text@keys\idx@level\kvtcb@doc@sortindex\idx@actual\tcbIndexPrintKeyC{\kvtcb@doc@index}} + \kvtcb@index@command{\kvtcb@doc@format@keys\kvtcb@text@keys\idx@level\kvtcb@doc@sortindex\idx@actual\tcbIndexPrintKeyC{\kvtcb@doc@index}} } { - \kvtcb@index@command{\kvtcb@text@keys\idx@level\kvtcb@doc@keypath\idx@actual\tcbIndexPrintKeyC{/\kvtcb@doc@keypath/} + \kvtcb@index@command{\kvtcb@doc@format@keys\kvtcb@text@keys\idx@level\kvtcb@doc@keypath\idx@actual\tcbIndexPrintKeyC{\kvtcb@doc@keyprefix\kvtcb@doc@keypath/} \idx@level\kvtcb@doc@sortindex\idx@actual\tcbIndexPrintKeyC{\kvtcb@doc@index}} } } @@ -600,20 +605,20 @@ \__tcobox_index_key: \tl_if_empty:NTF \kvtcb@doc@keypath { - \seq_if_in:NVF \g__tcobox_label_seq \kvtcb@doc@label + \seq_if_in:NoF \g__tcobox_label_seq { \kvtcb@doc@label } { \protected@edef\@currentlabel{\kvtcb@doc@name} \label{key:\kvtcb@doc@label} - \seq_gput_left:NV \g__tcobox_label_seq \kvtcb@doc@label + \seq_gput_right:No \g__tcobox_label_seq { \kvtcb@doc@label } } } { - \tl_set:Nx \l_tmpa_tl {/\kvtcb@doc@keypath/\kvtcb@doc@label} - \seq_if_in:NVF \g__tcobox_label_seq \l_tmpa_tl + \tl_set:Ne \l__tcobox_tmpa_tl {\kvtcb@doc@keyprefix\kvtcb@doc@keypath/\kvtcb@doc@label} + \seq_if_in:NoF \g__tcobox_label_seq { \l__tcobox_tmpa_tl } { - \protected@edef\@currentlabel{/\kvtcb@doc@keypath/\kvtcb@doc@name} - \label{key:/\kvtcb@doc@keypath/\kvtcb@doc@label} - \seq_gput_left:NV \g__tcobox_label_seq \l_tmpa_tl + \protected@edef\@currentlabel{\kvtcb@doc@keyprefix\kvtcb@doc@keypath/\kvtcb@doc@name} + \label{key:\kvtcb@doc@keyprefix\kvtcb@doc@keypath/\kvtcb@doc@label} + \seq_gput_right:No \g__tcobox_label_seq { \l__tcobox_tmpa_tl } } } {\ttfamily\kvtcb@doc@parameter} @@ -655,17 +660,18 @@ } -\NewDocumentCommand \tcbmakedocSubKey { m m } +\NewDocumentCommand \tcbmakedocSubKey { +O{} m m } { - \NewDocumentEnvironment{#1}{ O{} +O{} m m +m } + \NewDocumentEnvironment{#2}{ O{} +O{} m m +m } { \__tcobox_doc_entry_begin:nnn { - doc@sub@keypath=#2, + doc@sub@keypath=#3, doc~keypath=##1, doc~name={##3}, doc~parameter={##4}, doc~description={##5}, + #1, ##2 } {}{key} @@ -673,27 +679,28 @@ { \__tcobox_doc_entry_end:n { key } } - \NewDocumentEnvironment{#1*}{} + \NewDocumentEnvironment{#2*}{} { \group_begin: \bool_set_false:N \l__tcobox_doc_toindex_bool - \begin{#1} + \begin{#2} } { - \end{#1} + \end{#2} \group_end: } } -\NewDocumentCommand \tcbmakedocSubKeys { m m } +\NewDocumentCommand \tcbmakedocSubKeys { +O{} m m } { - \NewDocumentEnvironment{#1}{ +O{} +m } + \NewDocumentEnvironment{#2}{ +O{} +m } { \__tcobox_doc_entry_begin:nnn { - doc@sub@keypath=#2, + doc@sub@keypath=#3, doc~keypath=, + #1, ##1 } {##2}{key} @@ -725,11 +732,11 @@ { \colFade{\tcb@cs{path~...}}~\__tcobox_print_path: \__tcobox_index_path: - \seq_if_in:NVF \g__tcobox_label_seq \kvtcb@doc@label + \seq_if_in:NoF \g__tcobox_label_seq { \kvtcb@doc@label } { \protected@edef\@currentlabel{\kvtcb@doc@name} \label{path:\kvtcb@doc@label} - \seq_gput_left:NV \g__tcobox_label_seq \kvtcb@doc@label + \seq_gput_right:No \g__tcobox_label_seq { \kvtcb@doc@label } } {\ttfamily\kvtcb@doc@parameter{}~\colFade{...;}} \tcb@doc@do@description @@ -1017,6 +1024,9 @@ index annotate=true, english language, keywords bold, + doc key prefix={/}, + index key formatter, + index keys formatter, } % deprecated diff --git a/macros/latex/contrib/tcolorbox/tcbexternal.code.tex b/macros/latex/contrib/tcolorbox/tcbexternal.code.tex index c0159db83f..0bfa994f68 100644 --- a/macros/latex/contrib/tcolorbox/tcbexternal.code.tex +++ b/macros/latex/contrib/tcolorbox/tcbexternal.code.tex @@ -1,8 +1,8 @@ -%% The LaTeX package tcolorbox - version 6.1.0 (2023/09/26) +%% The LaTeX package tcolorbox - version 6.2.0 (2024/01/10) %% tcbexternal.code.tex: Code for externalization %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2006-2023 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> +%% Copyright (c) 2006-2024 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> %% ------------------------------------------------------------------------------------------- %% %% This work may be distributed and/or modified under the @@ -17,17 +17,10 @@ %% %% This work consists of all files listed in README %% -\tcb@set@library@version{6.1.0} +\tcb@set@library@version{6.2.0} \tcbuselibrary{pro@cessing} -{ -\catcode`\"=12 -\xdef\tcbexternal@normal@dq{"} -\catcode`\"=13 -\gdef\tcbexternal@activate@normal@dq{\let"=\tcbexternal@normal@dq} -} - \long\def\tcbifexternal#1#2{% \ifdefined\TCBEXTERNALINPUT% #1% @@ -65,31 +58,44 @@ \edef\tcbexternal@job@pdf{\expandonce{\tcbexternal@job@name.pdf}}% } -\def\tcbexternal@corecompile{% - \begingroup% - \ifnum\the\catcode`\"=13 \tcbexternal@activate@normal@dq\fi% - \message{=== Compile external '\tcbexternal@job@name': }% - \tcb@allocate@tcb@out% - \immediate\openout\tcb@out="\tcbexternal@run@tex" - \immediate\write\tcb@out{\string\gdef\string\TCBEXTERNALINPUT{"\tcbexternal@job@source"}}% - \immediate\write\tcb@out{\string\gdef\string\TCBEXTERNALSAFETY{\tcbexternal@safety}}% - \immediate\write\tcb@out{\string\gdef\string\TCBEXTERNALPREAMBLE{\expandonce{\tcbexternal@preamble}}}% - \ifdefempty{\tcbexternal@preclass}{}{\immediate\write\tcb@out{\expandonce{\tcbexternal@preclass}}}% - \immediate\write\tcb@out{\string\input{"\jobname.tex"}}% - \immediate\closeout\tcb@out% - \foreach \n in {1,...,\tcbexternal@runs} - {% - \ShellEscape{% - \tcbexternal@compiler\space - -shell-escape - -halt-on-error - -interaction=batchmode - -jobname="\tcbexternal@job@name" - "\tcbexternal@run@tex" - }% - }% - \endgroup% -} +\ExplSyntaxOn +\cs_new_protected:Npn \tcbexternal@corecompile + { + \group_begin: + \char_set_catcode_other:n { `\" } + \iow_term:e { ===~Compile~external~'\tcbexternal@job@name':~ } + \iow_open:Nn \g__tcobox_out_iow { \tcbexternal@run@tex } + \iow_now:Ne \g__tcobox_out_iow + { + \token_to_str:N \gdef \token_to_str:N \TCBEXTERNALINPUT + { "\tcbexternal@job@source" } \iow_newline: + \token_to_str:N \gdef \token_to_str:N \TCBEXTERNALSAFETY + { \tcbexternal@safety } \iow_newline: + \token_to_str:N \gdef \token_to_str:N \TCBEXTERNALPREAMBLE + { \exp_not:o \tcbexternal@preamble } + } + \tl_if_empty:NF \tcbexternal@preclass + { + \iow_now:NV \g__tcobox_out_iow \tcbexternal@preclass + } + \iow_now:Ne \g__tcobox_out_iow + { \token_to_str:N \input {"\jobname.tex"} } + \iow_close:N \g__tcobox_out_iow + \int_step_inline:nn { \tcbexternal@runs } + { + \sys_shell_now:e + { + \tcbexternal@compiler \c_space_tl + -shell-escape~ + -halt-on-error~ + -interaction=batchmode~ + -jobname="\tcbexternal@job@name"~ + "\tcbexternal@run@tex" + } + } + \group_end: + } +\ExplSyntaxOff \def\tcbexternal@compile#1{% \tcbiffileprocess{#1}% @@ -239,22 +245,22 @@ \let\tcbexternal@out@end=\@empty% }, minipage/.code={% - \appto\tcbexternal@out@begin{\immediate\write\tcb@out{\string\begin{minipage}{\the\dimexpr#1\relax}\string\ignorespaces\@percentchar}}% - \preto\tcbexternal@out@end{\immediate\write\tcb@out{\string\end{minipage}\@percentchar}}% + \appto\tcbexternal@out@begin{\tcb@iow@write{\string\begin{minipage}{\the\dimexpr#1\relax}\string\ignorespaces\@percentchar}}% + \preto\tcbexternal@out@end{\tcb@iow@write{\string\end{minipage}\@percentchar}}% }, minipage/.default=\linewidth, % environment with percent/.is choice, environment with percent/true/.style={% /tcb/external/environment/.code={% - \appto\tcbexternal@out@begin{\immediate\write\tcb@out{\string\begin{##1}\@percentchar}}% - \preto\tcbexternal@out@end{\immediate\write\tcb@out{\string\end{##1}\@percentchar}}% + \appto\tcbexternal@out@begin{\tcb@iow@write{\string\begin{##1}\@percentchar}}% + \preto\tcbexternal@out@end{\tcb@iow@write{\string\end{##1}\@percentchar}}% } }, environment with percent/false/.style={% /tcb/external/environment/.code={% - \appto\tcbexternal@out@begin{\immediate\write\tcb@out{\string\begin{##1}}}% - \preto\tcbexternal@out@end{\immediate\write\tcb@out{\string\end{##1}}}% + \appto\tcbexternal@out@begin{\tcb@iow@write{\string\begin{##1}}}% + \preto\tcbexternal@out@end{\tcb@iow@write{\string\end{##1}}}% } }, environment with percent/.default=true, diff --git a/macros/latex/contrib/tcolorbox/tcbfitting.code.tex b/macros/latex/contrib/tcolorbox/tcbfitting.code.tex index 118c77fb13..0e34e15ad5 100644 --- a/macros/latex/contrib/tcolorbox/tcbfitting.code.tex +++ b/macros/latex/contrib/tcolorbox/tcbfitting.code.tex @@ -1,8 +1,8 @@ -%% The LaTeX package tcolorbox - version 6.1.0 (2023/09/26) +%% The LaTeX package tcolorbox - version 6.2.0 (2024/01/10) %% tcbfitting.code.tex: Code for fit boxes %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2006-2023 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> +%% Copyright (c) 2006-2024 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,7 +18,7 @@ %% This work consists of all files listed in README %% %\makeatletter -\tcb@set@library@version{6.1.0} +\tcb@set@library@version{6.2.0} \newdimen\tcbfitdim \newdimen\tcb@lowerfitdim @@ -394,8 +394,8 @@ } \NewDocumentCommand \__tcobox_new_tcboxfit_i:w { m +O{} m } { - \__tcobox_set_backslash_removed:Nn \l_tmpa_tl { #3 } - \exp_args:NNnV \__tcobox_new_tcboxfit_ii:w #1 {#2} \l_tmpa_tl + \__tcobox_set_backslash_removed:Nn \l__tcobox_tmpa_tl { #3 } + \exp_args:NNnV \__tcobox_new_tcboxfit_ii:w #1 {#2} \l__tcobox_tmpa_tl } \NewDocumentCommand \newtcboxfit { } { @@ -416,8 +416,8 @@ } \NewDocumentCommand \__tcobox_new_TCBoxFit:w { m +O{} m } { - \__tcobox_set_backslash_removed:Nn \l_tmpa_tl { #3 } - \exp_args:NNnV \__tcobox_new_TCBoxFit:Nnnnn #1 {#2} \l_tmpa_tl + \__tcobox_set_backslash_removed:Nn \l__tcobox_tmpa_tl { #3 } + \exp_args:NNnV \__tcobox_new_TCBoxFit:Nnnnn #1 {#2} \l__tcobox_tmpa_tl } \NewDocumentCommand \DeclareTCBoxFit { } { @@ -448,8 +448,8 @@ } \NewDocumentCommand \__tcobox_new_TotalTCBoxFit:w { m +O{} m } { - \__tcobox_set_backslash_removed:Nn \l_tmpa_tl { #3 } - \exp_args:NNnV \__tcobox_new_TotalTCBoxFit:Nnnnnn #1 {#2} \l_tmpa_tl + \__tcobox_set_backslash_removed:Nn \l__tcobox_tmpa_tl { #3 } + \exp_args:NNnV \__tcobox_new_TotalTCBoxFit:Nnnnnn #1 {#2} \l__tcobox_tmpa_tl } \NewDocumentCommand \DeclareTotalTCBoxFit { } { diff --git a/macros/latex/contrib/tcolorbox/tcbhooks.code.tex b/macros/latex/contrib/tcolorbox/tcbhooks.code.tex index bdf0a6c9f1..b3edf95636 100644 --- a/macros/latex/contrib/tcolorbox/tcbhooks.code.tex +++ b/macros/latex/contrib/tcolorbox/tcbhooks.code.tex @@ -1,8 +1,8 @@ -%% The LaTeX package tcolorbox - version 6.1.0 (2023/09/26) +%% The LaTeX package tcolorbox - version 6.2.0 (2024/01/10) %% tcbhooks.code.tex: Code for adding hooks %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2006-2023 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> +%% Copyright (c) 2006-2024 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,7 +18,7 @@ %% This work consists of all files listed in README %% %\makeatletter -\tcb@set@library@version{6.1.0} +\tcb@set@library@version{6.2.0} \tcbset{% before upper app/.code={\appto\kvtcb@before@upper{#1}},% @@ -136,3 +136,36 @@ listing options pre/.code={\preto\kvtcb@listingoptions{#1,}}, } +\ExplSyntaxOn +\tcbset { + __environment-app / .style~n~args = { 3 } + { + before~#1~app = { \begin{#2} #3 }, + after~#1~pre = { \end{#2} } + }, + environment~upper~app / .value~required, + environment~lower~app / .value~required, + environment~title~app / .value~required, + environment~upper~app / .style = { __environment-app = {upper}{#1}{ } }, + environment~lower~app / .style = { __environment-app = {lower}{#1}{ } }, + environment~title~app / .style = { __environment-app = {title}{#1}{ } }, + environment~upper~args~app / .style~n~args = { 2 }{ __environment-app = {upper}{#1}{#2} }, + environment~lower~args~app / .style~n~args = { 2 }{ __environment-app = {lower}{#1}{#2} }, + environment~title~args~app / .style~n~args = { 2 }{ __environment-app = {title}{#1}{#2} }, + __environment-pre / .style~n~args = { 3 } + { + before~#1~pre = { \begin{#2} #3 }, + after~#1~app = { \end{#2} } + }, + environment~upper~pre / .value~required, + environment~lower~pre / .value~required, + environment~title~pre / .value~required, + environment~upper~pre / .style = { __environment-pre = {upper}{#1}{ } }, + environment~lower~pre / .style = { __environment-pre = {lower}{#1}{ } }, + environment~title~pre / .style = { __environment-pre = {title}{#1}{ } }, + environment~upper~args~pre / .style~n~args = { 2 }{ __environment-pre = {upper}{#1}{#2} }, + environment~lower~args~pre / .style~n~args = { 2 }{ __environment-pre = {lower}{#1}{#2} }, + environment~title~args~pre / .style~n~args = { 2 }{ __environment-pre = {title}{#1}{#2} }, +} +\ExplSyntaxOff + diff --git a/macros/latex/contrib/tcolorbox/tcblistings.code.tex b/macros/latex/contrib/tcolorbox/tcblistings.code.tex index c1bc358d1b..195076eee1 100644 --- a/macros/latex/contrib/tcolorbox/tcblistings.code.tex +++ b/macros/latex/contrib/tcolorbox/tcblistings.code.tex @@ -1,8 +1,8 @@ -%% The LaTeX package tcolorbox - version 6.1.0 (2023/09/26) +%% The LaTeX package tcolorbox - version 6.2.0 (2024/01/10) %% tcblistings.code.tex: Code for colorboxes with listings %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2006-2023 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> +%% Copyright (c) 2006-2024 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,7 +18,7 @@ %% This work consists of all files listed in README %% %\makeatletter -\tcb@set@library@version{6.1.0} +\tcb@set@library@version{6.2.0} \RequirePackage{listings}[2007/02/22] diff --git a/macros/latex/contrib/tcolorbox/tcblistingscore.code.tex b/macros/latex/contrib/tcolorbox/tcblistingscore.code.tex index e95a98a8ed..48241a94d5 100644 --- a/macros/latex/contrib/tcolorbox/tcblistingscore.code.tex +++ b/macros/latex/contrib/tcolorbox/tcblistingscore.code.tex @@ -1,8 +1,8 @@ -%% The LaTeX package tcolorbox - version 6.1.0 (2023/09/26) +%% The LaTeX package tcolorbox - version 6.2.0 (2024/01/10) %% tcblistingscode.code.tex: Auxiliary code for colorboxes with listings %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2006-2023 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> +%% Copyright (c) 2006-2024 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,7 +18,7 @@ %% This work consists of all files listed in README %% %\makeatletter -\tcb@set@library@version{6.1.0} +\tcb@set@library@version{6.2.0} \tcbuselibrary{pro@cessing} @@ -164,16 +164,30 @@ \begin{tcolorbox}[capture=\tcb@listing@capture,savedelimiter=tcolorbox]\tcb@listing@process\end{tcolorbox}% } -\long\def\tcb@run@system@command#1{% - \ifcase\pdf@shellescape\relax - \tcb@error{You must invoke LaTeX with the -shell-escape flag}{Pass the -shell-escape flag to LaTeX.}% - \or\or - \tcb@warning{System call with restricted shell escape may fail}% - \fi% - \ShellEscape{#1}% - \relax% +\ExplSyntaxOn +\cs_new_protected:Npn \__tcbox_run_system_command:n #1 + { + \sys_if_shell:TF + { + \sys_if_shell_restricted:T + { + \tcb@warning{System~call~with~restricted~shell~escape~may~fail} + } + } + { + \tcb@error{You~must~invoke~LaTeX~with~the~-shell-escape~flag} + {Pass~the~-shell-escape~flag~to~LaTeX.} + } + \sys_shell_now:e {#1} + } + +\tcbset +{ + run~system~command/.style={process~code={\__tcbox_run_system_command:n{#1}}}, } +\ExplSyntaxOff + \tcbset{% listing file/.store in=\kvtcb@listingfile,% @@ -219,7 +233,6 @@ process code/.code={\appto\tcb@listing@process@hook{#1}},% no process/.code={\def\tcb@listing@process@hook{}},% compilable listing/.style={listing file={\jobname-listing-\thetcblistingcount.tex}}, - run system command/.style={process code={\tcb@run@system@command{#1}}},% run@system@command/.style 2 args={run system command={#1\space#2\space\filename@area\filename@base}},% run pdflatex/.style={run@system@command={pdflatex}{#1}},% run xelatex/.style={run@system@command={xelatex}{#1}},% @@ -355,8 +368,8 @@ } \NewDocumentCommand \__tcobox_new_tcbinputlisting_i:w { m +O{} m } { - \__tcobox_set_backslash_removed:Nn \l_tmpa_tl { #3 } - \exp_args:NNnV \__tcobox_new_tcbinputlisting_ii:w #1 {#2} \l_tmpa_tl + \__tcobox_set_backslash_removed:Nn \l__tcobox_tmpa_tl { #3 } + \exp_args:NNnV \__tcobox_new_tcbinputlisting_ii:w #1 {#2} \l__tcobox_tmpa_tl } \NewDocumentCommand \newtcbinputlisting { } { @@ -377,8 +390,8 @@ } \NewDocumentCommand \__tcobox_new_TCBInputListing:w { m +O{} m } { - \__tcobox_set_backslash_removed:Nn \l_tmpa_tl { #3 } - \exp_args:NNnV \__tcobox_new_TCBInputListing:Nnnnn #1 {#2} \l_tmpa_tl + \__tcobox_set_backslash_removed:Nn \l__tcobox_tmpa_tl { #3 } + \exp_args:NNnV \__tcobox_new_TCBInputListing:Nnnnn #1 {#2} \l__tcobox_tmpa_tl } \NewDocumentCommand \DeclareTCBInputListing { } { diff --git a/macros/latex/contrib/tcolorbox/tcblistingsutf8.code.tex b/macros/latex/contrib/tcolorbox/tcblistingsutf8.code.tex index fa6f16bd1f..0c9b2b7e8c 100644 --- a/macros/latex/contrib/tcolorbox/tcblistingsutf8.code.tex +++ b/macros/latex/contrib/tcolorbox/tcblistingsutf8.code.tex @@ -1,8 +1,8 @@ -%% The LaTeX package tcolorbox - version 6.1.0 (2023/09/26) +%% The LaTeX package tcolorbox - version 6.2.0 (2024/01/10) %% tcblistingsutf8.code.tex: Code for colorboxes with listings in UTF-8 %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2006-2023 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> +%% Copyright (c) 2006-2024 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> %% ------------------------------------------------------------------------------------------- %% %% This work may be distributed and/or modified under the @@ -17,7 +17,7 @@ %% %% This work consists of all files listed in README %% -\tcb@set@library@version{6.1.0} +\tcb@set@library@version{6.2.0} \tcbuselibrary{listings} diff --git a/macros/latex/contrib/tcolorbox/tcbmagazine.code.tex b/macros/latex/contrib/tcolorbox/tcbmagazine.code.tex index 0e6efd9f71..81180a8eb8 100644 --- a/macros/latex/contrib/tcolorbox/tcbmagazine.code.tex +++ b/macros/latex/contrib/tcolorbox/tcbmagazine.code.tex @@ -1,8 +1,8 @@ -%% The LaTeX package tcolorbox - version 6.1.0 (2023/09/26) +%% The LaTeX package tcolorbox - version 6.2.0 (2024/01/10) %% tcbmagazine.code.tex: Code for box sets and magazine styles %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2006-2023 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> +%% Copyright (c) 2006-2024 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> %% ------------------------------------------------------------------------------------------- %% %% This work may be distributed and/or modified under the @@ -17,7 +17,7 @@ %% %% This work consists of all files listed in README %% -\tcb@set@library@version{6.1.0} +\tcb@set@library@version{6.2.0} \tcbuselibrary{breakable} diff --git a/macros/latex/contrib/tcolorbox/tcbminted.code.tex b/macros/latex/contrib/tcolorbox/tcbminted.code.tex index 2115bf2f4b..cae9e8d707 100644 --- a/macros/latex/contrib/tcolorbox/tcbminted.code.tex +++ b/macros/latex/contrib/tcolorbox/tcbminted.code.tex @@ -1,8 +1,8 @@ -%% The LaTeX package tcolorbox - version 6.1.0 (2023/09/26) +%% The LaTeX package tcolorbox - version 6.2.0 (2024/01/10) %% tcbminted.code.tex: Code for colorboxes with listings %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2006-2023 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> +%% Copyright (c) 2006-2024 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,7 +18,7 @@ %% This work consists of all files listed in README %% %\makeatletter -\tcb@set@library@version{6.1.0} +\tcb@set@library@version{6.2.0} \RequirePackage{minted}[2021/12/24] @@ -35,21 +35,21 @@ { \usemintedstyle { #4 } } - \tl_set:Nn \l_tmpa_tl { \inputminted[#1 } + \tl_set:Nn \l__tcobox_tmpa_tl { \inputminted[#1 } \cs_if_exist:NT \tcb@listing@capture { \str_if_eq:VnT \tcb@listing@capture { hbox } { - \tl_put_right:Nn \l_tmpa_tl { ,envname=BVerbatim } + \tl_put_right:Nn \l__tcobox_tmpa_tl { ,envname=BVerbatim } } } - \tl_put_right:Nn \l_tmpa_tl { ] } + \tl_put_right:Nn \l__tcobox_tmpa_tl { ] } \file_if_exist:nTF { \minted@outputdir #3 } { - \l_tmpa_tl { #2 }{ \minted@outputdir #3 } + \l__tcobox_tmpa_tl { #2 }{ \minted@outputdir #3 } } { - \l_tmpa_tl { #2 }{ #3 } + \l__tcobox_tmpa_tl { #2 }{ #3 } } } diff --git a/macros/latex/contrib/tcolorbox/tcbposter.code.tex b/macros/latex/contrib/tcolorbox/tcbposter.code.tex index b6a139fde7..49abfc651a 100644 --- a/macros/latex/contrib/tcolorbox/tcbposter.code.tex +++ b/macros/latex/contrib/tcolorbox/tcbposter.code.tex @@ -1,8 +1,8 @@ -%% The LaTeX package tcolorbox - version 6.1.0 (2023/09/26) +%% The LaTeX package tcolorbox - version 6.2.0 (2024/01/10) %% tcbposter.code.tex: Code for posters %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2006-2023 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> +%% Copyright (c) 2006-2024 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> %% ------------------------------------------------------------------------------------------- %% %% This work may be distributed and/or modified under the @@ -17,7 +17,7 @@ %% %% This work consists of all files listed in README %% -\tcb@set@library@version{6.1.0} +\tcb@set@library@version{6.2.0} \tcbuselibrary{breakable,magazine,skins,fitting} diff --git a/macros/latex/contrib/tcolorbox/tcbprocessing.code.tex b/macros/latex/contrib/tcolorbox/tcbprocessing.code.tex index 83f0ec2cb5..ce0ae43075 100644 --- a/macros/latex/contrib/tcolorbox/tcbprocessing.code.tex +++ b/macros/latex/contrib/tcolorbox/tcbprocessing.code.tex @@ -1,8 +1,8 @@ -%% The LaTeX package tcolorbox - version 6.1.0 (2023/09/26) +%% The LaTeX package tcolorbox - version 6.2.0 (2024/01/10) %% tcbprocessing.code.tex: Code for conditional processing %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2006-2023 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> +%% Copyright (c) 2006-2024 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> %% ------------------------------------------------------------------------------------------- %% %% This work may be distributed and/or modified under the @@ -17,64 +17,54 @@ %% %% This work consists of all files listed in README %% -\tcb@set@library@version{6.1.0} +\tcb@set@library@version{6.2.0} -\RequirePackage{pdftexcmds} -\RequirePackage{shellesc} +\ExplSyntaxOn -\ifdefined\pdf@filemdfivesum\else% XeLaTeX presumed ... - \def\pdf@filemdfivesum#1{\mdfivesum file {#1}}% -\fi -\ifdefined\pdf@filemoddate\else% very poor XeLaTeX bypassing - \def\pdf@filemoddate#1{}% -\fi +\bool_new:N \l__tcobox_proc_hash_equal_bool -\def\tcbproc@readmdfive#1#2{% - \edef\tcbprocmdfivesum{\pdf@filemdfivesum{#1}}% - \IfFileExists{#2}{\input{#2}}{\def\tcbproclastmdfivesum{}}% -} +\cs_new_protected:Npn \__tcobox_proc_compute_hash:nn #1#2 + { + \tl_set:Ne \l__tcobox_tmpa_tl { \file_mdfive_hash:n { #1 } } + \file_get:nnN { #2 } { } \l__tcobox_tmpb_tl + \str_if_eq:eeTF { \l__tcobox_tmpa_tl } { \tl_trim_spaces:o { \l__tcobox_tmpb_tl } } + { + \bool_set_true:N \l__tcobox_proc_hash_equal_bool + } + { + \bool_set_false:N \l__tcobox_proc_hash_equal_bool + \iow_open:Nn \g__tcobox_out_iow { #2 } + \iow_now:NV \g__tcobox_out_iow \l__tcobox_tmpa_tl + \iow_close:N \g__tcobox_out_iow + } + } -\def\tcbproc@writemdfive#1{% - \tcb@allocate@tcb@out% - \immediate\openout\tcb@out=#1% - \immediate\write\tcb@out{\string\def\string\tcbproclastmdfivesum{\tcbprocmdfivesum}\@percentchar}% - \immediate\closeout\tcb@out% -} +\prg_new_protected_conditional:Npnn \__tcobox_if_file_process:nnnn #1#2#3#4 { TF } + { + \__tcobox_proc_compute_hash:nn {#2} {#3} + \int_case:nn {#1} + { + {0} { \prg_return_true: } + {1} + { + \bool_if:NTF \l__tcobox_proc_hash_equal_bool + { + \file_if_exist:nTF {#4} + { + \file_compare_timestamp:nNnTF {#4} < {#3} + { \prg_return_true: } + { \prg_return_false: } + } + { \prg_return_true: } + } + { + \prg_return_true: + } + } + {2} { \prg_return_false: } + } + } -\newrobustcmd{\iftcb@process@on}[3]{% - \tcbproc@readmdfive{#1}{#2}% - \ifdefstrequal{\tcbproclastmdfivesum}{\tcbprocmdfivesum}{}{\tcbproc@writemdfive{#2}}% - \expandafter\@firstoftwo% -} +\cs_gset_eq:NN \tcbiffileprocess \__tcobox_if_file_process:nnnnTF -\newrobustcmd{\iftcb@process@conditional}[3]{% - \tcbproc@readmdfive{#1}{#2}% - \ifdefstrequal{\tcbproclastmdfivesum}{\tcbprocmdfivesum}{% - \IfFileExists{#3}{% - \ifnum\pdf@strcmp{\pdf@filemoddate{#2}}{\pdf@filemoddate{#3}}>0\relax% - \expandafter\@firstoftwo% - \else% - \expandafter\@secondoftwo% - \fi% - }{\expandafter\@firstoftwo}% - }{% - \tcbproc@writemdfive{#2}% - \expandafter\@firstoftwo% - }% -} - -\newrobustcmd{\iftcb@process@off}[3]{% - \tcbproc@readmdfive{#1}{#2}% - \ifdefstrequal{\tcbproclastmdfivesum}{\tcbprocmdfivesum}{}{\tcbproc@writemdfive{#2}}% - \expandafter\@secondoftwo% -}% - -\newrobustcmd{\tcbiffileprocess}[1]{% - \ifcase\numexpr#1\relax% - \expandafter\iftcb@process@on% - \or% - \expandafter\iftcb@process@conditional% - \else% - \expandafter\iftcb@process@off% - \fi% -} +\ExplSyntaxOff diff --git a/macros/latex/contrib/tcolorbox/tcbraster.code.tex b/macros/latex/contrib/tcolorbox/tcbraster.code.tex index 07f58e0c0b..3551030092 100644 --- a/macros/latex/contrib/tcolorbox/tcbraster.code.tex +++ b/macros/latex/contrib/tcolorbox/tcbraster.code.tex @@ -1,8 +1,8 @@ -%% The LaTeX package tcolorbox - version 6.1.0 (2023/09/26) +%% The LaTeX package tcolorbox - version 6.2.0 (2024/01/10) %% tcbskinsjigsaw.code.tex: Code for colorboxes with different skins %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2006-2023 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> +%% Copyright (c) 2006-2024 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> %% ------------------------------------------------------------------------------------------- %% %% This work may be distributed and/or modified under the @@ -17,7 +17,7 @@ %% %% This work consists of all files listed in README %% -\tcb@set@library@version{6.1.0} +\tcb@set@library@version{6.2.0} \newcounter{tcbrastercolumn} \newcounter{tcbrasterrow} diff --git a/macros/latex/contrib/tcolorbox/tcbskins.code.tex b/macros/latex/contrib/tcolorbox/tcbskins.code.tex index 51a7722f77..3fbad78584 100644 --- a/macros/latex/contrib/tcolorbox/tcbskins.code.tex +++ b/macros/latex/contrib/tcolorbox/tcbskins.code.tex @@ -1,8 +1,8 @@ -%% The LaTeX package tcolorbox - version 6.1.0 (2023/09/26) +%% The LaTeX package tcolorbox - version 6.2.0 (2024/01/10) %% tcbskins.code.tex: Code for colorboxes with different skins %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2006-2023 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> +%% Copyright (c) 2006-2024 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> %% ------------------------------------------------------------------------------------------- %% %% This work may be distributed and/or modified under the @@ -17,7 +17,7 @@ %% %% This work consists of all files listed in README %% -\tcb@set@library@version{6.1.0} +\tcb@set@library@version{6.2.0} \RequirePackage{tikz}[2010/10/13] \RequirePackage{tikzfill.image} @@ -1720,7 +1720,7 @@ \cs_new:Npn \__tcobox_include_graphics:nn #1#2 { - \includegraphics [#1] {#2} + \includegraphics [{#1}] {#2} } \cs_generate_variant:Nn \__tcobox_include_graphics:nn {en} @@ -1730,27 +1730,27 @@ \int_compare:nNnT \kvtcb@graphics@orientation > {-1} { - \hbox_set:Nn \l_tmpa_box + \hbox_set:Nn \l__tcobox_tmpa_box { \__tcobox_include_graphics:en { \l__tcobox_graphics_options_tl }{ \imagepath } } \if_case:w \kvtcb@graphics@orientation - \dim_compare:nNnT {\box_wd:N\l_tmpa_box} < {\box_ht_plus_dp:N \l_tmpa_box} + \dim_compare:nNnT {\box_wd:N\l__tcobox_tmpa_box} < {\box_ht_plus_dp:N \l__tcobox_tmpa_box} { \tl_put_right:Nn \l__tcobox_graphics_options_tl {,angle=90} } \or: - \dim_compare:nNnT {\box_wd:N\l_tmpa_box} < {\box_ht_plus_dp:N \l_tmpa_box} + \dim_compare:nNnT {\box_wd:N\l__tcobox_tmpa_box} < {\box_ht_plus_dp:N \l__tcobox_tmpa_box} { \tl_put_right:Nn \l__tcobox_graphics_options_tl {,angle=-90} } \or: - \dim_compare:nNnT {\box_wd:N\l_tmpa_box} > {\box_ht_plus_dp:N \l_tmpa_box} + \dim_compare:nNnT {\box_wd:N\l__tcobox_tmpa_box} > {\box_ht_plus_dp:N \l__tcobox_tmpa_box} { \tl_put_right:Nn \l__tcobox_graphics_options_tl {,angle=90} } \or: - \dim_compare:nNnT {\box_wd:N\l_tmpa_box} > {\box_ht_plus_dp:N \l_tmpa_box} + \dim_compare:nNnT {\box_wd:N\l__tcobox_tmpa_box} > {\box_ht_plus_dp:N \l__tcobox_tmpa_box} { \tl_put_right:Nn \l__tcobox_graphics_options_tl {,angle=-90} } @@ -1769,14 +1769,14 @@ { \begin{tcolorbox} \__tcobox_include_graphics:en { \l__tcobox_graphics_options_tl,width=\linewidth,height=\tcbtextheight,keepaspectratio }{ \imagepath } - \end{tcolorbox} + \end{tcolorbox} } { \tl_if_empty:NTF \tcb@height@adjust { \begin{tcolorbox} \__tcobox_include_graphics:en { \l__tcobox_graphics_options_tl,width=\linewidth }{ \imagepath } - \end{tcolorbox}% + \end{tcolorbox} }{% height fill \begin{tcolorbox}[ underlay= @@ -1796,15 +1796,15 @@ \cs_new:Npn \__tcobox_include_graphics_preparefile:n #1 { - \file_parse_full_name:nNNN {#1} \l_tmpa_tl \imagename \l_tmpb_tl - \tl_put_right:NV \imagename \l_tmpb_tl + \file_parse_full_name:nNNN {#1} \l__tcobox_tmpa_tl \imagename \l__tcobox_tmpb_tl + \tl_put_right:NV \imagename \l__tcobox_tmpb_tl \tl_set_eq:NN \imagepath \imagename - \tl_if_empty:NF \l_tmpa_tl + \tl_if_empty:NF \l__tcobox_tmpa_tl { \tl_put_left:Nn \imagepath {/} - \tl_if_eq:NnF \l_tmpa_tl {/} + \tl_if_eq:NnF \l__tcobox_tmpa_tl {/} { - \tl_put_left:NV \imagepath \l_tmpa_tl + \tl_put_left:NV \imagepath \l__tcobox_tmpa_tl } } \tl_if_empty:NF \kvtcb@graphics@directory diff --git a/macros/latex/contrib/tcolorbox/tcbskinsjigsaw.code.tex b/macros/latex/contrib/tcolorbox/tcbskinsjigsaw.code.tex index 2a0e642acb..551971a0df 100644 --- a/macros/latex/contrib/tcolorbox/tcbskinsjigsaw.code.tex +++ b/macros/latex/contrib/tcolorbox/tcbskinsjigsaw.code.tex @@ -1,8 +1,8 @@ -%% The LaTeX package tcolorbox - version 6.1.0 (2023/09/26) +%% The LaTeX package tcolorbox - version 6.2.0 (2024/01/10) %% tcbskinsjigsaw.code.tex: Code for colorboxes with different skins %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2006-2023 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> +%% Copyright (c) 2006-2024 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> %% ------------------------------------------------------------------------------------------- %% %% This work may be distributed and/or modified under the @@ -17,7 +17,7 @@ %% %% This work consists of all files listed in README %% -\tcb@set@library@version{6.1.0} +\tcb@set@library@version{6.2.0} \tcbuselibrary{skins} diff --git a/macros/latex/contrib/tcolorbox/tcbtheorems.code.tex b/macros/latex/contrib/tcolorbox/tcbtheorems.code.tex index 7e93b7ddcd..f53eda79a5 100644 --- a/macros/latex/contrib/tcolorbox/tcbtheorems.code.tex +++ b/macros/latex/contrib/tcolorbox/tcbtheorems.code.tex @@ -1,8 +1,8 @@ -%% The LaTeX package tcolorbox - version 6.1.0 (2023/09/26) +%% The LaTeX package tcolorbox - version 6.2.0 (2024/01/10) %% tcbtheorems.code.tex: Code for theorems in colorboxes %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2006-2023 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> +%% Copyright (c) 2006-2024 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,7 +18,7 @@ %% This work consists of all files listed in README %% %\makeatletter -\tcb@set@library@version{6.1.0} +\tcb@set@library@version{6.2.0} \RequirePackage{amsmath} @@ -107,7 +107,7 @@ } { % box display name and number - \hbox_set:Nn \l_tmpa_box + \hbox_set:Nn \l__tcobox_tmpa_box { \__tcobox_theo_format:nn{#1}{#2} \bool_if:NF \l__tcobox_theo_headempty_bool @@ -119,25 +119,25 @@ % set (hanging) indent for name and number \str_if_eq:VnTF \l__tcobox_theo_hanging_indent_tl { auto } { - \hangindent \box_wd:N \l_tmpa_box + \hangindent \box_wd:N \l__tcobox_tmpa_box \hangafter = 1 } { - \dim_set:Nn \l_tmpa_dim { \l__tcobox_theo_hanging_indent_tl } - \if_dim:w \l_tmpa_dim = \c_zero_dim + \dim_set:Nn \l__tcobox_tmpa_dim { \l__tcobox_theo_hanging_indent_tl } + \if_dim:w \l__tcobox_tmpa_dim = \c_zero_dim \else: - \if_dim:w \l_tmpa_dim > \c_zero_dim - \hangindent \l_tmpa_dim + \if_dim:w \l__tcobox_tmpa_dim > \c_zero_dim + \hangindent \l__tcobox_tmpa_dim \hangafter = 1 \else: - \hangindent -\l_tmpa_dim + \hangindent -\l__tcobox_tmpa_dim \hangafter = -1 \fi: \fi: } % insert box with name and number \mode_leave_vertical: - \box_use_drop:N \l_tmpa_box + \box_use_drop:N \l__tcobox_tmpa_box % insert formated title \group_begin: \__tcobox_theo_format_description:n{#3} diff --git a/macros/latex/contrib/tcolorbox/tcbvignette.code.tex b/macros/latex/contrib/tcolorbox/tcbvignette.code.tex index c67a25d5c1..e177bb33d4 100644 --- a/macros/latex/contrib/tcolorbox/tcbvignette.code.tex +++ b/macros/latex/contrib/tcolorbox/tcbvignette.code.tex @@ -1,8 +1,8 @@ -%% The LaTeX package tcolorbox - version 6.1.0 (2023/09/26) +%% The LaTeX package tcolorbox - version 6.2.0 (2024/01/10) %% tcbvignette.code.tex: Code for ornamental frames %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2006-2023 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> +%% Copyright (c) 2006-2024 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> %% ------------------------------------------------------------------------------------------- %% %% This work may be distributed and/or modified under the @@ -17,7 +17,7 @@ %% %% This work consists of all files listed in README %% -\tcb@set@library@version{6.1.0} +\tcb@set@library@version{6.2.0} \tcbuselibrary{skins} diff --git a/macros/latex/contrib/tcolorbox/tcbxparse.code.tex b/macros/latex/contrib/tcolorbox/tcbxparse.code.tex index 22587ac90f..cf60ef0731 100644 --- a/macros/latex/contrib/tcolorbox/tcbxparse.code.tex +++ b/macros/latex/contrib/tcolorbox/tcbxparse.code.tex @@ -1,8 +1,8 @@ -%% The LaTeX package tcolorbox - version 6.1.0 (2023/09/26) +%% The LaTeX package tcolorbox - version 6.2.0 (2024/01/10) %% tcbxparse.code.tex: Code for xparse features %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2006-2023 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> +%% Copyright (c) 2006-2024 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,6 +18,6 @@ %% This work consists of all files listed in README %% %\makeatletter -\tcb@set@library@version{6.1.0} +\tcb@set@library@version{6.2.0} \RequirePackage{xparse}[2013/12/31] diff --git a/macros/latex/contrib/tcolorbox/tcolorbox-example-poster.pdf b/macros/latex/contrib/tcolorbox/tcolorbox-example-poster.pdf Binary files differindex cd31a6eb52..e39ddaa037 100644 --- a/macros/latex/contrib/tcolorbox/tcolorbox-example-poster.pdf +++ b/macros/latex/contrib/tcolorbox/tcolorbox-example-poster.pdf diff --git a/macros/latex/contrib/tcolorbox/tcolorbox-example-poster.tex b/macros/latex/contrib/tcolorbox/tcolorbox-example-poster.tex index 9c80fc806d..ffa291103b 100644 --- a/macros/latex/contrib/tcolorbox/tcolorbox-example-poster.tex +++ b/macros/latex/contrib/tcolorbox/tcolorbox-example-poster.tex @@ -1,8 +1,8 @@ -%% The LaTeX package tcolorbox - version 6.1.0 (2023/09/26) +%% The LaTeX package tcolorbox - version 6.2.0 (2024/01/10) %% tcolorbox-example-poster.tex: a poster example for tcolorbox %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2006-2023 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> +%% Copyright (c) 2006-2024 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> %% ------------------------------------------------------------------------------------------- %% %% This work may be distributed and/or modified under the diff --git a/macros/latex/contrib/tcolorbox/tcolorbox-example.pdf b/macros/latex/contrib/tcolorbox/tcolorbox-example.pdf Binary files differindex a2ebd3ede7..809b35a2ca 100644 --- a/macros/latex/contrib/tcolorbox/tcolorbox-example.pdf +++ b/macros/latex/contrib/tcolorbox/tcolorbox-example.pdf diff --git a/macros/latex/contrib/tcolorbox/tcolorbox-example.tex b/macros/latex/contrib/tcolorbox/tcolorbox-example.tex index 35a2e1de65..1adaa24d7e 100644 --- a/macros/latex/contrib/tcolorbox/tcolorbox-example.tex +++ b/macros/latex/contrib/tcolorbox/tcolorbox-example.tex @@ -1,8 +1,8 @@ -%% The LaTeX package tcolorbox - version 6.1.0 (2023/09/26) +%% The LaTeX package tcolorbox - version 6.2.0 (2024/01/10) %% tcolorbox-example.tex: an example for tcolorbox %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2006-2023 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> +%% Copyright (c) 2006-2024 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> %% ------------------------------------------------------------------------------------------- %% %% This work may be distributed and/or modified under the @@ -147,7 +147,7 @@ We have given Theorem \ref{theorem:summation} on page \pageref{theorem:summation fonttitle=\bfseries, title=Box with a watermark picture] Here, you see my nice box with a picture as a watermark. This picture is automatically resized to fit the dimensions - of my box. Instead of a picure, some text could be used or + of my box. Instead of a picture, some text could be used or arbitrary graphical code. See the documentation for more options. \end{tcolorbox} diff --git a/macros/latex/contrib/tcolorbox/tcolorbox-tutorial-poster.pdf b/macros/latex/contrib/tcolorbox/tcolorbox-tutorial-poster.pdf Binary files differindex b9398ca269..eb23961967 100644 --- a/macros/latex/contrib/tcolorbox/tcolorbox-tutorial-poster.pdf +++ b/macros/latex/contrib/tcolorbox/tcolorbox-tutorial-poster.pdf diff --git a/macros/latex/contrib/tcolorbox/tcolorbox-tutorial-poster.tex b/macros/latex/contrib/tcolorbox/tcolorbox-tutorial-poster.tex index cb97de9e58..ae550c5c6d 100644 --- a/macros/latex/contrib/tcolorbox/tcolorbox-tutorial-poster.tex +++ b/macros/latex/contrib/tcolorbox/tcolorbox-tutorial-poster.tex @@ -1,9 +1,9 @@ % \LaTeX-Main\ -%% The LaTeX package tcolorbox - version 6.1.0 (2023/09/26) +%% The LaTeX package tcolorbox - version 6.2.0 (2024/01/10) %% tcolorbox-tutorial-poster.tex: a tutorial for poster creation with tcolorbox %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2006-2023 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> +%% Copyright (c) 2006-2024 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> %% ------------------------------------------------------------------------------------------- %% %% This work may be distributed and/or modified under the diff --git a/macros/latex/contrib/tcolorbox/tcolorbox.doc.bib b/macros/latex/contrib/tcolorbox/tcolorbox.doc.bib index d67c8a362a..be1c60b666 100644 --- a/macros/latex/contrib/tcolorbox/tcolorbox.doc.bib +++ b/macros/latex/contrib/tcolorbox/tcolorbox.doc.bib @@ -2,8 +2,8 @@ author = {Carsten Heinz and Brooks Moses and Jobst Hoffmann}, title = {The Listings Package}, url = {https://mirror.ctan.org/macros/latex/contrib/listings/listings.pdf}, - version = {1.8d}, - date = {2020-03-24}, + version = {1.9}, + date = {2023-02-27}, language = {english} } @@ -11,7 +11,7 @@ author = {Rainer Sch{\"o}pf and Bernd Raichle and Chris Rowley}, title = {A New Implementation of {\LaTeX}'s verbatim and verbatim* Environments}, url = {https://mirror.ctan.org/macros/latex/required/tools/verbatim.pdf}, - date = {2001-03-12}, + date = {2023-11-06}, } @techreport{sturm:mathe1, @@ -72,9 +72,9 @@ @manual{tantau:beamer, author = {Till Tantau and Joseph Wright and Vedran Mileti\'{c}}, title = {The Beamer Class}, - subtitle = {User Guide for version 3.68}, + subtitle = {User Guide for version 3.71}, url = {https://mirrors.ctan.org/macros/latex/contrib/beamer/doc/beameruserguide.pdf}, - date = {2022-09-17}, + date = {2024-01-06}, } @@ -82,7 +82,7 @@ author = {David Carlisle}, title = {The file ltxdoc.dtx for use with \LaTeXe}, url = {https://mirror.ctan.org/macros/latex/base/ltxdoc.pdf}, - date = {2019-09-16} + date = {2023-03-28} } @@ -90,15 +90,15 @@ author = {David Carlisle}, title = {The tabularx package}, url = {https://mirror.ctan.org/macros/latex/required/tools/tabularx.pdf}, - date = {2020-01-15} + date = {2023-07-08} } -@manual{mittelbach:2011a, +@manual{mittelbach:doc, author = {Frank Mittelbach}, title = {The doc and shortvrb Packages}, url = {https://mirror.ctan.org/macros/latex/base/doc.dtx}, - date = {2011-06-30} + date = {2022-11-13} } @@ -106,18 +106,10 @@ author = {Frank Mittelbach}, title = {An environment for multicolumn output}, url = {https://mirror.ctan.org/macros/latex/required/tools/multicol.pdf}, - date = {2022-10-31}, + date = {2023-11-21}, } -@manual{breitenlohner:1998a, - author = {Peter Breitenlohner}, - title = {The $\varepsilon$-\TeX\ manual}, - version = {2}, - url = {https://mirrors.ctan.org/systems/doc/etex/etex_man.pdf}, - date = {1998-02}, -} - @manual{oberdiek:listingsutf8, author = {Heiko Oberdiek}, title = {The listingsutf8 package}, @@ -155,13 +147,13 @@ title = {The minted package}, subtitle = {Highlighted source code in \LaTeX}, url = {https://mirror.ctan.org/macros/latex/contrib/minted/minted.pdf}, - date = {2022-12-12}, + date = {2023-12-18}, } @online{pygments:web, title = {Pygments}, subtitle = {Python syntax highlighter}, - date = {2023}, + date = {2024}, url = {https://pygments.org/}, } @@ -169,7 +161,7 @@ author = {The \LaTeX3 Project}, title = {The xparse Package}, url = {https://mirror.ctan.org/macros/latex/contrib/l3packages/xparse.pdf}, - date = {2023-02-02}, + date = {2023-10-10}, } @@ -185,7 +177,7 @@ author = {Sebastian Rahtz and Heiko Oberdiek}, title = {Hypertext marks in \LaTeX: a manual for hyperref}, url = {https://mirrors.ctan.org/macros/latex/contrib/hyperref/doc/hyperref-doc.pdf}, - date = {2023-02-07}, + date = {2023-11-26}, language = {english} } @@ -194,7 +186,7 @@ author = {Heiko Oberdiek}, title = {The bookmark package}, url = {https://mirrors.ctan.org/macros/latex/contrib/bookmark/bookmark.pdf}, - date = {2020-11-06}, + date = {2023-12-10}, language = {english} } @@ -203,7 +195,7 @@ author = {Heiko Oberdiek}, title = {The zref package}, url = {https://mirrors.ctan.org/macros/latex/contrib/zref/zref.pdf}, - date = {2022-04-07}, + date = {2023-09-14}, language = {english} } @@ -211,9 +203,9 @@ @manual{barros:zref-clever, author = {Gustavo Barros}, title = {The zref-clever package}, - url = {https://mirrors.ctan.org/macros/latex/contrib/zref-clever/zref-clever.pdf}, - date = {2023-01-03}, - language = {english} + url = {https://mirrors.ctan.org/macros/latex/contrib/zref-clever/zref-clever-doc.pdf}, + date = {2023-11-14}, + language = {english} } diff --git a/macros/latex/contrib/tcolorbox/tcolorbox.doc.breakable.tex b/macros/latex/contrib/tcolorbox/tcolorbox.doc.breakable.tex index be89357f35..a86994c7e2 100644 --- a/macros/latex/contrib/tcolorbox/tcolorbox.doc.breakable.tex +++ b/macros/latex/contrib/tcolorbox/tcolorbox.doc.breakable.tex @@ -292,7 +292,7 @@ The |break at| option can be used to insert better break points by hand. unbroken box or the first part of a \emph{break sequence}. \item\docValue{none}: The break algorithm respects the target size of the given glue values - on the page. This was the inital value before version |3.34|. + on the page. This was the initial value before version |3.34|. \end{itemize} \begin{marker} Note that the box \emph{content} is not influenced by this option. @@ -510,7 +510,7 @@ and \refKey{/tcb/enlarge bottom at break by}. If a breakable box contains an \emph{upper part} and a \emph{lower part} and the break happens at the \emph{segmentation} between both parts, then \begin{itemize} - \item the segmenation line (or similar) is drawn as first element of the + \item the segmentation line (or similar) is drawn as first element of the partial box containing the \emph{lower part}, if \refKey{/tcb/segmentation at break} is set to be |true|. \item the segmenation line (or similar) is not drawn at all, if @@ -773,7 +773,7 @@ automatically but set manually. information and just use it as you would use |\pagebreak|.\par\smallskip For an \emph{unbreakable box}, \refCom{tcbbreak} is identical to insert |\par|, i.e.\ it just starts a new paragraph.\par\smallskip - Also see \refKey{/tcb/break at} for defining height dependend breaks. + Also see \refKey{/tcb/break at} for defining height dependent breaks. \begin{dispListing} % \usepackage{lipsum,multicol} % preamble diff --git a/macros/latex/contrib/tcolorbox/tcolorbox.doc.coremacros.tex b/macros/latex/contrib/tcolorbox/tcolorbox.doc.coremacros.tex index 4008a00a8f..0847f09775 100644 --- a/macros/latex/contrib/tcolorbox/tcolorbox.doc.coremacros.tex +++ b/macros/latex/contrib/tcolorbox/tcolorbox.doc.coremacros.tex @@ -281,7 +281,8 @@ This is a tcolorbox. the specified \meta{content}.\\ Note that \refKey{/tcb/savedelimiter} is set to the given \meta{name} automatically. - Also note that \refKey{/tcb/saveto} and \refKey{/tcb/savelowerto} + Also note that \refKey{/tcb/saveto}, \refKey{/tcb/savelowerto}, + and \refKey{/tcb/redirectlowerto} cannot be used with \refCom{NewTotalTColorBox} and friends.\\ The \meta{init options} allow setting up automatic numbering, see Section \ref{sec:initkeys} from page \pageref{sec:initkeys}. diff --git a/macros/latex/contrib/tcolorbox/tcolorbox.doc.coreoptions.tex b/macros/latex/contrib/tcolorbox/tcolorbox.doc.coreoptions.tex index 9144696d2c..e20936d76b 100644 --- a/macros/latex/contrib/tcolorbox/tcolorbox.doc.coreoptions.tex +++ b/macros/latex/contrib/tcolorbox/tcolorbox.doc.coreoptions.tex @@ -4,7 +4,11 @@ \section{Option Keys}\label{sec:optkeys}% \tcbset{external/prefix=external/coreoptions_}% For the \meta{options} in \refEnv{tcolorbox} respectively \refCom{tcbset} -the following |pgf| keys can be applied. The key tree path |/tcb/| is not to +the following |pgf| keys can be applied% +\footnote{Strictly speaking, they are \texttt{pgfkeys} keys. + The \texttt{pgfkeys} package is auto-loaded by \texttt{pgf} and is + documented in \cite[Part~VII]{tantau:tikz_and_pgf}.}. +The key tree path |/tcb/| is not to be used inside these macros. It is easy to add your own style keys using the syntax for |pgf| keys, see \cite{tantau:tikz_and_pgf,sturm:latex} or the examples starting from page~\pageref{sec:latextutorial}. @@ -272,8 +276,10 @@ This is a \textbf{tcolorbox} (but invisible). This is the counterpart of \refKey{/tcb/savelowerto}, but it saves not only the upper part but the whole content. If a lower part is present, it is also saved including \refCom{tcblower}. + An empty \meta{file name} deactivates \refKey{/tcb/saveto}. \begin{marker} - This option cannot be combined with \refKey{/tcb/savelowerto}. + This option cannot be combined with \refKey{/tcb/savelowerto} or + \refKey{/tcb/redirectlowerto}. \end{marker} \begin{exdispExample}{saveto_1} @@ -315,6 +321,12 @@ Now, we load the saved text: \item\docValue{ignored}: the lower part is not used (here). \end{itemize} The last two values are usually applied in connection with |savelowerto|. + + \begin{marker} + The lower part is always typeset into a box which is used or dropped + accordingly. The only exception is applying \refKey{/tcb/redirectlowerto}. + \end{marker} + \begin{exdispExample}{lowerbox} \begin{tcolorbox}[lowerbox=invisible,colback=white] This is a \textbf{tcolorbox}. @@ -331,8 +343,14 @@ This is the lower part (but ignored). \end{docTcbKey} +\clearpage \begin{docTcbKey}[][doc updated=2014-11-28]{savelowerto}{=\meta{file name}}{no default, initially empty} Saves the content of the lower part into a file for an optional later usage. + An empty \meta{file name} deactivates \refKey{/tcb/savelowerto}. + \begin{marker} + This option cannot be combined with \refKey{/tcb/saveto}. + \end{marker} + \begin{exdispExample}{savelowerto} \begin{tcolorbox}[lowerbox=invisible,savelowerto=\jobname_bspsave.tex,colback=white] This is a \textbf{tcolorbox}. @@ -346,18 +364,23 @@ Now, we load the saved text:\\ \end{exdispExample} \end{docTcbKey} +\medskip -\clearpage \begin{docTcbKey}[][doc new=2023-07-17]{redirectlowerto}{=\meta{file name}}{no default, initially empty} This is a combination of \refKey{/tcb/savelowerto} and \refKey{/tcb/lowerbox}|=|\docValue{ignored} \emph{and additionally} avoids typesetting the content of the lower part. This can be useful, if the lower part contains counters or similar. + An empty \meta{file name} deactivates the saving, but the \refKey{/tcb/lowerbox} + setting will still be \docValue{ignored}. + \begin{marker} + This option cannot be combined with \refKey{/tcb/saveto}. + \end{marker} \begin{exdispExample}{redirectlowerto} \setcounter{enumi}{1} Test counter: \theenumi -\begin{tcolorbox}[redirectlowerto=\jobname_bspsave.tex,colback=white] +\begin{tcolorbox}[redirectlowerto=\jobname_bspsave2.tex,colback=white] This is a \textbf{tcolorbox}. \tcblower This is the lower part.\stepcounter{enumi} @@ -365,7 +388,7 @@ New value of test counter: \theenumi. \end{tcolorbox} Now, we load the saved text:\\ -\input{\jobname_bspsave.tex} +\input{\jobname_bspsave2.tex} \end{exdispExample} \end{docTcbKey} @@ -425,7 +448,7 @@ This is the lower part. \clearpage \begin{docTcbKey}{savedelimiter}{=\meta{name}}{no default, initially \texttt{tcolorbox}} Used in connection with new environment definitions which extend - |tcolorbox| and use or allow the option |savelowerto|. + |tcolorbox| and use or allow the option \refKey{/tcb/savelowerto} or \refKey{/tcb/redirectlowerto}. To catch the end of the new box environment \meta{name} has to be the name of this environment. Additionally, the environment definition has to use |\tcolorbox| instead of @@ -433,7 +456,7 @@ This is the lower part. \begin{exdispExample}{savedelimiter1} \newenvironment{mybox}[1]{% \tcolorbox[savedelimiter=mybox, - savelowerto=\jobname_bspsave2.tex,lowerbox=ignored, + savelowerto=\jobname_bspsave3.tex,lowerbox=ignored, colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries, title={#1}]}% {\endtcolorbox} @@ -446,17 +469,17 @@ Saved lower part! Now, the saved part is used: \begin{tcolorbox}[colback=green!5] -\input{\jobname_bspsave2.tex} +\input{\jobname_bspsave3.tex} \end{tcolorbox} \end{exdispExample} \enlargethispage*{1cm} -The |savedelimiter| is used implicitely with \refCom{newtcolorbox} which +The |savedelimiter| is used implicitly with \refCom{newtcolorbox} which allows a more convenient usage: \begin{exdispExample}{savedelimiter2} \newtcolorbox{mybox}[1]{% - savelowerto=\jobname_bspsave2.tex,lowerbox=ignored, + savelowerto=\jobname_bspsave4.tex,lowerbox=ignored, colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries, title={#1}}% @@ -468,7 +491,7 @@ Saved lower part! Now, the saved part is used: \begin{tcolorbox}[colback=green!5] -\input{\jobname_bspsave2.tex} +\input{\jobname_bspsave4.tex} \end{tcolorbox} \end{exdispExample} \end{docTcbKey} @@ -2631,6 +2654,99 @@ Lower part. \end{exdispExample*} \end{docTcbKey} +\clearpage + +\begin{docTcbKeys}[ + doc new = 2023-10-16, + doc description = style, + ] + { + { doc name = environment upper, doc parameter={=\meta{name}} }, + { doc name = environment upper args, doc parameter={=\marg{name}\marg{code}} } + } + This shortcut style sets \refKey{/tcb/before upper*} + to |\begin|\marg{name} and \refKey{/tcb/after upper*} + to |\end|\marg{name}, i.e. the upper part is enclosed by the environment \meta{name}. + The second variant also places \meta{code} after |\begin|\marg{name}. +\begin{exdispExample}{environment_upper_1} +\begin{tcolorbox}[colback=yellow!30, colframe=yellow!80!black, + environment upper=itemize +] + \item one + \item two +\end{tcolorbox} +\end{exdispExample} + Note that you may need \emph{additional} brackets around \meta{code}, if + \meta{code} contains some para\-meter(s) for the environment \meta{name}. +\begin{exdispExample}{environment_upper_2} +\begin{tcolorbox}[center upper, + colback=yellow!30, colframe=yellow!80!black, + environment upper args={tabular}{{cc}} +] + one & two \\ + three & four\\ +\end{tcolorbox} +\end{exdispExample} +\begin{exdispExample}{environment_upper_3} +\begin{tcolorbox}[colback=yellow!30, colframe=yellow!80!black, + environment upper args = {list}{{\bfseries Fact:} + {\setlength\itemsep{0pt}\setlength\parsep{0pt}}}, +] + \item Blue is red + \item Red is green +\end{tcolorbox} +\end{exdispExample} +\end{docTcbKeys} + + +\begin{marker} +\refKey{/tcb/environment upper} and friends (following) cannot be used to +wrap another |tcolorbox|-based environment, i.e. never use +|/tcb/environment upper=tcolorbox| or +|/tcb/environment upper=etc-derived-from-tcolorbox|. +\end{marker} + + +\clearpage + +\begin{docTcbKeys}[ + doc new = 2023-10-16, + doc description = style, + ] + { + { doc name = environment lower, doc parameter={=\meta{name}} }, + { doc name = environment lower args, doc parameter={=\marg{name}\marg{code}} } + } + This shortcut style sets \refKey{/tcb/before lower*} + to |\begin|\marg{name} and \refKey{/tcb/after lower*} + to |\end|\marg{name}, i.e. the lower part is enclosed by the environment \meta{name}. + The second variant also places \meta{code} after |\begin|\marg{name}. + Note that you may need \emph{additional} brackets around \meta{code}, if + \meta{code} contains some para\-meter(s) for the environment \meta{name}. + + See \refKey{/tcb/environment upper} for analog examples. +\end{docTcbKeys} + + +\begin{docTcbKeys}[ + doc new = 2023-10-16, + doc description = style, + ] + { + { doc name = environment title, doc parameter={=\meta{name}} }, + { doc name = environment title args, doc parameter={=\marg{name}\marg{code}} } + } + This shortcut style sets \refKey{/tcb/before title*} + to |\begin|\marg{name} and \refKey{/tcb/after title*} + to |\end|\marg{name}, i.e. the title text is enclosed by the environment \meta{name}. + The second variant also places \meta{code} after |\begin|\marg{name}. + Note that you may need \emph{additional} brackets around \meta{code}, if + \meta{code} contains some para\-meter(s) for the environment \meta{name}. + + See \refKey{/tcb/environment upper} for analog examples. +\end{docTcbKeys} + + \clearpage \subsection{Overlays}\label{subsec:overlays} @@ -3848,7 +3964,7 @@ in the following order. Following options overwrite preceding options. \item For layer 2 and above (nested boxes), a \refKey{/tcb/reset} followed by \refKey{/tcb/every box} option list is applied. Every resettable options given by a preceding \refCom{tcbset} - and by the sourrounding box(es) are reset. + and by the surrounding box(es) are reset. \end{itemize} \item The \meta{options} given to the |tcolorbox| are applied. Or, if the box was generated by \refCom{newtcolorbox} or friends, @@ -4013,7 +4129,7 @@ This is a tcolorbox. \clearpage \subsection{Text Characteristics} -\begin{docTcbKey}[][doc updated=2015-10-14]{parbox}{\colOpt{=true\textbar false}}{default |true|, initially |true|} +\begin{docTcbKey}[][doc updated=2024-01-10]{parbox}{\colOpt{=true\textbar false}}{default |true|, initially |true|} The text inside a |tcolorbox| is formatted using a \LaTeX\ |minipage| if the box is unbreakable. If breakable, the box tries a mimicry of a |minipage|. In a |minipage| or |parbox|, paragraphs are formatted slightly different @@ -4072,7 +4188,7 @@ targeting different box types and they do not blend very well. \subsection{Files} \begin{docTcbKey}{tempfile}{=\meta{file name}}{no default, initially \cs{jobname.tcbtemp}} Sets \meta{file name} as name for the temporary file which is used inside - \refEnv{tcbwritetemp} and \refCom{tcbusetemp} implicitely. + \refEnv{tcbwritetemp} and \refCom{tcbusetemp} implicitly. \end{docTcbKey} \clearpage @@ -4430,7 +4546,7 @@ of a page. \refKey{/tcb/toggle enlargement}, and \refKey{/tcb/if odd page} automatically set |check odd page|, but for -\refCom{tcbifoddpage} this option has to be set explicitely. +\refCom{tcbifoddpage} this option has to be set explicitly. \end{docTcbKey} \enlargethispage*{1cm} @@ -4451,7 +4567,7 @@ If a box is \refKey{/tcb/breakable}, using \refKey{/tcb/if odd page} only acts upon the \emph{first} box. If the setting should be repeated for every partial box of the break sequence, the option should be packed into \refKey{/tcb/extras}. In this case, \refKey{/tcb/check odd page} -has to be set explicitely! Also see \refKey{/tcb/if odd page*}. +has to be set explicitly! Also see \refKey{/tcb/if odd page*}. \end{marker} \end{docTcbKey} @@ -4638,7 +4754,7 @@ Sets (nearly) all |tcolorbox| settings (including loaded libraries) back to thei \emph{plus} any settings given by \refCom{tcbsetforeverylayer}. \refKey{/tcb/savedelimiter}, \refKey{/tcb/capture}, and \refKey{/tcb/shield externalize} keep their values. -Also, all raster values (see \Vref{sec:raster}) are not resetted. +Also, all raster values (see \Vref{sec:raster}) are not reset. This option is useful for boxes in boxes where the inner box should not inherit the settings of the outer box. diff --git a/macros/latex/contrib/tcolorbox/tcolorbox.doc.documentation.tex b/macros/latex/contrib/tcolorbox/tcolorbox.doc.documentation.tex index ff9a02f154..9934cd5c86 100644 --- a/macros/latex/contrib/tcolorbox/tcolorbox.doc.documentation.tex +++ b/macros/latex/contrib/tcolorbox/tcolorbox.doc.documentation.tex @@ -18,7 +18,6 @@ This also loads the library \mylib{skins}, see \Vref{sec:skins}, the library \mylib{raster}, see \Vref{sec:raster}, the library \mylib{listings}, see \Vref{sec:listings}, -the library \mylib{xparse}, see \Vref{sec:xparse}, and a bunch of packages, namely |makeidx|, |marginnote|, |refcount|, and |hyperref|. The packages |pifont| and |marvosym| should be installed for some symbols, but @@ -73,10 +72,9 @@ For |minted| \cite{poore:minted} support, load: \end{docCommand} \end{dispExample} \begin{dispExample} -\begin{docCommand}[color definition=blue]{foomakedocSubKey*}% - {\marg{name}\marg{key path}} - Creates a new environment \meta{name} based on \refEnv{docKey} for the - documentation of keys with the given \meta{key path}. +\begin{docCommand}[doc no index,color definition=blue]{section}% + {\sarg\marg{title}} + Starts a section. The star variant is unnumbered. \end{docCommand} \end{dispExample} \end{docEnvironment} @@ -98,14 +96,12 @@ For |minted| \cite{poore:minted} support, load: \begin{dispExample} \begin{docCommands}[ doc no index, % no index entries for this example - doc name = newtheorem, - doc parameter = \marg{envname}, + doc name = newtheorem ] { - { }, + { doc parameter = \sarg\marg{envname} }, { doc parameter = \marg{envname}\oarg{numbered within} }, - { doc parameter = \oarg{numbered like}\marg{envname} }, - { doc name = newtheorem* }, + { doc parameter = \oarg{numbered like}\marg{envname} } } example \end{docCommands} @@ -352,7 +348,7 @@ The macro \docAuxCommand{fooaux} holds some interesting data. } Documents an auxiliary or minor \LaTeX\ environment with given \meta{name}. The given \meta{options} are set with \refCom{tcbset}. - This macro is automatically indexed indexed for \refCom{docAuxEnvironment} + This macro is automatically indexed for \refCom{docAuxEnvironment} and has no index entry for \refCom{docAuxEnvironment*}. \begin{dispExample} The environment \docAuxEnvironment{fooauxenv} holds some interesting data. @@ -452,7 +448,7 @@ This is a \cs{foocommand}. \end{docCommand} \begin{docCommand}{meta}{\marg{text}} - Macro from |doc| \cite{mittelbach:2011a} to typeset a meta \meta{text}. + Macro from |doc| \cite{mittelbach:doc} to typeset a meta \meta{text}. The library overwrites the original macro. \begin{dispExample} This is a \meta{text}. @@ -564,10 +560,11 @@ heading line. Optionally, such a box can be split in an upper and a lower part. \end{docEnvironment} \clearpage -\begin{docCommand}[doc updated=2020-04-22]{tcbmakedocSubKey}{\marg{name}\marg{key path}} +\begin{docCommand}[doc updated=2023-12-01]{tcbmakedocSubKey}{\oarg{options}\marg{name}\marg{key path}} Creates a new environment \meta{name} based on \refEnv{docKey} for the documentation of keys with the given \meta{key path} as root. The new environment \meta{name} takes the same para\-meters as \refEnv{docKey} itself. + The given \meta{options} are prepended to options of the \meta{name} environment. A second starred environment \meta{name} is also created, which is identical to \meta{name} but without index entry. \begin{dispExample} @@ -584,10 +581,12 @@ Some key (not indexed). \end{docCommand} -\begin{docCommand}[doc new=2020-04-22]{tcbmakedocSubKeys}{\marg{name}\marg{key path}} +\begin{docCommand}[doc new and updated={2020-04-22}{2023-12-01}]{tcbmakedocSubKeys}{\oarg{options}\marg{name}\marg{key path}} Creates a new environment \meta{name} based on \refEnv{docKeys} for the documentation of keys with the given \meta{key path} as root. The new environment \meta{name} takes the same para\-meters as \refEnv{docKeys} itself. + The given \meta{options} are prepended to options of the \meta{name} environment + (see \refKey{/tcb/index key formatter} for an example). \begin{dispExample} \tcbmakedocSubKeys{docFooKeys}{foo} @@ -826,6 +825,85 @@ with another note. \clearpage +\begin{docTcbKeys}[ + doc new = {2023-12-01}, + doc name = doc key prefix, + doc parameter = {=\meta{key prefix}}, + doc description = {no default, initially |/|}, + ]{} + Sets the \meta{key prefix} (root path) of the key to document. + This prefix is prepended to \refKey{/tcb/doc keypath}, if + \refKey{/tcb/doc keypath} is not empty. + The default |/| setting is intended for |pgfkeys|. + For |l3keys|, setting \refKey{/tcb/doc key prefix} to be empty is more + appropriate, since their path starts with a module name without |/|. +\begin{dispExample} +\begin{docKeys}[ + doc no index, % no index entries for this example + doc key prefix = , + doc keypath = tcobox,% module name + doc name = my_l3_key, + doc parameter = {=\meta{some value}}, + doc description = example, + ] {} + Documentation of a key using |l3keys|. +\end{docKeys} +\end{dispExample} +\end{docTcbKeys} + + + +\begin{docTcbKeys}[ + doc new = {2023-12-01}, + doc parameter = \colOpt{=\meta{macro}}, + doc description = {no default, initially empty}, + ]{ + { + doc name = index key formatter, + }, + { + doc name = index keys formatter, + } + } +Sets \meta{macro} as formatter for the text given by +\refKey{/tcb/doclang/key} or +\refKey{/tcb/doclang/keys} inside the index. +The \meta{macro} has to take one mandatory +argument (the language text). +The intended purpose is to differentiate between different sorts of +keys, if necessary, e.g.\ between |pgfkeys| and |l3keys|. +If these options are used without value, the formatters are reset to +their standard behavior. + +\begin{dispExample} +% See index of this documentation to recognize the effect +\newcommand{\myFormatPgfkeysIndex}[1]{#1 (\textsf{pgfkeys})} +\newcommand{\myFormatExplkeysIndex}[1]{#1 (\textsf{l3keys})} + +\tcbmakedocSubKey[ + index key formatter=\myFormatPgfkeysIndex, + index keys formatter=\myFormatPgfkeysIndex + ]{docFooPgfkey}{foopgf} +\tcbmakedocSubKey[ + doc key prefix=, + index key formatter=\myFormatExplkeysIndex, + index keys formatter=\myFormatExplkeysIndex + ]{docFooExplkey}{fooexpl} + +\begin{docFooPgfkey}{foo pgf}{=\meta{name}}{no default, initially empty} + content +\end{docFooPgfkey} + +\begin{docFooExplkey}{foo expl}{=\meta{name}}{no default, initially empty} + content +\end{docFooExplkey} +\end{dispExample} +\end{docTcbKeys} + + + +\clearpage + \begin{docTcbKey}{doc description}{=\meta{description}}{no default, initially empty} Sets a (short!) additional \meta{description} for \refEnv{docCommand}, \refEnv{docEnvironment}, or \refEnv{docPathOperation}. @@ -871,7 +949,7 @@ hand side if too long. Linebreaks can be used inside the \meta{text}. \begin{docTcbKey}[][doc new={2020-04-23}]{doc sort index}{=\meta{text}}{no default, initially unset} If used inside the option list of \refEnv{docCommand}, \refEnv{docEnvironment}, \refEnv{docKey}, etc, then \meta{text} is used - for as sort key for the index instead of the name of the definition. + as sort key for the index instead of the name of the definition. \begin{dispListing} \begin{docCommands}[ doc name = l_tcobox_example_tl, @@ -907,7 +985,7 @@ which is commented by a note inside the margin. \end{docTcbKey} \begin{docTcbKey}[][doc new=2014-09-19]{doc new}{=\meta{date}}{style, no default} - Adds a a marginnote with a \enquote{New: \meta{date}} message at the beginning of + Adds a marginnote with a \enquote{New: \meta{date}} message at the beginning of the upper box part. The intended use is inside the option list of \refEnv{docCommand}, \refEnv{docEnvironment}, etc. \makeatletter\renewcommand*{\tcbdocnew}[1]{\kvtcb@text@new: #1}\makeatother% @@ -1096,7 +1174,7 @@ The is an example text. \tcbset{doc head key={boxsep=4pt,arc=4pt,boxrule=0.6pt, frame style=fill,interior style=fill,colframe=green!50!black}} -\begin{docKey}{/foo/myKey}{}{no value} +\begin{docKey}[foo]{myKey}{}{no value} This is the documentation of \refKey{/foo/myKey}. \end{docKey} \end{dispExample} diff --git a/macros/latex/contrib/tcolorbox/tcolorbox.doc.external.tex b/macros/latex/contrib/tcolorbox/tcolorbox.doc.external.tex index d1de4f3a15..b7a10c2331 100644 --- a/macros/latex/contrib/tcolorbox/tcolorbox.doc.external.tex +++ b/macros/latex/contrib/tcolorbox/tcolorbox.doc.external.tex @@ -368,7 +368,7 @@ Note that this option is ignored for \refKey{/tcb/externalize listing}. initially |true|} If set to |true|, the |\begin| and |\end| code of \refKey{/tcb/external/environment} is appended with a percent sign. For verbatim environments, this option -typically has to be se to |false|. +typically has to be set to |false|. \end{extTcbKey} @@ -391,9 +391,7 @@ Note that this option is ignored for \refKey{/tcb/externalize listing}. \begin{extTcbKey}[][doc new=2015-03-11]{compiler}{=\meta{text}}{no default, initially \texttt{pdflatex}} - Sets the name of the compiler for the snippets. Note that this compiler - has to support the |\pdfmdfivesum| primitive e.g. using the - |pdftexcmds| package. This should work for |xelatex| and |lualatex|. + Sets the name of the compiler for the snippets. \end{extTcbKey} \begin{extTcbKey}[][doc new=2015-03-11]{runs}{=\meta{number}}{no default, @@ -605,14 +603,17 @@ This is my \LaTeX\ box. not created.}\\ Depending on operating system and compiler, an |external| subdirectory is automatically created or not. If not, create such a directory manually - or add the following to your document\footnote{The |shellesc| package - is loaded automatically by the library.}: + or add the following to your document: \begin{dispListing} -\ShellEscape{mkdir external} +\ExplSyntaxOn +\sys_shell_now:n { mkdir~external } +\ExplSyntaxOff \end{dispListing} or \begin{dispListing} -\ShellEscape{mkdir -p external} +\ExplSyntaxOn +\sys_shell_now:n { mkdir~-p~external } +\ExplSyntaxOff \end{dispListing} If the combination of \refKey{/tcb/external/prefix} and chosen snippet name points to another subdirectory than |external|, this has to be diff --git a/macros/latex/contrib/tcolorbox/tcolorbox.doc.fitting.tex b/macros/latex/contrib/tcolorbox/tcolorbox.doc.fitting.tex index d0761ca03d..14f9e7b577 100644 --- a/macros/latex/contrib/tcolorbox/tcolorbox.doc.fitting.tex +++ b/macros/latex/contrib/tcolorbox/tcolorbox.doc.fitting.tex @@ -392,7 +392,7 @@ The \refCom{tcboxfit} macro uses this algorithm by default. \begin{tcolorbox}[fit basedim=7pt, fontupper=\normalsize, fit fontsize macros] -The relative relative font size macros +The relative font size macros are also usable without the \textit{fit} algorithm.\par {\Huge Adapted Huge} --- @@ -530,7 +530,7 @@ are adapted. In the following, adapting the font size means adapting \begin{marker} The used font has to be freely scalable for this method! Other content than text is not scaled down. - The aspect ratio is fully garanteed. + The aspect ratio is fully guaranteed. \end{marker} \item\docValue{fontsize*}:\tcbdocmarginnote{\tcbdocnew{2014-10-29}} First, the \docValue{fontsize} algorithm is applied. If the font was scaled down @@ -538,7 +538,7 @@ are adapted. In the following, adapting the font size means adapting \begin{marker} The used font has to be freely scalable for this method! Other content than text may be slightly rescaled. - The aspect ratio cannot be fully garanteed. + The aspect ratio cannot be fully guaranteed. \end{marker} \item\docValue{areasize}: The algorithm calculates the area size for the text without scaling the font. @@ -546,14 +546,14 @@ are adapted. In the following, adapting the font size means adapting steps. Finally, it is scaled down with a standard |\resizebox| macro. \begin{marker} The used font has not to be scalable. Every box content is scaled down. - The aspect ratio cannot be fully garanteed. + The aspect ratio cannot be fully guaranteed. \end{marker} \item\docValue{areasize*}:\tcbdocmarginnote{\tcbdocnew{2014-10-29}} The \docValue{areasize} algorithm is applied, but if the content was scaled down and the resulting height is too small, the box is squeezed to fit the area. \begin{marker} The used font has not to be scalable. Every box content is scaled down. - The aspect ratio cannot be fully garanteed. + The aspect ratio cannot be fully guaranteed. \end{marker} \item\docValue{hybrid}: First, this algorithm estimates the needed font size in one or two steps. @@ -561,7 +561,7 @@ are adapted. In the following, adapting the font size means adapting \begin{marker} The used font has to be freely scalable for this method! Other content than text may be slightly rescaled. - The aspect ratio cannot be fully garanteed. + The aspect ratio cannot be fully guaranteed. \end{marker} \item\docValue{hybrid*}:\tcbdocmarginnote{\tcbdocnew{2014-10-29}} First, this algorithm estimates the needed font size in one or two steps. @@ -569,7 +569,7 @@ are adapted. In the following, adapting the font size means adapting \begin{marker} The used font has to be freely scalable for this method! Other content than text may be slightly rescaled. - The aspect ratio cannot be fully garanteed. + The aspect ratio cannot be fully guaranteed. \end{marker} \item\docValue{squeeze}: The text box is brutally scaled down to fit. @@ -659,7 +659,7 @@ if necessary. switched off (including the ones for the finally used box). \item\docValue{on}: All warnings for all auxiliary boxes are displayed. \item\docValue{final}: Only warnings for the finally used box are displayed. - Note that an additional box has to be contructed for theses messages. + Note that an additional box has to be constructed for these messages. \end{itemize} \end{docTcbKey} diff --git a/macros/latex/contrib/tcolorbox/tcolorbox.doc.graphics.tex b/macros/latex/contrib/tcolorbox/tcolorbox.doc.graphics.tex index e99c8271b7..fe441d4821 100644 --- a/macros/latex/contrib/tcolorbox/tcolorbox.doc.graphics.tex +++ b/macros/latex/contrib/tcolorbox/tcolorbox.doc.graphics.tex @@ -104,6 +104,7 @@ The auxiliary macro \docAuxCommand{imagepage} may be used inside \begin{docTcbKey}[][doc new and updated={2014-11-14}{2018-03-18}]{graphics options}{=\meta{options}}{no default, initially empty} Used for \refCom{tcbincludegraphics} and \refCom{tcbincludepdf} to specify |\includegraphics| \meta{options}. +Note that \meta{options} will be fully expanded. \begin{dispExample} % \tcbuselibrary{raster} diff --git a/macros/latex/contrib/tcolorbox/tcolorbox.doc.hooks.tex b/macros/latex/contrib/tcolorbox/tcolorbox.doc.hooks.tex index 5d8c115be9..8d5971c387 100644 --- a/macros/latex/contrib/tcolorbox/tcolorbox.doc.hooks.tex +++ b/macros/latex/contrib/tcolorbox/tcolorbox.doc.hooks.tex @@ -132,6 +132,104 @@ from page \pageref{subsec:contentadditions}. Prepends the given \meta{code} to \refKey{/tcb/after lower} or \refKey{/tcb/after lower*} \emph{after} the content of the lower part. \end{docTcbKey} +\clearpage + +\begin{docTcbKeys}[ + doc new = 2023-11-13, + doc description = style, + ] + { + { doc name = environment title app, doc parameter={=\meta{name}} }, + { doc name = environment title args app, doc parameter={=\marg{name}\marg{code}} } + } + This shortcut style sets \refKey{/tcb/before title app} + to |\begin|\marg{name} and \refKey{/tcb/after title pre} + to |\end|\marg{name}, i.e. the title text is enclosed by the environment \meta{name}. + The second variant also places \meta{code} after |\begin|\marg{name}. + Note that you may need \emph{additional} brackets around \meta{code}, if + \meta{code} contains some para\-meter(s) for the environment \meta{name}. +\end{docTcbKeys} + +\begin{docTcbKeys}[ + doc new = 2023-11-13, + doc description = style, + ] + { + { doc name = environment title pre, doc parameter={=\meta{name}} }, + { doc name = environment title args pre, doc parameter={=\marg{name}\marg{code}} } + } + This shortcut style sets \refKey{/tcb/before title pre} + to |\begin|\marg{name} and \refKey{/tcb/after title app} + to |\end|\marg{name}, i.e. the title text is enclosed by the environment \meta{name}. + The second variant also places \meta{code} after |\begin|\marg{name}. + Note that you may need \emph{additional} brackets around \meta{code}, if + \meta{code} contains some para\-meter(s) for the environment \meta{name}. +\end{docTcbKeys} + +\begin{docTcbKeys}[ + doc new = 2023-11-13, + doc description = style, + ] + { + { doc name = environment upper app, doc parameter={=\meta{name}} }, + { doc name = environment upper args app, doc parameter={=\marg{name}\marg{code}} } + } + This shortcut style sets \refKey{/tcb/before upper app} + to |\begin|\marg{name} and \refKey{/tcb/after upper pre} + to |\end|\marg{name}, i.e. the upper part is enclosed by the environment \meta{name}. + The second variant also places \meta{code} after |\begin|\marg{name}. + Note that you may need \emph{additional} brackets around \meta{code}, if + \meta{code} contains some para\-meter(s) for the environment \meta{name}. +\end{docTcbKeys} + +\begin{docTcbKeys}[ + doc new = 2023-11-13, + doc description = style, + ] + { + { doc name = environment upper pre, doc parameter={=\meta{name}} }, + { doc name = environment upper args pre, doc parameter={=\marg{name}\marg{code}} } + } + This shortcut style sets \refKey{/tcb/before upper pre} + to |\begin|\marg{name} and \refKey{/tcb/after upper app} + to |\end|\marg{name}, i.e. the upper part is enclosed by the environment \meta{name}. + The second variant also places \meta{code} after |\begin|\marg{name}. + Note that you may need \emph{additional} brackets around \meta{code}, if + \meta{code} contains some para\-meter(s) for the environment \meta{name}. +\end{docTcbKeys} + +\begin{docTcbKeys}[ + doc new = 2023-11-13, + doc description = style, + ] + { + { doc name = environment lower app, doc parameter={=\meta{name}} }, + { doc name = environment lower args app, doc parameter={=\marg{name}\marg{code}} } + } + This shortcut style sets \refKey{/tcb/before lower app} + to |\begin|\marg{name} and \refKey{/tcb/after lower pre} + to |\end|\marg{name}, i.e. the lower part is enclosed by the environment \meta{name}. + The second variant also places \meta{code} after |\begin|\marg{name}. + Note that you may need \emph{additional} brackets around \meta{code}, if + \meta{code} contains some para\-meter(s) for the environment \meta{name}. +\end{docTcbKeys} + +\begin{docTcbKeys}[ + doc new = 2023-11-13, + doc description = style, + ] + { + { doc name = environment lower pre, doc parameter={=\meta{name}} }, + { doc name = environment lower args pre, doc parameter={=\marg{name}\marg{code}} } + } + This shortcut style sets \refKey{/tcb/before lower pre} + to |\begin|\marg{name} and \refKey{/tcb/after lower app} + to |\end|\marg{name}, i.e. the lower part is enclosed by the environment \meta{name}. + The second variant also places \meta{code} after |\begin|\marg{name}. + Note that you may need \emph{additional} brackets around \meta{code}, if + \meta{code} contains some para\-meter(s) for the environment \meta{name}. +\end{docTcbKeys} + \clearpage \subsection{Embedding into the Surroundings} diff --git a/macros/latex/contrib/tcolorbox/tcolorbox.doc.magazine.tex b/macros/latex/contrib/tcolorbox/tcolorbox.doc.magazine.tex index 2fb03f3893..47102b826f 100644 --- a/macros/latex/contrib/tcolorbox/tcolorbox.doc.magazine.tex +++ b/macros/latex/contrib/tcolorbox/tcolorbox.doc.magazine.tex @@ -174,7 +174,7 @@ to reset the box array counter.\enlargethispage*{2cm} If the first box part should fill the rest of the available space of the current page, you can use |\pagegoal-\pagetotal| minus some distance for the first element of \refKey{/tcb/break at}. You may want to have some -additional distance to the preceeding text. +additional distance to the preceding text. \begin{dispListing} % \usepackage{lipsum} diff --git a/macros/latex/contrib/tcolorbox/tcolorbox.doc.poster.tex b/macros/latex/contrib/tcolorbox/tcolorbox.doc.poster.tex index 85436abcd7..085d789a36 100644 --- a/macros/latex/contrib/tcolorbox/tcolorbox.doc.poster.tex +++ b/macros/latex/contrib/tcolorbox/tcolorbox.doc.poster.tex @@ -16,7 +16,7 @@ similar looking results and may be more appropriate depending on the actual project. \begin{itemize} \item The \mylib{raster} library has a flow oriented concept, just like a - convential text flow. The text flow (box flow) is a merely endless ribbon + conventional text flow. The text flow (box flow) is a merely endless ribbon which gets broken into lines (and paragraphs) and the lines are broken into pages. \mylib{raster} shapes the boxes to convenient sizes to fill lines and pages in a pleasant way. diff --git a/macros/latex/contrib/tcolorbox/tcolorbox.doc.raster.tex b/macros/latex/contrib/tcolorbox/tcolorbox.doc.raster.tex index a2eb8ac395..59d89a7a11 100644 --- a/macros/latex/contrib/tcolorbox/tcolorbox.doc.raster.tex +++ b/macros/latex/contrib/tcolorbox/tcolorbox.doc.raster.tex @@ -7,12 +7,6 @@ The library is loaded by a package option or inside the preamble by: \begin{dispListing} \tcbuselibrary{raster} \end{dispListing} -%This also loads the package |xparse| \cite{latexproject:xparse}. - -%The purpose of this library is to give comfortable access to the -%powerful document command production with |xparse| for |tcolorbox|. -%See the |xparse| package documentation \cite{latexproject:xparse} -%for details about the argument \meta{specification} used in this section. \subsection{Concept of Rasters}\label{subsec:raster_overview} @@ -855,7 +849,7 @@ space has to be distributed accordingly. \item For fixed height boxes/rasters using \refKey{/tcb/raster height}, the height of boxes is available by \refCom{tcbtextheight}. This can be used to size deeper layered boxes/rasters. -\item For boxes/rasters layed out using \refKey{/tcb/raster equal height}, +\item For boxes/rasters laid out using \refKey{/tcb/raster equal height}, space can be distributed by \refKey{/tcb/space to}. It can take several compilations until all spaces are distributed correctly. \end{itemize} diff --git a/macros/latex/contrib/tcolorbox/tcolorbox.doc.s_main.sty b/macros/latex/contrib/tcolorbox/tcolorbox.doc.s_main.sty index 5aaf1b54a7..3eabd88b1e 100644 --- a/macros/latex/contrib/tcolorbox/tcolorbox.doc.s_main.sty +++ b/macros/latex/contrib/tcolorbox/tcolorbox.doc.s_main.sty @@ -12,7 +12,7 @@ \RequirePackage[english]{babel} \RequirePackage{lmodern,parskip,array,ifthen,calc} \RequirePackage{amsmath,amssymb} -\RequirePackage[svgnames,table,hyperref]{xcolor} +\RequirePackage[svgnames,table]{xcolor} \RequirePackage{tikz} \usetikzlibrary{shadings,shadows} @@ -205,6 +205,7 @@ meta,marg, oarg, refCom,refEnv,refKey, + sarg, tcbmakedocSubKey,tcbdocmarginnote,tcbdocnew,tcbdocupdated, % skins tcbincludegraphics,tcbincludepdf,pdfpages,imagepage,imagepath,imagename, diff --git a/macros/latex/contrib/tcolorbox/tcolorbox.doc.skins.tex b/macros/latex/contrib/tcolorbox/tcolorbox.doc.skins.tex index 0292ceb48a..e92d81a644 100644 --- a/macros/latex/contrib/tcolorbox/tcolorbox.doc.skins.tex +++ b/macros/latex/contrib/tcolorbox/tcolorbox.doc.skins.tex @@ -2087,13 +2087,13 @@ This is a tcolorbox. from the frame outline. A positive \meta{offset} value shrinks the shadow and a negative \meta{offset} value enlarges the shadow. The shadow is filled along a \tikzname\ path with the given \tikzname\ \meta{options}.\\ - The shadows adapt to the rounded corners of the |tcolorbox|. An shrinked shadow + The shadows adapt to the rounded corners of the |tcolorbox|. A shrinked shadow will switch to sharp corners if necessary, an enlarged shadow may become more rounded depending on several factors. But \refKey{/tcb/sharp corners} have sharp shadows. \begin{marker} Shadows are not considered for the bounding box computation by default. - Large shadows may be overlaped by the following content. But, the + Large shadows may be overlapped by the following content. But, the bounding box can be adapted if necessary. \end{marker} @@ -2955,7 +2955,7 @@ The resulting skins are called \emph{jigsaw} skins. For \refSkin{standard}, \clearpage \subsection{Draft Mode}\label{subsec:draftmode} -To reduce the compiliation time while drafting a document, the \emph{draft mode} +To reduce the compilation time while drafting a document, the \emph{draft mode} can be applied. Basically, it changes all skins to \refSkin{spartan} and sets the \refKey{/tcb/fit algorithm} to |squeeze|. Especially, when fuzzy shadows are used, the speedup will be considerable high. diff --git a/macros/latex/contrib/tcolorbox/tcolorbox.doc.theorems.tex b/macros/latex/contrib/tcolorbox/tcolorbox.doc.theorems.tex index 5e21a0b92f..4884e85f57 100644 --- a/macros/latex/contrib/tcolorbox/tcolorbox.doc.theorems.tex +++ b/macros/latex/contrib/tcolorbox/tcolorbox.doc.theorems.tex @@ -838,7 +838,7 @@ New colored mathematical environments are easily created using \bigskip \begin{marker} All described options like \refKey{/tcb/ams gather upper}, \refKey{/tcb/ams gather lower}, - \refKey{/tcb/ams gather} are (partially) setting (overwritting) the + \refKey{/tcb/ams gather} are (partially) setting (overwriting) the keys \refKey{/tcb/before upper}, \refKey{/tcb/after upper}, \refKey{/tcb/before lower}, \refKey{/tcb/after lower}.\par Therefore, e.\,g.\ |\tcbset{ams gather,before upper={\text{Pythagoras:}}}| diff --git a/macros/latex/contrib/tcolorbox/tcolorbox.pdf b/macros/latex/contrib/tcolorbox/tcolorbox.pdf Binary files differindex f9e23664ce..a7499395e4 100644 --- a/macros/latex/contrib/tcolorbox/tcolorbox.pdf +++ b/macros/latex/contrib/tcolorbox/tcolorbox.pdf diff --git a/macros/latex/contrib/tcolorbox/tcolorbox.sty b/macros/latex/contrib/tcolorbox/tcolorbox.sty index 812b9dcc90..be2dc7e19b 100644 --- a/macros/latex/contrib/tcolorbox/tcolorbox.sty +++ b/macros/latex/contrib/tcolorbox/tcolorbox.sty @@ -1,8 +1,8 @@ -%% The LaTeX package tcolorbox - version 6.1.0 (2023/09/26) +%% The LaTeX package tcolorbox - version 6.2.0 (2024/01/10) %% tcolorbox.sty: Text color boxes %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2006-2023 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> +%% Copyright (c) 2006-2024 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> %% ------------------------------------------------------------------------------------------- %% %% This work may be distributed and/or modified under the @@ -17,9 +17,9 @@ %% %% This work consists of all files listed in README %% -\NeedsTeXFormat{LaTeX2e}[2020/10/01] -\ProvidesPackage{tcolorbox}[2023/09/26 version 6.1.0 text color boxes] -\def\tcb@version{6.1.0} +\NeedsTeXFormat{LaTeX2e}[2021-11-15] +\ProvidesPackage{tcolorbox}[2024/01/10 version 6.2.0 text color boxes] +\def\tcb@version{6.2.0} \RequirePackage{pgf}[2008/01/15] \RequirePackage{verbatim}[2003/08/22] @@ -55,6 +55,19 @@ \newcounter{tcblayer} \newcounter{tcolorbox@number} +\ExplSyntaxOn +\bool_new:N \l__tcobox_prevent_init_overwrite_bool +\box_new:N \l__tcobox_tmpa_box +\dim_new:N \l__tcobox_tmpa_dim +\fp_new:N \l__tcobox_tmpa_fp +\iow_new:N \g__tcobox_out_iow +\iow_new:N \g__tcobox_record_iow +\str_new:N \l__tcobox_record_file_str +\tl_new:N \l__tcobox_kv_labeltype_tl +\tl_new:N \l__tcobox_tmpa_tl +\tl_new:N \l__tcobox_tmpb_tl +\ExplSyntaxOff + \def\tcb@info#1{\PackageInfo{tcolorbox}{#1}} \def\tcb@warning#1{\PackageWarning{tcolorbox}{#1}} \def\tcb@error#1#2{\PackageError{tcolorbox}{#1}{#2}} @@ -287,7 +300,7 @@ fontlower/.store in=\kvtcb@fontlower, tempfile/.store in=\kvtcb@tempfile, savelowerto/.code={\tcb@redirectlowertofalse\def\kvtcb@savelowerto{#1}}, - redirectlowerto/.code={\tcb@lowerignoredtrue\tcb@lowervisiblefalse\tcb@redirectlowertotrue\def\kvtcb@savelowerto{#1}}, + redirectlowerto/.code={\pgfkeysalso{lowerbox=ignored}\tcb@redirectlowertotrue\def\kvtcb@savelowerto{#1}}, saveto/.store in=\kvtcb@saveupperto, savedelimiter/.estore in=\kvtcb@savedelimiter, floatplacement/.store in=\kvtcb@floatplacement, @@ -888,9 +901,33 @@ wrap@environment/.is if=tcb@wrap@environment, } + +\def\kvtcb@beforebox{} +\def\kvtcb@afterbox{} + + \ExplSyntaxOn -\tl_new:N \l__tcobox_kv_labeltype_tl +\tcbset +{ + __environment / .style~n~args = { 3 } + { + before~#1* = { \begin{#2} #3 }, + after~#1* = { \end{#2} } + }, + environment~upper / .value~required, + environment~lower / .value~required, + environment~title / .value~required, + environment~upper / .style = { __environment = {upper}{#1}{ } }, + environment~lower / .style = { __environment = {lower}{#1}{ } }, + environment~title / .style = { __environment = {title}{#1}{ } }, + environment~upper~args / .value~required, + environment~lower~args / .value~required, + environment~title~args / .value~required, + environment~upper~args / .style~n~args = { 2 }{ __environment = {upper}{#1}{#2} }, + environment~lower~args / .style~n~args = { 2 }{ __environment = {lower}{#1}{#2} }, + environment~title~args / .style~n~args = { 2 }{ __environment = {title}{#1}{#2} }, +} \cs_new:Npn \__tcobox_label_label:n #1 @@ -965,26 +1002,39 @@ IfBooleanT/.code~n~args={2}{\IfBooleanT{#1}{\pgfkeysalso{#2}}}, IfBooleanF/.code~n~args={2}{\IfBooleanF{#1}{\pgfkeysalso{#2}}}, } -\ExplSyntaxOff - -\def\kvtcb@beforebox{} -\def\kvtcb@afterbox{} \IfFormatAtLeastTF{2023-06-01} { - \def\tcb@set@parbox@indent@{% - \noindent% - \let\tcb@set@parbox@indent\@empty% + \def\tcb@set@parbox@indent@{ + \exp_args:Nne \hook_gput_next_code:nn {para/begin} + { \__tcobox_set_parbox_indent:n { \thetcolorboxnumber } } + \let\tcb@set@parbox@indent\@empty } } { % Note: To be removed in future - \def\tcb@set@parbox@indent@{% - \vspace{-\parskip}\noindent% - \let\tcb@set@parbox@indent\@empty% + \def\tcb@set@parbox@indent@{ + \vspace{-\parskip} + \noindent + \let\tcb@set@parbox@indent\@empty } } +\cs_new_protected:Npn \__tcobox_set_parbox_indent:n #1 + { + \bool_lazy_and:nnT + % if not inside a nested tcolorbox + { \int_compare_p:nNn { #1 } = { \thetcolorboxnumber } } + % and if inside a "tcb@savebox" env (upper or lower part is non-empty), + % hence not at the time of using saved \tcb@upperbox or \tcb@lowerbox + { \cs_if_exist_p:N \tcbbreak } + { + \OmitIndent + } + } + +\ExplSyntaxOff + \def\tcb@parbox@true@indent{}% \def\tcb@parbox@false@indent{% \preto\kvtcb@before@title{\tcb@set@parbox@indent}% @@ -1183,8 +1233,19 @@ \expandafter\let\csname end\kvtcb@savedelimiter\expandafter\endcsname\csname tcb@endupperverbatimanddraw\endcsname% \ifx\kvtcb@savelowerto\@empty% \else% - \tcb@warning{'saveto' and 'savelowerto' cannot be combined. I deactivate 'savelowerto'}% - \tcbset{savelowerto=}% + \iftcb@redirectlowerto% + \tcb@warning{% + 'saveto' and 'redirectlowerto' cannot be combined.\MessageBreak + I deactivate 'redirectlowerto' but retain its\MessageBreak + 'lowerbox' setting}% + \tcb@redirectlowertofalse% + \tcbset{savelowerto=}% + \else% + \tcb@warning{% + 'saveto' and 'savelowerto' cannot be combined.\MessageBreak + I deactivate 'savelowerto'}% + \tcbset{savelowerto=}% + \fi% \fi% \fi% \tcb@startbox% @@ -1462,19 +1523,19 @@ \ExplSyntaxOn \def\tcb@ch@fixed@spacesave { - \fp_set:Nn \l_tmpa_fp { \tcb@space+\tcbheightspace } - \fp_compare:nTF { \l_tmpa_fp < 0 } + \fp_set:Nn \l__tcobox_tmpa_fp { \tcb@space+\tcbheightspace } + \fp_compare:nTF { \l__tcobox_tmpa_fp < 0 } { - \fp_zero_new:N \l_tmpa_fp + \fp_zero:N \l__tcobox_tmpa_fp } { - \fp_compare:nT { \l_tmpa_fp > \tcb@height } + \fp_compare:nT { \l__tcobox_tmpa_fp > \tcb@height } { - \fp_set:Nn \l_tmpa_fp { \tcb@height } + \fp_set:Nn \l__tcobox_tmpa_fp { \tcb@height } } } - \tcbdimto\tcb@space { \fp_to_dim:n { trunc(\l_tmpa_fp,2) } } - \use:x { \exp_not:N\tcb@savespace{\thetcolorboxnumber}{\tcb@space} } + \tcbdimto\tcb@space { \fp_to_dim:n { trunc(\l__tcobox_tmpa_fp,2) } } + \use:e { \exp_not:N\tcb@savespace{\thetcolorboxnumber}{\tcb@space} } \tcbdimto\tcb@height@upper{\ht\tcb@upperbox+\dp\tcb@upperbox+\tcbheightspace} \let\tcbheightspace\tcb@zpt \iftcb@lowerspace @@ -2236,8 +2297,6 @@ \ExplSyntaxOn -\bool_new:N \l__tcobox_prevent_init_overwrite_bool - \cs_new:Npn \__tcobox_process_newtcolorbox:nn #1#2 { \bool_lazy_and:nnF @@ -2257,7 +2316,7 @@ { \tl_set:Nn #1 { #2 } \tl_trim_spaces:N #1 - \tl_set:Nx #1 { \exp_last_unbraced:NV \cs_to_str:N #1 } + \tl_set:Ne #1 { \exp_last_unbraced:NV \cs_to_str:N #1 } } @@ -2324,8 +2383,8 @@ } \NewDocumentCommand \__tcobox_new_TotalTColorBox:w { m +O{} m } { - \__tcobox_set_backslash_removed:Nn \l_tmpa_tl { #3 } - \exp_args:NNnV \__tcobox_new_TotalTColorBox:Nnnnnn #1 {#2} \l_tmpa_tl + \__tcobox_set_backslash_removed:Nn \l__tcobox_tmpa_tl { #3 } + \exp_args:NNnV \__tcobox_new_TotalTColorBox:Nnnnnn #1 {#2} \l__tcobox_tmpa_tl } \NewDocumentCommand \DeclareTotalTColorBox { } { @@ -2368,8 +2427,8 @@ } \NewDocumentCommand \__tcobox_new_tcbox_i:w { m +O{} m } { - \__tcobox_set_backslash_removed:Nn \l_tmpa_tl { #3 } - \exp_args:NNnV \__tcobox_new_tcbox_ii:w #1 {#2} \l_tmpa_tl + \__tcobox_set_backslash_removed:Nn \l__tcobox_tmpa_tl { #3 } + \exp_args:NNnV \__tcobox_new_tcbox_ii:w #1 {#2} \l__tcobox_tmpa_tl } \NewDocumentCommand \newtcbox { } { @@ -2390,8 +2449,8 @@ } \NewDocumentCommand \__tcobox_new_TCBox:w { m +O{} m } { - \__tcobox_set_backslash_removed:Nn \l_tmpa_tl { #3 } - \exp_args:NNnV \__tcobox_new_TCBox:Nnnnn #1 {#2} \l_tmpa_tl + \__tcobox_set_backslash_removed:Nn \l__tcobox_tmpa_tl { #3 } + \exp_args:NNnV \__tcobox_new_TCBox:Nnnnn #1 {#2} \l__tcobox_tmpa_tl } \NewDocumentCommand \DeclareTCBox { } { @@ -2422,8 +2481,8 @@ } \NewDocumentCommand \__tcobox_new_TotalTCBox:w { m +O{} m } { - \__tcobox_set_backslash_removed:Nn \l_tmpa_tl { #3 } - \exp_args:NNnV \__tcobox_new_TotalTCBox:Nnnnnn #1 {#2} \l_tmpa_tl + \__tcobox_set_backslash_removed:Nn \l__tcobox_tmpa_tl { #3 } + \exp_args:NNnV \__tcobox_new_TotalTCBox:Nnnnnn #1 {#2} \l__tcobox_tmpa_tl } \NewDocumentCommand \DeclareTotalTCBox { } { @@ -2494,9 +2553,8 @@ \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 } + \tl_set:Ne \l__tcobox_tmpa_tl {\tl_trim_spaces:n{#1}} + \str_if_eq:eeT { \str_range:Nnn \l__tcobox_tmpa_tl {2}{8} } { chapter } { \if@twocolumn \@restonecoltrue\onecolumn @@ -2504,8 +2562,7 @@ \@restonecolfalse \fi } - \tl_set:Nx \l_tmpa_tl {\str_item:Nn \l_tmpa_tl {-1}} - \str_if_eq:VnTF \l_tmpa_tl { * } + \str_if_eq:eeTF { \str_item:Nn \l__tcobox_tmpa_tl {-1} } { * } { #1{#4} \IfNoValueTF{#3} @@ -2535,10 +2592,11 @@ % verbatim output as in 'verbatim' -\def\tcb@allocate@tcb@out{% - \newwrite\tcb@out% - \xdef\tcb@allocate@tcb@out{}% -} +\ExplSyntaxOn +\cs_new_protected:Npn \tcb@iow@open { \iow_open:Nn \g__tcobox_out_iow } +\cs_new_protected:Npn \tcb@iow@write { \iow_now:Ne \g__tcobox_out_iow } +\cs_new_protected:Npn \tcb@iow@close { \iow_close:N \g__tcobox_out_iow } +\ExplSyntaxOff \let\tcb@verbatim@begin@hook\@empty \let\tcb@verbatim@end@hook\@empty @@ -2548,20 +2606,17 @@ \def\tcbverbatimwrite#1{% \@bsphack \tcb@set@verbatim@finish% - \tcb@allocate@tcb@out% - \immediate\openout\tcb@out #1 + \tcb@iow@open{#1}% \tcb@verbatim@begin@hook% \let\do\@makeother\dospecials \tcb@verbatim@change@percent\catcode`\^^M\active \catcode`\^^I=12 - \def\verbatim@processline{% - \immediate\write\tcb@out - {\the\verbatim@line}}% + \def\verbatim@processline{\tcb@iow@write{\the\verbatim@line}}% \verbatim@start}%' \def\endtcbverbatimwrite{% \tcb@verbatim@end@hook% - \immediate\closeout\tcb@out + \tcb@iow@close \@esphack% } @@ -2570,12 +2625,12 @@ \cs_new_nopar:Npn \__tcobox_verbatim_finish: { - \tl_set_rescan:Nnx \l_tmpa_tl + \tl_set_rescan:Nne \l__tcobox_tmpa_tl { \char_set_catcode_space:n { 9 } \char_set_catcode_space:n { 32 } } { \the\verbatim@line } - \tl_if_blank:VF \l_tmpa_tl + \tl_if_blank:VF \l__tcobox_tmpa_tl { \verbatim@processline } @@ -2646,36 +2701,42 @@ % recording -\def\tcb@allocate@tcb@record@out{% - \newwrite\tcb@record@out% - \xdef\tcb@allocate@tcb@record@out{}% -} - +\ExplSyntaxOn -\def\tcb@null#1{} -\newcommand{\tcb@record}[1]{\immediate\write\tcb@record@out{#1}} +\cs_new_protected:Npn \__tcobox_record:n #1 + { + \iow_now:Ne \g__tcobox_record_iow { #1 } + } -\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% -} +\NewDocumentCommand \tcbstartrecording { O{\jobname.records} } + { + \cs_set_eq:NN \tcbrecord \__tcobox_record:n + \str_set:Ne \l__tcobox_record_file_str { #1 } + \iow_open:Nn \g__tcobox_record_iow { \l__tcobox_record_file_str } + } -\newcommand{\tcbstoprecording}{% - \immediate\closeout\tcb@record@out% - \let\tcbrecord\tcb@null% -} +\NewDocumentCommand \tcbstoprecording { } + { + \iow_close:N \g__tcobox_record_iow + \cs_set_eq:NN \tcbrecord \use_none:n + } -\tcbset{% +\tcbset{ record/.style={phantom={\tcbrecord{#1}}}, - no recording/.code={\let\tcbrecord\tcb@null}, - no recording + no~recording/.code={ \cs_set_eq:NN \tcbrecord \use_none:n }, + no~recording } -\newcommand{\tcbinputrecords}[1][\tcb@record@file]{% - \IfFileExists{#1}{\input{#1}}{\tcb@error{record file `#1' not found}{The record file `#1' was not found}}% -} +\NewDocumentCommand \tcbinputrecords { O{\l__tcobox_record_file_str} } + { + \file_if_exist_input:nF {#1} + { + \tcb@error{record~file~`#1'~not~found} + {The~record~file~`#1'~was~not~found} + } + } + +\ExplSyntaxOff \tcb@new@skin{standard}{frame engine=standard,interior titled engine=standard, interior engine=standard,segmentation engine=standard,title engine=standard, diff --git a/macros/latex/contrib/tcolorbox/tcolorbox.tex b/macros/latex/contrib/tcolorbox/tcolorbox.tex index be4bd0afc7..b7c1742391 100644 --- a/macros/latex/contrib/tcolorbox/tcolorbox.tex +++ b/macros/latex/contrib/tcolorbox/tcolorbox.tex @@ -1,9 +1,9 @@ % \LaTeX-Main\ -%% The LaTeX package tcolorbox - version 6.1.0 (2023/09/26) +%% The LaTeX package tcolorbox - version 6.2.0 (2024/01/10) %% tcolorbox.tex: Manual %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2006-2023 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> +%% Copyright (c) 2006-2024 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> %% ------------------------------------------------------------------------------------------- %% %% This work may be distributed and/or modified under the @@ -51,8 +51,8 @@ \setlength{\bibitemsep}{\smallskipamount} \addbibresource{tcolorbox.doc.bib} -\def\version{6.1.0}% -\def\datum{2023/09/26}% +\def\version{6.2.0}% +\def\datum{2024/01/10}% \makeindex \hypersetup{ @@ -65,12 +65,10 @@ \usepackage{pgfplots} \pgfplotsset{compat=1.17} -\nocite{breitenlohner:1998a} - %\geometry{showframe} %\tcbset{draftmode} \tcbset{/tcb/external/-}% for final run -%\includeonly{tcolorbox.doc.coreoptions} +%\includeonly{tcolorbox.doc.initoptions,tcolorbox.doc.index} %\hypersetup{colorlinks=false} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/macros/latex/contrib/texshade/README b/macros/latex/contrib/texshade/README index 2d2d83caf3..eb7e370ff6 100644 --- a/macros/latex/contrib/texshade/README +++ b/macros/latex/contrib/texshade/README @@ -1,4 +1,4 @@ - TeXshade v1.27 + TeXshade v1.28 >> >> A LaTeX package for setting nucleotide and peptide alignments. >> diff --git a/macros/latex/contrib/texshade/texshade.dtx b/macros/latex/contrib/texshade/texshade.dtx index 8ea0d6febb..92c89fd37a 100644 --- a/macros/latex/contrib/texshade/texshade.dtx +++ b/macros/latex/contrib/texshade/texshade.dtx @@ -426,6 +426,12 @@ % Introduction: a second full ruler with independent [top] and [bottom] % options, and the possibility to show ruler names.} % +% \changes{1.28}{2024-01-10}{% +% Introduction: functional shading on DNA sequences using the +% Brewer color scheme. +% Corrections: the consensus export file format is now set by +% default to chimera with pymol as an alternative option.} +% % % % \CharacterTable @@ -465,7 +471,7 @@ % for further information, updates and on-line documentation % see my homepage at % \texttt{www.pharmazie.uni-kiel.de/chem/Prof\_Beitz/biotex.html} }} -% \date{\small v1.27; 2024/01/06\\[2pt]} +% \date{\small v1.28; 2024/01/10\\[2pt]} % \maketitle % \begin{abstract} % Setting alignments of nucleotides and peptides for publication @@ -549,7 +555,18 @@ % % \subsection{Version History} % -% \textbf{v1.7 2024/01/06} +% \textbf{v1.28 2024/01/10} +% \medskip +% +% \emph{Introduction:} +% Functional shading on DNA sequences was added. +% +% \emph{Correction}: Consensus export files can be in chimera +% or pymol format. +% +% \medskip +% +% \textbf{v1.27 2024/01/06} % \medskip % % \emph{Introduction:} @@ -1874,17 +1891,19 @@ % relative frequency of a base or amino acid at this % position [7]. Thus, more information is contained in logos than in % a standard consensus sequence. -% The example below shows a DNA sequence alignment with the logo on the -% top. +% The example below shows a DNA sequence alignment with functional +% shading and the logo on the top (the logo also use the `functional' +% colors, p.\pageref{funcdef}). % % It must be remarked that a logo from only five sequences does not -% produce meaningful results - it rather illustrates the technique. +% produce too meaningful results---it rather illustrates the technique. % % \medskip % % \begin{texshade}{AQPDNA.MSF} % \setends{1}{414..443} % \showsequencelogo{top} +% \shadingmode[DNA]{functional} % \end{texshade} % % Code:\medskip @@ -1894,6 +1913,7 @@ % \begin{texshade}{AQPDNA.MSF} % \setends{1}{414..443} % \showsequencelogo{top} +% \shadingmode[DNA]{functional} % \end{texshade} % \end{verbatim}} % @@ -1943,7 +1963,7 @@ % The same logo is shown below but with frequency correction turned % on (|\dofrequencycorrection|), see p.\pageref{Lshowsequencelogo}. % This takes into account the difference between the amino acid -% distribution in the alignment and the equal distribution of +% distribution in the alignment and an equal distribution of % 5\% for each residue. % \medskip % @@ -2645,8 +2665,8 @@ % % \item |\shadingmode[|\meta{type}|]{functional}|\label{funcdef} % There are seven different functional shading modes available for -% peptide sequences; nucleotide sequences can not be shaded due -% to functional aspects. Five of \TeXshade's functional modes +% peptide sequences, and one for DNA sequences. +% Five of \TeXshade's functional modes % correspond to the four `alphabets' employed by \textsc{Karlin} % and \textsc{Ghandour} for peptide alignments [2] or by the % rasmol software. Additional @@ -2686,7 +2706,7 @@ % of the residue in \AA$^2$, i.\,e. it is a measure for the size % of a residue's sidechain. The accessible area value (also in % \AA$^2$) gives information about the size of the surface area -% which is accessible by solvent molecules within the folded +% which is typically accessible by solvent molecules within the folded % protein. A very small area means that the residue is % strongly buried and is thus very hydrophobic. Hydrophilic % residues in turn possess large accessible areas due @@ -2705,6 +2725,12 @@ % % \end{itemize} % +% Functional shading can also be shown for DNA sequences +% using: +% \begin{itemize} +% \item \meta{type} = |DNA| +% \end{itemize} +% % \label{Lclearfuncgroups} % If no \meta{type} or an unknown \meta{type} is designated as option % all functional groups and shading colors are cleared. This is @@ -2838,8 +2864,8 @@ % % with % \meta{scale} |Gray|, |BlueRed|, |RedBlue|, |GreenRed|, |RedGreen|, -% |ColdHot| (recommended), |HotCold|, or |T-Coffee| \ref{TCoffee}, and \meta{position} |top| -% or |bottom|. +% |ColdHot| (recommended), |HotCold|, or |T-Coffee| (see \ref{TCoffee}), and +% \meta{position} |top| or |bottom|. % % The first color defines the foreground, i.e. the letters, the % second color---if specified---defines the background. @@ -2848,11 +2874,10 @@ % weight tables below). For an example output see page % \pageref{shadecons}. You can find more information on color scales % on page \pageref{Lgraphs}. The calculated consensus colors can be exported -% as a Pymol [8] \label{Lexportconsensus} -% script by |\exportconsensus[|\meta{filename}|]{|\meta{seqref}|}|. -% If no \meta{filename} is specified |export.txt| will be used. The -% generated file can be opened in Pymol in order to shade a 3D model -% of the sequence \meta{seqref}. +% as a Pymol [8] \label{Lexportconsensus} script or Chimera command file (default) +% by |\exportconsensus[|\meta{pymol/chimera}|]{|\meta{seqref}|}{|\meta{filename}|}|. +% The generated file can be opened in Pymol or Chimera, resp., in order to +% shade a 3D model of the sequence \meta{seqref}. % % To hide the consensus use % |\hideconsensus|. The consensus @@ -3038,7 +3063,7 @@ % % Optional color sets correspond to the functional shading modes % |chemical|, |rasmol|, |hydropathy|, |structure|, |standard area|, -% |accessible area| (see p.\pageref{funcdef}). The |\showsequencelogo| +% |accessible area|, |DNA| (see p.\pageref{funcdef}). The |\showsequencelogo| % command can be reversed by |\hidesequencelogo|. % % \label{Llogocolor}\label{Lclearlogocolors} @@ -5770,7 +5795,8 @@ % & & |chemical| \\ % & & |rasmol| \\ % & & |standard area| \\ -% & & |accessible area| \\ \hline +% & & |accessible area| \\ +% & & |DNA| \\ \hline % \end{tabular} % \end{center} % \medskip @@ -5801,7 +5827,6 @@ % \quad|\allmatchresidues{|\meta{res.col.}|}{|\meta{shad.col.}|}{|\meta{case}|}{|\meta{style}|}| % % \quad|\defshadingcolors{|\meta{name}|}| -% \newpage % % \quad|\funcshadingstyle{|\meta{residue}|}{|\meta{res.col.}|}{|\meta{shad.color}|}| % @@ -5850,7 +5875,7 @@ % \quad|\showconsensus[|\meta{color/scale}|[,|\meta{color/scale}|]]{|\meta{top/bot.}|}| % \hfill[\pageref{Lshowconsensus}] % -% \quad|\exportconsensus[|\meta{filename}|]{|\meta{seqref}|}| +% \quad|\exportconsensus[|\meta{pymol/chimera}|]{|\meta{seqref}|}{|\meta{filename}|}| % \hfill[\pageref{Lexportconsensus}] % % \quad|\hideconsensus| @@ -5883,7 +5908,8 @@ % \hfill[\pageref{Lgappenalty}] % % \vspace{1.5\baselineskip} -% +% \newpage +% % \textbf{Sequence logos} % \medskip % @@ -5917,7 +5943,7 @@ % \quad|\undofrequencycorrection| % \hfill[\pageref{Lundofrequencycorrection}] % -% \vspace{1.5\baselineskip} +% \bigskip % % \textbf{Subfamily logos} % \medskip @@ -5951,7 +5977,7 @@ % % % -% \vspace{1.5\baselineskip} +% \bigskip % % \textbf{Structure memes} % \medskip @@ -6642,8 +6668,8 @@ % \begin{macrocode} %<*texshade> \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{texshade}[2023/06/04 LaTeX TeXshade (v1.27)] -\message{Package `texshade', Version 1.27 of 2024/01/06.} +\ProvidesPackage{texshade}[2024/01/10 LaTeX TeXshade (v1.28)] +\message{Package `texshade', Version 1.28 of 2024/01/10} \PassOptionsToPackage{dvips}{color} \PassOptionsToPackage{dvips}{graphicx} @@ -6787,6 +6813,7 @@ \xdef\rulername@top{} \xdef\rulername@bottom{} \xdef\rulernamecolor@top{n} \xdef\rulernamecolor@bottom{n} \xdef\rulername@family{n} \xdef\rulername@size{n} +\xdef\exp@rt@pymol{n} \expandafter\def\csname fg@textcolor/\endcsname{White} \expandafter\def\csname fg@color/\endcsname{White} \expandafter\def\csname func@style/\endcsname{\csname textup\endcsname} @@ -8276,6 +8303,10 @@ \definecolor{TC8} {cmyk}{0,0.8,1,0} \definecolor{TC9} {cmyk}{0,0.875,1,0} \definecolor{TC99} {cmyk}{0,0,0,0} +\definecolor{BrewerC} {cmyk}{0.35,0.07,0,0} +\definecolor{BrewerG} {cmyk}{0.90,0.30,0,0} +\definecolor{BrewerT} {cmyk}{0.30,0,0.45,0} +\definecolor{BrewerA} {cmyk}{0.80,0,1,0} \definecolor{LightGreenYellow} {cmyk}{0.08,0,0.35,0} \definecolor{LightYellow} {cmyk}{0,0,0.50,0} \definecolor{LightGoldenrod} {cmyk}{0,0.05,0.42,0} @@ -9559,8 +9590,15 @@ \funcgroup{18-19 eV (MY)}{MY}{White}{BlueRed80}{upper}{up} \funcgroup{17-18 eV (W)}{W}{White}{BlueRed100}{upper}{up} \else + \xdef\second@{DNA} + \ifx\temp@\second@ + \funcgroup{C}{Cc}{Black}{BrewerC}{upper}{up} + \funcgroup{G}{Gg}{White}{BrewerG}{upper}{up} + \funcgroup{A}{Aa}{Black}{BrewerA}{upper}{up} + \funcgroup{T, U}{TtUu}{Black}{BrewerT}{upper}{up} + \else \message{<Unknown shading mode - clearing `funcgroups'>} - \fi\fi\fi\fi\fi\fi\fi\fi + \fi\fi\fi\fi\fi\fi\fi\fi\fi } \def\shadeallresidues{\all@fshadetrue} \def\get@fromstack#1;#2;#3;#4;#5@{% @@ -12772,9 +12810,7 @@ \else \xdef\first@{functional} \ifx\first@\last@ - \if\seq@type N \message{<No functional shading on DNA sequences>} - \else \simmodefalse \funcmodetrue \func@shading{#1} - \xdef\seq@type{P} \xdef\prefix@{pep} \fi + \simmodefalse \funcmodetrue \func@shading{#1} \else \xdef\first@{T-Coffee} \ifx\first@\last@ @@ -13088,7 +13124,16 @@ \logocolor{CFH}{BlueRed60} \logocolor{MY}{BlueRed80} \logocolor{W}{BlueRed100} - \fi\fi\fi\fi\fi\fi\fi\fi + \else + \xdef\second@{DNA} + \ifx\first@\second@ + \clearlogocolors + \logocolor{A}{BrewerA} + \logocolor{C}{BrewerC} + \logocolor{G}{BrewerG} + \logocolor{T}{BrewerT} + \logocolor{U}{BrewerT} + \fi\fi\fi\fi\fi\fi\fi\fi\fi } \newcommand\findsubfamily[2][n]{% \xdef\first@{#1} @@ -14395,13 +14440,15 @@ \ifx\temp@\first@ \xdef\tr@nstextstyle{4}\fi } -\newcommand\exportconsensus[2][export.txt]{% +\newcommand\exportconsensus[3][chimera]{% \ifx\exp@rt\n@ + \xdef\first@{#1}\xdef\second@{pymol} + \ifx\first@\second@\xdef\exp@rt@pymol{y}\fi \xdef\first@{#2 @} \expandafter\check@letter\first@ \xdef\first@{#2} \ifletter \get@name@number \fi \xdef\exp@rt@num{\first@} \xdef\exp@rt{y} - \immediate\openout\exp@rtfile = #1 + \immediate\openout\exp@rtfile = #3 \fi } @@ -17547,7 +17594,12 @@ \multiply\outerloopcount by 5 \ifnum\outerloopcount<5\relax\outerloopcount=5\fi \xdef\seventh@{n} - \immediate\write\exp@rtfile{\string color col\the\outerloopcount, resi \sixth@} + \ifx\exp@rt@pymol\y@ + \immediate\write\exp@rtfile{\string color col\the\outerloopcount, resi \sixth@} + \else + \immediate\write\exp@rtfile{\string setattr a color col\the\outerloopcount \space :\sixth@} + \immediate\write\exp@rtfile{\string setattr r ribbonColor col\the\outerloopcount \space :\sixth@} + \fi \fi \fi @@ -17651,10 +17703,17 @@ \fi} \def\prep@reexp@rtfile{ + \def\get@c@nsc@l[##1,##2,##3]{\xdef\first@{##1} \xdef\second@{##2} \xdef\third@{##3}} \loopcount=0 \loop \advance\loopcount by 5 - \immediate\write\exp@rtfile{\string set_color col\the\loopcount, \csname\c@nsc@l\the\loopcount\endcsname} + \ifx\exp@rt@pymol\y@ + \immediate\write\exp@rtfile{\string set_color col\the\loopcount, \csname\c@nsc@l\the\loopcount\endcsname} + \else + \xdef\first@{\csname\c@nsc@l\the\loopcount\endcsname} + \expandafter\get@c@nsc@l\first@ + \immediate\write\exp@rtfile{\string colordef col\the\loopcount \space\first@ \space\second@ \space\third@} + \fi \ifnum\loopcount>95\else\repeat } diff --git a/macros/latex/contrib/texshade/texshade.pdf b/macros/latex/contrib/texshade/texshade.pdf Binary files differindex 2df2b88e3b..73f2e37035 100644 --- a/macros/latex/contrib/texshade/texshade.pdf +++ b/macros/latex/contrib/texshade/texshade.pdf |