texlive[52008] Master/texmf-dist: caption (1sep19)

commits+karl at tug.org commits+karl at tug.org
Sun Sep 1 23:35:52 CEST 2019


Revision: 52008
          http://tug.org/svn/texlive?view=revision&revision=52008
Author:   karl
Date:     2019-09-01 23:35:52 +0200 (Sun, 01 Sep 2019)
Log Message:
-----------
caption (1sep19)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/caption/CHANGELOG
    trunk/Master/texmf-dist/doc/latex/caption/README
    trunk/Master/texmf-dist/doc/latex/caption/subcaption.pdf
    trunk/Master/texmf-dist/source/latex/caption/caption.dtx
    trunk/Master/texmf-dist/source/latex/caption/caption3.dtx
    trunk/Master/texmf-dist/source/latex/caption/newfloat.dtx
    trunk/Master/texmf-dist/source/latex/caption/subcaption.dtx
    trunk/Master/texmf-dist/tex/latex/caption/caption.sty
    trunk/Master/texmf-dist/tex/latex/caption/caption3.sty
    trunk/Master/texmf-dist/tex/latex/caption/newfloat.sty
    trunk/Master/texmf-dist/tex/latex/caption/subcaption.sty

Modified: trunk/Master/texmf-dist/doc/latex/caption/CHANGELOG
===================================================================
--- trunk/Master/texmf-dist/doc/latex/caption/CHANGELOG	2019-09-01 21:23:42 UTC (rev 52007)
+++ trunk/Master/texmf-dist/doc/latex/caption/CHANGELOG	2019-09-01 21:35:52 UTC (rev 52008)
@@ -164,7 +164,10 @@
 v1.2 (2018/05/13)
 - Optional argument values `B' and `T' added to the environments `subfigure' and `subtable'
 
+v1.3 (2019/08/31)
+- New command \subfloat for easy transition from the `subfig' package
 
+
 newfloat package
 ----------------
 

Modified: trunk/Master/texmf-dist/doc/latex/caption/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/caption/README	2019-09-01 21:23:42 UTC (rev 52007)
+++ trunk/Master/texmf-dist/doc/latex/caption/README	2019-09-01 21:35:52 UTC (rev 52008)
@@ -1,7 +1,7 @@
 ==========================================================================
 
 The `caption' package bundle
-Release 2019-08-29
+Release 2019-09-01
 Copyright (C) 1994-2019 Axel Sommerfeldt (axel.sommerfeldt at f-m.fm)
 
 License: LPPL = LaTeX Project Public Licence
@@ -65,7 +65,7 @@
 
 --------------------------------------------------------------------------
 
-The `subcaption' package v1.2 is a small package supporting typesetting
+The `subcaption' package v1.3 is a small package supporting typesetting
 of sub-captions (by using the the sub-caption feature of the `caption'
 package).
 

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

Modified: trunk/Master/texmf-dist/source/latex/caption/caption.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/caption/caption.dtx	2019-09-01 21:23:42 UTC (rev 52007)
+++ trunk/Master/texmf-dist/source/latex/caption/caption.dtx	2019-09-01 21:35:52 UTC (rev 52008)
@@ -2,7 +2,7 @@
 % 
 % This is file `caption.dtx'.
 % 
-% Copyright (C) 1994-2018 Axel Sommerfeldt (axel.sommerfeldt at f-m.fm)
+% Copyright (C) 1994-2019 Axel Sommerfeldt (axel.sommerfeldt at f-m.fm)
 % 
 % --------------------------------------------------------------------------
 % 
@@ -25,7 +25,7 @@
 % and the user manuals caption-deu.tex, caption-eng.tex, and caption-rus.tex.
 % 
 % \fi
-% \CheckSum{3702}
+% \CheckSum{3694}
 %
 % \iffalse
 %<*driver>
@@ -220,13 +220,13 @@
 %
 %    \begin{macrocode}
 \NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption}[2019/08/29 v3.3b Customizing captions (AR)]
+\ProvidesPackage{caption}[2019/09/01 v3.3d Customizing captions (AR)]
 %    \end{macrocode}
 %
 % \subsection{Loading the kernel}
 %
 %    \begin{macrocode}
-\RequirePackage{caption3}[2018/09/12] % needs v1.8c or newer
+\RequirePackage{caption3}[2019/09/01] % needs v1.8d or newer
 %    \end{macrocode}
 %
 % \subsection{Check against incompatible document classes}
@@ -1914,6 +1914,7 @@
 % \changes{v3.2a}{2011/08/16}{\cs{captionsetup} replaces with \cs{captionbox at settype} and \cs{caption at setposition}}
 % \changes{v3.3}{2012/04/09}{Adapted to revised version of \cs{caption at withoptargs}}
 % \changes{v3.3}{2017/03/19}{When used with fixed witdh the content will not be hboxed anymore}
+% \changes{v3.3c}{2019/09/01}{Adapted so it could be used by \cs{subfloat} offered by \package{subcaption}}
 % A |\parbox| with contents and caption, separated by an invisible |\hrule|.
 %    \begin{macrocode}
 \newcommand*\captionbox{%
@@ -1927,35 +1928,39 @@
 %    \end{macrocode}
 %    \begin{macrocode}
 \long\def\caption at iibox#1#2#3[#4]{%
-  \@testopt{\caption at iiibox{#1}{#2}{#3}{#4}}\captionbox at hj@default}
+  \@testopt{\caption at iiibox{#1}{#2}{#3}[{#4}]}\captionbox at hj@default}
 %    \end{macrocode}
 %    \begin{macrocode}
 \long\def\caption at iibox@#1#2#3#4{%
   \setbox\@tempboxa\hbox{#4}%
-  \caption at iiibox{#1}{#2}{#3}{\wd\@tempboxa}[\captionbox at hj@default]{\unhbox\@tempboxa}}
+  \caption at iiibox{#1}{#2}{#3}[\wd\@tempboxa][\captionbox at hj@default]{\unhbox\@tempboxa}}
 %    \end{macrocode}
 %    \begin{macrocode}
-\long\def\caption at iiibox#1#2#3#4[#5]#6{%
+\long\def\caption at iiibox#1{%
+  \caption at iiiibox{#1}\vbox\vtop}
+%    \end{macrocode}
+%    \begin{macrocode}
+\long\def\caption at iiiibox#1#2#3#4#5[#6][#7]#8{%
   \begingroup
   #1*% set \caption at position
   \caption at iftop{%
     \endgroup
-    \parbox[t]{#4}{%
+    \parbox[t]{#6}{%
       #1\relax
       \caption at setposition t%
-      \vbox{\caption#2{#3}}%
+      #2{\caption#4{#5}}%
       \captionbox at hrule
-      \csname caption at hj@#5\endcsname
-      #6}%
+      \csname caption at hj@#7\endcsname
+      #8}%
   }{%
     \endgroup
-    \parbox[b]{#4}{%
+    \parbox[b]{#6}{%
       #1\relax
       \caption at setposition b%
-      \csname caption at hj@#5\endcsname
-      #6%
+      \csname caption at hj@#7\endcsname
+      #8%
       \captionbox at hrule
-      \vtop{\caption#2{#3}}}%
+      #3{\caption#4{#5}}}%
   }}
 %    \end{macrocode}
 %    \begin{macrocode}
@@ -2642,25 +2647,23 @@
 %
 % \begin{macro}{\figure}
 % \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}
+%  We redefine |figure| so our type-specific options will be used etc.
+%    \begin{macrocode}
+  \let\caption at ORI@figure\figure
+  \def\figure{\caption at settype{figure}\caption at ORI@figure}
+%    \end{macrocode}
+% \end{macro}
+%
 % \begin{macro}{\table}
 % \changes{v3.1f}{2007/12/17}{This re-definition for \class{beamer} document class added}
-%  We redefine |figure| \& |table| so our type-specific options will be used etc.
+% \changes{v3.3d}{2019/09/01}{This re-definition for \class{beamer} document class revised}
+%  We redefine |table| so our type-specific options will be used etc.
 %    \begin{macrocode}
-  \expandafter\let\expandafter\caption at ORI@figure
-    \csname\string\figure\endcsname
-  \@namedef{\string\figure}[#1]{%
-    \caption at ORI@figure[#1]%
-    \caption at settype{figure}}
+  \let\caption at ORI@table\figure
+  \def\table{\caption at settype{table}\caption at ORI@table}
 %    \end{macrocode}
-%    \begin{macrocode}
-  \expandafter\let\expandafter\caption at ORI@table
-    \csname\string\table\endcsname
-  \@namedef{\string\table}[#1]{%
-    \caption at ORI@table[#1]%
-    \caption at settype{table}}
-%    \end{macrocode}
 % \end{macro}
-% \end{macro}
 %
 %    \begin{macrocode}
 }{}
@@ -4309,6 +4312,7 @@
 %
 
 % \begin{macro}{\ivparpic}
+% \changes{v3.3}{2018/12/26}{Bugfix: Missing curly braces added}
 % We need to set our \package{hyperref} anchor here.
 % Not bullet-proof since we have to redefine |\noindent| here!
 %    \begin{macrocode}
@@ -4319,7 +4323,7 @@
       \caption at defrostHref
       \let\noindent\caption at ORI@noindent
       \noindent}%
-    \caption at ORI@ivparpic(#1,#2)(#3,#4)[#5][#6]{#7}%
+    \caption at ORI@ivparpic(#1,#2)(#3,#4)[{#5}][{#6}]{#7}%
     \let\noindent\caption at ORI@noindent}%
 %    \end{macrocode}
 % \end{macro}

Modified: trunk/Master/texmf-dist/source/latex/caption/caption3.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/caption/caption3.dtx	2019-09-01 21:23:42 UTC (rev 52007)
+++ trunk/Master/texmf-dist/source/latex/caption/caption3.dtx	2019-09-01 21:35:52 UTC (rev 52008)
@@ -2,7 +2,7 @@
 % 
 % This is file `caption3.dtx'.
 % 
