texlive[56771] Master/texmf-dist: caption (26oct20)

commits+karl at tug.org commits+karl at tug.org
Mon Oct 26 21:58:40 CET 2020


Revision: 56771
          http://tug.org/svn/texlive?view=revision&revision=56771
Author:   karl
Date:     2020-10-26 21:58:40 +0100 (Mon, 26 Oct 2020)
Log Message:
-----------
caption (26oct20)

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/caption-eng.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-eng.tex
    trunk/Master/texmf-dist/source/latex/caption/caption-koma.dtx
    trunk/Master/texmf-dist/source/latex/caption/caption-light.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/caption2.dtx
    trunk/Master/texmf-dist/source/latex/caption/caption3.dtx
    trunk/Master/texmf-dist/source/latex/caption/ltcaption.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-memoir.sto
    trunk/Master/texmf-dist/tex/latex/caption/caption.sty
    trunk/Master/texmf-dist/tex/latex/caption/caption2.sty
    trunk/Master/texmf-dist/tex/latex/caption/caption3.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	2020-10-26 20:58:23 UTC (rev 56770)
+++ trunk/Master/texmf-dist/doc/latex/caption/CHANGELOG	2020-10-26 20:58:40 UTC (rev 56771)
@@ -146,7 +146,10 @@
 v1.2 (2016/03/27)
 - \DeclareLangDependantCaptionOption added
 
+v1.3 (2020/10/25)
+- Option "bi-separator" and command \DeclareBiCaptionSeparator added
 
+
 ltcaption package
 -----------------
 

Modified: trunk/Master/texmf-dist/doc/latex/caption/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/caption/README	2020-10-26 20:58:23 UTC (rev 56770)
+++ trunk/Master/texmf-dist/doc/latex/caption/README	2020-10-26 20:58:40 UTC (rev 56771)
@@ -1,7 +1,7 @@
 ==========================================================================
 
 The `caption' package bundle
-Release 2020-09-17
+Release 2020-10-26
 Copyright (C) 1994-2020 Axel Sommerfeldt (axel.sommerfeldt at f-m.fm)
 
 License: LPPL = LaTeX Project Public Licence
@@ -45,7 +45,7 @@
 
 --------------------------------------------------------------------------
 
-The `bicaption' package v1.2 is a tiny package supporting the typesetting
+The `bicaption' package v1.3 is a tiny package supporting the typesetting
 of bilingual captions.
 
 User Manual: bicaption.pdf (English)

Modified: trunk/Master/texmf-dist/doc/latex/caption/bicaption.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/caption/caption-eng.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/caption/bicaption.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/caption/bicaption.dtx	2020-10-26 20:58:23 UTC (rev 56770)
+++ trunk/Master/texmf-dist/source/latex/caption/bicaption.dtx	2020-10-26 20:58:40 UTC (rev 56771)
@@ -2,7 +2,7 @@
 % 
 % This is file `bicaption.dtx'.
 % 
-% Copyright (C) 2010-2018 Axel Sommerfeldt (axel.sommerfeldt at f-m.fm)
+% Copyright (C) 2010-2020 Axel Sommerfeldt (axel.sommerfeldt at f-m.fm)
 % 
 % --------------------------------------------------------------------------
 % 
@@ -32,12 +32,12 @@
 %   caption-deu.tex, caption-eng.tex, caption-rus.tex.
 % 
 % \fi
-% \CheckSum{431}
+% \CheckSum{457}
 %
 % \iffalse
 %<*driver>
 \NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesFile{bicaption.drv}[2016/03/27 v1.2 Adds a bilingual caption feature to the caption package]
+\ProvidesFile{bicaption.drv}[2020/10/25 v1.3 Adds a bilingual caption feature to the caption package]
 \hbadness=9999 \newcount\hbadness \hfuzz=74pt % Make TeX shut up.
 %\errorcontextlines=3
 %
@@ -45,17 +45,11 @@
 \setlength\parindent{0pt}
 \setlength\parskip{\smallskipamount}
 %
-\newcommand\LineBreak{\linebreak[3]}
-\newcommand\PageBreak{\pagebreak[3]}
 \usepackage{ifpdf}
 \ifpdf
   \usepackage{mathptmx,courier}
   \usepackage[scaled=0.90]{helvet}
   \addtolength\marginparwidth{15pt}
-  \ifdim\paperheight=297mm % a4paper
-    \renewcommand\LineBreak{\\}
-    \renewcommand\PageBreak{\clearpage}
-  \fi
 \fi
 %
 \usepackage[T1]{fontenc}
@@ -79,7 +73,7 @@
 %
 \newcommand*\csmarg[1]{\texttt{\char`\{#1\char`\}}}
 \newcommand*\csoarg[1]{\texttt{\char`\[#1\char`\]}}
-\newcommand*\version[2][]{$v#2$}
+\newcommand*\version[2][]{v$#2$}
 %
 \usepackage{marvosym}
 \makeatletter
@@ -167,16 +161,17 @@
 % \label{sec:options}
 %
 % \DescribeMacro{\captionsetup}
+% The command
 % \begin{quote}
 %   |\captionsetup[bi]|\marg{options}
 % \end{quote}
-% do setup options which will be used for bilanguage captions \emph{additionally}
+% does setup options which will be used for bilanguage captions \emph{additionally}
 % to the ones which are setup for the specific floating environment.
 %
 % \begin{quote}
 %   |\captionsetup[bi-first]|\marg{options}
 % \end{quote}
-% do setup options which will be used for the \emph{first} heading
+% 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|}|.
@@ -184,7 +179,7 @@
 % \begin{quote}
 %   |\captionsetup[bi-second]|\marg{options}
 % \end{quote}
-% do setup options which will be used for the \emph{second} heading
+% 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|}|.
@@ -191,9 +186,9 @@
 %
 % \bigskip
 %
-% Options specified with |\use|\-|package[|\ldots|]{bi|\-|caption}| and
-% |\caption|\-|setup[bi|\ldots|]{|\ldots|}| will override the ones specified by
-% |\caption|\-|setup{|\ldots|}| and |\caption|\-|setup[fig|\-|ure]{|\ldots|}|
+% Options specified with |\use|\-|package[|\ldots|]{bi|\-|cap|\-|tion}| and
+% |\cap|\-|tion|\-|setup[bi|\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:
 % \begin{enumerate}
@@ -242,7 +237,6 @@
 %
 % \begin{Options}{language=}
 %   \item[lang=]
-%   \DescribeMacro{language=}
 %   Sets the language of the caption, e.g.
 %   \begin{quote}|\use|\-|package|\-|[lang=eng|\-|lish]{bi|\-|caption}|\end{quote}
 %   will typeset the second caption of bilingual captions in English.
@@ -250,7 +244,6 @@
 %    see \autoref{sec:babel} for details.)
 %
 %   \item[bi-lang=]
-%   \DescribeMacro{bi-lang=}
 %   Causes a selection of the headings of bilingual captions.
 %   \begin{quote}|\captionsetup{bi-lang=both}|\end{quote}
 %   will cause that both caption headings are being typeset.\\
@@ -261,8 +254,8 @@
 %   will cause that only the \emph{second} heading is being typeset.
 %
 %   \item[bi-slc=]
-%   \DescribeMacro{bi-singlelinecheck=}
-%   Switches the common single-line-check |on| or |off|, i.e.~when switched on
+%   \begin{quote}|\captionsetup{bi-slc=|\meta{bool}|}|\end{quote}
+%   switches the common single-line-check |on| or |off|, i.e.~when switched on
 %   only a single check will be done for both captions, and the result will affect
 %   both captions afterwards. So if only one caption is longer than a single line,
 %   both captions will be treated as if they are longer than a single line, even if
@@ -269,10 +262,34 @@
 %   the second one isn't. (The default is |on|.)
 %
 %   \item[bi-swap=]
-%   \DescribeMacro{bi-swap=}
 %   \begin{quote}|\captionsetup{bi-swap}|\end{quote}
 %   will swap the primary and secondary language,
 %   making the first language the second one and vice versa. (The default is |false|.)
+%
+%   \NEWfeature{v1.3}
+%   \item[bi-separator=]
+%   \begin{quote}|\captionsetup{bi-separator=|\meta{name}|}|\end{quote}
+%   will select a separator between first and second bilingual caption.
+%   You could choose one of the following: `none' (which is the default one
+%   and could also be addressed as `default'), `smallskip', `medskip',
+%   `largeskip', or a self-defined one using
+%   \DescribeMacro{\DeclareBiCaptionSeparator}
+%   \begin{quote}|\DeclareBiCaptionSeparator|\marg{name}\marg{code}\end{quote}
+%   Examples:
+%   \begin{quote}
+%     |\captionsetup{bi-separator=smallskip}|
+%   \end{quote}
+%   will put a |\smallskip| between the two bilingual captions.
+%   \begin{quote}
+%     |\DeclareBiCaptionSeparator{hrule}{\hrule}|\\
+%     |\captionsetup{bi-separator=hrule}|
+%   \end{quote}
+%   will draw a horizontal line between the two bilingual captions.
+%   \begin{quote}
+%     |\DeclareBiCaptionSeparator{3pt}{\vspace{3pt}}|\\
+%     |\captionsetup{bi-separator=3pt}|
+%   \end{quote}
+%   will put |3pt| vertical space between the two bilingual captions.
 % \end{Options}
 %
 % \section{The \cs{bicaption} commands}
@@ -337,7 +354,7 @@
 % \cs{subcaptionbox}.)
 % \endgroup
 %
-% \PageBreak
+% \pagebreak[3]
 % \section{A sample document}
 % \label{sec:example}
 %
@@ -444,7 +461,7 @@
 %   |\end{document}|
 % \end{quote}
 %
-% \PageBreak
+% \pagebreak[3]
 % \captionsetup[bi-first]{lang=german}
 % \captionsetup[bi-second]{lang=english,font=it}
 % \captionsetup[sub]{format=hang,list=on}
@@ -535,7 +552,7 @@
 %     {Short English heading}
 % \end{figure}
 %
-% \PageBreak
+% \pagebreak[3]
 % \section{Customising lists}
 % \label{sec:lists}
 %
@@ -831,7 +848,7 @@
 %
 %    \begin{macrocode}
 \NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{bicaption}[2020/08/23 v1.2a Bilingual Captions (AR)]
+\ProvidesPackage{bicaption}[2020/10/25 v1.3 Bilingual Captions (AR)]
 %    \end{macrocode}
 %    \begin{macrocode}
 \RequirePackage{caption}[2020/08/23] % needs v3.5 or newer
