From 73abb311c03e955ad9f7b7464390a5722b20b915 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Sat, 11 Feb 2023 03:01:17 +0000 Subject: CTAN sync 202302110301 --- macros/latex/contrib/tcolorbox/CHANGES.md | 100 ++++- macros/latex/contrib/tcolorbox/README.md | 6 +- .../latex/contrib/tcolorbox/tcbbreakable.code.tex | 20 +- .../contrib/tcolorbox/tcbdocumentation.code.tex | 6 +- .../latex/contrib/tcolorbox/tcbexternal.code.tex | 6 +- macros/latex/contrib/tcolorbox/tcbfitting.code.tex | 28 +- macros/latex/contrib/tcolorbox/tcbhooks.code.tex | 35 +- .../latex/contrib/tcolorbox/tcblistings.code.tex | 6 +- .../contrib/tcolorbox/tcblistingscore.code.tex | 24 +- .../contrib/tcolorbox/tcblistingsutf8.code.tex | 6 +- .../latex/contrib/tcolorbox/tcbmagazine.code.tex | 6 +- macros/latex/contrib/tcolorbox/tcbminted.code.tex | 6 +- macros/latex/contrib/tcolorbox/tcbposter.code.tex | 6 +- .../latex/contrib/tcolorbox/tcbprocessing.code.tex | 6 +- macros/latex/contrib/tcolorbox/tcbraster.code.tex | 6 +- macros/latex/contrib/tcolorbox/tcbskins.code.tex | 476 +++++++++------------ .../contrib/tcolorbox/tcbskinsjigsaw.code.tex | 6 +- .../latex/contrib/tcolorbox/tcbtheorems.code.tex | 49 ++- .../latex/contrib/tcolorbox/tcbvignette.code.tex | 6 +- macros/latex/contrib/tcolorbox/tcbxparse.code.tex | 6 +- .../contrib/tcolorbox/tcolorbox-example-poster.pdf | Bin 281296 -> 281293 bytes .../contrib/tcolorbox/tcolorbox-example-poster.tex | 4 +- .../latex/contrib/tcolorbox/tcolorbox-example.pdf | Bin 469093 -> 469022 bytes .../latex/contrib/tcolorbox/tcolorbox-example.tex | 4 +- .../tcolorbox/tcolorbox-tutorial-poster.pdf | Bin 456149 -> 455822 bytes .../tcolorbox/tcolorbox-tutorial-poster.tex | 4 +- macros/latex/contrib/tcolorbox/tcolorbox.doc.bib | 54 ++- .../contrib/tcolorbox/tcolorbox.doc.breakable.tex | 24 +- .../contrib/tcolorbox/tcolorbox.doc.coremacros.tex | 113 ++--- .../tcolorbox/tcolorbox.doc.coreoptions.tex | 210 ++++++--- .../contrib/tcolorbox/tcolorbox.doc.filling.tex | 412 +----------------- .../contrib/tcolorbox/tcolorbox.doc.fitting.tex | 54 +-- .../tcolorbox/tcolorbox.doc.initoptions.tex | 57 ++- .../contrib/tcolorbox/tcolorbox.doc.intro.tex | 4 +- .../contrib/tcolorbox/tcolorbox.doc.listings.tex | 54 +-- .../contrib/tcolorbox/tcolorbox.doc.s_main.sty | 3 +- .../contrib/tcolorbox/tcolorbox.doc.s_snippet.sty | 10 +- .../contrib/tcolorbox/tcolorbox.doc.skins.tex | 35 +- .../contrib/tcolorbox/tcolorbox.doc.technical.tex | 3 +- .../contrib/tcolorbox/tcolorbox.doc.theorems.tex | 108 ++++- .../contrib/tcolorbox/tcolorbox.doc.verbatim.tex | 39 ++ macros/latex/contrib/tcolorbox/tcolorbox.pdf | Bin 7670315 -> 7641870 bytes macros/latex/contrib/tcolorbox/tcolorbox.sty | 273 ++++++++---- macros/latex/contrib/tcolorbox/tcolorbox.tex | 19 +- 44 files changed, 1160 insertions(+), 1134 deletions(-) (limited to 'macros/latex/contrib/tcolorbox') diff --git a/macros/latex/contrib/tcolorbox/CHANGES.md b/macros/latex/contrib/tcolorbox/CHANGES.md index 5cd3c33546..cadfdedc32 100644 --- a/macros/latex/contrib/tcolorbox/CHANGES.md +++ b/macros/latex/contrib/tcolorbox/CHANGES.md @@ -22,6 +22,80 @@ and this project adheres to +## [6.0.0] - 2023-02-10 + +### Added +- Generalized text alignment options (issue #184) + - Option `halign code` + - Option `halign upper code` + - Option `halign lower code` + - Option `halign title code` +- New Options: + - Option `before title*` (equals `before title` until 5.1.1) + - Option `after title*` (equals `after title` until 5.1.1) +- New option for verbatim output and listings: + - Option `verbatim ignore indention at end` +- Option `short title` (part of issue #186) +- Support for zref / zref-titleref / zref-clever (issue #206) + - Option `label is label` + - Option `label is zlabel` +- Library `theorems`: New theorem generation macros. Generated theorema + support an optional short title now (part of issue #186): + - `\NewTcbTheorem` + - `\RenewTcbTheorem` + - `\ProvideTcbTheorem` + - `\DeclareTcbTheorem` +- Library `skins`: Default values added to the options + - `watermark zoom` + - `watermark shrink` + - `watermark overzoom` + - `watermark stretch` + +### Changed +- Possible visible change: previous hacks of current color handling are removed (issue #204) + and color is now inserted at begin of all internal `\box`es. This inserts a whatsit and can + give additional space at begin of a box which starts with an `itemize` or a similar environment. + If necessary, such a space may be removed by a manual `\vspace{-\parsep}`, see issue #123 + Note: lualatex with package luacolor removes all spacing problems +- While producing new types of tcolorbox environment by `\newtcolorbox` + leading and trailing spaces are now removed from the environment name +- `before title` appends `\ignorespaces` now +- `after title` prepends `\unskip` now +- `tcbverbatimwrite` sets `verbatim ignore indention at end` to remove spaces from + indention of the end of environment +- `nameref` also sets zref-titleref reference +- `label type` is used for cleveref and zref-clever +- The 'TikZ Image and Picture Fill Extensions' are extracted from library `skins` + into an `tcolorbox` indendent TikZ library `tikzfill.image` and made part + of a new package `tikzfill`. Also, the respective documentation is moved into + this new package (issue #185) +- Library `skins`: The implementation of all watermark options is changed and + adapted to `tikzfill`. `clip watermark=false` has now some restrictions (see documentation) +- Library `skins`: `\tcbincludegraphics` implementation changed to LaTeX3 code + (should be more robust; inspired by issue #209) +- Temporary `\tcbcounter` in `\newtcolorbox[auto counter]` undefined/restored after usage (issue #203) +- Color setting example of subtitle inside `subtitle style` (issue #189) +- Documentation: + - The documentation orders now `\New...`, `\Renew...`, `\Provide...`, `\Declare...`. + Previously, `\Declare...` was often used first. + - `NewTotalTColorBox` cannot be used with `saveto` or `savelowerto` (issue #205) + - Replacing `\tikzname` by TikZ in a comment line (issue #207) + - `list entry`, `list text`, `add to list` moved from *Counters, Labels, and References* + to *Lists of tcolorboxes* for clarification (issue #194) + +### Removed +- Code `\tcb@undo@before` which tried to undo vertical space for a breakable box + which does not fit partially on the current page but needs to go to the following page. + This code did not achieve the goal and was error-prone (issue #200, hint inside issue #183) + +### Fixed +- `\Provide...` commands and environments process initialization options (issue #187) +- Default initialization options were not issued, if `\newtcolorbox` was used without options (issue #194) +- Typo in `\RenewTCBox` and `\RenewTotalTCBox` caused errors (issue #201) +- Typo in README.md (issue #196) + + + ## [5.1.1] - 2022-06-24 ### Changed @@ -30,7 +104,7 @@ and this project adheres to - Slight implemenation change for `\newtcbtheorem` and `\renewtcbtheorem` ### Fixed -- Regression bug introduced with v5.0.0 2021-12-16 (issue #182) +- Regression bug introduced with v5.0.0 2021-12-16 (issue #182) Instead of `beforeafter skip balanced`, `autoparskip` was set as default, restoring the situation before v4.40 (with some inconsistencies) @@ -46,20 +120,20 @@ and this project adheres to - Option `IfEmptyTF` - Option `IfEmptyT` - Option `IfEmptyF` -- Options to insert code at begin and end of floats (issue #172) +- Options to insert code at begin and end of floats (issue #172) - Option `before float` - Option `after float` - Option `before float app` - Option `before float pre` - Option `after float app` - - Option `after float pre` + - Option `after float pre` - Library `skins`: overlap of lower part for `bicolor`, `tile`, and `beamer` made configurable (issue #166) by - Option `overlaplower` - `\tcboverlaplower` -- Library `documentation`: package warning, if `imakeidx` is loaded after the +- Library `documentation`: package warning, if `imakeidx` is loaded after the library is loaded (issue #173) -- Library `documentation`: gather index LaTeX macros and configure gathering (issue #174) +- Library `documentation`: gather index LaTeX macros and configure gathering (issue #174) - Option `doclang/commands` - Option `index gather colors` - Option `index gather commands` @@ -68,9 +142,9 @@ and this project adheres to - Option `index gather keys` - Option `index gather lengths` - Option `index gather paths` - - Option `index gather values` - - Option `index gather all` - - Option `index gather none` + - Option `index gather values` + - Option `index gather all` + - Option `index gather none` ### Changed - Required latex2e specified `\NeedsTeXFormat{LaTeX2e}[2020/10/01]` (issue #170) @@ -81,7 +155,7 @@ and this project adheres to to libraries `listings` and `fitting` respectively. `xparse` now only loads the package `xparse` (issue #180) - Internal implementation of all `\new*` commands, e.g. `\newtcolorbox` changed. - Note that a missing backlash for `tcbox`-like commands + Note that a missing backlash for `tcbox`-like commands e.g. `\newtcbox{mybox}` instead of `\newtcbox{\mybox}` is no longer tolerated. ### Fixed @@ -129,10 +203,10 @@ and this project adheres to - From now on version numbers adhere to [Semantic Versioning](http://semver.org/spec/v2.0.0.html) - Library `documentation`: warn about not installed `marvosym` and `pifont` (issue #153) -- Environments wrapped with `\tcolorboxenvironment` are now compatible with +- Environments wrapped with `\tcolorboxenvironment` are now compatible with all three capture modes `minipage`, `hbox`, and `fitbox` (issue #154) - Meaningful error prompts when using unknown capture modes (issue #156) -- Library `raster`: Inside a raster, `tcbrasternum` can now be +- Library `raster`: Inside a raster, `tcbrasternum` can now be referenced using `label={mylabel}`, if the box is not numbered otherwise (issue #81 and #119) - Library `theorem`: Theorems with empty display name are now possible without glitches - Library `theorem`: Major code parts rewritten in expl3 code @@ -180,7 +254,7 @@ and this project adheres to - Documentation: Recommend to use initialization options after loading hyperref (issue #135) - Documentation: Warn user about white title color becoming invisible for the skin `empty` (issue #118) -- Documentation: Corrections (issue #127) +- Documentation: Corrections (issue #127) - Documentation of library `skins` is split into a general part and the catalog of skins - Allocate write registers `\tcb@out` and `\tcb@record@out` only when needed (issue #134) - `\tcblistof` enhanced to take an optional short title and mimic @@ -196,7 +270,7 @@ and this project adheres to ## [4.42] - 2020-10-09 ### Added -- Library `breakble`: Option `use color stack` +- Library `breakable`: Option `use color stack` ### Changed - Due to several problems with the color algorithm introduced with version 4.32, diff --git a/macros/latex/contrib/tcolorbox/README.md b/macros/latex/contrib/tcolorbox/README.md index 7b71ce2749..78942298d0 100644 --- a/macros/latex/contrib/tcolorbox/README.md +++ b/macros/latex/contrib/tcolorbox/README.md @@ -1,7 +1,7 @@ -# The LaTeX package tcolorbox - version 5.1.1 (2022/06/24) +# The LaTeX package tcolorbox - version 6.0.0 (2023/02/10) -> Copyright (c) 2006-2022 by Prof. Dr. Dr. Thomas F. Sturm +> Copyright (c) 2006-2023 by Prof. Dr. Dr. Thomas F. Sturm > This work may be distributed and/or modified under the > conditions of the LaTeX Project Public License, either version 1.3 @@ -72,7 +72,7 @@ Alternatively, put the files to their respective locations within the TeX instal - `tcolorbox.sty` -> /tex/latex/tcolorbox - `tcbbreakable.code.tex` -> /tex/latex/tcolorbox -- `tcbdocumenation.code.tex` -> /tex/latex/tcolorbox +- `tcbdocumentation.code.tex` -> /tex/latex/tcolorbox - `tcbexternal.code.tex` -> /tex/latex/tcolorbox - `tcbfitting.code.tex` -> /tex/latex/tcolorbox - `tcbhooks.code.tex` -> /tex/latex/tcolorbox diff --git a/macros/latex/contrib/tcolorbox/tcbbreakable.code.tex b/macros/latex/contrib/tcolorbox/tcbbreakable.code.tex index e0fbb8bbf2..5042be92d2 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 5.1.1 (2022/06/24) +%% The LaTeX package tcolorbox - version 6.0.0 (2023/02/10) %% tcbbreakable.code.tex: Code for breakable colorboxes %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2006-2022 by Prof. Dr. Dr. Thomas F. Sturm +%% Copyright (c) 2006-2023 by Prof. Dr. Dr. Thomas F. Sturm %% ------------------------------------------------------------------------------------------- %% %% 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{5.1.1} +\tcb@set@library@version{6.0.0} \RequirePackage{pdfcol} \pdfcolInitStack{tcb@breakable} @@ -69,7 +69,10 @@ \def\tcb@@break{\par\xleaders\vbox{\rule{0pt}{2\textheight}}\vskip 2\textheight\par} -\def\tcb@vbox#1#2{% +% #1 box +% #2 width +% #3 color (for color stack) +\def\tcb@vbox#1#2#3{% \edef\reserved@a{% \endgroup% \setbox#1\vbox{\hsize=#2% @@ -81,7 +84,6 @@ \let\tcbbreak\tcb@@break% \iftcb@usecolorstack% \pdfcolSwitchStack{tcb@breakable}% - \pdfcolSetCurrentColor% \fi% \color@begingroup% \textwidth\hsize% @@ -92,7 +94,9 @@ \c@mpfootnote\z@% \let\@footnotetext\@mpfootnotetext% \let\@listdepth\@mplistdepth \@mplistdepth\z@% - \@setminipage\tcb@hyph@fix% + \@setminipage% + \color{#3}% + \tcb@hyph@fix% \let\tcb@drawcolorbox\tcb@drawcolorbox@standalone% \let\FN@pp@footnote\@empty% disable perpage mode of 'footmisc' package } @@ -178,7 +182,7 @@ \else% \tcb@hasTitletrue% \tcbdimto\tcb@w@title{\tcb@innerwidth-\kvtcb@boxsep*2-\kvtcb@lefttitle-\kvtcb@righttitle}% - \begin{tcb@savebox}{\tcb@titlebox}{\tcb@w@title}\tcb@extras@followingtitle\color{tcbcoltitle}\kvtcb@fonttitle\kvtcb@haligntitle\kvtcb@followingtitle\end{tcb@savebox}% + \begin{tcb@savebox}{\tcb@titlebox}{\tcb@w@title}{tcbcoltitle}\tcb@extras@followingtitle\kvtcb@fonttitle\kvtcb@haligntitle\kvtcb@followingtitle\end{tcb@savebox}% \tcbdimto\tcb@h@title{\ht\tcb@titlebox+\dp\tcb@titlebox}% \tcbdimto\tcb@h@padtitle{\kvtcb@title@rule+\kvtcb@boxsep*2+\kvtcb@toptitle+\kvtcb@bottomtitle+\tcb@h@title}% \fi% @@ -328,14 +332,12 @@ \tcb@parfillskip@check% \tcb@split@start% \endgroup% - \color{.}% hack for some special cases \ifx\kvtcb@float\@empty\relax% \aftergroup\tcb@use@after@lastbox% \fi% } \def\tcb@split@pagebreak{% - \tcb@undo@before% \iftcb@multicol\columnbreak\else\pagebreak\fi% \tcb@nobreak@warning% \tcb@enlbreak@init\tcb@break@allowedfalse% diff --git a/macros/latex/contrib/tcolorbox/tcbdocumentation.code.tex b/macros/latex/contrib/tcolorbox/tcbdocumentation.code.tex index 0d4e728d76..33ed5d410a 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 5.1.1 (2022/06/24) +%% The LaTeX package tcolorbox - version 6.0.0 (2023/02/10) %% tcbdocumentation.code.tex: Code for LaTeX documentations %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2006-2022 by Prof. Dr. Dr. Thomas F. Sturm +%% Copyright (c) 2006-2023 by Prof. Dr. Dr. Thomas F. Sturm %% ------------------------------------------------------------------------------------------- %% %% 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{5.1.1} +\tcb@set@library@version{6.0.0} \tcbuselibrary{listings,skins,xparse,external,raster} diff --git a/macros/latex/contrib/tcolorbox/tcbexternal.code.tex b/macros/latex/contrib/tcolorbox/tcbexternal.code.tex index 9a0412f874..d8be787d94 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 5.1.1 (2022/06/24) +%% The LaTeX package tcolorbox - version 6.0.0 (2023/02/10) %% tcbexternal.code.tex: Code for externalization %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2006-2022 by Prof. Dr. Dr. Thomas F. Sturm +%% Copyright (c) 2006-2023 by Prof. Dr. Dr. Thomas F. Sturm %% ------------------------------------------------------------------------------------------- %% %% 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{5.1.1} +\tcb@set@library@version{6.0.0} \tcbuselibrary{pro@cessing} diff --git a/macros/latex/contrib/tcolorbox/tcbfitting.code.tex b/macros/latex/contrib/tcolorbox/tcbfitting.code.tex index f4afe5b9ad..af6715af69 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 5.1.1 (2022/06/24) +%% The LaTeX package tcolorbox - version 6.0.0 (2023/02/10) %% tcbfitting.code.tex: Code for fit boxes %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2006-2022 by Prof. Dr. Dr. Thomas F. Sturm +%% Copyright (c) 2006-2023 by Prof. Dr. Dr. Thomas F. Sturm %% ------------------------------------------------------------------------------------------- %% %% 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{5.1.1} +\tcb@set@library@version{6.0.0} \newdimen\tcbfitdim \newdimen\tcb@lowerfitdim @@ -240,7 +240,7 @@ \def\tcb@fit@@box{% \iftcb@hasTitle% \tcbdimto\tcb@w@title{\kvtcb@width-(\kvtcb@left@rule)-(\kvtcb@right@rule)-(\kvtcb@boxsep)*2-(\kvtcb@lefttitle)-(\kvtcb@righttitle)}% - \begin{tcb@savebox}{\tcb@titlebox}{\tcb@w@title}\color{tcbcoltitle}\kvtcb@fonttitle\kvtcb@haligntitle\kvtcb@before@title\kvtcb@title\kvtcb@after@title\end{tcb@savebox}% + \begin{tcb@savebox}{\tcb@titlebox}{\tcb@w@title}{tcbcoltitle}\kvtcb@fonttitle\kvtcb@haligntitle\tcb@insert@before@title\kvtcb@title\tcb@insert@after@title\end{tcb@savebox}% \tcbdimto\tcb@h@titletotal{\ht\tcb@titlebox+\dp\tcb@titlebox+\kvtcb@title@rule+(\kvtcb@boxsep)*2+\kvtcb@toptitle+\kvtcb@bottomtitle}% \else% \let\tcb@h@titletotal=\tcb@zpt% @@ -266,8 +266,8 @@ % \def\tcb@fit@@boxsave##1{% \tcbdimto\tcb@innerwidth{\kvtcb@width-\kvtcb@left@rule-\kvtcb@right@rule}% - \begin{tcb@savebox}{\tcb@upperbox}{##1}% - \color{tcbcolupper}\kvtcb@fontupper\fontsize{\tcbfitdim}{\tcb@fit@@line}\selectfont% + \begin{tcb@savebox}{\tcb@upperbox}{##1}{tcbcolupper}% + \kvtcb@fontupper\fontsize{\tcbfitdim}{\tcb@fit@@line}\selectfont% \kvtcb@halignupper\tcb@insert@before@upper#1\tcb@insert@after@upper% \end{tcb@savebox}% \advance\count@ 1\relax% @@ -392,17 +392,19 @@ } } } -\NewDocumentCommand \__tcobox_new_tcboxfit_i:w { m +o m } +\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 } \NewDocumentCommand \newtcboxfit { } { + \bool_set_true:N \l__tcobox_prevent_init_overwrite_bool \__tcobox_new_tcboxfit_i:w \newcommand } \NewDocumentCommand \renewtcboxfit { } { + \bool_set_false:N \l__tcobox_prevent_init_overwrite_bool \__tcobox_new_tcboxfit_i:w \renewcommand } @@ -412,25 +414,29 @@ \__tcobox_process_newtcolorbox:nn { #2 }{ #3 } \exp_args:Nc #1 { #3 }{ #4 }{ \tcboxfit[#5,options@for=#3] } } -\NewDocumentCommand \__tcobox_new_TCBoxFit:w { m +o m } +\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 } \NewDocumentCommand \DeclareTCBoxFit { } { + \bool_set_false:N \l__tcobox_prevent_init_overwrite_bool \__tcobox_new_TCBoxFit:w \DeclareDocumentCommand } \NewDocumentCommand \NewTCBoxFit { } { + \bool_set_true:N \l__tcobox_prevent_init_overwrite_bool \__tcobox_new_TCBoxFit:w \NewDocumentCommand } \NewDocumentCommand \RenewTCBoxFit { } { + \bool_set_false:N \l__tcobox_prevent_init_overwrite_bool \__tcobox_new_TCBoxFit:w \RewewDocumentCommand } \NewDocumentCommand \ProvideTCBoxFit { } { + \bool_set_true:N \l__tcobox_prevent_init_overwrite_bool \__tcobox_new_TCBoxFit:w \ProvideDocumentCommand } @@ -440,25 +446,29 @@ \__tcobox_process_newtcolorbox:nn { #2 }{ #3 } \exp_args:Nc #1 { #3 }{ #4 }{ \tcboxfit[#5,options@for=#3]{#6} } } -\NewDocumentCommand \__tcobox_new_TotalTCBoxFit:w { m +o m } +\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 } \NewDocumentCommand \DeclareTotalTCBoxFit { } { + \bool_set_false:N \l__tcobox_prevent_init_overwrite_bool \__tcobox_new_TotalTCBoxFit:w \DeclareDocumentCommand } \NewDocumentCommand \NewTotalTCBoxFit { } { + \bool_set_true:N \l__tcobox_prevent_init_overwrite_bool \__tcobox_new_TotalTCBoxFit:w \NewDocumentCommand } \NewDocumentCommand \RenewTotalTCBoxFit { } { + \bool_set_false:N \l__tcobox_prevent_init_overwrite_bool \__tcobox_new_TotalTCBoxFit:w \RewewDocumentCommand } \NewDocumentCommand \ProvideTotalTCBoxFit { } { + \bool_set_true:N \l__tcobox_prevent_init_overwrite_bool \__tcobox_new_TotalTCBoxFit:w \ProvideDocumentCommand } diff --git a/macros/latex/contrib/tcolorbox/tcbhooks.code.tex b/macros/latex/contrib/tcolorbox/tcbhooks.code.tex index 38bf638d87..4d3069c5b3 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 5.1.1 (2022/06/24) +%% The LaTeX package tcolorbox - version 6.0.0 (2023/02/10) %% tcbhooks.code.tex: Code for adding hooks %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2006-2022 by Prof. Dr. Dr. Thomas F. Sturm +%% Copyright (c) 2006-2023 by Prof. Dr. Dr. Thomas F. Sturm %% ------------------------------------------------------------------------------------------- %% %% 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{5.1.1} +\tcb@set@library@version{6.0.0} \tcbset{% before upper app/.code={\appto\kvtcb@before@upper{#1}},% @@ -112,18 +112,23 @@ finish middle and last pre/.style={finish middle pre={#1},finish last pre={#1}},% finish first and middle pre/.style={finish first pre={#1},finish middle pre={#1}},% % - watermark tikz app/.style={overlay app={\tcb@drawspec@watermark@tikz{#1}}}, - watermark tikz pre/.style={overlay pre={\tcb@drawspec@watermark@tikz{#1}}}, - watermark tikz app on/.style args={#1 is #2}{overlay #1 app={\tcb@drawspec@watermark@tikz{#2}}},% - watermark tikz pre on/.style args={#1 is #2}{overlay #1 pre={\tcb@drawspec@watermark@tikz{#2}}},% - watermark graphics app/.style={overlay app={\tcb@drawspec@watermark@graphics{#1}}}, - watermark graphics pre/.style={overlay pre={\tcb@drawspec@watermark@graphics{#1}}}, - watermark graphics app on/.style args={#1 is #2}{overlay #1 app={\tcb@drawspec@watermark@graphics{#2}}}, - watermark graphics pre on/.style args={#1 is #2}{overlay #1 pre={\tcb@drawspec@watermark@graphics{#2}}}, - watermark text app/.style={overlay app={\tcb@drawspec@watermark@text{#1}}}, - watermark text pre/.style={overlay pre={\tcb@drawspec@watermark@text{#1}}}, - watermark text app on/.style args={#1 is #2}{overlay #1 app={\tcb@drawspec@watermark@text{#2}}}, - watermark text pre on/.style args={#1 is #2}{overlay #1 pre={\tcb@drawspec@watermark@text{#2}}}, + watermark@overlay app/.style={overlay app={\tcb@drawspec@watermark{#1}}}, + watermark@overlay pre/.style={overlay pre={\tcb@drawspec@watermark{#1}}}, + watermark@overlay@on app/.style n args={2}{overlay #1 app={\tcb@drawspec@watermark{#2}}}, + watermark@overlay@on pre/.style n args={2}{overlay #1 pred={\tcb@drawspec@watermark{#2}}}, + % + watermark tikz app/.style={watermark@overlay app={fill@picture={#1}}}, + watermark tikz pre/.style={watermark@overlay pre={fill@picture={#1}}}, + watermark tikz app on/.style args={#1 is #2}{watermark@overlay@on app={#1}{fill@picture={#2}}}, + watermark tikz pre on/.style args={#1 is #2}{watermark@overlay@on pre={#1}{fill@picture={#2}}}, + watermark graphics app/.style={watermark@overlay app={fill@image={#1}}}, + watermark graphics pre/.style={watermark@overlay pre={fill@image={#1}}}, + watermark graphics app on/.style args={#1 is #2}{watermark@overlay@on app={#1}{fill@image={#2}}}, + watermark graphics pre on/.style args={#1 is #2}{watermark@overlay@on pre={#1}{fill@image={#2}}}, + watermark text app/.style={watermark@overlay app={fill@picture={\node[inner sep=0pt,align=flush center]{#1};}}}, + watermark text pre/.style={watermark@overlay pre={fill@picture={\node[inner sep=0pt,align=flush center]{#1};}}}, + watermark text app on/.style args={#1 is #2}{watermark@overlay@on app={#1}{fill@picture={\node[inner sep=0pt,align=flush center]{#2};}}}, + watermark text pre on/.style args={#1 is #2}{watermark@overlay@on pre={#1}{fill@picture={\node[inner sep=0pt,align=flush center]{#2};}}}, % minted options app/.code={\appto\kvtcb@minted@options{,#1}}, minted options pre/.code={\preto\kvtcb@minted@options{#1,}}, diff --git a/macros/latex/contrib/tcolorbox/tcblistings.code.tex b/macros/latex/contrib/tcolorbox/tcblistings.code.tex index 57093d0d48..98fd687ea6 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 5.1.1 (2022/06/24) +%% The LaTeX package tcolorbox - version 6.0.0 (2023/02/10) %% tcblistings.code.tex: Code for colorboxes with listings %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2006-2022 by Prof. Dr. Dr. Thomas F. Sturm +%% Copyright (c) 2006-2023 by Prof. Dr. Dr. Thomas F. Sturm %% ------------------------------------------------------------------------------------------- %% %% 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{5.1.1} +\tcb@set@library@version{6.0.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 28dac54eea..5f91c91f29 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 5.1.1 (2022/06/24) +%% The LaTeX package tcolorbox - version 6.0.0 (2023/02/10) %% tcblistingscode.code.tex: Auxiliary code for colorboxes with listings %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2006-2022 by Prof. Dr. Dr. Thomas F. Sturm +%% Copyright (c) 2006-2023 by Prof. Dr. Dr. Thomas F. Sturm %% ------------------------------------------------------------------------------------------- %% %% 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{5.1.1} +\tcb@set@library@version{6.0.0} \tcbuselibrary{pro@cessing} @@ -280,7 +280,7 @@ \ExplSyntaxOn -\NewDocumentCommand \__tcobox_new_tcblisting:w { m +o m o +o +m } +\NewDocumentCommand \__tcobox_new_tcblisting:w { m +O{} >{\TrimSpaces} m o +o +m } { \__tcobox_process_newtcolorbox:nn { #2 }{ #3 } \tl_if_novalue:nTF { #4 } @@ -299,33 +299,39 @@ } \NewDocumentCommand \newtcblisting { } { + \bool_set_true:N \l__tcobox_prevent_init_overwrite_bool \__tcobox_new_tcblisting:w \newenvironment } \NewDocumentCommand \renewtcblisting { } { + \bool_set_false:N \l__tcobox_prevent_init_overwrite_bool \__tcobox_new_tcblisting:w \renewenvironment } -\NewDocumentCommand \__tcobox_new_TCBListing:w { m +o m +m +m } +\NewDocumentCommand \__tcobox_new_TCBListing:w { m +O{} >{\TrimSpaces} m +m +m } { \__tcobox_process_newtcolorbox:nn { #2 }{ #3 } #1 { #3 }{ #4 }{ \tcblisting{#5,options@for=#3} }{ \endtcblisting } } \NewDocumentCommand \DeclareTCBListing { } { + \bool_set_false:N \l__tcobox_prevent_init_overwrite_bool \__tcobox_new_TCBListing:w \DeclareDocumentEnvironment } \NewDocumentCommand \NewTCBListing { } { + \bool_set_true:N \l__tcobox_prevent_init_overwrite_bool \__tcobox_new_TCBListing:w \NewDocumentEnvironment } \NewDocumentCommand \RenewTCBListing { } { + \bool_set_false:N \l__tcobox_prevent_init_overwrite_bool \__tcobox_new_TCBListing:w \RenewDocumentEnvironment } \NewDocumentCommand \ProvideTCBListing { } { + \bool_set_true:N \l__tcobox_prevent_init_overwrite_bool \__tcobox_new_TCBListing:w \ProvideDocumentEnvironment } @@ -347,17 +353,19 @@ } } } -\NewDocumentCommand \__tcobox_new_tcbinputlisting_i:w { m +o m } +\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 } \NewDocumentCommand \newtcbinputlisting { } { + \bool_set_true:N \l__tcobox_prevent_init_overwrite_bool \__tcobox_new_tcbinputlisting_i:w \newcommand } \NewDocumentCommand \renewtcbinputlisting { } { + \bool_set_false:N \l__tcobox_prevent_init_overwrite_bool \__tcobox_new_tcbinputlisting_i:w \renewcommand } @@ -374,18 +382,22 @@ } \NewDocumentCommand \DeclareTCBInputListing { } { + \bool_set_false:N \l__tcobox_prevent_init_overwrite_bool \__tcobox_new_TCBInputListing:w \DeclareDocumentCommand } \NewDocumentCommand \NewTCBInputListing { } { + \bool_set_true:N \l__tcobox_prevent_init_overwrite_bool \__tcobox_new_TCBInputListing:w \NewDocumentCommand } \NewDocumentCommand \RenewTCBInputListing { } { + \bool_set_false:N \l__tcobox_prevent_init_overwrite_bool \__tcobox_new_TCBInputListing:w \RewewDocumentCommand } \NewDocumentCommand \ProvideTCBInputListing { } { + \bool_set_true:N \l__tcobox_prevent_init_overwrite_bool \__tcobox_new_TCBInputListing:w \ProvideDocumentCommand } diff --git a/macros/latex/contrib/tcolorbox/tcblistingsutf8.code.tex b/macros/latex/contrib/tcolorbox/tcblistingsutf8.code.tex index eb618f90a5..fd4b66f3c5 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 5.1.1 (2022/06/24) +%% The LaTeX package tcolorbox - version 6.0.0 (2023/02/10) %% tcblistingsutf8.code.tex: Code for colorboxes with listings in UTF-8 %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2006-2022 by Prof. Dr. Dr. Thomas F. Sturm +%% Copyright (c) 2006-2023 by Prof. Dr. Dr. Thomas F. Sturm %% ------------------------------------------------------------------------------------------- %% %% 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{5.1.1} +\tcb@set@library@version{6.0.0} \tcbuselibrary{listings} diff --git a/macros/latex/contrib/tcolorbox/tcbmagazine.code.tex b/macros/latex/contrib/tcolorbox/tcbmagazine.code.tex index 4aa35dac70..8d1ba9b71f 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 5.1.1 (2022/06/24) +%% The LaTeX package tcolorbox - version 6.0.0 (2023/02/10) %% tcbmagazine.code.tex: Code for box sets and magazine styles %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2006-2022 by Prof. Dr. Dr. Thomas F. Sturm +%% Copyright (c) 2006-2023 by Prof. Dr. Dr. Thomas F. Sturm %% ------------------------------------------------------------------------------------------- %% %% 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{5.1.1} +\tcb@set@library@version{6.0.0} \tcbuselibrary{breakable} diff --git a/macros/latex/contrib/tcolorbox/tcbminted.code.tex b/macros/latex/contrib/tcolorbox/tcbminted.code.tex index 73e4666aff..817ba635bf 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 5.1.1 (2022/06/24) +%% The LaTeX package tcolorbox - version 6.0.0 (2023/02/10) %% tcbminted.code.tex: Code for colorboxes with listings %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2006-2022 by Prof. Dr. Dr. Thomas F. Sturm +%% Copyright (c) 2006-2023 by Prof. Dr. Dr. Thomas F. Sturm %% ------------------------------------------------------------------------------------------- %% %% 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{5.1.1} +\tcb@set@library@version{6.0.0} \RequirePackage{minted}[2021/12/24] diff --git a/macros/latex/contrib/tcolorbox/tcbposter.code.tex b/macros/latex/contrib/tcolorbox/tcbposter.code.tex index 3e208f58ed..95c8b1f507 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 5.1.1 (2022/06/24) +%% The LaTeX package tcolorbox - version 6.0.0 (2023/02/10) %% tcbposter.code.tex: Code for posters %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2006-2022 by Prof. Dr. Dr. Thomas F. Sturm +%% Copyright (c) 2006-2023 by Prof. Dr. Dr. Thomas F. Sturm %% ------------------------------------------------------------------------------------------- %% %% 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{5.1.1} +\tcb@set@library@version{6.0.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 3d5fac78d0..77c2182888 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 5.1.1 (2022/06/24) +%% The LaTeX package tcolorbox - version 6.0.0 (2023/02/10) %% tcbprocessing.code.tex: Code for conditional processing %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2006-2022 by Prof. Dr. Dr. Thomas F. Sturm +%% Copyright (c) 2006-2023 by Prof. Dr. Dr. Thomas F. Sturm %% ------------------------------------------------------------------------------------------- %% %% 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{5.1.1} +\tcb@set@library@version{6.0.0} \RequirePackage{pdftexcmds} \RequirePackage{shellesc} diff --git a/macros/latex/contrib/tcolorbox/tcbraster.code.tex b/macros/latex/contrib/tcolorbox/tcbraster.code.tex index d3e62b531a..47e394433e 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 5.1.1 (2022/06/24) +%% The LaTeX package tcolorbox - version 6.0.0 (2023/02/10) %% tcbskinsjigsaw.code.tex: Code for colorboxes with different skins %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2006-2022 by Prof. Dr. Dr. Thomas F. Sturm +%% Copyright (c) 2006-2023 by Prof. Dr. Dr. Thomas F. Sturm %% ------------------------------------------------------------------------------------------- %% %% 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{5.1.1} +\tcb@set@library@version{6.0.0} \newcounter{tcbrastercolumn} \newcounter{tcbrasterrow} diff --git a/macros/latex/contrib/tcolorbox/tcbskins.code.tex b/macros/latex/contrib/tcolorbox/tcbskins.code.tex index 65a29a24c9..183ed011dd 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 5.1.1 (2022/06/24) +%% The LaTeX package tcolorbox - version 6.0.0 (2023/02/10) %% tcbskins.code.tex: Code for colorboxes with different skins %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2006-2022 by Prof. Dr. Dr. Thomas F. Sturm +%% Copyright (c) 2006-2023 by Prof. Dr. Dr. Thomas F. Sturm %% ------------------------------------------------------------------------------------------- %% %% This work may be distributed and/or modified under the @@ -17,9 +17,10 @@ %% %% This work consists of all files listed in README %% -\tcb@set@library@version{5.1.1} +\tcb@set@library@version{6.0.0} \RequirePackage{tikz}[2010/10/13] +\RequirePackage{tikzfill.image} \newenvironment{tikzpicture@tcb@hooked}{% \edef\tcb@tikzpicture@begin{\noexpand\tikzpicture[\expandonce\tcb@tikz@option@hook]}% @@ -1134,7 +1135,7 @@ \colorlet{tcbtranscol@back}{tcbcolbacktitle}% \let\tcb@trans@skin@current\kvtcb@skin@current% \let\tcb@trans@boxedstyle\kvtcb@style@boxedtitle% - \setbox\tcb@titlebox\color@hbox\bgroup\color{tcbcoltitle}\kvtcb@fonttitle\kvtcb@before@boxedtitle\kvtcb@haligntitle\kvtcb@before@title\tcbtitletext\kvtcb@after@title\kvtcb@after@boxedtitle\egroup\color@endbox% + \setbox\tcb@titlebox\color@hbox\bgroup\color{tcbcoltitle}\kvtcb@fonttitle\kvtcb@before@boxedtitle\kvtcb@haligntitle\tcb@insert@before@title\tcbtitletext\tcb@insert@after@title\kvtcb@after@boxedtitle\egroup\color@endbox% \setbox\tcb@titlebox\color@hbox\tcbox[skin=\tcb@trans@skin@current,colframe=tcbtranscol@frame,colback=tcbtranscol@back,% code={\pgfkeysalsofrom\tcb@trans@boxedsize\pgfkeysalsofrom\tcb@trans@boxedstyle% \ifcase#6 @@ -1210,77 +1211,55 @@ } -\newbox\tcb@waterbox - -\def\tcb@setratio#1#2#3{\edef#1{\strip@pt\dimexpr\number\numexpr\number\dimexpr#2\relax*65536/\number\dimexpr#3\relax\relax sp\relax}} - -\def\tcb@setratiorobust#1#2#3{\ifdim\dimexpr#3<1pt\relax\tcb@setratio#1{#2}{1pt}\else\tcb@setratio#1{#2}{#3}\fi} - -\def\tcb@comp@waterbox@stretch#1#2#3{% - \tcb@setratiorobust\tcb@scale@x{#1\dimexpr#2}{\wd\tcb@waterbox}% - \tcb@setratiorobust\tcb@scale@y{#1\dimexpr#3}{\ht\tcb@waterbox+\dp\tcb@waterbox}% -} - -\def\tcb@comp@waterbox@zoom#1#2#3{% - \tcb@comp@waterbox@stretch{#1}{#2}{#3}% - \ifdim\dimexpr\tcb@scale@x pt\relax<\dimexpr\tcb@scale@y pt\relax\let\tcb@scale@y=\tcb@scale@x\else\let\tcb@scale@x=\tcb@scale@y\fi% -} - -\def\tcb@comp@waterbox@overzoom#1#2#3{% - \tcb@comp@waterbox@stretch{#1}{#2}{#3}% - \ifdim\dimexpr\tcb@scale@x pt\relax>\dimexpr\tcb@scale@y pt\relax\let\tcb@scale@y=\tcb@scale@x\else\let\tcb@scale@x=\tcb@scale@y\fi% -} - -\def\tcb@comp@waterbox@shrink#1#2#3{% - \tcb@comp@waterbox@zoom{#1}{#2}{#3}% - \ifdim\dimexpr\tcb@scale@x pt\relax>1pt\relax% - \edef\tcb@scale@x{1}\edef\tcb@scale@y{1}% - \fi% -} - -\def\tcb@box@scaled@waterbox{\scalebox{\tcb@scale@x}[\tcb@scale@y]{\box\tcb@waterbox}} - -\def\tcb@drawspec@watermark@@noclip{% - \tcb@comp@wm% - \node[opacity=\kvtcb@watermark@opacity,anchor=center] at (interior) {\tcb@box@scaled@waterbox};% -} - -\def\tcb@drawspec@watermark@@clip{% +\def\tcb@drawspec@watermark@@clip#1{% \begin{tcbclipinterior}% - \tcb@drawspec@watermark@@noclip% + \color{\kvtcb@watermark@color}% + \path[% + fill image opacity=\kvtcb@watermark@opacity, + fill image scale=\kvtcb@watermark@scale, + #1, + ] + (interior.south west) rectangle (interior.north east); \end{tcbclipinterior}% } -\def\tcb@drawspec@watermark@tikz#1{% - \setbox\tcb@waterbox=\color@hbox\pgfinterruptpicture{\pgfsetbaseline{0pt}\begin{tikzpicture}[color=\kvtcb@watermark@color]#1\end{tikzpicture}}\endpgfinterruptpicture\color@endbox% - \tcb@drawspec@watermark% -} - -\def\tcb@drawspec@watermark@graphics#1{% - \setbox\tcb@waterbox=\color@hbox\pgfinterruptpicture{\includegraphics{#1}}\endpgfinterruptpicture\color@endbox% - \tcb@drawspec@watermark% -} - -\def\tcb@drawspec@watermark@text#1{% - \tcb@drawspec@watermark@tikz{\node[inner sep=0pt,align=flush center]{#1};}% +\def\tcb@drawspec@watermark@@noclip#1{% + \color{\kvtcb@watermark@color}% + \path[% + fill image opacity=\kvtcb@watermark@opacity, + fill image scale=(\kvtcb@watermark@scale)/4, + #1, + ] + ([xshift=-\tcb@innerwidth*2,yshift=-\tcb@innerheight*2]interior.center) + rectangle +(\tcb@innerwidth*4,\tcb@innerheight*4); } - \tcbset{% watermark opacity/.store in=\kvtcb@watermark@opacity,% watermark color/.store in=\kvtcb@watermark@color,% % - watermark stretch/.code={\def\tcb@comp@wm{\tcb@comp@waterbox@stretch{#1}{\tcb@innerwidth}{\tcb@innerheight}}},% - watermark zoom/.code={\def\tcb@comp@wm{\tcb@comp@waterbox@zoom{#1}{\tcb@innerwidth}{\tcb@innerheight}}},% - watermark overzoom/.code={\def\tcb@comp@wm{\tcb@comp@waterbox@overzoom{#1}{\tcb@innerwidth}{\tcb@innerheight}}},% - watermark shrink/.code={\def\tcb@comp@wm{\tcb@comp@waterbox@shrink{#1}{\tcb@innerwidth}{\tcb@innerheight}}},% + watermark stretch/.code={\def\kvtcb@watermark@scale{#1}% + \tikzset{fill@image/.style={fill stretch image={##1}},fill@picture/.style={fill stretch picture={##1}}}},% + watermark stretch/.default=1, + watermark zoom/.code={\def\kvtcb@watermark@scale{#1}% + \tikzset{fill@image/.style={fill zoom image={##1}},fill@picture/.style={fill zoom picture={##1}}}},% + watermark zoom/.default=1, + watermark overzoom/.code={\def\kvtcb@watermark@scale{#1}% + \tikzset{fill@image/.style={fill overzoom image={##1}},fill@picture/.style={fill overzoom picture={##1}}}},% + watermark overzoom/.default=1, + watermark shrink/.code={\def\kvtcb@watermark@scale{#1}% + \tikzset{fill@image/.style={fill shrink image={##1}},fill@picture/.style={fill shrink picture={##1}}}},% + watermark shrink/.default=1, +% + watermark@overlay/.style={overlay={\tcb@drawspec@watermark{#1}}}, + watermark@overlay@on/.style n args={2}{overlay #1={\tcb@drawspec@watermark{#2}}}, % - watermark tikz/.style={overlay={\tcb@drawspec@watermark@tikz{#1}}}, - watermark tikz on/.style args={#1 is #2}{overlay #1={\tcb@drawspec@watermark@tikz{#2}}},% - watermark graphics/.style={overlay={\tcb@drawspec@watermark@graphics{#1}}}, - watermark graphics on/.style args={#1 is #2}{overlay #1={\tcb@drawspec@watermark@graphics{#2}}}, - watermark text/.style={overlay={\tcb@drawspec@watermark@text{#1}}}, - watermark text on/.style args={#1 is #2}{overlay #1={\tcb@drawspec@watermark@text{#2}}}, + watermark tikz/.style={watermark@overlay={fill@picture={#1}}}, + watermark tikz on/.style args={#1 is #2}{watermark@overlay@on={#1}{fill@picture={#2}}}, + watermark graphics/.style={watermark@overlay={fill@image={#1}}}, + watermark graphics on/.style args={#1 is #2}{watermark@overlay@on={#1}{fill@image={#2}}}, + watermark text/.style={watermark@overlay={fill@picture={\node[inner sep=0pt,align=flush center]{#1};}}}, + watermark text on/.style args={#1 is #2}{watermark@overlay@on={#1}{fill@picture={\node[inner sep=0pt,align=flush center]{#2};}}}, no watermark/.style={no overlay}, clip watermark/.is choice, clip watermark/true/.code={\let\tcb@drawspec@watermark=\tcb@drawspec@watermark@@clip}, @@ -1311,115 +1290,6 @@ } -\def\tcb@process@ppbb{% - \pgf@process{\pgfpointanchor{path picture bounding box}{south west}}% - \pgf@xa\pgf@x\pgf@ya\pgf@y% - \pgf@process{\pgfpointanchor{path picture bounding box}{north east}}% - \pgf@xb\pgf@x\pgf@yb\pgf@y% - \pgfsetfillopacity{\tcb@tikz@fill@graphics@opacity}% - \pgfsetstrokeopacity{\tcb@tikz@fill@graphics@opacity}% -} - -\def\tcb@process@ppbb@wh{% - \tcb@process@ppbb% - \tcbdimto\tcb@ppbb@width{\pgf@xb-\pgf@xa}% - \tcbdimto\tcb@ppbb@height{\pgf@yb-\pgf@ya}% -} - -\def\tcb@ppbb@textbox#1{\pgftext[x=\the\dimexpr\pgf@xa+\tcb@ppbb@width/2\relax,y=\pgf@ya+\tcb@ppbb@height/2]{#1}} - -\def\tcb@set@waterbox@to@graphics#1{% - \setbox\tcb@waterbox=\color@hbox\pgfinterruptpicture% - \begingroup\edef\x{\endgroup\noexpand\includegraphics[\tcb@tikz@fill@graphics@options]}\x{#1}% - \endpgfinterruptpicture\color@endbox% -} - -\def\tcb@set@waterbox@to@picture#1{% - \setbox\tcb@waterbox=\color@hbox\pgfinterruptpicture{\pgfsetbaseline{0pt}\begin{tikzpicture}#1\end{tikzpicture}}\endpgfinterruptpicture\color@endbox% -} - -\tikzset{% - fill image opacity/.store in=\tcb@tikz@fill@graphics@opacity,% - fill image opacity=1,% - fill image scale/.store in=\tcb@tikz@fill@graphics@scale,% - fill image scale=1,% - fill image options/.store in=\tcb@tikz@fill@graphics@options,% - fill image options=,% - fill plain image/.style={path picture={% - \tcb@process@ppbb@wh% - \tcb@ppbb@textbox{\begingroup\edef\x{\endgroup\noexpand\includegraphics[\tcb@tikz@fill@graphics@options]}\x{#1}}% - }}, - fill plain picture/.style={path picture={% - \tcb@process@ppbb@wh% - \tcb@set@waterbox@to@picture{#1}% - \tcb@ppbb@textbox{\box\tcb@waterbox}% - }}, - fill stretch image/.style={path picture={% - \tcb@process@ppbb@wh% - \tcb@ppbb@textbox{\begingroup\edef\x{\endgroup\noexpand\includegraphics[\tcb@tikz@fill@graphics@options,% - width=\the\dimexpr\tcb@tikz@fill@graphics@scale\dimexpr\tcb@ppbb@width\relax,% - height=\the\dimexpr\tcb@tikz@fill@graphics@scale\dimexpr\tcb@ppbb@height\relax]}\x{#1}}% - }}, - fill stretch picture/.style={path picture={% - \tcb@process@ppbb@wh% - \tcb@set@waterbox@to@picture{#1}% - \tcb@comp@waterbox@stretch{\tcb@tikz@fill@graphics@scale}{\tcb@ppbb@width}{\tcb@ppbb@height}% - \tcb@ppbb@textbox{\tcb@box@scaled@waterbox}% - }}, - fill@overzoom/.style={path picture={% - \tcb@process@ppbb@wh% - #1% - \tcb@comp@waterbox@overzoom{\tcb@tikz@fill@graphics@scale}{\tcb@ppbb@width}{\tcb@ppbb@height}% - \tcb@ppbb@textbox{\tcb@box@scaled@waterbox}% - }}, - fill overzoom image/.style={fill@overzoom={\tcb@set@waterbox@to@graphics{#1}}},% - fill overzoom picture/.style={fill@overzoom={\tcb@set@waterbox@to@picture{#1}}},% - fill@zoom/.style={path picture={% - \tcb@process@ppbb@wh% - #1% - \tcb@comp@waterbox@zoom{\tcb@tikz@fill@graphics@scale}{\tcb@ppbb@width}{\tcb@ppbb@height}% - \tcb@ppbb@textbox{\tcb@box@scaled@waterbox}% - }}, - fill zoom image/.style={fill@zoom={\tcb@set@waterbox@to@graphics{#1}}},% - fill zoom picture/.style={fill@zoom={\tcb@set@waterbox@to@picture{#1}}},% - fill@shrink/.style={path picture={% - \tcb@process@ppbb@wh% - #1% - \tcb@comp@waterbox@shrink{\tcb@tikz@fill@graphics@scale}{\tcb@ppbb@width}{\tcb@ppbb@height}% - \tcb@ppbb@textbox{\tcb@box@scaled@waterbox}% - }}, - fill shrink image/.style={fill@shrink={\tcb@set@waterbox@to@graphics{#1}}},% - fill shrink picture/.style={fill@shrink={\tcb@set@waterbox@to@picture{#1}}},% - fill@tile/.style={path picture={% - \tcb@process@ppbb% - #1% - \tcbdimto\tcb@ppbb@tilew{\wd\tcb@waterbox}% - \tcbdimto\tcb@ppbb@tileh{\ht\tcb@waterbox+\dp\tcb@waterbox}% - \pgf@xc\pgf@xa\pgf@yc\pgf@yb% - \pgfutil@loop% - \pgfutil@loop% - \pgftext[x=\pgf@xc,y=\pgf@yc,left,top]{\copy\tcb@waterbox}% - \ifdim\pgf@xc<\pgf@xb\relax% - \advance\pgf@xc\tcb@ppbb@tilew% - \pgfutil@repeat% - \ifdim\pgf@yc>\pgf@ya\relax% - \advance\pgf@yc-\tcb@ppbb@tileh% - \pgf@xc\pgf@xa% - \pgfutil@repeat% - }},% - fill tile image/.style={fill@tile={\tcb@set@waterbox@to@graphics{#1}}},% - fill tile picture/.style={fill@tile={\tcb@set@waterbox@to@picture{#1}}},% - fill tile picture*/.style 2 args={fill@tile={\tcb@set@waterbox@to@picture{#2}% - \setbox\tcb@waterbox=\color@hbox\scalebox{#1}{\box\tcb@waterbox}\color@endbox}},% - % - fill plain image*/.style 2 args={fill image options={#1},fill plain image={#2}},% - fill stretch image*/.style 2 args={fill image options={#1},fill stretch image={#2}},% - fill overzoom image*/.style 2 args={fill image options={#1},fill overzoom image={#2}},% - fill zoom image*/.style 2 args={fill image options={#1},fill zoom image={#2}},% - fill shrink image*/.style 2 args={fill image options={#1},fill shrink image={#2}},% - fill tile image*/.style 2 args={fill image options={#1},fill tile image={#2}},% -} - \tcbset{% frame style image/.style={frame style={fill=none,fill stretch image={#1}}}, frame style tile/.style 2 args={frame style={fill=none,fill tile image*={#1}{#2}}}, @@ -1815,104 +1685,6 @@ } -\def\tcb@include@graphics{% - \let\tcb@graphics@options\kvtcb@graphics@options% - \ifnum\kvtcb@graphics@orientation>-1\relax% - \setbox\tcb@waterbox=\color@hbox\begingroup\edef\x{\endgroup\noexpand\includegraphics[\tcb@graphics@options]}\x{\imagepath}\color@endbox% - \ifcase\kvtcb@graphics@orientation\relax% - \ifdim\wd\tcb@waterbox<\dimexpr\ht\tcb@waterbox+\dp\tcb@waterbox\relax% - \appto\tcb@graphics@options{,angle=90}% - \fi% - \or% - \ifdim\wd\tcb@waterbox<\dimexpr\ht\tcb@waterbox+\dp\tcb@waterbox\relax% - \appto\tcb@graphics@options{,angle=-90}% - \fi% - \or% - \ifdim\wd\tcb@waterbox>\dimexpr\ht\tcb@waterbox+\dp\tcb@waterbox\relax% - \appto\tcb@graphics@options{,angle=90}% - \fi% - \or% - \ifdim\wd\tcb@waterbox>\dimexpr\ht\tcb@waterbox+\dp\tcb@waterbox\relax% - \appto\tcb@graphics@options{,angle=-90}% - \fi% - \fi% - \fi% - \ifdefstring{\kvtcb@capture}{hbox}{% - \tcbox{% - \begingroup\edef\x{\endgroup\noexpand\includegraphics[\tcb@graphics@options]}% - \x{\imagepath}% - }% - }{% - \iftcb@fixedheight% - \begin{tcolorbox}% - \begingroup\edef\x{\endgroup\noexpand\includegraphics[\tcb@graphics@options,width=\linewidth,height=\tcbtextheight,keepaspectratio]}% - \x{\imagepath}% - \end{tcolorbox}% - \else% - \ifdefempty\tcb@height@adjust{% - \begin{tcolorbox}% - \begingroup\edef\x{\endgroup\noexpand\includegraphics[\tcb@graphics@options,width=\linewidth]}% - \x{\imagepath}% - \end{tcolorbox}% - }{% height fill - \begin{tcolorbox}[underlay={% - \begin{tcbclipinterior}% - \path[fill zoom image*={\tcb@graphics@options}{\imagepath}] - ([xshift=\kvtcb@boxsep+\kvtcb@leftupper,yshift=\kvtcb@boxsep+\kvtcb@bottom]interior.south west) rectangle - ([xshift=-\kvtcb@boxsep-\kvtcb@rightupper,yshift=-\kvtcb@boxsep-\kvtcb@top]interior.north east); - \end{tcbclipinterior}% - }]% - \end{tcolorbox}% - }% - \fi% - }% -} - -\def\tcb@scanfilename#1#2{% - \begingroup% - \everyeof{\noexpand}% - \endlinechar -1% - \catcode`\_=11% - \catcode`\~=11% - \edef\x{\scantokens\expandafter{#2}}% - \expandafter\endgroup% - \expandafter\def\expandafter #1\expandafter{\x}% -}% - - -\def\tcb@include@graphics@preparefile#1{% - \tcb@scanfilename\tcb@temp{#1}% - \filename@parse{\tcb@temp}% - \ifx\filename@ext\relax% - \let\imagename\filename@base% - \else% - \def\imagename{\filename@base\Gin@sepdefault\filename@ext}% - \fi% - \ifdefined\grffile@Ginclude@graphics% - % grffile package loaded - \ifx\kvtcb@graphics@directory\@empty% - \def\imagepath{#1}% - \else% - \def\imagepath{\kvtcb@graphics@directory/#1}% - \fi% - \else% - \ifx\kvtcb@graphics@directory\@empty% - \edef\imagepath{#1}% - \else% - \edef\imagepath{\kvtcb@graphics@directory/#1}% - \fi% - \fi% -} - -\newcommand{\tcbincludegraphics}[2][]{% - \begingroup% - \tcb@layer@pushup% - \tcb@apply@box@options{enhanced,clip upper=true,valign=center,center upper,#1}% - \tcb@include@graphics@preparefile{#2}% - \edef\imagepage{1}% - \tcb@include@graphics% - \endgroup% -} \def\tcb@set@pdfpages#1#2{% \IfFileExists{#2}{% @@ -1940,20 +1712,158 @@ \relax% } -\newcommand{\tcbincludepdf}[2][]{% - \tcb@include@graphics@preparefile{#2}% - \tcb@set@pdfpages\pdfpages{\imagepath}% - \foreach \imagepage in \kvtcb@graphics@pages% - {% - \begingroup% - \tcb@layer@pushup% - \tcb@apply@box@options{enhanced,clip upper=true,valign=center,center upper,#1}% - \appto\kvtcb@graphics@options{,page=\imagepage}% - \tcb@include@graphics% - \endgroup% - }% + +\ExplSyntaxOn + +\tl_new:N \l__tcobox_graphics_options_tl + + +\cs_new:Npn \__tcobox_include_graphics:nn #1#2 + { + \tl_set:Nn \l_tmpa_tl { \includegraphics } + \tl_put_right:Nx \l_tmpa_tl { [#1] } + \l_tmpa_tl {#2} + } + + +\cs_new:Npn \__tcobox_include_graphics: + { + \tl_set_eq:NN \l__tcobox_graphics_options_tl \kvtcb@graphics@options + + \int_compare:nNnT \kvtcb@graphics@orientation > {-1} + { + \hbox_set:Nn \l_tmpa_box + { + \__tcobox_include_graphics:nn { \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} + { + \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} + { + \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} + { + \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} + { + \tl_put_right:Nn \l__tcobox_graphics_options_tl {,angle=-90} + } + \fi: + } + + \tl_if_eq:NnTF \kvtcb@capture {hbox} + { + \tcbox + { + \__tcobox_include_graphics:nn { \l__tcobox_graphics_options_tl }{ \imagepath } + } + } + { + \legacy_if:nTF {tcb@fixedheight} + { + \begin{tcolorbox} + \__tcobox_include_graphics:nn { \l__tcobox_graphics_options_tl,width=\linewidth,height=\tcbtextheight,keepaspectratio }{ \imagepath } + \end{tcolorbox} + } + { + \tl_if_empty:NTF \tcb@height@adjust + { + \begin{tcolorbox} + \__tcobox_include_graphics:nn { \l__tcobox_graphics_options_tl,width=\linewidth }{ \imagepath } + \end{tcolorbox}% + }{% height fill + \begin{tcolorbox}[ + underlay= + { + \begin{tcbclipinterior} + \path[fill~zoom~image*={\l__tcobox_graphics_options_tl}{\imagepath}] + ([xshift=\kvtcb@boxsep+\kvtcb@leftupper,yshift=\kvtcb@boxsep+\kvtcb@bottom]interior.south~west)~rectangle~ + ([xshift=-\kvtcb@boxsep-\kvtcb@rightupper,yshift=-\kvtcb@boxsep-\kvtcb@top]interior.north~east); + \end{tcbclipinterior} + }] + \end{tcolorbox} + } + } + } + } + + +\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 + \tl_set_eq:NN \imagepath \imagename + \tl_if_empty:NF \l_tmpa_tl + { + \tl_put_left:Nn \imagepath {/} + \tl_if_eq:NnF \l_tmpa_tl {/} + { + \tl_put_left:NV \imagepath \l_tmpa_tl + } + } + \tl_if_empty:NF \kvtcb@graphics@directory + { + \tl_put_left:Nn \imagepath {/} + \tl_if_eq:NnF \kvtcb@graphics@directory {/} + { + \tl_put_left:NV \imagepath \kvtcb@graphics@directory + } + } + \tl_set_rescan:Nno \imagename + { + \char_set_catcode_letter:N \_ + \char_set_catcode_letter:N \~ + \char_set_catcode_letter:N \{ + \char_set_catcode_letter:N \} + \char_set_catcode_letter:N \$ + \char_set_catcode_letter:N \^ + \char_set_catcode_letter:N \# + \char_set_catcode_letter:N \% + } + { + \imagename + } + } + + +\NewDocumentCommand \tcbincludegraphics { +O{} m } + { + \group_begin: + \tcb@layer@pushup + \tcb@apply@box@options{enhanced,clip~upper=true,valign=center,center~upper,#1} + \__tcobox_include_graphics_preparefile:n {#2} + \cs_set:Npn \imagepage {1} + \__tcobox_include_graphics: + \group_end: + } + + +\NewDocumentCommand \tcbincludepdf { +O{} m } + { + \__tcobox_include_graphics_preparefile:n {#2} + \tcb@set@pdfpages\pdfpages{\imagepath} + \foreach~\imagepage~in~\kvtcb@graphics@pages + { + \group_begin: + \tcb@layer@pushup + \tcb@apply@box@options{enhanced,clip~upper=true,valign=center,center~upper,#1} + \tl_put_right:Nn \kvtcb@graphics@options {,page=\imagepage} + \__tcobox_include_graphics: + \group_end: + } } +\ExplSyntaxOff + + \tcbset{% graphics options/.store in=\kvtcb@graphics@options, graphics pages/.store in=\kvtcb@graphics@pages, diff --git a/macros/latex/contrib/tcolorbox/tcbskinsjigsaw.code.tex b/macros/latex/contrib/tcolorbox/tcbskinsjigsaw.code.tex index 8d1fb2abcd..183095ad64 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 5.1.1 (2022/06/24) +%% The LaTeX package tcolorbox - version 6.0.0 (2023/02/10) %% tcbskinsjigsaw.code.tex: Code for colorboxes with different skins %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2006-2022 by Prof. Dr. Dr. Thomas F. Sturm +%% Copyright (c) 2006-2023 by Prof. Dr. Dr. Thomas F. Sturm %% ------------------------------------------------------------------------------------------- %% %% 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{5.1.1} +\tcb@set@library@version{6.0.0} \tcbuselibrary{skins} diff --git a/macros/latex/contrib/tcolorbox/tcbtheorems.code.tex b/macros/latex/contrib/tcolorbox/tcbtheorems.code.tex index dc6b5651e7..7135eaba32 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 5.1.1 (2022/06/24) +%% The LaTeX package tcolorbox - version 6.0.0 (2023/02/10) %% tcbtheorems.code.tex: Code for theorems in colorboxes %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2006-2022 by Prof. Dr. Dr. Thomas F. Sturm +%% Copyright (c) 2006-2023 by Prof. Dr. Dr. Thomas F. Sturm %% ------------------------------------------------------------------------------------------- %% %% 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{5.1.1} +\tcb@set@library@version{6.0.0} \RequirePackage{amsmath} @@ -147,18 +147,25 @@ } -\NewDocumentCommand \__tcobox_new_tcbtheorem:w { m O{} m m +m m } +\NewDocumentCommand \__tcobox_new_tcbtheorem_x:w { m O{} m m +m m } { - #1 [auto~counter,#2]{#3}[3][] + #1 [auto~counter,#2] {#3} { +O{} +o +m m } { #5, - title = {\__tcobox_theo_title:nnn{#4}{\thetcbcounter}{##2}}, - list~entry = {\protect\numberline{\thetcbcounter}##2}, - nameref = {##2}, - theo@label = {#6}{##3}, + title = {\__tcobox_theo_title:nnn{#4}{\thetcbcounter}{##3}}, + IfValueTF = {##2} + { + list~entry = {\protect\numberline{\thetcbcounter}##2}, + nameref = {##2}, + } + { + list~entry = {\protect\numberline{\thetcbcounter}##3}, + nameref = {##3}, + }, + theo@label = {#6}{##4}, ##1 } - #1 [#2,no~counter,list~inside=]{#3*}[2][] + #1 [#2,no~counter,list~inside=] {#3*} { +O{} +m } { #5, title = {\__tcobox_theo_title:nnn{#4}{}{##2}}, @@ -167,15 +174,29 @@ } -\NewDocumentCommand \newtcbtheorem {} +\NewDocumentCommand \NewTcbTheorem {} + { + \__tcobox_new_tcbtheorem_x:w \NewTColorBox + } +\NewCommandCopy\newtcbtheorem\NewTcbTheorem + + +\NewDocumentCommand \RenewTcbTheorem {} + { + \__tcobox_new_tcbtheorem_x:w \RenewTColorBox + } +\NewCommandCopy\renewtcbtheorem\RenewTcbTheorem + + +\NewDocumentCommand \DeclareTcbTheorem {} { - \__tcobox_new_tcbtheorem:w \newtcolorbox + \__tcobox_new_tcbtheorem_x:w \DeclareTColorBox } -\NewDocumentCommand \renewtcbtheorem {} +\NewDocumentCommand \ProvideTcbTheorem {} { - \__tcobox_new_tcbtheorem:w \renewtcolorbox + \__tcobox_new_tcbtheorem_x:w \ProvideTColorBox } diff --git a/macros/latex/contrib/tcolorbox/tcbvignette.code.tex b/macros/latex/contrib/tcolorbox/tcbvignette.code.tex index 900e14ad95..92d194860c 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 5.1.1 (2022/06/24) +%% The LaTeX package tcolorbox - version 6.0.0 (2023/02/10) %% tcbvignette.code.tex: Code for ornamental frames %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2006-2022 by Prof. Dr. Dr. Thomas F. Sturm +%% Copyright (c) 2006-2023 by Prof. Dr. Dr. Thomas F. Sturm %% ------------------------------------------------------------------------------------------- %% %% 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{5.1.1} +\tcb@set@library@version{6.0.0} \tcbuselibrary{skins} diff --git a/macros/latex/contrib/tcolorbox/tcbxparse.code.tex b/macros/latex/contrib/tcolorbox/tcbxparse.code.tex index 477ae4dc6c..56ad29b0d4 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 5.1.1 (2022/06/24) +%% The LaTeX package tcolorbox - version 6.0.0 (2023/02/10) %% tcbxparse.code.tex: Code for xparse features %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2006-2022 by Prof. Dr. Dr. Thomas F. Sturm +%% Copyright (c) 2006-2023 by Prof. Dr. Dr. Thomas F. Sturm %% ------------------------------------------------------------------------------------------- %% %% 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{5.1.1} +\tcb@set@library@version{6.0.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 index 4fc5f5f334..f77ca2e8a9 100644 Binary files a/macros/latex/contrib/tcolorbox/tcolorbox-example-poster.pdf and b/macros/latex/contrib/tcolorbox/tcolorbox-example-poster.pdf differ diff --git a/macros/latex/contrib/tcolorbox/tcolorbox-example-poster.tex b/macros/latex/contrib/tcolorbox/tcolorbox-example-poster.tex index 699d19a9c7..4dbfcb4fec 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 5.1.1 (2022/06/24) +%% The LaTeX package tcolorbox - version 6.0.0 (2023/02/10) %% tcolorbox-example-poster.tex: a poster example for tcolorbox %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2006-2022 by Prof. Dr. Dr. Thomas F. Sturm +%% Copyright (c) 2006-2023 by Prof. Dr. Dr. Thomas F. Sturm %% ------------------------------------------------------------------------------------------- %% %% 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 index c68ebb8fbe..08b56c8ef9 100644 Binary files a/macros/latex/contrib/tcolorbox/tcolorbox-example.pdf and b/macros/latex/contrib/tcolorbox/tcolorbox-example.pdf differ diff --git a/macros/latex/contrib/tcolorbox/tcolorbox-example.tex b/macros/latex/contrib/tcolorbox/tcolorbox-example.tex index 1d4ee51c68..8a705f8fd2 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 5.1.1 (2022/06/24) +%% The LaTeX package tcolorbox - version 6.0.0 (2023/02/10) %% tcolorbox-example.tex: an example for tcolorbox %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2006-2022 by Prof. Dr. Dr. Thomas F. Sturm +%% Copyright (c) 2006-2023 by Prof. Dr. Dr. Thomas F. Sturm %% ------------------------------------------------------------------------------------------- %% %% This work may be distributed and/or modified under the diff --git a/macros/latex/contrib/tcolorbox/tcolorbox-tutorial-poster.pdf b/macros/latex/contrib/tcolorbox/tcolorbox-tutorial-poster.pdf index 7cb12cfa72..3640c4b7f0 100644 Binary files a/macros/latex/contrib/tcolorbox/tcolorbox-tutorial-poster.pdf and b/macros/latex/contrib/tcolorbox/tcolorbox-tutorial-poster.pdf differ diff --git a/macros/latex/contrib/tcolorbox/tcolorbox-tutorial-poster.tex b/macros/latex/contrib/tcolorbox/tcolorbox-tutorial-poster.tex index 0427651ee3..2980d2253e 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 5.1.1 (2022/06/24) +%% The LaTeX package tcolorbox - version 6.0.0 (2023/02/10) %% tcolorbox-tutorial-poster.tex: a tutorial for poster creation with tcolorbox %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2006-2022 by Prof. Dr. Dr. Thomas F. Sturm +%% Copyright (c) 2006-2023 by Prof. Dr. Dr. Thomas F. Sturm %% ------------------------------------------------------------------------------------------- %% %% 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 5569800e3d..d67c8a362a 100644 --- a/macros/latex/contrib/tcolorbox/tcolorbox.doc.bib +++ b/macros/latex/contrib/tcolorbox/tcolorbox.doc.bib @@ -7,7 +7,7 @@ language = {english} } -@manual{schoepf:2001a, +@manual{schoepf:verbatim, 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}, @@ -49,12 +49,12 @@ @book{sturm:latex, author = {Thomas F. Sturm}, - title = {\LaTeX -- Einführung in das Textsatzsystem}, - publisher = {Leibnitz Universität Hannover IT Services (LUIS)}, + title = {\LaTeX -- Einf{\"u}hrung in das Textsatzsystem}, + publisher = {Leibnitz Universit{\"a}t Hannover IT Services (LUIS)}, address = {Hannover}, edition = 12, - series = {IT-Handb\"ucher}, - url = {https://www.luis.uni-hannover.de/de/services/schulung-beratung-und-support/handbuecher/it-handbuecher-und-ebooks/details/manuals/latex/}, + series = {IT-Handb{\"u}cher}, + url = {https://www.luis.uni-hannover.de/de/services/kurse-beratung-und-support/handbuecher/it-handbuecher-und-ebooks/details/manuals/latex}, date = {2019-07}, language = {german} } @@ -63,18 +63,18 @@ @manual{tantau:tikz_and_pgf, author = {Till Tantau}, title = {The TikZ and PGF Packages}, - subtitle = {Manual for version 3.1.5b}, + subtitle = {Manual for version 3.1.10}, url = {https://mirrors.ctan.org/graphics/pgf/base/doc/pgfmanual.pdf}, - date = {2020-01-08}, + date = {2023-01-15}, } @manual{tantau:beamer, author = {Till Tantau and Joseph Wright and Vedran Mileti\'{c}}, title = {The Beamer Class}, - subtitle = {User Guide for version 3.57}, + subtitle = {User Guide for version 3.68}, url = {https://mirrors.ctan.org/macros/latex/contrib/beamer/doc/beameruserguide.pdf}, - date = {2019-09-30}, + date = {2022-09-17}, } @@ -106,7 +106,7 @@ author = {Frank Mittelbach}, title = {An environment for multicolumn output}, url = {https://mirror.ctan.org/macros/latex/required/tools/multicol.pdf}, - date = {2020-02-02}, + date = {2022-10-31}, } @@ -138,7 +138,7 @@ author = {Philipp Lehman and Joseph Wright}, title = {The etoolbox Package}, url = {https://mirror.ctan.org/macros/latex/contrib/etoolbox/etoolbox.pdf}, - date = {2019-09-21}, + date = {2020-10-05}, } @@ -155,13 +155,13 @@ title = {The minted package}, subtitle = {Highlighted source code in \LaTeX}, url = {https://mirror.ctan.org/macros/latex/contrib/minted/minted.pdf}, - date = {2017-07-19}, + date = {2022-12-12}, } @online{pygments:web, title = {Pygments}, subtitle = {Python syntax highlighter}, - date = {2019}, + date = {2023}, url = {https://pygments.org/}, } @@ -169,7 +169,7 @@ author = {The \LaTeX3 Project}, title = {The xparse Package}, url = {https://mirror.ctan.org/macros/latex/contrib/l3packages/xparse.pdf}, - date = {2020-03-06}, + date = {2023-02-02}, } @@ -184,8 +184,8 @@ @manual{rahtz:hyperref, 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/manual.pdf}, - date = {2020-01}, + url = {https://mirrors.ctan.org/macros/latex/contrib/hyperref/doc/hyperref-doc.pdf}, + date = {2023-02-07}, language = {english} } @@ -194,6 +194,26 @@ author = {Heiko Oberdiek}, title = {The bookmark package}, url = {https://mirrors.ctan.org/macros/latex/contrib/bookmark/bookmark.pdf}, - date = {2019-12-03}, + date = {2020-11-06}, language = {english} } + + +@manual{oberdiek:zref, + author = {Heiko Oberdiek}, + title = {The zref package}, + url = {https://mirrors.ctan.org/macros/latex/contrib/zref/zref.pdf}, + date = {2022-04-07}, + language = {english} +} + + +@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} +} + + diff --git a/macros/latex/contrib/tcolorbox/tcolorbox.doc.breakable.tex b/macros/latex/contrib/tcolorbox/tcolorbox.doc.breakable.tex index 344cf30273..7841220a06 100644 --- a/macros/latex/contrib/tcolorbox/tcolorbox.doc.breakable.tex +++ b/macros/latex/contrib/tcolorbox/tcolorbox.doc.breakable.tex @@ -335,6 +335,11 @@ The |break at| option can be used to insert better break points by hand. \refKey{/tcb/use color stack} is silently ignored. \clearpage +The result of the following example depends on the used \LaTeX\ engine and +loaded packages. The right-hand side is blue, if compiled using +pdf\TeX, Lua\TeX{} without |luacolor|, and Xe\TeX. +Lua\TeX{} with |luacolor| gives the next but one result. + \begin{dispExample} % \usepackage{multicol,lipsum} \begin{multicols}{2}\footnotesize @@ -342,17 +347,18 @@ Breakable box without color stack. \begin{tcolorbox}[enhanced jigsaw, size=small, colframe=gray, colback=yellow!10!white, colupper=blue, enforce breakable,% use only breakable in the real world! - vfill before first, pad at break=1mm, break at=3.3cm ] - \begin{itemize}\item Some blue text.\end{itemize} - {\color{red}\itshape\lipsum[2]}\par + vfill before first, pad at break=1mm, break at=33mm ] + Some blue text.\par\smallskip + {\color{red}\itshape\lipsum[2]}\par\smallskip More blue text. \end{tcolorbox} Text after box. \end{multicols} \end{dispExample} -We do again with \refKey{/tcb/use color stack}. Observe the additional spacing -at the begin of the box: +We do again with \refKey{/tcb/use color stack}. Again, the result depends on +the used \LaTeX\ engine. The right-hand side stays blue for Xe\TeX{} and +and is red and blue for pdf\TeX{} and Lua\TeX{}. \begin{dispExample} % \usepackage{multicol,lipsum} @@ -361,9 +367,9 @@ Breakable box with color stack. \begin{tcolorbox}[enhanced jigsaw, use color stack, size=small, colframe=gray, colback=yellow!10!white, colupper=blue, enforce breakable,% use only breakable in the real world! - vfill before first, pad at break=1mm, break at=3.3cm ] - \begin{itemize}\item Some blue text.\end{itemize} - {\color{red}\itshape\lipsum[2]}\par + vfill before first, pad at break=1mm, break at=33mm ] + Some blue text.\par\smallskip + {\color{red}\itshape\lipsum[2]}\par\smallskip More blue text. \end{tcolorbox} Text after box. @@ -433,7 +439,7 @@ Text after box. and \refKey{/tcb/pad after break}. \end{docTcbKey} -\enlargethispage*{5mm} +\enlargethispage*{10mm} \begin{docTcbKey}{pad at break*}{=\meta{length}}{style, no default} Sets \refKey{/tcb/pad at break} to \meta{length} and diff --git a/macros/latex/contrib/tcolorbox/tcolorbox.doc.coremacros.tex b/macros/latex/contrib/tcolorbox/tcolorbox.doc.coremacros.tex index 110edf0626..4008a00a8f 100644 --- a/macros/latex/contrib/tcolorbox/tcolorbox.doc.coremacros.tex +++ b/macros/latex/contrib/tcolorbox/tcolorbox.doc.coremacros.tex @@ -141,7 +141,7 @@ Text \tcbox[tcbox raise base]{Hello World}\hfill % Fitted width box (like hbox or makebox) \tcbox{Hello\\World!} -% Fitted width box (using a \tikzname\ node) +% Fitted width box (using a TikZ node) \tcbox[tikznode]{Hello\\World!} \end{dispExample} @@ -211,21 +211,20 @@ numbered title and options. \clearpage -\begin{docCommand}{DeclareTColorBox}{\oarg{init options}\marg{name}\marg{specification}\marg{options}} +\begin{docCommand}{NewTColorBox}{\oarg{init options}\marg{name}\marg{specification}\marg{options}} Creates a new environment \meta{name} based on \refEnv{tcolorbox}.\\ - Basically, |\DeclareTColorBox| operates like |\DeclareDocumentEnvironment|. This means, + Basically, \refCom{NewTColorBox} operates like |\NewDocumentEnvironment|. This means, the new environment \meta{name} is constructed with the given argument \meta{specification}. + An error is issued if an environment with \meta{name} has already been defined. The \meta{options} are given to the underlying \refEnv{tcolorbox}.\\ Note that \refKey{/tcb/savedelimiter} is set to the given \meta{name} automatically.\\ The \meta{init options} allow setting up automatic numbering, - see Section \ref{sec:initkeys} from page \pageref{sec:initkeys}.\\ - The new environment is always created, irrespective of an already existing - environment with the same name. + see Section \ref{sec:initkeys} from page \pageref{sec:initkeys}. \begin{dispExample} % counter from previous example -\DeclareTColorBox[use counter from=pabox]{mybox}{ O{red} m d"" !O{} } +\NewTColorBox[use counter from=pabox]{mybox}{ O{red} m d"" !O{} } {enhanced,colframe=#1!75!black,colback=#1!5!white, fonttitle=\bfseries,title={\thetcbcounter~#2}, IfValueT={#3}{watermark text={#3}},#4} @@ -253,40 +252,42 @@ This is a tcolorbox. \end{docCommand} \clearpage -\begin{docCommand}{NewTColorBox}{\oarg{init options}\marg{name}\marg{specification}\marg{options}} - Operates like \refCom{DeclareTColorBox}, but based on |\NewDocumentEnvironment| instead of |\DeclareDocumentEnvironment|. - An error is issued if \meta{name} has already been defined. -\end{docCommand} - \begin{docCommand}{RenewTColorBox}{\oarg{init options}\marg{name}\marg{specification}\marg{options}} - Operates like \refCom{DeclareTColorBox}, but based on |\RenewDocumentEnvironment| instead of |\DeclareDocumentEnvironment|. + Operates like \refCom{NewTColorBox}, but based on |\RenewDocumentEnvironment| instead of |\NewDocumentEnvironment|. An existing environment is redefined. \end{docCommand} \begin{docCommand}{ProvideTColorBox}{\oarg{init options}\marg{name}\marg{specification}\marg{options}} - Operates like \refCom{DeclareTColorBox}, but based on |\ProvideDocumentEnvironment| instead of |\DeclareDocumentEnvironment|. + Operates like \refCom{NewTColorBox}, but based on |\ProvideDocumentEnvironment| instead of |\NewDocumentEnvironment|. The environment \meta{name} is only created if it is not already defined. \end{docCommand} +\begin{docCommand}{DeclareTColorBox}{\oarg{init options}\marg{name}\marg{specification}\marg{options}} + Operates like \refCom{NewTColorBox}, but based on |\DeclareDocumentEnvironment| instead of |\NewDocumentEnvironment|. + The new environment is always created, irrespective of an already existing + environment with the same name. +\end{docCommand} + \clearpage -\begin{docCommand}{DeclareTotalTColorBox}{\oarg{init options}\brackets{\texttt{\textbackslash}\meta{name}}\marg{specification}\marg{options}\marg{content}} +\begin{docCommand}{NewTotalTColorBox}{\oarg{init options}\brackets{\texttt{\textbackslash}\meta{name}}\marg{specification}\marg{options}\marg{content}} Creates a new command \texttt{\textbackslash}\meta{name} based on \refEnv{tcolorbox}. - In contrast to \refCom{DeclareTColorBox}, also the \meta{content} of the |tcolorbox| is specified.\\ - Basically, |\DeclareTotalTColorBox| operates like |\DeclareDocumentCommand|. This means, + In contrast to \refCom{NewTColorBox}, also the \meta{content} of the |tcolorbox| is specified.\\ + Basically, \refCom{NewTotalTColorBox} operates like |\NewDocumentCommand|. This means, the new command \texttt{\textbackslash}\meta{name} is constructed with the given argument \meta{specification}. + An error is issued if \texttt{\textbackslash}\meta{name} has already been defined. The \meta{options} are given to the underlying \refEnv{tcolorbox} which is filled with the specified \meta{content}.\\ Note that \refKey{/tcb/savedelimiter} is set to the given \meta{name} - automatically.\\ + automatically. + Also note that \refKey{/tcb/saveto} and \refKey{/tcb/savelowerto} + 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}.\\ - The new command is always created, irrespective of an already existing - command with the same name. + see Section \ref{sec:initkeys} from page \pageref{sec:initkeys}. \begin{dispExample} -\DeclareTotalTColorBox{\diabox}{ O{} v m } +\NewTotalTColorBox{\diabox}{ O{} v m } { bicolor,nobeforeafter,equal height group=diabox,width=5.7cm, fonttitle=\bfseries\ttfamily,adjusted title={#2},center title, colframe=blue!20!black,leftupper=0mm,rightupper=0mm,colback=black!75!white,#1} @@ -295,25 +296,24 @@ This is a tcolorbox. \diabox{blueshade.png}{Created with |GIMP|.\\\url{http://www.gimp.org}} \diabox{goldshade.png}{Created with |GIMP|.\\\url{http://www.gimp.org}} - \end{dispExample} \end{docCommand} -\begin{docCommand}{NewTotalTColorBox}{\oarg{init options}\brackets{\texttt{\textbackslash}\meta{name}}\marg{specification}\marg{options}\marg{content}} - Operates like \refCom{DeclareTotalTColorBox}, but based on |\NewDocumentCommand| instead of |\DeclareDocumentCommand|. - An error is issued if \texttt{\textbackslash}\meta{name} has already been defined. -\end{docCommand} - \begin{docCommand}{RenewTotalTColorBox}{\oarg{init options}\brackets{\texttt{\textbackslash}\meta{name}}\marg{specification}\marg{options}\marg{content}} - Operates like \refCom{DeclareTotalTColorBox}, but based on |\RenewDocumentCommand| instead of |\DeclareDocumentCommand|. + Operates like \refCom{NewTotalTColorBox}, but based on |\RenewDocumentCommand| instead of |\NewDocumentCommand|. An existing command is redefined. \end{docCommand} \begin{docCommand}{ProvideTotalTColorBox}{\oarg{init options}\brackets{\texttt{\textbackslash}\meta{name}}\marg{specification}\marg{options}\marg{content}} - Operates like \refCom{DeclareTotalTColorBox}, but based on |\ProvideDocumentCommand| instead of |\DeclareDocumentCommand|. + Operates like \refCom{NewTotalTColorBox}, but based on |\ProvideDocumentCommand| instead of |\NewDocumentCommand|. The command \texttt{\textbackslash}\meta{name} is only created if it is not already defined. \end{docCommand} +\begin{docCommand}{DeclareTotalTColorBox}{\oarg{init options}\brackets{\texttt{\textbackslash}\meta{name}}\marg{specification}\marg{options}\marg{content}} + Operates like \refCom{NewTotalTColorBox}, but based on |\DeclareDocumentCommand| instead of |\NewDocumentCommand|. + The new command is always created, irrespective of an already existing + command with the same name. +\end{docCommand} \clearpage @@ -383,21 +383,20 @@ The \xmybox[green]{quick} brown \xmybox{fox} \xmybox[blue]{jumps} over the \end{docCommand} -\begin{docCommand}{DeclareTCBox}{\oarg{init options}\brackets{\texttt{\textbackslash}\meta{name}}\marg{specification}\marg{options}} +\begin{docCommand}{NewTCBox}{\oarg{init options}\brackets{\texttt{\textbackslash}\meta{name}}\marg{specification}\marg{options}} Creates a new command \texttt{\textbackslash}\meta{name} based on \refCom{tcbox}. - Basically, |\DeclareTCBox| operates like |\DeclareDocumentCommand|. This means, + Basically, \refCom{NewTCBox} operates like |\NewDocumentCommand|. This means, the new command \texttt{\textbackslash}\meta{name} is constructed with the given argument \meta{specification}. + An error is issued if \texttt{\textbackslash}\meta{name} has already been defined. The \meta{options} are given to the underlying \refCom{tcbox}.\\ Note that \refKey{/tcb/savedelimiter} is set to the given \meta{name} automatically.\\ The \meta{init options} allow setting up automatic numbering, - see Section \ref{sec:initkeys} from page \pageref{sec:initkeys}.\\ - The new command is always created, irrespective of an already existing - command with the same name. + see Section \ref{sec:initkeys} from page \pageref{sec:initkeys}. \begin{dispExample} % counter from previous example -\DeclareTCBox[use counter from=pabox]{\mybox}{ s m s } +\NewTCBox[use counter from=pabox]{\mybox}{ s m s } { nobeforeafter,colback=red!5!white,colframe=red!75!black, title={#2 (Box \thetcbcounter)},fonttitle=\bfseries, IfBooleanT={#1}{enhanced,drop shadow}, @@ -413,41 +412,41 @@ The \xmybox[green]{quick} brown \xmybox{fox} \xmybox[blue]{jumps} over the \end{dispExample} \end{docCommand} -\begin{docCommand}{NewTCBox}{\oarg{init options}\brackets{\texttt{\textbackslash}\meta{name}}\marg{specification}\marg{options}} - Operates like \refCom{DeclareTCBox}, but based on |\NewDocumentCommand| instead of |\DeclareDocumentCommand|. - An error is issued if \texttt{\textbackslash}\meta{name} has already been defined. -\end{docCommand} \begin{docCommand}{RenewTCBox}{\oarg{init options}\brackets{\texttt{\textbackslash}\meta{name}}\marg{specification}\marg{options}} - Operates like \refCom{DeclareTCBox}, but based on |\RenewDocumentCommand| instead of |\DeclareDocumentCommand|. + Operates like \refCom{NewTCBox}, but based on |\RenewDocumentCommand| instead of |\NewDocumentCommand|. An existing command is redefined. \end{docCommand} \begin{docCommand}{ProvideTCBox}{\oarg{init options}\brackets{\texttt{\textbackslash}\meta{name}}\marg{specification}\marg{options}} - Operates like \refCom{DeclareTCBox}, but based on |\ProvideDocumentCommand| instead of |\DeclareDocumentCommand|. + Operates like \refCom{NewTCBox}, but based on |\ProvideDocumentCommand| instead of |\NewDocumentCommand|. The command \texttt{\textbackslash}\meta{name} is only created if it is not already defined. \end{docCommand} +\begin{docCommand}{DeclareTCBox}{\oarg{init options}\brackets{\texttt{\textbackslash}\meta{name}}\marg{specification}\marg{options}} + Operates like \refCom{NewTCBox}, but based on |\DeclareDocumentCommand| instead of |\NewDocumentCommand|. + The new command is always created, irrespective of an already existing + command with the same name. +\end{docCommand} \clearpage -\begin{docCommand}{DeclareTotalTCBox}{\oarg{init options}\brackets{\texttt{\textbackslash}\meta{name}}\marg{specification}\marg{options}\marg{content}} +\begin{docCommand}{NewTotalTCBox}{\oarg{init options}\brackets{\texttt{\textbackslash}\meta{name}}\marg{specification}\marg{options}\marg{content}} Creates a new command \texttt{\textbackslash}\meta{name} based on \refCom{tcbox}. - In contrast to \refCom{DeclareTCBox}, also the \meta{content} of the |tcbox| is specified.\\ - Basically, |\DeclareTotalTCBox| operates like |\DeclareDocumentCommand|. This means, + In contrast to \refCom{NewTCBox}, also the \meta{content} of the |tcbox| is specified.\\ + Basically, \refCom{NewTotalTCBox} operates like |\NewDocumentCommand|. This means, the new command \texttt{\textbackslash}\meta{name} is constructed with the given argument \meta{specification}. + An error is issued if \texttt{\textbackslash}\meta{name} has already been defined. The \meta{options} are given to the underlying \refCom{tcbox} which is filled with the specified \meta{content}.\\ Note that \refKey{/tcb/savedelimiter} is set to the given \meta{name} automatically.\\ The \meta{init options} allow setting up automatic numbering, - see Section \ref{sec:initkeys} from page \pageref{sec:initkeys}.\\ - The new command is always created, irrespective of an already existing - command with the same name. + see Section \ref{sec:initkeys} from page \pageref{sec:initkeys}. \begin{dispExample} -\DeclareTotalTCBox{\myverb}{ O{red} v !O{} } +\NewTotalTCBox{\myverb}{ O{red} v !O{} } { fontupper=\ttfamily,nobeforeafter,tcbox raise base,arc=0pt,outer arc=0pt, top=0pt,bottom=0pt,left=0mm,right=0mm, leftrule=0pt,rightrule=0pt,toprule=0.3mm,bottomrule=0.3mm,boxsep=0.5mm, @@ -466,7 +465,7 @@ typeset the verbatim content. \begin{dispExample} % \usepackage{listings} or \tcbuselibrary{listings} -\DeclareTotalTCBox{\commandbox}{ s v } +\NewTotalTCBox{\commandbox}{ s v } {verbatim,colupper=white,colback=black!75!white,colframe=black} {\IfBooleanT{#1}{\textcolor{red}{\ttfamily\bfseries > }}% \lstinline[language=command.com,keywordstyle=\color{blue!35!white}\bfseries]^#2^} @@ -481,21 +480,23 @@ typeset the verbatim content. \end{docCommand} \clearpage -\begin{docCommand}{NewTotalTCBox}{\oarg{init options}\brackets{\texttt{\textbackslash}\meta{name}}\marg{specification}\marg{options}\marg{content}} - Operates like \refCom{DeclareTotalTCBox}, but based on |\NewDocumentCommand| instead of |\DeclareDocumentCommand|. - An error is issued if \texttt{\textbackslash}\meta{name} has already been defined. -\end{docCommand} \begin{docCommand}{RenewTotalTCBox}{\oarg{init options}\brackets{\texttt{\textbackslash}\meta{name}}\marg{specification}\marg{options}\marg{content}} - Operates like \refCom{DeclareTotalTCBox}, but based on |\RenewDocumentCommand| instead of |\DeclareDocumentCommand|. + Operates like \refCom{NewTotalTCBox}, but based on |\RenewDocumentCommand| instead of |\NewDocumentCommand|. An existing command is redefined. \end{docCommand} \begin{docCommand}{ProvideTotalTCBox}{\oarg{init options}\brackets{\texttt{\textbackslash}\meta{name}}\marg{specification}\marg{options}\marg{content}} - Operates like \refCom{DeclareTotalTCBox}, but based on |\ProvideDocumentCommand| instead of |\DeclareDocumentCommand|. + Operates like \refCom{NewTotalTCBox}, but based on |\ProvideDocumentCommand| instead of |\NewDocumentCommand|. The command \texttt{\textbackslash}\meta{name} is only created if it is not already defined. \end{docCommand} +\begin{docCommand}{DeclareTotalTCBox}{\oarg{init options}\brackets{\texttt{\textbackslash}\meta{name}}\marg{specification}\marg{options}\marg{content}} + Operates like \refCom{NewTotalTCBox}, but based on |\NewDocumentCommand| instead of |\DeclareDocumentCommand|. + The new command is always created, irrespective of an already existing + command with the same name. +\end{docCommand} + \begin{docCommand}{tcboxverb}{\oarg{options}\marg{verbatim box content}} Creates a colored box based on \refCom{tcbox} which is fitted to the width of the given diff --git a/macros/latex/contrib/tcolorbox/tcolorbox.doc.coreoptions.tex b/macros/latex/contrib/tcolorbox/tcolorbox.doc.coreoptions.tex index aad10b052a..70ac6c7ff8 100644 --- a/macros/latex/contrib/tcolorbox/tcolorbox.doc.coreoptions.tex +++ b/macros/latex/contrib/tcolorbox/tcolorbox.doc.coreoptions.tex @@ -210,7 +210,8 @@ just like any other \refEnv{tcolorbox}. coltitle=red!25!black, fonttitle=\bfseries, subtitle style={boxrule=0.4pt, - colback=yellow!50!red!25!white} ] + colback=yellow!50!red!25!white, + colupper=red!75!gray} ] This is a \textbf{tcolorbox}. \tcbsubtitle{My subtitle} Further text. @@ -594,7 +595,20 @@ This is a \textbf{tcolorbox}. \clearpage \subsection{Text Alignment} -\begin{docTcbKey}[][doc new=2015-05-07]{halign}{=\meta{alignment}}{no default, initially \texttt{justify}} +\begin{docTcbKeys}[ + doc parameter = {=\meta{alignment}}, + doc description = {no default, initially \texttt{justify}}, + doc new = 2015-05-07, + ] + { + { + doc name = halign, + }, + { + doc name = halign upper, + } + } +%\begin{docTcbKey}[][doc new=2015-05-07]{halign}{=\meta{alignment}}{no default, initially \texttt{justify}} If there is no lower part, |halign| determines the horizontal \meta{alignment} of the text content. Otherwise, |halign| determines the horizontal \meta{alignment} @@ -614,6 +628,7 @@ This is a \textbf{tcolorbox}. detail in the \tikzname\ manual \cite{tantau:tikz_and_pgf}. The short story is that the non-flush versions will often look more balanced but with more hyphenations. + \refKey{/tcb/halign upper} is an alias for \refKey{/tcb/halign}. \begin{exdispExample}{halign} \tcbset{colback=red!5!white,colframe=red!75!black,size=small, @@ -641,14 +656,30 @@ This is a demonstration text for showing how line breaking works. \end{tcolorbox} \end{exdispExample} -\end{docTcbKey} +\end{docTcbKeys} +\clearpage + +\begin{docTcbKeys}[ + doc parameter = {=\marg{code}}, + doc description = {no default}, + doc new = 2022-07-07, + ] + { + { + doc name = halign code, + }, + { + doc name = halign upper code, + } + } + If \refKey{/tcb/halign} resp. \refKey{/tcb/halign upper} is not flexible enough, + \refKey{/tcb/halign code} resp. \refKey{/tcb/halign upper code} allows to set + arbitrary \meta{code} to configure the horizontal alignment of the text content, + e.g. using alignments from specialized packages. +\end{docTcbKeys} -\begin{docTcbKey}[][doc new=2015-05-07]{halign upper}{=\meta{alignment}}{no default, initially \texttt{justify}} - Alias for \refKey{/tcb/halign}. -\end{docTcbKey} -\newpage \begin{docTcbKey}[][doc new=2015-05-07]{halign lower}{=\meta{alignment}}{no default, initially \texttt{justify}} |halign lower| determines the horizontal \meta{alignment} of the lower part of the box. The feasible values for \meta{alignment} are the same as for \refKey{/tcb/halign}. @@ -681,6 +712,19 @@ This is a demonstration text for showing how line breaking works. \end{docTcbKey} +\begin{docTcbKeys}[ + doc parameter = {=\marg{code}}, + doc description = {no default}, + doc new = 2022-07-07, + doc name = halign lower code, + ]{} + If \refKey{/tcb/halign lower} is not flexible enough, + \refKey{/tcb/halign lower code} allows to set + arbitrary \meta{code} to configure the horizontal alignment of the lower + part of the box. +\end{docTcbKeys} + + \clearpage \begin{docTcbKey}[][doc new=2015-05-07]{halign title}{=\meta{alignment}}{no default, initially \texttt{justify}} |halign lower| determines the horizontal \meta{alignment} of the title of the box. @@ -713,7 +757,20 @@ This is a demonstration text for showing how line breaking works. \end{exdispExample} \end{docTcbKey} -\enlargethispage*{1cm} + +\begin{docTcbKeys}[ + doc parameter = {=\marg{code}}, + doc description = {no default}, + doc new = 2022-07-07, + doc name = halign title code, + ]{} + If \refKey{/tcb/halign title} is not flexible enough, + \refKey{/tcb/halign title code} allows to set + arbitrary \meta{code} to configure the horizontal alignment of the title + of the box. +\end{docTcbKeys} + + \begin{docTcbKey}[][doc updated=2015-05-07]{flushleft upper}{}{style, no value} Shortcut for setting \refKey{/tcb/halign} to \docValue{flush left}. @@ -1825,7 +1882,7 @@ used for boxes inside a \refEnv{tcbraster}. \begin{exdispExample}{inherit_height} \tcbset{colframe=blue!75!black,colback=white,fonttitle=\bfseries} -\begin{tcolorbox}[title=Outer box with fixed height 4cm,height=4cm] +\begin{tcolorbox}[title=Outer box with fixed height 3.5cm,height=3.5cm] \begin{tcolorbox}[title=Inner box,nobeforeafter,inherit height] This inner box matches the available space. \end{tcolorbox} @@ -2135,9 +2192,10 @@ The following options introduce some arbitrary \meta{code} to the content of a |tcolorbox|. These additions can be given at the beginning or at the ending of the title, the upper part, or the lower part. -\begin{docTcbKey}{before title}{=\meta{code}}{no default, initially unset} +\begin{docTcbKey}[][doc updated=2023-01-27]{before title}{=\meta{code}}{no default, initially unset} The given \meta{code} is placed \emph{after} the color and font settings and \emph{before} the content of the title. + The \meta{code} is appended by a final |\ignorespaces|. \begin{exdispExample}{before_title} \tcbset{before title={\textcolor{yellow}{\large Important:}~}, colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries} @@ -2149,8 +2207,16 @@ This is a \textbf{tcolorbox}. \end{docTcbKey} -\begin{docTcbKey}{after title}{=\meta{code}}{no default, initially unset} +\begin{docTcbKey}[][doc new=2023-01-27]{before title*}{=\meta{code}}{no default, initially unset} + The given \meta{code} is placed \emph{after} the color and font settings + and \emph{before} the content of the title. + In contrast to \refKey{/tcb/before title}, no |\ignorespaces| is appended. +\end{docTcbKey} + + +\begin{docTcbKey}[][doc updated=2023-01-27]{after title}{=\meta{code}}{no default, initially unset} The given \meta{code} is placed \emph{after} the content of the title. + The \meta{code} is prepended by a leading |\unskip|. \begin{exdispExample}{after_title} \tcbset{after title={\hfill\colorbox{Navy}{approved}}, colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries} @@ -2162,6 +2228,12 @@ This is a \textbf{tcolorbox}. \end{docTcbKey} +\begin{docTcbKey}[][doc new=2023-01-27]{after title*}{=\meta{code}}{no default, initially unset} + The given \meta{code} is placed \emph{after} the content of the title. + In contrast to \refKey{/tcb/after title}, no |\unskip| is prepended. +\end{docTcbKey} + + \clearpage \begin{docTcbKey}{before upper}{=\meta{code}}{no default, initially empty} The given \meta{code} is placed \emph{after} the color and font settings @@ -3923,7 +3995,7 @@ This is a tcolorbox. a |minipage|. In a |minipage| or |parbox|, paragraphs are formatted slightly different as the main text. If the key value is set to |false|, the normal main text behavior is restored. In some situations, this has some unwanted side - effects. It is recommended that you use this experimental setting only + effects. It is recommended that you use this \textbf{experimental setting} only where you really want to have this feature. \end{docTcbKey} @@ -4118,32 +4190,43 @@ Example \ref{exe:tabular_example} on page \pageref{exe:tabular_example}. Removes the phantom code if set before. \end{docTcbKey} -\begin{docTcbKey}{label}{=\meta{marker}}{no default, initially unset} -The \meta{marker} is set as label text for a reference with the |\ref| macro. + +\begin{docTcbKey}[][doc new=2023-02-08]{label is label}{}{no value, initially set} +Sets |\label| as labelling for |tcolorbox| (global or per box). +When \refKey{/tcb/label} and friends are used, the underlying labeling macro is |\label|. +References can be made by |\ref|, |\pageref|, and similar macros. This is the +default \LaTeX\ behaviour. +Note that this option is not getting reset by \refKey{/tcb/reset}. +\end{docTcbKey} + + +\begin{docTcbKey}[][doc new=2023-02-08]{label is zlabel}{}{no value, initially unset} +Sets |\zlabel| as labelling for |tcolorbox| (global or per box). +When \refKey{/tcb/label} and friends are used, the underlying labeling macro is |\zlabel|. +This needs the |zref| package \cite{oberdiek:zref} or packages building upon |zref| to be loaded. +References can be made by |\zref|. If the |zref-clever| package \cite{barros:zref-clever} is loaded, +|\zcref|, |\zcpageref|, and similar macros can be applied. +Note that this option is not getting reset by \refKey{/tcb/reset}. +\end{docTcbKey} + + +\begin{docTcbKey}[][doc updated=2023-02-08]{label}{=\meta{marker}}{no default, initially unset} +The \meta{marker} is set as label text with |\label| for a reference with the |\ref| macro, +if \refKey{/tcb/label is label} is active, +or as label text with |\zlabel| for a reference with the |\zref| macro and similar, +if \refKey{/tcb/label is zlabel} is active. Typically, this option is used for numbered boxes, see Subsection \ref{sec:numberedboxes} from page \pageref{sec:numberedboxes}, e.\,g.\ \refKey{/tcb/new/auto counter}. \end{docTcbKey} + \begin{docTcbKey}[][doc new=2014-11-28]{phantomlabel}{=\meta{marker}}{no default, initially unset} Equivalent to \refKey{/tcb/label} for an \emph{unnumbered} box. A |\phantomsection| from the package |hyperref| \cite{rahtz:hyperref} is used to set a correct hyperlink target. This is not needed for a numbered box. \end{docTcbKey} - -\begin{docTcbKey}{label type}{=\meta{type}}{no default, initially unset} -This option key can be used only in conjunction with the |cleveref| package -\cite{cubitt:2018a} which has to be loaded separately. -\meta{type} has to be a cross-reference type \emph{known} to |cleveref| -like |theorem|, |algorithm|, |result|, etc. References made with |cleveref| -will use this type. Note that using |label type| will result in compilation -errors, if |cleveref| is not loaded. -For an example, see \Vref{theo:meanvaluetheorem}. -\end{docTcbKey} - -\begin{docTcbKey}{no label type}{}{no value, initially set} -Removes a \refKey{/tcb/label type}, if set before. -\end{docTcbKey} +\clearpage \begin{docTcbKey}{step}{=\meta{counter}}{no default, initially unset} Shortcut for |phantom={\refstepcounter{#1}}|. The given \meta{counter} is @@ -4160,43 +4243,46 @@ see Subsection \ref{sec:numberedboxes} from page \pageref{sec:numberedboxes}. \end{docTcbKey} -\clearpage -\begin{docTcbKey}{list entry}{=\meta{text}}{no default, initially unset} -If the \flqq list of tcolorbox(es)\frqq\ feature described in Subsection -\ref{sec:listsof} from page \pageref{sec:listsof} is used, this key -describes the \meta{text} for an entry into the generated list, e.\,g. -\begin{dispListing} -list entry={\protect\numberline{\thetcbcounter}My beautiful Example} -\end{dispListing} -See Section \ref{listing:exercises} from page \pageref{listing:exercises} -for a complete example. -\end{docTcbKey} -\begin{docTcbKey}[][doc new=2014-09-19]{list text}{=\meta{text}}{style, no default} -This is a shortcut for setting \refKey{/tcb/list entry} to\\ -|\protect\numberline{\thetcbcounter}|\meta{text}. -So, the following settings are identical: -\begin{dispListing} -list text={My beautiful Example}, -list entry={\protect\numberline{\thetcbcounter}My beautiful Example} -\end{dispListing} -See Section \ref{listing:exercises} from page \pageref{listing:exercises} -for a complete example. +\begin{docTcbKey}[][doc updated=2023-02-09]{label type}{=\meta{type}}{no default, initially unset} +This option has a different meaning based upon the chosen labeling mechanism. +\begin{itemize} +\item If \refKey{/tcb/label is label} is active:\par + The option key \refKey{/tcb/label type} can be used only in conjunction with the |cleveref| package + \cite{cubitt:2018a} which has to be loaded separately. + \meta{type} has to be a cross-reference type \emph{known} to |cleveref| + like |theorem|, |algorithm|, |result|, etc. References made with |cleveref| + will use this type. Note that using |label type| will result in compilation + errors, if |cleveref| is not loaded. + For an example, see \Vref{theo:meanvaluetheorem}. +\item If \refKey{/tcb/label is zlabel} is active:\par + The option key \refKey{/tcb/label type} can be used only in conjunction with the |zref-clever| package + \cite{barros:zref-clever} + which has to be loaded separately. + \meta{type} has to be a cross-reference type \emph{known} to |zref-clever|. + This \meta{type} is bound to an automatic |tcolorbox| counter which has to be set up using + \refKey{/tcb/new/auto counter}, + \refKey{/tcb/new/use counter from}, + \refKey{/tcb/new/use counter}, or + \refKey{/tcb/new/use counter*}. + If \refKey{/tcb/label is zlabel} is set, but |zref-clever| is not loaded, + using |zref-clever countertype| will be silently ignored. +\end{itemize} \end{docTcbKey} -\begin{docTcbKey}{add to list}{=\marg{list}\marg{type}}{no default, initially unset} -If the \flqq list of tcolorbox(es)\frqq\ feature described in Subsection -\ref{sec:listsof} from page \pageref{sec:listsof} is used, list entries are -generated automatically. With this key, you can enforce an entry to the -given \meta{list} with the given \meta{type}. -This issues:\\ -|\addcontentsline|\marg{list}\marg{type}\marg{entry text} + +\begin{docTcbKey}[][doc updated=2023-02-09]{no label type}{}{no value, initially set} +Removes a \refKey{/tcb/label type}, if set before. \end{docTcbKey} -\begin{docTcbKey}[][doc new and updated={2016-06-22}{2016-11-18}]{nameref}{=\meta{text}}{no default, initially unset} +\clearpage +\begin{docTcbKey}[][doc new and updated={2016-06-22}{2023-02-08}]{nameref}{=\meta{text}}{no default, initially unset} If the |nameref| package is loaded, the given \meta{text} is used for -corresponding |\nameref| macros. Typically, the \meta{text} will be chosen +corresponding |\nameref| macros. +If the |zref-titleref| package is loaded, the given \meta{text} is used to +set the reference text for |\ztitleref|. +Typically, the \meta{text} will be chosen to be identical or nearly identical to the one for \refKey{/tcb/title}. \inputpreamblelisting{A} @@ -4217,6 +4303,14 @@ The box is titled \enquote{\nameref{mynamelabel}}. \end{docTcbKey} + +\begin{docTcbKey}[][doc new=2022-07-18]{short title}{=\meta{text}}{style, no default} +Sets both \refKey{/tcb/list entry} and \refKey{/tcb/nameref} to \meta{text}. +The most likely use case is to set a \emph{short title} for the +\flqq list of tcolorbox(es)\frqq\ and for box referencing. +\end{docTcbKey} + + \clearpage \begin{docTcbKey}[][doc new=2017-02-03]{hypertarget}{=\meta{marker}}{no default, initially unset} A |\hypertarget| from the package |hyperref| \cite{rahtz:hyperref} is used to diff --git a/macros/latex/contrib/tcolorbox/tcolorbox.doc.filling.tex b/macros/latex/contrib/tcolorbox/tcolorbox.doc.filling.tex index 7b207b6255..7eae0cc4ff 100644 --- a/macros/latex/contrib/tcolorbox/tcolorbox.doc.filling.tex +++ b/macros/latex/contrib/tcolorbox/tcolorbox.doc.filling.tex @@ -1,9 +1,9 @@ % !TeX root = tcolorbox.tex % include file of tcolorbox.tex (manual of the LaTeX package tcolorbox) \clearpage -\section{\tikzname\ Image and Picture Fill Extensions; Auxiliary Macros}\label{sec:tikzimagefilling}% +\section{\tikzname\ Auxiliary Macros}\label{sec:tikzimagefilling}% \tcbset{external/prefix=external/filling_}% -The \mylib{skins} library adds some image and picture fill options to the vast option set of +The \mylib{skins} library adds some auxiliary options to the vast option set of \tikzname\ \cite{tantau:tikz_and_pgf}. These options can be used in any |tikzpicture|. For the following options, the \mylib{skins} library has to be loaded by a package option or inside the preamble by: @@ -13,409 +13,11 @@ by a package option or inside the preamble by: See \Vref{sec:skins} for the documentation of all other options of the \mylib{skins} library. -\subsection{Fill Plain} -\begin{docTikzKey}{fill plain image}{=\meta{file name}}{no default, initially unset} - Fills the current path with an external image referenced by \meta{file name}. - The image is put in the center of the path, but it is not resized to fit into - the path area. -\begin{dispExample*}{sbs,lefthand ratio=0.66,right=2mm,sidebyside gap=5mm,center lower} -\begin{tikzpicture} -\path[draw,fill plain image=goldshade.png] - (2.75,-0.75) -- (3,0) -- (2.75,0.75) - \foreach \w in {45,90,...,315} - { -- (\w:1.5cm) } -- cycle; -\end{tikzpicture} -\end{dispExample*} -\end{docTikzKey} - - -\begin{docTikzKey}{fill plain image*}{=\meta{file name}}{no default, initially unset} - Fills the current path with an external image referenced by \meta{file name}. - The image is put in the center of the path, but it is not resized to fit into - the path area. - The \meta{graphics options} are given to the underlying \docAuxCommand*{includegraphics} command. -\begin{dispExample*}{sbs,lefthand ratio=0.66,right=2mm,sidebyside gap=5mm,center lower} -\begin{tikzpicture} -\path[draw, - fill plain image*={width=2.5cm}{goldshade.png}] - (2.75,-0.75) -- (3,0) -- (2.75,0.75) - \foreach \w in {45,90,...,315} - { -- (\w:1.5cm) } -- cycle; -\end{tikzpicture} -\end{dispExample*} -\end{docTikzKey} - -\enlargethispage*{1cm} - -\begin{docTikzKey}{fill plain picture}{=\meta{graphical code}}{no default, initially unset} - Fills the current path with the given \meta{graphical code}. - The result is put in the center of the path, but it is not resized to fit into - the path area. Note that this is almost identical to the standard |path picture| option. -\begin{dispExample*}{sbs,lefthand ratio=0.66,right=2mm,sidebyside gap=5mm,center lower} -\begin{tikzpicture} -\path[draw,fill plain picture={% - \draw[red!50!yellow,line width=2mm] - (0,0) circle (1cm); - \draw[red,line width=5mm] (-1,-1) -- (1,1); - \draw[red,line width=5mm] (-1,1) -- (1,-1); - }] - (2.75,-0.75) -- (3,0) -- (2.75,0.75) - \foreach \w in {45,90,...,315} - { -- (\w:1.5cm) } -- cycle; -\end{tikzpicture} -\end{dispExample*} -\end{docTikzKey} - - -\clearpage -\subsection{Fill Stretch} -\begin{docTikzKey}{fill stretch image}{=\meta{file name}}{no default, initially unset} - Fills the current path with an external image referenced by \meta{file name}. - The image is stretched to fill the path area. -\begin{dispExample*}{sbs,lefthand ratio=0.66,right=2mm,sidebyside gap=5mm,center lower} -\begin{tikzpicture} -\path[fill stretch image=goldshade.png] - (2.75,-0.75) -- (3,0) -- (2.75,0.75) - \foreach \w in {45,90,...,315} - { -- (\w:1.5cm) } -- cycle; -\end{tikzpicture} -\end{dispExample*} -\end{docTikzKey} - - -\begin{docTikzKey}{fill stretch image*}{=\marg{graphics options}\marg{file name}}{no default, initially unset} - Fills the current path with an external image referenced by \meta{file name}. - The \meta{graphics options} are given to the underlying \docAuxCommand*{includegraphics} command. - The image is stretched to fill the path area. -\begin{dispExample*}{sbs,lefthand ratio=0.66,right=2mm,sidebyside gap=5mm,center lower} -\begin{tikzpicture} -\path[fill stretch image*= - {angle=90,origin=c}{goldshade.png}] - (2.75,-0.75) -- (3,0) -- (2.75,0.75) - \foreach \w in {45,90,...,315} - { -- (\w:1.5cm) } -- cycle; -\end{tikzpicture} -\end{dispExample*} -\end{docTikzKey} - - -\begin{docTikzKey}{fill stretch picture}{=\meta{graphical code}}{no default, initially unset} - Fills the current path with the given \meta{graphical code}. - The result is stretched to fill the path area. -\begin{dispExample*}{sbs,lefthand ratio=0.66,right=2mm,sidebyside gap=5mm,center lower} -\begin{tikzpicture} -\path[draw,fill stretch picture={% - \draw[red!50!yellow,line width=2mm] - (0,0) circle (1cm); - \draw[red,line width=5mm] (-1,-1) -- (1,1); - \draw[red,line width=5mm] (-1,1) -- (1,-1); - }] - (2.75,-0.75) -- (3,0) -- (2.75,0.75) - \foreach \w in {45,90,...,315} - { -- (\w:1.5cm) } -- cycle; -\end{tikzpicture} -\end{dispExample*} -\end{docTikzKey} - - -\clearpage -\subsection{Fill Overzoom} -\begin{docTikzKey}{fill overzoom image}{=\meta{file name}}{no default, initially unset} - Fills the current path with an external image referenced by \meta{file name}. - The image is zoomed such that the path area fills the image. -\begin{dispExample*}{sbs,lefthand ratio=0.66,right=2mm,sidebyside gap=5mm,center lower} -\begin{tikzpicture} -\path[fill overzoom image=goldshade.png] - (2.75,-0.75) -- (3,0) -- (2.75,0.75) - \foreach \w in {45,90,...,315} - { -- (\w:1.5cm) } -- cycle; -\end{tikzpicture} -\end{dispExample*} -\end{docTikzKey} - - -\begin{docTikzKey}{fill overzoom image*}{=\marg{graphics options}\marg{file name}}{no default, initially unset} - Fills the current path with an external image referenced by \meta{file name}. - The \meta{graphics options} are given to the underlying \docAuxCommand*{includegraphics} command. - The image is zoomed such that the path area fills the image. -\begin{dispExample*}{sbs,lefthand ratio=0.66,right=2mm,sidebyside gap=5mm,center lower} -\begin{tikzpicture} -\path[fill overzoom image*= - {angle=90,origin=c}{goldshade.png}] - (2.75,-0.75) -- (3,0) -- (2.75,0.75) - \foreach \w in {45,90,...,315} - { -- (\w:1.5cm) } -- cycle; -\end{tikzpicture} -\end{dispExample*} -\end{docTikzKey} - - -\begin{docTikzKey}{fill overzoom picture}{=\meta{graphical code}}{no default, initially unset} - Fills the current path with the given \meta{graphical code}. - The result is zoomed such that the path area fills the image. -\begin{dispExample*}{sbs,lefthand ratio=0.66,right=2mm,sidebyside gap=5mm,center lower} -\begin{tikzpicture} -\path[draw,fill overzoom picture={% - \draw[red!50!yellow,line width=2mm] - (0,0) circle (1cm); - \draw[red,line width=5mm] (-1,-1) -- (1,1); - \draw[red,line width=5mm] (-1,1) -- (1,-1); - }] - (2.75,-0.75) -- (3,0) -- (2.75,0.75) - \foreach \w in {45,90,...,315} - { -- (\w:1.5cm) } -- cycle; -\end{tikzpicture} -\end{dispExample*} -\end{docTikzKey} - - -\clearpage -\subsection{Fill Zoom} -\begin{docTikzKey}{fill zoom image}{=\meta{file name}}{no default, initially unset} - Fills the current path with an external image referenced by \meta{file name}. - The image is zoomed such that it fits inside the path area. - Typically, some parts of the path area will stay unfilled. -\begin{dispExample*}{sbs,lefthand ratio=0.66,right=2mm,sidebyside gap=5mm,center lower} -\begin{tikzpicture} -\path[draw,fill zoom image=goldshade.png] - (2.75,-0.75) -- (3,0) -- (2.75,0.75) - \foreach \w in {45,90,...,315} - { -- (\w:1.5cm) } -- cycle; -\end{tikzpicture} -\end{dispExample*} -\end{docTikzKey} - - -\begin{docTikzKey}{fill zoom image*}{=\marg{graphics options}\marg{file name}}{no default, initially unset} - Fills the current path with an external image referenced by \meta{file name}. - The \meta{graphics options} are given to the underlying \docAuxCommand*{includegraphics} command. - The image is zoomed such that it fits inside the path area. - Typically, some parts of the path area will stay unfilled. -\begin{dispExample*}{sbs,lefthand ratio=0.66,right=2mm,sidebyside gap=5mm,center lower} -\begin{tikzpicture} -\path[draw,fill zoom image*= - {angle=90,origin=c}{goldshade.png}] - (2.75,-0.75) -- (3,0) -- (2.75,0.75) - \foreach \w in {45,90,...,315} - { -- (\w:1.5cm) } -- cycle; -\end{tikzpicture} -\end{dispExample*} -\end{docTikzKey} - - -\begin{docTikzKey}{fill zoom picture}{=\meta{graphical code}}{no default, initially unset} - Fills the current path with the given \meta{graphical code}. - The result is zoomed such that it fits inside the path area. - Typically, some parts of the path area will stay unfilled. -\begin{dispExample*}{sbs,lefthand ratio=0.66,right=2mm,sidebyside gap=5mm,center lower} -\begin{tikzpicture} -\path[draw,fill zoom picture={% - \draw[red!50!yellow,line width=2mm] - (0,0) circle (1cm); - \draw[red,line width=5mm] (-1,-1) -- (1,1); - \draw[red,line width=5mm] (-1,1) -- (1,-1); - }] - (2.75,-0.75) -- (3,0) -- (2.75,0.75) - \foreach \w in {45,90,...,315} - { -- (\w:1.5cm) } -- cycle; -\end{tikzpicture} -\end{dispExample*} -\end{docTikzKey} - - -\clearpage -\subsection{Fill Shrink} -\begin{docTikzKey}{fill shrink image}{=\meta{file name}}{no default, initially unset} - Fills the current path with an external image referenced by \meta{file name}. - The image is zoomed such that it fits inside the path area, but it never - gets enlarged. - Typically, some parts of the path area will stay unfilled. -\begin{dispExample*}{sbs,lefthand ratio=0.66,right=2mm,sidebyside gap=5mm,center lower} -\begin{tikzpicture} -\path[draw,fill shrink image=goldshade.png] - (2.75,-0.75) -- (3,0) -- (2.75,0.75) - \foreach \w in {45,90,...,315} - { -- (\w:1.5cm) } -- cycle; -\end{tikzpicture} -\end{dispExample*} -\end{docTikzKey} - - -\begin{docTikzKey}{fill shrink image*}{=\meta{file name}}{no default, initially unset} - Fills the current path with an external image referenced by \meta{file name}. - The \meta{graphics options} are given to the underlying \docAuxCommand*{includegraphics} command. - The image is zoomed such that it fits inside the path area, but it never - gets enlarged. - Typically, some parts of the path area will stay unfilled. -\begin{dispExample*}{sbs,lefthand ratio=0.66,right=2mm,sidebyside gap=5mm,center lower} -\begin{tikzpicture} -\path[draw, - fill shrink image*={width=1.5cm}{goldshade.png}] - (2.75,-0.75) -- (3,0) -- (2.75,0.75) - \foreach \w in {45,90,...,315} - { -- (\w:1.5cm) } -- cycle; -\end{tikzpicture} -\end{dispExample*} -\end{docTikzKey} - - -\begin{docTikzKey}{fill shrink picture}{=\meta{graphical code}}{no default, initially unset} - Fills the current path with the given \meta{graphical code}. - The result is zoomed such that it fits inside the path area, but it never - gets enlarged. - Typically, some parts of the path area will stay unfilled. -\begin{dispExample*}{sbs,lefthand ratio=0.66,right=2mm,sidebyside gap=5mm,center lower} -\begin{tikzpicture} -\path[draw,fill shrink picture={% - \draw[red!50!yellow,line width=2mm] - (0,0) circle (1cm); - \draw[red,line width=5mm] (-1,-1) -- (1,1); - \draw[red,line width=5mm] (-1,1) -- (1,-1); - }] - (2.75,-0.75) -- (3,0) -- (2.75,0.75) - \foreach \w in {45,90,...,315} - { -- (\w:1.5cm) } -- cycle; -\end{tikzpicture} -\end{dispExample*} -\end{docTikzKey} - - -\clearpage -\subsection{Fill Tile} -\begin{docTikzKey}{fill tile image}{=\meta{file name}}{no default, initially unset} - Fills the current path with a tile pattern using an external image referenced by \meta{file name}. -\begin{dispExample*}{sbs,lefthand ratio=0.66,right=2mm,sidebyside gap=5mm,center lower} -\begin{tikzpicture} -\path[fill tile image=pink_marble.png] - (2.75,-0.75) -- (3,0) -- (2.75,0.75) - \foreach \w in {45,90,...,315} - { -- (\w:1.5cm) } -- cycle; -\end{tikzpicture} -\end{dispExample*} -\end{docTikzKey} - - -\begin{docTikzKey}{fill tile image*}{=\marg{graphics options}\marg{file name}}{no default, initially unset} - Fills the current path with a tile pattern using an external image referenced by \meta{file name}. - The \meta{graphics options} are given to the underlying \docAuxCommand*{includegraphics} command. -\begin{dispExample*}{sbs,lefthand ratio=0.66,right=2mm,sidebyside gap=5mm,center lower} -\begin{tikzpicture} -\path[fill tile image*={width=1cm}{pink_marble.png}] - (2.75,-0.75) -- (3,0) -- (2.75,0.75) - \foreach \w in {45,90,...,315} - { -- (\w:1.5cm) } -- cycle; -\end{tikzpicture} -\end{dispExample*} -\end{docTikzKey} - -\begin{docTikzKey}{fill tile picture}{=\meta{graphical code}}{no default, initially unset} - Fills the current path with a tile pattern using the given \meta{graphical code}. -\begin{dispExample*}{sbs,lefthand ratio=0.66,right=2mm,sidebyside gap=5mm,center lower} -\begin{tikzpicture} -\path[draw,fill tile picture={% - \draw[red!50!yellow,line width=2mm] - (0,0) circle (1cm); - \draw[red,line width=5mm] (-1,-1) -- (1,1); - \draw[red,line width=5mm] (-1,1) -- (1,-1); - }] - (2.75,-0.75) -- (3,0) -- (2.75,0.75) - \foreach \w in {45,90,...,315} - { -- (\w:1.5cm) } -- cycle; -\end{tikzpicture} -\end{dispExample*} -\end{docTikzKey} - - -\begin{docTikzKey}{fill tile picture*}{=\marg{fraction}\marg{graphical code}}{no default, initially unset} - Fills the current path with a tile pattern using the given \meta{graphical code}. - The graphic is resized by \meta{fraction}. -\begin{dispExample*}{sbs,lefthand ratio=0.66,right=2mm,sidebyside gap=5mm,center lower} -\begin{tikzpicture} -\path[draw,fill tile picture*={0.25}{% - \draw[red!50!yellow,line width=2mm] - (0,0) circle (1cm); - \draw[red,line width=5mm] (-1,-1) -- (1,1); - \draw[red,line width=5mm] (-1,1) -- (1,-1); - }] - (2.75,-0.75) -- (3,0) -- (2.75,0.75) - \foreach \w in {45,90,...,315} - { -- (\w:1.5cm) } -- cycle; -\end{tikzpicture} -\end{dispExample*} -\end{docTikzKey} - - -\clearpage -\subsection{Filling Options} -\begin{docTikzKey}{fill image opacity}{=\meta{fraction}}{no default, initially |1.0|} - Sets the fill opacity for the image or picture fill options to the given \meta{fraction}. -\begin{dispExample} -\begin{tikzpicture} -\path[fill stretch image=goldshade.png] (0,0) circle (1cm); -\path[fill=red,fill stretch image=goldshade.png,fill image opacity=0.75] - (2,0) circle (1cm); -\path[fill=red,fill stretch image=goldshade.png,fill image opacity=0.5] - (4,0) circle (1cm); -\path[fill=red,fill stretch image=goldshade.png,fill image opacity=0.25] - (6,0) circle (1cm); -\path[fill=red] (8,0) circle (1cm); -\end{tikzpicture} -\end{dispExample} -\end{docTikzKey} - - -\begin{docTikzKey}{fill image scale}{=\meta{fraction}}{no default, initially |1.0|} - Stretches, zooms, overzooms or shrinks the image or picture to the given \meta{fraction} of the - width and height of the current path. -\begin{dispExample} -\begin{tikzpicture} -\path[draw,fill zoom image=goldshade.png] - (0,0) rectangle +(2,2); - -\path[draw,fill zoom image=goldshade.png,fill image scale=0.75] - (3,0) rectangle +(2,2); - -\path[draw,fill zoom image=goldshade.png,fill image scale=1.5] - (6,0) rectangle +(2,2); -\end{tikzpicture} -\end{dispExample} -\end{docTikzKey} - - -\begin{docTikzKey}[][doc updated=2018-03-18]{fill image options}{=\meta{graphics options}}{no default, initially empty} - The \meta{graphics options} are given to the underlying \docAuxCommand*{includegraphics} command - for the image fill options. This can be just together with - \refKey{/tikz/fill stretch image}, \refKey{/tikz/fill overzoom image}, \refKey{/tikz/fill zoom image}, - and \refKey{/tikz/fill tile image}. -\begin{dispExample*}{sbs,lefthand ratio=0.66,right=2mm,sidebyside gap=5mm,center lower} -\begin{tikzpicture} -\path[fill image options={width=1cm}, - fill tile image=pink_marble.png] - (2.75,-0.75) -- (3,0) -- (2.75,0.75) - \foreach \w in {45,90,...,315} - { -- (\w:1.5cm) } -- cycle; -\end{tikzpicture} -\end{dispExample*} -\end{docTikzKey} - - -\begin{dispExample*}{sbs,lefthand ratio=0.6,center lower,fonttitle=\bfseries, - title=Image blending example} -\begin{tikzpicture}[every node/.style= - {circle,minimum width=2cm}] -\node[fill stretch image=blueshade.png] - (A) at (120:3cm) {A}; -\node[fill stretch image=goldshade.png] - (B) at (60:3cm) {B}; -\node[ - preaction={fill stretch image=blueshade.png}, - fill stretch image=goldshade.png, - fill image opacity=0.5] (C) {C}; -\path (A) -- node{$+$} (B); -\draw[->,very thick] (A)--(C); -\draw[->,very thick] (B)--(C); -\end{tikzpicture} -\end{dispExample*} +\begin{marker} +Up to version 5.1.1 (2022/06/24) of |tcolorbox|, \tikzname\ image and picture fill extensions +were documented here. These extensions are now separate \tikzname\ libraries +and part of the |tikzfill| package where they are documented now. +\end{marker} \subsection{Straightening of the Arcs} diff --git a/macros/latex/contrib/tcolorbox/tcolorbox.doc.fitting.tex b/macros/latex/contrib/tcolorbox/tcolorbox.doc.fitting.tex index aa4854d8a6..d0761ca03d 100644 --- a/macros/latex/contrib/tcolorbox/tcolorbox.doc.fitting.tex +++ b/macros/latex/contrib/tcolorbox/tcolorbox.doc.fitting.tex @@ -142,22 +142,21 @@ The library is loaded by a package option or inside the preamble by: \clearpage -\begin{docCommand}{DeclareTCBoxFit}{\oarg{init options}\brackets{\texttt{\textbackslash}\meta{name}}\marg{specification}\marg{options}} +\begin{docCommand}{NewTCBoxFit}{\oarg{init options}\brackets{\texttt{\textbackslash}\meta{name}}\marg{specification}\marg{options}} Creates a new command \texttt{\textbackslash}\meta{name} based on \refCom{tcboxfit}. - Basically, |\DeclareTCBoxFit| operates like |\DeclareDocumentCommand|. This means, + Basically, \refCom{NewTCBoxFit} operates like |\NewDocumentCommand|. This means, the new command \texttt{\textbackslash}\meta{name} is constructed with the given argument \meta{specification}. + An error is issued if \texttt{\textbackslash}\meta{name} has already been defined. The \meta{options} are given to the underlying \refCom{tcboxfit}.\\ Note that \refKey{/tcb/savedelimiter} is set to the given \meta{name} automatically.\\ The \meta{init options} allow setting up automatic numbering, - see Section \ref{sec:initkeys} from page \pageref{sec:initkeys}.\\ - The new command is always created, irrespective of an already existing - command with the same name. + see Section \ref{sec:initkeys} from page \pageref{sec:initkeys}. \begin{dispExample*}{sbs,lefthand ratio=0.6} % \usepackage{lipsum} -\DeclareTCBoxFit{\mybox}{ O{} m !o } +\NewTCBoxFit{\mybox}{ O{} m !o } {colback=red!5!white, colframe=red!75!black, width=#2,height=#2/3*2, @@ -171,41 +170,41 @@ The library is loaded by a package option or inside the preamble by: \end{dispExample*} \end{docCommand} -\begin{docCommand}{NewTCBoxFit}{\oarg{init options}\brackets{\texttt{\textbackslash}\meta{name}}\marg{specification}\marg{options}} - Operates like \refCom{DeclareTCBoxFit}, but based on |\NewDocumentCommand| instead of |\DeclareDocumentCommand|. - An error is issued if \texttt{\textbackslash}\meta{name} has already been defined. -\end{docCommand} - \begin{docCommand}{RenewTCBoxFit}{\oarg{init options}\brackets{\texttt{\textbackslash}\meta{name}}\marg{specification}\marg{options}} - Operates like \refCom{DeclareTCBoxFit}, but based on |\RenewDocumentCommand| instead of |\DeclareDocumentCommand|. + Operates like \refCom{NewTCBoxFit}, but based on |\RenewDocumentCommand| instead of |\NewDocumentCommand|. An existing command is redefined. \end{docCommand} \begin{docCommand}{ProvideTCBoxFit}{\oarg{init options}\brackets{\texttt{\textbackslash}\meta{name}}\marg{specification}\marg{options}} - Operates like \refCom{DeclareTCBoxFit}, but based on |\ProvideDocumentCommand| instead of |\DeclareDocumentCommand|. + Operates like \refCom{NewTCBoxFit}, but based on |\ProvideDocumentCommand| instead of |\NewDocumentCommand|. The command \texttt{\textbackslash}\meta{name} is only created if it is not already defined. \end{docCommand} +\begin{docCommand}{DeclareTCBoxFit}{\oarg{init options}\brackets{\texttt{\textbackslash}\meta{name}}\marg{specification}\marg{options}} + Operates like \refCom{NewTCBoxFit}, but based on |\DeclareDocumentCommand| instead of |\NewDocumentCommand|. + The new command \texttt{\textbackslash}\meta{name} is always created, irrespective of an already existing + command with the same name. +\end{docCommand} + \clearpage -\begin{docCommand}{DeclareTotalTCBoxFit}{\oarg{init options}\brackets{\texttt{\textbackslash}\meta{name}}\marg{specification}\marg{options}\marg{content}} +\begin{docCommand}{NewTotalTCBoxFit}{\oarg{init options}\brackets{\texttt{\textbackslash}\meta{name}}\marg{specification}\marg{options}\marg{content}} Creates a new command \texttt{\textbackslash}\meta{name} based on \refCom{tcboxfit}. - In contrast to \refCom{DeclareTCBoxFit}, also the \meta{content} of the |tcboxfit| is specified.\\ - Basically, |\DeclareTotalTCBoxFit| operates like |\DeclareDocumentCommand|. This means, + In contrast to \refCom{NewTCBoxFit}, also the \meta{content} of the |tcboxfit| is specified.\\ + Basically, \refCom{NewTotalTCBoxFit} operates like |\NewDocumentCommand|. This means, the new command \texttt{\textbackslash}\meta{name} is constructed with the given argument \meta{specification}. + An error is issued if \texttt{\textbackslash}\meta{name} has already been defined. The \meta{options} are given to the underlying \refCom{tcboxfit} which is filled with the specified \meta{content}.\\ Note that \refKey{/tcb/savedelimiter} is set to the given \meta{name} automatically.\\ The \meta{init options} allow setting up automatic numbering, - see Section \ref{sec:initkeys} from page \pageref{sec:initkeys}.\\ - The new command is always created, irrespective of an already existing - command with the same name. + see Section \ref{sec:initkeys} from page \pageref{sec:initkeys}. \begin{dispExample} % \usepackage{lipsum} -\DeclareTotalTCBoxFit{\multibox}{ O{} m O{10} m } +\NewTotalTCBoxFit{\multibox}{ O{} m O{10} m } {nobeforeafter,colback=red!5!white,colframe=red!75!black,width=#2,height=#2/3*2, valign=center,#1} { \foreach \n in {1,...,#3} { #4} } @@ -216,21 +215,22 @@ The library is loaded by a package option or inside the preamble by: \end{dispExample} \end{docCommand} -\begin{docCommand}{NewTotalTCBoxFit}{\oarg{init options}\brackets{\texttt{\textbackslash}\meta{name}}\marg{specification}\marg{options}\marg{content}} - Operates like \refCom{DeclareTotalTCBoxFit}, but based on |\NewDocumentCommand| instead of |\DeclareDocumentCommand|. - An error is issued if \texttt{\textbackslash}\meta{name} has already been defined. -\end{docCommand} - \begin{docCommand}{RenewTotalTCBoxFit}{\oarg{init options}\brackets{\texttt{\textbackslash}\meta{name}}\marg{specification}\marg{options}\marg{content}} - Operates like \refCom{DeclareTotalTCBoxFit}, but based on |\RenewDocumentCommand| instead of |\DeclareDocumentCommand|. + Operates like \refCom{NewTotalTCBoxFit}, but based on |\RenewDocumentCommand| instead of |\NewDocumentCommand|. An existing command is redefined. \end{docCommand} \begin{docCommand}{ProvideTotalTCBoxFit}{\oarg{init options}\brackets{\texttt{\textbackslash}\meta{name}}\marg{specification}\marg{options}\marg{content}} - Operates like \refCom{DeclareTotalTCBoxFit}, but based on |\ProvideDocumentCommand| instead of |\DeclareDocumentCommand|. + Operates like \refCom{NewTotalTCBoxFit}, but based on |\ProvideDocumentCommand| instead of |\NewDocumentCommand|. The command \texttt{\textbackslash}\meta{name} is only created if it is not already defined. \end{docCommand} +\begin{docCommand}{DeclareTotalTCBoxFit}{\oarg{init options}\brackets{\texttt{\textbackslash}\meta{name}}\marg{specification}\marg{options}\marg{content}} + Operates like \refCom{NewTotalTCBoxFit}, but based on |\DeclareDocumentCommand| instead of |\NewDocumentCommand|. + The new command \texttt{\textbackslash}\meta{name} is always created, irrespective of an already existing + command with the same name. +\end{docCommand} + \clearpage \subsection{Option Keys of the Library}\label{subsec:fit} diff --git a/macros/latex/contrib/tcolorbox/tcolorbox.doc.initoptions.tex b/macros/latex/contrib/tcolorbox/tcolorbox.doc.initoptions.tex index 48af585551..bb7c0361ce 100644 --- a/macros/latex/contrib/tcolorbox/tcolorbox.doc.initoptions.tex +++ b/macros/latex/contrib/tcolorbox/tcolorbox.doc.initoptions.tex @@ -376,10 +376,65 @@ To set a short title for headings with the default |\section| setting, use for e for all Students of my Course} \end{dispListing} -\medskip \begin{marker} The core of the list is generated by |\@starttoc|\marg{name} which can be wrapped into an own macro. \end{marker} \end{docCommand} +\clearpage + +\begin{marker} +The following options are not initialization options, but common options, +which are typically reasonable in connection with lists of |tcolorbox|es. +\end{marker} + +\begin{docTcbKey}{list entry}{=\meta{text}}{no default, initially unset} +If the \flqq list of tcolorbox(es)\frqq\ feature described in +%Subsection \ref{sec:listsof} from page \pageref{sec:listsof} +the current subsection +is used, this key +describes the \meta{text} for an entry into the generated list, e.\,g. +\begin{dispListing} +list entry={\protect\numberline{\thetcbcounter}My beautiful Example} +\end{dispListing} +See Section \ref{listing:exercises} from page \pageref{listing:exercises} +for a complete example.\par +If |\thetcbcounter| is omitted, \refKey{/tcb/list entry} could be used for +unnumbered boxes too. +\begin{marker} +This is a customization option. For numbered boxes, \refKey{/tcb/list entry} +typically has not to be given, because this entry will be generated automatically. +\end{marker} +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2014-09-19]{list text}{=\meta{text}}{style, no default} +This is a shortcut for setting \refKey{/tcb/list entry} to\\ +|\protect\numberline{\thetcbcounter}|\meta{text}. +So, the following settings are identical: +\begin{dispListing} +list text={My beautiful Example}, +list entry={\protect\numberline{\thetcbcounter}My beautiful Example} +\end{dispListing} +See Section \ref{listing:exercises} from page \pageref{listing:exercises} +for a complete example. +\end{docTcbKey} + +\begin{docTcbKey}{add to list}{=\marg{list}\marg{type}}{no default, initially unset} +If the \flqq list of tcolorbox(es)\frqq\ feature described in +%Subsection \ref{sec:listsof} from page \pageref{sec:listsof} +the current subsection +is used, list entries are +generated automatically. With this key, you can enforce an entry to the +given \meta{list} with the given \meta{type}. +This issues:\par +|\addcontentsline|\marg{list}\marg{type}\marg{entry text}\par +\meta{entry text} may be given by \refKey{/tcb/list entry}. +\begin{marker} +This is a customization option. For numbered boxes, this feature is configured +automatically, where +\meta{list} is set by \refKey{/tcb/new/list inside} and +\meta{type} is set by \refKey{/tcb/new/list type} +\end{marker} +\end{docTcbKey} + diff --git a/macros/latex/contrib/tcolorbox/tcolorbox.doc.intro.tex b/macros/latex/contrib/tcolorbox/tcolorbox.doc.intro.tex index 0147fe42e9..548c70e081 100644 --- a/macros/latex/contrib/tcolorbox/tcolorbox.doc.intro.tex +++ b/macros/latex/contrib/tcolorbox/tcolorbox.doc.intro.tex @@ -48,7 +48,7 @@ for some hints. The short story is: you have to install not only \subsection{Loading the Package} The base package |tcolorbox| loads the packages -|pgf| \cite{tantau:tikz_and_pgf}, |verbatim| \cite{schoepf:2001a}, +|pgf| \cite{tantau:tikz_and_pgf}, |verbatim| \cite{schoepf:verbatim}, |etoolbox| \cite{lehmann:etoolbox}, and |environ| \cite{robertson:2014a}. |tcolorbox| itself is loaded in the usual manner in the preamble: @@ -151,7 +151,7 @@ The following keys are used inside |\tcbuselibrary| respectively \clearpage \begin{docTcbKey}[library]{xparse}{}{\mylib{xparse}} - Loads |xparse| and is considered a legacy library kept for compatibility; + Loads the package |xparse| and is considered a legacy library kept for compatibility; see Section~\ref{sec:xparse} from page~\pageref{sec:xparse}. \end{docTcbKey} diff --git a/macros/latex/contrib/tcolorbox/tcolorbox.doc.listings.tex b/macros/latex/contrib/tcolorbox/tcolorbox.doc.listings.tex index c2108cc97f..c2e8b5fe27 100644 --- a/macros/latex/contrib/tcolorbox/tcolorbox.doc.listings.tex +++ b/macros/latex/contrib/tcolorbox/tcolorbox.doc.listings.tex @@ -279,20 +279,19 @@ This is my \LaTeX\ box. \clearpage -\begin{docCommand}{DeclareTCBListing}{\oarg{init options}\marg{name}\marg{specification}\marg{options}} +\begin{docCommand}{NewTCBListing}{\oarg{init options}\marg{name}\marg{specification}\marg{options}} Creates a new environment \meta{name} based on \refEnv{tcblisting}.\\ - Basically, |\DeclareTCBListing| operates like |\DeclareDocumentEnvironment|. This means, + Basically, \refCom{NewTCBListing} operates like |\NewDocumentEnvironment|. This means, the new environment \meta{name} is constructed with the given argument \meta{specification}. + An error is issued if \meta{name} has already been defined. The \meta{options} are given to the underlying \refEnv{tcblisting}.\\ Note that \refKey{/tcb/savedelimiter} is set to the given \meta{name} automatically.\\ The \meta{init options} allow setting up automatic numbering, - see Section \ref{sec:initkeys} from page \pageref{sec:initkeys}.\\ - The new environment is always created, irrespective of an already existing - environment with the same name. + see Section \ref{sec:initkeys} from page \pageref{sec:initkeys}. \begin{dispExample*}{sbs,lefthand ratio=0.5} -\DeclareTCBListing{mybox}{ s O{} m }{% +\NewTCBListing{mybox}{ s O{} m }{% colback=red!5!white, colframe=red!75!black, fonttitle=\bfseries, @@ -321,21 +320,22 @@ This is my \end{dispExample*} \end{docCommand} -\begin{docCommand}{NewTCBListing}{\oarg{init options}\marg{name}\marg{specification}\marg{options}} - Operates like \refCom{DeclareTCBListing}, but based on |\NewDocumentEnvironment| instead of |\DeclareDocumentEnvironment|. - An error is issued if \meta{name} has already been defined. -\end{docCommand} - \begin{docCommand}{RenewTCBListing}{\oarg{init options}\marg{name}\marg{specification}\marg{options}} - Operates like \refCom{DeclareTCBListing}, but based on |\RenewDocumentEnvironment| instead of |\DeclareDocumentEnvironment|. + Operates like \refCom{NewTCBListing}, but based on |\RenewDocumentEnvironment| instead of |\NewDocumentEnvironment|. An existing environment is redefined. \end{docCommand} \begin{docCommand}{ProvideTCBListing}{\oarg{init options}\marg{name}\marg{specification}\marg{options}} - Operates like \refCom{DeclareTCBListing}, but based on |\ProvideDocumentEnvironment| instead of |\DeclareDocumentEnvironment|. + Operates like \refCom{NewTCBListing}, but based on |\ProvideDocumentEnvironment| instead of |\NewDocumentEnvironment|. The environment \meta{name} is only created if it is not already defined. \end{docCommand} +\begin{docCommand}{DeclareTCBListing}{\oarg{init options}\marg{name}\marg{specification}\marg{options}} + Operates like \refCom{NewTCBListing}, but based on |\DeclareDocumentEnvironment| instead of |\NewDocumentEnvironment|. + The new environment is always created, irrespective of an already existing + environment with the same name. +\end{docCommand} + \clearpage \begin{marker} @@ -426,19 +426,18 @@ Note that the following code uses \verb+!O{}+ now. \clearpage -\begin{docCommand}{DeclareTCBInputListing}{\oarg{init options}\brackets{\texttt{\textbackslash}\meta{name}}\marg{specification}\marg{options}} +\begin{docCommand}{NewTCBInputListing}{\oarg{init options}\brackets{\texttt{\textbackslash}\meta{name}}\marg{specification}\marg{options}} Creates a new command \texttt{\textbackslash}\meta{name} based on \refCom{tcbinputlisting}. - Basically, |\DeclareTCBInputListing| operates like |\DeclareDocumentCommand|. This means, + Basically, \refCom{NewTCBInputListing} operates like |\NewDocumentCommand|. This means, the new command \texttt{\textbackslash}\meta{name} is constructed with the given argument \meta{specification}. + An error is issued if \texttt{\textbackslash}\meta{name} has already been defined. The \meta{options} are given to the underlying \refCom{tcbinputlisting}.\\ The \meta{init options} allow setting up automatic numbering, - see Section \ref{sec:initkeys} from page \pageref{sec:initkeys}.\\ - The new command is always created, irrespective of an already existing - command with the same name. + see Section \ref{sec:initkeys} from page \pageref{sec:initkeys}. \begin{dispExample} % counter from previous example -\DeclareTCBInputListing[use counter from=pabox]{\mylisting}{ O{} O{red} m }{% +\NewTCBInputListing[use counter from=pabox]{\mylisting}{ O{} O{red} m }{% listing file={#3},title=Listing~\thetcbcounter, colback=#2!5!white,colframe=#2!50!black,colbacktitle=#2!75!black, fonttitle=\bfseries,listing only,#1} @@ -448,21 +447,22 @@ Note that the following code uses \verb+!O{}+ now. \end{dispExample} \end{docCommand} -\begin{docCommand}{NewTCBInputListing}{\oarg{init options}\brackets{\texttt{\textbackslash}\meta{name}}\marg{specification}\marg{options}} - Operates like \refCom{DeclareTCBInputListing}, but based on |\NewDocumentCommand| instead of |\DeclareDocumentCommand|. - An error is issued if \texttt{\textbackslash}\meta{name} has already been defined. -\end{docCommand} - \begin{docCommand}{RenewTCBInputListing}{\oarg{init options}\brackets{\texttt{\textbackslash}\meta{name}}\marg{specification}\marg{options}} - Operates like \refCom{DeclareTCBInputListing}, but based on |\RenewDocumentCommand| instead of |\DeclareDocumentCommand|. + Operates like \refCom{NewTCBInputListing}, but based on |\RenewDocumentCommand| instead of |\NewDocumentCommand|. An existing command is redefined. \end{docCommand} \begin{docCommand}{ProvideTCBInputListing}{\oarg{init options}\brackets{\texttt{\textbackslash}\meta{name}}\marg{specification}\marg{options}} - Operates like \refCom{DeclareTCBInputListing}, but based on |\ProvideDocumentCommand| instead of |\DeclareDocumentCommand|. + Operates like \refCom{NewTCBInputListing}, but based on |\ProvideDocumentCommand| instead of |\NewDocumentCommand|. The command \texttt{\textbackslash}\meta{name} is only created if it is not already defined. \end{docCommand} +\begin{docCommand}{DeclareTCBInputListing}{\oarg{init options}\brackets{\texttt{\textbackslash}\meta{name}}\marg{specification}\marg{options}} + Operates like \refCom{NewTCBInputListing}, but based on |\DeclareDocumentCommand| instead of |\NewDocumentCommand|. + The new command is always created, irrespective of an already existing + command with the same name. +\end{docCommand} + \clearpage @@ -655,6 +655,8 @@ Sets a \meta{programming language} known to |Pygments| \cite{pygments:web}. \refKey{/tcb/minted options} are \emph{not} used. The intended use is inside the preamble to change the default behavior. Note that setting \refKey{/tcb/default minted options} also resets \refKey{/tcb/minted options}. + Since |minted| \cite{poore:minted} v2.6 set |stripnl=false|, adding + |stripnl| could be helpful to remove leading and trailing blank lines. \begin{dispListing} % inside the preamble \tcbset{% diff --git a/macros/latex/contrib/tcolorbox/tcolorbox.doc.s_main.sty b/macros/latex/contrib/tcolorbox/tcolorbox.doc.s_main.sty index 6d9c15c834..3aae917da1 100644 --- a/macros/latex/contrib/tcolorbox/tcolorbox.doc.s_main.sty +++ b/macros/latex/contrib/tcolorbox/tcolorbox.doc.s_main.sty @@ -8,7 +8,7 @@ \@namedef{opt@hypdoc.sty}{hypdoc} \RequirePackage[T1]{fontenc} -\RequirePackage[utf8]{inputenc} +%\RequirePackage[utf8]{inputenc} \RequirePackage[english]{babel} \RequirePackage{lmodern,parskip,array,ifthen,calc} \RequirePackage{amsmath,amssymb} @@ -196,6 +196,7 @@ tcbbreak, % theorems tcbmaketheorem,tcboxmath,tcbhighmath,thetcbcounter,newtcbtheorem, + NewTcbTheorem,RenewTcbTheorem,ProvideTcbTheorem,DeclareTcbTheorem, % documentation brackets, colDef,colOpt,cs, diff --git a/macros/latex/contrib/tcolorbox/tcolorbox.doc.s_snippet.sty b/macros/latex/contrib/tcolorbox/tcolorbox.doc.s_snippet.sty index 9bd1a069ef..3771159be2 100644 --- a/macros/latex/contrib/tcolorbox/tcolorbox.doc.s_snippet.sty +++ b/macros/latex/contrib/tcolorbox/tcolorbox.doc.s_snippet.sty @@ -58,7 +58,7 @@ \begin{tcbverbatimwrite}{\jobname_preamble_F.tex} -\newtcbtheorem[number within=section]{mytheo}{My Theorem}% +\NewTcbTheorem[number within=section]{mytheo}{My Theorem}% {colback=green!5,colframe=green!35!black,fonttitle=\bfseries}{th} \end{tcbverbatimwrite} \input{\jobname_preamble_F.tex} @@ -72,11 +72,11 @@ theostyle/.style={fonttitle=\bfseries\upshape, fontupper=\slshape, colback=red!10!white,colframe=red!75!black}, } -\newtcbtheorem[number within=subsection,crefname={definition}{definitions}]% +\NewTcbTheorem[number within=subsection,crefname={definition}{definitions}]% {Definition}{Definition}{defstyle}{def} -\newtcbtheorem[use counter from=Definition,crefname={theorem}{theorems}]% +\NewTcbTheorem[use counter from=Definition,crefname={theorem}{theorems}]% {Theorem}{Theorem}{theostyle}{theo} -\newtcbtheorem[use counter from=Definition,crefname={corollary}{corollaries}]% +\NewTcbTheorem[use counter from=Definition,crefname={corollary}{corollaries}]% {Corollary}{Corollary}{theostyle}{cor} \end{tcbverbatimwrite} \input{\jobname_preamble_G.tex} @@ -103,7 +103,7 @@ \begin{tcbverbatimwrite}{\jobname_preamble_J.tex} -\newtcbtheorem[use counter from=mytheo]{theorem}{Theorem}{% +\NewTcbTheorem[use counter from=mytheo]{theorem}{Theorem}{% fonttitle=\bfseries\upshape,fontupper=\itshape, colframe=green!50!black,colback=green!10!white, colbacktitle=green!20!white,coltitle=blue!75!black}{theo} diff --git a/macros/latex/contrib/tcolorbox/tcolorbox.doc.skins.tex b/macros/latex/contrib/tcolorbox/tcolorbox.doc.skins.tex index 73d93d228b..0292ceb48a 100644 --- a/macros/latex/contrib/tcolorbox/tcolorbox.doc.skins.tex +++ b/macros/latex/contrib/tcolorbox/tcolorbox.doc.skins.tex @@ -42,8 +42,6 @@ This is the lower part. \begin{docTcbKey}{frame style image}{=\meta{file name}}{no default, initially unset} Fills the frame with an external image referenced by \meta{file name}. - For advanced features like blending of a picture with the background, - use \refKey{/tcb/frame style} together with \refKey{/tikz/fill stretch image}. \begin{exdispExample*}{frame_style_image}{sbs,lefthand ratio=0.66} \tcbset{colback=red!5!white,fonttitle=\bfseries} @@ -60,8 +58,6 @@ This is the lower part. \begin{docTcbKey}{frame style tile}{=\marg{graphics options}\marg{file name}}{no default, initially unset} Fills the frame with a tile pattern based on an external image referenced by \meta{file name}. The \meta{graphics options} are given to the underlying \docAuxCommand*{includegraphics} command. - For advanced features like blending of a picture with the background, - use \refKey{/tcb/frame style} together with \refKey{/tikz/fill tile image}. \begin{exdispExample*}{frame_style_tile}{sbs,lefthand ratio=0.66} \tcbset{colback=red!5!white,coltitle=red!30!black, opacityback=0.75,fonttitle=\bfseries} @@ -119,8 +115,6 @@ This is the lower part. \clearpage \begin{docTcbKey}{interior style image}{=\meta{file name}}{no default, initially unset} Fills the interior with an external image referenced by \meta{file name}. - For advanced features like blending of a picture with the background, - use \refKey{/tcb/interior style} together with \refKey{/tikz/fill stretch image}. \begin{exdispExample*}{interior_style_image}{sbs,lefthand ratio=0.66} \tcbset{colframe=red!75!black,fonttitle=\bfseries} @@ -137,9 +131,6 @@ This is the lower part. \begin{docTcbKey}{interior style tile}{=\marg{graphics options}\marg{file name}}{no default, initially unset} Fills the interior with a tile pattern based on an external image referenced by \meta{file name}. The \meta{graphics options} are given to the underlying \docAuxCommand*{includegraphics} command. - For advanced features like blending of a picture with the background, - use \refKey{/tcb/interior style} together with \refKey{/tikz/fill tile image}. - \begin{exdispExample*}{interior_style_tile}{sbs,lefthand ratio=0.66} \tcbset{colframe=red!75!black,fonttitle=\bfseries} @@ -237,9 +228,6 @@ This is the lower part. \clearpage \begin{docTcbKey}{title style image}{=\meta{file name}}{no default, initially unset} Fills the title area with an external image referenced by \meta{file name}. - For advanced features like blending of a picture with the background, - use \refKey{/tcb/title style} together with \refKey{/tikz/fill stretch image}. - \begin{exdispExample*}{title_style_image}{sbs,lefthand ratio=0.66} \tcbset{colback=blue!5!white,colframe=blue!75!black, fonttitle=\bfseries} @@ -257,9 +245,6 @@ This is the lower part. \begin{docTcbKey}{title style tile}{=\marg{graphics options}\marg{file name}}{no default, initially unset} Fills the title area with a tile pattern based on an external image referenced by \meta{file name}. The \meta{graphics options} are given to the underlying \docAuxCommand*{includegraphics} command. - For advanced features like blending of a picture with the background, - use \refKey{/tcb/title style} together with \refKey{/tikz/fill tile image}. - \begin{exdispExample*}{title_style_tile}{sbs,lefthand ratio=0.66} \tcbset{colback=red!5!white,colframe=red!75!black, coltitle=blue!50!black,fonttitle=\bfseries} @@ -1233,7 +1218,7 @@ This example uses a public domain picture from\\ \enlargethispage*{1cm} -\begin{docTcbKey}{watermark zoom}{=\meta{fraction}}{no default, initially |0.75|} +\begin{docTcbKey}[][doc updated=2022-07-21]{watermark zoom}{=\meta{fraction}}{default |1|, initially |0.75|} Sets the zoom value for a watermark. The zoom respects the aspect ratio. The value $1.0$ means to fill the whole box until the watermark touches the frame. \begin{dispExample} @@ -1251,13 +1236,13 @@ This example uses a public domain picture from\\ \clearpage -\begin{docTcbKey}{watermark shrink}{=\meta{fraction}}{no default, initially unset} +\begin{docTcbKey}[][doc updated=2022-07-21]{watermark shrink}{=\meta{fraction}}{default |1|, initially unset} Identically to \refKey{/tcb/watermark zoom}, but the watermark never gets enlarged. Thus, the watermark keeps its original size or is shrunk. \end{docTcbKey} -\begin{docTcbKey}{watermark overzoom}{=\meta{fraction}}{no default, initially unset} +\begin{docTcbKey}[][doc updated=2022-07-21]{watermark overzoom}{=\meta{fraction}}{default |1|, initially unset} Sets the overzoom value for a watermark. The overzoom respects the aspect ratio. The value $1.0$ means to fill the whole box until the watermark touches all four sides of the frame. @@ -1284,7 +1269,7 @@ To avoid this optical glitch, just set \refKey{/tcb/pad at break} to any desired \end{marker} \clearpage -\begin{docTcbKey}{watermark stretch}{=\meta{fraction}}{no default, initially unset} +\begin{docTcbKey}[][doc updated=2022-07-21]{watermark stretch}{=\meta{fraction}}{default |1|, initially unset} Sets the stretch value for a watermark. The stretch value is applied to width and height in relation to the box dimensions. It does not respect the aspect ratio. The value $1.0$ means to fill the whole box. @@ -1333,6 +1318,16 @@ To avoid this optical glitch, just set \refKey{/tcb/pad at break} to any desired \end{dispExample} \end{docTcbKey} +\begin{marker} +Removing the clipping should be necessary only in very rare situations. Until +version 5.1.1 (2022/06/24), theoretically, the watermark could be extended +over the boundaries of the box without limit. Newer versions restrict the +watermark to a box scaled 4 times the actual |tcolorbox|. +If you really need to extend further, you are strongly advised to implement +this by using \refKey{/tcb/overlay} or \refKey{/tcb/underlay} directly +where no restrictions apply. +Note that a watermark is just a special \refKey{/tcb/overlay}. +\end{marker} \clearpage @@ -2507,6 +2502,8 @@ The differences between underlays and overlays are: \refKey{/tcb/underlay} overwrites this key. \end{docTcbKey} +\enlargethispage*{1cm} + \begin{docTcbKey}{underlay unbroken}{=\meta{graphical code}}{no default, initially unset} If the box is set to be \refKey{/tcb/breakable} but \emph{is not} broken actually or if the box is set to be \refKey{/tcb/unbreakable}, diff --git a/macros/latex/contrib/tcolorbox/tcolorbox.doc.technical.tex b/macros/latex/contrib/tcolorbox/tcolorbox.doc.technical.tex index 9b1155ddc5..1e6960ffd2 100644 --- a/macros/latex/contrib/tcolorbox/tcolorbox.doc.technical.tex +++ b/macros/latex/contrib/tcolorbox/tcolorbox.doc.technical.tex @@ -238,7 +238,7 @@ be any \tikzname\ code. \begin{tcolorbox}[enhanced,frame code={ \foreach \n in {north east,north west,south east,south west} - {\path [fill=red!75!black] (interior.\n) circle (3mm); }; }] + {\path [fill=red!75!black] (interior.\n) circle (3mm); } }] This is a \textbf{tcolorbox}. \tcblower This is the lower part. @@ -701,6 +701,7 @@ considered to be \textit{read-only} and should never be redefined by the user. \end{dispExample} \end{docCommand} +\enlargethispage*{1cm} \begin{docCommand}[doc new=2016-02-16]{tcbtextwidth}{} This property describes the box content width. diff --git a/macros/latex/contrib/tcolorbox/tcolorbox.doc.theorems.tex b/macros/latex/contrib/tcolorbox/tcolorbox.doc.theorems.tex index fefe023cc3..5e21a0b92f 100644 --- a/macros/latex/contrib/tcolorbox/tcolorbox.doc.theorems.tex +++ b/macros/latex/contrib/tcolorbox/tcolorbox.doc.theorems.tex @@ -9,9 +9,19 @@ The library is loaded by a package option or inside the preamble by: \end{dispListing} This also loads the package |amsmath|. +Denis Bitouz\'e, Muzimuzhi, and many others provided very valuable input for this library. + + \subsection{Macros of the Library} -\begin{docCommand}[doc updated=2016-06-22]{newtcbtheorem}{\oarg{init options}\marg{name}\marg{display name}\marg{options}\marg{prefix}} +\begin{docCommands}[ + doc parameter = \oarg{init options}\marg{name}\marg{display name}\marg{options}\marg{prefix}, + doc updated=2022-07-18 + ] + { + { doc name = NewTcbTheorem }, + { doc name = newtcbtheorem } + } Creates new environments \meta{name} and \meta{name}|*| based on |tcolorbox| to frame a (mathematical) theorem. The \meta{display name} is used in the title line with a number, e.\,g. \mbox{\flqq Theorem 5.1\frqq}. @@ -19,19 +29,40 @@ This also loads the package |amsmath|. the appearance. %The \meta{counter} is used for automatic numbering. The \meta{init options} allow setting up automatic numbering, - see \Vref{sec:initkeys}.\par - The new environment \meta{name} takes one optional and two mandatory - parameters. The optional parameter supplements the options and should be - used only in rare cases. - The first mandatory parameter is the title text for the theorem and - is also set as \refKey{/tcb/nameref} identifier. - The second mandatory parameter is a \meta{marker}. The theorem is - automatically labeled with \meta{prefix}\meta{separator}\meta{marker} - where \meta{separator} is predefined as \enquote{|:|}, see \refKey{/tcb/label separator}.\par - The new environment \meta{name}|*| takes one optional and one mandatory - parameter and represents an unnumbered variant of the environment \meta{name}. - This variant is not labeled and not listed in lists of theorems. -\enlargethispage*{20mm} + see \Vref{sec:initkeys}.\par\medskip + + If \meta{name} is chosen as |footheorem|, the new environments are described by + \begin{docEnvironments}[ + doc no index, + doc name = footheorem, + doc parameter = \oarg{keys}\oarg{short}\marg{title}\marg{marker} + ]{} + Here, \meta{title} is the title text for the theorem and + is also set as \refKey{/tcb/nameref} identifier. + Optionally, the \meta{short} title used instead as \refKey{/tcb/nameref} identifier + and in lists of theorems. + \meta{keys} supplement the \meta{options} and may be + used only in rare cases. The theorem is + automatically labeled with \meta{prefix}\meta{separator}\meta{marker} + where \meta{separator} is predefined as \enquote{|:|}, see \refKey{/tcb/label separator}. + \end{docEnvironments} + \begin{docEnvironments}[ + doc no index, + doc name = footheorem*, + doc parameter = \oarg{keys}\marg{title} + ]{} + This represents an unnumbered variant. Again, \meta{title} is the title text for the theorem + and \meta{keys} supplement the \meta{options}. + This variant is not labeled and not listed in lists of theorems. + \end{docEnvironments} + + \begin{marker} + \refCom{NewTcbTheorem} and \refCom{newtcbtheorem} are identical and both + rely on \refCom{NewTColorBox} based on |\NewDocumentCommand|. + \end{marker} +\clearpage + + \inputpreamblelisting{F} \begin{dispExample} % usage of `\nameref' needs `nameref' or `hyperref' to be loaded @@ -43,6 +74,17 @@ This also loads the package |amsmath|. \end{mytheo} \end{dispExample} + +\begin{dispExample} +% usage of `\nameref' needs `nameref' or `hyperref' to be loaded +\begin{mytheo}[][Concise title]{This my very long theorem title with + too much words}{theoexample2} + Here we have a long and a short title. This theorem is numbered with + \ref{th:theoexample2}, it is given on page~\pageref{th:theoexample2}, + and it is titled \flqq\nameref{th:theoexample2}\frqq. +\end{mytheo} +\end{dispExample} + \begin{dispExample} \begin{mytheo}[label=myownlabel]{This is my title}{} The label parameter can be left empty without \LaTeX\ error. @@ -74,13 +116,41 @@ To switch off the \texttt{nameref} feature permanently, add \mbox{\texttt{nameref/.style=\{\}}} inside the \meta{options} list. \end{marker} -\end{docCommand} +\end{docCommands} +\medskip -\begin{docCommand}{renewtcbtheorem}{\oarg{init options}\marg{name}\marg{display name}\marg{options}\marg{prefix}} - Operates like \refCom{newtcbtheorem}, but based on |\renewenvironment| instead of |\newenvironment|. - An existing environment is redefined. -\end{docCommand} +\begin{docCommands}[ + doc parameter = \oarg{init options}\marg{name}\marg{display name}\marg{options}\marg{prefix}, + doc updated=2022-07-18 + ] + { + { doc name = RenewTcbTheorem }, + { doc name = renewtcbtheorem } + } + Operates like \refCom{NewTcbTheorem}, but based on |\RenewDocumentEnvironment| instead of |\NewDocumentEnvironment|. + Existing environments are redefined. +\end{docCommands} + + +\begin{docCommands}[ + doc parameter = \oarg{init options}\marg{name}\marg{display name}\marg{options}\marg{prefix}, + doc new = 2022-07-18, + doc name = ProvideTcbTheorem, + ]{} + Operates like \refCom{NewTcbTheorem}, but based on |\ProvideDocumentEnvironment| instead of |\NewDocumentEnvironment|. + New environments are is only created if they are not already defined. +\end{docCommands} + + +\begin{docCommands}[ + doc parameter = \oarg{init options}\marg{name}\marg{display name}\marg{options}\marg{prefix}, + doc new = 2022-07-18, + doc name = DeclareTcbTheorem, + ]{} + Operates like \refCom{NewTcbTheorem}, but based on |\DeclareDocumentEnvironment| instead of |\NewDocumentEnvironment|. + New environments are always created and possibly redefine existing ones. +\end{docCommands} \clearpage diff --git a/macros/latex/contrib/tcolorbox/tcolorbox.doc.verbatim.tex b/macros/latex/contrib/tcolorbox/tcolorbox.doc.verbatim.tex index de7d56aeb9..b2228a7b6a 100644 --- a/macros/latex/contrib/tcolorbox/tcolorbox.doc.verbatim.tex +++ b/macros/latex/contrib/tcolorbox/tcolorbox.doc.verbatim.tex @@ -115,3 +115,42 @@ and this is my 10\% text. \end{docTcbKey} +\clearpage + +\begin{docTcbKey}[][doc new=2023-02-10]{verbatim ignore indention at end}{\colOpt{=true\textbar false}}{default |true|, initially |true|} + If this option is set to be |true|, spaces and tabs before |\end{tcbverbatimwrite}| + on the same line are ignored. The same is true for all environments based + on \refEnv{tcbverbatimwrite}. If anything else precedes |\end{tcbverbatimwrite}| + on the same line, the complete content is written.\par + If this option is set to be |false|, everything preceding |\end{tcbverbatimwrite}| + is written. This was the default behavior before version 6.0.0.\par + The idea of \refKey{/tcb/verbatim ignore indention at end} is that the + environment can be indented. The creation of this option was inspired by Yukai Chou. + +\begin{dispExample} +% \tcbuselibrary{minted} +\texttt{verbatim ignore indention at end=false} + + \begin{tcblisting}{listing engine=minted, listing only, + verbatim ignore indention at end=false} + int a; + \end{tcblisting} + + \begin{tcblisting}{listing engine=minted, listing only, + verbatim ignore indention at end=false} + int a; + int b; \end{tcblisting} + +\texttt{verbatim ignore indention at end=true} + + \begin{tcblisting}{listing engine=minted, listing only, + verbatim ignore indention at end} + int a; + \end{tcblisting} + + \begin{tcblisting}{listing engine=minted, listing only, + verbatim ignore indention at end} + int a; + int b; \end{tcblisting} +\end{dispExample} +\end{docTcbKey} diff --git a/macros/latex/contrib/tcolorbox/tcolorbox.pdf b/macros/latex/contrib/tcolorbox/tcolorbox.pdf index 6803beb246..703ab400a6 100644 Binary files a/macros/latex/contrib/tcolorbox/tcolorbox.pdf and b/macros/latex/contrib/tcolorbox/tcolorbox.pdf differ diff --git a/macros/latex/contrib/tcolorbox/tcolorbox.sty b/macros/latex/contrib/tcolorbox/tcolorbox.sty index 21447f7a97..87d8d40309 100644 --- a/macros/latex/contrib/tcolorbox/tcolorbox.sty +++ b/macros/latex/contrib/tcolorbox/tcolorbox.sty @@ -1,8 +1,8 @@ -%% The LaTeX package tcolorbox - version 5.1.1 (2022/06/24) +%% The LaTeX package tcolorbox - version 6.0.0 (2023/02/10) %% tcolorbox.sty: Text color boxes %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2006-2022 by Prof. Dr. Dr. Thomas F. Sturm +%% Copyright (c) 2006-2023 by Prof. Dr. Dr. Thomas F. Sturm %% ------------------------------------------------------------------------------------------- %% %% This work may be distributed and/or modified under the @@ -18,8 +18,8 @@ %% This work consists of all files listed in README %% \NeedsTeXFormat{LaTeX2e}[2020/10/01] -\ProvidesPackage{tcolorbox}[2022/06/24 version 5.1.1 text color boxes] -\def\tcb@version{5.1.1} +\ProvidesPackage{tcolorbox}[2023/02/10 version 6.0.0 text color boxes] +\def\tcb@version{6.0.0} \RequirePackage{pgf}[2008/01/15] \RequirePackage{verbatim}[2003/08/22] @@ -142,7 +142,7 @@ \newcommand\tcbtitle{\ifx\tcbtitletext\@empty\else% - \leavevmode{\color{tcbcoltitle}\kvtcb@fonttitle\kvtcb@haligntitle\kvtcb@before@title\tcbtitletext\kvtcb@after@title}\fi} + \leavevmode{\color{tcbcoltitle}\kvtcb@fonttitle\kvtcb@haligntitle\tcb@insert@before@title\tcbtitletext\tcb@insert@after@title}\fi} \def\tcb@detach@title@code@{% \let\tcbtitletext\kvtcb@title% @@ -181,10 +181,16 @@ \def\tcb@insert@before@upper@noignore{\kvtcb@before@upper} \def\tcb@insert@before@lower@ignore{\kvtcb@before@lower\ignorespaces} \def\tcb@insert@before@lower@noignore{\kvtcb@before@lower} +\def\tcb@insert@before@title@ignore{\kvtcb@before@title\ignorespaces} +\def\tcb@insert@before@title@noignore{\kvtcb@before@title} + \def\tcb@insert@after@upper@unskip{\ifvmode\else\unskip\fi\kvtcb@after@upper} \def\tcb@insert@after@upper@nounskip{\kvtcb@after@upper} \def\tcb@insert@after@lower@unskip{\ifvmode\else\unskip\fi\kvtcb@after@lower} \def\tcb@insert@after@lower@nounskip{\kvtcb@after@lower} +\def\tcb@insert@after@title@unskip{\ifvmode\else\unskip\fi\kvtcb@after@title} +\def\tcb@insert@after@title@nounskip{\kvtcb@after@title} + \tcbset{% title/.store in=\kvtcb@title, @@ -293,7 +299,7 @@ parfillskip restore/.default=true,% parfillskip restore/true/.code={\let\tcb@parfillskip@check=\tcb@parfillskip@restore},% parfillskip restore/false/.code={\let\tcb@parfillskip@check=\@empty},% - before/.code={\def\kvtcb@beforebox{#1}\let\tcb@undo@before=\@empty\let\tcb@use@autoparskip=\relax}, + before/.code={\def\kvtcb@beforebox{#1}\let\tcb@use@autoparskip=\relax}, after/.code={\def\kvtcb@afterbox{#1}\let\tcb@use@autoparskip=\relax}, before skip balanced/.style={before={% \ifnum\lastnodetype=-1\relax% @@ -306,18 +312,13 @@ \fi% \else% \ifdim\prevdepth<\z@\relax% - \tcbdimto\tcb@prevdepth{\prevdepth}% \addvspace{\glueexpr#1-\parskip}% - \def\tcb@undo@before{\addvspace{-\glueexpr#1+\tcb@prevdepth}}% \else% \ifdim\prevdepth>.3\baselineskip\relax% - \tcbdimto\tcb@prevdepth{\prevdepth}% \addvspace{\glueexpr#1-\parskip}% \else% - \tcbdimto\tcb@prevdepth{.3\baselineskip}% \addvspace{\glueexpr#1+.3\baselineskip-\prevdepth-\parskip}% \fi% - \def\tcb@undo@before{\addvspace{-\glueexpr#1+\tcb@prevdepth}}% \fi% \fi% \nointerlineskip% @@ -336,15 +337,13 @@ }}, beforeafter skip balanced/.style={before skip balanced={#1},after skip balanced={#1}}, autoparskip/.code={\let\tcb@use@autoparskip=\tcb@use@auto@parskip}, - parskip/.style={before={\ifnum\lastnodetype=-1\relax\else\par% - \ifvmode\edef\tcb@prevdepth{\the\glueexpr\prevdepth+\lineskip+\parskip}% - \def\tcb@undo@before{\addvspace{-\glueexpr\tcb@prevdepth}}% - \pagebreak[0]\fi\fi\noindent}, + parskip/.style={% + before={\ifnum\lastnodetype=-1\relax\else\par% + \ifvmode\pagebreak[0]\fi\fi\noindent}, after={\tcb@parfillskip@check\par}}, - noparskip/.style={before={\ifnum\lastnodetype=-1\relax\else\par% - \ifvmode\edef\tcb@prevdepth{\the\glueexpr\prevdepth+\lineskip}% - \def\tcb@undo@before{\addvspace{-\glueexpr\smallskipamount+\tcb@prevdepth}}% - \pagebreak[0]\smallskip\fi\fi\noindent}, + noparskip/.style={% + before={\ifnum\lastnodetype=-1\relax\else\par% + \ifvmode\pagebreak[0]\smallskip\fi\fi\noindent}, after={\tcb@parfillskip@check\par\smallskip}}, nobeforeafter/.style={before=,after=}, force nobeforeafter/.code={\tcbset@late@options{nobeforeafter}}, @@ -358,9 +357,7 @@ \addvspace{-\parskip}% \fi% \else% - \tcbdimto\tcb@prevdepth{\prevdepth}% \addvspace{\glueexpr#1-\parskip}% - \def\tcb@undo@before{\addvspace{-\glueexpr#1+\tcb@prevdepth}}% \fi% \nointerlineskip% \fi% @@ -445,6 +442,8 @@ halign/center/.code={\let\kvtcb@halignupper=\tcb@raggedcenter@plain}, halign/justify/.code={\let\kvtcb@halignupper=\@empty}, halign upper/.style={halign=#1}, + halign upper code/.store in=\kvtcb@halignupper, + halign code/.store in=\kvtcb@halignupper, % halign lower/.is choice, halign lower/flush left/.code={\let\kvtcb@halignlower=\raggedright}, @@ -454,6 +453,7 @@ halign lower/right/.code={\let\kvtcb@halignlower=\tcb@raggedleft@plain}, halign lower/center/.code={\let\kvtcb@halignlower=\tcb@raggedcenter@plain}, halign lower/justify/.code={\let\kvtcb@halignlower=\@empty}, + halign lower code/.store in=\kvtcb@halignlower, % halign title/.is choice, halign title/flush left/.code={\let\kvtcb@haligntitle=\raggedright}, @@ -463,6 +463,7 @@ halign title/right/.code={\let\kvtcb@haligntitle=\tcb@raggedleft@plain}, halign title/center/.code={\let\kvtcb@haligntitle=\tcb@raggedcenter@plain}, halign title/justify/.code={\let\kvtcb@haligntitle=\@empty}, + halign title code/.store in=\kvtcb@haligntitle, % valign scale limit/.store in=\kvtcb@valignscalelimit, valign scale limit=1.1, @@ -634,8 +635,6 @@ no overlay/.style={overlay=},% standard/.style={skin=standard},% standard jigsaw/.style={skin=standard jigsaw},% - before title/.store in=\kvtcb@before@title,% - after title/.store in=\kvtcb@after@title,% before upper/.code={\def\kvtcb@before@upper{#1}\let\tcb@insert@before@upper\tcb@insert@before@upper@ignore},% before upper*/.code={\def\kvtcb@before@upper{#1}\let\tcb@insert@before@upper\tcb@insert@before@upper@noignore},% after upper/.code={\def\kvtcb@after@upper{#1}\let\tcb@insert@after@upper\tcb@insert@after@upper@unskip},% @@ -644,6 +643,10 @@ before lower*/.code={\def\kvtcb@before@lower{#1}\let\tcb@insert@before@lower\tcb@insert@before@lower@noignore},% after lower/.code={\def\kvtcb@after@lower{#1}\let\tcb@insert@after@lower\tcb@insert@after@lower@unskip},% after lower*/.code={\def\kvtcb@after@lower{#1}\let\tcb@insert@after@lower\tcb@insert@after@lower@nounskip},% + before title/.code={\def\kvtcb@before@title{#1}\let\tcb@insert@before@title\tcb@insert@before@title@ignore},% + before title*/.code={\def\kvtcb@before@title{#1}\let\tcb@insert@before@title\tcb@insert@before@title@noignore},% + after title/.code={\def\kvtcb@after@title{#1}\let\tcb@insert@after@title\tcb@insert@after@title@unskip},% + after title*/.code={\def\kvtcb@after@title{#1}\let\tcb@insert@after@title\tcb@insert@after@title@nounskip},% center title/.style={halign title=flush center},% center upper/.style={halign upper=flush center},% center lower/.style={halign lower=flush center},% @@ -791,10 +794,7 @@ \tcbifoddpageoroneside{\tcbset{#1}}{\tcbset{#2}}% }, phantom/.code={\appto\kvtcb@phantom{#1}}, - step and label/.style 2 args={phantom={\refstepcounter{#1}\tcb@set@label{#2}}},% step/.style={phantom={\refstepcounter{#1}}},% - label/.style={phantom={\tcb@set@label{#1}}},% - phantomlabel/.style={phantom={\ifdefined\phantomsection\phantomsection\fi\tcb@set@label{#1}}},% hypertarget/.style={phantom={\ifdefined\hypertarget\Hy@raisedlink{\hypertarget{#1}{}}\fi}}, bookmark*/.style 2 args={phantom={\ifdefined\bookmark% \Hy@raisedlink{\hypertarget{tcb@\thetcolorboxnumber}{}}% @@ -803,9 +803,6 @@ bookmark/.style={bookmark*={}{#1}}, index/.style={phantom={\index{#1}}},% index*/.style 2 args={phantom={\index[#1]{#2}}},% - nameref/.code={\tcb@gettitle{#1}},% - label type/.store in=\kvtcb@label@type,% - no label type/.style={label type=},% add to list/.style 2 args={phantom={\tcb@addcontentsline{#1}{#2}}}, nophantom/.code={\def\kvtcb@phantom{}},% shield externalize/.is choice, @@ -819,6 +816,7 @@ options@for/.code={\letcs\tcb@new@colop{tcb@opt@#1}\pgfkeysalsofrom\tcb@new@colop}, list entry/.store in=\kvtcb@listentry, list text/.style={list entry={\protect\numberline{\thetcbcounter}{\ignorespaces #1}}}, + short title/.style={list text={#1},nameref={#1}}, title filled/.is if=tcb@titlefilled,% @colbacktitle/.colorlet=tcbcolbacktitle, colbacktitle/.style={title filled,@colbacktitle={#1}}, @@ -873,8 +871,67 @@ } \ExplSyntaxOn + +\tl_new:N \l__tcobox_kv_labeltype_tl + + +\cs_new:Npn \__tcobox_label_label:n #1 + { + \quark_if_nil:NTF \l__tcobox_kv_labeltype_tl + { + \label{#1} + } + { + \exp_last_unbraced:NNV \label[\l__tcobox_kv_labeltype_tl]{#1} + } + } + + +\cs_new:Npn \__tcobox_zcsetup_countertype:nn #1#2 + { + \cs_if_exist:NT \zcsetup + { + \zcsetup { countertype={#1={#2}} } + } + } + + +\cs_new:Npn \__tcobox_label_zlabel:n #1 + { + \quark_if_nil:NF \l__tcobox_kv_labeltype_tl + { + \cs_if_exist:NT \tcbcounter + { + \exp_args:NVV \__tcobox_zcsetup_countertype:nn \tcbcounter \l__tcobox_kv_labeltype_tl + } + } + \cs_if_exist:NT \zlabel + { + \zlabel { #1 } + } + } + + \tcbset { + label /.style = { phantom={\__tcobox_label:n{#1}} }, + phantomlabel /.style = { phantom={\cs_if_exist_use:N\phantomsection\__tcobox_label:n{#1}} }, + step~and~label /.style~n~args = { 2 }{ phantom={\refstepcounter{#1}\__tcobox_label:n{#2}} }, + nameref /.code = + { + \tcb@gettitle{#1} + \cs_if_exist:NT \zref@titleref@setcurrent { \zref@titleref@setcurrent{#1} } + }, + label~type / .store~in = \l__tcobox_kv_labeltype_tl, + no~label~type / .style = { label~type=\q_nil }, + label~is~label/.code= + { + \cs_set_eq:NN \__tcobox_label:n \__tcobox_label_label:n + }, + label~is~zlabel/.code= + { + \cs_set_eq:NN \__tcobox_label:n \__tcobox_label_zlabel:n + }, IfBlankTF/.code~n~args={3}{\tl_if_blank:nTF{#1}{\pgfkeysalso{#2}}{\pgfkeysalso{#3}}}, IfBlankT/.code~n~args={2}{\tl_if_blank:nT{#1}{\pgfkeysalso{#2}}}, IfBlankF/.code~n~args={2}{\tl_if_blank:nF{#1}{\pgfkeysalso{#2}}}, @@ -896,19 +953,11 @@ \def\kvtcb@beforebox{} \def\kvtcb@afterbox{} -\def\tcb@set@label#1{% - \ifx\kvtcb@label@type\@empty% - \label{#1}% - \else% - \label[\kvtcb@label@type]{#1}% - \fi% -} - \def\tcb@parbox@true@indent{}% \def\tcb@parbox@false@indent{% - \preto\kvtcb@before@title{\noindent}% - \preto\kvtcb@before@upper{\noindent}% - \preto\kvtcb@before@lower{\noindent}% + \preto\kvtcb@before@title{\vspace{-\parskip}\noindent}% + \preto\kvtcb@before@upper{\vspace{-\parskip}\noindent}% + \preto\kvtcb@before@lower{\vspace{-\parskip}\noindent}% }% \let\tcb@parboxrestore=\@parboxrestore @@ -937,7 +986,10 @@ \let\tcb@minipage=\tcb@minipage@bottom % lrbox with integrated minipage -\def\tcb@lrbox#1#2{% +% #1 box +% #2 width +% #3 color (for color stack) +\def\tcb@lrbox#1#2#3{% \edef\reserved@a{% \endgroup \setbox#1\hbox{% @@ -945,20 +997,22 @@ \def\noexpand\@currenvir{\@currenvir}% \def\noexpand\@currenvline{\on@line}}% \reserved@a - \@endpefalse + \@endpefalse% \let\tcbbreak\par% \csname tcb@parbox@use@\kvtcb@parbox\endcsname% - \tcb@minipage#2\tcb@hyph@fix\ignorespaces} + \tcb@minipage{#2}% + \color{#3}% + \tcb@hyph@fix\ignorespaces} \let\endtcb@lrbox=\endminipage \let\tcb@savebox=\tcb@lrbox \let\endtcb@savebox=\endtcb@lrbox \def\tcb@saveupperbox{% -\begin{tcb@savebox}{\tcb@upperbox}{\tcb@w@upper}\tcb@lua@color{tcbcolupper}\kvtcb@fontupper\kvtcb@halignupper\tcb@insert@before@upper} +\begin{tcb@savebox}{\tcb@upperbox}{\tcb@w@upper}{tcbcolupper}\kvtcb@fontupper\kvtcb@halignupper\tcb@insert@before@upper} \def\tcb@savelowerbox{% -\begin{tcb@savebox}{\tcb@lowerbox}{\tcb@w@lower}\tcb@lua@color{tcbcollower}\kvtcb@fontlower\kvtcb@halignlower\tcb@insert@before@lower} +\begin{tcb@savebox}{\tcb@lowerbox}{\tcb@w@lower}{tcbcollower}\kvtcb@fontlower\kvtcb@halignlower\tcb@insert@before@lower} % counter for float @@ -974,11 +1028,11 @@ \tcbset{autoparskip/.style=noparskip}% \fi% \tcb@use@autoparskip% -\ifx\luacolorProcessBox\@undefined% - \def\tcb@lua@color#1{}% -\else% - \def\tcb@lua@color#1{\color{#1}}% -\fi% +%\ifx\luacolorProcessBox\@undefined% +% \def\tcb@lua@color#1{}% +%\else% +% \def\tcb@lua@color#1{\color{#1}}% +%\fi% } \long\def\tcb@colorbox{% @@ -998,7 +1052,7 @@ \ifx\kvtcb@title\@empty\tcb@hasTitlefalse\tcb@specialtitle@hook\else% \tcb@hasTitletrue% \tcbdimto\tcb@w@title{\kvtcb@width-(\kvtcb@left@rule+\kvtcb@right@rule+(\kvtcb@boxsep)*2+\kvtcb@lefttitle+\kvtcb@righttitle)}% - \begin{tcb@savebox}{\tcb@titlebox}{\tcb@w@title}\tcb@lua@color{tcbcoltitle}\kvtcb@fonttitle\kvtcb@haligntitle\kvtcb@before@title\kvtcb@title\kvtcb@after@title\end{tcb@savebox}% + \begin{tcb@savebox}{\tcb@titlebox}{\tcb@w@title}{tcbcoltitle}\kvtcb@fonttitle\kvtcb@haligntitle\tcb@insert@before@title\kvtcb@title\tcb@insert@after@title\end{tcb@savebox}% \fi% } @@ -1067,24 +1121,12 @@ \sbox{\tcb@lowerbox}{\color{tcbcollower}\kvtcb@fontlower\kvtcb@halignlower\tcb@insert@before@lower\tcb@sbs@text@right\tcb@insert@after@lower}% } -\def\tcb@set@color#1{% - \edef\current@color{\@nameuse{\string\color@#1}}% - \colorlet{.}{#1}% -} - -\def\tcb@reset@color{% - \colorlet{.}{tcbcol@origin}% - \edef\current@color{\@nameuse{\string\color@tcbcol@origin}}% -} - \def\tcb@set@@upper@and@lower{% - \colorlet{tcbcol@origin}{.}% \let\tcb@insert@after@part=\tcb@insert@after@upper% % switch for lower box \def\tcblower{% \tcb@insert@after@part% \end{tcb@savebox}% - \tcb@set@color{tcbcollower}% \unless\iftcb@sidebyside% \tcbdimto\tcb@w@lower{\tcb@innerwidth-\kvtcb@boxsep*2-\kvtcb@leftlower-\kvtcb@rightlower}% \fi% @@ -1099,7 +1141,6 @@ \fi% \tcb@startbox}% % start of upper box - \tcb@set@color{tcbcolupper}% \ifx\kvtcb@saveupperto\@empty% \let\tcb@startbox\tcb@saveupperbox% \let\endtcolorbox\tcb@endboxanddraw% @@ -1321,7 +1362,6 @@ \def\tcb@endboxanddraw{% \tcb@insert@after@part% \end{tcb@savebox}% - \tcb@reset@color% \tcb@draw@color@box% \tcb@finalize@environment% } @@ -1804,7 +1844,7 @@ } \def\tcb@sbs@mix{% - \begin{tcb@savebox}{\tcb@upperbox}{\tcb@w@upper@real}% + \begin{tcb@savebox}{\tcb@upperbox}{\tcb@w@upper@real}{tcbcolupper}% \tcb@box@align{\tcb@upperbox}% \iftcb@uppervisible% \tcbdimto{\tcb@temp@wd}{\tcb@w@upper-\wd\tcb@upperbox+\kvtcb@sbs@gap}% @@ -1957,13 +1997,11 @@ \long\def\tcbox@inner@hbox#1{% \tcb@set@@phantom% - \colorlet{tcbcol@origin}{.}% - \tcb@set@color{tcbcolupper}% \sbox\tcb@upperbox{\tcb@embed@tcbox{% \csname tcb@parbox@use@\kvtcb@parbox\endcsname% \@parboxrestore% - \tcb@lua@color{tcbcolupper}\kvtcb@fontupper\kvtcb@halignupper\tcb@insert@before@upper#1\tcb@insert@after@upper}}% - \tcb@reset@color% + \color{tcbcolupper}% + \kvtcb@fontupper\kvtcb@halignupper\tcb@insert@before@upper#1\tcb@insert@after@upper}}% \tcbdimto\tcb@val@raisebase{\the\dimexpr\dp\tcb@upperbox+\kvtcb@bottom+\kvtcb@boxsep+\kvtcb@bottom@rule@stand+\kvtcb@bbbottom@stand\relax}% \tcbdimto\kvtcb@width{\wd\tcb@upperbox+\kvtcb@left@rule+\kvtcb@leftupper+\kvtcb@boxsep*2+\kvtcb@rightupper+\kvtcb@right@rule}% \tcb@hasLowerfalse% @@ -1977,10 +2015,7 @@ \tcb@set@@phantom% \tcb@set@@title% \tcb@set@@dimensions% - \colorlet{tcbcol@origin}{.}% - \tcb@set@color{tcbcolupper}% - \begin{tcb@savebox}{\tcb@upperbox}{\tcb@w@upper}\tcb@lua@color{tcbcolupper}\kvtcb@fontupper\kvtcb@halignupper\tcb@insert@before@upper#1\tcb@insert@after@upper\end{tcb@savebox}% - \tcb@reset@color% + \begin{tcb@savebox}{\tcb@upperbox}{\tcb@w@upper}{tcbcolupper}\kvtcb@fontupper\kvtcb@halignupper\tcb@insert@before@upper#1\tcb@insert@after@upper\end{tcb@savebox}% \tcb@hasLowerfalse% \tcb@draw@color@box% } @@ -2077,6 +2112,7 @@ } \def\tcb@proc@counter@autoanduse#1{% + \let\tcb@tcbcounter@savetemp=\tcbcounter% \letcs\tcbcounter{tcb@cnt@#1}% \ifx\kvtcb@new@numberwithin\@empty% \csxdef{the\tcbcounter}{\expandafter\noexpand\kvtcb@new@format{\tcbcounter}}% @@ -2090,6 +2126,7 @@ \fi% \global\csletcs{thetcb@cnt@#1}{the\tcbcounter}% \appto\tcb@new@colopt{,code={\letcs\tcbcounter{tcb@cnt@#1}\letcs\thetcbcounter{thetcb@cnt@#1}\stepcounter{\tcbcounter}\preto\kvtcb@phantom{\addtocounter{\tcbcounter}{-1}\refstepcounter{\tcbcounter}}}}% + \let\tcbcounter=\tcb@tcbcounter@savetemp% } \def\tcb@proc@counter@auto#1{% @@ -2135,16 +2172,20 @@ \ExplSyntaxOn +\bool_new:N \l__tcobox_prevent_init_overwrite_bool + \cs_new:Npn \__tcobox_process_newtcolorbox:nn #1#2 { - \edef\tcb@new@boxname{#2} - \def\tcb@new@colopt{} - \tl_if_novalue:nF { #1 } + \bool_lazy_and:nnF + { \l__tcobox_prevent_init_overwrite_bool } + { \cs_if_exist_p:c { tcb@opt@#2 } } { + \edef\tcb@new@boxname{#2} + \def\tcb@new@colopt{} \tcb@proc@options@init{#1}{#2} + \preto\tcb@new@colopt{savedelimiter=#2} + \exp_args:Nc \cs_set_eq:NN { tcb@opt@#2 } \tcb@new@colopt } - \preto\tcb@new@colopt{savedelimiter=#2} - \exp_args:Nc \cs_set_eq:NN { tcb@opt@#2 } \tcb@new@colopt } @@ -2156,7 +2197,7 @@ } -\NewDocumentCommand \__tcobox_new_tcolorbox:w { m +o m o +o +m } +\NewDocumentCommand \__tcobox_new_tcolorbox:w { m +O{} >{\TrimSpaces} m o +o +m } { \__tcobox_process_newtcolorbox:nn { #2 }{ #3 } \tl_if_novalue:nTF { #4 } @@ -2175,33 +2216,39 @@ } \NewDocumentCommand \newtcolorbox { } { + \bool_set_true:N \l__tcobox_prevent_init_overwrite_bool \__tcobox_new_tcolorbox:w \newenvironment } \NewDocumentCommand \renewtcolorbox { } { + \bool_set_false:N \l__tcobox_prevent_init_overwrite_bool \__tcobox_new_tcolorbox:w \renewenvironment } -\NewDocumentCommand \__tcobox_new_TColorBox:w { m +o m +m +m } +\NewDocumentCommand \__tcobox_new_TColorBox:w { m +O{} >{\TrimSpaces} m +m +m } { \__tcobox_process_newtcolorbox:nn { #2 }{ #3 } #1 { #3 }{ #4 }{ \tcolorbox[#5,options@for=#3] }{ \endtcolorbox } } \NewDocumentCommand \DeclareTColorBox { } { + \bool_set_false:N \l__tcobox_prevent_init_overwrite_bool \__tcobox_new_TColorBox:w \DeclareDocumentEnvironment } \NewDocumentCommand \NewTColorBox { } { + \bool_set_true:N \l__tcobox_prevent_init_overwrite_bool \__tcobox_new_TColorBox:w \NewDocumentEnvironment } \NewDocumentCommand \RenewTColorBox { } { + \bool_set_false:N \l__tcobox_prevent_init_overwrite_bool \__tcobox_new_TColorBox:w \RenewDocumentEnvironment } \NewDocumentCommand \ProvideTColorBox { } { + \bool_set_true:N \l__tcobox_prevent_init_overwrite_bool \__tcobox_new_TColorBox:w \ProvideDocumentEnvironment } @@ -2211,25 +2258,29 @@ \__tcobox_process_newtcolorbox:nn { #2 }{ #3 } \exp_args:Nc #1 { #3 }{ #4 }{ \begin{tcolorbox}[#5,options@for=#3]#6\end{tcolorbox} } } -\NewDocumentCommand \__tcobox_new_TotalTColorBox:w { m +o m } +\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 } \NewDocumentCommand \DeclareTotalTColorBox { } { + \bool_set_false:N \l__tcobox_prevent_init_overwrite_bool \__tcobox_new_TotalTColorBox:w \DeclareDocumentCommand } \NewDocumentCommand \NewTotalTColorBox { } { + \bool_set_true:N \l__tcobox_prevent_init_overwrite_bool \__tcobox_new_TotalTColorBox:w \NewDocumentCommand } \NewDocumentCommand \RenewTotalTColorBox { } { + \bool_set_false:N \l__tcobox_prevent_init_overwrite_bool \__tcobox_new_TotalTColorBox:w \RenewDocumentCommand } \NewDocumentCommand \ProvideTotalTColorBox { } { + \bool_set_true:N \l__tcobox_prevent_init_overwrite_bool \__tcobox_new_TotalTColorBox:w \ProvideDocumentCommand } @@ -2251,17 +2302,19 @@ } } } -\NewDocumentCommand \__tcobox_new_tcbox_i:w { m +o m } +\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 } \NewDocumentCommand \newtcbox { } { + \bool_set_true:N \l__tcobox_prevent_init_overwrite_bool \__tcobox_new_tcbox_i:w \newcommand } \NewDocumentCommand \renewtcbox { } { + \bool_set_false:N \l__tcobox_prevent_init_overwrite_bool \__tcobox_new_tcbox_i:w \renewcommand } @@ -2271,25 +2324,29 @@ \__tcobox_process_newtcolorbox:nn { #2 }{ #3 } \exp_args:Nc #1 { #3 }{ #4 }{ \tcbox[#5,options@for=#3] } } -\NewDocumentCommand \__tcobox_new_TCBox:w { m +o m } +\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 } \NewDocumentCommand \DeclareTCBox { } { + \bool_set_false:N \l__tcobox_prevent_init_overwrite_bool \__tcobox_new_TCBox:w \DeclareDocumentCommand } \NewDocumentCommand \NewTCBox { } { + \bool_set_true:N \l__tcobox_prevent_init_overwrite_bool \__tcobox_new_TCBox:w \NewDocumentCommand } \NewDocumentCommand \RenewTCBox { } { - \__tcobox_new_TCBox:w \RewewDocumentCommand + \bool_set_false:N \l__tcobox_prevent_init_overwrite_bool + \__tcobox_new_TCBox:w \RenewDocumentCommand } \NewDocumentCommand \ProvideTCBox { } { + \bool_set_true:N \l__tcobox_prevent_init_overwrite_bool \__tcobox_new_TCBox:w \ProvideDocumentCommand } @@ -2299,25 +2356,29 @@ \__tcobox_process_newtcolorbox:nn { #2 }{ #3 } \exp_args:Nc #1 { #3 }{ #4 }{ \tcbox[#5,options@for=#3]{#6} } } -\NewDocumentCommand \__tcobox_new_TotalTCBox:w { m +o m } +\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 } \NewDocumentCommand \DeclareTotalTCBox { } { + \bool_set_false:N \l__tcobox_prevent_init_overwrite_bool \__tcobox_new_TotalTCBox:w \DeclareDocumentCommand } \NewDocumentCommand \NewTotalTCBox { } { + \bool_set_true:N \l__tcobox_prevent_init_overwrite_bool \__tcobox_new_TotalTCBox:w \NewDocumentCommand } \NewDocumentCommand \RenewTotalTCBox { } { - \__tcobox_new_TotalTCBox:w \RewewDocumentCommand + \bool_set_false:N \l__tcobox_prevent_init_overwrite_bool + \__tcobox_new_TotalTCBox:w \RenewDocumentCommand } \NewDocumentCommand \ProvideTotalTCBox { } { + \bool_set_true:N \l__tcobox_prevent_init_overwrite_bool \__tcobox_new_TotalTCBox:w \ProvideDocumentCommand } @@ -2418,9 +2479,11 @@ \let\tcb@verbatim@begin@hook\@empty \let\tcb@verbatim@end@hook\@empty \let\tcb@verbatim@change@percent\@empty +\let\tcb@set@verbatim@finish\@empty \def\tcbverbatimwrite#1{% \@bsphack + \tcb@set@verbatim@finish% \tcb@allocate@tcb@out% \immediate\openout\tcb@out #1 \tcb@verbatim@begin@hook% @@ -2439,6 +2502,41 @@ } +\ExplSyntaxOn + +\cs_new_nopar:Npn \__tcobox_verbatim_finish: + { + \tl_set_rescan:Nnx \l_tmpa_tl + { + \char_set_catcode_space:n { 9 } + \char_set_catcode_space:n { 32 } + } { \the\verbatim@line } + \tl_if_blank:VF \l_tmpa_tl + { + \verbatim@processline + } + } + +\tcbset{% + verbatim~ignore~indention~at~end/.is~choice, + verbatim~ignore~indention~at~end/true/.code= + { + \cs_set:Npn \tcb@set@verbatim@finish + { + \cs_set_eq:NN \verbatim@finish \__tcobox_verbatim_finish: + } + }, + verbatim~ignore~indention~at~end/false/.code= + { + \cs_set_eq:NN \tcb@set@verbatim@finish \prg_do_nothing: + }, + verbatim~ignore~indention~at~end/.default=true, + verbatim~ignore~indention~at~end +} + +\ExplSyntaxOff + + % saving of the lower box \def\tcb@lowerverbatim{% @@ -2568,6 +2666,7 @@ \tcbset{% minipage,savedelimiter=tcolorbox,% set@extensions@preframe=,set@extensions@postframe=,set@extensions@final=,% + label is label, }% \def\tcbsetforeverylayer#1{\tcbset{initialize@reset={#1}}} diff --git a/macros/latex/contrib/tcolorbox/tcolorbox.tex b/macros/latex/contrib/tcolorbox/tcolorbox.tex index 8d410884c3..bcabeb82d0 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 5.1.1 (2022/06/24) +%% The LaTeX package tcolorbox - version 6.0.0 (2023/02/10) %% tcolorbox.tex: Manual %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2006-2022 by Prof. Dr. Dr. Thomas F. Sturm +%% Copyright (c) 2006-2023 by Prof. Dr. Dr. Thomas F. Sturm %% ------------------------------------------------------------------------------------------- %% %% This work may be distributed and/or modified under the @@ -29,6 +29,12 @@ \documentclass[a4paper,11pt]{ltxdoc} +\RequirePackage{l3benchmark} +\ExplSyntaxOn +\AtEndDocument { \benchmark_toc: } +\benchmark_tic: +\ExplSyntaxOff + \usepackage{tcolorbox.doc.s_main} \tcbEXTERNALIZE \usepackage{tcolorbox.doc.s_snippet} @@ -36,7 +42,7 @@ \tcbAUXmkdir{external} \tcbAUXmkdir{solutions} -%\usepackage{csquotes} +\usepackage{csquotes} \usepackage[style=numeric-comp,sorting=nyt, maxnames=8,minnames=8,abbreviate=false,backend=biber, bibencoding=latin1,texencoding=ascii]{biblatex} @@ -45,8 +51,8 @@ \setlength{\bibitemsep}{\smallskipamount} \addbibresource{tcolorbox.doc.bib} -\def\version{5.1.1}% -\def\datum{2022/06/24}% +\def\version{6.0.0}% +\def\datum{2023/02/10}% \makeindex \hypersetup{ @@ -64,8 +70,7 @@ %\geometry{showframe} %\tcbset{draftmode} \tcbset{/tcb/external/-}% for final run -%\includeonly{tcolorbox.doc.theorems} - +%\includeonly{tcolorbox.doc.breakable} %\hypersetup{colorlinks=false} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -- cgit v1.2.3