-% Copyright (C) 1994-2018 Axel Sommerfeldt (axel.sommerfeldt at f-m.fm)
+% Copyright (C) 1994-2019 Axel Sommerfeldt (axel.sommerfeldt at f-m.fm)
 % 
 % --------------------------------------------------------------------------
 % 
@@ -25,7 +25,7 @@
 % and the user manuals caption-deu.tex, caption-eng.tex, and caption-rus.tex.
 % 
 % \fi
-% \CheckSum{3954}
+% \CheckSum{3961}
 %
 % \iffalse
 %<*driver>
@@ -198,7 +198,7 @@
 %
 %    \begin{macrocode}
 \NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption3}[2018/09/12 v1.8c caption3 kernel (AR)]
+\ProvidesPackage{caption3}[2019/09/01 v1.8d caption3 kernel (AR)]
 %    \end{macrocode}
 %
 % \subsection{Workaround for bug in package \package{arabtex}}
@@ -1892,7 +1892,8 @@
 %    \begin{macrocode}
 \DeclareCaptionTextFormat{empty}{%
   \caption at get@label#1\caption at makeanchor{}\@nil
-  \caption at thelabel}
+  \caption at thelabel
+  \global\let\caption at thelabel\relax}
 \long\def\caption at get@label#1\caption at makeanchor#2#3\@nil{%
   \def\caption at tempa{#2}%
   \ifx\caption at tempa\@empty
@@ -1914,6 +1915,7 @@
 % \begin{macro}{\caption at getlabel}
 % \changes{v1.0}{2011/09/03}{\cs{label} can have optional arguments now}
 % \changes{v1.7}{2015/09/16}{Moved from \package{bicaption} package to \package{caption3}}
+% \changes{v1.8d}{2019/09/01}{Bugfix: Global definition of \cs{caption at thelabel} added}
 % Gets the label command out of the (first) caption text and stores it to |\caption at thelabel|.
 %    \begin{macrocode}
 \long\def\caption at getlabel#1\label#2#3\@nil{%
@@ -1946,6 +1948,9 @@
   \l at addto@macro\caption at thelabel{[{#1}]}%
   \caption@@getlabel#2\@nil}
 %    \end{macrocode}
+%    \begin{macrocode}
+\let\caption at thelabel\relax
+%    \end{macrocode}
 % \end{macro}
 %
 % \subsection{Fonts}

Modified: trunk/Master/texmf-dist/source/latex/caption/newfloat.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/caption/newfloat.dtx	2019-09-01 21:23:42 UTC (rev 52007)
+++ trunk/Master/texmf-dist/source/latex/caption/newfloat.dtx	2019-09-01 21:35:52 UTC (rev 52008)
@@ -25,7 +25,7 @@
 % and the user manuals caption-deu.tex, caption-eng.tex, and caption-rus.tex.
 % 
 % \fi
-% \CheckSum{1397}
+% \CheckSum{1605}
 %
 % \iffalse
 %<*driver>
@@ -533,7 +533,7 @@
 %
 %    \begin{macrocode}
 \NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{newfloat}[2019/08/28 v1.1g Defining new floating environments (AR)]
+\ProvidesPackage{newfloat}[2019/09/01 v1.1k Defining new floating environments (AR)]
 %    \end{macrocode}
 %
 % \begin{macro}{\newfloat at Info}
@@ -548,6 +548,18 @@
 % \end{macro}
 % \end{macro}
 %
+% \begin{macro}{\newfloat at Warning}
+% \begin{macro}{\newfloat at WarningNoLine}
+%  |\newfloat at Warning|\marg{message}
+%    \begin{macrocode}
+\newcommand*\newfloat at Warning[1]{%
+  \PackageWarning{newfloat}{#1}}
+\newcommand*\newfloat at WarningNoLine[1]{%
+  \newfloat at Warning{#1\@gobble}}
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
 % \begin{macro}{\newfloat at Error}
 %  |\newfloat at Error|\marg{message}
 %    \begin{macrocode}
@@ -614,6 +626,7 @@
 % \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{%
@@ -665,9 +678,11 @@
   \newfloat at ifundefined{flegtoc#2}{\@namedef{flegtoc#2}##1{}}%
 %    \end{macrocode}
 % Define the floating environment\par
-% (If the \class{tufte} document class is loaded,
+% If the \class{tufte} document class is loaded,
 % |\@tufte at float| and |\end at tufte@float| will be used instead of
-% |\@float|, |\end at float|, |\@dblfloat|, and |\end at dblfloat|.)
+% |\@float|, |\end at float|, |\@dblfloat|, and |\end at dblfloat|.\par
+% If the \class{beamer} document class is loaded,
+% |\beamer at float| and |\end at beamer@float| will be used.
 %    \begin{macrocode}
   \ifcsname @tufte at float\endcsname
     \newenvironment{#2}[1][htbp]%
@@ -677,8 +692,12 @@
       {\begin{@tufte at float}[{##1}]{#2}{star}}%
       {\end{@tufte at float}}%
   \else
-    \newenvironment{#2}{\@float{#2}}{\end at float}%
-    \newenvironment{#2*}{\@dblfloat{#2}}{\end at dblfloat}%
+    \@ifclassloaded{beamer}{%
+      \newenvironment{#2}[1][]{\beamer at float{#2}}{\end at beamer@float}%
+    }{%
+      \newenvironment{#2}{\@float{#2}}{\end at float}%
+      \newenvironment{#2*}{\@dblfloat{#2}}{\end at dblfloat}%
+    }%
   \fi
 %    \end{macrocode}
 % Define the listing command |\listof|\meta{type}(|e|)|s|
@@ -1185,6 +1204,10 @@
 %    \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}
@@ -1333,7 +1356,6 @@
   \xdef\newfloat at addtocontents@ext{#1}}
 %    \end{macrocode}
 % \end{macro}
-
 %
 % Process the package options:
 % We use |\setkeys| here instead of |\ProcessOptions|.
@@ -1356,6 +1378,7 @@
 %
 % \begin{macro}{\newfloat at replace@chapter}
 % \changes{v1.1f}{2019/08/25}{Parameter \meta{class name} added to macro}
+% \changes{v1.1i}{2019/08/31}{Local definition of \cs{if at chapnum} added}
 %   |\newfloat at replace@chapter|\marg{class name}\marg{original code}\marg{replacement code}\par
 %   tries to patch |\@chapter| so |\@add|\-|chapter|\-|lists|\-|gaps| will be supported.
 %   It checks for |\Hy at org@chapter|, too, since the original code will be stored here
@@ -1366,6 +1389,7 @@
     \let\if at twocolumn\iffalse
     \let\if at mainmatter\iffalse
     \let\if at thema\iffalse
+    \let\if at chapnum\iffalse
     \def\@tempa[##1]##2{#2}%
     \ifx\@tempa\@chapter
       \newfloat at InfoNoLine{Document class `#1' detected}%
@@ -1574,7 +1598,7 @@
   \fi}
 %    \end{macrocode}
 %    \begin{macrocode}
-  % boek(3).cls [2004/06/07 v2.1a NTG LaTeX document class]
+% boek(3).cls [2004/06/07 v2.1a NTG LaTeX document class]
 \newfloat at replace@chapter{boek}{%
   \ifnum \c at secnumdepth >\m at ne
     \if at mainmatter
@@ -1720,7 +1744,8 @@
   \else
     \@makechapterhead{#2}%
     \@afterheading
-  \fi}{%
+  \fi
+}{%
   \if at chapnum  % war mal \ifnum \c at secnumdepth >\m at ne
     \refstepcounter{chapter}%
     \if at mainmatter
@@ -1744,6 +1769,81 @@
 %    \end{macrocode}
 %
 % \pagebreak[3]
+% \subsubsection{The dgruyter package}
+% \changes{v1.1j}{2019/08/31}{Extended support of \package{dgruyter} package added}
+%
+%    \begin{macrocode}
+% dgruyter.sty [2017/09/19 v2.00 De Gruyter layout]
+\newfloat at replace@chapter{dgruyter}{%
+  \let\thesection\theinchapsection
+  \let\theequation\theinchapequation
+  \let\thefigure\theinchapfigure
+  \let\thetable\theinchaptable
+  \ifx\bookDOI\@undefined
+  \else
+    \@tempcnta\numexpr\componentd at i+\@ne\relax
+    \xdef\componentd at i{\the\@tempcnta}%
+    \xdef\@DOI{%
+      https://doi.org/\bookDOI
+      -\ifx\thepage\thefrontmatterpage2\else\ifnum\@tempcnta<100 0\fi\fi
+      \ifnum\@tempcnta<10 0\fi\componentd at i}%
+  \fi
+  \ifnum \c at secnumdepth >\m at ne
+    \if at mainmatter
+      \refstepcounter{chapter}%
+      \typeout{\@chapapp\space\thechapter.}%
+      \addcontentsline{toc}{chapter}{\protect\numberline{\thechapter}#1}%
+    \else
+      \addcontentsline{toc}{schapter}{#1}%
+    \fi
+  \else
+    \addcontentsline{toc}{schapter}{#1}%
+  \fi
+  \chaptermark{#1}%
+  \addtocontents{lof}{\protect\addvspace{13\p@}}%
+  \addtocontents{lot}{\protect\addvspace{13\p@}}%
+  \if at twocolumn
+    \@topnewpage[\@makechapterhead{#2}]%
+  \else
+    \@makechapterhead{#2}%
+    \@afterheading
+  \fi
+}{%
+  \let\thesection\theinchapsection
+  \let\theequation\theinchapequation
+  \let\thefigure\theinchapfigure
+  \let\thetable\theinchaptable
+  \ifx\bookDOI\@undefined
+  \else
+    \@tempcnta\numexpr\componentd at i+\@ne\relax
+    \xdef\componentd at i{\the\@tempcnta}%
+    \xdef\@DOI{%
+      https://doi.org/\bookDOI
+      -\ifx\thepage\thefrontmatterpage2\else\ifnum\@tempcnta<100 0\fi\fi
+      \ifnum\@tempcnta<10 0\fi\componentd at i}%
+  \fi
+  \ifnum \c at secnumdepth >\m at ne
+    \if at mainmatter
+      \refstepcounter{chapter}%
+      \typeout{\@chapapp\space\thechapter.}%
+      \addcontentsline{toc}{chapter}{\protect\numberline{\thechapter}#1}%
+    \else
+      \addcontentsline{toc}{schapter}{#1}%
+    \fi
+  \else
+    \addcontentsline{toc}{schapter}{#1}%
+  \fi
+  \chaptermark{#1}%
+  \@addchapterlistsgaps
+  \if at twocolumn
+    \@topnewpage[\@makechapterhead{#2}]%
+  \else
+    \@makechapterhead{#2}%
+    \@afterheading
+  \fi}
+%    \end{macrocode}
+%
+% \pagebreak[3]
 % \subsubsection{Compatibility warning}
 %
 %    \begin{macrocode}
@@ -1792,37 +1892,106 @@
 %    \end{macrocode}
 %
 % \pagebreak[3]
+% \subsection{Support of document classes}
+%
+% \subsubsection{The beamer document class}
+%
+% \begin{macro}{\beamer at float}
+% \changes{v1.1k}{2019/09/01}{This macro added}
+% Unfortunately the \class{beamer} document class does not offer
+% |\beamer at float| and |\end at beamer@float| (yet), so we have to define them
+% for ourself.
+% (This code was taken from beamerbaselocalstructure.sty [2019/07/23 v3.56] and adapted.)
+%    \begin{macrocode}
+\ifcsname beamer at float\endcsname \else
+%    \end{macrocode}
+%    \begin{macrocode}
+  \def\beamer at float#1{%
+    \ifcsname caption at settype\endcsname
+      \caption at settype{#1}%
+    \else
+      \def\@captype{#1}%
+    \fi
+    \par\nobreak\begin{center}\nobreak}
+%    \end{macrocode}
+%    \begin{macrocode}
+  \def\end at beamer@float{%
+    \par\nobreak\end{center}}
+%    \end{macrocode}
+%    \begin{macrocode}
+\fi
+%    \end{macrocode}
+% \end{macro}
+%
+% \pagebreak[3]
 % \subsection{Support of other packages}
 %
-% \begin{macro}{\newfloat at ForEachNew}
-% \changes{v1.1e}{2019/03/17}{This macro revised; uses \cs{ForEachFloatingEnvironment} now}
-% |\newfloat at ForEachNew|\marg{command}\marg{code}
+% \begin{macro}{\newfloat at IfPackageLoaded}
+% \changes{v1.1e}{2019/03/17}{This macro revised}
+% \changes{v1.1h}{2019/08/31}{This macro revised again and renamed from \cs{newfloat at ForEachNew} to \cs{newfloat at IfPackageLoaded}}
+% |\newfloat at IfPackageLoaded|\marg{package name}\marg{command}\marg{code}
 % will execute the given code for every floating environment defined with
-% |\Declare|\-|Floating|\-|Environment| if \meta{command} is defined.
-% This will be tried |\At|\-|Begin|\-|Document| additionally so the affected
-% package could be loaded after \thispackage.
+% |\Declare|\-|Floating|\-|Environment| if \meta{command} is not defined yet.
+% (If \meta{command} is already defined a warning will be issued.)
+% This will be tried |\At|\-|Begin|\-|Document| additionally so the affected package could
+% be loaded after \thispackage.
 %    \begin{macrocode}
-\newcommand\newfloat at ForEachNew[2]{%
-  \ifcsname#1\endcsname
-    \ForEachFloatingEnvironment{#2}%
-  \else
+\newcommand\newfloat at IfPackageLoaded[3]{%
+  \@ifpackageloaded{#1}{%
+    \newfloat@@IfPackageLoaded{#1}{#2}{#3}%
+  }{%
     \AtBeginDocument{%
-      \ifcsname#1\endcsname
-        \ForEachFloatingEnvironment{#2}%
-      \fi}%
-  \fi}%
-\@onlypreamble\newfloat at ForEachNew
+      \@ifpackageloaded{#1}{%
+        \newfloat@@IfPackageLoaded{#1}{#2}{#3}%
+      }{}}%
+  }}
+\@onlypreamble\newfloat at IfPackageLoaded
 %    \end{macrocode}
+%    \begin{macrocode}
+\newcommand\newfloat@@IfPackageLoaded[3]{%
+  \newfloat at InfoNoLine{`#1' package detected}%
+  % Execute code for every previous \DeclareFloatingEnvironment
+  \def\@elt##1{\newfloat@@@IfPackageLoaded{#1}{#2}{#3}}%
+  \newfloat@@list
+  \let\@elt\relax
+  % Execute code for every future \DeclareFloatingEnvironment
+  \newfloat at addtohook{\newfloat@@@IfPackageLoaded{#1}{#2}{#3}}}
+\@onlypreamble\newfloat@@IfPackageLoaded
+%    \end{macrocode}
+%    \begin{macrocode}
+\newcommand\newfloat@@@IfPackageLoaded[3]{%
+  \ifcsname#2\endcsname
+    \newfloat at WarningNoLine{%
+      Command \@backslashchar#2 already defined.\MessageBreak
+      (`#1' package support)}%
+  \else
+    #3%
+  \fi}
+\@onlypreamble\newfloat@@@IfPackageLoaded
+%    \end{macrocode}
 % \end{macro}
 %
 % \pagebreak[3]
+% \subsubsection{\package{dgruyter}}
+%
+% The De Gruyter layout package (for preparing books for Walter de Gruyter GmbH)
+% is defining |\plist at figure| and |\plist at table|, and expects this to be
+% defined for other floating environments as well.
+% (This will be used as prefix for the ``List of''.)
+%    \begin{macrocode}
+\newfloat at IfPackageLoaded{dgruyter}{plist@#1}{%
+  \expandafter\newcommand\csname plist@#1\endcsname{%
+    \@nameuse{#1name}\space}}
+%    \end{macrocode}
+%
+% \pagebreak[3]
 % \subsubsection{\package{float}}
 %
 % If the \package{float} package is used we fill up |\float at exts| with our file
 % extensions, too. Since this list will be used for inserting chapters gaps
 % we only add the ones which are configured for chapters gaps on.
-%%    \begin{macrocode}
-\newfloat at ForEachNew{float at exts}{%
+%    \begin{macrocode}
+\newfloat at IfPackageLoaded{float}{newfloat at undefined}{%
   \@nameuse{@ifchapterlistsgap@#1}{% if switched on
     \let\float at do=\relax
     \edef\@tempa{%
@@ -1835,7 +2004,7 @@
 %
 % We define a FP-variant of new floating environments here.
 %    \begin{macrocode}
-\newfloat at ForEachNew{FP at floatBegin}{%
+\newfloat at IfPackageLoaded{fltpage}{FP#1}{%
   \newcounter{FP@#1C}%
   \newenvironment{FP#1}{\FP at floatBegin{#1}}{\FP at floatEnd}}
 %    \end{macrocode}
@@ -1857,7 +2026,7 @@
 %
 % We define a sideways-variant of new floating environments here.
 %    \begin{macrocode}
-\newfloat at ForEachNew{@rotfloat}{%
+\newfloat at IfPackageLoaded{rotating}{sideways#1}{%
   \newenvironment{sideways#1}{\@rotfloat{#1}}{\end at rotfloat}%
   \newenvironment{sideways#1*}{\@rotdblfloat{#1}}{\end at rotdblfloat}}
 %    \end{macrocode}
@@ -1878,7 +2047,7 @@
 \@onlypreamble\newfloat at For@SC
 %    \end{macrocode}
 %    \begin{macrocode}
-\newfloat at ForEachNew{SC at float}{%
+\newfloat at IfPackageLoaded{sidecap}{SC#1}{%
   \expandafter\newfloat at For@SC\csname SC@#1 at vpos\endcsname{#1}}
 %    \end{macrocode}
 % \end{macro}
@@ -1888,23 +2057,10 @@
 %
 % We define a wrap-variant of new floating environments here.
 %    \begin{macrocode}
-\newfloat at ForEachNew{wrapfloat}{%
+\newfloat at IfPackageLoaded{wrapfig}{wrap#1}{%
   \newenvironment{wrap#1}{\wrapfloat{#1}}{\endwrapfloat}}
 %    \end{macrocode}
 %
-% \pagebreak[3]
-% \subsubsection{\package{dgruyter}}
-%
-% The De Gruyter layout package (for preparing books for Walter de Gruyter GmbH)
-% is defining |\plist at figure| and |\plist at table|, and expects this to be
-% defined for other floating environments as well.
-% (This will be used as prefix for the ``List of''.)
-%    \begin{macrocode}
-\newfloat at ForEachNew{plist at figure}{%
-  \expandafter\newcommand\csname plist@#1\endcsname{%
-    \@nameuse{#1name}\space}}
-%    \end{macrocode}
-%
 % \iffalse
 %</package>
 % \fi

Modified: trunk/Master/texmf-dist/source/latex/caption/subcaption.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/caption/subcaption.dtx	2019-09-01 21:23:42 UTC (rev 52007)
+++ trunk/Master/texmf-dist/source/latex/caption/subcaption.dtx	2019-09-01 21:35:52 UTC (rev 52008)
@@ -2,7 +2,7 @@
 % 
 % This is file `subcaption.dtx'.
 % 
-% Copyright (C) 2007-2018 Axel Sommerfeldt (axel.sommerfeldt at f-m.fm)
+% Copyright (C) 2007-2019 Axel Sommerfeldt (axel.sommerfeldt at f-m.fm)
 % 
 % --------------------------------------------------------------------------
 % 
@@ -25,12 +25,12 @@
 % and the user manuals caption-deu.tex, caption-eng.tex, and caption-rus.tex.
 % 
 % \fi
-% \CheckSum{178}
+% \CheckSum{235}
 %
 % \iffalse
 %<*driver>
 \NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesFile{subcaption.drv}[2018/05/13 v1.2 Adds a sub-caption feature to the caption package]
+\ProvidesFile{subcaption.drv}[2019/08/31 v1.3 Adds a sub-caption feature to the caption package]
 \hbadness=9999 \newcount\hbadness \hfuzz=74pt % Make TeX shut up.
 %\errorcontextlines=3
 %
@@ -84,7 +84,7 @@
 \newenvironment{background*}{\small\MARGINSYM{\Mountain}\ignorespaces}{\par}
 %
 \newcommand*\MARGINSYM[1]{\hskip 1sp \marginpar{\raggedleft\textcolor{blue}{{#1}}}}
-%\newcommand*\NEW[2]{}%\hskip 1sp \marginpar{\footnotesize\sffamily\raggedleft#1\\#2}}
+\newcommand*\NEW[2]{\MARGINSYM{\vskip2pt\footnotesize#1\\#2}}
 %
 \begin{document}
   \DocInput{subcaption.dtx}
@@ -401,6 +401,7 @@
 % \See{\Ref{hypcap}}
 % \end{itemize}
 %
+% \NEWfeature{v1.2}
 % Beside the \meta{inner-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
@@ -597,6 +598,7 @@
 %
 % \pagebreak[3]
 % \subsection{The \cs{subref} command}
+% \label{subref}
 %
 % While |\ref|\marg{key} (and |\ref*|\marg{key}, if the \package{hyperref}
 % package is used) usually gives a combined result representing the main
@@ -625,8 +627,10 @@
 %
 % \pagebreak[3]
 % \subsection{The \opt{subrefformat=} option}
+% \label{subrefformat}
 %
 % \DescribeMacro{subrefformat=}
+% \NEWfeature{v1.1}
 % By applying |\Declare|\-|Caption|\-|Sub|\-|Type|, or by redefining |\the|\-\meta{counter}
 % and |\p@|\-\meta{counter}, you will change the look of references typeset with |\ref|
 % \emph{and} |\sub|\-|ref|.
@@ -652,6 +656,7 @@
 %
 % \DescribeMacro\phantomsubcaption
 % \DescribeMacro\phantomcaption
+% \NEWfeature{v1.1}
 % If you don't want to give a sub-figure a caption, because the picture itself
 % already contains the caption, or for some other reason, you can use the command
 % \begin{quote}
@@ -770,6 +775,19 @@
 % {\small(See also the documentation of the \package{caption} package,
 % sections about \package{hyperref} \& \package{hypcap}.)}
 %
+% \pagebreak[3]
+% \section{The \cs{subfloat} command}
+% \label{subfloat}
+%
+% \DescribeMacro\subfloat
+% \NEWfeature{v1.3}
+% To allow a smoother transition from the \package{subfig} package
+% (which is unmaintained for over 14 years)
+% this package also offers |\sub|\-|float| with the same syntax:
+% \begin{quote}
+%   |\subfloat|\oarg{list\_entry}\oarg{sub-caption}\marg{body}
+% \end{quote}
+%
 % \iffalse
 % --------------------------------------------------------------------------- %
 % \fi
@@ -903,7 +921,7 @@
 %
 %    \begin{macrocode}
 \NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{subcaption}[2018/05/13 v1.2 Sub-captions (AR)]
+\ProvidesPackage{subcaption}[2019/09/01 v1.3a Sub-captions (AR)]
 %    \end{macrocode}
 %
 % \subsection{Initial code}
@@ -910,7 +928,7 @@
 %
 % Since we base on the \package{caption} package we load it here.
 %    \begin{macrocode}
-\RequirePackage{caption}[2018/05/11] % needs v3.4 or newer
+\RequirePackage{caption}[2019/09/01] % needs v3.3c or newer
 %    \end{macrocode}
 %
 % \begin{macro}{\subcaption at CheckCompatibility}
@@ -1187,6 +1205,57 @@
 %    \end{macrocode}
 % \end{macro}
 %
+% \subsubsection{The \cs{subfloat} command}
+%
+% \begin{macro}{\subfloat}
+% \changes{v0.4}{2008/03/01}{This macro added}
+% \changes{v1.0c}{2011/01/22}{This macro removed since it's too incompatible with the one from \package{subfig}}
+% \changes{v1.3}{2019/08/31}{This macro re-added and revised}
+% \changes{v1.3a}{2019/09/01}{\cs{ignorespaces} copied from \cs{\sf@@@subfloat}}
+%  |\subfloat|\oarg{list\_entry}\oarg{sub-caption}\marg{body}\par
+%  If \meta{sub-caption} is given, we map this to |\sub|\-|caption|\-|box|
+%  but transfer the |\label| from \meta{body} to \meta{sub-caption}.
+%  If not, we do the same as |\sub|\-|caption|\-|box| does, but use |\phantom|\-|caption| instead of |\caption|.
+%  In both cases we do a |\ignore|\-|spaces| at the end since the original implementation of |\sub|\-|float| does this, too.
+%    \begin{macrocode}
+\caption at ifundefined\subfloat{%
+%    \end{macrocode}
+%    \begin{macrocode}
+  \newcommand*\subfloat{%
+    \@ifnextchar[\@subfloat\subfloat@}
+%    \end{macrocode}
+%    \begin{macrocode}
+  \long\def\@subfloat[#1]{%
+    \@ifnextchar[{\@@subfloat{#1}}{\@@@subfloat\subcaptionbox{#1}}}
+%    \end{macrocode}
+%    \begin{macrocode}
+  \long\def\@@subfloat#1[#2]{\@@@subfloat{\subcaptionbox[{#1}]}{#2}}
+%    \end{macrocode}
+%    \begin{macrocode}
+  \newcommand\@@@subfloat[3]{%
+    \caption at getlabel#3\label{}\@nil
+    #1{#2\caption at thelabel}{\let\label\caption at gobble#3}%
+    \global\let\caption at thelabel\relax
+    \ignorespaces}
+%    \end{macrocode}
+%    \begin{macrocode}
+  \newcommand*\subfloat@[1]{%
+    \setbox\@tempboxa\hbox{#1}%
+    \caption at iiiibox\setcaptionsubtype
+      {\phantomcaption\@gobble}{\phantomcaption\@gobble}% no box with \caption
+      {}% no optional arguments for \caption
+      {}% no sub-caption
+      [\wd\@tempboxa][\caption at hj@default]%
+      {\unhbox\@tempboxa}%
+    \ignorespaces}
+%    \end{macrocode}
+%    \begin{macrocode}
+}{%
+  \PackageInfo{subcaption}{\protect\subfloat\space is already defined\@gobble}
+}
+%    \end{macrocode}
+% \end{macro}
+%
 % \iffalse
 %</package>
 % \fi

Modified: trunk/Master/texmf-dist/tex/latex/caption/caption.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/caption/caption.sty	2019-09-01 21:23:42 UTC (rev 52007)
+++ trunk/Master/texmf-dist/tex/latex/caption/caption.sty	2019-09-01 21:35:52 UTC (rev 52008)
@@ -37,8 +37,8 @@
 %%   caption-deu.tex, caption-eng.tex, and caption-rus.tex.
 %% 
 \NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption}[2019/08/29 v3.3b Customizing captions (AR)]
-\RequirePackage{caption3}[2018/09/12] % needs v1.8c or newer
+\ProvidesPackage{caption}[2019/09/01 v3.3d Customizing captions (AR)]
+\RequirePackage{caption3}[2019/09/01] % needs v1.8d or newer
 \caption at ifbool{documentclass}{}{%
   \caption at WarningNoLine{%
     Unsupported document class (or package) detected,\MessageBreak
@@ -886,31 +886,33 @@
     {\caption at iibox{#1}{#2}{#3}}%
     {\caption at iibox@{#1}{#2}{#3}}}
 \long\def\caption at iibox#1#2#3[#4]{%
-  \@testopt{\caption at iiibox{#1}{#2}{#3}{#4}}\captionbox at hj@default}
+  \@testopt{\caption at iiibox{#1}{#2}{#3}[{#4}]}\captionbox at hj@default}
 \long\def\caption at iibox@#1#2#3#4{%
   \setbox\@tempboxa\hbox{#4}%
-  \caption at iiibox{#1}{#2}{#3}{\wd\@tempboxa}[\captionbox at hj@default]{\unhbox\@tempboxa}}
-\long\def\caption at iiibox#1#2#3#4[#5]#6{%
+  \caption at iiibox{#1}{#2}{#3}[\wd\@tempboxa][\captionbox at hj@default]{\unhbox\@tempboxa}}
+\long\def\caption at iiibox#1{%
+  \caption at iiiibox{#1}\vbox\vtop}
+\long\def\caption at iiiibox#1#2#3#4#5[#6][#7]#8{%
   \begingroup
   #1*% set \caption at position
   \caption at iftop{%
     \endgroup
-    \parbox[t]{#4}{%
+    \parbox[t]{#6}{%
       #1\relax
       \caption at setposition t%
-      \vbox{\caption#2{#3}}%
+      #2{\caption#4{#5}}%
       \captionbox at hrule
-      \csname caption at hj@#5\endcsname
-      #6}%
+      \csname caption at hj@#7\endcsname
+      #8}%
   }{%
     \endgroup
-    \parbox[b]{#4}{%
+    \parbox[b]{#6}{%
       #1\relax
       \caption at setposition b%
-      \csname caption at hj@#5\endcsname
-      #6%
+      \csname caption at hj@#7\endcsname
+      #8%
       \captionbox at hrule
-      \vtop{\caption#2{#3}}}%
+      #3{\caption#4{#5}}}%
   }}
 \newcommand*\captionbox at hj@default{c}
 \newcommand*\captionbox at hrule{\hrule\@height\z@\relax}
@@ -1163,16 +1165,10 @@
 \caption at ifundefined\smf at makecaption{}{\let\smf at makecaption\@makecaption}
 \@ifclassloaded{beamer}{%
   \caption at InfoNoLine{beamer document class}%
-  \expandafter\let\expandafter\caption at ORI@figure
-    \csname\string\figure\endcsname
-  \@namedef{\string\figure}[#1]{%
-    \caption at ORI@figure[#1]%
-    \caption at settype{figure}}
-  \expandafter\let\expandafter\caption at ORI@table
-    \csname\string\table\endcsname
-  \@namedef{\string\table}[#1]{%
-    \caption at ORI@table[#1]%
-    \caption at settype{table}}
+  \let\caption at ORI@figure\figure
+  \def\figure{\caption at settype{figure}\caption at ORI@figure}
+  \let\caption at ORI@table\figure
+  \def\table{\caption at settype{table}\caption at ORI@table}
 }{}
 \caption at ifundefined\scr at caption{}{%
   \caption at AtBeginDocument{\let\scr at caption\caption}}
@@ -1700,7 +1696,7 @@
       \caption at defrostHref
       \let\noindent\caption at ORI@noindent
       \noindent}%
-    \caption at ORI@ivparpic(#1,#2)(#3,#4)[#5][#6]{#7}%
+    \caption at ORI@ivparpic(#1,#2)(#3,#4)[{#5}][{#6}]{#7}%
     \let\noindent\caption at ORI@noindent}%
 }{%
   \let\piccaptiontype\@undefined

Modified: trunk/Master/texmf-dist/tex/latex/caption/caption3.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/caption/caption3.sty	2019-09-01 21:23:42 UTC (rev 52007)
+++ trunk/Master/texmf-dist/tex/latex/caption/caption3.sty	2019-09-01 21:35:52 UTC (rev 52008)
@@ -6,7 +6,7 @@
 %%
 %% caption3.dtx  (with options: `package')
 %% 
-%% Copyright (C) 1994-2018 Axel Sommerfeldt (axel.sommerfeldt at f-m.fm)
+%% Copyright (C) 1994-2019 Axel Sommerfeldt (axel.sommerfeldt at f-m.fm)
 %% 
 %% https://gitlab.com/axelsommerfeldt/caption
 %% 
@@ -37,7 +37,7 @@
 %%   caption-deu.tex, caption-eng.tex, and caption-rus.tex.
 %% 
 \NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption3}[2018/09/12 v1.8c caption3 kernel (AR)]
+\ProvidesPackage{caption3}[2019/09/01 v1.8d caption3 kernel (AR)]
 \providecommand\caption at FixArabTeX{%
   \def\caption at tempa##1{}%
   \ifx\caption at tempa\@gobble
@@ -707,7 +707,8 @@
     {\expandafter\let\expandafter\caption at tfmt\csname caption at tfmt@#1\endcsname}}
 \DeclareCaptionTextFormat{empty}{%
   \caption at get@label#1\caption at makeanchor{}\@nil
-  \caption at thelabel}
+  \caption at thelabel
+  \global\let\caption at thelabel\relax}
 \long\def\caption at get@label#1\caption at makeanchor#2#3\@nil{%
   \def\caption at tempa{#2}%
   \ifx\caption at tempa\@empty
@@ -743,6 +744,7 @@
 \long\def\caption@@@getlabel[#1]#2\@nil{%
   \l at addto@macro\caption at thelabel{[{#1}]}%
   \caption@@getlabel#2\@nil}
+\let\caption at thelabel\relax
 \newcommand*\DeclareCaptionFont[2]{%
   \define at key{caption at fnt}{#1}[]{\l at addto@macro\caption at fnt{#2}}}
 \@onlypreamble\DeclareCaptionFont

Modified: trunk/Master/texmf-dist/tex/latex/caption/newfloat.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/caption/newfloat.sty	2019-09-01 21:23:42 UTC (rev 52007)
+++ trunk/Master/texmf-dist/tex/latex/caption/newfloat.sty	2019-09-01 21:35:52 UTC (rev 52008)
@@ -37,11 +37,15 @@
 %%   caption-deu.tex, caption-eng.tex, and caption-rus.tex.
 %% 
 \NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{newfloat}[2019/08/28 v1.1g Defining new floating environments (AR)]
+\ProvidesPackage{newfloat}[2019/09/01 v1.1k Defining new floating environments (AR)]
 \newcommand*\newfloat at Info[1]{%
   \PackageInfo{newfloat}{#1}}
 \newcommand*\newfloat at InfoNoLine[1]{%
   \newfloat at Info{#1\@gobble}}
+\newcommand*\newfloat at Warning[1]{%
+  \PackageWarning{newfloat}{#1}}
+\newcommand*\newfloat at WarningNoLine[1]{%
+  \newfloat at Warning{#1\@gobble}}
 \newcommand*\newfloat at Error[1]{%
   \PackageError{newfloat}{#1}\newfloat at eh}
 \newcommand*\newfloat at eh{%
@@ -92,8 +96,12 @@
       {\begin{@tufte at float}[{##1}]{#2}{star}}%
       {\end{@tufte at float}}%
   \else
-    \newenvironment{#2}{\@float{#2}}{\end at float}%
-    \newenvironment{#2*}{\@dblfloat{#2}}{\end at dblfloat}%
+    \@ifclassloaded{beamer}{%
+      \newenvironment{#2}[1][]{\beamer at float{#2}}{\end at beamer@float}%
+    }{%
+      \newenvironment{#2}{\@float{#2}}{\end at float}%
+      \newenvironment{#2*}{\@dblfloat{#2}}{\end at dblfloat}%
+    }%
   \fi
   \newfloat at def{listof#2}{\newfloat at listof{#2}}%
   \newfloat at def{listof#2s}{\@nameuse{listof#2}}%
@@ -332,6 +340,7 @@
 \fi
 \ifcsname @chapter\endcsname
   \providecommand*\@chapterlistsgap{10\p@}%
+  \@ifpackageloaded{dgruyter}{\renewcommand*\@chapterlistsgap{13\p@}}{}%
   \providecommand*\@addchapterlistsgap[2]{%
     \@nameuse{@ifchapterlistsgap@#1}{% if switched on
       \@@addchapterlistsgap{#1}{#2}}}
@@ -397,7 +406,6 @@
 \define at key{newfloat}{planb-fileext}{%
   \newfloat at Info{Setting Plan B file extension to `#1'}
   \xdef\newfloat at addtocontents@ext{#1}}
-
 \let\@tempc\relax
 \@expandtwoargs\setkeys{newfloat}{planb,\@ptionlist{\@currname.\@currext}}%
 \AtEndOfPackage{\let\@unprocessedoptions\relax}
@@ -407,6 +415,7 @@
     \let\if at twocolumn\iffalse
     \let\if at mainmatter\iffalse
     \let\if at thema\iffalse
+    \let\if at chapnum\iffalse
     \def\@tempa[##1]##2{#2}%
     \ifx\@tempa\@chapter
       \newfloat at InfoNoLine{Document class `#1' detected}%
@@ -564,7 +573,6 @@
     \@makechapterhead{#2}%
     \@afterheading
   \fi}
-  % boek(3).cls [2004/06/07 v2.1a NTG LaTeX document class]
 \newfloat at replace@chapter{boek}{%
   \ifnum \c at secnumdepth >\m at ne
     \if at mainmatter
@@ -694,7 +702,8 @@
   \else
     \@makechapterhead{#2}%
     \@afterheading
-  \fi}{%
+  \fi
+}{%
   \if at chapnum  % war mal \ifnum \c at secnumdepth >\m at ne
     \refstepcounter{chapter}%
     \if at mainmatter
@@ -715,6 +724,73 @@
     \@makechapterhead{#2}%
     \@afterheading
   \fi}
+\newfloat at replace@chapter{dgruyter}{%
+  \let\thesection\theinchapsection
+  \let\theequation\theinchapequation
+  \let\thefigure\theinchapfigure
+  \let\thetable\theinchaptable
+  \ifx\bookDOI\@undefined
+  \else
+    \@tempcnta\numexpr\componentd at i+\@ne\relax
+    \xdef\componentd at i{\the\@tempcnta}%
+    \xdef\@DOI{%
+      https://doi.org/\bookDOI
+      -\ifx\thepage\thefrontmatterpage2\else\ifnum\@tempcnta<100 0\fi\fi
+      \ifnum\@tempcnta<10 0\fi\componentd at i}%
+  \fi
+  \ifnum \c at secnumdepth >\m at ne
+    \if at mainmatter
+      \refstepcounter{chapter}%
+      \typeout{\@chapapp\space\thechapter.}%
+      \addcontentsline{toc}{chapter}{\protect\numberline{\thechapter}#1}%
+    \else
+      \addcontentsline{toc}{schapter}{#1}%
+    \fi
+  \else
+    \addcontentsline{toc}{schapter}{#1}%
+  \fi
+  \chaptermark{#1}%
+  \addtocontents{lof}{\protect\addvspace{13\p@}}%
+  \addtocontents{lot}{\protect\addvspace{13\p@}}%
+  \if at twocolumn
+    \@topnewpage[\@makechapterhead{#2}]%
+  \else
+    \@makechapterhead{#2}%
+    \@afterheading
+  \fi
+}{%
+  \let\thesection\theinchapsection
+  \let\theequation\theinchapequation
+  \let\thefigure\theinchapfigure
+  \let\thetable\theinchaptable
+  \ifx\bookDOI\@undefined
+  \else
+    \@tempcnta\numexpr\componentd at i+\@ne\relax
+    \xdef\componentd at i{\the\@tempcnta}%
+    \xdef\@DOI{%
+      https://doi.org/\bookDOI
+      -\ifx\thepage\thefrontmatterpage2\else\ifnum\@tempcnta<100 0\fi\fi
+      \ifnum\@tempcnta<10 0\fi\componentd at i}%
+  \fi
+  \ifnum \c at secnumdepth >\m at ne
+    \if at mainmatter
+      \refstepcounter{chapter}%
+      \typeout{\@chapapp\space\thechapter.}%
+      \addcontentsline{toc}{chapter}{\protect\numberline{\thechapter}#1}%
+    \else
+      \addcontentsline{toc}{schapter}{#1}%
+    \fi
+  \else
+    \addcontentsline{toc}{schapter}{#1}%
+  \fi
+  \chaptermark{#1}%
+  \@addchapterlistsgaps
+  \if at twocolumn
+    \@topnewpage[\@makechapterhead{#2}]%
+  \else
+    \@makechapterhead{#2}%
+    \@afterheading
+  \fi}
 \ifx\newfloat at replace@chapter\newfloat at dont@replace at chapter \else
   \newfloat at InfoNoLine{%
     Unsupported document class, or \noexpand\@chapter\MessageBreak
@@ -744,28 +820,59 @@
         \fi
       \fi}}}
 \fi
-\newcommand\newfloat at ForEachNew[2]{%
-  \ifcsname#1\endcsname
-    \ForEachFloatingEnvironment{#2}%
+\ifcsname beamer at float\endcsname \else
+  \def\beamer at float#1{%
+    \ifcsname caption at settype\endcsname
+      \caption at settype{#1}%
+    \else
+      \def\@captype{#1}%
+    \fi
+    \par\nobreak\begin{center}\nobreak}
+  \def\end at beamer@float{%
+    \par\nobreak\end{center}}
+\fi
+\newcommand\newfloat at IfPackageLoaded[3]{%
+  \@ifpackageloaded{#1}{%
+    \newfloat@@IfPackageLoaded{#1}{#2}{#3}%
+  }{%
+    \AtBeginDocument{%
+      \@ifpackageloaded{#1}{%
+        \newfloat@@IfPackageLoaded{#1}{#2}{#3}%
+      }{}}%
+  }}
+\@onlypreamble\newfloat at IfPackageLoaded
+\newcommand\newfloat@@IfPackageLoaded[3]{%
+  \newfloat at InfoNoLine{`#1' package detected}%
+  % Execute code for every previous \DeclareFloatingEnvironment
+  \def\@elt##1{\newfloat@@@IfPackageLoaded{#1}{#2}{#3}}%
+  \newfloat@@list
+  \let\@elt\relax
+  % Execute code for every future \DeclareFloatingEnvironment
+  \newfloat at addtohook{\newfloat@@@IfPackageLoaded{#1}{#2}{#3}}}
+\@onlypreamble\newfloat@@IfPackageLoaded
+\newcommand\newfloat@@@IfPackageLoaded[3]{%
+  \ifcsname#2\endcsname
+    \newfloat at WarningNoLine{%
+      Command \@backslashchar#2 already defined.\MessageBreak
+      (`#1' package support)}%
   \else
-    \AtBeginDocument{%
-      \ifcsname#1\endcsname
-        \ForEachFloatingEnvironment{#2}%
-      \fi}%
-  \fi}%
-\@onlypreamble\newfloat at ForEachNew
-%%    \begin{macrocode}
-\newfloat at ForEachNew{float at exts}{%
+    #3%
+  \fi}
+\@onlypreamble\newfloat@@@IfPackageLoaded
+\newfloat at IfPackageLoaded{dgruyter}{plist@#1}{%
+  \expandafter\newcommand\csname plist@#1\endcsname{%
+    \@nameuse{#1name}\space}}
+\newfloat at IfPackageLoaded{float}{newfloat at undefined}{%
   \@nameuse{@ifchapterlistsgap@#1}{% if switched on
     \let\float at do=\relax
     \edef\@tempa{%
       \noexpand\float at exts{\the\float at exts\float at do{\@nameuse{ext@#1}}}}%
     \@tempa}}
-\newfloat at ForEachNew{FP at floatBegin}{%
+\newfloat at IfPackageLoaded{fltpage}{FP#1}{%
   \newcounter{FP@#1C}%
   \newenvironment{FP#1}{\FP at floatBegin{#1}}{\FP at floatEnd}}
 \providecommand*\ext at lstlisting{lol}%
-\newfloat at ForEachNew{@rotfloat}{%
+\newfloat at IfPackageLoaded{rotating}{sideways#1}{%
   \newenvironment{sideways#1}{\@rotfloat{#1}}{\end at rotfloat}%
   \newenvironment{sideways#1*}{\@rotdblfloat{#1}}{\end at rotdblfloat}}
 \newcommand*\newfloat at For@SC[2]{%
@@ -775,13 +882,10 @@
   \newenvironment{SC#2*}%
     {\SC at dblfloat[{#1}]{#2}}{\endSC at dblfloat}}
 \@onlypreamble\newfloat at For@SC
-\newfloat at ForEachNew{SC at float}{%
+\newfloat at IfPackageLoaded{sidecap}{SC#1}{%
   \expandafter\newfloat at For@SC\csname SC@#1 at vpos\endcsname{#1}}
-\newfloat at ForEachNew{wrapfloat}{%
+\newfloat at IfPackageLoaded{wrapfig}{wrap#1}{%
   \newenvironment{wrap#1}{\wrapfloat{#1}}{\endwrapfloat}}
-\newfloat at ForEachNew{plist at figure}{%
-  \expandafter\newcommand\csname plist@#1\endcsname{%
-    \@nameuse{#1name}\space}}
 \endinput
 %%
 %% End of file `newfloat.sty'.

Modified: trunk/Master/texmf-dist/tex/latex/caption/subcaption.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/caption/subcaption.sty	2019-09-01 21:23:42 UTC (rev 52007)
+++ trunk/Master/texmf-dist/tex/latex/caption/subcaption.sty	2019-09-01 21:35:52 UTC (rev 52008)
@@ -6,7 +6,7 @@
 %%
 %% subcaption.dtx  (with options: `package')
 %% 
-%% Copyright (C) 1994-2018 Axel Sommerfeldt (axel.sommerfeldt at f-m.fm)
+%% Copyright (C) 1994-2019 Axel Sommerfeldt (axel.sommerfeldt at f-m.fm)
 %% 
 %% https://gitlab.com/axelsommerfeldt/caption
 %% 
@@ -37,8 +37,8 @@
 %%   caption-deu.tex, caption-eng.tex, and caption-rus.tex.
 %% 
 \NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{subcaption}[2018/05/13 v1.2 Sub-captions (AR)]
-\RequirePackage{caption}[2018/05/11] % needs v3.4 or newer
+\ProvidesPackage{subcaption}[2019/09/01 v1.3a Sub-captions (AR)]
+\RequirePackage{caption}[2019/09/01] % needs v3.3c or newer
 \newcommand\subcaption at CheckCompatibility{%
   \@ifundefined{caption at ifcompatibility}{}{%
     \caption at ifcompatibility{%
@@ -145,6 +145,29 @@
     {\caption at Error{Undefined label format `#1'}}%
     {\expandafter\let\expandafter\subcaption at reffmt\csname caption at lfmt@#1\endcsname}}
 \subcaption at setrefformat{simple}
+\caption at ifundefined\subfloat{%
+  \newcommand*\subfloat{%
+    \@ifnextchar[\@subfloat\subfloat@}
+  \long\def\@subfloat[#1]{%
+    \@ifnextchar[{\@@subfloat{#1}}{\@@@subfloat\subcaptionbox{#1}}}
+  \long\def\@@subfloat#1[#2]{\@@@subfloat{\subcaptionbox[{#1}]}{#2}}
+  \newcommand\@@@subfloat[3]{%
+    \caption at getlabel#3\label{}\@nil
+    #1{#2\caption at thelabel}{\let\label\caption at gobble#3}%
+    \global\let\caption at thelabel\relax
+    \ignorespaces}
+  \newcommand*\subfloat@[1]{%
+    \setbox\@tempboxa\hbox{#1}%
+    \caption at iiiibox\setcaptionsubtype
+      {\phantomcaption\@gobble}{\phantomcaption\@gobble}% no box with \caption
+      {}% no optional arguments for \caption
+      {}% no sub-caption
+      [\wd\@tempboxa][\caption at hj@default]%
+      {\unhbox\@tempboxa}%
+    \ignorespaces}
+}{%
+  \PackageInfo{subcaption}{\protect\subfloat\space is already defined\@gobble}
+}
 \endinput
 %%
 %% End of file `subcaption.sty'.



More information about the tex-live-commits mailing list