@@ -953,6 +970,37 @@
   \caption at set@bool\bicaption at ifswap{#1}}
 %    \end{macrocode}
 %
+% The option |bi-separator| will setup the separator between
+% the two bi-lingual captions.
+%    \begin{macrocode}
+\DeclareCaptionOption{bi-separator}[1]{%
+  \caption at set{biseparator}{#1}}
+%    \end{macrocode}
+%
+% \begin{macro}{\DeclareBiCaptionSeparator}
+% \changes{v1.3}{2020/10/25}{This macro added}
+%   |\DeclareBiCaptionSeparator|\marg{name}\marg{code}
+%    \begin{macrocode}
+\newcommand\DeclareBiCaptionSeparator[2]{%
+  \caption at decl{biseparator}{#1}{#2}}
+\@onlypreamble\DeclareBiCaptionSeparator
+%    \end{macrocode}
+% \end{macro}
+%
+% There are four pre-defined separators, called `none',
+% `smallskip', `medskip', and `bigskip'.
+%    \begin{macrocode}
+\DeclareBiCaptionSeparator{none}{}
+\DeclareBiCaptionSeparator{smallskip}{\smallskip}
+\DeclareBiCaptionSeparator{medskip}{\medskip}
+\DeclareBiCaptionSeparator{bigskip}{\bigskip}
+%    \end{macrocode}
+%
+% The default separator usually maps to `none'.
+%    \begin{macrocode}
+\SetCaptionDefault{biseparator}{none}
+%    \end{macrocode}
+%
 % The option |lang=|\meta{language} will setup the language of the caption.
 % We can't set the language immediately because otherwise we will get in trouble, e.g. when
 % using the \package{microtype} package via |\usepackage[babel]{microtype}|.
@@ -1052,9 +1100,10 @@
 % \pagebreak[3]
 % \subsection{Execution of options}
 %
-% Setup default values for |bi-lang| and |bi-singlelinecheck|.
+% Setup default values for |bi-lang|, |bi-single|\-|line|\-|check|,
+% |bi-swap|, and |bi-separator|.
 %    \begin{macrocode}
-\caption at ExecuteOptions{caption}{bi-lang=0,bi-slc=1,bi-swap=0}
+\caption at ExecuteOptions{caption}{bi-lang=0,bi-slc=1,bi-swap=0,bi-separator=default}
 %    \end{macrocode}
 %
 % Set the language for the first caption.
@@ -1178,6 +1227,7 @@
 %
 % \begin{macro}{\bicaption@@make}
 % \changes{v1.1}{2015/09/16}{\cs{bicaption at label} replaced by \cs{caption at thelabel}}
+% \changes{v1.3}{2020/10/25}{Usage of \cs{caption at biseparator} added}
 % |\bicaption@@make|\marg{text \#2}\marg{label}\marg{text \#1}\par
 % Typeset both captions using the original version of \cs{caption@@make}.
 %    \begin{macrocode}
@@ -1191,8 +1241,8 @@
 %    \begin{macrocode}
   \ifnum\bicaption at lang=0\relax
     \bicaption at ifslc
-      {\caption at slc{#2}{#3}{}{\KV at caption@singlelinecheck0}%
-       \caption at slc{#2}{#1}{}{\KV at caption@singlelinecheck0}}%
+      {\caption at slc{#2}{#3}{}{\caption at setsinglelinecheck0}%
+       \caption at slc{#2}{#1}{}{\caption at setsinglelinecheck0}}%
       {}%
   \fi
 %    \end{macrocode}
@@ -1202,11 +1252,13 @@
   \ifnum\bicaption at lang=2\relax
     \caption at thelabel
     \global\let\caption at thelabel\relax
+    \let\bicaption at tempa\relax
   \else
     \begingroup
       \caption at setoptions{bi-first}%
       \caption@@make@{#2}{#3}%
     \endgroup
+    \def\bicaption at tempa{\bicaption at separator\caption at biseparator}%
   \fi
 %    \end{macrocode}
 % Typeset the second caption, if requested.
@@ -1213,6 +1265,7 @@
 %    \begin{macrocode}
   \ifnum\bicaption at lang=1\relax
   \else
+    \bicaption at tempa
     \begingroup
       \caption at setoptions{bi-second}%
       \caption@@make@{#2}{#1}%
@@ -1220,6 +1273,9 @@
   \fi
 }
 %    \end{macrocode}
+%    \begin{macrocode}
+\newcommand*\bicaption at separator{\par}
+%    \end{macrocode}
 % \end{macro}
 %
 % \pagebreak[3]

Modified: trunk/Master/texmf-dist/source/latex/caption/caption-ams-smf.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/caption/caption-ams-smf.dtx	2020-10-26 20:58:23 UTC (rev 56770)
+++ trunk/Master/texmf-dist/source/latex/caption/caption-ams-smf.dtx	2020-10-26 20:58:40 UTC (rev 56771)
@@ -80,7 +80,7 @@
 %
 % \newcommand*\csmarg[1]{\texttt{\char`\{#1\char`\}}}
 % \newcommand*\csoarg[1]{\texttt{\char`\[#1\char`\]}}
-% \newcommand*\version[2][]{\textit{v#2}}
+% \newcommand*\version[2][]{v$#2$}
 %
 % \GetFileInfo{caption-ams-smf.drv}
 % \let\docdate\filedate

Modified: trunk/Master/texmf-dist/source/latex/caption/caption-beamer.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/caption/caption-beamer.dtx	2020-10-26 20:58:23 UTC (rev 56770)
+++ trunk/Master/texmf-dist/source/latex/caption/caption-beamer.dtx	2020-10-26 20:58:40 UTC (rev 56771)
@@ -75,7 +75,7 @@
 %
 % \newcommand*\csmarg[1]{\texttt{\char`\{#1\char`\}}}
 % \newcommand*\csoarg[1]{\texttt{\char`\[#1\char`\]}}
-% \newcommand*\version[2][]{\textit{v#2}}
+% \newcommand*\version[2][]{v$#2$}
 %
 % \GetFileInfo{caption-beamer.drv}
 % \let\docdate\filedate

Modified: trunk/Master/texmf-dist/source/latex/caption/caption-elsarticle.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/caption/caption-elsarticle.dtx	2020-10-26 20:58:23 UTC (rev 56770)
+++ trunk/Master/texmf-dist/source/latex/caption/caption-elsarticle.dtx	2020-10-26 20:58:40 UTC (rev 56771)
@@ -75,7 +75,7 @@
 %
 % \newcommand*\csmarg[1]{\texttt{\char`\{#1\char`\}}}
 % \newcommand*\csoarg[1]{\texttt{\char`\[#1\char`\]}}
-% \newcommand*\version[2][]{\textit{v#2}}
+% \newcommand*\version[2][]{v$#2$}
 %
 % \GetFileInfo{caption-elsarticle.drv}
 % \let\docdate\filedate

Modified: trunk/Master/texmf-dist/source/latex/caption/caption-eng.tex
===================================================================
--- trunk/Master/texmf-dist/source/latex/caption/caption-eng.tex	2020-10-26 20:58:23 UTC (rev 56770)
+++ trunk/Master/texmf-dist/source/latex/caption/caption-eng.tex	2020-10-26 20:58:40 UTC (rev 56771)
@@ -31,7 +31,7 @@
 %   caption-deu.tex, caption-eng.tex, caption-rus.tex.
 % 
 \NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesFile{caption-eng.tex}[2020/09/12 v3.5 The caption package]
+\ProvidesFile{caption-eng.tex}[2020/09/21 v3.5 The caption package]
 \hbadness=9999 \newcount\hbadness \hfuzz=20pt % Make TeX shut up.
 %\errorcontextlines=3
 
@@ -115,7 +115,7 @@
 
 \newcommand*\csmarg[1]{\texttt{\char`\{#1\char`\}}}
 \newcommand*\csoarg[1]{\texttt{\char`\[#1\char`\]}}
-\newcommand*\version[2][]{$v#2$}
+\newcommand*\version[2][]{v$#2$}
 \newcommand*\x{\discretionary{}{}{}}
 
 \newenvironment{Annotation}%
@@ -253,7 +253,7 @@
 What now?
 \begin{itemize}
 \item
-  I will start revising this documentation in the next weeks, finally bringing it up-to-date.
+  I will update this documentation in the next weeks, finally bringing it up-to-date.
 \item
   Until the revised documentation is ready the most recent version could be found at
   \url{https://gitlab.com/axelsommerfeldt/caption/-/blob/master/doc/caption-eng.pdf}
@@ -447,11 +447,15 @@
 There are five standard caption label formats:
 
 \begin{Options}{\OptionLabel}
-  \item[default]
+  \item[original]
   The caption label will be typeset as specified by the document class,
   usually this means the name and the number (like \texttt{simple}).
-  (This is the default behaviour.)
 
+  Until \version{3.4} of \thispackage\ this label format was called `default'.
+  Since \version{3.5} it is called `original' and usually is the default label
+  format, so |label|\-|format=|\-|default| will still select this label format,
+  unless the default was changed by either a document class or babel language package.
+
   \item[empty]
   The caption label will be empty.
 \iffalse
@@ -4147,30 +4151,32 @@
 
 \DescribeMacro{\SetCaptionDefault}
 The command
-\begin{quote}|\SetCaptionDefault*|\marg{option}\marg{default value}\end{quote}
+\begin{quote}
+  |\SetCaptionDefault*|\marg{option}\marg{default value}
+\end{quote}
 changes the default value for the option \meta{option}, for example:
 \begin{quote}
-|\SetCaptionDefault{format}{hang}|\\
-|\SetCaptionDefault{justification}{raggedright}|\\
-|\DeclareCaptionLabelSeparator{silly}{ +++ }|\\
-|\SetCaptionDefault{labelseparator}{silly}|
+  |\SetCaptionDefault{format}{hang}|\\
+  |\SetCaptionDefault{justification}{raggedright}|\\
+  |\DeclareCaptionLabelSeparator{silly}{ +++ }|\\
+  |\SetCaptionDefault{labelseparator}{silly}|
 \end{quote}
 This command is available for the options
-|box|,
-|font|,
-|format|,
-|justification|,
-|label|\-|font|,
-|label|\-|format|,
-|label|\-|separator|,
-|list|\-|format|,
-|margin|,
-|parbox|,
-|position|,
-|single|\-|line|\-|check|,
-|text|\-|font|,
-|text|\-|format|, and
-|width|.
+  |box|,
+  |font|,
+  |format|,
+  |justification|,
+  |label|\-|font|,
+  |label|\-|format|,
+  |label|\-|separator|,
+  |list|\-|format|,
+  |margin|,
+  |parbox|,
+  |position|,
+  |single|\-|line|\-|check|,
+  |text|\-|font|,
+  |text|\-|format|, and
+  |width|.
 
 The starred variant only makes a difference when setting the default length
 of either |margin| or |width|, in this case it will use |\def| internally
@@ -4177,6 +4183,19 @@
 instead of |\edef| to store the value so the actual margin will be calculated
 when used (and not when set).
 
+\DescribeMacro{\SetCaptionFallback}
+The command
+\begin{quote}
+  |\SetCaptionFallback|\marg{option}\marg{fallback value}
+\end{quote}
+changes the fallback value for the option \meta{option}, for example:
+\begin{quote}
+  |\SetCaptionFallback{labelformat}{simple}|
+\end{quote}
+Currently only the pre-defined label format `original' uses a fallback
+value when |\fnum@|\meta{environment} is not defined for the current (floating)
+environment.
+
 \DescribeMacro{\AtCaptionPackage}
 The adaption file will be loaded when the \package{caption} kernel |caption3.sty|
 will be loaded so the given adaptions will be done for the \package{floatrow}

Modified: trunk/Master/texmf-dist/source/latex/caption/caption-koma.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/caption/caption-koma.dtx	2020-10-26 20:58:23 UTC (rev 56770)
+++ trunk/Master/texmf-dist/source/latex/caption/caption-koma.dtx	2020-10-26 20:58:40 UTC (rev 56771)
@@ -79,7 +79,7 @@
 %
 % \newcommand*\csmarg[1]{\texttt{\char`\{#1\char`\}}}
 % \newcommand*\csoarg[1]{\texttt{\char`\[#1\char`\]}}
-% \newcommand*\version[2][]{\textit{v#2}}
+% \newcommand*\version[2][]{v$#2$}
 %
 % \GetFileInfo{caption-koma.drv}
 % \let\docdate\filedate
@@ -193,7 +193,7 @@
 %
 %    \begin{macrocode}
 \NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesFile{caption-koma.sto}[2020/09/12 v2.0a Adaption of the caption package to the KOMA-Script document classes (AR)]
+\ProvidesFile{caption-koma.sto}[2020/09/21 v2.0b Adaption of the caption package to the KOMA-Script document classes (AR)]
 %    \end{macrocode}
 %
 % \section{Margin resp. width}
@@ -380,9 +380,9 @@
 %
 % \section{Label format}
 %
-% The `default' caption label format maps to `autodot'.
+% The `fallback' caption label format maps to `autodot'.
 %    \begin{macrocode}
-\SetCaptionDefault{labelformat}{autodot}
+\SetCaptionFallback{labelformat}{autodot}
 %    \end{macrocode}
 %
 % \section{Label separator}

Modified: trunk/Master/texmf-dist/source/latex/caption/caption-light.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/caption/caption-light.dtx	2020-10-26 20:58:23 UTC (rev 56770)
+++ trunk/Master/texmf-dist/source/latex/caption/caption-light.dtx	2020-10-26 20:58:40 UTC (rev 56771)
@@ -75,7 +75,7 @@
 %
 \newcommand*\csmarg[1]{\texttt{\char`\{#1\char`\}}}
 \newcommand*\csoarg[1]{\texttt{\char`\[#1\char`\]}}
-\newcommand*\version[2][]{$v#2$}
+\newcommand*\version[2][]{v$#2$}
 %
 \usepackage{marvosym}
 \makeatletter

Modified: trunk/Master/texmf-dist/source/latex/caption/caption-memoir.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/caption/caption-memoir.dtx	2020-10-26 20:58:23 UTC (rev 56770)
+++ trunk/Master/texmf-dist/source/latex/caption/caption-memoir.dtx	2020-10-26 20:58:40 UTC (rev 56771)
@@ -32,12 +32,12 @@
 %   caption-deu.tex, caption-eng.tex, caption-rus.tex.
 % 
 % \fi
-% \CheckSum{7}
+% \CheckSum{56}
 %
 % \iffalse
 %<*driver>
 \NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesFile{caption-memoir.drv}[2018/05/24 v2.0 Implementation of the caption-memoir package]
+\ProvidesFile{caption-memoir.drv}[2020/10/10 v2.1 Implementation of the caption-memoir package]
 \hbadness=9999 \newcount\hbadness \hfuzz=100pt % Make TeX shut up.
 %\errorcontextlines=3
 %
@@ -75,7 +75,7 @@
 %
 % \newcommand*\csmarg[1]{\texttt{\char`\{#1\char`\}}}
 % \newcommand*\csoarg[1]{\texttt{\char`\[#1\char`\]}}
-% \newcommand*\version[2][]{\textit{v#2}}
+% \newcommand*\version[2][]{v$#2$}
 %
 % \GetFileInfo{caption-memoir.drv}
 % \let\docdate\filedate
@@ -183,7 +183,7 @@
 %
 %    \begin{macrocode}
 \NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesFile{caption-memoir.sto}[2020/07/31 v2.0 Adaption of the caption package to the memoir document class (AR)]
+\ProvidesFile{caption-memoir.sto}[2020/10/10 v2.1 Adaption of the caption package to the memoir document class (AR)]
 %    \end{macrocode}
 %
 % \section{Adaptions already included in the caption package}
@@ -193,18 +193,17 @@
 %   \item \cs{@caption} expands \cs{memcaptioninfo}
 %   \item \cs{caption at prepareanchor} expands \cs{M at gettitle}
 %   \item \cs{caption at refstepcounter} expands \cs{donemaincaptiontrue}
-%   \item Since the \class{memoir} document class resets the sub-caption
-%         counter at |\@float|, right after |\done|\-|main|\-|caption|\-|false|,
-%         all sub-caption counters will be saved at |\done|\-|main|\-|caption|\-|false|
-%         so they can (and will) be restored using |\caption@|\-|restore|\-|counters|
-%         at |\continued|\-|float|.
+%   \item All sub-caption counters will be reset at |\@mem|\-|reset|\-|sub|\-|counter|,
+%         even if they weren't defined by the \class{memoir} document class itself.
+%         As work-around this command will be patched to protect the counters
+%         defined by |\Declare|\-|Caption|\-|Sub|\-|Type|.
 % \end{itemize}
 %
 % \section{Single-line-check}
 %
 % \begin{macro}{\caption at prepareslc}
-% \changes{v1.4a}{2011/10/21}{Redefinition of \cs{pagenote} from \textsf{memoir} document class added}
-% We re-define \cs{pagenote} here so it won't disturb the single-line-check.
+% \changes{v1.4a}{2011/10/21}{Re-definition of \cs{pagenote} added}
+%   We re-define \cs{pagenote} here so it won't disturb the single-line-check.
 %    \begin{macrocode}
 \g at addto@macro\caption at prepareslc{%
   \let\pagenote\caption at gobble}
@@ -211,6 +210,98 @@
 %    \end{macrocode}
 % \end{macro}
 %
+% \section{Label separator}
+%
+% The `default' caption label separator maps to \cs{@contdelim}.
+%    \begin{macrocode}
+\DeclareCaptionLabelSeparator{@contdelim}{\@contdelim}
+\SetCaptionDefault{labelseparator}{@contdelim}
+%    \end{macrocode}
+%
+% \begin{macro}{\captiondelim}
+% \changes{v2.1}{2020/10/10}{Re-definition of \cs{captiondelim} added}
+%   We re-define |\caption|\-|delim| so it will set the \package{caption3} label separator setting, too.
+%    \begin{macrocode}
+\let\caption at memoir@delim\captiondelim
+\renewcommand\captiondelim{%
+  \captionsetup{labelsep=@contdelim}%
+  \caption at memoir@delim}
+%    \end{macrocode}
+% \end{macro}
+%
+% \changes{v2.0a}{2020/10/10}{Re-definition of label separator `gobble' added}
+% If |\fnum at figure| (or |\fnum at table| or\ldots) ends with |\@gobble|, the `:' part of the caption
+% label separator will be suppressed when a standard document class (\class{article}, \class{report},
+% or \class{book}) will be used, leaving the following space character intact.
+% This is different when using the \class{memoir} document class, in this case the complete
+% label separator will be suppressed. For this reason we re-define the pre-defined caption label
+% separator `gobble' to emulate this behaviour.
+%
+%    \begin{macrocode}
+\DeclareCaptionLabelSeparator{gobble}{}
+%    \end{macrocode}
+%
+% \section{Fonts}
+%
+% The `default' caption fonts map to \cs{@contnfont} resp.~\cs{conttfont}.
+%    \begin{macrocode}
+\DeclareCaptionFont{@contnfont}{\@contnfont}
+\SetCaptionDefault{labelfont}{@contnfont}
+%    \end{macrocode}
+%    \begin{macrocode}
+\DeclareCaptionFont{@conttfont}{\@conttfont}
+\SetCaptionDefault{textfont}{@conttfont}
+%    \end{macrocode}
+%
+% \begin{macro}{\captionnamefont}
+% \changes{v2.1}{2020/10/10}{Re-definition of \cs{captionnamefont} added}
+%   We re-define |\caption|\-|delim| so it will set the \package{caption3} label separator setting, too.
+%    \begin{macrocode}
+\let\caption at memoir@namefont\captionnamefont
+\renewcommand\captionnamefont{%
+  \captionsetup{labelfont=@contnfont}%
+  \caption at memoir@namefont}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\captiontitlefont}
+% \changes{v2.1}{2020/10/10}{Re-definition of \cs{captiontitlefont} added}
+%   We re-define |\caption|\-|delim| so it will set the \package{caption3} label separator setting, too.
+%    \begin{macrocode}
+\let\caption at memoir@titlefont\captiontitlefont
+\renewcommand\captiontitlefont{%
+  \captionsetup{textfont=@conttfont}%
+  \caption at memoir@titlefont}
+%    \end{macrocode}
+% \end{macro}
+%
+% \section{Vertical spaces before and after captions}
+%
+% The \class{memoir} document classes uses |\above|\-|caption|\-|skip| and |\below|\-|caption|\-|skip|
+% different than the standard document classes and the \package{caption} package:
+% They always typeset |\above|\-|caption|\-|skip| before the caption and
+% |\below|\-|caption|\-|skip| after the captions. Both are preset to |0.5\one|\-|line|\-|skip|.
+%
+% For this reason we have to set the |\below|\-|caption|\-|skip| to |0pt| if the \package{caption}
+% package is used, so no extra vertical space will be created.
+%
+%    \begin{macrocode}
+\AtCaptionPackage{\setlength\belowcaptionskip{0pt}}
+%    \end{macrocode}
+%
+% \section{TODO}
+%
+%    \begin{macrocode}
+% TODO: \captionstyle
+% TODO: \captionwidth, \changecaptionwidth, \normalcaptionwidth
+% TODO: \hangcaption, \indentcaption, \normalcaption
+% TODO: \precaption, \postcaption, \midbicaption
+% TODO: \captiontitlefinal
+% TODO: \contcaption
+% TODO: \newfixedcaption, \renewfixedcaption, \providefixedcaption
+% 
+%    \end{macrocode}
+%
 % \iffalse
 %</package>
 % \fi

Modified: trunk/Master/texmf-dist/source/latex/caption/caption-ntg.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/caption/caption-ntg.dtx	2020-10-26 20:58:23 UTC (rev 56770)
+++ trunk/Master/texmf-dist/source/latex/caption/caption-ntg.dtx	2020-10-26 20:58:40 UTC (rev 56771)
@@ -77,7 +77,7 @@
 %
 % \newcommand*\csmarg[1]{\texttt{\char`\{#1\char`\}}}
 % \newcommand*\csoarg[1]{\texttt{\char`\[#1\char`\]}}
-% \newcommand*\version[2][]{\textit{v#2}}
+% \newcommand*\version[2][]{v$#2$}
 %
 % \GetFileInfo{caption-ntg.drv}
 % \let\docdate\filedate

Modified: trunk/Master/texmf-dist/source/latex/caption/caption-thesis.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/caption/caption-thesis.dtx	2020-10-26 20:58:23 UTC (rev 56770)
+++ trunk/Master/texmf-dist/source/latex/caption/caption-thesis.dtx	2020-10-26 20:58:40 UTC (rev 56771)
@@ -75,7 +75,7 @@
 %
 % \newcommand*\csmarg[1]{\texttt{\char`\{#1\char`\}}}
 % \newcommand*\csoarg[1]{\texttt{\char`\[#1\char`\]}}
-% \newcommand*\version[2][]{\textit{v#2}}
+% \newcommand*\version[2][]{v$#2$}
 %
 % \GetFileInfo{caption-thesis.drv}
 % \let\docdate\filedate

Modified: trunk/Master/texmf-dist/source/latex/caption/caption.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/caption/caption.dtx	2020-10-26 20:58:23 UTC (rev 56770)
+++ trunk/Master/texmf-dist/source/latex/caption/caption.dtx	2020-10-26 20:58:40 UTC (rev 56771)
@@ -32,12 +32,12 @@
 %   caption-deu.tex, caption-eng.tex, caption-rus.tex.
 % 
 % \fi
-% \CheckSum{2697}
+% \CheckSum{2692}
 %
 % \iffalse
 %<*driver>
 \NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesFile{caption.drv}[2015/09/16 v3.5 Implementation of the caption package]
+\ProvidesFile{caption.drv}[2020/10/11 v3.5 Implementation of the caption package]
 \hbadness=9999 \newcount\hbadness \hfuzz=100pt % Make TeX shut up.
 %\errorcontextlines=3
 %
@@ -84,7 +84,7 @@
 %
 % \newcommand*\csmarg[1]{\texttt{\char`\{#1\char`\}}}
 % \newcommand*\csoarg[1]{\texttt{\char`\[#1\char`\]}}
-% \newcommand*\version[2][]{\textit{v#2}}
+% \newcommand*\version[2][]{v$#2$}
 %
 % \newcommand*\issue[1]{GitLab~\##1}
 %
@@ -136,6 +136,30 @@
 % \footnotetext{Thanks a lot to Olga Lapko for this translation}
 % \end{quote}
 %
+% \pagebreak[4]
+% \section*{Internal commands}
+%
+% These internal commands are save to use by other packages as well
+% since their interface will not change in future releases:
+% \begin{quote}\begin{tabular}{ll}
+%   Internal command                  & Currently used by  \\
+% \hline
+%   |\caption at kernel@addcontentsline| & \package{floatrow} \\
+%   |\caption at makecaption|            & \package{bidi}     \\
+%   |\caption at settype|                & \package{newfloat} \\
+%   |\caption at setsubtype|             & \package{floatrow} \\
+%   |\caption at starfalse|              & \package{bidi}     \\
+%   |\caption at startrue|               & \package{bidi}     \\
+%   |\caption at xlabel|                 & \package{cleveref} \\
+% \end{tabular}\end{quote}
+%
+% If your package wants to use any other internal command of the \package{caption} package,
+% please write me an e-mail so we can define a proper interface together.
+%
+% The \package{lwarp} package uses a lot of internal commands as well,
+% but we are working on it on the Git branch \texttt{feature/lwarp}:
+% \url{https://gitlab.com/axelsommerfeldt/caption/-/tree/feature/lwarp}
+%
 % \StopEventually{}
 % \clearpage
 % \tableofcontents
@@ -217,13 +241,13 @@
 %
 %    \begin{macrocode}
 \NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption}[2020/09/12 v3.5b Customizing captions (AR)]
+\ProvidesPackage{caption}[2020/10/26 v3.5g Customizing captions (AR)]
 %    \end{macrocode}
 %
 % \section{Loading the kernel}
 %
 %    \begin{macrocode}
-\RequirePackage{caption3}[2020/09/12] % needs v2.1 or newer
+\RequirePackage{caption3}[2020/10/06] % needs v2.2b or newer
 %    \end{macrocode}
 %
 % \section{Check against unknown document classes}
@@ -311,36 +335,105 @@
 \captionsetup{list-entry=default}
 %    \end{macrocode}
 %
+% \begin{macro}{\caption at declparboxrestore}
+% \changes{v3.5g}{2020/10/26}{This macro added}
+%  |\caption at declparboxrestore|\marg{name}\marg{code}
+%    \begin{macrocode}
+% TODO: Remove \caption at declparboxrestore
+\newcommand\caption at declparboxrestore{%
+  \caption at decl{parboxrestore}}
+%    \end{macrocode}
+%    \begin{macrocode}
+\@onlypreamble\caption at declparboxrestore
+%    \end{macrocode}
+% \end{macro}
+%
 % \begin{macro}{\caption at setparboxrestore}
 % \changes{v3.2}{2010/11/07}{This macro added}
+% \changes{v3.5g}{2020/10/26}{New implementation; default changed from `partial' to `full'}
 %  |\caption at setparboxrestore|\marg{\purett{partial} or \purett{full}}
 %    \begin{macrocode}
-\newcommand*\caption at setparboxrestore[1]{%
-  \caption at ifinlist{#1}{full}{%
-    \caption at setfullparboxrestore
-  }{\caption at ifinlist{#1}{default,light,partial}{%
-    \let\caption at parboxrestore\@secondoftwo
-  }{%
-    \caption at Error{Undefined parboxrestore `#1'}%
-  }}}
+% TODO: Remove \caption at setparboxrestore
+\newcommand*\caption at setparboxrestore{%
+  \caption at set{parboxrestore}}
 %    \end{macrocode}
+%    \begin{macrocode}
+\caption at declparboxrestore{full}{%
+  \@parboxrestore}
+%    \end{macrocode}
+%  The original code (from |latex/base/ltboxes.dtx|):
+%  \begin{verbatim}
+%  \def\@parboxrestore{\@arrayparboxrestore\let\\\@normalcr}
+%  \def\@arrayparboxrestore{%
+%    \let\if at nobreak\iffalse
+%    \let\if at noskipsec\iffalse
+%    \let\par\@@par
+%    \let\-\@dischyph
+%    \let\'\@acci\let\`\@accii\let\=\@acciii
+%    \parindent\z@ \parskip\z at skip
+%    \everypar{}%
+%    \linewidth\hsize
+%    \@totalleftmargin\z@
+%    \leftskip\z at skip \rightskip\z at skip \@rightskip\z at skip
+%    \parfillskip\@flushglue \lineskip\normallineskip
+%    \baselineskip\normalbaselineskip
+%    \sloppy}
+%  \end{verbatim}%^^A
+% This one will be used by |\@caption| instead of |\@parboxrestore|.
+%    \begin{macrocode}
+\caption at declparboxrestore{partial}{%
+  \let\if at nobreak\iffalse
+  \let\if at noskipsec\iffalse
+  \let\par\@@par
+% \let\-\@dischyph
+% \let\'\@acci\let\`\@accii\let\=\@acciii
+  \parindent\z@ \parskip\z at skip
+  \everypar{}%
+% \linewidth\hsize
+% \@totalleftmargin\z@ 
+  \leftskip\z at skip \rightskip\z at skip \@rightskip\z at skip
+  \parfillskip\@flushglue \lineskip\normallineskip
+  \baselineskip\normalbaselineskip
+  \sloppy
+  \let\\\@normalcr}
+%    \end{macrocode}
 % \end{macro}
 %
-% \begin{macro}{\caption at setfullparboxrestore}
-% \changes{v3.2}{2010/11/07}{This macro added}
-%  |\caption at setfullparboxrestore|\par
-%  This is an abbreviation for |\caption at setparboxrestore{full}|.
+% \begin{macro}{\caption at parboxrestore@mini}
+% \changes{v3.2}{2010/10/24}{This macro added}
+% \changes{v3.5g}{2020/10/26}{Renamed from \cs{caption at boxrestore@mini} to \cs{caption at parboxrestore@mini}}
+% Resets |\par| so the very first |\par| in |\@caption| behaves quite the same as in floating environments.
+% Will be used by |\set|\-|caption|\-|type|.
 %    \begin{macrocode}
-\newcommand*\caption at setfullparboxrestore{%
-  \let\caption at parboxrestore\@firstoftwo}
+\caption at declparboxrestore{mini}{%
+  \let\par\@@par
+  \parindent\z@ \parskip\z at skip
+  \sloppy}
 %    \end{macrocode}
 % \end{macro}
 %
+% `default' usually maps to `full'.
+% \changes{v3.5g}{2020/10/26}{The default of \cs{caption at parboxrestore} maps to `full' instead of `partial' now}
+%    \begin{macrocode}
+\SetCaptionDefault{parboxrestore}{full}
+%    \end{macrocode}
+%
 % \changes{v3.2}{2010/11/07}{Option \opt{parboxrestore} added}
 %    \begin{macrocode}
+% TODO: Remove the (undocumentated) option "parboxrestore"
 \DeclareCaptionOption{parboxrestore}{\caption at setparboxrestore{#1}}
+%    \end{macrocode}
+%
+% \begin{macro}{\caption at parboxrestore}
+% \changes{v3.1}{2007/03/03}{This macro and its usage added}
+% \changes{v3.1b}{2007/09/17}{Bugfix: Redefinition of CR added}
+% \changes{v3.2}{2010/11/07}{Support of option \opt{parboxrestore} added}
+% \changes{v3.5g}{2020/10/26}{New implementation; renamed from \cs{caption at boxrestore} to \cs{caption at parboxrestore}}
+%    \begin{macrocode}
+% TODO: Change definition to \def\caption at parboxrestore{\@parboxrestore}
 \captionsetup{parboxrestore=default}
 %    \end{macrocode}
+% \end{macro}
 %
 % \changes{v3.1f}{2007/11/28}{Option \opt{@minipage=} added}
 %    \begin{macrocode}
@@ -644,14 +737,10 @@
 % \changes{v3.2f}{2012/01/14}{Usage of \cs{M at gettitle} moved to \cs{caption at prepareanchor}}
 % \changes{v3.3}{2013/01/06}{Adapted to the \textsf{nag} package}
 %  As above, our version has been adapted to the packages we support.
-%  Additionally our code is nested by |\caption at beginex| \&
-%  |\caption at end| instead of |\begingroup| \& |\endgroup|.
-%  Furthermore we use |\caption at boxrestore| instead of |\@parboxrestore|
-%  so this code also works correctly inside list-based environments
-%  like |wide| \& |addmargin|. (This, and the fact that we use
-%  |\linewidth| instead of |\hsize| inside |\@makecaption|, solves
-%  \href{http://www.latex-project.org/cgi-bin/ltxbugs2html?pr=latex/2472}%^^A
-%  {\LaTeX\ PR \texttt{latex/2472}}.)
+%  Additionally our code is nested by |\caption at begin|\-|ex| \&
+%  |\caption at end| instead of |\begin|\-|group| \& |\end|\-|group|.
+%  Furthermore we use |\caption at par|\-|box|\-|restore| instead of
+%  |\@parbox|\-|restore|.
 %    \begin{macrocode}
 \long\def\caption@@caption#1[#2]#3{%
 %    \end{macrocode}
@@ -666,7 +755,7 @@
   \par
   \caption at beginex{#1}{#2}{#3}%
     \caption at setfloatcapt{%
-      \caption at boxrestore
+      \caption at parboxrestore
       \if at minipage
         \@setminipage
       \fi
@@ -916,10 +1005,10 @@
 % \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}
-%  Like |\captionsetup{type=xxx}|, but also works if \cs{captionsetup} was redefined.
+%  Like |\captionsetup{type=xxx}|, but also works if |\caption|\-|setup| was redefined.
 %    \begin{macrocode}
 \def\setcaptiontype{%
-  \caption at boxrestore@mini
+  \caption at parboxrestore@mini
   \caption at settype}
 %    \end{macrocode}
 % \end{macro}
@@ -926,6 +1015,7 @@
 %
 % \begin{macro}{\setcaptionsubtype}
 % \changes{v3.2a}{2011/08/15}{This macro added}
+% \changes{v3.5d}{2020/09/28}{This macro revised}
 % Same, but sets the sub-type.
 %    \begin{macrocode}
 \newcommand\setcaptionsubtype{%
@@ -935,10 +1025,12 @@
 %    \end{macrocode}
 %    \begin{macrocode}
 \newcommand\caption at setsubtype{%
-  \@ifstar
-    {\caption@@settype{sub}*{sub\@captype}}%
-    {\caption@@settype{sub}{sub\@captype}}}%
+  \caption at teststar\caption@@setsubtype\@firstoftwo\@secondoftwo}
 %    \end{macrocode}
+%    \begin{macrocode}
+\newcommand*\caption@@setsubtype[1]{%
+  \caption@@@settype{sub}{#1}{sub\@captype}}
+%    \end{macrocode}
 % \end{macro}
 %
 % \begin{macro}{\caption at settype}
@@ -951,6 +1043,7 @@
 % \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.5d}{2020/09/28}{This macro revised}
 %  |\caption at settype*|\marg{type}\par
 %  sets |\@captype| and executes the options associated with it
 %  (using |\caption at set|\-|options|).
@@ -968,17 +1061,17 @@
 %    \end{macrocode}
 %    \begin{macrocode}
 \newcommand*\caption at set@type{%
-  \caption@@settype{}}
+  \caption at teststar\caption@@settype\@firstoftwo\@secondoftwo}
 %    \end{macrocode}
 %    \begin{macrocode}
-\newcommand*\caption@@settype[1]{%
-  \caption at teststar{\caption@@@settype{#1}}\@firstoftwo\@secondoftwo}
+\newcommand*\caption@@settype{%
+  \caption@@@settype{}}
 %    \end{macrocode}
 %    \begin{macrocode}
 \newcommand*\caption@@@settype[3]{%
 % #1 = "" or "sub"
 % #2 = \@firstoftwo in star form, \@secondoftwo otherwise
-% #3 = <type>, e.g. "figure" or "subfigure"
+% #3 = <type>, e.g.: "figure" or "subfigure"
   \caption at Debug{#1type=#3}%
   \@nameuse{caption at check#1type}{#3}%
     {\caption at checkgrouplevel{#1}{%
@@ -1273,6 +1366,7 @@
 % \changes{v3.3}{2013/05/01}{Usage of \cs{caption at restorecounters} added}
 % \changes{v3.3}{2013/12/16}{Bugfix: Does not use \cs{caption at ContinuedFloat} anymore since this breaks \cs{ContinuedFloat} offered by the \package{subfig} package}
 % \changes{v3.4}{2015/09/16}{Renamed from \cs{ContinuedFloat} to \cs{continuedfloat}}
+% \changes{v3.5f}{2020/10/06}{Usage of \cs{caption at restorecounters} removed}
 %  |\continuedfloat|\\
 %  |\continuedfloat*|\par
 %  This mainly sets the appropriate flag, increments the
@@ -1308,7 +1402,6 @@
 \newcommand*\caption at continued@float[1]{%
   \edef\caption at tempa{#1}%
   \ifx\caption at tempa\caption at CFtype
-    \caption at restorecounters
     \caption@@continuedfloat{#1}%
   \else
     \caption at Error{Continued `#1' after `\caption at CFtype'}%
@@ -1381,18 +1474,6 @@
 %    \end{macrocode}
 % \end{macro}
 %
-% \begin{macro}{\donemaincaptionfalse}
-% Since the \class{memoir} document class resets the sub-caption
-% counter at |\@float|, right after |\done|\-|main|\-|caption|\-|false|,
-% we save all sub-caption counters at |\done|\-|main|\-|caption|\-|false|
-% so we can restore them using |\caption at restore|\-|counters|
-% inside |\continued|\-|float|.
-%    \begin{macrocode}
-\caption at ifdefined\donemaincaptionfalse{%
-  \g at addto@macro\donemaincaptionfalse\caption at savesubcounters}{}
-%    \end{macrocode}
-% \end{macro}
-%
 % \section{Internal helpers}
 %
 % \begin{macro}{\caption at refstepcounter}
@@ -1400,6 +1481,7 @@
 % \changes{v3.2}{2010/10/26}{Error message moved from \cs{caption@@@settype} to here}
 % \changes{v3.2c}{2011/09/04}{Support of \cs{donemaincaptiontrue} from \textsf{memoir} document class added}
 % \changes{v3.3}{2011/12/28}{Usage of \cs{ifcaption at caption}, \cs{ifcaption at subcaption}, and \cs{ifcaption at ContinuedFloat} added}
+% \changes{v3.5e}{2020/09/28}{Bugfix in re-definition of \cs{stepcounter}; uses \cs{edef} instead of \cs{def} now}
 %  Increments the float (i.e. |figure| or |table|) counter,
 %  resets the continuation counter, and redefines itself to |\@gobble|.
 %    \begin{macrocode}
@@ -1433,7 +1515,7 @@
     \let\caption at tempa\caption@@refstepcounter
     \caption at ifflag2{}{% caption
       \caption at ifflag4{% subcaption
-% Counter was already incremented by content, so we suppress \stepcounter{#1} here
+        % Counter was already incremented by content, so we suppress \stepcounter{#1} here
         \let\caption at tempa\caption@@refcounter
       }{}%
     }%
@@ -1444,8 +1526,8 @@
 \newcommand*\caption@@refcounter[1]{%
   \let\caption at stepcounter@ORI\stepcounter
   \def\stepcounter##1{%
-    \def\caption at tempa{#1}%
-    \def\caption at tempb{##1}%
+    \edef\caption at tempa{#1}%
+    \edef\caption at tempb{##1}%
     \ifx\caption at tempa\caption at tempb \else
       \caption at stepcounter@ORI{##1}%
     \fi}%
@@ -1477,8 +1559,7 @@
 %
 % \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.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[]{}|).
@@ -1572,62 +1653,6 @@
 %    \end{macrocode}
 % \end{macro}
 %
-% \begin{macro}{\caption at boxrestore}
-% \changes{v3.1}{2007/03/03}{This macro and its usage added}
-% \changes{v3.1b}{2007/09/17}{Bugfix: Redefinition of CR added}
-% \changes{v3.2}{2010/11/07}{Support of option \opt{parboxrestore} added}
-%  The original code (from |latex/base/ltboxes.dtx|):
-%  \begin{verbatim}
-%  \def\@parboxrestore{\@arrayparboxrestore\let\\\@normalcr}
-%  \def\@arrayparboxrestore{%
-%    \let\if at nobreak\iffalse
-%    \let\if at noskipsec\iffalse
-%    \let\par\@@par
-%    \let\-\@dischyph
-%    \let\'\@acci\let\`\@accii\let\=\@acciii
-%    \parindent\z@ \parskip\z at skip
-%    \everypar{}%
-%    \linewidth\hsize
-%    \@totalleftmargin\z@ 
-%    \leftskip\z at skip \rightskip\z at skip \@rightskip\z at skip
-%    \parfillskip\@flushglue \lineskip\normallineskip
-%    \baselineskip\normalbaselineskip
-%    \sloppy}
-%  \end{verbatim}%^^A
-% This one will be used by |\@caption| instead of |\@parboxrestore|.
-%    \begin{macrocode}
-\newcommand*\caption at boxrestore{%
-  \caption at parboxrestore{\@parboxrestore}{%
-    \let\if at nobreak\iffalse
-    \let\if at noskipsec\iffalse
-    \let\par\@@par
-%   \let\-\@dischyph
-%   \let\'\@acci\let\`\@accii\let\=\@acciii
-    \parindent\z@ \parskip\z at skip
-    \everypar{}%
-%   \linewidth\hsize
-%   \@totalleftmargin\z@ 
-    \leftskip\z at skip \rightskip\z at skip \@rightskip\z at skip
-    \parfillskip\@flushglue \lineskip\normallineskip
-    \baselineskip\normalbaselineskip
-    \sloppy
-    \let\\\@normalcr
-  }}
-%    \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\caption at boxrestore@mini}
-% \changes{v3.2}{2010/10/24}{This macro added}
-% Resets \cs{par} so the very first \cs{par} in \cs{@caption} behaves quite the same as in floating environments.
-% Will be used by \cs{setcaptiontype}.
-%    \begin{macrocode}
-\newcommand\caption at boxrestore@mini{%
-  \let\par\@@par
-  \parindent\z@ \parskip\z at skip
-  \sloppy}
-%    \end{macrocode}
-% \end{macro}
-%
 % \begin{macro}{\caption at normalsize}
 % \changes{v3.1}{2007/05/05}{This macro and its usage added}
 % \changes{v3.5}{2020/07/27}{Adapted to \package{caption3} v2.0}
@@ -1776,7 +1801,8 @@
 \caption at AtBeginDocument{%
   \caption at ifundefined\@subfloatrowtrue
    {\newif\if at subfloatrow
-    \caption at ifundefined\subfloatrow{}%
+    \caption at ifundefined\subfloatrow
+    {}%
     {\caption at Debug{Patching subfloatrow environment}%
      \g at addto@macro\capsubrowsettings{\@subfloatrowtrue}%
      \g at addto@macro\killfloatstyle{%
@@ -1831,8 +1857,7 @@
 % \end{macro}
 %
 % \begin{macro}{\caption at addsubcontentsline}
-% \changes{v3.1i}{2008/08/02}{Bugfix 08-07-28:
-%    \cs{label}, \cs{index}, and \cs{glossary} are allowed inside the list entry now}
+% \changes{v3.1i}{2008/08/02}{\cs{label}, \cs{index}, and \cs{glossary} are allowed inside the list entry now}
 % \changes{v3.2}{2011/06/26}{Uses \cs{caption@@addcontentsline} instead of \cs{addcontentsline} now}
 % \changes{v3.2c}{2011/08/19}{Uses \cs{caption at gobble} instead of \cs{@gobble} now}
 % \changes{v3.3}{2012/01/15}{Debug message added}
@@ -2551,7 +2576,7 @@
 %       |\caption|\-|setup[|\-|floating|\meta{type}|]{|\ldots|}| is supported.
 %    \item |\line|\-|width| must be set correctly.
 %       Usually this is done by |\@par|\-|box|\-|restore| inside |\@caption|,
-%       but since we use |\@caption at box|\-|restore| we have to map this to
+%       but since we use |\@caption at parbox|\-|restore| we have to map this to
 %       |\@par|\-|box|\-|restore| instead.
 %  \end{enumerate}
 %    \begin{macrocode}
@@ -2558,7 +2583,7 @@
   \newcommand*\caption at floatflt[1]{%
     \caption at settype{#1}%
     \caption at clearmargin
-    \caption at setfullparboxrestore
+    \caption at setparboxrestore{full}%
     \caption at setoptions{floating#1}}%
 %    \end{macrocode}
 % \end{macro}
@@ -3451,7 +3476,7 @@
 %
 % \begin{macro}{\caption at window}
 % \changes{v3.1c}{2007/10/06}{Bugfix: \cs{caption at clearmargin} added}
-% Beside calling |\caption at settype| we redefine |\caption at boxrestore|
+% Beside calling |\caption at settype| we redefine |\caption at par|\-|box|\-|restore|
 % (as in \package{floatflt} \& \package{picins} package support)
 % and |\@makecaption| (as in \package{float} package support) here.
 %    \begin{macrocode}
@@ -3460,7 +3485,7 @@
     \caption at setautoposition b%
     \caption at settype{#1}%
     \caption at clearmargin
-    \caption at setfullparboxrestore}%
+    \caption at setparboxrestore{full}}%
 %    \end{macrocode}
 % \end{macro}
 %
@@ -3567,9 +3592,9 @@
 %    \item We use |\caption at setoptions{parpic}| so
 %          |\captionsetup[parpic]{|\ldots|}| is supported.
 %    \item |\linewidth| must be set correctly.
-%          Usually this is done by |\@parboxrestore| inside |\@caption|,
-%          but since we use |\@caption at boxrestore| we have to map this to
-%          |\@parboxrestore| instead.
+%          Usually this is done by |\@parbox|\-|restore| inside |\@caption|,
+%          but since we use |\@caption at parbox|\-|restore| we have to map this to
+%          |\@parbox|\-|restore| instead.
 %    \item The two arguments of |\caption| (|\sh at rtf@rm| \& |\capti at nt@xt|)
 %          should be expanded on first level so |\caption[]{|\ldots|}| and
 %          |\caption[|\ldots|]{}| work correctly.
@@ -3588,7 +3613,7 @@
 %     \else
 %       \captionwidth\z@ % do not use "width=" setting
 %     \fi
-      \caption at setfullparboxrestore
+      \caption at setparboxrestore{full}%
       \caption at setoptions{parpic}%
       \caption at setautoposition b%
 %    \end{macrocode}
@@ -3905,7 +3930,7 @@
 %    \end{macrocode}
 %    \begin{macrocode}
     \caption at beginex{#1}{#2}{#3}%
-      \caption at boxrestore
+      \caption at parboxrestore
       \caption at normalsize
       \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par
     \caption at end}%
@@ -3972,7 +3997,7 @@
 %    \begin{macrocode}
     \@initisotab
     \caption at beginex{#1}{#2}{#3}%
-      \caption at boxrestore
+      \caption at parboxrestore
       \caption at normalsize
       \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par
     \caption at end

Modified: trunk/Master/texmf-dist/source/latex/caption/caption2.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/caption/caption2.dtx	2020-10-26 20:58:23 UTC (rev 56770)
+++ trunk/Master/texmf-dist/source/latex/caption/caption2.dtx	2020-10-26 20:58:40 UTC (rev 56771)
@@ -32,7 +32,7 @@
 %   caption-deu.tex, caption-eng.tex, caption-rus.tex.
 % 
 % \fi
-% \CheckSum{868}
+% \CheckSum{864}
 %
 % \iffalse
 %<*driver>
@@ -211,7 +211,7 @@
 %
 %    \begin{macrocode}
 \NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption2}[2020/01/02 v2.2e Customising captions (AR)]
+\ProvidesPackage{caption2}[2020/09/28 v2.2f Customising captions (AR)]
 %    \end{macrocode}
 %
 % \changes{v2.2b}{2007/06/15}{Made obsolete warning even more annoying}
@@ -230,7 +230,7 @@
 % \subsection{Loading the caption3 kernel}
 %
 %    \begin{macrocode}
-\RequirePackage{caption3}[2019/12/31] % should be used with v1.8f or newer
+\RequirePackage{caption3}[2020/09/28] % needs v2.2a or newer
 %    \end{macrocode}
 % We undefine user commands offered by \package{caption} but not by \package{caption2}
 % since they should not be used together with \package{caption2}.
@@ -242,6 +242,16 @@
 \let\DeclareCaptionSubType\@undefined
 %    \end{macrocode}
 %
+% \begin{macro}{\captiontwo at Error}
+% \changes{v2.2f}{2020/09/28}{This macro added}
+%   |\captiontwo at Error|\marg{message}\\
+%   issues an error message (with code line indication).
+%    \begin{macrocode}
+\newcommand*\captiontwo at Error[2][]{%
+  \PackageError{caption2}{#2}{#1\caption@@eh{caption2}}}
+%    \end{macrocode}
+% \end{macro}
+%
 % \subsection{Check against the regular caption package}
 % \changes{v2.2}{2007/04/06}{Check against regular \package{caption} package added}
 % \changes{v2.2a}{2007/04/11}{Bugfix: Usage of \cs{caption at error} replaced by \cs{PackageError}}
@@ -248,9 +258,9 @@
 %
 %    \begin{macrocode}
 \@ifpackageloaded{caption}{%
-  \PackageError{caption2}{%
+  \captiontwo at Error{%
     You can't use both, the (current) caption *and*\MessageBreak
-    the (obsolete) caption2 package}\caption at eh
+    the (obsolete) caption2 package}%
   \endinput
 }{}
 %    \end{macrocode}
@@ -347,7 +357,9 @@
 %
 % \begin{macro}{\defcaptionstyle}
 % \begin{macro}{\newcaptionstyle}
+% \changes{v2.2f}{2020/09/28}{Uses \cs{captiontwo at Error} instead of \cs{PackageError} now}
 % \begin{macro}{\renewcaptionstyle}
+% \changes{v2.2f}{2020/09/28}{Uses \cs{captiontwo at Error} instead of \cs{PackageError} now}
 % These macros will define a new caption style. \cs{newcaptionstyle} and \cs{renewcaptionstyle}
 % will additionally check if the caption style already exists or not.
 %    \begin{macrocode}
@@ -359,7 +371,7 @@
   \expandafter\ifx\csname caption@@#1\endcsname\relax
     \expandafter\defcaptionstyle
   \else
-    \PackageError{caption2}{Caption style `#1' already defined}{\caption at eh}%
+    \captiontwo at Error{Caption style `#1' already defined}%
     \expandafter\@gobbletwo
   \fi
   {#1}}
@@ -367,7 +379,7 @@
 %    \begin{macrocode}
 \newcommand*\renewcaptionstyle[1]{%
   \expandafter\ifx\csname caption@@#1\endcsname\relax
-    \PackageError{caption2}{Caption style `#1' undefined}{\caption at eh}%
+    \captiontwo at Error{Caption style `#1' undefined}%
     \expandafter\@gobbletwo
   \else
     \expandafter\defcaptionstyle
@@ -379,6 +391,7 @@
 % \end{macro}
 %
 % \begin{macro}{\dummycaptionstyle}
+% \changes{v2.2f}{2020/09/28}{Uses \cs{captiontwo at Error} instead of \cs{PackageError} now}
 % This macro will also define a new caption style, but a one which is based on the
 % actual set caption style. Therefore you can't set a caption style made with this
 % command with \cs{captionstyle} -- we check this to avoid an endless recursion.
@@ -387,11 +400,11 @@
   \defcaptionstyle{#1}{%
     \expandafter\ifx\csname caption@@\caption at style\expandafter\endcsname%
                     \csname caption@@#1\endcsname
-      \PackageError{caption2}{You can't use the caption style `#1' directy}{%
-        The caption style `#1' is only a dummy and does not really exists.%
-        \MessageBreak You have to redefine it (with \protect\renewcaptionstyle)
-        before you can select\MessageBreak it with \protect\captionstyle.
-        \space\caption at eh}%
+      \captiontwo at Error
+        [The caption style `#1' is only a dummy and does not really exists.%
+         \MessageBreak You have to redefine it (with \protect\renewcaptionstyle)
+         before you can select\MessageBreak it with \protect\captionstyle.\space]%
+        {You can't use the caption style `#1' directy}%
     \else
       #2\usecaptionstyle\caption at style
     \fi}}
@@ -399,12 +412,13 @@
 % \end{macro}
 %
 % \begin{macro}{\captionstyle}
+% \changes{v2.2f}{2020/09/28}{Uses \cs{captiontwo at Error} instead of \cs{PackageError} now}
 % \cs{captionstyle} sets the actual caption style. It includes a check if the given caption
 % style is defined or not.
 %    \begin{macrocode}
 \newcommand*\captionstyle[1]{%
   \expandafter\ifx\csname caption@@#1\endcsname\relax
-    \PackageError{caption2}{Undefined caption style `#1'}{\caption at eh}%
+    \captiontwo at Error{Undefined caption style `#1'}%
   \else
     \def\caption at style{#1}%
   \fi}
@@ -824,22 +838,22 @@
 % \end{macro}
 %
 % \begin{macro}{\usecaptionstyle}
+% \changes{v2.1b}{2004/04/16}{Missing percent added (and extra space removed)}
+% \changes{v2.2}{2007/04/06}{\cs{let}\cs{caption at make}\cs{caption at makecaption} added}
+% \changes{v2.2f}{2020/09/28}{Uses \cs{captiontwo at Error} instead of \cs{PackageError} now}
 % First we check if we are inside a caption -- if \cs{captiontext} is undefined we are not.
 % If we are we call the appropriate caption definition.
-%
-% \changes{v2.1b}{2004/04/16}{Missing percent added (and extra space removed)}
-% \changes{v2.2}{2007/04/06}{\cs{let}\cs{caption at make}\cs{caption at makecaption} added}
 %    \begin{macrocode}
 \newcommand*\usecaptionstyle[1]{%
   \caption at ifundefined\captiontext{%
-    \PackageError{caption2}{You can't use \protect#1
-      in normal text}{The usage of \protect#1 is only
-      allowed inside code declared with\MessageBreak \protect\defcaptionstyle,
-      \protect\newcaptionstyle \space or \protect\renewcaptionstyle.
-      \space\caption at eh}
+    \captiontwo at Error
+      [The usage of \protect#1 is only
+       allowed inside code declared with\MessageBreak \protect\defcaptionstyle,
+       \protect\newcaptionstyle \space or \protect\renewcaptionstyle.\space]%
+      {You can't use \protect#1 in normal text}%
   }{%
     \@ifundefined{caption@@#1}%
-      {\PackageError{caption2}{Caption style `#1' undefined}{\caption at eh}}%
+      {\captiontwo at Error{Caption style `#1' undefined}}%
       {\let\caption at make\caption at makecaption
        \@nameuse{caption@@#1}}%
   }}
@@ -1301,12 +1315,13 @@
 % \end{macro}
 %
 % \begin{macro}{\subcapstyle}
+% \changes{v2.2f}{2020/09/28}{Uses \cs{captiontwo at Error} instead of \cs{PackageError} now}
 % Analogous to \cs{captionstyle} we define \cs{subcapstyle}
 % and set it (via \cs{setsubcapstyle}) to a appropriate value.
 %    \begin{macrocode}
     \newcommand*\subcapstyle[1]{%
       \expandafter\ifx\csname caption@@#1\endcsname\relax
-        \PackageError{caption2}{Undefined caption style `#1'}{\caption at eh}%
+        \captiontwo at Error{Undefined caption style `#1'}%
       \else
         \def\caption at substyle{#1}%
       \fi}

Modified: trunk/Master/texmf-dist/source/latex/caption/caption3.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/caption/caption3.dtx	2020-10-26 20:58:23 UTC (rev 56770)
+++ trunk/Master/texmf-dist/source/latex/caption/caption3.dtx	2020-10-26 20:58:40 UTC (rev 56771)
@@ -32,12 +32,12 @@
 %   caption-deu.tex, caption-eng.tex, caption-rus.tex.
 % 
 % \fi
-% \CheckSum{3648}
+% \CheckSum{3674}
 %
 % \iffalse
 %<*driver>
 \NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesFile{caption3.drv}[2020/09/12 v2.1 Implementation of the caption kernel]
+\ProvidesFile{caption3.drv}[2020/10/11 v2.2 Implementation of the caption kernel]
 \hbadness=9999 \newcount\hbadness \hfuzz=100pt % Make TeX shut up.
 %\errorcontextlines=3
 %
@@ -84,7 +84,7 @@
 %
 % \newcommand*\csmarg[1]{\texttt{\char`\{#1\char`\}}}
 % \newcommand*\csoarg[1]{\texttt{\char`\[#1\char`\]}}
-% \newcommand*\version[2][]{\textit{v#2}}
+% \newcommand*\version[2][]{v$#2$}
 %
 % \GetFileInfo{caption3.drv}
 % \let\docdate\filedate
@@ -117,6 +117,56 @@
 % \package{subfig} packages.
 % \end{abstract}
 % 
+% \section*{Internal commands}
+%
+% These internal commands are save to use by other packages as well
+% since their interface will not change in future releases:
+% \begin{quote}\begin{tabular}{ll}
+%   Internal command            & Currently used by  \\
+% \hline
+%   |\caption at addcontentsline|  & \package{floatrow} \\
+%   |\caption at fnun|             & \package{floatrow} \\
+%   |\caption at ifinlist|         & \package{floatrow} \\
+%   |\caption at iftop|            & \package{keyfloat}, \package{subfig} \\
+%   |\caption at make|             & \package{subfig}   \\
+%   |\caption@@make|            & \package{floatrow} \\
+%   |\caption at setautoposition|  & \package{bidi}     \\
+%   |\caption at setoptions|       & \package{floatrow} \\
+%   |\caption at setposition|      & \package{floatrow} \\
+%   |\caption at switchdefault|    & \emph{none}        \\
+% \end{tabular}\end{quote}
+%
+% If your package wants to use any other internal command of the \package{caption3} package,
+% please write me an e-mail so we can define a proper interface together.
+%
+% Unfortunately these internal commands are used by other packages and therefore will likely
+% not change in the future, too, but I do not support them (and maybe I will change them anyway
+% and patch the other package on-the-fly instead, at least if it's unmaintained):
+% \begin{quote}\begin{tabular}{ll}
+%   Internal command            & Currently used by  \\
+% \hline
+%   |\caption at hangindent     |  & \package{bidi}     \\
+%   |\caption@@@make|           & \package{floatrow} \\
+%   |\caption@@par|             & \package{bidi}     \\
+%   |\caption at parindent|        & \package{bidi}     \\
+%   |\caption at set@bool|         & \package{floatrow} \\
+%   |\caption at setfont|          & \package{floatrow} \\
+%   |\caption at setkeys|          & \package{floatrow} \\
+%   |\caption at setstyle*|        & \package{floatrow} \\
+% \hline
+%   |\caption at hj@|\meta{name}   & \package{floatrow} \\
+%   |\caption at lsep@|\meta{name} & \package{floatrow} \\
+%   |\caption at lsep@default|     & \package{babel-hungarian} \\
+%   |\caption at sty@|\meta{name}  & \package{floatrow} \\
+% \end{tabular}\end{quote}
+%
+% Furthermore the \package{floatrow} package uses the undocumented option
+% |position=a| (as abbreviation of |position=auto|).
+%
+% The \package{lwarp} package uses a lot of internal commands as well,
+% but we are working on it on the Git branch \texttt{feature/lwarp}:
+% \url{https://gitlab.com/axelsommerfeldt/caption/-/tree/feature/lwarp}
+%
 % \StopEventually{}
 % \clearpage
 % \tableofcontents
@@ -192,7 +242,7 @@
 %
 %    \begin{macrocode}
 \NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption3}[2020/09/17 v2.1b caption3 kernel (AR)]
+\ProvidesPackage{caption3}[2020/10/21 v2.2e caption3 kernel (AR)]
 %    \end{macrocode}
 %
 % \section{Generic helpers}
@@ -199,10 +249,10 @@
 %
 % \begin{macro}{\@nameundef}
 %   |\@nameundef|\marg{command name}\\
-%   is the opposite to |\@namedef| which is offered by the \LaTeX\ kernel.
+%   is the opposite to |\@name|\-|def| which is offered by the \LaTeX\ kernel.
 %   We use it to remove the definition of some commands and keyval options after
 %   |\begin{document}| (to save \TeX\ memory) and to remove caption options defined
-%   with |\captionsetup|\oarg{type}.
+%   with |\caption|\-|setup|\oarg{type}.
 %    \begin{macrocode}
 \providecommand*\@nameundef[1]{%
   \expandafter\let\csname #1\endcsname\@undefined}
@@ -223,7 +273,9 @@
 % \end{macro}
 %
 % \begin{macro}{\bothIfFirst}
+% \changes{v2.2}{2020/09/21}{Usage of \cs{caption at prepare@bothif} added}
 % \begin{macro}{\bothIfSecond}
+% \changes{v2.2}{2020/09/21}{Usage of \cs{caption at prepare@bothif} added}
 %   |\bothIfFirst|\marg{code no. 1}\marg{code no. 2}\\
 %   |\bothIfSecond|\marg{code no. 1}\marg{code no. 2}\\
 %   |\bothIfFirst| tests if the first argument is not empty, |\bothIfSecond|
@@ -230,22 +282,35 @@
 %   tests if the second argument is not empty. If yes both arguments get
 %   typeset, otherwise none of them.
 %    \begin{macrocode}
-\def\bothIfFirst#1#2{%
-  \protected at edef\caption at tempa{#1}%
-  \ifx\caption at tempa\@empty \else
-    #1#2%
-  \fi}
+\def\bothIfFirst#1#2{\caption at bothif{#1}{#1#2}}
 %    \end{macrocode}
 %    \begin{macrocode}
-\def\bothIfSecond#1#2{%
-  \protected at edef\caption at tempa{#2}%
+\def\bothIfSecond#1#2{\caption at bothif{#2}{#1#2}}
+%    \end{macrocode}
+%    \begin{macrocode}
+\newcommand*\caption at bothif[2]{%
+  \begingroup
+    \caption at prepare@bothif
+    \protected at xdef\caption at tempa{#1}%
+  \endgroup
   \ifx\caption at tempa\@empty \else
-    #1#2%
+    #2%
   \fi}
 %    \end{macrocode}
 % \end{macro}
 % \end{macro}
 %
+% \begin{macro}{\caption at prepare@bothif}
+% \changes{v2.2}{2020/09/21}{This macro added}
+%   |\caption at prepare@bothif|\\
+%   re-defines anything which could disturb either |\both|\-|If|\-|First| or |\both|\-|If|\-|Second| check.
+%    \begin{macrocode}
+\providecommand*\caption at prepare@bothif{}
+\g at addto@macro\caption at prepare@bothif{%
+  \let\inputencoding\@gobble}
+%    \end{macrocode}
+% \end{macro}
+%
 % \begin{macro}{\caption at ifundefined}
 % \changes{v1.3a}{2011/08/12}{This macro added}
 % \changes{v1.3b}{2011/08/18}{Made expandable}
@@ -612,16 +677,17 @@
 % \changes{v1.0j}{2007/01/20}{This macro added, will now be used for errors}
 % \changes{v1.0o}{2007/04/11}{Renamed from \cs{caption at error} to \cs{caption at Error}}
 % \changes{v1.1b}{2007/09/18}{Usage of \cs{caption at Package} removed}
+% \changes{v2.2a}{2020/09/28}{\cs{caption at eh} renamed to \cs{caption@@eh} and revised}
 %   |\caption at Error|\marg{message}\\
 %   issues an error message (with code line indication).
 %    \begin{macrocode}
 \newcommand*\caption at Error[1]{%
-  \PackageError{caption}{#1}\caption at eh}
+  \PackageError{caption}{#1}{\caption@@eh{caption}}}
 %    \end{macrocode}
 %    \begin{macrocode}
-\newcommand*\caption at eh{%
+\newcommand*\caption@@eh[1]{%
   If you do not understand this error, please take a closer look\MessageBreak
-  at the documentation of the `caption' package, especially the\MessageBreak
+  at the documentation of the `#1' package, especially the\MessageBreak
   section about errors.\MessageBreak\@ehc}
 %    \end{macrocode}
 % \end{macro}
@@ -729,7 +795,7 @@
 %
 % \begin{macro}{\ifcaptionsetup at star}
 % \changes{v1.2a}{2008/01/12}{This macro added}
-%   If the starred form of |\captionsetup| is used, this will be set to |true|.
+%   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
@@ -1225,9 +1291,12 @@
 %   expands to \meta{yes-code} if the \meta{value} expands to `default',
 %   and to \meta{no-code} otherwise.
 %    \begin{macrocode}
-\newcommand*\caption at ifdefault[1]{%
+\newcommand*\caption at ifdefault{\caption at ifequal{default}}
+%    \end{macrocode}
+%    \begin{macrocode}
+\newcommand*\caption at ifequal[2]{%
   \edef\caption at tempa{#1}%
-  \def\caption at tempb{default}%
+  \edef\caption at tempb{#2}%
   \ifx\caption at tempa\caption at tempb
     \expandafter\@firstoftwo
   \else
@@ -1296,6 +1365,24 @@
 %    \end{macrocode}
 % \end{macro}
 %
+% \begin{macro}{\SetCaptionFallback}
+% \changes{v2.2}{2020/09/21}{This macro added}
+%   |\SetCaptionFallback|\marg{option}\marg{name}\\
+%   sets the fallback value for the \meta{option}.
+%    \begin{macrocode}
+\newcommand*\SetCaptionFallback{%
+  \caption at maparg\caption@@setfallback}
+\@onlypreamble\SetCaptionFallback
+%    \end{macrocode}
+%    \begin{macrocode}
+\newcommand*\caption@@setfallback[3]{%
+  \caption at ifequal{fallback}{#3}%
+    {\caption at Error{Invalid argument for \string\SetCaptionFallback: `#3'}}% would cause an infinite loop otherwise
+    {\caption@@set{#1}{#2 at fallback}{#3}}}
+\@onlypreamble\caption@@setfallback
+%    \end{macrocode}
+% \end{macro}
+%
 % \begin{macro}{\caption at decl@package}
 % \changes{v2.0}{2020/07/26}{This macro added}
 %   |\caption at decl@package|\marg{option}\marg{cmd}\oarg{package}\marg{name}\ldots\\
@@ -1529,9 +1616,9 @@
 %    \end{macrocode}
 % \end{macro}
 %
-% \begin{macro}{\caption at counter}
+% \begin{macro}{\caption at thecounter}
 % \changes{v1.0n}{2007/04/03}{This counter added}
-% \changes{v1.1e}{2007/10/28}{Renamed to \cs{caption at thecounter}; \cs{caption at stepcounter} 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}}
 %   Internal counter.
 %   At the moment it will be used inside |\caption at if|\-|odd|\-|page| only.
@@ -1541,7 +1628,7 @@
 %    \begin{macrocode}
 \newcommand*\caption at stepthecounter{%
   \@tempcnta\caption at thecounter
-  \advance\@tempcnta\@ne
+  \advance\@tempcnta\@ne\relax
   \xdef\caption at thecounter{\the\@tempcnta}}
 %    \end{macrocode}
 % \end{macro}
@@ -1862,8 +1949,8 @@
   \colorbox{\caption at boxcolor}{%
     \setlength\caption at tempdima{#1}%
     \addtolength\caption at tempdima{-2\fboxsep}%
-    \linewidth\caption at tempdima
-    \hsize\caption at tempdima
+    \linewidth\caption at tempdima\relax
+    \hsize\caption at tempdima\relax
     #2}}
 \DeclareCaptionOption{boxcolor}{\def\caption at boxcolor{#1}}
 \DeclareCaptionOption{boxsep}{\setlength\fboxsep{#1}}
@@ -1938,8 +2025,8 @@
        The option `labelsep=\caption at labelsep@name' does not work\MessageBreak
        with `format=hang'}}%
     {\@hangfrom{#1#2}%
-     \advance\caption at parindent\hangindent
-     \advance\caption at hangindent\hangindent
+     \advance\caption at parindent\hangindent\relax
+     \advance\caption at hangindent\hangindent\relax
      \caption@@par#3\par}}
 %    \end{macrocode}
 %
@@ -1991,12 +2078,13 @@
 \DeclareCaptionLabelFormat{original}{%
   \caption at ifdefined\caption at original@fnum
     {\caption at original@fnum}%
-    {\caption at labelformat@simple{#1}{#2}}}
+    {\caption at labelformat@fallback{#1}{#2}}}
 %    \end{macrocode}
 %
-% `default' usually maps to `original'.
+% `default' usually maps to `original' resp. `simple'.
 %    \begin{macrocode}
 \SetCaptionDefault{labelformat}{original}
+\SetCaptionFallback{labelformat}{simple}
 %    \end{macrocode}
 %
 % \section{Label separators}
@@ -2094,8 +2182,9 @@
 \DeclareCaptionOption{labelseparator}{\caption at set{labelseparator}{#1}}
 %    \end{macrocode}
 %
-% \changes{v1.0e}{2005/06/11}{Bugfix 05-03-23: Caption label separator \opt{newline} implementation changed from \cs{newline} to \cs{\textbackslash}}
+% \changes{v1.0e}{2005/06/11}{Caption label separator \opt{newline} implementation changed from \cs{newline} to \cs{textbackslash}}
 % \changes{v1.0f}{2005/08/24}{Caption label separator \opt{endash} added}
+% \changes{v1.12}{2020/05/30}{Caption label separator \opt{newline} implementation changed from \cs{textbackslash} to \cs{captionnewline}}
 % There are seven pre-defined label separators, called `none', `colon', `period', `space',
 % `quad', `newline', and `endash'.
 %    \begin{macrocode}
@@ -2105,10 +2194,35 @@
 \DeclareCaptionLabelSeparator{space}{ }
 \DeclareCaptionLabelSeparator*{quad}{\quad}
 \DeclareCaptionLabelSeparator*{newline}{\captionnewline}
+% TODO: \DeclareCaptionLabelSeparator should detect on its own if it contains \captionnewline or not
 \caption at LabelSeparatorWithNewline{newline} % does not work with "format=hang"
 \DeclareCaptionLabelSeparator*{endash}{\space\textendash\space}
 %    \end{macrocode}
 %
+% \changes{v2.2c}{2020/10/10}{Caption label separators \opt{gobble} and \opt{gobbletwo} added}
+%
+% It's a common hack to mis-use |\fnum at figure| and |\fnum at table| to replace the caption
+% label separator, for example changing the separator to a period plus space with
+% \begin{quote}
+%   |\renewcommand\fnum at figure[1]{\figurename~\thefigure.}|
+% \end{quote}
+% or dropping the label and separator completely with
+% \begin{quote}
+%   |\renewcommand\fnum at figure[1]{\ignorespaces}|\quad
+% \end{quote}
+% (taken from \url{http://compgroups.net/comp.text.tex/figure-without-caption/1915079}).
+%
+% 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|)
+% so these hacks still work if the \package{caption} package is loaded.
+%
+% These are the label separators used when one or two tokens after the label format
+% should be dropped, called `gobble' and `gobbletwo':
+%    \begin{macrocode}
+\DeclareCaptionLabelSeparator{gobble}{ }
+\DeclareCaptionLabelSeparator{gobbletwo}{}
+%    \end{macrocode}
+%
 % \begin{macro}{\captionnewline}
 % \changes{v1.12}{2020/05/30}{This macro added}
 % \changes{v2.0}{2020/07/31}{\cs{relax} added to definition}
@@ -2358,6 +2472,15 @@
 \SetCaptionDefault{textfont}{none}
 %    \end{macrocode}
 %
+% The \package{floatrow} package uses the fonts `footfont` and `@tempa` additionally,
+% so we need to map and define the default value for them, too.
+%    \begin{macrocode}
+\caption at setmapping{footfont}{font}
+\SetCaptionDefault{footfont}{none}
+\caption at setmapping{@tempa}{font}
+\SetCaptionDefault{@tempa}{none}
+%    \end{macrocode}
+%
 % \begin{macro}{\caption at smaller}
 %   |\caption at smaller|\\
 %   selects a font size which is smaller than the current one.
@@ -2612,9 +2735,6 @@
 % \changes{v2.0}{2020/07/27}{Uses \cs{caption at set} now}
 %   |\caption at setposition|\marg{position}\\
 %   puts |\caption at position| to the right value.
-%   \emph{Please do \textbf{not} use the internal macro
-%     \cs{caption at position} in your own package or document, but use the
-%     wrapper command \cs{caption at iftop} instead.}\par
 %   (Note: Since this command is used by the \package{floatrow} package as well
 %    its syntax should not change.)
 %    \begin{macrocode}
@@ -3093,7 +3213,7 @@
 }
 %    \end{macrocode}
 %
-% \subsection{The french babel option}
+% \subsection{The babel-french package}
 % \changes{v1.1}{2006/05/14}{\package{frenchb} babel support added}
 % \changes{v2.0}{2020/08/01}{\package{french} babel support updated}
 %
@@ -3131,7 +3251,10 @@
 % in order to avoid problems when |Auto|\-|Space|\-|Punctuation| is set to |false|.
 %
 %    \begin{macrocode}
-  \DeclareCaptionLabelSeparator{colon}{\autospace at beforeFDP : }%
+  \ifFB at active@punct
+    \DeclareCaptionLabelSeparator{colon}{%
+      \ifFBfrench\penalty\@M\FBcolonspace\fi : }%
+  \fi
 %    \end{macrocode}
 %
 % We switch the default label separator to `french', dependant on the switches
@@ -3215,7 +3338,7 @@
 }{}
 %    \end{macrocode}
 %
-% \subsection{The hungarian \& magyar babel option}
+% \subsection{The babel-hungarian package}
 % \changes{v1.3}{2009/03/29}{\package{magyar} babel support added}
 % \changes{v1.3a}{2011/08/12}{\package{magyar} babel support revised}
 % \changes{v1.8b}{2018/08/26}{\package{magyar} babel support revised}
@@ -3388,84 +3511,6 @@
 %    \end{macrocode}
 % \end{macro}
 %
-% \subsection{The floatrow package}
-% \changes{v2.0}{2020/07/28}{Adaptions to the \package{floatrow} package added}
-%
-% Since the \package{floatrow} package is not maintained anymore,
-% we have to make adaptions to \thispackage~\version{2.0} here.
-% Please note that we only support the version $0.3b$ of the \package{floatrow} package,
-% so older versions do not work with this version of \thispackage, and newer
-% versions are expected to be adapted.
-%
-%    \begin{macrocode}
-\caption at AtBeginDocument{%
-  \def\@tempa{2008/08/02 v0.3b floatrow: float package extension}%
-  \expandafter\ifx\csname ver at floatrow.sty\endcsname\@tempa
-    \caption at InfoNoLine{floatrow package v0.3b is loaded}%
-%    \end{macrocode}
-%
-% \begin{macro}{\captionlabel}
-%   |\caption at format| needs to be expanded prior the use of |\caption@@@make|.
-%    \begin{macrocode}
-    \renewcommand\captionlabel[1]{{% l.559
-      \def\FR at tmp{\@captype}%
-      \ifnum\floatbox at depth>\@ne
-        \def\FR at tmp{sub\@captype}\caption at setsubtype*{\FR at tmp}\stepcounter{\FR at tmp}%
-      \fi
-      \caption at format % <= This line added
-      \caption@@@make{\caption at fnum\FR at tmp}{#1}}}
-%    \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\flrow at setstyle}
-%   This patch isn't working since |\flrow at setstyle| will be used by
-%   \package{floatrow} right after loading \package{caption3}.
-%   For this reason we still define |\caption at sty@|\meta{name} in
-%   |\Declare|\-|Caption|\-|Style| instead.
-%    \begin{macrocode}
-%   \renewcommand*\flrow at setstyle[1]{% l.986
-%     \@ifundefined{flrow at sty@#1}%
-%       {\flrow at error{Undefined float style `#1'}}%
-%       {\FBstyle at reset
-%        \def\flrow at capsetup{%
-%           \caption at ifdecl{style}{#1}{\caption at setstyle*{#1}}{}%
-%           \caption at setoptions{#1}}%
-%        \flrow at esetup{\csname flrow at sty@#1\endcsname}}}
-%    \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\flrow at FBoAlign}
-%   This patch isn't working since |\flrow at FBoAlign| will be used by
-%   \package{floatrow} right after loading \package{caption3}.
-%   For this reason we still define |\caption at hj@|\meta{name} in
-%   |\Declare|\-|Caption|\-|Justification| instead.
-%    \begin{macrocode}
-%   \renewcommand*\flrow at FBoAlign[1]{% l.1168
-%     \caption at ifdecl{justification}{#1}%
-%       {\expandafter\let\expandafter\floatobjectset
-%          \csname caption at justification@#1\endcsname}%
-%       {\flrow at error{Undefined object setting `#1'}}}%
-%    \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\flrow at setFRsep}
-%   This patch isn't working since |\flrow at setFRsep| will be used by
-%   \package{floatrow} right after loading \package{caption3}.
-%   For this reason we still define |\caption at lsep@|\meta{name} in
-%   |\Declare|\-|Caption|\-|Label|\-|Separator| instead.
-%    \begin{macrocode}
-%   \renewcommand*\flrow at setFRsep[2]{% l.1187
-%     \caption at ifdecl{labelseparator}{#2}%
-%       {\@nameuse{caption at labelseparator@#2}% defines \caption at labelsep
-%        \let#1\caption at labelsep}%
-%       {\flrow at error{Undefined float separator `#2'}}}%
-%    \end{macrocode}
-% \end{macro}
-%
-%    \begin{macrocode}
-  \fi}
-%    \end{macrocode}
-%
 % \subsection{The newfloat package}
 %
 % \begin{macro}{\caption at newfloat}
@@ -3626,6 +3671,7 @@
     \caption at InfoNoLine{subfig package v1.3 is loaded}%
 %    \end{macrocode}
 %    \begin{macrocode}
+    \def\caption at eh{\caption@@eh{subfig}}%
     \let\caption at setfloattype\@gobble
     \let\@dottedxxxline\sf at NEW@dottedxxxline
     \let\sf at subfloat\sf at NEW@subfloat
@@ -3670,7 +3716,7 @@
     \let\sf at oldlabel=\label
     \let\label=\subfloat at label
     \ifmaincaptiontop\else
-      \advance\@nameuse{c@\@captype}\@ne
+      \advance\@nameuse{c@\@captype}\@ne\relax
     \fi
     \refstepcounter{sub\@captype}%
     \setcounter{sub\@captype @save}{\value{sub\@captype}}%
@@ -3857,9 +3903,9 @@
     \caption at calcmargin
     \caption at tempdima\captionmargin
     \ifdim\captionmargin@=\z@ \else
-      \caption at ifoddpage{}{\advance\caption at tempdima\captionmargin@}%
+      \caption at ifoddpage{}{\advance\caption at tempdima\captionmargin@\relax}%
     \fi
-    \caption at ifhmode{\advance\caption at tempdima\caption at indent}%
+    \caption at ifhmode{\advance\caption at tempdima\caption at indent\relax}%
     \hspace\caption at tempdima
 %    \end{macrocode}
 %   We actually use a |\vbox| of width |\captionwidth - \caption at indent|
@@ -3868,7 +3914,7 @@
 %   was defined with \cs{DeclareCaptionFormat*}.}
 %    \begin{macrocode}
     \caption at tempdima\captionwidth
-    \caption at ifhmode{\advance\caption at tempdima-\caption at indent}%
+    \caption at ifhmode{\advance\caption at tempdima-\caption at indent\relax}%
     \caption at parbox\caption at tempdima{%
 %    \end{macrocode}
 %   Typeset the indention (option |indention=|)\\
@@ -3890,7 +3936,7 @@
 %    \begin{macrocode}
     \caption at tempdima\captionmargin
     \ifdim\captionmargin@=\z@ \else
-      \caption at ifoddpage{\advance\caption at tempdima\captionmargin@}{}%
+      \caption at ifoddpage{\advance\caption at tempdima\captionmargin@\relax}{}%
     \fi
     \hspace\caption at tempdima
 %    \end{macrocode}
@@ -3935,14 +3981,14 @@
 %    \end{macrocode}
 %    \begin{macrocode}
   \ifdim\captionwidth=\z@
-    \captionwidth\hsize
-    \advance\captionwidth by -2\captionmargin
-    \advance\captionwidth by -\captionmargin@
+    \captionwidth\hsize\relax
+    \advance\captionwidth by -2\captionmargin\relax
+    \advance\captionwidth by -\captionmargin@\relax
   \else
-    \captionmargin\hsize
-    \advance\captionmargin by -\captionwidth
-    \divide\captionmargin by 2
-    \captionmargin@\z@
+    \captionmargin\hsize\relax
+    \advance\captionmargin by -\captionwidth\relax
+    \divide\captionmargin by 2\relax
+    \captionmargin@\z@\relax
   \fi
 %    \end{macrocode}
 %    \begin{macrocode}
@@ -3959,9 +4005,9 @@
 %
 % \begin{macro}{\caption at slc}
 % \changes{v1.1}{2007/06/13}{\cs{let}\cs{caption at justification}\cs{relax} added}
-% \changes{v1.1}{2007/07/29}{\cs{caption at setup}\cs{\caption at sls} added after \cs{begingroup}}
+% \changes{v1.1}{2007/07/29}{\cs{caption at setup}\cs{caption at sls} added after \cs{begingroup}}
 % \changes{v1.1}{2007/07/29}{\cs{caption at calcmargin} added}
-% \changes{v1.1c}{2007/10/14}{\cs{caption at setup}\cs{\caption at opt@SingleLine} outsourced to \cs{caption at SingleLine}}
+% \changes{v1.1c}{2007/10/14}{\cs{caption at setup}\cs{caption at opt@SingleLine} outsourced to \cs{caption at SingleLine}}
 % \changes{v1.3}{2010/09/04}{Split into \cs{caption at slc} and \cs{caption@@slc}}
 % \changes{v1.5}{2012/12/26}{Merged into a single macro again}
 % \changes{v1.5}{2013/04/14}{Usage of \cs{ifsinglelinecaption} added}
@@ -4143,18 +4189,44 @@
 % \changes{v1.3}{2010/11/01}{Bugfix: If the caption text is empty, the text format will be set to \opt{simple} now}
 % \changes{v1.7}{2016/02/01}{Bugfix: \cs{relax} added before \cs{caption at lsep} so the label separator will not be gobbled if the label font command ignores spaces, e.g. by usage of \cs{color}}
 % \changes{v1.8}{2018/09/12}{\cs{par} replaced by \cs{caption at textend}}
+% \changes{v2.2c}{2020/10/10}{Usage of the label separators \opt{gobble} and \opt{gobbletwo} added}
+% \changes{v2.2e}{2020/10/21}{Adaptions to \package{floatrow} package added}
 %   |\caption@@@make|\marg{caption label}\marg{caption text}\\
 %   This one finally typesets the caption paragraph, without margin and indention.
 %    \begin{macrocode}
 \newcommand\caption@@@make[2]{%
 %    \end{macrocode}
-%   If the label is empty, we use no caption label separator.
+% The \package{floatrow} package uses |\caption@@@make|, too,
+% but without using |\caption at single|\-|line| or |\caption at multi|\-|line|.
+% For this reason we must expand |\caption at format| if |\caption at fmt| isn't defined yet.
+% Furthermore it uses |\caption at lfmt| as argument which was renamed to
+% |\caption at label|\-|format| in \package{caption3}\version{2.0}.
 %    \begin{macrocode}
-  \sbox\@tempboxa{#1}%
+  \ifx\caption at fmt\@undefined\caption at format\fi
+  \let\caption at lfmt\caption at labelformat
+%    \end{macrocode}
+%   If the label is empty, we use the label separator `none'.
+%   Futhermore we use this check to determine if |#1| ends with either
+%   |\@gobble|, |\@gobble|\-|two|, and/or |\ignore|\-|spaces|.
+%   If yes, we use the corresponding label separator.
+%    \begin{macrocode}
+  \global\def\caption at tempa{gobbletwo}%
+  \global\def\caption at tempb{}%
+  \sbox\@tempboxa{%
+    \let\caption at ignorespaces\ignorespaces
+    \def\ignorespaces{%
+      \global\def\caption at tempb{two}% "gobble" -> "gobbletwo" if \ignorespaces is used addtionally
+      \caption at ignorespaces}%
+    #1%
+      {\global\let\caption at tempa\@undefined\aftergroup\@gobble}%
+      {\global\def\caption at tempa{gobble\caption at tempb}}}%
   \ifdim\wd\@tempboxa=\z@
-    \caption at set{labelseparator}{none}%
+    \gdef\caption at tempa{none}%
 %   \@capbreakfalse
   \fi
+  \ifx\caption at tempa\@undefined \else
+    \@expandtwoargs\caption at set{labelseparator}{\caption at tempa}%
+  \fi
 %    \end{macrocode}
 %   If the text is empty, we use no caption label separator, too.
 %   (And no text format either.)
@@ -4181,7 +4253,7 @@
     {\ifcaption at star\else
        \begingroup
          \captionlabelfont
-         #1%
+         #1\relax\relax
        \endgroup
      \fi}%
     {\ifcaption at star\else
@@ -4385,7 +4457,7 @@
 %   Check if the sub-type was already defined by |\Declare|\-|Sub|\-|Type|.
 %   If not, define the counter and list entry.
 %    \begin{macrocode}
-  \caption at ifin@list\caption at subtypelist{#4}%
+  \caption at ifsubtype{#4}%
     {\caption at Debug{Modify subtype `#4'}}%
     {\caption at Debug{New subtype `#4'}%
      \newcounter{#4}[{#3}]%
@@ -4519,53 +4591,26 @@
 %    \end{macrocode}
 % \end{macro}
 %
-% Unfortunately the \class{memoir} document class resets the
-% \texttt{subfigure} resp.~\texttt{subtable} counter at the begin
-% of floating environments, i.e.~at |\@float|.
-% As a side-effect |\continued|\-|float| does not work correctly.
-% For that reason we need to introduce macros to save and restore
-% all sub-caption counters here.
-%
-% \begin{macro}{\caption at savesubcounters}
-% \changes{v1.5}{2013/05/01}{This macro added}
+% \begin{macro}{\@memresetsubcounter}
+% \changes{v1.5}{2013/05/01}{The macro \cs{caption at savesubcounters} added}
 % \changes{v1.13}{2020/07/28}{Uses \cs{caption at for@list} now for iterating the list}
-%   |\caption at save|\-|sub|\-|counters|\\
-%   saves all sub-caption counters,
-%   so they can be restored with |\caption at restore|\-|counters| later on.
+% \changes{v2.2b}{2020/10/06}{This stuff replaced by a patch of \cs{@memresetsubcounter}}
+%   The \class{memoir} document class resets the \texttt{subfigure}
+%   resp.~\texttt{subtable} counter at the begin of floating environments using
+%   |\@mem|\-|reset|\-|sub|\-|counter|.
+%   As a side-effect |\continued|\-|float| does not work correctly.
+%   For that reason we need to patch |\@mem|\-|reset|\-|sub|\-|counter| here,
+%   suppressing the counter reset if the counter was defined with
+%   |\Declare|\-|Caption|\-|Sub|\-|Type|.
 %    \begin{macrocode}
-\newcommand*\caption at savesubcounters{%
-  \caption at for@list\caption at subtypelist{\caption at savecounter{##1}}}
+\caption at ifdefined\@memresetsubcounter
+  {\let\caption at memresetsubcounter\@memresetsubcounter
+   \renewcommand*\@memresetsubcounter[1]{%
+     \caption at ifsubtype{sub#1}\@gobble\caption at memresetsubcounter{#1}}}%
+  {}
 %    \end{macrocode}
 % \end{macro}
 %
-% \begin{macro}{\caption at savecounter}
-% \changes{v1.5}{2013/05/01}{This macro added}
-%   |\caption at save|\-|counter|\marg{counter}\\
-%   saves the given counter, so it can be restored with
-%   |\caption at restore|\-|counters| later on.
-%    \begin{macrocode}
-\newcommand*\caption at savecounter[1]{%
-  \edef\caption at tempa{%
-    \noexpand\l at addto@macro\noexpand\caption at restore@counters
-      {\noexpand\setcounter{#1}{\number\value{#1}}}}%
-  \caption at tempa}
-%    \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\caption at restorecounters}
-% \changes{v1.5}{2013/05/01}{This macro added}
-%   |\caption at restore|\-|counters|
-%   restores all counters saved with |\caption at save|\-|counter|.
-%    \begin{macrocode}
-\newcommand*\caption at restorecounters{%
-  \caption at restore@counters
-  \global\let\caption at restore@counters\@empty}
-%    \end{macrocode}
-%    \begin{macrocode}
-\newcommand*\caption at restore@counters{}
-%    \end{macrocode}
-% \end{macro}
-%
 % \section{Execution of options}
 %
 %    \begin{macrocode}

Modified: trunk/Master/texmf-dist/source/latex/caption/ltcaption.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/caption/ltcaption.dtx	2020-10-26 20:58:23 UTC (rev 56770)
+++ trunk/Master/texmf-dist/source/latex/caption/ltcaption.dtx	2020-10-26 20:58:40 UTC (rev 56771)
@@ -79,7 +79,7 @@
 %
 % \def\thispackage{the \package{ltcaption} package}
 % \def\Thispackage{The \package{ltcaption} package}
-% \newcommand*\version[2][]{\textit{v#2}}
+% \newcommand*\version[2][]{v$#2$}
 % 
 % \GetFileInfo{ltcaption.drv}
 % \let\docdate\filedate

Modified: trunk/Master/texmf-dist/source/latex/caption/subcaption.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/caption/subcaption.dtx	2020-10-26 20:58:23 UTC (rev 56770)
+++ trunk/Master/texmf-dist/source/latex/caption/subcaption.dtx	2020-10-26 20:58:40 UTC (rev 56771)
@@ -32,7 +32,7 @@
 %   caption-deu.tex, caption-eng.tex, caption-rus.tex.
 % 
 % \fi
-% \CheckSum{228}
+% \CheckSum{221}
 %
 % \iffalse
 %<*driver>
@@ -78,7 +78,7 @@
 %
 \newcommand*\csmarg[1]{\texttt{\char`\{#1\char`\}}}
 \newcommand*\csoarg[1]{\texttt{\char`\[#1\char`\]}}
-\newcommand*\version[2][]{$v#2$}
+\newcommand*\version[2][]{v$#2$}
 %
 \usepackage{marvosym}
 \makeatletter
@@ -935,7 +935,7 @@
 %
 %    \begin{macrocode}
 \NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{subcaption}[2020/08/23 v1.3g Sub-captions (AR)]
+\ProvidesPackage{subcaption}[2020/10/07 v1.3j Sub-captions (AR)]
 %    \end{macrocode}
 %
 % \subsection{Initial code}
@@ -942,9 +942,19 @@
 %
 % Since we base on the \package{caption} package we load it here.
 %    \begin{macrocode}
-\RequirePackage{caption}[2020/08/23] % needs v3.5 or newer
+\RequirePackage{caption}[2020/09/28] % needs v3.5c or newer
 %    \end{macrocode}
 %
+% \begin{macro}{\subcaption at Error}
+% \changes{v1.3h}{2020/09/28}{This macro added}
+%   |\subcaption at Error|\marg{message}\\
+%   issues an error message (with code line indication).
+%    \begin{macrocode}
+\newcommand*\subcaption at Error[1]{%
+  \PackageError{subcaption}{#1}{\caption@@eh{subcaption}}}
+%    \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 \package{subfigure} or \package{subfig} will be checked \cs{AtBeginDocument}, too}
@@ -956,26 +966,23 @@
 %    \end{macrocode}
 %    \begin{macrocode}
   \caption at ifcompatibility{%
-    \PackageError{subcaption}%
+    \subcaption at Error
       {This package does not work with\MessageBreak
        caption option `compatibility=v1'}%
-      {\subcaption at eh}%
     \endinput}{}%
 %    \end{macrocode}
 %    \begin{macrocode}
   \@ifpackageloaded{subfigure}{%
-    \PackageError{subcaption}%
+    \subcaption at Error
       {This package can't be used in cooperation\MessageBreak
        with the subfigure package}%
-      {\subcaption at eh}%
     \endinput}{}%
 %    \end{macrocode}
 %    \begin{macrocode}
   \@ifpackageloaded{subfig}{%
-    \PackageError{subcaption}%
+    \subcaption at Error
       {This package can't be used in cooperation\MessageBreak
        with the subfig package}%
-      {\subcaption at eh}%
     \endinput}{}%
 %    \end{macrocode}
 %    \begin{macrocode}
@@ -982,12 +989,6 @@
 }
 %    \end{macrocode}
 %    \begin{macrocode}
-\newcommand*\subcaption at eh{%
-  If you do not understand this error, please take a closer look\MessageBreak
-  at the documentation of the `subcaption' package, especially the\MessageBreak
-  section about errors.\MessageBreak\@ehc}
-%    \end{macrocode}
-%    \begin{macrocode}
 \subcaption at CheckCompatibility
 \caption at AtBeginDocument{%
   \subcaption at CheckCompatibility
@@ -997,29 +998,12 @@
 %
 % \subsection{Main code}
 %
-% \changes{v1.1}{2011/10/30}{Adapted to the newfloat package}
-% We call |\Declare|\-|Caption|\-|Sub|\-|Type| for |figure|, |table|,
-% and each floating environment declared with |\Declare|\-|Floating|\-|Environment| here.
-%    \begin{macrocode}
-\ForEachCaptionType{\DeclareCaptionSubType{#1}}
-%    \end{macrocode}
-%
-% \begin{macro}{\newsubfloat}
-% \changes{v1.1}{2016/01/31}{Adapted to the memoir document class}
-% We re-define |\new|\-|sub|\-|float| (offered by the \package{memoir} document class),
-% so our stuff will be used instead.
-%    \begin{macrocode}
-\caption at ifundefined\newsubfloat{}{%
-  \renewcommand*\newsubfloat{\DeclareCaptionSubType}}
-%    \end{macrocode}
-% \end{macro}
-%
 % \pagebreak[3]
 % \subsubsection{The \cs{subcaption} command}
 %
 % \begin{macro}{\subcaption}
-% \changes{v1.1}{2012/04/06}{\cs{newcommand} changed to \cs{def}
-%     so it works with the \package{memoir} document class, too}
+% \changes{v1.1}{2012/04/06}{\cs{newcommand} changed to \cs{def} so it works with the \package{memoir} document class, too}
+% \changes{v1.3h}{2020/09/28}{Usage of \cs{caption at Error} replaced by \cs{subcaption at Error}}
 % Without a prefacing |\set|\-|caption|\-|sub|\-|type|, |\sub|\-|caption| is some kind
 % of |\caption|\-|of{sub|\-|\@cap|\-|type}|.
 % \Note{Like \cs{captionof}, this command is designed to be used inside an
@@ -1028,7 +1012,7 @@
 \def\subcaption{%
   \caption at iftype
     {\setcaptionsubtype*\caption}%
-    {\caption at Error{\noexpand\subcaption outside float}%
+    {\subcaption at Error{\noexpand\subcaption outside float}%
      \caption at gobble}}%
 %    \end{macrocode}
 % But with a prefacing |\set|\-|caption|\-|sub|\-|type|, |\sub|\-|caption| is simply
@@ -1044,12 +1028,13 @@
 %
 % \begin{macro}{\phantomsubcaption}
 % \changes{v1.1}{2011/08/17}{This macro added}
+% \changes{v1.3h}{2020/09/28}{Usage of \cs{caption at Error} replaced by \cs{subcaption at Error}}
 % Same as |\phantom|\-|caption|, but for subfigures.
 %    \begin{macrocode}
 \newcommand*\phantomsubcaption{%
   \caption at iftype
     {\setcaptionsubtype*\phantomcaption}%
-    {\caption at Error{\noexpand\phantomsubcaption outside float}}}%
+    {\subcaption at Error{\noexpand\phantomsubcaption outside float}}}%
 %    \end{macrocode}
 %    \begin{macrocode}
 \g at addto@macro\caption at subtypehook{%
@@ -1194,25 +1179,33 @@
 %
 % \begin{macro}{\subcaption at setrefformat}
 % \changes{v1.3g}{2020/07/27}{Adapted to \package{caption3} v2.0}
+% \changes{v1.3h}{2020/09/28}{Usage of \cs{caption at Error} replaced by \cs{subcaption at Error}}
+% \changes{v1.3j}{2020/10/07}{Definition of the label formats \texttt{subsimple} and \texttt{subparens} added}
 %  |\subcaption at setrefformat|\marg{name}\par
 %  Selecting a subref format simply means saving the code (in |\subcaption at reffmt|).
 %    \begin{macrocode}
 \newcommand*\subcaption at setrefformat[1]{%
   \@ifundefined{caption at labelformat@#1}%
-    {\caption at Error{Undefined label format `#1'}}%
+    {\subcaption at Error{Undefined label format `#1'}}%
     {\expandafter\let\expandafter\subcaption at reffmt\csname caption at labelformat@#1\endcsname}}
 %    \end{macrocode}
 %    \begin{macrocode}
 \subcaption at setrefformat{simple}
 %    \end{macrocode}
+%  To offer a smooth transition from the \package{subfig} to the \package{subcaption} package
+%  we offer the options |sub|\-|ref|\-|format=sub|\-|simple| and |sub|\-|ref|\-|format=sub|\-|parens|, too.
+%    \begin{macrocode}
+\DeclareCaptionLabelFormat{subsimple}{#2}
+\DeclareCaptionLabelFormat{subparens}{(#2)}
+%    \end{macrocode}
 % \end{macro}
 %
 % \subsection{Execution of options}
 %
-% We use |\caption at ExecuteOptions| and |\caption at ProcessOptions| here to add
-% the options to the `|sub|' option list instead of executing them immediately.
 % \changes{v1.1}{2018/05/01}{Option \texttt{font+=smaller} changed to \texttt{size=smaller}}
 % \changes{v1.3e}{2020/07/27}{Option \texttt{size=smaller} changed back to \texttt{font+=smaller}}
+% We use |\caption at Execute|\-|Options| and |\caption at Process|\-|Options| here to add
+% the options to the `|sub|' option list instead of executing them immediately.
 %    \begin{macrocode}
 \caption at SetupOptions{subcaption}{\captionsetup[sub]{#2}}%
 \caption at ExecuteOptions{subcaption}{%
@@ -1220,6 +1213,13 @@
 \caption at ProcessOptions*{subcaption}
 %    \end{macrocode}
 %
+% \changes{v1.1}{2011/10/30}{Adapted to the newfloat package}
+% We call |\Declare|\-|Caption|\-|Sub|\-|Type| for |figure|, |table|,
+% and each floating environment declared with |\Declare|\-|Floating|\-|Environment| here.
+%    \begin{macrocode}
+\ForEachCaptionType{\DeclareCaptionSubType{#1}}
+%    \end{macrocode}
+%
 % \subsection{Bonus material}
 %
 % \subsubsection{The \cs{subfloat} command}
@@ -1231,6 +1231,7 @@
 % \changes{v1.3a}{2019/09/01}{\cs{ignorespaces} copied from \cs{sf@@@subfloat}}
 % \changes{v1.3b}{2020/01/03}{Previous definition of \cs{subfloat} will be overwritten}
 % \changes{v1.3f}{2020/07/29}{Bugfix: Usage of \cs{caption at hj@default} replaced by \cs{captionbox at innerpos@default}}
+% \changes{v1.3i}{2020/09/28}{This macro will be defined with \cs{providecommand} now to preserve an original definition}
 %  |\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}.
@@ -1237,19 +1238,23 @@
 %  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}
-\def\subfloat{%
-  \@ifnextchar[\@subfloat\subfloat@}
+\caption at AtBeginDocument{\providecommand*\subfloat{%
+  \@ifnextchar[%]
+    \subcaption at subfloat
+    \subcaption at subfloat@}}
 %    \end{macrocode}
 %    \begin{macrocode}
-\long\def\@subfloat[#1]{%
-  \@ifnextchar[{\@@subfloat{#1}}{\@@@subfloat\subcaptionbox{#1}}}
+\long\def\subcaption at subfloat[#1]{%
+  \@ifnextchar[%]
+    {\subcaption@@subfloat{#1}}%
+    {\subcaption@@@subfloat\subcaptionbox{#1}}}
 %    \end{macrocode}
 %    \begin{macrocode}
-\long\def\@@subfloat#1[#2]{%
-  \@@@subfloat{\subcaptionbox[{#1}]}{#2}}
+\long\def\subcaption@@subfloat#1[#2]{%
+  \subcaption@@@subfloat{\subcaptionbox[{#1}]}{#2}}
 %    \end{macrocode}
 %    \begin{macrocode}
-\long\def\@@@subfloat#1#2#3{%
+\long\def\subcaption@@@subfloat#1#2#3{%
   \caption at getlabel{#3}%
   #1{#2\caption at thelabel}{\let\label\caption at gobble#3}%
   \global\let\caption at thelabel\relax
@@ -1256,7 +1261,7 @@
   \ignorespaces}
 %    \end{macrocode}
 %    \begin{macrocode}
-\def\subfloat@#1{%
+\def\subcaption at subfloat@#1{%
   \setbox\@tempboxa\hbox{#1}%
   \caption at iiiibox
     \setcaptionsubtype

Modified: trunk/Master/texmf-dist/tex/latex/caption/bicaption.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/caption/bicaption.sty	2020-10-26 20:58:23 UTC (rev 56770)
+++ trunk/Master/texmf-dist/tex/latex/caption/bicaption.sty	2020-10-26 20:58:40 UTC (rev 56771)
@@ -38,7 +38,7 @@
 %%   caption-deu.tex, caption-eng.tex, caption-rus.tex.
 %% 
 \NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{bicaption}[2020/08/23 v1.2a Bilingual Captions (AR)]
+\ProvidesPackage{bicaption}[2020/10/25 v1.3 Bilingual Captions (AR)]
 \RequirePackage{caption}[2020/08/23] % needs v3.5 or newer
 \newcommand*\bicaption at Info[1]{%
   \PackageInfo{bicaption}{#1}}
@@ -82,6 +82,16 @@
   \caption at set@bool\bicaption at ifslc{#1}}
 \DeclareCaptionOption{bi-swap}[1]{%
   \caption at set@bool\bicaption at ifswap{#1}}
+\DeclareCaptionOption{bi-separator}[1]{%
+  \caption at set{biseparator}{#1}}
+\newcommand\DeclareBiCaptionSeparator[2]{%
+  \caption at decl{biseparator}{#1}{#2}}
+\@onlypreamble\DeclareBiCaptionSeparator
+\DeclareBiCaptionSeparator{none}{}
+\DeclareBiCaptionSeparator{smallskip}{\smallskip}
+\DeclareBiCaptionSeparator{medskip}{\medskip}
+\DeclareBiCaptionSeparator{bigskip}{\bigskip}
+\SetCaptionDefault{biseparator}{none}
 \DeclareCaptionOption{lang}{%
   \caption at ifundefined\bicaption at language
     \bicaption at language@setupkeys
@@ -118,7 +128,7 @@
   \bicaption at selectlanguage\@firstoftwo}
 \providecommand*\selectcaptionlanguage[1]{%
   #1\select at language\selectlanguage}
-\caption at ExecuteOptions{caption}{bi-lang=0,bi-slc=1,bi-swap=0}
+\caption at ExecuteOptions{caption}{bi-lang=0,bi-slc=1,bi-swap=0,bi-separator=default}
 \ifcsname captionmainlanguage\endcsname
   \bicaption at InfoNoLine{%
     main language is set to \captionmainlanguage}
@@ -184,21 +194,24 @@
   \caption at setoptions{bi}%
   \ifnum\bicaption at lang=0\relax
     \bicaption at ifslc
-      {\caption at slc{#2}{#3}{}{\KV at caption@singlelinecheck0}%
-       \caption at slc{#2}{#1}{}{\KV at caption@singlelinecheck0}}%
+      {\caption at slc{#2}{#3}{}{\caption at setsinglelinecheck0}%
+       \caption at slc{#2}{#1}{}{\caption at setsinglelinecheck0}}%
       {}%
   \fi
   \ifnum\bicaption at lang=2\relax
     \caption at thelabel
     \global\let\caption at thelabel\relax
+    \let\bicaption at tempa\relax
   \else
     \begingroup
       \caption at setoptions{bi-first}%
       \caption@@make@{#2}{#3}%
     \endgroup
+    \def\bicaption at tempa{\bicaption at separator\caption at biseparator}%
   \fi
   \ifnum\bicaption at lang=1\relax
   \else
+    \bicaption at tempa
     \begingroup
       \caption at setoptions{bi-second}%
       \caption@@make@{#2}{#1}%
@@ -205,6 +218,7 @@
     \endgroup
   \fi
 }
+\newcommand*\bicaption at separator{\par}
 \newcommand\bicaption{\@bicaption\caption}
 \newcommand\bicaptionbox{\@bicaption\captionbox}
 \newcommand\bisubcaption{\@bicaption\subcaption}

Modified: trunk/Master/texmf-dist/tex/latex/caption/caption-koma.sto
===================================================================
--- trunk/Master/texmf-dist/tex/latex/caption/caption-koma.sto	2020-10-26 20:58:23 UTC (rev 56770)
+++ trunk/Master/texmf-dist/tex/latex/caption/caption-koma.sto	2020-10-26 20:58:40 UTC (rev 56771)
@@ -38,7 +38,7 @@
 %%   caption-deu.tex, caption-eng.tex, caption-rus.tex.
 %% 
 \NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesFile{caption-koma.sto}[2020/09/12 v2.0a Adaption of the caption package to the KOMA-Script document classes (AR)]
+\ProvidesFile{caption-koma.sto}[2020/09/21 v2.0b 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{%
@@ -133,7 +133,7 @@
     \fi\fi
     #3\par
   \fi}
-\SetCaptionDefault{labelformat}{autodot}
+\SetCaptionFallback{labelformat}{autodot}
 \DeclareCaptionLabelSeparator{default}{\captionformat}
 \DeclareCaptionFont{scr at font}{\scr at fnt@caption}
 \DeclareCaptionFont{scr at labelfont}{\scr at fnt@captionlabel}

Modified: trunk/Master/texmf-dist/tex/latex/caption/caption-memoir.sto
===================================================================
--- trunk/Master/texmf-dist/tex/latex/caption/caption-memoir.sto	2020-10-26 20:58:23 UTC (rev 56770)
+++ trunk/Master/texmf-dist/tex/latex/caption/caption-memoir.sto	2020-10-26 20:58:40 UTC (rev 56771)
@@ -38,9 +38,29 @@
 %%   caption-deu.tex, caption-eng.tex, caption-rus.tex.
 %% 
 \NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesFile{caption-memoir.sto}[2020/07/31 v2.0 Adaption of the caption package to the memoir document class (AR)]
+\ProvidesFile{caption-memoir.sto}[2020/10/10 v2.1 Adaption of the caption package to the memoir document class (AR)]
 \g at addto@macro\caption at prepareslc{%
   \let\pagenote\caption at gobble}
+\DeclareCaptionLabelSeparator{@contdelim}{\@contdelim}
+\SetCaptionDefault{labelseparator}{@contdelim}
+\let\caption at memoir@delim\captiondelim
+\renewcommand\captiondelim{%
+  \captionsetup{labelsep=@contdelim}%
+  \caption at memoir@delim}
+\DeclareCaptionLabelSeparator{gobble}{}
+\DeclareCaptionFont{@contnfont}{\@contnfont}
+\SetCaptionDefault{labelfont}{@contnfont}
+\DeclareCaptionFont{@conttfont}{\@conttfont}
+\SetCaptionDefault{textfont}{@conttfont}
+\let\caption at memoir@namefont\captionnamefont
+\renewcommand\captionnamefont{%
+  \captionsetup{labelfont=@contnfont}%
+  \caption at memoir@namefont}
+\let\caption at memoir@titlefont\captiontitlefont
+\renewcommand\captiontitlefont{%
+  \captionsetup{textfont=@conttfont}%
+  \caption at memoir@titlefont}
+\AtCaptionPackage{\setlength\belowcaptionskip{0pt}}
 \endinput
 %%
 %% End of file `caption-memoir.sto'.

Modified: trunk/Master/texmf-dist/tex/latex/caption/caption.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/caption/caption.sty	2020-10-26 20:58:23 UTC (rev 56770)
+++ trunk/Master/texmf-dist/tex/latex/caption/caption.sty	2020-10-26 20:58:40 UTC (rev 56771)
@@ -38,8 +38,8 @@
 %%   caption-deu.tex, caption-eng.tex, caption-rus.tex.
 %% 
 \NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption}[2020/09/12 v3.5b Customizing captions (AR)]
-\RequirePackage{caption3}[2020/09/12] % needs v2.1 or newer
+\ProvidesPackage{caption}[2020/10/26 v3.5g Customizing captions (AR)]
+\RequirePackage{caption3}[2020/10/06] % needs v2.2b or newer
 \caption at ifbool{documentclass}{}{%
   \caption at WarningNoLine{%
     Unknown document class (or package),\MessageBreak
@@ -76,16 +76,29 @@
   }}}
 \DeclareCaptionOption{list-entry}{\caption at selectlistentry{#1}}
 \captionsetup{list-entry=default}
-\newcommand*\caption at setparboxrestore[1]{%
-  \caption at ifinlist{#1}{full}{%
-    \caption at setfullparboxrestore
-  }{\caption at ifinlist{#1}{default,light,partial}{%
-    \let\caption at parboxrestore\@secondoftwo
-  }{%
-    \caption at Error{Undefined parboxrestore `#1'}%
-  }}}
-\newcommand*\caption at setfullparboxrestore{%
-  \let\caption at parboxrestore\@firstoftwo}
+\newcommand\caption at declparboxrestore{%
+  \caption at decl{parboxrestore}}
+\@onlypreamble\caption at declparboxrestore
+\newcommand*\caption at setparboxrestore{%
+  \caption at set{parboxrestore}}
+\caption at declparboxrestore{full}{%
+  \@parboxrestore}
+\caption at declparboxrestore{partial}{%
+  \let\if at nobreak\iffalse
+  \let\if at noskipsec\iffalse
+  \let\par\@@par
+  \parindent\z@ \parskip\z at skip
+  \everypar{}%
+  \leftskip\z at skip \rightskip\z at skip \@rightskip\z at skip
+  \parfillskip\@flushglue \lineskip\normallineskip
+  \baselineskip\normalbaselineskip
+  \sloppy
+  \let\\\@normalcr}
+\caption at declparboxrestore{mini}{%
+  \let\par\@@par
+  \parindent\z@ \parskip\z at skip
+  \sloppy}
+\SetCaptionDefault{parboxrestore}{full}
 \DeclareCaptionOption{parboxrestore}{\caption at setparboxrestore{#1}}
 \captionsetup{parboxrestore=default}
 \DeclareCaptionOption{@minipage}{%
@@ -208,7 +221,7 @@
   \par
   \caption at beginex{#1}{#2}{#3}%
     \caption at setfloatcapt{%
-      \caption at boxrestore
+      \caption at parboxrestore
       \if at minipage
         \@setminipage
       \fi
@@ -288,7 +301,7 @@
   \DeclareCaptionOptionNoValue{subtype*}{\setcaptionsubtype*}%
 }
 \def\setcaptiontype{%
-  \caption at boxrestore@mini
+  \caption at parboxrestore@mini
   \caption at settype}
 \newcommand\setcaptionsubtype{%
   \caption at iftype
@@ -295,16 +308,16 @@
     \caption at setsubtype
     {\caption at Error{\noexpand\setcaptionsubtype outside float}}}%
 \newcommand\caption at setsubtype{%
-  \@ifstar
-    {\caption@@settype{sub}*{sub\@captype}}%
-    {\caption@@settype{sub}{sub\@captype}}}%
+  \caption at teststar\caption@@setsubtype\@firstoftwo\@secondoftwo}
+\newcommand*\caption@@setsubtype[1]{%
+  \caption@@@settype{sub}{#1}{sub\@captype}}
 \newcommand*\caption at settype{%
   \caption at clrflags
   \caption at set@type}
 \newcommand*\caption at set@type{%
-  \caption@@settype{}}
-\newcommand*\caption@@settype[1]{%
-  \caption at teststar{\caption@@@settype{#1}}\@firstoftwo\@secondoftwo}
+  \caption at teststar\caption@@settype\@firstoftwo\@secondoftwo}
+\newcommand*\caption@@settype{%
+  \caption@@@settype{}}
 \newcommand*\caption@@@settype[3]{%
   \caption at Debug{#1type=#3}%
   \@nameuse{caption at check#1type}{#3}%
@@ -446,7 +459,6 @@
 \newcommand*\caption at continued@float[1]{%
   \edef\caption at tempa{#1}%
   \ifx\caption at tempa\caption at CFtype
-    \caption at restorecounters
     \caption@@continuedfloat{#1}%
   \else
     \caption at Error{Continued `#1' after `\caption at CFtype'}%
@@ -478,8 +490,6 @@
 \def\caption at ContinuedFloat{%
   \let\caption at reset@continuedfloat\@gobble
   \caption@@@continuedfloat}
-\caption at ifdefined\donemaincaptionfalse{%
-  \g at addto@macro\donemaincaptionfalse\caption at savesubcounters}{}
 \newcommand*\caption at refstepcounter[1]{%
   \@ifundefined{c@#1}%
     {\caption at Error{No float type '#1' defined}}%
@@ -496,6 +506,7 @@
     \let\caption at tempa\caption@@refstepcounter
     \caption at ifflag2{}{% caption
       \caption at ifflag4{% subcaption
+        % Counter was already incremented by content, so we suppress \stepcounter{#1} here
         \let\caption at tempa\caption@@refcounter
       }{}%
     }%
@@ -504,8 +515,8 @@
 \newcommand*\caption@@refcounter[1]{%
   \let\caption at stepcounter@ORI\stepcounter
   \def\stepcounter##1{%
-    \def\caption at tempa{#1}%
-    \def\caption at tempb{##1}%
+    \edef\caption at tempa{#1}%
+    \edef\caption at tempb{##1}%
     \ifx\caption at tempa\caption at tempb \else
       \caption at stepcounter@ORI{##1}%
     \fi}%
@@ -545,23 +556,6 @@
     {\expandafter\let\csname caption at fnum@#1\expandafter\endcsname\csname fnum@#1\endcsname
      \@namedef{fnum@#1}{\caption at fnum{#1}}}%
     {}}
-\newcommand*\caption at boxrestore{%
-  \caption at parboxrestore{\@parboxrestore}{%
-    \let\if at nobreak\iffalse
-    \let\if at noskipsec\iffalse
-    \let\par\@@par
-    \parindent\z@ \parskip\z at skip
-    \everypar{}%
-    \leftskip\z at skip \rightskip\z at skip \@rightskip\z at skip
-    \parfillskip\@flushglue \lineskip\normallineskip
-    \baselineskip\normalbaselineskip
-    \sloppy
-    \let\\\@normalcr
-  }}
-\newcommand\caption at boxrestore@mini{%
-  \let\par\@@par
-  \parindent\z@ \parskip\z at skip
-  \sloppy}
 \newcommand*\caption at normalsize{%
   \caption at font@normal\@unused}
 \let\caption at setfloatcapt\@firstofone
@@ -620,7 +614,8 @@
 \caption at AtBeginDocument{%
   \caption at ifundefined\@subfloatrowtrue
    {\newif\if at subfloatrow
-    \caption at ifundefined\subfloatrow{}%
+    \caption at ifundefined\subfloatrow
+    {}%
     {\caption at Debug{Patching subfloatrow environment}%
      \g at addto@macro\capsubrowsettings{\@subfloatrowtrue}%
      \g at addto@macro\killfloatstyle{%
@@ -888,7 +883,7 @@
   \newcommand*\caption at floatflt[1]{%
     \caption at settype{#1}%
     \caption at clearmargin
-    \caption at setfullparboxrestore
+    \caption at setparboxrestore{full}%
     \caption at setoptions{floating#1}}%
 }{}
 \caption at IfPackageLoaded{fltpage}[1998/10/29 v.0.3]{%
@@ -1166,7 +1161,7 @@
     \caption at setautoposition b%
     \caption at settype{#1}%
     \caption at clearmargin
-    \caption at setfullparboxrestore}%
+    \caption at setparboxrestore{full}}%
   \newcommand\caption at wincaption[1]{%
     \ifdim\picwd=\z@
       \let\caption at makecurrent\@gobbletwo
@@ -1203,7 +1198,7 @@
       \caption at freezeHref % will be defrosted in \ivparpic
       \caption at settype\@piccaptype
       \caption at clearmargin
-      \caption at setfullparboxrestore
+      \caption at setparboxrestore{full}%
       \caption at setoptions{parpic}%
       \caption at setautoposition b%
       \expandafter\expandafter\expandafter\caption at ORI
@@ -1300,7 +1295,7 @@
     \caption at setoptions{supertabular}%
     \caption at setposition{\if at topcaption t\else b\fi}%
     \caption at beginex{#1}{#2}{#3}%
-      \caption at boxrestore
+      \caption at parboxrestore
       \caption at normalsize
       \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par
     \caption at end}%
@@ -1320,7 +1315,7 @@
     \caption at set{position}{\if at topcaption t\else b\fi}%
     \@initisotab
     \caption at beginex{#1}{#2}{#3}%
-      \caption at boxrestore
+      \caption at parboxrestore
       \caption at normalsize
       \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par
     \caption at end

Modified: trunk/Master/texmf-dist/tex/latex/caption/caption2.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/caption/caption2.sty	2020-10-26 20:58:23 UTC (rev 56770)
+++ trunk/Master/texmf-dist/tex/latex/caption/caption2.sty	2020-10-26 20:58:40 UTC (rev 56771)
@@ -38,7 +38,7 @@
 %%   caption-deu.tex, caption-eng.tex, caption-rus.tex.
 %% 
 \NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption2}[2020/01/02 v2.2e Customising captions (AR)]
+\ProvidesPackage{caption2}[2020/09/28 v2.2f Customising captions (AR)]
 \PackageWarning{caption2}{%
   ****************************************************\MessageBreak
   THIS PACKAGE IS OBSOLETE:\MessageBreak
@@ -48,16 +48,18 @@
   NOT be used for NEW documents! New documents should\MessageBreak
   use the regular `caption' package v3.x instead.\MessageBreak
   ****************************************************\@gobbletwo}%
-\RequirePackage{caption3}[2019/12/31] % should be used with v1.8f or newer
+\RequirePackage{caption3}[2020/09/28] % needs v2.2a or newer
 \let\captionsetup\@undefined
 \let\clearcaptionsetup\@undefined
 \let\showcaptionsetup\@undefined
 \let\DeclareCaptionType\@undefined
 \let\DeclareCaptionSubType\@undefined
+\newcommand*\captiontwo at Error[2][]{%
+  \PackageError{caption2}{#2}{#1\caption@@eh{caption2}}}
 \@ifpackageloaded{caption}{%
-  \PackageError{caption2}{%
+  \captiontwo at Error{%
     You can't use both, the (current) caption *and*\MessageBreak
-    the (obsolete) caption2 package}\caption at eh
+    the (obsolete) caption2 package}%
   \endinput
 }{}
 \newcommand*\captionlabeldelim{}
@@ -94,13 +96,13 @@
   \expandafter\ifx\csname caption@@#1\endcsname\relax
     \expandafter\defcaptionstyle
   \else
-    \PackageError{caption2}{Caption style `#1' already defined}{\caption at eh}%
+    \captiontwo at Error{Caption style `#1' already defined}%
     \expandafter\@gobbletwo
   \fi
   {#1}}
 \newcommand*\renewcaptionstyle[1]{%
   \expandafter\ifx\csname caption@@#1\endcsname\relax
-    \PackageError{caption2}{Caption style `#1' undefined}{\caption at eh}%
+    \captiontwo at Error{Caption style `#1' undefined}%
     \expandafter\@gobbletwo
   \else
     \expandafter\defcaptionstyle
@@ -110,17 +112,17 @@
   \defcaptionstyle{#1}{%
     \expandafter\ifx\csname caption@@\caption at style\expandafter\endcsname%
                     \csname caption@@#1\endcsname
-      \PackageError{caption2}{You can't use the caption style `#1' directy}{%
-        The caption style `#1' is only a dummy and does not really exists.%
-        \MessageBreak You have to redefine it (with \protect\renewcaptionstyle)
-        before you can select\MessageBreak it with \protect\captionstyle.
-        \space\caption at eh}%
+      \captiontwo at Error
+        [The caption style `#1' is only a dummy and does not really exists.%
+         \MessageBreak You have to redefine it (with \protect\renewcaptionstyle)
+         before you can select\MessageBreak it with \protect\captionstyle.\space]%
+        {You can't use the caption style `#1' directy}%
     \else
       #2\usecaptionstyle\caption at style
     \fi}}
 \newcommand*\captionstyle[1]{%
   \expandafter\ifx\csname caption@@#1\endcsname\relax
-    \PackageError{caption2}{Undefined caption style `#1'}{\caption at eh}%
+    \captiontwo at Error{Undefined caption style `#1'}%
   \else
     \def\caption at style{#1}%
   \fi}
@@ -255,14 +257,14 @@
   \fi\next}
 \newcommand*\usecaptionstyle[1]{%
   \caption at ifundefined\captiontext{%
-    \PackageError{caption2}{You can't use \protect#1
-      in normal text}{The usage of \protect#1 is only
-      allowed inside code declared with\MessageBreak \protect\defcaptionstyle,
-      \protect\newcaptionstyle \space or \protect\renewcaptionstyle.
-      \space\caption at eh}
+    \captiontwo at Error
+      [The usage of \protect#1 is only
+       allowed inside code declared with\MessageBreak \protect\defcaptionstyle,
+       \protect\newcaptionstyle \space or \protect\renewcaptionstyle.\space]%
+      {You can't use \protect#1 in normal text}%
   }{%
     \@ifundefined{caption@@#1}%
-      {\PackageError{caption2}{Caption style `#1' undefined}{\caption at eh}}%
+      {\captiontwo at Error{Caption style `#1' undefined}}%
       {\let\caption at make\caption at makecaption
        \@nameuse{caption@@#1}}%
   }}
@@ -440,7 +442,7 @@
     \newcommand*\subcaplabeldelim{}
     \newcommand*\subcapstyle[1]{%
       \expandafter\ifx\csname caption@@#1\endcsname\relax
-        \PackageError{caption2}{Undefined caption style `#1'}{\caption at eh}%
+        \captiontwo at Error{Undefined caption style `#1'}%
       \else
         \def\caption at substyle{#1}%
       \fi}

Modified: trunk/Master/texmf-dist/tex/latex/caption/caption3.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/caption/caption3.sty	2020-10-26 20:58:23 UTC (rev 56770)
+++ trunk/Master/texmf-dist/tex/latex/caption/caption3.sty	2020-10-26 20:58:40 UTC (rev 56771)
@@ -38,21 +38,24 @@
 %%   caption-deu.tex, caption-eng.tex, caption-rus.tex.
 %% 
 \NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption3}[2020/09/17 v2.1b caption3 kernel (AR)]
+\ProvidesPackage{caption3}[2020/10/21 v2.2e caption3 kernel (AR)]
 \providecommand*\@nameundef[1]{%
   \expandafter\let\csname #1\endcsname\@undefined}
 \providecommand\l at addto@macro[2]{%
   \edef#1{\unexpanded\expandafter{#1#2}}}
-\def\bothIfFirst#1#2{%
-  \protected at edef\caption at tempa{#1}%
+\def\bothIfFirst#1#2{\caption at bothif{#1}{#1#2}}
+\def\bothIfSecond#1#2{\caption at bothif{#2}{#1#2}}
+\newcommand*\caption at bothif[2]{%
+  \begingroup
+    \caption at prepare@bothif
+    \protected at xdef\caption at tempa{#1}%
+  \endgroup
   \ifx\caption at tempa\@empty \else
-    #1#2%
+    #2%
   \fi}
-\def\bothIfSecond#1#2{%
-  \protected at edef\caption at tempa{#2}%
-  \ifx\caption at tempa\@empty \else
-    #1#2%
-  \fi}
+\providecommand*\caption at prepare@bothif{}
+\g at addto@macro\caption at prepare@bothif{%
+  \let\inputencoding\@gobble}
 \newcommand*\caption at ifundefined[1]{%
   \ifdefined#1%
     \ifx#1\relax
@@ -183,10 +186,10 @@
 \newcommand*\caption at wh{%
   See the caption package documentation for explanation.}
 \newcommand*\caption at Error[1]{%
-  \PackageError{caption}{#1}\caption at eh}
-\newcommand*\caption at eh{%
+  \PackageError{caption}{#1}{\caption@@eh{caption}}}
+\newcommand*\caption@@eh[1]{%
   If you do not understand this error, please take a closer look\MessageBreak
-  at the documentation of the `caption' package, especially the\MessageBreak
+  at the documentation of the `#1' package, especially the\MessageBreak
   section about errors.\MessageBreak\@ehc}
 \let\caption at KV@err\caption at Error
 \RequirePackage{keyval}[1997/11/10]
@@ -435,9 +438,10 @@
   \caption at ifdefault{#3}%
     {\caption at Error{Invalid argument for \string\SetCaptionDefault: `#3'}}% would cause an infinite loop otherwise
     {\caption@@set{#1}{#2 at default}{#3}}}
-\newcommand*\caption at ifdefault[1]{%
+\newcommand*\caption at ifdefault{\caption at ifequal{default}}
+\newcommand*\caption at ifequal[2]{%
   \edef\caption at tempa{#1}%
-  \def\caption at tempb{default}%
+  \edef\caption at tempb{#2}%
   \ifx\caption at tempa\caption at tempb
     \expandafter\@firstoftwo
   \else
@@ -460,6 +464,14 @@
     \caption at ifdefined#2{%
       \expandafter\let\csname caption@#1 at default\endcsname#2%
       \let#2\@undefined}{}}}
+\newcommand*\SetCaptionFallback{%
+  \caption at maparg\caption@@setfallback}
+\@onlypreamble\SetCaptionFallback
+\newcommand*\caption@@setfallback[3]{%
+  \caption at ifequal{fallback}{#3}%
+    {\caption at Error{Invalid argument for \string\SetCaptionFallback: `#3'}}% would cause an infinite loop otherwise
+    {\caption@@set{#1}{#2 at fallback}{#3}}}
+\@onlypreamble\caption@@setfallback
 \newcommand*\caption at decl@package[2]{%
   \@ifnextchar[%]
     {\caption at declare@package{#1}{#2}}%
@@ -543,7 +555,7 @@
 \newcommand*\caption at thecounter{0}
 \newcommand*\caption at stepthecounter{%
   \@tempcnta\caption at thecounter
-  \advance\@tempcnta\@ne
+  \advance\@tempcnta\@ne\relax
   \xdef\caption at thecounter{\the\@tempcnta}}
 \newcommand*\caption at newlabel{\@newl at bel{caption at r}}
 \newcommand*\caption at thepage{\the\c at page}
@@ -654,8 +666,8 @@
   \colorbox{\caption at boxcolor}{%
     \setlength\caption at tempdima{#1}%
     \addtolength\caption at tempdima{-2\fboxsep}%
-    \linewidth\caption at tempdima
-    \hsize\caption at tempdima
+    \linewidth\caption at tempdima\relax
+    \hsize\caption at tempdima\relax
     #2}}
 \DeclareCaptionOption{boxcolor}{\def\caption at boxcolor{#1}}
 \DeclareCaptionOption{boxsep}{\setlength\fboxsep{#1}}
@@ -685,8 +697,8 @@
        The option `labelsep=\caption at labelsep@name' does not work\MessageBreak
        with `format=hang'}}%
     {\@hangfrom{#1#2}%
-     \advance\caption at parindent\hangindent
-     \advance\caption at hangindent\hangindent
+     \advance\caption at parindent\hangindent\relax
+     \advance\caption at hangindent\hangindent\relax
      \caption@@par#3\par}}
 \SetCaptionDefault{format}{plain}
 \newcommand*\DeclareCaptionLabelFormat[2]{%
@@ -702,8 +714,9 @@
 \DeclareCaptionLabelFormat{original}{%
   \caption at ifdefined\caption at original@fnum
     {\caption at original@fnum}%
-    {\caption at labelformat@simple{#1}{#2}}}
+    {\caption at labelformat@fallback{#1}{#2}}}
 \SetCaptionDefault{labelformat}{original}
+\SetCaptionFallback{labelformat}{simple}
 \newcommand\DeclareCaptionLabelSeparator{%
   \@ifstar
     \DeclareCaptionLabelSeparator@
@@ -742,6 +755,8 @@
 \DeclareCaptionLabelSeparator*{newline}{\captionnewline}
 \caption at LabelSeparatorWithNewline{newline} % does not work with "format=hang"
 \DeclareCaptionLabelSeparator*{endash}{\space\textendash\space}
+\DeclareCaptionLabelSeparator{gobble}{ }
+\DeclareCaptionLabelSeparator{gobbletwo}{}
 \newcommand*\captionnewline{\\\relax}
 \SetCaptionDefault{labelseparator}{colon}
 \newcommand*\DeclareCaptionTextFormat[2]{%
@@ -854,6 +869,10 @@
 \SetCaptionDefault{font}{none}
 \SetCaptionDefault{labelfont}{none}
 \SetCaptionDefault{textfont}{none}
+\caption at setmapping{footfont}{font}
+\SetCaptionDefault{footfont}{none}
+\caption at setmapping{@tempa}{font}
+\SetCaptionDefault{@tempa}{none}
 \newcommand\caption at smaller{%
   \ifx\@currsize\tiny
     \relax
@@ -1160,7 +1179,10 @@
 \providecommand*\caption at ifbabel@french{true}
 \caption at IfBabelFrench{%
   \providecommand\caption at french@labelseparator{\CaptionSeparator}%
-  \DeclareCaptionLabelSeparator{colon}{\autospace at beforeFDP : }%
+  \ifFB at active@punct
+    \DeclareCaptionLabelSeparator{colon}{%
+      \ifFBfrench\penalty\@M\FBcolonspace\fi : }%
+  \fi
   \ifFBOldFigTabCaptions
     \caption at ifdefined\extrasfrench{%
       \addto\extrasfrench{%
@@ -1257,18 +1279,6 @@
   \RequirePackage{#1}\relax}
 \caption at AtBeginDocument{%
   \let\caption@@loadpackage\caption@@requirepackage}
-\caption at AtBeginDocument{%
-  \def\@tempa{2008/08/02 v0.3b floatrow: float package extension}%
-  \expandafter\ifx\csname ver at floatrow.sty\endcsname\@tempa
-    \caption at InfoNoLine{floatrow package v0.3b is loaded}%
-    \renewcommand\captionlabel[1]{{% l.559
-      \def\FR at tmp{\@captype}%
-      \ifnum\floatbox at depth>\@ne
-        \def\FR at tmp{sub\@captype}\caption at setsubtype*{\FR at tmp}\stepcounter{\FR at tmp}%
-      \fi
-      \caption at format % <= This line added
-      \caption@@@make{\caption at fnum\FR at tmp}{#1}}}
-  \fi}
 \newcommand*\caption at newfloat[2]{%
   \IfCaptionOptionCheck
     {\caption at requirepackage{newfloat}{#1}}%
@@ -1318,6 +1328,7 @@
   \def\@tempa{2005/06/28 ver: 1.3 subfig package}%
   \expandafter\ifx\csname ver at subfig.sty\endcsname\@tempa
     \caption at InfoNoLine{subfig package v1.3 is loaded}%
+    \def\caption at eh{\caption@@eh{subfig}}%
     \let\caption at setfloattype\@gobble
     \let\@dottedxxxline\sf at NEW@dottedxxxline
     \let\sf at subfloat\sf at NEW@subfloat
@@ -1348,7 +1359,7 @@
     \let\sf at oldlabel=\label
     \let\label=\subfloat at label
     \ifmaincaptiontop\else
-      \advance\@nameuse{c@\@captype}\@ne
+      \advance\@nameuse{c@\@captype}\@ne\relax
     \fi
     \refstepcounter{sub\@captype}%
     \setcounter{sub\@captype @save}{\value{sub\@captype}}%
@@ -1422,12 +1433,12 @@
     \caption at calcmargin
     \caption at tempdima\captionmargin
     \ifdim\captionmargin@=\z@ \else
-      \caption at ifoddpage{}{\advance\caption at tempdima\captionmargin@}%
+      \caption at ifoddpage{}{\advance\caption at tempdima\captionmargin@\relax}%
     \fi
-    \caption at ifhmode{\advance\caption at tempdima\caption at indent}%
+    \caption at ifhmode{\advance\caption at tempdima\caption at indent\relax}%
     \hspace\caption at tempdima
     \caption at tempdima\captionwidth
-    \caption at ifhmode{\advance\caption at tempdima-\caption at indent}%
+    \caption at ifhmode{\advance\caption at tempdima-\caption at indent\relax}%
     \caption at parbox\caption at tempdima{%
       \caption at ifhmode{%
         \ifdim\caption at indent=\z@
@@ -1438,7 +1449,7 @@
       \caption@@@make{#1}{#2}}%
     \caption at tempdima\captionmargin
     \ifdim\captionmargin@=\z@ \else
-      \caption at ifoddpage{\advance\caption at tempdima\captionmargin@}{}%
+      \caption at ifoddpage{\advance\caption at tempdima\captionmargin@\relax}{}%
     \fi
     \hspace\caption at tempdima
   }%
@@ -1458,14 +1469,14 @@
     \fi
   \fi
   \ifdim\captionwidth=\z@
-    \captionwidth\hsize
-    \advance\captionwidth by -2\captionmargin
-    \advance\captionwidth by -\captionmargin@
+    \captionwidth\hsize\relax
+    \advance\captionwidth by -2\captionmargin\relax
+    \advance\captionwidth by -\captionmargin@\relax
   \else
-    \captionmargin\hsize
-    \advance\captionmargin by -\captionwidth
-    \divide\captionmargin by 2
-    \captionmargin@\z@
+    \captionmargin\hsize\relax
+    \advance\captionmargin by -\captionwidth\relax
+    \divide\captionmargin by 2\relax
+    \captionmargin@\z@\relax
   \fi
   \caption at Debug{%
     \string\hsize=\the\hsize,
@@ -1537,10 +1548,24 @@
 \newcommand*\caption at applyfont{%
   \caption at justification\captionfont\captionsize}
 \newcommand\caption@@@make[2]{%
-  \sbox\@tempboxa{#1}%
+  \ifx\caption at fmt\@undefined\caption at format\fi
+  \let\caption at lfmt\caption at labelformat
+  \global\def\caption at tempa{gobbletwo}%
+  \global\def\caption at tempb{}%
+  \sbox\@tempboxa{%
+    \let\caption at ignorespaces\ignorespaces
+    \def\ignorespaces{%
+      \global\def\caption at tempb{two}% "gobble" -> "gobbletwo" if \ignorespaces is used addtionally
+      \caption at ignorespaces}%
+    #1%
+      {\global\let\caption at tempa\@undefined\aftergroup\@gobble}%
+      {\global\def\caption at tempa{gobble\caption at tempb}}}%
   \ifdim\wd\@tempboxa=\z@
-    \caption at set{labelseparator}{none}%
+    \gdef\caption at tempa{none}%
   \fi
+  \ifx\caption at tempa\@undefined \else
+    \@expandtwoargs\caption at set{labelseparator}{\caption at tempa}%
+  \fi
   \caption at ifempty{#2}{%
     \caption at set{labelseparator}{none}%
     \caption at set{textformat}{simple}%
@@ -1552,7 +1577,7 @@
     {\ifcaption at star\else
        \begingroup
          \captionlabelfont
-         #1%
+         #1\relax\relax
        \endgroup
      \fi}%
     {\ifcaption at star\else
@@ -1647,7 +1672,7 @@
     {\caption@@@declaresubtype{#1}{#2}{#3}{sub#3}}}
 \@onlypreamble\caption@@declaresubtype
 \newcommand*\caption@@@declaresubtype[4]{%
-  \caption at ifin@list\caption at subtypelist{#4}%
+  \caption at ifsubtype{#4}%
     {\caption at Debug{Modify subtype `#4'}}%
     {\caption at Debug{New subtype `#4'}%
      \newcounter{#4}[{#3}]%
@@ -1723,17 +1748,11 @@
   \edef\@tempa{\def\noexpand\caption at subtype@hook####1{\the\toks@}}%
   \@tempa}
 \providecommand*\caption at subtype@hook[1]{}
-\newcommand*\caption at savesubcounters{%
-  \caption at for@list\caption at subtypelist{\caption at savecounter{##1}}}
-\newcommand*\caption at savecounter[1]{%
-  \edef\caption at tempa{%
-    \noexpand\l at addto@macro\noexpand\caption at restore@counters
-      {\noexpand\setcounter{#1}{\number\value{#1}}}}%
-  \caption at tempa}
-\newcommand*\caption at restorecounters{%
-  \caption at restore@counters
-  \global\let\caption at restore@counters\@empty}
-\newcommand*\caption at restore@counters{}
+\caption at ifdefined\@memresetsubcounter
+  {\let\caption at memresetsubcounter\@memresetsubcounter
+   \renewcommand*\@memresetsubcounter[1]{%
+     \caption at ifsubtype{sub#1}\@gobble\caption at memresetsubcounter{#1}}}%
+  {}
 \ifx\caption at documentclass\@empty\else
   \@pushfilename
   \edef\@currname{caption-\caption at documentclass}

Modified: trunk/Master/texmf-dist/tex/latex/caption/subcaption.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/caption/subcaption.sty	2020-10-26 20:58:23 UTC (rev 56770)
+++ trunk/Master/texmf-dist/tex/latex/caption/subcaption.sty	2020-10-26 20:58:40 UTC (rev 56771)
@@ -38,43 +38,35 @@
 %%   caption-deu.tex, caption-eng.tex, caption-rus.tex.
 %% 
 \NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{subcaption}[2020/08/23 v1.3g Sub-captions (AR)]
-\RequirePackage{caption}[2020/08/23] % needs v3.5 or newer
+\ProvidesPackage{subcaption}[2020/10/07 v1.3j Sub-captions (AR)]
+\RequirePackage{caption}[2020/09/28] % needs v3.5c or newer
+\newcommand*\subcaption at Error[1]{%
+  \PackageError{subcaption}{#1}{\caption@@eh{subcaption}}}
 \newcommand*\subcaption at CheckCompatibility{%
   \caption at ifcompatibility{%
-    \PackageError{subcaption}%
+    \subcaption at Error
       {This package does not work with\MessageBreak
        caption option `compatibility=v1'}%
-      {\subcaption at eh}%
     \endinput}{}%
   \@ifpackageloaded{subfigure}{%
-    \PackageError{subcaption}%
+    \subcaption at Error
       {This package can't be used in cooperation\MessageBreak
        with the subfigure package}%
-      {\subcaption at eh}%
     \endinput}{}%
   \@ifpackageloaded{subfig}{%
-    \PackageError{subcaption}%
+    \subcaption at Error
       {This package can't be used in cooperation\MessageBreak
        with the subfig package}%
-      {\subcaption at eh}%
     \endinput}{}%
 }
-\newcommand*\subcaption at eh{%
-  If you do not understand this error, please take a closer look\MessageBreak
-  at the documentation of the `subcaption' package, especially the\MessageBreak
-  section about errors.\MessageBreak\@ehc}
 \subcaption at CheckCompatibility
 \caption at AtBeginDocument{%
   \subcaption at CheckCompatibility
   \let\subcaption at CheckCompatibility\@undefined}
-\ForEachCaptionType{\DeclareCaptionSubType{#1}}
-\caption at ifundefined\newsubfloat{}{%
-  \renewcommand*\newsubfloat{\DeclareCaptionSubType}}
 \def\subcaption{%
   \caption at iftype
     {\setcaptionsubtype*\caption}%
-    {\caption at Error{\noexpand\subcaption outside float}%
+    {\subcaption at Error{\noexpand\subcaption outside float}%
      \caption at gobble}}%
 \g at addto@macro\caption at subtypehook{%
   \let\subcaption\caption}
@@ -81,7 +73,7 @@
 \newcommand*\phantomsubcaption{%
   \caption at iftype
     {\setcaptionsubtype*\phantomcaption}%
-    {\caption at Error{\noexpand\phantomsubcaption outside float}}}%
+    {\subcaption at Error{\noexpand\phantomsubcaption outside float}}}%
 \g at addto@macro\caption at subtypehook{%
   \let\phantomsubcaption\phantomcaption}
 \ForEachCaptionSubType{%
@@ -140,25 +132,32 @@
 \DeclareCaptionOption{subrefformat}{\subcaption at setrefformat{#1}}
 \newcommand*\subcaption at setrefformat[1]{%
   \@ifundefined{caption at labelformat@#1}%
-    {\caption at Error{Undefined label format `#1'}}%
+    {\subcaption at Error{Undefined label format `#1'}}%
     {\expandafter\let\expandafter\subcaption at reffmt\csname caption at labelformat@#1\endcsname}}
 \subcaption at setrefformat{simple}
+\DeclareCaptionLabelFormat{subsimple}{#2}
+\DeclareCaptionLabelFormat{subparens}{(#2)}
 \caption at SetupOptions{subcaption}{\captionsetup[sub]{#2}}%
 \caption at ExecuteOptions{subcaption}{%
   font+=smaller,labelformat=parens,labelsep=space,skip=6pt,list=0,hypcap=0}
 \caption at ProcessOptions*{subcaption}
-\def\subfloat{%
-  \@ifnextchar[\@subfloat\subfloat@}
-\long\def\@subfloat[#1]{%
-  \@ifnextchar[{\@@subfloat{#1}}{\@@@subfloat\subcaptionbox{#1}}}
-\long\def\@@subfloat#1[#2]{%
-  \@@@subfloat{\subcaptionbox[{#1}]}{#2}}
-\long\def\@@@subfloat#1#2#3{%
+\ForEachCaptionType{\DeclareCaptionSubType{#1}}
+\caption at AtBeginDocument{\providecommand*\subfloat{%
+  \@ifnextchar[%]
+    \subcaption at subfloat
+    \subcaption at subfloat@}}
+\long\def\subcaption at subfloat[#1]{%
+  \@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{%
   \caption at getlabel{#3}%
   #1{#2\caption at thelabel}{\let\label\caption at gobble#3}%
   \global\let\caption at thelabel\relax
   \ignorespaces}
-\def\subfloat@#1{%
+\def\subcaption at subfloat@#1{%
   \setbox\@tempboxa\hbox{#1}%
   \caption at iiiibox
     \setcaptionsubtype



More information about the tex-live-commits mailing list.