diff options
author | Karl Berry <karl@freefriends.org> | 2022-06-22 20:56:47 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2022-06-22 20:56:47 +0000 |
commit | 02b82ec1a46ccdb81e3984cde41795fbe70766f1 (patch) | |
tree | 12eaecd665ed89fe0a3654928f45a3376863d96b /Master/texmf-dist/doc | |
parent | aaf318af4f0447a75aeca97543754336da86439b (diff) |
tcolorbox (22jun22)
git-svn-id: svn://tug.org/texlive/trunk@63694 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc')
21 files changed, 1004 insertions, 758 deletions
diff --git a/Master/texmf-dist/doc/latex/tcolorbox/CHANGES.md b/Master/texmf-dist/doc/latex/tcolorbox/CHANGES.md index cd0cb3a9891..5dc1a6549f7 100644 --- a/Master/texmf-dist/doc/latex/tcolorbox/CHANGES.md +++ b/Master/texmf-dist/doc/latex/tcolorbox/CHANGES.md @@ -22,6 +22,59 @@ and this project adheres to +## [5.1.0] - 2022-06-22 + +### Added +- Options wrapping `\tl_if_blank:nTF` and `\tl_if_empty:nTF` (issue #179) + - Option `IfBlankTF` + - Option `IfBlankT` + - Option `IfBlankF` + - Option `IfEmptyTF` + - Option `IfEmptyT` + - Option `IfEmptyF` +- 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` +- 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 is loaded (issue #173) +- Library `documentation`: gather index LaTeX macros and configure gathering (issue #174) + - Option `doclang/commands` + - Option `index gather colors` + - Option `index gather commands` + - Option `index gather counters` + - Option `index gather environments` + - Option `index gather keys` + - Option `index gather lengths` + - Option `index gather paths` + - Option `index gather values` + - Option `index gather all` + - Option `index gather none` + +### Changed +- Required latex2e specified `\NeedsTeXFormat{LaTeX2e}[2020/10/01]` (issue #170) +- Documentation: comment `default setting` for `every box on higher layers` (issue #168) +- Documentation: hyperlinking keys and commands where not already done inside + the listings section (part of issue #175) +- All contents of library `xparse` are moved to the `tcolorbox` main package and + 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 + e.g. `\newtcbox{mybox}` instead of `\newtcbox{\mybox}` is no longer tolerated. + +### Fixed +- With `parbox=false`, `before skip` was ignored in inner box (issue #171) + + + ## [5.0.2] - 2022-01-07 ### Changed @@ -35,7 +88,6 @@ and this project adheres to - ## [5.0.1] - 2021-12-20 ### Fixed @@ -44,6 +96,7 @@ and this project adheres to This also affected boxes with sidebyside content + ## [5.0.0] - 2021-12-16 ### Added diff --git a/Master/texmf-dist/doc/latex/tcolorbox/README.md b/Master/texmf-dist/doc/latex/tcolorbox/README.md index 38f71ac5841..5677aebf2e5 100644 --- a/Master/texmf-dist/doc/latex/tcolorbox/README.md +++ b/Master/texmf-dist/doc/latex/tcolorbox/README.md @@ -1,4 +1,4 @@ -# The LaTeX package tcolorbox - version 5.0.2 (2022/01/07) +# The LaTeX package tcolorbox - version 5.1.0 (2022/06/22) > Copyright (c) 2006-2022 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> diff --git a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox-example-poster.pdf b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox-example-poster.pdf Binary files differindex 53ea3b56522..802b875cc4c 100644 --- a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox-example-poster.pdf +++ b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox-example-poster.pdf diff --git a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox-example-poster.tex b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox-example-poster.tex index 3b2234d5946..153c943e9d9 100644 --- a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox-example-poster.tex +++ b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox-example-poster.tex @@ -1,8 +1,8 @@ -%% The LaTeX package tcolorbox - version 5.0.2 (2022/01/07) +%% The LaTeX package tcolorbox - version 5.1.0 (2022/06/22) %% tcolorbox-example-poster.tex: a poster example for tcolorbox %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2006-2021 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> +%% Copyright (c) 2006-2022 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> %% ------------------------------------------------------------------------------------------- %% %% This work may be distributed and/or modified under the diff --git a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox-example.pdf b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox-example.pdf Binary files differindex e90054c665c..bce13b3ac6f 100644 --- a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox-example.pdf +++ b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox-example.pdf diff --git a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox-example.tex b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox-example.tex index aa1a23e52f6..b5baddaa018 100644 --- a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox-example.tex +++ b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox-example.tex @@ -1,8 +1,8 @@ -%% The LaTeX package tcolorbox - version 5.0.2 (2022/01/07) +%% The LaTeX package tcolorbox - version 5.1.0 (2022/06/22) %% tcolorbox-example.tex: an example for tcolorbox %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2006-2021 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> +%% Copyright (c) 2006-2022 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> %% ------------------------------------------------------------------------------------------- %% %% This work may be distributed and/or modified under the diff --git a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox-tutorial-poster.pdf b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox-tutorial-poster.pdf Binary files differindex 89224955ffc..ce07ca6efa1 100644 --- a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox-tutorial-poster.pdf +++ b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox-tutorial-poster.pdf diff --git a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox-tutorial-poster.tex b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox-tutorial-poster.tex index 9653f7fcd72..412c1092960 100644 --- a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox-tutorial-poster.tex +++ b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox-tutorial-poster.tex @@ -1,9 +1,9 @@ % \LaTeX-Main\ -%% The LaTeX package tcolorbox - version 5.0.2 (2022/01/07) +%% The LaTeX package tcolorbox - version 5.1.0 (2022/06/22) %% tcolorbox-tutorial-poster.tex: a tutorial for poster creation with tcolorbox %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2006-2021 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> +%% Copyright (c) 2006-2022 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> %% ------------------------------------------------------------------------------------------- %% %% This work may be distributed and/or modified under the diff --git a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.coremacros.tex b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.coremacros.tex index c396417530f..71fde951c14 100644 --- a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.coremacros.tex +++ b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.coremacros.tex @@ -3,6 +3,7 @@ \clearpage \section{Macros for Box Creation}% \tcbset{external/prefix=external/coremacros_}% +\subsection{Using \texttt{tcolorbox} and \texttt{tcbox}}\label{subsec:macros_using} \begin{docEnvironment}{tcolorbox}{\oarg{options}} This is the main environment to create an accentuated colored text box with rounded corners and, optionally, two parts. The appearance of this box @@ -146,10 +147,7 @@ Text \tcbox[tcbox raise base]{Hello World}\hfill \end{docCommand} \clearpage -\begin{marker} -See \Vref{subsec:xparse_tcolorbox} and \Vref{subsec:xparse_tcbox} for more -elaborate methods to create new environments and commands. -\end{marker} +\subsection{Producing \texttt{tcolorbox} Environments and Commands}\label{subsec:macros_tcolorbox} \begin{docCommand}{newtcolorbox}{\oarg{init options}\marg{name}\oarg{number}\oarg{default}\marg{options}} Creates a new environment \meta{name} based on \refEnv{tcolorbox}. @@ -211,6 +209,115 @@ numbered title and options. \clearpage + +\begin{docCommand}{DeclareTColorBox}{\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, + the new environment \meta{name} is constructed with the given argument \meta{specification}. + 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. + +\begin{dispExample} +% counter from previous example +\DeclareTColorBox[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} + +\begin{mybox}{My title} +This is a tcolorbox. +\end{mybox} + +\begin{mybox}[blue]{My title} +This is a tcolorbox. +\end{mybox} + +\begin{mybox}[green]{My title}"My Watermark" +This is a tcolorbox. +\end{mybox} + +\begin{mybox}[yellow]{My title}[colbacktitle=yellow!50!white,coltitle=black] +This is a tcolorbox. +\end{mybox} + +\begin{mybox}[purple]{My title}"All together"[coltitle=yellow] +This is a tcolorbox. +\end{mybox} +\end{dispExample} +\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|. + 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|. + The environment \meta{name} is only created if it is not already defined. +\end{docCommand} + + +\clearpage + +\begin{docCommand}{DeclareTotalTColorBox}{\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, + the new command \texttt{\textbackslash}\meta{name} is constructed with the given argument \meta{specification}. + 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.\\ + 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. + +\begin{dispExample} +\DeclareTotalTColorBox{\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} + { \tikz\path[fill zoom image={#2}] (0,0) rectangle (\linewidth,4cm);% + \tcblower#3} + +\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|. + 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|. + The command \texttt{\textbackslash}\meta{name} is only created if it is not already defined. +\end{docCommand} + + + +\clearpage +\subsection{Producing \texttt{tcbox} Commands}\label{subsec:macros_tcbox} + \begin{docCommand}{newtcbox}{\oarg{init options}\brackets{\texttt{\textbackslash}\meta{name}}\oarg{number}\oarg{default}\marg{options}} Creates a new macro \texttt{\textbackslash}\meta{name} based on \refCom{tcbox}. Basically, |\newtcbox| operates like |\newcommand|. @@ -265,18 +372,150 @@ The \mybox[green]{quick} brown \mybox{fox} \mybox[blue]{jumps} over the The \xmybox[green]{quick} brown \xmybox{fox} \xmybox[blue]{jumps} over the \xmybox[green]{lazy} \xmybox{dog}. \end{dispExample} - \end{docCommand} -\enlargethispage*{1cm} +\clearpage \begin{docCommand}{renewtcbox}{\oarg{init options}\brackets{\texttt{\textbackslash}\rmfamily\meta{name}}\oarg{number}\oarg{default}\marg{options}} Operates like \refCom{newtcbox}, but based on |\renewcommand| instead of |\newcommand|. An existing macro is redefined. \end{docCommand} + +\begin{docCommand}{DeclareTCBox}{\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, + the new command \texttt{\textbackslash}\meta{name} is constructed with the given argument \meta{specification}. + 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. + +\begin{dispExample} +% counter from previous example +\DeclareTCBox[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}, + IfBooleanT={#3}{colbacktitle=red!50!white} } + +\mybox{Bird}{This is my first box.} + \hfill +\mybox*{Tree}{This is my second box.} + \par\bigskip +\mybox{Bike}*{This is my third box.} + \hfill +\mybox*{City}*{This is my fourth box.} +\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|. + 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|. + The command \texttt{\textbackslash}\meta{name} is only created if it is not already defined. +\end{docCommand} + + + \clearpage +\begin{docCommand}{DeclareTotalTCBox}{\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, + the new command \texttt{\textbackslash}\meta{name} is constructed with the given argument \meta{specification}. + 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. + +\begin{dispExample} +\DeclareTotalTCBox{\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, + colback=#1!10!white,colframe=#1!50!black,#3}{#2} + +To set a word \textbf{bold} in \myverb{\LaTeX}, use +\myverb[green]{\textbf{bold}}. Alternatively, write +\myverb[yellow]{{\bfseries bold}}. +In \myverb[blue]{\LaTeX}[enhanced,fuzzy halo], other font settings are +done in the same way, e.\,g. \myverb{\textit}, \myverb{\itshape}\\ +or \myverb[brown]{\texttt}, \myverb[brown]{\ttfamily}. +\end{dispExample} + +The next example uses |\lstinline| from the |listings| package to +typeset the verbatim content. + +\begin{dispExample} +% \usepackage{listings} or \tcbuselibrary{listings} +\DeclareTotalTCBox{\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^} + +\commandbox*{cd "My Documents"} changes to directory \commandbox{My Documents}. + +\commandbox*{dir /A} lists the directory content. + +\commandbox*{copy example.txt d:\target} copies \commandbox{example.txt} to + \commandbox{d:\target}. +\end{dispExample} +\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|. + 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|. + The command \texttt{\textbackslash}\meta{name} is only created if it is not already defined. +\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 + \meta{verbatim box content}. + The underlying \refCom{tcbox} is styled with + \refKey{/tcb/verbatim} plus the given \meta{options}. + The difference to \refCom{tcbox} is that the \meta{verbatim box content} is + interpreted \textit{verbatim}. Therefore, |\tcboxverb| acts similar to |\verb|. + +\begin{dispExample} +\tcboxverb{\LaTeX}, \tcboxverb[colback=blue!10!white,colupper=blue]{\LaTeX}, +\tcboxverb[blank,fuzzy halo]{\LaTeX}, \tcboxverb[beamer]{\LaTeX}, +\tcboxverb[enhanced,skin=enhancedmiddle jigsaw,colframe=red]{\LaTeX}. +\end{dispExample} +\end{docCommand} + + + +%\clearpage +\subsection{Redefining other Environments (Wrapping with \texttt{tcolorbox})}\label{subsec:macros_refine} + \begin{docCommand}[doc new=2014-10-20]{tcolorboxenvironment}{\marg{name}\marg{options}} An existing environment \meta{name} is redefined to be boxed inside a |tcolorbox| with the given \meta{options}. diff --git a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.coreoptions.tex b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.coreoptions.tex index 42679d832aa..bda5bc3ac7a 100644 --- a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.coreoptions.tex +++ b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.coreoptions.tex @@ -2786,9 +2786,10 @@ are drawn by the codes given with \end{docTcbKey} -\begin{docTcbKey}[][doc new=2014-09-19]{every float}{=\meta{code}}{no default, initially empty} +\begin{docTcbKey}[][doc new=2014-09-19]{every float}{=\marg{code}}{no default, initially empty} For floating objects, the \refKey{/tcb/before} and \refKey{/tcb/after} - settings are ignored. Instead, the given \meta{code} is inserted before + settings are ignored. Instead, \refKey{/tcb/before float} and \refKey{/tcb/after float} + can be used. Further, with \refKey{/tcb/every float}, the given \meta{code} is inserted before a floating box. If the box is \refKey{/tcb/breakable}, the given \meta{code} is inserted before every part of the break sequence. The most common use case is |every float=\centering|. @@ -2804,6 +2805,32 @@ are drawn by the codes given with \end{docTcbKey} +\begin{docTcbKeys}[ + doc parameter = {=\marg{code}}, + doc description = {no default, initially empty}, + doc new = 2022-06-21, + ] + { + { + doc name = before float, + }, + { + doc name = after float, + } + } + For floating objects, the \refKey{/tcb/before} and \refKey{/tcb/after} + settings are ignored. Code can be inserted after the begin of the float + environment and before \refKey{/tcb/every float} with + \refKey{/tcb/before float} and between the end of the box and the end + of the float environment with \refKey{/tcb/after float}. + \begin{marker} + These options are not compatible with \refKey{/tcb/breakable} floating objects + and are ignored, if the box is set to be breakable. + \end{marker} +\end{docTcbKeys} + + + \clearpage \subsection{Embedding into the Surroundings}\label{subsec:surroundings} @@ -3778,6 +3805,7 @@ managed layer number (4 by default). Higher layers are layers above the highest managed layer number (4 by default). \begin{dispListing} +% default setting: \tcbset{every box on higher layers/.style={reset,every box}} \end{dispListing} \end{docTcbKey} @@ -3791,14 +3819,12 @@ not forbidden. \end{docCommand} \begin{tcboutputlisting} -% \usepackage{lipsum} -% \tcbuselibrary{skins,breakable} +% \usepackage{lipsum} \tcbuselibrary{skins,breakable} \tcbset{colframe=red!75!black,fonttitle=\bfseries, colback=red!5!white, every box/.style={enhanced,watermark text=\thetcblayer, before=\par\smallskip,after=\par\smallskip}, - every box on layer 2/.style={reset,every box,colback=yellow!10!white, - drop fuzzy shadow}} + every box on layer 2/.append style={colback=yellow!10!white,drop fuzzy shadow}} \begin{tcolorbox}[enhanced jigsaw,breakable,title=Layer 1 Box] Here comes a footnote\footnote{Footnote from layer 1 box}. \lipsum[2] @@ -3953,6 +3979,7 @@ targeting different box types and they do not blend very well. \refEnv{tcbwritetemp} and \refCom{tcbusetemp} implicitely. \end{docTcbKey} +\clearpage \subsection{\texttt{\textbackslash tcbox} Specials} The following options are applicable for \refCom{tcbox} and \refCom{tcboxmath} only. @@ -3981,6 +4008,21 @@ Test\dotfill The resulting box behaves analogue to |\fbox|. \end{docTcbKey} +\begin{docTcbKey}{verbatim}{}{style, no value} + Sets options for a \textit{verbatim} style \refCom{tcbox}. + Since the indented boxes may contain only very few words, the + dimensions are made smaller and \refKey{/tcb/nobeforeafter} + and \refKey{/tcb/tcbox raise base} are set. +\begin{dispExample*}{sbs,lefthand ratio=0.6} +\DeclareTotalTCBox{\myverb}{ v }{verbatim, + colframe=red!75!black,colupper=blue}{#1} + +\myverb{\textbf} is a \myverb{\LaTeX} command. +\end{dispExample*} +\end{docTcbKey} + + + \clearpage \begin{docTcbKey}[][doc new=2015-03-23]{tcbox width}{=\meta{mode}}{no default, initially \texttt{auto}} Controls how \refCom{tcbox} respects a \refKey{/tcb/width} setting. @@ -4506,6 +4548,185 @@ This is a \textbf{tcolorbox}. \end{exdispExample} \end{docTcbKey} +\clearpage + +\begin{docTcbKeys}[doc description = {no default}, doc new = 2022-05-25 ] + { + { + doc name = IfBlankTF, + doc parameter = {=\marg{token list}\marg{true options}\marg{false options}}, + }, + { + doc name = IfBlankT, + doc parameter = {=\marg{token list}\marg{true options}}, + }, + { + doc name = IfBlankF, + doc parameter = {=\marg{token list}\marg{false options}}, + } + } + Wraps the |\tl_if_blank:n(TF)| command(s) of \textsf{expl3} for option setting. + If the \meta{token list} consists only of blank spaces, the \meta{true options} are set. + Otherwise, the \meta{false options} are set. +\begin{dispExample} +\newtcolorbox{mybox}[1]{ IfBlankF={#1}{title=`#1'} } + +\begin{mybox}{My title} +This is a tcolorbox. +\end{mybox} + +\begin{mybox}{ } +This is a tcolorbox. +\end{mybox} +\end{dispExample} +\end{docTcbKeys} + +\medskip + +\begin{docTcbKeys}[doc description = {no default}, doc new = 2022-05-25 ] + { + { + doc name = IfEmptyTF, + doc parameter = {=\marg{token list}\marg{true options}\marg{false options}}, + }, + { + doc name = IfEmptyT, + doc parameter = {=\marg{token list}\marg{true options}}, + }, + { + doc name = IfEmptyF, + doc parameter = {=\marg{token list}\marg{false options}}, + } + } + Wraps the |\tl_if_empty:n(TF)| command(s) of \textsf{expl3} for option setting. + If the \meta{token list} is entirely empty, the \meta{true options} are set. + Otherwise, the \meta{false options} are set. +\begin{dispExample} +\newtcolorbox{mybox}[1]{ IfEmptyTF={#1}{colframe=red}{title=`#1'} } + +\begin{mybox}{My title} +This is a tcolorbox. +\end{mybox} + +\begin{mybox}{} +This is a tcolorbox. +\end{mybox} +\end{dispExample} +\end{docTcbKeys} + + +\clearpage + +\begin{docTcbKeys}[doc description = {no default}] + { + { + doc name = IfNoValueTF, + doc parameter = {=\marg{argument}\marg{true options}\marg{false options}}, + }, + { + doc name = IfNoValueT, + doc parameter = {=\marg{argument}\marg{true options}}, + doc new = 2020-09-16, + }, + { + doc name = IfNoValueF, + doc parameter = {=\marg{argument}\marg{false options}}, + doc new = 2020-09-16, + } + } + Wraps the |\IfNoValue(TF)| command(s) of |xparse| for option setting. + If the \meta{argument} has no value, the \meta{true options} are set. + Otherwise, the \meta{false options} are set. +\begin{dispExample} +\DeclareTColorBox{mybox}{ o }{colframe=red!75!black, + IfNoValueTF={#1}{colback=red!5!white}{enhanced,interior style image=#1}} + +\begin{mybox} +This is a tcolorbox. +\end{mybox} + +\begin{mybox}[goldshade.png] +This is a tcolorbox. +\end{mybox} +\end{dispExample} +\end{docTcbKeys} + +\medskip + +\begin{docTcbKeys}[doc description = {no default}] + { + { + doc name = IfValueTF, + doc parameter = {=\marg{argument}\marg{true options}\marg{false options}}, + }, + { + doc name = IfValueT, + doc parameter = {=\marg{argument}\marg{true options}}, + doc new = 2020-09-16, + }, + { + doc name = IfValueF, + doc parameter = {=\marg{argument}\marg{false options}}, + doc new = 2020-09-16, + } + } + Wraps the |\IfValue(TF)| command(s) of |xparse| for option setting. + If the \meta{argument} has a value, the \meta{true options} are set. + Otherwise, the \meta{false options} are set. +\begin{dispExample} +\DeclareTColorBox{mybox}{ o }{colframe=red!75!black,colback=red!5!white, + IfValueT={#1}{title={\flqq #1\frqq},fonttitle=\bfseries}} + +\begin{mybox} +This is a tcolorbox. +\end{mybox} + +\begin{mybox}[My title] +This is a tcolorbox. +\end{mybox} +\end{dispExample} +\end{docTcbKeys} + +%\medskip +\clearpage + +\begin{docTcbKeys}[doc description = {no default}] + { + { + doc name = IfBooleanTF, + doc parameter = {=\marg{argument}\marg{true options}\marg{false options}}, + }, + { + doc name = IfBooleanT, + doc parameter = {=\marg{argument}\marg{true options}}, + doc new = 2020-09-16, + }, + { + doc name = IfBooleanF, + doc parameter = {=\marg{argument}\marg{false options}}, + doc new = 2020-09-16, + } + } + Wraps the |\IfBoolean(TF)| command(s) of |xparse| for option setting. + If the \meta{argument} is |\BooleanTrue|, the \meta{true options} are set. + If the \meta{argument} is |\BooleanFalse|, the \meta{false options} are set. + +\begin{dispExample} +\DeclareTColorBox{mybox}{ s }{colframe=red!75!black, + IfBooleanTF={#1}{colback=yellow!50!red}{colback=red!5!white}} + +\begin{mybox} +This is a tcolorbox. +\end{mybox} + +\begin{mybox}* +This is a tcolorbox. +\end{mybox} +\end{dispExample} +\end{docTcbKeys} + + + \clearpage \begin{docTcbKey}[][doc new=2016-10-21]{void}{}{no value, initially unset} diff --git a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.documentation.tex b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.documentation.tex index 385c6621542..909ad20a243 100644 --- a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.documentation.tex +++ b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.documentation.tex @@ -1378,6 +1378,7 @@ instead. Also see \refKey{/tcb/docexample}. \end{docTcbKey} \clearpage +\enlargethispage*{1cm} \begin{docTcbKey}{index annotate}{\colOpt{=true\textbar false}}{default |true|, initially |true|} If set to |true|, the index entries are annotated with short descriptions @@ -1392,6 +1393,63 @@ instead. Also see \refKey{/tcb/docexample}. \end{docTcbKey} +\begin{docTcbKeys}[ + doc new={2022-06-20}, + doc parameter = {\colOpt{=true\textbar false}}, + doc description = {default |true|, initially |true|} + ] + { + { + doc name = index gather colors, + }, + { + doc name = index gather commands, + }, + { + doc name = index gather counters, + }, + { + doc name = index gather environments, + }, + { + doc name = index gather keys, + }, + { + doc name = index gather lengths, + }, + { + doc name = index gather paths, + }, + { + doc name = index gather values, + } + } + If set to |true|, an additional index grouping is created where entries + are gathered, e.g. \refKey{/tcb/index gather counters} creates an index + entry `Colors', see \refKey{/tcb/doclang/colors}, which gets all colors + as sub entries. +\end{docTcbKeys} + + +\begin{docTcbKeys}[ + doc new={2022-06-20}, + doc parameter = {}, + ] + { + { + doc name = index gather all, + doc description = {style, initially set} + }, + { + doc name = index gather none, + doc description = {style} + }, + } + Switches all index gather options from above to |true| (all) or |false| (none). +\end{docTcbKeys} + + + \begin{docTcbKey}{color command}{=\meta{color}}{no default, initially |Definition|} Sets the highlight color used by macro definitions. \end{docTcbKey} @@ -1464,6 +1522,10 @@ The English language is predefined. Heading text in the index for colors. \end{langTcbKey} +\begin{langTcbKey}[][doc new={2022-06-20}]{commands}{=\meta{text}}{no default, initially |Commands|} + Heading text in the index for commands. +\end{langTcbKey} + \begin{langTcbKey}[][doc new={2015-01-08}]{counter}{=\meta{text}}{no default, initially |counter|} Text used in the index for counters. \end{langTcbKey} @@ -1524,6 +1586,8 @@ The English language is predefined. Announcement text for updated content. \end{langTcbKey} +\clearpage + \begin{langTcbKey}{value}{=\meta{text}}{no default, initially |value|} Text used in the index for values. \end{langTcbKey} @@ -1534,13 +1598,6 @@ The English language is predefined. - - - -\clearpage - - - \subsection{Predefined Colors of the Library}\tcbdocmarginnote{\tcbdocupdated{2019-09-18}} The following colors are predefined. They are used as default colors in some library commands. diff --git a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.fitting.tex b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.fitting.tex index 7b3147217b8..6d670c8a167 100644 --- a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.fitting.tex +++ b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.fitting.tex @@ -36,13 +36,59 @@ The library is loaded by a package option or inside the preamble by: \end{dispExample} \end{docCommand} + \clearpage -\begin{marker} -See \Vref{subsec:xparse_tcboxfit} for more -elaborate methods to create new commands. -\end{marker} -\enlargethispage*{2cm} + +\begin{docCommands}[ + doc name = tcbfitdim, + doc description = {read-only \LaTeX\ length}, + doc updated = 2020-04-24, + ]{} + This is a \LaTeX\ length adapted automatically by most variants of + \refKey{/tcb/fit algorithm}. Therefore, it never is to be + changed by the user, but may be applied read-only. + The \refCom{tcbfitdim} corresponds to the font size and may also + be used to calculate box margins or other distances in dependency. + The initial and maximum value for \refCom{tcbfitdim} is set by + \refKey{/tcb/fit basedim}. +\end{docCommands} + + +\begin{docCommand}{tcbfontsize}{\marg{factor}} + Selects a font size inside a tcolorbox which is scaled with the given + \meta{factor} relative to \refCom{tcbfitdim}. + Also see \refKey{/tcb/fit fontsize macros} + +\begin{dispExample*}{sbs,lefthand ratio=0.6} +\tcbset{colback=red!5!white,size=small, + colframe=red!75!black} +\begin{tcolorbox}[fit basedim=10pt] + {\tcbfontsize{0.25} Very tiny,}\\ + {\tcbfontsize{0.5} Small,}\\ + {\tcbfontsize{1} Normal,}\\ + {\tcbfontsize{2} Large,}\\ + {\tcbfontsize{4} Huge.} +\end{tcolorbox} +\end{dispExample*} +\begin{dispExample*}{sbs,lefthand ratio=0.6} +\tcbset{colback=red!5!white,size=small, + colframe=red!75!black} +\begin{tcolorbox}[fit basedim=10pt, + fit to height=2cm] + {\tcbfontsize{0.25} Very tiny,}\\ + {\tcbfontsize{0.5} Small,}\\ + {\tcbfontsize{1} Normal,}\\ + {\tcbfontsize{2} Large,}\\ + {\tcbfontsize{4} Huge.} +\end{tcolorbox} +\end{dispExample*} +\end{docCommand} + + +\clearpage +\subsection{Producing \texttt{tcboxfit} Commands}\label{subsec:fitting_new} + \begin{docCommand}{newtcboxfit}{\oarg{init options}\brackets{\texttt{\textbackslash}\rmfamily\meta{name}}\oarg{number}\oarg{default}\marg{options}} Creates a new macro \texttt{\textbackslash}\meta{name} based on \refCom{tcboxfit}. @@ -96,51 +142,95 @@ elaborate methods to create new commands. \clearpage -\begin{docCommands}[ - doc name = tcbfitdim, - doc description = {read-only \LaTeX\ length}, - doc updated = 2020-04-24, - ]{} - This is a \LaTeX\ length adapted automatically by most variants of - \refKey{/tcb/fit algorithm}. Therefore, it never is to be - changed by the user, but may be applied read-only. - The \refCom{tcbfitdim} corresponds to the font size and may also - be used to calculate box margins or other distances in dependency. - The initial and maximum value for \refCom{tcbfitdim} is set by - \refKey{/tcb/fit basedim}. -\end{docCommands} +\begin{docCommand}{DeclareTCBoxFit}{\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, + the new command \texttt{\textbackslash}\meta{name} is constructed with the given argument \meta{specification}. + 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. +\begin{dispExample*}{sbs,lefthand ratio=0.6} +% \usepackage{lipsum} -\begin{docCommand}{tcbfontsize}{\marg{factor}} - Selects a font size inside a tcolorbox which is scaled with the given - \meta{factor} relative to \refCom{tcbfitdim}. - Also see \refKey{/tcb/fit fontsize macros} +\DeclareTCBoxFit{\mybox}{ O{} m !o } + {colback=red!5!white, + colframe=red!75!black, + width=#2,height=#2/3*2, + IfValueT={#3}{height=#3}, + #1} -\begin{dispExample*}{sbs,lefthand ratio=0.6} -\tcbset{colback=red!5!white,size=small, - colframe=red!75!black} -\begin{tcolorbox}[fit basedim=10pt] - {\tcbfontsize{0.25} Very tiny,}\\ - {\tcbfontsize{0.5} Small,}\\ - {\tcbfontsize{1} Normal,}\\ - {\tcbfontsize{2} Large,}\\ - {\tcbfontsize{4} Huge.} -\end{tcolorbox} -\end{dispExample*} -\begin{dispExample*}{sbs,lefthand ratio=0.6} -\tcbset{colback=red!5!white,size=small, - colframe=red!75!black} -\begin{tcolorbox}[fit basedim=10pt, - fit to height=2cm] - {\tcbfontsize{0.25} Very tiny,}\\ - {\tcbfontsize{0.5} Small,}\\ - {\tcbfontsize{1} Normal,}\\ - {\tcbfontsize{2} Large,}\\ - {\tcbfontsize{4} Huge.} -\end{tcolorbox} +\mybox[colback=yellow]{5cm}% + {\lipsum[2]} + +\mybox[colback=yellow]{5cm}[4cm]{\lipsum[2]} \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|. + 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|. + The command \texttt{\textbackslash}\meta{name} is only created if it is not already defined. +\end{docCommand} + +\clearpage + +\begin{docCommand}{DeclareTotalTCBoxFit}{\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, + the new command \texttt{\textbackslash}\meta{name} is constructed with the given argument \meta{specification}. + 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. + +\begin{dispExample} +% \usepackage{lipsum} + +\DeclareTotalTCBoxFit{\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} } + +\multibox{5cm}{I shall not repeat.} +\multibox[colframe=blue!75!white]{5cm}[20]{I shall not repeat.}\\ +\multibox[colback=yellow,height=5cm]{14cm}[100]{I shall not repeat.} +\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|. + 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|. + The command \texttt{\textbackslash}\meta{name} is only created if it is not already defined. +\end{docCommand} + \clearpage \subsection{Option Keys of the Library}\label{subsec:fit} @@ -493,7 +583,7 @@ are adapted. In the following, adapting the font size means adapting \end{docTcbKey} \begin{dispExample} % \usepackage{lipsum} -\newtcboxfit{mybox}[1]{colback=red!5!white,colframe=red!75!black,left=1mm,top=1mm, +\newtcboxfit{\mybox}[1]{colback=red!5!white,colframe=red!75!black,left=1mm,top=1mm, bottom=1mm,right=1mm,boxsep=0mm,width=3.5cm,height=7cm,nobeforeafter, before upper=\textcolor{blue}{\rule{5mm}{5mm}}\ , enhanced,watermark text={\tcbfitsteps}, @@ -510,7 +600,7 @@ Quality \dotfill versus \dotfill Speed \begin{dispExample} % \usepackage{lipsum} -\newtcboxfit{mybox}[2]{colback=red!5!white,colframe=red!75!black,left=1mm,top=1mm, +\newtcboxfit{\mybox}[2]{colback=red!5!white,colframe=red!75!black,left=1mm,top=1mm, size=tight,width=7.2cm,height=5cm,nobeforeafter, before upper=\textcolor{blue}{\rule{5mm}{5mm}}\ , enhanced,fonttitle=\bfseries,adjusted title={#2},fit algorithm=#1} diff --git a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.hooks.tex b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.hooks.tex index da47d263780..5d8c115be96 100644 --- a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.hooks.tex +++ b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.hooks.tex @@ -133,6 +133,7 @@ from page \pageref{subsec:contentadditions}. \end{docTcbKey} +\clearpage \subsection{Embedding into the Surroundings} The following option keys extend the options given in Subsection \ref{subsec:surroundings} from page \pageref{subsec:surroundings}. @@ -168,6 +169,24 @@ This is a \textbf{tcolorbox}. \end{tcolorbox} \end{dispExample} +\medskip + +\begin{docTcbKey}{before float app}{=\meta{code}}{no default} + Appends the given \meta{code} to \refKey{/tcb/before float} before the colored box. +\end{docTcbKey} + +\begin{docTcbKey}{before float pre}{=\meta{code}}{no default} + Prepends the given \meta{code} to \refKey{/tcb/before float} before the colored box. +\end{docTcbKey} + +\begin{docTcbKey}{after float app}{=\meta{code}}{no default} + Appends the given \meta{code} to \refKey{/tcb/after float} after the colored box. +\end{docTcbKey} + +\begin{docTcbKey}{after float pre}{=\meta{code}}{no default} + Prepends the given \meta{code} to \refKey{/tcb/after float} after the colored box. +\end{docTcbKey} + \clearpage \subsection{Overlays} diff --git a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.listings.tex b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.listings.tex index 82b5d9f77bb..4cf36cd9ef5 100644 --- a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.listings.tex +++ b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.listings.tex @@ -8,7 +8,7 @@ \tcbset{external/prefix=external/listings_}% \subsection{Loading the Libraries} -In contrast to other |tcolorbox| libraries, the libraries +In contrast to other \refEnv{tcolorbox} libraries, the libraries \mylib{listings}, \mylib{listingsutf8}, and \mylib{minted} are concurrent in the sense that they all do the same thing, i.\,e.\ displaying listings with or without typesetting the listing in \LaTeX\ parallel. @@ -77,7 +77,7 @@ This also loads the package |minted| \cite{poore:minted}. The |minted| package uses the external tool |Pygments| \cite{pygments:web} to apply syntax highlighting. It has to be installed and set up, before the library can be used, see \cite{poore:minted} and \cite{pygments:web}. -The |tcolorbox| library \mylib{minted} does not work, if the package +The \refEnv{tcolorbox} library \mylib{minted} does not work, if the package |minted| \cite{poore:minted} does not work. \end{marker} @@ -95,7 +95,7 @@ To reactivate this setting, if overwritten by other libraries, use Controlled by the given \meta{options}, the environment content is typeset normally and/or as a listing. Furthermore, the \meta{options} control appearance and functions of - the |tcolorbox|. + the \refEnv{tcolorbox}. By default, the listing is interpreted as a \LaTeX\ listing. \begin{dispExample} \begin{tcblisting}{colback=red!5!white,colframe=red!75!black} @@ -154,8 +154,8 @@ and in compiled form. \clearpage \begin{docEnvironment}{tcboutputlisting}{} Saves the environment content to a file which is named by the key value of - |listing file|. Later, this file can be loaded by - |\tcbinputlisting| or |\tcbuselistingtext| or |\tcbuselistinglisting|. + \refKey{/tcb/listing file}. Later, this file can be loaded by + \refCom{tcbinputlisting} or \refCom{tcbuselistingtext} or \refCom{tcbuselistinglisting}. \begin{dispListing} \begin{tcboutputlisting} This \textbf{text} is written to a standardized file for later usage. @@ -165,8 +165,8 @@ This \textbf{text} is written to a standardized file for later usage. \begin{docCommand}{tcbinputlisting}{\marg{options}} - Creates a colored boxed based on a |tcolorbox|. The text content is read - from a file named by the key value of |listing file|. Apart from that, + Creates a colored boxed based on a \refEnv{tcolorbox}. The text content is read + from a file named by the key value of \refKey{/tcb/listing file}. Apart from that, the function is equal to that of \refEnv{tcblisting}. \begin{dispExample} \tcbinputlisting{colback=red!5!white,colframe=red!75!black,text only} @@ -175,7 +175,7 @@ This \textbf{text} is written to a standardized file for later usage. \end{docCommand} \begin{docCommand}{tcbuselistingtext}{} - Loads text from a file named by the key value of |listing file|. + Loads text from a file named by the key value of \refKey{/tcb/listing file}. \begin{dispExample} \tcbuselistingtext \end{dispExample} @@ -183,7 +183,7 @@ This \textbf{text} is written to a standardized file for later usage. \begin{docCommand}{tcbuselistinglisting}{} - Typesets text as listing from a file named by the key value of |listing file|. + Typesets text as listing from a file named by the key value of \refKey{/tcb/listing file}. \begin{dispExample} \tcbuselistinglisting \end{dispExample} @@ -197,12 +197,10 @@ This \textbf{text} is written to a standardized file for later usage. \clearpage +\subsection{Producing \texttt{tcblisting} Environments}\label{subsec:listing_newlistings} + \begin{marker} -See \Vref{subsec:xparse_listing} and \Vref{subsec:xparse_inputlisting} for more -elaborate methods to create new environments and commands. -\end{marker} -\begin{marker} -If a new sort of |tcblisting| environments should be created with +If a new sort of \refEnv{tcblisting} environments should be created with one optional argument only, one is highly recommended to use \refCom{DeclareTCBListing} or \refCom{NewTCBListing} instead of \refCom{newtcblisting} to @@ -211,10 +209,10 @@ avoid content scanning problems. \begin{docCommand}{newtcblisting}{\oarg{init options}\marg{name}\oarg{number}\oarg{default}\marg{options}} Creates a new environment \meta{name} based on \refEnv{tcblisting}. - Basically, |\newtcblisting| operates like |\newenvironment|. This means, + Basically, \refCom{newtcblisting} operates like |\newenvironment|. This means, the new environment \meta{name} optionally takes \meta{number} arguments, where \meta{default} is the default value for the optional first argument. - The \meta{options} are given to the underlying |tcblisting|. + 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, @@ -280,12 +278,119 @@ This is my \LaTeX\ box. \clearpage + +\begin{docCommand}{DeclareTCBListing}{\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, + the new environment \meta{name} is constructed with the given argument \meta{specification}. + 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. + +\begin{dispExample*}{sbs,lefthand ratio=0.5} +\DeclareTCBListing{mybox}{ s O{} m }{% + colback=red!5!white, + colframe=red!75!black, + fonttitle=\bfseries, + IfBooleanTF={#1} + {listing side text} + {text side listing}, + title={#3},#2} + +\begin{mybox}{Listing Box} +This is my +\LaTeX\ box. +\end{mybox} +\bigskip + +\begin{mybox}*{Listing Box} +This is my +\LaTeX\ box. +\end{mybox} +\bigskip + +\begin{mybox}[colback=yellow] + {Listing Box} +This is my +\LaTeX\ box. +\end{mybox} +\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|. + 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|. + The environment \meta{name} is only created if it is not already defined. +\end{docCommand} + +\clearpage + +\begin{marker} +With date of 2018-05-12, the |xparse| \cite{latexproject:xparse} package +changed the argument collection process (now part of the \LaTeX\ kernel). +Spaces are ignored which leads to a serious change for listing environments +ending with an optional argument like \verb+O{}+. +The former behavior of respecting spaces can be preserved by adding a \flqq\verb+!+\frqq. +Note that the following code uses \verb+!O{}+ now. +\begin{itemize} +\item For older |xparse| versions, the following code is correct when using \verb+O{}+. +\item For |xparse| of 2018-05-12, only the first two examples of + the following code using \verb+O{}+ are really \flqq good\frqq\ -- all others do not work. +\item For |xparse| of 2018-05-12 and later, the following code is correct when using \verb+!O{}+. +\end{itemize} +\end{marker} + +\begin{dispListing*}{title={Caveats of using an environment ending with an + optional argument},fonttitle=\bfseries} +\DeclareTCBListing{mybox}{ !O{} }{listing only,#1} + +\begin{mybox}[colframe=red] +\good +\end{mybox} + +\begin{mybox}[colframe=red]\good\end{mybox} + +\begin{mybox} +\good +\end{mybox} + +\begin{mybox} \good\end{mybox} + +\begin{mybox}\bad!\end{mybox} + +\begin{mybox} +[\good] +\end{mybox} + +\begin{mybox} [\good]\end{mybox} + +\begin{mybox}[\bad!]\end{mybox} +\end{dispListing*} + + +\clearpage +\subsection{Producing \texttt{tcbinputlisting} Commands}\label{subsec:listings_inputlisting} +\enlargethispage*{1cm} + \begin{docCommand}{newtcbinputlisting}{\oarg{init options}\brackets{\texttt{\textbackslash}\rmfamily\meta{name}}\oarg{number}\oarg{default}\marg{options}} Creates a new macro \texttt{\textbackslash}\meta{name} based on \refCom{tcbinputlisting}. - Basically, |\newtcbinputlisting| operates like |\newcommand|. + Basically, \refCom{newtcbinputlisting} operates like |\newcommand|. The new macro \texttt{\textbackslash}\meta{name} optionally takes \meta{number} arguments, where \meta{default} is the default value for the optional first argument. - The \meta{options} are given to the underlying |tcbinputlisting|. + 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}. @@ -319,6 +424,46 @@ This is my \LaTeX\ box. An existing macro is redefined. \end{docCommand} +\clearpage + +\begin{docCommand}{DeclareTCBInputListing}{\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, + the new command \texttt{\textbackslash}\meta{name} is constructed with the given argument \meta{specification}. + 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. + +\begin{dispExample} +% counter from previous example +\DeclareTCBInputListing[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} + +\mylisting[before upper=\textit{This is the included file content:}] + [blue]{\jobname.tcbtemp} +\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|. + 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|. + The command \texttt{\textbackslash}\meta{name} is only created if it is not already defined. +\end{docCommand} + + \clearpage \subsection{Option Keys of the \mylib{listings} Library}\label{sec:speclistingkeys} @@ -341,8 +486,8 @@ and in compiled form. Additionally, we use line numbers here. \begin{docTcbKey}{no listing options}{}{no value, initially unset} Abbreviation for |listing options={}|. This removes all options for the |listings| package. - This includes the |tcblisting| standard style |tcblatex| and the encoding presets. - Use this option, if you want to set the |listings| options outside of |tcblisting|, e.\,g.\ globally in + This includes the \refEnv{tcblisting} standard style |tcblatex| and the encoding presets. + Use this option, if you want to set the |listings| options outside of \refEnv{tcblisting}, e.\,g.\ globally in the preamble. \begin{dispExample} \begin{tcblisting}{no listing options} @@ -419,7 +564,7 @@ cd /usr/lib See further options in \Vref{sec:commonlistingkeys}. \begin{marker} -For an combined example of using |\lstinline| inside a |tcolorbox|, see +For an combined example of using |\lstinline| inside a \refEnv{tcolorbox}, see \refCom{DeclareTotalTCBox}. \end{marker} @@ -693,7 +838,7 @@ This is a \LaTeX\ example. \begin{docTcbKey}[][doc new=2014-11-14]{comment style}{=\meta{options}}{no default, initially empty} Sets the \meta{options} for \refKey{/tcb/tcbimage comment} and \refKey{/tcb/pdf comment}. - These are |tcolorbox| options to customize the colored box drawn around the + These are \refEnv{tcolorbox} options to customize the colored box drawn around the image(s), also image options encapsulated by \refKey{/tcb/graphics options}, and \refEnv{tcbraster} options for \refKey{/tcb/pdf comment}. \end{docTcbKey} @@ -755,10 +900,10 @@ This is a \LaTeX\ example. \begin{docTcbKey}{listing outside text}{}{no value} -Typesets the environment content side by side as listing in a |tcolorbox| +Typesets the environment content side by side as listing in a \refEnv{tcolorbox} and as compiled text outside the box in the right part of the page. Nevertheless, the outside text is treated as \emph{lower} part of the -|tcolorbox| and can be formatted with all lower part options. +\refEnv{tcolorbox} and can be formatted with all lower part options. The space partitioning is done with the side by side options from \Fullref{sec:sidebyside}. \begin{dispExample} @@ -771,10 +916,10 @@ This is a \LaTeX\ example. \clearpage \begin{docTcbKey}{text outside listing}{}{no value} -Typesets the environment content side by side as listing in a |tcolorbox| +Typesets the environment content side by side as listing in a \refEnv{tcolorbox} and as compiled text outside the box in the left part of the page. Nevertheless, the outside text is treated as \emph{lower} part of the -|tcolorbox| and can be formatted with all lower part options. +\refEnv{tcolorbox} and can be formatted with all lower part options. The space partitioning is done with the side by side options from \Fullref{sec:sidebyside}. \begin{dispExample} @@ -814,10 +959,10 @@ This is a \LaTeX\ example. \clearpage \begin{docTcbKey}{listing outside comment}{}{no value} -Typesets the environment content side by side as listing in a |tcolorbox| +Typesets the environment content side by side as listing in a \refEnv{tcolorbox} and a given comment outside the box in the right part of the page. Nevertheless, the outside text is treated as \emph{lower} part of the -|tcolorbox| and can be formatted with all lower part options. +\refEnv{tcolorbox} and can be formatted with all lower part options. The space partitioning is done with the side by side options from \Fullref{sec:sidebyside}. \begin{dispExample} @@ -830,10 +975,10 @@ This is a \LaTeX\ example. \begin{docTcbKey}{comment outside listing}{}{no value} -Typesets the environment content side by side as listing in a |tcolorbox| +Typesets the environment content side by side as listing in a \refEnv{tcolorbox} and a given comment outside the box in the left part of the page. Nevertheless, the outside text is treated as \emph{lower} part of the -|tcolorbox| and can be formatted with all lower part options. +\refEnv{tcolorbox} and can be formatted with all lower part options. The space partitioning is done with the side by side options from \Fullref{sec:sidebyside}. \begin{dispExample} @@ -847,10 +992,10 @@ This is a \LaTeX\ example. \begin{docTcbKey}{listing above text}{}{no value} - Typesets the environment content as listing in a |tcolorbox| + Typesets the environment content as listing in a \refEnv{tcolorbox} and as compiled text outside and below the box. The outside text is treated as \emph{lower} part of the - |tcolorbox| and can be formatted with all lower part options. + \refEnv{tcolorbox} and can be formatted with all lower part options. The distance between box and text is controlled by \refKey{/tcb/middle}. \begin{dispExample} \begin{tcblisting}{colback=red!5!white,colframe=red!75!black,listing above text} @@ -870,10 +1015,10 @@ This is a \LaTeX\ example. \clearpage \begin{docTcbKey}{text above listing}{}{no value} - Typesets the environment content as listing in a |tcolorbox| + Typesets the environment content as listing in a \refEnv{tcolorbox} and as compiled text outside and above the box. The outside text is treated as \emph{lower} part of the - |tcolorbox| and can be formatted with all lower part options. + \refEnv{tcolorbox} and can be formatted with all lower part options. The distance between box and text is controlled by \refKey{/tcb/middle}. \begin{dispExample} \begin{tcblisting}{colback=red!5!white,colframe=red!75!black,text above listing} @@ -893,10 +1038,10 @@ This is a \LaTeX\ example. \begin{docTcbKey}{listing above comment}{}{no value} - Typesets the environment content as listing in a |tcolorbox| + Typesets the environment content as listing in a \refEnv{tcolorbox} and a given comment outside and below the box. The outside text is treated as \emph{lower} part of the - |tcolorbox| and can be formatted with all lower part options. + \refEnv{tcolorbox} and can be formatted with all lower part options. The distance between box and comment is controlled by \refKey{/tcb/middle}. \begin{dispExample} \begin{tcblisting}{colback=red!5!white,colframe=red!75!black,listing above comment, @@ -917,10 +1062,10 @@ This is a \LaTeX\ example. \clearpage \begin{docTcbKey}{comment above listing}{}{no value} - Typesets the environment content as listing in a |tcolorbox| + Typesets the environment content as listing in a \refEnv{tcolorbox} and a given comment outside and above the box. The outside text is treated as \emph{lower} part of the - |tcolorbox| and can be formatted with all lower part options. + \refEnv{tcolorbox} and can be formatted with all lower part options. The distance between box and comment is controlled by \refKey{/tcb/middle}. \begin{dispExample} \begin{tcblisting}{colback=red!5!white,colframe=red!75!black,comment above listing, @@ -942,7 +1087,7 @@ This is a \LaTeX\ example. \clearpage \subsection{Option Keys for Processing and Full Document Examples}\label{sec:proclistingkeys} A complete \LaTeX\ document including |\documentclass|, |\begin{document}| -and |\end{document}| cannot be processed directly by |tcolorbox|. +and |\end{document}| cannot be processed directly by \refEnv{tcolorbox}. It always has to be compiled separately. There are two methods supported by the package to process and display such a full document example: \begin{itemize} diff --git a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.s_main.sty b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.s_main.sty index 4c4a85dce1b..6d9c15c834d 100644 --- a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.s_main.sty +++ b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.s_main.sty @@ -3,6 +3,10 @@ \renewcommand*\l@subsection{\@dottedtocline{2}{1.5em}{2.7em}} \renewcommand*\l@subsubsection{\@dottedtocline{3}{4.2em}{3.2em}} +% prevent hypdoc from loading (sets hyperindex=false) +\@namedef{ver@hypdoc.sty}{9999/12/31} +\@namedef{opt@hypdoc.sty}{hypdoc} + \RequirePackage[T1]{fontenc} \RequirePackage[utf8]{inputenc} \RequirePackage[english]{babel} diff --git a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.sidebyside.tex b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.sidebyside.tex index b01c299e0c3..4783b10bc06 100644 --- a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.sidebyside.tex +++ b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.sidebyside.tex @@ -245,12 +245,7 @@ methods from \Fullref{subsec:sidebyside_xparse}. \clearpage -\subsection{Advanced Settings from the \mylib{xparse} Library}\label{subsec:sidebyside_xparse} - -\begin{marker} -All following macros and options need the \mylib{xparse} library to be -loaded, see \Fullref{sec:xparse}. -\end{marker} +\subsection{Advanced Settings}\label{subsec:sidebyside_xparse} \begin{docCommand}[doc new=2015-11-20]{tcbsidebyside}{\oarg{options}\marg{left-handed content}\marg{right-handed content}} diff --git a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.skincatalog.tex b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.skincatalog.tex index 5e039aee63a..ece3b4bc351 100644 --- a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.skincatalog.tex +++ b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.skincatalog.tex @@ -633,7 +633,7 @@ git commit -am 'changes to my example' \begin{tcolorbox}[bicolor, frame style={preaction={fill=blue!50!black}, pattern=checkerboard,pattern color=blue!50!gray}, - fonttitle=\bfseries, + fonttitle=\bfseries, overlaplower=0mm, colback=blue!10, colbacklower=white, opacitybacklower=0.65, title={Example for a semilucent lower part}] This is the upper part. @@ -644,6 +644,49 @@ And that is the lower part. \clearpage +\begin{docTcbKey}[][doc new=2022-01-11]{overlaplower}{=\meta{length}}{no default, initially \texttt{0.1mm}} + The backgrounds of the lower parts for the skin families \enquote{bicolor}, \enquote{tile}, and \enquote{beamer} + are drawn differently than the backgrounds of the upper parts. If the distance between these + backgrounds of upper and lower parts is |0pt|, some previewers show the + frame color as thin line between upper and lower part. To avoid this glitch, + the lower part is drawn with an overlap of \meta{length} over the upper part.\par + This value can be adapted for special applications. For example, + semilucent lower parts better use |0pt|, see \refKey{/tcb/opacitybacklower}. + Also see \refCom{tcboverlaplower} for using a larger value. +\end{docTcbKey} + + +\begin{docCommand}[doc new=2022-01-11]{tcboverlaplower}{} + Macro which contains the length value set by \refKey{/tcb/overlaplower}. + May be used for fine positioning at the segmentation between upper and + lower part and should be seen \emph{read-only}. + +\begin{dispExample} +\begin{tcolorbox}[bicolor, sharp corners, + colframe=blue!50!black, colback=blue!10, colbacklower=red!10, + top=5mm, bottom=2mm, middle=3.5mm, overlaplower=1.5mm, + underlay={ + \node[minimum width=1cm,minimum height=0.5cm,outer sep=auto, + anchor=north east,fill=white] at (interior.north east) + {\itshape\small upper}; + \node[minimum width=1cm,minimum height=0.5cm,outer sep=auto, + anchor=north east,fill=white] + at ([yshift=\tcboverlaplower]segmentation.east) + {\itshape\small lower}; + } + ] +This is the upper part. +\tcblower +And that is the lower part. +\end{tcolorbox} +\end{dispExample} + +\end{docCommand} + + + +\clearpage + \begin{docSkin}{bicolorfirst} This is a flavor of \refSkin{bicolor} which is used as a \emph{first} part in a break sequence for \refSkin{bicolor}. diff --git a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.technical.tex b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.technical.tex index 21e8153de40..9b1155ddc5a 100644 --- a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.technical.tex +++ b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.technical.tex @@ -748,7 +748,7 @@ considered to be \textit{read-only} and should never be redefined by the user. \begin{docCommand}[doc new=2017-04-25]{tcbsegmentstate}{} - This macro contains |0|, |1|, or |2|. Itis set for every unbroken box and every broken partial box + This macro contains |0|, |1|, or |2|. It is set for every unbroken box and every broken partial box with the following meaning: \begin{itemize} \item\docValue{0}: The current (partial) box contains only an upper part. diff --git a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.xparse.tex b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.xparse.tex index 43b623d6ca1..280d91bd560 100644 --- a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.xparse.tex +++ b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.xparse.tex @@ -7,635 +7,14 @@ The library is loaded by a package option or inside the preamble by: \begin{dispListing} \tcbuselibrary{xparse} \end{dispListing} -This also loads the package |xparse| \cite{latexproject:xparse}. +This loads the package |xparse| \cite{latexproject:xparse}. -The purpose of this library is to give comfortable access to the -powerful document command production with |xparse| for |tcolorbox|. -See the |xparse| package documentation \cite{latexproject:xparse} -for details about the argument \meta{specification} used in this section. +Note that up to version 5.0.2 this library contained code which +needed the |xparse| package. Since nowadays this package has become +basically a part of the \LaTeX\ kernel, the code of the library was +migrated to other parts of the |tcolorbox| package. So, the remaining +library is nearly a stub which only loads |xparse|. -%\subsection{Producing Document Commands With \texttt{xparse}} - - -\subsection{Option Keys}\label{subsec:xparse_options} - -\begin{docTcbKey}{verbatim}{}{style, no value} - Sets options for a \textit{verbatim} style \refCom{tcbox}. - Since the indented boxes may contain only very few words, the - dimensions are made smaller and \refKey{/tcb/nobeforeafter} - and \refKey{/tcb/tcbox raise base} are set. -\begin{dispExample*}{sbs,lefthand ratio=0.6} -\DeclareTotalTCBox{\myverb}{ v }{verbatim, - colframe=red!75!black,colupper=blue}{#1} - -\myverb{\textbf} is a \myverb{\LaTeX} command. -\end{dispExample*} -\end{docTcbKey} - - -\begin{docTcbKeys}[doc description = {no default}] - { - { - doc name = IfNoValueTF, - doc parameter = {=\marg{argument}\marg{true options}\marg{false options}}, - }, - { - doc name = IfNoValueT, - doc parameter = {=\marg{argument}\marg{true options}}, - doc new = 2020-09-16, - }, - { - doc name = IfNoValueF, - doc parameter = {=\marg{argument}\marg{false options}}, - doc new = 2020-09-16, - } - } - Wraps the |\IfNoValue(TF)| command(s) of |xparse| for option setting. - If the \meta{argument} has no value, the \meta{true options} are set. - Otherwise, the \meta{false options} are set. -\begin{dispExample} -\DeclareTColorBox{mybox}{ o }{colframe=red!75!black, - IfNoValueTF={#1}{colback=red!5!white}{enhanced,interior style image=#1}} - -\begin{mybox} -This is a tcolorbox. -\end{mybox} - -\begin{mybox}[goldshade.png] -This is a tcolorbox. -\end{mybox} -\end{dispExample} -\end{docTcbKeys} - -\clearpage - - -\begin{docTcbKeys}[doc description = {no default}] - { - { - doc name = IfValueTF, - doc parameter = {=\marg{argument}\marg{true options}\marg{false options}}, - }, - { - doc name = IfValueT, - doc parameter = {=\marg{argument}\marg{true options}}, - doc new = 2020-09-16, - }, - { - doc name = IfValueF, - doc parameter = {=\marg{argument}\marg{false options}}, - doc new = 2020-09-16, - } - } - Wraps the |\IfValue(TF)| command(s) of |xparse| for option setting. - If the \meta{argument} has a value, the \meta{true options} are set. - Otherwise, the \meta{false options} are set. -\begin{dispExample} -\DeclareTColorBox{mybox}{ o }{colframe=red!75!black,colback=red!5!white, - IfValueT={#1}{title={\flqq #1\frqq},fonttitle=\bfseries}} - -\begin{mybox} -This is a tcolorbox. -\end{mybox} - -\begin{mybox}[My title] -This is a tcolorbox. -\end{mybox} -\end{dispExample} -\end{docTcbKeys} - -\medskip - -\begin{docTcbKeys}[doc description = {no default}] - { - { - doc name = IfBooleanTF, - doc parameter = {=\marg{argument}\marg{true options}\marg{false options}}, - }, - { - doc name = IfBooleanT, - doc parameter = {=\marg{argument}\marg{true options}}, - doc new = 2020-09-16, - }, - { - doc name = IfBooleanF, - doc parameter = {=\marg{argument}\marg{false options}}, - doc new = 2020-09-16, - } - } - Wraps the |\IfBoolean(TF)| command(s) of |xparse| for option setting. - If the \meta{argument} is |\BooleanTrue|, the \meta{true options} are set. - If the \meta{argument} is |\BooleanFalse|, the \meta{false options} are set. - -\begin{dispExample} -\DeclareTColorBox{mybox}{ s }{colframe=red!75!black, - IfBooleanTF={#1}{colback=yellow!50!red}{colback=red!5!white}} - -\begin{mybox} -This is a tcolorbox. -\end{mybox} - -\begin{mybox}* -This is a tcolorbox. -\end{mybox} -\end{dispExample} -\end{docTcbKeys} - - - -\clearpage -\subsection{Producing \texttt{tcolorbox} Environments and Commands}\label{subsec:xparse_tcolorbox} - -\begin{docCommand}{DeclareTColorBox}{\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, - the new environment \meta{name} is constructed with the given argument \meta{specification}. - 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. - -\begin{dispExample} -% counter from previous example -\DeclareTColorBox[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} - -\begin{mybox}{My title} -This is a tcolorbox. -\end{mybox} - -\begin{mybox}[blue]{My title} -This is a tcolorbox. -\end{mybox} - -\begin{mybox}[green]{My title}"My Watermark" -This is a tcolorbox. -\end{mybox} - -\begin{mybox}[yellow]{My title}[colbacktitle=yellow!50!white,coltitle=black] -This is a tcolorbox. -\end{mybox} - -\begin{mybox}[purple]{My title}"All together"[coltitle=yellow] -This is a tcolorbox. -\end{mybox} -\end{dispExample} -\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|. - 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|. - The environment \meta{name} is only created if it is not already defined. -\end{docCommand} - - -\clearpage - -\begin{docCommand}{DeclareTotalTColorBox}{\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, - the new command \texttt{\textbackslash}\meta{name} is constructed with the given argument \meta{specification}. - 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.\\ - 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. - -\begin{dispExample} -\DeclareTotalTColorBox{\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} - { \tikz\path[fill zoom image={#2}] (0,0) rectangle (\linewidth,4cm);% - \tcblower#3} - -\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|. - 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|. - The command \texttt{\textbackslash}\meta{name} is only created if it is not already defined. -\end{docCommand} - - -\clearpage -\subsection{Producing \texttt{tcbox} Commands}\label{subsec:xparse_tcbox} - - -\begin{docCommand}{DeclareTCBox}{\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, - the new command \texttt{\textbackslash}\meta{name} is constructed with the given argument \meta{specification}. - 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. - -\begin{dispExample} -% counter from previous example -\DeclareTCBox[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}, - IfBooleanT={#3}{colbacktitle=red!50!white} } - -\mybox{Bird}{This is my first box.} - \hfill -\mybox*{Tree}{This is my second box.} - \par\bigskip -\mybox{Bike}*{This is my third box.} - \hfill -\mybox*{City}*{This is my fourth box.} -\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|. - 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|. - The command \texttt{\textbackslash}\meta{name} is only created if it is not already defined. -\end{docCommand} - - - -\clearpage - -\begin{docCommand}{DeclareTotalTCBox}{\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, - the new command \texttt{\textbackslash}\meta{name} is constructed with the given argument \meta{specification}. - 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. - -\begin{dispExample} -\DeclareTotalTCBox{\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, - colback=#1!10!white,colframe=#1!50!black,#3}{#2} - -To set a word \textbf{bold} in \myverb{\LaTeX}, use -\myverb[green]{\textbf{bold}}. Alternatively, write -\myverb[yellow]{{\bfseries bold}}. -In \myverb[blue]{\LaTeX}[enhanced,fuzzy halo], other font settings are -done in the same way, e.\,g. \myverb{\textit}, \myverb{\itshape}\\ -or \myverb[brown]{\texttt}, \myverb[brown]{\ttfamily}. -\end{dispExample} - -The next example uses |\lstinline| from the |listings| package to -typeset the verbatim content. - -\begin{dispExample} -% \usepackage{listings} or \tcbuselibrary{listings} -\DeclareTotalTCBox{\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^} - -\commandbox*{cd "My Documents"} changes to directory \commandbox{My Documents}. - -\commandbox*{dir /A} lists the directory content. - -\commandbox*{copy example.txt d:\target} copies \commandbox{example.txt} to - \commandbox{d:\target}. -\end{dispExample} -\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|. - 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|. - The command \texttt{\textbackslash}\meta{name} is only created if it is not already defined. -\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 - \meta{verbatim box content}. - The underlying \refCom{tcbox} is styled with - \refKey{/tcb/verbatim} plus the given \meta{options}. - The difference to \refCom{tcbox} is that the \meta{verbatim box content} is - interpreted \textit{verbatim}. Therefore, |\tcboxverb| acts similar to |\verb|. - -\begin{dispExample} -\tcboxverb{\LaTeX}, \tcboxverb[colback=blue!10!white,colupper=blue]{\LaTeX}, -\tcboxverb[blank,fuzzy halo]{\LaTeX}, \tcboxverb[beamer]{\LaTeX}, -\tcboxverb[enhanced,skin=enhancedmiddle jigsaw,colframe=red]{\LaTeX}. -\end{dispExample} -\end{docCommand} - - - - -\clearpage -\subsection{Producing \texttt{tcblisting} Environments}\label{subsec:xparse_listing} -\begin{marker} -Besides \mylib{xparse}, the following commands also need the \mylib{listings} library to be included. -\end{marker} - -\begin{docCommand}{DeclareTCBListing}{\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, - the new environment \meta{name} is constructed with the given argument \meta{specification}. - 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. - -\begin{dispExample*}{sbs,lefthand ratio=0.5} -\DeclareTCBListing{mybox}{ s O{} m }{% - colback=red!5!white, - colframe=red!75!black, - fonttitle=\bfseries, - IfBooleanTF={#1} - {listing side text} - {text side listing}, - title={#3},#2} - -\begin{mybox}{Listing Box} -This is my -\LaTeX\ box. -\end{mybox} -\bigskip - -\begin{mybox}*{Listing Box} -This is my -\LaTeX\ box. -\end{mybox} -\bigskip - -\begin{mybox}[colback=yellow] - {Listing Box} -This is my -\LaTeX\ box. -\end{mybox} -\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|. - 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|. - The environment \meta{name} is only created if it is not already defined. -\end{docCommand} - -\clearpage - - -\begin{marker} -With date of 2018-05-12, the |xparse| \cite{latexproject:xparse} package -changed the argument collection process. -Now, spaces are ignored which leads to a serious change for listing environments -ending with an optional argument like \verb+O{}+. -The former behavior of respecting spaces can be preserved by adding a \flqq\verb+!+\frqq. -Note that the following code uses \verb+!O{}+ now. -\begin{itemize} -\item For older |xparse| versions, the following code is correct when using \verb+O{}+. -\item For |xparse| of 2018-05-12, only the first two examples of - the following code using \verb+O{}+ are really \flqq good\frqq\ -- all others do not work. -\item For |xparse| of 2018-05-12 and later, the following code is correct when using \verb+!O{}+. -\end{itemize} -\end{marker} - - - - - -\begin{dispListing*}{title={Caveats of using an environment ending with an - optional argument},fonttitle=\bfseries} -\DeclareTCBListing{mybox}{ !O{} }{listing only,#1} - -\begin{mybox}[colframe=red] -\good -\end{mybox} - -\begin{mybox}[colframe=red]\good\end{mybox} - -\begin{mybox} -\good -\end{mybox} - -\begin{mybox} \good\end{mybox} - -\begin{mybox}\bad!\end{mybox} - -\begin{mybox} -[\good] -\end{mybox} - -\begin{mybox} [\good]\end{mybox} - -\begin{mybox}[\bad!]\end{mybox} -\end{dispListing*} - -\clearpage -\subsection{Producing \texttt{tcbinputlisting} Commands}\label{subsec:xparse_inputlisting} -\begin{marker} -The following commands need the \mylib{listings} library to be included. -\end{marker} - - -\begin{docCommand}{DeclareTCBInputListing}{\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, - the new command \texttt{\textbackslash}\meta{name} is constructed with the given argument \meta{specification}. - 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. - -\begin{dispExample} -% counter from previous example -\DeclareTCBInputListing[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} - -\mylisting[before upper=\textit{This is the included file content:}] - [blue]{\jobname.tcbtemp} -\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|. - 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|. - The command \texttt{\textbackslash}\meta{name} is only created if it is not already defined. -\end{docCommand} - - -\clearpage -\subsection{Producing \texttt{tboxfit} Commands}\label{subsec:xparse_tcboxfit} -\begin{marker} -The following commands need the \mylib{fitting} library to be included. -\end{marker} - -\begin{docCommand}{DeclareTCBoxFit}{\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, - the new command \texttt{\textbackslash}\meta{name} is constructed with the given argument \meta{specification}. - 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. - -\begin{dispExample*}{sbs,lefthand ratio=0.6} -% \usepackage{lipsum} - -\DeclareTCBoxFit{\mybox}{ O{} m !o } - {colback=red!5!white, - colframe=red!75!black, - width=#2,height=#2/3*2, - IfValueT={#3}{height=#3}, - #1} - -\mybox[colback=yellow]{5cm}% - {\lipsum[2]} - -\mybox[colback=yellow]{5cm}[4cm]{\lipsum[2]} -\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|. - 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|. - The command \texttt{\textbackslash}\meta{name} is only created if it is not already defined. -\end{docCommand} - -\clearpage - -\begin{docCommand}{DeclareTotalTCBoxFit}{\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, - the new command \texttt{\textbackslash}\meta{name} is constructed with the given argument \meta{specification}. - 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. - -\begin{dispExample} -% \usepackage{lipsum} - -\DeclareTotalTCBoxFit{\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} } - -\multibox{5cm}{I shall not repeat.} -\multibox[colframe=blue!75!white]{5cm}[20]{I shall not repeat.}\\ -\multibox[colback=yellow,height=5cm]{14cm}[100]{I shall not repeat.} -\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|. - 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|. - The command \texttt{\textbackslash}\meta{name} is only created if it is not already defined. -\end{docCommand} +Instead of including the |xparse| library, it is recommended to include the +|xparse| package directly, \textbf{if really needed} (the \LaTeX\ kernel contains +essentially everything needed). The library is kept for compatibility. diff --git a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.pdf b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.pdf Binary files differindex 5d613e89a51..b93a509ec46 100644 --- a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.pdf +++ b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.pdf diff --git a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.tex b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.tex index 2287a74e470..13d9a0bc892 100644 --- a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.tex +++ b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.tex @@ -1,9 +1,9 @@ % \LaTeX-Main\ -%% The LaTeX package tcolorbox - version 5.0.2 (2022/01/07) +%% The LaTeX package tcolorbox - version 5.1.0 (2022/06/22) %% tcolorbox.tex: Manual %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2006-2021 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> +%% Copyright (c) 2006-2022 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> %% ------------------------------------------------------------------------------------------- %% %% This work may be distributed and/or modified under the @@ -25,9 +25,10 @@ % arara: pdflatex: { shell: yes, synctex: yes } % arara: pdflatex: { shell: yes, synctex: yes } % -\PassOptionsToPackage{pdftex,bookmarks,raiselinks,pageanchor,hyperindex,colorlinks}{hyperref} +\PassOptionsToPackage{pdftex,bookmarks,raiselinks,pageanchor,hyperindex,colorlinks,pdfusetitle,pdfpagelabels}{hyperref} \documentclass[a4paper,11pt]{ltxdoc} + \usepackage{tcolorbox.doc.s_main} \tcbEXTERNALIZE \usepackage{tcolorbox.doc.s_snippet} @@ -35,8 +36,8 @@ \tcbAUXmkdir{external} \tcbAUXmkdir{solutions} -\RequirePackage{csquotes} -\RequirePackage[style=numeric-comp,sorting=nyt, +%\usepackage{csquotes} +\usepackage[style=numeric-comp,sorting=nyt, maxnames=8,minnames=8,abbreviate=false,backend=biber, bibencoding=latin1,texencoding=ascii]{biblatex} \DeclareFieldFormat{url}{\newline\url{#1}}% @@ -44,8 +45,8 @@ \setlength{\bibitemsep}{\smallskipamount} \addbibresource{tcolorbox.doc.bib} -\def\version{5.0.2}% -\def\datum{2022/01/07}% +\def\version{5.1.0}% +\def\datum{2022/06/22}% \makeindex \hypersetup{ @@ -63,7 +64,7 @@ %\geometry{showframe} %\tcbset{draftmode} \tcbset{/tcb/external/-}% for final run -%\includeonly{tcolorbox.doc.listings} +%\includeonly{tcolorbox.doc.fitting,tcolorbox.doc.index} %\hypersetup{colorlinks=false} |