summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/caption
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-11-24 21:23:07 +0000
committerKarl Berry <karl@freefriends.org>2019-11-24 21:23:07 +0000
commit86d1fcf155b86d95f64cb13634a6ecb6b3cabed2 (patch)
tree546bd4260076765583d55b8f90067ef94153d89f /Master/texmf-dist/source/latex/caption
parent38b88fb70bbb7d0d278d6bc2bbee04a191bd7a61 (diff)
caption (24nov19)
git-svn-id: svn://tug.org/texlive/trunk@52905 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/caption')
-rw-r--r--Master/texmf-dist/source/latex/caption/caption.dtx929
-rw-r--r--Master/texmf-dist/source/latex/caption/caption.ins15
-rw-r--r--Master/texmf-dist/source/latex/caption/caption3.dtx723
-rw-r--r--Master/texmf-dist/source/latex/caption/newfloat.dtx2074
-rw-r--r--Master/texmf-dist/source/latex/caption/subcaption.dtx6
5 files changed, 488 insertions, 3259 deletions
diff --git a/Master/texmf-dist/source/latex/caption/caption.dtx b/Master/texmf-dist/source/latex/caption/caption.dtx
index 89abe253095..3b0a3968311 100644
--- a/Master/texmf-dist/source/latex/caption/caption.dtx
+++ b/Master/texmf-dist/source/latex/caption/caption.dtx
@@ -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,46 +199,41 @@
% \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
% --------------------------------------------------------------------------- %
% \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@ifbool{documentclass}{}{%
\caption@WarningNoLine{%
- Unsupported document class (or package) detected,\MessageBreak
- usage of the caption package is not recommended}%
- \caption@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@IncompatiblePackage} to \cs{caption@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@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,15 +464,57 @@
\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@setbool{compatibility}{#1}}
+\DeclareCaptionOption{compatibility}[v1]{%
+ \caption@ifinlist{#1}{v1,1,true,yes,on}{%
+ \let\caption@ifcompatibility\@firstoftwo
+ }{\caption@ifinlist{#1}{v3,3,0,false,no,off}{%
+ \let\caption@ifcompatibility\@secondoftwo
+ }{%
+ \caption@Error{Undefined compatibility value `#1'}%
+ }}}
\@onlypreamble@key{caption}{compatibility}
% \end{macrocode}
+% \begin{macrocode}
+\caption@setbool{compatibility}{0} % default: Try not to be compatible to v1.x
+% \end{macrocode}
+%
+% \begin{macro}{\caption@setincompatible}
+% \changes{v3.4}{2019/09/09}{This macro added}
+% |\caption@setincompatible|\marg{condition}\marg{message text}
+% \begin{macrocode}
+\newcommand*\caption@setincompatible[2]{%
+ #1{%
+ \caption@WarningNoLine{%
+ #2;\MessageBreak
+ Setting compatibility to v1}%
+ \caption@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@AtBeginDocument{\caption@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@setincompatible{\@ifpackageloaded{captcont}}{captcont package is loaded}%
+% \end{macrocode}
+% To be continued\ldots
+% \begin{macrocode}
+}}
+% \end{macrocode}
%
% \begin{macrocode}
\DeclareCaptionOptionNoValue*{normal}{%
@@ -529,7 +564,7 @@
\DeclareCaptionOptionNoValue*{ruled}{\caption@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@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,21 +635,21 @@
\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@ifamsclass{%
+\caption@ifclassloaded{ams}{%
\caption@InfoNoLine{AMS or SMF document class}%
% \end{macrocode}
% \begin{macrocode}
\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@ifkomaclass{%
+\caption@ifclassloaded{koma}{%
\caption@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@ifundefined\@figurecaptionabovetrue{}{%
+ \caption@ifdefined\@figurecaptionabovetrue{%
% \end{macrocode}
% \begin{macrocode}
\g@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@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@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@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@ifundefined\cap@indent{}{\caption@setcapindent}
+ \caption@ifdefined\cap@indent{\caption@setcapindent}{}
% \end{macrocode}
%
% \begin{macro}{\setcapwidth}
@@ -749,11 +787,11 @@
% \begin{macrocode}
\newcommand*\caption@setcapwidth[1]{%
\ifx\\#1\\\else
- \caption@ifundefined\cap@margin{}{%
+ \caption@ifdefined\cap@margin{%
\def\@tempa{captionbeside}%
\ifx\@tempa\@currenvir\else\caption@Warning{%
Ignoring optional argument [#1] of \string\setcapwidth\MessageBreak}%
- \fi}%
+ \fi}{}%
\fi
\captionsetup{width=\cap@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@ProcessOptions*{caption}
% \end{macrocode}
%
-% \subsection{\cs{caption}, \cs{@caption}, and \cs{@makecaption}}
+% \section{\cs{caption}, \cs{@caption}, and \cs{@makecaption}}
%
% \begin{macro}{\caption@ifflag}
% \changes{v3.3}{2011/12/28}{This switch added}
@@ -834,7 +872,7 @@
% |\caption@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@if|\-|flag{1}| is set if |\Continued|\-|Float| was given.
+% |\caption@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@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@redefine{}
\g@addto@macro\caption@redefine{%
% \end{macrocode}
-%
-% \begin{macrocode}
- \caption@setbool{incompatible}{0}%
-% \end{macrocode}
-%
-% \begin{macrocode}
- \caption@CheckCommand\caption{%
- % ltfloat.dtx [2002/10/01 v1.1v LaTeX Kernel (Floats)]
- \def\caption{%
- \ifx\@captype\@undefined
- \@latex@error{\noexpand\caption outside float}\@ehd
- \expandafter\@gobble
- \else
- \refstepcounter\@captype
- \expandafter\@firstofone
- \fi
- {\@dblarg{\@caption\@captype}}%
- }}%
-% \end{macrocode}
-%
-% \begin{macrocode}
- \caption@CheckCommand\caption{%
- % beamerbaselocalstructure.sty,v 1.53 2007/01/28 20:48:21 tantau
- \def\caption{
- \ifx\@captype\@undefined
- \@latex@error{\noexpand\caption outside figure or table}\@ehd
- \expandafter\@gobble
- \else
- \refstepcounter\@captype
- \expandafter\@firstofone
- \fi
- {\@dblarg{\@caption\@captype}}%
- }}%
-% \end{macrocode}
-%
-% \begin{macrocode}
- \caption@CheckCommand\caption{%
- % beamerbaselocalstructure.sty, Joseph Wright committed 4ac715c 2013-09-04
- \def\caption{%
- \ifx\@captype\@undefined
- \@latex@error{\noexpand\caption outside figure or table}\@ehd
- \expandafter\@gobble
- \else
- \refstepcounter\@captype
- \expandafter\@firstofone
- \fi
- {\@dblarg{\@caption\@captype}}%
- }}%
-% \end{macrocode}
-%
-% \begin{macrocode}
- \caption@CheckCommand\caption{%
- % float.sty [2001/11/08 v1.3d Float enhancements (AL)]
- \long\def\caption{%
- \ifx\@captype\@undefined
- \@latex@error{\noexpand\caption outside float}\@ehd
- \expandafter\@gobble
- \else
- \refstepcounter\@captype
- \let\@tempf\@caption
- \expandafter\ifx\csname @float@c@\@captype\endcsname\relax\else
- \expandafter\expandafter\let
- \expandafter\@tempf\csname @float@c@\@captype\endcsname
- \fi
- \fi
- \@dblarg{\@tempf\@captype}}}%
-% \end{macrocode}
-%
-% \begin{macrocode}
- \caption@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@error{\noexpand\caption outside float}\@ehd
- \expandafter\@gobble
- \else
- \H@refstepcounter\@captype
- \@ifundefined{fst@\@captype}{%
- \let\Hy@tempa\@caption
- }{%
- \let\Hy@tempa\Hy@float@caption
- }%
- \expandafter\@firstofone
- \fi
- {\@dblarg{\Hy@tempa\@captype}}%
- }}%
-% \end{macrocode}
-% \begin{macrocode}
- \caption@CheckCommand\caption{%
- % hyperref.sty [2007/08/05 v6.76j Hypertext links for LaTeX]
- \def\caption{%
- \ifx\@captype\@undefined
- \@latex@error{\noexpand\caption outside float}\@ehd
- \expandafter\@gobble
- \else
- \H@refstepcounter\@captype
- \let\Hy@tempa\@caption
- \@ifundefined{float@caption}{%
- }{%
- \expandafter\ifx\csname @float@c@\@captype\endcsname\float@caption
- \let\Hy@tempa\Hy@float@caption
- \fi
- }%
- \expandafter\@firstofone
- \fi
- {\@dblarg{\Hy@tempa\@captype}}%
- }}%
-% \end{macrocode}
-% \begin{macrocode}
- \caption@CheckCommand\caption{%
- % memhfixc.sty [2010/08/17 v1.15 nameref/hyperref package fixes for memoir class]
- % \let\m@moldhypcaption\caption
- \long\def\caption{\donemaincaptiontrue\m@moldhypcaption}}%
-% \end{macrocode}
-% \begin{macrocode}
- \caption@IfCheckCommand{}{%
- \caption@InfoNoLine{%
- Incompatible package detected (regarding \string\caption).\MessageBreak
- \string\caption\space=\space\meaning\caption}%
- \caption@setbool{incompatible}{1}}%
-% \end{macrocode}
-%
-% \begin{macrocode}
- \caption@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@minipage
- \@setminipage
- \fi
- \normalsize
- \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par
- \endgroup}}%
-% \end{macrocode}
-%
-% \begin{macrocode}
- \caption@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@minipage
- \@setminipage
- \fi
- \beamer@makecaption{#1}{\ignorespaces #3}\par\nobreak
- \endgroup}}%
-% \end{macrocode}
-%
-% \begin{macrocode}
- \caption@CheckCommand\@caption{%
- % memhfixc.sty [2010/08/17 v1.15 nameref/hyperref package fixes for memoir class]
- \long\def\@caption#1[#2]#3{%
- \MNR@old@caption{#1}[{#2}]{#3}%
- \def\@currentlabelname{#2}%
- \M@gettitle{#2}%
- }}%
-% \end{macrocode}
-%
-% \begin{macrocode}
- \caption@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@language{\main@Arabi@language}}%
- \addcontentsline{\csname ext@#1\endcsname}{#1}%
- {\protect\numberline{\csname the#1\endcsname}{\ignorespaces \if@rl{\textRL{#2}}\else\textLR{#2}\fi}}%
- \begingroup
- \@parboxrestore
- \if@minipage
- \@setminipage
- \fi
- \normalsize
- \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces \if@rl{\textRL{#3}}\else\textLR{#3}\fi}\par
- \endgroup}}%
-% \end{macrocode}
-%
-% \begin{macrocode}
- \caption@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@minipage
- \@setminipage
- \fi
- \normalsize
- \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par
- \endgroup}}%
-% \end{macrocode}
-%
-% \begin{macrocode}
- \caption@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@minipage
- \@setminipage
- \fi
- \normalsize
- \@makecaption{\csname fnum@#1\endcsname}%
- {\ignorespaces #3}\csname par\endcsname
- \endgroup}}%
-% \end{macrocode}
-%
-% \begin{macrocode}
-% \caption@CheckCommand\float@caption{%
-% % float.sty [2001/11/08 v1.3d Float enhancements (AL)]
-% \long\def\float@caption#1[#2]#3{%
-% \addcontentsline{\@nameuse{ext@#1}}{#1}%
-% {\protect\numberline{\@nameuse{the#1}}{\ignorespaces #2}}
-% \global\setbox\@floatcapt\vbox\bgroup\@parboxrestore
-% \normalsize\@fs@capt{\@nameuse{fnum@#1}}{\ignorespaces #3}%
-% \@ifnextchar[{\float@ccon}{\egroup}}%
-% \long\def\float@ccon[#1]{#1\par\egroup}}%
-% \end{macrocode}
-%
-% \begin{macrocode}
- \caption@CheckCommand\@caption{%
- % hyperref.sty [2007/02/27 v6.75t Hypertext links for LaTeX]
- \long\def\@caption#1[#2]#3{%
- \hyper@makecurrent{\@captype}%
- \def\@currentlabelname{#2}%
- \par\addcontentsline{\csname ext@#1\endcsname}{#1}{%
- \protect\numberline{\csname the#1\endcsname}{\ignorespaces #2}%
- }%
- \begingroup
- \@parboxrestore
- \if@minipage
- \@setminipage
- \fi
- \normalsize
- \@makecaption{\csname fnum@#1\endcsname}{%
- \ignorespaces
- \ifHy@nesting
- \hyper@@anchor{\@currentHref}{#3}%
- \else
- \Hy@raisedlink{\hyper@@anchor{\@currentHref}{\relax}}#3%
- \fi
- }%
- \par
- \endgroup
- }}%
-% \end{macrocode}
-% \begin{macrocode}
- \caption@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@capstart\expandafter\endcsname
- \csname iftrue\endcsname
- \global\let\@currentHref\hc@currentHref
- \else
- \hyper@makecurrent{\@captype}%
- \fi
- \def\@currentlabelname{#2}%
- \par\addcontentsline{\csname ext@#1\endcsname}{#1}{%
- \protect\numberline{\csname the#1\endcsname}{\ignorespaces #2}%
- }%
- \begingroup
- \@parboxrestore
- \if@minipage
- \@setminipage
- \fi
- \normalsize
- \expandafter\ifx\csname if@capstart\expandafter\endcsname
- \csname iftrue\endcsname
- \global\@capstartfalse
- \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces#3}%
- \else
- \@makecaption{\csname fnum@#1\endcsname}{%
- \ignorespaces
- \ifHy@nesting
- \hyper@@anchor{\@currentHref}{#3}%
- \else
- \Hy@raisedlink{\hyper@@anchor{\@currentHref}{\relax}}#3%
- \fi
- }%
- \fi
- \par
- \endgroup
- }}%
-% \end{macrocode}
-% \begin{macrocode}
- \caption@CheckCommand\@caption{%
- % hyperref.sty [2009/11/27 v6.79k Hypertext links for LaTeX]
- \long\def\@caption#1[#2]#3{%
- \expandafter\ifx\csname if@capstart\expandafter\endcsname
- \csname iftrue\endcsname
- \global\let\@currentHref\hc@currentHref
- \else
- \hyper@makecurrent{\@captype}%
- \fi
- \def\@currentlabelname{#2}%
- \par\addcontentsline{\csname ext@#1\endcsname}{#1}{%
- \protect\numberline{\csname the#1\endcsname}{\ignorespaces #2}%
- }%
- \begingroup
- \@parboxrestore
- \if@minipage
- \@setminipage
- \fi
- \normalsize
- \expandafter\ifx\csname if@capstart\expandafter\endcsname
- \csname iftrue\endcsname
- \global\@capstartfalse
- \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces#3}%
- \else
- \@makecaption{\csname fnum@#1\endcsname}{%
- \ignorespaces
- \ifHy@nesting
- \expandafter\hyper@@anchor\expandafter{\@currentHref}{#3}%
- \else
- \Hy@raisedlink{%
- \expandafter\hyper@@anchor\expandafter{\@currentHref}{\relax}%
- }%
- #3%
- \fi
- }%
- \fi
- \par
- \endgroup
- }}%
-% \end{macrocode}
-% \begin{macrocode}
- \caption@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@capstart\expandafter\endcsname
- \csname iftrue\endcsname
- \global\let\@currentHref\hc@currentHref
- \else
- \hyper@makecurrent{\@captype}%
- \fi
- \@ifundefined{NR@gettitle}{%
- \def\@currentlabelname{#2}%
- }{%
- \NR@gettitle{#2}%
- }%
- \par\addcontentsline{\csname ext@#1\endcsname}{#1}{%
- \protect\numberline{\csname the#1\endcsname}{\ignorespaces #2}%
- }%
- \begingroup
- \@parboxrestore
- \if@minipage
- \@setminipage
- \fi
- \normalsize
- \expandafter\ifx\csname if@capstart\expandafter\endcsname
- \csname iftrue\endcsname
- \global\@capstartfalse
- \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces#3}%
- \else
- \@makecaption{\csname fnum@#1\endcsname}{%
- \ignorespaces
- \ifHy@nesting
- \expandafter\hyper@@anchor\expandafter{\@currentHref}{#3}%
- \else
- \Hy@raisedlink{%
- \expandafter\hyper@@anchor\expandafter{%
- \@currentHref
- }{\relax}%
- }%
- #3%
- \fi
- }%
- \fi
- \par
- \endgroup
- }}%
-% \end{macrocode}
-%
-% \begin{macrocode}
- \caption@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@CheckCommand\@caption{%
- % nameref.sty [2009/11/27 v2.32 Cross-referencing by name of section]
- \long\def\@caption#1[#2]{%
- \NR@gettitle{#2}%
- \NR@@caption{#1}[{#2}]%
- }}%
-% \end{macrocode}
-%
-% \begin{macrocode}
- \caption@CheckCommand\@caption{%
- % subfigure.sty [2002/07/30 v2.1.4 subfigure package]
- \long\def\@caption#1[#2]#3{%
- \@ifundefined{if#1topcap}%
- {\subfig@oldcaption{#1}[{#2}]{#3}}%
- {\@nameuse{if#1topcap}%
- \@listsubcaptions{#1}%
- \subfig@oldcaption{#1}[{#2}]{#3}%
- \else
- \subfig@oldcaption{#1}[{#2}]{#3}%
- \@listsubcaptions{#1}%
- \fi}}}%
-% \end{macrocode}
-%
-% \begin{macrocode}
- \caption@CheckCommand\@caption{%
- % subfig.sty [2005/06/28 ver: 1.3 subfig package]
- \def\@caption{\caption@}%
-% \long\def\caption@#1[#2]#3{%
-% \@ifundefined{caption@setfloattype}%
-% \caption@settype
-% \caption@setfloattype
-% \@captype
-% \sf@ifpositiontop{%
-% \@listsubcaptions{#1}%
-% \sf@old@caption{#1}[{#2}]{#3}%
-% }{%
-% \sf@old@caption{#1}[{#2}]{#3}%
-% \@listsubcaptions{#1}%
-% }}%
- }%
-% \end{macrocode}
-%
-% \begin{macrocode}
- \caption@CheckCommand\@caption{%
- % chkfloat.sty [2012/08/19 v0.1 chkfloat: check for moved floats]
- \def\@caption#1[#2]#3{\chkfloat@caption{#1}[#2]{#3}%
- \addtocontents{fof}{\protect\chkfloat@{\thepage}{\chkfloat@page}{\csname fnum@#1\endcsname: #2}}%
- }}%
-% \end{macrocode}
-% \begin{macrocode}
- \caption@CheckCommand\@caption{%
- % chkfloat.sty [20??/??/?? v0.? chkfloat: check for moved floats]
- \def\@caption#1[#2]#3{\chkfloat@caption{#1}[{#2}]{#3}%
- \chkfloat@addcontentsline{#1}{#2}%
- }}%
-% \end{macrocode}
-%
-% \begin{macrocode}
- \caption@IfCheckCommand{}{%
- \caption@InfoNoLine{%
- Incompatible package detected (regarding \string\@caption).\MessageBreak
- \string\@caption\space=\space\meaning\@caption}%
- \caption@setbool{incompatible}{1}}%
-% \end{macrocode}
-%
-% The option |compatibility=| will override the compatibility mode.
-% \begin{macrocode}
- \caption@ifundefined\caption@ifcompatibility
- {\let\caption@ifcompatibility\caption@ifincompatible
- \let\caption@tempa\caption@WarningNoLine}%
- {\let\caption@tempa\@gobble}% suppress warning
-% \end{macrocode}
-%
% \begin{macrocode}
\caption@ifcompatibility{%
% \end{macrocode}
-%
% \begin{macrocode}
- \caption@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@InfoNoLine{
+ \noexpand\caption will not be redefined since `compatibility' is set to v1}%
% \end{macrocode}
-%
% \begin{macrocode}
\renewcommand*\caption@redefine{}%
% \end{macrocode}
%
-% |\ContinuedFloat| is not supported in compatibility mode.
+% |\continuedfloat| is not supported in compatibility mode.
% \begin{macrocode}
- \renewcommand*\caption@ContinuedFloatX[1]{%
+ \renewcommand*\caption@continuedfloat[1]{%
\caption@Error{Not available in compatibility mode}}%
% \end{macrocode}
%
@@ -1544,10 +1101,10 @@
% \begin{macrocode}
\caption@AtBeginDocument*{%
\let\caption@start\relax
- \caption@ifundefined\caption@ORI@capstart{}{%
+ \caption@ifdefined\caption@ORI@capstart{%
\caption@Debug{%
Restore hypcap definition of \string\capstart\@gobble}%
- \let\capstart\caption@ORI@capstart}%
+ \let\capstart\caption@ORI@capstart}{}%
}%
% \end{macrocode}
%
@@ -1562,22 +1119,12 @@
}{%
% \end{macrocode}
%
-% \begin{macrocode}
- \caption@ifincompatible{%
- \caption@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}
\renewcommand*\caption@redefine{%
\let\caption\caption@caption
\let\@caption\caption@@caption}%
- \caption@redefine
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1586,6 +1133,7 @@
}%
% \end{macrocode}
% \begin{macrocode}
+ \caption@redefine
\caption@AtBeginDocument*{%
\let\caption@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@iftype{%
- \caption@ifundefined\@captype\@secondoftwo\@firstoftwo}
+\newcommand*\caption@iftype{\caption@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@ContinuedFloat} now}
% \changes{v3.3}{2013/05/01}{Usage of \cs{caption@restorecounters} added}
% \changes{v3.3}{2013/12/16}{Bugfix: Does not use \cs{caption@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@reset|\-|Continued|\-|Float| to |\@gobble| so the
+% Furthermore we set |\caption@reset|\-|continued|\-|float| to |\@gobble| so the
% continuation counter will not be reset to zero inside |\caption@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,57 +1554,80 @@
% \Note{This does not help if the \package{hyperref} package option
% \texttt{naturalnames=true} is set.}
% \begin{macrocode}
-\def\ContinuedFloat{%
+\def\continuedfloat{%
\caption@iftype
- {\caption@ContinuedFloatX\@captype}%
- {\caption@Error{\noexpand\ContinuedFloat outside float}}}
+ {\caption@continuedfloat\@captype}%
+ {\caption@Error{\noexpand\continuedfloat outside float}}}
% \end{macrocode}
% \begin{macrocode}
-\newcommand*\caption@ContinuedFloatX[1]{%
+\newcommand*\caption@continuedfloat[1]{%
\@ifstar
{\caption@@refstepcounter\@captype
- \caption@@ContinuedFloat{#1}}%
- {\caption@Continued@Float{#1}}}
+ \caption@@continuedfloat{#1}}%
+ {\caption@continued@float{#1}}}
% \end{macrocode}
% \begin{macrocode}
-\newcommand*\caption@Continued@Float[1]{%
+\newcommand*\caption@continued@float[1]{%
\edef\caption@tempa{#1}%
\ifx\caption@tempa\caption@CFtype
\caption@restorecounters
- \caption@@ContinuedFloat{#1}%
+ \caption@@continuedfloat{#1}%
\else
\caption@Error{Continued `#1' after `\caption@CFtype'}%
\fi}
% \end{macrocode}
% \begin{macrocode}
-\newcommand*\caption@@ContinuedFloat{%
- \caption@setflag1% ContinuedFloat
- \caption@@@ContinuedFloat}
-\newcommand*\caption@@@ContinuedFloat{%
- \stepcounter{ContinuedFloat}%
- \caption@@@@ContinuedFloat}
+\newcommand*\caption@@continuedfloat{%
+ \caption@setflag1% continued float
+ \caption@@@continuedfloat}
+\newcommand*\caption@@@continuedfloat{%
+ \stepcounter{continuedfloat}%
+ \caption@@@@continuedfloat}
% \end{macrocode}
% \begin{macrocode}
-\newcommand*\caption@@@@ContinuedFloat[1]{%
- \caption@setoptions{ContinuedFloat}%
+\newcommand*\caption@@@@continuedfloat[1]{%
+ \caption@setoptions{ContinuedFloat}% for compatibility reasons
+ \caption@setoptions{continuedfloat}%
\caption@setoptions{continued#1}%
- \expandafter\l@addto@macro\csname the#1\endcsname\theContinuedFloat
+ \expandafter\l@addto@macro\csname the#1\endcsname\thecontinuedfloat
\@ifundefined{theH#1}{}{%
\expandafter\l@addto@macro\csname theH#1\endcsname{%
- \@alph\c@ContinuedFloat}}%
- \let\caption@@@@ContinuedFloat\@gobble}
+ \@alph\c@continuedfloat}}%
+ \let\caption@@@@continuedfloat\@gobble}
% \end{macrocode}
% \begin{macrocode}
\newcommand*\caption@CFtype{??}
% \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@ContinuedFloat\c@continuedfloat % defined for compatibility reasons
+\def\thecontinuedfloat{\theContinuedFloat}
+\let\theContinuedFloat\@empty % defined for compatibility reasons
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\caption@reset@continuedfloat}
+% \changes{v3.2f}{2011/12/17}{Redefinition of \cs{continuedfloat} added}
+% |\caption@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@reset@continuedfloat[1]{%
+ \xdef\caption@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}
%
@@ -2067,20 +1638,8 @@
% This one is used by \cs{ContinuedFloat} offered by the \package{subfig} package.
% \begin{macrocode}
\def\caption@ContinuedFloat{%
- \let\caption@resetContinuedFloat\@gobble
- \caption@@@ContinuedFloat}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\caption@resetContinuedFloat}
-% \changes{v3.2f}{2011/12/17}{Redefinition of \cs{ContinuedFloat} added}
-% |\caption@resetContinuedFloat|\marg{type}\par
-% If a continuation counter is defined, we reset it.
-% (This one will be called inside |\@caption|.)
-% \begin{macrocode}
-\newcommand*\caption@resetContinuedFloat[1]{%
- \xdef\caption@CFtype{#1}%
- \@stpelt{ContinuedFloat}}
+ \let\caption@reset@continuedfloat\@gobble
+ \caption@@@continuedfloat}
% \end{macrocode}
% \end{macro}
%
@@ -2089,14 +1648,14 @@
% 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@restore|\-|counters|
-% inside |\Continued|\-|Float|.
+% inside |\continued|\-|float|.
% \begin{macrocode}
-\caption@ifundefined\donemaincaptionfalse{}{%
- \g@addto@macro\donemaincaptionfalse\caption@savesubcounters}
+\caption@ifdefined\donemaincaptionfalse{%
+ \g@addto@macro\donemaincaptionfalse\caption@savesubcounters}{}
% \end{macrocode}
% \end{macro}
%
-% \subsection{Internal helpers}
+% \section{Internal helpers}
%
% \begin{macro}{\caption@refstepcounter}
% \changes{v3.1}{2007/07/28}{This macro added}
@@ -2129,9 +1688,9 @@
% \end{macrocode}
% \begin{macrocode}
\newcommand*\caption@ref@stepcounter{%
- \caption@ifflag1{% ContinuedFloat
+ \caption@ifflag1{% continued float
\let\caption@tempa\caption@@refcounter
- \caption@clrflag1% ContinuedFloat
+ \caption@clrflag1% continued float
}{%
\let\caption@tempa\caption@@refstepcounter
\caption@ifflag2{}{% caption
@@ -2168,7 +1727,7 @@
% \begin{macrocode}
\newcommand*\caption@prepare@stepcounter[2]{%
\caption@addsubcontentslines{#2stepcounter}%
- \caption@resetContinuedFloat{#1}}
+ \caption@reset@continuedfloat{#1}}
% \end{macrocode}
% \begin{macrocode}
\newcommand*\caption@@@refstepcounter{\refstepcounter}
@@ -2207,8 +1766,7 @@
% \changes{v3.0a}{2004/01/23}{\cs{caption@settype} changed to \cs{caption@setfloattype}}
% \changes{v3.0e}{2005/04/12}{Check for default label format added}
% \changes{v3.0f}{2005/06/11}{Usage of \cs{caption@resetContinuedFloat} added}
-% \changes{v3.1}{2007/05/09}{Usage of \cs{caption@setfloattype} \&
-% \cs{caption@resetContinuedFloat} removed}
+% \changes{v3.1}{2007/05/09}{Usage of \cs{caption@setfloattype} \& \cs{caption@resetContinuedFloat} removed}
% \changes{v3.3}{2011/12/29}{Usage of \cs{caption@fixedposition} removed}
% Our handling of |\caption| will always be surrounded by
% |\caption@begin| (or |\caption@beginex|) and |\caption@end|.\par
@@ -2389,13 +1947,13 @@
% This one is needed for support of the \package{nameref} package.
% \begin{macrocode}
\newcommand\caption@gettitle[1]{%
- \caption@ifundefined\NR@gettitle
- {\def\@currentlabelname{#1}}%
- {\NR@gettitle{#1}}}
+ \caption@ifdefined\NR@gettitle
+ {\NR@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@DeclareSubType}
@@ -2417,9 +1975,9 @@
% Initialize the sub-captions defined with \cs{newsubfloat}\cite{subfig}\ldots
% \begin{macrocode}
\caption@AtBeginDocument*{%
- \caption@ifundefined\sf@counterlist{}{%
+ \caption@ifdefined\sf@counterlist{%
\@for\sf@temp:=\sf@counterlist\do{%
- \expandafter\caption@DeclareSubType\sf@temp\@nil}}}
+ \expandafter\caption@DeclareSubType\sf@temp\@nil}}{}}
% \end{macrocode}
%
% \begin{macro}{\caption@subtypehook}
@@ -2449,7 +2007,7 @@
\let\caption@addsubcontentslines\@gobble
\caption@ifflag4{}{% subcaption
% no \subcaption in this part of the (floating) environment yet
- \caption@ifflag1{% ContinuedFloat
+ \caption@ifflag1{% continued float
\caption@clrflag1%
}{%
\caption@@stepcounter\@captype
@@ -2459,7 +2017,7 @@
}%
% \end{macrocode}
% \begin{macrocode}
- \c@ContinuedFloat=0\relax
+ \c@continuedfloat=0\relax
\let\caption@setfloatcapt\@firstofone
\let\caption@chkfloat\@gobbletwo
% \end{macrocode}
@@ -2474,7 +2032,7 @@
% redefine \setcaptiontype
\def\caption@settype{\caption@withoptargs\caption@sub@settype}%
\def\caption@sub@settype##1##2{%
- \def\caption@tempa{##2}%
+ \edef\caption@tempa{##2}%
\ifx\caption@tempa\@captype
%%% \caption@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@ifundefined\chapter{}{%
- \let\caption@chapter@ORI\chapter
- \def\chapter{%
- \caption@addsubcontentslines{chapter}\caption@chapter@ORI}}}
+\AtBeginDocument{%
+% \end{macrocode}
+% \begin{macrocode}
+ \caption@ifdefined\chapter{%
+ \let\caption@chapter@ORI\chapter
+ \def\chapter{%
+ \caption@addsubcontentslines{chapter}\caption@chapter@ORI}}{}%
% \end{macrocode}
% Same for \cs{appendix}.
% \begin{macrocode}
-\AtBeginDocument{\caption@ifundefined\appendix{}{%
- \let\caption@appendix@ORI\appendix
- \def\appendix{%
- \caption@addsubcontentslines{appendix}\caption@appendix@ORI}}}
+ \caption@ifdefined\appendix{%
+ \let\caption@appendix@ORI\appendix
+ \def\appendix{%
+ \caption@addsubcontentslines{appendix}\caption@appendix@ORI}}{}%
% \end{macrocode}
% Flush the list of pending sub-caption list entries at the end of the document.
% \begin{macrocode}
-\AtEndDocument{%
- \caption@addsubcontentslines{AtEndDocument}}
+ \caption@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@ifundefined\smf@makecaption{}{\let\smf@makecaption\@makecaption}
+\caption@ifdefined\smf@makecaption{\let\smf@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@ORI@table\figure
+ \let\caption@ORI@table\table
\def\table{\caption@settype{table}\caption@ORI@table}
% \end{macrocode}
% \end{macro}
@@ -2669,18 +2233,18 @@
}{}
% \end{macrocode}
%
-% \subsubsection{The \KOMAScript{} classes}
+% \subsection{The \KOMAScript{} classes}
%
% \KOMAScript\ contains the code
% |\AtBeginDocument{\let\scr@caption\caption}|
% so we need to update |\scr@caption| here, too.
%
% \begin{macrocode}
-\caption@ifundefined\scr@caption{}{%
- \caption@AtBeginDocument{\let\scr@caption\caption}}
+\caption@ifdefined\scr@caption{%
+ \caption@AtBeginDocument{\let\scr@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@frenchb}\@nameundef{caption@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@AtBeginDocument{\caption@ifundefined\frenchTeXmods{}{%
+\caption@AtBeginDocument{\caption@ifdefined\frenchTeXmods{%
\caption@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@ifundefined\GOfrench
- {\let\caption@tempa\@firstofone}%
+ \caption@ifdefined\GOfrench
{\def\caption@tempa{\g@addto@macro\GOfrench}}%
+ {\let\caption@tempa\@firstofone}%
\caption@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@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@freeze{%
- \let\caption@frozen@ContinuedFloat\ContinuedFloat
- \def\ContinuedFloat{%
- \caption@@freeze{\caption@@@@ContinuedFloat\@captype}%
- \caption@frozen@ContinuedFloat}%
+ \let\caption@frozen@continuedfloat\continuedfloat
+ \def\continuedfloat{%
+ \caption@@freeze{\caption@@@@continuedfloat\@captype}%
+ \caption@frozen@continuedfloat}%
% \end{macrocode}
% \begin{macrocode}
\let\caption@frozen@setup\caption@setup
@@ -2930,7 +2494,7 @@
% \end{macrocode}
% \begin{macrocode}
\def\caption@warmup{%
- \let\ContinuedFloat\caption@frozen@ContinuedFloat
+ \let\continuedfloat\caption@frozen@continuedfloat
\let\caption@setup\caption@frozen@setup
\let\caption\caption@frozen@caption
\let\label\caption@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@chkfloat}
% \changes{v3.3}{2018/09/06}{This macro added}
% \begin{macrocode}
- \caption@ifundefined\chkfloat@addcontentsline{%
- \renewcommand\caption@chkfloat[2]{%
- \caption@ifundefined\chkfloat@page{}{%
- \addtocontents{fof}{\protect\chkfloat@{\thepage}{\chkfloat@page}{\csname fnum@#1\endcsname: #2}}}}%
- }{%
+ \caption@ifdefined\chkfloat@addcontentsline{%
\renewcommand\caption@chkfloat{\chkfloat@addcontentsline}%
+ }{%
+ \renewcommand\caption@chkfloat[2]{%
+ \caption@ifdefined\chkfloat@page{%
+ \addtocontents{fof}{\protect\chkfloat@{\thepage}{\chkfloat@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@ifundefined\HyOrg@float@makebox
- {\let\caption@ORI@float@makebox\float@makebox}%
+ \caption@ifdefined\HyOrg@float@makebox
{\let\caption@ORI@float@makebox\HyOrg@float@makebox}%
+ {\let\caption@ORI@float@makebox\float@makebox}%
\renewcommand\float@makebox[1]{%
\caption@ORI@float@makebox{#1\relax \caption@defrostHref}}%
% \end{macrocode}
@@ -3230,7 +2795,7 @@
\caption@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@makecurrent} instead of
% \cs{theHfigure} as indicator for \package{hyperref} package}
@@ -3559,7 +3124,7 @@
% instead of \texttt{xxx} now}
% |\caption@makestart|\marg{type}
% defines a \package{hyperref} anchor inside |\caption@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@listentry\LTcaptype}% gobble *
{\egroup\LT@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@makecurrent}}
% \begin{macrocode}
@@ -3917,24 +3482,24 @@
% \def\hyper@makecurrent####1{%
%% \let\@currentHlabel\Hy@LT@currentHlabel
% \let\@currentHref\Hy@LT@currentHref}}%
-% \let\caption@ORI@ContinuedFloat\ContinuedFloat
-% \def\ContinuedFloat{\noalign{%
+% \let\caption@ORI@continuedfloat\continuedfloat
+% \def\continuedfloat{\noalign{%
% \gdef\caption@setContinuedFloat{%
-% \let\caption@resetContinuedFloat\@gobble}%
+% \let\caption@reset@continuedfloat\@gobble}%
% \def\caption@setoptions####1{%
% \g@addto@macro\caption@setContinuedFloat{%
% \caption@setoptions{####1}}}%
% \let\@captype\LTcaptype
% \caption@ORI@ContinuedFloat}}%
% }{%
-% \def\ContinuedFloat{\noalign{%
+% \def\continuedfloat{\noalign{%
% \caption@Error{%
-% \noexpand\ContinuedFloat inside longtables\MessageBreak
+% \noexpand\continuedfloat inside longtables\MessageBreak
% is only available with `hypcap=true'}}}%
% }%
% \global\let\caption@setContinuedFloat\@empty
- \def\ContinuedFloat{\noalign{%
- \caption@Error{\noexpand\ContinuedFloat outside float}}}%
+ \def\continuedfloat{\noalign{%
+ \caption@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@ifundefined\FBifcaptop{}{%
- \let\caption@belowskip\@empty}%
+ \caption@ifdefined\FBifcaptop{%
+ \let\caption@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@IfPackageLoaded{rotating}[1995/08/22 v2.10]{%
@@ -4398,7 +3963,7 @@
}{}
% \end{macrocode}
%
-% \subsubsection{The sidecap package}
+% \subsection{The sidecap package}
%
% \begin{macrocode}
\caption@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@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}
%
diff --git a/Master/texmf-dist/source/latex/caption/caption.ins b/Master/texmf-dist/source/latex/caption/caption.ins
index 21368b18504..45381b84026 100644
--- a/Master/texmf-dist/source/latex/caption/caption.ins
+++ b/Master/texmf-dist/source/latex/caption/caption.ins
@@ -25,16 +25,13 @@ 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
+ 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 @@ and the user manuals
\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 @@ and the user manuals
\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'}
diff --git a/Master/texmf-dist/source/latex/caption/caption3.dtx b/Master/texmf-dist/source/latex/caption/caption3.dtx
index bdffdcc66a1..59e24f0fc1a 100644
--- a/Master/texmf-dist/source/latex/caption/caption3.dtx
+++ b/Master/texmf-dist/source/latex/caption/caption3.dtx
@@ -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@subsection{\@dottedtocline{2}{1.5em}{2.3em}}
\renewcommand*\l@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@FixArabTeX{%
@@ -223,7 +213,7 @@
\let\caption@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@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@ifundefined[1]{%
\ifx#1\@undefined
@@ -300,6 +290,22 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\caption@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@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@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@CheckCommand}
-% \changes{v1.1}{2007/04/10}{This macro added}
-% \begin{macro}{\caption@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@tempa} instead of \cs{@tempa}}
-% |\caption@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@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@CheckCommand| is |\@gobbletwo| and
-% restores the starting definition of |\caption@CheckCommand|.)
-% \begin{macrocode}
-\newcommand\caption@DoCheckCommand[2]{%
- \begingroup
- \let\caption@tempa#1%
- #2%
- \ifx\caption@tempa#1%
- \endgroup
- \let\caption@CheckCommand\@gobbletwo
- \else
- \endgroup
- \fi}
-\@onlypreamble\caption@DoCheckCommand
-% \end{macrocode}
-% \begin{macrocode}
-\let\caption@CheckCommand\caption@DoCheckCommand
-\@onlypreamble\caption@CheckCommand
-% \end{macrocode}
-% \begin{macrocode}
-\newcommand*\caption@IfCheckCommand{%
- \ifx\caption@CheckCommand\@gobbletwo
- \let\caption@CheckCommand\caption@DoCheckCommand
- \expandafter\@firstoftwo
- \else
- \expandafter\@secondoftwo
- \fi}
-\@onlypreamble\caption@IfCheckCommand
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
% \begin{macro}{\caption@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@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@indent}
% \changes{v1.1}{2007/07/29}{Renamed from \cs{captionindent} to \cs{caption@indent}}
@@ -1404,59 +1363,7 @@
\l@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!)}
-%
-% There is an option clash between the \KOMAScript\ document classes
-% and the \package{caption} kernel, both define the options |parindent| and
-% |parskip| but with different meaning.
-% Furthermore the ones defined by the \package{caption} kernel take a
-% value as parameter but the \KOMAScript\ ones do not.
-% So we need special versions of the options |parindent| and |parskip| here
-% which determine if a value is given (and therefore should be treated as
-% our option) or not (and therefore should be ignored by us).\footnote{%^^A
-% This problem was completely solved due a change of \cs{caption@ProcessOptions}
-% in \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@ifkomaclass{%
- \caption@ifundefined\scr@caption\@gobble\@firstofone}
-\@onlypreamble\caption@ifkomaclass
-% \end{macrocode}
-% \begin{macrocode}
-\caption@ifkomaclass{%
-% \end{macrocode}
-% \begin{macrocode}
- \let\caption@KV@parindent\KV@caption@parindent
- \DeclareCaptionOption{parindent}[]{%
- \ifx,#1,%
- \caption@Debug{Option `parindent' ignored}%
- \else
- \caption@KV@parindent{#1}%
- \fi}%
-% \end{macrocode}
-% \begin{macrocode}
- \let\caption@KV@parskip\KV@caption@parskip
- \DeclareCaptionOption{parskip}[]{%
- \ifx,#1,%
- \caption@Debug{Option `parskip' ignored}%
- \else
- \caption@KV@parskip{#1}%
- \fi}%
-% \end{macrocode}
-% \begin{macrocode}
-}
-% \end{macrocode}
-%
-% \subsection{Styles}
+% \section{Styles}
%
% \begin{macro}{\DeclareCaptionStyle}
% \changes{v1.0a}{2004/01/17}{Pass through argument \#3 so extra spaces
@@ -1564,7 +1471,7 @@
\DeclareCaptionOption{slc}[1]{\KV@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@box@default{\caption@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@lfmt@default{\caption@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@set@default@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@ifundefined\setspace@singlespace{}{%
- \setstretch\setspace@singlespace}}% normally 1
+ \caption@ifdefined\setspace@singlespace{%
+ \setstretch\setspace@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@set@bool\caption@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@set@default@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}
-%
-% \subsubsection{The standard \texorpdfstring{\LaTeX{}}{LaTeX} classes}
+% \section{Document classes \& Babel support}
%
+% \begin{macro}{\caption@ifdocumentclass}
+% Boolean switch which is set if the document class could be detected successfully,
+% i.e. |\caption@document|\-|class| is set to a proper value.
+% (If |\caption@document|\-|class| is already set, this flag will also be set.)
% \begin{macrocode}
-\caption@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@xt@\hsize{\hfil\box\@tempboxa\hfil}%
- \fi
- \vskip\belowcaptionskip}}
+\caption@setbool{documentclass}{1}
% \end{macrocode}
+% \end{macro}
%
-% \subsubsection{The elsarticle classes}
-% \changes{v1.5}{2013/01/06}{elsarticle class support added}
-%
-% \begin{macro}{\caption@ifelsarticleclass}
+% \begin{macro}{\caption@documentclass}
+% \changes{v1.8e}{2018/05/11}{This macro added}
+% Determine document class used.
+% Set |\caption@document|\-|class| by good-guessing, if not already set.
% \begin{macrocode}
-\providecommand*\caption@ifelsarticleclass{%
- \@ifclassloaded{elsarticle}\@firstofone\@gobble}
-\@onlypreamble\caption@ifelsarticleclass
+\caption@ifundefined\caption@documentclass{%
+% \end{macrocode}
+% \begin{macrocode}
+ \@ifclassloaded{beamer}{%
+ \caption@InfoNoLine{beamer document class detected}%
+ \def\caption@documentclass{beamer}%
% \end{macrocode}
-% \end{macro}
-%
% \begin{macrocode}
-\caption@ifelsarticleclass{%
+ }{\@ifclassloaded{elsarticle}{%
+ \caption@InfoNoLine{elsarticle document class detected}%
+ \def\caption@documentclass{elsarticle}%
% \end{macrocode}
% \begin{macrocode}
- \caption@CheckCommand\@makecaption{%
- % elsarticle.cls,v 1.20 2008-10-13 04:24:12 cvr Exp
- \long\def\@makecaption#1#2{%
- \vskip\abovecaptionskip\footnotesize
+ }{\@ifclassloaded{memoir}{%
+ \caption@InfoNoLine{memoir document class detected}%
+ \def\caption@documentclass{memoir}%
+% \end{macrocode}
+% \begin{macrocode}
+ }{\caption@ifdefined\scr@caption{%
+ \caption@InfoNoLine{KOMA-Script document class detected}%
+ \def\caption@documentclass{koma}%
+% \end{macrocode}
+% If |\@captionheadfont| is defined, we assume it's a AMS or SMF document class.
+% \begin{macrocode}
+ }{\caption@ifdefined\@captionheadfont{%
+ \caption@InfoNoLine{AMS or SMF document class detected}%
+ \def\caption@documentclass{ams}%
+% \end{macrocode}
+% If |\@CaptionFonts| is defined, we assume it's a NTG Dutch document class.
+% \begin{macrocode}
+ }{\caption@ifdefined\CaptionFonts{%
+ \caption@InfoNoLine{NTG document class detected}%
+ \def\caption@documentclass{ntg}%
+% \end{macrocode}
+% If |\cph@font| and |\cpb@font| are defined, we assume it's a NTG Dutch document class.
+% \begin{macrocode}
+ }{\caption@ifdefined\cph@font{%
+ \caption@ifdefined\cpb@font\@firstoftwo\@secondoftwo
+ }{%
+ \@secondoftwo
+ }{%
+ \caption@InfoNoLine{thesis document class detected}%
+ \def\caption@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@tempa#1#2{%
+ \vskip\abovecaptionskip
\sbox\@tempboxa{#1: #2}%
\ifdim \wd\@tempboxa >\hsize
#1: #2\par
@@ -2705,98 +2641,68 @@
\hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
\fi
\vskip\belowcaptionskip}}
+ \ifx\caption@tempa\@makecaption
+ \caption@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@document|\-|class| is not correct.)
% \begin{macrocode}
- \DeclareCaptionDefaultFont{font}{\footnotesize}
+ \caption@InfoNoLine{%
+ Unknown document class (or package),\MessageBreak
+ standard defaults will be used}%
+ \caption@InfoNoLine{\string\@makecaption\space=\space\meaning\@makecaption\@gobble}%
+ \caption@setbool{documentclass}{0}%
+ \fi
+ \def\caption@documentclass{base}%
+ }}}}}}%
+}{}
% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\caption@ifclassloaded}
+% \changes{v1.8e}{2019/09/09}{This macro added}
+% |\caption@ifclassloaded|\marg{name}\marg{yes-code}\marg{no-code}
% \begin{macrocode}
-}
+\newcommand*\caption@ifclassloaded[1]{%
+ \edef\caption@tempa{#1}%
+ \ifx\caption@tempa\caption@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}
+%
+% 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{macro}{\caption@ifamsclass}
% \begin{macrocode}
-\providecommand*\caption@ifamsclass{%
- \caption@ifundefined\@captionheadfont\@gobble\@firstofone}
-\@onlypreamble\caption@ifamsclass
+\caption@ifclassloaded{elsarticle}{%
% \end{macrocode}
-% \end{macro}
-%
% \begin{macrocode}
-\caption@ifamsclass{%
+ \DeclareCaptionDefaultFont{font}{\footnotesize}
% \end{macrocode}
% \begin{macrocode}
- \caption@CheckCommand\@makecaption{%
- % amsart|amsproc|amsbook [2004/08/06 v2.20]
- \long\def\@makecaption#1#2{%
- \setbox\@tempboxa\vbox{\color@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@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@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@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@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@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@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@ifclassloaded{ams}{%
% \end{macrocode}
% \begin{macrocode}
\let\captionmargin\captionindent % set to 3pc by AMS class
\begingroup\edef\@tempa{\endgroup
\noexpand\caption@g@addto@list\noexpand\caption@sty@default
{margin=\the\captionmargin
- \caption@ifundefined\smf@makecaption{}{,maxmargin=.1\linewidth}}}
+ \caption@ifdefined\smf@makecaption{,maxmargin=.1\linewidth}{}}}
\@tempa
\caption@g@addto@list\caption@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,33 +2724,8 @@
% \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@ifbeamerclass}
-% \begin{macrocode}
-\providecommand*\caption@ifbeamerclass{%
- \@ifclassloaded{beamer}\@firstofone\@gobble}
-\@onlypreamble\caption@ifbeamerclass
-% \end{macrocode}
-% \end{macro}
-%
% \begin{macrocode}
-\caption@ifbeamerclass{%
-% \end{macrocode}
-% \begin{macrocode}
- \caption@CheckCommand\beamer@makecaption{%
- % beamerbaselocalstructure.sty,v 1.53 2007/01/28 20:48:21 tantau
- \long\def\beamer@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@xt@\hsize{\hfil\box\@tempboxa\hfil}%
- \fi
- \nobreak\vskip\belowcaptionskip\nobreak}}
+\caption@ifclassloaded{beamer}{%
% \end{macrocode}
%
% \begin{macro}{\caption@ifbeamertemplate}
@@ -2926,38 +2807,14 @@
% \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@ifkomaclass}
% \begin{macrocode}
-\providecommand*\caption@ifkomaclass{%
- \caption@ifundefined\scr@caption\@gobble\@firstofone}
-\@onlypreamble\caption@ifkomaclass
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macrocode}
-\caption@ifkomaclass{%
-% \end{macrocode}
-% \begin{macrocode}
- \caption@CheckCommand\@makecaption{%
- % scrartcl|scrreprt|scrbook [2007/03/07 v2.97a KOMA-Script document class]
- \long\def\@makecaption#1#2{%
- \if@captionabove
- \vskip\belowcaptionskip
- \else
- \vskip\abovecaptionskip
- \fi
- \@@makecaption\@firstofone{#1}{#2}%
- \if@captionabove
- \vskip\abovecaptionskip
- \else
- \vskip\belowcaptionskip
- \fi}}
+\caption@ifclassloaded{koma}{%
% \end{macrocode}
% \begin{macrocode}
\DeclareCaptionFormat{default}[#1#2#3\par]{%
@@ -2981,74 +2838,71 @@
\DeclareCaptionDefaultFont{font}{\scr@fnt@caption}
\DeclareCaptionDefaultFont{labelfont}{\scr@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@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@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@ifntgclass{%
- \caption@ifundefined\CaptionFonts\@gobble\@firstofone}
-\@onlypreamble\caption@ifntgclass
+ \let\caption@KV@parindent\KV@caption@parindent
+ \DeclareCaptionOption{parindent}[]{%
+ \ifx,#1,%
+ \caption@Debug{Option `parindent' ignored}%
+ \else
+ \caption@KV@parindent{#1}%
+ \fi}%
% \end{macrocode}
-% \end{macro}
-%
% \begin{macrocode}
-\caption@ifntgclass{%
+ \let\caption@KV@parskip\KV@caption@parskip
+ \DeclareCaptionOption{parskip}[]{%
+ \ifx,#1,%
+ \caption@Debug{Option `parskip' ignored}%
+ \else
+ \caption@KV@parskip{#1}%
+ \fi}%
% \end{macrocode}
% \begin{macrocode}
- \caption@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@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@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@ifthesisclass}
% \begin{macrocode}
-\providecommand*\caption@ifthesisclass{%
- \caption@ifundefined\cph@font
- {\@gobble}%
- {\caption@ifundefined\cpb@font\@gobble\@firstofone}}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macrocode}
-\caption@ifthesisclass{%
-% \end{macrocode}
-% \begin{macrocode}
- \caption@CheckCommand\@makecaption{%
- % thesis.cls 1996/25/01 1.0g LaTeX document class (wm).
- \long\def\@makecaption#1#2{%
- \vskip\abovecaptionskip
- \setbox\@tempboxa\hbox{{\cph@font #1:} {\cpb@font #2}}%
- \ifdim \wd\@tempboxa >\hsize
- \@hangfrom{\cph@font #1: }{\cpb@font #2\par}%
- \else
- \hbox to\hsize{\hfil\box\@tempboxa\hfil}%
- \fi
- \vskip\belowcaptionskip}}
+\caption@ifclassloaded{thesis}{%
% \end{macrocode}
% \begin{macrocode}
\DeclareCaptionDefaultFormat{hang}
@@ -3056,23 +2910,23 @@
\DeclareCaptionDefaultFont{textfont}{\cpb@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@ifundefined\ArabiCoreLoaded{%
+\caption@ifdefined\ArabiCoreLoaded{%
% \end{macrocode}
+%
% \begin{macro}{\caption@rl}
% \changes{v1.8}{2018/05/20}{This macro added}
% \begin{macrocode}
- \let\caption@rl\@firstofone
-}{%
\newcommand\caption@rl[1]{\if@rl\textRL{#1}\else\textLR{#1}\fi}
% \end{macrocode}
% \end{macro}
+%
% \begin{macrocode}
\def\fnum@figure{\figurename\nobreakspace\thefigure}%
\def\fnum@table{\tablename\nobreakspace\thetable}%
@@ -3083,51 +2937,16 @@
\if@rl\caption@lsep@arabi\else\caption@lsep@colon\fi}
% \end{macrocode}
% \begin{macrocode}
- \caption@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@rl{
- \ifdim \wd\@Arabitempboxa >\hsize
- \textRL{#2} : #1\par
- \else
- \global \@minipagefalse
- \hb@xt@\hsize{\hfil\box\@Arabitempboxa\hfil}%
- \fi}\else{
- \ifdim \wd\@tempboxa >\hsize
- #1: #2\par
- \else
- \global \@minipagefalse
- \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
- \fi}\fi
- \vskip\belowcaptionskip}}
-% \end{macrocode}
-% \begin{macrocode}
+}{%
+ \let\caption@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@ifundefined\FB@makecaption{}{%
-% \end{macrocode}
-% \begin{macrocode}
- \caption@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@xt@\hsize{\hfil\box\@tempboxa\hfil}%
- \fi
- \vskip\belowcaptionskip}}
+\caption@ifdefined\FB@makecaption{%
% \end{macrocode}
% \begin{macrocode}
\ifx\@makecaption\STD@makecaption
@@ -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@ifundefined\frenchTeXmods{}{%
-% \end{macrocode}
-% \begin{macrocode}
- \caption@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@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@edef\@tempa{\@secondofmany#2\void}%
- \ifx\@tempa\empty%
- \let\captionseparator\empty%
- \fi%
- \@mcORI{#1}{\relax\captionfont{#2}}%
- \else
- \@mcORI{#1}{#2}%
- \fi}}%
+\caption@ifdefined\frenchTeXmods{%
% \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@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@ifundefined\hunnewlabel{}{%
- \caption@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@xt@\hsize{\hfil\box\@tempboxa\hfil}%
- \fi
- \vskip\belowcaptionskip}}}
-% \end{macrocode}
-%
-% \begin{macrocode}
\def\caption@tempa#1{%
\@ifpackagewith{babel}{#1}{%
\caption@InfoNoLine{#1 babel option is loaded}%
@@ -3253,22 +3011,7 @@
%
% TODO: babel-latvian/latvian.ldf
%
-% \subsubsection{Unknown document class (or package)}
-% \changes{v1.1}{2007/04/10}{Check of document class added}
-%
-% \begin{macrocode}
-\caption@IfCheckCommand{%
- \caption@setbool{documentclass}{1}%
-}{%
- \caption@setbool{documentclass}{0}%
- \caption@InfoNoLine{%
- Unknown document class (or package),\MessageBreak
- standard defaults will be used}%
- \caption@Debug{\string\@makecaption\space=\space\meaning\@makecaption\@gobble}%
-}
-% \end{macrocode}
-%
-% \subsection{Execution of options}
+% \section{Execution of options}
%
% \begin{macrocode}
\captionsetup{style=default,position=default,%
@@ -3278,7 +3021,7 @@
\ProcessOptions*
% \end{macrocode}
%
-% \subsection{Making an `List of' entry}
+% \section{Making an `List of' entry}
%
% \begin{macro}{\caption@addcontentsline}
% \changes{v1.1}{2007/07/01}{This macro added}
@@ -3299,13 +3042,13 @@
\caption@ifcontentsline{#2}{%
\begingroup
\let\@tempa\@gobble
- \caption@ifundefined\caption@listtype
- {\edef\caption@listtype{#1}}%
+ \caption@ifdefined\caption@listtype
{\let\@tempa\@firstofone}%
- \caption@ifundefined\caption@listtype@ext
- {}%
+ {\edef\caption@listtype{#1}}%
+ \caption@ifdefined\caption@listtype@ext
{\edef\caption@listtype{\caption@listtype\caption@listtype@ext}%
\let\@tempa\@firstofone}%
+ {}%
\@tempa
{\caption@Debug{addcontentsline: #1 => \caption@listtype}%
% \caption@setoptions\caption@listtype
@@ -3333,8 +3076,8 @@
% \end{macrocode}
% \begin{macrocode}
\newcommand*\caption@@@addcontentsline[4]{%
-% \caption@ifundefined\main@Arabi@language{}%
-% {\addtocontents{#1}{\xstring\select@language{\main@Arabi@language}}}%
+% \caption@ifdefined\main@Arabi@language
+% {\addtocontents{#1}{\xstring\select@language{\main@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@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@ForEachType[1]{%
- \caption@ifundefined\ForEachFloatingEnvironment
+ \caption@ifdefined\ForEachFloatingEnvironment
+ {\ForEachFloatingEnvironment{#1}}%
{\def\@elt##1{#1}%
- \caption@ifundefined\c@figure\@gobble\@elt{figure}%
- \caption@ifundefined\c@table\@gobble\@elt{table}%
+ \caption@ifdefined\c@figure\@elt\@gobble{figure}%
+ \caption@ifdefined\c@table\@elt\@gobble{table}%
\let\@elt\relax
- \newfloat@addtohook{#1}}%
- {\ForEachFloatingEnvironment{#1}}}
+ \newfloat@addtohook{#1}}}
% \end{macrocode}
% \begin{macrocode}
\providecommand\newfloat@addtohook[1]{%
@@ -3920,8 +3663,8 @@
% \end{macrocode}
% Support of \package{titletoc} package
% \begin{macrocode}
- \caption@ifundefined\contentsuse{}{%
- \contentsuse{sub#3}{\csname ext@sub#3\endcsname}}%
+ \caption@ifdefined\contentsuse{%
+ \contentsuse{sub#3}{\csname ext@sub#3\endcsname}}{}%
% \end{macrocode}
% \begin{macrocode}
\@namedef{sub#3name}{}%
@@ -3939,9 +3682,9 @@
% \end{macrocode}
% \begin{macrocode}
\newcommand*\caption@declaresublistentry{%
- \caption@ifundefined\l@chapter
- {\caption@@declaresublistentry\l@subsubsection}%
- {\caption@@declaresublistentry\l@subsection}}
+ \caption@ifdefined\l@chapter
+ {\caption@@declaresublistentry\l@subsection}%
+ {\caption@@declaresublistentry\l@subsubsection}}
\@onlypreamble\caption@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}
%
diff --git a/Master/texmf-dist/source/latex/caption/newfloat.dtx b/Master/texmf-dist/source/latex/caption/newfloat.dtx
deleted file mode 100644
index 71484e60bc8..00000000000
--- a/Master/texmf-dist/source/latex/caption/newfloat.dtx
+++ /dev/null
@@ -1,2074 +0,0 @@
-% \iffalse meta-comment
-%
-% This is file `newfloat.dtx'.
-%
-% Copyright (C) 2011-2019 Axel Sommerfeldt (axel.sommerfeldt@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@foreachfloat[1]{%|\\
-% | \@ifundefined{ForEachFloatingEnvironment}%|\\
-% | {\def\@elt##1{#1}%|\\
-% | \@ifundefined{c@figure}\@gobble\@elt{figure}%|\\
-% | \@ifundefined{c@table}\@gobble\@elt{table}%|\\
-% | \let\@elt\relax|\\
-% | \newfloat@addtohook{#1}}%|\\
-% | {\ForEachFloatingEnvironment{#1}}}|\\
-% |\providecommand\newfloat@addtohook[1]{%|\\
-% | \toks@=\expandafter{\newfloat@hook{##1}#1}%|\\
-% | \edef\@tempa{\def\noexpand\newfloat@hook####1{\the\toks@}}%|\\
-% | \@tempa}|\\
-% |\providecommand*\newfloat@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@list{}|\\
-% |\@cons\newfloat@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@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@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@edef,\protected@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@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@Info}
-% \begin{macro}{\newfloat@InfoNoLine}
-% |\newfloat@Info|\marg{message}
-% \begin{macrocode}
-\newcommand*\newfloat@Info[1]{%
- \PackageInfo{newfloat}{#1}}
-\newcommand*\newfloat@InfoNoLine[1]{%
- \newfloat@Info{#1\@gobble}}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\newfloat@Warning}
-% \begin{macro}{\newfloat@WarningNoLine}
-% |\newfloat@Warning|\marg{message}
-% \begin{macrocode}
-\newcommand*\newfloat@Warning[1]{%
- \PackageWarning{newfloat}{#1}}
-\newcommand*\newfloat@WarningNoLine[1]{%
- \newfloat@Warning{#1\@gobble}}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\newfloat@Error}
-% |\newfloat@Error|\marg{message}
-% \begin{macrocode}
-\newcommand*\newfloat@Error[1]{%
- \PackageError{newfloat}{#1}\newfloat@eh}
-% \end{macrocode}
-% \begin{macrocode}
-\newcommand*\newfloat@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@def}
-% \changes{v1.1}{2013/04/27}{This macro added}
-% |\newfloat@def|\marg{macro name}\marg{definition}
-% \begin{macrocode}
-\newcommand*\newfloat@def[2]{%
- \newfloat@ifundefined{#1}{%
- \@namedef{#1}{#2}}}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\newfloat@let}
-% \changes{v1.1}{2013/04/27}{This macro added}
-% |\newfloat@let|\marg{macro name}\marg{macro}
-% \begin{macrocode}
-\newcommand*\newfloat@let[2]{%
- \newfloat@ifundefined{#1}{%
- \expandafter\let\csname #1\endcsname#2}}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\newfloat@ifundefined}
-% \changes{v1.1}{2013/04/27}{This macro added}
-% |\newfloat@ifundefined|\marg{macro name}\marg{code}
-% \begin{macrocode}
-\newcommand*\newfloat@ifundefined[2]{%
- \@ifundefined{#1}{#2}{%
- \newfloat@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@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@Info{New float `#2' with options `#1'}%
-% \end{macrocode}
-% Define a counter with the same name as the floating environment
-% \begin{macrocode}
- \newfloat@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@float@type}% from float package
- {\@ifundefined{c@newflo@tctr}% from memoir document class
- {\ifdefined\newfloat@ftype \else
- \newcount\newfloat@ftype
- \newfloat@ftype=8\relax
- \fi
- \expandafter\xdef\csname ftype@#2\endcsname{\the\newfloat@ftype}%
- \advance\newfloat@ftype\newfloat@ftype}%
- {\expandafter\edef\csname ftype@#2\endcsname{\the\c@newflo@tctr}%
- \advance\c@newflo@tctr \c@newflo@tctr}}%
- {\expandafter\edef\csname ftype@#2\endcsname{\the\value{float@type}}%
- \addtocounter{float@type}{\value{float@type}}}%
-% \end{macrocode}
-% \begin{macrocode}
- \newfloat@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@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@capitalize\newfloat@Type{#2}%
- \newfloat@let{#2name}{\newfloat@Type}%
- \newfloat@def{fleg#2}{\@nameuse{#2name}}% legend naming (memoir)
-% \end{macrocode}
-% Legend name in ToC (memoir document class)
-% \begin{macrocode}
- \newfloat@ifundefined{flegtoc#2}{\@namedef{flegtoc#2}##1{}}%
-% \end{macrocode}
-% Define the floating environment\par
-% If the \class{tufte} document class is loaded,
-% |\@tufte@float| and |\end@tufte@float| will be used instead of
-% |\@float|, |\end@float|, |\@dblfloat|, and |\end@dblfloat|.\par
-% If the \class{beamer} document class is loaded,
-% |\beamer@float| and |\end@beamer@float| will be used.
-% \begin{macrocode}
- \ifcsname @tufte@float\endcsname
- \newenvironment{#2}[1][htbp]%
- {\begin{@tufte@float}[{##1}]{#2}{}}%
- {\end{@tufte@float}}%
- \newenvironment{#2*}[1][htbp]%
- {\begin{@tufte@float}[{##1}]{#2}{star}}%
- {\end{@tufte@float}}%
- \else
- \@ifclassloaded{beamer}{%
- \newenvironment{#2}[1][]{\beamer@float{#2}}{\end@beamer@float}%
- }{%
- \newenvironment{#2}{\@float{#2}}{\end@float}%
- \newenvironment{#2*}{\@dblfloat{#2}}{\end@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@def{listof#2}{\newfloat@listof{#2}}%
- \newfloat@def{listof#2s}{\@nameuse{listof#2}}%
- \newfloat@def{listof#2es}{\@nameuse{listof#2s}}%
- \newfloat@def{newfloat@listof#2@hook}{}%
- \ifdefined\l@figure
- \newfloat@let{l@#2}{\l@figure}%
- \else
- \newfloat@def{l@#2}{\@dottedtocline{1}{1.5em}{2.3em}}%
- \fi
- \edef\newfloat@tempa{List of \newfloat@Type s}%
- \newfloat@let{list#2name}{\newfloat@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@ifundefined{fps@#2}{\newfloat@setplacement{#2}{tbp}}%
- \newfloat@ifundefined{ext@#2}{\newfloat@setfileext{#2}{lo#2}}%
-% \end{macrocode}
-% Apply given options
-% \begin{macrocode}
- \newfloat@setoptions*{#2}{#1}%
-% \end{macrocode}
-% Announce the new floating environment to other packages
-% \begin{macrocode}
- \@expandtwoargs\newfloat@announce{#2}{\@nameuse{ext@#2}}%
-% \end{macrocode}
-% Apply the last two optional arguments for setting names
-% \begin{macrocode}
- \@ifnextchar[\newfloat@DFE@setname\relax}
-\@onlypreamble\@DeclareFloatingEnvironment
-% \end{macrocode}
-% \begin{macrocode}
-\def\newfloat@DFE@setname[#1]{%
- \KV@@newfloat@name{#1}%
- \@ifnextchar[\newfloat@DFE@setlistname\relax}
-\@onlypreamble\newfloat@DFE@setname
-% \end{macrocode}
-% \begin{macrocode}
-\def\newfloat@DFE@setlistname[#1]{%
- \KV@@newfloat@listname{#1}}
-\@onlypreamble\newfloat@DFE@setlistname
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\newfloat@capitalize}
-% \changes{v1.1}{2013/11/03}{Code extracted from \cs{DeclareFloatingEnvironment}}
-% \changes{v1.1}{2013/11/03}{Uses \cs{newfloat@tempa} instead of \cs{@tempa} now}
-% |\newfloat@capitalize|\marg{command}\marg{name}\\
-% Defines \meta{command} to \meta{name}, but with first letter capitalized.
-% \begin{macrocode}
-\newcommand*\newfloat@capitalize[2]{%
- \edef\newfloat@tempa{\gdef\noexpand#1{\@car#2\@nil}}%
- \uppercase\expandafter{\newfloat@tempa}%
- \edef\newfloat@tempa{%
- \noexpand\g@addto@macro\noexpand#1{\@cdr#2\@nil}}%
- \newfloat@tempa}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\newfloat@listof}
-% \changes{v1.1}{2013/04/27}{Revised}
-% \changes{v1.1g}{2019/08/28}{Starred variant added}
-% |\newfloat@listof|\marg{float type}\\
-% typesets the list, using |\listoffigure| with patched list name and file extension.
-% \begin{macrocode}
-\newcommand*\newfloat@listof[1]{%
- \@ifstar
- {\newfloat@list@of{#1}*}%
- {\newfloat@list@of{#1}\relax}}
-% \end{macrocode}
-% \begin{macrocode}
-\newcommand*\newfloat@list@of[1]{%
- \@expandtwoargs\newfloat@list@of@{#1}{\@nameuse{ext@#1}}}
-% \end{macrocode}
-% \begin{macrocode}
-\newcommand*\newfloat@list@of@[3]{%
- \begingroup
- \expandafter\let\expandafter\listfigurename\csname list#1name\endcsname
- \def\ext@figure{#2}%
- \let\newfloat@starttoc\@starttoc
- \def\@starttoc##1{\newfloat@starttoc{#2}}%
- \let\newfloat@listoftoc\listoftoc
- \def\listoftoc##1{\newfloat@listoftoc{#2}}%
- \@nameuse{newfloat@listof#1@hook}%
- \listoffigures#3%
- \endgroup}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\newfloat@setoptions}
-% |\newfloat@setoptions*|\marg{environment}\marg{options}
-% \begin{macrocode}
-\newcommand*\newfloat@setoptions{%
- \@ifstar
- {\newfloat@@setoptions\@firstofone}%
- {\newfloat@@setoptions\@gobble}}
-% \end{macrocode}
-% \begin{macrocode}
-\newcommand*\newfloat@@setoptions[3]{%
- \let\newfloat@within@value\@undefined
- \let\newfloat@chapterlistsgaps@value\@undefined
- #1{\KV@@newfloat@within\newfloat@within@default}% set default value for new floats
- \def\newfloat@type{#2}%
- \setkeys{@newfloat}{#3}%
- \ifx\newfloat@within@value\@undefined \else
- \newfloat@setoption{within}\newfloat@within@value
- \fi
- \ifx\newfloat@chapterlistsgaps@value\@undefined \else
- \newfloat@setoption{chapterlistsgaps}\newfloat@chapterlistsgaps@value
- \fi}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\newfloat@within@default}
-% The default `within' value.
-% This one will be used if no option |within=|\meta{counter} is given.
-% \begin{macrocode}
-\newcommand*\newfloat@within@default{%
- \ifcsname c@chapter\endcsname chapter\else none\fi}
-\@onlypreamble\newfloat@within@default
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\newfloat@setoption}
-% \changes{v1.1}{2015/09/15}{Bugfix: \cs{@expandtwoargs} replaced by own expansion so the option value do not get expanded anymore}
-% |\newfloat@setoption|\marg{option name}{options}
-% \begin{macrocode}
-\newcommand*\newfloat@setoption[1]{%
- \edef\caption@tempa{\noexpand\@nameuse{newfloat@set#1}{\newfloat@type}}%
- \caption@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@setfileext}
-% |\newfloat@setfileext|\marg{environment}\marg{file extension}
-% \begin{macrocode}
-\newcommand*\newfloat@setfileext[2]{%
- \@namedef{ext@#1}{#2}}
-% \end{macrocode}
-% \begin{macrocode}
-\define@key{@newfloat}{fileext}{%
- \newfloat@setoption{fileext}{#1}}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\newfloat@setlistname}
-% |\newfloat@setlistname|\marg{environment}\marg{list name}
-% \begin{macrocode}
-\newcommand*\newfloat@setlistname[2]{%
- \@namedef{list#1name}{#2}}
-% \end{macrocode}
-% \begin{macrocode}
-\define@key{@newfloat}{listname}{%
- \newfloat@setoption{listname}{#1}}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\newfloat@setname}
-% |\newfloat@setname|\marg{environment}\marg{name}
-% \begin{macrocode}
-\newcommand*\newfloat@setname[2]{%
- \newfloat@@setname{#1}{#2}%
- \begingroup
- \ifcsname languagename\endcsname
- \ifcsname captions\languagename\endcsname
- \expandafter\g@addto@macro\csname captions\languagename\endcsname
- {\newfloat@@setname{#1}{#2}}%
- \fi
- \fi
- \endgroup}
-%%\AtBeginDocument{\let\newfloat@setname\newfloat@@setname}
-% \end{macrocode}
-% \begin{macrocode}
-\newcommand*\newfloat@@setname[2]{%
- \@namedef{#1name}{#2}}
-% \end{macrocode}
-% \begin{macrocode}
-\define@key{@newfloat}{name}{%
- \newfloat@setoption{name}{#1}}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\newfloat@setplacement}
-% |\newfloat@setplacement|\marg{environment}\marg{float placement}
-% \begin{macrocode}
-\newcommand*\newfloat@setplacement[2]{%
- \@namedef{fps@#1}{#2}}
-% \end{macrocode}
-% \begin{macrocode}
-\define@key{@newfloat}{placement}{%
- \newfloat@setoption{placement}{#1}}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\newfloat@setwithin}
-% |\newfloat@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@setwithin[2]{%
- \ifcsname c@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@chapter\endcsname
- \@chapterlistsgap@off{#1}%
- \fi
- \newfloat@@setwithin{#1}{}{}%
- \else
- \def\@tempb{chapter}%
- \ifx\@tempa\@tempb
- \@addtoreset{#1}{chapter}%
- \@chapterlistsgap@on{#1}%
- \newfloat@@setwithin{#1}{\ifnum\c@chapter>\z@ \thechapter.\fi}{\theHchapter.}%
- \else
- \def\@tempb{section}%
- \ifx\@tempa\@tempb
- \@addtoreset{#1}{section}%
- \ifcsname c@chapter\endcsname
- \@addtoreset{#1}{chapter}%
- \@chapterlistsgap@on{#1}%
- \newfloat@@setwithin{#1}{\thesection.}{\theHsection.}%
- \else
- \newfloat@@setwithin{#1}{\ifnum\c@section>\z@ \thesection.\fi}{\theHsection.}%
- \fi
- \else
- \newfloat@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@key{@newfloat}{within}{%
- \def\newfloat@within@value{#1}}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\newfloat@setwithout}
-% |\newfloat@setwithout|\marg{environment}
-% \begin{macrocode}
-\newcommand*\newfloat@setwithout[1]{%
- \newfloat@setwithin{#1}{none}}
-% \end{macrocode}
-% \begin{macrocode}
-\define@key{@newfloat}{without}[]{%
- \def\newfloat@within@value{none}}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\newfloat@setchapterlistsgaps}
-% |\newfloat@setchapterlistsgaps|\marg{environment}\marg{on/off}
-% \begin{macrocode}
-\newcommand*\newfloat@setchapterlistsgaps[2]{%
- \edef\@tempa{#2}%
- \def\@tempb{off}%
- \ifx\@tempa\@tempb
- \@chapterlistsgap@off{#1}%
- \else
- \def\@tempb{on}%
- \ifx\@tempa\@tempb
- \@chapterlistsgap@on{#1}%
- \else
- \newfloat@Error{Invalid value `#2' for option `chapterlistsgaps'}%
- \fi
- \fi}
-% \end{macrocode}
-% \begin{macrocode}
-\define@key{@newfloat}{chapterlistsgaps}{%
- \def\newfloat@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@announce}
-% |\newfloat@announce|\marg{environment name}\marg{list file extension}
-% \begin{macrocode}
-\newcommand*\newfloat@announce[2]{%
-% \end{macrocode}
-% \begin{macrocode}
- \@cons\newfloat@list{{#1}}%
- \@cons\newfloat@@list{{#1}}%
-% \end{macrocode}
-% \begin{macrocode}
- \newfloat@ifundefined{newfloat@ext@#2}{%
- \@namedef{newfloat@ext@#2}{#1}%
-% \end{macrocode}
-% Support of \package{memoir} document class
-% \begin{macrocode}
- \ifcsname c@lofdepth\endcsname
- \newfloat@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@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@hook{#1}}
-\@onlypreamble\newfloat@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@addtolist{#1}%
- \newfloat@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@list
- \let\@elt\relax
- #1{\newfloat@addtohook{#2}}}
-% \end{macrocode}
-% \begin{macrocode}
-\providecommand\newfloat@addtohook[1]{%
- \toks@=\expandafter{\newfloat@hook{##1}#1}%
- \edef\@tempa{\def\noexpand\newfloat@hook####1{\the\toks@}}%
- \@tempa}
-% \end{macrocode}
-% \begin{macrocode}
-\providecommand*\newfloat@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@addto@macro\csname newfloat@listof#1@hook\endcsname}
-\@onlypreamble\PrepareListOf
-% \end{macrocode}
-% \end{macro}
-%
-% \pagebreak[3]
-% \subsection{The list of floating environments}
-%
-% \begin{macro}{\newfloat@list}
-% |\newfloat@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@list{}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\newfloat@addtolist}
-% \changes{v1.0b}{2012/05/18}{Bugfix: Definition of \cs{@ifchapterlistsgap@}\meta{environment} added}
-% |\newfloat@addtolist|\marg{environment}
-% adds an environment to the list of floating environments.
-% \begin{macrocode}
-\newcommand*\newfloat@addtolist[1]{%
- \newfloat@ifinlist{#1}{}{%
- \ifcsname ext@#1\endcsname
- \@cons\newfloat@list{{#1}}%
- \@namedef{newfloat@ext@\@nameuse{ext@#1}}{#1}%
- \newfloat@let{@ifchapterlistsgap@#1}{\@iden}%
- \else
- \newfloat@Error{`#1' does not seem to be a floating environment}%
- \fi}}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\newfloat@ifinlist}
-% |\newfloat@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@ifinlist[1]{%
- \let\next\@secondoftwo
- \begingroup
- \expandafter\let\csname c@#1\endcsname\newfloat@ifinlist
- \def\@elt##1{%
- \expandafter\ifx\csname c@##1\endcsname\newfloat@ifinlist
- \global\let\next\@firstoftwo
- \fi}%
- \newfloat@list
- \endgroup
- \next}
-% \end{macrocode}
-% \end{macro}
-%
-% Add |figure| and |table| to the list of floating environments.
-% \begin{macrocode}
-\ifcsname ext@figure\endcsname
- \newfloat@addtolist{figure}
-\fi
-\ifcsname ext@table\endcsname
- \newfloat@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@list|.
-% \begin{macrocode}
- \providecommand*\@addchapterlistsgaps{%
- \begingroup
- \def\@elt##1{%
- \@expandtwoargs\@addchapterlistsgap{##1}{\@nameuse{ext@##1}}}%
- \newfloat@list
- \endgroup}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@chapterlistsgap@off}
-% |\@chapterlistsgap@off|\marg{float type}\par
-% switches the chapter lists gap off for the given float type.
-% Since \KOMAScript{} (still) supports |\float@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@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@on}
-% |\@chapterlistsgap@off|\marg{float type}\par
-% switches the chapter lists gap on for the given float type.
-% \begin{macrocode}
- \providecommand*\@chapterlistsgap@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@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@key{newfloat}{within}{%
- \def\newfloat@within@default{#1}% set new default value
- \def\@elt##1{\newfloat@setwithin{##1}{#1}}%
- \newfloat@list
- \let\@elt\relax}
-% \end{macrocode}
-% \begin{macrocode}
-\define@key{newfloat}{without}[]{%
- \KV@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@key{newfloat}{#1name}{%
- \newfloat@setname{#1}{##1}}%
- \define@key{newfloat}{list#1name}{%
- \newfloat@setname{list#1}{##1}}%
- \define@key{newfloat}{#1within}{%
- \newfloat@setwithin{#1}{##1}}%
- \define@key{newfloat}{#1without}[]{%
- \newfloat@setwithout{#1}}%
-}%
-\newfloat@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@key{newfloat}{planb}[true]{%
- \def\@tempa{#1}%
- \def\@tempb{false}%
- \ifx\@tempa\@tempb
- \let\newfloat@ifplanb\@gobble
- \else
- \def\@tempb{true}%
- \ifx\@tempa\@tempb
- \let\newfloat@ifplanb\@iden
- \else
- \newfloat@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@key{newfloat}{planb-fileext}{%
- \newfloat@Info{Setting Plan B file extension to `#1'}
- \xdef\newfloat@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@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@chapnum} added}
-% |\newfloat@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@org@chapter|, too, since the original code will be stored here
-% if the \package{hyperref} package was loaded.
-% \begin{macrocode}
-\newcommand\newfloat@replace@chapter[3]{%
- \begingroup
- \let\if@twocolumn\iffalse
- \let\if@mainmatter\iffalse
- \let\if@thema\iffalse
- \let\if@chapnum\iffalse
- \def\@tempa[##1]##2{#2}%
- \ifx\@tempa\@chapter
- \newfloat@InfoNoLine{Document class `#1' detected}%
- \gdef\@chapter[##1]##2{#3}%
- \global\let\newfloat@replace@chapter\newfloat@dont@replace@chapter
- \else\ifx\@tempa\Hy@org@chapter
- \newfloat@InfoNoLine{Document class `#1' detected (Hy)}%
- \gdef\Hy@org@chapter[##1]##2{#3}%
- \global\let\newfloat@replace@chapter\newfloat@dont@replace@chapter
- \fi\fi
- \endgroup}
-% \end{macrocode}
-% \begin{macrocode}
-\newcommand\newfloat@dont@replace@chapter[3]{}
-% \end{macrocode}
-% \begin{macrocode}
-\ifcsname @chapter\endcsname \else
- \let\newfloat@replace@chapter\newfloat@dont@replace@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@replace@chapter{report}{%
- \ifnum \c@secnumdepth >\m@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@twocolumn
- \@topnewpage[\@makechapterhead{#2}]%
- \else
- \@makechapterhead{#2}%
- \@afterheading
- \fi
-}{%
- \ifnum \c@secnumdepth >\m@ne
- \refstepcounter{chapter}%
- \typeout{\@chapapp\space\thechapter.}%
- \addcontentsline{toc}{chapter}%
- {\protect\numberline{\thechapter}#1}%
- \else
- \addcontentsline{toc}{chapter}{#1}%
- \fi
- \chaptermark{#1}%
- \@addchapterlistsgaps
- \if@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@replace@chapter{book}{%
- \ifnum \c@secnumdepth >\m@ne
- \if@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@twocolumn
- \@topnewpage[\@makechapterhead{#2}]%
- \else
- \@makechapterhead{#2}%
- \@afterheading
- \fi
-}{%
- \ifnum \c@secnumdepth >\m@ne
- \if@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@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@replace@chapter{amsbook}{%
- \refstepcounter{chapter}%
- \ifnum\c@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@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@on| and |\@chapter|\-|lists|\-|gap@off|.
-% \begin{macrocode}
-\@ifpackageloaded{tocbasic}{%
- \let\newfloat@replace@chapter\newfloat@dont@replace@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@replace@chapter\newfloat@dont@replace@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@replace@chapter{rapport}{%
- \ifnum \c@secnumdepth >\m@ne
- \refstepcounter{chapter}%
- \typeout{\@chapapp\space\thechapter.}%
- \addcontentsline{toc}{chapter}%
- {\protect\numberline{\thechapter}\toc@font0 #1}%
- \else
- \addcontentsline{toc}{chapter}{\toc@font0 #1}%
- \fi
- \chaptermark{#1}%
- \addtocontents{lof}{\protect\addvspace{10\p@}}%
- \addtocontents{lot}{\protect\addvspace{10\p@}}%
- \if@twocolumn
- \@topnewpage[\@makechapterhead{#2}]%
- \else
- \@makechapterhead{#2}%
- \@afterheading
- \fi
-}{%
- \ifnum \c@secnumdepth >\m@ne
- \refstepcounter{chapter}%
- \typeout{\@chapapp\space\thechapter.}%
- \addcontentsline{toc}{chapter}%
- {\protect\numberline{\thechapter}\toc@font0 #1}%
- \else
- \addcontentsline{toc}{chapter}{\toc@font0 #1}%
- \fi
- \chaptermark{#1}%
- \@addchapterlistsgaps
- \if@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@replace@chapter{boek}{%
- \ifnum \c@secnumdepth >\m@ne
- \if@mainmatter
- \refstepcounter{chapter}%
- \typeout{\@chapapp\space\thechapter.}%
- \addcontentsline{toc}{chapter}%
- {\protect\numberline{\thechapter}\toc@font0 #1}%
- \else
- \addcontentsline{toc}{chapter}{\toc@font0 #1}%
- \fi
- \else
- \addcontentsline{toc}{chapter}{\toc@font0 #1}%
- \fi
- \chaptermark{#1}%
- \addtocontents{lof}{\protect\addvspace{10\p@}}%
- \addtocontents{lot}{\protect\addvspace{10\p@}}%
- \if@twocolumn
- \@topnewpage[\@makechapterhead{#2}]%
- \else
- \@makechapterhead{#2}%
- \@afterheading
- \fi
-}{%
- \ifnum \c@secnumdepth >\m@ne
- \if@mainmatter
- \refstepcounter{chapter}%
- \typeout{\@chapapp\space\thechapter.}%
- \addcontentsline{toc}{chapter}%
- {\protect\numberline{\thechapter}\toc@font0 #1}%
- \else
- \addcontentsline{toc}{chapter}{\toc@font0 #1}%
- \fi
- \else
- \addcontentsline{toc}{chapter}{\toc@font0 #1}%
- \fi
- \chaptermark{#1}%
- \@addchapterlistsgaps
- \if@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@replace@chapter{thesis}{%
- \ifnum \c@secnumdepth >\m@ne
- \if@mainmatter
- \refstepcounter{chapter}%
- \typeout{\chaptername\space\thechapter.}
- \if@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@twocolumn
- \@topnewpage[\@makechapterhead{#2}]
- \else
- \@makechapterhead{#2}
- \@afterheading
- \fi
-}{%
- \ifnum \c@secnumdepth >\m@ne
- \if@mainmatter
- \refstepcounter{chapter}%
- \typeout{\chaptername\space\thechapter.}%
- \if@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@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@replace@chapter{svmono}{%
- \if@chapnum % war mal \ifnum \c@secnumdepth >\m@ne
- \refstepcounter{chapter}%
- \if@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@twocolumn
- \@topnewpage[\@makechapterhead{#2}]%
- \else
- \@makechapterhead{#2}%
- \@afterheading
- \fi
-}{%
- \if@chapnum % war mal \ifnum \c@secnumdepth >\m@ne
- \refstepcounter{chapter}%
- \if@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@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@replace@chapter{dgruyter}{%
- \let\thesection\theinchapsection
- \let\theequation\theinchapequation
- \let\thefigure\theinchapfigure
- \let\thetable\theinchaptable
- \ifx\bookDOI\@undefined
- \else
- \@tempcnta\numexpr\componentd@i+\@ne\relax
- \xdef\componentd@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@i}%
- \fi
- \ifnum \c@secnumdepth >\m@ne
- \if@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@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@i+\@ne\relax
- \xdef\componentd@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@i}%
- \fi
- \ifnum \c@secnumdepth >\m@ne
- \if@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@twocolumn
- \@topnewpage[\@makechapterhead{#2}]%
- \else
- \@makechapterhead{#2}%
- \@afterheading
- \fi}
-% \end{macrocode}
-%
-% \pagebreak[3]
-% \subsubsection{Compatibility warning}
-%
-% \begin{macrocode}
-\ifx\newfloat@replace@chapter\newfloat@dont@replace@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@InfoNoLine{%
- Unsupported document class, or \noexpand\@chapter\MessageBreak
- was already redefined by another package}
- \newfloat@InfoNoLine{\string\@chapter\space=\space\meaning\@chapter}
- \newfloat@InfoNoLine{\string\Hy@org@chapter\space=\space\meaning\Hy@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@ifplanb{\AtBeginDocument{%
- \newfloat@InfoNoLine{Trying Plan B..}%
- \let\newfloat@addtocontents@ORI\addtocontents
- \long\def\addtocontents#1#2{%
- \newfloat@addtocontents{#1}{#2}#2\addvspace\newfloat@nil}%
- \long\def\newfloat@addtocontents#1#2#3\addvspace#4\newfloat@nil{%
- \def\newfloat@tempa{#4}%
- \ifx\newfloat@tempa\@empty
- \newfloat@addtocontents@ORI{#1}{#2}%
- \else
- \ifx\newfloat@addtocontents@ext\@undefined
- \newfloat@Info{Setting Plan B file extension to `#1'...}%
- \xdef\newfloat@addtocontents@ext{#1}%
- \fi
- \edef\newfloat@tempa{#1}%
- \ifx\newfloat@tempa\newfloat@addtocontents@ext
- \begingroup
- \let\addtocontents\newfloat@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@float}
-% \changes{v1.1k}{2019/09/01}{This macro added}
-% Unfortunately the \class{beamer} document class does not offer
-% |\beamer@float| and |\end@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@float\endcsname \else
-% \end{macrocode}
-% \begin{macrocode}
- \def\beamer@float#1{%
- \ifcsname caption@settype\endcsname
- \caption@settype{#1}%
- \else
- \def\@captype{#1}%
- \fi
- \par\nobreak\begin{center}\nobreak}
-% \end{macrocode}
-% \begin{macrocode}
- \def\end@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@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@ForEachNew} to \cs{newfloat@IfPackageLoaded}}
-% |\newfloat@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@IfPackageLoaded[3]{%
- \@ifpackageloaded{#1}{%
- \newfloat@@IfPackageLoaded{#1}{#2}{#3}%
- }{%
- \AtBeginDocument{%
- \@ifpackageloaded{#1}{%
- \newfloat@@IfPackageLoaded{#1}{#2}{#3}%
- }{}}%
- }}
-\@onlypreamble\newfloat@IfPackageLoaded
-% \end{macrocode}
-% \begin{macrocode}
-\newcommand\newfloat@@IfPackageLoaded[3]{%
- \newfloat@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@addtohook{\newfloat@@@IfPackageLoaded{#1}{#2}{#3}}}
-\@onlypreamble\newfloat@@IfPackageLoaded
-% \end{macrocode}
-% \begin{macrocode}
-\newcommand\newfloat@@@IfPackageLoaded[3]{%
- \ifcsname#2\endcsname
- \newfloat@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@figure| and |\plist@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@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@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@IfPackageLoaded{float}{newfloat@undefined}{%
- \@nameuse{@ifchapterlistsgap@#1}{% if switched on
- \let\float@do=\relax
- \edef\@tempa{%
- \noexpand\float@exts{\the\float@exts\float@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@IfPackageLoaded{fltpage}{FP#1}{%
- \newcounter{FP@#1C}%
- \newenvironment{FP#1}{\FP@floatBegin{#1}}{\FP@floatEnd}}
-% \end{macrocode}
-%
-% \pagebreak[3]
-% \subsubsection{\package{listings}}
-%
-% \begin{macro}{\ext@lstlisting}
-% Since the \package{listings} package do not define |\ext@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@lstlisting{lol}%
-% \end{macrocode}
-% \end{macro}
-%
-% \pagebreak[3]
-% \subsubsection{\package{rotating}}
-%
-% We define a sideways-variant of new floating environments here.
-% \begin{macrocode}
-\newfloat@IfPackageLoaded{rotating}{sideways#1}{%
- \newenvironment{sideways#1}{\@rotfloat{#1}}{\end@rotfloat}%
- \newenvironment{sideways#1*}{\@rotdblfloat{#1}}{\end@rotdblfloat}}
-% \end{macrocode}
-%
-% \pagebreak[3]
-% \subsubsection{\package{sidecap}}
-%
-% We define a SC-variant of new floating environments here.
-% \begin{macro}{\SC@float}
-% \changes{v1.1b}{2018/12/26}{Bugfix: Missing curly braces added}
-% \begin{macrocode}
-\newcommand*\newfloat@For@SC[2]{%
- \def#1{b}% = \sidecaptionvpos{#2}{b} (v1.6)
- \newenvironment{SC#2}%
- {\SC@float[{#1}]{#2}}{\endSC@float}%
- \newenvironment{SC#2*}%
- {\SC@dblfloat[{#1}]{#2}}{\endSC@dblfloat}}
-\@onlypreamble\newfloat@For@SC
-% \end{macrocode}
-% \begin{macrocode}
-\newfloat@IfPackageLoaded{sidecap}{SC#1}{%
- \expandafter\newfloat@For@SC\csname SC@#1@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@IfPackageLoaded{wrapfig}{wrap#1}{%
- \newenvironment{wrap#1}{\wrapfloat{#1}}{\endwrapfloat}}
-% \end{macrocode}
-%
-% \iffalse
-%</package>
-% \fi
-%
-% \iffalse
-% --------------------------------------------------------------------------- %
-% \fi
-%
-% \Finale
-%
-\endinput
diff --git a/Master/texmf-dist/source/latex/caption/subcaption.dtx b/Master/texmf-dist/source/latex/caption/subcaption.dtx
index 0eb2a144fcc..70b669ee201 100644
--- a/Master/texmf-dist/source/latex/caption/subcaption.dtx
+++ b/Master/texmf-dist/source/latex/caption/subcaption.dtx
@@ -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@For{subtypelist}|, which executes code for every sub-type