summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2023-03-12 20:33:41 +0000
committerKarl Berry <karl@freefriends.org>2023-03-12 20:33:41 +0000
commit6d83acd4e86e9bd62ece4a16bfec1b8d53ebb925 (patch)
treecde00e8f7f9b786d884084a824cac954631ee31b
parentd1bb8c130941b9caa8309ab10aa56652e4f2af83 (diff)
caption (12mar23)
git-svn-id: svn://tug.org/texlive/trunk@66580 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/caption/CHANGELOG8
-rw-r--r--Master/texmf-dist/doc/latex/caption/README8
-rw-r--r--Master/texmf-dist/doc/latex/caption/bicaption.pdfbin150784 -> 181717 bytes
-rw-r--r--Master/texmf-dist/doc/latex/caption/subcaption.pdfbin221744 -> 256023 bytes
-rw-r--r--Master/texmf-dist/source/latex/caption/bicaption.dtx198
-rw-r--r--Master/texmf-dist/source/latex/caption/caption-ams-smf.dtx8
-rw-r--r--Master/texmf-dist/source/latex/caption/caption-beamer.dtx6
-rw-r--r--Master/texmf-dist/source/latex/caption/caption-elsarticle.dtx8
-rw-r--r--Master/texmf-dist/source/latex/caption/caption-koma.dtx90
-rw-r--r--Master/texmf-dist/source/latex/caption/caption-memoir.dtx8
-rw-r--r--Master/texmf-dist/source/latex/caption/caption-ntg.dtx8
-rw-r--r--Master/texmf-dist/source/latex/caption/caption-thesis.dtx8
-rw-r--r--Master/texmf-dist/source/latex/caption/caption.dtx479
-rw-r--r--Master/texmf-dist/source/latex/caption/caption.ins2
-rw-r--r--Master/texmf-dist/source/latex/caption/caption3.dtx162
-rw-r--r--Master/texmf-dist/source/latex/caption/fallback/v3.0/caption.dtx16
-rw-r--r--Master/texmf-dist/source/latex/caption/fallback/v3.1/caption.dtx14
-rw-r--r--Master/texmf-dist/source/latex/caption/fallback/v3.2/caption.dtx14
-rw-r--r--Master/texmf-dist/source/latex/caption/fallback/v3.3/caption.dtx14
-rw-r--r--Master/texmf-dist/source/latex/caption/fallback/v3.3/caption3.dtx21
-rw-r--r--Master/texmf-dist/source/latex/caption/fallback/v3.4/caption.dtx13
-rw-r--r--Master/texmf-dist/source/latex/caption/fallback/v3.4/caption3.dtx34
-rw-r--r--Master/texmf-dist/source/latex/caption/fallback/v3.5/caption.dtx14
-rw-r--r--Master/texmf-dist/source/latex/caption/fallback/v3.5/caption3.dtx34
-rw-r--r--Master/texmf-dist/source/latex/caption/subcaption.dtx325
-rw-r--r--Master/texmf-dist/tex/latex/caption/bicaption.sty35
-rw-r--r--Master/texmf-dist/tex/latex/caption/caption-koma.sto16
-rw-r--r--Master/texmf-dist/tex/latex/caption/caption.sty228
-rw-r--r--Master/texmf-dist/tex/latex/caption/caption3.sty101
-rw-r--r--Master/texmf-dist/tex/latex/caption/caption3_2019-09-01.sty16
-rw-r--r--Master/texmf-dist/tex/latex/caption/caption3_2020-07-29.sty26
-rw-r--r--Master/texmf-dist/tex/latex/caption/caption3_2020-10-26.sty26
-rw-r--r--Master/texmf-dist/tex/latex/caption/caption_2007-04-16.sty4
-rw-r--r--Master/texmf-dist/tex/latex/caption/caption_2010-01-09.sty5
-rw-r--r--Master/texmf-dist/tex/latex/caption/caption_2011-11-10.sty5
-rw-r--r--Master/texmf-dist/tex/latex/caption/caption_2019-09-01.sty5
-rw-r--r--Master/texmf-dist/tex/latex/caption/caption_2020-07-29.sty5
-rw-r--r--Master/texmf-dist/tex/latex/caption/caption_2020-10-26.sty5
-rw-r--r--Master/texmf-dist/tex/latex/caption/subcaption.sty93
39 files changed, 1251 insertions, 811 deletions
diff --git a/Master/texmf-dist/doc/latex/caption/CHANGELOG b/Master/texmf-dist/doc/latex/caption/CHANGELOG
index a3d2d4baf29..c4d90ce7b85 100644
--- a/Master/texmf-dist/doc/latex/caption/CHANGELOG
+++ b/Master/texmf-dist/doc/latex/caption/CHANGELOG
@@ -170,6 +170,9 @@ v1.4 (2020/12/25)
v1.5 (2021/01/04)
- Support of the listings package added
+v1.6 (2023/02/19)
+- Command \bicaptionsetup added
+
ltcaption package
-----------------
@@ -216,3 +219,8 @@ v1.5 (2022/01/07)
- New environments subcaptiongroup and subcaptionblock
- New command \subcaptionlistentry to make an entry into the list of figures resp. tables
- New command \subcaptiontext to typeset a sub-caption without counter increment and list entry
+- Default value of the optional argument <outer-pos> changed from `c' to either `b' or `t'
+
+v1.6 (2023/02/19)
+- New command \subcaptionsetup to set options specifically for sub-captions
+- Counter ownership revised
diff --git a/Master/texmf-dist/doc/latex/caption/README b/Master/texmf-dist/doc/latex/caption/README
index a14b3742e5a..f6d549608f3 100644
--- a/Master/texmf-dist/doc/latex/caption/README
+++ b/Master/texmf-dist/doc/latex/caption/README
@@ -1,8 +1,8 @@
==========================================================================
The `caption' package bundle
-Release 2022-03-17
-Copyright (C) 1994-2022 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
+Release 2023-03-12
+Copyright (C) 1994-2023 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
License: LPPL = LaTeX Project Public Licence
Maintenance Status: maintained (by Axel Sommerfeldt)
@@ -47,7 +47,7 @@ https://gitlab.com/axelsommerfeldt/caption/-/tree/master/doc/outdated
--------------------------------------------------------------------------
-The `bicaption' package v1.5 supports typesetting of bilingual captions.
+The `bicaption' package v1.6 supports typesetting of bilingual captions.
User Manual: bicaption.pdf (English)
@@ -66,7 +66,7 @@ User Manual: ltcaption.pdf (English)
--------------------------------------------------------------------------
-The `subcaption' package v1.5 supports typesetting of sub-captions
+The `subcaption' package v1.6 supports typesetting of sub-captions
(by using the the sub-caption feature of the `caption' package).
User Manual: subcaption.pdf (English)
diff --git a/Master/texmf-dist/doc/latex/caption/bicaption.pdf b/Master/texmf-dist/doc/latex/caption/bicaption.pdf
index 4e6d3efaab8..67a6ac65d78 100644
--- a/Master/texmf-dist/doc/latex/caption/bicaption.pdf
+++ b/Master/texmf-dist/doc/latex/caption/bicaption.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/caption/subcaption.pdf b/Master/texmf-dist/doc/latex/caption/subcaption.pdf
index 745e7ae9480..a3039a091cd 100644
--- a/Master/texmf-dist/doc/latex/caption/subcaption.pdf
+++ b/Master/texmf-dist/doc/latex/caption/subcaption.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/caption/bicaption.dtx b/Master/texmf-dist/source/latex/caption/bicaption.dtx
index 8d51567a6cb..9ec9753ca0c 100644
--- a/Master/texmf-dist/source/latex/caption/bicaption.dtx
+++ b/Master/texmf-dist/source/latex/caption/bicaption.dtx
@@ -2,7 +2,7 @@
%
% This is file `bicaption.dtx'.
%
-% Copyright (C) 2010-2022 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
+% Copyright (C) 2010-2023 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
%
% --------------------------------------------------------------------------
%
@@ -31,12 +31,12 @@
%
% \fi
%
-% \CheckSum{626}
+% \CheckSum{642}
%
% \iffalse
%<*driver>
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesFile{bicaption.drv}[2022/03/06 v1.5 Adds a bilingual caption feature to the caption package]
+\ProvidesFile{bicaption.drv}[2023/03/11 v1.6 Adds a bilingual caption feature to the caption package]
\hbadness=9999 \newcount\hbadness \hfuzz=74pt % Make TeX shut up.
%\errorcontextlines=3
%
@@ -62,8 +62,8 @@
\ifpdf\usepackage{hypdestopt}\fi
\hypersetup{pdfkeywords={LaTeX, package, bicaption},pdfstartpage={},pdfstartview={}}
%
-\usepackage{bicaption}[2016/03/27]
-\usepackage{subcaption}[2016/02/21]
+\usepackage{bicaption}[2023/02/19]
+\usepackage{subcaption}[2023/02/19]
%
\newcommand*\purerm[1]{{\upshape\mdseries\rmfamily #1}}
\newcommand*\puresf[1]{{\upshape\mdseries\sffamily #1}}
@@ -143,8 +143,7 @@
% |\usepackage|\oarg{options}|{bicaption}|\quad.
% \end{quote}
% The options for \thispackage\ are the same ones as for the \package{caption}
-% package and specify settings which are used for the second language
-% \emph{additionally}.
+% package and specify settings which are used for the second language \emph{additionally}.
% In fact
% \begin{quote}
% |\usepackage|\oarg{options}|{bicaption}|
@@ -152,44 +151,41 @@
% is identical to
% \begin{quote}
% |\usepackage{bicaption}|\\
-% |\captionsetup[bi-second]|\marg{options}\quad.
+% |\bicaptionsetup{}|\marg{options}\quad.
% \end{quote}
%
% When used with the \package{babel} or \package{polyglossia} package, the
% \package{bicaption} package should be loaded \emph{after} it, so the main
% language will be set automatically. See \autoref{sec:babel} for details.
%
+% \pagebreak[3]
% \section{Setting options}
% \label{sec:options}
%
-% \DescribeMacro\captionsetup
-% The command
-% \begin{quote}
-% |\captionsetup[bi]|\marg{options}
-% \end{quote}
-% does setup options which will be used for bilanguage captions \emph{additionally}
-% to the ones which are setup for the specific floating environment.
+% \DescribeMacro\bicaptionsetup
+% \NEWfeature*{v1.6}
+% The |\bicaptionsetup| command sets options specifically for bilingual captions.
%
% \begin{quote}
-% |\captionsetup[bi-first]|\marg{options}
+% |\bicaptionsetup|\marg{options for 1st language}\marg{options for 2nd language}
% \end{quote}
-% does setup options which will be used for the \emph{first} heading
-% of the bilanguage captions \emph{additionally}
-% to the ones which are setup for the specific floating environment
-% and the ones which are setup by |\captionsetup[bi]{|\ldots|}|.
+% sets options which will be used for the first resp.\ second heading
+% of the bilingual captions \emph{additionally} to the ones which are setup for the
+% specific floating environment.
%
+% \medskip
+%
+% To limit bilingual options to specific environments one can use
+% an optional argument for |\bi|\-|caption|\-|setup|, e.g.:
% \begin{quote}
-% |\captionsetup[bi-second]|\marg{options}
+% |\bicaptionsetup[figure]{|\ldots|}{|\ldots|}|
% \end{quote}
-% does setup options which will be used for the \emph{second} heading
-% of the bilanguage captions \emph{additionally}
-% to the ones which are setup for the specific floating environment
-% and the ones which are setup by |\captionsetup[bi]{|\ldots|}|.
+% will limit the settings to the bilingual headings of |figure| environments only.
%
% \bigskip
%
% Options specified with |\use|\-|package[|\ldots|]{bi|\-|cap|\-|tion}| and
-% |\cap|\-|tion|\-|setup[bi|\ldots|]{|\ldots|}| will override the ones specified by
+% |\bi|\-|cap|\-|tion|\-|setup{|\ldots|}{|\ldots|}| will override the ones specified by
% |\cap|\-|tion|\-|setup{|\ldots|}| and |\cap|\-|tion|\-|setup[fig|\-|ure]{|\ldots|}|
% (same for `table'). So finally we have the following order how
% settings for bilingual captions are applied:
@@ -200,12 +196,10 @@
% {\small(|\captionsetup[figure|\emph{ -or- }|table]{|\ldots|}|)}
% \item Local settings
% {\small(|\captionsetup{|\ldots|}| inside |figure| or |table| environment)}
-% \item Custom `bi' settings
-% {\small(|\captionsetup[bi]{|\ldots|}|)}
-% \item Custom `bi-first' resp.~`bi-second' settings
-% {\small(|\usepackage[|\ldots|]{bicaption}| and
-% |\caption|\-|setup[bi-first]{|\ldots|}|
-% resp.~|\caption|\-|setup[bi-second]{|\ldots|}|)}
+% \item Custom bilingual settings
+% {\small(|\usepackage[|\ldots|]{bicaption}| and |\bicaptionsetup{|\ldots|}{|\ldots|}|)}
+% \item Environmental bilingual settings
+% {\small(|\bicaptionsetup[figure|\emph{ -or- }|table]{|\ldots|}{|\ldots|}|)}
% \end{enumerate}
% An example:
% \begin{quote}
@@ -219,17 +213,29 @@
% |labelsep=quad,indention=10pt,position=top,labelfont=bf|~.
% \end{quote}
%
-% \bigskip
-%
-% To limit |bi|, |bi-first|, or |bi-second| options to specific environments one can use
-% multiple optional arguments for |\caption|\-|setup|, e.g.:
+% \begin{background}
+% Internally the |\bi|\-|caption|\-|setup| uses the |\caption|\-|setup| command, i.e.
+% \begin{quote}
+% |\bicaptionsetup|\marg{options for 1st language}\marg{options for 2nd language}
+% \end{quote}
+% is identical to
+% \begin{quote}
+% |\captionsetup[bi-first]|\marg{options for 1st language}\\
+% |\captionsetup[bi-second]|\marg{options for 2nd language}
+% \end{quote}
+% and
+% \begin{quote}
+% |\bicaptionsetup[figure]{|\ldots|}{|\ldots|}|
+% \end{quote}
+% is identical to
% \begin{quote}
-% |\captionsetup[figure][bi-first]|\oarg{options}
+% |\captionsetup[figure][bi-first]{|\ldots|}|\\
+% |\captionsetup[figure][bi-second]{|\ldots|}| \quad .
% \end{quote}
-% will limit the settings to the first heading of |figure| environments only.
-% Please note that the environment name (|figure|, |table|, \ldots) has to be specified
-% as first optional argument while the bilingual selection (|bi|, |bi-first|, or |bi-second|)
-% as second one.
+% Prior to \version{1.6} of this package this was the way options had to be specified.
+% This still works (and will continue to work in the future), but is not recommended,
+% |\bi|\-|caption|\-|setup| should be used instead.
+% \end{background}
%
% \section{Additional options}
% \label{sec:additional-options}
@@ -307,6 +313,12 @@
% |\Declare|\-|Caption|\-|Font{normal|\-|size}{|\ldots|}|
% \end{Options}
%
+% \emph{Important:}
+% All options starting with `bi-' must be applied using |\caption|\-|setup| and
+% \emph{NOT} using |\bi|\-|caption|\-|setup|.
+% This is because they do not alter the setting of the caption for the 1st or 2nd language specifically,
+% but instead alter the behaviour how bilingual captions are set in general.
+%
% \section{The \cs{bicaption} commands}
% \label{sec:bicaption}
%
@@ -319,6 +331,8 @@
% \end{quote}
% The |\label| should be placed either after this command, or inside the first heading.
%
+% \medskip
+%
% \DescribeMacro\bicaptionbox
% Bilingual caption boxes will be typeset by
% \begin{quote}
@@ -347,6 +361,12 @@
% \begin{quote}
% |\usepackage[lang=english,|\ldots|,list=off]{bicaption}|
% \end{quote}
+% or
+% \begin{quote}
+% |\usepackage[|\ldots|]{bicaption}|\\
+% \ldots\\
+% |\bicaptionsetup{}{list=off}|
+% \end{quote}
%
% \pagebreak[3]
% \DescribeMacro{listtype+=}
@@ -415,7 +435,7 @@
% |% "english", and list type "figure2" resp. "table2"|\\
% |\usepackage[lang=english,listtype+=2]{bicaption}|\\
% ||\\
-% |% We load the titletoc package for customizing lists|\\
+% |% We load the titletoc package for customising lists|\\
% |% Note: Loading titletoc should be done prior|\\
% |% defining additional floating environments with|\\
% |% \DeclareFloatingEnvironment|\\
@@ -429,7 +449,7 @@
% |% Use the same file extension as for "table" (.lot) here|\\
% |\DeclareFloatingEnvironment[fileext=lot]{table2}|\\
% ||\\
-% |% We use the titletoc package for customizing "figure2"|\\
+% |% We use the titletoc package for customising "figure2"|\\
% |% which is appropriate for the second language captions|\\
% \iffalse
% |\contentsuse{figure2}{lof}|\\
@@ -600,7 +620,7 @@
% For internal implementation reasons the selection of language will be done delayed,
% i.e.~not done immediately at |lang=|\meta{language}. So if you do
% \begin{quote}
-% |\captionsetup[bi-second]{lang=ngerman,labelsep=quad}|
+% |\bicaptionsetup{}{lang=ngerman,labelsep=quad}|
% \end{quote}
% the language |ngerman| will only be stored internally, and the label separator will
% be set to |quad| afterwards. Some time later, right before the caption is actually
@@ -609,7 +629,7 @@
% Usually this is no problem, but think of options which will be overwritten by the
% language selection, or options which act on the language currently set, for example
% \begin{quote}
-% |\captionsetup[bi-second]{lang=ngerman,name=Bild}|\quad.
+% |\bicaptionsetup{}{lang=ngerman,name=Bild}|\quad.
% \end{quote}
% |lang=ngerman| changes the environment name to ``Abbildung'', and |name=Bild|
% changes the environment name to ``Bild''. One would expect that the name is
@@ -629,7 +649,7 @@
% will be done by \thispackage\ automatically, since the environment name will usually
% be overwritten by a language selection. So actually
% \begin{quote}
-% |\captionsetup[bi-second]{lang=ngerman,name=Bild}|
+% |\bicaptionsetup{}{lang=ngerman,name=Bild}|
% \end{quote}
% will give the expected result, i.e. the environment name is typeset as ``Bild''.
%
@@ -897,8 +917,7 @@
% \end{quote}
%
% \pagebreak[3]
-% \captionsetup[bi-first]{lang=german}
-% \captionsetup[bi-second]{lang=english,font=it}
+% \bicaptionsetup{lang=german}{lang=english,font=it}
% \captionsetup[sub]{format=hang,list=on}
%
% \iffalse
@@ -1001,12 +1020,12 @@
% \fi
%
% \StopEventually{%^^A
-% \begin{thebibliography}{99}
+% \begin{thebibliography}{9}
%
% \bibitem{caption}
% Axel Sommerfeldt:\\
% \href{http://www.ctan.org/pkg/caption}%
-% {\emph{Customizing captions of floating environments}},\\
+% {\emph{Customising captions of floating environments}},\\
% 2022/01/07
%
% \bibitem{listings}
@@ -1027,6 +1046,11 @@
% {\emph{The subcaption package}},\\
% 2022/01/07
%
+% \bibitem{TLC2}
+% Frank Mittelbach and Michel Goossens:\\
+% \newblock {\em The {\LaTeX} Companion (2nd.~Ed.)},\\
+% \newblock Addison-Wesley, 2004.
+%
% \end{thebibliography}
% }
%
@@ -1127,7 +1151,7 @@
%
% Identify the current version of the package.
% \begin{macrocode}
-\ProvidesPackage{bicaption}[2021/05/02 v1.5b Bilingual Captions (AR)]
+\ProvidesPackage{bicaption}[2023/02/19 v1.6 Bilingual Captions (AR)]
% \end{macrocode}
%
% Since we base on the \package{caption} package we load it here.
@@ -1392,7 +1416,7 @@
% \end{macrocode}
% \begin{macrocode}
\ifcsname captionmainlanguage\endcsname
- \captionsetup[bi-first]{lang=\captionmainlanguage}%
+ \captionsetup*[bi-first]{lang=\captionmainlanguage}%
\else
\ifcsname bicaption@language@value\endcsname % option "lang=" was used
\expandafter\bicaption@Warning
@@ -1425,7 +1449,7 @@
% We use |\caption@Process|\-|Options| here to add the options to the `|bi-second|' option
% list instead of executing them immediately.
% \begin{macrocode}
-\caption@SetupOptions{bicaption}{\captionsetup[bi-second]{#2}}%
+\caption@SetupOptions{bicaption}{\captionsetup*[bi-second]{#2}}%
\caption@ProcessOptions*{bicaption}
% \end{macrocode}
%
@@ -1591,6 +1615,31 @@
% \pagebreak[3]
% \subsubsection{The \cs{bicaption} commands}
%
+% \begin{macro}{\bicaptionsetup}
+% \changes{v1.6}{2022/04/18}{This macro added}
+% |\bicaptionsetup*|\oarg{type}\marg{keyval-list of options 1}\marg{keyval-list of options 2}\\
+% applies the given list of options.
+% \begin{macrocode}
+\newcommand*\bicaptionsetup{%
+ \caption@teststar\@bicaptionsetup*{}}
+% \end{macrocode}
+% \begin{macrocode}
+\newcommand*\@bicaptionsetup[1]{%
+ \kernel@ifnextchar[%]
+ {\bicaption@setup@options{#1}}%
+ {\bicaption@setup*}}
+% \end{macrocode}
+% \begin{macrocode}
+\def\bicaption@setup@options#1[#2]{%
+ \bicaption@setup{#1[{#2}]}}
+% \end{macrocode}
+% \begin{macrocode}
+\newcommand*\bicaption@setup[2]{%
+ \captionsetup#1[bi-first]{#2}%
+ \captionsetup#1[bi-second]}
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\bicaption}
% |\bicaption*|\oarg{list entry \#1}\marg{text \#1}\oarg{list entry \#2}\marg{text \#2}
% \begin{macrocode}
@@ -1649,9 +1698,9 @@
\long\def\@@@@bicaption#1#2[#3]#4{%
\bicaption@getlabel{#2}%
\bicaption@ifswap
- {\bicaption@setup{#1}{#2}%
+ {\bicaption@set{#1}{#2}%
\bicaption@cmd[{#3}]{#4}}%
- {\bicaption@setup{#3}{#4}%
+ {\bicaption@set{#3}{#4}%
\bicaption@cmd[{#1}]{#2}}}
% \end{macrocode}
% \begin{macrocode}
@@ -1744,12 +1793,13 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\bicaption@setup}
-% |\bicaption@setup|\marg{list-entry}\marg{text}\\
+% \begin{macro}{\bicaption@set}
+% \changes{v1.6}{2022/04/18}{This macro renamed from \cs{bicaption@setup} to \cs{bicaption@set}}
+% |\bicaption@set|\marg{list-entry}\marg{text}\\
% initiates the bilingual caption typesetting by storing the extra texts into
% |\bi|\-|caption@l|\-|entry| and |\bi|\-|caption@text|.
% \begin{macrocode}
-\newcommand\bicaption@setup[2]{%
+\newcommand\bicaption@set[2]{%
\def\bicaption@lentry{#1}%
\def\bicaption@text{\ignorespaces #2}}
% \end{macrocode}
@@ -1757,7 +1807,7 @@
%
% \begin{macro}{\bicaption@clear}
% |\bicaption@clear|\\
-% clears the stuff stored by |\bicaption@setup|.
+% clears the stuff stored by |\bicaption@set|.
% \begin{macrocode}
\newcommand*\bicaption@clear{%
\let\bicaption@lentry\@undefined
@@ -1767,6 +1817,7 @@
%
% \begin{macro}{\caption@freeze}
% \changes{v1.0}{2011/08/31}{Redefinition of \cs{caption@freeze} added}
+% \changes{v1.5c}{2022/04/18}{\cs{@ifnextchar} replaced by \cs{kernel@ifnextchar}}
% To make |\bicaption| work inside |SCfigure| and |FPfigure| environments we need to add
% |\bi|\-|caption| to |\caption@freeze|.
% \begin{macrocode}
@@ -1777,7 +1828,7 @@
\def\bicaption{%
\caption@withoptargs\caption@SC@bicaption}%
\long\def\caption@SC@bicaption#1#2{%
- \@ifnextchar[%]
+ \kernel@ifnextchar[%]
{\caption@SC@bi@caption{#1}{#2}}%
{\caption@SC@bi@caption@{#1}{#2}}}%
\long\def\caption@SC@bi@caption#1#2[#3]#4{%
@@ -1806,7 +1857,7 @@
\lst@Key{caption1}\relax{%
\lstKV@OptArg[{#1}]{#1}{%
\bicaption@ifswap
- {\bicaption@setup{##1}{##2}}%
+ {\bicaption@set{##1}{##2}}%
{\def\lst@@caption{##1}\def\lst@caption{##2}}}%
\let\lst@title\@empty}%
% \end{macrocode}
@@ -1815,7 +1866,7 @@
\lstKV@OptArg[{#1}]{#1}{%
\bicaption@ifswap
{\def\lst@@caption{##1}\def\lst@caption{##2}}%
- {\bicaption@setup{##1}{##2}}}%
+ {\bicaption@set{##1}{##2}}}%
\let\lst@title\@empty}%
% \end{macrocode}
% \begin{macrocode}
@@ -1856,8 +1907,8 @@
\bicaption@LT@setup}%
\gdef\bicaption@LT@setup{%
\bicaption@ifswap
- {\bicaption@setup{#1}{#2}}%
- {\bicaption@setup{#3}{#4}}}%
+ {\bicaption@set{#1}{#2}}%
+ {\bicaption@set{#3}{#4}}}%
\bicaption@ifswap
{\egroup\bicaption@cmd[{#3}]{#4}}%
{\egroup\bicaption@cmd[{#1}]{#2}}}
@@ -1888,25 +1939,6 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{thebibliography}{9}
-% \bibitem{TLC2}
-% Frank Mittelbach and Michel Goossens:\\
-% \newblock {\em The {\LaTeX} Companion (2nd.~Ed.)},\\
-% \newblock Addison-Wesley, 2004.
-%
-% \bibitem{listings}
-% Carsten Heinz \& Brooks Moses:\\
-% \href{http://www.ctan.org/pkg/listings}%
-% {\emph{The Listings Package}},\\
-% 2007/02/22
-%
-% \bibitem{longtable}
-% David Carlisle:\\
-% \href{http://www.ctan.org/pkg/longtable}%
-% {\emph{The longtable package}},\\
-% 2004/02/01
-% \end{thebibliography}
-%
% \iffalse
%</package>
% \fi
diff --git a/Master/texmf-dist/source/latex/caption/caption-ams-smf.dtx b/Master/texmf-dist/source/latex/caption/caption-ams-smf.dtx
index 6b3b19ced6b..1009dd87c37 100644
--- a/Master/texmf-dist/source/latex/caption/caption-ams-smf.dtx
+++ b/Master/texmf-dist/source/latex/caption/caption-ams-smf.dtx
@@ -2,7 +2,7 @@
%
% This is file `caption-ams-smf.dtx'.
%
-% Copyright (C) 2007-2020 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
+% Copyright (C) 2007-2022 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
%
% --------------------------------------------------------------------------
%
@@ -36,7 +36,7 @@
% \iffalse
%<*driver>
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesFile{caption-ams-smf.drv}[2020/07/31 v2.0 Implementation of the caption-ams-smf package]
+\ProvidesFile{caption-ams-smf.drv}[2022/12/27 v2.0 Implementation of the caption-ams-smf package]
\hbadness=9999 \newcount\hbadness \hfuzz=100pt % Make TeX shut up.
%\errorcontextlines=3
%
@@ -105,8 +105,8 @@
% The user documentation can be found in
% \nopagebreak\begin{quote}
% \begin{tabular}{ll}
-% \href{http://mirror.ctan.org/macros/latex/contrib/caption/caption-eng.pdf}%
-% {\texttt{caption-eng.pdf}} & The caption package bundle documentation \\
+% \href{http://mirror.ctan.org/macros/latex/contrib/caption/caption.pdf}%
+% {\texttt{caption.pdf}} & The caption package documentation \\
% \end{tabular}
% \end{quote}
%
diff --git a/Master/texmf-dist/source/latex/caption/caption-beamer.dtx b/Master/texmf-dist/source/latex/caption/caption-beamer.dtx
index fdbfb574026..f18d12437bb 100644
--- a/Master/texmf-dist/source/latex/caption/caption-beamer.dtx
+++ b/Master/texmf-dist/source/latex/caption/caption-beamer.dtx
@@ -36,7 +36,7 @@
% \iffalse
%<*driver>
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesFile{caption-beamer.drv}[2018/05/13 v2.0 Implementation of the caption-beamer package]
+\ProvidesFile{caption-beamer.drv}[2022/12/27 v2.0 Implementation of the caption-beamer package]
\hbadness=9999 \newcount\hbadness \hfuzz=100pt % Make TeX shut up.
%\errorcontextlines=3
%
@@ -100,8 +100,8 @@
% documentation can be found in
% \nopagebreak\begin{quote}
% \begin{tabular}{ll}
-% \href{http://mirror.ctan.org/macros/latex/contrib/caption/caption-eng.pdf}%
-% {\texttt{caption-eng.pdf}} & The caption package bundle documentation \\
+% \href{http://mirror.ctan.org/macros/latex/contrib/caption/caption.pdf}%
+% {\texttt{caption.pdf}} & The caption package documentation \\
% \end{tabular}
% \end{quote}
%
diff --git a/Master/texmf-dist/source/latex/caption/caption-elsarticle.dtx b/Master/texmf-dist/source/latex/caption/caption-elsarticle.dtx
index cb7733c9d7c..fcd5f006363 100644
--- a/Master/texmf-dist/source/latex/caption/caption-elsarticle.dtx
+++ b/Master/texmf-dist/source/latex/caption/caption-elsarticle.dtx
@@ -2,7 +2,7 @@
%
% This is file `caption-elsarticle.dtx'.
%
-% Copyright (C) 2013-2020 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
+% Copyright (C) 2013-2022 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
%
% --------------------------------------------------------------------------
%
@@ -36,7 +36,7 @@
% \iffalse
%<*driver>
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesFile{caption-elsarticle.drv}[2018/05/24 v2.0 Implementation of the caption-elsarticle package]
+\ProvidesFile{caption-elsarticle.drv}[2022/12/27 v2.0 Implementation of the caption-elsarticle package]
\hbadness=9999 \newcount\hbadness \hfuzz=100pt % Make TeX shut up.
%\errorcontextlines=3
%
@@ -100,8 +100,8 @@
% documentation can be found in
% \nopagebreak\begin{quote}
% \begin{tabular}{ll}
-% \href{http://mirror.ctan.org/macros/latex/contrib/caption/caption-eng.pdf}%
-% {\texttt{caption-eng.pdf}} & The caption package bundle documentation \\
+% \href{http://mirror.ctan.org/macros/latex/contrib/caption/caption.pdf}%
+% {\texttt{caption.pdf}} & The caption package documentation \\
% \end{tabular}
% \end{quote}
%
diff --git a/Master/texmf-dist/source/latex/caption/caption-koma.dtx b/Master/texmf-dist/source/latex/caption/caption-koma.dtx
index c4daad26fa7..1469e190ddb 100644
--- a/Master/texmf-dist/source/latex/caption/caption-koma.dtx
+++ b/Master/texmf-dist/source/latex/caption/caption-koma.dtx
@@ -2,7 +2,7 @@
%
% This is file `caption-koma.dtx'.
%
-% Copyright (C) 2004-2020 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
+% Copyright (C) 2004-2022 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
%
% --------------------------------------------------------------------------
%
@@ -31,12 +31,12 @@
%
% \fi
%
-% \CheckSum{273}
+% \CheckSum{255}
%
% \iffalse
%<*driver>
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesFile{caption-koma.drv}[2018/05/24 v2.0 Implementation of the caption-koma package]
+\ProvidesFile{caption-koma.drv}[2022/12/27 v2.0 Implementation of the caption-koma package]
\hbadness=9999 \newcount\hbadness \hfuzz=100pt % Make TeX shut up.
%\errorcontextlines=3
%
@@ -73,7 +73,7 @@
% \newcommand*\purerm[1]{\texorpdfstring{{\upshape\mdseries\rmfamily #1}}{#1}}
% \newcommand*\puresf[1]{\texorpdfstring{{\upshape\mdseries\sffamily #1}}{#1}}
% \newcommand*\purett[1]{\texorpdfstring{{\upshape\mdseries\ttfamily #1}}{#1}}
-% \let\class\puresf \let\package\puresf
+% \let\cls\puresf \let\pkg\puresf
% \let\env\purett \let\opt\purett
%
% \newcommand*\csmarg[1]{\texttt{\char`\{#1\char`\}}}
@@ -86,7 +86,7 @@
% \GetFileInfo{caption-koma.sto}
%
% \title{\texorpdfstring
-% {The adaption of the \package{caption} package to the \KOMAScript\ document classes\thanks{%^^A
+% {The adaption of the \pkg{caption} package to the \KOMAScript\ document classes\thanks{%^^A
% This adaption has version number \docversion.}}%^^A
% {The adaption of the caption package to the KOMA-Script document classes}}
% \author{Axel Sommerfeldt\\
@@ -95,26 +95,34 @@
% \maketitle
%
% \begin{abstract}
-% This package adapts the \package{caption} package to the \KOMAScript\ document classes.
+% This package adapts the \pkg{caption} package to the \KOMAScript\ document classes.
% \end{abstract}
-%
+%
% \section*{User manual}
%
% This document is describing the code implementation only.
% The user documentation can be found in
% \nopagebreak\begin{quote}
% \begin{tabular}{ll}
-% \href{http://mirror.ctan.org/macros/latex/contrib/caption/caption-eng.pdf}%
-% {\texttt{caption-eng.pdf}} & The caption package bundle documentation \\
+% \href{http://mirror.ctan.org/macros/latex/contrib/caption/caption.pdf}%
+% {\texttt{caption.pdf}} & The caption package documentation \\
% \end{tabular}
% \end{quote}
%
+% \section*{State of this package}
+%
+% Please note that the last major revision of this code was done in the year 2007,
+% afterwards the \KOMAScript\ support was adapted to changes in the \pkg{caption} package only.
+%
+% So nearly everything which has changed in the caption support of \KOMAScript\ since 2007 is not reflected here.
+% (So for example |\set|\-|cap|\-|dyn|\-|width| is not emulated yet etc.)
+%
% \StopEventually{}
% \iffalse
% \clearpage
% \tableofcontents
% \fi
-%
+%
% \iffalse
% --------------------------------------------------------------------------- %
% \fi
@@ -177,7 +185,7 @@
% \changes{v1.1}{2007/03/17}{\KOMAScript\ compatibility options removed}
% \changes{v1.1}{2007/03/31}{\KOMAScript\ classes support added}
% \changes{v1.1}{2007/04/05}{\KOMAScript\ compatibility revised \& enhanced}
-% \changes{v2.0}{2020/07/27}{\KOMAScript\ class support adapted to \package{caption3}~\version{2.0}}
+% \changes{v2.0}{2020/07/27}{\KOMAScript\ class support adapted to \pkg{caption3}~\version{2.0}}
%
% \iffalse
% --------------------------------------------------------------------------- %
@@ -193,14 +201,14 @@
%
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesFile{caption-koma.sto}[2020/09/21 v2.0b Adaption of the caption package to the KOMA-Script document classes (AR)]
+\ProvidesFile{caption-koma.sto}[2022/12/27 v2.0c Adaption of the caption package to the KOMA-Script document classes (AR)]
% \end{macrocode}
%
% \section{Margin resp. width}
%
% \begin{macro}{\setcapwidth}
% \changes{v1.9}{2018/12/26}{Bugfix: Missing curly braces added}
-% Patch |\setcapwidth| so it will set the \package{caption3} width setting, too.
+% Patch |\setcapwidth| so it will set the \pkg{caption3} width setting, too.
% \begin{macrocode}
\expandafter\let\expandafter\caption@koma@setcapwidth
\csname\string\setcapwidth\endcsname
@@ -239,7 +247,7 @@
% \emph{TODO:} |\setcapdynwidth|
%
% \begin{macro}{\setcapmargin}
-% Patch |\setcapmargin| so it will set the \package{caption3} margin setting, too.
+% Patch |\setcapmargin| so it will set the \pkg{caption3} margin setting, too.
% \begin{macrocode}
\expandafter\let\expandafter\caption@koma@setcapmargin
\csname\string\@setcapmargin\endcsname
@@ -281,7 +289,7 @@
% \section{Indentions}
%
% \begin{macro}{\setcapindent}
-% Patch |\setcapindent| so it will set the \package{caption3} indention setting, too.
+% Patch |\setcapindent| so it will set the \pkg{caption3} indention setting, too.
% \begin{macrocode}
\let\caption@koma@setcapindent\@setcapindent
\renewcommand*\@setcapindent[1]{%
@@ -304,49 +312,11 @@
\caption@ifdefined\cap@indent{\caption@setcapindent}{}
% \end{macrocode}
%
-% \changes{v1.0f}{2005/08/22}{Increased compatibility to KOMA-Script: A special version of options `parindent' and `parskip' added}
-% \changes{v1.0g}{2006/01/03}{Bugfix 06-01-03: KOMA-Script variants of `parskip' and `parindent' options revised and moved into caption kernel}
-% \changes{v1.0h}{2006/02/23}{KOMA-Script variants of `parskip' and `parindent' are obsolete now, removed}
-% \changes{v1.0m}{2007/03/30}{KOMA-Script variants of `parskip' and `parindent' re-added, since they still collide with the current version of the subfig package (Sigh!)}
-%
-% There is an option clash between the \KOMAScript\ document classes
-% and the \package{caption} kernel, both define the options |parindent| and
-% |parskip| but with different meaning.
-% Furthermore the ones defined by the \package{caption} kernel take a
-% value as parameter but the \KOMAScript\ ones do not.
-%
-% So we need special versions of the options |parindent| and |parskip| here
-% which determine if a value is given (and therefore should be treated as
-% our option) or not (and therefore should be ignored by us).\footnote{%^^A
-% This problem was completely solved due a change of \cs{caption@ProcessOptions}
-% in \package{caption3}~\version{1.0h}, but we still need this workaround since
-% these options would otherwise still collide with the current version $1.3$
-% of the \package{subfig} package (Sigh!)}
-%
-% \begin{macrocode}
-\let\caption@koma@parindent\KV@caption@parindent
-\DeclareCaptionOption{parindent}[]{%
- \ifx,#1,%
- \caption@Debug{Option `parindent' ignored}%
- \else
- \caption@koma@parindent{#1}%
- \fi}%
-% \end{macrocode}
-% \begin{macrocode}
-\let\caption@koma@parskip\KV@caption@parskip
-\DeclareCaptionOption{parskip}[]{%
- \ifx,#1,%
- \caption@Debug{Option `parskip' ignored}%
- \else
- \caption@koma@parskip{#1}%
- \fi}%
-% \end{macrocode}
-%
% \section{Single-line-check}
%
% \begin{macro}{\ifonelinecaptions}
% \changes{v1.1g}{2008/03/01}{\cs{def} changed to \cs{g@addto@macro}}
-% Patch |\onelinecaptionstrue| and |onelinecaptionsfalse| so they will set the corresponding \package{caption3} setting, too.
+% Patch |\onelinecaptionstrue| and |onelinecaptionsfalse| so they will set the corresponding \pkg{caption3} setting, too.
% \begin{macrocode}
\g@addto@macro\onelinecaptionstrue{\caption@setsinglelinecheck{true}}%
\g@addto@macro\onelinecaptionsfalse{\caption@setsinglelinecheck{false}}%
@@ -404,7 +374,7 @@
%
% \section{Positioning}
%
-% Here we patch the caption related \KOMAScript\ commands to set \package{caption} package settings as well.
+% Here we patch the caption related \KOMAScript\ commands to set \pkg{caption} package settings as well.
% Furthermore we take over the caption related settings from the \KOMAScript\ classes.
%
% \begin{macro}{\if@captionabove}
@@ -416,7 +386,7 @@
% \changes{v1.1k}{2009/10/09}{\opt{figureposition} and \opt{tableposition} will issue a warning now}
% \changes{v1.8e}{2019/09/11}{\opt{figureposition} and \opt{tableposition} will now set the position anyway since it could be used by other packages}
% \changes{v2.0a}{2020/09/12}{Faulty \cs{AtBeginCaption} replaced with correct \cs{AfterCaptionPackage}}
-% Patch |\@captionabovetrue| and |\@captionabovefalse| so they will set the \package{caption3} position setting, too.
+% Patch |\@captionabovetrue| and |\@captionabovefalse| so they will set the \pkg{caption3} position setting, too.
% Note that these are stronger than the \opt{position} setting, therefore we override the options
% \opt{figureposition} and \opt{tableposition} to typeout a warning.
% \begin{macrocode}
@@ -440,7 +410,7 @@
%
% \begin{macro}{\if@tablecaptionabove}
% \changes{v1.1g}{2008/03/01}{\cs{def} changed to \cs{g@addto@macro}}
-% Patch |\@tablecaptionabovetrue| and |\@tablecaptionabovefalse| so they will set the \package{caption3} position setting, too.
+% Patch |\@tablecaptionabovetrue| and |\@tablecaptionabovefalse| so they will set the \pkg{caption3} position setting, too.
% \begin{macrocode}
\g@addto@macro\@tablecaptionabovetrue{\captionsetup*[table]{position=t}}%
\g@addto@macro\@tablecaptionabovefalse{\captionsetup*[table]{position=b}}%
@@ -456,7 +426,7 @@
%
% \begin{macro}{\if@figurecaptionabove}
% \changes{v1.5}{2013/02/15}{Support of \cs{if@figurecaptionabove} added}
-% Patch |\@figurecaptionabovetrue| and |\@figurecaptionabovefalse| so they will set the \package{caption3} position setting, too.
+% Patch |\@figurecaptionabovetrue| and |\@figurecaptionabovefalse| so they will set the \pkg{caption3} position setting, too.
% \begin{macrocode}
\caption@ifdefined\@figurecaptionabovetrue{%
\g@addto@macro\@figurecaptionabovetrue{\captionsetup*[figure]{position=t}}%
@@ -471,7 +441,7 @@
% \end{macrocode}
% \end{macro}
%
-% Since the \KOMAScript\ position setting overwrites the one from the \package{caption} package,
+% Since the \KOMAScript\ position setting overwrites the one from the \pkg{caption} package,
% we re-define the options |figure|\-|position| and |table|\-|position| to issue a warning.
% \Note{But we set the value anyway since it will be used by sub-captions.}
%
@@ -498,7 +468,7 @@
% \begin{macro}{\scr@caption}
% \KOMAScript\ contains the code
% |\AtBeginDocument{\let\scr@caption\caption}|
-% so we need to update |\scr@caption| after the \package{caption} package has re-defined |\caption|.
+% so we need to update |\scr@caption| after the \pkg{caption} package has re-defined |\caption|.
% \begin{macrocode}
\AtBeginDocument{\let\scr@caption\caption}
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/caption/caption-memoir.dtx b/Master/texmf-dist/source/latex/caption/caption-memoir.dtx
index 4e341cb42ce..e25c44b210c 100644
--- a/Master/texmf-dist/source/latex/caption/caption-memoir.dtx
+++ b/Master/texmf-dist/source/latex/caption/caption-memoir.dtx
@@ -2,7 +2,7 @@
%
% This is file `caption-memoir.dtx'.
%
-% Copyright (C) 2011-2020 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
+% Copyright (C) 2011-2022 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
%
% --------------------------------------------------------------------------
%
@@ -36,7 +36,7 @@
% \iffalse
%<*driver>
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesFile{caption-memoir.drv}[2020/10/10 v2.2 Implementation of the caption-memoir package]
+\ProvidesFile{caption-memoir.drv}[2022/12/27 v2.2 Implementation of the caption-memoir package]
\hbadness=9999 \newcount\hbadness \hfuzz=100pt % Make TeX shut up.
%\errorcontextlines=3
%
@@ -100,8 +100,8 @@
% The user documentation can be found in
% \nopagebreak\begin{quote}
% \begin{tabular}{ll}
-% \href{http://mirror.ctan.org/macros/latex/contrib/caption/caption-eng.pdf}%
-% {\texttt{caption-eng.pdf}} & The caption package bundle documentation \\
+% \href{http://mirror.ctan.org/macros/latex/contrib/caption/caption.pdf}%
+% {\texttt{caption.pdf}} & The caption package documentation \\
% \end{tabular}
% \end{quote}
%
diff --git a/Master/texmf-dist/source/latex/caption/caption-ntg.dtx b/Master/texmf-dist/source/latex/caption/caption-ntg.dtx
index 782d576a8fb..f32a3f2c4c8 100644
--- a/Master/texmf-dist/source/latex/caption/caption-ntg.dtx
+++ b/Master/texmf-dist/source/latex/caption/caption-ntg.dtx
@@ -2,7 +2,7 @@
%
% This is file `caption-ntg.dtx'.
%
-% Copyright (C) 2007-2020 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
+% Copyright (C) 2007-2022 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
%
% --------------------------------------------------------------------------
%
@@ -36,7 +36,7 @@
% \iffalse
%<*driver>
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesFile{caption-ntg.drv}[2020/08/01 v2.0 Implementation of the caption-ntg package]
+\ProvidesFile{caption-ntg.drv}[2022/12/27 v2.0 Implementation of the caption-ntg package]
\hbadness=9999 \newcount\hbadness \hfuzz=100pt % Make TeX shut up.
%\errorcontextlines=3
%
@@ -102,8 +102,8 @@
% The user documentation can be found in
% \nopagebreak\begin{quote}
% \begin{tabular}{ll}
-% \href{http://mirror.ctan.org/macros/latex/contrib/caption/caption-eng.pdf}%
-% {\texttt{caption-eng.pdf}} & The caption package bundle documentation \\
+% \href{http://mirror.ctan.org/macros/latex/contrib/caption/caption.pdf}%
+% {\texttt{caption.pdf}} & The caption package documentation \\
% \end{tabular}
% \end{quote}
%
diff --git a/Master/texmf-dist/source/latex/caption/caption-thesis.dtx b/Master/texmf-dist/source/latex/caption/caption-thesis.dtx
index e91145a3077..dbc094f66a4 100644
--- a/Master/texmf-dist/source/latex/caption/caption-thesis.dtx
+++ b/Master/texmf-dist/source/latex/caption/caption-thesis.dtx
@@ -2,7 +2,7 @@
%
% This is file `caption-thesis.dtx'.
%
-% Copyright (C) 2008-2020 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
+% Copyright (C) 2008-2022 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
%
% --------------------------------------------------------------------------
%
@@ -36,7 +36,7 @@
% \iffalse
%<*driver>
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesFile{caption-thesis.drv}[2020/08/01 v2.0 Implementation of the caption-thesis package]
+\ProvidesFile{caption-thesis.drv}[2022/12/27 v2.0 Implementation of the caption-thesis package]
\hbadness=9999 \newcount\hbadness \hfuzz=100pt % Make TeX shut up.
%\errorcontextlines=3
%
@@ -100,8 +100,8 @@
% The user documentation can be found in
% \nopagebreak\begin{quote}
% \begin{tabular}{ll}
-% \href{http://mirror.ctan.org/macros/latex/contrib/caption/caption-eng.pdf}%
-% {\texttt{caption-eng.pdf}} & The caption package bundle documentation \\
+% \href{http://mirror.ctan.org/macros/latex/contrib/caption/caption.pdf}%
+% {\texttt{caption.pdf}} & The caption package documentation \\
% \end{tabular}
% \end{quote}
%
diff --git a/Master/texmf-dist/source/latex/caption/caption.dtx b/Master/texmf-dist/source/latex/caption/caption.dtx
index 14392efea80..44730c1912f 100644
--- a/Master/texmf-dist/source/latex/caption/caption.dtx
+++ b/Master/texmf-dist/source/latex/caption/caption.dtx
@@ -2,7 +2,7 @@
%
% This is file `caption.dtx'.
%
-% Copyright (C) 1994-2022 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
+% Copyright (C) 1994-2023 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
%
% --------------------------------------------------------------------------
%
@@ -31,7 +31,7 @@
%
% \fi
%
-% \CheckSum{2836}
+% \CheckSum{2920}
%
% \iffalse
%<*driver>
@@ -4307,7 +4307,6 @@
% \hline
% |\caption@kernel@addcontentsline| & \package{floatrow} \\
% |\caption@settype| & \package{newfloat} \\
-% |\caption@setsubtype| & \package{floatrow} \\
% |\caption@xlabel| & \package{cleveref} \\
% \end{tabular}\end{quote}
%
@@ -4593,14 +4592,14 @@
%
% Identify the current version of the package.
% \begin{macrocode}
-\ProvidesPackage{caption}[2022/03/01 v3.6b Customizing captions (AR)]
+\ProvidesPackage{caption}[2023/03/12 v3.6j Customizing captions (AR)]
% \end{macrocode}
%
% \subsection{Loading the kernel}
%
% Load a matching version of the \package{caption} kernel.
% \begin{macrocode}
-\RequirePackage{caption3}[2022/01/07] % needs v2.3 or newer
+\RequirePackage{caption3}[2022/04/06] % needs v2.4 or newer
% \end{macrocode}
%
% \subsection{Check against unknown document classes}
@@ -4714,6 +4713,7 @@
% \changes{v3.1d}{2007/10/24}{Bugfix 07-10-24 in caption v1.x$ compatibility options}
% \changes{v3.5a}{2020/09/02}{caption v1.x compatibility options fixed}
% \changes{v3.6}{2020/12/22}{Option `compatibility' adapted to fallback concept}
+% \changes{v3.6h}{2022/07/03}{Command \cs{caption@ifcompatibility} re-added}
%
% We only support boolean values for the |compatibility=| option
% since these were the only one which were documented in the past.
@@ -4726,10 +4726,12 @@
please use either \string\usepackage{caption}[=v1]\MessageBreak
or \string\usepackage{caption-light} instead}%
}{\caption@ifinlist{#1}{0,false,no,off}{%
- % nothing to do
+ \let\caption@ifcompatibility\@secondoftwo % not used; for backward compatibility only
}{%
\caption@Error{Undefined compatibility value `#1'}%
}}}
+\@onlypreamble@key{caption}{compatibility}
+\caption@setbool{compatibility}{0} % default: Try not to be compatible to v1.x
% \end{macrocode}
%
% \subsubsection{caption v1.x compatibility options}
@@ -5245,6 +5247,7 @@
\def\caption@xfloat#1[#2]{%
\caption@ORI@xfloat{#1}[#2]%
\caption@settype{#1}%
+ \caption@setanchor
\caption@xfloat@hook}
% \end{macrocode}
% Hook, could be extended with |\g@addto@macro\caption@x|\-|float@hook{|\ldots|}|.
@@ -5300,100 +5303,77 @@
%
% \begin{macro}{\setcaptiontype}
% \changes{v3.2}{2010/10/24}{This macro added}
-% \changes{v3.4e}{2020/01/02}{Check added if the subtype is defined}
% \changes{v3.5}{2020/08/24}{Definition method adapted to the \package{caption-light} package}
-% \changes{v3.6}{2021/01/02}{Usage of \cs{caption@initposition} added}
-% \changes{v3.6}{2021/01/09}{Usage of \cs{flushsubcaptionlistentries} added}
% \changes{v3.6}{2022/02/20}{Optional argument added}
-% Like |\captionsetup{type=xxx}|, but also works if |\caption|\-|setup| was redefined.
+% \changes{v3.6e}{2022/04/17}{Re-written, task sequence corrected}
+% \changes{v3.6f}{2022/04/18}{\cs{@ifnextchar} replaced by \cs{kernel@ifnextchar}}
+% |\setcaptiontype*|\oarg{additional options}\marg{type}\\
+% Like |\captionsetup{type=|\meta{type}|}|, but also works if |\caption|\-|setup| was redefined.
+% The non-starred version sets a \package{hyperref} anchor additionally
+% (if |hypcap=|\-|true| and the \package{hypcap} package is not loaded).
% \begin{macrocode}
\def\setcaptiontype{%
- \caption@parboxrestore@light
- \caption@settype}
-% \end{macrocode}
-% \begin{macrocode}
-\newcommand*\caption@settype{%
- \caption@initposition
- \caption@clrflags
- \aftergroup\flushsubcaptionlistentries
- \caption@@settype}
+ \caption@teststar\@setcaptiontype\@gobble\@iden}
% \end{macrocode}
% \begin{macrocode}
-\newcommand*\caption@@settype{%
- \caption@teststar\caption@@settype@\@firstoftwo\@secondoftwo}
-% \end{macrocode}
-% \begin{macrocode}
-\newcommand*\caption@@settype@[1]{%
- \@ifnextchar[%]
- {\caption@@settype@@{#1}}%
- {\caption@@@settype{}{#1}}}
-% \end{macrocode}
-% \begin{macrocode}
-\def\caption@@settype@@#1[#2]#3{%
- \caption@@@settype{}{#1}{#3}%
- \caption@setoptions{#2}}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\setcaptionsubtype}
-% \changes{v3.2a}{2011/08/15}{This macro added}
-% \changes{v3.5d}{2020/09/28}{This macro revised}
-% \changes{v3.6}{2022/01/05}{Usage of \cs{caption@Error} replaced by \cs{caption@OutsideFloat}}
-% \changes{v3.6}{2022/01/07}{Multiple use is suppressed now by checking \cs{caption@ifsubtype}}
-% Same, but sets the sub-type.
-% \begin{macrocode}
-\newcommand*\setcaptionsubtype{%
- \caption@setsubtype}
+\newcommand*\@setcaptiontype[1]{%
+ \kernel@ifnextchar[%]
+ {\@setcaptiontype@#1}%
+ {\@@setcaptiontype#1\relax}}
% \end{macrocode}
% \begin{macrocode}
-\newcommand*\caption@setsubtype{% used by the floatrow package
- \caption@teststar\caption@@setsubtype\@firstoftwo\@secondoftwo}
+\def\@setcaptiontype@#1[#2]{%
+ \@@setcaptiontype{#1}{\caption@setoptions{#2}}}
% \end{macrocode}
% \begin{macrocode}
-\newcommand*\caption@@setsubtype[1]{%
- \caption@iftype
- {\caption@ifsubtype
- {\caption@Debug{subtype=\@subcaptype}}%
- {\caption@@@settype{sub}{#1}{sub\@captype}}}%
- {\caption@OutsideFloat\setcaptionsubtype}}
+\newcommand*\@@setcaptiontype[3]{%
+ \caption@settype{#3}#2%
+ \caption@parboxrestore@light
+ #1\caption@setanchor}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\caption@@@settype}
+% \begin{macro}{\caption@settype}
% \changes{v3.1}{2007/05/09}{This macro added}
% \changes{v3.1b}{2007/09/22}{Usage of \cs{caption@xlabel} added}
% \changes{v3.1d}{2007/10/23}{Error message for \cs{caption@checkgrouplevel} revised}
-% \changes{v3.1f}{2007/11/16}{\cs{caption@setsubtype} added}
% \changes{v3.1f}{2007/12/03}{Crappy \cs{caption@iftypewarning} replaced}
% \changes{v3.1g}{2008/01/12}{Usage of \cs{ifcaptionsetup@star} added}
% \changes{v3.2}{2010/10/26}{Error message moved from here to \cs{caption@refstepcounter}}
% \changes{v3.3}{2011/12/28}{Resetting of \cs{ifcaption@caption} and \cs{ifcaption@subcaption} added}
% \changes{v3.4e}{2020/01/02}{Checks added to prevent misuse regading subtypes}
+% \changes{v3.4e}{2020/01/02}{Check added if the subtype is defined}
% \changes{v3.5d}{2020/09/28}{This macro revised}
% \changes{v3.6}{2020/12/27}{Some code out-sourced to \cs{caption@reset@currentlabel}}
-% |\caption@settype*|\marg{type}\par
+% \changes{v3.6}{2021/01/02}{Usage of \cs{caption@initposition} added}
+% \changes{v3.6}{2021/01/09}{Usage of \cs{flushsubcaptionlistentries} added}
+% \changes{v3.6e}{2022/04/17}{Starred variant and optional argument removed}
+% \changes{v3.6g}{2022/04/18}{Usage of \cs{ifcaptionsetup@star} removed}
+% |\caption@settype|\marg{type}\\
% sets |\@captype| and executes the options associated with it
% (using |\caption@set|\-|options|).
% Furthermore we check |\current|\-|group|\-|level| (if avail), and
% use the macro |\caption@|(|sub|)|type|\-|hook| (which will be used by our
% \package{float} package support).\par
-% The non-starred version sets a \package{hyperref} anchor additionally
-% (if |hypcap=|\-|true| and the \package{hypcap} package is not loaded).
% \begin{macrocode}
-\newcommand*\caption@@@settype[3]{%
+\newcommand*\caption@settype{%
+ \caption@initposition
+ \caption@clrflags
+ \aftergroup\flushsubcaptionlistentries
+ \caption@@settype{}}
+% \end{macrocode}
+% \begin{macrocode}
+\newcommand*\caption@@settype[2]{%
% #1 = "" or "sub"
-% #2 = \@firstoftwo in star form, \@secondoftwo otherwise
-% #3 = <type>, e.g.: "figure" or "subfigure"
- \caption@Debug{#1type:=#3}%
- \@nameuse{caption@check#1type}{#3}%
- {\caption@checkgrouplevel{#1}{%
- \captionsetup{#1type#2*\@empty=...}#2{ or
- \@backslashchar#1captionof}{}}%
+% #2 = <type>, e.g.: "figure" or "subfigure"
+ \caption@Debug{#1type:=#2}%
+ \@nameuse{caption@check#1type}{#2}%
+ {\caption@checkgrouplevel{#1}{\setcaption#1type}%
% \end{macrocode}
% \begin{macrocode}
- \edef\caption@tempa{#3}%
+ \edef\caption@tempa{#2}%
\expandafter\ifx\csname @#1captype\endcsname\caption@tempa \else
- \ifcaptionsetup@star\else\@nameuse{caption@#1type@warning}\fi
+ \@nameuse{caption@#1type@warning}%
\fi
\expandafter\let\csname @#1captype\endcsname\caption@tempa
% \end{macrocode}
@@ -5401,17 +5381,40 @@
\@nameuse{caption@#1typehook}%
% \end{macrocode}
% \begin{macrocode}
- \caption@setoptions{#3}%
+ \caption@setoptions{#2}%
\ifx\caption@opt\relax
\@nameundef{caption@#1type@warning}%
\else
\@namedef{caption@#1type@warning}{\caption@Warning{%
The #1type was already set to
`\csname @#1captype\endcsname'\MessageBreak}}%
- \fi
+ \fi}}
% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\setcaptionsubtype}
+% \changes{v3.2a}{2011/08/15}{This macro added}
+% \changes{v3.5d}{2020/09/28}{This macro revised}
+% \changes{v3.6}{2022/01/05}{Usage of \cs{caption@Error} replaced by \cs{caption@OutsideFloat}}
+% \changes{v3.6}{2022/01/07}{Multiple use is suppressed now by checking \cs{caption@ifsubtype}}
+% \changes{v3.6e}{2022/04/17}{Re-written}
+% |\setcaptionsubtype*|\\
+% Like |\captionsetup{subtype}|, but also works if |\caption|\-|setup| was redefined.
+% Sets |\@sub|\-|cap|\-|type| and executes the options associated with it.
+% The non-starred version sets a \package{hyperref} anchor additionally
+% (if |hypcap=|\-|true| and the \package{hypcap} package is not loaded).
% \begin{macrocode}
- #2{}{\caption@reset@currentlabel\caption@start}}}
+\newcommand*\setcaptionsubtype{%
+ \caption@teststar\@setcaptionsubtype\@gobble\@iden}
+% \end{macrocode}
+% \begin{macrocode}
+\newcommand*\@setcaptionsubtype[1]{%
+ \caption@iftype
+ {\caption@ifsubtype
+ {\caption@Debug{type=\@captype, subtype=\@subcaptype}}%
+ {\caption@@settype{sub}{sub\@captype}%
+ #1\caption@setanchor}}%
+ {\caption@OutsideFloat\setcaptionsubtype}}
% \end{macrocode}
% \end{macro}
%
@@ -5429,6 +5432,17 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\caption@setanchor}
+% \changes{v3.6e}{2022/04/17}{Code extracted from \cs{caption@settype}}
+% |\caption@setanchor|\\
+% sets a \pkg{hyperref} anchor.
+% \begin{macrocode}
+\newcommand*\caption@setanchor{%
+ \caption@reset@currentlabel
+ \caption@start}
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\caption@reset@currentlabel}
% \changes{v3.6}{2020/12/27}{This macro out-sourced from \cs{caption@settype}}
% Redefine |\@currentlabel| so a |\label| before |\caption| will result
@@ -5481,26 +5495,20 @@
% \begin{macro}{\caption@checksubtype}
% \changes{v3.4g}{2020/01/02}{This macro definition added}
% \changes{v3.4m}{2020/07/29}{Check of \cs{sf@counterlist} from \package{subfig} package added}
+% \changes{v3.6c}{2022/04/06}{Check of \cs{sf@counterlist} from \package{subfig} package removed}
+% \changes{v3.6c}{2022/04/06}{Usage of \cs{caption@subtypesource} added}
% |\caption@checksubtype|\marg{type}\marg{code}\par
% is used by |\caption@settype| and should either expand the code or issue an error
% if the given type is not a proper sub-type, i.e. not defined by |\Declare|\-|Caption|\-|Sub|\-|Type|.
-% Since the |sub|\-|float|\-|row| environment offered by the \package{floatrow} package\cite{floatrow}
-% is using |\caption|\-|setup{sub|\-|type}| even if the sub-type was defined by |\new|\-|sub|\-|float|
-% offered by \package{subfig}\cite{subfig}, we take a more relaxed view of things here and allow
-% those sub-types as well (but not without warning since we do not support this).
% \begin{macrocode}
\newcommand*\caption@checksubtype[1]{%
\caption@ifdefined@subtype{#1}%
\@firstofone
- {\caption@ifin@list\sf@counterlist{#1}%
- {\caption@Warning{%
- \noexpand\setcaptionsubtype without \string\DeclareCaptionSubType.\MessageBreak
- This is not designed to work; you could try replacing\MessageBreak
- the `subfig' package with `subcaption' to resolve\MessageBreak
- this problem which occurred}%
- \@firstofone}%
- {\caption@Error{Undefined subtype `#1'}%
- \@gobble}}}
+ {\@ifundefined{c@#1}%
+ {\caption@Error{Undefined counter `#1'}}%
+ {\caption@subtypesource\caption@subtype@source{#1}%
+ \caption@Error{The counter `#1' was defined by\MessageBreak\caption@subtype@source}}%
+ \@gobble}}
% \end{macrocode}
% \end{macro}
%
@@ -5625,6 +5633,7 @@
% \changes{v3.1l}{2010/01/09}{Adapted to current version of nameref package}
% \changes{v3.6}{2020/12/27}{With optional argument \cs{caption@refstepcounter@} is used instead of \cs{caption@refstepcounter}}
% \changes{v3.6}{2022/01/05}{Usage of \cs{caption@Error} replaced by \cs{caption@OutsideFloat}}
+% \changes{v3.6f}{2022/04/18}{\cs{@ifnextchar} replaced by \cs{kernel@ifnextchar}}
% |\captionlistentry|\oarg{float type}\marg{list entry}\\
% |\captionlistentry*|\oarg{float type}\marg{list entry}
% \begin{macrocode}
@@ -5633,7 +5642,7 @@
% \end{macrocode}
% \begin{macrocode}
\newcommand*\caption@listentry[1]{%
- \@ifnextchar[%]
+ \kernel@ifnextchar[%]
{\caption@listentry@{#1}}%
{\caption@@listentry{#1}}}
% \end{macrocode}
@@ -6142,15 +6151,11 @@
%
% \begin{macro}{\caption@dblarg}
% \changes{v3.1}{2007/02/05}{This macro added}
-% \changes{v3.1f}{2007/12/06}{Bugfix 07-12-06: Changed so it works without \cs{kernel@ifnextchar} (which was introduced in \LaTeXe\ 2004/01/23), too}
% \changes{v3.3}{2012/03/25}{Support of option \opt{list-entry} added}
% A |\relax| was added compared to |\@dblarg| so |\caption{}| will be
% expanded to |\caption[\relax]{}| (and not to |\caption[]{}|).
% Furthermore support for option \opt{list-entry} was added.
% \begin{macrocode}
-\@ifundefined{kernel@ifnextchar}{\let\kernel@ifnextchar\@ifnextchar}{}
-% \end{macrocode}
-% \begin{macrocode}
\newcommand\caption@dblarg[1]{%
\kernel@ifnextchar[%]
{\caption@ydblarg{#1}}%
@@ -6302,6 +6307,7 @@
% \changes{v3.4f}{2020/01/03}{Redefinition of \cs{@caption} added since it was redefined by the \env{threeparttable} environment}
% \changes{v3.5}{2020/07/27}{Adapted to \package{caption3} v2.0}
% \changes{v3.6}{2020/09/20}{Handling of flags out-sourced to \cs{caption@stepcounter}}
+% \changes{v3.6d}{2022/04/17}{Usage of \cs{if@subfloatrow} removed in favour of a re-definition of \env{subfloatrow*}}
% Hook, will be used inside \cs{caption@setsubtype}.\par
% (Note: If we are inside an |sub|\-|float|\-|row| environment we have to keep
% the |\@make|\-|caption| code of the \package{floatrow} package intact.)
@@ -6329,14 +6335,8 @@
% \end{macrocode}
% \begin{macrocode}
% redefine \setcaptiontype
- \def\caption@settype{\caption@withoptargs\caption@sub@settype}%
- \def\caption@sub@settype##1##2{%
- \edef\caption@tempa{##2}%
- \ifx\caption@tempa\@captype
-%%% \caption@setsubtype##1\relax
- \else
- \caption@Error{##2 inside \@subcaptype}%
- \fi}%
+ \renewcommand*\caption@settype[1]{%
+ \caption@Error{##1 inside \@subcaptype}}%
% \end{macrocode}
% \begin{macrocode}
% redefine \caption
@@ -6350,32 +6350,11 @@
% \end{macrocode}
% \begin{macrocode}
% restore \@makecaption
- \if@subfloatrow
- \caption@Debug{Keeping \string\@makecaption}%
- \else
- \let\@makecaption\caption@makecaption
- \fi
+ \let\@makecaption\caption@makecaption
\fi}%
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\if@subfloatrow}
-% \changes{v3.2c}{2011/09/30}{This macro added}
-% This macro tests if we are inside an |sub|\-|float|\-|row| or |sub|\-|float|\-|row*| environment.
-% \begin{macrocode}
-\caption@AtBeginDocument{%
- \caption@ifundefined\@subfloatrowtrue
- {\newif\if@subfloatrow
- \caption@ifundefined\subfloatrow
- {}%
- {\caption@Debug{Patching subfloatrow environment}%
- \g@addto@macro\capsubrowsettings{\@subfloatrowtrue}%
- \g@addto@macro\killfloatstyle{%
- \ifx\c@FRobj\c@FRsobj\@subfloatrowtrue\fi}}}%
- {\caption@Debug{\string\if@subfloatrow is already defined}}}%
-% \end{macrocode}
-% \end{macro}
-%
% \begin{macro}{\caption@subcaption}
% Makes a sub-caption.
% \begin{macrocode}
@@ -6646,7 +6625,7 @@
% Used by the \package{fltpage} \& \package{sidecap} package support.
% \begin{macrocode}
\newcommand*\caption@freezetype[1]{%
- \caption@settype*{#1}%
+ \caption@settype{#1}%
\captionsetup*[sub]{hypcap=true}% Note: This is just a (q&d) workaround!
\caption@freeze}%
% \end{macrocode}
@@ -6735,7 +6714,7 @@
% Prevent resetting the caption flags
% \begin{macrocode}
\newcommand*\caption@prepare@defrost{%
- \let\caption@settype\caption@@settype}
+ \def\caption@settype{\caption@@settype{}}}
% \end{macrocode}
% \end{macro}
%
@@ -6776,48 +6755,46 @@
\caption@IfPackageLoaded{changepage}[2008/07/23 memoir-v3.7k]{%
% \end{macrocode}
%
+% \begin{macro}{\caption@patch@adjustwidth}
+% \changes{v3.4k}{2020/05/30}{This macro definition added}
+% \changes{v3.6j}{2023/03/12}{\cs{ignorespaces} added to environment re-definition}
% Both environments, \env{adjustwidth} and \env{adjustwidth*}, are starting a \env{list} \cs{item}.
% But \cs{hsize} isn't set properly inside a \env{list} item, and therefore \cs{@makecaption}
% (offered by document classes) doesn't work properly when used inside \env{adjustwidth}.
-% Therefore we try to detect the situation ``Are we inside a adjustwidth environment?''
+% Therefore we try to detect the situation ``Are we inside a \env{adjustwidth} environment?''
% inside \cs{@makecaption} and fix this. (Sigh!)
+% \begin{macrocode}
+ \providecommand*\caption@patch@adjustwidth[1]{%
+ \expandafter\let\csname caption@#1\expandafter\endcsname\csname #1\endcsname
+ \expandafter\renewcommand\csname #1\endcsname[2]{%
+ \@nameuse{caption@#1}{##1}{##2}%
+ \caption@set@adjustwidth
+ \ignorespaces}}%
+ \caption@patch@adjustwidth{adjustwidth}%
+ \caption@patch@adjustwidth{adjustwidth*}%
+ \let\caption@patch@adjustwidth\relax
+% \end{macrocode}
+% \end{macro}
%
+% \begin{macro}{\caption@set@adjustwidth}
+% \changes{v3.4k}{2020/05/30}{This macro definition added}
+% \changes{v3.5h}{2022/03/01}{Usage of \cs{AtBeginCaption} replaced by \cs{l@addto@macro}\cs{caption@beginex@hook}}
% We cannot simply set and test a flag here since our adjustment to \cs{hsize} should
-% not be done within a \cs{parbox} within a adjustwidth environment for example,
+% not be done within a \cs{parbox} within a \env{adjustwidth} environment for example,
% and therefore we store \cs{hsize} and \cs{linewidth}, and test \cs{hsize} and \cs{linewidth}
% against the stored values instead. If they are equal we are (hopefully) quite save
% to assume that we are now inside a plain \env{adjustwidth} environment and therefore need
% to fix \cs{hsize} before typesetting the caption. (Deep sigh!)
-%
-% \begin{macro}{\caption@adjustwidth@hsize}
-% \begin{macro}{\caption@adjustwidth@linewidth}
% \begin{macrocode}
\newdimen\caption@adjustwidth@hsize
\newdimen\caption@adjustwidth@linewidth
% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\caption@set@adjustwidth}
-% \changes{v3.4k}{2020/05/30}{This macro definition added}
-% \changes{v3.5h}{2022/03/01}{Usage of \cs{AtBeginCaption} replaced by \cs{l@addto@macro}\cs{caption@beginex@hook}}
-% Store the values of \cs{hsize} and \cs{linewidth}.
% \begin{macrocode}
\providecommand*\caption@set@adjustwidth{%
\caption@adjustwidth@hsize\hsize
\caption@adjustwidth@linewidth\linewidth
\l@addto@macro\caption@beginex@hook\caption@test@adjustwidth}%
% \end{macrocode}
-% \begin{macrocode}
- \providecommand*\caption@patch@changepage[1]{%
- \expandafter\let\csname caption@#1\expandafter\endcsname\csname #1\endcsname
- \expandafter\renewcommand\csname #1\endcsname[2]{%
- \@nameuse{caption@#1}{##1}{##2}%
- \caption@set@adjustwidth}}%
- \caption@patch@changepage{adjustwidth}%
- \caption@patch@changepage{adjustwidth*}%
- \let\caption@patch@changepage\relax
-% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\caption@test@adjustwidth}
@@ -6977,30 +6954,42 @@
% \begin{macro}{\caption@float@setname}
% \changes{v3.1}{2007/07/08}{float package hook added}
% \changes{v3.4b}{2019/12/16}{Renamed from \cs{caption@typehook} to \cs{caption@float@setname}}
+% \changes{v3.6i}{2023/02/19}{Uses \cs{def} instead of \cs{let} now}
% \LaTeX\ and almost every other packages use
% |\|\meta{type}|name|
% to provide a macro for the type resp.~environment name -- for example
-% the command |\figurename| will usually contain the name of the floating
+% the command |\figure|\-|name| will usually contain the name of the floating
% environment |figure|:
% \begin{quote}
% |\newcommand\figurename{Figure}|
% \end{quote}
% But the \package{float} package doesn't follow this common naming
% convention:
-% For floats defined with |\newfloat| it uses |\fname@|\meta{type} instead,
-% which breaks with our code (and with |\autoref| and some other things as
+% For floats defined with |\new|\-|float| it uses |\fname@|\meta{type} instead,
+% which breaks with our code (and with |\auto|\-|ref| and some other things as
% well).
% So we have to map the \package{float} package name to the common one here.\par
% \Note{If the float was not defined with \cs{newfloat} but with
% \cs{restylefloat} instead, \cs{fname@}\meta{type} is not defined.}
% \begin{macrocode}
\newcommand*\caption@float@setname[1]{%
- \expandafter\ifx\csname #1name\endcsname\relax
- \expandafter\let\csname #1name\expandafter\endcsname\csname fname@#1\endcsname
+ \expandafter\ifx\csname #1name\endcsname\relax % either undefined or \relax
+ \@namedef{#1name}{\@nameuse{fname@#1}}%
\fi}%
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\caption@setname}
+% \changes{v3.6i}{2023/02/19}{Re-definition of \cs{caption@setname} added to \pkg{float} package support}
+% Same problem as in |\caption@float@set|\-|name|, but other direction:
+% If the option |name=| is used, we should set |\fname@|\meta{type}, too.
+% \begin{macrocode}
+ \renewcommand*\caption@setname[2]{%
+ \@ifundefined{fname@#1}{}{\caption@ifdefined\floatname\floatname\@gobbletwo{#1}{#2}}%
+ \@namedef{#1name}{#2}}%
+% \end{macrocode}
+% \end{macro}
+%
% \changes{v3.0f}{2005/06/26}{Skips of \env{plaintop} and \env{boxed} floats corrected}
% \begin{macro}{\fs@plaintop}
% \begin{macro}{\fs@boxed}
@@ -7138,10 +7127,73 @@
\newcommand*\caption@floatflt[1]{%
\caption@settype{#1}%
\caption@clearmargin
- \caption@setoptions{floating#1}}%
+ \caption@setoptions{floating#1}%
+ \caption@setanchor}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+}{}
+% \end{macrocode}
+%
+% \subsubsection{The floatrow package}
+%
+% \begin{macrocode}
+\caption@IfPackageLoaded{floatrow}[2008/08/02 v0.3b]{%
+% \end{macrocode}
+%
+% \begin{macro}{\captionlabel}
+% \changes{v3.6e}{2022/04/17}{This macro re-definition added}
+% The original definition of |\caption|\-|label| uses the internal macro
+% |\caption@set|\-|sub|\-|type| which does not exist anymore and needs to
+% be replaced by |\set|\-|caption|\-|sub|\-|type|.
+% \begin{macrocode}
+ \renewcommand\captionlabel[1]{{\def\FR@tmp{\@captype}\ifnum\floatbox@depth>\@ne
+ \def\FR@tmp{sub\@captype}\setcaptionsubtype*\stepcounter{\FR@tmp}\fi
+ \caption@@@make{\caption@fnum\FR@tmp}{#1}}}
% \end{macrocode}
% \end{macro}
%
+% \begin{environment}{subfloatrow}
+% \changes{v3.6d}{2022/04/17}{This environment re-definition added}
+% The original definition of the environment |sub|\-|float|\-|row|
+% uses |\caption|\-|setup{sub|\-|type}| to switch caption commands
+% like |\caption| to their counterparts offered by the \pkg{subcaption}
+% package.
+% Since \pkg{caption} \version{3.6} this does not work in coorparation
+% with the \pkg{subfig} package anymore, and therefore we replace it
+% with a hook which could be filled by the \pkg{subcaption} package.
+% \begin{macrocode}
+ \renewenvironment{subfloatrow}{\capsubrowsettings
+ \caption@subfloatrow@hook % as replacement for \captionsetup{subtype}
+ \@nameuse{subfloatrow*}}{\@nameuse{endsubfloatrow*}}
+% \end{macrocode}
+% \begin{macrocode}
+ \providecommand*\caption@subfloatrow@hook{}
+% \end{macrocode}
+% \end{environment}
+%
+% \begin{environment}{subfloatrow*}
+% \changes{v3.6d}{2022/04/17}{This environment re-definition added}
+% Some packages (like the \pkg{float} and \pkg{floatrow} package) re-define
+% |\@make|\-|caption| for special handling of the main caption.
+% Since this usually does not work fine with sub-captions, the command
+% |\set|\-|caption|\-|sub|\-|type| will restore the definition
+% of |\@make|\-|caption|. But this is not desired here, and therefore
+% we make sure that |\flrow@make|\-|caption| will be used for sub-captions,
+% too.
+% \begin{macrocode}
+ \renewenvironment{subfloatrow*}[1][2]{\let\flrow@to\empty
+ \let\Xhsize\sXhsize%\let\Zhsize\sZhsize
+ \FR@ifunloc{\let\FR@ifcountH\@firstoftwo}\let\c@FRobj\c@FRsobj
+ \def\FRleftmargin{}\def\FRrightmargin{}\let\floatrowsep\subfloatrowsep
+ \floatrow[#1]\killfloatstyle
+ \let\caption@makecaption\flrow@makecaption}% <- This line added
+ {\ifdim\lastskip>\z@\unskip\fi
+ \@ifundefined{adjustsubfloats}\relax\adjustsubfloats\endfloatrow}
+% \end{macrocode}
+% \end{environment}
+%
% \begin{macrocode}
}{}
% \end{macrocode}
@@ -7768,6 +7820,7 @@
% \changes{v3.3}{2018/10/05}{Definition of \cs{captionlistentry} fixed}
% \changes{v3.5}{2018/04/15}{Usage of \cs{caption@AtBeginLongtable} added}
% \changes{v3.6}{2022/01/05}{Usage of \cs{caption@Error} replaced by \cs{caption@OutsideFloat}}
+% \changes{v3.6g}{2022/04/18}{Adapted to recent version of \pkg{caption3} package}
% We redefine |\LT@array| here to get |\captionsetup|\marg{options} working inside |longtable|s.
% \Note{Since the \package{hyperref} package patches \cs{LT@array} as well
% and since this only works with the original definition of \cs{LT@array},
@@ -7789,7 +7842,7 @@
\@ifstar\@captionsetup\@captionsetup}% gobble *
\def\@captionsetup#1{\LT@captionsetup{#1}\egroup}%
\def\LT@captionsetup#1{%
- \captionsetup@startrue\caption@setup@options[@longtable]{#1}%
+ \caption@setup@options\@gobble[@longtable]{#1}%
\global\let\caption@opt@@longtable\caption@opt@@longtable}%
% \end{macrocode}
% |\captionlistentry| for longtable:
@@ -7967,7 +8020,7 @@
% \changes{v3.6}{2021/01/17}{Adapted to current implementation of \cs{caption@setwidth}}
% \begin{macrocode}
\newcommand*\caption@LT@settype[1]{%
- \caption@settype*{#1}%
+ \caption@settype{#1}%
% \end{macrocode}
% If |\LTcapwidth| is not set to its default value |4in| we assume
% that it shall overwrite our own setting.
@@ -8060,7 +8113,8 @@
\let\@makecaption\caption@@make
\caption@setautoposition b%
\caption@settype{#1}%
- \caption@clearmargin}%
+ \caption@clearmargin
+ \caption@setanchor}%
% \end{macrocode}
% \end{macro}
%
@@ -8193,6 +8247,7 @@
% \fi
\caption@setoptions{parpic}%
\caption@setautoposition b%
+ \caption@setanchor
% \end{macrocode}
% \begin{macrocode}
\expandafter\expandafter\expandafter\caption@ORI
@@ -8310,6 +8365,82 @@
}{}
% \end{macrocode}
%
+% \subsubsection{The scrextend package}
+% \changes{v3.6j}{2023/03/12}{Patch of the \package{scrextend} package added}
+%
+% \begin{macro}{\caption@IfKomaPackageLoaded}
+% \changes{v3.6j}{2023/03/12}{This macro definition added}
+% \begin{macrocode}
+\caption@ifdefined\scr@caption{%
+ \long\def\caption@IfKomaPackageLoaded#1[#2]#3#4{%
+ \caption@InfoNoLine{KOMA-Script #1 package detected}
+ #3}}{%
+ \let\caption@IfKomaPackageLoaded\caption@IfPackageLoaded
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+\caption@IfKomaPackageLoaded{scrextend}[2002/07/01 v3.0]{%
+% \end{macrocode}
+%
+% \begin{macro}{\caption@patch@addmargin}
+% \changes{v3.6j}{2023/03/12}{This macro definition added}
+% Both environments, \env{addmargin} and \env{addmargin*}, are starting a \env{list} \cs{item}.
+% But \cs{hsize} isn't set properly inside a \env{list} item, and therefore \cs{@makecaption}
+% (offered by document classes) doesn't work properly when used inside \env{addmargin}.
+% Therefore we try to detect the situation ``Are we inside a \env{addmargin} environment?''
+% inside \cs{@makecaption} and fix this. (Sigh!)
+% \begin{macrocode}
+ \let\caption@addmargin@env\@addmargin
+ \renewcommand*\@addmargin{%
+ \@testopt\caption@@addmargin\@tempa}%
+ \def\caption@@addmargin[#1]#2{%
+ \caption@addmargin@env[{#1}]{#2}%
+ \caption@set@addmargin
+ \ignorespaces}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\caption@set@addmargin}
+% \changes{v3.6j}{2023/03/12}{This macro definition added}
+% We cannot simply set and test a flag here since our adjustment to \cs{hsize} should
+% not be done within a \cs{parbox} within a \env{addmargin} environment for example,
+% and therefore we store \cs{hsize} and \cs{linewidth}, and test \cs{hsize} and \cs{linewidth}
+% against the stored values instead. If they are equal we are (hopefully) quite save
+% to assume that we are now inside a plain \env{addmargin} environment and therefore need
+% to fix \cs{hsize} before typesetting the caption. (Deep sigh!)
+% \begin{macrocode}
+ \newdimen\caption@addmargin@hsize
+ \newdimen\caption@addmargin@linewidth
+% \end{macrocode}
+% \begin{macrocode}
+ \providecommand*\caption@set@addmargin{%
+ \caption@addmargin@hsize\hsize
+ \caption@addmargin@linewidth\linewidth
+ \l@addto@macro\caption@beginex@hook\caption@test@addmargin}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\caption@test@addmargin}
+% \changes{v3.6j}{2023/03/12}{This macro definition added}
+% Test if the values of \cs{hsize} and \cs{linewidth} are identical to
+% the ones stored in the \env{addmargin} environment.
+% If yes, set \cs{hsize} to the correct value.
+% \begin{macrocode}
+ \providecommand\caption@test@addmargin{%
+ \ifdim\hsize=\caption@addmargin@hsize
+ \ifdim\linewidth=\caption@addmargin@linewidth
+ \hsize=\linewidth
+ \fi
+ \fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+ }{}%
+% \end{macrocode}
+%
% \subsubsection{The sidecap package}
%
% \begin{macrocode}
@@ -8323,6 +8454,7 @@
% \changes{v3.1c}{2007/10/06}{\cs{caption} will be saved \& restored now}
% \changes{v3.2a}{2011/08/17}{Bugfix: Uses \cs{caption@freeze} instead of \cs{caption@freeze*} now}
% \changes{v3.3}{2013/05/01}{Usage of \cs{caption@freeze} replaced by \cs{caption@freezetype}}
+% \changes{v3.6i}{2022/07/10}{\cs{ignorespaces} appended}
% This macro will be called at the start of the environment, here is a good
% opportunity to do some adaptations to |\caption| and |\captionsetup|.
% \begin{macrocode}
@@ -8336,7 +8468,7 @@
\SC@RestoreCommands
% \end{macrocode}
% Since the sidecap package uses our |\caption| code outside the
-% environment the regular |\captionsetup| will not work.
+% environment the regular |\caption|\-|setup| will not work.
% So we need a special version here which saves the given argument list
% which will be executed later on.
% Furthermore we need to make |\caption*| work.
@@ -8346,7 +8478,12 @@
% The sidecap package uses |\ifx\label\SC@label| to test if it is just inside a
% |SC|\-|figure| or not. So we redefine |\SC@label| here so this test will still work.
% \begin{macrocode}
- \let\SC@label\label}%
+ \let\SC@label\label
+% \end{macrocode}
+% Since the original definition of |\SC@zfloat| ends with |\begin{lrbox}| which ends with |\ignore|\-|spaces|,
+% we do have to end our re-definition of |\SC@zfloat| with |\ignore|\-|spaces| as well.
+% \begin{macrocode}
+ \ignorespaces}%
% \end{macrocode}
% \begin{macrocode}
\providecommand*\SC@RestoreCommands{%
@@ -8497,7 +8634,7 @@
% \end{verbatim}%^^A
% \begin{macrocode}
\long\def\ST@caption#1[#2]#3{\par%
- \caption@settype*{#1}%
+ \caption@settype{#1}%
\caption@setoptions{supertabular}%
% \end{macrocode}
% The |position=| setting will be overwritten by the
@@ -8566,7 +8703,7 @@
% \end{verbatim}%^^A
% \begin{macrocode}
\long\def\ST@caption#1[#2]#3{\par%
- \caption@settype*{#1}%
+ \caption@settype{#1}%
\caption@setoptions{xtabular}%
% \end{macrocode}
% \begin{macrocode}
@@ -8597,29 +8734,44 @@
%
% \begin{macro}{\threeparttable}
% \changes{v3.3}{2016/01/31}{Bugfix: \cs{@captype} will be used if already defined}
+% \changes{v3.6e}{2022/04/17}{Main code outsourced to \cs{caption@setthreeparttable}}
% Unfortunately |\@captype| is not set when |\TPT@common| will be used,
% so we have to redefine |\threeparttable| and |\measuredfigure| instead.
% \begin{macrocode}
\let\caption@ORI@threeparttable\threeparttable
\renewcommand*\threeparttable{%
- \caption@settype{\@ifundefined{@captype}{table}{\@captype}}%
-%%% \caption@setposition{auto}% ?
- \caption@clearmargin
- \caption@setoptions{threeparttable}%
+ \caption@setthreeparttabletype{threepart}{table}%
\caption@ORI@threeparttable}%
% \end{macrocode}
% \end{macro}
+%
% \begin{macro}{\measuredfigure}
% \changes{v3.3}{2016/01/31}{Bugfix: \cs{@captype} will be used if already defined}
+% \changes{v3.6e}{2022/04/17}{Main code outsourced to \cs{caption@setthreeparttable}}
% Same here\ldots
% \begin{macrocode}
\let\caption@ORI@measuredfigure\measuredfigure
\renewcommand*\measuredfigure{%
- \caption@settype{\@ifundefined{@captype}{figure}{\@captype}}%
+ \caption@setthreeparttabletype{measured}{figure}%
+ \caption@ORI@measuredfigure}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\caption@setthreeparttabletype}
+% \changes{v3.6e}{2022/04/17}{Extracted from \cs{threeparttable} and \cs{measuredfigure}}
+% \changes{v3.6e}{2022/04/17}{Support for usage inside \env{subtable} resp.~\env{subfigure} added}
+% |\caption@setthreeparttabletype|\marg{threepart type}\marg{main type}
+% \begin{macrocode}
+ \newcommand*\caption@setthreeparttabletype[2]{%
+ \caption@ifsubtype
+ {\def\caption@threeparttabletype{#1sub#2}%
+ \let\caption@setanchor\relax}%
+ {\caption@settype{\@ifundefined{@captype}{#2}{\@captype}}%
+ \def\caption@threeparttabletype{#1#2}}%
%%% \caption@setposition{auto}% ?
\caption@clearmargin
- \caption@setoptions{measuredfigure}%
- \caption@ORI@measuredfigure}%
+ \caption@setoptions\caption@threeparttabletype
+ \caption@setanchor}%
% \end{macrocode}
% \end{macro}
%
@@ -8724,7 +8876,8 @@
\caption@settype{#1}%
\caption@clearmargin
%%% \caption@setoptions{wrap}%
- \caption@setoptions{wrap#1}}%
+ \caption@setoptions{wrap#1}%
+ \caption@setanchor}%
% \end{macrocode}
% \end{macro}
%
diff --git a/Master/texmf-dist/source/latex/caption/caption.ins b/Master/texmf-dist/source/latex/caption/caption.ins
index 0a45ce53ea6..8215e99acc3 100644
--- a/Master/texmf-dist/source/latex/caption/caption.ins
+++ b/Master/texmf-dist/source/latex/caption/caption.ins
@@ -6,7 +6,7 @@
\preamble
-Copyright (C) 1994-2022 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
+Copyright (C) 1994-2023 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
https://gitlab.com/axelsommerfeldt/caption
diff --git a/Master/texmf-dist/source/latex/caption/caption3.dtx b/Master/texmf-dist/source/latex/caption/caption3.dtx
index 8e4506202a9..5011e0d0b38 100644
--- a/Master/texmf-dist/source/latex/caption/caption3.dtx
+++ b/Master/texmf-dist/source/latex/caption/caption3.dtx
@@ -31,12 +31,12 @@
%
% \fi
%
-% \CheckSum{3813}
+% \CheckSum{3830}
%
% \iffalse
%<*driver>
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesFile{caption3.drv}[2021/01/02 v2.3 Implementation of the caption kernel]
+\ProvidesFile{caption3.drv}[2021/01/02 v2.4 Implementation of the caption kernel]
\hbadness=9999 \newcount\hbadness \hfuzz=100pt % Make TeX shut up.
%\errorcontextlines=3
%
@@ -79,6 +79,7 @@
% \newcommand*\puresf[1]{{\upshape\mdseries\sffamily #1}}
% \newcommand*\purett[1]{{\upshape\mdseries\ttfamily #1}}
% \let\class\puresf \let\package\puresf
+% \let\cls\puresf \let\pkg\puresf
% \let\env\purett \let\opt\purett
%
% \newcommand*\csmarg[1]{\texttt{\char`\{#1\char`\}}}
@@ -264,11 +265,19 @@
%
% Identify the current version of the package.
% \begin{macrocode}
-\ProvidesPackage{caption3}[2022/03/17 v2.3b caption3 kernel (AR)]
+\ProvidesPackage{caption3}[2023/03/12 v2.4 caption3 kernel (AR)]
% \end{macrocode}
%
% \section{Generic helpers}
%
+% \begin{macro}{\kernel@ifnextchar}
+% \changes{v1.1f}{2007/12/06}{Bugfix 07-12-06: This macro definition added (\cs{kernel@ifnextchar} was introduced in \LaTeXe\ 2004/01/23)}
+% \changes{v2.4}{2022/04/18}{This macro moved from package to kernel}
+% \begin{macrocode}
+\@ifundefined{kernel@ifnextchar}{\let\kernel@ifnextchar\@ifnextchar}{}
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\@nameundef}
% |\@nameundef|\marg{command name}\\
% is the opposite to |\@name|\-|def| which is offered by the \LaTeX\ kernel.
@@ -572,6 +581,7 @@
% \begin{macro}{\caption@withoptargs}
% \changes{v1.1}{2007/08/12}{This macro added}
% \changes{v1.5}{2012/04/09}{This macro revised}
+% \changes{v2.4}{2022/04/18}{\cs{@ifnextchar} replaced by \cs{kernel@ifnextchar}}
% |\caption@withoptargs|\marg{cmd}\\
% collects a star and all optional arguments, and expands \meta{cmd}
% afterwards with the collected stuff as first argument.
@@ -583,7 +593,7 @@
% \end{macrocode}
% \begin{macrocode}
\def\caption@@withoptargs#1{%
- \@ifnextchar[%]
+ \kernel@ifnextchar[%]
{\caption@@@withoptargs{#1}}%
{\caption@@@@withoptargs{#1}}}
% \end{macrocode}
@@ -815,15 +825,6 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\ifcaptionsetup@star}
-% \changes{v1.2a}{2008/01/12}{This macro added}
-% If the starred form of |\caption|\-|setup| is used, this will be set to |true|.
-% (It will be reset to |false| at the end of |\caption@set|\-|keys|.)
-% \begin{macrocode}
-\newif\ifcaptionsetup@star
-% \end{macrocode}
-% \end{macro}
-%
% \begin{macro}{\captionsetup}
% \changes{v1.0a}{2004/01/17}{Bugfix: Missing \% added}
% \changes{v1.1}{2007/07/22}{Starred-variant added}
@@ -833,7 +834,9 @@
% \changes{v1.5}{2012/04/09}{Support of multiple optional arguments added}
% \changes{v1.8h}{2020/01/03}{Syntax check of saved options added}
% \changes{v2.3b}{2022/03/17}{Usage of \cs{captionsetup} inside \cs{caption@setup@options@@} replaced by \cs{caption@setup@options@}}
-% |\captionsetup*|\oarg{type}\ldots\marg{keyval-list of options}\\
+% \changes{v2.4}{2022/04/18}{\cs{@ifnextchar} replaced by \cs{kernel@ifnextchar}}
+% \changes{v2.4}{2022/04/18}{Usage of \cs{ifcaptionsetup@star} removed}
+% |\captionsetup*|\oarg{type}\marg{keyval-list of options}\\
% applies the given list of options.
% If the optional argument `type' is specified, we simply save or append
% the option list, otherwise we `execute' it with |\set|\-|keys|.
@@ -846,32 +849,32 @@
% \end{macrocode}
% \begin{macrocode}
\newcommand*\@captionsetup[1]{%
- \captionsetup@startrue#1\captionsetup@starfalse
- \@ifnextchar[%]
- \caption@setup@options\caption@setup}
+ \kernel@ifnextchar[%]
+ {\caption@setup@options#1}%
+ {\caption@setup}}
% \end{macrocode}
% \begin{macrocode}
\newcommand*\caption@setup{%
\caption@setkeys{caption}}
% \end{macrocode}
% \begin{macrocode}
-\def\caption@setup@options[#1]{%
- \@ifnextchar[%]
+\def\caption@setup@options#1[#2]{%
+ \kernel@ifnextchar[%]
{\caption@stepthecounter
- \@expandtwoargs\caption@setup@options@@{#1}{@\caption@thecounter}}%
- {\caption@setup@options@{#1}}}
+ \@expandtwoargs\caption@setup@options@@{#2}{@\caption@thecounter}#1}%
+ {\caption@setup@options@#1{#2}}}
% \end{macrocode}
% \begin{macrocode}
-\def\caption@setup@options@@#1#2[#3]#4{%
- \caption@declare@option{#2}[]{\caption@setup@options@{#3}{#4}}%
- \caption@setup@options@{#1}{#2}}
+\def\caption@setup@options@@#1#2#3[#4]#5{%
+ \caption@declare@option{#2}[]{\caption@setup@options@\@gobble{#4}{#5}}%
+ \caption@setup@options@#3{#1}{#2}}
% \end{macrocode}
% \begin{macrocode}
-\newcommand*\caption@setup@options@[2]{%
+\newcommand*\caption@setup@options@[3]{%
\@bsphack
- \ifcaptionsetup@star\captionsetup@starfalse\else\caption@addtooptlist{#1}\fi
- \caption@checkoptions{#2}%
- \expandafter\caption@l@addto@list\csname caption@opt@#1\endcsname{#2}%
+ #1{\caption@addtooptlist{#2}}%
+ \caption@checkoptions{#3}%
+ \expandafter\caption@l@addto@list\csname caption@opt@#2\endcsname{#3}%
\@esphack}
% \end{macrocode}
% \end{macro}
@@ -1075,6 +1078,7 @@
% \changes{v1.2a}{2008/01/12}{\cs{captionsetup@starfalse} added}
% \changes{v1.2d}{2009/09/30}{Bugfix 09-09-29: Missing error handler will be defined automatically}
% \changes{v1.4}{2011/08/24}{Redefinition of \cs{XKV@err} added}
+% \changes{v2.4}{2022/04/18}{\cs{captionsetup@starfalse} removed}
% |\caption@setkeys|\oarg{package}\marg{family}\marg{key-values}\\
% expands to |\setkeys|\marg{family}\marg{key-values},
% but lets the error messages not refer to the \package{keyval} package
@@ -1112,9 +1116,6 @@
\expandafter\let\expandafter\XKV@err\csname ORI@XKV@err\caption@keydepth\endcsname
% \end{macrocode}
% \begin{macrocode}
- \ifx\caption@keydepth\@empty \captionsetup@starfalse \fi
-% \end{macrocode}
-% \begin{macrocode}
\@esphack}
% \end{macrocode}
% \begin{macrocode}
@@ -1408,6 +1409,7 @@
%
% \begin{macro}{\caption@decl@package}
% \changes{v2.0}{2020/07/26}{This macro added}
+% \changes{v2.4}{2022/04/18}{\cs{@ifnextchar} replaced by \cs{kernel@ifnextchar}}
% |\caption@decl@package|\marg{option}\marg{cmd}\oarg{package}\marg{name}\ldots\\
% Helper command to declare a caption package option value which is dependent
% on the existence of a specific package, for example the |font| value
@@ -1415,7 +1417,7 @@
% package.
% \begin{macrocode}
\newcommand*\caption@decl@package[2]{%
- \@ifnextchar[%]
+ \kernel@ifnextchar[%]
{\caption@declare@package{#1}{#2}}%
{\caption@declarepackage{#1}{#2}}}
\@onlypreamble\caption@decl@package
@@ -1690,6 +1692,7 @@
% \changes{v1.0n}{2007/04/03}{This counter added}
% \changes{v1.1e}{2007/10/28}{Renamed from \cs{caption@counter} to \cs{caption@thecounter}; \cs{caption@stepcounter} added}
% \changes{v1.5}{2012/04/09}{\cs{caption@stepcounter} renamed to \cs{caption@stepthecounter}}
+% \changes{v2.4}{2023/03/12}{Definition of \cs{caption@ifoddpage} added to \cs{caption@stepthecounter}}
% Internal counter.
% At the moment it will be used inside |\caption@if|\-|odd|\-|page| only.
% \begin{macrocode}
@@ -1699,7 +1702,8 @@
\newcommand*\caption@stepthecounter{%
\@tempcnta\caption@thecounter
\advance\@tempcnta\@ne\relax
- \xdef\caption@thecounter{\the\@tempcnta}}
+ \xdef\caption@thecounter{\the\@tempcnta}%
+ \global\let\caption@ifoddpage\caption@ifoddpage@}
% \end{macrocode}
% \end{macro}
%
@@ -1746,7 +1750,8 @@
%
% \begin{macro}{\caption@pageref}
% \changes{v1.1}{2007/09/01}{This macro added}
-% \changes{v1.2d}{2009/10/09}{Uses \cs{@latex@warning} instead of \cs{caption@Warning} now}
+% \changes{v1.2d}{2009/10/09}{Uses \cs{@latex@warning} instead of \cs{caption@Warning}}
+% \changes{v2.4}{2023/03/12}{The warning refers to \texttt{caption@NUM} instead of \texttt{NUM}}
% |\caption@pageref|\marg{name}\\
% This command is a modified version of |\page|\-|ref| from \LaTeX2e.
% It will be used inside |\caption@if|\-|odd|\-|page| and |\FP@help|\-|Note|.
@@ -1754,7 +1759,7 @@
\newcommand*\caption@pageref[1]{%
\expandafter\ifx\csname caption@r@#1\endcsname\relax
\G@refundefinedtrue % => 'There are undefined references.'
- \@latex@warning{Reference `#1' on page \thepage \space undefined}%
+ \@latex@warning{Reference `caption@#1' on page \thepage \space undefined}%
\else
\expandafter\let\expandafter\caption@thepage\csname caption@r@#1\endcsname
\fi}
@@ -1764,24 +1769,25 @@
% \begin{macro}{\caption@ifoddpage}
% \changes{v1.0n}{2007/04/03}{This macro added}
% \changes{v1.1e}{2007/10/28}{Incrementation of counter moved to \cs{caption@@make}}
+% \changes{v2.4}{2023/03/12}{Multiple use for the same counter will be handled correctly}
% Currently this macro uses an own label\ldots ref mechanism,
% but an alternative implementation method would use the
% \package{refcount} package\cite{refcount} and
% |\ifodd\get|\-|page|\-|ref|\-|number{|\ldots|}|.
% Maybe we will change that in a later release.
-% \Note{This macro re-defines itself so the \texttt{.aux} file will
-% only be used once per group.}
+% \Note{This macro re-defines itself so the \texttt{.aux} file will only be used once per group.
+% This re-definition will be reset in \cs{caption@stepthecounter}.}
% \begin{macrocode}
-\newcommand*\caption@ifoddpage{%
+\newcommand*\caption@ifoddpage@{%
\caption@iftwoside{%
\caption@label\caption@thecounter
\caption@pageref\caption@thecounter
\ifodd\caption@thepage
- \let\caption@ifoddpage\@firstoftwo
+ \global\let\caption@ifoddpage\@firstoftwo
\else
- \let\caption@ifoddpage\@secondoftwo
+ \global\let\caption@ifoddpage\@secondoftwo
\fi
- }{\let\caption@ifoddpage\@firstoftwo}%
+ }{\global\let\caption@ifoddpage\@firstoftwo}%
% \end{macrocode}
% \begin{macrocode}
\caption@ifoddpage}
@@ -2281,7 +2287,7 @@
% \begin{quote}
% |\renewcommand\fnum@figure[1]{\ignorespaces}|\quad
% \end{quote}
-% (taken from \url{http://compgroups.net/comp.text.tex/figure-without-caption/1915079}).
+% (taken from \url{https://comp.text.tex.narkive.com/XkJnYryR/figure-without-caption}).
%
% We emulate the behaviour of |\@make|\-|caption| of the base document classes
% \class{article}, \class{report}, and \class{book} in this regard (in |\caption@@@make|)
@@ -4387,6 +4393,7 @@
% \changes{v1.3}{2011/07/07}{This macro added}
% \changes{v1.4a}{2011/10/22}{This macro revised}
% \changes{v2.3}{2021/07/03}{This macro re-written}
+% \changes{v2.4}{2022/04/18}{\cs{@ifnextchar} replaced by \cs{kernel@ifnextchar}}
% The following code was taken from |base/ltfloat.dtx| but |\step|\-|counter|
% is replaced by |\caption@l@step|\-|counter| so the footnote counter will
% only be incremented temporarily for the single-line-check.
@@ -4397,7 +4404,7 @@
% be sufficient for the single-line-check.))
% \begin{macrocode}
\newcommand*\caption@footnote{%
- \@ifnextchar[%]
+ \kernel@ifnextchar[%]
\@xfootnote
{\caption@l@stepcounter\@mpfn
\protected@xdef\@thefnmark{\thempfn}%
@@ -4408,12 +4415,13 @@
% \begin{macro}{\caption@footnotemark}
% \changes{v1.3}{2011/07/07}{This macro added}
% \changes{v2.3}{2021/07/03}{This macro re-written}
+% \changes{v2.4}{2022/04/18}{\cs{@ifnextchar} replaced by \cs{kernel@ifnextchar}}
% The following code was taken from |base/ltfloat.dtx| but |\step|\-|counter|
% is replaced by |\caption@l@step|\-|counter| so the footnote counter will
% only be incremented temporarily for the single-line-check.
% \begin{macrocode}
\newcommand*\caption@footnotemark{%
- \@ifnextchar[%]
+ \kernel@ifnextchar[%]
\@xfootnotemark
{\caption@l@stepcounter{footnote}%
\protected@xdef\@thefnmark{\thefootnote}%
@@ -4423,10 +4431,11 @@
%
% \begin{macro}{\caption@footnotetext}
% \changes{v2.3}{2021/07/03}{This macro added}
+% \changes{v2.4}{2022/04/18}{\cs{@ifnextchar} replaced by \cs{kernel@ifnextchar}}
% The following code was taken from |base/ltfloat.dtx|.
% \begin{macrocode}
\newcommand*\caption@footnotetext{%
- \@ifnextchar[%]
+ \kernel@ifnextchar[%]
\@xfootnotenext
{\protected@xdef\@thefnmark{\thempfn}%
\@footnotetext}}
@@ -4436,6 +4445,7 @@
% \begin{macro}{\caption@endnote}
% \changes{v1.8}{2018/01/21}{This macro added}
% \changes{v2.3}{2021/07/03}{This macro re-written}
+% \changes{v2.4}{2022/04/18}{\cs{@ifnextchar} replaced by \cs{kernel@ifnextchar}}
% The following code was taken from |endnotes/endnotes.sty| but |\step|\-|counter|
% is replaced by |\caption@l@step|\-|counter| so the footnote counter will
% only be incremented temporarily for the single-line-check.
@@ -4443,7 +4453,7 @@
% |\step|\-|counter|.)
% \begin{macrocode}
\newcommand*\caption@endnote{%
- \@ifnextchar[%]
+ \kernel@ifnextchar[%]
\@xendnote
{\caption@l@stepcounter{endnote}%
\protected@xdef\@theenmark{\theendnote}%
@@ -4454,12 +4464,13 @@
% \begin{macro}{\caption@endnotemark}
% \changes{v1.8}{2018/01/21}{This macro added}
% \changes{v2.3}{2021/07/03}{This macro re-written}
+% \changes{v2.4}{2022/04/18}{\cs{@ifnextchar} replaced by \cs{kernel@ifnextchar}}
% The following code was taken from |endnotes/endnotes.sty| but |\step|\-|counter|
% is replaced by |\caption@l@step|\-|counter| so the footnote counter will
% only be incremented temporarily for the single-line-check.
% \begin{macrocode}
\newcommand*\caption@endnotemark{%
- \@ifnextchar[%]
+ \kernel@ifnextchar[%]
\@xendnotemark
{\caption@l@stepcounter{endnote}%
\protected@xdef\@theenmark{\theendnote}%
@@ -4469,10 +4480,11 @@
%
% \begin{macro}{\caption@endnotetext}
% \changes{v2.3}{2021/07/03}{This macro added}
+% \changes{v2.4}{2022/04/18}{\cs{@ifnextchar} replaced by \cs{kernel@ifnextchar}}
% The following code was taken from |endnotes/endnotes.sty|.
% \begin{macrocode}
\newcommand*\caption@endnotetext{%
- \@ifnextchar[%]
+ \kernel@ifnextchar[%]
\@xendnotenext
{\protected@xdef\@theenmark{\theendnote}%
\@endnotetext}}
@@ -4753,6 +4765,8 @@
% \changes{v1.13}{2020/07/28}{Uses \cs{caption@l@addto@list} instead of \cs{@cons} now}
% \changes{v1.13}{2020/07/29}{Usage of \cs{caption@subtype@hook} added}
% \changes{v1.13}{2020/07/29}{We don't re-use existing counters anymore (This was a bad idea anyway)}
+% \changes{v1.13b}{2022/04/06}{We don't re-use existing counters anymore (Part 2)}
+% \changes{v2.4}{2022/04/06}{If a counter is already defined the counter source will be included in the resulting error message}
% |\DeclareCaptionSubType*|\oarg{numbering scheme}\marg{type}\\
% The starred variant provides the numbering format
% \meta{type}|.|\meta{subtype} while the non-starred variant simply uses
@@ -4764,7 +4778,7 @@
% \end{macrocode}
% \begin{macrocode}
\newcommand*\caption@declaresubtype[1]{%
- \@testopt{\caption@@declaresubtype{#1}}{alph}}
+ \@testopt{\caption@@declaresubtype#1}{alph}}
\@onlypreamble\caption@declaresubtype
% \end{macrocode}
% \begin{macrocode}
@@ -4782,28 +4796,37 @@
% If not, define the counter and list entry.
% \begin{macrocode}
\caption@ifdefined@subtype{#4}%
- {\caption@Debug{Modify subtype `#4'}}%
- {\caption@Debug{New subtype `#4'}%
- \newcounter{#4}[{#3}]%
- \@namedef{ext@#4}{\csname ext@#3\endcsname}%
- \caption@declaresublistentry{#3}%
- \caption@l@addto@list\caption@subtypelist{#4}%
- \caption@subtype@hook{#4}}%
+ {\caption@Info{Modify subtype `#4'}}%
+ {\caption@Info{New subtype `#4'}%
+ \@ifundefined{c@#4}%
+ {\newcounter{#4}[#3]%
+ \@namedef{#4name}{}%
+ \@namedef{#4autorefname}{\csname #3autorefname\endcsname}%
+% \end{macrocode}
+% \begin{macrocode}
+ \@namedef{ext@#4}{\csname ext@#3\endcsname}%
+ \caption@declaresublistentry{#3}%
% \end{macrocode}
% Support of \package{titletoc} package
% \begin{macrocode}
- \caption@ifdefined\contentsuse{%
- \contentsuse{#4}{\csname ext@#4\endcsname}}{}%
+ \caption@ifdefined\contentsuse{%
+ \contentsuse{#4}{\csname ext@#4\endcsname}}{}%
% \end{macrocode}
% \begin{macrocode}
- \@namedef{#4name}{}%
- \@namedef{#4autorefname}{\csname #3autorefname\endcsname}%
- #1% is \@firstoftwo in star form, and \@secondoftwo otherwise
+ \caption@l@addto@list\caption@subtypelist{#4}%
+ \caption@subtype@hook{#4}}%
+% \end{macrocode}
+% \begin{macrocode}
+ {\caption@subtypesource\caption@subtype@source{#4}%
+ \caption@Error{The counter `#4' was already defined by\MessageBreak\caption@subtype@source}}}%
+% \end{macrocode}
+% \begin{macrocode}
+ #1% is \@firstoftwo in star form, and \@secondoftwo otherwise
{\@namedef{p@#4}{}%
\@namedef{the#4}{\csname the#3\endcsname.\@nameuse{#2}{#4}}}%
{\@namedef{p@#4}{\csname the#3\endcsname}%
\@namedef{the#4}{\@nameuse{#2}{#4}}}%
- \@namedef{theH#4}{\csname theH#3\endcsname.\arabic{#4}}}
+ \@namedef{theH#4}{\csname theH#3\endcsname.\arabic{#4}}}
% \end{macrocode}
% \begin{macrocode}
\@onlypreamble\caption@@@declaresubtype
@@ -4887,6 +4910,21 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\caption@subtypesource}
+% \changes{v2.4}{2022/04/06}{This macro definition added}
+% |\caption@subtypesource|\marg{cmd}\marg{sub-type}\\
+% is used by |\Declare|\-|Caption|\-|Sub|\-|Type| to indicate what command and package
+% has defined the given sub-type.
+% \begin{macrocode}
+\newcommand*\caption@subtypesource[2]{%
+ \caption@ifdefined@subtype{#2}%
+ {\def#1{\noexpand\DeclareCaptionSubType (offered by the caption package)}}%
+ {\caption@ifin@list\sf@counterlist{#2}%
+ {\def#1{\noexpand\newsubfloat (offered by the subfig package)}}%
+ {\def#1{an unknown document class or package}}}}
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\ForEachCaptionSubType}
% \changes{v1.13}{2020/07/29}{This macro added as replacement for \cs{caption@For}}
% |\ForEachCaptionSubType*|\marg{code with \#1}\\
diff --git a/Master/texmf-dist/source/latex/caption/fallback/v3.0/caption.dtx b/Master/texmf-dist/source/latex/caption/fallback/v3.0/caption.dtx
index bbdedad42c7..e6e44341874 100644
--- a/Master/texmf-dist/source/latex/caption/fallback/v3.0/caption.dtx
+++ b/Master/texmf-dist/source/latex/caption/fallback/v3.0/caption.dtx
@@ -23,7 +23,7 @@
% caption.sty, caption2.sty, caption3.sty, and manual.tex.
%
% \fi
-% \CheckSum{2178}
+% \CheckSum{2179}
%
% \iffalse
%<*driver>
@@ -3506,7 +3506,7 @@
%
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption}[2007/04/16 v3.0q Customising captions (AR)]
+\ProvidesPackage{caption}[2022/07/10 v3.0r Customising captions (AR)]
% \end{macrocode}
%
% \subsubsection*{Loading the kernel}
@@ -4893,8 +4893,9 @@
% \begin{macro}{\SC@zfloat}
% \changes{v3.0b}{2004/05/16}{Local definition of \cs{captionsetup} added}
% \changes{v3.0c}{2004/07/16}{Bugfix 04-07-15: Check for \cs{caption@caption} removed}
+% \changes{v3.0r}{2022/07/10}{\cs{ignorespaces} appended}
% This macro will be called at the start of the environment, here is a good
-% opportunity to do some adaptations to |\caption| and |\captionsetup|.
+% opportunity to do some adaptations to |\caption| and |\caption|\-|setup|.
% \begin{macrocode}
\let\caption@SC@zfloat\SC@zfloat
\def\SC@zfloat#1#2#3[#4]{%
@@ -4907,7 +4908,7 @@
% \end{macrocode}
%
% Since the sidecap package uses our |\caption| code outside the
-% floating environment the regular |\captionsetup| will not work.
+% floating environment the regular |\caption|\-|setup| will not work.
% So we need a special version here which saves the given argument list
% which will be executed later on.
% \begin{macrocode}
@@ -4920,7 +4921,12 @@
\let\caption@SC\caption
% \def\caption{\renewcommand\captionsetup[1]{}\caption@caption\caption@SC}%
\def\caption{\caption@caption\caption@SC}%
- }%
+% \end{macrocode}
+%
+% Since the original definition of |\SC@zfloat| ends with |\begin{lrbox}| which ends with |\ignore|\-|spaces|,
+% we do have to end our re-definition of |\SC@zfloat| with |\ignore|\-|spaces| as well.
+% \begin{macrocode}
+ \ignorespaces}%
% \end{macrocode}
% \end{macro}
%
diff --git a/Master/texmf-dist/source/latex/caption/fallback/v3.1/caption.dtx b/Master/texmf-dist/source/latex/caption/fallback/v3.1/caption.dtx
index 17322ede2bc..533adf34496 100644
--- a/Master/texmf-dist/source/latex/caption/fallback/v3.1/caption.dtx
+++ b/Master/texmf-dist/source/latex/caption/fallback/v3.1/caption.dtx
@@ -24,7 +24,7 @@
% user manuals caption-deu.tex, caption-eng.tex, and caption-rus.tex.
%
% \fi
-% \CheckSum{7218}
+% \CheckSum{7219}
%
% \iffalse
%<*driver>
@@ -3757,7 +3757,7 @@
%
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption}[2010/01/09 v3.1m Customizing captions (AR)]
+\ProvidesPackage{caption}[2022/07/10 v3.1n Customizing captions (AR)]
%\@ifundefined{PackageRedefines}{}{\PackageRedefines{caption}{caption}}
% \end{macrocode}
%
@@ -7324,6 +7324,7 @@
% \changes{v3.0b}{2004/05/16}{Local definition of \cs{captionsetup} added}
% \changes{v3.0c}{2004/07/16}{Bugfix 04-07-15: Check for \cs{caption@star} removed}
% \changes{v3.1c}{2007/10/06}{\cs{caption} will be saved \& restored now}
+% \changes{v3.1n}{2022/07/10}{\cs{ignorespaces} appended}
% This macro will be called at the start of the environment, here is a good
% opportunity to do some adaptations to |\caption| and |\captionsetup|.
% \begin{macrocode}
@@ -7338,13 +7339,18 @@
\let\caption\caption@ORI
% \end{macrocode}
% Since the sidecap package uses our |\caption| code outside the
-% environment the regular |\captionsetup| will not work.
+% environment the regular |\caption|\-|setup| will not work.
% So we need a special version here which saves the given argument list
% which will be executed later on.
% Furthermore we need to make |\caption*| work.
% \begin{macrocode}
\caption@settype*{#2}%
- \caption@freeze*}%
+ \caption@freeze*%
+% \end{macrocode}
+% Since the original definition of |\SC@zfloat| ends with |\begin{lrbox}| which ends with |\ignore|\-|spaces|,
+% we do have to end our re-definition of |\SC@zfloat| with |\ignore|\-|spaces| as well.
+% \begin{macrocode}
+ \ignorespaces}%
% \end{macrocode}
% \end{macro}
%
diff --git a/Master/texmf-dist/source/latex/caption/fallback/v3.2/caption.dtx b/Master/texmf-dist/source/latex/caption/fallback/v3.2/caption.dtx
index 0936d973067..e2d7d08ea70 100644
--- a/Master/texmf-dist/source/latex/caption/fallback/v3.2/caption.dtx
+++ b/Master/texmf-dist/source/latex/caption/fallback/v3.2/caption.dtx
@@ -25,7 +25,7 @@
% and the user manuals caption-deu.tex, caption-eng.tex, and caption-rus.tex.
%
% \fi
-% \CheckSum{3534}
+% \CheckSum{3535}
%
% \iffalse
%<*driver>
@@ -220,7 +220,7 @@
%
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption}[2011/11/10 v3.2e Customizing captions (AR)]
+\ProvidesPackage{caption}[2022/07/10 v3.2f Customizing captions (AR)]
%\@ifundefined{PackageRedefines}{}{\PackageRedefines{caption}{caption}}
% \end{macrocode}
%
@@ -3955,6 +3955,7 @@
% \changes{v3.0c}{2004/07/16}{Bugfix 04-07-15: Check for \cs{caption@star} removed}
% \changes{v3.1c}{2007/10/06}{\cs{caption} will be saved \& restored now}
% \changes{v3.2a}{2011/08/17}{Bugfix: Uses \cs{caption@freeze} instead of \cs{caption@freeze*} now}
+% \changes{v3.2f}{2022/07/10}{\cs{ignorespaces} appended}
% This macro will be called at the start of the environment, here is a good
% opportunity to do some adaptations to |\caption| and |\captionsetup|.
% \begin{macrocode}
@@ -3968,7 +3969,7 @@
\SC@RestoreCommands
% \end{macrocode}
% Since the sidecap package uses our |\caption| code outside the
-% environment the regular |\captionsetup| will not work.
+% environment the regular |\caption|\-|setup| will not work.
% So we need a special version here which saves the given argument list
% which will be executed later on.
% Furthermore we need to make |\caption*| work.
@@ -3979,7 +3980,12 @@
% The sidecap package uses |\ifx\label\SC@label| to test if it is just inside a
% |SC|\-|figure| or not. So we redefine |\SC@label| here so this test will still work.
% \begin{macrocode}
- \let\SC@label\label}%
+ \let\SC@label\label
+% \end{macrocode}
+% Since the original definition of |\SC@zfloat| ends with |\begin{lrbox}| which ends with |\ignore|\-|spaces|,
+% we do have to end our re-definition of |\SC@zfloat| with |\ignore|\-|spaces| as well.
+% \begin{macrocode}
+ \ignorespaces}%
% \end{macrocode}
% \begin{macrocode}
\providecommand*\SC@RestoreCommands{%
diff --git a/Master/texmf-dist/source/latex/caption/fallback/v3.3/caption.dtx b/Master/texmf-dist/source/latex/caption/fallback/v3.3/caption.dtx
index 7ab24aeaac7..b3110227347 100644
--- a/Master/texmf-dist/source/latex/caption/fallback/v3.3/caption.dtx
+++ b/Master/texmf-dist/source/latex/caption/fallback/v3.3/caption.dtx
@@ -25,7 +25,7 @@
% and the user manuals caption-deu.tex, caption-eng.tex, and caption-rus.tex.
%
% \fi
-% \CheckSum{3694}
+% \CheckSum{3695}
%
% \iffalse
%<*driver>
@@ -220,7 +220,7 @@
%
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption}[2019/09/01 v3.3d Customizing captions (AR)]
+\ProvidesPackage{caption}[2022/07/10 v3.3e Customizing captions (AR)]
% \end{macrocode}
%
% \subsection{Loading the kernel}
@@ -4411,6 +4411,7 @@
% \changes{v3.1c}{2007/10/06}{\cs{caption} will be saved \& restored now}
% \changes{v3.2a}{2011/08/17}{Bugfix: Uses \cs{caption@freeze} instead of \cs{caption@freeze*} now}
% \changes{v3.3}{2013/05/01}{Usage of \cs{caption@freeze} replaced by \cs{caption@freezetype}}
+% \changes{v3.3e}{2022/07/10}{\cs{ignorespaces} appended}
% This macro will be called at the start of the environment, here is a good
% opportunity to do some adaptations to |\caption| and |\captionsetup|.
% \begin{macrocode}
@@ -4424,7 +4425,7 @@
\SC@RestoreCommands
% \end{macrocode}
% Since the sidecap package uses our |\caption| code outside the
-% environment the regular |\captionsetup| will not work.
+% environment the regular |\caption|\-|setup| will not work.
% So we need a special version here which saves the given argument list
% which will be executed later on.
% Furthermore we need to make |\caption*| work.
@@ -4434,7 +4435,12 @@
% The sidecap package uses |\ifx\label\SC@label| to test if it is just inside a
% |SC|\-|figure| or not. So we redefine |\SC@label| here so this test will still work.
% \begin{macrocode}
- \let\SC@label\label}%
+ \let\SC@label\label
+% \end{macrocode}
+% Since the original definition of |\SC@zfloat| ends with |\begin{lrbox}| which ends with |\ignore|\-|spaces|,
+% we do have to end our re-definition of |\SC@zfloat| with |\ignore|\-|spaces| as well.
+% \begin{macrocode}
+ \ignorespaces}%
% \end{macrocode}
% \begin{macrocode}
\providecommand*\SC@RestoreCommands{%
diff --git a/Master/texmf-dist/source/latex/caption/fallback/v3.3/caption3.dtx b/Master/texmf-dist/source/latex/caption/fallback/v3.3/caption3.dtx
index 645c190d78d..aa263663337 100644
--- a/Master/texmf-dist/source/latex/caption/fallback/v3.3/caption3.dtx
+++ b/Master/texmf-dist/source/latex/caption/fallback/v3.3/caption3.dtx
@@ -2,7 +2,7 @@
%
% This is file `caption3.dtx'.
%
-% Copyright (C) 1994-2019 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
+% Copyright (C) 1994-2022 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
%
% --------------------------------------------------------------------------
%
@@ -25,7 +25,7 @@
% and the user manuals caption-deu.tex, caption-eng.tex, and caption-rus.tex.
%
% \fi
-% \CheckSum{3961}
+% \CheckSum{3960}
%
% \iffalse
%<*driver>
@@ -198,7 +198,7 @@
%
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption3}[2019/09/01 v1.8d caption3 kernel (AR)]
+\ProvidesPackage{caption3}[2022/03/17 v1.8i caption3 kernel (AR)]
% \end{macrocode}
%
% \subsection{Workaround for bug in package \package{arabtex}}
@@ -765,6 +765,7 @@
% \changes{v1.2}{2007/11/16}{Bugfix 07-11-09: `space hack' added}
% \changes{v1.2a}{2008/01/12}{\cs{ifcaptionsetup@star} will be set now}
% \changes{v1.5}{2012/04/09}{Support of multiple optional arguments added}
+% \changes{v1.8i}{2022/03/17}{Usage of \cs{captionsetup} inside \cs{caption@setup@options@@} replaced by \cs{caption@setup@options@}}
% |\captionsetup|\oarg{type}\ldots\marg{keyval-list of options}\\
% |\captionsetup*|\oarg{type}\ldots\marg{keyval-list of options}\par
% If the optional argument `type' is specified, we simply save or append
@@ -782,20 +783,20 @@
\@ifnextchar[\caption@setup@options\caption@setup}
% \end{macrocode}
% \begin{macrocode}
-\newcommand*\caption@setup{\caption@setkeys{caption}}
+\newcommand*\caption@setup{%
+ \caption@setkeys{caption}}
% \end{macrocode}
% \begin{macrocode}
\def\caption@setup@options[#1]{%
- \@ifnextchar[%
+ \@ifnextchar[%]
{\caption@stepthecounter
- \caption@withoptargs{\@expandtwoargs
- \caption@setup@options@i{#1}{@\caption@thecounter}}}%
+ \@expandtwoargs\caption@setup@options@@{#1}{@\caption@thecounter}}%
{\caption@setup@options@{#1}}}
% \end{macrocode}
% \begin{macrocode}
-\newcommand*\caption@setup@options@i[4]{%
- \caption@setup@options@{#1}{#2}%
- \caption@declare@option{#2}[]{\captionsetup#3{#4}}}
+\def\caption@setup@options@@#1#2[#3]#4{%
+ \caption@declare@option{#2}[]{\caption@setup@options@{#3}{#4}}%
+ \caption@setup@options@{#1}{#2}}
% \end{macrocode}
% \begin{macrocode}
\newcommand*\caption@setup@options@[2]{%
diff --git a/Master/texmf-dist/source/latex/caption/fallback/v3.4/caption.dtx b/Master/texmf-dist/source/latex/caption/fallback/v3.4/caption.dtx
index 1e3f79d752b..baab32006e7 100644
--- a/Master/texmf-dist/source/latex/caption/fallback/v3.4/caption.dtx
+++ b/Master/texmf-dist/source/latex/caption/fallback/v3.4/caption.dtx
@@ -218,8 +218,7 @@
%
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-%\ProvidesPackage{caption}[2020/07/29 v3.4m Customizing captions (AR)]
-\ProvidesPackage{caption}[2020/09/28 v3.4n Customizing captions (AR)] % Backport of commit 43567491e5b075d661c080bca298f5428f289758 from 2020/09/28
+\ProvidesPackage{caption}[2022/07/10 v3.4o Customizing captions (AR)]
% \end{macrocode}
%
% \section{Loading the kernel}
@@ -3981,6 +3980,7 @@
% \changes{v3.1c}{2007/10/06}{\cs{caption} will be saved \& restored now}
% \changes{v3.2a}{2011/08/17}{Bugfix: Uses \cs{caption@freeze} instead of \cs{caption@freeze*} now}
% \changes{v3.3}{2013/05/01}{Usage of \cs{caption@freeze} replaced by \cs{caption@freezetype}}
+% \changes{v3.4o}{2022/07/10}{\cs{ignorespaces} appended}
% This macro will be called at the start of the environment, here is a good
% opportunity to do some adaptations to |\caption| and |\captionsetup|.
% \begin{macrocode}
@@ -3994,7 +3994,7 @@
\SC@RestoreCommands
% \end{macrocode}
% Since the sidecap package uses our |\caption| code outside the
-% environment the regular |\captionsetup| will not work.
+% environment the regular |\caption|\-|setup| will not work.
% So we need a special version here which saves the given argument list
% which will be executed later on.
% Furthermore we need to make |\caption*| work.
@@ -4004,7 +4004,12 @@
% The sidecap package uses |\ifx\label\SC@label| to test if it is just inside a
% |SC|\-|figure| or not. So we redefine |\SC@label| here so this test will still work.
% \begin{macrocode}
- \let\SC@label\label}%
+ \let\SC@label\label
+% \end{macrocode}
+% Since the original definition of |\SC@zfloat| ends with |\begin{lrbox}| which ends with |\ignore|\-|spaces|,
+% we do have to end our re-definition of |\SC@zfloat| with |\ignore|\-|spaces| as well.
+% \begin{macrocode}
+ \ignorespaces}%
% \end{macrocode}
% \begin{macrocode}
\providecommand*\SC@RestoreCommands{%
diff --git a/Master/texmf-dist/source/latex/caption/fallback/v3.4/caption3.dtx b/Master/texmf-dist/source/latex/caption/fallback/v3.4/caption3.dtx
index 5bf40979cb9..e48179022bd 100644
--- a/Master/texmf-dist/source/latex/caption/fallback/v3.4/caption3.dtx
+++ b/Master/texmf-dist/source/latex/caption/fallback/v3.4/caption3.dtx
@@ -2,7 +2,7 @@
%
% This is file `caption3.dtx'.
%
-% Copyright (C) 1994-2020 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
+% Copyright (C) 1994-2022 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
%
% --------------------------------------------------------------------------
%
@@ -28,7 +28,7 @@
% caption-deu.tex, caption-eng.tex, caption-rus.tex.
%
% \fi
-% \CheckSum{3607}
+% \CheckSum{3606}
%
% \iffalse
%<*driver>
@@ -191,7 +191,7 @@
%
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption3}[2020/07/29 v1.13 caption3 kernel (AR)]
+\ProvidesPackage{caption3}[2022/04/06 v1.13b caption3 kernel (AR)]
% \end{macrocode}
%
% \section{Workaround for bug in package \package{arabtex}}
@@ -728,6 +728,7 @@
% \changes{v1.2a}{2008/01/12}{\cs{ifcaptionsetup@star} will be set now}
% \changes{v1.5}{2012/04/09}{Support of multiple optional arguments added}
% \changes{v1.8h}{2020/01/03}{Syntax check of saved options added}
+% \changes{v1.13a}{2022/03/17}{Usage of \cs{captionsetup} inside \cs{caption@setup@options@@} replaced by \cs{caption@setup@options@}}
% |\captionsetup|\oarg{type}\ldots\marg{keyval-list of options}\\
% |\captionsetup*|\oarg{type}\ldots\marg{keyval-list of options}\par
% If the optional argument `type' is specified, we simply save or append
@@ -746,19 +747,19 @@
\caption@setup@options\caption@setup}
% \end{macrocode}
% \begin{macrocode}
-\newcommand*\caption@setup{\caption@setkeys{caption}}
+\newcommand*\caption@setup{%
+ \caption@setkeys{caption}}
% \end{macrocode}
% \begin{macrocode}
\def\caption@setup@options[#1]{%
\@ifnextchar[%]
{\caption@stepthecounter
- \caption@withoptargs{\@expandtwoargs
- \caption@setup@options@i{#1}{@\caption@thecounter}}}%
+ \@expandtwoargs\caption@setup@options@@{#1}{@\caption@thecounter}}%
{\caption@setup@options@{#1}}}
% \end{macrocode}
% \begin{macrocode}
-\newcommand*\caption@setup@options@i[4]{%
- \caption@declare@option{#2}[]{\captionsetup#3{#4}}%
+\def\caption@setup@options@@#1#2[#3]#4{%
+ \caption@declare@option{#2}[]{\caption@setup@options@{#3}{#4}}%
\caption@setup@options@{#1}{#2}}
% \end{macrocode}
% \begin{macrocode}
@@ -3979,6 +3980,7 @@
% \changes{v1.13}{2020/07/28}{Uses \cs{caption@l@addto@list} instead of \cs{@cons} now}
% \changes{v1.13}{2020/07/29}{Usage of \cs{caption@subtype@hook} added}
% \changes{v1.13}{2020/07/29}{We don't re-use existing counters anymore (This was a bad idea anyway)}
+% \changes{v1.13b}{2022/04/06}{We don't re-use existing counters anymore (Part 2)}
% |\DeclareCaptionSubType|\oarg{numbering scheme}\marg{type}\\
% |\DeclareCaptionSubType*|\oarg{numbering scheme}\marg{type}\par
% The starred variant provides the numbering format
@@ -4015,22 +4017,24 @@
\@namedef{ext@#4}{\csname ext@#3\endcsname}%
\caption@declaresublistentry{#3}%
\caption@l@addto@list\caption@subtypelist{#4}%
- \caption@subtype@hook{#4}}%
+ \caption@subtype@hook{#4}%
% \end{macrocode}
% Support of \package{titletoc} package
% \begin{macrocode}
- \caption@ifdefined\contentsuse{%
- \contentsuse{#4}{\csname ext@#4\endcsname}}{}%
+ \caption@ifdefined\contentsuse{%
+ \contentsuse{#4}{\csname ext@#4\endcsname}}{}%
% \end{macrocode}
% \begin{macrocode}
- \@namedef{#4name}{}%
- \@namedef{#4autorefname}{\csname #3autorefname\endcsname}%
- #1% is \@firstoftwo in star form, and \@secondoftwo otherwise
+ \@namedef{#4name}{}%
+ \@namedef{#4autorefname}{\csname #3autorefname\endcsname}}%
+% \end{macrocode}
+% \begin{macrocode}
+ #1% is \@firstoftwo in star form, and \@secondoftwo otherwise
{\@namedef{p@#4}{}%
\@namedef{the#4}{\csname the#3\endcsname.\@nameuse{#2}{#4}}}%
{\@namedef{p@#4}{\csname the#3\endcsname}%
\@namedef{the#4}{\@nameuse{#2}{#4}}}%
- \@namedef{theH#4}{\csname theH#3\endcsname.\arabic{#4}}}
+ \@namedef{theH#4}{\csname theH#3\endcsname.\arabic{#4}}}
% \end{macrocode}
% \begin{macrocode}
\@onlypreamble\caption@@@declaresubtype
diff --git a/Master/texmf-dist/source/latex/caption/fallback/v3.5/caption.dtx b/Master/texmf-dist/source/latex/caption/fallback/v3.5/caption.dtx
index 463e9052fa0..f5d5569ed8b 100644
--- a/Master/texmf-dist/source/latex/caption/fallback/v3.5/caption.dtx
+++ b/Master/texmf-dist/source/latex/caption/fallback/v3.5/caption.dtx
@@ -32,7 +32,7 @@
% caption-deu.tex, caption-eng.tex, caption-rus.tex.
%
% \fi
-% \CheckSum{2702}
+% \CheckSum{2703}
%
% \iffalse
%<*driver>
@@ -241,7 +241,7 @@
%
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption}[2022/03/01 v3.5h Customizing captions (AR)]
+\ProvidesPackage{caption}[2022/07/10 v3.5i Customizing captions (AR)]
% \end{macrocode}
%
% \section{Loading the kernel}
@@ -3762,6 +3762,7 @@
% \changes{v3.1c}{2007/10/06}{\cs{caption} will be saved \& restored now}
% \changes{v3.2a}{2011/08/17}{Bugfix: Uses \cs{caption@freeze} instead of \cs{caption@freeze*} now}
% \changes{v3.3}{2013/05/01}{Usage of \cs{caption@freeze} replaced by \cs{caption@freezetype}}
+% \changes{v3.5i}{2022/07/10}{\cs{ignorespaces} appended}
% This macro will be called at the start of the environment, here is a good
% opportunity to do some adaptations to |\caption| and |\captionsetup|.
% \begin{macrocode}
@@ -3775,7 +3776,7 @@
\SC@RestoreCommands
% \end{macrocode}
% Since the sidecap package uses our |\caption| code outside the
-% environment the regular |\captionsetup| will not work.
+% environment the regular |\caption|\-|setup| will not work.
% So we need a special version here which saves the given argument list
% which will be executed later on.
% Furthermore we need to make |\caption*| work.
@@ -3785,7 +3786,12 @@
% The sidecap package uses |\ifx\label\SC@label| to test if it is just inside a
% |SC|\-|figure| or not. So we redefine |\SC@label| here so this test will still work.
% \begin{macrocode}
- \let\SC@label\label}%
+ \let\SC@label\label
+% \end{macrocode}
+% Since the original definition of |\SC@zfloat| ends with |\begin{lrbox}| which ends with |\ignore|\-|spaces|,
+% we do have to end our re-definition of |\SC@zfloat| with |\ignore|\-|spaces| as well.
+% \begin{macrocode}
+ \ignorespaces}%
% \end{macrocode}
% \begin{macrocode}
\providecommand*\SC@RestoreCommands{%
diff --git a/Master/texmf-dist/source/latex/caption/fallback/v3.5/caption3.dtx b/Master/texmf-dist/source/latex/caption/fallback/v3.5/caption3.dtx
index 993af958545..9542d63b792 100644
--- a/Master/texmf-dist/source/latex/caption/fallback/v3.5/caption3.dtx
+++ b/Master/texmf-dist/source/latex/caption/fallback/v3.5/caption3.dtx
@@ -2,7 +2,7 @@
%
% This is file `caption3.dtx'.
%
-% Copyright (C) 1994-2020 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
+% Copyright (C) 1994-2022 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
%
% --------------------------------------------------------------------------
%
@@ -32,7 +32,7 @@
% caption-deu.tex, caption-eng.tex, caption-rus.tex.
%
% \fi
-% \CheckSum{3674}
+% \CheckSum{3673}
%
% \iffalse
%<*driver>
@@ -242,7 +242,7 @@
%
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption3}[2020/10/26 v2.2f caption3 kernel (AR)]
+\ProvidesPackage{caption3}[2022/04/06 v2.2h caption3 kernel (AR)]
% \end{macrocode}
%
% \section{Generic helpers}
@@ -810,6 +810,7 @@
% \changes{v1.2a}{2008/01/12}{\cs{ifcaptionsetup@star} will be set now}
% \changes{v1.5}{2012/04/09}{Support of multiple optional arguments added}
% \changes{v1.8h}{2020/01/03}{Syntax check of saved options added}
+% \changes{v2.2g}{2022/03/17}{Usage of \cs{captionsetup} inside \cs{caption@setup@options@@} replaced by \cs{caption@setup@options@}}
% |\captionsetup*|\oarg{type}\ldots\marg{keyval-list of options}\\
% applies the given list of options.
% If the optional argument `type' is specified, we simply save or append
@@ -828,19 +829,19 @@
\caption@setup@options\caption@setup}
% \end{macrocode}
% \begin{macrocode}
-\newcommand*\caption@setup{\caption@setkeys{caption}}
+\newcommand*\caption@setup{%
+ \caption@setkeys{caption}}
% \end{macrocode}
% \begin{macrocode}
\def\caption@setup@options[#1]{%
\@ifnextchar[%]
{\caption@stepthecounter
- \caption@withoptargs{\@expandtwoargs
- \caption@setup@options@i{#1}{@\caption@thecounter}}}%
+ \@expandtwoargs\caption@setup@options@@{#1}{@\caption@thecounter}}%
{\caption@setup@options@{#1}}}
% \end{macrocode}
% \begin{macrocode}
-\newcommand*\caption@setup@options@i[4]{%
- \caption@declare@option{#2}[]{\captionsetup#3{#4}}%
+\def\caption@setup@options@@#1#2[#3]#4{%
+ \caption@declare@option{#2}[]{\caption@setup@options@{#3}{#4}}%
\caption@setup@options@{#1}{#2}}
% \end{macrocode}
% \begin{macrocode}
@@ -4431,6 +4432,7 @@
% \changes{v1.13}{2020/07/28}{Uses \cs{caption@l@addto@list} instead of \cs{@cons} now}
% \changes{v1.13}{2020/07/29}{Usage of \cs{caption@subtype@hook} added}
% \changes{v1.13}{2020/07/29}{We don't re-use existing counters anymore (This was a bad idea anyway)}
+% \changes{v1.13b}{2022/04/06}{We don't re-use existing counters anymore (Part 2)}
% |\DeclareCaptionSubType*|\oarg{numbering scheme}\marg{type}\\
% The starred variant provides the numbering format
% \meta{type}|.|\meta{subtype} while the non-starred variant simply uses
@@ -4466,22 +4468,24 @@
\@namedef{ext@#4}{\csname ext@#3\endcsname}%
\caption@declaresublistentry{#3}%
\caption@l@addto@list\caption@subtypelist{#4}%
- \caption@subtype@hook{#4}}%
+ \caption@subtype@hook{#4}%
% \end{macrocode}
% Support of \package{titletoc} package
% \begin{macrocode}
- \caption@ifdefined\contentsuse{%
- \contentsuse{#4}{\csname ext@#4\endcsname}}{}%
+ \caption@ifdefined\contentsuse{%
+ \contentsuse{#4}{\csname ext@#4\endcsname}}{}%
% \end{macrocode}
% \begin{macrocode}
- \@namedef{#4name}{}%
- \@namedef{#4autorefname}{\csname #3autorefname\endcsname}%
- #1% is \@firstoftwo in star form, and \@secondoftwo otherwise
+ \@namedef{#4name}{}%
+ \@namedef{#4autorefname}{\csname #3autorefname\endcsname}}%
+% \end{macrocode}
+% \begin{macrocode}
+ #1% is \@firstoftwo in star form, and \@secondoftwo otherwise
{\@namedef{p@#4}{}%
\@namedef{the#4}{\csname the#3\endcsname.\@nameuse{#2}{#4}}}%
{\@namedef{p@#4}{\csname the#3\endcsname}%
\@namedef{the#4}{\@nameuse{#2}{#4}}}%
- \@namedef{theH#4}{\csname theH#3\endcsname.\arabic{#4}}}
+ \@namedef{theH#4}{\csname theH#3\endcsname.\arabic{#4}}}
% \end{macrocode}
% \begin{macrocode}
\@onlypreamble\caption@@@declaresubtype
diff --git a/Master/texmf-dist/source/latex/caption/subcaption.dtx b/Master/texmf-dist/source/latex/caption/subcaption.dtx
index 31b76d94fd4..0283d91eef9 100644
--- a/Master/texmf-dist/source/latex/caption/subcaption.dtx
+++ b/Master/texmf-dist/source/latex/caption/subcaption.dtx
@@ -2,7 +2,7 @@
%
% This is file `subcaption.dtx'.
%
-% Copyright (C) 2007-2022 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
+% Copyright (C) 2007-2023 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
%
% --------------------------------------------------------------------------
%
@@ -31,12 +31,12 @@
%
% \fi
%
-% \CheckSum{468}
+% \CheckSum{513}
%
% \iffalse
%<*driver>
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesFile{subcaption.drv}[2022/02/20 v1.5 Adds a sub-caption feature to the caption package]
+\ProvidesFile{subcaption.drv}[2023/02/19 v1.6 Adds a sub-caption feature to the caption package]
\hbadness=9999 \newcount\hbadness \hfuzz=74pt % Make TeX shut up.
%\errorcontextlines=3
%
@@ -67,7 +67,7 @@
\newcommand*\purerm[1]{{\upshape\mdseries\rmfamily #1}}
\newcommand*\puresf[1]{{\upshape\mdseries\sffamily #1}}
\newcommand*\purett[1]{{\upshape\mdseries\ttfamily #1}}
-\let\pkg\puresf
+\let\cls\puresf \let\pkg\puresf
\let\env\purett \let\opt\purett
%
\newcommand*\csmarg[1]{\texttt{\char`\{#1\char`\}}}
@@ -148,11 +148,6 @@
% This package demonstrates its usage by offering a high-level user interface additionally.
% \end{background*}
%
-% \bigskip
-% \INFO
-% \emph{Please note:}
-% This package is incompatible with the \pkg{subfigure} and \pkg{subfig} packages.
-%
% \clearpage
% \setcounter{tocdepth}{2}
% \tableofcontents
@@ -178,7 +173,7 @@
% is identical to
% \begin{quote}
% |\usepackage{subcaption}|\\
-% |\captionsetup[sub]|\marg{options}\quad.
+% |\subcaptionsetup|\marg{options}\quad.
% \end{quote}
%
% \bigskip
@@ -193,10 +188,57 @@
% specifying the option \texttt{list=true}.}
% \end{quote}
%
+% \iffalse
+% --------------------------------------------------------------------------- %
+% \fi
+%
+% \PageBreak
+% \section{Setting options}
+% \label{sec:options}
+%
+% \DescribeMacro\subcaptionsetup
+% \NEWfeature*{v1.6}
+% The |\subcaptionsetup| command sets options specifically for sub-captions.
+%
+% \begin{quote}
+% |\subcaptionsetup|\marg{options}
+% \end{quote}
+% sets options valid for all sub-captions.
+%
+% \pagebreak[3]
+% An example:
+% \begin{quote}
+% |\subcaptionsetup{font=it}|
+% \end{quote}
+% sets the font to ``italic'' for all sub-captions.
+%
+% \medskip
+%
+% \begin{quote}
+% |\subcaptionsetup|\oarg{environment}\marg{options}
+% \end{quote}
+% is an alternative syntax to
+% \begin{quote}
+% |\caption|\-|setup[sub|\meta{environment}|]|\marg{options}\quad.
+% \end{quote}
+%
+% \pagebreak[3]
+% An example:
+% \begin{quote}
+% |\subcaptionsetup[table]{labelformat=simple}|
+% \end{quote}
+% is identical to
+% \begin{quote}
+% |\captionsetup[subtable]{labelformat=simple}|
+% \end{quote}
+% and sets the labelformat to ``simple'' for all sub-captions inside tables.
+%
+% \bigskip
+%
% Options specified with |\usepackage[|\ldots|]{sub|\-|caption}| and
-% |\caption|\-|setup[sub]{|\ldots|}| will override the ones specified by
+% |\sub|\-|caption|\-|setup{|\ldots|}| will override the ones specified by
% |\caption|\-|setup{|\ldots|}| and |\caption|\-|setup[fig|\-|ure]{|\ldots|}|,
-% but are again overwritten by |\caption|\-|setup[sub|\-|figure]{|\ldots|}|
+% but are again overwritten by |\subcaption|\-|setup[figure]{|\ldots|}|
% (same for `table'). So finally we have the following order how
% settings for sub-captions are applied:
% \begin{enumerate}
@@ -209,9 +251,9 @@
% \item Default `sub' settings
% {\small(|margin=0pt,font+=smaller,|\ldots, see above)}
% \item Custom `sub' settings
-% {\small(|\usepackage[|\ldots|]{subcaption}| and |\captionsetup[sub]{|\ldots|}|)}
+% {\small(|\usepackage[|\ldots|]{subcaption}| and |\subcaptionsetup{|\ldots|}|)}
% \item Environmental `sub' settings
-% {\small(|\captionsetup[subfigure|\emph{ -or- }|subtable]{|\ldots|}|)}
+% {\small(|\subcaptionsetup[figure|\emph{ -or- }|table]{|\ldots|}|)}
% \item Local `sub' settings
% {\small(|\captionsetup{|\ldots|}| inside |sub|\-|figure| or |sub|\-|table|)}
% \end{enumerate}
@@ -222,9 +264,9 @@
% |\usepackage[labelsep=quad,indention=10pt]{caption}|\\
% |\usepackage[labelfont=bf,list=true]{subcaption}|\\
% |\captionsetup[table]{textfont=it,position=top}|\\
-% |\captionsetup[subtable]{textfont=sf}|
+% |\subcaptionsetup[table]{textfont=sf}|
% \end{quote}
-% causes the captions inside |sub|\-|table| environments to be typeset with
+% causes sub-captions inside |table| environments to be typeset with
% the settings
% \begin{quote}
% |indention=10pt,position=top,margin=0pt,font=small,|\\
@@ -258,8 +300,8 @@
% \meta{width} is the width of the resulting |\par|\-|box|; the default value is the width of the contents.
%
% \meta{inner-pos} specifies how the contents will be justified inside the resulting |\parbox|;
-% it can be either `c' (for |\centering|), `l' (for |\ragged|\-|right|),
-% `r' (for |\ragged|\-|left|), or `s' (for no special justification).
+% it can be either `c' (centered, using |\centering|), `l' (left-justified, using |\ragged|\-|right|),
+% `r' (right-justified, using |\ragged|\-|left|), or `s' (for no special justification).
% The default is `c'.
% (But you can use any justification defined with
% |\Declare|\-|Caption|\-|Jus|\-|ti|\-|fi|\-|ca|\-|tion| as well,
@@ -401,13 +443,13 @@
% \end{quote}
% \endgroup
%
-% The default value for \meta{outer-pos} is `b' and the default value for \meta{inner-pos} is `s'.
-% (Note that the default value for \meta{outer-pos} has changed from `c' to `b' in version $1.5$ of \thispackage.)
+% The default value for \meta{outer-pos} is either `b' (if no main caption was typeset so far) or `t' (if a main caption was already typeset),
+% and the default value for \meta{inner-pos} is `s'.
%
% \NEWfeature{v1.2}
% Beside the \meta{outer-pos} values of `c', `t', and `b', \thispackage\ also offers the
-% values `T' and `B' additionally which align the |sub|\-|figure| at the
-% very top resp.~bottom. (In contrast `t' and `b' align the |sub|\-|figure| at the
+% values `T' and `B' additionally which align the contents at the
+% very top resp.~bottom. (In contrast `t' and `b' align the contents at the
% top resp.~bottom \textit{baseline}.)
%
% \bigskip
@@ -494,6 +536,8 @@
% So if in doubt, or when writing own \LaTeX\ commands which should work in every floating environment,
% using |sub|\-|caption|\-|block| is the correct choice.
%
+% (Note that the default value for \meta{outer-pos} has changed from `c' to either `b' or `t' in version $1.5$ of \thispackage.)
+%
% \smallskip
%
% \begin{background}
@@ -657,7 +701,7 @@
% \leftmargini=12pt
% \begin{quote}
% |\DeclareCaptionSubType*[arabic]{table}|\\
-% |\captionsetup[subtable]{labelformat=simple,labelsep=colon}|
+% |\subcaptionsetup[table]{labelformat=simple,labelsep=colon}|
% \end{quote}
% \endgroup
% \pagebreak[2]
@@ -698,8 +742,8 @@
% \DescribeMacro\p@subfigure
% For example |\thesubfigure| and |\p@subfigure| are (as default) internally defined as
% \begin{quote}
-% |\newcommand\thesubfigure{\alph{subfigure}}|\\
-% |\newcommand\p@subfigure{\thefigure}|
+% |\newcommand\thesubfigure{\alph{subfigure}}|\\
+% |\newcommand\p@subfigure{\thefigure}|
% \end{quote}
% so the label of sub-captions will look like `|a|' (decorated by the selected label format),
% while references will look like `|1a|' since they are prefixed by |\p@sub|\-|figure| $=$
@@ -708,8 +752,8 @@
% After |\Declare|\-|Caption|\-|Sub|\-|Type*[arabic]{figure}|, |\the|\-|sub|\-|figure| and
% |\p@sub|\-|figure| will look like
% \begin{quote}
-% |\renewcommand\thesubfigure{\thefigure.\arabic{subfigure}}|\\
-% |\renewcommand\p@subfigure{}|
+% |\renewcommand\thesubfigure{\thefigure.\arabic{subfigure}}|\\
+% |\renewcommand\p@subfigure{}|
% \end{quote}
%
% But if you want detailed control on how the references will look like,
@@ -720,8 +764,8 @@
% If you want parentheses around the sub-figure part of the reference,
% so they will look like `|1(a)|', you may get them this way:
% \begin{quote}
-% |\usepackage[labelformat=simple]{subcaption}|\\
-% |\renewcommand\thesubfigure{(\alph{subfigure})}|
+% |\usepackage[labelformat=simple]{subcaption}|\\
+% |\renewcommand\thesubfigure{(\alph{subfigure})}|
% \end{quote}
% {\small (\emph{Note:} Since |parens| is the default label format you will get double
% parentheses in sub-captions when not specifiying a different label format, e.g. |simple|.)}
@@ -730,10 +774,10 @@
% but the sub-captions itself should still look like `|(a)|',
% this would be a possible solution:
% \begin{quote}
-% |\usepackage{subcaption}|\\
-% |\renewcommand\thesubfigure{\alph{subfigure})}|\\
-% |\DeclareCaptionLabelFormat{opening}{(#2}|\\
-% |\captionsetup[subfigure]{labelformat=opening}|
+% |\usepackage{subcaption}|\\
+% |\renewcommand\thesubfigure{\alph{subfigure})}|\\
+% |\DeclareCaptionLabelFormat{opening}{(#2}|\\
+% |\subcaptionsetup[figure]{labelformat=opening}|
% \end{quote}
%
% \bigskip
@@ -1253,11 +1297,11 @@
% \begin{quote}
% |\begin{figure}|\\
% | \centering|\\
-% | \captionsetup[subfigure]|\\
+% | \subcaptionsetup[figure]|\\
% | {skip=-28pt,slc=off,margin={25pt,0pt}}|\\
% | \subcaptionbox{\label{cat}}|\\
% | {\includegraphics[width=60pt]{cat}}|\\
-% | \captionsetup[subfigure]|\\
+% | \subcaptionsetup[figure]|\\
% | {skip=-60pt,slc=off,margin={80pt,0pt}}|\\
% | \subcaptionbox{\label{elephant}}|\\
% | {\includegraphics[width=140pt]{elephant}}|\\
@@ -1512,12 +1556,12 @@
% \begin{minipage}{\textwidth}
% \centering
% \begin{tabular}{l|l|l}
-% Regular command & with \cs{setcaptionsubtype*} & available since \\
+% Regular command & using \cs{setcaptionsubtype*} & available since \\
% \hline
-% |\caption| & |\subcaption| & \version{1.0} \\
-% |\phantomcaption| & |\phantomsubcaption| & \version{1.1} \\
-% |\captionlistentry| & |\subcaptionlistentry| & \version{1.5} \\
-% |\captiontext| & |\subcaptiontext| & \version{1.5} \\
+% |\caption| & |\subcaption| & \version{1.0} \\
+% |\phantomcaption| & |\phantomsubcaption| & \version{1.1} \\
+% |\captionlistentry| & |\subcaptionlistentry| & \version{1.5} \\
+% |\captiontext| & |\subcaptiontext| & \version{1.5} \\
% \end{tabular}
% \end{minipage}
%
@@ -1597,6 +1641,52 @@
% --------------------------------------------------------------------------- %
% \fi
%
+% \section{Other packages with similar offerings}
+% \label{sec:otherpackages}
+%
+% The \pkg{subcaption} package is not the only one defining sub-figure counters and offering commands or environments to typeset sub-figures.
+% The most established are:
+% \begin{itemize}
+% \item The \cls{memoir} document class
+% \item The \pkg{subfigure} package and its successor, the \pkg{subfig} package
+% \end{itemize}
+%
+% \NEWfeature{v1.6}
+% Prior subcaption version $1.6$ an error message was issued if the `subfigure' or `subtable' counter was already defined by any of them.
+% Since subcaption version $1.6$ the `subfigure' and `subtable' counters will only be defined by the \pkg{subcaption} package if they are not defined yet,
+% but the usage of any of the commands or environments described in this document will result in an error message ``The counter sub\ldots was defined by \ldots''
+% if the corresponding counter was not defined by the \pkg{subcaption} package.
+% Equally the commands or environments offered by the above document classes or packages should not be used with counters defined by the \pkg{subcaption} package,
+% this will result in either \LaTeX\ errors or unwanted behaviour.
+%
+% So the rule of thumb is:
+% If the counter `subfigure' or `subtable' is defined by document class or package \textit{xyz},
+% then the corresponding commands and environments offered by the document class or package \textit{xyz} should be used.
+%
+% \pagebreak[3]
+% An example document:
+% \begingroup\small\leftmargini=12pt\relax
+% \begin{quote}
+% |\documentclass{memoir}|\\
+% |\newsubfloat{table} % defines the `subtable' counter|\\
+% |\usepackage{subcaption} % defines the `subfigure' counter|\\
+% |\begin{document}|\\
+% |\begin{figure}|\\
+% |\subcaptionbox{...}{...} % <- This is fine|\\
+% |\caption{...}|\\
+% |\end{figure}|\\
+% |\begin{table}|\\
+% |\caption{...}|\\
+% |\subcaptionbox{...}{...} % <- This results in an error,|\\
+% |\end{table} \subtop should be used instead|\\
+% |\end{document}|\\
+% \end{quote}
+% \endgroup
+%
+% \iffalse
+% --------------------------------------------------------------------------- %
+% \fi
+%
% \PageBreak
% \section{Beyond this package}
% \label{keyfloat}\label{floatrow}
@@ -1783,7 +1873,7 @@
%
% Identify the current version of the package.
% \begin{macrocode}
-\ProvidesPackage{subcaption}[2022/01/07 v1.5 Sub-captions (AR)]
+\ProvidesPackage{subcaption}[2023/02/19 v1.6 Sub-captions (AR)]
% \end{macrocode}
%
% Since we base on the \pkg{caption} package we load it here.
@@ -1793,6 +1883,16 @@
%
% \subsection{Initial code}
%
+% \begin{macro}{\subcaption@Info}
+% \changes{v1.6}{2022/04/07}{This macro added}
+% |\subcaption@Info|\marg{message}\\
+% issues an info message (with code line indication).
+% \begin{macrocode}
+\newcommand*\subcaption@Info{%
+ \PackageInfo{subcaption}}
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\subcaption@Warning}
% \changes{v1.5}{2022/01/06}{This macro added}
% |\subcaption@Warning|\marg{message}\\
@@ -1828,43 +1928,19 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\subcaption@CheckCompatibility}
-% \changes{v1.1}{2011/09/01}{Compatibility error added}
-% \changes{v1.1}{2016/05/22}{The presence of \pkg{subfigure} or \pkg{subfig} will be checked \cs{AtBeginDocument}, too}
-% \changes{v1.3g}{2020/08/01}{Error text adapted to \pkg{caption} package~\version{4.0}}
-% \changes{v1.4}{2020/12/22}{Adapted to fallback concept}
-% Since we are incompatible to them an error message will be issued when
-% the \pkg{subfigure} or \pkg{subfig} package is loaded.
-% \begin{macrocode}
-\newcommand*\subcaption@CheckCompatibility{%
-% \end{macrocode}
-% \begin{macrocode}
- \@ifpackageloaded{subfigure}{%
- \subcaption@Error
- {This package can't be used in cooperation\MessageBreak
- with the subfigure package}%
- \endinput}{}%
-% \end{macrocode}
-% \begin{macrocode}
- \@ifpackageloaded{subfig}{%
- \subcaption@Error
- {This package can't be used in cooperation\MessageBreak
- with the subfig package}%
- \endinput}{}%
-% \end{macrocode}
-% \begin{macrocode}
-}
-% \end{macrocode}
+% \subsection{Main code}
+%
+% \begin{macro}{\subcaptionsetup}
+% \changes{v1.6}{2023/02/19}{This macro definition added}
+% |\subcaptionsetup*|\oarg{environment}\marg{options}
+% is an abbreviation for |\caption|\-|setup*[sub|\meta{environment}|]|\marg{options},
+% especially |\sub|\-|caption|\-|setup|\marg{options} sets options valid for all sub-captions.
% \begin{macrocode}
-\subcaption@CheckCompatibility
-\caption@AtBeginDocument{%
- \subcaption@CheckCompatibility
- \let\subcaption@CheckCompatibility\@undefined}
+\newcommand*\subcaptionsetup[1][]{%
+ \@ifstar{\captionsetup*[{sub#1}]}{\captionsetup[{sub#1}]}}
% \end{macrocode}
% \end{macro}
%
-% \subsection{Main code}
-%
% \begin{macro}{\setcaptionsubtype}
% \changes{v1.4}{2020/12/24}{This macro definition added}
% \changes{v1.5}{2022/01/07}{Check added if used inside a floating environment}
@@ -1908,11 +1984,14 @@
% \changes{v1.3d}{2020/01/22}{Definition and usage of \cs{@subfloatboxreset} added}
% \changes{v1.5}{2022/01/07}{This macro definition out-sourced from \cs{subcaption@newminipage}}
% \changes{v1.5}{2022/01/07}{Usage of \cs{@ifnextchar} replaced by \cs{@testopt}}
-% \changes{v1.5}{2022/01/07}{Default value of \meta{outer-pos} changes from `c' to `b'}
+% \changes{v1.5}{2022/01/07}{Default value of \meta{outer-pos} changed from `c' to `b'}
+% \changes{v1.5a}{2022/04/16}{Default value of \meta{outer-pos} changed from `b' to either `b' or `t'}
% This is a \env{minipage} with |\set|\-|caption|\-|sub|\-|type| as first contents line.
% \begin{macrocode}
\newcommand*\subcaption@minipage{%
- \@testopt\subcaption@iminipage b}
+ \kernel@ifnextchar[%]
+ \subcaption@iminipage
+ {\caption@ifcaption{\subcaption@iminipage[t]}{\subcaption@iminipage[b]}}}
% \end{macrocode}
% We pass all other optional arguments using the generic helper macro
% |\caption@with|\-|opt|\-|args| offered by the \pkg{caption} kernel).
@@ -1947,6 +2026,10 @@
% \begin{macrocode}
\providecommand*\@subfloatboxreset{}
% \end{macrocode}
+% \begin{macrocode}
+\providecommand*\caption@ifcaption{\caption@ifflag2} % caption >= v3.3 < v3.6
+\providecommand*\caption@ifflag[1]{\@secondoftwo} % caption < v3.3
+% \end{macrocode}
% \end{macro}
%
% \begin{environment}{subcaptionblock}
@@ -2232,8 +2315,8 @@
% \begin{macrocode}
\let\caption@setkeys@ORI\caption@setkeys
\@ifundefined{caption@SetupOptions} % caption3 v1.3
- {\renewcommand\caption@setkeys[2]{\captionsetup[sub]{#2}}}
- {\caption@SetupOptions{subcaption}{\captionsetup[sub]{#2}}}
+ {\renewcommand\caption@setkeys[2]{\subcaptionsetup{#2}}}
+ {\caption@SetupOptions{subcaption}{\subcaptionsetup{#2}}}
% \end{macrocode}
% \begin{macrocode}
\@ifundefined{caption@smaller} % caption3 v1.7-169
@@ -2250,16 +2333,32 @@
\let\caption@setkeys@ORI\@undefined
% \end{macrocode}
%
+% \begin{macro}{\subcaption@DeclareType}
+% \changes{v1.6}{2022/04/07}{This macro added}
+% |\subcaption@DeclareType|\marg{type}\\
+% defines the sub-counter via |\Declare|\-|Caption|\-|Sub|\-|Type| offered by the \pkg{caption} package.
+% \begin{macrocode}
+\newcommand*\subcaption@DeclareType[1]{%
+ \@ifundefined{c@sub#1}%
+ {\DeclareCaptionSubType{#1}}%
+ {\caption@subtypesource\caption@subtype@source{sub#1}%
+ \subcaption@Info{The counter `sub#1' was already defined by\MessageBreak\caption@subtype@source}}}
+% \end{macrocode}
+% \begin{macrocode}
+\providecommand*\caption@subtypesource[2]{\def#1{a different package}} % caption3 v2.4
+% \end{macrocode}
+% \end{macro}
+%
% We call |\Declare|\-|Caption|\-|Sub|\-|Type| for |figure| and |table|,
% and each floating environment declared with |\Declare|\-|Floating|\-|Environment| here.
% \begin{macrocode}
\@ifundefined{ForEachCaptionType} % caption3 v1.13
{\@ifundefined{caption@ForEachType} % caption3 v1.4a
- {\@ifundefined{c@figure}{}{\DeclareCaptionSubType{figure}}%
- \@ifundefined{c@table}{}{\DeclareCaptionSubType{table}}%
- \caption@For{typelist}{\DeclareCaptionSubType{#1}}}
- {\caption@ForEachType{\DeclareCaptionSubType{#1}}}}
- {\ForEachCaptionType{\DeclareCaptionSubType{#1}}}
+ {\@ifundefined{c@figure}{}{\subcaption@DeclareType{figure}}%
+ \@ifundefined{c@table}{}{\subcaption@DeclareType{table}}%
+ \caption@For{typelist}{\subcaption@DeclareType{#1}}}
+ {\caption@ForEachType{\subcaption@DeclareType{#1}}}}
+ {\ForEachCaptionType{\subcaption@DeclareType{#1}}}
% \end{macrocode}
%
% \subsection{Bonus material}
@@ -2340,6 +2439,22 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\caption@subfloatrow@hook}
+% \changes{v1.6}{2022/04/17}{Support of this hook added}
+% Inside the |sub|\-|float|\-|row| environment offered by the \pkg{floatrow} package
+% the usage of |\caption| etc.~needs to be mapped to |\sub|\-|caption| etc.
+% \begin{macrocode}
+\providecommand*\caption@subfloatrow@hook{} % caption < v3.7
+% \end{macrocode}
+% \begin{macrocode}
+\g@addto@macro\caption@subfloatrow@hook{%
+ \let\caption\subcaption
+ \let\phantomcaption\phantomsubcaption
+ \let\captionlistentry\subcaptionlistentry
+ \let\captiontext\subcaptiontext}
+% \end{macrocode}
+% \end{macro}
+%
% \subsubsection{The \cs{subfloat} command}
%
% \begin{macro}{\subfloat}
@@ -2353,34 +2468,50 @@
% \changes{v1.4}{2020/12/24}{Usage of \cs{caption@getlabel} replaced by \cs{subcaption@getlabel}}
% \changes{v1.4a}{2020/12/26}{Clearance of \cs{caption@thelabel} replaced by \cs{subcaption@clrlabel}}
% \changes{v1.5}{2022/01/07}{Usage of \cs{@ifnextchar} replaced by \cs{kernel@ifnextchar}}
-% \changes{v1.5}{2022/01/07}{Overwrites the definition defined by the \pkg{memoir} document class}
+% \changes{v1.5}{2022/01/07}{Overwrites the definition done by the \cls{memoir} document class}
+% \changes{v1.6}{2022/04/16}{Emulates the definition done by the \cls{memoir} document class}
% |\subfloat|\oarg{list\_entry}\oarg{sub-caption}\marg{body}\par
% If \meta{sub-caption} is given, we map this to |\sub|\-|caption|\-|box|
% but transfer the |\label| from \meta{body} to \meta{sub-caption}.
% If not, we do the same as |\sub|\-|caption|\-|box| does, but use |\phantom|\-|caption| instead of |\caption|.
% In both cases we do a |\ignore|\-|spaces| at the end since the original implementation of |\sub|\-|float| does this, too.
% \begin{macrocode}
-\@ifclassloaded{memoir}{\let\subfloat\undefined\let\endsubfloat\undefined}{}
-% \end{macrocode}
-% \begin{macrocode}
\caption@AtBeginDocument{%
- \providecommand*\subfloat{%
- \kernel@ifnextchar[%]
- \subcaption@subfloat
- \subcaption@subfloat@}}
+ \begingroup
+ \newenvironment{subcaption@memoir@subfloat}{}{}%
+ \ifx\subfloat\subcaption@memoir@subfloat
+ \endgroup
+ % "subfloat" = empty environment, defined by memoir
+ \renewcommand*\subfloat{%
+ \def\subcaption@currenvir{subfloat}%
+ \ifx\@currenvir\subcaption@currenvir
+ % emulate (empty) subfloat environment
+ \else
+ \expandafter\subcaption@subfloat
+ \fi}%
+ \else
+ \endgroup
+ \providecommand*\subfloat{\subcaption@subfloat}%
+ \fi}
+% \end{macrocode}
+% \begin{macrocode}
+\newcommand*\subcaption@subfloat{%
+ \kernel@ifnextchar[%]
+ \subcaption@@subfloat
+ \subcaption@subfloat@}
% \end{macrocode}
% \begin{macrocode}
-\long\def\subcaption@subfloat[#1]{%
+\long\def\subcaption@@subfloat[#1]{%
\kernel@ifnextchar[%]
- {\subcaption@@subfloat{#1}}%
- {\subcaption@@@subfloat\subcaptionbox{#1}}}
+ {\subcaption@@@subfloat{#1}}%
+ {\subcaption@@subfloat@\subcaptionbox{#1}}}
% \end{macrocode}
% \begin{macrocode}
-\long\def\subcaption@@subfloat#1[#2]{%
- \subcaption@@@subfloat{\subcaptionbox[{#1}]}{#2}}
+\long\def\subcaption@@@subfloat#1[#2]{%
+ \subcaption@@subfloat@{\subcaptionbox[{#1}]}{#2}}
% \end{macrocode}
% \begin{macrocode}
-\long\def\subcaption@@@subfloat#1#2#3{%
+\long\def\subcaption@@subfloat@#1#2#3{%
\subcaption@getlabel{#3}%
#1{#2\caption@thelabel}{\let\label\caption@gobble#3}%
\subcaption@clrlabel
diff --git a/Master/texmf-dist/tex/latex/caption/bicaption.sty b/Master/texmf-dist/tex/latex/caption/bicaption.sty
index a151898ae34..1948a15f752 100644
--- a/Master/texmf-dist/tex/latex/caption/bicaption.sty
+++ b/Master/texmf-dist/tex/latex/caption/bicaption.sty
@@ -6,7 +6,7 @@
%%
%% bicaption.dtx (with options: `package')
%%
-%% Copyright (C) 1994-2022 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
+%% Copyright (C) 1994-2023 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
%%
%% https://gitlab.com/axelsommerfeldt/caption
%%
@@ -39,7 +39,7 @@
\providecommand\DeclareRelease[3]{}
\providecommand\DeclareCurrentRelease[2]{}
\DeclareCurrentRelease{v1}{2011/07/13}
-\ProvidesPackage{bicaption}[2021/05/02 v1.5b Bilingual Captions (AR)]
+\ProvidesPackage{bicaption}[2023/02/19 v1.6 Bilingual Captions (AR)]
\RequirePackage{caption}[2011/11/10] % we need at least v3.2e
\newcommand*\bicaption@Info[1]{%
\PackageInfo{bicaption}{#1}}
@@ -138,7 +138,7 @@
\bicaption@setmainlanguage
\fi
\ifcsname captionmainlanguage\endcsname
- \captionsetup[bi-first]{lang=\captionmainlanguage}%
+ \captionsetup*[bi-first]{lang=\captionmainlanguage}%
\else
\ifcsname bicaption@language@value\endcsname % option "lang=" was used
\expandafter\bicaption@Warning
@@ -158,7 +158,7 @@
\let\captionmainlanguage\xpg@main@language
\fi\fi}
\@onlypreamble\bicaption@setmainlanguage
-\caption@SetupOptions{bicaption}{\captionsetup[bi-second]{#2}}%
+\caption@SetupOptions{bicaption}{\captionsetup*[bi-second]{#2}}%
\caption@ProcessOptions*{bicaption}
\let\bicaption@addcontentsline@ORI\caption@addcontentsline
\renewcommand*\caption@addcontentsline[2]{%
@@ -236,6 +236,17 @@
{\newcommand\bicaption@slc[2]{\caption@@slc{#1}{#2}{\captionwidth}}}
\providecommand*\caption@setsinglelinecheck{%
\caption@set@bool\caption@ifslc}
+\newcommand*\bicaptionsetup{%
+ \caption@teststar\@bicaptionsetup*{}}
+\newcommand*\@bicaptionsetup[1]{%
+ \kernel@ifnextchar[%]
+ {\bicaption@setup@options{#1}}%
+ {\bicaption@setup*}}
+\def\bicaption@setup@options#1[#2]{%
+ \bicaption@setup{#1[{#2}]}}
+\newcommand*\bicaption@setup[2]{%
+ \captionsetup#1[bi-first]{#2}%
+ \captionsetup#1[bi-second]}
\newcommand\bicaption{\@bicaption\caption}
\newcommand\bicaptionbox{\@bicaption\captionbox}
\newcommand\bisubcaption{\@bicaption\subcaption}
@@ -255,9 +266,9 @@
\long\def\@@@@bicaption#1#2[#3]#4{%
\bicaption@getlabel{#2}%
\bicaption@ifswap
- {\bicaption@setup{#1}{#2}%
+ {\bicaption@set{#1}{#2}%
\bicaption@cmd[{#3}]{#4}}%
- {\bicaption@setup{#3}{#4}%
+ {\bicaption@set{#3}{#4}%
\bicaption@cmd[{#1}]{#2}}}
\long\def\bicaption@star#1[#2]{#1*}
\@ifundefined{caption@getlabel}{%
@@ -300,7 +311,7 @@
}{%
\newcommand*\bicaption@clrlabel{\caption@clrlabel} % caption3 >= v2.3
}
-\newcommand\bicaption@setup[2]{%
+\newcommand\bicaption@set[2]{%
\def\bicaption@lentry{#1}%
\def\bicaption@text{\ignorespaces #2}}
\newcommand*\bicaption@clear{%
@@ -313,7 +324,7 @@
\def\bicaption{%
\caption@withoptargs\caption@SC@bicaption}%
\long\def\caption@SC@bicaption#1#2{%
- \@ifnextchar[%]
+ \kernel@ifnextchar[%]
{\caption@SC@bi@caption{#1}{#2}}%
{\caption@SC@bi@caption@{#1}{#2}}}%
\long\def\caption@SC@bi@caption#1#2[#3]#4{%
@@ -329,14 +340,14 @@
\lst@Key{caption1}\relax{%
\lstKV@OptArg[{#1}]{#1}{%
\bicaption@ifswap
- {\bicaption@setup{##1}{##2}}%
+ {\bicaption@set{##1}{##2}}%
{\def\lst@@caption{##1}\def\lst@caption{##2}}}%
\let\lst@title\@empty}%
\lst@Key{caption2}\relax{%
\lstKV@OptArg[{#1}]{#1}{%
\bicaption@ifswap
{\def\lst@@caption{##1}\def\lst@caption{##2}}%
- {\bicaption@setup{##1}{##2}}}%
+ {\bicaption@set{##1}{##2}}}%
\let\lst@title\@empty}%
\lst@AddToHookExe{TextStyle}{%
\bicaption@clear}%
@@ -358,8 +369,8 @@
\bicaption@LT@setup}%
\gdef\bicaption@LT@setup{%
\bicaption@ifswap
- {\bicaption@setup{#1}{#2}}%
- {\bicaption@setup{#3}{#4}}}%
+ {\bicaption@set{#1}{#2}}%
+ {\bicaption@set{#3}{#4}}}%
\bicaption@ifswap
{\egroup\bicaption@cmd[{#3}]{#4}}%
{\egroup\bicaption@cmd[{#1}]{#2}}}
diff --git a/Master/texmf-dist/tex/latex/caption/caption-koma.sto b/Master/texmf-dist/tex/latex/caption/caption-koma.sto
index 2b76e5edc47..143b867423e 100644
--- a/Master/texmf-dist/tex/latex/caption/caption-koma.sto
+++ b/Master/texmf-dist/tex/latex/caption/caption-koma.sto
@@ -36,7 +36,7 @@
%% caption-thesis.sto, bicaption.sty, ltcaption.sty, subcaption.sty.
%%
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesFile{caption-koma.sto}[2020/09/21 v2.0b Adaption of the caption package to the KOMA-Script document classes (AR)]
+\ProvidesFile{caption-koma.sto}[2022/12/27 v2.0c Adaption of the caption package to the KOMA-Script document classes (AR)]
\expandafter\let\expandafter\caption@koma@setcapwidth
\csname\string\setcapwidth\endcsname
\@namedef{\string\setcapwidth}[#1]#2{%
@@ -97,20 +97,6 @@
\newcommand*\caption@setcapindent{%
\captionsetup{indent=\ifdim\cap@indent<\z@\z@\else\cap@indent\fi}}
\caption@ifdefined\cap@indent{\caption@setcapindent}{}
-\let\caption@koma@parindent\KV@caption@parindent
-\DeclareCaptionOption{parindent}[]{%
- \ifx,#1,%
- \caption@Debug{Option `parindent' ignored}%
- \else
- \caption@koma@parindent{#1}%
- \fi}%
-\let\caption@koma@parskip\KV@caption@parskip
-\DeclareCaptionOption{parskip}[]{%
- \ifx,#1,%
- \caption@Debug{Option `parskip' ignored}%
- \else
- \caption@koma@parskip{#1}%
- \fi}%
\g@addto@macro\onelinecaptionstrue{\caption@setsinglelinecheck{true}}%
\g@addto@macro\onelinecaptionsfalse{\caption@setsinglelinecheck{false}}%
\ifonelinecaptions
diff --git a/Master/texmf-dist/tex/latex/caption/caption.sty b/Master/texmf-dist/tex/latex/caption/caption.sty
index c3381e7671d..656d39a32db 100644
--- a/Master/texmf-dist/tex/latex/caption/caption.sty
+++ b/Master/texmf-dist/tex/latex/caption/caption.sty
@@ -6,7 +6,7 @@
%%
%% caption.dtx (with options: `package')
%%
-%% Copyright (C) 1994-2022 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
+%% Copyright (C) 1994-2023 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
%%
%% https://gitlab.com/axelsommerfeldt/caption
%%
@@ -46,8 +46,8 @@
\DeclareRelease{v3.4}{2019-11-24}{caption_2020-07-29.sty}
\DeclareRelease{v3.5}{2020-08-30}{caption_2020-10-26.sty}
\DeclareCurrentRelease{v3.6}{2022-02-20}
-\ProvidesPackage{caption}[2022/03/01 v3.6b Customizing captions (AR)]
-\RequirePackage{caption3}[2022/01/07] % needs v2.3 or newer
+\ProvidesPackage{caption}[2023/03/12 v3.6j Customizing captions (AR)]
+\RequirePackage{caption3}[2022/04/06] % needs v2.4 or newer
\caption@ifbool{documentclass}{}{%
\caption@WarningNoLine{%
Unknown document class (or package),\MessageBreak
@@ -104,10 +104,12 @@
please use either \string\usepackage{caption}[=v1]\MessageBreak
or \string\usepackage{caption-light} instead}%
}{\caption@ifinlist{#1}{0,false,no,off}{%
- % nothing to do
+ \let\caption@ifcompatibility\@secondoftwo % not used; for backward compatibility only
}{%
\caption@Error{Undefined compatibility value `#1'}%
}}}
+\@onlypreamble@key{caption}{compatibility}
+\caption@setbool{compatibility}{0} % default: Try not to be compatible to v1.x
\DeclareCaptionOptionNoValue*{normal}{%
\caption@setup{format=plain,justification=justified}}
\DeclareCaptionOptionNoValue*{isu}{%
@@ -268,6 +270,7 @@
\def\caption@xfloat#1[#2]{%
\caption@ORI@xfloat{#1}[#2]%
\caption@settype{#1}%
+ \caption@setanchor
\caption@xfloat@hook}
\newcommand*\caption@xfloat@hook{}
\def\caption@xdblfloat#1[#2]{%
@@ -282,57 +285,56 @@
\DeclareCaptionOptionNoValue{subtype*}{\setcaptionsubtype*}%
}
\def\setcaptiontype{%
+ \caption@teststar\@setcaptiontype\@gobble\@iden}
+\newcommand*\@setcaptiontype[1]{%
+ \kernel@ifnextchar[%]
+ {\@setcaptiontype@#1}%
+ {\@@setcaptiontype#1\relax}}
+\def\@setcaptiontype@#1[#2]{%
+ \@@setcaptiontype{#1}{\caption@setoptions{#2}}}
+\newcommand*\@@setcaptiontype[3]{%
+ \caption@settype{#3}#2%
\caption@parboxrestore@light
- \caption@settype}
+ #1\caption@setanchor}
\newcommand*\caption@settype{%
\caption@initposition
\caption@clrflags
\aftergroup\flushsubcaptionlistentries
- \caption@@settype}
-\newcommand*\caption@@settype{%
- \caption@teststar\caption@@settype@\@firstoftwo\@secondoftwo}
-\newcommand*\caption@@settype@[1]{%
- \@ifnextchar[%]
- {\caption@@settype@@{#1}}%
- {\caption@@@settype{}{#1}}}
-\def\caption@@settype@@#1[#2]#3{%
- \caption@@@settype{}{#1}{#3}%
- \caption@setoptions{#2}}
-\newcommand*\setcaptionsubtype{%
- \caption@setsubtype}
-\newcommand*\caption@setsubtype{% used by the floatrow package
- \caption@teststar\caption@@setsubtype\@firstoftwo\@secondoftwo}
-\newcommand*\caption@@setsubtype[1]{%
- \caption@iftype
- {\caption@ifsubtype
- {\caption@Debug{subtype=\@subcaptype}}%
- {\caption@@@settype{sub}{#1}{sub\@captype}}}%
- {\caption@OutsideFloat\setcaptionsubtype}}
-\newcommand*\caption@@@settype[3]{%
- \caption@Debug{#1type:=#3}%
- \@nameuse{caption@check#1type}{#3}%
- {\caption@checkgrouplevel{#1}{%
- \captionsetup{#1type#2*\@empty=...}#2{ or
- \@backslashchar#1captionof}{}}%
- \edef\caption@tempa{#3}%
+ \caption@@settype{}}
+\newcommand*\caption@@settype[2]{%
+ \caption@Debug{#1type:=#2}%
+ \@nameuse{caption@check#1type}{#2}%
+ {\caption@checkgrouplevel{#1}{\setcaption#1type}%
+ \edef\caption@tempa{#2}%
\expandafter\ifx\csname @#1captype\endcsname\caption@tempa \else
- \ifcaptionsetup@star\else\@nameuse{caption@#1type@warning}\fi
+ \@nameuse{caption@#1type@warning}%
\fi
\expandafter\let\csname @#1captype\endcsname\caption@tempa
\@nameuse{caption@#1typehook}%
- \caption@setoptions{#3}%
+ \caption@setoptions{#2}%
\ifx\caption@opt\relax
\@nameundef{caption@#1type@warning}%
\else
\@namedef{caption@#1type@warning}{\caption@Warning{%
The #1type was already set to
`\csname @#1captype\endcsname'\MessageBreak}}%
- \fi
- #2{}{\caption@reset@currentlabel\caption@start}}}
+ \fi}}
+\newcommand*\setcaptionsubtype{%
+ \caption@teststar\@setcaptionsubtype\@gobble\@iden}
+\newcommand*\@setcaptionsubtype[1]{%
+ \caption@iftype
+ {\caption@ifsubtype
+ {\caption@Debug{type=\@captype, subtype=\@subcaptype}}%
+ {\caption@@settype{sub}{sub\@captype}%
+ #1\caption@setanchor}}%
+ {\caption@OutsideFloat\setcaptionsubtype}}
\newcommand*\caption@parboxrestore@light{%
\let\par\@@par
\parindent\z@ \parskip\z@skip
\sloppy}
+\newcommand*\caption@setanchor{%
+ \caption@reset@currentlabel
+ \caption@start}
\newcommand*\caption@reset@currentlabel{%
\let\@currentlabel\caption@undefinedlabel
\ifx\caption@x@label\@undefined
@@ -349,15 +351,11 @@
\newcommand*\caption@checksubtype[1]{%
\caption@ifdefined@subtype{#1}%
\@firstofone
- {\caption@ifin@list\sf@counterlist{#1}%
- {\caption@Warning{%
- \noexpand\setcaptionsubtype without \string\DeclareCaptionSubType.\MessageBreak
- This is not designed to work; you could try replacing\MessageBreak
- the `subfig' package with `subcaption' to resolve\MessageBreak
- this problem which occurred}%
- \@firstofone}%
- {\caption@Error{Undefined subtype `#1'}%
- \@gobble}}}
+ {\@ifundefined{c@#1}%
+ {\caption@Error{Undefined counter `#1'}}%
+ {\caption@subtypesource\caption@subtype@source{#1}%
+ \caption@Error{The counter `#1' was defined by\MessageBreak\caption@subtype@source}}%
+ \@gobble}}
\newcommand*\caption@checkgrouplevel[2]{%
\@ifundefined{#1caption@grouplevel}{%
\caption@ifundefined\caption@grouplevel{\let\caption@grouplevel\z@}{}%
@@ -397,7 +395,7 @@
\newcommand*\captionlistentry{%
\caption@teststar\caption@listentry\@firstoftwo\@secondoftwo}
\newcommand*\caption@listentry[1]{%
- \@ifnextchar[%]
+ \kernel@ifnextchar[%]
{\caption@listentry@{#1}}%
{\caption@@listentry{#1}}}
\def\caption@listentry@#1[#2]{%
@@ -598,7 +596,6 @@
{\let\caption@next\@firstoftwo}%
#3%
\caption@next}
-\@ifundefined{kernel@ifnextchar}{\let\kernel@ifnextchar\@ifnextchar}{}
\newcommand\caption@dblarg[1]{%
\kernel@ifnextchar[%]
{\caption@ydblarg{#1}}%
@@ -648,36 +645,16 @@
\caption@iflist{}{\let\caption@setlist\@gobble}%
\caption@setoptions{sub}%
\caption@setoptions{subfloat}% for subfig-package compatibility
- \def\caption@settype{\caption@withoptargs\caption@sub@settype}%
- \def\caption@sub@settype##1##2{%
- \edef\caption@tempa{##2}%
- \ifx\caption@tempa\@captype
-%%% \caption@setsubtype##1\relax
- \else
- \caption@Error{##2 inside \@subcaptype}%
- \fi}%
+ \renewcommand*\caption@settype[1]{%
+ \caption@Error{##1 inside \@subcaptype}}%
\let\caption\caption@subcaption
\let\@caption\caption@@caption
\let\phantomcaption\caption@subphantom
\let\captionlistentry\caption@sublistentry
\let\captiontext\caption@subtext
\let\caption@refstepcounter\caption@refstepcounter@
- \if@subfloatrow
- \caption@Debug{Keeping \string\@makecaption}%
- \else
- \let\@makecaption\caption@makecaption
- \fi
+ \let\@makecaption\caption@makecaption
\fi}%
-\caption@AtBeginDocument{%
- \caption@ifundefined\@subfloatrowtrue
- {\newif\if@subfloatrow
- \caption@ifundefined\subfloatrow
- {}%
- {\caption@Debug{Patching subfloatrow environment}%
- \g@addto@macro\capsubrowsettings{\@subfloatrowtrue}%
- \g@addto@macro\killfloatstyle{%
- \ifx\c@FRobj\c@FRsobj\@subfloatrowtrue\fi}}}%
- {\caption@Debug{\string\if@subfloatrow is already defined}}}%
\newcommand*\caption@subcaption{%
\caption@checkgrouplevel{sub}\subcaption
\caption@star
@@ -773,7 +750,7 @@
\caption@AtBeginDocument*{%
\caption@ifneedfreeze{%
\newcommand*\caption@freezetype[1]{%
- \caption@settype*{#1}%
+ \caption@settype{#1}%
\captionsetup*[sub]{hypcap=true}% Note: This is just a (q&d) workaround!
\caption@freeze}%
\newcommand*\caption@freeze{%
@@ -823,7 +800,7 @@
\newcommand*\caption@freeze@error{%
\caption@Error{Only one \noexpand\caption can be placed in this environment}}
\newcommand*\caption@prepare@defrost{%
- \let\caption@settype\caption@@settype}
+ \def\caption@settype{\caption@@settype{}}}
\newcommand*\caption@defrost{%
\ifx\caption@frozen@caption\@undefined
\caption@frozen@content
@@ -835,20 +812,21 @@
\caption@undefbool{needfreeze}}
\let\caption@warmup\relax
\caption@IfPackageLoaded{changepage}[2008/07/23 memoir-v3.7k]{%
+ \providecommand*\caption@patch@adjustwidth[1]{%
+ \expandafter\let\csname caption@#1\expandafter\endcsname\csname #1\endcsname
+ \expandafter\renewcommand\csname #1\endcsname[2]{%
+ \@nameuse{caption@#1}{##1}{##2}%
+ \caption@set@adjustwidth
+ \ignorespaces}}%
+ \caption@patch@adjustwidth{adjustwidth}%
+ \caption@patch@adjustwidth{adjustwidth*}%
+ \let\caption@patch@adjustwidth\relax
\newdimen\caption@adjustwidth@hsize
\newdimen\caption@adjustwidth@linewidth
\providecommand*\caption@set@adjustwidth{%
\caption@adjustwidth@hsize\hsize
\caption@adjustwidth@linewidth\linewidth
\l@addto@macro\caption@beginex@hook\caption@test@adjustwidth}%
- \providecommand*\caption@patch@changepage[1]{%
- \expandafter\let\csname caption@#1\expandafter\endcsname\csname #1\endcsname
- \expandafter\renewcommand\csname #1\endcsname[2]{%
- \@nameuse{caption@#1}{##1}{##2}%
- \caption@set@adjustwidth}}%
- \caption@patch@changepage{adjustwidth}%
- \caption@patch@changepage{adjustwidth*}%
- \let\caption@patch@changepage\relax
\providecommand\caption@test@adjustwidth{%
\ifdim\hsize=\caption@adjustwidth@hsize
\ifdim\linewidth=\caption@adjustwidth@linewidth
@@ -893,9 +871,12 @@
\caption@ORI@float@makebox{#1\relax \caption@defrostHref}}%
}%
\newcommand*\caption@float@setname[1]{%
- \expandafter\ifx\csname #1name\endcsname\relax
- \expandafter\let\csname #1name\expandafter\endcsname\csname fname@#1\endcsname
+ \expandafter\ifx\csname #1name\endcsname\relax % either undefined or \relax
+ \@namedef{#1name}{\@nameuse{fname@#1}}%
\fi}%
+ \renewcommand*\caption@setname[2]{%
+ \@ifundefined{fname@#1}{}{\caption@ifdefined\floatname\floatname\@gobbletwo{#1}{#2}}%
+ \@namedef{#1name}{#2}}%
\g@addto@macro\fs@plaintop{\def\@fs@mid{\vspace\abovecaptionskip\relax}}%
\g@addto@macro\fs@boxed{\def\@fs@mid{\kern\abovecaptionskip\relax}}%
\providecommand*\float@getstyle[2]{%
@@ -933,7 +914,25 @@
\newcommand*\caption@floatflt[1]{%
\caption@settype{#1}%
\caption@clearmargin
- \caption@setoptions{floating#1}}%
+ \caption@setoptions{floating#1}%
+ \caption@setanchor}%
+}{}
+\caption@IfPackageLoaded{floatrow}[2008/08/02 v0.3b]{%
+ \renewcommand\captionlabel[1]{{\def\FR@tmp{\@captype}\ifnum\floatbox@depth>\@ne
+ \def\FR@tmp{sub\@captype}\setcaptionsubtype*\stepcounter{\FR@tmp}\fi
+ \caption@@@make{\caption@fnum\FR@tmp}{#1}}}
+ \renewenvironment{subfloatrow}{\capsubrowsettings
+ \caption@subfloatrow@hook % as replacement for \captionsetup{subtype}
+ \@nameuse{subfloatrow*}}{\@nameuse{endsubfloatrow*}}
+ \providecommand*\caption@subfloatrow@hook{}
+ \renewenvironment{subfloatrow*}[1][2]{\let\flrow@to\empty
+ \let\Xhsize\sXhsize%\let\Zhsize\sZhsize
+ \FR@ifunloc{\let\FR@ifcountH\@firstoftwo}\let\c@FRobj\c@FRsobj
+ \def\FRleftmargin{}\def\FRrightmargin{}\let\floatrowsep\subfloatrowsep
+ \floatrow[#1]\killfloatstyle
+ \let\caption@makecaption\flrow@makecaption}% <- This line added
+ {\ifdim\lastskip>\z@\unskip\fi
+ \@ifundefined{adjustsubfloats}\relax\adjustsubfloats\endfloatrow}
}{}
\caption@IfPackageLoaded{fltpage}[1998/10/29 v.0.3]{%
\caption@setbool{needfreeze}{1}%
@@ -1142,7 +1141,7 @@
\@ifstar\@captionsetup\@captionsetup}% gobble *
\def\@captionsetup#1{\LT@captionsetup{#1}\egroup}%
\def\LT@captionsetup#1{%
- \captionsetup@startrue\caption@setup@options[@longtable]{#1}%
+ \caption@setup@options\@gobble[@longtable]{#1}%
\global\let\caption@opt@@longtable\caption@opt@@longtable}%
\def\captionlistentry{%
\noalign\bgroup
@@ -1180,7 +1179,7 @@
\caption@listentry\@firstoftwo[{#1}]{#2}%
\endgroup\ignorespaces}%
\newcommand*\caption@LT@settype[1]{%
- \caption@settype*{#1}%
+ \caption@settype{#1}%
\ifdim\LTcapwidth=4in \else
\caption@setwidth\LTcapwidth
\fi
@@ -1215,7 +1214,8 @@
\let\@makecaption\caption@@make
\caption@setautoposition b%
\caption@settype{#1}%
- \caption@clearmargin}%
+ \caption@clearmargin
+ \caption@setanchor}%
\newcommand\caption@wincaption[1]{%
\ifdim\picwd=\z@
\let\caption@makecurrent\@gobbletwo
@@ -1256,6 +1256,7 @@
\caption@clearmargin
\caption@setoptions{parpic}%
\caption@setautoposition b%
+ \caption@setanchor
\expandafter\expandafter\expandafter\caption@ORI
\expandafter\expandafter\expandafter[%
\expandafter\expandafter\expandafter{%
@@ -1290,6 +1291,33 @@
\caption@@make{#1}{#2}}%
\nobreak\hspace{12pt}}%
}{}
+\caption@ifdefined\scr@caption{%
+ \long\def\caption@IfKomaPackageLoaded#1[#2]#3#4{%
+ \caption@InfoNoLine{KOMA-Script #1 package detected}
+ #3}}{%
+ \let\caption@IfKomaPackageLoaded\caption@IfPackageLoaded
+ }
+\caption@IfKomaPackageLoaded{scrextend}[2002/07/01 v3.0]{%
+ \let\caption@addmargin@env\@addmargin
+ \renewcommand*\@addmargin{%
+ \@testopt\caption@@addmargin\@tempa}%
+ \def\caption@@addmargin[#1]#2{%
+ \caption@addmargin@env[{#1}]{#2}%
+ \caption@set@addmargin
+ \ignorespaces}%
+ \newdimen\caption@addmargin@hsize
+ \newdimen\caption@addmargin@linewidth
+ \providecommand*\caption@set@addmargin{%
+ \caption@addmargin@hsize\hsize
+ \caption@addmargin@linewidth\linewidth
+ \l@addto@macro\caption@beginex@hook\caption@test@addmargin}%
+ \providecommand\caption@test@addmargin{%
+ \ifdim\hsize=\caption@addmargin@hsize
+ \ifdim\linewidth=\caption@addmargin@linewidth
+ \hsize=\linewidth
+ \fi
+ \fi}%
+ }{}%
\caption@IfPackageLoaded{sidecap}[2003/06/06 v1.6f]{%
\caption@setbool{needfreeze}{1}%
\let\caption@ORI@SC@zfloat\SC@zfloat
@@ -1297,7 +1325,8 @@
\caption@ORI@SC@zfloat{#1}{#2}{#3}[#4]%
\SC@RestoreCommands
\caption@freezetype{#2}%
- \let\SC@label\label}%
+ \let\SC@label\label
+ \ignorespaces}%
\providecommand*\SC@RestoreCommands{%
\let\caption=\SC@orig@caption \let\label=\SC@orig@label}%
\let\caption@ORI@endSC@FLOAT\endSC@FLOAT
@@ -1346,7 +1375,7 @@
\caption@gettitle{#2}%
\caption@ORI@xtablecaption[{#1}]{#2}}%
\long\def\ST@caption#1[#2]#3{\par%
- \caption@settype*{#1}%
+ \caption@settype{#1}%
\caption@setoptions{supertabular}%
\caption@setposition{\if@topcaption t\else b\fi}%
\caption@beginex{#1}{#2}{#3}%
@@ -1365,7 +1394,7 @@
\caption@gettitle{#2}%
\caption@ORI@xtablecaption[{#1}]{#2}}%
\long\def\ST@caption#1[#2]#3{\par%
- \caption@settype*{#1}%
+ \caption@settype{#1}%
\caption@setoptions{xtabular}%
\caption@set{position}{\if@topcaption t\else b\fi}%
\@initisotab
@@ -1380,18 +1409,22 @@
\caption@IfPackageLoaded{threeparttable}[2003/06/13 v3.0]{%
\let\caption@ORI@threeparttable\threeparttable
\renewcommand*\threeparttable{%
- \caption@settype{\@ifundefined{@captype}{table}{\@captype}}%
-%%% \caption@setposition{auto}% ?
- \caption@clearmargin
- \caption@setoptions{threeparttable}%
+ \caption@setthreeparttabletype{threepart}{table}%
\caption@ORI@threeparttable}%
\let\caption@ORI@measuredfigure\measuredfigure
\renewcommand*\measuredfigure{%
- \caption@settype{\@ifundefined{@captype}{figure}{\@captype}}%
+ \caption@setthreeparttabletype{measured}{figure}%
+ \caption@ORI@measuredfigure}%
+ \newcommand*\caption@setthreeparttabletype[2]{%
+ \caption@ifsubtype
+ {\def\caption@threeparttabletype{#1sub#2}%
+ \let\caption@setanchor\relax}%
+ {\caption@settype{\@ifundefined{@captype}{#2}{\@captype}}%
+ \def\caption@threeparttabletype{#1#2}}%
%%% \caption@setposition{auto}% ?
\caption@clearmargin
- \caption@setoptions{measuredfigure}%
- \caption@ORI@measuredfigure}%
+ \caption@setoptions\caption@threeparttabletype
+ \caption@setanchor}%
\def\TPT@caption#1[#2]#3{%
\gdef\TPT@docapt{%
\global\let\TPT@docapt\@undefined
@@ -1430,7 +1463,8 @@
\caption@settype{#1}%
\caption@clearmargin
%%% \caption@setoptions{wrap}%
- \caption@setoptions{wrap#1}}%
+ \caption@setoptions{wrap#1}%
+ \caption@setanchor}%
}{}
\newcommand*\caption@checkcounter[1]{%
\caption@check{\the#1}{\@nameuse{the#1}}}
diff --git a/Master/texmf-dist/tex/latex/caption/caption3.sty b/Master/texmf-dist/tex/latex/caption/caption3.sty
index f6e1f859bab..1957aa5167c 100644
--- a/Master/texmf-dist/tex/latex/caption/caption3.sty
+++ b/Master/texmf-dist/tex/latex/caption/caption3.sty
@@ -6,7 +6,7 @@
%%
%% caption3.dtx (with options: `package')
%%
-%% Copyright (C) 1994-2022 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
+%% Copyright (C) 1994-2023 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
%%
%% https://gitlab.com/axelsommerfeldt/caption
%%
@@ -45,7 +45,8 @@
\DeclareRelease{v1.13}{2019-11-24}{caption3_2020-07-29.sty} % for caption v3.4
\DeclareRelease{v2.0} {2020-08-30}{caption3_2020-10-26.sty} % for caption v3.5
\DeclareCurrentRelease{v2.3}{2022-02-20} % for caption v3.6
-\ProvidesPackage{caption3}[2022/03/17 v2.3b caption3 kernel (AR)]
+\ProvidesPackage{caption3}[2023/03/12 v2.4 caption3 kernel (AR)]
+\@ifundefined{kernel@ifnextchar}{\let\kernel@ifnextchar\@ifnextchar}{}
\providecommand*\@nameundef[1]{%
\expandafter\let\csname #1\endcsname\@undefined}
\providecommand\l@addto@macro[2]{%
@@ -155,7 +156,7 @@
{\def\caption@tempa{*}\caption@@withoptargs{#1}}%
{\def\caption@tempa{}\caption@@withoptargs{#1}}}
\def\caption@@withoptargs#1{%
- \@ifnextchar[%]
+ \kernel@ifnextchar[%]
{\caption@@@withoptargs{#1}}%
{\caption@@@@withoptargs{#1}}}
\def\caption@@@withoptargs#1[#2]{%
@@ -234,28 +235,27 @@
\KV@err{No value allowed for #1}%
\expandafter\@gobble
\fi}
-\newif\ifcaptionsetup@star
\newcommand*\captionsetup{%
\caption@teststar@\@captionsetup\@gobble\@firstofone}
\newcommand*\@captionsetup[1]{%
- \captionsetup@startrue#1\captionsetup@starfalse
- \@ifnextchar[%]
- \caption@setup@options\caption@setup}
+ \kernel@ifnextchar[%]
+ {\caption@setup@options#1}%
+ {\caption@setup}}
\newcommand*\caption@setup{%
\caption@setkeys{caption}}
-\def\caption@setup@options[#1]{%
- \@ifnextchar[%]
+\def\caption@setup@options#1[#2]{%
+ \kernel@ifnextchar[%]
{\caption@stepthecounter
- \@expandtwoargs\caption@setup@options@@{#1}{@\caption@thecounter}}%
- {\caption@setup@options@{#1}}}
-\def\caption@setup@options@@#1#2[#3]#4{%
- \caption@declare@option{#2}[]{\caption@setup@options@{#3}{#4}}%
- \caption@setup@options@{#1}{#2}}
-\newcommand*\caption@setup@options@[2]{%
+ \@expandtwoargs\caption@setup@options@@{#2}{@\caption@thecounter}#1}%
+ {\caption@setup@options@#1{#2}}}
+\def\caption@setup@options@@#1#2#3[#4]#5{%
+ \caption@declare@option{#2}[]{\caption@setup@options@\@gobble{#4}{#5}}%
+ \caption@setup@options@#3{#1}{#2}}
+\newcommand*\caption@setup@options@[3]{%
\@bsphack
- \ifcaptionsetup@star\captionsetup@starfalse\else\caption@addtooptlist{#1}\fi
- \caption@checkoptions{#2}%
- \expandafter\caption@l@addto@list\csname caption@opt@#1\endcsname{#2}%
+ #1{\caption@addtooptlist{#2}}%
+ \caption@checkoptions{#3}%
+ \expandafter\caption@l@addto@list\csname caption@opt@#2\endcsname{#3}%
\@esphack}
\newcommand*\caption@checkoptions[1]{%
\begingroup
@@ -363,7 +363,6 @@
\expandafter\let\expandafter\KV@err\csname ORI@KV@err\caption@keydepth\endcsname
\expandafter\let\expandafter\KV@errx\csname ORI@KV@errx\caption@keydepth\endcsname
\expandafter\let\expandafter\XKV@err\csname ORI@XKV@err\caption@keydepth\endcsname
- \ifx\caption@keydepth\@empty \captionsetup@starfalse \fi
\@esphack}
\let\caption@keydepth\@empty
\newcommand*\caption@ExecuteOptions[2]{%
@@ -480,7 +479,7 @@
{\caption@@set{#1}{#2@fallback}{#3}}}
\@onlypreamble\caption@@setfallback
\newcommand*\caption@decl@package[2]{%
- \@ifnextchar[%]
+ \kernel@ifnextchar[%]
{\caption@declare@package{#1}{#2}}%
{\caption@declarepackage{#1}{#2}}}
\@onlypreamble\caption@decl@package
@@ -577,7 +576,8 @@
\newcommand*\caption@stepthecounter{%
\@tempcnta\caption@thecounter
\advance\@tempcnta\@ne\relax
- \xdef\caption@thecounter{\the\@tempcnta}}
+ \xdef\caption@thecounter{\the\@tempcnta}%
+ \global\let\caption@ifoddpage\caption@ifoddpage@}
\newcommand*\caption@newlabel{\@newl@bel{caption@r}}
\newcommand*\caption@thepage{\the\c@page}
\newcommand*\caption@label[1]{%
@@ -591,20 +591,20 @@
\newcommand*\caption@pageref[1]{%
\expandafter\ifx\csname caption@r@#1\endcsname\relax
\G@refundefinedtrue % => 'There are undefined references.'
- \@latex@warning{Reference `#1' on page \thepage \space undefined}%
+ \@latex@warning{Reference `caption@#1' on page \thepage \space undefined}%
\else
\expandafter\let\expandafter\caption@thepage\csname caption@r@#1\endcsname
\fi}
-\newcommand*\caption@ifoddpage{%
+\newcommand*\caption@ifoddpage@{%
\caption@iftwoside{%
\caption@label\caption@thecounter
\caption@pageref\caption@thecounter
\ifodd\caption@thepage
- \let\caption@ifoddpage\@firstoftwo
+ \global\let\caption@ifoddpage\@firstoftwo
\else
- \let\caption@ifoddpage\@secondoftwo
+ \global\let\caption@ifoddpage\@secondoftwo
\fi
- }{\let\caption@ifoddpage\@firstoftwo}%
+ }{\global\let\caption@ifoddpage\@firstoftwo}%
\caption@ifoddpage}
\newcommand*\caption@setoptcmd[2]{%
\caption@ifinlist{#2}{0,false,no,off}{\let#1\@undefined}{\def#1{#2}}}
@@ -1607,36 +1607,36 @@
\let\glsunset\@gobble
}
\newcommand*\caption@footnote{%
- \@ifnextchar[%]
+ \kernel@ifnextchar[%]
\@xfootnote
{\caption@l@stepcounter\@mpfn
\protected@xdef\@thefnmark{\thempfn}%
\@footnotemark\@footnotetext}}
\newcommand*\caption@footnotemark{%
- \@ifnextchar[%]
+ \kernel@ifnextchar[%]
\@xfootnotemark
{\caption@l@stepcounter{footnote}%
\protected@xdef\@thefnmark{\thefootnote}%
\@footnotemark}}
\newcommand*\caption@footnotetext{%
- \@ifnextchar[%]
+ \kernel@ifnextchar[%]
\@xfootnotenext
{\protected@xdef\@thefnmark{\thempfn}%
\@footnotetext}}
\newcommand*\caption@endnote{%
- \@ifnextchar[%]
+ \kernel@ifnextchar[%]
\@xendnote
{\caption@l@stepcounter{endnote}%
\protected@xdef\@theenmark{\theendnote}%
\@endnotemark\@endnotetext}}
\newcommand*\caption@endnotemark{%
- \@ifnextchar[%]
+ \kernel@ifnextchar[%]
\@xendnotemark
{\caption@l@stepcounter{endnote}%
\protected@xdef\@theenmark{\theendnote}%
\@endnotemark}}
\newcommand*\caption@endnotetext{%
- \@ifnextchar[%]
+ \kernel@ifnextchar[%]
\@xendnotenext
{\protected@xdef\@theenmark{\theendnote}%
\@endnotetext}}
@@ -1761,7 +1761,7 @@
\caption@teststar\caption@declaresubtype\@firstoftwo\@secondoftwo}
\@onlypreamble\DeclareCaptionSubType
\newcommand*\caption@declaresubtype[1]{%
- \@testopt{\caption@@declaresubtype{#1}}{alph}}
+ \@testopt{\caption@@declaresubtype#1}{alph}}
\@onlypreamble\caption@declaresubtype
\def\caption@@declaresubtype#1[#2]#3{%
\@ifundefined{c@#3}%
@@ -1770,23 +1770,26 @@
\@onlypreamble\caption@@declaresubtype
\newcommand*\caption@@@declaresubtype[4]{%
\caption@ifdefined@subtype{#4}%
- {\caption@Debug{Modify subtype `#4'}}%
- {\caption@Debug{New subtype `#4'}%
- \newcounter{#4}[{#3}]%
- \@namedef{ext@#4}{\csname ext@#3\endcsname}%
- \caption@declaresublistentry{#3}%
- \caption@l@addto@list\caption@subtypelist{#4}%
- \caption@subtype@hook{#4}}%
- \caption@ifdefined\contentsuse{%
- \contentsuse{#4}{\csname ext@#4\endcsname}}{}%
- \@namedef{#4name}{}%
- \@namedef{#4autorefname}{\csname #3autorefname\endcsname}%
- #1% is \@firstoftwo in star form, and \@secondoftwo otherwise
+ {\caption@Info{Modify subtype `#4'}}%
+ {\caption@Info{New subtype `#4'}%
+ \@ifundefined{c@#4}%
+ {\newcounter{#4}[#3]%
+ \@namedef{#4name}{}%
+ \@namedef{#4autorefname}{\csname #3autorefname\endcsname}%
+ \@namedef{ext@#4}{\csname ext@#3\endcsname}%
+ \caption@declaresublistentry{#3}%
+ \caption@ifdefined\contentsuse{%
+ \contentsuse{#4}{\csname ext@#4\endcsname}}{}%
+ \caption@l@addto@list\caption@subtypelist{#4}%
+ \caption@subtype@hook{#4}}%
+ {\caption@subtypesource\caption@subtype@source{#4}%
+ \caption@Error{The counter `#4' was already defined by\MessageBreak\caption@subtype@source}}}%
+ #1% is \@firstoftwo in star form, and \@secondoftwo otherwise
{\@namedef{p@#4}{}%
\@namedef{the#4}{\csname the#3\endcsname.\@nameuse{#2}{#4}}}%
{\@namedef{p@#4}{\csname the#3\endcsname}%
\@namedef{the#4}{\@nameuse{#2}{#4}}}%
- \@namedef{theH#4}{\csname theH#3\endcsname.\arabic{#4}}}
+ \@namedef{theH#4}{\csname theH#3\endcsname.\arabic{#4}}}
\@onlypreamble\caption@@@declaresubtype
\newcommand*\caption@declaresublistentry{%
\caption@ifdefined\l@chapter
@@ -1833,6 +1836,12 @@
\newcommand*\caption@subtypelist{}
\newcommand*\caption@ifdefined@subtype{%
\caption@ifin@list\caption@subtypelist}
+\newcommand*\caption@subtypesource[2]{%
+ \caption@ifdefined@subtype{#2}%
+ {\def#1{\noexpand\DeclareCaptionSubType (offered by the caption package)}}%
+ {\caption@ifin@list\sf@counterlist{#2}%
+ {\def#1{\noexpand\newsubfloat (offered by the subfig package)}}%
+ {\def#1{an unknown document class or package}}}}
\newcommand*\ForEachCaptionSubType{%
\@ifstar
{\caption@foreach@subtype\@gobble}%
diff --git a/Master/texmf-dist/tex/latex/caption/caption3_2019-09-01.sty b/Master/texmf-dist/tex/latex/caption/caption3_2019-09-01.sty
index bbdd12811b4..017eb9781eb 100644
--- a/Master/texmf-dist/tex/latex/caption/caption3_2019-09-01.sty
+++ b/Master/texmf-dist/tex/latex/caption/caption3_2019-09-01.sty
@@ -36,7 +36,7 @@
%% caption-thesis.sto, bicaption.sty, ltcaption.sty, subcaption.sty.
%%
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption3}[2019/09/01 v1.8d caption3 kernel (AR)]
+\ProvidesPackage{caption3}[2022/03/17 v1.8i caption3 kernel (AR)]
\providecommand\caption@FixArabTeX{%
\def\caption@tempa##1{}%
\ifx\caption@tempa\@gobble
@@ -259,16 +259,16 @@
\newcommand*\@captionsetup[1]{%
\captionsetup@startrue#1\captionsetup@starfalse
\@ifnextchar[\caption@setup@options\caption@setup}
-\newcommand*\caption@setup{\caption@setkeys{caption}}
+\newcommand*\caption@setup{%
+ \caption@setkeys{caption}}
\def\caption@setup@options[#1]{%
- \@ifnextchar[%
+ \@ifnextchar[%]
{\caption@stepthecounter
- \caption@withoptargs{\@expandtwoargs
- \caption@setup@options@i{#1}{@\caption@thecounter}}}%
+ \@expandtwoargs\caption@setup@options@@{#1}{@\caption@thecounter}}%
{\caption@setup@options@{#1}}}
-\newcommand*\caption@setup@options@i[4]{%
- \caption@setup@options@{#1}{#2}%
- \caption@declare@option{#2}[]{\captionsetup#3{#4}}}
+\def\caption@setup@options@@#1#2[#3]#4{%
+ \caption@declare@option{#2}[]{\caption@setup@options@{#3}{#4}}%
+ \caption@setup@options@{#1}{#2}}
\newcommand*\caption@setup@options@[2]{%
\@bsphack
\ifcaptionsetup@star\captionsetup@starfalse\else\caption@addtooptlist{#1}\fi
diff --git a/Master/texmf-dist/tex/latex/caption/caption3_2020-07-29.sty b/Master/texmf-dist/tex/latex/caption/caption3_2020-07-29.sty
index 2ae1ed58ce7..a50bf03e7b9 100644
--- a/Master/texmf-dist/tex/latex/caption/caption3_2020-07-29.sty
+++ b/Master/texmf-dist/tex/latex/caption/caption3_2020-07-29.sty
@@ -36,7 +36,7 @@
%% caption-thesis.sto, bicaption.sty, ltcaption.sty, subcaption.sty.
%%
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption3}[2020/07/29 v1.13 caption3 kernel (AR)]
+\ProvidesPackage{caption3}[2022/04/06 v1.13b caption3 kernel (AR)]
\providecommand\caption@FixArabTeX{%
\def\caption@tempa##1{}%
\ifx\caption@tempa\@gobble
@@ -247,15 +247,15 @@
\captionsetup@startrue#1\captionsetup@starfalse
\@ifnextchar[%]
\caption@setup@options\caption@setup}
-\newcommand*\caption@setup{\caption@setkeys{caption}}
+\newcommand*\caption@setup{%
+ \caption@setkeys{caption}}
\def\caption@setup@options[#1]{%
\@ifnextchar[%]
{\caption@stepthecounter
- \caption@withoptargs{\@expandtwoargs
- \caption@setup@options@i{#1}{@\caption@thecounter}}}%
+ \@expandtwoargs\caption@setup@options@@{#1}{@\caption@thecounter}}%
{\caption@setup@options@{#1}}}
-\newcommand*\caption@setup@options@i[4]{%
- \caption@declare@option{#2}[]{\captionsetup#3{#4}}%
+\def\caption@setup@options@@#1#2[#3]#4{%
+ \caption@declare@option{#2}[]{\caption@setup@options@{#3}{#4}}%
\caption@setup@options@{#1}{#2}}
\newcommand*\caption@setup@options@[2]{%
\@bsphack
@@ -1642,17 +1642,17 @@
\@namedef{ext@#4}{\csname ext@#3\endcsname}%
\caption@declaresublistentry{#3}%
\caption@l@addto@list\caption@subtypelist{#4}%
- \caption@subtype@hook{#4}}%
- \caption@ifdefined\contentsuse{%
- \contentsuse{#4}{\csname ext@#4\endcsname}}{}%
- \@namedef{#4name}{}%
- \@namedef{#4autorefname}{\csname #3autorefname\endcsname}%
- #1% is \@firstoftwo in star form, and \@secondoftwo otherwise
+ \caption@subtype@hook{#4}%
+ \caption@ifdefined\contentsuse{%
+ \contentsuse{#4}{\csname ext@#4\endcsname}}{}%
+ \@namedef{#4name}{}%
+ \@namedef{#4autorefname}{\csname #3autorefname\endcsname}}%
+ #1% is \@firstoftwo in star form, and \@secondoftwo otherwise
{\@namedef{p@#4}{}%
\@namedef{the#4}{\csname the#3\endcsname.\@nameuse{#2}{#4}}}%
{\@namedef{p@#4}{\csname the#3\endcsname}%
\@namedef{the#4}{\@nameuse{#2}{#4}}}%
- \@namedef{theH#4}{\csname theH#3\endcsname.\arabic{#4}}}
+ \@namedef{theH#4}{\csname theH#3\endcsname.\arabic{#4}}}
\@onlypreamble\caption@@@declaresubtype
\newcommand*\caption@declaresublistentry{%
\caption@ifdefined\l@chapter
diff --git a/Master/texmf-dist/tex/latex/caption/caption3_2020-10-26.sty b/Master/texmf-dist/tex/latex/caption/caption3_2020-10-26.sty
index 98d8612ca45..b5cd17ba268 100644
--- a/Master/texmf-dist/tex/latex/caption/caption3_2020-10-26.sty
+++ b/Master/texmf-dist/tex/latex/caption/caption3_2020-10-26.sty
@@ -36,7 +36,7 @@
%% caption-thesis.sto, bicaption.sty, ltcaption.sty, subcaption.sty.
%%
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption3}[2020/10/26 v2.2f caption3 kernel (AR)]
+\ProvidesPackage{caption3}[2022/04/06 v2.2h caption3 kernel (AR)]
\providecommand*\@nameundef[1]{%
\expandafter\let\csname #1\endcsname\@undefined}
\providecommand\l@addto@macro[2]{%
@@ -232,15 +232,15 @@
\captionsetup@startrue#1\captionsetup@starfalse
\@ifnextchar[%]
\caption@setup@options\caption@setup}
-\newcommand*\caption@setup{\caption@setkeys{caption}}
+\newcommand*\caption@setup{%
+ \caption@setkeys{caption}}
\def\caption@setup@options[#1]{%
\@ifnextchar[%]
{\caption@stepthecounter
- \caption@withoptargs{\@expandtwoargs
- \caption@setup@options@i{#1}{@\caption@thecounter}}}%
+ \@expandtwoargs\caption@setup@options@@{#1}{@\caption@thecounter}}%
{\caption@setup@options@{#1}}}
-\newcommand*\caption@setup@options@i[4]{%
- \caption@declare@option{#2}[]{\captionsetup#3{#4}}%
+\def\caption@setup@options@@#1#2[#3]#4{%
+ \caption@declare@option{#2}[]{\caption@setup@options@{#3}{#4}}%
\caption@setup@options@{#1}{#2}}
\newcommand*\caption@setup@options@[2]{%
\@bsphack
@@ -1677,17 +1677,17 @@
\@namedef{ext@#4}{\csname ext@#3\endcsname}%
\caption@declaresublistentry{#3}%
\caption@l@addto@list\caption@subtypelist{#4}%
- \caption@subtype@hook{#4}}%
- \caption@ifdefined\contentsuse{%
- \contentsuse{#4}{\csname ext@#4\endcsname}}{}%
- \@namedef{#4name}{}%
- \@namedef{#4autorefname}{\csname #3autorefname\endcsname}%
- #1% is \@firstoftwo in star form, and \@secondoftwo otherwise
+ \caption@subtype@hook{#4}%
+ \caption@ifdefined\contentsuse{%
+ \contentsuse{#4}{\csname ext@#4\endcsname}}{}%
+ \@namedef{#4name}{}%
+ \@namedef{#4autorefname}{\csname #3autorefname\endcsname}}%
+ #1% is \@firstoftwo in star form, and \@secondoftwo otherwise
{\@namedef{p@#4}{}%
\@namedef{the#4}{\csname the#3\endcsname.\@nameuse{#2}{#4}}}%
{\@namedef{p@#4}{\csname the#3\endcsname}%
\@namedef{the#4}{\@nameuse{#2}{#4}}}%
- \@namedef{theH#4}{\csname theH#3\endcsname.\arabic{#4}}}
+ \@namedef{theH#4}{\csname theH#3\endcsname.\arabic{#4}}}
\@onlypreamble\caption@@@declaresubtype
\newcommand*\caption@declaresublistentry{%
\caption@ifdefined\l@chapter
diff --git a/Master/texmf-dist/tex/latex/caption/caption_2007-04-16.sty b/Master/texmf-dist/tex/latex/caption/caption_2007-04-16.sty
index 2e0a89931a4..f7e2927a2af 100644
--- a/Master/texmf-dist/tex/latex/caption/caption_2007-04-16.sty
+++ b/Master/texmf-dist/tex/latex/caption/caption_2007-04-16.sty
@@ -36,7 +36,7 @@
%% caption-thesis.sto, bicaption.sty, ltcaption.sty, subcaption.sty.
%%
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption}[2007/04/16 v3.0q Customising captions (AR)]
+\ProvidesPackage{caption}[2022/07/10 v3.0r Customising captions (AR)]
\RequirePackage{caption3}[=2007/01/31] % needs v1.0l or newer
\@ifpackageloaded{caption2}{%
\caption@Error{You can't use both the caption *and* caption2 package}%
@@ -411,7 +411,7 @@
\def\captionsetup##1{\g@addto@macro\SC@CAPsetup{,##1}}%
\let\caption@SC\caption
\def\caption{\caption@caption\caption@SC}%
- }%
+ \ignorespaces}%
\let\caption@endSC@FLOAT\endSC@FLOAT
\def\endSC@FLOAT{%
\let\@captype\SC@captype
diff --git a/Master/texmf-dist/tex/latex/caption/caption_2010-01-09.sty b/Master/texmf-dist/tex/latex/caption/caption_2010-01-09.sty
index a3252632f01..04f6b589bec 100644
--- a/Master/texmf-dist/tex/latex/caption/caption_2010-01-09.sty
+++ b/Master/texmf-dist/tex/latex/caption/caption_2010-01-09.sty
@@ -36,7 +36,7 @@
%% caption-thesis.sto, bicaption.sty, ltcaption.sty, subcaption.sty.
%%
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption}[2010/01/09 v3.1m Customizing captions (AR)]
+\ProvidesPackage{caption}[2022/07/10 v3.1n Customizing captions (AR)]
\newcommand*\caption@Info[1]{\PackageInfo{caption}{#1\@gobble}}
\@onlypreamble\caption@Info
\RequirePackage{caption3}[=2008/08/24] % needs v1.1j or newer
@@ -1452,7 +1452,8 @@
\caption@ORI@SC@zfloat{#1}{#2}{#3}[#4]%
\let\caption\caption@ORI
\caption@settype*{#2}%
- \caption@freeze*}%
+ \caption@freeze*%
+ \ignorespaces}%
\let\caption@ORI@endSC@FLOAT\endSC@FLOAT
\def\endSC@FLOAT{%
\let\caption@ORI@settype\caption@settype
diff --git a/Master/texmf-dist/tex/latex/caption/caption_2011-11-10.sty b/Master/texmf-dist/tex/latex/caption/caption_2011-11-10.sty
index ad78a2452e2..8db308d38cb 100644
--- a/Master/texmf-dist/tex/latex/caption/caption_2011-11-10.sty
+++ b/Master/texmf-dist/tex/latex/caption/caption_2011-11-10.sty
@@ -36,7 +36,7 @@
%% caption-thesis.sto, bicaption.sty, ltcaption.sty, subcaption.sty.
%%
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption}[2011/11/10 v3.2e Customizing captions (AR)]
+\ProvidesPackage{caption}[2022/07/10 v3.2f Customizing captions (AR)]
\RequirePackage{caption3}[=2011/08/30] % needs v1.4 or newer
\caption@ifbool{documentclass}{}{%
\caption@WarningNoLine{%
@@ -1573,7 +1573,8 @@
\SC@RestoreCommands
\caption@settype*{#2}%
\caption@freeze
- \let\SC@label\label}%
+ \let\SC@label\label
+ \ignorespaces}%
\providecommand*\SC@RestoreCommands{%
\let\caption=\SC@orig@caption \let\label=\SC@orig@label}%
\let\caption@ORI@endSC@FLOAT\endSC@FLOAT
diff --git a/Master/texmf-dist/tex/latex/caption/caption_2019-09-01.sty b/Master/texmf-dist/tex/latex/caption/caption_2019-09-01.sty
index 0ab687fe055..0d148a31070 100644
--- a/Master/texmf-dist/tex/latex/caption/caption_2019-09-01.sty
+++ b/Master/texmf-dist/tex/latex/caption/caption_2019-09-01.sty
@@ -36,7 +36,7 @@
%% caption-thesis.sto, bicaption.sty, ltcaption.sty, subcaption.sty.
%%
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption}[2019/09/01 v3.3d Customizing captions (AR)]
+\ProvidesPackage{caption}[2022/07/10 v3.3e Customizing captions (AR)]
\RequirePackage{caption3}[=2019/09/01] % needs v1.8d or newer
\caption@ifbool{documentclass}{}{%
\caption@WarningNoLine{%
@@ -1722,7 +1722,8 @@
\caption@ORI@SC@zfloat{#1}{#2}{#3}[#4]%
\SC@RestoreCommands
\caption@freezetype{#2}%
- \let\SC@label\label}%
+ \let\SC@label\label
+ \ignorespaces}%
\providecommand*\SC@RestoreCommands{%
\let\caption=\SC@orig@caption \let\label=\SC@orig@label}%
\let\caption@ORI@endSC@FLOAT\endSC@FLOAT
diff --git a/Master/texmf-dist/tex/latex/caption/caption_2020-07-29.sty b/Master/texmf-dist/tex/latex/caption/caption_2020-07-29.sty
index 318253fe30b..6067c422a27 100644
--- a/Master/texmf-dist/tex/latex/caption/caption_2020-07-29.sty
+++ b/Master/texmf-dist/tex/latex/caption/caption_2020-07-29.sty
@@ -36,7 +36,7 @@
%% caption-thesis.sto, bicaption.sty, ltcaption.sty, subcaption.sty.
%%
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption}[2020/09/28 v3.4n Customizing captions (AR)] % Backport of commit 43567491e5b075d661c080bca298f5428f289758 from 2020/09/28
+\ProvidesPackage{caption}[2022/07/10 v3.4o Customizing captions (AR)]
\RequirePackage{caption3}[=2020/07/29] % needs v1.13 or newer
\caption@ifbool{documentclass}{}{%
\caption@WarningNoLine{%
@@ -1362,7 +1362,8 @@
\caption@ORI@SC@zfloat{#1}{#2}{#3}[#4]%
\SC@RestoreCommands
\caption@freezetype{#2}%
- \let\SC@label\label}%
+ \let\SC@label\label
+ \ignorespaces}%
\providecommand*\SC@RestoreCommands{%
\let\caption=\SC@orig@caption \let\label=\SC@orig@label}%
\let\caption@ORI@endSC@FLOAT\endSC@FLOAT
diff --git a/Master/texmf-dist/tex/latex/caption/caption_2020-10-26.sty b/Master/texmf-dist/tex/latex/caption/caption_2020-10-26.sty
index 37212b522fd..a558a929150 100644
--- a/Master/texmf-dist/tex/latex/caption/caption_2020-10-26.sty
+++ b/Master/texmf-dist/tex/latex/caption/caption_2020-10-26.sty
@@ -36,7 +36,7 @@
%% caption-thesis.sto, bicaption.sty, ltcaption.sty, subcaption.sty.
%%
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption}[2022/03/01 v3.5h Customizing captions (AR)]
+\ProvidesPackage{caption}[2022/07/10 v3.5i Customizing captions (AR)]
\RequirePackage{caption3}[=2020/10/06] % needs v2.2b or newer
\caption@ifbool{documentclass}{}{%
\caption@WarningNoLine{%
@@ -1244,7 +1244,8 @@
\caption@ORI@SC@zfloat{#1}{#2}{#3}[#4]%
\SC@RestoreCommands
\caption@freezetype{#2}%
- \let\SC@label\label}%
+ \let\SC@label\label
+ \ignorespaces}%
\providecommand*\SC@RestoreCommands{%
\let\caption=\SC@orig@caption \let\label=\SC@orig@label}%
\let\caption@ORI@endSC@FLOAT\endSC@FLOAT
diff --git a/Master/texmf-dist/tex/latex/caption/subcaption.sty b/Master/texmf-dist/tex/latex/caption/subcaption.sty
index 01eaf2de762..b55af9c980f 100644
--- a/Master/texmf-dist/tex/latex/caption/subcaption.sty
+++ b/Master/texmf-dist/tex/latex/caption/subcaption.sty
@@ -6,7 +6,7 @@
%%
%% subcaption.dtx (with options: `package')
%%
-%% Copyright (C) 1994-2022 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
+%% Copyright (C) 1994-2023 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
%%
%% https://gitlab.com/axelsommerfeldt/caption
%%
@@ -39,8 +39,10 @@
\providecommand\DeclareRelease[3]{}
\providecommand\DeclareCurrentRelease[2]{}
\DeclareCurrentRelease{v1}{2007/12/06}
-\ProvidesPackage{subcaption}[2022/01/07 v1.5 Sub-captions (AR)]
+\ProvidesPackage{subcaption}[2023/02/19 v1.6 Sub-captions (AR)]
\RequirePackage{caption}[2010/01/09] % we need at least v3.1m
+\newcommand*\subcaption@Info{%
+ \PackageInfo{subcaption}}
\newcommand*\subcaption@Warning{%
\PackageWarning{subcaption}}
\newcommand*\subcaption@Error[1]{%
@@ -51,22 +53,8 @@
section about errors.\MessageBreak\@ehc}
\newcommand*\subcaption@OutsideFloat[1]{%
\subcaption@Error{\string#1 outside float}}
-\newcommand*\subcaption@CheckCompatibility{%
- \@ifpackageloaded{subfigure}{%
- \subcaption@Error
- {This package can't be used in cooperation\MessageBreak
- with the subfigure package}%
- \endinput}{}%
- \@ifpackageloaded{subfig}{%
- \subcaption@Error
- {This package can't be used in cooperation\MessageBreak
- with the subfig package}%
- \endinput}{}%
-}
-\subcaption@CheckCompatibility
-\caption@AtBeginDocument{%
- \subcaption@CheckCompatibility
- \let\subcaption@CheckCompatibility\@undefined}
+\newcommand*\subcaptionsetup[1][]{%
+ \@ifstar{\captionsetup*[{sub#1}]}{\captionsetup[{sub#1}]}}
\providecommand\setcaptionsubtype{%
\caption@iftype
{\@ifstar{\captionsetup{subtype*}}{\captionsetup{subtype}}}%
@@ -82,7 +70,9 @@
{\subcaption@OutsideFloat{subcaptiongroup*}}}
{}
\newcommand*\subcaption@minipage{%
- \@testopt\subcaption@iminipage b}
+ \kernel@ifnextchar[%]
+ \subcaption@iminipage
+ {\caption@ifcaption{\subcaption@iminipage[t]}{\subcaption@iminipage[b]}}}
\def\subcaption@iminipage[#1]{%
\def\subcaption@tempa{\subcaption@iiminipage{#1}}%
\caption@withoptargs\subcaption@tempa}
@@ -103,6 +93,8 @@
\subcaption@endminipage@hook
\endminipage}
\providecommand*\@subfloatboxreset{}
+\providecommand*\caption@ifcaption{\caption@ifflag2} % caption >= v3.3 < v3.6
+\providecommand*\caption@ifflag[1]{\@secondoftwo} % caption < v3.3
\newenvironment{subcaptionblock}{\subcaption@minipage}{\subcaption@endminipage}
\newcommand*\subcaption@newminipage[1]{%
\newenvironment{#1}{\subcaption@minipage@{#1}}{\subcaption@endminipage}}
@@ -222,8 +214,8 @@
\DeclareCaptionLabelFormat{subparens}{(#2)}
\let\caption@setkeys@ORI\caption@setkeys
\@ifundefined{caption@SetupOptions} % caption3 v1.3
- {\renewcommand\caption@setkeys[2]{\captionsetup[sub]{#2}}}
- {\caption@SetupOptions{subcaption}{\captionsetup[sub]{#2}}}
+ {\renewcommand\caption@setkeys[2]{\subcaptionsetup{#2}}}
+ {\caption@SetupOptions{subcaption}{\subcaptionsetup{#2}}}
\@ifundefined{caption@smaller} % caption3 v1.7-169
{\caption@ExecuteOptions{subcaption}{%
font+=small,labelformat=parens,labelsep=space,skip=6pt,list=0,hypcap=0}}
@@ -232,13 +224,19 @@
\caption@ProcessOptions*{subcaption}
\let\caption@setkeys\caption@setkeys@ORI
\let\caption@setkeys@ORI\@undefined
+\newcommand*\subcaption@DeclareType[1]{%
+ \@ifundefined{c@sub#1}%
+ {\DeclareCaptionSubType{#1}}%
+ {\caption@subtypesource\caption@subtype@source{sub#1}%
+ \subcaption@Info{The counter `sub#1' was already defined by\MessageBreak\caption@subtype@source}}}
+\providecommand*\caption@subtypesource[2]{\def#1{a different package}} % caption3 v2.4
\@ifundefined{ForEachCaptionType} % caption3 v1.13
{\@ifundefined{caption@ForEachType} % caption3 v1.4a
- {\@ifundefined{c@figure}{}{\DeclareCaptionSubType{figure}}%
- \@ifundefined{c@table}{}{\DeclareCaptionSubType{table}}%
- \caption@For{typelist}{\DeclareCaptionSubType{#1}}}
- {\caption@ForEachType{\DeclareCaptionSubType{#1}}}}
- {\ForEachCaptionType{\DeclareCaptionSubType{#1}}}
+ {\@ifundefined{c@figure}{}{\subcaption@DeclareType{figure}}%
+ \@ifundefined{c@table}{}{\subcaption@DeclareType{table}}%
+ \caption@For{typelist}{\subcaption@DeclareType{#1}}}
+ {\caption@ForEachType{\subcaption@DeclareType{#1}}}}
+ {\ForEachCaptionType{\subcaption@DeclareType{#1}}}
\newcommand*\subcaption@newabbreviation[3]{%
\newcommand*{#1}{%
\caption@iftype
@@ -255,19 +253,40 @@
\subcaption@newabbreviation\phantomsubcaption\phantomcaption\relax
\subcaption@newabbreviation\subcaptionlistentry\captionlistentry\caption@gobble
\subcaption@newabbreviation\subcaptiontext\captiontext\caption@gobble
-\@ifclassloaded{memoir}{\let\subfloat\undefined\let\endsubfloat\undefined}{}
+\providecommand*\caption@subfloatrow@hook{} % caption < v3.7
+\g@addto@macro\caption@subfloatrow@hook{%
+ \let\caption\subcaption
+ \let\phantomcaption\phantomsubcaption
+ \let\captionlistentry\subcaptionlistentry
+ \let\captiontext\subcaptiontext}
\caption@AtBeginDocument{%
- \providecommand*\subfloat{%
- \kernel@ifnextchar[%]
- \subcaption@subfloat
- \subcaption@subfloat@}}
-\long\def\subcaption@subfloat[#1]{%
+ \begingroup
+ \newenvironment{subcaption@memoir@subfloat}{}{}%
+ \ifx\subfloat\subcaption@memoir@subfloat
+ \endgroup
+ % "subfloat" = empty environment, defined by memoir
+ \renewcommand*\subfloat{%
+ \def\subcaption@currenvir{subfloat}%
+ \ifx\@currenvir\subcaption@currenvir
+ % emulate (empty) subfloat environment
+ \else
+ \expandafter\subcaption@subfloat
+ \fi}%
+ \else
+ \endgroup
+ \providecommand*\subfloat{\subcaption@subfloat}%
+ \fi}
+\newcommand*\subcaption@subfloat{%
+ \kernel@ifnextchar[%]
+ \subcaption@@subfloat
+ \subcaption@subfloat@}
+\long\def\subcaption@@subfloat[#1]{%
\kernel@ifnextchar[%]
- {\subcaption@@subfloat{#1}}%
- {\subcaption@@@subfloat\subcaptionbox{#1}}}
-\long\def\subcaption@@subfloat#1[#2]{%
- \subcaption@@@subfloat{\subcaptionbox[{#1}]}{#2}}
-\long\def\subcaption@@@subfloat#1#2#3{%
+ {\subcaption@@@subfloat{#1}}%
+ {\subcaption@@subfloat@\subcaptionbox{#1}}}
+\long\def\subcaption@@@subfloat#1[#2]{%
+ \subcaption@@subfloat@{\subcaptionbox[{#1}]}{#2}}
+\long\def\subcaption@@subfloat@#1#2#3{%
\subcaption@getlabel{#3}%
#1{#2\caption@thelabel}{\let\label\caption@gobble#3}%
\subcaption@clrlabel