texlive[52905] Master: caption (24nov19)

commits+karl at tug.org commits+karl at tug.org
Sun Nov 24 22:23:07 CET 2019


Revision: 52905
          http://tug.org/svn/texlive?view=revision&revision=52905
Author:   karl
Date:     2019-11-24 22:23:07 +0100 (Sun, 24 Nov 2019)
Log Message:
-----------
caption (24nov19)

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/subcaption.pdf
    trunk/Master/texmf-dist/source/latex/caption/caption.dtx
    trunk/Master/texmf-dist/source/latex/caption/caption.ins
    trunk/Master/texmf-dist/source/latex/caption/caption3.dtx
    trunk/Master/texmf-dist/source/latex/caption/subcaption.dtx
    trunk/Master/texmf-dist/tex/latex/caption/caption.sty
    trunk/Master/texmf-dist/tex/latex/caption/caption3.sty
    trunk/Master/tlpkg/bin/tlpkg-ctan-check

Removed Paths:
-------------
    trunk/Master/texmf-dist/doc/latex/caption/newfloat.pdf
    trunk/Master/texmf-dist/source/latex/caption/newfloat.dtx
    trunk/Master/texmf-dist/tex/latex/caption/newfloat.sty

Modified: trunk/Master/texmf-dist/doc/latex/caption/CHANGELOG
===================================================================
--- trunk/Master/texmf-dist/doc/latex/caption/CHANGELOG	2019-11-24 00:53:56 UTC (rev 52904)
+++ trunk/Master/texmf-dist/doc/latex/caption/CHANGELOG	2019-11-24 21:23:07 UTC (rev 52905)
@@ -112,7 +112,13 @@
 - Corrects incorrect load order hyperref-float now (needs hyperref v6.82q or newer)
 - New switch \ifsinglelinecaption for usage inside own commands added
 
+v3.4 (2019/09/11)
+- Label format `autodot' added (for usage within documents using KOMA-Script document class)
+- Label format `unnumbered' added
+- \ContinuedFloat renamed to \continuedfloat (since this is not a preamble command)
+- \caption will always be re-defined now, unless `compatibility' is set to `v1' (or an incompatible package is loaded)
 
+
 bicaption package
 -----------------
 
@@ -162,22 +168,12 @@
 - New command \phantomsubcaption
 
 v1.2 (2018/05/13)
-- Optional argument values `B' and `T' added to the environments `subfigure' and `subtable'
+- Values `B' and `T' for the optional argument <outer-pos> added to the environments `subfigure' and `subtable'
 
 v1.3 (2019/08/31)
 - New command \subfloat for easy transition from the `subfig' package
 
 
-newfloat package
-----------------
-
-v1.0 (2011/10/30)
-- 1st published version
-
-v1.1 (2013/04/27)
-- New command \PrepareListOf
-
-
 totalcount package
 ------------------
 

Modified: trunk/Master/texmf-dist/doc/latex/caption/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/caption/README	2019-11-24 00:53:56 UTC (rev 52904)
+++ trunk/Master/texmf-dist/doc/latex/caption/README	2019-11-24 21:23:07 UTC (rev 52905)
@@ -1,7 +1,7 @@
 ==========================================================================
 
 The `caption' package bundle
-Release 2019-09-01
+Release 2019-11-24
 Copyright (C) 1994-2019 Axel Sommerfeldt (axel.sommerfeldt at f-m.fm)
 
 License: LPPL = LaTeX Project Public Licence
@@ -29,7 +29,7 @@
 
 --------------------------------------------------------------------------
 
-The `caption' package v3.3 offers customization of captions of floating
+The `caption' package v3.4 offers customization of captions of floating
 environments such `figure' and `table' and cooperates with the packages
 
   float, floatflt, fltpage, hyperref, hypcap, listings, longtable,
@@ -73,12 +73,9 @@
 
 --------------------------------------------------------------------------
 
-The `newfloat' package v1.1 offers the command \DeclareFloatingEnvironment
-for defining new floating environments which behave like the existing
-floating environments "figure" and "table".
+Note: The `newfloat' package was removed from this package bundle and was
+uploaded to CTAN as stand-alone package.
 
-User Manual: newfloat.pdf (English)
-
 ==========================================================================
 (The pictures cat.eps & elephant.eps were taken with permission from the
  LaTeX Companion examples.)

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

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

Modified: trunk/Master/texmf-dist/source/latex/caption/caption.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/caption/caption.dtx	2019-11-24 00:53:56 UTC (rev 52904)
+++ trunk/Master/texmf-dist/source/latex/caption/caption.dtx	2019-11-24 21:23:07 UTC (rev 52905)
@@ -25,12 +25,12 @@
 % and the user manuals caption-deu.tex, caption-eng.tex, and caption-rus.tex.
 % 
 % \fi
-% \CheckSum{3694}
+% \CheckSum{2974}
 %
 % \iffalse
 %<*driver>
 \NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesFile{caption.drv}[2011/08/06 v3.3 Implementation of the caption package]
+\ProvidesFile{caption.drv}[2015/09/16 v3.4 Implementation of the caption package]
 \hbadness=9999 \newcount\hbadness \hfuzz=100pt % Make TeX shut up.
 %\errorcontextlines=3
 %
@@ -89,8 +89,6 @@
 %
 % \newcommand*\issue[1]{GitLab~\##1}
 %
-% \GetFileInfo{caption.drv}
-% \let\docdate\filedate
 % \GetFileInfo{caption.sty}
 %
 % \title{The Implementation of
@@ -99,7 +97,7 @@
 %        {the caption package}}
 % \author{Axel Sommerfeldt\\
 %         \url{https://gitlab.com/axelsommerfeldt/caption}}
-% \date{\docdate}
+% \date{\filedate}
 % \maketitle
 %
 % \begin{abstract}
@@ -120,10 +118,10 @@
 % \package{caption3} kernel.
 % \end{abstract}
 % 
-% \section*{User manuals}
+% \section*{User manual}
 %
-% This document is describing the code implementation only. The user
-% documentation can be found in
+% This document is describing the code implementation only.
+% The user documentation can be found in
 % \nopagebreak\begin{quote}
 % \begin{tabular}{ll}
 % \href{http://mirror.ctan.org/macros/latex/contrib/caption/caption-eng.pdf}%
@@ -201,8 +199,7 @@
 % \changes{v1.4}{1995/01/30}{New option \texttt{nooneline}}
 % \changes{v1.4b}{1995/04/05}{Bugfix release}
 % \changes{v3.0}{2003/12/20}{Rewritten; many new commands and features}
-% \changes{v3.0d}{2004/11/28}{Split into two packages:
-%                             \package{caption} \& \package{caption3}}
+% \changes{v3.0d}{2004/11/28}{Split into two packages: \package{caption} \& \package{caption3}}
 %
 % \iffalse
 % --------------------------------------------------------------------------- %
@@ -209,38 +206,34 @@
 % \fi
 %
 % \clearpage
-% \let\subsubsection\subsection
-% \let\subsection\section
 %
 % \iffalse
 %<*package>
 % \fi
 %
-% \subsection{Identification}
+% \section{Identification}
 %
 %    \begin{macrocode}
 \NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption}[2019/09/01 v3.3d Customizing captions (AR)]
+\ProvidesPackage{caption}[2019/10/18 v3.4a Customizing captions (AR)]
 %    \end{macrocode}
 %
-% \subsection{Loading the kernel}
+% \section{Loading the kernel}
 %
 %    \begin{macrocode}
-\RequirePackage{caption3}[2019/09/01] % needs v1.8d or newer
+\RequirePackage{caption3}[2019/09/09] % needs v1.8e or newer
 %    \end{macrocode}
 %
-% \subsection{Check against incompatible document classes}
+% \section{Check against unknown document classes}
 %
 %    \begin{macrocode}
 \caption at ifbool{documentclass}{}{%
   \caption at WarningNoLine{%
-    Unsupported document class (or package) detected,\MessageBreak
-    usage of the caption package is not recommended}%
-  \caption at InfoNoLine{\string\@makecaption\space=\space\meaning\@makecaption}%
-}
+    Unknown document class (or package),\MessageBreak
+    standard defaults will be used}}
 %    \end{macrocode}
 %
-% \subsection{Check against incompatible packages}
+% \section{Check against incompatible packages}
 %
 % \changes{v3.0p}{2007/04/06}{Check against obsolete \package{caption2} package added}
 %    \begin{macrocode}
@@ -265,7 +258,7 @@
 % \changes{v3.1g}{2008/03/20}{\texttt{position=b} added}
 % \changes{v3.1h}{2008/03/29}{%
 %   Name changed from \cs{caption at IncompatiblePackage} to \cs{caption at DisablePositionOption};
-%   moved from package to kernel; disables the `position' option now instead of issuing a warning}
+%   disables the `position' option now instead of issuing a warning}
 % |\caption at DisablePositionOption|\marg{package}\par
 % disables the `position' option.
 %    \begin{macrocode}
@@ -284,9 +277,9 @@
 %    \end{macrocode}
 % \end{macro}
 %
-% \subsection{Declaration of options}
+% \section{Declaration of options}
 %
-% \subsubsection{Options for figure and table}
+% \subsection{Options for figure and table}
 %
 % \changes{v3.0a}{2004/01/09}{Options \opt{figureposition} and \opt{tableposition} added}
 %    \begin{macrocode}
@@ -401,7 +394,7 @@
 %    \end{macrocode}
 % \end{macro}
 %
-% \subsubsection{Miscellaneous options}
+% \subsection{Miscellaneous options}
 %
 %    \begin{macrocode}
 \DeclareCaptionOption*{config}[caption]{%
@@ -471,17 +464,59 @@
 \captionsetup{@minipage=default}
 %    \end{macrocode}
 %
-% \subsubsection{caption v1.x compatibility options}
+% \subsection{caption v1.x compatibility options}
 % \changes{v3.1}{2007/07/21}{Option `compatibility' added}
 % \changes{v3.1}{2007/09/01}{caption v1.x compatibility options revised}
 % \changes{v3.1d}{2007/10/24}{Bugfix 07-10-24 in caption v1.x$ compatibility options}
 %
+% Currently we support |v1| and |v3| as values for the |compatibility=| option.
+% But since this used to be a boolean option is the past we still support any boolean value
+% for compatibility reasons.
+%
 %    \begin{macrocode}
-\DeclareCaptionOption{compatibility}[1]{\caption at setbool{compatibility}{#1}}
+\DeclareCaptionOption{compatibility}[v1]{%
+  \caption at ifinlist{#1}{v1,1,true,yes,on}{%
+    \let\caption at ifcompatibility\@firstoftwo
+  }{\caption at ifinlist{#1}{v3,3,0,false,no,off}{%
+    \let\caption at ifcompatibility\@secondoftwo
+  }{%
+    \caption at Error{Undefined compatibility value `#1'}%
+  }}}
 \@onlypreamble at key{caption}{compatibility}
 %    \end{macrocode}
+%    \begin{macrocode}
+\caption at setbool{compatibility}{0} % default: Try not to be compatible to v1.x
+%    \end{macrocode}
 %
+% \begin{macro}{\caption at setincompatible}
+% \changes{v3.4}{2019/09/09}{This macro added}
+% |\caption at setincompatible|\marg{condition}\marg{message text}
 %    \begin{macrocode}
+\newcommand*\caption at setincompatible[2]{%
+  #1{%
+    \caption at WarningNoLine{%
+      #2;\MessageBreak
+      Setting compatibility to v1}%
+    \caption at setbool{compatibility}{1}%
+  }{}}
+%    \end{macrocode}
+% \end{macro}
+%
+% Check against incompatible packages which used to work fine with v1 of the `caption' package.
+%    \begin{macrocode}
+\caption at AtBeginDocument{\caption at ifcompatibility{}{%
+%    \end{macrocode}
+% The usage of the (now obsolete) \package{captcont} package,
+% which brings its own definition of |\caption*|, was quite common in the old days.
+%    \begin{macrocode}
+  \caption at setincompatible{\@ifpackageloaded{captcont}}{captcont package is loaded}%
+%    \end{macrocode}
+% To be continued\ldots
+%    \begin{macrocode}
+}}
+%    \end{macrocode}
+%
+%    \begin{macrocode}
 \DeclareCaptionOptionNoValue*{normal}{%
   \caption at setformat{plain}%
   \caption at setjustification{justified}}
@@ -529,7 +564,7 @@
 \DeclareCaptionOptionNoValue*{ruled}{\caption at setbool{ruled}{1}}
 %    \end{macrocode}
 %
-% \subsubsection{caption2 v2.x compatibility options}
+% \subsection{caption2 v2.x compatibility options}
 % \changes{v3.0h}{2005/07/08}{caption2 \version{2.x} compatibility options added}
 % \changes{v3.1}{2007/09/01}{caption2 v2.x compatibility options revised}
 % \changes{v3.1d}{2007/10/24}{Bugfix 07-10-24 in caption v2.x$ compatibility options}
@@ -550,7 +585,7 @@
   \caption at WarningNoLine{Obsolete option `ignoreLTcapwidth' ignored}}
 %    \end{macrocode}
 %
-% \subsubsection{Obsolete caption v3.0 options}
+% \subsection{Obsolete caption v3.0 options}
 % \changes{v3.1}{2007/05/07}{Package option \opt{caption} marked as obsolete,
 %        gives error now}
 %
@@ -564,7 +599,7 @@
       and do *not* load the caption package anymore}}}
 %    \end{macrocode}
 %
-% \subsubsection{fltpage package support options}
+% \subsection{fltpage package support options}
 %
 % \changes{v3.1}{2007/09/01}{Options `FPlist' \& `FPref' added}
 % With these options is controlled where the list-of entry and |\ref| resp.
@@ -587,7 +622,7 @@
 \captionsetup{FPlist=caption,FPref=figure}
 %    \end{macrocode}
 %
-% \subsubsection{hyperref package support options}
+% \subsection{hyperref package support options}
 %
 % \changes{v3.1}{2007/06/21}{Options `hypcap' \& `hypcapspace' added}
 % With |hypcap=off| one can turn the \package{hypcap} support off
@@ -600,11 +635,11 @@
 \captionsetup{hypcap=1,hypcapspace=.5\baselineskip}
 %    \end{macrocode}
 %
-% \subsection{\AmS{} \& \SmF{} document classes support}
+% \section{\AmS{} \& \SmF{} document classes support}
 % \changes{v3.1}{2007/07/29}{\AmS\ \& \SmF\ document classes support added}
 %
 %    \begin{macrocode}
-\caption at ifamsclass{%
+\caption at ifclassloaded{ams}{%
   \caption at InfoNoLine{AMS or SMF document class}%
 %    \end{macrocode}
 %    \begin{macrocode}
@@ -611,10 +646,10 @@
   \setlength\belowcaptionskip{0pt}% set to 12pt by AMS class
 %    \end{macrocode}
 %    \begin{macrocode}
-}
+}{}
 %    \end{macrocode}
 %
-% \subsection{\KOMAScript{} document classes support}
+% \section{\KOMAScript{} document classes support}
 % \changes{v3.0a}{2004/01/18}{Minimum adaptation to \KOMAScript\ added}
 % \changes{v3.0h}{2005/08/22}{\KOMAScript\ compatibility options added}
 % \changes{v3.0i}{2005/11/17}{\KOMAScript\ compatibility commands added}
@@ -623,7 +658,7 @@
 % \changes{v3.1}{2007/04/05}{\KOMAScript\ compatibility revised \& enhanced}
 %
 %    \begin{macrocode}
-\caption at ifkomaclass{%
+\caption at ifclassloaded{koma}{%
   \caption at InfoNoLine{KOMA-Script document class}%
 %    \end{macrocode}
 %
@@ -651,7 +686,7 @@
 % \begin{macro}{\@figurecaptionabovefalse}
 % \changes{v3.3}{2013/02/15}{Support of \cs{@figurecaptionabovetrue} added}
 %    \begin{macrocode}
-  \caption at ifundefined\@figurecaptionabovetrue{}{%
+  \caption at ifdefined\@figurecaptionabovetrue{%
 %    \end{macrocode}
 %    \begin{macrocode}
     \g at addto@macro\@figurecaptionabovetrue{\captionsetup*[figure]{position=t}}
@@ -665,7 +700,7 @@
     \fi
 %    \end{macrocode}
 %    \begin{macrocode}
-  }%
+  }{}%
 %    \end{macrocode}
 % \end{macro}
 % \end{macro}
@@ -696,6 +731,7 @@
 %        instead of \cs{captionabove/below}}
 % \changes{v3.1g}{2008/03/01}{\cs{def} changed to \cs{g at addto@macro}}
 % \changes{v3.1k}{2009/10/09}{\opt{figureposition} and \opt{tableposition} will issue a warning now}
+% \changes{v3.4}{2019/09/11}{\opt{figureposition} and \opt{tableposition} will now set the position anyway since it could be used by other packages}
 %  Please note that these are stronger than the \opt{position} setting, therefore we
 %  override the options \opt{figureposition} and \opt{tableposition} to typeout a warning.
 %    \begin{macrocode}
@@ -705,10 +741,12 @@
 %    \begin{macrocode}
   \DeclareCaptionOption{figureposition}{%
     \caption at WarningNoLine{Option `figureposition=#1' has no effect\MessageBreak
-    when used with a KOMA script document class}}
+    when used with a KOMA script document class}%
+    \captionsetup*[figure]{position=#1}}
   \DeclareCaptionOption{tableposition}{%
     \caption at WarningNoLine{Option `tableposition=#1' has no effect\MessageBreak
-    when used with a KOMA script document class}}
+    when used with a KOMA script document class}%
+    \captionsetup*[table]{position=#1}}
 %    \end{macrocode}
 % \end{macro}
 % \end{macro}
@@ -731,7 +769,7 @@
 % \end{macro}
 %
 %    \begin{macrocode}
-  \caption at ifundefined\cap at indent{}{\caption at setcapindent}
+  \caption at ifdefined\cap at indent{\caption at setcapindent}{}
 %    \end{macrocode}
 %
 % \begin{macro}{\setcapwidth}
@@ -749,11 +787,11 @@
 %    \begin{macrocode}
   \newcommand*\caption at setcapwidth[1]{%
     \ifx\\#1\\\else
-      \caption at ifundefined\cap at margin{}{%
+      \caption at ifdefined\cap at margin{%
         \def\@tempa{captionbeside}%
         \ifx\@tempa\@currenvir\else\caption at Warning{%
           Ignoring optional argument [#1] of \string\setcapwidth\MessageBreak}%
-        \fi}%
+        \fi}{}%
     \fi
     \captionsetup{width=\cap at width}}
 %    \end{macrocode}
@@ -805,10 +843,10 @@
 %    \end{macrocode}
 %
 %    \begin{macrocode}
-}
+}{}
 %    \end{macrocode}
 %
-% \subsection{Processing of options}
+% \section{Processing of options}
 %
 % \changes{v3.0m}{2007/03/04}{Verbose option added}
 % \changes{v3.1}{2007/07/02}{Verbose option removed from package}
@@ -819,7 +857,7 @@
 \caption at ProcessOptions*{caption}
 %    \end{macrocode}
 %
-% \subsection{\cs{caption}, \cs{@caption}, and \cs{@makecaption}}
+% \section{\cs{caption}, \cs{@caption}, and \cs{@makecaption}}
 %
 % \begin{macro}{\caption at ifflag}
 % \changes{v3.3}{2011/12/28}{This switch added}
@@ -834,7 +872,7 @@
 % |\caption at if|\-|flag{4}| is set if there is already content which have
 % incremented the counter (so the counter doesn't need to be incremented
 % for the main caption, further sub-figures, and other stuff), and
-% |\caption at if|\-|flag{1}| is set if |\Continued|\-|Float| was given.
+% |\caption at if|\-|flag{1}| is set if |\continued|\-|float| was given.
 %
 % In the past three boolean switches were used to store the flags, but since some
 % packages (like the \package{floatrow} and \package{tabu} package) try hard to keep
@@ -1031,512 +1069,31 @@
 %
 % \begin{macro}{\caption at redefine}
 % \changes{v3.1k}{2009/03/30}{This macro added, it contains the patching code now}
-% We only redefine |\caption| and |\@caption| if the current definitions
-% are well known, so documents written in the old (\package{caption}
-% package \version{1.x}) days (where |\caption| \& |\@caption| were not
-% redefined by us) will still compile fine.
-% For example the usage of the (now obsolete) \package{captcont} package,
-% which brings its own definition of |\caption*|, was quite common these days.
+% Prior to \version{3.4} we only redefined |\caption| and |\@caption| if the current definitions
+% were well known, so documents written in the old (\package{caption} package \version{1.x}) days
+% (where |\caption| \& |\@caption| were not redefined by us) still compiled fine.
+% This used to make sense when introducing \version{3.0} in the year 2003
+% but is simply overcautious and especially unwanted by the user nowadays.
+% So starting with \version{3.4} we only do not redefine |\caption| and |\@caption| if the
+% `compatibility' option is set to `v1'.
 %    \begin{macrocode}
 \newcommand*\caption at redefine{}
 \g at addto@macro\caption at redefine{%
 %    \end{macrocode}
-%
 %    \begin{macrocode}
-  \caption at setbool{incompatible}{0}%
-%    \end{macrocode}
-%
-%    \begin{macrocode}
-  \caption at CheckCommand\caption{%
-    % ltfloat.dtx [2002/10/01 v1.1v LaTeX Kernel (Floats)]
-    \def\caption{%
-       \ifx\@captype\@undefined
-         \@latex at error{\noexpand\caption outside float}\@ehd
-         \expandafter\@gobble
-       \else
-         \refstepcounter\@captype
-         \expandafter\@firstofone
-       \fi
-       {\@dblarg{\@caption\@captype}}%
-    }}%
-%    \end{macrocode}
-%
-%    \begin{macrocode}
-  \caption at CheckCommand\caption{%
-    % beamerbaselocalstructure.sty,v 1.53 2007/01/28 20:48:21 tantau
-    \def\caption{
-      \ifx\@captype\@undefined
-        \@latex at error{\noexpand\caption outside figure or table}\@ehd
-        \expandafter\@gobble
-      \else
-        \refstepcounter\@captype
-        \expandafter\@firstofone
-      \fi
-      {\@dblarg{\@caption\@captype}}%
-    }}%
-%    \end{macrocode}
-%
-%    \begin{macrocode}
-  \caption at CheckCommand\caption{%
-    % beamerbaselocalstructure.sty, Joseph Wright committed 4ac715c 2013-09-04
-    \def\caption{%
-      \ifx\@captype\@undefined
-        \@latex at error{\noexpand\caption outside figure or table}\@ehd
-        \expandafter\@gobble
-      \else
-        \refstepcounter\@captype
-        \expandafter\@firstofone
-      \fi
-      {\@dblarg{\@caption\@captype}}%
-    }}%
-%    \end{macrocode}
-%
-%    \begin{macrocode}
-  \caption at CheckCommand\caption{%
-    % float.sty [2001/11/08 v1.3d Float enhancements (AL)]
-    \long\def\caption{%
-      \ifx\@captype\@undefined
-        \@latex at error{\noexpand\caption outside float}\@ehd
-        \expandafter\@gobble
-      \else
-        \refstepcounter\@captype
-        \let\@tempf\@caption
-        \expandafter\ifx\csname @float at c@\@captype\endcsname\relax\else
-          \expandafter\expandafter\let
-            \expandafter\@tempf\csname @float at c@\@captype\endcsname
-        \fi
-      \fi
-      \@dblarg{\@tempf\@captype}}}%
-%    \end{macrocode}
-%
-%    \begin{macrocode}
-  \caption at CheckCommand\caption{%
-    % hyperref.sty [2007/02/27 v6.75t Hypertext links for LaTeX]
-    % hyperref.sty [2007/04/09 v6.76a Hypertext links for LaTeX]
-    % hyperref.sty [2007/06/12 v6.76h Hypertext links for LaTeX]
-    \def\caption{%
-      \ifx\@captype\@undefined
-        \@latex at error{\noexpand\caption outside float}\@ehd
-        \expandafter\@gobble
-      \else
-        \H at refstepcounter\@captype
-        \@ifundefined{fst@\@captype}{%
-          \let\Hy at tempa\@caption
-        }{%
-          \let\Hy at tempa\Hy at float@caption
-        }%
-        \expandafter\@firstofone
-      \fi
-      {\@dblarg{\Hy at tempa\@captype}}%
-    }}%
-%    \end{macrocode}
-%    \begin{macrocode}
-  \caption at CheckCommand\caption{%
-    % hyperref.sty [2007/08/05 v6.76j Hypertext links for LaTeX]
-    \def\caption{%
-      \ifx\@captype\@undefined
-        \@latex at error{\noexpand\caption outside float}\@ehd
-        \expandafter\@gobble
-      \else
-        \H at refstepcounter\@captype
-        \let\Hy at tempa\@caption
-        \@ifundefined{float at caption}{%
-        }{%
-          \expandafter\ifx\csname @float at c@\@captype\endcsname\float at caption
-            \let\Hy at tempa\Hy at float@caption
-          \fi
-        }%
-        \expandafter\@firstofone
-      \fi
-      {\@dblarg{\Hy at tempa\@captype}}%
-    }}%
-%    \end{macrocode}
-%    \begin{macrocode}
-  \caption at CheckCommand\caption{%
-    % memhfixc.sty [2010/08/17 v1.15 nameref/hyperref package fixes for memoir class]
-    % \let\m at moldhypcaption\caption
-    \long\def\caption{\donemaincaptiontrue\m at moldhypcaption}}%
-%    \end{macrocode}
-%    \begin{macrocode}
-  \caption at IfCheckCommand{}{%
-    \caption at InfoNoLine{%
-      Incompatible package detected (regarding \string\caption).\MessageBreak
-      \string\caption\space=\space\meaning\caption}%
-    \caption at setbool{incompatible}{1}}%
-%    \end{macrocode}
-%
-%    \begin{macrocode}
-  \caption at CheckCommand\@caption{%
-    % ltfloat.dtx [2002/10/01 v1.1v LaTeX Kernel (Floats)]
-    \long\def\@caption#1[#2]#3{%
-      \par
-      \addcontentsline{\csname ext@#1\endcsname}{#1}%
-        {\protect\numberline{\csname the#1\endcsname}{\ignorespaces #2}}%
-      \begingroup
-        \@parboxrestore
-        \if at minipage
-          \@setminipage
-        \fi
-        \normalsize
-        \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par
-      \endgroup}}%
-%    \end{macrocode}
-%
-%    \begin{macrocode}
-  \caption at CheckCommand\@caption{%
-    % beamerbaselocalstructure.sty,v 1.53 2007/01/28 20:48:21 tantau
-    \long\def\@caption#1[#2]#3{% second argument ignored
-      \par\nobreak
-      \begingroup
-        \@parboxrestore
-        \if at minipage
-          \@setminipage
-        \fi
-        \beamer at makecaption{#1}{\ignorespaces #3}\par\nobreak
-        \endgroup}}%
-%    \end{macrocode}
-%
-%    \begin{macrocode}
-  \caption at CheckCommand\@caption{%
-    % memhfixc.sty [2010/08/17 v1.15 nameref/hyperref package fixes for memoir class]
-    \long\def\@caption#1[#2]#3{%
-      \MNR at old@caption{#1}[{#2}]{#3}%
-      \def\@currentlabelname{#2}%
-      \M at gettitle{#2}%
-    }}%
-%    \end{macrocode}
-%
-%    \begin{macrocode}
-  \caption at CheckCommand\@caption{%
-    % arabicore.sty [2006/01/01 v1.0 Arabi Core switching commands (may still change)]
-    \long\def\@caption#1[#2]#3{%
-      \par
-      \addtocontents{\csname ext@#1\endcsname}{\xstring\select at language{\main at Arabi@language}}%
-      \addcontentsline{\csname ext@#1\endcsname}{#1}%
-        {\protect\numberline{\csname the#1\endcsname}{\ignorespaces \if at rl{\textRL{#2}}\else\textLR{#2}\fi}}%
-      \begingroup
-        \@parboxrestore
-        \if at minipage
-          \@setminipage
-        \fi
-        \normalsize
-        \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces \if at rl{\textRL{#3}}\else\textLR{#3}\fi}\par
-      \endgroup}}%
-%    \end{macrocode}
-%
-%    \begin{macrocode}
-  \caption at CheckCommand\@caption{%
-    % rlbabel.def [2005/03/30 v2.3h Right-to-Left support from the babel system Hebrew language support from the babel system]
-    \long\def\@caption#1[#2]#3{%
-      \par
-      \addcontentsline{\csname ext@#1\endcsname}{#1}%
-        {\protect\numberline{\csname the#1\endcsname}%
-        {\ignorespaces #2}}%
-      \def\@fignm{figure}
-      \ifx#1\@fignm\addcontentsline{fol}{#1}%
-         {\protect\numberline{\csname the#1\endcsname}%
-         {\ignorespaces #2}}\fi%
-      \def\@tblnm{table}
-      \ifx#1\@tblnm\addcontentsline{tol}{#1}%
-         {\protect\numberline{\csname the#1\endcsname}%
-         {\ignorespaces #2}}\fi%
-      \begingroup
-        \@parboxrestore
-        \if at minipage
-          \@setminipage
-        \fi
-        \normalsize
-        \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par
-      \endgroup}}%
-%    \end{macrocode}
-%
-%    \begin{macrocode}
-  \caption at CheckCommand\@caption{%
-    % magyar.ldf [2005/03/30 v1.4j Magyar support from the babel system]
-    \long\def\@caption#1[#2]#3{%
-      \csname par\endcsname
-      \addcontentsline{\csname ext@#1\endcsname}{#1}%
-        {\protect\numberline{\csname the#1\endcsname.}{\ignorespaces #2}}%
-      \begingroup
-        \@parboxrestore
-        \if at minipage
-          \@setminipage
-        \fi
-        \normalsize
-        \@makecaption{\csname fnum@#1\endcsname}%
-            {\ignorespaces #3}\csname par\endcsname
-      \endgroup}}%
-%    \end{macrocode}
-%
-%    \begin{macrocode}
-%   \caption at CheckCommand\float at caption{%
-%     % float.sty [2001/11/08 v1.3d Float enhancements (AL)]
-%     \long\def\float at caption#1[#2]#3{%
-%       \addcontentsline{\@nameuse{ext@#1}}{#1}%
-%        {\protect\numberline{\@nameuse{the#1}}{\ignorespaces #2}}
-%       \global\setbox\@floatcapt\vbox\bgroup\@parboxrestore
-%         \normalsize\@fs at capt{\@nameuse{fnum@#1}}{\ignorespaces #3}%
-%         \@ifnextchar[{\float at ccon}{\egroup}}%
-%     \long\def\float at ccon[#1]{#1\par\egroup}}%
-%    \end{macrocode}
-%
-%    \begin{macrocode}
-  \caption at CheckCommand\@caption{%
-    % hyperref.sty [2007/02/27 v6.75t Hypertext links for LaTeX]
-    \long\def\@caption#1[#2]#3{%
-      \hyper at makecurrent{\@captype}%
-      \def\@currentlabelname{#2}%
-      \par\addcontentsline{\csname ext@#1\endcsname}{#1}{%
-        \protect\numberline{\csname the#1\endcsname}{\ignorespaces #2}%
-      }%
-      \begingroup
-        \@parboxrestore
-        \if at minipage
-          \@setminipage
-        \fi
-        \normalsize
-        \@makecaption{\csname fnum@#1\endcsname}{%
-          \ignorespaces
-          \ifHy at nesting
-            \hyper@@anchor{\@currentHref}{#3}%
-          \else
-            \Hy at raisedlink{\hyper@@anchor{\@currentHref}{\relax}}#3%
-          \fi
-        }%
-        \par
-      \endgroup
-    }}%
-%    \end{macrocode}
-%    \begin{macrocode}
-  \caption at CheckCommand\@caption{%
-    % hyperref.sty [2007/04/09 v6.76a Hypertext links for LaTeX]
-    % hyperref.sty [2007/06/12 v6.76h Hypertext links for LaTeX]
-    % hyperref.sty [2007/08/05 v6.76j Hypertext links for LaTeX]
-    \long\def\@caption#1[#2]#3{%
-      \expandafter\ifx\csname if at capstart\expandafter\endcsname
-                      \csname iftrue\endcsname
-        \global\let\@currentHref\hc at currentHref
-      \else
-        \hyper at makecurrent{\@captype}%
-      \fi
-      \def\@currentlabelname{#2}%
-      \par\addcontentsline{\csname ext@#1\endcsname}{#1}{%
-        \protect\numberline{\csname the#1\endcsname}{\ignorespaces #2}%
-      }%
-      \begingroup
-        \@parboxrestore
-        \if at minipage
-          \@setminipage
-        \fi
-        \normalsize
-        \expandafter\ifx\csname if at capstart\expandafter\endcsname
-                        \csname iftrue\endcsname
-          \global\@capstartfalse
-          \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces#3}%
-        \else
-          \@makecaption{\csname fnum@#1\endcsname}{%
-            \ignorespaces
-            \ifHy at nesting
-              \hyper@@anchor{\@currentHref}{#3}%
-            \else
-              \Hy at raisedlink{\hyper@@anchor{\@currentHref}{\relax}}#3%
-            \fi
-          }%
-        \fi
-        \par
-      \endgroup
-    }}%
-%    \end{macrocode}
-%    \begin{macrocode}
-  \caption at CheckCommand\@caption{%
-    % hyperref.sty [2009/11/27 v6.79k Hypertext links for LaTeX]
-    \long\def\@caption#1[#2]#3{%
-      \expandafter\ifx\csname if at capstart\expandafter\endcsname
-                      \csname iftrue\endcsname
-        \global\let\@currentHref\hc at currentHref
-      \else
-        \hyper at makecurrent{\@captype}%
-      \fi
-      \def\@currentlabelname{#2}%
-      \par\addcontentsline{\csname ext@#1\endcsname}{#1}{%
-        \protect\numberline{\csname the#1\endcsname}{\ignorespaces #2}%
-      }%
-      \begingroup
-        \@parboxrestore
-        \if at minipage
-          \@setminipage
-        \fi
-        \normalsize
-        \expandafter\ifx\csname if at capstart\expandafter\endcsname
-                        \csname iftrue\endcsname
-          \global\@capstartfalse
-          \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces#3}%
-        \else
-          \@makecaption{\csname fnum@#1\endcsname}{%
-            \ignorespaces
-            \ifHy at nesting
-              \expandafter\hyper@@anchor\expandafter{\@currentHref}{#3}%
-            \else
-              \Hy at raisedlink{%
-                \expandafter\hyper@@anchor\expandafter{\@currentHref}{\relax}%
-              }%
-              #3%
-            \fi
-          }%
-        \fi
-        \par
-      \endgroup
-    }}%
-%    \end{macrocode}
-%    \begin{macrocode}
-  \caption at CheckCommand\@caption{%
-    % hyperref.sty [2009/12/09 v6.79m Hypertext links for LaTeX]
-    % hyperref.sty [2009/12/28 v6.79z Hypertext links for LaTeX]
-    \long\def\@caption#1[#2]#3{%
-      \expandafter\ifx\csname if at capstart\expandafter\endcsname
-                      \csname iftrue\endcsname
-        \global\let\@currentHref\hc at currentHref
-      \else
-        \hyper at makecurrent{\@captype}%
-      \fi
-      \@ifundefined{NR at gettitle}{%
-        \def\@currentlabelname{#2}%
-      }{%
-        \NR at gettitle{#2}%
-      }%
-      \par\addcontentsline{\csname ext@#1\endcsname}{#1}{%
-        \protect\numberline{\csname the#1\endcsname}{\ignorespaces #2}%
-      }%
-      \begingroup
-        \@parboxrestore
-        \if at minipage
-          \@setminipage
-        \fi
-        \normalsize
-        \expandafter\ifx\csname if at capstart\expandafter\endcsname
-                        \csname iftrue\endcsname
-          \global\@capstartfalse
-          \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces#3}%
-        \else
-          \@makecaption{\csname fnum@#1\endcsname}{%
-            \ignorespaces
-            \ifHy at nesting
-              \expandafter\hyper@@anchor\expandafter{\@currentHref}{#3}%
-            \else
-              \Hy at raisedlink{%
-                \expandafter\hyper@@anchor\expandafter{%
-                  \@currentHref
-                }{\relax}%
-              }%
-              #3%
-            \fi
-          }%
-        \fi
-        \par
-      \endgroup
-    }}%
-%    \end{macrocode}
-%
-%    \begin{macrocode}
-  \caption at CheckCommand\@caption{%
-    % nameref.sty [2006/12/27 v2.28 Cross-referencing by name of section]
-    \long\def\@caption#1[#2]{%
-      \def\@currentlabelname{#2}%
-      \NR@@caption{#1}[{#2}]%
-    }}%
-%    \end{macrocode}
-%    \begin{macrocode}
-  \caption at CheckCommand\@caption{%
-    % nameref.sty [2009/11/27 v2.32 Cross-referencing by name of section]
-    \long\def\@caption#1[#2]{%
-      \NR at gettitle{#2}%
-      \NR@@caption{#1}[{#2}]%
-    }}%
-%    \end{macrocode}
-%
-%    \begin{macrocode}
-  \caption at CheckCommand\@caption{%
-    % subfigure.sty [2002/07/30 v2.1.4 subfigure package]
-    \long\def\@caption#1[#2]#3{%
-      \@ifundefined{if#1topcap}%
-        {\subfig at oldcaption{#1}[{#2}]{#3}}%
-        {\@nameuse{if#1topcap}%
-           \@listsubcaptions{#1}%
-           \subfig at oldcaption{#1}[{#2}]{#3}%
-         \else
-           \subfig at oldcaption{#1}[{#2}]{#3}%
-           \@listsubcaptions{#1}%
-         \fi}}}%
-%    \end{macrocode}
-%
-%    \begin{macrocode}
-  \caption at CheckCommand\@caption{%
-    % subfig.sty [2005/06/28 ver: 1.3 subfig package]
-    \def\@caption{\caption@}%
-%   \long\def\caption@#1[#2]#3{%
-%     \@ifundefined{caption at setfloattype}%
-%       \caption at settype
-%       \caption at setfloattype
-%           \@captype
-%     \sf at ifpositiontop{%
-%       \@listsubcaptions{#1}%
-%       \sf at old@caption{#1}[{#2}]{#3}%
-%     }{%
-%       \sf at old@caption{#1}[{#2}]{#3}%
-%       \@listsubcaptions{#1}%
-%     }}%
-    }%
-%    \end{macrocode}
-%
-%    \begin{macrocode}
-  \caption at CheckCommand\@caption{%
-    % chkfloat.sty [2012/08/19 v0.1 chkfloat: check for moved floats]
-    \def\@caption#1[#2]#3{\chkfloat at caption{#1}[#2]{#3}%
-      \addtocontents{fof}{\protect\chkfloat@{\thepage}{\chkfloat at page}{\csname fnum@#1\endcsname: #2}}%
-    }}%
-%    \end{macrocode}
-%    \begin{macrocode}
-  \caption at CheckCommand\@caption{%
-    % chkfloat.sty [20??/??/?? v0.? chkfloat: check for moved floats]
-    \def\@caption#1[#2]#3{\chkfloat at caption{#1}[{#2}]{#3}%
-      \chkfloat at addcontentsline{#1}{#2}%
-    }}%
-%    \end{macrocode}
-%
-%    \begin{macrocode}
-  \caption at IfCheckCommand{}{%
-    \caption at InfoNoLine{%
-      Incompatible package detected (regarding \string\@caption).\MessageBreak
-      \string\@caption\space=\space\meaning\@caption}%
-    \caption at setbool{incompatible}{1}}%
-%    \end{macrocode}
-%
-% The option |compatibility=| will override the compatibility mode.
-%    \begin{macrocode}
-  \caption at ifundefined\caption at ifcompatibility
-    {\let\caption at ifcompatibility\caption at ifincompatible
-     \let\caption at tempa\caption at WarningNoLine}%
-    {\let\caption at tempa\@gobble}% suppress warning
-%    \end{macrocode}
-%
-%    \begin{macrocode}
   \caption at ifcompatibility{%
 %    \end{macrocode}
-%
 %    \begin{macrocode}
-    \caption at tempa{%
-      \noexpand\caption will not be redefined since it's already\MessageBreak
-      redefined by a document class or package which is\MessageBreak
-      unknown to the caption package}%
+    \caption at InfoNoLine{
+      \noexpand\caption will not be redefined since `compatibility' is set to v1}%
 %    \end{macrocode}
-%
 %    \begin{macrocode}
     \renewcommand*\caption at redefine{}%
 %    \end{macrocode}
 %
-%  |\ContinuedFloat| is not supported in compatibility mode.
+%  |\continuedfloat| is not supported in compatibility mode.
 %    \begin{macrocode}
-    \renewcommand*\caption at ContinuedFloatX[1]{%
+    \renewcommand*\caption at continuedfloat[1]{%
       \caption at Error{Not available in compatibility mode}}%
 %    \end{macrocode}
 %
@@ -1544,10 +1101,10 @@
 %    \begin{macrocode}
     \caption at AtBeginDocument*{%
       \let\caption at start\relax
-      \caption at ifundefined\caption at ORI@capstart{}{%
+      \caption at ifdefined\caption at ORI@capstart{%
         \caption at Debug{%
           Restore hypcap definition of \string\capstart\@gobble}%
-        \let\capstart\caption at ORI@capstart}%
+        \let\capstart\caption at ORI@capstart}{}%
     }%
 %    \end{macrocode}
 %
@@ -1562,15 +1119,6 @@
   }{%
 %    \end{macrocode}
 %
-%    \begin{macrocode}
-    \caption at ifincompatible{%
-      \caption at WarningNoLine{%
-        Forced redefinition of \noexpand\caption since the\MessageBreak
-        unsupported(!) package option `compatibility=false'\MessageBreak
-        was given}%
-    }{}%
-%    \end{macrocode}
-%
 % \begin{macro}{\caption}
 % \begin{macro}{\@caption}
 %    \begin{macrocode}
@@ -1577,7 +1125,6 @@
     \renewcommand*\caption at redefine{%
       \let\caption\caption at caption
       \let\@caption\caption@@caption}%
-    \caption at redefine
 %    \end{macrocode}
 % \end{macro}
 % \end{macro}
@@ -1586,6 +1133,7 @@
   }%
 %    \end{macrocode}
 %    \begin{macrocode}
+  \caption at redefine
   \caption at AtBeginDocument*{%
     \let\caption at ORI@capstart\@undefined}%
 %    \end{macrocode}
@@ -1635,7 +1183,7 @@
 %    \end{macrocode}
 % \end{macro}
 %
-% \subsection{\cs{captionof}}
+% \section{\cs{captionof}}
 %
 % \changes{v3.0d}{2004/08/03}{Option \opt{type=} added}
 % \changes{v3.1}{2007/06/25}{Option \opt{type*=} added}
@@ -1777,8 +1325,7 @@
 %  Since we often need to check if |\@captype| is defined (means: we
 %  are inside a floating environment) this helper macro was introduced.
 %    \begin{macrocode}
-\newcommand*\caption at iftype{%
-  \caption at ifundefined\@captype\@secondoftwo\@firstoftwo}
+\newcommand*\caption at iftype{\caption at ifdefined\@captype}
 %    \end{macrocode}
 % \end{macro}
 %
@@ -1879,7 +1426,7 @@
 %    \end{macrocode}
 % \end{macro}
 %
-% \subsection{\cs{captionlistentry}}
+% \section{\cs{captionlistentry}}
 %
 % \begin{macro}{\captionlistentry}
 % \changes{v3.1}{2007/07/28}{This macro added}
@@ -1907,7 +1454,7 @@
 %    \end{macrocode}
 % \end{macro}
 %
-% \subsection{\cs{captionbox}}
+% \section{\cs{captionbox}}
 %
 % \begin{macro}{\captionbox}
 % \changes{v3.2}{2010/12/17}{This macro added}
@@ -1975,9 +1522,9 @@
 %    \end{macrocode}
 % \end{macro}
 %
-% \subsection{\cs{ContinuedFloat}}
+% \section{\cs{continuedfloat}}
 %
-% \begin{macro}{\ContinuedFloat}
+% \begin{macro}{\continuedfloat}
 % \changes{v3.0i}{2005/11/12}{Optional argument added}
 % \changes{v3.0g}{2005/06/28}{Bugfix: \cs{newcounter} replaced by \cs{newcount}}
 % \changes{v3.1}{2007/07/02}{Format of \package{hyperref} extension changed}
@@ -1987,14 +1534,15 @@
 % \changes{v3.3}{2011/12/28}{Uses \cs{ifcaption at ContinuedFloat} now}
 % \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}
-%  |\ContinuedFloat|\\
-%  |\ContinuedFloat*|\par
+% \changes{v3.4}{2015/09/16}{Renamed from \cs{ContinuedFloat} to \cs{continuedfloat}}
+%  |\continuedfloat|\\
+%  |\continuedfloat*|\par
 %  This mainly sets the appropriate flag, increments the
 %  continuation counter, and executes the given options.
-%  Furthermore we set |\caption at reset|\-|Continued|\-|Float| to |\@gobble| so the
+%  Furthermore we set |\caption at reset|\-|continued|\-|float| to |\@gobble| so the
 %  continuation counter will not be reset to zero inside |\caption at ref|\-|step|\-|counter|.\par
 %  When the \package{hyperref} package is used we have the problem
-%  that the usage of |\Continued|\-|Float| will create duplicate
+%  that the usage of |\continued|\-|float| will create duplicate
 %  hyper links -- |\@current|\-|Href| will be the same for the main float and
 %  the continued ones. So we have to make sure unique labels and references
 %  will be created each time. We do this by extending |\the|\-|H|\-|figure| and
@@ -2006,45 +1554,46 @@
 %  \Note{This does not help if the \package{hyperref} package option
 %        \texttt{naturalnames=true} is set.}
 %    \begin{macrocode}
-\def\ContinuedFloat{%
+\def\continuedfloat{%
   \caption at iftype
-    {\caption at ContinuedFloatX\@captype}%
-    {\caption at Error{\noexpand\ContinuedFloat outside float}}}
+    {\caption at continuedfloat\@captype}%
+    {\caption at Error{\noexpand\continuedfloat outside float}}}
 %    \end{macrocode}
 %    \begin{macrocode}
-\newcommand*\caption at ContinuedFloatX[1]{%
+\newcommand*\caption at continuedfloat[1]{%
   \@ifstar
     {\caption@@refstepcounter\@captype
-     \caption@@ContinuedFloat{#1}}%
-    {\caption at Continued@Float{#1}}}
+     \caption@@continuedfloat{#1}}%
+    {\caption at continued@float{#1}}}
 %    \end{macrocode}
 %    \begin{macrocode}
-\newcommand*\caption at Continued@Float[1]{%
+\newcommand*\caption at continued@float[1]{%
   \edef\caption at tempa{#1}%
   \ifx\caption at tempa\caption at CFtype
     \caption at restorecounters
-    \caption@@ContinuedFloat{#1}%
+    \caption@@continuedfloat{#1}%
   \else
     \caption at Error{Continued `#1' after `\caption at CFtype'}%
   \fi}
 %    \end{macrocode}
 %    \begin{macrocode}
-\newcommand*\caption@@ContinuedFloat{%
-  \caption at setflag1% ContinuedFloat
-  \caption@@@ContinuedFloat}
-\newcommand*\caption@@@ContinuedFloat{%
-  \stepcounter{ContinuedFloat}%
-  \caption@@@@ContinuedFloat}
+\newcommand*\caption@@continuedfloat{%
+  \caption at setflag1% continued float
+  \caption@@@continuedfloat}
+\newcommand*\caption@@@continuedfloat{%
+  \stepcounter{continuedfloat}%
+  \caption@@@@continuedfloat}
 %    \end{macrocode}
 %    \begin{macrocode}
-\newcommand*\caption@@@@ContinuedFloat[1]{%
-  \caption at setoptions{ContinuedFloat}%
+\newcommand*\caption@@@@continuedfloat[1]{%
+  \caption at setoptions{ContinuedFloat}% for compatibility reasons
+  \caption at setoptions{continuedfloat}%
   \caption at setoptions{continued#1}%
-  \expandafter\l at addto@macro\csname the#1\endcsname\theContinuedFloat
+  \expandafter\l at addto@macro\csname the#1\endcsname\thecontinuedfloat
   \@ifundefined{theH#1}{}{%
     \expandafter\l at addto@macro\csname theH#1\endcsname{%
-      \@alph\c at ContinuedFloat}}%
-  \let\caption@@@@ContinuedFloat\@gobble}
+      \@alph\c at continuedfloat}}%
+  \let\caption@@@@continuedfloat\@gobble}
 %    \end{macrocode}
 %    \begin{macrocode}
 \newcommand*\caption at CFtype{??}
@@ -2051,15 +1600,37 @@
 %    \end{macrocode}
 % \end{macro}
 %
-% \begin{macro}{\theContinuedFloat}
+% \begin{macro}{\thecontinuedfloat}
+% \changes{v3.4}{2015/09/16}{Renamed from \cs{theContinuedFloat} to \cs{thecontinuedfloat}}
 % This one is preset to \cs{@empty}, so usually the continuation counter is not
 % included in the caption label or references.
 %    \begin{macrocode}
-\newcounter{ContinuedFloat}
-\let\theContinuedFloat\@empty
+\newcounter{continuedfloat}
+\let\c at ContinuedFloat\c at continuedfloat     % defined for compatibility reasons
+\def\thecontinuedfloat{\theContinuedFloat}
+\let\theContinuedFloat\@empty              % defined for compatibility reasons
 %    \end{macrocode}
 % \end{macro}
 %
+% \begin{macro}{\caption at reset@continuedfloat}
+% \changes{v3.2f}{2011/12/17}{Redefinition of \cs{continuedfloat} added}
+%  |\caption at reset@continuedfloat|\marg{type}\par
+%  If a continuation counter is defined, we reset it.
+%  (This one will be called inside |\@caption|.)
+%    \begin{macrocode}
+\newcommand*\caption at reset@continuedfloat[1]{%
+  \xdef\caption at CFtype{#1}%
+  \@stpelt{continuedfloat}}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\ContinuedFloat}
+% For compatibility reasons we still support |\Continued|\-|Float|.
+%    \begin{macrocode}
+\def\ContinuedFloat{\continuedfloat} % defined for compatibility reasons
+%    \end{macrocode}
+% \end{macro}
+%
 % \begin{macro}{\caption at ContinuedFloat}
 % \changes{v3.0f}{2005/06/11}{This macro added}
 % \changes{v3.3}{2013/12/16}{Bugfix: Revised and defined with \cs{def} instead of \cs{newcommand}}
@@ -2067,36 +1638,24 @@
 % This one is used by \cs{ContinuedFloat} offered by the \package{subfig} package.
 %    \begin{macrocode}
 \def\caption at ContinuedFloat{%
-  \let\caption at resetContinuedFloat\@gobble
-  \caption@@@ContinuedFloat}
+  \let\caption at reset@continuedfloat\@gobble
+  \caption@@@continuedfloat}
 %    \end{macrocode}
 % \end{macro}
 %
-% \begin{macro}{\caption at resetContinuedFloat}
-% \changes{v3.2f}{2011/12/17}{Redefinition of \cs{ContinuedFloat} added}
-%  |\caption at resetContinuedFloat|\marg{type}\par
-%  If a continuation counter is defined, we reset it.
-%  (This one will be called inside |\@caption|.)
-%    \begin{macrocode}
-\newcommand*\caption at resetContinuedFloat[1]{%
-  \xdef\caption at CFtype{#1}%
-  \@stpelt{ContinuedFloat}}
-%    \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|.
+% inside |\continued|\-|float|.
 %    \begin{macrocode}
-\caption at ifundefined\donemaincaptionfalse{}{%
-  \g at addto@macro\donemaincaptionfalse\caption at savesubcounters}
+\caption at ifdefined\donemaincaptionfalse{%
+  \g at addto@macro\donemaincaptionfalse\caption at savesubcounters}{}
 %    \end{macrocode}
 % \end{macro}
 %
-% \subsection{Internal helpers}
+% \section{Internal helpers}
 %
 % \begin{macro}{\caption at refstepcounter}
 % \changes{v3.1}{2007/07/28}{This macro added}
@@ -2129,9 +1688,9 @@
 %    \end{macrocode}
 %    \begin{macrocode}
 \newcommand*\caption at ref@stepcounter{%
-  \caption at ifflag1{% ContinuedFloat
+  \caption at ifflag1{% continued float
     \let\caption at tempa\caption@@refcounter
-    \caption at clrflag1% ContinuedFloat
+    \caption at clrflag1% continued float
   }{%
     \let\caption at tempa\caption@@refstepcounter
     \caption at ifflag2{}{% caption
@@ -2168,7 +1727,7 @@
 %    \begin{macrocode}
 \newcommand*\caption at prepare@stepcounter[2]{%
   \caption at addsubcontentslines{#2stepcounter}%
-  \caption at resetContinuedFloat{#1}}
+  \caption at reset@continuedfloat{#1}}
 %    \end{macrocode}
 %    \begin{macrocode}
 \newcommand*\caption@@@refstepcounter{\refstepcounter}
@@ -2207,8 +1766,7 @@
 % \changes{v3.0a}{2004/01/23}{\cs{caption at settype} changed to \cs{caption at setfloattype}}
 % \changes{v3.0e}{2005/04/12}{Check for default label format added}
 % \changes{v3.0f}{2005/06/11}{Usage of \cs{caption at resetContinuedFloat} added}
-% \changes{v3.1}{2007/05/09}{Usage of \cs{caption at setfloattype} \&
-%        \cs{caption at resetContinuedFloat} removed}
+% \changes{v3.1}{2007/05/09}{Usage of \cs{caption at setfloattype} \& \cs{caption at resetContinuedFloat} removed}
 % \changes{v3.3}{2011/12/29}{Usage of \cs{caption at fixedposition} removed}
 %  Our handling of |\caption| will always be surrounded by
 %  |\caption at begin| (or |\caption at beginex|) and |\caption at end|.\par
@@ -2389,13 +1947,13 @@
 %  This one is needed for support of the \package{nameref} package.
 %    \begin{macrocode}
 \newcommand\caption at gettitle[1]{%
-  \caption at ifundefined\NR at gettitle
-    {\def\@currentlabelname{#1}}%
-    {\NR at gettitle{#1}}}
+  \caption at ifdefined\NR at gettitle
+    {\NR at gettitle{#1}}%
+    {\def\@currentlabelname{#1}}}
 %    \end{macrocode}
 % \end{macro}
 %
-% \subsection{Support for sub-captions}
+% \section{Support for sub-captions}
 % \changes{v3.1f}{2007/11/16}{Support for sub-captions added}
 %
 % \begin{macro}{\caption at DeclareSubType}
@@ -2417,9 +1975,9 @@
 % Initialize the sub-captions defined with \cs{newsubfloat}\cite{subfig}\ldots
 %    \begin{macrocode}
 \caption at AtBeginDocument*{%
-  \caption at ifundefined\sf at counterlist{}{%
+  \caption at ifdefined\sf at counterlist{%
     \@for\sf at temp:=\sf at counterlist\do{%
-      \expandafter\caption at DeclareSubType\sf at temp\@nil}}}
+      \expandafter\caption at DeclareSubType\sf at temp\@nil}}{}}
 %    \end{macrocode}
 %
 % \begin{macro}{\caption at subtypehook}
@@ -2449,7 +2007,7 @@
       \let\caption at addsubcontentslines\@gobble
       \caption at ifflag4{}{% subcaption
 % no \subcaption in this part of the (floating) environment yet
-        \caption at ifflag1{% ContinuedFloat
+        \caption at ifflag1{% continued float
           \caption at clrflag1%
         }{%
           \caption@@stepcounter\@captype
@@ -2459,7 +2017,7 @@
     }%
 %    \end{macrocode}
 %    \begin{macrocode}
-    \c at ContinuedFloat=0\relax
+    \c at continuedfloat=0\relax
     \let\caption at setfloatcapt\@firstofone
     \let\caption at chkfloat\@gobbletwo
 %    \end{macrocode}
@@ -2474,7 +2032,7 @@
 % redefine \setcaptiontype
     \def\caption at settype{\caption at withoptargs\caption at sub@settype}%
     \def\caption at sub@settype##1##2{%
-      \def\caption at tempa{##2}%
+      \edef\caption at tempa{##2}%
       \ifx\caption at tempa\@captype
 %%%     \caption at setsubtype##1\relax
       \else
@@ -2608,36 +2166,41 @@
 % We do this |\At|\-|Begin|\-|Document| so packages like \package{newfloat}
 % will not complain about an unknown document class.
 %    \begin{macrocode}
-\AtBeginDocument{\caption at ifundefined\chapter{}{%
-  \let\caption at chapter@ORI\chapter
-  \def\chapter{%
-    \caption at addsubcontentslines{chapter}\caption at chapter@ORI}}}
+\AtBeginDocument{%
 %    \end{macrocode}
+%    \begin{macrocode}
+  \caption at ifdefined\chapter{%
+    \let\caption at chapter@ORI\chapter
+    \def\chapter{%
+      \caption at addsubcontentslines{chapter}\caption at chapter@ORI}}{}%
+%    \end{macrocode}
 % Same for \cs{appendix}.
 %    \begin{macrocode}
-\AtBeginDocument{\caption at ifundefined\appendix{}{%
-  \let\caption at appendix@ORI\appendix
-  \def\appendix{%
-    \caption at addsubcontentslines{appendix}\caption at appendix@ORI}}}
+  \caption at ifdefined\appendix{%
+    \let\caption at appendix@ORI\appendix
+    \def\appendix{%
+      \caption at addsubcontentslines{appendix}\caption at appendix@ORI}}{}%
 %    \end{macrocode}
 % Flush the list of pending sub-caption list entries at the end of the document.
 %    \begin{macrocode}
-\AtEndDocument{%
-  \caption at addsubcontentslines{AtEndDocument}}
+  \caption at addsubcontentslines{AtEndDocument}%
 %    \end{macrocode}
+%    \begin{macrocode}
+}
+%    \end{macrocode}
 % \end{macro}
 %
 %
-% \subsection{Document class \& Babel package support}
+% \section{Document class \& Babel package support}
 %
-% \subsubsection{The \AmS{} \& \SmF{} classes}
+% \subsection{The \AmS{} \& \SmF{} classes}
 % \changes{v3.1}{2007/07/29}{\AmS\ \& \SmF\ classes support added}
 %
 %    \begin{macrocode}
-\caption at ifundefined\smf at makecaption{}{\let\smf at makecaption\@makecaption}
+\caption at ifdefined\smf at makecaption{\let\smf at makecaption\@makecaption}{}
 %    \end{macrocode}
 %
-% \subsubsection{The beamer class}
+% \subsection{The beamer class}
 % \changes{v3.1}{2007/03/10}{beamer class support added}
 %
 %    \begin{macrocode}
@@ -2658,9 +2221,10 @@
 % \begin{macro}{\table}
 % \changes{v3.1f}{2007/12/17}{This re-definition for \class{beamer} document class added}
 % \changes{v3.3d}{2019/09/01}{This re-definition for \class{beamer} document class revised}
+% \changes{v3.4a}{2019/10/18}{Bug fixed which was introduced in previous revision}
 %  We redefine |table| so our type-specific options will be used etc.
 %    \begin{macrocode}
-  \let\caption at ORI@table\figure
+  \let\caption at ORI@table\table
   \def\table{\caption at settype{table}\caption at ORI@table}
 %    \end{macrocode}
 % \end{macro}
@@ -2669,7 +2233,7 @@
 }{}
 %    \end{macrocode}
 %
-% \subsubsection{The \KOMAScript{} classes}
+% \subsection{The \KOMAScript{} classes}
 %
 % \KOMAScript\ contains the code
 % |\AtBeginDocument{\let\scr at caption\caption}|
@@ -2676,11 +2240,11 @@
 % so we need to update |\scr at caption| here, too.
 %
 %    \begin{macrocode}
-\caption at ifundefined\scr at caption{}{%
-  \caption at AtBeginDocument{\let\scr at caption\caption}}
+\caption at ifdefined\scr at caption{%
+  \caption at AtBeginDocument{\let\scr at caption\caption}}{}
 %    \end{macrocode}
 %
-% \subsubsection{The frenchb Babel option}
+% \subsection{The frenchb Babel option}
 % \changes{v3.1}{2006/05/14}{Adaptation to \package{frenchb} added}
 %
 % Suppress
@@ -2691,11 +2255,11 @@
 \@nameuse{caption at frenchb}\@nameundef{caption at frenchb}
 %    \end{macrocode}
 %
-% \subsubsection{The frenchle/pro package}
+% \subsection{The frenchle/pro package}
 % \changes{v3.0h}{2005/10/03}{Adaptation to \package{frenchle/pro} added}
 %
 %    \begin{macrocode}
-\caption at AtBeginDocument{\caption at ifundefined\frenchTeXmods{}{%
+\caption at AtBeginDocument{\caption at ifdefined\frenchTeXmods{%
   \caption at InfoNoLine{frenchle/pro package is loaded}%
 %    \end{macrocode}
 %
@@ -2709,9 +2273,9 @@
 % captions have already been done, so we can do our patches immediately.
 % Otherwise we must add our stuff to |\GOfrench|.
 %    \begin{macrocode}
-  \caption at ifundefined\GOfrench
+  \caption at ifdefined\GOfrench
+    {\def\caption at tempa{\g at addto@macro\GOfrench}}%
     {\let\caption at tempa\@firstofone}%
-    {\def\caption at tempa{\g at addto@macro\GOfrench}}%
   \caption at tempa{%
 %    \end{macrocode}
 %
@@ -2768,10 +2332,10 @@
 %
 %    \begin{macrocode}
   }%
-}}
+}{}}
 %    \end{macrocode}
 %
-% \subsubsection{The hungarian and magyar Babel option}
+% \subsection{The hungarian and magyar Babel option}
 % \changes{v3.2}{2009/03/29}{\package{magyar} package support added}
 % \changes{v3.3}{2018/08/26}{\package{magyar} package support revised}
 %
@@ -2792,7 +2356,7 @@
 \caption at tempa{magyar}%
 %    \end{macrocode}
 %
-% \subsection{Package support}
+% \section{Package support}
 % \changes{v3.1}{2007/04/11}{Package options `float', `longtable' etc.
 %        are not supported anymore, removed}
 %
@@ -2881,10 +2445,10 @@
 %  Used by the \package{bicaption} package.
 %    \begin{macrocode}
     \newcommand*\caption at freeze{%
-      \let\caption at frozen@ContinuedFloat\ContinuedFloat
-      \def\ContinuedFloat{%
-        \caption@@freeze{\caption@@@@ContinuedFloat\@captype}%
-        \caption at frozen@ContinuedFloat}%
+      \let\caption at frozen@continuedfloat\continuedfloat
+      \def\continuedfloat{%
+        \caption@@freeze{\caption@@@@continuedfloat\@captype}%
+        \caption at frozen@continuedfloat}%
 %    \end{macrocode}
 %    \begin{macrocode}
       \let\caption at frozen@setup\caption at setup
@@ -2930,7 +2494,7 @@
 %    \end{macrocode}
 %    \begin{macrocode}
       \def\caption at warmup{%
-        \let\ContinuedFloat\caption at frozen@ContinuedFloat
+        \let\continuedfloat\caption at frozen@continuedfloat
         \let\caption at setup\caption at frozen@setup
         \let\caption\caption at frozen@caption
         \let\label\caption at frozen@label}}%
@@ -2976,7 +2540,7 @@
 %    \end{macrocode}
 % \end{macro}
 %
-% \subsubsection{The chkfloat package}
+% \subsection{The chkfloat package}
 % \changes{v3.3}{2018/09/06}{Support of the \package{chkfloat} package added}
 %
 %    \begin{macrocode}
@@ -2986,12 +2550,13 @@
 % \begin{macro}{\caption at chkfloat}
 % \changes{v3.3}{2018/09/06}{This macro added}
 %    \begin{macrocode}
-  \caption at ifundefined\chkfloat at addcontentsline{%
+  \caption at ifdefined\chkfloat at addcontentsline{%
+    \renewcommand\caption at chkfloat{\chkfloat at addcontentsline}%
+  }{%
     \renewcommand\caption at chkfloat[2]{%
-      \caption at ifundefined\chkfloat at page{}{%
-        \addtocontents{fof}{\protect\chkfloat@{\thepage}{\chkfloat at page}{\csname fnum@#1\endcsname: #2}}}}%
-  }{%
-    \renewcommand\caption at chkfloat{\chkfloat at addcontentsline}%
+      \caption at ifdefined\chkfloat at page{%
+        \addtocontents{fof}{\protect\chkfloat@{\thepage}{\chkfloat at page}{\csname fnum@#1\endcsname: #2}}%
+      }{}}%
   }%
 %    \end{macrocode}
 % \end{macro}
@@ -3000,7 +2565,7 @@
   }{}%
 %    \end{macrocode}
 %
-% \subsubsection{The float package}
+% \subsection{The float package}
 % \changes{v3.0f}{2005/05/31}{\package{float} package support rewritten and improved}
 % \iffalse
 % (This is a more straight-ahead implementation, but it only works with v1.3
@@ -3098,9 +2663,9 @@
 % If it was redefined by the \package{hyperref} package,
 % we need to build on the original definition (and not on the redefined one).
 %    \begin{macrocode}
-    \caption at ifundefined\HyOrg at float@makebox
+    \caption at ifdefined\HyOrg at float@makebox
+      {\let\caption at ORI@float at makebox\HyOrg at float@makebox}%
       {\let\caption at ORI@float at makebox\float at makebox}%
-      {\let\caption at ORI@float at makebox\HyOrg at float@makebox}%
     \renewcommand\float at makebox[1]{%
       \caption at ORI@float at makebox{#1\relax \caption at defrostHref}}%
 %    \end{macrocode}
@@ -3230,7 +2795,7 @@
 \caption at undefbool{ruled}
 %    \end{macrocode}
 %
-% \subsubsection{The floatflt package}
+% \subsection{The floatflt package}
 % \changes{v3.1}{2007/06/10}{Support of the \package{floatflt} package added}
 %
 %    \begin{macrocode}
@@ -3282,7 +2847,7 @@
 }{}
 %    \end{macrocode}
 %
-% \subsubsection{The fltpage package}
+% \subsection{The fltpage package}
 % \changes{v3.1}{2007/07/22}{Support of the \package{fltpage} package added}
 %
 %    \begin{macrocode}
@@ -3432,7 +2997,7 @@
 }
 %    \end{macrocode}
 %
-% \subsubsection{The hyperref package}
+% \subsection{The hyperref package}
 % \changes{v3.0f}{2005/06/11}{Support of the \package{hyperref} package added}
 % \changes{v3.1}{2007/03/09}{Usage of \cs{hyper at makecurrent} instead of
 %   \cs{theHfigure} as indicator for \package{hyperref} package}
@@ -3559,7 +3124,7 @@
 %        instead of \texttt{xxx} now}
 %  |\caption at makestart|\marg{type}
 %  defines a \package{hyperref} anchor inside |\caption at start|.\par
-%  Since we offer |\ContinuedFloat| the float counter can change between
+%  Since we offer |\continuedfloat| the float counter can change between
 %  `now' and |\caption|, i.e., we simply don't know the figure or table counter
 %  yet and therefore we are not able to generate the `right' \package{hyperref}
 %  label.
@@ -3706,7 +3271,7 @@
   }}{}
 %    \end{macrocode}
 %
-% \subsubsection{The hypcap package}
+% \subsection{The hypcap package}
 % \changes{v3.0f}{2005/06/22}{Support of the \package{hypcap} package added}
 % \changes{v3.0l}{2007/02/20}{Adapted to \package{hypcap} \version{1.6}}
 % \changes{v3.1e}{2007/11/04}{\package{hypcap} support adapted to \package{hyperref} \version{6.77}}
@@ -3750,7 +3315,7 @@
   \fi}{}
 %    \end{macrocode}
 %
-% \subsubsection{The listings package}
+% \subsection{The listings package}
 % \changes{v3.0b}{2004/05/16}{Support of the \package{listings} package added}
 %
 %    \begin{macrocode}
@@ -3844,7 +3409,7 @@
 }{}
 %    \end{macrocode}
 %
-% \subsubsection{The longtable package}
+% \subsection{The longtable package}
 %
 % \begin{macro}{\LTcaptype}
 % \changes{v3.1}{2007/07/06}{This macro and its support added}
@@ -3903,7 +3468,7 @@
         \@ifstar{\egroup\LT at listentry\LTcaptype}% gobble *
                 {\egroup\LT at listentry\LTcaptype}}%
 %    \end{macrocode}
-% |\ContinuedFloat| for longtable:\\
+% |\continuedfloat| for longtable:\\
 % {\small(Commented out, since it's not deeply tested and quite useless anyway)}
 % \Note{\package{hyperref} versions $<$ v6.76j uses $2\times$ \cs{hyper at makecurrent}}
 %    \begin{macrocode}
@@ -3917,10 +3482,10 @@
 %         \def\hyper at makecurrent####1{%
 %%          \let\@currentHlabel\Hy at LT@currentHlabel
 %           \let\@currentHref\Hy at LT@currentHref}}%
-%       \let\caption at ORI@ContinuedFloat\ContinuedFloat
-%       \def\ContinuedFloat{\noalign{%
+%       \let\caption at ORI@continuedfloat\continuedfloat
+%       \def\continuedfloat{\noalign{%
 %         \gdef\caption at setContinuedFloat{%
-%           \let\caption at resetContinuedFloat\@gobble}%
+%           \let\caption at reset@continuedfloat\@gobble}%
 %         \def\caption at setoptions####1{%
 %           \g at addto@macro\caption at setContinuedFloat{%
 %             \caption at setoptions{####1}}}%
@@ -3927,14 +3492,14 @@
 %         \let\@captype\LTcaptype
 %         \caption at ORI@ContinuedFloat}}%
 %     }{%
-%       \def\ContinuedFloat{\noalign{%
+%       \def\continuedfloat{\noalign{%
 %         \caption at Error{%
-%           \noexpand\ContinuedFloat inside longtables\MessageBreak
+%           \noexpand\continuedfloat inside longtables\MessageBreak
 %           is only available with `hypcap=true'}}}%
 %     }%
 %     \global\let\caption at setContinuedFloat\@empty
-      \def\ContinuedFloat{\noalign{%
-        \caption at Error{\noexpand\ContinuedFloat outside float}}}%
+      \def\continuedfloat{\noalign{%
+        \caption at Error{\noexpand\continuedfloat outside float}}}%
 %    \end{macrocode}
 % |\bicaption| for longtable:
 %    \begin{macrocode}
@@ -4049,8 +3614,8 @@
 % so we supress this skip if the \package{floatrow} package is loaded.
 % (This fixes \issue{50})
 %    \begin{macrocode}
-        \caption at ifundefined\FBifcaptop{}{%
-          \let\caption at belowskip\@empty}%
+        \caption at ifdefined\FBifcaptop{%
+          \let\caption at belowskip\@empty}{}%
 %    \end{macrocode}
 %
 %  The following code should look familiar. We do our skips and use
@@ -4113,7 +3678,7 @@
 %    \end{macrocode}
 % \end{macro}
 %
-% \subsubsection{The picinpar package}
+% \subsection{The picinpar package}
 % \changes{v3.1}{2007/06/13}{Support of the \package{picinpar} package added}
 %
 %    \begin{macrocode}
@@ -4197,7 +3762,7 @@
 }{}
 %    \end{macrocode}
 %
-% \subsubsection{The picins package}
+% \subsection{The picins package}
 % \changes{v3.0j}{2006/01/26}{Support of the \package{picins} package added}
 %
 % \begin{macro}{\piccaptiontype}
@@ -4334,7 +3899,7 @@
 }
 %    \end{macrocode}
 %
-% \subsubsection{The rotating package}
+% \subsection{The rotating package}
 %
 %    \begin{macrocode}
 \caption at IfPackageLoaded{rotating}[1995/08/22 v2.10]{%
@@ -4398,7 +3963,7 @@
 }{}
 %    \end{macrocode}
 %
-% \subsubsection{The sidecap package}
+% \subsection{The sidecap package}
 %
 %    \begin{macrocode}
 \caption at IfPackageLoaded{sidecap}[2003/06/06 v1.6f]{%
@@ -4497,7 +4062,7 @@
 }{}
 %    \end{macrocode}
 %
-% \subsubsection{The subfigure package}
+% \subsection{The subfigure package}
 % \changes{v3.1}{2007/04/06}{subfigure package support added}
 %
 %    \begin{macrocode}
@@ -4535,7 +4100,7 @@
 }{}
 %    \end{macrocode}
 %
-% \subsubsection{The supertabular and xtab packages}
+% \subsection{The supertabular and xtab packages}
 %
 %    \begin{macrocode}
 \caption at IfPackageLoaded{supertabular}[2002/07/19 v4.1e]{%
@@ -4678,7 +4243,7 @@
 }{}
 %    \end{macrocode}
 %
-% \subsubsection{The threeparttable package}
+% \subsection{The threeparttable package}
 % \changes{v3.1}{2007/05/08}{Support of the \package{threeparttable} package added}
 %
 %    \begin{macrocode}
@@ -4748,7 +4313,7 @@
 }{}
 %    \end{macrocode}
 %
-% \subsubsection{The wrapfig package}
+% \subsection{The wrapfig package}
 % \changes{v3.1}{2007/05/05}{Support of the \package{wrapfig} package added}
 % \changes{v3.2d}{2011/11/02}{Support of the \package{wrapfig} package rewritten}
 %

Modified: trunk/Master/texmf-dist/source/latex/caption/caption.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/caption/caption.ins	2019-11-24 00:53:56 UTC (rev 52904)
+++ trunk/Master/texmf-dist/source/latex/caption/caption.ins	2019-11-24 21:23:07 UTC (rev 52905)
@@ -25,16 +25,13 @@
 This Current Maintainer of this work is Axel Sommerfeldt.
 
 This work consists of the files
-  CHANGELOG, README, SUMMARY, caption.ins,
-  caption.dtx, caption2.dtx, caption3.dtx,
-  bicaption.dtx, ltcaption.dtx, subcaption.dtx,
-  newfloat.dtx, and totalcount.dtx
+  caption.ins, caption.dtx, caption2.dtx, caption3.dtx,
+  bicaption.dtx, ltcaption.dtx, subcaption.dtx, totalcount.dtx,
 the derived files
   caption.sty, caption2.sty, caption3.sty,
-  bicaption.sty, ltcaption.sty, subcaption.sty,
-  newfloat.sty, and totalcount.sty
+  bicaption.sty, ltcaption.sty, subcaption.sty, totalcount.sty,
 and the user manuals
-  caption-deu.tex, caption-eng.tex, and caption-rus.tex.
+  caption-deu.tex, caption-eng.tex, caption-rus.tex.
 
 \endpreamble
 
@@ -44,7 +41,6 @@
 \generate{\file{bicaption.sty}{\from{bicaption.dtx}{package}}}
 \generate{\file{ltcaption.sty}{\from{ltcaption.dtx}{package}}}
 \generate{\file{subcaption.sty}{\from{subcaption.dtx}{package}}}
-\generate{\file{newfloat.sty}{\from{newfloat.dtx}{package}}}
 \generate{\file{totalcount.sty}{\from{totalcount.dtx}{package}}}
 
 \Msg{***********************************************************}
@@ -52,8 +48,7 @@
 \Msg{* To finish the installation you have to move the files}
 \Msg{* `caption.sty', `caption2.sty', 'caption3.sty',}
 \Msg{* `bicaption.sty', `ltcaption.sty', `subcaption.sty',}
-\Msg{* `newfloat.sty', and `totalcount.sty'}
-\Msg{* into a directory searched by TeX.}
+\Msg{* and `totalcount.sty' into a directory searched by TeX.}
 \Msg{*}
 \Msg{* To produce the documentation run the file}
 \Msg{* `caption-eng.tex' (English version) or `caption-rus.tex'}

Modified: trunk/Master/texmf-dist/source/latex/caption/caption3.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/caption/caption3.dtx	2019-11-24 00:53:56 UTC (rev 52904)
+++ trunk/Master/texmf-dist/source/latex/caption/caption3.dtx	2019-11-24 21:23:07 UTC (rev 52905)
@@ -25,7 +25,7 @@
 % and the user manuals caption-deu.tex, caption-eng.tex, and caption-rus.tex.
 % 
 % \fi
-% \CheckSum{3961}
+% \CheckSum{3418}
 %
 % \iffalse
 %<*driver>
@@ -38,9 +38,6 @@
 \setlength\parindent{0pt}
 \setlength\parskip{\smallskipamount}
 %
-%\let\ORIsubsection\subsection
-%\def\subsection{\clearpage\ORIsubsection}
-%
 \makeatletter % make room for subsections like 2.16.14 in the TOC
 %\newcommand*\l at subsection{\@dottedtocline{2}{1.5em}{2.3em}}
 \renewcommand*\l at subsection{\@dottedtocline{2}{1.5em}{2.7em}}
@@ -57,11 +54,8 @@
 \ifpdf\usepackage{hypdestopt}\fi
 \hypersetup{pdfkeywords={LaTeX, package, caption},pdfstartpage={},pdfstartview={}}
 %
-\usepackage[debug]{caption3}[2018/05/01]
+\usepackage{caption3}[2019/09/09]
 %
-\DeclareRobustCommand*\eTeX{\texorpdfstring
-  {\leavevmode\hbox{$\varepsilon$}-\TeX}%
-  {e-TeX}}
 \DeclareRobustCommand*\AmS{\texorpdfstring
   {{\protect\usefont{OMS}{cmsy}{m}{n}A\kern-.1667em\lower.5ex\hbox{M}\kern-.125emS}}%
   {AMS}}
@@ -90,8 +84,6 @@
 % \newcommand*\csoarg[1]{\texttt{\char`\[#1\char`\]}}
 % \newcommand*\version[2][]{\textit{v#2}}
 %
-% \GetFileInfo{caption3.drv}
-% \let\docdate\filedate
 % \GetFileInfo{caption3.sty}
 %
 % \title{The Implementation of
@@ -100,7 +92,7 @@
 %        {the caption kernel}}
 % \author{Axel Sommerfeldt\\
 %         \url{https://gitlab.com/axelsommerfeldt/caption}}
-% \date{\docdate}
+% \date{\filedate}
 % \maketitle
 %
 % \begin{abstract}
@@ -187,25 +179,23 @@
 % \fi
 %
 % \clearpage
-% \let\subsubsection\subsection
-% \let\subsection\section
 %
 % \iffalse
 %<*package>
 % \fi
 %
-% \subsection{Identification}
+% \section{Identification}
 %
 %    \begin{macrocode}
 \NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption3}[2019/09/01 v1.8d caption3 kernel (AR)]
+\ProvidesPackage{caption3}[2019/09/09 v1.8e caption3 kernel (AR)]
 %    \end{macrocode}
 %
-% \subsection{Workaround for bug in package \package{arabtex}}
+% \section{Workaround for bug in package \package{arabtex}}
 % \package{arabtex} re-defines \cs{@gobble} as not-long so the packages of the
 % \package{caption} package bundle are doomed to fail.
 % Since this fatal bug won't be fixed in \package{arabtex} but we are dependent on a
-% proper definition of \cs{@gobble}, \cs{@firstofone}, \cs{@firstoftwo}, \cs{@secondoftwo}
+% proper definition of \cs{@gobble}, \cs{@firstofone}, \cs{@firstoftwo}, \cs{@secondoftwo},
 % and so on we fix this here. (Sigh!)
 %    \begin{macrocode}
 \providecommand\caption at FixArabTeX{%
@@ -223,7 +213,7 @@
   \let\caption at FixArabTeX\@undefined}
 %    \end{macrocode}
 %
-% \subsection{Generic helpers}
+% \section{Generic helpers}
 %
 % \begin{macro}{\@nameundef}
 %  This is the opposite to |\@namedef| which is offered by the \LaTeX\ kernel.
@@ -286,8 +276,8 @@
 % \begin{macro}{\caption at ifundefined}
 % \changes{v1.3a}{2011/08/12}{This macro added}
 % \changes{v1.3b}{2011/08/18}{Made expandable}
-% Similar to \cs{@ifundefined} offered by the \LaTeX kernel, but does
-% not define the undefined macro as \cs{relax}.
+% Similar to \cs{@ifundefined} offered by the \LaTeX kernel,
+% but takes a macro as argument instead of a macro name.
 %    \begin{macrocode}
 \newcommand*\caption at ifundefined[1]{%
   \ifx#1\@undefined
@@ -300,6 +290,22 @@
 %    \end{macrocode}
 % \end{macro}
 %
+% \begin{macro}{\caption at ifdefined}
+% \changes{v1.8e}{2018/05/11}{This macro added}
+% Similar to \cs{@ifundefined} offered by the \LaTeX kernel,
+% but takes a macro as argument instead of a macro name.
+%    \begin{macrocode}
+\newcommand*\caption at ifdefined[1]{%
+  \ifx#1\@undefined
+    \expandafter\@secondoftwo
+  \else\ifx#1\relax
+    \expandafter\expandafter\expandafter\@secondoftwo
+  \else
+    \expandafter\expandafter\expandafter\@firstoftwo
+  \fi\fi}
+%    \end{macrocode}
+% \end{macro}
+%
 % \begin{macro}{\caption at ifinlist}
 % \changes{v1.1}{2007/07/29}{Rewritten}
 %  This helper macro checks if the first argument is in the comma separated
@@ -505,53 +511,6 @@
 %    \end{macrocode}
 % \end{macro}
 %
-% \begin{macro}{\caption at CheckCommand}
-% \changes{v1.1}{2007/04/10}{This macro added}
-% \begin{macro}{\caption at IfCheckCommand}
-% \changes{v1.1}{2007/04/10}{This macro added}
-% \changes{v1.2b}{2008/08/02}{Revised so \cs{next} is no longer used}
-% \changes{v1.5}{2012/08/25}{Bugfix: Uses \cs{caption at tempa} instead of \cs{@tempa}}
-%  |\caption at CheckCommand|\marg{macro}\marg{definition of macro}\par
-%  checks if a command already exists, with the same definition.
-%  It can be used more-than-once to check if one of multiple definitions will
-%  finally match.
-%  (It redefines itself later on to |\@gobbletwo| if the two commands match
-%   fine, making further checks harmless.)\par
-%  |\caption at IfCheckCommand|\marg{true}\marg{false}\par
-%  will execute the \meta{true} code if one match was finally given,
-%  the \meta{false} code otherwise.
-%  (It simply checks if |\caption at CheckCommand| is |\@gobbletwo| and
-%   restores the starting definition of |\caption at CheckCommand|.)
-%    \begin{macrocode}
-\newcommand\caption at DoCheckCommand[2]{%
-  \begingroup
-    \let\caption at tempa#1%
-    #2%
-    \ifx\caption at tempa#1%
-      \endgroup
-      \let\caption at CheckCommand\@gobbletwo
-    \else
-      \endgroup
-    \fi}
-\@onlypreamble\caption at DoCheckCommand
-%    \end{macrocode}
-%    \begin{macrocode}
-\let\caption at CheckCommand\caption at DoCheckCommand
-\@onlypreamble\caption at CheckCommand
-%    \end{macrocode}
-%    \begin{macrocode}
-\newcommand*\caption at IfCheckCommand{%
-  \ifx\caption at CheckCommand\@gobbletwo
-    \let\caption at CheckCommand\caption at DoCheckCommand
-    \expandafter\@firstoftwo
-  \else
-    \expandafter\@secondoftwo
-  \fi}
-\@onlypreamble\caption at IfCheckCommand
-%    \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
 % \begin{macro}{\caption at AtBeginDocument}
 % \changes{v1.1}{2007/04/13}{This macro and its usage added}
 % \changes{v1.2e}{2010/01/09}{Adapted to the combine document class}
@@ -591,7 +550,7 @@
 %    \end{macrocode}
 % \end{macro}
 %
-% \subsection{Information, Warnings, and Errors}
+% \section{Information, Warnings, and Errors}
 %
 % \begin{macro}{\caption at Info}
 % \changes{v1.3}{2010/10/25}{Moved from package to kernel}
@@ -658,7 +617,7 @@
 %    \end{macrocode}
 % \end{macro}
 %
-% \subsection{Using the keyval package}
+% \section{Using the keyval package}
 %
 % We need the \package{keyval} package for option handling, so we load it here.
 %    \begin{macrocode}
@@ -1127,7 +1086,7 @@
 %    \end{macrocode}
 % \end{macro}
 %
-% \subsection{Margin resp. width}
+% \section{Margin resp. width}
 % \changes{v1.0n}{2007/04/01}{\cs{captionmarginx} renamed to \cs{captionmargin@}}
 % \changes{v1.0n}{2007/04/03}{Option `twoside' added}
 % \changes{v1.1}{2007/08/11}{Options `margin*', `minmargin', and `maxmargin' added}
@@ -1369,7 +1328,7 @@
 %    \end{macrocode}
 % \end{macro}
 %
-% \subsection{Indentions}
+% \section{Indentions}
 %
 % \begin{macro}{\caption at indent}
 % \changes{v1.1}{2007/07/29}{Renamed from \cs{captionindent} to \cs{caption at indent}}
@@ -1404,60 +1363,8 @@
        \l at addto@macro\caption@@par{\setlength\parskip{#1}}}
 %    \end{macrocode}
 %
-% \changes{v1.0f}{2005/08/22}{Increased compatibility to KOMA-Script:
-%        A special version of options `parindent' and `parskip' added}
-% \changes{v1.0g}{2006/01/03}{Bugfix 06-01-03: KOMA-Script variants of
-%        `parskip' and `parindent' options revised and moved into caption kernel}
-% \changes{v1.0h}{2006/02/23}{KOMA-Script variants of `parskip' and
-%        `parindent' are obsolete now, removed}
-% \changes{v1.0m}{2007/03/30}{KOMA-Script variants of `parskip' and
-%        `parindent' re-added, since they still collide with the current
-%        version of the subfig package (Sigh!)}
+% \section{Styles}
 %
-% There is an option clash between the \KOMAScript\ document classes
-% and the \package{caption} kernel, both define the options |parindent| and
-% |parskip| but with different meaning.
-% Furthermore the ones defined by the \package{caption} kernel take a
-% value as parameter but the \KOMAScript\ ones do not.
-% So we need special versions of the options |parindent| and |parskip| here
-% which determine if a value is given (and therefore should be treated as
-% our option) or not (and therefore should be ignored by us).\footnote{%^^A
-% This problem was completely solved due a change of \cs{caption at ProcessOptions}
-% in \thispackage\ \version{1.0h}, but we still need this workaround since
-% these options would otherwise still collide with the current version $1.3$
-% of the \package{subfig} package (Sigh!)}
-%    \begin{macrocode}
-\providecommand*\caption at ifkomaclass{%
-  \caption at ifundefined\scr at caption\@gobble\@firstofone}
-\@onlypreamble\caption at ifkomaclass
-%    \end{macrocode}
-%    \begin{macrocode}
-\caption at ifkomaclass{%
-%    \end{macrocode}
-%    \begin{macrocode}
-  \let\caption at KV@parindent\KV at caption@parindent
-  \DeclareCaptionOption{parindent}[]{%
-    \ifx,#1,%
-      \caption at Debug{Option `parindent' ignored}%
-    \else
-      \caption at KV@parindent{#1}%
-    \fi}%
-%    \end{macrocode}
-%    \begin{macrocode}
-  \let\caption at KV@parskip\KV at caption@parskip
-  \DeclareCaptionOption{parskip}[]{%
-    \ifx,#1,%
-      \caption at Debug{Option `parskip' ignored}%
-    \else
-      \caption at KV@parskip{#1}%
-    \fi}%
-%    \end{macrocode}
-%    \begin{macrocode}
-}
-%    \end{macrocode}
-%
-% \subsection{Styles}
-%
 % \begin{macro}{\DeclareCaptionStyle}
 % \changes{v1.0a}{2004/01/17}{Pass through argument \#3 so extra spaces
 %        between arguments do make any harm}
@@ -1564,7 +1471,7 @@
 \DeclareCaptionOption{slc}[1]{\KV at caption@singlelinecheck{#1}}
 %    \end{macrocode}
 %
-% \subsection{Boxes}
+% \section{Boxes}
 %
 % \begin{macro}{\DeclareCaptionBox}
 % \changes{v1.5}{2012/03/15}{This macro added}
@@ -1627,7 +1534,7 @@
 \def\caption at box@default{\caption at box@none}
 %    \end{macrocode}
 %
-% \subsection{Formats}
+% \section{Formats}
 %
 % \begin{macro}{\DeclareCaptionFormat}
 % \changes{v1.0a}{2004/01/17}{Pass through argument \#3 so extra spaces
@@ -1720,7 +1627,7 @@
 \DeclareCaptionDefaultFormat{plain}
 %    \end{macrocode}
 %
-% \subsection{Label formats}
+% \section{Label formats}
 %
 % \begin{macro}{\DeclareCaptionLabelFormat}
 % \changes{v1.0a}{2004/01/17}{%
@@ -1768,7 +1675,7 @@
 \def\caption at lfmt@default{\caption at lfmt@simple}
 %    \end{macrocode}
 %
-% \subsection{Label separators}
+% \section{Label separators}
 %
 % \begin{macro}{\DeclareCaptionLabelSeparator}
 % \changes{v1.0a}{2004/01/17}{Pass through argument \#2 so extra spaces
@@ -1856,7 +1763,7 @@
 \caption at set@default at labelsep{colon}
 %    \end{macrocode}
 %
-% \subsection{Text formats}
+% \section{Text formats}
 %
 % \begin{macro}{\DeclareCaptionTextFormat}
 % \changes{v1.0j}{2007/02/18}{This macro added}
@@ -1953,7 +1860,7 @@
 %    \end{macrocode}
 % \end{macro}
 %
-% \subsection{Fonts}
+% \section{Fonts}
 %
 % \begin{macro}{\DeclareCaptionFont}
 % \changes{v1.0a}{2004/01/22}{%
@@ -2151,8 +2058,8 @@
 % \changes{v1.2d}{2009/10/09}{Bugfix 09-05-18: \package{setspace} package support revised}
 %    \begin{macrocode}
 \DeclareCaptionFont{singlespacing}{%
-  \caption at ifundefined\setspace at singlespace{}{%
-    \setstretch\setspace at singlespace}}% normally 1
+  \caption at ifdefined\setspace at singlespace{%
+    \setstretch\setspace at singlespace}{}}% normally 1
 \DeclareCaptionFont{onehalfspacing}{\onehalfspacing}
 \DeclareCaptionFont{doublespacing}{\doublespacing}
 \DeclareCaptionFont{stretch}{\setstretch{#1}}
@@ -2178,7 +2085,7 @@
 \DeclareCaptionDefaultFont{size}{}
 %    \end{macrocode}
 %
-% \subsection{Justifications}
+% \section{Justifications}
 %
 % \begin{macro}{\DeclareCaptionJustification}
 % \changes{v1.0a}{2004/01/17}{Pass through argument \#2 so extra spaces
@@ -2261,7 +2168,7 @@
 %    \end{macrocode}
 % \end{macro}
 %
-% \subsubsection{The ragged2e package}
+% \subsection{The ragged2e package}
 % \changes{v1.0b}{2004/05/16}{Improved \package{ragged2e} package support}
 %
 % We also support the upper-case commands offered by the \package{ragged2e}
@@ -2353,7 +2260,7 @@
 %    \end{macrocode}
 % \end{macro}
 %
-% \subsection{Vertical spaces before and after captions}
+% \section{Vertical spaces before and after captions}
 %
 % \begin{macro}{\abovecaptionskip}
 % \begin{macro}{\belowcaptionskip}
@@ -2392,7 +2299,7 @@
 \DeclareCaptionOption{rule}[1]{\caption at set@bool\caption at ifrule{#1}}
 %    \end{macrocode}
 %
-% \subsection{Positioning}
+% \section{Positioning}
 %
 % These macros handle the right position of the caption.
 % Note that the position is actually \emph{not} controlled by the
@@ -2517,7 +2424,7 @@
 %    \end{macrocode}
 % \end{macro}
 %
-% \subsection{Hooks}
+% \section{Hooks}
 %
 % \begin{macro}{\AtBeginCaption}
 % \begin{macro}{\AtEndCaption}
@@ -2533,7 +2440,7 @@
 % \end{macro}
 % \end{macro}
 %
-% \subsection{Lists}
+% \section{Lists}
 %
 % \changes{v1.0b}{2004/05/16}{Option \opt{listof=} added}
 % \changes{v1.2}{2007/11/17}{Option \opt{list=} added}
@@ -2642,7 +2549,7 @@
 \caption at set@default at listformat{subsimple}
 %    \end{macrocode}
 %
-% \subsection{Debug option}
+% \section{Debug option}
 % \changes{v1.0k}{2007/03/04}{Debug option added}
 %
 %    \begin{macrocode}
@@ -2659,44 +2566,73 @@
 \setkeys{caption}{debug=0}
 %    \end{macrocode}
 %
-% \subsection{Document classes \& Babel support}
+% \section{Document classes \& Babel support}
 %
-% \subsubsection{The standard \texorpdfstring{\LaTeX{}}{LaTeX} classes}
-%
+% \begin{macro}{\caption at ifdocumentclass}
+% Boolean switch which is set if the document class could be detected successfully,
+% i.e. |\caption at document|\-|class| is set to a proper value.
+% (If |\caption at document|\-|class| is already set, this flag will also be set.)
 %    \begin{macrocode}
-\caption at CheckCommand\@makecaption{%
-  % article|report|book [2005/09/16 v1.4f Standard LaTeX document class]
-  \long\def\@makecaption#1#2{%
-    \vskip\abovecaptionskip
-    \sbox\@tempboxa{#1: #2}%
-    \ifdim \wd\@tempboxa >\hsize
-      #1: #2\par
-    \else
-      \global \@minipagefalse
-      \hb at xt@\hsize{\hfil\box\@tempboxa\hfil}%
-    \fi
-    \vskip\belowcaptionskip}}
+\caption at setbool{documentclass}{1}
 %    \end{macrocode}
+% \end{macro}
 %
-% \subsubsection{The elsarticle classes}
-% \changes{v1.5}{2013/01/06}{elsarticle class support added}
-%
-% \begin{macro}{\caption at ifelsarticleclass}
+% \begin{macro}{\caption at documentclass}
+% \changes{v1.8e}{2018/05/11}{This macro added}
+% Determine document class used.
+% Set |\caption at document|\-|class| by good-guessing, if not already set.
 %    \begin{macrocode}
-\providecommand*\caption at ifelsarticleclass{%
-  \@ifclassloaded{elsarticle}\@firstofone\@gobble}
-\@onlypreamble\caption at ifelsarticleclass
+\caption at ifundefined\caption at documentclass{%
 %    \end{macrocode}
-% \end{macro}
-%
 %    \begin{macrocode}
-\caption at ifelsarticleclass{%
+  \@ifclassloaded{beamer}{%
+    \caption at InfoNoLine{beamer document class detected}%
+    \def\caption at documentclass{beamer}%
 %    \end{macrocode}
 %    \begin{macrocode}
-  \caption at CheckCommand\@makecaption{%
-    % elsarticle.cls,v 1.20 2008-10-13 04:24:12 cvr Exp
-    \long\def\@makecaption#1#2{%
-      \vskip\abovecaptionskip\footnotesize
+  }{\@ifclassloaded{elsarticle}{%
+    \caption at InfoNoLine{elsarticle document class detected}%
+    \def\caption at documentclass{elsarticle}%
+%    \end{macrocode}
+%    \begin{macrocode}
+  }{\@ifclassloaded{memoir}{%
+    \caption at InfoNoLine{memoir document class detected}%
+    \def\caption at documentclass{memoir}%
+%    \end{macrocode}
+%    \begin{macrocode}
+  }{\caption at ifdefined\scr at caption{%
+    \caption at InfoNoLine{KOMA-Script document class detected}%
+    \def\caption at documentclass{koma}%
+%    \end{macrocode}
+% If |\@captionheadfont| is defined, we assume it's a AMS or SMF document class.
+%    \begin{macrocode}
+  }{\caption at ifdefined\@captionheadfont{%
+    \caption at InfoNoLine{AMS or SMF document class detected}%
+    \def\caption at documentclass{ams}%
+%    \end{macrocode}
+% If |\@CaptionFonts| is defined, we assume it's a NTG Dutch document class.
+%    \begin{macrocode}
+  }{\caption at ifdefined\CaptionFonts{%
+    \caption at InfoNoLine{NTG document class detected}%
+    \def\caption at documentclass{ntg}%
+%    \end{macrocode}
+% If |\cph at font| and |\cpb at font| are defined, we assume it's a NTG Dutch document class.
+%    \begin{macrocode}
+  }{\caption at ifdefined\cph at font{%
+      \caption at ifdefined\cpb at font\@firstoftwo\@secondoftwo
+    }{%
+      \@secondoftwo
+    }{%
+    \caption at InfoNoLine{thesis document class detected}%
+    \def\caption at documentclass{thesis}%
+  }{%
+%    \end{macrocode}
+% If the definition of |\@makecaption| matches the one from the standard \LaTeX\ document classes
+% |article|, |report|, or |book|, we assume it's either one of them or is compatible to them.
+%    \begin{macrocode}
+    % article|report|book [2005/09/16 v1.4f Standard LaTeX document class]
+    \long\def\caption at tempa#1#2{%
+      \vskip\abovecaptionskip
       \sbox\@tempboxa{#1: #2}%
       \ifdim \wd\@tempboxa >\hsize
         #1: #2\par
@@ -2705,91 +2641,61 @@
         \hb at xt@\hsize{\hfil\box\@tempboxa\hfil}%
       \fi
       \vskip\belowcaptionskip}}
+    \ifx\caption at tempa\@makecaption
+      \caption at InfoNoLine{Standard document class detected}%
+    \else
 %    \end{macrocode}
+% Otherwise we are clueless and use standard default settings for the captions anyway.
+% (And we unset the |document|\-|class| flag to indicate that the content of |\caption at document|\-|class| is not correct.)
 %    \begin{macrocode}
-  \DeclareCaptionDefaultFont{font}{\footnotesize}
+      \caption at InfoNoLine{%
+        Unknown document class (or package),\MessageBreak
+        standard defaults will be used}%
+      \caption at InfoNoLine{\string\@makecaption\space=\space\meaning\@makecaption\@gobble}%
+      \caption at setbool{documentclass}{0}%
+    \fi
+    \def\caption at documentclass{base}%
+  }}}}}}%
+}{}
 %    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\caption at ifclassloaded}
+% \changes{v1.8e}{2019/09/09}{This macro added}
+% |\caption at ifclassloaded|\marg{name}\marg{yes-code}\marg{no-code}
 %    \begin{macrocode}
-}
+\newcommand*\caption at ifclassloaded[1]{%
+  \edef\caption at tempa{#1}%
+  \ifx\caption at tempa\caption at documentclass
+    \expandafter\@firstoftwo
+  \else
+    \expandafter\@secondoftwo
+  \fi}
 %    \end{macrocode}
+% \end{macro}
 %
-% \subsubsection{The \AmS{} \& \SmF{} classes}
-% \changes{v1.1}{2007/07/29}{\AmS\ \& \SmF\ classes support added}
+% \subsection{The standard \texorpdfstring{\LaTeX{}}{LaTeX} classes}
 %
-% \begin{macro}{\caption at ifamsclass}
+% Since this is the default, there is no extra work to be done here.
+%
+% \subsection{The elsarticle classes}
+% \changes{v1.5}{2013/01/06}{elsarticle class support added}
+%
 %    \begin{macrocode}
-\providecommand*\caption at ifamsclass{%
-  \caption at ifundefined\@captionheadfont\@gobble\@firstofone}
-\@onlypreamble\caption at ifamsclass
+\caption at ifclassloaded{elsarticle}{%
 %    \end{macrocode}
-% \end{macro}
-%
 %    \begin{macrocode}
-\caption at ifamsclass{%
+  \DeclareCaptionDefaultFont{font}{\footnotesize}
 %    \end{macrocode}
 %    \begin{macrocode}
-  \caption at CheckCommand\@makecaption{%
-    % amsart|amsproc|amsbook [2004/08/06 v2.20]
-    \long\def\@makecaption#1#2{%
-      \setbox\@tempboxa\vbox{\color at setgroup
-        \advance\hsize-2\captionindent\noindent
-        \@captionfont\@captionheadfont#1\@xp\@ifnotempty\@xp
-            {\@cdr#2\@nil}{.\@captionfont\upshape\enspace#2}%
-        \unskip\kern-2\captionindent\par
-        \global\setbox\@ne\lastbox\color at endgroup}%
-      \ifhbox\@ne % the normal case
-        \setbox\@ne\hbox{\unhbox\@ne\unskip\unskip\unpenalty\unkern}%
-      \fi
-      \ifdim\wd\@tempboxa=\z@ % this means caption will fit on one line
-        \setbox\@ne\hbox to\columnwidth{\hss\kern-2\captionindent\box\@ne\hss}%
-      \else % tempboxa contained more than one line
-        \setbox\@ne\vbox{\unvbox\@tempboxa\parskip\z at skip
-            \noindent\unhbox\@ne\advance\hsize-2\captionindent\par}%
-      \fi
-      \ifnum\@tempcnta<64 % if the float IS a figure...
-        \addvspace\abovecaptionskip
-        \hbox to\hsize{\kern\captionindent\box\@ne\hss}%
-      \else % if the float IS NOT a figure...
-        \hbox to\hsize{\kern\captionindent\box\@ne\hss}%
-        \nobreak
-        \vskip\belowcaptionskip
-      \fi
-    \relax
-    }}
+}{}
 %    \end{macrocode}
+%
+% \subsection{The \AmS{} \& \SmF{} classes}
+% \changes{v1.1}{2007/07/29}{\AmS\ \& \SmF\ classes support added}
+%
 %    \begin{macrocode}
-  \caption at CheckCommand\@makecaption{%
-    % smfart|smfbook [1999/11/15 v1.2f Classe LaTeX pour les articles publies par la SMF]
-    \long\def\@makecaption#1#2{%
-      \ifdim\captionindent>.1\hsize \captionindent.1\hsize \fi
-      \setbox\@tempboxa\vbox{\color at setgroup
-        \advance\hsize-2\captionindent\noindent
-        \@captionfont\@captionheadfont#1\@xp\@ifnotempty\@xp
-            {\@cdr#2\@nil}{\@addpunct{.}\@captionfont\upshape\enspace#2}%
-        \unskip\kern-2\captionindent\par
-        \global\setbox\@ne\lastbox\color at endgroup}%
-      \ifhbox\@ne % the normal case
-        \setbox\@ne\hbox{\unhbox\@ne\unskip\unskip\unpenalty\unkern}%
-      \fi
-      \ifdim\wd\@tempboxa=\z@ % this means caption will fit on one line
-        \setbox\@ne\hbox to\columnwidth{\hss\kern-2\captionindent\box\@ne\hss}%
-        \@tempdima\wd\@ne\advance\@tempdima-\captionindent
-        \wd\@ne\@tempdima
-      \else % tempboxa contained more than one line
-        \setbox\@ne\vbox{\rightskip=0pt plus\captionindent\relax
-            \unvbox\@tempboxa\parskip\z at skip
-            \noindent\unhbox\@ne\advance\hsize-2\captionindent\par}%
-      \fi
-      \ifnum\@tempcnta<64 % if the float IS a figure...
-        \addvspace\abovecaptionskip
-        \noindent\kern\captionindent\box\@ne
-      \else % if the float IS NOT a figure...
-        \noindent\kern\captionindent\box\@ne
-        \nobreak
-        \vskip\belowcaptionskip
-      \fi
-    \relax
-    }}
+\caption at ifclassloaded{ams}{%
 %    \end{macrocode}
 %    \begin{macrocode}
   \let\captionmargin\captionindent % set to 3pc by AMS class
@@ -2796,7 +2702,7 @@
   \begingroup\edef\@tempa{\endgroup
     \noexpand\caption at g@addto at list\noexpand\caption at sty@default
       {margin=\the\captionmargin
-       \caption at ifundefined\smf at makecaption{}{,maxmargin=.1\linewidth}}}
+       \caption at ifdefined\smf at makecaption{,maxmargin=.1\linewidth}{}}}
   \@tempa
   \caption at g@addto at list\caption at sls@default{margin*=.5\captionmargin}
   \DeclareCaptionLabelSeparator{default}{.\enspace}
@@ -2807,10 +2713,10 @@
   \captionsetup[table]{position=t}
 %    \end{macrocode}
 %    \begin{macrocode}
-}
+}{}
 %    \end{macrocode}
 %
-% \subsubsection{The beamer class (Part one)}
+% \subsection{The beamer class (Part one)}
 % \changes{v1.1}{2007/03/10}{\package{beamer} class support added}
 % \changes{v1.3}{2011/08/06}{\package{beamer} class support revised}
 % \changes{v1.5}{2013/04/27}{The \package{beamer} template \texttt{caption label separator} will be used now}
@@ -2818,35 +2724,10 @@
 % \changes{v1.7}{2018/04/15}{Re-definition of label format \texttt{simpleMagyar} revised}
 % \changes{v1.7}{2018/05/01}{Definition of \package{beamer} default label font revised}
 %
-% \begin{macro}{\caption at ifbeamerclass}
 %    \begin{macrocode}
-\providecommand*\caption at ifbeamerclass{%
-  \@ifclassloaded{beamer}\@firstofone\@gobble}
-\@onlypreamble\caption at ifbeamerclass
+\caption at ifclassloaded{beamer}{%
 %    \end{macrocode}
-% \end{macro}
 %
-%    \begin{macrocode}
-\caption at ifbeamerclass{%
-%    \end{macrocode}
-%    \begin{macrocode}
-  \caption at CheckCommand\beamer at makecaption{%
-    % beamerbaselocalstructure.sty,v 1.53 2007/01/28 20:48:21 tantau
-    \long\def\beamer at makecaption#1#2{%
-      \def\insertcaptionname{\csname#1name\endcsname}%
-      \def\insertcaptionnumber{\csname the#1\endcsname}%
-      \def\insertcaption{#2}%
-      \nobreak\vskip\abovecaptionskip\nobreak
-      \sbox\@tempboxa{\usebeamertemplate**{caption}}%
-      \ifdim \wd\@tempboxa >\hsize
-        \usebeamertemplate**{caption}\par
-      \else
-        \global \@minipagefalse
-        \hb at xt@\hsize{\hfil\box\@tempboxa\hfil}%
-      \fi
-      \nobreak\vskip\belowcaptionskip\nobreak}}
-%    \end{macrocode}
-%
 % \begin{macro}{\caption at ifbeamertemplate}
 % |\caption at ifbeamertemplate|\marg{caption template name}\marg{yes-code}\marg{no-code}\\
 % tests if the given beamer caption template was selected by the user (or not).
@@ -2926,40 +2807,16 @@
 %    \begin{macrocode}
 %
 %    \begin{macrocode]
-}
+}{}
 %    \end{macrocode}
 %
-% \subsubsection{The KOMA-Script classes}
+% \subsection{The KOMA-Script classes}
 % \changes{v1.1}{2007/03/31}{\KOMAScript\ classes support added}
 %
-% \begin{macro}{\caption at ifkomaclass}
 %    \begin{macrocode}
-\providecommand*\caption at ifkomaclass{%
-  \caption at ifundefined\scr at caption\@gobble\@firstofone}
-\@onlypreamble\caption at ifkomaclass
+\caption at ifclassloaded{koma}{%
 %    \end{macrocode}
-% \end{macro}
-%
 %    \begin{macrocode}
-\caption at ifkomaclass{%
-%    \end{macrocode}
-%    \begin{macrocode}
-  \caption at CheckCommand\@makecaption{%
-    % scrartcl|scrreprt|scrbook [2007/03/07 v2.97a KOMA-Script document class]
-    \long\def\@makecaption#1#2{%
-      \if at captionabove
-        \vskip\belowcaptionskip
-      \else
-        \vskip\abovecaptionskip
-      \fi
-      \@@makecaption\@firstofone{#1}{#2}%
-      \if at captionabove
-        \vskip\abovecaptionskip
-      \else
-        \vskip\belowcaptionskip
-      \fi}}
-%    \end{macrocode}
-%    \begin{macrocode}
   \DeclareCaptionFormat{default}[#1#2#3\par]{%
     \ifdofullc at p
       \caption at ifin@list\caption at lsepcrlist\caption at lsepname
@@ -2981,98 +2838,95 @@
   \DeclareCaptionDefaultFont{font}{\scr at fnt@caption}
   \DeclareCaptionDefaultFont{labelfont}{\scr at fnt@captionlabel}
 %    \end{macrocode}
-%    \begin{macrocode}
-}
-%    \end{macrocode}
 %
-% \subsubsection{The \NTG{} Dutch classes}
-% \changes{v1.1}{2007/04/06}{NTG classes support added}
+% \changes{v1.0f}{2005/08/22}{Increased compatibility to KOMA-Script:
+%        A special version of options `parindent' and `parskip' added}
+% \changes{v1.0g}{2006/01/03}{Bugfix 06-01-03: KOMA-Script variants of
+%        `parskip' and `parindent' options revised and moved into caption kernel}
+% \changes{v1.0h}{2006/02/23}{KOMA-Script variants of `parskip' and
+%        `parindent' are obsolete now, removed}
+% \changes{v1.0m}{2007/03/30}{KOMA-Script variants of `parskip' and
+%        `parindent' re-added, since they still collide with the current
+%        version of the subfig package (Sigh!)}
 %
-% \begin{macro}{\caption at ifntgclass}
+% There is an option clash between the \KOMAScript\ document classes
+% and the \package{caption} kernel, both define the options |parindent| and
+% |parskip| but with different meaning.
+% Furthermore the ones defined by the \package{caption} kernel take a
+% value as parameter but the \KOMAScript\ ones do not.
+% So we need special versions of the options |parindent| and |parskip| here
+% which determine if a value is given (and therefore should be treated as
+% our option) or not (and therefore should be ignored by us).\footnote{%^^A
+% This problem was completely solved due a change of \cs{caption at ProcessOptions}
+% in \thispackage\ \version{1.0h}, but we still need this workaround since
+% these options would otherwise still collide with the current version $1.3$
+% of the \package{subfig} package (Sigh!)}
 %    \begin{macrocode}
-\providecommand*\caption at ifntgclass{%
-  \caption at ifundefined\CaptionFonts\@gobble\@firstofone}
-\@onlypreamble\caption at ifntgclass
+  \let\caption at KV@parindent\KV at caption@parindent
+  \DeclareCaptionOption{parindent}[]{%
+    \ifx,#1,%
+      \caption at Debug{Option `parindent' ignored}%
+    \else
+      \caption at KV@parindent{#1}%
+    \fi}%
 %    \end{macrocode}
-% \end{macro}
-%
 %    \begin{macrocode}
-\caption at ifntgclass{%
+  \let\caption at KV@parskip\KV at caption@parskip
+  \DeclareCaptionOption{parskip}[]{%
+    \ifx,#1,%
+      \caption at Debug{Option `parskip' ignored}%
+    \else
+      \caption at KV@parskip{#1}%
+    \fi}%
 %    \end{macrocode}
 %    \begin{macrocode}
-  \caption at CheckCommand\@makecaption{%
-    % artikel|rapport|boek [2004/06/07 v2.1a NTG LaTeX document class]
-    \long\def\@makecaption#1#2{%
-      \vskip\abovecaptionskip
-      \sbox\@tempboxa{{\CaptionLabelFont#1:} \CaptionTextFont#2}%
-      \ifdim \wd\@tempboxa >\hsize
-        {\CaptionLabelFont#1:} \CaptionTextFont#2\par
-      \else
-        \global \@minipagefalse
-        \hb at xt@\hsize{\hfil\box\@tempboxa\hfil}%
-      \fi
-      \vskip\belowcaptionskip}}
+}{}
 %    \end{macrocode}
+%
+% \subsection{The \NTG{} Dutch classes}
+% \changes{v1.1}{2007/04/06}{NTG classes support added}
+%
 %    \begin{macrocode}
+\caption at ifclassloaded{ntg}{%
+%    \end{macrocode}
+%    \begin{macrocode}
   \DeclareCaptionDefaultFont{labelfont}{\CaptionLabelFont}
   \DeclareCaptionDefaultFont{textfont}{\CaptionTextFont}
 %    \end{macrocode}
 %    \begin{macrocode}
-}
+}{}
 %    \end{macrocode}
 %
-% \subsubsection{The thesis class}
+% \subsection{The thesis class}
 % \changes{v1.2a}{2008/01/31}{thesis class support added}
 % \changes{v1.2e}{2009/11/15}{Bugfix 09-11-14: thesis class support revised}
 %
-% \begin{macro}{\caption at ifthesisclass}
 %    \begin{macrocode}
-\providecommand*\caption at ifthesisclass{%
-  \caption at ifundefined\cph at font
-    {\@gobble}%
-    {\caption at ifundefined\cpb at font\@gobble\@firstofone}}
+\caption at ifclassloaded{thesis}{%
 %    \end{macrocode}
-% \end{macro}
-%
 %    \begin{macrocode}
-\caption at ifthesisclass{%
-%    \end{macrocode}
-%    \begin{macrocode}
-  \caption at CheckCommand\@makecaption{%
-    % thesis.cls 1996/25/01 1.0g LaTeX document class (wm).
-    \long\def\@makecaption#1#2{%
-     \vskip\abovecaptionskip
-     \setbox\@tempboxa\hbox{{\cph at font #1:} {\cpb at font #2}}%
-     \ifdim \wd\@tempboxa >\hsize
-        \@hangfrom{\cph at font #1: }{\cpb at font #2\par}%
-     \else
-        \hbox to\hsize{\hfil\box\@tempboxa\hfil}%
-     \fi
-     \vskip\belowcaptionskip}}
-%    \end{macrocode}
-%    \begin{macrocode}
   \DeclareCaptionDefaultFormat{hang}
   \DeclareCaptionDefaultFont{labelfont}{\cph at font}
   \DeclareCaptionDefaultFont{textfont}{\cpb at font}
 %    \end{macrocode}
 %    \begin{macrocode}
-}
+}{}
 %    \end{macrocode}
 %
-% \subsubsection{The arabic Babel option}
+% \subsection{The arabic Babel option}
 % \changes{v1.8}{2018/05/20}{\package{arabic} babel package support added}
 %
 %    \begin{macrocode}
-\caption at ifundefined\ArabiCoreLoaded{%
+\caption at ifdefined\ArabiCoreLoaded{%
 %    \end{macrocode}
+%
 % \begin{macro}{\caption at rl}
 % \changes{v1.8}{2018/05/20}{This macro added}
 %    \begin{macrocode}
-  \let\caption at rl\@firstofone
-}{%
   \newcommand\caption at rl[1]{\if at rl\textRL{#1}\else\textLR{#1}\fi}
 %    \end{macrocode}
 % \end{macro}
+%
 %    \begin{macrocode}
   \def\fnum at figure{\figurename\nobreakspace\thefigure}%
   \def\fnum at table{\tablename\nobreakspace\thetable}%
@@ -3083,53 +2937,18 @@
     \if at rl\caption at lsep@arabi\else\caption at lsep@colon\fi}
 %    \end{macrocode}
 %    \begin{macrocode}
-  \caption at CheckCommand\@makecaption{%
-    % arabicore.sty [2006/01/01 v1.0 Arabi Core switching commands (may still change)]
-    \long\def\@makecaption#1#2{%
-      \vskip\abovecaptionskip
-      \sbox\@tempboxa{#1: #2}%
-      \sbox\@Arabitempboxa{\textRL{#2} : #1}%
-      \if at rl{
-        \ifdim \wd\@Arabitempboxa >\hsize
-        \textRL{#2} : #1\par
-      \else
-        \global \@minipagefalse
-        \hb at xt@\hsize{\hfil\box\@Arabitempboxa\hfil}%
-      \fi}\else{
-      \ifdim \wd\@tempboxa >\hsize
-        #1: #2\par
-      \else
-        \global \@minipagefalse
-        \hb at xt@\hsize{\hfil\box\@tempboxa\hfil}%
-      \fi}\fi
-      \vskip\belowcaptionskip}}
-%    \end{macrocode}
-%    \begin{macrocode}
+}{%
+  \let\caption at rl\@firstofone
 }
 %    \end{macrocode}
 %
-% \subsubsection{The frenchb Babel option}
+% \subsection{The frenchb Babel option}
 % \changes{v1.1}{2006/05/14}{\package{frenchb} babel package support added}
 %
 %    \begin{macrocode}
-\caption at ifundefined\FB at makecaption{}{%
+\caption at ifdefined\FB at makecaption{%
 %    \end{macrocode}
 %    \begin{macrocode}
-  \caption at CheckCommand\@makecaption{%
-    % frenchb.ldf [2005/02/06 v1.6g French support from the babel system]
-    % frenchb.ldf [2007/10/05 v2.0e French support from the babel system]
-    \long\def\@makecaption#1#2{%
-      \vskip\abovecaptionskip
-      \sbox\@tempboxa{#1\CaptionSeparator #2}%
-      \ifdim \wd\@tempboxa >\hsize
-        #1\CaptionSeparator #2\par
-      \else
-        \global \@minipagefalse
-        \hb at xt@\hsize{\hfil\box\@tempboxa\hfil}%
-      \fi
-      \vskip\belowcaptionskip}}
-%    \end{macrocode}
-%    \begin{macrocode}
   \ifx\@makecaption\STD at makecaption
     \DeclareCaptionLabelSeparator{default}{\CaptionSeparator}
     \def\caption at frenchb{% supress frenchb warning
@@ -3145,69 +2964,24 @@
   \fi
 %    \end{macrocode}
 %    \begin{macrocode}
-}
+}{}
 %    \end{macrocode}
 %
-% \subsubsection{The frenchle/pro package}
+% \subsection{The frenchle/pro package}
 % \changes{v1.1}{2006/05/14}{\package{frenchle/pro} package support added}
 %
 %    \begin{macrocode}
-\caption at ifundefined\frenchTeXmods{}{%
+\caption at ifdefined\frenchTeXmods{%
 %    \end{macrocode}
 %    \begin{macrocode}
-  \caption at CheckCommand\@makecaption{%
-    % french(le).sty [2006/10/03 The french(le) package /V5,9991/]
-    % french(le).sty [2007/06/28 The french(le) package /V5,9994/]
-    \def\@makecaption#1#2{%
-      \ifFTY%
-        \def\@secondofmany##1##2\void{##2}%
-        \def\@tempa{\@secondofmany#2\void}%
-        \ifx\@tempa\empty%
-          \let\captionseparator\empty%
-        \fi%
-        \@mcORI{#1}{\relax\captionfont{#2}}%
-      \else
-        \@mcORI{#1}{#2}%
-      \fi}}%
-%    \end{macrocode}
-%    \begin{macrocode}
-  \caption at CheckCommand\@makecaption{%
-    % french(le).sty [2007/02/11 The french(le) package /V5,9993/]
-    \def\@makecaption#1#2{%
-      \ifFTY%
-        \def\@secondofmany##1##2\void{##2}%
-        \protected at edef\@tempa{\@secondofmany#2\void}%
-        \ifx\@tempa\empty%
-          \let\captionseparator\empty%
-        \fi%
-        \@mcORI{#1}{\relax\captionfont{#2}}%
-      \else
-        \@mcORI{#1}{#2}%
-      \fi}}%
-%    \end{macrocode}
-%    \begin{macrocode}
   \DeclareCaptionDefaultFont{textfont}{\itshape}%
   \DeclareCaptionLabelSeparator{default}{\captionseparator\space}%
 %    \end{macrocode}
 %    \begin{macrocode}
-}
+}{}
 %    \end{macrocode}
 %
-% \subsubsection{The hebrew Babel option}
-% \changes{v1.8}{2018/08/26}{\package{hebrew} package support added}
-%
-%    \begin{macrocode}
-  \caption at CheckCommand\@makecaption{%
-    % rlbabel.def [2005/03/30 v2.3h Right-to-Left support from the babel system Hebrew language support from the babel system]
-    \long\def\@makecaption#1#2{%
-      \vskip\abovecaptionskip%
-      \begin{center}%
-        #1: #2%
-      \end{center} \par%
-      \vskip\belowcaptionskip}}%
-%    \end{macrocode}
-%
-% \subsubsection{The hungarian and magyar Babel option}
+% \subsection{The hungarian and magyar Babel option}
 % \changes{v1.3}{2009/03/29}{\package{magyar} package support added}
 % \changes{v1.3a}{2011/08/12}{\package{magyar} package support revised}
 % \changes{v1.8b}{2018/08/26}{\package{magyar} package support revised}
@@ -3217,22 +2991,6 @@
 %    \end{macrocode}
 %
 %    \begin{macrocode}
-\caption at ifundefined\hunnewlabel{}{%
-  \caption at CheckCommand\@makecaption{%
-    % magyar.ldf [2005/03/30 v1.4j Magyar support from the babel system]
-    \def\@makecaption#1#2{%
-      \vskip\abovecaptionskip
-      \sbox\@tempboxa{#1. #2}%
-      \ifdim \wd\@tempboxa >\hsize
-        {#1. #2\csname par\endcsname}
-      \else
-        \global \@minipagefalse
-        \hb at xt@\hsize{\hfil\box\@tempboxa\hfil}%
-      \fi
-      \vskip\belowcaptionskip}}}
-%    \end{macrocode}
-%
-%    \begin{macrocode}
 \def\caption at tempa#1{%
   \@ifpackagewith{babel}{#1}{%
     \caption at InfoNoLine{#1 babel option is loaded}%
@@ -3253,24 +3011,9 @@
 %
 % TODO: babel-latvian/latvian.ldf
 %
-% \subsubsection{Unknown document class (or package)}
-% \changes{v1.1}{2007/04/10}{Check of document class added}
+% \section{Execution of options}
 %
 %    \begin{macrocode}
-\caption at IfCheckCommand{%
-  \caption at setbool{documentclass}{1}%
-}{%
-  \caption at setbool{documentclass}{0}%
-  \caption at InfoNoLine{%
-         Unknown document class (or package),\MessageBreak
-         standard defaults will be used}%
-  \caption at Debug{\string\@makecaption\space=\space\meaning\@makecaption\@gobble}%
-}
-%    \end{macrocode}
-%
-% \subsection{Execution of options}
-%
-%    \begin{macrocode}
 \captionsetup{style=default,position=default,%
               list,listformat=default,twoside=\if at twoside 1\else 0\fi}
 %    \end{macrocode}
@@ -3278,7 +3021,7 @@
 \ProcessOptions*
 %    \end{macrocode}
 %
-% \subsection{Making an `List of' entry}
+% \section{Making an `List of' entry}
 %
 % \begin{macro}{\caption at addcontentsline}
 % \changes{v1.1}{2007/07/01}{This macro added}
@@ -3299,13 +3042,13 @@
   \caption at ifcontentsline{#2}{%
     \begingroup
       \let\@tempa\@gobble
-      \caption at ifundefined\caption at listtype
+      \caption at ifdefined\caption at listtype
+        {\let\@tempa\@firstofone}%
         {\edef\caption at listtype{#1}}%
-        {\let\@tempa\@firstofone}%
-      \caption at ifundefined\caption at listtype@ext
-        {}%
+      \caption at ifdefined\caption at listtype@ext
         {\edef\caption at listtype{\caption at listtype\caption at listtype@ext}%
          \let\@tempa\@firstofone}%
+        {}%
       \@tempa
         {\caption at Debug{addcontentsline: #1 => \caption at listtype}%
 %        \caption at setoptions\caption at listtype
@@ -3333,8 +3076,8 @@
 %    \end{macrocode}
 %    \begin{macrocode}
 \newcommand*\caption@@@addcontentsline[4]{%
-% \caption at ifundefined\main at Arabi@language{}%
-%   {\addtocontents{#1}{\xstring\select at language{\main at Arabi@language}}}%
+% \caption at ifdefined\main at Arabi@language
+%   {\addtocontents{#1}{\xstring\select at language{\main at Arabi@language}}}{}%
   \addcontentsline{#1}{#2}{\protect\numberline{#3}{#4}}}
 %    \end{macrocode}
 %    \begin{macrocode}
@@ -3356,7 +3099,7 @@
 %    \end{macrocode}
 % \end{macro}
 %
-% \subsection{Typesetting the caption}
+% \section{Typesetting the caption}
 %
 % \begin{macro}{\ifcaption at star}
 % If the starred form of |\caption| is used, this will be set to |true|.
@@ -3833,7 +3576,7 @@
 %    \end{macrocode}
 % \end{macro}
 %
-% \subsection{Types \& sub-types}
+% \section{Types \& sub-types}
 %
 % \begin{macro}{\DeclareCaptionType}
 % \changes{v1.1}{2007/08/12}{This macro added}
@@ -3860,13 +3603,13 @@
 % will execute the given code for all (known) floating environments.
 %    \begin{macrocode}
 \newcommand\caption at ForEachType[1]{%
-  \caption at ifundefined\ForEachFloatingEnvironment
+  \caption at ifdefined\ForEachFloatingEnvironment
+    {\ForEachFloatingEnvironment{#1}}%
     {\def\@elt##1{#1}%
-      \caption at ifundefined\c at figure\@gobble\@elt{figure}%
-      \caption at ifundefined\c at table\@gobble\@elt{table}%
+      \caption at ifdefined\c at figure\@elt\@gobble{figure}%
+      \caption at ifdefined\c at table\@elt\@gobble{table}%
       \let\@elt\relax
-      \newfloat at addtohook{#1}}%
-    {\ForEachFloatingEnvironment{#1}}}
+      \newfloat at addtohook{#1}}}
 %    \end{macrocode}
 %    \begin{macrocode}
 \providecommand\newfloat at addtohook[1]{%
@@ -3920,8 +3663,8 @@
 %    \end{macrocode}
 % Support of \package{titletoc} package
 %    \begin{macrocode}
-     \caption at ifundefined\contentsuse{}{%
-       \contentsuse{sub#3}{\csname ext at sub#3\endcsname}}%
+     \caption at ifdefined\contentsuse{%
+       \contentsuse{sub#3}{\csname ext at sub#3\endcsname}}{}%
 %    \end{macrocode}
 %    \begin{macrocode}
      \@namedef{sub#3name}{}%
@@ -3939,9 +3682,9 @@
 %    \end{macrocode}
 %    \begin{macrocode}
 \newcommand*\caption at declaresublistentry{%
-  \caption at ifundefined\l at chapter
-    {\caption@@declaresublistentry\l at subsubsection}%
-    {\caption@@declaresublistentry\l at subsection}}
+  \caption at ifdefined\l at chapter
+    {\caption@@declaresublistentry\l at subsection}%
+    {\caption@@declaresublistentry\l at subsubsection}}
 \@onlypreamble\caption at declaresublistentry
 %    \end{macrocode}
 %    \begin{macrocode}
@@ -4062,7 +3805,7 @@
 %    \end{macrocode}
 % \end{macro}
 %
-% \subsection{subfig package adaptions}
+% \section{subfig package adaptions}
 % \changes{v1.1}{2007/07/07}{Several adaptions to the \package{subfig} package added}
 % \changes{v1.4a}{2011/11/01}{Bugfix 11-11-01: Test for the \package{subfig} package revised}
 %

Deleted: trunk/Master/texmf-dist/source/latex/caption/newfloat.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/caption/newfloat.dtx	2019-11-24 00:53:56 UTC (rev 52904)
+++ trunk/Master/texmf-dist/source/latex/caption/newfloat.dtx	2019-11-24 21:23:07 UTC (rev 52905)
@@ -1,2074 +0,0 @@
-% \iffalse meta-comment
-% 
-% This is file `newfloat.dtx'.
-% 
-% Copyright (C) 2011-2019 Axel Sommerfeldt (axel.sommerfeldt at f-m.fm)
-% 
-% --------------------------------------------------------------------------
-% 
-% This work may be distributed and/or modified under the
-% conditions of the LaTeX Project Public License, either version 1.3
-% of this license or (at your option) any later version.
-% The latest version of this license is in
-%   http://www.latex-project.org/lppl.txt
-% and version 1.3 or later is part of all distributions of LaTeX
-% version 2003/12/01 or later.
-% 
-% This work has the LPPL maintenance status "maintained".
-% 
-% This Current Maintainer of this work is Axel Sommerfeldt.
-% 
-% This work consists of the files caption.ins, caption.dtx, caption2.dtx,
-% caption3.dtx, bicaption.dtx, ltcaption.dtx, subcaption.dtx, and newfloat.dtx,
-% the derived files caption.sty, caption2.sty, caption3.sty,
-% bicaption.sty, ltcaption.sty, subcaption.sty, and newfloat.sty,
-% and the user manuals caption-deu.tex, caption-eng.tex, and caption-rus.tex.
-% 
-% \fi
-% \CheckSum{1605}
-%
-% \iffalse
-%<*driver>
-\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesFile{newfloat.drv}%
-  [2013/04/27 v1.1 This package offers a command for defining new floating environments]
-\hbadness=9999 \newcount\hbadness \hfuzz=48pt % Make TeX shut up.
-%
-\documentclass{ltxdoc}
-\setlength\parindent{0pt}
-\setlength\parskip{\smallskipamount}
-%
-\usepackage{ifpdf}
-\ifpdf
-  \usepackage{mathptmx,courier}
-  \usepackage[scaled=0.90]{helvet}
-% \addtolength\marginparwidth{15pt}
-\fi
-%
-\usepackage[bottom]{footmisc}
-%
-\usepackage{hypdoc}
-\ifpdf\usepackage{hypdestopt}\fi
-\hypersetup{pdfkeywords={LaTeX, package, newfloat},pdfstartpage={},pdfstartview={}}
-%
-\usepackage{newfloat}
-%
-\DeclareRobustCommand*\eTeX{\texorpdfstring
-  {\leavevmode\hbox{$\varepsilon$}-\TeX}%
-  {e-TeX}}
-\DeclareRobustCommand*\AmS{\texorpdfstring
-  {{\protect\usefont{OMS}{cmsy}{m}{n}A\kern-.1667em\lower.5ex\hbox{M}\kern-.125emS}}%
-  {AMS}}
-\DeclareRobustCommand*\KOMAScript{\texorpdfstring
-  {\textsf{K\kern.05em O\kern.05em M\kern.05em A\kern.1em-\kern.1em Script}}%
-  {KOMA-Script}}
-\DeclareRobustCommand*\NTG{NTG}
-\DeclareRobustCommand*\SmF{SMF}
-%
-\begin{document}
-  \DocInput{newfloat.dtx}
-\end{document}
-%</driver>
-% \fi
-%
-% \newcommand*\purerm[1]{{\upshape\mdseries\rmfamily #1}}
-% \newcommand*\puresf[1]{{\upshape\mdseries\sffamily #1}}
-% \newcommand*\purett[1]{{\upshape\mdseries\ttfamily #1}}
-% \let\class\puresf \let\package\puresf
-% \let\env\purett \let\opt\purett
-%
-% \def\thispackage{the \package{newfloat} package}
-% \def\Thispackage{The \package{newfloat} package}
-% 
-% \newcommand*\csmarg[1]{\texttt{\char`\{#1\char`\}}}
-% \newcommand*\csoarg[1]{\texttt{\char`\[#1\char`\]}}
-% \newcommand*\version[2][]{\textit{v#2}}
-%
-% \setlength\leftmargini{1.5em}
-%
-% \GetFileInfo{newfloat.drv}
-% \let\docdate\filedate
-% \let\docversion\fileversion
-% \GetFileInfo{newfloat.sty}
-%
-% \title{\texorpdfstring{\Thispackage\thanks{%^^A
-%          This package has version number \docversion.}}%^^A
-%        {The newfloat package}}
-% \author{Axel Sommerfeldt\\
-%         \url{https://gitlab.com/axelsommerfeldt/caption}}
-% \date{\docdate}
-% \maketitle
-% 
-% \begin{abstract}
-% \centering
-% This package offers the command
-% |\Declare|\-|Floating|\-|Environment| for defining new floating environments
-% which behave like |figure| and |table|.
-% \end{abstract}
-% 
-% \tableofcontents
-%
-% \clearpage
-% \section{Loading the package}
-%
-% First of all you need to include this package into your document with
-% \begin{quote}
-%   |\usepackage|\oarg{options}|{newfloat}|
-% \end{quote}
-% where \meta{options} are one or more of
-% \begin{quote}\begin{tabular}{r@{\,}l}
-%   |within=| & \meta{``within'' counter} \emph{or} \texttt{none}\quad\\
-%   |chapterlistsgap=| & \meta{value}~\footnotemark[1]
-% \end{tabular}\end{quote}
-%
-% The ``within'' counter specifies the counter which will be used to reset
-% the counter of the floating environments |figure| and |table| .
-% (Furthermore this setting will be used as default setting for
-% |\Declare|\-|Floating|\-|Environment|.)
-%
-% So for example |within=chapter| will give you a numbering scheme
-% \meta{chapter}.\meta{x} for floating environments,
-% while |within=section| will give you a numbering scheme
-% \meta{chapter}.\meta{section}.\meta{x}, or \meta{section}.\meta{x}
-% if the document class does not offer |\chapter|.
-% |within=none| will result in a continuous numbering throughout the document,
-% i.e.~the numbering scheme will be simply \meta{x}.
-%
-% The option |chapterlistsgap=|\meta{value} sets the amount of the
-% vertical gap inserted into the ``List of Figure'', ``List of Tables'',
-% and all lists created with |\Declare|\-|Floating|\-|Environment|
-% when a new chapter will be started.
-% The default value is |10pt|.
-% (This option will only be available if the document class used offer
-% the usage of chapters, e.g.~the |book| or |report| document class.)
-%
-% \pagebreak[3]
-% Both options can be changed later on, too, by using the command
-% \begin{quote}
-% |\newfloatsetup|\meta{options}\quad,
-% \end{quote}
-%
-% \pagebreak[3]
-% \section{\cs{DeclareFloatingEnvironment}}
-%
-% After loading \thispackage\ you can define your own floating environments with
-% \begin{quote}
-% \iffalse
-% \setlength{\leftmargin}{6cm}
-% \fi
-%  |\DeclareFloatingEnvironment|\oarg{options}\marg{type}%
-% \iffalse
-%   \oarg{name}\oarg{list name}
-% \fi
-% \end{quote}
-% where \meta{options} are one or more of
-% \begin{quote}\begin{tabular}{r@{\,}l}
-%   |fileext=| & \meta{file extension}\\
-%   |listname=| & \meta{list name}\\
-%   |name=| & \meta{prosa name}\\
-%   |placement=| & \meta{combination of \,\purett{htbp}}\\
-%   |within=| & \meta{``within'' counter} \emph{or} \texttt{none}\\
-%   |chapterlistsgaps=| & \texttt{on} \emph{or} \texttt{off}~\footnotemark[1]
-% \end{tabular}\end{quote}
-% \footnotetext[1]{Please note that although \thispackage\ tries hard to offer this
-% option it may not be available or is working incorrectly in cooperation with
-% your document class since there is no standard interface which we could use
-% for that purpose. Therefore we have to try to patch the \cs{chapter} command,
-% and if this fails, we try to patch \cs{addtocontents} (in an unusual way) instead.}
-%
-% If no \meta{options} are given,
-% ``lo\meta{type}'' will be used as \meta{file extension} for the list,
-% ``List of \meta{name}s'' as \meta{list name}.
-% ``\meta{name}'' as \meta{name} (but with the first letter capitalized),
-% ``|tbp|'' as \meta{placement} specifier,
-% and ``|chapter|'' resp. ``|none|'' as \meta{``within'' counter},
-% i.e., the counter which resets the numbering.
-%
-% The default value of the |chapterlistsgaps=| option depends on the
-% ``within'' setting, it is set to |on| if |chapter| or |section| is selected,
-% otherwise it is set to |off|.
-% (This option will only be available if the document class used offer
-% the usage of chapters, e.g.~the |book| or |report| document class.)
-%
-% The list will be typeset using the command |\list|\-|of|\meta{type}|s|
-% resp.~|\list|\-|of|\meta{type}|es|,
-% analogous to |\list|\-|of|\-|figures| and |\list|\-|of|\-|tables|.
-%
-% If the \package{fltpage} package is loaded, an environment called
-% |FP|\meta{type} will be defined additionally, same for |sideways|\meta{type}
-% (\package{rotating} package), |SC|\meta{type} (\package{sidecap} package),
-% and |wrap|\meta{type} (\package{wrapfig} package).
-% 
-% \bigskip
-% 
-% \pagebreak[3]
-% So for example
-% \begin{quote}
-%   |\DeclareFloatingEnvironment{diagram}|
-% \end{quote}
-% will define a new floating environment called |diagram|,
-% the list will be stored in a file with the extension |lodiagram|, the name
-% (used for the caption) will be ``Diagram'' and the list name
-% ``List of Diagrams''.
-% The list could be typeset with |\list|\-|of|\-|diagrams|.
-% Dependent on which packages are loaded, the environments |FP|\-|diagram|,
-% |sideways|\-|diagram|, |SC|\-|diagram|, and |wrap|\-|diagram| will be defined additionally.
-%
-% \pagebreak[3]
-% Another example:
-% \begin{quote}
-%   |\DeclareFloatingEnvironment[|\\
-%   |  fileext=lox,|\\
-%   |  listname={List of Matrixes},|\\
-%   |  name=Matrix,|\\
-%   |  placement=p,|\\
-%   |  within=section,|\\
-%   |  chapterlistsgaps=off,|\\
-%   |  ]{matrix}|
-% \end{quote}
-% will define a new floating environment called |matrix| with the given settings.
-% Please note that names which contain spaces needs to be enclosed in curly braces.
-%
-% \pagebreak[3]
-% \section{\cs{SetupFloatingEnvironment}}
-%
-% While |\DeclareFloatingEnvironment| will create new floating environments,
-% \begin{quote}
-% |\SetupFloatingEnvironment|\marg{floating environment}\marg{options}
-% \end{quote}
-% will change the settings of existing ones, i.e. either |figure| or |table|,
-% or a one created with |\Declare|\-|Floating|\-|Environment|,
-% or a one created with |\new|\-|float| offered by the \package{float} package,
-% or a one created with |\new|\-|float| offered by the \package{memoir} document class,
-% or a one created with |\Declare|\-|New|\-|Float|\-|Type| offered by the \package{floatrow} package,
-% or \ldots
-%
-% The \meta{options} are the same as the options for
-% |\Declare|\-|Floating|\-|Environment|,
-% but one should avoid changing the file extension
-% of existing floating environments,
-% i.e.~using the |fileext=| option within |\Setup|\-|Floating|\-|Environment|
-% is usually a very bad idea.
-%
-% \bigskip
-%
-% \pagebreak[3]
-% An example:
-% \begin{quote}
-%   |\SetupFloatingEnvironment{lstlisting}{chapterlistsgaps=off}|
-% \end{quote}
-% will switch off the chapter lists gaps for |lstlisting| environments
-% offered by the \package{listings} package.
-%
-% \pagebreak[3]
-% \section{\cs{ForEachFloatingEnvironment}}
-%
-% \begin{quote}
-%  |\ForEachFloatingEnvironment|\marg{code with \#1}
-% \end{quote}
-% will execute the given \meta{code} for all known floating environments,
-% and for ones defined with |\Declare|\-|Floating|\-|Environment| later on.
-%
-% \pagebreak[3]
-% So for example the \package{subcaption} packages uses
-% \begin{quote}
-%  |\ForEachFloatingEnvironment{\DeclareCaptionSubType{#1}}|
-% \end{quote}
-% for initializing itself for all floating environments which are
-% known to \thispackage.
-%
-% \medskip
-%
-% There is also a starred variant |\For|\-|Each|\-|Floating|\-|Environment*|
-% which will execute the given code for already existing floating environments
-% only, i.e.~no hook will be placed inside |\Declare|\-|Floating|\-|Environment|.
-%
-% \pagebreak[3]
-% An example:
-% \begin{quote}
-%  |\ForEachFloatingEnvironment*{\typeout{#1}}|
-% \end{quote}
-% will typeout the names of all already known floating environments to the terminal
-% and log file.
-%
-% \pagebreak[3]
-% \section{\cs{PrepareListOf}}
-%
-% Unfortunately there is no standardized way of typesetting and customizing
-% lists of floating environments, i.e.~every document class offers it's own stuff here,
-% and there are plenty of \LaTeXe\ packages for this purpose.
-%
-% \pagebreak[3]
-% For that reason the \thispackage\ simply typesets the lists of newly
-% defined floating environments as ``List of Figure'' internally (using |\list|\-|of|\-|figure|)
-% but using a different list (the right one, of course) and using a different list name,
-% the one you have specified with either |\Declare|\-|Floating|\-|Environment| or
-% |\Setup|\-|Floating|\-|Environment|.\footnote{Please note that this is not the
-% fact when using a \KOMAScript\ document class, not \cs{listoffigure} but \cs{listoftoc}
-% will be used here, and therefore no problems should occur.}
-%
-% \pagebreak[3]
-% While this usually results in the same layout as the ``List of Figure'' and
-% is sufficient for most cases, there are some cases where this might
-% lead to an unwanted side effect.
-%
-% \pagebreak[3]
-% Therefore the \thispackage\ offers
-% \begin{quote}
-%  |\PrepareListOf|\marg{floating environment}\marg{code}
-% \end{quote}
-% which will execute the given \meta{code} right before actually typesetting the list
-% with |\list|\-|of|\-|figures| internally.
-%
-% \pagebreak[3]
-% One example:
-% \begin{quote}
-%   |\PrepareListOf{diagram}{%|\\
-%   |  \renewcommand{\cftfigpresnum}{Diagram~}}|
-% \end{quote}
-% will change the part typeset in front of the diagram number within the
-% ``List of Diagrams'' when using the \package{tocloft} package~\cite{tocloft}.
-% Without the code above you will get the part defined for figures instead.
-%
-% \pagebreak[3]
-% However, when dealing with the \package{tocloft} package it's a better
-% idea not to use |\Prepare|\-|List|\-|Of| but the customization facilities of that package
-% instead, e.g.:
-% \begin{quote}
-%   |\documentclass{book}|\\
-%   \ldots\\
-%   |\usepackage{newfloat,tocloft}|\\
-%   |\newlistof{diagram}{lod}{List of Diagrams}|\\
-%   |\DeclareFloatingEnvironment[name=Diagram,fileext=lod]{diagram}|\\
-%   |      % Note: Due of a bug in tocloft the file extension|\\
-%   |      % must be repeated at \DeclareFloatingEnvironment,|\\
-%   |      % otherwise you will get an empty list.|\\
-%   ||\\
-%   |% Customize `List of Figures'|\\
-%   |\renewcommand{\cftfigpresnum}{Figure~}|\\
-%   |\setlength{\cftfignumwidth}{2cm}|\\
-%   ||\\
-%   |% Customize `List of Diagrams'|\\
-%   |\renewcommand{\cftdiagrampresnum}{Diagram~}|\\
-%   |\setlength{\cftdiagramnumwidth}{2cm}|\\
-%   ||\\
-%   \ldots\\
-%   ||\\
-%   |\begin{document}|\\
-%   \ldots\\
-%   |\listoffigures|\\
-%   |\listofdiagrams|\\
-%   \ldots\\
-%   |\end{document}|
-% \end{quote}
-%
-% \iffalse
-% \pagebreak[3]
-% \section{For \LaTeX{} package authors}
-%
-% |\For|\-|Each|\-|Floating|\-|Environment| without \package{newfloat} package:
-% \begin{quote}
-%   |\newcommand\mypackage at foreachfloat[1]{%|\\
-%   |  \@ifundefined{ForEachFloatingEnvironment}%|\\
-%   |    {\def\@elt##1{#1}%|\\
-%   |      \@ifundefined{c at figure}\@gobble\@elt{figure}%|\\
-%   |      \@ifundefined{c at table}\@gobble\@elt{table}%|\\
-%   |      \let\@elt\relax|\\
-%   |      \newfloat at addtohook{#1}}%|\\
-%   |    {\ForEachFloatingEnvironment{#1}}}|\\
-%   |\providecommand\newfloat at addtohook[1]{%|\\
-%   |  \toks@=\expandafter{\newfloat at hook{##1}#1}%|\\
-%   |  \edef\@tempa{\def\noexpand\newfloat at hook####1{\the\toks@}}%|\\
-%   |  \@tempa}|\\
-%   |\providecommand*\newfloat at hook[1]{}|
-% \end{quote}
-%
-% \pagebreak[3]
-% Adding environment to list of floating environments:
-% \begin{quote}
-%   |\SetupFloatingEnvironment|\marg{environment}|{}|
-% \end{quote}
-% or (without \package{newfloat} package loaded):
-% \begin{quote}
-%   |\providecommand\newfloat at list{}|\\
-%   |\@cons\newfloat at list{|\marg{environment}|}|
-% \end{quote}
-% (Please note the doubled curly braces around the environment name.)
-% \fi
-%
-% \iffalse
-% --------------------------------------------------------------------------- %
-% \fi
-%
-% \StopEventually{%^^A
-% \pagebreak[4]
-% \begin{thebibliography}{9}
-%
-%   \bibitem{memoir}
-%   Peter Wilson:\\
-%   \href{http://www.ctan.org/pkg/memoir}%
-%        {\emph{The Memoir Class for Configurable Typesetting}},\\
-%   2011/03/06
-%
-%   \bibitem{NTGclasses}
-%   Victor Eijkhout:\\
-%   \href{http://www.ctan.org/pkg/ntgclass}%
-%        {\emph{An introduction to the Dutch \LaTeX\ document classes}},\\
-%   \mbox{3~September~1989}
-%
-%   \bibitem{KOMAScript}
-%   Markus Kohm \& Jens-Uwe-Morawski:\\
-%   \href{http://www.ctan.org/pkg/koma-script}%
-%        {\emph{KOMA-Script -- a versatile \LaTeXe\ bundle}},\\
-%   2012-07-22
-%
-%   \bibitem{float}
-%   Anselm Lingnau:\\
-%   \href{http://www.ctan.org/pkg/float}%
-%        {\emph{An Improved Environment for Floats}},\\
-%   2001/11/08
-%
-%   \bibitem{fltpage}
-%   Sebastian Gross:\\
-%   \href{http://www.ctan.org/pkg/fltpage}%
-%        {\emph{Welcome to the beta test of fltpage package!}},\\
-%   1998/11/13
-%
-%   \bibitem{rotating}
-%   Sebastian Rahtz and Leonor Barroca:\\
-%   \href{http://www.ctan.org/pkg/rotating}%
-%        {\emph{A style option for rotated objects in \LaTeX}},\\
-%   1997/09/26
-%
-%   \bibitem{sidecap}
-%   Rolf Niepraschk \& Hubert G\"a\ss lein:\\
-%   \href{http://www.ctan.org/pkg/sidecap}%
-%        {\emph{The sidecap package}},\\
-%   2003/06/06
-%
-%   \bibitem{tocloft}
-%   Peter Wilson, Herries Press, Will Robertson:\\
-%   \href{http://www.ctan.org/pkg/tocloft}%
-%        {\emph{The tocloft package}},\\
-%   2010/10/13
-%
-%   \bibitem{wrapfig}
-%   Donald Arseneau:\\
-%   \href{http://www.ctan.org/pkg/wrapfig}%
-%        {\emph{WRAPFIG.STY ver 3.6}},\\
-%   2003/01/31
-%
-% \end{thebibliography}
-% }
-%
-% \iffalse
-% --------------------------------------------------------------------------- %
-% \fi
-%
-% \DoNotIndex{\\,\_,\ ,\@@par}
-% \DoNotIndex{\@bsphack}
-% \DoNotIndex{\@car,\@cdr,\@classoptionslist,\@cons,\@currext,\@currname}
-% \DoNotIndex{\@ehc,\@ehd,\@empty,\@esphack,\@expandtwoargs}
-% \DoNotIndex{\@for,\@firstofone,\@firstoftwo}
-% \DoNotIndex{\@gobble,\@gobbletwo,\@gobblethree,\@gobblefour,\@hangfrom}
-% \DoNotIndex{\@ifnextchar,\@ifpackagelater,\@ifpackageloaded}
-% \DoNotIndex{\@ifstar,\@ifundefined,\@latex at error,\@namedef,\@nameuse}
-% \DoNotIndex{\@onlypreamble,\@parboxrestore,\@plus,\@ptionlist}
-% \DoNotIndex{\@removeelement,\@restorepar,\@secondoftwo,\@setpar}
-% \DoNotIndex{\@tempa,\@tempboxa,\@tempdima,\@tempdimb,\@tempdimc,\@tempb,\@tempc}
-% \DoNotIndex{\@testopt}
-% \DoNotIndex{\@undefined,\@unprocessedoptions,\@unusedoptionlist}
-% \DoNotIndex{\p@,\z@}
-% \DoNotIndex{\active,\addtocounter,\addtolength,\advance,\aftergroup}
-% \DoNotIndex{\baselineskip,\begin,\begingroup,\bfseries,\box}
-% \DoNotIndex{\catcode,\centering,\changes,\csname,\def,\divide,\do,\downarrow}
-% \DoNotIndex{\edef,\else,\empty,\end,\endcsname,\endgraf,\endgroup,\expandafter}
-% \DoNotIndex{\fi,\footnotesize,\global}
-% \DoNotIndex{\hangindent,\hbox,\hfil,\hsize,\hskip,\hspace,\hss}
-% \DoNotIndex{\ifcase,\ifdim,\ifnum,\ifodd,\ifvoid,\ifvmode}
-% \DoNotIndex{\ifx,\ignorespaces,\itshape}
-% \DoNotIndex{\Large,\large,\leavevmode,\leftmargini,\leftskip,\let,\linewidth}
-% \DoNotIndex{\llap,\long,\m at ne,\margin,\mdseries,\message}
-% \DoNotIndex{\newcommand,\newdimen,\newlength,\newline,\newif,\newsavebox}
-% \DoNotIndex{\next,\nobreak,\nobreakspace,\noexpand,\noindent,\numberline}
-% \DoNotIndex{\normalcolor,\normalfont,\normalsize,\or,\par,\parbox,\parfillskip}
-% \DoNotIndex{\parindent,\parskip,\prevdepth,\protect,\protected at edef,\protected at write}
-% \DoNotIndex{\providecommand,\quad}
-% \DoNotIndex{\raggedleft,\raggedright,\relax,\renewcommand,\RequirePackage}
-% \DoNotIndex{\rightskip,\rmfamily}
-% \DoNotIndex{\sbox,\scriptsize,\scshape,\setbox,\setlength,\sffamily,\slshape}
-% \DoNotIndex{\small,\string,\space,\strut}
-% \DoNotIndex{\textheight,\the,\toks@,\typeout,\ttfamily}
-% \DoNotIndex{\unvbox,\uparrow,\upshape,\usebox,\usepackage}
-% \DoNotIndex{\value,\vbox,\vsize,\vskip,\wd,\width,\z at skip}
-% \DoNotIndex{\AtBeginDocument,\AtEndOfPackage,\CurrentOption,\DeclareOption}
-% \DoNotIndex{\ExecuteOptions,\GenericWarning,\IfFileExists,\InputIfFileExists}
-% \DoNotIndex{\NeedsTeXFormat,\MessageBreak}
-% \DoNotIndex{\PackageError,\PackageInfo,\PackageWarning,\PackageWarningNoLine}
-% \DoNotIndex{\PassOptionsToPackage,\ProcessOptions,\ProvidesPackage}
-%
-% \iffalse
-% --------------------------------------------------------------------------- %
-% \fi
-%
-% \setlength{\parskip}{0pt plus 1pt}
-% \changes{v1.0}{2011/10/30}{First release as \package{newfloat} package,
-%       outsourced from the \package{caption3} package and revised}
-% \changes{v1.1}{2013/04/27}{Adapted to the \package{tocloft} package}
-% \changes{v1.1}{2013/04/27}{New command \cs{PrepareListOf} added}
-% \changes{v1.1d}{2019/03/16}{Adapted to the \package{dgruyter} package}
-%
-% \iffalse
-% --------------------------------------------------------------------------- %
-% \fi
-%
-% \clearpage
-% \section{The Implementation}
-% \iffalse
-%<*package>
-% \fi
-%
-% \pagebreak[3]
-% \subsection{Identification}
-%
-%    \begin{macrocode}
-\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{newfloat}[2019/09/01 v1.1k Defining new floating environments (AR)]
-%    \end{macrocode}
-%
-% \begin{macro}{\newfloat at Info}
-% \begin{macro}{\newfloat at InfoNoLine}
-%  |\newfloat at Info|\marg{message}
-%    \begin{macrocode}
-\newcommand*\newfloat at Info[1]{%
-  \PackageInfo{newfloat}{#1}}
-\newcommand*\newfloat at InfoNoLine[1]{%
-  \newfloat at Info{#1\@gobble}}
-%    \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\newfloat at Warning}
-% \begin{macro}{\newfloat at WarningNoLine}
-%  |\newfloat at Warning|\marg{message}
-%    \begin{macrocode}
-\newcommand*\newfloat at Warning[1]{%
-  \PackageWarning{newfloat}{#1}}
-\newcommand*\newfloat at WarningNoLine[1]{%
-  \newfloat at Warning{#1\@gobble}}
-%    \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\newfloat at Error}
-%  |\newfloat at Error|\marg{message}
-%    \begin{macrocode}
-\newcommand*\newfloat at Error[1]{%
-  \PackageError{newfloat}{#1}\newfloat at eh}
-%    \end{macrocode}
-%    \begin{macrocode}
-\newcommand*\newfloat at eh{%
-  If you do not understand this error, please take a closer look\MessageBreak
-  at the documentation of the `newfloat' package.\MessageBreak\@ehc}
-%    \end{macrocode}
-% \end{macro}
-%
-% \pagebreak[3]
-% \subsection{Using the keyval package}
-%
-% We need the \package{keyval} package for option handling, so we load it here.
-%    \begin{macrocode}
-\RequirePackage{keyval}[1997/11/10]
-%    \end{macrocode}
-%
-% \pagebreak[3]
-% \subsection{Helper macros}
-%
-% \begin{macro}{\newfloat at def}
-% \changes{v1.1}{2013/04/27}{This macro added}
-% |\newfloat at def|\marg{macro name}\marg{definition}
-%    \begin{macrocode}
-\newcommand*\newfloat at def[2]{%
-  \newfloat at ifundefined{#1}{%
-    \@namedef{#1}{#2}}}
-%    \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\newfloat at let}
-% \changes{v1.1}{2013/04/27}{This macro added}
-% |\newfloat at let|\marg{macro name}\marg{macro}
-%    \begin{macrocode}
-\newcommand*\newfloat at let[2]{%
-  \newfloat at ifundefined{#1}{%
-    \expandafter\let\csname #1\endcsname#2}}
-%    \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\newfloat at ifundefined}
-% \changes{v1.1}{2013/04/27}{This macro added}
-% |\newfloat at ifundefined|\marg{macro name}\marg{code}
-%    \begin{macrocode}
-\newcommand*\newfloat at ifundefined[2]{%
-  \@ifundefined{#1}{#2}{%
-    \newfloat at Info{%
-      \expandafter\string\csname#1\endcsname\space is already defined}}}
-%    \end{macrocode}
-% \end{macro}
-%
-% \pagebreak[3]
-% \subsection{\cs{DeclareFloatingEnvironment}}
-%
-% \begin{macro}{\DeclareFloatingEnvironment}
-% \changes{v1.0a}{2011/11/16}{Bugfix: Undefines \cs{fst@}\meta{environment} now}
-% \changes{v1.1}{2013/04/27}{Revised, only defines stuff yet undefined now}
-% \changes{v1.1}{2013/11/03}{Uses \cs{newfloat at capitalize} now}
-% \changes{v1.1}{2015/09/16}{Support of \cs{autodot} (offered by the \KOMAScript\ classes) added}
-% \changes{v1.1}{2018/03/04}{Usage of \cs{ifdefined} replaced by \cs{@ifundefined} to improve compatibility with the \package{listings} package}
-% \changes{v1.1b}{2018/12/26}{Bugfix: Missing curly braces added}
-% \changes{v1.1c}{2019/01/10}{Bugfix: Support of \cs{autodot} fixed}
-% \changes{v1.1k}{2019/09/01}{Adapted to the \class{beamer} document class}
-%  |\DeclareFloatingEnvironment|\oarg{options}\marg{environment}\oarg{name}\oarg{list name}
-%    \begin{macrocode}
-\newcommand*\DeclareFloatingEnvironment{%
-  \@testopt\@DeclareFloatingEnvironment{}}
-\@onlypreamble\DeclareFloatingEnvironment
-%    \end{macrocode}
-%    \begin{macrocode}
-\def\@DeclareFloatingEnvironment[#1]#2{%
-  \newfloat at Info{New float `#2' with options `#1'}%
-%    \end{macrocode}
-% Define a counter with the same name as the floating environment
-%    \begin{macrocode}
-  \newfloat at ifundefined{c@#2}{\newcounter{#2}}%
-%    \end{macrocode}
-% Set |\ftype@|\meta{type} which contains the type number for floats of type \meta{type}\par
-% (See also \url{http://tex.stackexchange.com/q/32359/2574})
-%    \begin{macrocode}
-  \@ifundefined{c at float@type}%     from float package
-    {\@ifundefined{c at newflo@tctr}% from memoir document class
-       {\ifdefined\newfloat at ftype \else
-          \newcount\newfloat at ftype
-          \newfloat at ftype=8\relax
-        \fi
-        \expandafter\xdef\csname ftype@#2\endcsname{\the\newfloat at ftype}%
-        \advance\newfloat at ftype\newfloat at ftype}%
-       {\expandafter\edef\csname ftype@#2\endcsname{\the\c at newflo@tctr}%
-        \advance\c at newflo@tctr \c at newflo@tctr}}%
-    {\expandafter\edef\csname ftype@#2\endcsname{\the\value{float at type}}%
-     \addtocounter{float at type}{\value{float at type}}}%
-%    \end{macrocode}
-%    \begin{macrocode}
-  \newfloat at Info{float type `#2'=\@nameuse{ftype@#2}}%
-%    \end{macrocode}
-% Define |\fnum@|\meta{type}, a macro to generate the figure number for a caption
-%    \begin{macrocode}
-  \newfloat at def{fnum@#2}%
-   {\@nameuse{#2name}\nobreakspace\@nameuse{the#2}%
-    \ifdefined\autodot\expandafter\autodot\fi}%
-%    \end{macrocode}
-% Define |\|\meta{type}|name| used by |\fnum@|\meta{type} as \meta{type},
-% but with first letter capitalized
-%    \begin{macrocode}
-  \newfloat at capitalize\newfloat at Type{#2}%
-  \newfloat at let{#2name}{\newfloat at Type}%
-  \newfloat at def{fleg#2}{\@nameuse{#2name}}% legend naming (memoir)
-%    \end{macrocode}
-% Legend name in ToC (memoir document class)
-%    \begin{macrocode}
-  \newfloat at ifundefined{flegtoc#2}{\@namedef{flegtoc#2}##1{}}%
-%    \end{macrocode}
-% Define the floating environment\par
-% If the \class{tufte} document class is loaded,
-% |\@tufte at float| and |\end at tufte@float| will be used instead of
-% |\@float|, |\end at float|, |\@dblfloat|, and |\end at dblfloat|.\par
-% If the \class{beamer} document class is loaded,
-% |\beamer at float| and |\end at beamer@float| will be used.
-%    \begin{macrocode}
-  \ifcsname @tufte at float\endcsname
-    \newenvironment{#2}[1][htbp]%
-      {\begin{@tufte at float}[{##1}]{#2}{}}%
-      {\end{@tufte at float}}%
-    \newenvironment{#2*}[1][htbp]%
-      {\begin{@tufte at float}[{##1}]{#2}{star}}%
-      {\end{@tufte at float}}%
-  \else
-    \@ifclassloaded{beamer}{%
-      \newenvironment{#2}[1][]{\beamer at float{#2}}{\end at beamer@float}%
-    }{%
-      \newenvironment{#2}{\@float{#2}}{\end at float}%
-      \newenvironment{#2*}{\@dblfloat{#2}}{\end at dblfloat}%
-    }%
-  \fi
-%    \end{macrocode}
-% Define the listing command |\listof|\meta{type}(|e|)|s|
-% \changes{v1.1}{2013/04/27}{Definition of list hook added}
-%    \begin{macrocode}
-  \newfloat at def{listof#2}{\newfloat at listof{#2}}%
-  \newfloat at def{listof#2s}{\@nameuse{listof#2}}%
-  \newfloat at def{listof#2es}{\@nameuse{listof#2s}}%
-  \newfloat at def{newfloat at listof#2 at hook}{}%
-  \ifdefined\l at figure
-    \newfloat at let{l@#2}{\l at figure}%
-  \else
-    \newfloat at def{l@#2}{\@dottedtocline{1}{1.5em}{2.3em}}%
-  \fi
-  \edef\newfloat at tempa{List of \newfloat at Type s}%
-  \newfloat at let{list#2name}{\newfloat at tempa}%
-%    \end{macrocode}
-% We undefine |\fst@|\meta{environment} so the new environment
-% will not be recognized as defined by the \package{float} package.
-% (|\fst@|\meta{type} use to hold the float style, see \package{float} package
-% implementation for details.)
-%    \begin{macrocode}
-  \expandafter\let\csname fst@#2\endcsname\@undefined
-%    \end{macrocode}
-% Set default parameters
-%    \begin{macrocode}
-  \newfloat at ifundefined{fps@#2}{\newfloat at setplacement{#2}{tbp}}%
-  \newfloat at ifundefined{ext@#2}{\newfloat at setfileext{#2}{lo#2}}%
-%    \end{macrocode}
-% Apply given options
-%    \begin{macrocode}
-  \newfloat at setoptions*{#2}{#1}%
-%    \end{macrocode}
-% Announce the new floating environment to other packages
-%    \begin{macrocode}
-  \@expandtwoargs\newfloat at announce{#2}{\@nameuse{ext@#2}}%
-%    \end{macrocode}
-% Apply the last two optional arguments for setting names
-%    \begin{macrocode}
-  \@ifnextchar[\newfloat at DFE@setname\relax}
-\@onlypreamble\@DeclareFloatingEnvironment
-%    \end{macrocode}
-%    \begin{macrocode}
-\def\newfloat at DFE@setname[#1]{%
-  \KV@@newfloat at name{#1}%
-  \@ifnextchar[\newfloat at DFE@setlistname\relax}
-\@onlypreamble\newfloat at DFE@setname
-%    \end{macrocode}
-%    \begin{macrocode}
-\def\newfloat at DFE@setlistname[#1]{%
-  \KV@@newfloat at listname{#1}}
-\@onlypreamble\newfloat at DFE@setlistname
-%    \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\newfloat at capitalize}
-% \changes{v1.1}{2013/11/03}{Code extracted from \cs{DeclareFloatingEnvironment}}
-% \changes{v1.1}{2013/11/03}{Uses \cs{newfloat at tempa} instead of \cs{@tempa} now}
-% |\newfloat at capitalize|\marg{command}\marg{name}\\
-% Defines \meta{command} to \meta{name}, but with first letter capitalized.
-%    \begin{macrocode}
-\newcommand*\newfloat at capitalize[2]{%
-  \edef\newfloat at tempa{\gdef\noexpand#1{\@car#2\@nil}}%
-  \uppercase\expandafter{\newfloat at tempa}%
-  \edef\newfloat at tempa{%
-    \noexpand\g at addto@macro\noexpand#1{\@cdr#2\@nil}}%
-  \newfloat at tempa}
-%    \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\newfloat at listof}
-% \changes{v1.1}{2013/04/27}{Revised}
-% \changes{v1.1g}{2019/08/28}{Starred variant added}
-% |\newfloat at listof|\marg{float type}\\
-% typesets the list, using |\listoffigure| with patched list name and file extension.
-%    \begin{macrocode}
-\newcommand*\newfloat at listof[1]{%
-  \@ifstar
-    {\newfloat at list@of{#1}*}%
-    {\newfloat at list@of{#1}\relax}}
-%    \end{macrocode}
-%    \begin{macrocode}
-\newcommand*\newfloat at list@of[1]{%
-  \@expandtwoargs\newfloat at list@of@{#1}{\@nameuse{ext@#1}}}
-%    \end{macrocode}
-%    \begin{macrocode}
-\newcommand*\newfloat at list@of@[3]{%
-  \begingroup
-    \expandafter\let\expandafter\listfigurename\csname list#1name\endcsname
-    \def\ext at figure{#2}%
-    \let\newfloat at starttoc\@starttoc
-    \def\@starttoc##1{\newfloat at starttoc{#2}}%
-    \let\newfloat at listoftoc\listoftoc
-    \def\listoftoc##1{\newfloat at listoftoc{#2}}%
-    \@nameuse{newfloat at listof#1 at hook}%
-    \listoffigures#3%
-  \endgroup}
-%    \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\newfloat at setoptions}
-% |\newfloat at setoptions*|\marg{environment}\marg{options}
-%    \begin{macrocode}
-\newcommand*\newfloat at setoptions{%
-  \@ifstar
-    {\newfloat@@setoptions\@firstofone}%
-    {\newfloat@@setoptions\@gobble}}
-%    \end{macrocode}
-%    \begin{macrocode}
-\newcommand*\newfloat@@setoptions[3]{%
-  \let\newfloat at within@value\@undefined
-  \let\newfloat at chapterlistsgaps@value\@undefined
-  #1{\KV@@newfloat at within\newfloat at within@default}% set default value for new floats
-  \def\newfloat at type{#2}%
-  \setkeys{@newfloat}{#3}%
-  \ifx\newfloat at within@value\@undefined \else
-    \newfloat at setoption{within}\newfloat at within@value
-  \fi
-  \ifx\newfloat at chapterlistsgaps@value\@undefined \else
-    \newfloat at setoption{chapterlistsgaps}\newfloat at chapterlistsgaps@value
-  \fi}
-%    \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\newfloat at within@default}
-%  The default `within' value.
-%  This one will be used if no option |within=|\meta{counter} is given.
-%    \begin{macrocode}
-\newcommand*\newfloat at within@default{%
-  \ifcsname c at chapter\endcsname chapter\else none\fi}
-\@onlypreamble\newfloat at within@default
-%    \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\newfloat at setoption}
-% \changes{v1.1}{2015/09/15}{Bugfix: \cs{@expandtwoargs} replaced by own expansion so the option value do not get expanded anymore}
-% |\newfloat at setoption|\marg{option name}{options}
-%    \begin{macrocode}
-\newcommand*\newfloat at setoption[1]{%
-  \edef\caption at tempa{\noexpand\@nameuse{newfloat at set#1}{\newfloat at type}}%
-  \caption at tempa}
-%    \end{macrocode}
-% \end{macro}
-%
-% The available \meta{options} are:
-% |fileext=|\meta{file extension},
-% |listname=|\meta{list name},
-% |name=|\meta{prosa name},
-% |placement=|\meta{htbp},
-% |within=|\meta{none,chapter,section}, and
-% |without|.
-%
-% \begin{macro}{\newfloat at setfileext}
-% |\newfloat at setfileext|\marg{environment}\marg{file extension}
-%    \begin{macrocode}
-\newcommand*\newfloat at setfileext[2]{%
-  \@namedef{ext@#1}{#2}}
-%    \end{macrocode}
-%    \begin{macrocode}
-\define at key{@newfloat}{fileext}{%
-  \newfloat at setoption{fileext}{#1}}
-%    \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\newfloat at setlistname}
-% |\newfloat at setlistname|\marg{environment}\marg{list name}
-%    \begin{macrocode}
-\newcommand*\newfloat at setlistname[2]{%
-  \@namedef{list#1name}{#2}}
-%    \end{macrocode}
-%    \begin{macrocode}
-\define at key{@newfloat}{listname}{%
-  \newfloat at setoption{listname}{#1}}
-%    \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\newfloat at setname}
-% |\newfloat at setname|\marg{environment}\marg{name}
-%    \begin{macrocode}
-\newcommand*\newfloat at setname[2]{%
-  \newfloat@@setname{#1}{#2}%
-  \begingroup
-    \ifcsname languagename\endcsname
-      \ifcsname captions\languagename\endcsname
-        \expandafter\g at addto@macro\csname captions\languagename\endcsname
-          {\newfloat@@setname{#1}{#2}}%
-      \fi
-    \fi
-  \endgroup}
-%%\AtBeginDocument{\let\newfloat at setname\newfloat@@setname}
-%    \end{macrocode}
-%    \begin{macrocode}
-\newcommand*\newfloat@@setname[2]{%
-  \@namedef{#1name}{#2}}
-%    \end{macrocode}
-%    \begin{macrocode}
-\define at key{@newfloat}{name}{%
-  \newfloat at setoption{name}{#1}}
-%    \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\newfloat at setplacement}
-% |\newfloat at setplacement|\marg{environment}\marg{float placement}
-%    \begin{macrocode}
-\newcommand*\newfloat at setplacement[2]{%
-  \@namedef{fps@#1}{#2}}
-%    \end{macrocode}
-%    \begin{macrocode}
-\define at key{@newfloat}{placement}{%
-  \newfloat at setoption{placement}{#1}}
-%    \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\newfloat at setwithin}
-% |\newfloat at setwithin|\marg{environment}\marg{counter}\par
-% setup the counter for working ``within'' a given counter.
-% Furthermore the chapters lists gap will be switched on
-% (if counter $=$ |chapter|) or off (otherwise).
-%    \begin{macrocode}
-\newcommand*\newfloat at setwithin[2]{%
-  \ifcsname c at chapter\endcsname
-    \@removefromreset{#1}{chapter}%
-  \fi
-  \@removefromreset{#1}{section}%
-%    \end{macrocode}
-%    \begin{macrocode}
-  \edef\@tempa{#2}%
-  \ifx\@tempa\@empty
-    \def\@tempa{none}%
-  \fi
-  \def\@tempb{none}%
-  \ifx\@tempa\@tempb
-    \ifcsname c at chapter\endcsname
-      \@chapterlistsgap at off{#1}%
-    \fi
-    \newfloat@@setwithin{#1}{}{}%
-  \else
-    \def\@tempb{chapter}%
-    \ifx\@tempa\@tempb
-      \@addtoreset{#1}{chapter}%
-      \@chapterlistsgap at on{#1}%
-      \newfloat@@setwithin{#1}{\ifnum\c at chapter>\z@ \thechapter.\fi}{\theHchapter.}%
-    \else
-      \def\@tempb{section}%
-      \ifx\@tempa\@tempb
-        \@addtoreset{#1}{section}%
-        \ifcsname c at chapter\endcsname
-          \@addtoreset{#1}{chapter}%
-          \@chapterlistsgap at on{#1}%
-          \newfloat@@setwithin{#1}{\thesection.}{\theHsection.}%
-        \else
-          \newfloat@@setwithin{#1}{\ifnum\c at section>\z@ \thesection.\fi}{\theHsection.}%
-        \fi
-      \else
-        \newfloat at Error{Invalid value `#2' for option `within'}%
-      \fi
-    \fi
-  \fi}
-%    \end{macrocode}
-% Note: Since the \package{hyperref} package with version $<$ 6.82k defines
-% |\the|\-|H|\-|figure| and |\the|\-|H|\-|table| with |\new|\-|command|,
-% |\newfloat@@setwithin| will yield to an error message when using with an
-% old version of \package{hyperref},
-% e.g. ``\texttt{LaTeX Error: Command \cs{theHfigure} already defined}''.
-%    \begin{macrocode}
-\newcommand*\newfloat@@setwithin[3]{%
-  \global\@namedef{the#1}{#2\arabic{#1}}%
-  \global\@namedef{theH#1}{#3\arabic{#1}}}
-%    \end{macrocode}
-%    \begin{macrocode}
-\define at key{@newfloat}{within}{%
-  \def\newfloat at within@value{#1}}
-%    \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\newfloat at setwithout}
-% |\newfloat at setwithout|\marg{environment}
-%    \begin{macrocode}
-\newcommand*\newfloat at setwithout[1]{%
-  \newfloat at setwithin{#1}{none}}
-%    \end{macrocode}
-%    \begin{macrocode}
-\define at key{@newfloat}{without}[]{%
-  \def\newfloat at within@value{none}}
-%    \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\newfloat at setchapterlistsgaps}
-% |\newfloat at setchapterlistsgaps|\marg{environment}\marg{on/off}
-%    \begin{macrocode}
-\newcommand*\newfloat at setchapterlistsgaps[2]{%
-  \edef\@tempa{#2}%
-  \def\@tempb{off}%
-  \ifx\@tempa\@tempb
-    \@chapterlistsgap at off{#1}%
-  \else
-    \def\@tempb{on}%
-    \ifx\@tempa\@tempb
-      \@chapterlistsgap at on{#1}%
-    \else
-      \newfloat at Error{Invalid value `#2' for option `chapterlistsgaps'}%
-    \fi
-  \fi}
-%    \end{macrocode}
-%    \begin{macrocode}
-\define at key{@newfloat}{chapterlistsgaps}{%
-  \def\newfloat at chapterlistsgaps@value{#1}}
-%    \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@removefromreset}
-% This code was taken from the \package{remreset} package
-% which is part of the `carlisle' package bundle.
-% (Copyright 1997 David Carlisle)
-%    \begin{macrocode}
-\providecommand*\@removefromreset[2]{{%
-  \expandafter\let\csname c@#1\endcsname\@removefromreset
-  \def\@elt##1{%
-    \expandafter\ifx\csname c@##1\endcsname\@removefromreset
-    \else
-      \noexpand\@elt{##1}%
-    \fi}%
-  \expandafter\xdef\csname cl@#2\endcsname{%
-    \csname cl@#2\endcsname}}}
-%    \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\newfloat at announce}
-% |\newfloat at announce|\marg{environment name}\marg{list file extension}
-%    \begin{macrocode}
-\newcommand*\newfloat at announce[2]{%
-%    \end{macrocode}
-%    \begin{macrocode}
-  \@cons\newfloat at list{{#1}}%
-  \@cons\newfloat@@list{{#1}}%
-%    \end{macrocode}
-%    \begin{macrocode}
-  \newfloat at ifundefined{newfloat at ext@#2}{%
-    \@namedef{newfloat at ext@#2}{#1}%
-%    \end{macrocode}
-% Support of \package{memoir} document class
-%    \begin{macrocode}
-    \ifcsname c at lofdepth\endcsname
-      \newfloat at ifundefined{c@#2depth}{%
-        \newcounter{#2depth}%
-        \setcounter{#2depth}{1}}%
-    \fi
-%    \end{macrocode}
-% Support of \package{tocbasic} package
-%    \begin{macrocode}
-    \ifcsname addtotoclist\endcsname
-      \addtotoclist[float]{#2}%
-      \newfloat at def{listof#2name}{\@nameuse{list#1name}}%
-    \fi
-%    \end{macrocode}
-%    \begin{macrocode}
-  }%
-%    \end{macrocode}
-% Support of \package{titletoc} package
-%    \begin{macrocode}
-  \ifcsname contentsuse\endcsname
-    \contentsuse{#1}{#2}%
-  \fi
-%    \end{macrocode}
-%    \begin{macrocode}
-  \newfloat at hook{#1}}
-\@onlypreamble\newfloat at announce
-%    \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\newfloat@@list}
-% |\newfloat@@list| is an \cs{@elt}-list containing the floating environments defined
-% with |\Declare|\-|Floating|\-|Environment| only.
-%    \begin{macrocode}
-\newcommand*\newfloat@@list{}
-%    \end{macrocode}
-% \end{macro}
-%
-% \pagebreak[3]
-% \subsection{\cs{SetupFloatingEnvironment}}
-%
-% \begin{macro}{\SetupFloatingEnvironment}
-% |\SetupFloatingEnvironment|\marg{environment}\marg{options}
-%    \begin{macrocode}
-\newcommand*\SetupFloatingEnvironment[1]{%
-  \newfloat at addtolist{#1}%
-  \newfloat at setoptions{#1}}
-%    \end{macrocode}
-% \end{macro}
-%
-% \pagebreak[3]
-% \subsection{\cs{ForEachFloatingEnvironment}}
-%
-% \begin{macro}{\ForEachFloatingEnvironment}
-% |\ForEachFloatingEnvironment|\marg{code}
-% will execute the given code for each floating environment.
-% The starred variant will only work for already existing environments,
-% i.e.~no hook will be placed inside |\Declare|\-|Floating|\-|Environment|.
-%    \begin{macrocode}
-\newcommand\ForEachFloatingEnvironment{%
-  \@ifstar
-    {\@ForEachFloatingEnvironment\@gobble}%
-    {\@ForEachFloatingEnvironment\@iden}}
-%    \end{macrocode}
-%    \begin{macrocode}
-\newcommand\@ForEachFloatingEnvironment[2]{%
-  \def\@elt##1{#2}%
-  \newfloat at list
-  \let\@elt\relax
-  #1{\newfloat at addtohook{#2}}}
-%    \end{macrocode}
-%    \begin{macrocode}
-\providecommand\newfloat at addtohook[1]{%
-  \toks@=\expandafter{\newfloat at hook{##1}#1}%
-  \edef\@tempa{\def\noexpand\newfloat at hook####1{\the\toks@}}%
-  \@tempa}
-%    \end{macrocode}
-%    \begin{macrocode}
-\providecommand*\newfloat at hook[1]{}
-%    \end{macrocode}
-% \end{macro}
-%
-% \pagebreak[3]
-% \subsection{\cs{PrepareListOf}}
-%
-% \begin{macro}{\PrepareListOf}
-% \changes{v1.1}{2013/04/27}{This macro added}
-% |\PrepareListOf|\marg{float type}\marg{code}\\
-% adds \meta{code} to the one which prepares typesetting the list,
-% just before |\listoffigures|.
-%    \begin{macrocode}
-\newcommand\PrepareListOf[1]{%
-  \expandafter\g at addto@macro\csname newfloat at listof#1 at hook\endcsname}
-\@onlypreamble\PrepareListOf
-%    \end{macrocode}
-% \end{macro}
-%
-% \pagebreak[3]
-% \subsection{The list of floating environments}
-%
-% \begin{macro}{\newfloat at list}
-% |\newfloat at list| is an \cs{@elt}-list containing the already existising floating
-% environments as well the ones defined with |\Declare|\-|Floating|\-|Environment|.
-%    \begin{macrocode}
-\newcommand*\newfloat at list{}
-%    \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\newfloat at addtolist}
-% \changes{v1.0b}{2012/05/18}{Bugfix: Definition of \cs{@ifchapterlistsgap@}\meta{environment} added}
-% |\newfloat at addtolist|\marg{environment}
-% adds an environment to the list of floating environments.
-%    \begin{macrocode}
-\newcommand*\newfloat at addtolist[1]{%
-  \newfloat at ifinlist{#1}{}{%
-    \ifcsname ext@#1\endcsname
-      \@cons\newfloat at list{{#1}}%
-      \@namedef{newfloat at ext@\@nameuse{ext@#1}}{#1}%
-      \newfloat at let{@ifchapterlistsgap@#1}{\@iden}%
-    \else
-      \newfloat at Error{`#1' does not seem to be a floating environment}%
-    \fi}}
-%    \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\newfloat at ifinlist}
-% |\newfloat at ifinlist|\marg{environment}\marg{yes code}\marg{no code}
-% tests if an environment is an element of the list of floating environments.
-%    \begin{macrocode}
-\newcommand*\newfloat at ifinlist[1]{%
-  \let\next\@secondoftwo
-  \begingroup
-    \expandafter\let\csname c@#1\endcsname\newfloat at ifinlist
-    \def\@elt##1{%
-      \expandafter\ifx\csname c@##1\endcsname\newfloat at ifinlist
-        \global\let\next\@firstoftwo
-      \fi}%
-    \newfloat at list
-  \endgroup
-  \next}
-%    \end{macrocode}
-% \end{macro}
-%
-% Add |figure| and |table| to the list of floating environments.
-%    \begin{macrocode}
-\ifcsname ext at figure\endcsname
-  \newfloat at addtolist{figure}
-\fi
-\ifcsname ext at table\endcsname
-  \newfloat at addtolist{table}
-\fi
-%    \end{macrocode}
-%
-% \pagebreak[3]
-% \subsection{Chapter lists gaps}
-%
-%    \begin{macrocode}
-\ifcsname @chapter\endcsname
-%    \end{macrocode}
-%
-% \begin{macro}{\@chapterlistsgap}
-% The amount of the chapter lists gap, the default one is |10pt|.
-% (This command is already defined in \KOMAScript.)
-%    \begin{macrocode}
-  \providecommand*\@chapterlistsgap{10\p@}%
-%    \end{macrocode}
-% If the \package{dgruyter} package is loaded, the default gap is |13pt|.
-%    \begin{macrocode}
-  \@ifpackageloaded{dgruyter}{\renewcommand*\@chapterlistsgap{13\p@}}{}%
-%    \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@addchapterlistsgap}
-% |\@addchapterlistsgap|\marg{float type}\marg{file extension}\par
-% will add the chapter lists gap for the given float type.
-%    \begin{macrocode}
-  \providecommand*\@addchapterlistsgap[2]{%
-    \@nameuse{@ifchapterlistsgap@#1}{% if switched on
-      \@@addchapterlistsgap{#1}{#2}}}
-%    \end{macrocode}
-%    \begin{macrocode}
-  \providecommand*\@@addchapterlistsgap[2]{%
-    \@ifundefined{@addchapterlistsgap@#2}{% only once per extension
-      \@namedef{@addchapterlistsgap@#2}{#1}%
-      \@@@addchapterlistsgap{#2}}{}}
-%    \end{macrocode}
-%    \begin{macrocode}
-  \providecommand*\@@@addchapterlistsgap[1]{%
-    \ifdim \@chapterlistsgap>\z@
-      \addtocontents{#1}{\protect\addvspace{\@chapterlistsgap}}%
-    \fi}
-%    \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@addchapterlistsgaps}
-% \changes{v1.0b}{2012/05/18}{Bugfix: Group added to make \cs{@addchapterlistsgap} work correctly}
-% |\@addchapterlistsgaps|\par
-% will add the chapter lists gaps for all floating environments in |\newfloat at list|.
-%    \begin{macrocode}
-  \providecommand*\@addchapterlistsgaps{%
-    \begingroup
-      \def\@elt##1{%
-        \@expandtwoargs\@addchapterlistsgap{##1}{\@nameuse{ext@##1}}}%
-      \newfloat at list
-    \endgroup}
-%    \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@chapterlistsgap at off}
-% |\@chapterlistsgap at off|\marg{float type}\par
-% switches the chapter lists gap off for the given float type.
-% Since \KOMAScript{} (still) supports |\float at exts| we need to handle
-% this locally, too, even if |\unsettoc| is offered by the \package{tocbasic} package.
-% (Otherwise our handling could be moved into the |\else| branch.)
-%    \begin{macrocode}
-  \providecommand*\@chapterlistsgap at off[1]{%
-    \expandafter\let\csname @ifchapterlistsgap@#1\endcsname\@gobble
-    \ifcsname unsettoc\endcsname
-      \@expandtwoargs\unsettoc{\@nameuse{ext@#1}}{chapteratlist}%
-    \fi}
-%    \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@chapterlistsgap at on}
-% |\@chapterlistsgap at off|\marg{float type}\par
-% switches the chapter lists gap on for the given float type.
-%    \begin{macrocode}
-  \providecommand*\@chapterlistsgap at on[1]{%
-    \expandafter\let\csname @ifchapterlistsgap@#1\endcsname\@iden
-    \ifcsname setuptoc\endcsname
-      \@expandtwoargs\setuptoc{\@nameuse{ext@#1}}{chapteratlist}%
-    \fi}
-%    \end{macrocode}
-% \end{macro}
-%
-%    \begin{macrocode}
-\fi
-%    \end{macrocode}
-%
-% \pagebreak[3]
-% \subsection{Global options}
-%
-% \begin{macro}{chapterlistsgap=}
-% The |chapterlistsgap=| option sets the vertical skip added to each list when
-% starting a new chapter.
-%    \begin{macrocode}
-\define at key{newfloat}{chapterlistsgap}{%
-  \renewcommand*\@chapterlistsgap{#1}}
-%    \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{within=}
-% The |within=| option redefines the default value and modifies all
-% existing floating environments.
-%    \begin{macrocode}
-\define at key{newfloat}{within}{%
-  \def\newfloat at within@default{#1}% set new default value
-  \def\@elt##1{\newfloat at setwithin{##1}{#1}}%
-  \newfloat at list
-  \let\@elt\relax}
-%    \end{macrocode}
-%    \begin{macrocode}
-\define at key{newfloat}{without}[]{%
-  \KV at newfloat@within{none}}
-%    \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{figurename=}
-% \begin{macro}{listfigurename=}
-% \begin{macro}{figurewithin=}
-% We define these options not only for |figure| but for all existing floating environments.
-%    \begin{macrocode}
-\def\@elt#1{%
-  \define at key{newfloat}{#1name}{%
-    \newfloat at setname{#1}{##1}}%
-  \define at key{newfloat}{list#1name}{%
-    \newfloat at setname{list#1}{##1}}%
-  \define at key{newfloat}{#1within}{%
-    \newfloat at setwithin{#1}{##1}}%
-  \define at key{newfloat}{#1without}[]{%
-    \newfloat at setwithout{#1}}%
-}%
-\newfloat at list
-\let\@elt\relax
-%    \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{planb=}
-% \changes{v1.0b}{2012/05/18}{This option added}
-% This option switches the `Plan B' on or off. (default$=$true)
-%    \begin{macrocode}
-\define at key{newfloat}{planb}[true]{%
-  \def\@tempa{#1}%
-  \def\@tempb{false}%
-  \ifx\@tempa\@tempb
-    \let\newfloat at ifplanb\@gobble
-  \else
-    \def\@tempb{true}%
-    \ifx\@tempa\@tempb
-      \let\newfloat at ifplanb\@iden
-    \else
-      \newfloat at Error{Invalid value `#1' for option `planb'}%
-    \fi
-  \fi}
-%    \end{macrocode}
-% \end{macro}
-% \begin{macro}{planb-filext=}
-% \changes{v1.0b}{2012/05/19}{This option added}
-% This option sets the file extension used for `Plan B'.
-% (default$=$use the 1st one which seem to fit)
-%    \begin{macrocode}
-\define at key{newfloat}{planb-fileext}{%
-  \newfloat at Info{Setting Plan B file extension to `#1'}
-  \xdef\newfloat at addtocontents@ext{#1}}
-%    \end{macrocode}
-% \end{macro}
-%
-% Process the package options:
-% We use |\setkeys| here instead of |\ProcessOptions|.
-%    \begin{macrocode}
-\let\@tempc\relax
-\@expandtwoargs\setkeys{newfloat}{planb,\@ptionlist{\@currname.\@currext}}%
-\AtEndOfPackage{\let\@unprocessedoptions\relax}
-%    \end{macrocode}
-%
-% \begin{macro}{\newfloatsetup}
-% |\newfloatsetup|\marg{options}
-% sets global options after loading the package.
-%    \begin{macrocode}
-\newcommand*\newfloatsetup{\setkeys{newfloat}}
-%    \end{macrocode}
-% \end{macro}
-%
-% \pagebreak[3]
-% \subsection{Patching \cs{chapter}}
-%
-% \begin{macro}{\newfloat at replace@chapter}
-% \changes{v1.1f}{2019/08/25}{Parameter \meta{class name} added to macro}
-% \changes{v1.1i}{2019/08/31}{Local definition of \cs{if at chapnum} added}
-%   |\newfloat at replace@chapter|\marg{class name}\marg{original code}\marg{replacement code}\par
-%   tries to patch |\@chapter| so |\@add|\-|chapter|\-|lists|\-|gaps| will be supported.
-%   It checks for |\Hy at org@chapter|, too, since the original code will be stored here
-%   if the \package{hyperref} package was loaded.
-%    \begin{macrocode}
-\newcommand\newfloat at replace@chapter[3]{%
-  \begingroup
-    \let\if at twocolumn\iffalse
-    \let\if at mainmatter\iffalse
-    \let\if at thema\iffalse
-    \let\if at chapnum\iffalse
-    \def\@tempa[##1]##2{#2}%
-    \ifx\@tempa\@chapter
-      \newfloat at InfoNoLine{Document class `#1' detected}%
-      \gdef\@chapter[##1]##2{#3}%
-      \global\let\newfloat at replace@chapter\newfloat at dont@replace at chapter
-    \else\ifx\@tempa\Hy at org@chapter
-      \newfloat at InfoNoLine{Document class `#1' detected (Hy)}%
-      \gdef\Hy at org@chapter[##1]##2{#3}%
-      \global\let\newfloat at replace@chapter\newfloat at dont@replace at chapter
-    \fi\fi
-  \endgroup}
-%    \end{macrocode}
-%    \begin{macrocode}
-\newcommand\newfloat at dont@replace at chapter[3]{}
-%    \end{macrocode}
-%    \begin{macrocode}
-\ifcsname @chapter\endcsname \else
-  \let\newfloat at replace@chapter\newfloat at dont@replace at chapter
-\fi
-%    \end{macrocode}
-% \end{macro}
-%
-% \pagebreak[3]
-% \subsubsection{Standard \LaTeX{} document classes}
-%
-%    \begin{macrocode}
-% report.cls [2005/09/16 v1.4f Standard LaTeX document class]
-\newfloat at replace@chapter{report}{%
-  \ifnum \c at secnumdepth >\m at ne
-    \refstepcounter{chapter}%
-    \typeout{\@chapapp\space\thechapter.}%
-    \addcontentsline{toc}{chapter}%
-      {\protect\numberline{\thechapter}#1}%
-  \else
-    \addcontentsline{toc}{chapter}{#1}%
-  \fi
-  \chaptermark{#1}%
-  \addtocontents{lof}{\protect\addvspace{10\p@}}%
-  \addtocontents{lot}{\protect\addvspace{10\p@}}%
-  \if at twocolumn
-    \@topnewpage[\@makechapterhead{#2}]%
-  \else
-    \@makechapterhead{#2}%
-    \@afterheading
-  \fi
-}{%
-  \ifnum \c at secnumdepth >\m at ne
-    \refstepcounter{chapter}%
-    \typeout{\@chapapp\space\thechapter.}%
-    \addcontentsline{toc}{chapter}%
-      {\protect\numberline{\thechapter}#1}%
-  \else
-    \addcontentsline{toc}{chapter}{#1}%
-  \fi
-  \chaptermark{#1}%
-  \@addchapterlistsgaps
-  \if at twocolumn
-    \@topnewpage[\@makechapterhead{#2}]%
-  \else
-    \@makechapterhead{#2}%
-    \@afterheading
-  \fi}
-%    \end{macrocode}
-%
-%    \begin{macrocode}
-% book.cls [2005/09/16 v1.4f Standard LaTeX document class]
-\newfloat at replace@chapter{book}{%
-  \ifnum \c at secnumdepth >\m at ne
-    \if at mainmatter
-      \refstepcounter{chapter}%
-      \typeout{\@chapapp\space\thechapter.}%
-      \addcontentsline{toc}{chapter}%
-        {\protect\numberline{\thechapter}#1}%
-    \else
-      \addcontentsline{toc}{chapter}{#1}%
-    \fi
-  \else
-    \addcontentsline{toc}{chapter}{#1}%
-  \fi
-  \chaptermark{#1}%
-  \addtocontents{lof}{\protect\addvspace{10\p@}}%
-  \addtocontents{lot}{\protect\addvspace{10\p@}}%
-  \if at twocolumn
-    \@topnewpage[\@makechapterhead{#2}]%
-  \else
-    \@makechapterhead{#2}%
-    \@afterheading
-  \fi
-}{%
-  \ifnum \c at secnumdepth >\m at ne
-    \if at mainmatter
-      \refstepcounter{chapter}%
-      \typeout{\@chapapp\space\thechapter.}%
-      \addcontentsline{toc}{chapter}%
-        {\protect\numberline{\thechapter}#1}%
-    \else
-      \addcontentsline{toc}{chapter}{#1}%
-    \fi
-  \else
-    \addcontentsline{toc}{chapter}{#1}%
-  \fi
-  \chaptermark{#1}%
-  \@addchapterlistsgaps
-  \if at twocolumn
-    \@topnewpage[\@makechapterhead{#2}]%
-  \else
-    \@makechapterhead{#2}%
-    \@afterheading
-  \fi}
-%    \end{macrocode}
-%
-% \pagebreak[3]
-% \subsubsection{\AmS{} \& \SmF{} document classes}
-%
-%    \begin{macrocode}
-% amsbook.cls [2004/08/06 v2.20]
-% smfbook.cls [1999/11/15 v1.2f Classe LaTeX pour les monographies editees par la SMF]
-\newfloat at replace@chapter{amsbook}{%
-  \refstepcounter{chapter}%
-  \ifnum\c at secnumdepth<\z@ \let\@secnumber\@empty
-  \else \let\@secnumber\thechapter \fi
-  \typeout{\chaptername\space\@secnumber}%
-  \def\@toclevel{0}%
-  \ifx\chaptername\appendixname \@tocwriteb\tocappendix{chapter}{#2}%
-  \else \@tocwriteb\tocchapter{chapter}{#2}\fi
-  \chaptermark{#1}%
-  \addtocontents{lof}{\protect\addvspace{10\p@}}%
-  \addtocontents{lot}{\protect\addvspace{10\p@}}%
-  \@makechapterhead{#2}\@afterheading
-}{%
-  \refstepcounter{chapter}%
-  \ifnum\c at secnumdepth<\z@ \let\@secnumber\@empty
-  \else \let\@secnumber\thechapter \fi
-  \typeout{\chaptername\space\@secnumber}%
-  \def\@toclevel{0}%
-  \ifx\chaptername\appendixname \@tocwriteb\tocappendix{chapter}{#2}%
-  \else \@tocwriteb\tocchapter{chapter}{#2}\fi
-  \chaptermark{#1}%
-  \@addchapterlistsgaps
-  \@makechapterhead{#2}\@afterheading}
-%    \end{macrocode}
-%
-% \pagebreak[3]
-% \subsubsection{\KOMAScript{} document classes}
-%
-% If a \KOMAScript{} document class or the \package{tocbasic} package is used
-% we don't need to patch anything.
-% Instead we use |\setup|\-|toc| and |\un|\-|set|\-|toc| to setup the
-% chapters gap in |\@chapter|\-|lists|\-|gap at on| and |\@chapter|\-|lists|\-|gap at off|.
-%    \begin{macrocode}
-\@ifpackageloaded{tocbasic}{%
-  \let\newfloat at replace@chapter\newfloat at dont@replace at chapter}{}
-%    \end{macrocode}
-%
-% \pagebreak[3]
-% \subsubsection{memoir document classes}
-%
-% If the \package{memoir} document class is used,
-% replacing |\insert|\-|chapter|\-|space| by |\@add|\-|chapter|\-|lists|\-|gaps| is sufficient.
-%    \begin{macrocode}
-\ifcsname insertchapterspace\endcsname
-  \renewcommand*\insertchapterspace{\@addchapterlistsgaps}
-  \let\newfloat at replace@chapter\newfloat at dont@replace at chapter
-\fi
-%    \end{macrocode}
-%
-% \pagebreak[3]
-% \subsubsection{NTG document classes}
-%
-%    \begin{macrocode}
-% rapport1/3.cls [2004/06/07 v2.1a NTG LaTeX document class]
-\newfloat at replace@chapter{rapport}{%
-  \ifnum \c at secnumdepth >\m at ne
-    \refstepcounter{chapter}%
-    \typeout{\@chapapp\space\thechapter.}%
-    \addcontentsline{toc}{chapter}%
-      {\protect\numberline{\thechapter}\toc at font0 #1}%
-  \else
-    \addcontentsline{toc}{chapter}{\toc at font0 #1}%
-  \fi
-  \chaptermark{#1}%
-  \addtocontents{lof}{\protect\addvspace{10\p@}}%
-  \addtocontents{lot}{\protect\addvspace{10\p@}}%
-  \if at twocolumn
-    \@topnewpage[\@makechapterhead{#2}]%
-  \else
-    \@makechapterhead{#2}%
-    \@afterheading
-  \fi
-}{%
-  \ifnum \c at secnumdepth >\m at ne
-    \refstepcounter{chapter}%
-    \typeout{\@chapapp\space\thechapter.}%
-    \addcontentsline{toc}{chapter}%
-      {\protect\numberline{\thechapter}\toc at font0 #1}%
-  \else
-    \addcontentsline{toc}{chapter}{\toc at font0 #1}%
-  \fi
-  \chaptermark{#1}%
-  \@addchapterlistsgaps
-  \if at twocolumn
-    \@topnewpage[\@makechapterhead{#2}]%
-  \else
-    \@makechapterhead{#2}%
-    \@afterheading
-  \fi}
-%    \end{macrocode}
-%    \begin{macrocode}
-% boek(3).cls [2004/06/07 v2.1a NTG LaTeX document class]
-\newfloat at replace@chapter{boek}{%
-  \ifnum \c at secnumdepth >\m at ne
-    \if at mainmatter
-      \refstepcounter{chapter}%
-      \typeout{\@chapapp\space\thechapter.}%
-      \addcontentsline{toc}{chapter}%
-        {\protect\numberline{\thechapter}\toc at font0 #1}%
-    \else
-      \addcontentsline{toc}{chapter}{\toc at font0 #1}%
-    \fi
-  \else
-    \addcontentsline{toc}{chapter}{\toc at font0 #1}%
-  \fi
-  \chaptermark{#1}%
-  \addtocontents{lof}{\protect\addvspace{10\p@}}%
-  \addtocontents{lot}{\protect\addvspace{10\p@}}%
-  \if at twocolumn
-    \@topnewpage[\@makechapterhead{#2}]%
-  \else
-    \@makechapterhead{#2}%
-    \@afterheading
-  \fi
-}{%
-  \ifnum \c at secnumdepth >\m at ne
-    \if at mainmatter
-      \refstepcounter{chapter}%
-      \typeout{\@chapapp\space\thechapter.}%
-      \addcontentsline{toc}{chapter}%
-        {\protect\numberline{\thechapter}\toc at font0 #1}%
-    \else
-      \addcontentsline{toc}{chapter}{\toc at font0 #1}%
-    \fi
-  \else
-    \addcontentsline{toc}{chapter}{\toc at font0 #1}%
-  \fi
-  \chaptermark{#1}%
-  \@addchapterlistsgaps
-  \if at twocolumn
-    \@topnewpage[\@makechapterhead{#2}]%
-  \else
-    \@makechapterhead{#2}%
-    \@afterheading
-  \fi}
-%    \end{macrocode}
-%
-% \pagebreak[3]
-% \subsubsection{The thesis document class}
-%
-%    \begin{macrocode}
-% thesis.cls [1996/25/01 1.0g LaTeX document class (wm).]
-\newfloat at replace@chapter{thesis}{%
-  \ifnum \c at secnumdepth >\m at ne
-    \if at mainmatter
-      \refstepcounter{chapter}%
-      \typeout{\chaptername\space\thechapter.}
-      \if at thema
-        \ifx\@shortauthor\@empty
-          \addcontentsline{toc}{chapter}{%
-          \protect\numberline{\thechapter.}#1}%
-        \else
-          \addcontentsline{toc}{chapter}{%
-          \protect\numberline{\thechapter.}%
-          \@shortauthor\hfill\mbox{}\vskip\normallineskip #1}%
-        \fi
-      \else
-        \addcontentsline{toc}{chapter}{%
-        \protect\numberline{\thechapter.}#1}%
-      \fi
-    \else
-      \addcontentsline{toc}{chapter}{#1}
-    \fi
-  \else
-    \addcontentsline{toc}{chapter}{#1}
-  \fi
-  \chaptermark{#1}
-  \addtocontents{lof}{\protect\addvspace{10pt}}
-  \addtocontents{lot}{\protect\addvspace{10pt}}
-  \if at twocolumn
-    \@topnewpage[\@makechapterhead{#2}]
-  \else
-    \@makechapterhead{#2}
-    \@afterheading
-  \fi
-}{%
-  \ifnum \c at secnumdepth >\m at ne
-    \if at mainmatter
-      \refstepcounter{chapter}%
-      \typeout{\chaptername\space\thechapter.}%
-      \if at thema
-        \ifx\@shortauthor\@empty
-          \addcontentsline{toc}{chapter}{%
-          \protect\numberline{\thechapter.}#1}%
-        \else
-          \addcontentsline{toc}{chapter}{%
-          \protect\numberline{\thechapter.}%
-          \@shortauthor\hfill\mbox{}\vskip\normallineskip #1}%
-        \fi
-      \else
-        \addcontentsline{toc}{chapter}{%
-        \protect\numberline{\thechapter.}#1}%
-      \fi
-    \else
-      \addcontentsline{toc}{chapter}{#1}%
-    \fi
-  \else
-    \addcontentsline{toc}{chapter}{#1}%
-  \fi
-  \chaptermark{#1}%
-  \@addchapterlistsgaps
-  \if at twocolumn
-    \@topnewpage[\@makechapterhead{#2}]%
-  \else
-    \@makechapterhead{#2}%
-    \@afterheading
-  \fi}
-%    \end{macrocode}
-%
-% \pagebreak[3]
-% \subsubsection{The Springer Verlag document classes}
-% \changes{v1.1f}{2019/08/25}{Support of \package{svmono} and \package{svmult} document classes added}
-%
-%    \begin{macrocode}
-% svmono.cls [2018/06/25 v5.6 Springer Verlag global LaTeX document class for monographs]
-% svmult.cls [2018/01/11 v5.5 Springer Verlag global LaTeX document class for multi authored books]
-\newfloat at replace@chapter{svmono}{%
-  \if at chapnum  % war mal \ifnum \c at secnumdepth >\m at ne
-    \refstepcounter{chapter}%
-    \if at mainmatter
-      \typeout{\@chapapp\space\thechapter.}%
-      \addcontentsline{toc}{chapter}{\protect
-        \numberline{\thechapter\thechapterend}#1}%
-    \else
-      \addcontentsline{toc}{chapter}{#1}%
-    \fi
-  \else
-    \addcontentsline{toc}{chapter}{#1}%
-  \fi
-  \chaptermark{#1}%
-  \addtocontents{lof}{\protect\addvspace{10\p@}}%
-  \addtocontents{lot}{\protect\addvspace{10\p@}}%
-  \if at twocolumn
-    \@topnewpage[\@makechapterhead{#2}]%
-  \else
-    \@makechapterhead{#2}%
-    \@afterheading
-  \fi
-}{%
-  \if at chapnum  % war mal \ifnum \c at secnumdepth >\m at ne
-    \refstepcounter{chapter}%
-    \if at mainmatter
-      \typeout{\@chapapp\space\thechapter.}%
-      \addcontentsline{toc}{chapter}{\protect
-        \numberline{\thechapter\thechapterend}#1}%
-    \else
-      \addcontentsline{toc}{chapter}{#1}%
-    \fi
-  \else
-    \addcontentsline{toc}{chapter}{#1}%
-  \fi
-  \chaptermark{#1}%
-  \@addchapterlistsgaps
-  \if at twocolumn
-    \@topnewpage[\@makechapterhead{#2}]%
-  \else
-    \@makechapterhead{#2}%
-    \@afterheading
-  \fi}
-%    \end{macrocode}
-%
-% \pagebreak[3]
-% \subsubsection{The dgruyter package}
-% \changes{v1.1j}{2019/08/31}{Extended support of \package{dgruyter} package added}
-%
-%    \begin{macrocode}
-% dgruyter.sty [2017/09/19 v2.00 De Gruyter layout]
-\newfloat at replace@chapter{dgruyter}{%
-  \let\thesection\theinchapsection
-  \let\theequation\theinchapequation
-  \let\thefigure\theinchapfigure
-  \let\thetable\theinchaptable
-  \ifx\bookDOI\@undefined
-  \else
-    \@tempcnta\numexpr\componentd at i+\@ne\relax
-    \xdef\componentd at i{\the\@tempcnta}%
-    \xdef\@DOI{%
-      https://doi.org/\bookDOI
-      -\ifx\thepage\thefrontmatterpage2\else\ifnum\@tempcnta<100 0\fi\fi
-      \ifnum\@tempcnta<10 0\fi\componentd at i}%
-  \fi
-  \ifnum \c at secnumdepth >\m at ne
-    \if at mainmatter
-      \refstepcounter{chapter}%
-      \typeout{\@chapapp\space\thechapter.}%
-      \addcontentsline{toc}{chapter}{\protect\numberline{\thechapter}#1}%
-    \else
-      \addcontentsline{toc}{schapter}{#1}%
-    \fi
-  \else
-    \addcontentsline{toc}{schapter}{#1}%
-  \fi
-  \chaptermark{#1}%
-  \addtocontents{lof}{\protect\addvspace{13\p@}}%
-  \addtocontents{lot}{\protect\addvspace{13\p@}}%
-  \if at twocolumn
-    \@topnewpage[\@makechapterhead{#2}]%
-  \else
-    \@makechapterhead{#2}%
-    \@afterheading
-  \fi
-}{%
-  \let\thesection\theinchapsection
-  \let\theequation\theinchapequation
-  \let\thefigure\theinchapfigure
-  \let\thetable\theinchaptable
-  \ifx\bookDOI\@undefined
-  \else
-    \@tempcnta\numexpr\componentd at i+\@ne\relax
-    \xdef\componentd at i{\the\@tempcnta}%
-    \xdef\@DOI{%
-      https://doi.org/\bookDOI
-      -\ifx\thepage\thefrontmatterpage2\else\ifnum\@tempcnta<100 0\fi\fi
-      \ifnum\@tempcnta<10 0\fi\componentd at i}%
-  \fi
-  \ifnum \c at secnumdepth >\m at ne
-    \if at mainmatter
-      \refstepcounter{chapter}%
-      \typeout{\@chapapp\space\thechapter.}%
-      \addcontentsline{toc}{chapter}{\protect\numberline{\thechapter}#1}%
-    \else
-      \addcontentsline{toc}{schapter}{#1}%
-    \fi
-  \else
-    \addcontentsline{toc}{schapter}{#1}%
-  \fi
-  \chaptermark{#1}%
-  \@addchapterlistsgaps
-  \if at twocolumn
-    \@topnewpage[\@makechapterhead{#2}]%
-  \else
-    \@makechapterhead{#2}%
-    \@afterheading
-  \fi}
-%    \end{macrocode}
-%
-% \pagebreak[3]
-% \subsubsection{Compatibility warning}
-%
-%    \begin{macrocode}
-\ifx\newfloat at replace@chapter\newfloat at dont@replace at chapter \else
-%    \end{macrocode}
-% If we were not able to patch |\@chapter| an info message is issued
-% since we may not be able to support chapter lists gaps then.
-%    \begin{macrocode}
-  \newfloat at InfoNoLine{%
-    Unsupported document class, or \noexpand\@chapter\MessageBreak
-    was already redefined by another package}
-  \newfloat at InfoNoLine{\string\@chapter\space=\space\meaning\@chapter}
-  \newfloat at InfoNoLine{\string\Hy at org@chapter\space=\space\meaning\Hy at org@chapter}
-%    \end{macrocode}
-% Plan B: We patch |\add|\-|to|\-|contents| instead, and keep our fingers crossed
-% in the hope that this redefinition actually will fit.
-% (Note: Since \package{biblatex} patches |\add|\-|to|\-|contents| as well we do
-% this using |\At||Begin||Document|.)
-% \changes{v1.1f}{2019/08/25}{Plan B will now be done using \cs{AtBeginDocument}}
-%    \begin{macrocode}
-  \newfloat at ifplanb{\AtBeginDocument{%
-    \newfloat at InfoNoLine{Trying Plan B..}%
-    \let\newfloat at addtocontents@ORI\addtocontents
-    \long\def\addtocontents#1#2{%
-      \newfloat at addtocontents{#1}{#2}#2\addvspace\newfloat at nil}%
-    \long\def\newfloat at addtocontents#1#2#3\addvspace#4\newfloat at nil{%
-      \def\newfloat at tempa{#4}%
-      \ifx\newfloat at tempa\@empty
-        \newfloat at addtocontents@ORI{#1}{#2}%
-      \else
-        \ifx\newfloat at addtocontents@ext\@undefined
-          \newfloat at Info{Setting Plan B file extension to `#1'...}%
-          \xdef\newfloat at addtocontents@ext{#1}%
-        \fi
-        \edef\newfloat at tempa{#1}%
-        \ifx\newfloat at tempa\newfloat at addtocontents@ext
-          \begingroup
-            \let\addtocontents\newfloat at addtocontents@ORI
-            \@addchapterlistsgaps
-          \endgroup
-        \fi
-      \fi}}}
-%    \end{macrocode}
-%    \begin{macrocode}
-\fi
-%    \end{macrocode}
-%
-% \pagebreak[3]
-% \subsection{Support of document classes}
-%
-% \subsubsection{The beamer document class}
-%
-% \begin{macro}{\beamer at float}
-% \changes{v1.1k}{2019/09/01}{This macro added}
-% Unfortunately the \class{beamer} document class does not offer
-% |\beamer at float| and |\end at beamer@float| (yet), so we have to define them
-% for ourself.
-% (This code was taken from beamerbaselocalstructure.sty [2019/07/23 v3.56] and adapted.)
-%    \begin{macrocode}
-\ifcsname beamer at float\endcsname \else
-%    \end{macrocode}
-%    \begin{macrocode}
-  \def\beamer at float#1{%
-    \ifcsname caption at settype\endcsname
-      \caption at settype{#1}%
-    \else
-      \def\@captype{#1}%
-    \fi
-    \par\nobreak\begin{center}\nobreak}
-%    \end{macrocode}
-%    \begin{macrocode}
-  \def\end at beamer@float{%
-    \par\nobreak\end{center}}
-%    \end{macrocode}
-%    \begin{macrocode}
-\fi
-%    \end{macrocode}
-% \end{macro}
-%
-% \pagebreak[3]
-% \subsection{Support of other packages}
-%
-% \begin{macro}{\newfloat at IfPackageLoaded}
-% \changes{v1.1e}{2019/03/17}{This macro revised}
-% \changes{v1.1h}{2019/08/31}{This macro revised again and renamed from \cs{newfloat at ForEachNew} to \cs{newfloat at IfPackageLoaded}}
-% |\newfloat at IfPackageLoaded|\marg{package name}\marg{command}\marg{code}
-% will execute the given code for every floating environment defined with
-% |\Declare|\-|Floating|\-|Environment| if \meta{command} is not defined yet.
-% (If \meta{command} is already defined a warning will be issued.)
-% This will be tried |\At|\-|Begin|\-|Document| additionally so the affected package could
-% be loaded after \thispackage.
-%    \begin{macrocode}
-\newcommand\newfloat at IfPackageLoaded[3]{%
-  \@ifpackageloaded{#1}{%
-    \newfloat@@IfPackageLoaded{#1}{#2}{#3}%
-  }{%
-    \AtBeginDocument{%
-      \@ifpackageloaded{#1}{%
-        \newfloat@@IfPackageLoaded{#1}{#2}{#3}%
-      }{}}%
-  }}
-\@onlypreamble\newfloat at IfPackageLoaded
-%    \end{macrocode}
-%    \begin{macrocode}
-\newcommand\newfloat@@IfPackageLoaded[3]{%
-  \newfloat at InfoNoLine{`#1' package detected}%
-  % Execute code for every previous \DeclareFloatingEnvironment
-  \def\@elt##1{\newfloat@@@IfPackageLoaded{#1}{#2}{#3}}%
-  \newfloat@@list
-  \let\@elt\relax
-  % Execute code for every future \DeclareFloatingEnvironment
-  \newfloat at addtohook{\newfloat@@@IfPackageLoaded{#1}{#2}{#3}}}
-\@onlypreamble\newfloat@@IfPackageLoaded
-%    \end{macrocode}
-%    \begin{macrocode}
-\newcommand\newfloat@@@IfPackageLoaded[3]{%
-  \ifcsname#2\endcsname
-    \newfloat at WarningNoLine{%
-      Command \@backslashchar#2 already defined.\MessageBreak
-      (`#1' package support)}%
-  \else
-    #3%
-  \fi}
-\@onlypreamble\newfloat@@@IfPackageLoaded
-%    \end{macrocode}
-% \end{macro}
-%
-% \pagebreak[3]
-% \subsubsection{\package{dgruyter}}
-%
-% The De Gruyter layout package (for preparing books for Walter de Gruyter GmbH)
-% is defining |\plist at figure| and |\plist at table|, and expects this to be
-% defined for other floating environments as well.
-% (This will be used as prefix for the ``List of''.)
-%    \begin{macrocode}
-\newfloat at IfPackageLoaded{dgruyter}{plist@#1}{%
-  \expandafter\newcommand\csname plist@#1\endcsname{%
-    \@nameuse{#1name}\space}}
-%    \end{macrocode}
-%
-% \pagebreak[3]
-% \subsubsection{\package{float}}
-%
-% If the \package{float} package is used we fill up |\float at exts| with our file
-% extensions, too. Since this list will be used for inserting chapters gaps
-% we only add the ones which are configured for chapters gaps on.
-%    \begin{macrocode}
-\newfloat at IfPackageLoaded{float}{newfloat at undefined}{%
-  \@nameuse{@ifchapterlistsgap@#1}{% if switched on
-    \let\float at do=\relax
-    \edef\@tempa{%
-      \noexpand\float at exts{\the\float at exts\float at do{\@nameuse{ext@#1}}}}%
-    \@tempa}}
-%    \end{macrocode}
-%
-% \pagebreak[3]
-% \subsubsection{\package{fltpage}}
-%
-% We define a FP-variant of new floating environments here.
-%    \begin{macrocode}
-\newfloat at IfPackageLoaded{fltpage}{FP#1}{%
-  \newcounter{FP@#1C}%
-  \newenvironment{FP#1}{\FP at floatBegin{#1}}{\FP at floatEnd}}
-%    \end{macrocode}
-%
-% \pagebreak[3]
-% \subsubsection{\package{listings}}
-%
-% \begin{macro}{\ext at lstlisting}
-% Since the \package{listings} package do not define |\ext at lst|\-|listing|
-% but we needed it when |Setup|\-|Floating|\-|Environment{lst|\-|listing}{|\ldots|}|
-% will be done by the end user, we define it here.
-%    \begin{macrocode}
-\providecommand*\ext at lstlisting{lol}%
-%    \end{macrocode}
-% \end{macro}
-%
-% \pagebreak[3]
-% \subsubsection{\package{rotating}}
-%
-% We define a sideways-variant of new floating environments here.
-%    \begin{macrocode}
-\newfloat at IfPackageLoaded{rotating}{sideways#1}{%
-  \newenvironment{sideways#1}{\@rotfloat{#1}}{\end at rotfloat}%
-  \newenvironment{sideways#1*}{\@rotdblfloat{#1}}{\end at rotdblfloat}}
-%    \end{macrocode}
-%
-% \pagebreak[3]
-% \subsubsection{\package{sidecap}}
-%
-% We define a SC-variant of new floating environments here.
-% \begin{macro}{\SC at float}
-% \changes{v1.1b}{2018/12/26}{Bugfix: Missing curly braces added}
-%    \begin{macrocode}
-\newcommand*\newfloat at For@SC[2]{%
-  \def#1{b}% = \sidecaptionvpos{#2}{b} (v1.6)
-  \newenvironment{SC#2}%
-    {\SC at float[{#1}]{#2}}{\endSC at float}%
-  \newenvironment{SC#2*}%
-    {\SC at dblfloat[{#1}]{#2}}{\endSC at dblfloat}}
-\@onlypreamble\newfloat at For@SC
-%    \end{macrocode}
-%    \begin{macrocode}
-\newfloat at IfPackageLoaded{sidecap}{SC#1}{%
-  \expandafter\newfloat at For@SC\csname SC@#1 at vpos\endcsname{#1}}
-%    \end{macrocode}
-% \end{macro}
-%
-% \pagebreak[3]
-% \subsubsection{\package{wrapfig}}
-%
-% We define a wrap-variant of new floating environments here.
-%    \begin{macrocode}
-\newfloat at IfPackageLoaded{wrapfig}{wrap#1}{%
-  \newenvironment{wrap#1}{\wrapfloat{#1}}{\endwrapfloat}}
-%    \end{macrocode}
-%
-% \iffalse
-%</package>
-% \fi
-%
-% \iffalse
-% --------------------------------------------------------------------------- %
-% \fi
-%
-% \Finale
-%
-\endinput

Modified: trunk/Master/texmf-dist/source/latex/caption/subcaption.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/caption/subcaption.dtx	2019-11-24 00:53:56 UTC (rev 52904)
+++ trunk/Master/texmf-dist/source/latex/caption/subcaption.dtx	2019-11-24 21:23:07 UTC (rev 52905)
@@ -30,7 +30,7 @@
 % \iffalse
 %<*driver>
 \NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesFile{subcaption.drv}[2019/08/31 v1.3 Adds a sub-caption feature to the caption package]
+\ProvidesFile{subcaption.drv}[2019/09/10 v1.3 Adds a sub-caption feature to the caption package]
 \hbadness=9999 \newcount\hbadness \hfuzz=74pt % Make TeX shut up.
 %\errorcontextlines=3
 %
@@ -402,7 +402,7 @@
 % \end{itemize}
 %
 % \NEWfeature{v1.2}
-% Beside the \meta{inner-pos} values of `c', `t', and `b', \thispackage\ also offers the
+% Beside the \meta{outer-pos} values of `c', `t', and `b', \thispackage\ also offers the
 % values `T' and `B' additionally which align the |sub|\-|figure| at the
 % very top resp.~bottom. (In contrast `t' and `b' align the |sub|\-|figure| at the
 % top resp.~bottom \textit{baseline}.)
@@ -410,7 +410,7 @@
 % \bigskip
 %
 % \begin{background}
-% The |subfigure| \& |subtable| environments are just simple minipage
+% The |subfigure| \& |subtable| environments are just simple |minipage|
 % environments with |\set|\-|caption|\-|sub|\-|type| as first contents line.
 % These environments are defined with the help of
 % |\caption at For{subtypelist}|, which executes code for every sub-type

Modified: trunk/Master/texmf-dist/tex/latex/caption/caption.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/caption/caption.sty	2019-11-24 00:53:56 UTC (rev 52904)
+++ trunk/Master/texmf-dist/tex/latex/caption/caption.sty	2019-11-24 21:23:07 UTC (rev 52905)
@@ -25,26 +25,21 @@
 %% This Current Maintainer of this work is Axel Sommerfeldt.
 %% 
 %% This work consists of the files
-%%   CHANGELOG, README, SUMMARY, caption.ins,
-%%   caption.dtx, caption2.dtx, caption3.dtx,
-%%   bicaption.dtx, ltcaption.dtx, subcaption.dtx,
-%%   newfloat.dtx, and totalcount.dtx
+%%   caption.ins, caption.dtx, caption2.dtx, caption3.dtx,
+%%   bicaption.dtx, ltcaption.dtx, subcaption.dtx, totalcount.dtx,
 %% the derived files
 %%   caption.sty, caption2.sty, caption3.sty,
-%%   bicaption.sty, ltcaption.sty, subcaption.sty,
-%%   newfloat.sty, and totalcount.sty
+%%   bicaption.sty, ltcaption.sty, subcaption.sty, totalcount.sty,
 %% and the user manuals
-%%   caption-deu.tex, caption-eng.tex, and caption-rus.tex.
+%%   caption-deu.tex, caption-eng.tex, caption-rus.tex.
 %% 
 \NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption}[2019/09/01 v3.3d Customizing captions (AR)]
-\RequirePackage{caption3}[2019/09/01] % needs v1.8d or newer
+\ProvidesPackage{caption}[2019/10/18 v3.4a Customizing captions (AR)]
+\RequirePackage{caption3}[2019/09/09] % needs v1.8e or newer
 \caption at ifbool{documentclass}{}{%
   \caption at WarningNoLine{%
-    Unsupported document class (or package) detected,\MessageBreak
-    usage of the caption package is not recommended}%
-  \caption at InfoNoLine{\string\@makecaption\space=\space\meaning\@makecaption}%
-}
+    Unknown document class (or package),\MessageBreak
+    standard defaults will be used}}
 \@ifpackageloaded{caption2}{%
   \caption at Error{%
     You can't use both, the (obsolete) caption2 *and*\MessageBreak
@@ -132,8 +127,26 @@
     {\let\caption at if@minipage\@gobbletwo}%
     {\caption at set@bool\caption at if@minipage{#1}}}
 \captionsetup{@minipage=default}
-\DeclareCaptionOption{compatibility}[1]{\caption at setbool{compatibility}{#1}}
+\DeclareCaptionOption{compatibility}[v1]{%
+  \caption at ifinlist{#1}{v1,1,true,yes,on}{%
+    \let\caption at ifcompatibility\@firstoftwo
+  }{\caption at ifinlist{#1}{v3,3,0,false,no,off}{%
+    \let\caption at ifcompatibility\@secondoftwo
+  }{%
+    \caption at Error{Undefined compatibility value `#1'}%
+  }}}
 \@onlypreamble at key{caption}{compatibility}
+\caption at setbool{compatibility}{0} % default: Try not to be compatible to v1.x
+\newcommand*\caption at setincompatible[2]{%
+  #1{%
+    \caption at WarningNoLine{%
+      #2;\MessageBreak
+      Setting compatibility to v1}%
+    \caption at setbool{compatibility}{1}%
+  }{}}
+\caption at AtBeginDocument{\caption at ifcompatibility{}{%
+  \caption at setincompatible{\@ifpackageloaded{captcont}}{captcont package is loaded}%
+}}
 \DeclareCaptionOptionNoValue*{normal}{%
   \caption at setformat{plain}%
   \caption at setjustification{justified}}
@@ -195,11 +208,11 @@
 \DeclareCaptionOption{hypcap}[1]{\caption at setbool{hypcap}{#1}}
 \DeclareCaptionOption{hypcapspace}{\def\caption at hypcapspace{#1}}
 \captionsetup{hypcap=1,hypcapspace=.5\baselineskip}
-\caption at ifamsclass{%
+\caption at ifclassloaded{ams}{%
   \caption at InfoNoLine{AMS or SMF document class}%
   \setlength\belowcaptionskip{0pt}% set to 12pt by AMS class
-}
-\caption at ifkomaclass{%
+}{}
+\caption at ifclassloaded{koma}{%
   \caption at InfoNoLine{KOMA-Script document class}%
   \g at addto@macro\@tablecaptionabovetrue{\captionsetup*[table]{position=t}}
   \g at addto@macro\@tablecaptionabovefalse{\captionsetup*[table]{position=b}}
@@ -208,7 +221,7 @@
   \else
     \@tablecaptionabovefalse
   \fi
-  \caption at ifundefined\@figurecaptionabovetrue{}{%
+  \caption at ifdefined\@figurecaptionabovetrue{%
     \g at addto@macro\@figurecaptionabovetrue{\captionsetup*[figure]{position=t}}
     \g at addto@macro\@figurecaptionabovefalse{\captionsetup*[figure]{position=b}}
     \if at figurecaptionabove
@@ -216,7 +229,7 @@
     \else
       \@figurecaptionabovefalse
     \fi
-  }%
+  }{}%
   \g at addto@macro\onelinecaptionstrue{\let\caption at ifslc\@firstoftwo}
   \g at addto@macro\onelinecaptionsfalse{\let\caption at ifslc\@secondoftwo}
   \ifonelinecaptions
@@ -228,10 +241,12 @@
   \g at addto@macro\@captionabovefalse{\let\caption at position\@secondoftwo}
   \DeclareCaptionOption{figureposition}{%
     \caption at WarningNoLine{Option `figureposition=#1' has no effect\MessageBreak
-    when used with a KOMA script document class}}
+    when used with a KOMA script document class}%
+    \captionsetup*[figure]{position=#1}}
   \DeclareCaptionOption{tableposition}{%
     \caption at WarningNoLine{Option `tableposition=#1' has no effect\MessageBreak
-    when used with a KOMA script document class}}
+    when used with a KOMA script document class}%
+    \captionsetup*[table]{position=#1}}
   \let\caption at KOMA@setcapindent\@setcapindent
   \renewcommand*\@setcapindent[1]{%
     \caption at KOMA@setcapindent{#1}\caption at setcapindent}
@@ -240,7 +255,7 @@
     \caption at KOMA@@setcapindent{#1}\caption at setcapindent}
   \newcommand*\caption at setcapindent{%
     \captionsetup{indent=\ifdim\cap at indent<\z@\z@\else\cap at indent\fi}}
-  \caption at ifundefined\cap at indent{}{\caption at setcapindent}
+  \caption at ifdefined\cap at indent{\caption at setcapindent}{}
   \expandafter\let\expandafter\caption at KOMA@setcapwidth
                   \csname\string\setcapwidth\endcsname
   \@namedef{\string\setcapwidth}[#1]#2{%
@@ -247,11 +262,11 @@
     \caption at KOMA@setcapwidth[{#1}]{#2}\caption at setcapwidth{#1}}
   \newcommand*\caption at setcapwidth[1]{%
     \ifx\\#1\\\else
-      \caption at ifundefined\cap at margin{}{%
+      \caption at ifdefined\cap at margin{%
         \def\@tempa{captionbeside}%
         \ifx\@tempa\@currenvir\else\caption at Warning{%
           Ignoring optional argument [#1] of \string\setcapwidth\MessageBreak}%
-        \fi}%
+        \fi}{}%
     \fi
     \captionsetup{width=\cap at width}}
   \def\caption at tempa{\hsize}%
@@ -284,7 +299,7 @@
   \ifx\cap at margin\relax \else
     \caption at setcapmargin
   \fi
-}
+}{}
 \caption at SetupOptions{caption}{\caption at setkeys{#1}{#2}}
 \caption at ProcessOptions*{caption}
 \newcounter{caption at flags}
@@ -359,413 +374,26 @@
   \vskip\belowcaptionskip}
 \newcommand*\caption at redefine{}
 \g at addto@macro\caption at redefine{%
-  \caption at setbool{incompatible}{0}%
-  \caption at CheckCommand\caption{%
-    % ltfloat.dtx [2002/10/01 v1.1v LaTeX Kernel (Floats)]
-    \def\caption{%
-       \ifx\@captype\@undefined
-         \@latex at error{\noexpand\caption outside float}\@ehd
-         \expandafter\@gobble
-       \else
-         \refstepcounter\@captype
-         \expandafter\@firstofone
-       \fi
-       {\@dblarg{\@caption\@captype}}%
-    }}%
-  \caption at CheckCommand\caption{%
-    % beamerbaselocalstructure.sty,v 1.53 2007/01/28 20:48:21 tantau
-    \def\caption{
-      \ifx\@captype\@undefined
-        \@latex at error{\noexpand\caption outside figure or table}\@ehd
-        \expandafter\@gobble
-      \else
-        \refstepcounter\@captype
-        \expandafter\@firstofone
-      \fi
-      {\@dblarg{\@caption\@captype}}%
-    }}%
-  \caption at CheckCommand\caption{%
-    % beamerbaselocalstructure.sty, Joseph Wright committed 4ac715c 2013-09-04
-    \def\caption{%
-      \ifx\@captype\@undefined
-        \@latex at error{\noexpand\caption outside figure or table}\@ehd
-        \expandafter\@gobble
-      \else
-        \refstepcounter\@captype
-        \expandafter\@firstofone
-      \fi
-      {\@dblarg{\@caption\@captype}}%
-    }}%
-  \caption at CheckCommand\caption{%
-    % float.sty [2001/11/08 v1.3d Float enhancements (AL)]
-    \long\def\caption{%
-      \ifx\@captype\@undefined
-        \@latex at error{\noexpand\caption outside float}\@ehd
-        \expandafter\@gobble
-      \else
-        \refstepcounter\@captype
-        \let\@tempf\@caption
-        \expandafter\ifx\csname @float at c@\@captype\endcsname\relax\else
-          \expandafter\expandafter\let
-            \expandafter\@tempf\csname @float at c@\@captype\endcsname
-        \fi
-      \fi
-      \@dblarg{\@tempf\@captype}}}%
-  \caption at CheckCommand\caption{%
-    % hyperref.sty [2007/02/27 v6.75t Hypertext links for LaTeX]
-    % hyperref.sty [2007/04/09 v6.76a Hypertext links for LaTeX]
-    % hyperref.sty [2007/06/12 v6.76h Hypertext links for LaTeX]
-    \def\caption{%
-      \ifx\@captype\@undefined
-        \@latex at error{\noexpand\caption outside float}\@ehd
-        \expandafter\@gobble
-      \else
-        \H at refstepcounter\@captype
-        \@ifundefined{fst@\@captype}{%
-          \let\Hy at tempa\@caption
-        }{%
-          \let\Hy at tempa\Hy at float@caption
-        }%
-        \expandafter\@firstofone
-      \fi
-      {\@dblarg{\Hy at tempa\@captype}}%
-    }}%
-  \caption at CheckCommand\caption{%
-    % hyperref.sty [2007/08/05 v6.76j Hypertext links for LaTeX]
-    \def\caption{%
-      \ifx\@captype\@undefined
-        \@latex at error{\noexpand\caption outside float}\@ehd
-        \expandafter\@gobble
-      \else
-        \H at refstepcounter\@captype
-        \let\Hy at tempa\@caption
-        \@ifundefined{float at caption}{%
-        }{%
-          \expandafter\ifx\csname @float at c@\@captype\endcsname\float at caption
-            \let\Hy at tempa\Hy at float@caption
-          \fi
-        }%
-        \expandafter\@firstofone
-      \fi
-      {\@dblarg{\Hy at tempa\@captype}}%
-    }}%
-  \caption at CheckCommand\caption{%
-    % memhfixc.sty [2010/08/17 v1.15 nameref/hyperref package fixes for memoir class]
-    % \let\m at moldhypcaption\caption
-    \long\def\caption{\donemaincaptiontrue\m at moldhypcaption}}%
-  \caption at IfCheckCommand{}{%
-    \caption at InfoNoLine{%
-      Incompatible package detected (regarding \string\caption).\MessageBreak
-      \string\caption\space=\space\meaning\caption}%
-    \caption at setbool{incompatible}{1}}%
-  \caption at CheckCommand\@caption{%
-    % ltfloat.dtx [2002/10/01 v1.1v LaTeX Kernel (Floats)]
-    \long\def\@caption#1[#2]#3{%
-      \par
-      \addcontentsline{\csname ext@#1\endcsname}{#1}%
-        {\protect\numberline{\csname the#1\endcsname}{\ignorespaces #2}}%
-      \begingroup
-        \@parboxrestore
-        \if at minipage
-          \@setminipage
-        \fi
-        \normalsize
-        \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par
-      \endgroup}}%
-  \caption at CheckCommand\@caption{%
-    % beamerbaselocalstructure.sty,v 1.53 2007/01/28 20:48:21 tantau
-    \long\def\@caption#1[#2]#3{% second argument ignored
-      \par\nobreak
-      \begingroup
-        \@parboxrestore
-        \if at minipage
-          \@setminipage
-        \fi
-        \beamer at makecaption{#1}{\ignorespaces #3}\par\nobreak
-        \endgroup}}%
-  \caption at CheckCommand\@caption{%
-    % memhfixc.sty [2010/08/17 v1.15 nameref/hyperref package fixes for memoir class]
-    \long\def\@caption#1[#2]#3{%
-      \MNR at old@caption{#1}[{#2}]{#3}%
-      \def\@currentlabelname{#2}%
-      \M at gettitle{#2}%
-    }}%
-  \caption at CheckCommand\@caption{%
-    % arabicore.sty [2006/01/01 v1.0 Arabi Core switching commands (may still change)]
-    \long\def\@caption#1[#2]#3{%
-      \par
-      \addtocontents{\csname ext@#1\endcsname}{\xstring\select at language{\main at Arabi@language}}%
-      \addcontentsline{\csname ext@#1\endcsname}{#1}%
-        {\protect\numberline{\csname the#1\endcsname}{\ignorespaces \if at rl{\textRL{#2}}\else\textLR{#2}\fi}}%
-      \begingroup
-        \@parboxrestore
-        \if at minipage
-          \@setminipage
-        \fi
-        \normalsize
-        \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces \if at rl{\textRL{#3}}\else\textLR{#3}\fi}\par
-      \endgroup}}%
-  \caption at CheckCommand\@caption{%
-    % rlbabel.def [2005/03/30 v2.3h Right-to-Left support from the babel system Hebrew language support from the babel system]
-    \long\def\@caption#1[#2]#3{%
-      \par
-      \addcontentsline{\csname ext@#1\endcsname}{#1}%
-        {\protect\numberline{\csname the#1\endcsname}%
-        {\ignorespaces #2}}%
-      \def\@fignm{figure}
-      \ifx#1\@fignm\addcontentsline{fol}{#1}%
-         {\protect\numberline{\csname the#1\endcsname}%
-         {\ignorespaces #2}}\fi%
-      \def\@tblnm{table}
-      \ifx#1\@tblnm\addcontentsline{tol}{#1}%
-         {\protect\numberline{\csname the#1\endcsname}%
-         {\ignorespaces #2}}\fi%
-      \begingroup
-        \@parboxrestore
-        \if at minipage
-          \@setminipage
-        \fi
-        \normalsize
-        \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par
-      \endgroup}}%
-  \caption at CheckCommand\@caption{%
-    % magyar.ldf [2005/03/30 v1.4j Magyar support from the babel system]
-    \long\def\@caption#1[#2]#3{%
-      \csname par\endcsname
-      \addcontentsline{\csname ext@#1\endcsname}{#1}%
-        {\protect\numberline{\csname the#1\endcsname.}{\ignorespaces #2}}%
-      \begingroup
-        \@parboxrestore
-        \if at minipage
-          \@setminipage
-        \fi
-        \normalsize
-        \@makecaption{\csname fnum@#1\endcsname}%
-            {\ignorespaces #3}\csname par\endcsname
-      \endgroup}}%
-  \caption at CheckCommand\@caption{%
-    % hyperref.sty [2007/02/27 v6.75t Hypertext links for LaTeX]
-    \long\def\@caption#1[#2]#3{%
-      \hyper at makecurrent{\@captype}%
-      \def\@currentlabelname{#2}%
-      \par\addcontentsline{\csname ext@#1\endcsname}{#1}{%
-        \protect\numberline{\csname the#1\endcsname}{\ignorespaces #2}%
-      }%
-      \begingroup
-        \@parboxrestore
-        \if at minipage
-          \@setminipage
-        \fi
-        \normalsize
-        \@makecaption{\csname fnum@#1\endcsname}{%
-          \ignorespaces
-          \ifHy at nesting
-            \hyper@@anchor{\@currentHref}{#3}%
-          \else
-            \Hy at raisedlink{\hyper@@anchor{\@currentHref}{\relax}}#3%
-          \fi
-        }%
-        \par
-      \endgroup
-    }}%
-  \caption at CheckCommand\@caption{%
-    % hyperref.sty [2007/04/09 v6.76a Hypertext links for LaTeX]
-    % hyperref.sty [2007/06/12 v6.76h Hypertext links for LaTeX]
-    % hyperref.sty [2007/08/05 v6.76j Hypertext links for LaTeX]
-    \long\def\@caption#1[#2]#3{%
-      \expandafter\ifx\csname if at capstart\expandafter\endcsname
-                      \csname iftrue\endcsname
-        \global\let\@currentHref\hc at currentHref
-      \else
-        \hyper at makecurrent{\@captype}%
-      \fi
-      \def\@currentlabelname{#2}%
-      \par\addcontentsline{\csname ext@#1\endcsname}{#1}{%
-        \protect\numberline{\csname the#1\endcsname}{\ignorespaces #2}%
-      }%
-      \begingroup
-        \@parboxrestore
-        \if at minipage
-          \@setminipage
-        \fi
-        \normalsize
-        \expandafter\ifx\csname if at capstart\expandafter\endcsname
-                        \csname iftrue\endcsname
-          \global\@capstartfalse
-          \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces#3}%
-        \else
-          \@makecaption{\csname fnum@#1\endcsname}{%
-            \ignorespaces
-            \ifHy at nesting
-              \hyper@@anchor{\@currentHref}{#3}%
-            \else
-              \Hy at raisedlink{\hyper@@anchor{\@currentHref}{\relax}}#3%
-            \fi
-          }%
-        \fi
-        \par
-      \endgroup
-    }}%
-  \caption at CheckCommand\@caption{%
-    % hyperref.sty [2009/11/27 v6.79k Hypertext links for LaTeX]
-    \long\def\@caption#1[#2]#3{%
-      \expandafter\ifx\csname if at capstart\expandafter\endcsname
-                      \csname iftrue\endcsname
-        \global\let\@currentHref\hc at currentHref
-      \else
-        \hyper at makecurrent{\@captype}%
-      \fi
-      \def\@currentlabelname{#2}%
-      \par\addcontentsline{\csname ext@#1\endcsname}{#1}{%
-        \protect\numberline{\csname the#1\endcsname}{\ignorespaces #2}%
-      }%
-      \begingroup
-        \@parboxrestore
-        \if at minipage
-          \@setminipage
-        \fi
-        \normalsize
-        \expandafter\ifx\csname if at capstart\expandafter\endcsname
-                        \csname iftrue\endcsname
-          \global\@capstartfalse
-          \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces#3}%
-        \else
-          \@makecaption{\csname fnum@#1\endcsname}{%
-            \ignorespaces
-            \ifHy at nesting
-              \expandafter\hyper@@anchor\expandafter{\@currentHref}{#3}%
-            \else
-              \Hy at raisedlink{%
-                \expandafter\hyper@@anchor\expandafter{\@currentHref}{\relax}%
-              }%
-              #3%
-            \fi
-          }%
-        \fi
-        \par
-      \endgroup
-    }}%
-  \caption at CheckCommand\@caption{%
-    % hyperref.sty [2009/12/09 v6.79m Hypertext links for LaTeX]
-    % hyperref.sty [2009/12/28 v6.79z Hypertext links for LaTeX]
-    \long\def\@caption#1[#2]#3{%
-      \expandafter\ifx\csname if at capstart\expandafter\endcsname
-                      \csname iftrue\endcsname
-        \global\let\@currentHref\hc at currentHref
-      \else
-        \hyper at makecurrent{\@captype}%
-      \fi
-      \@ifundefined{NR at gettitle}{%
-        \def\@currentlabelname{#2}%
-      }{%
-        \NR at gettitle{#2}%
-      }%
-      \par\addcontentsline{\csname ext@#1\endcsname}{#1}{%
-        \protect\numberline{\csname the#1\endcsname}{\ignorespaces #2}%
-      }%
-      \begingroup
-        \@parboxrestore
-        \if at minipage
-          \@setminipage
-        \fi
-        \normalsize
-        \expandafter\ifx\csname if at capstart\expandafter\endcsname
-                        \csname iftrue\endcsname
-          \global\@capstartfalse
-          \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces#3}%
-        \else
-          \@makecaption{\csname fnum@#1\endcsname}{%
-            \ignorespaces
-            \ifHy at nesting
-              \expandafter\hyper@@anchor\expandafter{\@currentHref}{#3}%
-            \else
-              \Hy at raisedlink{%
-                \expandafter\hyper@@anchor\expandafter{%
-                  \@currentHref
-                }{\relax}%
-              }%
-              #3%
-            \fi
-          }%
-        \fi
-        \par
-      \endgroup
-    }}%
-  \caption at CheckCommand\@caption{%
-    % nameref.sty [2006/12/27 v2.28 Cross-referencing by name of section]
-    \long\def\@caption#1[#2]{%
-      \def\@currentlabelname{#2}%
-      \NR@@caption{#1}[{#2}]%
-    }}%
-  \caption at CheckCommand\@caption{%
-    % nameref.sty [2009/11/27 v2.32 Cross-referencing by name of section]
-    \long\def\@caption#1[#2]{%
-      \NR at gettitle{#2}%
-      \NR@@caption{#1}[{#2}]%
-    }}%
-  \caption at CheckCommand\@caption{%
-    % subfigure.sty [2002/07/30 v2.1.4 subfigure package]
-    \long\def\@caption#1[#2]#3{%
-      \@ifundefined{if#1topcap}%
-        {\subfig at oldcaption{#1}[{#2}]{#3}}%
-        {\@nameuse{if#1topcap}%
-           \@listsubcaptions{#1}%
-           \subfig at oldcaption{#1}[{#2}]{#3}%
-         \else
-           \subfig at oldcaption{#1}[{#2}]{#3}%
-           \@listsubcaptions{#1}%
-         \fi}}}%
-  \caption at CheckCommand\@caption{%
-    % subfig.sty [2005/06/28 ver: 1.3 subfig package]
-    \def\@caption{\caption@}%
-    }%
-  \caption at CheckCommand\@caption{%
-    % chkfloat.sty [2012/08/19 v0.1 chkfloat: check for moved floats]
-    \def\@caption#1[#2]#3{\chkfloat at caption{#1}[#2]{#3}%
-      \addtocontents{fof}{\protect\chkfloat@{\thepage}{\chkfloat at page}{\csname fnum@#1\endcsname: #2}}%
-    }}%
-  \caption at CheckCommand\@caption{%
-    % chkfloat.sty [20??/??/?? v0.? chkfloat: check for moved floats]
-    \def\@caption#1[#2]#3{\chkfloat at caption{#1}[{#2}]{#3}%
-      \chkfloat at addcontentsline{#1}{#2}%
-    }}%
-  \caption at IfCheckCommand{}{%
-    \caption at InfoNoLine{%
-      Incompatible package detected (regarding \string\@caption).\MessageBreak
-      \string\@caption\space=\space\meaning\@caption}%
-    \caption at setbool{incompatible}{1}}%
-  \caption at ifundefined\caption at ifcompatibility
-    {\let\caption at ifcompatibility\caption at ifincompatible
-     \let\caption at tempa\caption at WarningNoLine}%
-    {\let\caption at tempa\@gobble}% suppress warning
   \caption at ifcompatibility{%
-    \caption at tempa{%
-      \noexpand\caption will not be redefined since it's already\MessageBreak
-      redefined by a document class or package which is\MessageBreak
-      unknown to the caption package}%
+    \caption at InfoNoLine{
+      \noexpand\caption will not be redefined since `compatibility' is set to v1}%
     \renewcommand*\caption at redefine{}%
-    \renewcommand*\caption at ContinuedFloatX[1]{%
+    \renewcommand*\caption at continuedfloat[1]{%
       \caption at Error{Not available in compatibility mode}}%
     \caption at AtBeginDocument*{%
       \let\caption at start\relax
-      \caption at ifundefined\caption at ORI@capstart{}{%
+      \caption at ifdefined\caption at ORI@capstart{%
         \caption at Debug{%
           Restore hypcap definition of \string\capstart\@gobble}%
-        \let\capstart\caption at ORI@capstart}%
+        \let\capstart\caption at ORI@capstart}{}%
     }%
     \renewcommand*\caption at star[2]{#1#2}%
   }{%
-    \caption at ifincompatible{%
-      \caption at WarningNoLine{%
-        Forced redefinition of \noexpand\caption since the\MessageBreak
-        unsupported(!) package option `compatibility=false'\MessageBreak
-        was given}%
-    }{}%
     \renewcommand*\caption at redefine{%
       \let\caption\caption at caption
       \let\@caption\caption@@caption}%
-    \caption at redefine
   }%
+  \caption at redefine
   \caption at AtBeginDocument*{%
     \let\caption at ORI@capstart\@undefined}%
   \let\caption at ORI@xfloat\@xfloat
@@ -830,8 +458,7 @@
     \fi
     \caption at start}}
 \newcommand*\caption at typehook{}
-\newcommand*\caption at iftype{%
-  \caption at ifundefined\@captype\@secondoftwo\@firstoftwo}
+\newcommand*\caption at iftype{\caption at ifdefined\@captype}
 \caption at ifeTeX{%
   \newcommand*\caption at checkgrouplevel[2]{%
     \@ifundefined{#1caption at grouplevel}{%
@@ -920,48 +547,52 @@
 \providecommand*\caption at hj@l{\raggedright}
 \providecommand*\caption at hj@r{\raggedleft}
 \providecommand*\caption at hj@s{}
-\def\ContinuedFloat{%
+\def\continuedfloat{%
   \caption at iftype
-    {\caption at ContinuedFloatX\@captype}%
-    {\caption at Error{\noexpand\ContinuedFloat outside float}}}
-\newcommand*\caption at ContinuedFloatX[1]{%
+    {\caption at continuedfloat\@captype}%
+    {\caption at Error{\noexpand\continuedfloat outside float}}}
+\newcommand*\caption at continuedfloat[1]{%
   \@ifstar
     {\caption@@refstepcounter\@captype
-     \caption@@ContinuedFloat{#1}}%
-    {\caption at Continued@Float{#1}}}
-\newcommand*\caption at Continued@Float[1]{%
+     \caption@@continuedfloat{#1}}%
+    {\caption at continued@float{#1}}}
+\newcommand*\caption at continued@float[1]{%
   \edef\caption at tempa{#1}%
   \ifx\caption at tempa\caption at CFtype
     \caption at restorecounters
-    \caption@@ContinuedFloat{#1}%
+    \caption@@continuedfloat{#1}%
   \else
     \caption at Error{Continued `#1' after `\caption at CFtype'}%
   \fi}
-\newcommand*\caption@@ContinuedFloat{%
-  \caption at setflag1% ContinuedFloat
-  \caption@@@ContinuedFloat}
-\newcommand*\caption@@@ContinuedFloat{%
-  \stepcounter{ContinuedFloat}%
-  \caption@@@@ContinuedFloat}
-\newcommand*\caption@@@@ContinuedFloat[1]{%
-  \caption at setoptions{ContinuedFloat}%
+\newcommand*\caption@@continuedfloat{%
+  \caption at setflag1% continued float
+  \caption@@@continuedfloat}
+\newcommand*\caption@@@continuedfloat{%
+  \stepcounter{continuedfloat}%
+  \caption@@@@continuedfloat}
+\newcommand*\caption@@@@continuedfloat[1]{%
+  \caption at setoptions{ContinuedFloat}% for compatibility reasons
+  \caption at setoptions{continuedfloat}%
   \caption at setoptions{continued#1}%
-  \expandafter\l at addto@macro\csname the#1\endcsname\theContinuedFloat
+  \expandafter\l at addto@macro\csname the#1\endcsname\thecontinuedfloat
   \@ifundefined{theH#1}{}{%
     \expandafter\l at addto@macro\csname theH#1\endcsname{%
-      \@alph\c at ContinuedFloat}}%
-  \let\caption@@@@ContinuedFloat\@gobble}
+      \@alph\c at continuedfloat}}%
+  \let\caption@@@@continuedfloat\@gobble}
 \newcommand*\caption at CFtype{??}
-\newcounter{ContinuedFloat}
-\let\theContinuedFloat\@empty
+\newcounter{continuedfloat}
+\let\c at ContinuedFloat\c at continuedfloat     % defined for compatibility reasons
+\def\thecontinuedfloat{\theContinuedFloat}
+\let\theContinuedFloat\@empty              % defined for compatibility reasons
+\newcommand*\caption at reset@continuedfloat[1]{%
+  \xdef\caption at CFtype{#1}%
+  \@stpelt{continuedfloat}}
+\def\ContinuedFloat{\continuedfloat} % defined for compatibility reasons
 \def\caption at ContinuedFloat{%
-  \let\caption at resetContinuedFloat\@gobble
-  \caption@@@ContinuedFloat}
-\newcommand*\caption at resetContinuedFloat[1]{%
-  \xdef\caption at CFtype{#1}%
-  \@stpelt{ContinuedFloat}}
-\caption at ifundefined\donemaincaptionfalse{}{%
-  \g at addto@macro\donemaincaptionfalse\caption at savesubcounters}
+  \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}}%
@@ -971,9 +602,9 @@
      \caption at clrflag4% subcaption
      \@nameuse{donemaincaptiontrue}}}
 \newcommand*\caption at ref@stepcounter{%
-  \caption at ifflag1{% ContinuedFloat
+  \caption at ifflag1{% continued float
     \let\caption at tempa\caption@@refcounter
-    \caption at clrflag1% ContinuedFloat
+    \caption at clrflag1% continued float
   }{%
     \let\caption at tempa\caption@@refstepcounter
     \caption at ifflag2{}{% caption
@@ -1001,7 +632,7 @@
   \caption@@@stepcounter{#1}}
 \newcommand*\caption at prepare@stepcounter[2]{%
   \caption at addsubcontentslines{#2stepcounter}%
-  \caption at resetContinuedFloat{#1}}
+  \caption at reset@continuedfloat{#1}}
 \newcommand*\caption@@@refstepcounter{\refstepcounter}
 \newcommand*\caption@@@stepcounter{\stepcounter}
 \@ifundefined{kernel at ifnextchar}{\let\kernel at ifnextchar\@ifnextchar}{}
@@ -1053,9 +684,9 @@
 \let\caption at freezeHref\relax
 \let\caption at defrostHref\relax
 \newcommand\caption at gettitle[1]{%
-  \caption at ifundefined\NR at gettitle
-    {\def\@currentlabelname{#1}}%
-    {\NR at gettitle{#1}}}
+  \caption at ifdefined\NR at gettitle
+    {\NR at gettitle{#1}}%
+    {\def\@currentlabelname{#1}}}
 \def\caption at DeclareSubType sub#1\@nil{%
   \caption at Debug{Initializing subtype for `#1'\@gobble}%
   \@namedef{caption at beginsub#1}{\caption at beginsubfloat{#1}}}
@@ -1062,9 +693,9 @@
 \@onlypreamble\caption at DeclareSubType
 \caption at For*{subtypelist}{\caption at DeclareSubType sub#1\@nil}
 \caption at AtBeginDocument*{%
-  \caption at ifundefined\sf at counterlist{}{%
+  \caption at ifdefined\sf at counterlist{%
     \@for\sf at temp:=\sf at counterlist\do{%
-      \expandafter\caption at DeclareSubType\sf at temp\@nil}}}
+      \expandafter\caption at DeclareSubType\sf at temp\@nil}}{}}
 \newcommand*\caption at subtypehook{%
   \ifx\caption\caption at subcaption \else
     \caption at warmup
@@ -1072,7 +703,7 @@
       \let\caption at add@contentsline\caption at addsubcontentsline
       \let\caption at addsubcontentslines\@gobble
       \caption at ifflag4{}{% subcaption
-        \caption at ifflag1{% ContinuedFloat
+        \caption at ifflag1{% continued float
           \caption at clrflag1%
         }{%
           \caption@@stepcounter\@captype
@@ -1080,7 +711,7 @@
         \caption at setflag4% subcaption
       }%
     }%
-    \c at ContinuedFloat=0\relax
+    \c at continuedfloat=0\relax
     \let\caption at setfloatcapt\@firstofone
     \let\caption at chkfloat\@gobbletwo
     \caption at setbox{none}%
@@ -1090,7 +721,7 @@
     \caption at setoptions{subfloat}% for subfig-package compatibility
     \def\caption at settype{\caption at withoptargs\caption at sub@settype}%
     \def\caption at sub@settype##1##2{%
-      \def\caption at tempa{##2}%
+      \edef\caption at tempa{##2}%
       \ifx\caption at tempa\@captype
 %%%     \caption at setsubtype##1\relax
       \else
@@ -1152,36 +783,37 @@
     \caption at subcontentslines
   \endgroup
   \caption at clearsubcontentslines}
-\AtBeginDocument{\caption at ifundefined\chapter{}{%
-  \let\caption at chapter@ORI\chapter
-  \def\chapter{%
-    \caption at addsubcontentslines{chapter}\caption at chapter@ORI}}}
-\AtBeginDocument{\caption at ifundefined\appendix{}{%
-  \let\caption at appendix@ORI\appendix
-  \def\appendix{%
-    \caption at addsubcontentslines{appendix}\caption at appendix@ORI}}}
-\AtEndDocument{%
-  \caption at addsubcontentslines{AtEndDocument}}
-\caption at ifundefined\smf at makecaption{}{\let\smf at makecaption\@makecaption}
+\AtBeginDocument{%
+  \caption at ifdefined\chapter{%
+    \let\caption at chapter@ORI\chapter
+    \def\chapter{%
+      \caption at addsubcontentslines{chapter}\caption at chapter@ORI}}{}%
+  \caption at ifdefined\appendix{%
+    \let\caption at appendix@ORI\appendix
+    \def\appendix{%
+      \caption at addsubcontentslines{appendix}\caption at appendix@ORI}}{}%
+  \caption at addsubcontentslines{AtEndDocument}%
+}
+\caption at ifdefined\smf at makecaption{\let\smf at makecaption\@makecaption}{}
 \@ifclassloaded{beamer}{%
   \caption at InfoNoLine{beamer document class}%
   \let\caption at ORI@figure\figure
   \def\figure{\caption at settype{figure}\caption at ORI@figure}
-  \let\caption at ORI@table\figure
+  \let\caption at ORI@table\table
   \def\table{\caption at settype{table}\caption at ORI@table}
 }{}
-\caption at ifundefined\scr at caption{}{%
-  \caption at AtBeginDocument{\let\scr at caption\caption}}
+\caption at ifdefined\scr at caption{%
+  \caption at AtBeginDocument{\let\scr at caption\caption}}{}
 \@nameuse{caption at frenchb}\@nameundef{caption at frenchb}
-\caption at AtBeginDocument{\caption at ifundefined\frenchTeXmods{}{%
+\caption at AtBeginDocument{\caption at ifdefined\frenchTeXmods{%
   \caption at InfoNoLine{frenchle/pro package is loaded}%
   \let\captionfont at ORI\captionfont
   \let\captionlabelfont at ORI\captionlabelfont
   \let\@makecaption at ORI\@makecaption
 
-  \caption at ifundefined\GOfrench
+  \caption at ifdefined\GOfrench
+    {\def\caption at tempa{\g at addto@macro\GOfrench}}%
     {\let\caption at tempa\@firstofone}%
-    {\def\caption at tempa{\g at addto@macro\GOfrench}}%
   \caption at tempa{%
     \let\captionfont\captionfont at ORI
     \let\captionfont at ORI\@undefined
@@ -1204,7 +836,7 @@
     \def\f at tfrench{\ifx\listoftables\relax\else\tablename~\thetable\fi}%
     \caption at tempa
   }%
-}}
+}{}}
 \def\caption at tempa#1{%
   \@ifpackagewith{babel}{#1}{%
     \caption at InfoNoLine{#1 babel option is loaded}%
@@ -1250,10 +882,10 @@
       \captionsetup*[sub]{hypcap=true}% Note: This is just a (q&d) workaround!
       \caption at freeze}%
     \newcommand*\caption at freeze{%
-      \let\caption at frozen@ContinuedFloat\ContinuedFloat
-      \def\ContinuedFloat{%
-        \caption@@freeze{\caption@@@@ContinuedFloat\@captype}%
-        \caption at frozen@ContinuedFloat}%
+      \let\caption at frozen@continuedfloat\continuedfloat
+      \def\continuedfloat{%
+        \caption@@freeze{\caption@@@@continuedfloat\@captype}%
+        \caption at frozen@continuedfloat}%
       \let\caption at frozen@setup\caption at setup
       \def\caption at setup##1{%
         \caption@@freeze{\caption at setup{##1}}%
@@ -1289,7 +921,7 @@
       \long\def\caption@@freeze{%
         \g at addto@macro\caption at frozen@content}%
       \def\caption at warmup{%
-        \let\ContinuedFloat\caption at frozen@ContinuedFloat
+        \let\continuedfloat\caption at frozen@continuedfloat
         \let\caption at setup\caption at frozen@setup
         \let\caption\caption at frozen@caption
         \let\label\caption at frozen@label}}%
@@ -1306,12 +938,13 @@
   \caption at undefbool{needfreeze}}
 \let\caption at warmup\relax
 \caption at IfPackageLoaded{chkfloat}[2012/08/19 v0.1]{%
-  \caption at ifundefined\chkfloat at addcontentsline{%
+  \caption at ifdefined\chkfloat at addcontentsline{%
+    \renewcommand\caption at chkfloat{\chkfloat at addcontentsline}%
+  }{%
     \renewcommand\caption at chkfloat[2]{%
-      \caption at ifundefined\chkfloat at page{}{%
-        \addtocontents{fof}{\protect\chkfloat@{\thepage}{\chkfloat at page}{\csname fnum@#1\endcsname: #2}}}}%
-  }{%
-    \renewcommand\caption at chkfloat{\chkfloat at addcontentsline}%
+      \caption at ifdefined\chkfloat at page{%
+        \addtocontents{fof}{\protect\chkfloat@{\thepage}{\chkfloat at page}{\csname fnum@#1\endcsname: #2}}%
+      }{}}%
   }%
   }{}%
 \caption at IfPackageLoaded{float}[2001/11/08 v1.3d]{%
@@ -1333,9 +966,9 @@
     \caption at freezeHref % will be defrosted in \float at makebox
     \caption at ORI@float at setevery{#1}}%
   \caption at AtBeginDocument{\caption at ifcompatibility{}{%
-    \caption at ifundefined\HyOrg at float@makebox
+    \caption at ifdefined\HyOrg at float@makebox
+      {\let\caption at ORI@float at makebox\HyOrg at float@makebox}%
       {\let\caption at ORI@float at makebox\float at makebox}%
-      {\let\caption at ORI@float at makebox\HyOrg at float@makebox}%
     \renewcommand\float at makebox[1]{%
       \caption at ORI@float at makebox{#1\relax \caption at defrostHref}}%
   }}%
@@ -1590,8 +1223,8 @@
                 {\egroup\LT at listentry\LTcaptype}}%
 %%        \let\Hy at LT@currentHlabel\@currentHlabel
 %%          \let\@currentHlabel\Hy at LT@currentHlabel
-      \def\ContinuedFloat{\noalign{%
-        \caption at Error{\noexpand\ContinuedFloat outside float}}}%
+      \def\continuedfloat{\noalign{%
+        \caption at Error{\noexpand\continuedfloat outside float}}}%
       \let\bicaption\LT at bicaption
       \caption at ORI@LT at array}}%
   \def\LT at capti@n{%
@@ -1608,8 +1241,8 @@
       \caption at begin\LTcaptype
         \caption at normalsize
         \vskip-\ht\strutbox
-        \caption at ifundefined\FBifcaptop{}{%
-          \let\caption at belowskip\@empty}%
+        \caption at ifdefined\FBifcaptop{%
+          \let\caption at belowskip\@empty}{}%
         \caption at make@above
         \caption@@make{#2}{#3}\endgraf
         \caption at make@below

Modified: trunk/Master/texmf-dist/tex/latex/caption/caption3.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/caption/caption3.sty	2019-11-24 00:53:56 UTC (rev 52904)
+++ trunk/Master/texmf-dist/tex/latex/caption/caption3.sty	2019-11-24 21:23:07 UTC (rev 52905)
@@ -37,7 +37,7 @@
 %%   caption-deu.tex, caption-eng.tex, and caption-rus.tex.
 %% 
 \NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption3}[2019/09/01 v1.8d caption3 kernel (AR)]
+\ProvidesPackage{caption3}[2019/09/09 v1.8e caption3 kernel (AR)]
 \providecommand\caption at FixArabTeX{%
   \def\caption at tempa##1{}%
   \ifx\caption at tempa\@gobble
@@ -84,6 +84,14 @@
   \else
     \expandafter\expandafter\expandafter\@secondoftwo
   \fi\fi}
+\newcommand*\caption at ifdefined[1]{%
+  \ifx#1\@undefined
+    \expandafter\@secondoftwo
+  \else\ifx#1\relax
+    \expandafter\expandafter\expandafter\@secondoftwo
+  \else
+    \expandafter\expandafter\expandafter\@firstoftwo
+  \fi\fi}
 \newcommand*\caption at ifinlist{%
   \@expandtwoargs\caption@@ifinlist}
 \newcommand*\caption@@ifinlist[2]{%
@@ -165,27 +173,6 @@
   \expandafter\caption at tempb\expandafter{\caption at tempa}}
 \DeclareRobustCommand*\caption at gobble{%
   \caption at withoptargs\@gobbletwo}
-\newcommand\caption at DoCheckCommand[2]{%
-  \begingroup
-    \let\caption at tempa#1%
-    #2%
-    \ifx\caption at tempa#1%
-      \endgroup
-      \let\caption at CheckCommand\@gobbletwo
-    \else
-      \endgroup
-    \fi}
-\@onlypreamble\caption at DoCheckCommand
-\let\caption at CheckCommand\caption at DoCheckCommand
-\@onlypreamble\caption at CheckCommand
-\newcommand*\caption at IfCheckCommand{%
-  \ifx\caption at CheckCommand\@gobbletwo
-    \let\caption at CheckCommand\caption at DoCheckCommand
-    \expandafter\@firstoftwo
-  \else
-    \expandafter\@secondoftwo
-  \fi}
-\@onlypreamble\caption at IfCheckCommand
 \let\caption at begindocumenthook\@empty
 \let\caption@@begindocumenthook\@empty
 \def\caption at AtBeginDocument{%
@@ -523,25 +510,6 @@
        \setlength\caption at hangindent{#1}}
 \DeclareCaptionOption{parskip}{%
        \l at addto@macro\caption@@par{\setlength\parskip{#1}}}
-\providecommand*\caption at ifkomaclass{%
-  \caption at ifundefined\scr at caption\@gobble\@firstofone}
-\@onlypreamble\caption at ifkomaclass
-\caption at ifkomaclass{%
-  \let\caption at KV@parindent\KV at caption@parindent
-  \DeclareCaptionOption{parindent}[]{%
-    \ifx,#1,%
-      \caption at Debug{Option `parindent' ignored}%
-    \else
-      \caption at KV@parindent{#1}%
-    \fi}%
-  \let\caption at KV@parskip\KV at caption@parskip
-  \DeclareCaptionOption{parskip}[]{%
-    \ifx,#1,%
-      \caption at Debug{Option `parskip' ignored}%
-    \else
-      \caption at KV@parskip{#1}%
-    \fi}%
-}
 \newcommand*\DeclareCaptionStyle[1]{%
   \@testopt{\caption at declarestyle{#1}}{}}
 \@onlypreamble\DeclareCaptionStyle
@@ -858,8 +826,8 @@
 \DeclareCaptionFont{larger}{\caption at larger}
 \DeclareCaptionFont{sansmath}{\sansmath}
 \DeclareCaptionFont{singlespacing}{%
-  \caption at ifundefined\setspace at singlespace{}{%
-    \setstretch\setspace at singlespace}}% normally 1
+  \caption at ifdefined\setspace at singlespace{%
+    \setstretch\setspace at singlespace}{}}% normally 1
 \DeclareCaptionFont{onehalfspacing}{\onehalfspacing}
 \DeclareCaptionFont{doublespacing}{\doublespacing}
 \DeclareCaptionFont{stretch}{\setstretch{#1}}
@@ -1048,26 +1016,37 @@
     {\let\caption at Debug\@gobble}}
 \DeclareOption{debug}{\setkeys{caption}{debug}}
 \setkeys{caption}{debug=0}
-\caption at CheckCommand\@makecaption{%
-  % article|report|book [2005/09/16 v1.4f Standard LaTeX document class]
-  \long\def\@makecaption#1#2{%
-    \vskip\abovecaptionskip
-    \sbox\@tempboxa{#1: #2}%
-    \ifdim \wd\@tempboxa >\hsize
-      #1: #2\par
-    \else
-      \global \@minipagefalse
-      \hb at xt@\hsize{\hfil\box\@tempboxa\hfil}%
-    \fi
-    \vskip\belowcaptionskip}}
-\providecommand*\caption at ifelsarticleclass{%
-  \@ifclassloaded{elsarticle}\@firstofone\@gobble}
-\@onlypreamble\caption at ifelsarticleclass
-\caption at ifelsarticleclass{%
-  \caption at CheckCommand\@makecaption{%
-    % elsarticle.cls,v 1.20 2008-10-13 04:24:12 cvr Exp
-    \long\def\@makecaption#1#2{%
-      \vskip\abovecaptionskip\footnotesize
+\caption at setbool{documentclass}{1}
+\caption at ifundefined\caption at documentclass{%
+  \@ifclassloaded{beamer}{%
+    \caption at InfoNoLine{beamer document class detected}%
+    \def\caption at documentclass{beamer}%
+  }{\@ifclassloaded{elsarticle}{%
+    \caption at InfoNoLine{elsarticle document class detected}%
+    \def\caption at documentclass{elsarticle}%
+  }{\@ifclassloaded{memoir}{%
+    \caption at InfoNoLine{memoir document class detected}%
+    \def\caption at documentclass{memoir}%
+  }{\caption at ifdefined\scr at caption{%
+    \caption at InfoNoLine{KOMA-Script document class detected}%
+    \def\caption at documentclass{koma}%
+  }{\caption at ifdefined\@captionheadfont{%
+    \caption at InfoNoLine{AMS or SMF document class detected}%
+    \def\caption at documentclass{ams}%
+  }{\caption at ifdefined\CaptionFonts{%
+    \caption at InfoNoLine{NTG document class detected}%
+    \def\caption at documentclass{ntg}%
+  }{\caption at ifdefined\cph at font{%
+      \caption at ifdefined\cpb at font\@firstoftwo\@secondoftwo
+    }{%
+      \@secondoftwo
+    }{%
+    \caption at InfoNoLine{thesis document class detected}%
+    \def\caption at documentclass{thesis}%
+  }{%
+    % article|report|book [2005/09/16 v1.4f Standard LaTeX document class]
+    \long\def\caption at tempa#1#2{%
+      \vskip\abovecaptionskip
       \sbox\@tempboxa{#1: #2}%
       \ifdim \wd\@tempboxa >\hsize
         #1: #2\par
@@ -1076,77 +1055,34 @@
         \hb at xt@\hsize{\hfil\box\@tempboxa\hfil}%
       \fi
       \vskip\belowcaptionskip}}
+    \ifx\caption at tempa\@makecaption
+      \caption at InfoNoLine{Standard document class detected}%
+    \else
+      \caption at InfoNoLine{%
+        Unknown document class (or package),\MessageBreak
+        standard defaults will be used}%
+      \caption at InfoNoLine{\string\@makecaption\space=\space\meaning\@makecaption\@gobble}%
+      \caption at setbool{documentclass}{0}%
+    \fi
+    \def\caption at documentclass{base}%
+  }}}}}}%
+}{}
+\newcommand*\caption at ifclassloaded[1]{%
+  \edef\caption at tempa{#1}%
+  \ifx\caption at tempa\caption at documentclass
+    \expandafter\@firstoftwo
+  \else
+    \expandafter\@secondoftwo
+  \fi}
+\caption at ifclassloaded{elsarticle}{%
   \DeclareCaptionDefaultFont{font}{\footnotesize}
-}
-\providecommand*\caption at ifamsclass{%
-  \caption at ifundefined\@captionheadfont\@gobble\@firstofone}
-\@onlypreamble\caption at ifamsclass
-\caption at ifamsclass{%
-  \caption at CheckCommand\@makecaption{%
-    % amsart|amsproc|amsbook [2004/08/06 v2.20]
-    \long\def\@makecaption#1#2{%
-      \setbox\@tempboxa\vbox{\color at setgroup
-        \advance\hsize-2\captionindent\noindent
-        \@captionfont\@captionheadfont#1\@xp\@ifnotempty\@xp
-            {\@cdr#2\@nil}{.\@captionfont\upshape\enspace#2}%
-        \unskip\kern-2\captionindent\par
-        \global\setbox\@ne\lastbox\color at endgroup}%
-      \ifhbox\@ne % the normal case
-        \setbox\@ne\hbox{\unhbox\@ne\unskip\unskip\unpenalty\unkern}%
-      \fi
-      \ifdim\wd\@tempboxa=\z@ % this means caption will fit on one line
-        \setbox\@ne\hbox to\columnwidth{\hss\kern-2\captionindent\box\@ne\hss}%
-      \else % tempboxa contained more than one line
-        \setbox\@ne\vbox{\unvbox\@tempboxa\parskip\z at skip
-            \noindent\unhbox\@ne\advance\hsize-2\captionindent\par}%
-      \fi
-      \ifnum\@tempcnta<64 % if the float IS a figure...
-        \addvspace\abovecaptionskip
-        \hbox to\hsize{\kern\captionindent\box\@ne\hss}%
-      \else % if the float IS NOT a figure...
-        \hbox to\hsize{\kern\captionindent\box\@ne\hss}%
-        \nobreak
-        \vskip\belowcaptionskip
-      \fi
-    \relax
-    }}
-  \caption at CheckCommand\@makecaption{%
-    % smfart|smfbook [1999/11/15 v1.2f Classe LaTeX pour les articles publies par la SMF]
-    \long\def\@makecaption#1#2{%
-      \ifdim\captionindent>.1\hsize \captionindent.1\hsize \fi
-      \setbox\@tempboxa\vbox{\color at setgroup
-        \advance\hsize-2\captionindent\noindent
-        \@captionfont\@captionheadfont#1\@xp\@ifnotempty\@xp
-            {\@cdr#2\@nil}{\@addpunct{.}\@captionfont\upshape\enspace#2}%
-        \unskip\kern-2\captionindent\par
-        \global\setbox\@ne\lastbox\color at endgroup}%
-      \ifhbox\@ne % the normal case
-        \setbox\@ne\hbox{\unhbox\@ne\unskip\unskip\unpenalty\unkern}%
-      \fi
-      \ifdim\wd\@tempboxa=\z@ % this means caption will fit on one line
-        \setbox\@ne\hbox to\columnwidth{\hss\kern-2\captionindent\box\@ne\hss}%
-        \@tempdima\wd\@ne\advance\@tempdima-\captionindent
-        \wd\@ne\@tempdima
-      \else % tempboxa contained more than one line
-        \setbox\@ne\vbox{\rightskip=0pt plus\captionindent\relax
-            \unvbox\@tempboxa\parskip\z at skip
-            \noindent\unhbox\@ne\advance\hsize-2\captionindent\par}%
-      \fi
-      \ifnum\@tempcnta<64 % if the float IS a figure...
-        \addvspace\abovecaptionskip
-        \noindent\kern\captionindent\box\@ne
-      \else % if the float IS NOT a figure...
-        \noindent\kern\captionindent\box\@ne
-        \nobreak
-        \vskip\belowcaptionskip
-      \fi
-    \relax
-    }}
+}{}
+\caption at ifclassloaded{ams}{%
   \let\captionmargin\captionindent % set to 3pc by AMS class
   \begingroup\edef\@tempa{\endgroup
     \noexpand\caption at g@addto at list\noexpand\caption at sty@default
       {margin=\the\captionmargin
-       \caption at ifundefined\smf at makecaption{}{,maxmargin=.1\linewidth}}}
+       \caption at ifdefined\smf at makecaption{,maxmargin=.1\linewidth}{}}}
   \@tempa
   \caption at g@addto at list\caption at sls@default{margin*=.5\captionmargin}
   \DeclareCaptionLabelSeparator{default}{.\enspace}
@@ -1155,26 +1091,8 @@
   \DeclareCaptionDefaultFont{textfont}{\@captionfont\upshape}
   \captionsetup[figure]{position=b}
   \captionsetup[table]{position=t}
-}
-\providecommand*\caption at ifbeamerclass{%
-  \@ifclassloaded{beamer}\@firstofone\@gobble}
-\@onlypreamble\caption at ifbeamerclass
-\caption at ifbeamerclass{%
-  \caption at CheckCommand\beamer at makecaption{%
-    % beamerbaselocalstructure.sty,v 1.53 2007/01/28 20:48:21 tantau
-    \long\def\beamer at makecaption#1#2{%
-      \def\insertcaptionname{\csname#1name\endcsname}%
-      \def\insertcaptionnumber{\csname the#1\endcsname}%
-      \def\insertcaption{#2}%
-      \nobreak\vskip\abovecaptionskip\nobreak
-      \sbox\@tempboxa{\usebeamertemplate**{caption}}%
-      \ifdim \wd\@tempboxa >\hsize
-        \usebeamertemplate**{caption}\par
-      \else
-        \global \@minipagefalse
-        \hb at xt@\hsize{\hfil\box\@tempboxa\hfil}%
-      \fi
-      \nobreak\vskip\belowcaptionskip\nobreak}}
+}{}
+\caption at ifclassloaded{beamer}{%
   \newcommand*\caption at ifbeamertemplate[1]{%
     \begingroup
       \let\beamer@@tmpl at caption@ORI\beamer@@tmpl at caption
@@ -1225,25 +1143,8 @@
     % \usebeamertemplate**{caption} will set font
     \DeclareCaptionDefaultFont{font}{}%
     \setbeamertemplate{caption}[caption3]}
-}
-\providecommand*\caption at ifkomaclass{%
-  \caption at ifundefined\scr at caption\@gobble\@firstofone}
-\@onlypreamble\caption at ifkomaclass
-\caption at ifkomaclass{%
-  \caption at CheckCommand\@makecaption{%
-    % scrartcl|scrreprt|scrbook [2007/03/07 v2.97a KOMA-Script document class]
-    \long\def\@makecaption#1#2{%
-      \if at captionabove
-        \vskip\belowcaptionskip
-      \else
-        \vskip\abovecaptionskip
-      \fi
-      \@@makecaption\@firstofone{#1}{#2}%
-      \if at captionabove
-        \vskip\abovecaptionskip
-      \else
-        \vskip\belowcaptionskip
-      \fi}}
+}{}
+\caption at ifclassloaded{koma}{%
   \DeclareCaptionFormat{default}[#1#2#3\par]{%
     \ifdofullc at p
       \caption at ifin@list\caption at lsepcrlist\caption at lsepname
@@ -1264,49 +1165,31 @@
   \DeclareCaptionLabelSeparator{default}{\captionformat}
   \DeclareCaptionDefaultFont{font}{\scr at fnt@caption}
   \DeclareCaptionDefaultFont{labelfont}{\scr at fnt@captionlabel}
-}
-\providecommand*\caption at ifntgclass{%
-  \caption at ifundefined\CaptionFonts\@gobble\@firstofone}
-\@onlypreamble\caption at ifntgclass
-\caption at ifntgclass{%
-  \caption at CheckCommand\@makecaption{%
-    % artikel|rapport|boek [2004/06/07 v2.1a NTG LaTeX document class]
-    \long\def\@makecaption#1#2{%
-      \vskip\abovecaptionskip
-      \sbox\@tempboxa{{\CaptionLabelFont#1:} \CaptionTextFont#2}%
-      \ifdim \wd\@tempboxa >\hsize
-        {\CaptionLabelFont#1:} \CaptionTextFont#2\par
-      \else
-        \global \@minipagefalse
-        \hb at xt@\hsize{\hfil\box\@tempboxa\hfil}%
-      \fi
-      \vskip\belowcaptionskip}}
+  \let\caption at KV@parindent\KV at caption@parindent
+  \DeclareCaptionOption{parindent}[]{%
+    \ifx,#1,%
+      \caption at Debug{Option `parindent' ignored}%
+    \else
+      \caption at KV@parindent{#1}%
+    \fi}%
+  \let\caption at KV@parskip\KV at caption@parskip
+  \DeclareCaptionOption{parskip}[]{%
+    \ifx,#1,%
+      \caption at Debug{Option `parskip' ignored}%
+    \else
+      \caption at KV@parskip{#1}%
+    \fi}%
+}{}
+\caption at ifclassloaded{ntg}{%
   \DeclareCaptionDefaultFont{labelfont}{\CaptionLabelFont}
   \DeclareCaptionDefaultFont{textfont}{\CaptionTextFont}
-}
-\providecommand*\caption at ifthesisclass{%
-  \caption at ifundefined\cph at font
-    {\@gobble}%
-    {\caption at ifundefined\cpb at font\@gobble\@firstofone}}
-\caption at ifthesisclass{%
-  \caption at CheckCommand\@makecaption{%
-    % thesis.cls 1996/25/01 1.0g LaTeX document class (wm).
-    \long\def\@makecaption#1#2{%
-     \vskip\abovecaptionskip
-     \setbox\@tempboxa\hbox{{\cph at font #1:} {\cpb at font #2}}%
-     \ifdim \wd\@tempboxa >\hsize
-        \@hangfrom{\cph at font #1: }{\cpb at font #2\par}%
-     \else
-        \hbox to\hsize{\hfil\box\@tempboxa\hfil}%
-     \fi
-     \vskip\belowcaptionskip}}
+}{}
+\caption at ifclassloaded{thesis}{%
   \DeclareCaptionDefaultFormat{hang}
   \DeclareCaptionDefaultFont{labelfont}{\cph at font}
   \DeclareCaptionDefaultFont{textfont}{\cpb at font}
-}
-\caption at ifundefined\ArabiCoreLoaded{%
-  \let\caption at rl\@firstofone
-}{%
+}{}
+\caption at ifdefined\ArabiCoreLoaded{%
   \newcommand\caption at rl[1]{\if at rl\textRL{#1}\else\textLR{#1}\fi}
   \def\fnum at figure{\figurename\nobreakspace\thefigure}%
   \def\fnum at table{\tablename\nobreakspace\thetable}%
@@ -1313,41 +1196,10 @@
   \DeclareCaptionLabelSeparator{arabi}{ : }
   \DeclareCaptionLabelSeparator{default}{%
     \if at rl\caption at lsep@arabi\else\caption at lsep@colon\fi}
-  \caption at CheckCommand\@makecaption{%
-    % arabicore.sty [2006/01/01 v1.0 Arabi Core switching commands (may still change)]
-    \long\def\@makecaption#1#2{%
-      \vskip\abovecaptionskip
-      \sbox\@tempboxa{#1: #2}%
-      \sbox\@Arabitempboxa{\textRL{#2} : #1}%
-      \if at rl{
-        \ifdim \wd\@Arabitempboxa >\hsize
-        \textRL{#2} : #1\par
-      \else
-        \global \@minipagefalse
-        \hb at xt@\hsize{\hfil\box\@Arabitempboxa\hfil}%
-      \fi}\else{
-      \ifdim \wd\@tempboxa >\hsize
-        #1: #2\par
-      \else
-        \global \@minipagefalse
-        \hb at xt@\hsize{\hfil\box\@tempboxa\hfil}%
-      \fi}\fi
-      \vskip\belowcaptionskip}}
+}{%
+  \let\caption at rl\@firstofone
 }
-\caption at ifundefined\FB at makecaption{}{%
-  \caption at CheckCommand\@makecaption{%
-    % frenchb.ldf [2005/02/06 v1.6g French support from the babel system]
-    % frenchb.ldf [2007/10/05 v2.0e French support from the babel system]
-    \long\def\@makecaption#1#2{%
-      \vskip\abovecaptionskip
-      \sbox\@tempboxa{#1\CaptionSeparator #2}%
-      \ifdim \wd\@tempboxa >\hsize
-        #1\CaptionSeparator #2\par
-      \else
-        \global \@minipagefalse
-        \hb at xt@\hsize{\hfil\box\@tempboxa\hfil}%
-      \fi
-      \vskip\belowcaptionskip}}
+\caption at ifdefined\FB at makecaption{%
   \ifx\@makecaption\STD at makecaption
     \DeclareCaptionLabelSeparator{default}{\CaptionSeparator}
     \def\caption at frenchb{% supress frenchb warning
@@ -1361,60 +1213,12 @@
         frenchb will NOT customize it}%
     \fi
   \fi
-}
-\caption at ifundefined\frenchTeXmods{}{%
-  \caption at CheckCommand\@makecaption{%
-    % french(le).sty [2006/10/03 The french(le) package /V5,9991/]
-    % french(le).sty [2007/06/28 The french(le) package /V5,9994/]
-    \def\@makecaption#1#2{%
-      \ifFTY%
-        \def\@secondofmany##1##2\void{##2}%
-        \def\@tempa{\@secondofmany#2\void}%
-        \ifx\@tempa\empty%
-          \let\captionseparator\empty%
-        \fi%
-        \@mcORI{#1}{\relax\captionfont{#2}}%
-      \else
-        \@mcORI{#1}{#2}%
-      \fi}}%
-  \caption at CheckCommand\@makecaption{%
-    % french(le).sty [2007/02/11 The french(le) package /V5,9993/]
-    \def\@makecaption#1#2{%
-      \ifFTY%
-        \def\@secondofmany##1##2\void{##2}%
-        \protected at edef\@tempa{\@secondofmany#2\void}%
-        \ifx\@tempa\empty%
-          \let\captionseparator\empty%
-        \fi%
-        \@mcORI{#1}{\relax\captionfont{#2}}%
-      \else
-        \@mcORI{#1}{#2}%
-      \fi}}%
+}{}
+\caption at ifdefined\frenchTeXmods{%
   \DeclareCaptionDefaultFont{textfont}{\itshape}%
   \DeclareCaptionLabelSeparator{default}{\captionseparator\space}%
-}
-  \caption at CheckCommand\@makecaption{%
-    % rlbabel.def [2005/03/30 v2.3h Right-to-Left support from the babel system Hebrew language support from the babel system]
-    \long\def\@makecaption#1#2{%
-      \vskip\abovecaptionskip%
-      \begin{center}%
-        #1: #2%
-      \end{center} \par%
-      \vskip\belowcaptionskip}}%
+}{}
 \DeclareCaptionListFormat{subperiod}{#2.}
-\caption at ifundefined\hunnewlabel{}{%
-  \caption at CheckCommand\@makecaption{%
-    % magyar.ldf [2005/03/30 v1.4j Magyar support from the babel system]
-    \def\@makecaption#1#2{%
-      \vskip\abovecaptionskip
-      \sbox\@tempboxa{#1. #2}%
-      \ifdim \wd\@tempboxa >\hsize
-        {#1. #2\csname par\endcsname}
-      \else
-        \global \@minipagefalse
-        \hb at xt@\hsize{\hfil\box\@tempboxa\hfil}%
-      \fi
-      \vskip\belowcaptionskip}}}
 \def\caption at tempa#1{%
   \@ifpackagewith{babel}{#1}{%
     \caption at InfoNoLine{#1 babel option is loaded}%
@@ -1429,15 +1233,6 @@
   }{}}
 \caption at tempa{hungarian}
 \caption at tempa{magyar}
-\caption at IfCheckCommand{%
-  \caption at setbool{documentclass}{1}%
-}{%
-  \caption at setbool{documentclass}{0}%
-  \caption at InfoNoLine{%
-         Unknown document class (or package),\MessageBreak
-         standard defaults will be used}%
-  \caption at Debug{\string\@makecaption\space=\space\meaning\@makecaption\@gobble}%
-}
 \captionsetup{style=default,position=default,%
               list,listformat=default,twoside=\if at twoside 1\else 0\fi}
 \ProcessOptions*
@@ -1445,13 +1240,13 @@
   \caption at ifcontentsline{#2}{%
     \begingroup
       \let\@tempa\@gobble
-      \caption at ifundefined\caption at listtype
+      \caption at ifdefined\caption at listtype
+        {\let\@tempa\@firstofone}%
         {\edef\caption at listtype{#1}}%
-        {\let\@tempa\@firstofone}%
-      \caption at ifundefined\caption at listtype@ext
-        {}%
+      \caption at ifdefined\caption at listtype@ext
         {\edef\caption at listtype{\caption at listtype\caption at listtype@ext}%
          \let\@tempa\@firstofone}%
+        {}%
       \@tempa
         {\caption at Debug{addcontentsline: #1 => \caption at listtype}%
          \@namedef{the\caption at listtype}{\@nameuse{the#1}}}%
@@ -1692,13 +1487,13 @@
   \DeclareFloatingEnvironment}
 \@onlypreamble\DeclareCaptionType
 \newcommand\caption at ForEachType[1]{%
-  \caption at ifundefined\ForEachFloatingEnvironment
+  \caption at ifdefined\ForEachFloatingEnvironment
+    {\ForEachFloatingEnvironment{#1}}%
     {\def\@elt##1{#1}%
-      \caption at ifundefined\c at figure\@gobble\@elt{figure}%
-      \caption at ifundefined\c at table\@gobble\@elt{table}%
+      \caption at ifdefined\c at figure\@elt\@gobble{figure}%
+      \caption at ifdefined\c at table\@elt\@gobble{table}%
       \let\@elt\relax
-      \newfloat at addtohook{#1}}%
-    {\ForEachFloatingEnvironment{#1}}}
+      \newfloat at addtohook{#1}}}
 \providecommand\newfloat at addtohook[1]{%
   \toks@=\expandafter{\newfloat at hook{##1}#1}%
   \edef\@tempa{\def\noexpand\newfloat at hook####1{\the\toks@}}%
@@ -1721,8 +1516,8 @@
         \caption at declaresublistentry{#3}%
         \@cons\caption at subtypelist{{#3}}}%
        {\caption at Debug{Modify caption `sub#3'}}%
-     \caption at ifundefined\contentsuse{}{%
-       \contentsuse{sub#3}{\csname ext at sub#3\endcsname}}%
+     \caption at ifdefined\contentsuse{%
+       \contentsuse{sub#3}{\csname ext at sub#3\endcsname}}{}%
      \@namedef{sub#3name}{}%
      \@namedef{sub#3autorefname}{\csname #3autorefname\endcsname}%
      #1% is \@firstoftwo in star form, and \@secondoftwo otherwise
@@ -1734,9 +1529,9 @@
     }}
 \@onlypreamble\caption@@declaresubtype
 \newcommand*\caption at declaresublistentry{%
-  \caption at ifundefined\l at chapter
-    {\caption@@declaresublistentry\l at subsubsection}%
-    {\caption@@declaresublistentry\l at subsection}}
+  \caption at ifdefined\l at chapter
+    {\caption@@declaresublistentry\l at subsection}%
+    {\caption@@declaresublistentry\l at subsubsection}}
 \@onlypreamble\caption at declaresublistentry
 \newcommand*\caption@@declaresublistentry[2]{%
   \ifx#1\@undefined

Deleted: trunk/Master/texmf-dist/tex/latex/caption/newfloat.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/caption/newfloat.sty	2019-11-24 00:53:56 UTC (rev 52904)
+++ trunk/Master/texmf-dist/tex/latex/caption/newfloat.sty	2019-11-24 21:23:07 UTC (rev 52905)
@@ -1,891 +0,0 @@
-%%
-%% This is file `newfloat.sty',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% newfloat.dtx  (with options: `package')
-%% 
-%% Copyright (C) 1994-2019 Axel Sommerfeldt (axel.sommerfeldt at f-m.fm)
-%% 
-%% https://gitlab.com/axelsommerfeldt/caption
-%% 
-%% --------------------------------------------------------------------------
-%% 
-%% This work may be distributed and/or modified under the
-%% conditions of the LaTeX Project Public License, either version 1.3
-%% of this license or (at your option) any later version.
-%% The latest version of this license is in
-%%   http://www.latex-project.org/lppl.txt
-%% and version 1.3 or later is part of all distributions of LaTeX
-%% version 2003/12/01 or later.
-%% 
-%% This work has the LPPL maintenance status "maintained".
-%% 
-%% This Current Maintainer of this work is Axel Sommerfeldt.
-%% 
-%% This work consists of the files
-%%   CHANGELOG, README, SUMMARY, caption.ins,
-%%   caption.dtx, caption2.dtx, caption3.dtx,
-%%   bicaption.dtx, ltcaption.dtx, subcaption.dtx,
-%%   newfloat.dtx, and totalcount.dtx
-%% the derived files
-%%   caption.sty, caption2.sty, caption3.sty,
-%%   bicaption.sty, ltcaption.sty, subcaption.sty,
-%%   newfloat.sty, and totalcount.sty
-%% and the user manuals
-%%   caption-deu.tex, caption-eng.tex, and caption-rus.tex.
-%% 
-\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{newfloat}[2019/09/01 v1.1k Defining new floating environments (AR)]
-\newcommand*\newfloat at Info[1]{%
-  \PackageInfo{newfloat}{#1}}
-\newcommand*\newfloat at InfoNoLine[1]{%
-  \newfloat at Info{#1\@gobble}}
-\newcommand*\newfloat at Warning[1]{%
-  \PackageWarning{newfloat}{#1}}
-\newcommand*\newfloat at WarningNoLine[1]{%
-  \newfloat at Warning{#1\@gobble}}
-\newcommand*\newfloat at Error[1]{%
-  \PackageError{newfloat}{#1}\newfloat at eh}
-\newcommand*\newfloat at eh{%
-  If you do not understand this error, please take a closer look\MessageBreak
-  at the documentation of the `newfloat' package.\MessageBreak\@ehc}
-\RequirePackage{keyval}[1997/11/10]
-\newcommand*\newfloat at def[2]{%
-  \newfloat at ifundefined{#1}{%
-    \@namedef{#1}{#2}}}
-\newcommand*\newfloat at let[2]{%
-  \newfloat at ifundefined{#1}{%
-    \expandafter\let\csname #1\endcsname#2}}
-\newcommand*\newfloat at ifundefined[2]{%
-  \@ifundefined{#1}{#2}{%
-    \newfloat at Info{%
-      \expandafter\string\csname#1\endcsname\space is already defined}}}
-\newcommand*\DeclareFloatingEnvironment{%
-  \@testopt\@DeclareFloatingEnvironment{}}
-\@onlypreamble\DeclareFloatingEnvironment
-\def\@DeclareFloatingEnvironment[#1]#2{%
-  \newfloat at Info{New float `#2' with options `#1'}%
-  \newfloat at ifundefined{c@#2}{\newcounter{#2}}%
-  \@ifundefined{c at float@type}%     from float package
-    {\@ifundefined{c at newflo@tctr}% from memoir document class
-       {\ifdefined\newfloat at ftype \else
-          \newcount\newfloat at ftype
-          \newfloat at ftype=8\relax
-        \fi
-        \expandafter\xdef\csname ftype@#2\endcsname{\the\newfloat at ftype}%
-        \advance\newfloat at ftype\newfloat at ftype}%
-       {\expandafter\edef\csname ftype@#2\endcsname{\the\c at newflo@tctr}%
-        \advance\c at newflo@tctr \c at newflo@tctr}}%
-    {\expandafter\edef\csname ftype@#2\endcsname{\the\value{float at type}}%
-     \addtocounter{float at type}{\value{float at type}}}%
-  \newfloat at Info{float type `#2'=\@nameuse{ftype@#2}}%
-  \newfloat at def{fnum@#2}%
-   {\@nameuse{#2name}\nobreakspace\@nameuse{the#2}%
-    \ifdefined\autodot\expandafter\autodot\fi}%
-  \newfloat at capitalize\newfloat at Type{#2}%
-  \newfloat at let{#2name}{\newfloat at Type}%
-  \newfloat at def{fleg#2}{\@nameuse{#2name}}% legend naming (memoir)
-  \newfloat at ifundefined{flegtoc#2}{\@namedef{flegtoc#2}##1{}}%
-  \ifcsname @tufte at float\endcsname
-    \newenvironment{#2}[1][htbp]%
-      {\begin{@tufte at float}[{##1}]{#2}{}}%
-      {\end{@tufte at float}}%
-    \newenvironment{#2*}[1][htbp]%
-      {\begin{@tufte at float}[{##1}]{#2}{star}}%
-      {\end{@tufte at float}}%
-  \else
-    \@ifclassloaded{beamer}{%
-      \newenvironment{#2}[1][]{\beamer at float{#2}}{\end at beamer@float}%
-    }{%
-      \newenvironment{#2}{\@float{#2}}{\end at float}%
-      \newenvironment{#2*}{\@dblfloat{#2}}{\end at dblfloat}%
-    }%
-  \fi
-  \newfloat at def{listof#2}{\newfloat at listof{#2}}%
-  \newfloat at def{listof#2s}{\@nameuse{listof#2}}%
-  \newfloat at def{listof#2es}{\@nameuse{listof#2s}}%
-  \newfloat at def{newfloat at listof#2 at hook}{}%
-  \ifdefined\l at figure
-    \newfloat at let{l@#2}{\l at figure}%
-  \else
-    \newfloat at def{l@#2}{\@dottedtocline{1}{1.5em}{2.3em}}%
-  \fi
-  \edef\newfloat at tempa{List of \newfloat at Type s}%
-  \newfloat at let{list#2name}{\newfloat at tempa}%
-  \expandafter\let\csname fst@#2\endcsname\@undefined
-  \newfloat at ifundefined{fps@#2}{\newfloat at setplacement{#2}{tbp}}%
-  \newfloat at ifundefined{ext@#2}{\newfloat at setfileext{#2}{lo#2}}%
-  \newfloat at setoptions*{#2}{#1}%
-  \@expandtwoargs\newfloat at announce{#2}{\@nameuse{ext@#2}}%
-  \@ifnextchar[\newfloat at DFE@setname\relax}
-\@onlypreamble\@DeclareFloatingEnvironment
-\def\newfloat at DFE@setname[#1]{%
-  \KV@@newfloat at name{#1}%
-  \@ifnextchar[\newfloat at DFE@setlistname\relax}
-\@onlypreamble\newfloat at DFE@setname
-\def\newfloat at DFE@setlistname[#1]{%
-  \KV@@newfloat at listname{#1}}
-\@onlypreamble\newfloat at DFE@setlistname
-\newcommand*\newfloat at capitalize[2]{%
-  \edef\newfloat at tempa{\gdef\noexpand#1{\@car#2\@nil}}%
-  \uppercase\expandafter{\newfloat at tempa}%
-  \edef\newfloat at tempa{%
-    \noexpand\g at addto@macro\noexpand#1{\@cdr#2\@nil}}%
-  \newfloat at tempa}
-\newcommand*\newfloat at listof[1]{%
-  \@ifstar
-    {\newfloat at list@of{#1}*}%
-    {\newfloat at list@of{#1}\relax}}
-\newcommand*\newfloat at list@of[1]{%
-  \@expandtwoargs\newfloat at list@of@{#1}{\@nameuse{ext@#1}}}
-\newcommand*\newfloat at list@of@[3]{%
-  \begingroup
-    \expandafter\let\expandafter\listfigurename\csname list#1name\endcsname
-    \def\ext at figure{#2}%
-    \let\newfloat at starttoc\@starttoc
-    \def\@starttoc##1{\newfloat at starttoc{#2}}%
-    \let\newfloat at listoftoc\listoftoc
-    \def\listoftoc##1{\newfloat at listoftoc{#2}}%
-    \@nameuse{newfloat at listof#1 at hook}%
-    \listoffigures#3%
-  \endgroup}
-\newcommand*\newfloat at setoptions{%
-  \@ifstar
-    {\newfloat@@setoptions\@firstofone}%
-    {\newfloat@@setoptions\@gobble}}
-\newcommand*\newfloat@@setoptions[3]{%
-  \let\newfloat at within@value\@undefined
-  \let\newfloat at chapterlistsgaps@value\@undefined
-  #1{\KV@@newfloat at within\newfloat at within@default}% set default value for new floats
-  \def\newfloat at type{#2}%
-  \setkeys{@newfloat}{#3}%
-  \ifx\newfloat at within@value\@undefined \else
-    \newfloat at setoption{within}\newfloat at within@value
-  \fi
-  \ifx\newfloat at chapterlistsgaps@value\@undefined \else
-    \newfloat at setoption{chapterlistsgaps}\newfloat at chapterlistsgaps@value
-  \fi}
-\newcommand*\newfloat at within@default{%
-  \ifcsname c at chapter\endcsname chapter\else none\fi}
-\@onlypreamble\newfloat at within@default
-\newcommand*\newfloat at setoption[1]{%
-  \edef\caption at tempa{\noexpand\@nameuse{newfloat at set#1}{\newfloat at type}}%
-  \caption at tempa}
-\newcommand*\newfloat at setfileext[2]{%
-  \@namedef{ext@#1}{#2}}
-\define at key{@newfloat}{fileext}{%
-  \newfloat at setoption{fileext}{#1}}
-\newcommand*\newfloat at setlistname[2]{%
-  \@namedef{list#1name}{#2}}
-\define at key{@newfloat}{listname}{%
-  \newfloat at setoption{listname}{#1}}
-\newcommand*\newfloat at setname[2]{%
-  \newfloat@@setname{#1}{#2}%
-  \begingroup
-    \ifcsname languagename\endcsname
-      \ifcsname captions\languagename\endcsname
-        \expandafter\g at addto@macro\csname captions\languagename\endcsname
-          {\newfloat@@setname{#1}{#2}}%
-      \fi
-    \fi
-  \endgroup}
-%%\AtBeginDocument{\let\newfloat at setname\newfloat@@setname}
-\newcommand*\newfloat@@setname[2]{%
-  \@namedef{#1name}{#2}}
-\define at key{@newfloat}{name}{%
-  \newfloat at setoption{name}{#1}}
-\newcommand*\newfloat at setplacement[2]{%
-  \@namedef{fps@#1}{#2}}
-\define at key{@newfloat}{placement}{%
-  \newfloat at setoption{placement}{#1}}
-\newcommand*\newfloat at setwithin[2]{%
-  \ifcsname c at chapter\endcsname
-    \@removefromreset{#1}{chapter}%
-  \fi
-  \@removefromreset{#1}{section}%
-  \edef\@tempa{#2}%
-  \ifx\@tempa\@empty
-    \def\@tempa{none}%
-  \fi
-  \def\@tempb{none}%
-  \ifx\@tempa\@tempb
-    \ifcsname c at chapter\endcsname
-      \@chapterlistsgap at off{#1}%
-    \fi
-    \newfloat@@setwithin{#1}{}{}%
-  \else
-    \def\@tempb{chapter}%
-    \ifx\@tempa\@tempb
-      \@addtoreset{#1}{chapter}%
-      \@chapterlistsgap at on{#1}%
-      \newfloat@@setwithin{#1}{\ifnum\c at chapter>\z@ \thechapter.\fi}{\theHchapter.}%
-    \else
-      \def\@tempb{section}%
-      \ifx\@tempa\@tempb
-        \@addtoreset{#1}{section}%
-        \ifcsname c at chapter\endcsname
-          \@addtoreset{#1}{chapter}%
-          \@chapterlistsgap at on{#1}%
-          \newfloat@@setwithin{#1}{\thesection.}{\theHsection.}%
-        \else
-          \newfloat@@setwithin{#1}{\ifnum\c at section>\z@ \thesection.\fi}{\theHsection.}%
-        \fi
-      \else
-        \newfloat at Error{Invalid value `#2' for option `within'}%
-      \fi
-    \fi
-  \fi}
-\newcommand*\newfloat@@setwithin[3]{%
-  \global\@namedef{the#1}{#2\arabic{#1}}%
-  \global\@namedef{theH#1}{#3\arabic{#1}}}
-\define at key{@newfloat}{within}{%
-  \def\newfloat at within@value{#1}}
-\newcommand*\newfloat at setwithout[1]{%
-  \newfloat at setwithin{#1}{none}}
-\define at key{@newfloat}{without}[]{%
-  \def\newfloat at within@value{none}}
-\newcommand*\newfloat at setchapterlistsgaps[2]{%
-  \edef\@tempa{#2}%
-  \def\@tempb{off}%
-  \ifx\@tempa\@tempb
-    \@chapterlistsgap at off{#1}%
-  \else
-    \def\@tempb{on}%
-    \ifx\@tempa\@tempb
-      \@chapterlistsgap at on{#1}%
-    \else
-      \newfloat at Error{Invalid value `#2' for option `chapterlistsgaps'}%
-    \fi
-  \fi}
-\define at key{@newfloat}{chapterlistsgaps}{%
-  \def\newfloat at chapterlistsgaps@value{#1}}
-\providecommand*\@removefromreset[2]{{%
-  \expandafter\let\csname c@#1\endcsname\@removefromreset
-  \def\@elt##1{%
-    \expandafter\ifx\csname c@##1\endcsname\@removefromreset
-    \else
-      \noexpand\@elt{##1}%
-    \fi}%
-  \expandafter\xdef\csname cl@#2\endcsname{%
-    \csname cl@#2\endcsname}}}
-\newcommand*\newfloat at announce[2]{%
-  \@cons\newfloat at list{{#1}}%
-  \@cons\newfloat@@list{{#1}}%
-  \newfloat at ifundefined{newfloat at ext@#2}{%
-    \@namedef{newfloat at ext@#2}{#1}%
-    \ifcsname c at lofdepth\endcsname
-      \newfloat at ifundefined{c@#2depth}{%
-        \newcounter{#2depth}%
-        \setcounter{#2depth}{1}}%
-    \fi
-    \ifcsname addtotoclist\endcsname
-      \addtotoclist[float]{#2}%
-      \newfloat at def{listof#2name}{\@nameuse{list#1name}}%
-    \fi
-  }%
-  \ifcsname contentsuse\endcsname
-    \contentsuse{#1}{#2}%
-  \fi
-  \newfloat at hook{#1}}
-\@onlypreamble\newfloat at announce
-\newcommand*\newfloat@@list{}
-\newcommand*\SetupFloatingEnvironment[1]{%
-  \newfloat at addtolist{#1}%
-  \newfloat at setoptions{#1}}
-\newcommand\ForEachFloatingEnvironment{%
-  \@ifstar
-    {\@ForEachFloatingEnvironment\@gobble}%
-    {\@ForEachFloatingEnvironment\@iden}}
-\newcommand\@ForEachFloatingEnvironment[2]{%
-  \def\@elt##1{#2}%
-  \newfloat at list
-  \let\@elt\relax
-  #1{\newfloat at addtohook{#2}}}
-\providecommand\newfloat at addtohook[1]{%
-  \toks@=\expandafter{\newfloat at hook{##1}#1}%
-  \edef\@tempa{\def\noexpand\newfloat at hook####1{\the\toks@}}%
-  \@tempa}
-\providecommand*\newfloat at hook[1]{}
-\newcommand\PrepareListOf[1]{%
-  \expandafter\g at addto@macro\csname newfloat at listof#1 at hook\endcsname}
-\@onlypreamble\PrepareListOf
-\newcommand*\newfloat at list{}
-\newcommand*\newfloat at addtolist[1]{%
-  \newfloat at ifinlist{#1}{}{%
-    \ifcsname ext@#1\endcsname
-      \@cons\newfloat at list{{#1}}%
-      \@namedef{newfloat at ext@\@nameuse{ext@#1}}{#1}%
-      \newfloat at let{@ifchapterlistsgap@#1}{\@iden}%
-    \else
-      \newfloat at Error{`#1' does not seem to be a floating environment}%
-    \fi}}
-\newcommand*\newfloat at ifinlist[1]{%
-  \let\next\@secondoftwo
-  \begingroup
-    \expandafter\let\csname c@#1\endcsname\newfloat at ifinlist
-    \def\@elt##1{%
-      \expandafter\ifx\csname c@##1\endcsname\newfloat at ifinlist
-        \global\let\next\@firstoftwo
-      \fi}%
-    \newfloat at list
-  \endgroup
-  \next}
-\ifcsname ext at figure\endcsname
-  \newfloat at addtolist{figure}
-\fi
-\ifcsname ext at table\endcsname
-  \newfloat at addtolist{table}
-\fi
-\ifcsname @chapter\endcsname
-  \providecommand*\@chapterlistsgap{10\p@}%
-  \@ifpackageloaded{dgruyter}{\renewcommand*\@chapterlistsgap{13\p@}}{}%
-  \providecommand*\@addchapterlistsgap[2]{%
-    \@nameuse{@ifchapterlistsgap@#1}{% if switched on
-      \@@addchapterlistsgap{#1}{#2}}}
-  \providecommand*\@@addchapterlistsgap[2]{%
-    \@ifundefined{@addchapterlistsgap@#2}{% only once per extension
-      \@namedef{@addchapterlistsgap@#2}{#1}%
-      \@@@addchapterlistsgap{#2}}{}}
-  \providecommand*\@@@addchapterlistsgap[1]{%
-    \ifdim \@chapterlistsgap>\z@
-      \addtocontents{#1}{\protect\addvspace{\@chapterlistsgap}}%
-    \fi}
-  \providecommand*\@addchapterlistsgaps{%
-    \begingroup
-      \def\@elt##1{%
-        \@expandtwoargs\@addchapterlistsgap{##1}{\@nameuse{ext@##1}}}%
-      \newfloat at list
-    \endgroup}
-  \providecommand*\@chapterlistsgap at off[1]{%
-    \expandafter\let\csname @ifchapterlistsgap@#1\endcsname\@gobble
-    \ifcsname unsettoc\endcsname
-      \@expandtwoargs\unsettoc{\@nameuse{ext@#1}}{chapteratlist}%
-    \fi}
-  \providecommand*\@chapterlistsgap at on[1]{%
-    \expandafter\let\csname @ifchapterlistsgap@#1\endcsname\@iden
-    \ifcsname setuptoc\endcsname
-      \@expandtwoargs\setuptoc{\@nameuse{ext@#1}}{chapteratlist}%
-    \fi}
-\fi
-\define at key{newfloat}{chapterlistsgap}{%
-  \renewcommand*\@chapterlistsgap{#1}}
-\define at key{newfloat}{within}{%
-  \def\newfloat at within@default{#1}% set new default value
-  \def\@elt##1{\newfloat at setwithin{##1}{#1}}%
-  \newfloat at list
-  \let\@elt\relax}
-\define at key{newfloat}{without}[]{%
-  \KV at newfloat@within{none}}
-\def\@elt#1{%
-  \define at key{newfloat}{#1name}{%
-    \newfloat at setname{#1}{##1}}%
-  \define at key{newfloat}{list#1name}{%
-    \newfloat at setname{list#1}{##1}}%
-  \define at key{newfloat}{#1within}{%
-    \newfloat at setwithin{#1}{##1}}%
-  \define at key{newfloat}{#1without}[]{%
-    \newfloat at setwithout{#1}}%
-}%
-\newfloat at list
-\let\@elt\relax
-\define at key{newfloat}{planb}[true]{%
-  \def\@tempa{#1}%
-  \def\@tempb{false}%
-  \ifx\@tempa\@tempb
-    \let\newfloat at ifplanb\@gobble
-  \else
-    \def\@tempb{true}%
-    \ifx\@tempa\@tempb
-      \let\newfloat at ifplanb\@iden
-    \else
-      \newfloat at Error{Invalid value `#1' for option `planb'}%
-    \fi
-  \fi}
-\define at key{newfloat}{planb-fileext}{%
-  \newfloat at Info{Setting Plan B file extension to `#1'}
-  \xdef\newfloat at addtocontents@ext{#1}}
-\let\@tempc\relax
-\@expandtwoargs\setkeys{newfloat}{planb,\@ptionlist{\@currname.\@currext}}%
-\AtEndOfPackage{\let\@unprocessedoptions\relax}
-\newcommand*\newfloatsetup{\setkeys{newfloat}}
-\newcommand\newfloat at replace@chapter[3]{%
-  \begingroup
-    \let\if at twocolumn\iffalse
-    \let\if at mainmatter\iffalse
-    \let\if at thema\iffalse
-    \let\if at chapnum\iffalse
-    \def\@tempa[##1]##2{#2}%
-    \ifx\@tempa\@chapter
-      \newfloat at InfoNoLine{Document class `#1' detected}%
-      \gdef\@chapter[##1]##2{#3}%
-      \global\let\newfloat at replace@chapter\newfloat at dont@replace at chapter
-    \else\ifx\@tempa\Hy at org@chapter
-      \newfloat at InfoNoLine{Document class `#1' detected (Hy)}%
-      \gdef\Hy at org@chapter[##1]##2{#3}%
-      \global\let\newfloat at replace@chapter\newfloat at dont@replace at chapter
-    \fi\fi
-  \endgroup}
-\newcommand\newfloat at dont@replace at chapter[3]{}
-\ifcsname @chapter\endcsname \else
-  \let\newfloat at replace@chapter\newfloat at dont@replace at chapter
-\fi
-\newfloat at replace@chapter{report}{%
-  \ifnum \c at secnumdepth >\m at ne
-    \refstepcounter{chapter}%
-    \typeout{\@chapapp\space\thechapter.}%
-    \addcontentsline{toc}{chapter}%
-      {\protect\numberline{\thechapter}#1}%
-  \else
-    \addcontentsline{toc}{chapter}{#1}%
-  \fi
-  \chaptermark{#1}%
-  \addtocontents{lof}{\protect\addvspace{10\p@}}%
-  \addtocontents{lot}{\protect\addvspace{10\p@}}%
-  \if at twocolumn
-    \@topnewpage[\@makechapterhead{#2}]%
-  \else
-    \@makechapterhead{#2}%
-    \@afterheading
-  \fi
-}{%
-  \ifnum \c at secnumdepth >\m at ne
-    \refstepcounter{chapter}%
-    \typeout{\@chapapp\space\thechapter.}%
-    \addcontentsline{toc}{chapter}%
-      {\protect\numberline{\thechapter}#1}%
-  \else
-    \addcontentsline{toc}{chapter}{#1}%
-  \fi
-  \chaptermark{#1}%
-  \@addchapterlistsgaps
-  \if at twocolumn
-    \@topnewpage[\@makechapterhead{#2}]%
-  \else
-    \@makechapterhead{#2}%
-    \@afterheading
-  \fi}
-\newfloat at replace@chapter{book}{%
-  \ifnum \c at secnumdepth >\m at ne
-    \if at mainmatter
-      \refstepcounter{chapter}%
-      \typeout{\@chapapp\space\thechapter.}%
-      \addcontentsline{toc}{chapter}%
-        {\protect\numberline{\thechapter}#1}%
-    \else
-      \addcontentsline{toc}{chapter}{#1}%
-    \fi
-  \else
-    \addcontentsline{toc}{chapter}{#1}%
-  \fi
-  \chaptermark{#1}%
-  \addtocontents{lof}{\protect\addvspace{10\p@}}%
-  \addtocontents{lot}{\protect\addvspace{10\p@}}%
-  \if at twocolumn
-    \@topnewpage[\@makechapterhead{#2}]%
-  \else
-    \@makechapterhead{#2}%
-    \@afterheading
-  \fi
-}{%
-  \ifnum \c at secnumdepth >\m at ne
-    \if at mainmatter
-      \refstepcounter{chapter}%
-      \typeout{\@chapapp\space\thechapter.}%
-      \addcontentsline{toc}{chapter}%
-        {\protect\numberline{\thechapter}#1}%
-    \else
-      \addcontentsline{toc}{chapter}{#1}%
-    \fi
-  \else
-    \addcontentsline{toc}{chapter}{#1}%
-  \fi
-  \chaptermark{#1}%
-  \@addchapterlistsgaps
-  \if at twocolumn
-    \@topnewpage[\@makechapterhead{#2}]%
-  \else
-    \@makechapterhead{#2}%
-    \@afterheading
-  \fi}
-\newfloat at replace@chapter{amsbook}{%
-  \refstepcounter{chapter}%
-  \ifnum\c at secnumdepth<\z@ \let\@secnumber\@empty
-  \else \let\@secnumber\thechapter \fi
-  \typeout{\chaptername\space\@secnumber}%
-  \def\@toclevel{0}%
-  \ifx\chaptername\appendixname \@tocwriteb\tocappendix{chapter}{#2}%
-  \else \@tocwriteb\tocchapter{chapter}{#2}\fi
-  \chaptermark{#1}%
-  \addtocontents{lof}{\protect\addvspace{10\p@}}%
-  \addtocontents{lot}{\protect\addvspace{10\p@}}%
-  \@makechapterhead{#2}\@afterheading
-}{%
-  \refstepcounter{chapter}%
-  \ifnum\c at secnumdepth<\z@ \let\@secnumber\@empty
-  \else \let\@secnumber\thechapter \fi
-  \typeout{\chaptername\space\@secnumber}%
-  \def\@toclevel{0}%
-  \ifx\chaptername\appendixname \@tocwriteb\tocappendix{chapter}{#2}%
-  \else \@tocwriteb\tocchapter{chapter}{#2}\fi
-  \chaptermark{#1}%
-  \@addchapterlistsgaps
-  \@makechapterhead{#2}\@afterheading}
-\@ifpackageloaded{tocbasic}{%
-  \let\newfloat at replace@chapter\newfloat at dont@replace at chapter}{}
-\ifcsname insertchapterspace\endcsname
-  \renewcommand*\insertchapterspace{\@addchapterlistsgaps}
-  \let\newfloat at replace@chapter\newfloat at dont@replace at chapter
-\fi
-\newfloat at replace@chapter{rapport}{%
-  \ifnum \c at secnumdepth >\m at ne
-    \refstepcounter{chapter}%
-    \typeout{\@chapapp\space\thechapter.}%
-    \addcontentsline{toc}{chapter}%
-      {\protect\numberline{\thechapter}\toc at font0 #1}%
-  \else
-    \addcontentsline{toc}{chapter}{\toc at font0 #1}%
-  \fi
-  \chaptermark{#1}%
-  \addtocontents{lof}{\protect\addvspace{10\p@}}%
-  \addtocontents{lot}{\protect\addvspace{10\p@}}%
-  \if at twocolumn
-    \@topnewpage[\@makechapterhead{#2}]%
-  \else
-    \@makechapterhead{#2}%
-    \@afterheading
-  \fi
-}{%
-  \ifnum \c at secnumdepth >\m at ne
-    \refstepcounter{chapter}%
-    \typeout{\@chapapp\space\thechapter.}%
-    \addcontentsline{toc}{chapter}%
-      {\protect\numberline{\thechapter}\toc at font0 #1}%
-  \else
-    \addcontentsline{toc}{chapter}{\toc at font0 #1}%
-  \fi
-  \chaptermark{#1}%
-  \@addchapterlistsgaps
-  \if at twocolumn
-    \@topnewpage[\@makechapterhead{#2}]%
-  \else
-    \@makechapterhead{#2}%
-    \@afterheading
-  \fi}
-\newfloat at replace@chapter{boek}{%
-  \ifnum \c at secnumdepth >\m at ne
-    \if at mainmatter
-      \refstepcounter{chapter}%
-      \typeout{\@chapapp\space\thechapter.}%
-      \addcontentsline{toc}{chapter}%
-        {\protect\numberline{\thechapter}\toc at font0 #1}%
-    \else
-      \addcontentsline{toc}{chapter}{\toc at font0 #1}%
-    \fi
-  \else
-    \addcontentsline{toc}{chapter}{\toc at font0 #1}%
-  \fi
-  \chaptermark{#1}%
-  \addtocontents{lof}{\protect\addvspace{10\p@}}%
-  \addtocontents{lot}{\protect\addvspace{10\p@}}%
-  \if at twocolumn
-    \@topnewpage[\@makechapterhead{#2}]%
-  \else
-    \@makechapterhead{#2}%
-    \@afterheading
-  \fi
-}{%
-  \ifnum \c at secnumdepth >\m at ne
-    \if at mainmatter
-      \refstepcounter{chapter}%
-      \typeout{\@chapapp\space\thechapter.}%
-      \addcontentsline{toc}{chapter}%
-        {\protect\numberline{\thechapter}\toc at font0 #1}%
-    \else
-      \addcontentsline{toc}{chapter}{\toc at font0 #1}%
-    \fi
-  \else
-    \addcontentsline{toc}{chapter}{\toc at font0 #1}%
-  \fi
-  \chaptermark{#1}%
-  \@addchapterlistsgaps
-  \if at twocolumn
-    \@topnewpage[\@makechapterhead{#2}]%
-  \else
-    \@makechapterhead{#2}%
-    \@afterheading
-  \fi}
-\newfloat at replace@chapter{thesis}{%
-  \ifnum \c at secnumdepth >\m at ne
-    \if at mainmatter
-      \refstepcounter{chapter}%
-      \typeout{\chaptername\space\thechapter.}
-      \if at thema
-        \ifx\@shortauthor\@empty
-          \addcontentsline{toc}{chapter}{%
-          \protect\numberline{\thechapter.}#1}%
-        \else
-          \addcontentsline{toc}{chapter}{%
-          \protect\numberline{\thechapter.}%
-          \@shortauthor\hfill\mbox{}\vskip\normallineskip #1}%
-        \fi
-      \else
-        \addcontentsline{toc}{chapter}{%
-        \protect\numberline{\thechapter.}#1}%
-      \fi
-    \else
-      \addcontentsline{toc}{chapter}{#1}
-    \fi
-  \else
-    \addcontentsline{toc}{chapter}{#1}
-  \fi
-  \chaptermark{#1}
-  \addtocontents{lof}{\protect\addvspace{10pt}}
-  \addtocontents{lot}{\protect\addvspace{10pt}}
-  \if at twocolumn
-    \@topnewpage[\@makechapterhead{#2}]
-  \else
-    \@makechapterhead{#2}
-    \@afterheading
-  \fi
-}{%
-  \ifnum \c at secnumdepth >\m at ne
-    \if at mainmatter
-      \refstepcounter{chapter}%
-      \typeout{\chaptername\space\thechapter.}%
-      \if at thema
-        \ifx\@shortauthor\@empty
-          \addcontentsline{toc}{chapter}{%
-          \protect\numberline{\thechapter.}#1}%
-        \else
-          \addcontentsline{toc}{chapter}{%
-          \protect\numberline{\thechapter.}%
-          \@shortauthor\hfill\mbox{}\vskip\normallineskip #1}%
-        \fi
-      \else
-        \addcontentsline{toc}{chapter}{%
-        \protect\numberline{\thechapter.}#1}%
-      \fi
-    \else
-      \addcontentsline{toc}{chapter}{#1}%
-    \fi
-  \else
-    \addcontentsline{toc}{chapter}{#1}%
-  \fi
-  \chaptermark{#1}%
-  \@addchapterlistsgaps
-  \if at twocolumn
-    \@topnewpage[\@makechapterhead{#2}]%
-  \else
-    \@makechapterhead{#2}%
-    \@afterheading
-  \fi}
-\newfloat at replace@chapter{svmono}{%
-  \if at chapnum  % war mal \ifnum \c at secnumdepth >\m at ne
-    \refstepcounter{chapter}%
-    \if at mainmatter
-      \typeout{\@chapapp\space\thechapter.}%
-      \addcontentsline{toc}{chapter}{\protect
-        \numberline{\thechapter\thechapterend}#1}%
-    \else
-      \addcontentsline{toc}{chapter}{#1}%
-    \fi
-  \else
-    \addcontentsline{toc}{chapter}{#1}%
-  \fi
-  \chaptermark{#1}%
-  \addtocontents{lof}{\protect\addvspace{10\p@}}%
-  \addtocontents{lot}{\protect\addvspace{10\p@}}%
-  \if at twocolumn
-    \@topnewpage[\@makechapterhead{#2}]%
-  \else
-    \@makechapterhead{#2}%
-    \@afterheading
-  \fi
-}{%
-  \if at chapnum  % war mal \ifnum \c at secnumdepth >\m at ne
-    \refstepcounter{chapter}%
-    \if at mainmatter
-      \typeout{\@chapapp\space\thechapter.}%
-      \addcontentsline{toc}{chapter}{\protect
-        \numberline{\thechapter\thechapterend}#1}%
-    \else
-      \addcontentsline{toc}{chapter}{#1}%
-    \fi
-  \else
-    \addcontentsline{toc}{chapter}{#1}%
-  \fi
-  \chaptermark{#1}%
-  \@addchapterlistsgaps
-  \if at twocolumn
-    \@topnewpage[\@makechapterhead{#2}]%
-  \else
-    \@makechapterhead{#2}%
-    \@afterheading
-  \fi}
-\newfloat at replace@chapter{dgruyter}{%
-  \let\thesection\theinchapsection
-  \let\theequation\theinchapequation
-  \let\thefigure\theinchapfigure
-  \let\thetable\theinchaptable
-  \ifx\bookDOI\@undefined
-  \else
-    \@tempcnta\numexpr\componentd at i+\@ne\relax
-    \xdef\componentd at i{\the\@tempcnta}%
-    \xdef\@DOI{%
-      https://doi.org/\bookDOI
-      -\ifx\thepage\thefrontmatterpage2\else\ifnum\@tempcnta<100 0\fi\fi
-      \ifnum\@tempcnta<10 0\fi\componentd at i}%
-  \fi
-  \ifnum \c at secnumdepth >\m at ne
-    \if at mainmatter
-      \refstepcounter{chapter}%
-      \typeout{\@chapapp\space\thechapter.}%
-      \addcontentsline{toc}{chapter}{\protect\numberline{\thechapter}#1}%
-    \else
-      \addcontentsline{toc}{schapter}{#1}%
-    \fi
-  \else
-    \addcontentsline{toc}{schapter}{#1}%
-  \fi
-  \chaptermark{#1}%
-  \addtocontents{lof}{\protect\addvspace{13\p@}}%
-  \addtocontents{lot}{\protect\addvspace{13\p@}}%
-  \if at twocolumn
-    \@topnewpage[\@makechapterhead{#2}]%
-  \else
-    \@makechapterhead{#2}%
-    \@afterheading
-  \fi
-}{%
-  \let\thesection\theinchapsection
-  \let\theequation\theinchapequation
-  \let\thefigure\theinchapfigure
-  \let\thetable\theinchaptable
-  \ifx\bookDOI\@undefined
-  \else
-    \@tempcnta\numexpr\componentd at i+\@ne\relax
-    \xdef\componentd at i{\the\@tempcnta}%
-    \xdef\@DOI{%
-      https://doi.org/\bookDOI
-      -\ifx\thepage\thefrontmatterpage2\else\ifnum\@tempcnta<100 0\fi\fi
-      \ifnum\@tempcnta<10 0\fi\componentd at i}%
-  \fi
-  \ifnum \c at secnumdepth >\m at ne
-    \if at mainmatter
-      \refstepcounter{chapter}%
-      \typeout{\@chapapp\space\thechapter.}%
-      \addcontentsline{toc}{chapter}{\protect\numberline{\thechapter}#1}%
-    \else
-      \addcontentsline{toc}{schapter}{#1}%
-    \fi
-  \else
-    \addcontentsline{toc}{schapter}{#1}%
-  \fi
-  \chaptermark{#1}%
-  \@addchapterlistsgaps
-  \if at twocolumn
-    \@topnewpage[\@makechapterhead{#2}]%
-  \else
-    \@makechapterhead{#2}%
-    \@afterheading
-  \fi}
-\ifx\newfloat at replace@chapter\newfloat at dont@replace at chapter \else
-  \newfloat at InfoNoLine{%
-    Unsupported document class, or \noexpand\@chapter\MessageBreak
-    was already redefined by another package}
-  \newfloat at InfoNoLine{\string\@chapter\space=\space\meaning\@chapter}
-  \newfloat at InfoNoLine{\string\Hy at org@chapter\space=\space\meaning\Hy at org@chapter}
-  \newfloat at ifplanb{\AtBeginDocument{%
-    \newfloat at InfoNoLine{Trying Plan B..}%
-    \let\newfloat at addtocontents@ORI\addtocontents
-    \long\def\addtocontents#1#2{%
-      \newfloat at addtocontents{#1}{#2}#2\addvspace\newfloat at nil}%
-    \long\def\newfloat at addtocontents#1#2#3\addvspace#4\newfloat at nil{%
-      \def\newfloat at tempa{#4}%
-      \ifx\newfloat at tempa\@empty
-        \newfloat at addtocontents@ORI{#1}{#2}%
-      \else
-        \ifx\newfloat at addtocontents@ext\@undefined
-          \newfloat at Info{Setting Plan B file extension to `#1'...}%
-          \xdef\newfloat at addtocontents@ext{#1}%
-        \fi
-        \edef\newfloat at tempa{#1}%
-        \ifx\newfloat at tempa\newfloat at addtocontents@ext
-          \begingroup
-            \let\addtocontents\newfloat at addtocontents@ORI
-            \@addchapterlistsgaps
-          \endgroup
-        \fi
-      \fi}}}
-\fi
-\ifcsname beamer at float\endcsname \else
-  \def\beamer at float#1{%
-    \ifcsname caption at settype\endcsname
-      \caption at settype{#1}%
-    \else
-      \def\@captype{#1}%
-    \fi
-    \par\nobreak\begin{center}\nobreak}
-  \def\end at beamer@float{%
-    \par\nobreak\end{center}}
-\fi
-\newcommand\newfloat at IfPackageLoaded[3]{%
-  \@ifpackageloaded{#1}{%
-    \newfloat@@IfPackageLoaded{#1}{#2}{#3}%
-  }{%
-    \AtBeginDocument{%
-      \@ifpackageloaded{#1}{%
-        \newfloat@@IfPackageLoaded{#1}{#2}{#3}%
-      }{}}%
-  }}
-\@onlypreamble\newfloat at IfPackageLoaded
-\newcommand\newfloat@@IfPackageLoaded[3]{%
-  \newfloat at InfoNoLine{`#1' package detected}%
-  % Execute code for every previous \DeclareFloatingEnvironment
-  \def\@elt##1{\newfloat@@@IfPackageLoaded{#1}{#2}{#3}}%
-  \newfloat@@list
-  \let\@elt\relax
-  % Execute code for every future \DeclareFloatingEnvironment
-  \newfloat at addtohook{\newfloat@@@IfPackageLoaded{#1}{#2}{#3}}}
-\@onlypreamble\newfloat@@IfPackageLoaded
-\newcommand\newfloat@@@IfPackageLoaded[3]{%
-  \ifcsname#2\endcsname
-    \newfloat at WarningNoLine{%
-      Command \@backslashchar#2 already defined.\MessageBreak
-      (`#1' package support)}%
-  \else
-    #3%
-  \fi}
-\@onlypreamble\newfloat@@@IfPackageLoaded
-\newfloat at IfPackageLoaded{dgruyter}{plist@#1}{%
-  \expandafter\newcommand\csname plist@#1\endcsname{%
-    \@nameuse{#1name}\space}}
-\newfloat at IfPackageLoaded{float}{newfloat at undefined}{%
-  \@nameuse{@ifchapterlistsgap@#1}{% if switched on
-    \let\float at do=\relax
-    \edef\@tempa{%
-      \noexpand\float at exts{\the\float at exts\float at do{\@nameuse{ext@#1}}}}%
-    \@tempa}}
-\newfloat at IfPackageLoaded{fltpage}{FP#1}{%
-  \newcounter{FP@#1C}%
-  \newenvironment{FP#1}{\FP at floatBegin{#1}}{\FP at floatEnd}}
-\providecommand*\ext at lstlisting{lol}%
-\newfloat at IfPackageLoaded{rotating}{sideways#1}{%
-  \newenvironment{sideways#1}{\@rotfloat{#1}}{\end at rotfloat}%
-  \newenvironment{sideways#1*}{\@rotdblfloat{#1}}{\end at rotdblfloat}}
-\newcommand*\newfloat at For@SC[2]{%
-  \def#1{b}% = \sidecaptionvpos{#2}{b} (v1.6)
-  \newenvironment{SC#2}%
-    {\SC at float[{#1}]{#2}}{\endSC at float}%
-  \newenvironment{SC#2*}%
-    {\SC at dblfloat[{#1}]{#2}}{\endSC at dblfloat}}
-\@onlypreamble\newfloat at For@SC
-\newfloat at IfPackageLoaded{sidecap}{SC#1}{%
-  \expandafter\newfloat at For@SC\csname SC@#1 at vpos\endcsname{#1}}
-\newfloat at IfPackageLoaded{wrapfig}{wrap#1}{%
-  \newenvironment{wrap#1}{\wrapfloat{#1}}{\endwrapfloat}}
-\endinput
-%%
-%% End of file `newfloat.sty'.

Modified: trunk/Master/tlpkg/bin/tlpkg-ctan-check
===================================================================
--- trunk/Master/tlpkg/bin/tlpkg-ctan-check	2019-11-24 00:53:56 UTC (rev 52904)
+++ trunk/Master/tlpkg/bin/tlpkg-ctan-check	2019-11-24 21:23:07 UTC (rev 52905)
@@ -299,7 +299,7 @@
     font-change font-change-xetex
     fontawesome fontawesome5 fontaxes fontbook fontch fontinst
     fontmfizz fontools
-    fonts-churchslavonic fonts-tlwg fontspec fonttable fontwrap
+    fonts-churchslavonic fonts-tlwg fontsetup fontspec fonttable fontwrap
     footbib footmisc footmisx footnotebackref footnotehyper
     footnoterange footnpag
     forarray foreign forest forest-quickstart forloop



More information about the tex-live-commits mailing list