texlive[66580] Master/texmf-dist: caption (12mar23)
commits+karl at tug.org
commits+karl at tug.org
Sun Mar 12 21:33:41 CET 2023
Revision: 66580
http://tug.org/svn/texlive?view=revision&revision=66580
Author: karl
Date: 2023-03-12 21:33:41 +0100 (Sun, 12 Mar 2023)
Log Message:
-----------
caption (12mar23)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/caption/CHANGELOG
trunk/Master/texmf-dist/doc/latex/caption/README
trunk/Master/texmf-dist/doc/latex/caption/bicaption.pdf
trunk/Master/texmf-dist/doc/latex/caption/subcaption.pdf
trunk/Master/texmf-dist/source/latex/caption/bicaption.dtx
trunk/Master/texmf-dist/source/latex/caption/caption-ams-smf.dtx
trunk/Master/texmf-dist/source/latex/caption/caption-beamer.dtx
trunk/Master/texmf-dist/source/latex/caption/caption-elsarticle.dtx
trunk/Master/texmf-dist/source/latex/caption/caption-koma.dtx
trunk/Master/texmf-dist/source/latex/caption/caption-memoir.dtx
trunk/Master/texmf-dist/source/latex/caption/caption-ntg.dtx
trunk/Master/texmf-dist/source/latex/caption/caption-thesis.dtx
trunk/Master/texmf-dist/source/latex/caption/caption.dtx
trunk/Master/texmf-dist/source/latex/caption/caption.ins
trunk/Master/texmf-dist/source/latex/caption/caption3.dtx
trunk/Master/texmf-dist/source/latex/caption/fallback/v3.0/caption.dtx
trunk/Master/texmf-dist/source/latex/caption/fallback/v3.1/caption.dtx
trunk/Master/texmf-dist/source/latex/caption/fallback/v3.2/caption.dtx
trunk/Master/texmf-dist/source/latex/caption/fallback/v3.3/caption.dtx
trunk/Master/texmf-dist/source/latex/caption/fallback/v3.3/caption3.dtx
trunk/Master/texmf-dist/source/latex/caption/fallback/v3.4/caption.dtx
trunk/Master/texmf-dist/source/latex/caption/fallback/v3.4/caption3.dtx
trunk/Master/texmf-dist/source/latex/caption/fallback/v3.5/caption.dtx
trunk/Master/texmf-dist/source/latex/caption/fallback/v3.5/caption3.dtx
trunk/Master/texmf-dist/source/latex/caption/subcaption.dtx
trunk/Master/texmf-dist/tex/latex/caption/bicaption.sty
trunk/Master/texmf-dist/tex/latex/caption/caption-koma.sto
trunk/Master/texmf-dist/tex/latex/caption/caption.sty
trunk/Master/texmf-dist/tex/latex/caption/caption3.sty
trunk/Master/texmf-dist/tex/latex/caption/caption3_2019-09-01.sty
trunk/Master/texmf-dist/tex/latex/caption/caption3_2020-07-29.sty
trunk/Master/texmf-dist/tex/latex/caption/caption3_2020-10-26.sty
trunk/Master/texmf-dist/tex/latex/caption/caption_2007-04-16.sty
trunk/Master/texmf-dist/tex/latex/caption/caption_2010-01-09.sty
trunk/Master/texmf-dist/tex/latex/caption/caption_2011-11-10.sty
trunk/Master/texmf-dist/tex/latex/caption/caption_2019-09-01.sty
trunk/Master/texmf-dist/tex/latex/caption/caption_2020-07-29.sty
trunk/Master/texmf-dist/tex/latex/caption/caption_2020-10-26.sty
trunk/Master/texmf-dist/tex/latex/caption/subcaption.sty
Modified: trunk/Master/texmf-dist/doc/latex/caption/CHANGELOG
===================================================================
--- trunk/Master/texmf-dist/doc/latex/caption/CHANGELOG 2023-03-12 20:33:16 UTC (rev 66579)
+++ trunk/Master/texmf-dist/doc/latex/caption/CHANGELOG 2023-03-12 20:33:41 UTC (rev 66580)
@@ -170,7 +170,10 @@
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 @@
- 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
Modified: trunk/Master/texmf-dist/doc/latex/caption/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/caption/README 2023-03-12 20:33:16 UTC (rev 66579)
+++ trunk/Master/texmf-dist/doc/latex/caption/README 2023-03-12 20:33:41 UTC (rev 66580)
@@ -1,8 +1,8 @@
==========================================================================
The `caption' package bundle
-Release 2022-03-17
-Copyright (C) 1994-2022 Axel Sommerfeldt (axel.sommerfeldt at f-m.fm)
+Release 2023-03-12
+Copyright (C) 1994-2023 Axel Sommerfeldt (axel.sommerfeldt at f-m.fm)
License: LPPL = LaTeX Project Public Licence
Maintenance Status: maintained (by Axel Sommerfeldt)
@@ -47,7 +47,7 @@
--------------------------------------------------------------------------
-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 @@
--------------------------------------------------------------------------
-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)
Modified: trunk/Master/texmf-dist/doc/latex/caption/bicaption.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/caption/subcaption.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/source/latex/caption/bicaption.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/caption/bicaption.dtx 2023-03-12 20:33:16 UTC (rev 66579)
+++ trunk/Master/texmf-dist/source/latex/caption/bicaption.dtx 2023-03-12 20:33:41 UTC (rev 66580)
@@ -2,7 +2,7 @@
%
% This is file `bicaption.dtx'.
%
-% Copyright (C) 2010-2022 Axel Sommerfeldt (axel.sommerfeldt at f-m.fm)
+% Copyright (C) 2010-2023 Axel Sommerfeldt (axel.sommerfeldt at 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,7 +151,7 @@
% 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
@@ -159,37 +158,34 @@
% \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}
-% |\captionsetup[figure][bi-first]|\oarg{options}
+% |\bicaptionsetup|\marg{options for 1st language}\marg{options for 2nd language}
% \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.
+% 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]{|\ldots|}|\\
+% |\captionsetup[figure][bi-second]{|\ldots|}| \quad .
+% \end{quote}
+% 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 at language@value\endcsname % option "lang=" was used
\expandafter\bicaption at Warning
@@ -1425,7 +1449,7 @@
% We use |\caption at Process|\-|Options| here to add the options to the `|bi-second|' option
% list instead of executing them immediately.
% \begin{macrocode}
-\caption at SetupOptions{bicaption}{\captionsetup[bi-second]{#2}}%
+\caption at SetupOptions{bicaption}{\captionsetup*[bi-second]{#2}}%
\caption at 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 at teststar\@bicaptionsetup*{}}
+% \end{macrocode}
+% \begin{macrocode}
+\newcommand*\@bicaptionsetup[1]{%
+ \kernel at ifnextchar[%]
+ {\bicaption at setup@options{#1}}%
+ {\bicaption at setup*}}
+% \end{macrocode}
+% \begin{macrocode}
+\def\bicaption at setup@options#1[#2]{%
+ \bicaption at setup{#1[{#2}]}}
+% \end{macrocode}
+% \begin{macrocode}
+\newcommand*\bicaption at 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 at getlabel{#2}%
\bicaption at ifswap
- {\bicaption at setup{#1}{#2}%
+ {\bicaption at set{#1}{#2}%
\bicaption at cmd[{#3}]{#4}}%
- {\bicaption at setup{#3}{#4}%
+ {\bicaption at set{#3}{#4}%
\bicaption at cmd[{#1}]{#2}}}
% \end{macrocode}
% \begin{macrocode}
@@ -1744,12 +1793,13 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\bicaption at setup}
-% |\bicaption at setup|\marg{list-entry}\marg{text}\\
+% \begin{macro}{\bicaption at set}
+% \changes{v1.6}{2022/04/18}{This macro renamed from \cs{bicaption at setup} to \cs{bicaption at set}}
+% |\bicaption at set|\marg{list-entry}\marg{text}\\
% initiates the bilingual caption typesetting by storing the extra texts into
% |\bi|\-|caption at l|\-|entry| and |\bi|\-|caption at text|.
% \begin{macrocode}
-\newcommand\bicaption at setup[2]{%
+\newcommand\bicaption at set[2]{%
\def\bicaption at lentry{#1}%
\def\bicaption at text{\ignorespaces #2}}
% \end{macrocode}
@@ -1757,7 +1807,7 @@
%
% \begin{macro}{\bicaption at clear}
% |\bicaption at clear|\\
-% clears the stuff stored by |\bicaption at setup|.
+% clears the stuff stored by |\bicaption at set|.
% \begin{macrocode}
\newcommand*\bicaption at clear{%
\let\bicaption at lentry\@undefined
@@ -1767,6 +1817,7 @@
%
% \begin{macro}{\caption at freeze}
% \changes{v1.0}{2011/08/31}{Redefinition of \cs{caption at freeze} added}
+% \changes{v1.5c}{2022/04/18}{\cs{@ifnextchar} replaced by \cs{kernel at ifnextchar}}
% To make |\bicaption| work inside |SCfigure| and |FPfigure| environments we need to add
% |\bi|\-|caption| to |\caption at freeze|.
% \begin{macrocode}
@@ -1777,7 +1828,7 @@
\def\bicaption{%
\caption at withoptargs\caption at SC@bicaption}%
\long\def\caption at SC@bicaption#1#2{%
- \@ifnextchar[%]
+ \kernel at ifnextchar[%]
{\caption at SC@bi at caption{#1}{#2}}%
{\caption at SC@bi at caption@{#1}{#2}}}%
\long\def\caption at SC@bi at caption#1#2[#3]#4{%
@@ -1806,7 +1857,7 @@
\lst at Key{caption1}\relax{%
\lstKV at OptArg[{#1}]{#1}{%
\bicaption at ifswap
- {\bicaption at setup{##1}{##2}}%
+ {\bicaption at set{##1}{##2}}%
{\def\lst@@caption{##1}\def\lst at caption{##2}}}%
\let\lst at title\@empty}%
% \end{macrocode}
@@ -1815,7 +1866,7 @@
\lstKV at OptArg[{#1}]{#1}{%
\bicaption at ifswap
{\def\lst@@caption{##1}\def\lst at caption{##2}}%
- {\bicaption at setup{##1}{##2}}}%
+ {\bicaption at set{##1}{##2}}}%
\let\lst at title\@empty}%
% \end{macrocode}
% \begin{macrocode}
@@ -1856,8 +1907,8 @@
\bicaption at LT@setup}%
\gdef\bicaption at LT@setup{%
\bicaption at ifswap
- {\bicaption at setup{#1}{#2}}%
- {\bicaption at setup{#3}{#4}}}%
+ {\bicaption at set{#1}{#2}}%
+ {\bicaption at set{#3}{#4}}}%
\bicaption at ifswap
{\egroup\bicaption at cmd[{#3}]{#4}}%
{\egroup\bicaption at 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
Modified: trunk/Master/texmf-dist/source/latex/caption/caption-ams-smf.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/caption/caption-ams-smf.dtx 2023-03-12 20:33:16 UTC (rev 66579)
+++ trunk/Master/texmf-dist/source/latex/caption/caption-ams-smf.dtx 2023-03-12 20:33:41 UTC (rev 66580)
@@ -2,7 +2,7 @@
%
% This is file `caption-ams-smf.dtx'.
%
-% Copyright (C) 2007-2020 Axel Sommerfeldt (axel.sommerfeldt at f-m.fm)
+% Copyright (C) 2007-2022 Axel Sommerfeldt (axel.sommerfeldt at 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}
%
Modified: trunk/Master/texmf-dist/source/latex/caption/caption-beamer.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/caption/caption-beamer.dtx 2023-03-12 20:33:16 UTC (rev 66579)
+++ trunk/Master/texmf-dist/source/latex/caption/caption-beamer.dtx 2023-03-12 20:33:41 UTC (rev 66580)
@@ -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}
%
Modified: trunk/Master/texmf-dist/source/latex/caption/caption-elsarticle.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/caption/caption-elsarticle.dtx 2023-03-12 20:33:16 UTC (rev 66579)
+++ trunk/Master/texmf-dist/source/latex/caption/caption-elsarticle.dtx 2023-03-12 20:33:41 UTC (rev 66580)
@@ -2,7 +2,7 @@
%
% This is file `caption-elsarticle.dtx'.
%
-% Copyright (C) 2013-2020 Axel Sommerfeldt (axel.sommerfeldt at f-m.fm)
+% Copyright (C) 2013-2022 Axel Sommerfeldt (axel.sommerfeldt at 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}
%
Modified: trunk/Master/texmf-dist/source/latex/caption/caption-koma.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/caption/caption-koma.dtx 2023-03-12 20:33:16 UTC (rev 66579)
+++ trunk/Master/texmf-dist/source/latex/caption/caption-koma.dtx 2023-03-12 20:33:41 UTC (rev 66580)
@@ -2,7 +2,7 @@
%
% This is file `caption-koma.dtx'.
%
-% Copyright (C) 2004-2020 Axel Sommerfeldt (axel.sommerfeldt at f-m.fm)
+% Copyright (C) 2004-2022 Axel Sommerfeldt (axel.sommerfeldt at 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,9 +95,9 @@
% \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.
@@ -104,17 +104,25 @@
% 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,7 +201,7 @@
%
% \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}
@@ -200,7 +208,7 @@
%
% \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 at 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 at 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 at koma@setcapindent\@setcapindent
\renewcommand*\@setcapindent[1]{%
@@ -304,49 +312,11 @@
\caption at ifdefined\cap at indent{\caption at 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 at 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 at koma@parindent\KV at caption@parindent
-\DeclareCaptionOption{parindent}[]{%
- \ifx,#1,%
- \caption at Debug{Option `parindent' ignored}%
- \else
- \caption at koma@parindent{#1}%
- \fi}%
-% \end{macrocode}
-% \begin{macrocode}
-\let\caption at koma@parskip\KV at caption@parskip
-\DeclareCaptionOption{parskip}[]{%
- \ifx,#1,%
- \caption at Debug{Option `parskip' ignored}%
- \else
- \caption at 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 at 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 at addto@macro\onelinecaptionstrue{\caption at setsinglelinecheck{true}}%
\g at addto@macro\onelinecaptionsfalse{\caption at 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 at 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 at tablecaptionabove}
% \changes{v1.1g}{2008/03/01}{\cs{def} changed to \cs{g at 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 at addto@macro\@tablecaptionabovetrue{\captionsetup*[table]{position=t}}%
\g at addto@macro\@tablecaptionabovefalse{\captionsetup*[table]{position=b}}%
@@ -456,7 +426,7 @@
%
% \begin{macro}{\if at figurecaptionabove}
% \changes{v1.5}{2013/02/15}{Support of \cs{if at 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 at ifdefined\@figurecaptionabovetrue{%
\g at 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 at caption}
% \KOMAScript\ contains the code
% |\AtBeginDocument{\let\scr at caption\caption}|
-% so we need to update |\scr at caption| after the \package{caption} package has re-defined |\caption|.
+% so we need to update |\scr at caption| after the \pkg{caption} package has re-defined |\caption|.
% \begin{macrocode}
\AtBeginDocument{\let\scr at caption\caption}
% \end{macrocode}
Modified: trunk/Master/texmf-dist/source/latex/caption/caption-memoir.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/caption/caption-memoir.dtx 2023-03-12 20:33:16 UTC (rev 66579)
+++ trunk/Master/texmf-dist/source/latex/caption/caption-memoir.dtx 2023-03-12 20:33:41 UTC (rev 66580)
@@ -2,7 +2,7 @@
%
% This is file `caption-memoir.dtx'.
%
-% Copyright (C) 2011-2020 Axel Sommerfeldt (axel.sommerfeldt at f-m.fm)
+% Copyright (C) 2011-2022 Axel Sommerfeldt (axel.sommerfeldt at 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}
%
Modified: trunk/Master/texmf-dist/source/latex/caption/caption-ntg.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/caption/caption-ntg.dtx 2023-03-12 20:33:16 UTC (rev 66579)
+++ trunk/Master/texmf-dist/source/latex/caption/caption-ntg.dtx 2023-03-12 20:33:41 UTC (rev 66580)
@@ -2,7 +2,7 @@
%
% This is file `caption-ntg.dtx'.
%
-% Copyright (C) 2007-2020 Axel Sommerfeldt (axel.sommerfeldt at f-m.fm)
+% Copyright (C) 2007-2022 Axel Sommerfeldt (axel.sommerfeldt at 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}
%
Modified: trunk/Master/texmf-dist/source/latex/caption/caption-thesis.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/caption/caption-thesis.dtx 2023-03-12 20:33:16 UTC (rev 66579)
+++ trunk/Master/texmf-dist/source/latex/caption/caption-thesis.dtx 2023-03-12 20:33:41 UTC (rev 66580)
@@ -2,7 +2,7 @@
%
% This is file `caption-thesis.dtx'.
%
-% Copyright (C) 2008-2020 Axel Sommerfeldt (axel.sommerfeldt at f-m.fm)
+% Copyright (C) 2008-2022 Axel Sommerfeldt (axel.sommerfeldt at 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}
%
Modified: trunk/Master/texmf-dist/source/latex/caption/caption.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/caption/caption.dtx 2023-03-12 20:33:16 UTC (rev 66579)
+++ trunk/Master/texmf-dist/source/latex/caption/caption.dtx 2023-03-12 20:33:41 UTC (rev 66580)
@@ -2,7 +2,7 @@
%
% This is file `caption.dtx'.
%
-% Copyright (C) 1994-2022 Axel Sommerfeldt (axel.sommerfeldt at f-m.fm)
+% Copyright (C) 1994-2023 Axel Sommerfeldt (axel.sommerfeldt at f-m.fm)
%
% --------------------------------------------------------------------------
%
@@ -31,7 +31,7 @@
%
% \fi
%
-% \CheckSum{2836}
+% \CheckSum{2920}
%
% \iffalse
%<*driver>
@@ -4307,7 +4307,6 @@
% \hline
% |\caption at kernel@addcontentsline| & \package{floatrow} \\
% |\caption at settype| & \package{newfloat} \\
-% |\caption at setsubtype| & \package{floatrow} \\
% |\caption at xlabel| & \package{cleveref} \\
% \end{tabular}\end{quote}
%
@@ -4593,7 +4592,7 @@
%
% 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}
@@ -4600,7 +4599,7 @@
%
% 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 at 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 at ifinlist{#1}{0,false,no,off}{%
- % nothing to do
+ \let\caption at ifcompatibility\@secondoftwo % not used; for backward compatibility only
}{%
\caption at Error{Undefined compatibility value `#1'}%
}}}
+\@onlypreamble at key{caption}{compatibility}
+\caption at 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 at xfloat#1[#2]{%
\caption at ORI@xfloat{#1}[#2]%
\caption at settype{#1}%
+ \caption at setanchor
\caption at xfloat@hook}
% \end{macrocode}
% Hook, could be extended with |\g at addto@macro\caption at x|\-|float at 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 at 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 at 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 at parboxrestore@light
- \caption at settype}
+ \caption at teststar\@setcaptiontype\@gobble\@iden}
% \end{macrocode}
% \begin{macrocode}
-\newcommand*\caption at settype{%
- \caption at initposition
- \caption at clrflags
- \aftergroup\flushsubcaptionlistentries
- \caption@@settype}
+\newcommand*\@setcaptiontype[1]{%
+ \kernel at ifnextchar[%]
+ {\@setcaptiontype@#1}%
+ {\@@setcaptiontype#1\relax}}
% \end{macrocode}
% \begin{macrocode}
-\newcommand*\caption@@settype{%
- \caption at teststar\caption@@settype@\@firstoftwo\@secondoftwo}
+\def\@setcaptiontype@#1[#2]{%
+ \@@setcaptiontype{#1}{\caption at setoptions{#2}}}
% \end{macrocode}
% \begin{macrocode}
-\newcommand*\caption@@settype@[1]{%
- \@ifnextchar[%]
- {\caption@@settype@@{#1}}%
- {\caption@@@settype{}{#1}}}
+\newcommand*\@@setcaptiontype[3]{%
+ \caption at settype{#3}#2%
+ \caption at parboxrestore@light
+ #1\caption at setanchor}
% \end{macrocode}
-% \begin{macrocode}
-\def\caption@@settype@@#1[#2]#3{%
- \caption@@@settype{}{#1}{#3}%
- \caption at 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 at Error} replaced by \cs{caption at OutsideFloat}}
-% \changes{v3.6}{2022/01/07}{Multiple use is suppressed now by checking \cs{caption at ifsubtype}}
-% Same, but sets the sub-type.
-% \begin{macrocode}
-\newcommand*\setcaptionsubtype{%
- \caption at setsubtype}
-% \end{macrocode}
-% \begin{macrocode}
-\newcommand*\caption at setsubtype{% used by the floatrow package
- \caption at teststar\caption@@setsubtype\@firstoftwo\@secondoftwo}
-% \end{macrocode}
-% \begin{macrocode}
-\newcommand*\caption@@setsubtype[1]{%
- \caption at iftype
- {\caption at ifsubtype
- {\caption at Debug{subtype=\@subcaptype}}%
- {\caption@@@settype{sub}{#1}{sub\@captype}}}%
- {\caption at OutsideFloat\setcaptionsubtype}}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\caption@@@settype}
+% \begin{macro}{\caption at settype}
% \changes{v3.1}{2007/05/09}{This macro added}
% \changes{v3.1b}{2007/09/22}{Usage of \cs{caption at xlabel} added}
% \changes{v3.1d}{2007/10/23}{Error message for \cs{caption at checkgrouplevel} revised}
-% \changes{v3.1f}{2007/11/16}{\cs{caption at setsubtype} added}
% \changes{v3.1f}{2007/12/03}{Crappy \cs{caption at iftypewarning} replaced}
% \changes{v3.1g}{2008/01/12}{Usage of \cs{ifcaptionsetup at star} added}
% \changes{v3.2}{2010/10/26}{Error message moved from here to \cs{caption at refstepcounter}}
% \changes{v3.3}{2011/12/28}{Resetting of \cs{ifcaption at caption} and \cs{ifcaption at 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 at reset@currentlabel}}
-% |\caption at settype*|\marg{type}\par
+% \changes{v3.6}{2021/01/02}{Usage of \cs{caption at 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 at star} removed}
+% |\caption at settype|\marg{type}\\
% sets |\@captype| and executes the options associated with it
% (using |\caption at 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 at settype{%
+ \caption at initposition
+ \caption at 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 at Debug{#1type:=#3}%
- \@nameuse{caption at check#1type}{#3}%
- {\caption at checkgrouplevel{#1}{%
- \captionsetup{#1type#2*\@empty=...}#2{ or
- \@backslashchar#1captionof}{}}%
+% #2 = <type>, e.g.: "figure" or "subfigure"
+ \caption at Debug{#1type:=#2}%
+ \@nameuse{caption at check#1type}{#2}%
+ {\caption at checkgrouplevel{#1}{\setcaption#1type}%
% \end{macrocode}
% \begin{macrocode}
- \edef\caption at tempa{#3}%
+ \edef\caption at tempa{#2}%
\expandafter\ifx\csname @#1captype\endcsname\caption at tempa \else
- \ifcaptionsetup at star\else\@nameuse{caption@#1type at warning}\fi
+ \@nameuse{caption@#1type at warning}%
\fi
\expandafter\let\csname @#1captype\endcsname\caption at tempa
% \end{macrocode}
@@ -5401,7 +5381,7 @@
\@nameuse{caption@#1typehook}%
% \end{macrocode}
% \begin{macrocode}
- \caption at setoptions{#3}%
+ \caption at setoptions{#2}%
\ifx\caption at opt\relax
\@nameundef{caption@#1type at warning}%
\else
@@ -5408,11 +5388,34 @@
\@namedef{caption@#1type at warning}{\caption at 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 at Error} replaced by \cs{caption at OutsideFloat}}
+% \changes{v3.6}{2022/01/07}{Multiple use is suppressed now by checking \cs{caption at 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 at reset@currentlabel\caption at start}}}
+\newcommand*\setcaptionsubtype{%
+ \caption at teststar\@setcaptionsubtype\@gobble\@iden}
% \end{macrocode}
+% \begin{macrocode}
+\newcommand*\@setcaptionsubtype[1]{%
+ \caption at iftype
+ {\caption at ifsubtype
+ {\caption at Debug{type=\@captype, subtype=\@subcaptype}}%
+ {\caption@@settype{sub}{sub\@captype}%
+ #1\caption at setanchor}}%
+ {\caption at OutsideFloat\setcaptionsubtype}}
+% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\caption at parboxrestore@light}
@@ -5429,6 +5432,17 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\caption at setanchor}
+% \changes{v3.6e}{2022/04/17}{Code extracted from \cs{caption at settype}}
+% |\caption at setanchor|\\
+% sets a \pkg{hyperref} anchor.
+% \begin{macrocode}
+\newcommand*\caption at setanchor{%
+ \caption at reset@currentlabel
+ \caption at start}
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\caption at reset@currentlabel}
% \changes{v3.6}{2020/12/27}{This macro out-sourced from \cs{caption at settype}}
% Redefine |\@currentlabel| so a |\label| before |\caption| will result
@@ -5481,26 +5495,20 @@
% \begin{macro}{\caption at checksubtype}
% \changes{v3.4g}{2020/01/02}{This macro definition added}
% \changes{v3.4m}{2020/07/29}{Check of \cs{sf at counterlist} from \package{subfig} package added}
+% \changes{v3.6c}{2022/04/06}{Check of \cs{sf at counterlist} from \package{subfig} package removed}
+% \changes{v3.6c}{2022/04/06}{Usage of \cs{caption at subtypesource} added}
% |\caption at checksubtype|\marg{type}\marg{code}\par
% is used by |\caption at 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 at checksubtype[1]{%
\caption at ifdefined@subtype{#1}%
\@firstofone
- {\caption at ifin@list\sf at counterlist{#1}%
- {\caption at 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 at Error{Undefined subtype `#1'}%
- \@gobble}}}
+ {\@ifundefined{c@#1}%
+ {\caption at Error{Undefined counter `#1'}}%
+ {\caption at subtypesource\caption at subtype@source{#1}%
+ \caption at Error{The counter `#1' was defined by\MessageBreak\caption at 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 at refstepcounter@} is used instead of \cs{caption at refstepcounter}}
% \changes{v3.6}{2022/01/05}{Usage of \cs{caption at Error} replaced by \cs{caption at OutsideFloat}}
+% \changes{v3.6f}{2022/04/18}{\cs{@ifnextchar} replaced by \cs{kernel at 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 at listentry[1]{%
- \@ifnextchar[%]
+ \kernel at ifnextchar[%]
{\caption at listentry@{#1}}%
{\caption@@listentry{#1}}}
% \end{macrocode}
@@ -6142,15 +6151,11 @@
%
% \begin{macro}{\caption at 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 at 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 at ifnextchar}{\let\kernel at ifnextchar\@ifnextchar}{}
-% \end{macrocode}
-% \begin{macrocode}
\newcommand\caption at dblarg[1]{%
\kernel at ifnextchar[%]
{\caption at 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 at stepcounter}}
+% \changes{v3.6d}{2022/04/17}{Usage of \cs{if at subfloatrow} removed in favour of a re-definition of \env{subfloatrow*}}
% Hook, will be used inside \cs{caption at 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 at settype{\caption at withoptargs\caption at sub@settype}%
- \def\caption at sub@settype##1##2{%
- \edef\caption at tempa{##2}%
- \ifx\caption at tempa\@captype
-%%% \caption at setsubtype##1\relax
- \else
- \caption at Error{##2 inside \@subcaptype}%
- \fi}%
+ \renewcommand*\caption at settype[1]{%
+ \caption at Error{##1 inside \@subcaptype}}%
% \end{macrocode}
% \begin{macrocode}
% redefine \caption
@@ -6350,32 +6350,11 @@
% \end{macrocode}
% \begin{macrocode}
% restore \@makecaption
- \if at subfloatrow
- \caption at Debug{Keeping \string\@makecaption}%
- \else
- \let\@makecaption\caption at makecaption
- \fi
+ \let\@makecaption\caption at makecaption
\fi}%
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\if at 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 at AtBeginDocument{%
- \caption at ifundefined\@subfloatrowtrue
- {\newif\if at subfloatrow
- \caption at ifundefined\subfloatrow
- {}%
- {\caption at Debug{Patching subfloatrow environment}%
- \g at addto@macro\capsubrowsettings{\@subfloatrowtrue}%
- \g at addto@macro\killfloatstyle{%
- \ifx\c at FRobj\c at FRsobj\@subfloatrowtrue\fi}}}%
- {\caption at Debug{\string\if at subfloatrow is already defined}}}%
-% \end{macrocode}
-% \end{macro}
-%
% \begin{macro}{\caption at subcaption}
% Makes a sub-caption.
% \begin{macrocode}
@@ -6646,7 +6625,7 @@
% Used by the \package{fltpage} \& \package{sidecap} package support.
% \begin{macrocode}
\newcommand*\caption at freezetype[1]{%
- \caption at settype*{#1}%
+ \caption at settype{#1}%
\captionsetup*[sub]{hypcap=true}% Note: This is just a (q&d) workaround!
\caption at freeze}%
% \end{macrocode}
@@ -6735,7 +6714,7 @@
% Prevent resetting the caption flags
% \begin{macrocode}
\newcommand*\caption at prepare@defrost{%
- \let\caption at settype\caption@@settype}
+ \def\caption at settype{\caption@@settype{}}}
% \end{macrocode}
% \end{macro}
%
@@ -6776,32 +6755,40 @@
\caption at IfPackageLoaded{changepage}[2008/07/23 memoir-v3.7k]{%
% \end{macrocode}
%
+% \begin{macro}{\caption at 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 at 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 at set@adjustwidth
+ \ignorespaces}}%
+ \caption at patch@adjustwidth{adjustwidth}%
+ \caption at patch@adjustwidth{adjustwidth*}%
+ \let\caption at patch@adjustwidth\relax
+% \end{macrocode}
+% \end{macro}
%
+% \begin{macro}{\caption at 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 at addto@macro}\cs{caption at 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 at adjustwidth@hsize}
-% \begin{macro}{\caption at adjustwidth@linewidth}
% \begin{macrocode}
\newdimen\caption at adjustwidth@hsize
\newdimen\caption at adjustwidth@linewidth
% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\caption at 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 at addto@macro}\cs{caption at beginex@hook}}
-% Store the values of \cs{hsize} and \cs{linewidth}.
% \begin{macrocode}
\providecommand*\caption at set@adjustwidth{%
\caption at adjustwidth@hsize\hsize
@@ -6808,16 +6795,6 @@
\caption at adjustwidth@linewidth\linewidth
\l at addto@macro\caption at beginex@hook\caption at test@adjustwidth}%
% \end{macrocode}
-% \begin{macrocode}
- \providecommand*\caption at 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 at set@adjustwidth}}%
- \caption at patch@changepage{adjustwidth}%
- \caption at patch@changepage{adjustwidth*}%
- \let\caption at patch@changepage\relax
-% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\caption at test@adjustwidth}
@@ -6977,10 +6954,11 @@
% \begin{macro}{\caption at float@setname}
% \changes{v3.1}{2007/07/08}{float package hook added}
% \changes{v3.4b}{2019/12/16}{Renamed from \cs{caption at typehook} to \cs{caption at 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}|
@@ -6987,8 +6965,8 @@
% \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
@@ -6995,12 +6973,23 @@
% \cs{restylefloat} instead, \cs{fname@}\meta{type} is not defined.}
% \begin{macrocode}
\newcommand*\caption at 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 at setname}
+% \changes{v3.6i}{2023/02/19}{Re-definition of \cs{caption at setname} added to \pkg{float} package support}
+% Same problem as in |\caption at float@set|\-|name|, but other direction:
+% If the option |name=| is used, we should set |\fname@|\meta{type}, too.
+% \begin{macrocode}
+ \renewcommand*\caption at setname[2]{%
+ \@ifundefined{fname@#1}{}{\caption at 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 at plaintop}
% \begin{macro}{\fs at boxed}
@@ -7138,7 +7127,8 @@
\newcommand*\caption at floatflt[1]{%
\caption at settype{#1}%
\caption at clearmargin
- \caption at setoptions{floating#1}}%
+ \caption at setoptions{floating#1}%
+ \caption at setanchor}%
% \end{macrocode}
% \end{macro}
%
@@ -7146,6 +7136,68 @@
}{}
% \end{macrocode}
%
+% \subsubsection{The floatrow package}
+%
+% \begin{macrocode}
+\caption at 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 at 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 at tmp{\@captype}\ifnum\floatbox at depth>\@ne
+ \def\FR at tmp{sub\@captype}\setcaptionsubtype*\stepcounter{\FR at tmp}\fi
+ \caption@@@make{\caption at fnum\FR at 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 at subfloatrow@hook % as replacement for \captionsetup{subtype}
+ \@nameuse{subfloatrow*}}{\@nameuse{endsubfloatrow*}}
+% \end{macrocode}
+% \begin{macrocode}
+ \providecommand*\caption at 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 at make|\-|caption| will be used for sub-captions,
+% too.
+% \begin{macrocode}
+ \renewenvironment{subfloatrow*}[1][2]{\let\flrow at to\empty
+ \let\Xhsize\sXhsize%\let\Zhsize\sZhsize
+ \FR at ifunloc{\let\FR at ifcountH\@firstoftwo}\let\c at FRobj\c at FRsobj
+ \def\FRleftmargin{}\def\FRrightmargin{}\let\floatrowsep\subfloatrowsep
+ \floatrow[#1]\killfloatstyle
+ \let\caption at makecaption\flrow at makecaption}% <- This line added
+ {\ifdim\lastskip>\z@\unskip\fi
+ \@ifundefined{adjustsubfloats}\relax\adjustsubfloats\endfloatrow}
+% \end{macrocode}
+% \end{environment}
+%
+% \begin{macrocode}
+}{}
+% \end{macrocode}
+%
% \subsubsection{The fltpage package}
% \changes{v3.1}{2007/07/22}{Support of the \package{fltpage} package added}
%
@@ -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 at AtBeginLongtable} added}
% \changes{v3.6}{2022/01/05}{Usage of \cs{caption at Error} replaced by \cs{caption at OutsideFloat}}
+% \changes{v3.6g}{2022/04/18}{Adapted to recent version of \pkg{caption3} package}
% We redefine |\LT at array| here to get |\captionsetup|\marg{options} working inside |longtable|s.
% \Note{Since the \package{hyperref} package patches \cs{LT at array} as well
% and since this only works with the original definition of \cs{LT at array},
@@ -7789,7 +7842,7 @@
\@ifstar\@captionsetup\@captionsetup}% gobble *
\def\@captionsetup#1{\LT at captionsetup{#1}\egroup}%
\def\LT at captionsetup#1{%
- \captionsetup at startrue\caption at setup@options[@longtable]{#1}%
+ \caption at setup@options\@gobble[@longtable]{#1}%
\global\let\caption at opt@@longtable\caption at opt@@longtable}%
% \end{macrocode}
% |\captionlistentry| for longtable:
@@ -7967,7 +8020,7 @@
% \changes{v3.6}{2021/01/17}{Adapted to current implementation of \cs{caption at setwidth}}
% \begin{macrocode}
\newcommand*\caption at LT@settype[1]{%
- \caption at settype*{#1}%
+ \caption at 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 at setautoposition b%
\caption at settype{#1}%
- \caption at clearmargin}%
+ \caption at clearmargin
+ \caption at setanchor}%
% \end{macrocode}
% \end{macro}
%
@@ -8193,6 +8247,7 @@
% \fi
\caption at setoptions{parpic}%
\caption at setautoposition b%
+ \caption at setanchor
% \end{macrocode}
% \begin{macrocode}
\expandafter\expandafter\expandafter\caption at 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 at IfKomaPackageLoaded}
+% \changes{v3.6j}{2023/03/12}{This macro definition added}
+% \begin{macrocode}
+\caption at ifdefined\scr at caption{%
+ \long\def\caption at IfKomaPackageLoaded#1[#2]#3#4{%
+ \caption at InfoNoLine{KOMA-Script #1 package detected}
+ #3}}{%
+ \let\caption at IfKomaPackageLoaded\caption at IfPackageLoaded
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+\caption at IfKomaPackageLoaded{scrextend}[2002/07/01 v3.0]{%
+% \end{macrocode}
+%
+% \begin{macro}{\caption at 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 at addmargin@env\@addmargin
+ \renewcommand*\@addmargin{%
+ \@testopt\caption@@addmargin\@tempa}%
+ \def\caption@@addmargin[#1]#2{%
+ \caption at addmargin@env[{#1}]{#2}%
+ \caption at set@addmargin
+ \ignorespaces}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\caption at 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 at addmargin@hsize
+ \newdimen\caption at addmargin@linewidth
+% \end{macrocode}
+% \begin{macrocode}
+ \providecommand*\caption at set@addmargin{%
+ \caption at addmargin@hsize\hsize
+ \caption at addmargin@linewidth\linewidth
+ \l at addto@macro\caption at beginex@hook\caption at test@addmargin}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\caption at 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 at test@addmargin{%
+ \ifdim\hsize=\caption at addmargin@hsize
+ \ifdim\linewidth=\caption at 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 at freeze} instead of \cs{caption at freeze*} now}
% \changes{v3.3}{2013/05/01}{Usage of \cs{caption at freeze} replaced by \cs{caption at 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 at 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,9 +8478,14 @@
% The sidecap package uses |\ifx\label\SC at label| to test if it is just inside a
% |SC|\-|figure| or not. So we redefine |\SC at label| here so this test will still work.
% \begin{macrocode}
- \let\SC at label\label}%
+ \let\SC at label\label
% \end{macrocode}
+% Since the original definition of |\SC at zfloat| ends with |\begin{lrbox}| which ends with |\ignore|\-|spaces|,
+% we do have to end our re-definition of |\SC at zfloat| with |\ignore|\-|spaces| as well.
% \begin{macrocode}
+ \ignorespaces}%
+% \end{macrocode}
+% \begin{macrocode}
\providecommand*\SC at RestoreCommands{%
\let\caption=\SC at orig@caption \let\label=\SC at orig@label}%
% \end{macrocode}
@@ -8497,7 +8634,7 @@
% \end{verbatim}%^^A
% \begin{macrocode}
\long\def\ST at caption#1[#2]#3{\par%
- \caption at settype*{#1}%
+ \caption at settype{#1}%
\caption at setoptions{supertabular}%
% \end{macrocode}
% The |position=| setting will be overwritten by the
@@ -8566,7 +8703,7 @@
% \end{verbatim}%^^A
% \begin{macrocode}
\long\def\ST at caption#1[#2]#3{\par%
- \caption at settype*{#1}%
+ \caption at settype{#1}%
\caption at 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 at setthreeparttable}}
% Unfortunately |\@captype| is not set when |\TPT at common| will be used,
% so we have to redefine |\threeparttable| and |\measuredfigure| instead.
% \begin{macrocode}
\let\caption at ORI@threeparttable\threeparttable
\renewcommand*\threeparttable{%
- \caption at settype{\@ifundefined{@captype}{table}{\@captype}}%
-%%% \caption at setposition{auto}% ?
- \caption at clearmargin
- \caption at setoptions{threeparttable}%
+ \caption at setthreeparttabletype{threepart}{table}%
\caption at 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 at setthreeparttable}}
% Same here\ldots
% \begin{macrocode}
\let\caption at ORI@measuredfigure\measuredfigure
\renewcommand*\measuredfigure{%
- \caption at settype{\@ifundefined{@captype}{figure}{\@captype}}%
+ \caption at setthreeparttabletype{measured}{figure}%
+ \caption at ORI@measuredfigure}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\caption at 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 at setthreeparttabletype|\marg{threepart type}\marg{main type}
+% \begin{macrocode}
+ \newcommand*\caption at setthreeparttabletype[2]{%
+ \caption at ifsubtype
+ {\def\caption at threeparttabletype{#1sub#2}%
+ \let\caption at setanchor\relax}%
+ {\caption at settype{\@ifundefined{@captype}{#2}{\@captype}}%
+ \def\caption at threeparttabletype{#1#2}}%
%%% \caption at setposition{auto}% ?
\caption at clearmargin
- \caption at setoptions{measuredfigure}%
- \caption at ORI@measuredfigure}%
+ \caption at setoptions\caption at threeparttabletype
+ \caption at setanchor}%
% \end{macrocode}
% \end{macro}
%
@@ -8724,7 +8876,8 @@
\caption at settype{#1}%
\caption at clearmargin
%%% \caption at setoptions{wrap}%
- \caption at setoptions{wrap#1}}%
+ \caption at setoptions{wrap#1}%
+ \caption at setanchor}%
% \end{macrocode}
% \end{macro}
%
Modified: trunk/Master/texmf-dist/source/latex/caption/caption.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/caption/caption.ins 2023-03-12 20:33:16 UTC (rev 66579)
+++ trunk/Master/texmf-dist/source/latex/caption/caption.ins 2023-03-12 20:33:41 UTC (rev 66580)
@@ -6,7 +6,7 @@
\preamble
-Copyright (C) 1994-2022 Axel Sommerfeldt (axel.sommerfeldt at f-m.fm)
+Copyright (C) 1994-2023 Axel Sommerfeldt (axel.sommerfeldt at f-m.fm)
https://gitlab.com/axelsommerfeldt/caption
Modified: trunk/Master/texmf-dist/source/latex/caption/caption3.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/caption/caption3.dtx 2023-03-12 20:33:16 UTC (rev 66579)
+++ trunk/Master/texmf-dist/source/latex/caption/caption3.dtx 2023-03-12 20:33:41 UTC (rev 66580)
@@ -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 at ifnextchar}
+% \changes{v1.1f}{2007/12/06}{Bugfix 07-12-06: This macro definition added (\cs{kernel at 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 at ifnextchar}{\let\kernel at 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 at 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 at ifnextchar}}
% |\caption at 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 at ifnextchar[%]
{\caption@@@withoptargs{#1}}%
{\caption@@@@withoptargs{#1}}}
% \end{macrocode}
@@ -815,15 +825,6 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\ifcaptionsetup at 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 at set|\-|keys|.)
-% \begin{macrocode}
-\newif\ifcaptionsetup at 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 at setup@options@@} replaced by \cs{caption at setup@options@}}
-% |\captionsetup*|\oarg{type}\ldots\marg{keyval-list of options}\\
+% \changes{v2.4}{2022/04/18}{\cs{@ifnextchar} replaced by \cs{kernel at ifnextchar}}
+% \changes{v2.4}{2022/04/18}{Usage of \cs{ifcaptionsetup at 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,9 +849,9 @@
% \end{macrocode}
% \begin{macrocode}
\newcommand*\@captionsetup[1]{%
- \captionsetup at startrue#1\captionsetup at starfalse
- \@ifnextchar[%]
- \caption at setup@options\caption at setup}
+ \kernel at ifnextchar[%]
+ {\caption at setup@options#1}%
+ {\caption at setup}}
% \end{macrocode}
% \begin{macrocode}
\newcommand*\caption at setup{%
@@ -855,23 +858,23 @@
\caption at setkeys{caption}}
% \end{macrocode}
% \begin{macrocode}
-\def\caption at setup@options[#1]{%
- \@ifnextchar[%]
+\def\caption at setup@options#1[#2]{%
+ \kernel at ifnextchar[%]
{\caption at stepthecounter
- \@expandtwoargs\caption at setup@options@@{#1}{@\caption at thecounter}}%
- {\caption at setup@options@{#1}}}
+ \@expandtwoargs\caption at setup@options@@{#2}{@\caption at thecounter}#1}%
+ {\caption at setup@options@#1{#2}}}
% \end{macrocode}
% \begin{macrocode}
-\def\caption at setup@options@@#1#2[#3]#4{%
- \caption at declare@option{#2}[]{\caption at setup@options@{#3}{#4}}%
- \caption at setup@options@{#1}{#2}}
+\def\caption at setup@options@@#1#2#3[#4]#5{%
+ \caption at declare@option{#2}[]{\caption at setup@options@\@gobble{#4}{#5}}%
+ \caption at setup@options@#3{#1}{#2}}
% \end{macrocode}
% \begin{macrocode}
-\newcommand*\caption at setup@options@[2]{%
+\newcommand*\caption at setup@options@[3]{%
\@bsphack
- \ifcaptionsetup at star\captionsetup at starfalse\else\caption at addtooptlist{#1}\fi
- \caption at checkoptions{#2}%
- \expandafter\caption at l@addto at list\csname caption at opt@#1\endcsname{#2}%
+ #1{\caption at addtooptlist{#2}}%
+ \caption at checkoptions{#3}%
+ \expandafter\caption at l@addto at list\csname caption at opt@#2\endcsname{#3}%
\@esphack}
% \end{macrocode}
% \end{macro}
@@ -1075,6 +1078,7 @@
% \changes{v1.2a}{2008/01/12}{\cs{captionsetup at 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 at err} added}
+% \changes{v2.4}{2022/04/18}{\cs{captionsetup at starfalse} removed}
% |\caption at 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 at err\csname ORI at XKV@err\caption at keydepth\endcsname
% \end{macrocode}
% \begin{macrocode}
- \ifx\caption at keydepth\@empty \captionsetup at starfalse \fi
-% \end{macrocode}
-% \begin{macrocode}
\@esphack}
% \end{macrocode}
% \begin{macrocode}
@@ -1408,6 +1409,7 @@
%
% \begin{macro}{\caption at decl@package}
% \changes{v2.0}{2020/07/26}{This macro added}
+% \changes{v2.4}{2022/04/18}{\cs{@ifnextchar} replaced by \cs{kernel at ifnextchar}}
% |\caption at 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 at decl@package[2]{%
- \@ifnextchar[%]
+ \kernel at ifnextchar[%]
{\caption at declare@package{#1}{#2}}%
{\caption at declarepackage{#1}{#2}}}
\@onlypreamble\caption at 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 at counter} to \cs{caption at thecounter}; \cs{caption at stepcounter} added}
% \changes{v1.5}{2012/04/09}{\cs{caption at stepcounter} renamed to \cs{caption at stepthecounter}}
+% \changes{v2.4}{2023/03/12}{Definition of \cs{caption at ifoddpage} added to \cs{caption at stepthecounter}}
% Internal counter.
% At the moment it will be used inside |\caption at if|\-|odd|\-|page| only.
% \begin{macrocode}
@@ -1699,7 +1702,8 @@
\newcommand*\caption at stepthecounter{%
\@tempcnta\caption at thecounter
\advance\@tempcnta\@ne\relax
- \xdef\caption at thecounter{\the\@tempcnta}}
+ \xdef\caption at thecounter{\the\@tempcnta}%
+ \global\let\caption at ifoddpage\caption at ifoddpage@}
% \end{macrocode}
% \end{macro}
%
@@ -1746,7 +1750,8 @@
%
% \begin{macro}{\caption at pageref}
% \changes{v1.1}{2007/09/01}{This macro added}
-% \changes{v1.2d}{2009/10/09}{Uses \cs{@latex at warning} instead of \cs{caption at Warning} now}
+% \changes{v1.2d}{2009/10/09}{Uses \cs{@latex at warning} instead of \cs{caption at Warning}}
+% \changes{v2.4}{2023/03/12}{The warning refers to \texttt{caption at NUM} instead of \texttt{NUM}}
% |\caption at pageref|\marg{name}\\
% This command is a modified version of |\page|\-|ref| from \LaTeX2e.
% It will be used inside |\caption at if|\-|odd|\-|page| and |\FP at help|\-|Note|.
@@ -1754,7 +1759,7 @@
\newcommand*\caption at pageref[1]{%
\expandafter\ifx\csname caption at r@#1\endcsname\relax
\G at refundefinedtrue % => 'There are undefined references.'
- \@latex at warning{Reference `#1' on page \thepage \space undefined}%
+ \@latex at warning{Reference `caption@#1' on page \thepage \space undefined}%
\else
\expandafter\let\expandafter\caption at thepage\csname caption at r@#1\endcsname
\fi}
@@ -1764,24 +1769,25 @@
% \begin{macro}{\caption at 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 at stepthecounter}.}
% \begin{macrocode}
-\newcommand*\caption at ifoddpage{%
+\newcommand*\caption at ifoddpage@{%
\caption at iftwoside{%
\caption at label\caption at thecounter
\caption at pageref\caption at thecounter
\ifodd\caption at thepage
- \let\caption at ifoddpage\@firstoftwo
+ \global\let\caption at ifoddpage\@firstoftwo
\else
- \let\caption at ifoddpage\@secondoftwo
+ \global\let\caption at ifoddpage\@secondoftwo
\fi
- }{\let\caption at ifoddpage\@firstoftwo}%
+ }{\global\let\caption at ifoddpage\@firstoftwo}%
% \end{macrocode}
% \begin{macrocode}
\caption at ifoddpage}
@@ -2281,7 +2287,7 @@
% \begin{quote}
% |\renewcommand\fnum at 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 at ifnextchar}}
% The following code was taken from |base/ltfloat.dtx| but |\step|\-|counter|
% is replaced by |\caption at 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 at footnote{%
- \@ifnextchar[%]
+ \kernel at ifnextchar[%]
\@xfootnote
{\caption at l@stepcounter\@mpfn
\protected at xdef\@thefnmark{\thempfn}%
@@ -4408,12 +4415,13 @@
% \begin{macro}{\caption at 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 at ifnextchar}}
% The following code was taken from |base/ltfloat.dtx| but |\step|\-|counter|
% is replaced by |\caption at l@step|\-|counter| so the footnote counter will
% only be incremented temporarily for the single-line-check.
% \begin{macrocode}
\newcommand*\caption at footnotemark{%
- \@ifnextchar[%]
+ \kernel at ifnextchar[%]
\@xfootnotemark
{\caption at l@stepcounter{footnote}%
\protected at xdef\@thefnmark{\thefootnote}%
@@ -4423,10 +4431,11 @@
%
% \begin{macro}{\caption at footnotetext}
% \changes{v2.3}{2021/07/03}{This macro added}
+% \changes{v2.4}{2022/04/18}{\cs{@ifnextchar} replaced by \cs{kernel at ifnextchar}}
% The following code was taken from |base/ltfloat.dtx|.
% \begin{macrocode}
\newcommand*\caption at footnotetext{%
- \@ifnextchar[%]
+ \kernel at ifnextchar[%]
\@xfootnotenext
{\protected at xdef\@thefnmark{\thempfn}%
\@footnotetext}}
@@ -4436,6 +4445,7 @@
% \begin{macro}{\caption at 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 at ifnextchar}}
% The following code was taken from |endnotes/endnotes.sty| but |\step|\-|counter|
% is replaced by |\caption at 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 at endnote{%
- \@ifnextchar[%]
+ \kernel at ifnextchar[%]
\@xendnote
{\caption at l@stepcounter{endnote}%
\protected at xdef\@theenmark{\theendnote}%
@@ -4454,12 +4464,13 @@
% \begin{macro}{\caption at 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 at ifnextchar}}
% The following code was taken from |endnotes/endnotes.sty| but |\step|\-|counter|
% is replaced by |\caption at l@step|\-|counter| so the footnote counter will
% only be incremented temporarily for the single-line-check.
% \begin{macrocode}
\newcommand*\caption at endnotemark{%
- \@ifnextchar[%]
+ \kernel at ifnextchar[%]
\@xendnotemark
{\caption at l@stepcounter{endnote}%
\protected at xdef\@theenmark{\theendnote}%
@@ -4469,10 +4480,11 @@
%
% \begin{macro}{\caption at endnotetext}
% \changes{v2.3}{2021/07/03}{This macro added}
+% \changes{v2.4}{2022/04/18}{\cs{@ifnextchar} replaced by \cs{kernel at ifnextchar}}
% The following code was taken from |endnotes/endnotes.sty|.
% \begin{macrocode}
\newcommand*\caption at endnotetext{%
- \@ifnextchar[%]
+ \kernel at ifnextchar[%]
\@xendnotenext
{\protected at xdef\@theenmark{\theendnote}%
\@endnotetext}}
@@ -4753,6 +4765,8 @@
% \changes{v1.13}{2020/07/28}{Uses \cs{caption at l@addto at list} instead of \cs{@cons} now}
% \changes{v1.13}{2020/07/29}{Usage of \cs{caption at 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 at declaresubtype[1]{%
- \@testopt{\caption@@declaresubtype{#1}}{alph}}
+ \@testopt{\caption@@declaresubtype#1}{alph}}
\@onlypreamble\caption at declaresubtype
% \end{macrocode}
% \begin{macrocode}
@@ -4782,28 +4796,37 @@
% If not, define the counter and list entry.
% \begin{macrocode}
\caption at ifdefined@subtype{#4}%
- {\caption at Debug{Modify subtype `#4'}}%
- {\caption at Debug{New subtype `#4'}%
- \newcounter{#4}[{#3}]%
- \@namedef{ext@#4}{\csname ext@#3\endcsname}%
- \caption at declaresublistentry{#3}%
- \caption at l@addto at list\caption at subtypelist{#4}%
- \caption at subtype@hook{#4}}%
+ {\caption at Info{Modify subtype `#4'}}%
+ {\caption at 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 at declaresublistentry{#3}%
+% \end{macrocode}
% Support of \package{titletoc} package
% \begin{macrocode}
- \caption at ifdefined\contentsuse{%
- \contentsuse{#4}{\csname ext@#4\endcsname}}{}%
+ \caption at 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 at l@addto at list\caption at subtypelist{#4}%
+ \caption at subtype@hook{#4}}%
+% \end{macrocode}
+% \begin{macrocode}
+ {\caption at subtypesource\caption at subtype@source{#4}%
+ \caption at Error{The counter `#4' was already defined by\MessageBreak\caption at 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 at subtypesource}
+% \changes{v2.4}{2022/04/06}{This macro definition added}
+% |\caption at 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 at subtypesource[2]{%
+ \caption at ifdefined@subtype{#2}%
+ {\def#1{\noexpand\DeclareCaptionSubType (offered by the caption package)}}%
+ {\caption at ifin@list\sf at 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 at For}}
% |\ForEachCaptionSubType*|\marg{code with \#1}\\
Modified: trunk/Master/texmf-dist/source/latex/caption/fallback/v3.0/caption.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/caption/fallback/v3.0/caption.dtx 2023-03-12 20:33:16 UTC (rev 66579)
+++ trunk/Master/texmf-dist/source/latex/caption/fallback/v3.0/caption.dtx 2023-03-12 20:33:41 UTC (rev 66580)
@@ -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 at 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 at 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 at SC@zfloat\SC at zfloat
\def\SC at 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,8 +4921,13 @@
\let\caption at SC\caption
% \def\caption{\renewcommand\captionsetup[1]{}\caption at caption\caption at SC}%
\def\caption{\caption at caption\caption at SC}%
- }%
% \end{macrocode}
+%
+% Since the original definition of |\SC at zfloat| ends with |\begin{lrbox}| which ends with |\ignore|\-|spaces|,
+% we do have to end our re-definition of |\SC at zfloat| with |\ignore|\-|spaces| as well.
+% \begin{macrocode}
+ \ignorespaces}%
+% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\endSC at FLOAT}
Modified: trunk/Master/texmf-dist/source/latex/caption/fallback/v3.1/caption.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/caption/fallback/v3.1/caption.dtx 2023-03-12 20:33:16 UTC (rev 66579)
+++ trunk/Master/texmf-dist/source/latex/caption/fallback/v3.1/caption.dtx 2023-03-12 20:33:41 UTC (rev 66580)
@@ -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 at 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,14 +7339,19 @@
\let\caption\caption at 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 at settype*{#2}%
- \caption at freeze*}%
+ \caption at freeze*%
% \end{macrocode}
+% Since the original definition of |\SC at zfloat| ends with |\begin{lrbox}| which ends with |\ignore|\-|spaces|,
+% we do have to end our re-definition of |\SC at zfloat| with |\ignore|\-|spaces| as well.
+% \begin{macrocode}
+ \ignorespaces}%
+% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\endSC at FLOAT}
Modified: trunk/Master/texmf-dist/source/latex/caption/fallback/v3.2/caption.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/caption/fallback/v3.2/caption.dtx 2023-03-12 20:33:16 UTC (rev 66579)
+++ trunk/Master/texmf-dist/source/latex/caption/fallback/v3.2/caption.dtx 2023-03-12 20:33:41 UTC (rev 66580)
@@ -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 at 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 at freeze} instead of \cs{caption at 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 at 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,9 +3980,14 @@
% The sidecap package uses |\ifx\label\SC at label| to test if it is just inside a
% |SC|\-|figure| or not. So we redefine |\SC at label| here so this test will still work.
% \begin{macrocode}
- \let\SC at label\label}%
+ \let\SC at label\label
% \end{macrocode}
+% Since the original definition of |\SC at zfloat| ends with |\begin{lrbox}| which ends with |\ignore|\-|spaces|,
+% we do have to end our re-definition of |\SC at zfloat| with |\ignore|\-|spaces| as well.
% \begin{macrocode}
+ \ignorespaces}%
+% \end{macrocode}
+% \begin{macrocode}
\providecommand*\SC at RestoreCommands{%
\let\caption=\SC at orig@caption \let\label=\SC at orig@label}%
% \end{macrocode}
Modified: trunk/Master/texmf-dist/source/latex/caption/fallback/v3.3/caption.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/caption/fallback/v3.3/caption.dtx 2023-03-12 20:33:16 UTC (rev 66579)
+++ trunk/Master/texmf-dist/source/latex/caption/fallback/v3.3/caption.dtx 2023-03-12 20:33:41 UTC (rev 66580)
@@ -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 at freeze} instead of \cs{caption at freeze*} now}
% \changes{v3.3}{2013/05/01}{Usage of \cs{caption at freeze} replaced by \cs{caption at 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 at 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,9 +4435,14 @@
% The sidecap package uses |\ifx\label\SC at label| to test if it is just inside a
% |SC|\-|figure| or not. So we redefine |\SC at label| here so this test will still work.
% \begin{macrocode}
- \let\SC at label\label}%
+ \let\SC at label\label
% \end{macrocode}
+% Since the original definition of |\SC at zfloat| ends with |\begin{lrbox}| which ends with |\ignore|\-|spaces|,
+% we do have to end our re-definition of |\SC at zfloat| with |\ignore|\-|spaces| as well.
% \begin{macrocode}
+ \ignorespaces}%
+% \end{macrocode}
+% \begin{macrocode}
\providecommand*\SC at RestoreCommands{%
\let\caption=\SC at orig@caption \let\label=\SC at orig@label}%
% \end{macrocode}
Modified: trunk/Master/texmf-dist/source/latex/caption/fallback/v3.3/caption3.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/caption/fallback/v3.3/caption3.dtx 2023-03-12 20:33:16 UTC (rev 66579)
+++ trunk/Master/texmf-dist/source/latex/caption/fallback/v3.3/caption3.dtx 2023-03-12 20:33:41 UTC (rev 66580)
@@ -2,7 +2,7 @@
%
% This is file `caption3.dtx'.
%
-% Copyright (C) 1994-2019 Axel Sommerfeldt (axel.sommerfeldt at f-m.fm)
+% Copyright (C) 1994-2022 Axel Sommerfeldt (axel.sommerfeldt at 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 at 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 at setup@options@@} replaced by \cs{caption at 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 at setup@options\caption at setup}
% \end{macrocode}
% \begin{macrocode}
-\newcommand*\caption at setup{\caption at setkeys{caption}}
+\newcommand*\caption at setup{%
+ \caption at setkeys{caption}}
% \end{macrocode}
% \begin{macrocode}
\def\caption at setup@options[#1]{%
- \@ifnextchar[%
+ \@ifnextchar[%]
{\caption at stepthecounter
- \caption at withoptargs{\@expandtwoargs
- \caption at setup@options at i{#1}{@\caption at thecounter}}}%
+ \@expandtwoargs\caption at setup@options@@{#1}{@\caption at thecounter}}%
{\caption at setup@options@{#1}}}
% \end{macrocode}
% \begin{macrocode}
-\newcommand*\caption at setup@options at i[4]{%
- \caption at setup@options@{#1}{#2}%
- \caption at declare@option{#2}[]{\captionsetup#3{#4}}}
+\def\caption at setup@options@@#1#2[#3]#4{%
+ \caption at declare@option{#2}[]{\caption at setup@options@{#3}{#4}}%
+ \caption at setup@options@{#1}{#2}}
% \end{macrocode}
% \begin{macrocode}
\newcommand*\caption at setup@options@[2]{%
Modified: trunk/Master/texmf-dist/source/latex/caption/fallback/v3.4/caption.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/caption/fallback/v3.4/caption.dtx 2023-03-12 20:33:16 UTC (rev 66579)
+++ trunk/Master/texmf-dist/source/latex/caption/fallback/v3.4/caption.dtx 2023-03-12 20:33:41 UTC (rev 66580)
@@ -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 at freeze} instead of \cs{caption at freeze*} now}
% \changes{v3.3}{2013/05/01}{Usage of \cs{caption at freeze} replaced by \cs{caption at 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 at 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,9 +4004,14 @@
% The sidecap package uses |\ifx\label\SC at label| to test if it is just inside a
% |SC|\-|figure| or not. So we redefine |\SC at label| here so this test will still work.
% \begin{macrocode}
- \let\SC at label\label}%
+ \let\SC at label\label
% \end{macrocode}
+% Since the original definition of |\SC at zfloat| ends with |\begin{lrbox}| which ends with |\ignore|\-|spaces|,
+% we do have to end our re-definition of |\SC at zfloat| with |\ignore|\-|spaces| as well.
% \begin{macrocode}
+ \ignorespaces}%
+% \end{macrocode}
+% \begin{macrocode}
\providecommand*\SC at RestoreCommands{%
\let\caption=\SC at orig@caption \let\label=\SC at orig@label}%
% \end{macrocode}
Modified: trunk/Master/texmf-dist/source/latex/caption/fallback/v3.4/caption3.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/caption/fallback/v3.4/caption3.dtx 2023-03-12 20:33:16 UTC (rev 66579)
+++ trunk/Master/texmf-dist/source/latex/caption/fallback/v3.4/caption3.dtx 2023-03-12 20:33:41 UTC (rev 66580)
@@ -2,7 +2,7 @@
%
% This is file `caption3.dtx'.
%
-% Copyright (C) 1994-2020 Axel Sommerfeldt (axel.sommerfeldt at f-m.fm)
+% Copyright (C) 1994-2022 Axel Sommerfeldt (axel.sommerfeldt at 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 at 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 at setup@options@@} replaced by \cs{caption at 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 at setup@options\caption at setup}
% \end{macrocode}
% \begin{macrocode}
-\newcommand*\caption at setup{\caption at setkeys{caption}}
+\newcommand*\caption at setup{%
+ \caption at setkeys{caption}}
% \end{macrocode}
% \begin{macrocode}
\def\caption at setup@options[#1]{%
\@ifnextchar[%]
{\caption at stepthecounter
- \caption at withoptargs{\@expandtwoargs
- \caption at setup@options at i{#1}{@\caption at thecounter}}}%
+ \@expandtwoargs\caption at setup@options@@{#1}{@\caption at thecounter}}%
{\caption at setup@options@{#1}}}
% \end{macrocode}
% \begin{macrocode}
-\newcommand*\caption at setup@options at i[4]{%
- \caption at declare@option{#2}[]{\captionsetup#3{#4}}%
+\def\caption at setup@options@@#1#2[#3]#4{%
+ \caption at declare@option{#2}[]{\caption at setup@options@{#3}{#4}}%
\caption at setup@options@{#1}{#2}}
% \end{macrocode}
% \begin{macrocode}
@@ -3979,6 +3980,7 @@
% \changes{v1.13}{2020/07/28}{Uses \cs{caption at l@addto at list} instead of \cs{@cons} now}
% \changes{v1.13}{2020/07/29}{Usage of \cs{caption at 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 at declaresublistentry{#3}%
\caption at l@addto at list\caption at subtypelist{#4}%
- \caption at subtype@hook{#4}}%
+ \caption at subtype@hook{#4}%
% \end{macrocode}
% Support of \package{titletoc} package
% \begin{macrocode}
- \caption at ifdefined\contentsuse{%
- \contentsuse{#4}{\csname ext@#4\endcsname}}{}%
+ \caption at 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
Modified: trunk/Master/texmf-dist/source/latex/caption/fallback/v3.5/caption.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/caption/fallback/v3.5/caption.dtx 2023-03-12 20:33:16 UTC (rev 66579)
+++ trunk/Master/texmf-dist/source/latex/caption/fallback/v3.5/caption.dtx 2023-03-12 20:33:41 UTC (rev 66580)
@@ -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 at freeze} instead of \cs{caption at freeze*} now}
% \changes{v3.3}{2013/05/01}{Usage of \cs{caption at freeze} replaced by \cs{caption at 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 at 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,9 +3786,14 @@
% The sidecap package uses |\ifx\label\SC at label| to test if it is just inside a
% |SC|\-|figure| or not. So we redefine |\SC at label| here so this test will still work.
% \begin{macrocode}
- \let\SC at label\label}%
+ \let\SC at label\label
% \end{macrocode}
+% Since the original definition of |\SC at zfloat| ends with |\begin{lrbox}| which ends with |\ignore|\-|spaces|,
+% we do have to end our re-definition of |\SC at zfloat| with |\ignore|\-|spaces| as well.
% \begin{macrocode}
+ \ignorespaces}%
+% \end{macrocode}
+% \begin{macrocode}
\providecommand*\SC at RestoreCommands{%
\let\caption=\SC at orig@caption \let\label=\SC at orig@label}%
% \end{macrocode}
Modified: trunk/Master/texmf-dist/source/latex/caption/fallback/v3.5/caption3.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/caption/fallback/v3.5/caption3.dtx 2023-03-12 20:33:16 UTC (rev 66579)
+++ trunk/Master/texmf-dist/source/latex/caption/fallback/v3.5/caption3.dtx 2023-03-12 20:33:41 UTC (rev 66580)
@@ -2,7 +2,7 @@
%
% This is file `caption3.dtx'.
%
-% Copyright (C) 1994-2020 Axel Sommerfeldt (axel.sommerfeldt at f-m.fm)
+% Copyright (C) 1994-2022 Axel Sommerfeldt (axel.sommerfeldt at 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 at 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 at setup@options@@} replaced by \cs{caption at 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 at setup@options\caption at setup}
% \end{macrocode}
% \begin{macrocode}
-\newcommand*\caption at setup{\caption at setkeys{caption}}
+\newcommand*\caption at setup{%
+ \caption at setkeys{caption}}
% \end{macrocode}
% \begin{macrocode}
\def\caption at setup@options[#1]{%
\@ifnextchar[%]
{\caption at stepthecounter
- \caption at withoptargs{\@expandtwoargs
- \caption at setup@options at i{#1}{@\caption at thecounter}}}%
+ \@expandtwoargs\caption at setup@options@@{#1}{@\caption at thecounter}}%
{\caption at setup@options@{#1}}}
% \end{macrocode}
% \begin{macrocode}
-\newcommand*\caption at setup@options at i[4]{%
- \caption at declare@option{#2}[]{\captionsetup#3{#4}}%
+\def\caption at setup@options@@#1#2[#3]#4{%
+ \caption at declare@option{#2}[]{\caption at setup@options@{#3}{#4}}%
\caption at setup@options@{#1}{#2}}
% \end{macrocode}
% \begin{macrocode}
@@ -4431,6 +4432,7 @@
% \changes{v1.13}{2020/07/28}{Uses \cs{caption at l@addto at list} instead of \cs{@cons} now}
% \changes{v1.13}{2020/07/29}{Usage of \cs{caption at 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 at declaresublistentry{#3}%
\caption at l@addto at list\caption at subtypelist{#4}%
- \caption at subtype@hook{#4}}%
+ \caption at subtype@hook{#4}%
% \end{macrocode}
% Support of \package{titletoc} package
% \begin{macrocode}
- \caption at ifdefined\contentsuse{%
- \contentsuse{#4}{\csname ext@#4\endcsname}}{}%
+ \caption at 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
Modified: trunk/Master/texmf-dist/source/latex/caption/subcaption.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/caption/subcaption.dtx 2023-03-12 20:33:16 UTC (rev 66579)
+++ trunk/Master/texmf-dist/source/latex/caption/subcaption.dtx 2023-03-12 20:33:41 UTC (rev 66580)
@@ -2,7 +2,7 @@
%
% This is file `subcaption.dtx'.
%
-% Copyright (C) 2007-2022 Axel Sommerfeldt (axel.sommerfeldt at f-m.fm)
+% Copyright (C) 2007-2023 Axel Sommerfeldt (axel.sommerfeldt at 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 at subfigure
% For example |\thesubfigure| and |\p at subfigure| are (as default) internally defined as
% \begin{quote}
-% |\newcommand\thesubfigure{\alph{subfigure}}|\\
-% |\newcommand\p at subfigure{\thefigure}|
+% |\newcommand\thesubfigure{\alph{subfigure}}|\\
+% |\newcommand\p at 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 at sub|\-|figure| $=$
@@ -708,8 +752,8 @@
% After |\Declare|\-|Caption|\-|Sub|\-|Type*[arabic]{figure}|, |\the|\-|sub|\-|figure| and
% |\p at sub|\-|figure| will look like
% \begin{quote}
-% |\renewcommand\thesubfigure{\thefigure.\arabic{subfigure}}|\\
-% |\renewcommand\p at subfigure{}|
+% |\renewcommand\thesubfigure{\thefigure.\arabic{subfigure}}|\\
+% |\renewcommand\p at 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 at Info}
+% \changes{v1.6}{2022/04/07}{This macro added}
+% |\subcaption at Info|\marg{message}\\
+% issues an info message (with code line indication).
+% \begin{macrocode}
+\newcommand*\subcaption at Info{%
+ \PackageInfo{subcaption}}
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\subcaption at Warning}
% \changes{v1.5}{2022/01/06}{This macro added}
% |\subcaption at Warning|\marg{message}\\
@@ -1828,43 +1928,19 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\subcaption at 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.
+% \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}
-\newcommand*\subcaption at CheckCompatibility{%
+\newcommand*\subcaptionsetup[1][]{%
+ \@ifstar{\captionsetup*[{sub#1}]}{\captionsetup[{sub#1}]}}
% \end{macrocode}
-% \begin{macrocode}
- \@ifpackageloaded{subfigure}{%
- \subcaption at Error
- {This package can't be used in cooperation\MessageBreak
- with the subfigure package}%
- \endinput}{}%
-% \end{macrocode}
-% \begin{macrocode}
- \@ifpackageloaded{subfig}{%
- \subcaption at Error
- {This package can't be used in cooperation\MessageBreak
- with the subfig package}%
- \endinput}{}%
-% \end{macrocode}
-% \begin{macrocode}
-}
-% \end{macrocode}
-% \begin{macrocode}
-\subcaption at CheckCompatibility
-\caption at AtBeginDocument{%
- \subcaption at CheckCompatibility
- \let\subcaption at CheckCompatibility\@undefined}
-% \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 at 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 at minipage{%
- \@testopt\subcaption at iminipage b}
+ \kernel at ifnextchar[%]
+ \subcaption at iminipage
+ {\caption at ifcaption{\subcaption at iminipage[t]}{\subcaption at iminipage[b]}}}
% \end{macrocode}
% We pass all other optional arguments using the generic helper macro
% |\caption at with|\-|opt|\-|args| offered by the \pkg{caption} kernel).
@@ -1947,6 +2026,10 @@
% \begin{macrocode}
\providecommand*\@subfloatboxreset{}
% \end{macrocode}
+% \begin{macrocode}
+\providecommand*\caption at ifcaption{\caption at ifflag2} % caption >= v3.3 < v3.6
+\providecommand*\caption at ifflag[1]{\@secondoftwo} % caption < v3.3
+% \end{macrocode}
% \end{macro}
%
% \begin{environment}{subcaptionblock}
@@ -2232,8 +2315,8 @@
% \begin{macrocode}
\let\caption at setkeys@ORI\caption at setkeys
\@ifundefined{caption at SetupOptions} % caption3 v1.3
- {\renewcommand\caption at setkeys[2]{\captionsetup[sub]{#2}}}
- {\caption at SetupOptions{subcaption}{\captionsetup[sub]{#2}}}
+ {\renewcommand\caption at setkeys[2]{\subcaptionsetup{#2}}}
+ {\caption at SetupOptions{subcaption}{\subcaptionsetup{#2}}}
% \end{macrocode}
% \begin{macrocode}
\@ifundefined{caption at smaller} % caption3 v1.7-169
@@ -2250,16 +2333,32 @@
\let\caption at setkeys@ORI\@undefined
% \end{macrocode}
%
+% \begin{macro}{\subcaption at DeclareType}
+% \changes{v1.6}{2022/04/07}{This macro added}
+% |\subcaption at DeclareType|\marg{type}\\
+% defines the sub-counter via |\Declare|\-|Caption|\-|Sub|\-|Type| offered by the \pkg{caption} package.
+% \begin{macrocode}
+\newcommand*\subcaption at DeclareType[1]{%
+ \@ifundefined{c at sub#1}%
+ {\DeclareCaptionSubType{#1}}%
+ {\caption at subtypesource\caption at subtype@source{sub#1}%
+ \subcaption at Info{The counter `sub#1' was already defined by\MessageBreak\caption at subtype@source}}}
+% \end{macrocode}
+% \begin{macrocode}
+\providecommand*\caption at 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 at ForEachType} % caption3 v1.4a
- {\@ifundefined{c at figure}{}{\DeclareCaptionSubType{figure}}%
- \@ifundefined{c at table}{}{\DeclareCaptionSubType{table}}%
- \caption at For{typelist}{\DeclareCaptionSubType{#1}}}
- {\caption at ForEachType{\DeclareCaptionSubType{#1}}}}
- {\ForEachCaptionType{\DeclareCaptionSubType{#1}}}
+ {\@ifundefined{c at figure}{}{\subcaption at DeclareType{figure}}%
+ \@ifundefined{c at table}{}{\subcaption at DeclareType{table}}%
+ \caption at For{typelist}{\subcaption at DeclareType{#1}}}
+ {\caption at ForEachType{\subcaption at DeclareType{#1}}}}
+ {\ForEachCaptionType{\subcaption at DeclareType{#1}}}
% \end{macrocode}
%
% \subsection{Bonus material}
@@ -2340,6 +2439,22 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\caption at 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 at subfloatrow@hook{} % caption < v3.7
+% \end{macrocode}
+% \begin{macrocode}
+\g at addto@macro\caption at 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,7 +2468,8 @@
% \changes{v1.4}{2020/12/24}{Usage of \cs{caption at getlabel} replaced by \cs{subcaption at getlabel}}
% \changes{v1.4a}{2020/12/26}{Clearance of \cs{caption at thelabel} replaced by \cs{subcaption at clrlabel}}
% \changes{v1.5}{2022/01/07}{Usage of \cs{@ifnextchar} replaced by \cs{kernel at 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}.
@@ -2360,27 +2476,42 @@
% 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}{}
+\caption at AtBeginDocument{%
+ \begingroup
+ \newenvironment{subcaption at memoir@subfloat}{}{}%
+ \ifx\subfloat\subcaption at memoir@subfloat
+ \endgroup
+ % "subfloat" = empty environment, defined by memoir
+ \renewcommand*\subfloat{%
+ \def\subcaption at currenvir{subfloat}%
+ \ifx\@currenvir\subcaption at currenvir
+ % emulate (empty) subfloat environment
+ \else
+ \expandafter\subcaption at subfloat
+ \fi}%
+ \else
+ \endgroup
+ \providecommand*\subfloat{\subcaption at subfloat}%
+ \fi}
% \end{macrocode}
% \begin{macrocode}
-\caption at AtBeginDocument{%
- \providecommand*\subfloat{%
- \kernel at ifnextchar[%]
- \subcaption at subfloat
- \subcaption at subfloat@}}
+\newcommand*\subcaption at subfloat{%
+ \kernel at ifnextchar[%]
+ \subcaption@@subfloat
+ \subcaption at subfloat@}
% \end{macrocode}
% \begin{macrocode}
-\long\def\subcaption at subfloat[#1]{%
+\long\def\subcaption@@subfloat[#1]{%
\kernel at 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 at getlabel{#3}%
#1{#2\caption at thelabel}{\let\label\caption at gobble#3}%
\subcaption at clrlabel
Modified: trunk/Master/texmf-dist/tex/latex/caption/bicaption.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/caption/bicaption.sty 2023-03-12 20:33:16 UTC (rev 66579)
+++ trunk/Master/texmf-dist/tex/latex/caption/bicaption.sty 2023-03-12 20:33:41 UTC (rev 66580)
@@ -6,7 +6,7 @@
%%
%% bicaption.dtx (with options: `package')
%%
-%% Copyright (C) 1994-2022 Axel Sommerfeldt (axel.sommerfeldt at f-m.fm)
+%% Copyright (C) 1994-2023 Axel Sommerfeldt (axel.sommerfeldt at 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 at Info[1]{%
\PackageInfo{bicaption}{#1}}
@@ -138,7 +138,7 @@
\bicaption at setmainlanguage
\fi
\ifcsname captionmainlanguage\endcsname
- \captionsetup[bi-first]{lang=\captionmainlanguage}%
+ \captionsetup*[bi-first]{lang=\captionmainlanguage}%
\else
\ifcsname bicaption at language@value\endcsname % option "lang=" was used
\expandafter\bicaption at Warning
@@ -158,7 +158,7 @@
\let\captionmainlanguage\xpg at main@language
\fi\fi}
\@onlypreamble\bicaption at setmainlanguage
-\caption at SetupOptions{bicaption}{\captionsetup[bi-second]{#2}}%
+\caption at SetupOptions{bicaption}{\captionsetup*[bi-second]{#2}}%
\caption at ProcessOptions*{bicaption}
\let\bicaption at addcontentsline@ORI\caption at addcontentsline
\renewcommand*\caption at addcontentsline[2]{%
@@ -236,6 +236,17 @@
{\newcommand\bicaption at slc[2]{\caption@@slc{#1}{#2}{\captionwidth}}}
\providecommand*\caption at setsinglelinecheck{%
\caption at set@bool\caption at ifslc}
+\newcommand*\bicaptionsetup{%
+ \caption at teststar\@bicaptionsetup*{}}
+\newcommand*\@bicaptionsetup[1]{%
+ \kernel at ifnextchar[%]
+ {\bicaption at setup@options{#1}}%
+ {\bicaption at setup*}}
+\def\bicaption at setup@options#1[#2]{%
+ \bicaption at setup{#1[{#2}]}}
+\newcommand*\bicaption at 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 at getlabel{#2}%
\bicaption at ifswap
- {\bicaption at setup{#1}{#2}%
+ {\bicaption at set{#1}{#2}%
\bicaption at cmd[{#3}]{#4}}%
- {\bicaption at setup{#3}{#4}%
+ {\bicaption at set{#3}{#4}%
\bicaption at cmd[{#1}]{#2}}}
\long\def\bicaption at star#1[#2]{#1*}
\@ifundefined{caption at getlabel}{%
@@ -300,7 +311,7 @@
}{%
\newcommand*\bicaption at clrlabel{\caption at clrlabel} % caption3 >= v2.3
}
-\newcommand\bicaption at setup[2]{%
+\newcommand\bicaption at set[2]{%
\def\bicaption at lentry{#1}%
\def\bicaption at text{\ignorespaces #2}}
\newcommand*\bicaption at clear{%
@@ -313,7 +324,7 @@
\def\bicaption{%
\caption at withoptargs\caption at SC@bicaption}%
\long\def\caption at SC@bicaption#1#2{%
- \@ifnextchar[%]
+ \kernel at ifnextchar[%]
{\caption at SC@bi at caption{#1}{#2}}%
{\caption at SC@bi at caption@{#1}{#2}}}%
\long\def\caption at SC@bi at caption#1#2[#3]#4{%
@@ -329,7 +340,7 @@
\lst at Key{caption1}\relax{%
\lstKV at OptArg[{#1}]{#1}{%
\bicaption at ifswap
- {\bicaption at setup{##1}{##2}}%
+ {\bicaption at set{##1}{##2}}%
{\def\lst@@caption{##1}\def\lst at caption{##2}}}%
\let\lst at title\@empty}%
\lst at Key{caption2}\relax{%
@@ -336,7 +347,7 @@
\lstKV at OptArg[{#1}]{#1}{%
\bicaption at ifswap
{\def\lst@@caption{##1}\def\lst at caption{##2}}%
- {\bicaption at setup{##1}{##2}}}%
+ {\bicaption at set{##1}{##2}}}%
\let\lst at title\@empty}%
\lst at AddToHookExe{TextStyle}{%
\bicaption at clear}%
@@ -358,8 +369,8 @@
\bicaption at LT@setup}%
\gdef\bicaption at LT@setup{%
\bicaption at ifswap
- {\bicaption at setup{#1}{#2}}%
- {\bicaption at setup{#3}{#4}}}%
+ {\bicaption at set{#1}{#2}}%
+ {\bicaption at set{#3}{#4}}}%
\bicaption at ifswap
{\egroup\bicaption at cmd[{#3}]{#4}}%
{\egroup\bicaption at cmd[{#1}]{#2}}}
Modified: trunk/Master/texmf-dist/tex/latex/caption/caption-koma.sto
===================================================================
--- trunk/Master/texmf-dist/tex/latex/caption/caption-koma.sto 2023-03-12 20:33:16 UTC (rev 66579)
+++ trunk/Master/texmf-dist/tex/latex/caption/caption-koma.sto 2023-03-12 20:33:41 UTC (rev 66580)
@@ -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 at koma@setcapwidth
\csname\string\setcapwidth\endcsname
\@namedef{\string\setcapwidth}[#1]#2{%
@@ -97,20 +97,6 @@
\newcommand*\caption at setcapindent{%
\captionsetup{indent=\ifdim\cap at indent<\z@\z@\else\cap at indent\fi}}
\caption at ifdefined\cap at indent{\caption at setcapindent}{}
-\let\caption at koma@parindent\KV at caption@parindent
-\DeclareCaptionOption{parindent}[]{%
- \ifx,#1,%
- \caption at Debug{Option `parindent' ignored}%
- \else
- \caption at koma@parindent{#1}%
- \fi}%
-\let\caption at koma@parskip\KV at caption@parskip
-\DeclareCaptionOption{parskip}[]{%
- \ifx,#1,%
- \caption at Debug{Option `parskip' ignored}%
- \else
- \caption at koma@parskip{#1}%
- \fi}%
\g at addto@macro\onelinecaptionstrue{\caption at setsinglelinecheck{true}}%
\g at addto@macro\onelinecaptionsfalse{\caption at setsinglelinecheck{false}}%
\ifonelinecaptions
Modified: trunk/Master/texmf-dist/tex/latex/caption/caption.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/caption/caption.sty 2023-03-12 20:33:16 UTC (rev 66579)
+++ trunk/Master/texmf-dist/tex/latex/caption/caption.sty 2023-03-12 20:33:41 UTC (rev 66580)
@@ -6,7 +6,7 @@
%%
%% caption.dtx (with options: `package')
%%
-%% Copyright (C) 1994-2022 Axel Sommerfeldt (axel.sommerfeldt at f-m.fm)
+%% Copyright (C) 1994-2023 Axel Sommerfeldt (axel.sommerfeldt at 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 at ifbool{documentclass}{}{%
\caption at 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 at ifinlist{#1}{0,false,no,off}{%
- % nothing to do
+ \let\caption at ifcompatibility\@secondoftwo % not used; for backward compatibility only
}{%
\caption at Error{Undefined compatibility value `#1'}%
}}}
+\@onlypreamble at key{caption}{compatibility}
+\caption at setbool{compatibility}{0} % default: Try not to be compatible to v1.x
\DeclareCaptionOptionNoValue*{normal}{%
\caption at setup{format=plain,justification=justified}}
\DeclareCaptionOptionNoValue*{isu}{%
@@ -268,6 +270,7 @@
\def\caption at xfloat#1[#2]{%
\caption at ORI@xfloat{#1}[#2]%
\caption at settype{#1}%
+ \caption at setanchor
\caption at xfloat@hook}
\newcommand*\caption at xfloat@hook{}
\def\caption at xdblfloat#1[#2]{%
@@ -282,45 +285,33 @@
\DeclareCaptionOptionNoValue{subtype*}{\setcaptionsubtype*}%
}
\def\setcaptiontype{%
+ \caption at teststar\@setcaptiontype\@gobble\@iden}
+\newcommand*\@setcaptiontype[1]{%
+ \kernel at ifnextchar[%]
+ {\@setcaptiontype@#1}%
+ {\@@setcaptiontype#1\relax}}
+\def\@setcaptiontype@#1[#2]{%
+ \@@setcaptiontype{#1}{\caption at setoptions{#2}}}
+\newcommand*\@@setcaptiontype[3]{%
+ \caption at settype{#3}#2%
\caption at parboxrestore@light
- \caption at settype}
+ #1\caption at setanchor}
\newcommand*\caption at settype{%
\caption at initposition
\caption at clrflags
\aftergroup\flushsubcaptionlistentries
- \caption@@settype}
-\newcommand*\caption@@settype{%
- \caption at 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 at setoptions{#2}}
-\newcommand*\setcaptionsubtype{%
- \caption at setsubtype}
-\newcommand*\caption at setsubtype{% used by the floatrow package
- \caption at teststar\caption@@setsubtype\@firstoftwo\@secondoftwo}
-\newcommand*\caption@@setsubtype[1]{%
- \caption at iftype
- {\caption at ifsubtype
- {\caption at Debug{subtype=\@subcaptype}}%
- {\caption@@@settype{sub}{#1}{sub\@captype}}}%
- {\caption at OutsideFloat\setcaptionsubtype}}
-\newcommand*\caption@@@settype[3]{%
- \caption at Debug{#1type:=#3}%
- \@nameuse{caption at check#1type}{#3}%
- {\caption at checkgrouplevel{#1}{%
- \captionsetup{#1type#2*\@empty=...}#2{ or
- \@backslashchar#1captionof}{}}%
- \edef\caption at tempa{#3}%
+ \caption@@settype{}}
+\newcommand*\caption@@settype[2]{%
+ \caption at Debug{#1type:=#2}%
+ \@nameuse{caption at check#1type}{#2}%
+ {\caption at checkgrouplevel{#1}{\setcaption#1type}%
+ \edef\caption at tempa{#2}%
\expandafter\ifx\csname @#1captype\endcsname\caption at tempa \else
- \ifcaptionsetup at star\else\@nameuse{caption@#1type at warning}\fi
+ \@nameuse{caption@#1type at warning}%
\fi
\expandafter\let\csname @#1captype\endcsname\caption at tempa
\@nameuse{caption@#1typehook}%
- \caption at setoptions{#3}%
+ \caption at setoptions{#2}%
\ifx\caption at opt\relax
\@nameundef{caption@#1type at warning}%
\else
@@ -327,12 +318,23 @@
\@namedef{caption@#1type at warning}{\caption at Warning{%
The #1type was already set to
`\csname @#1captype\endcsname'\MessageBreak}}%
- \fi
- #2{}{\caption at reset@currentlabel\caption at start}}}
+ \fi}}
+\newcommand*\setcaptionsubtype{%
+ \caption at teststar\@setcaptionsubtype\@gobble\@iden}
+\newcommand*\@setcaptionsubtype[1]{%
+ \caption at iftype
+ {\caption at ifsubtype
+ {\caption at Debug{type=\@captype, subtype=\@subcaptype}}%
+ {\caption@@settype{sub}{sub\@captype}%
+ #1\caption at setanchor}}%
+ {\caption at OutsideFloat\setcaptionsubtype}}
\newcommand*\caption at parboxrestore@light{%
\let\par\@@par
\parindent\z@ \parskip\z at skip
\sloppy}
+\newcommand*\caption at setanchor{%
+ \caption at reset@currentlabel
+ \caption at start}
\newcommand*\caption at reset@currentlabel{%
\let\@currentlabel\caption at undefinedlabel
\ifx\caption at x@label\@undefined
@@ -349,15 +351,11 @@
\newcommand*\caption at checksubtype[1]{%
\caption at ifdefined@subtype{#1}%
\@firstofone
- {\caption at ifin@list\sf at counterlist{#1}%
- {\caption at 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 at Error{Undefined subtype `#1'}%
- \@gobble}}}
+ {\@ifundefined{c@#1}%
+ {\caption at Error{Undefined counter `#1'}}%
+ {\caption at subtypesource\caption at subtype@source{#1}%
+ \caption at Error{The counter `#1' was defined by\MessageBreak\caption at subtype@source}}%
+ \@gobble}}
\newcommand*\caption at checkgrouplevel[2]{%
\@ifundefined{#1caption at grouplevel}{%
\caption at ifundefined\caption at grouplevel{\let\caption at grouplevel\z@}{}%
@@ -397,7 +395,7 @@
\newcommand*\captionlistentry{%
\caption at teststar\caption at listentry\@firstoftwo\@secondoftwo}
\newcommand*\caption at listentry[1]{%
- \@ifnextchar[%]
+ \kernel at ifnextchar[%]
{\caption at listentry@{#1}}%
{\caption@@listentry{#1}}}
\def\caption at listentry@#1[#2]{%
@@ -598,7 +596,6 @@
{\let\caption at next\@firstoftwo}%
#3%
\caption at next}
-\@ifundefined{kernel at ifnextchar}{\let\kernel at ifnextchar\@ifnextchar}{}
\newcommand\caption at dblarg[1]{%
\kernel at ifnextchar[%]
{\caption at ydblarg{#1}}%
@@ -648,14 +645,8 @@
\caption at iflist{}{\let\caption at setlist\@gobble}%
\caption at setoptions{sub}%
\caption at setoptions{subfloat}% for subfig-package compatibility
- \def\caption at settype{\caption at withoptargs\caption at sub@settype}%
- \def\caption at sub@settype##1##2{%
- \edef\caption at tempa{##2}%
- \ifx\caption at tempa\@captype
-%%% \caption at setsubtype##1\relax
- \else
- \caption at Error{##2 inside \@subcaptype}%
- \fi}%
+ \renewcommand*\caption at settype[1]{%
+ \caption at Error{##1 inside \@subcaptype}}%
\let\caption\caption at subcaption
\let\@caption\caption@@caption
\let\phantomcaption\caption at subphantom
@@ -662,22 +653,8 @@
\let\captionlistentry\caption at sublistentry
\let\captiontext\caption at subtext
\let\caption at refstepcounter\caption at refstepcounter@
- \if at subfloatrow
- \caption at Debug{Keeping \string\@makecaption}%
- \else
- \let\@makecaption\caption at makecaption
- \fi
+ \let\@makecaption\caption at makecaption
\fi}%
-\caption at AtBeginDocument{%
- \caption at ifundefined\@subfloatrowtrue
- {\newif\if at subfloatrow
- \caption at ifundefined\subfloatrow
- {}%
- {\caption at Debug{Patching subfloatrow environment}%
- \g at addto@macro\capsubrowsettings{\@subfloatrowtrue}%
- \g at addto@macro\killfloatstyle{%
- \ifx\c at FRobj\c at FRsobj\@subfloatrowtrue\fi}}}%
- {\caption at Debug{\string\if at subfloatrow is already defined}}}%
\newcommand*\caption at subcaption{%
\caption at checkgrouplevel{sub}\subcaption
\caption at star
@@ -773,7 +750,7 @@
\caption at AtBeginDocument*{%
\caption at ifneedfreeze{%
\newcommand*\caption at freezetype[1]{%
- \caption at settype*{#1}%
+ \caption at settype{#1}%
\captionsetup*[sub]{hypcap=true}% Note: This is just a (q&d) workaround!
\caption at freeze}%
\newcommand*\caption at freeze{%
@@ -823,7 +800,7 @@
\newcommand*\caption at freeze@error{%
\caption at Error{Only one \noexpand\caption can be placed in this environment}}
\newcommand*\caption at prepare@defrost{%
- \let\caption at settype\caption@@settype}
+ \def\caption at settype{\caption@@settype{}}}
\newcommand*\caption at defrost{%
\ifx\caption at frozen@caption\@undefined
\caption at frozen@content
@@ -835,6 +812,15 @@
\caption at undefbool{needfreeze}}
\let\caption at warmup\relax
\caption at IfPackageLoaded{changepage}[2008/07/23 memoir-v3.7k]{%
+ \providecommand*\caption at 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 at set@adjustwidth
+ \ignorespaces}}%
+ \caption at patch@adjustwidth{adjustwidth}%
+ \caption at patch@adjustwidth{adjustwidth*}%
+ \let\caption at patch@adjustwidth\relax
\newdimen\caption at adjustwidth@hsize
\newdimen\caption at adjustwidth@linewidth
\providecommand*\caption at set@adjustwidth{%
@@ -841,14 +827,6 @@
\caption at adjustwidth@hsize\hsize
\caption at adjustwidth@linewidth\linewidth
\l at addto@macro\caption at beginex@hook\caption at test@adjustwidth}%
- \providecommand*\caption at 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 at set@adjustwidth}}%
- \caption at patch@changepage{adjustwidth}%
- \caption at patch@changepage{adjustwidth*}%
- \let\caption at patch@changepage\relax
\providecommand\caption at test@adjustwidth{%
\ifdim\hsize=\caption at adjustwidth@hsize
\ifdim\linewidth=\caption at adjustwidth@linewidth
@@ -893,9 +871,12 @@
\caption at ORI@float at makebox{#1\relax \caption at defrostHref}}%
}%
\newcommand*\caption at 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 at setname[2]{%
+ \@ifundefined{fname@#1}{}{\caption at ifdefined\floatname\floatname\@gobbletwo{#1}{#2}}%
+ \@namedef{#1name}{#2}}%
\g at addto@macro\fs at plaintop{\def\@fs at mid{\vspace\abovecaptionskip\relax}}%
\g at addto@macro\fs at boxed{\def\@fs at mid{\kern\abovecaptionskip\relax}}%
\providecommand*\float at getstyle[2]{%
@@ -933,8 +914,26 @@
\newcommand*\caption at floatflt[1]{%
\caption at settype{#1}%
\caption at clearmargin
- \caption at setoptions{floating#1}}%
+ \caption at setoptions{floating#1}%
+ \caption at setanchor}%
}{}
+\caption at IfPackageLoaded{floatrow}[2008/08/02 v0.3b]{%
+ \renewcommand\captionlabel[1]{{\def\FR at tmp{\@captype}\ifnum\floatbox at depth>\@ne
+ \def\FR at tmp{sub\@captype}\setcaptionsubtype*\stepcounter{\FR at tmp}\fi
+ \caption@@@make{\caption at fnum\FR at tmp}{#1}}}
+ \renewenvironment{subfloatrow}{\capsubrowsettings
+ \caption at subfloatrow@hook % as replacement for \captionsetup{subtype}
+ \@nameuse{subfloatrow*}}{\@nameuse{endsubfloatrow*}}
+ \providecommand*\caption at subfloatrow@hook{}
+ \renewenvironment{subfloatrow*}[1][2]{\let\flrow at to\empty
+ \let\Xhsize\sXhsize%\let\Zhsize\sZhsize
+ \FR at ifunloc{\let\FR at ifcountH\@firstoftwo}\let\c at FRobj\c at FRsobj
+ \def\FRleftmargin{}\def\FRrightmargin{}\let\floatrowsep\subfloatrowsep
+ \floatrow[#1]\killfloatstyle
+ \let\caption at makecaption\flrow at makecaption}% <- This line added
+ {\ifdim\lastskip>\z@\unskip\fi
+ \@ifundefined{adjustsubfloats}\relax\adjustsubfloats\endfloatrow}
+}{}
\caption at IfPackageLoaded{fltpage}[1998/10/29 v.0.3]{%
\caption at setbool{needfreeze}{1}%
\renewcommand\FP at positionLabel{%
@@ -1142,7 +1141,7 @@
\@ifstar\@captionsetup\@captionsetup}% gobble *
\def\@captionsetup#1{\LT at captionsetup{#1}\egroup}%
\def\LT at captionsetup#1{%
- \captionsetup at startrue\caption at setup@options[@longtable]{#1}%
+ \caption at setup@options\@gobble[@longtable]{#1}%
\global\let\caption at opt@@longtable\caption at opt@@longtable}%
\def\captionlistentry{%
\noalign\bgroup
@@ -1180,7 +1179,7 @@
\caption at listentry\@firstoftwo[{#1}]{#2}%
\endgroup\ignorespaces}%
\newcommand*\caption at LT@settype[1]{%
- \caption at settype*{#1}%
+ \caption at settype{#1}%
\ifdim\LTcapwidth=4in \else
\caption at setwidth\LTcapwidth
\fi
@@ -1215,7 +1214,8 @@
\let\@makecaption\caption@@make
\caption at setautoposition b%
\caption at settype{#1}%
- \caption at clearmargin}%
+ \caption at clearmargin
+ \caption at setanchor}%
\newcommand\caption at wincaption[1]{%
\ifdim\picwd=\z@
\let\caption at makecurrent\@gobbletwo
@@ -1256,6 +1256,7 @@
\caption at clearmargin
\caption at setoptions{parpic}%
\caption at setautoposition b%
+ \caption at setanchor
\expandafter\expandafter\expandafter\caption at ORI
\expandafter\expandafter\expandafter[%
\expandafter\expandafter\expandafter{%
@@ -1290,6 +1291,33 @@
\caption@@make{#1}{#2}}%
\nobreak\hspace{12pt}}%
}{}
+\caption at ifdefined\scr at caption{%
+ \long\def\caption at IfKomaPackageLoaded#1[#2]#3#4{%
+ \caption at InfoNoLine{KOMA-Script #1 package detected}
+ #3}}{%
+ \let\caption at IfKomaPackageLoaded\caption at IfPackageLoaded
+ }
+\caption at IfKomaPackageLoaded{scrextend}[2002/07/01 v3.0]{%
+ \let\caption at addmargin@env\@addmargin
+ \renewcommand*\@addmargin{%
+ \@testopt\caption@@addmargin\@tempa}%
+ \def\caption@@addmargin[#1]#2{%
+ \caption at addmargin@env[{#1}]{#2}%
+ \caption at set@addmargin
+ \ignorespaces}%
+ \newdimen\caption at addmargin@hsize
+ \newdimen\caption at addmargin@linewidth
+ \providecommand*\caption at set@addmargin{%
+ \caption at addmargin@hsize\hsize
+ \caption at addmargin@linewidth\linewidth
+ \l at addto@macro\caption at beginex@hook\caption at test@addmargin}%
+ \providecommand\caption at test@addmargin{%
+ \ifdim\hsize=\caption at addmargin@hsize
+ \ifdim\linewidth=\caption at addmargin@linewidth
+ \hsize=\linewidth
+ \fi
+ \fi}%
+ }{}%
\caption at IfPackageLoaded{sidecap}[2003/06/06 v1.6f]{%
\caption at setbool{needfreeze}{1}%
\let\caption at ORI@SC at zfloat\SC at zfloat
@@ -1297,7 +1325,8 @@
\caption at ORI@SC at zfloat{#1}{#2}{#3}[#4]%
\SC at RestoreCommands
\caption at freezetype{#2}%
- \let\SC at label\label}%
+ \let\SC at label\label
+ \ignorespaces}%
\providecommand*\SC at RestoreCommands{%
\let\caption=\SC at orig@caption \let\label=\SC at orig@label}%
\let\caption at ORI@endSC at FLOAT\endSC at FLOAT
@@ -1346,7 +1375,7 @@
\caption at gettitle{#2}%
\caption at ORI@xtablecaption[{#1}]{#2}}%
\long\def\ST at caption#1[#2]#3{\par%
- \caption at settype*{#1}%
+ \caption at settype{#1}%
\caption at setoptions{supertabular}%
\caption at setposition{\if at topcaption t\else b\fi}%
\caption at beginex{#1}{#2}{#3}%
@@ -1365,7 +1394,7 @@
\caption at gettitle{#2}%
\caption at ORI@xtablecaption[{#1}]{#2}}%
\long\def\ST at caption#1[#2]#3{\par%
- \caption at settype*{#1}%
+ \caption at settype{#1}%
\caption at setoptions{xtabular}%
\caption at set{position}{\if at topcaption t\else b\fi}%
\@initisotab
@@ -1380,18 +1409,22 @@
\caption at IfPackageLoaded{threeparttable}[2003/06/13 v3.0]{%
\let\caption at ORI@threeparttable\threeparttable
\renewcommand*\threeparttable{%
- \caption at settype{\@ifundefined{@captype}{table}{\@captype}}%
-%%% \caption at setposition{auto}% ?
- \caption at clearmargin
- \caption at setoptions{threeparttable}%
+ \caption at setthreeparttabletype{threepart}{table}%
\caption at ORI@threeparttable}%
\let\caption at ORI@measuredfigure\measuredfigure
\renewcommand*\measuredfigure{%
- \caption at settype{\@ifundefined{@captype}{figure}{\@captype}}%
+ \caption at setthreeparttabletype{measured}{figure}%
+ \caption at ORI@measuredfigure}%
+ \newcommand*\caption at setthreeparttabletype[2]{%
+ \caption at ifsubtype
+ {\def\caption at threeparttabletype{#1sub#2}%
+ \let\caption at setanchor\relax}%
+ {\caption at settype{\@ifundefined{@captype}{#2}{\@captype}}%
+ \def\caption at threeparttabletype{#1#2}}%
%%% \caption at setposition{auto}% ?
\caption at clearmargin
- \caption at setoptions{measuredfigure}%
- \caption at ORI@measuredfigure}%
+ \caption at setoptions\caption at threeparttabletype
+ \caption at setanchor}%
\def\TPT at caption#1[#2]#3{%
\gdef\TPT at docapt{%
\global\let\TPT at docapt\@undefined
@@ -1430,7 +1463,8 @@
\caption at settype{#1}%
\caption at clearmargin
%%% \caption at setoptions{wrap}%
- \caption at setoptions{wrap#1}}%
+ \caption at setoptions{wrap#1}%
+ \caption at setanchor}%
}{}
\newcommand*\caption at checkcounter[1]{%
\caption at check{\the#1}{\@nameuse{the#1}}}
Modified: trunk/Master/texmf-dist/tex/latex/caption/caption3.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/caption/caption3.sty 2023-03-12 20:33:16 UTC (rev 66579)
+++ trunk/Master/texmf-dist/tex/latex/caption/caption3.sty 2023-03-12 20:33:41 UTC (rev 66580)
@@ -6,7 +6,7 @@
%%
%% caption3.dtx (with options: `package')
%%
-%% Copyright (C) 1994-2022 Axel Sommerfeldt (axel.sommerfeldt at f-m.fm)
+%% Copyright (C) 1994-2023 Axel Sommerfeldt (axel.sommerfeldt at 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 at ifnextchar}{\let\kernel at ifnextchar\@ifnextchar}{}
\providecommand*\@nameundef[1]{%
\expandafter\let\csname #1\endcsname\@undefined}
\providecommand\l at addto@macro[2]{%
@@ -155,7 +156,7 @@
{\def\caption at tempa{*}\caption@@withoptargs{#1}}%
{\def\caption at tempa{}\caption@@withoptargs{#1}}}
\def\caption@@withoptargs#1{%
- \@ifnextchar[%]
+ \kernel at ifnextchar[%]
{\caption@@@withoptargs{#1}}%
{\caption@@@@withoptargs{#1}}}
\def\caption@@@withoptargs#1[#2]{%
@@ -234,28 +235,27 @@
\KV at err{No value allowed for #1}%
\expandafter\@gobble
\fi}
-\newif\ifcaptionsetup at star
\newcommand*\captionsetup{%
\caption at teststar@\@captionsetup\@gobble\@firstofone}
\newcommand*\@captionsetup[1]{%
- \captionsetup at startrue#1\captionsetup at starfalse
- \@ifnextchar[%]
- \caption at setup@options\caption at setup}
+ \kernel at ifnextchar[%]
+ {\caption at setup@options#1}%
+ {\caption at setup}}
\newcommand*\caption at setup{%
\caption at setkeys{caption}}
-\def\caption at setup@options[#1]{%
- \@ifnextchar[%]
+\def\caption at setup@options#1[#2]{%
+ \kernel at ifnextchar[%]
{\caption at stepthecounter
- \@expandtwoargs\caption at setup@options@@{#1}{@\caption at thecounter}}%
- {\caption at setup@options@{#1}}}
-\def\caption at setup@options@@#1#2[#3]#4{%
- \caption at declare@option{#2}[]{\caption at setup@options@{#3}{#4}}%
- \caption at setup@options@{#1}{#2}}
-\newcommand*\caption at setup@options@[2]{%
+ \@expandtwoargs\caption at setup@options@@{#2}{@\caption at thecounter}#1}%
+ {\caption at setup@options@#1{#2}}}
+\def\caption at setup@options@@#1#2#3[#4]#5{%
+ \caption at declare@option{#2}[]{\caption at setup@options@\@gobble{#4}{#5}}%
+ \caption at setup@options@#3{#1}{#2}}
+\newcommand*\caption at setup@options@[3]{%
\@bsphack
- \ifcaptionsetup at star\captionsetup at starfalse\else\caption at addtooptlist{#1}\fi
- \caption at checkoptions{#2}%
- \expandafter\caption at l@addto at list\csname caption at opt@#1\endcsname{#2}%
+ #1{\caption at addtooptlist{#2}}%
+ \caption at checkoptions{#3}%
+ \expandafter\caption at l@addto at list\csname caption at opt@#2\endcsname{#3}%
\@esphack}
\newcommand*\caption at checkoptions[1]{%
\begingroup
@@ -363,7 +363,6 @@
\expandafter\let\expandafter\KV at err\csname ORI at KV@err\caption at keydepth\endcsname
\expandafter\let\expandafter\KV at errx\csname ORI at KV@errx\caption at keydepth\endcsname
\expandafter\let\expandafter\XKV at err\csname ORI at XKV@err\caption at keydepth\endcsname
- \ifx\caption at keydepth\@empty \captionsetup at starfalse \fi
\@esphack}
\let\caption at keydepth\@empty
\newcommand*\caption at ExecuteOptions[2]{%
@@ -480,7 +479,7 @@
{\caption@@set{#1}{#2 at fallback}{#3}}}
\@onlypreamble\caption@@setfallback
\newcommand*\caption at decl@package[2]{%
- \@ifnextchar[%]
+ \kernel at ifnextchar[%]
{\caption at declare@package{#1}{#2}}%
{\caption at declarepackage{#1}{#2}}}
\@onlypreamble\caption at decl@package
@@ -577,7 +576,8 @@
\newcommand*\caption at stepthecounter{%
\@tempcnta\caption at thecounter
\advance\@tempcnta\@ne\relax
- \xdef\caption at thecounter{\the\@tempcnta}}
+ \xdef\caption at thecounter{\the\@tempcnta}%
+ \global\let\caption at ifoddpage\caption at ifoddpage@}
\newcommand*\caption at newlabel{\@newl at bel{caption at r}}
\newcommand*\caption at thepage{\the\c at page}
\newcommand*\caption at label[1]{%
@@ -591,20 +591,20 @@
\newcommand*\caption at pageref[1]{%
\expandafter\ifx\csname caption at r@#1\endcsname\relax
\G at refundefinedtrue % => 'There are undefined references.'
- \@latex at warning{Reference `#1' on page \thepage \space undefined}%
+ \@latex at warning{Reference `caption@#1' on page \thepage \space undefined}%
\else
\expandafter\let\expandafter\caption at thepage\csname caption at r@#1\endcsname
\fi}
-\newcommand*\caption at ifoddpage{%
+\newcommand*\caption at ifoddpage@{%
\caption at iftwoside{%
\caption at label\caption at thecounter
\caption at pageref\caption at thecounter
\ifodd\caption at thepage
- \let\caption at ifoddpage\@firstoftwo
+ \global\let\caption at ifoddpage\@firstoftwo
\else
- \let\caption at ifoddpage\@secondoftwo
+ \global\let\caption at ifoddpage\@secondoftwo
\fi
- }{\let\caption at ifoddpage\@firstoftwo}%
+ }{\global\let\caption at ifoddpage\@firstoftwo}%
\caption at ifoddpage}
\newcommand*\caption at setoptcmd[2]{%
\caption at ifinlist{#2}{0,false,no,off}{\let#1\@undefined}{\def#1{#2}}}
@@ -1607,36 +1607,36 @@
\let\glsunset\@gobble
}
\newcommand*\caption at footnote{%
- \@ifnextchar[%]
+ \kernel at ifnextchar[%]
\@xfootnote
{\caption at l@stepcounter\@mpfn
\protected at xdef\@thefnmark{\thempfn}%
\@footnotemark\@footnotetext}}
\newcommand*\caption at footnotemark{%
- \@ifnextchar[%]
+ \kernel at ifnextchar[%]
\@xfootnotemark
{\caption at l@stepcounter{footnote}%
\protected at xdef\@thefnmark{\thefootnote}%
\@footnotemark}}
\newcommand*\caption at footnotetext{%
- \@ifnextchar[%]
+ \kernel at ifnextchar[%]
\@xfootnotenext
{\protected at xdef\@thefnmark{\thempfn}%
\@footnotetext}}
\newcommand*\caption at endnote{%
- \@ifnextchar[%]
+ \kernel at ifnextchar[%]
\@xendnote
{\caption at l@stepcounter{endnote}%
\protected at xdef\@theenmark{\theendnote}%
\@endnotemark\@endnotetext}}
\newcommand*\caption at endnotemark{%
- \@ifnextchar[%]
+ \kernel at ifnextchar[%]
\@xendnotemark
{\caption at l@stepcounter{endnote}%
\protected at xdef\@theenmark{\theendnote}%
\@endnotemark}}
\newcommand*\caption at endnotetext{%
- \@ifnextchar[%]
+ \kernel at ifnextchar[%]
\@xendnotenext
{\protected at xdef\@theenmark{\theendnote}%
\@endnotetext}}
@@ -1761,7 +1761,7 @@
\caption at teststar\caption at declaresubtype\@firstoftwo\@secondoftwo}
\@onlypreamble\DeclareCaptionSubType
\newcommand*\caption at declaresubtype[1]{%
- \@testopt{\caption@@declaresubtype{#1}}{alph}}
+ \@testopt{\caption@@declaresubtype#1}{alph}}
\@onlypreamble\caption at declaresubtype
\def\caption@@declaresubtype#1[#2]#3{%
\@ifundefined{c@#3}%
@@ -1770,23 +1770,26 @@
\@onlypreamble\caption@@declaresubtype
\newcommand*\caption@@@declaresubtype[4]{%
\caption at ifdefined@subtype{#4}%
- {\caption at Debug{Modify subtype `#4'}}%
- {\caption at Debug{New subtype `#4'}%
- \newcounter{#4}[{#3}]%
- \@namedef{ext@#4}{\csname ext@#3\endcsname}%
- \caption at declaresublistentry{#3}%
- \caption at l@addto at list\caption at subtypelist{#4}%
- \caption at subtype@hook{#4}}%
- \caption at 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 at Info{Modify subtype `#4'}}%
+ {\caption at 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 at declaresublistentry{#3}%
+ \caption at ifdefined\contentsuse{%
+ \contentsuse{#4}{\csname ext@#4\endcsname}}{}%
+ \caption at l@addto at list\caption at subtypelist{#4}%
+ \caption at subtype@hook{#4}}%
+ {\caption at subtypesource\caption at subtype@source{#4}%
+ \caption at Error{The counter `#4' was already defined by\MessageBreak\caption at 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 at declaresublistentry{%
\caption at ifdefined\l at chapter
@@ -1833,6 +1836,12 @@
\newcommand*\caption at subtypelist{}
\newcommand*\caption at ifdefined@subtype{%
\caption at ifin@list\caption at subtypelist}
+\newcommand*\caption at subtypesource[2]{%
+ \caption at ifdefined@subtype{#2}%
+ {\def#1{\noexpand\DeclareCaptionSubType (offered by the caption package)}}%
+ {\caption at ifin@list\sf at counterlist{#2}%
+ {\def#1{\noexpand\newsubfloat (offered by the subfig package)}}%
+ {\def#1{an unknown document class or package}}}}
\newcommand*\ForEachCaptionSubType{%
\@ifstar
{\caption at foreach@subtype\@gobble}%
Modified: trunk/Master/texmf-dist/tex/latex/caption/caption3_2019-09-01.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/caption/caption3_2019-09-01.sty 2023-03-12 20:33:16 UTC (rev 66579)
+++ trunk/Master/texmf-dist/tex/latex/caption/caption3_2019-09-01.sty 2023-03-12 20:33:41 UTC (rev 66580)
@@ -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 at FixArabTeX{%
\def\caption at tempa##1{}%
\ifx\caption at tempa\@gobble
@@ -259,16 +259,16 @@
\newcommand*\@captionsetup[1]{%
\captionsetup at startrue#1\captionsetup at starfalse
\@ifnextchar[\caption at setup@options\caption at setup}
-\newcommand*\caption at setup{\caption at setkeys{caption}}
+\newcommand*\caption at setup{%
+ \caption at setkeys{caption}}
\def\caption at setup@options[#1]{%
- \@ifnextchar[%
+ \@ifnextchar[%]
{\caption at stepthecounter
- \caption at withoptargs{\@expandtwoargs
- \caption at setup@options at i{#1}{@\caption at thecounter}}}%
+ \@expandtwoargs\caption at setup@options@@{#1}{@\caption at thecounter}}%
{\caption at setup@options@{#1}}}
-\newcommand*\caption at setup@options at i[4]{%
- \caption at setup@options@{#1}{#2}%
- \caption at declare@option{#2}[]{\captionsetup#3{#4}}}
+\def\caption at setup@options@@#1#2[#3]#4{%
+ \caption at declare@option{#2}[]{\caption at setup@options@{#3}{#4}}%
+ \caption at setup@options@{#1}{#2}}
\newcommand*\caption at setup@options@[2]{%
\@bsphack
\ifcaptionsetup at star\captionsetup at starfalse\else\caption at addtooptlist{#1}\fi
Modified: trunk/Master/texmf-dist/tex/latex/caption/caption3_2020-07-29.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/caption/caption3_2020-07-29.sty 2023-03-12 20:33:16 UTC (rev 66579)
+++ trunk/Master/texmf-dist/tex/latex/caption/caption3_2020-07-29.sty 2023-03-12 20:33:41 UTC (rev 66580)
@@ -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 at FixArabTeX{%
\def\caption at tempa##1{}%
\ifx\caption at tempa\@gobble
@@ -247,15 +247,15 @@
\captionsetup at startrue#1\captionsetup at starfalse
\@ifnextchar[%]
\caption at setup@options\caption at setup}
-\newcommand*\caption at setup{\caption at setkeys{caption}}
+\newcommand*\caption at setup{%
+ \caption at setkeys{caption}}
\def\caption at setup@options[#1]{%
\@ifnextchar[%]
{\caption at stepthecounter
- \caption at withoptargs{\@expandtwoargs
- \caption at setup@options at i{#1}{@\caption at thecounter}}}%
+ \@expandtwoargs\caption at setup@options@@{#1}{@\caption at thecounter}}%
{\caption at setup@options@{#1}}}
-\newcommand*\caption at setup@options at i[4]{%
- \caption at declare@option{#2}[]{\captionsetup#3{#4}}%
+\def\caption at setup@options@@#1#2[#3]#4{%
+ \caption at declare@option{#2}[]{\caption at setup@options@{#3}{#4}}%
\caption at setup@options@{#1}{#2}}
\newcommand*\caption at setup@options@[2]{%
\@bsphack
@@ -1642,17 +1642,17 @@
\@namedef{ext@#4}{\csname ext@#3\endcsname}%
\caption at declaresublistentry{#3}%
\caption at l@addto at list\caption at subtypelist{#4}%
- \caption at subtype@hook{#4}}%
- \caption at 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 at subtype@hook{#4}%
+ \caption at 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 at declaresublistentry{%
\caption at ifdefined\l at chapter
Modified: trunk/Master/texmf-dist/tex/latex/caption/caption3_2020-10-26.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/caption/caption3_2020-10-26.sty 2023-03-12 20:33:16 UTC (rev 66579)
+++ trunk/Master/texmf-dist/tex/latex/caption/caption3_2020-10-26.sty 2023-03-12 20:33:41 UTC (rev 66580)
@@ -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 at addto@macro[2]{%
@@ -232,15 +232,15 @@
\captionsetup at startrue#1\captionsetup at starfalse
\@ifnextchar[%]
\caption at setup@options\caption at setup}
-\newcommand*\caption at setup{\caption at setkeys{caption}}
+\newcommand*\caption at setup{%
+ \caption at setkeys{caption}}
\def\caption at setup@options[#1]{%
\@ifnextchar[%]
{\caption at stepthecounter
- \caption at withoptargs{\@expandtwoargs
- \caption at setup@options at i{#1}{@\caption at thecounter}}}%
+ \@expandtwoargs\caption at setup@options@@{#1}{@\caption at thecounter}}%
{\caption at setup@options@{#1}}}
-\newcommand*\caption at setup@options at i[4]{%
- \caption at declare@option{#2}[]{\captionsetup#3{#4}}%
+\def\caption at setup@options@@#1#2[#3]#4{%
+ \caption at declare@option{#2}[]{\caption at setup@options@{#3}{#4}}%
\caption at setup@options@{#1}{#2}}
\newcommand*\caption at setup@options@[2]{%
\@bsphack
@@ -1677,17 +1677,17 @@
\@namedef{ext@#4}{\csname ext@#3\endcsname}%
\caption at declaresublistentry{#3}%
\caption at l@addto at list\caption at subtypelist{#4}%
- \caption at subtype@hook{#4}}%
- \caption at 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 at subtype@hook{#4}%
+ \caption at 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 at declaresublistentry{%
\caption at ifdefined\l at chapter
Modified: trunk/Master/texmf-dist/tex/latex/caption/caption_2007-04-16.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/caption/caption_2007-04-16.sty 2023-03-12 20:33:16 UTC (rev 66579)
+++ trunk/Master/texmf-dist/tex/latex/caption/caption_2007-04-16.sty 2023-03-12 20:33:41 UTC (rev 66580)
@@ -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 at Error{You can't use both the caption *and* caption2 package}%
@@ -411,7 +411,7 @@
\def\captionsetup##1{\g at addto@macro\SC at CAPsetup{,##1}}%
\let\caption at SC\caption
\def\caption{\caption at caption\caption at SC}%
- }%
+ \ignorespaces}%
\let\caption at endSC@FLOAT\endSC at FLOAT
\def\endSC at FLOAT{%
\let\@captype\SC at captype
Modified: trunk/Master/texmf-dist/tex/latex/caption/caption_2010-01-09.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/caption/caption_2010-01-09.sty 2023-03-12 20:33:16 UTC (rev 66579)
+++ trunk/Master/texmf-dist/tex/latex/caption/caption_2010-01-09.sty 2023-03-12 20:33:41 UTC (rev 66580)
@@ -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 at Info[1]{\PackageInfo{caption}{#1\@gobble}}
\@onlypreamble\caption at Info
\RequirePackage{caption3}[=2008/08/24] % needs v1.1j or newer
@@ -1452,7 +1452,8 @@
\caption at ORI@SC at zfloat{#1}{#2}{#3}[#4]%
\let\caption\caption at ORI
\caption at settype*{#2}%
- \caption at freeze*}%
+ \caption at freeze*%
+ \ignorespaces}%
\let\caption at ORI@endSC at FLOAT\endSC at FLOAT
\def\endSC at FLOAT{%
\let\caption at ORI@settype\caption at settype
Modified: trunk/Master/texmf-dist/tex/latex/caption/caption_2011-11-10.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/caption/caption_2011-11-10.sty 2023-03-12 20:33:16 UTC (rev 66579)
+++ trunk/Master/texmf-dist/tex/latex/caption/caption_2011-11-10.sty 2023-03-12 20:33:41 UTC (rev 66580)
@@ -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 at ifbool{documentclass}{}{%
\caption at WarningNoLine{%
@@ -1573,7 +1573,8 @@
\SC at RestoreCommands
\caption at settype*{#2}%
\caption at freeze
- \let\SC at label\label}%
+ \let\SC at label\label
+ \ignorespaces}%
\providecommand*\SC at RestoreCommands{%
\let\caption=\SC at orig@caption \let\label=\SC at orig@label}%
\let\caption at ORI@endSC at FLOAT\endSC at FLOAT
Modified: trunk/Master/texmf-dist/tex/latex/caption/caption_2019-09-01.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/caption/caption_2019-09-01.sty 2023-03-12 20:33:16 UTC (rev 66579)
+++ trunk/Master/texmf-dist/tex/latex/caption/caption_2019-09-01.sty 2023-03-12 20:33:41 UTC (rev 66580)
@@ -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 at ifbool{documentclass}{}{%
\caption at WarningNoLine{%
@@ -1722,7 +1722,8 @@
\caption at ORI@SC at zfloat{#1}{#2}{#3}[#4]%
\SC at RestoreCommands
\caption at freezetype{#2}%
- \let\SC at label\label}%
+ \let\SC at label\label
+ \ignorespaces}%
\providecommand*\SC at RestoreCommands{%
\let\caption=\SC at orig@caption \let\label=\SC at orig@label}%
\let\caption at ORI@endSC at FLOAT\endSC at FLOAT
Modified: trunk/Master/texmf-dist/tex/latex/caption/caption_2020-07-29.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/caption/caption_2020-07-29.sty 2023-03-12 20:33:16 UTC (rev 66579)
+++ trunk/Master/texmf-dist/tex/latex/caption/caption_2020-07-29.sty 2023-03-12 20:33:41 UTC (rev 66580)
@@ -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 at ifbool{documentclass}{}{%
\caption at WarningNoLine{%
@@ -1362,7 +1362,8 @@
\caption at ORI@SC at zfloat{#1}{#2}{#3}[#4]%
\SC at RestoreCommands
\caption at freezetype{#2}%
- \let\SC at label\label}%
+ \let\SC at label\label
+ \ignorespaces}%
\providecommand*\SC at RestoreCommands{%
\let\caption=\SC at orig@caption \let\label=\SC at orig@label}%
\let\caption at ORI@endSC at FLOAT\endSC at FLOAT
Modified: trunk/Master/texmf-dist/tex/latex/caption/caption_2020-10-26.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/caption/caption_2020-10-26.sty 2023-03-12 20:33:16 UTC (rev 66579)
+++ trunk/Master/texmf-dist/tex/latex/caption/caption_2020-10-26.sty 2023-03-12 20:33:41 UTC (rev 66580)
@@ -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 at ifbool{documentclass}{}{%
\caption at WarningNoLine{%
@@ -1244,7 +1244,8 @@
\caption at ORI@SC at zfloat{#1}{#2}{#3}[#4]%
\SC at RestoreCommands
\caption at freezetype{#2}%
- \let\SC at label\label}%
+ \let\SC at label\label
+ \ignorespaces}%
\providecommand*\SC at RestoreCommands{%
\let\caption=\SC at orig@caption \let\label=\SC at orig@label}%
\let\caption at ORI@endSC at FLOAT\endSC at FLOAT
Modified: trunk/Master/texmf-dist/tex/latex/caption/subcaption.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/caption/subcaption.sty 2023-03-12 20:33:16 UTC (rev 66579)
+++ trunk/Master/texmf-dist/tex/latex/caption/subcaption.sty 2023-03-12 20:33:41 UTC (rev 66580)
@@ -6,7 +6,7 @@
%%
%% subcaption.dtx (with options: `package')
%%
-%% Copyright (C) 1994-2022 Axel Sommerfeldt (axel.sommerfeldt at f-m.fm)
+%% Copyright (C) 1994-2023 Axel Sommerfeldt (axel.sommerfeldt at 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 at Info{%
+ \PackageInfo{subcaption}}
\newcommand*\subcaption at Warning{%
\PackageWarning{subcaption}}
\newcommand*\subcaption at Error[1]{%
@@ -51,22 +53,8 @@
section about errors.\MessageBreak\@ehc}
\newcommand*\subcaption at OutsideFloat[1]{%
\subcaption at Error{\string#1 outside float}}
-\newcommand*\subcaption at CheckCompatibility{%
- \@ifpackageloaded{subfigure}{%
- \subcaption at Error
- {This package can't be used in cooperation\MessageBreak
- with the subfigure package}%
- \endinput}{}%
- \@ifpackageloaded{subfig}{%
- \subcaption at Error
- {This package can't be used in cooperation\MessageBreak
- with the subfig package}%
- \endinput}{}%
-}
-\subcaption at CheckCompatibility
-\caption at AtBeginDocument{%
- \subcaption at CheckCompatibility
- \let\subcaption at CheckCompatibility\@undefined}
+\newcommand*\subcaptionsetup[1][]{%
+ \@ifstar{\captionsetup*[{sub#1}]}{\captionsetup[{sub#1}]}}
\providecommand\setcaptionsubtype{%
\caption at iftype
{\@ifstar{\captionsetup{subtype*}}{\captionsetup{subtype}}}%
@@ -82,7 +70,9 @@
{\subcaption at OutsideFloat{subcaptiongroup*}}}
{}
\newcommand*\subcaption at minipage{%
- \@testopt\subcaption at iminipage b}
+ \kernel at ifnextchar[%]
+ \subcaption at iminipage
+ {\caption at ifcaption{\subcaption at iminipage[t]}{\subcaption at iminipage[b]}}}
\def\subcaption at iminipage[#1]{%
\def\subcaption at tempa{\subcaption at iiminipage{#1}}%
\caption at withoptargs\subcaption at tempa}
@@ -103,6 +93,8 @@
\subcaption at endminipage@hook
\endminipage}
\providecommand*\@subfloatboxreset{}
+\providecommand*\caption at ifcaption{\caption at ifflag2} % caption >= v3.3 < v3.6
+\providecommand*\caption at ifflag[1]{\@secondoftwo} % caption < v3.3
\newenvironment{subcaptionblock}{\subcaption at minipage}{\subcaption at endminipage}
\newcommand*\subcaption at newminipage[1]{%
\newenvironment{#1}{\subcaption at minipage@{#1}}{\subcaption at endminipage}}
@@ -222,8 +214,8 @@
\DeclareCaptionLabelFormat{subparens}{(#2)}
\let\caption at setkeys@ORI\caption at setkeys
\@ifundefined{caption at SetupOptions} % caption3 v1.3
- {\renewcommand\caption at setkeys[2]{\captionsetup[sub]{#2}}}
- {\caption at SetupOptions{subcaption}{\captionsetup[sub]{#2}}}
+ {\renewcommand\caption at setkeys[2]{\subcaptionsetup{#2}}}
+ {\caption at SetupOptions{subcaption}{\subcaptionsetup{#2}}}
\@ifundefined{caption at smaller} % caption3 v1.7-169
{\caption at ExecuteOptions{subcaption}{%
font+=small,labelformat=parens,labelsep=space,skip=6pt,list=0,hypcap=0}}
@@ -232,13 +224,19 @@
\caption at ProcessOptions*{subcaption}
\let\caption at setkeys\caption at setkeys@ORI
\let\caption at setkeys@ORI\@undefined
+\newcommand*\subcaption at DeclareType[1]{%
+ \@ifundefined{c at sub#1}%
+ {\DeclareCaptionSubType{#1}}%
+ {\caption at subtypesource\caption at subtype@source{sub#1}%
+ \subcaption at Info{The counter `sub#1' was already defined by\MessageBreak\caption at subtype@source}}}
+\providecommand*\caption at subtypesource[2]{\def#1{a different package}} % caption3 v2.4
\@ifundefined{ForEachCaptionType} % caption3 v1.13
{\@ifundefined{caption at ForEachType} % caption3 v1.4a
- {\@ifundefined{c at figure}{}{\DeclareCaptionSubType{figure}}%
- \@ifundefined{c at table}{}{\DeclareCaptionSubType{table}}%
- \caption at For{typelist}{\DeclareCaptionSubType{#1}}}
- {\caption at ForEachType{\DeclareCaptionSubType{#1}}}}
- {\ForEachCaptionType{\DeclareCaptionSubType{#1}}}
+ {\@ifundefined{c at figure}{}{\subcaption at DeclareType{figure}}%
+ \@ifundefined{c at table}{}{\subcaption at DeclareType{table}}%
+ \caption at For{typelist}{\subcaption at DeclareType{#1}}}
+ {\caption at ForEachType{\subcaption at DeclareType{#1}}}}
+ {\ForEachCaptionType{\subcaption at DeclareType{#1}}}
\newcommand*\subcaption at newabbreviation[3]{%
\newcommand*{#1}{%
\caption at iftype
@@ -255,19 +253,40 @@
\subcaption at newabbreviation\phantomsubcaption\phantomcaption\relax
\subcaption at newabbreviation\subcaptionlistentry\captionlistentry\caption at gobble
\subcaption at newabbreviation\subcaptiontext\captiontext\caption at gobble
-\@ifclassloaded{memoir}{\let\subfloat\undefined\let\endsubfloat\undefined}{}
+\providecommand*\caption at subfloatrow@hook{} % caption < v3.7
+\g at addto@macro\caption at subfloatrow@hook{%
+ \let\caption\subcaption
+ \let\phantomcaption\phantomsubcaption
+ \let\captionlistentry\subcaptionlistentry
+ \let\captiontext\subcaptiontext}
\caption at AtBeginDocument{%
- \providecommand*\subfloat{%
- \kernel at ifnextchar[%]
- \subcaption at subfloat
- \subcaption at subfloat@}}
-\long\def\subcaption at subfloat[#1]{%
+ \begingroup
+ \newenvironment{subcaption at memoir@subfloat}{}{}%
+ \ifx\subfloat\subcaption at memoir@subfloat
+ \endgroup
+ % "subfloat" = empty environment, defined by memoir
+ \renewcommand*\subfloat{%
+ \def\subcaption at currenvir{subfloat}%
+ \ifx\@currenvir\subcaption at currenvir
+ % emulate (empty) subfloat environment
+ \else
+ \expandafter\subcaption at subfloat
+ \fi}%
+ \else
+ \endgroup
+ \providecommand*\subfloat{\subcaption at subfloat}%
+ \fi}
+\newcommand*\subcaption at subfloat{%
\kernel at 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
+ \subcaption at subfloat@}
+\long\def\subcaption@@subfloat[#1]{%
+ \kernel at 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 at getlabel{#3}%
#1{#2\caption at thelabel}{\let\label\caption at gobble#3}%
\subcaption at clrlabel
More information about the tex-live-commits
mailing list.