texlive[62290] Master/texmf-dist: caption (28feb22)

commits+karl at tug.org commits+karl at tug.org
Mon Feb 28 22:04:37 CET 2022


Revision: 62290
          http://tug.org/svn/texlive?view=revision&revision=62290
Author:   karl
Date:     2022-02-28 22:04:36 +0100 (Mon, 28 Feb 2022)
Log Message:
-----------
caption (28feb22)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/caption/README
    trunk/Master/texmf-dist/source/latex/caption/bicaption.dtx
    trunk/Master/texmf-dist/source/latex/caption/caption-ams-smf.dtx
    trunk/Master/texmf-dist/source/latex/caption/caption-beamer.dtx
    trunk/Master/texmf-dist/source/latex/caption/caption-elsarticle.dtx
    trunk/Master/texmf-dist/source/latex/caption/caption-koma.dtx
    trunk/Master/texmf-dist/source/latex/caption/caption-light.dtx
    trunk/Master/texmf-dist/source/latex/caption/caption-memoir.dtx
    trunk/Master/texmf-dist/source/latex/caption/caption-ntg.dtx
    trunk/Master/texmf-dist/source/latex/caption/caption-thesis.dtx
    trunk/Master/texmf-dist/source/latex/caption/caption.dtx
    trunk/Master/texmf-dist/source/latex/caption/caption3.dtx
    trunk/Master/texmf-dist/source/latex/caption/fallback/v3.0/caption.dtx
    trunk/Master/texmf-dist/source/latex/caption/fallback/v3.1/caption.dtx
    trunk/Master/texmf-dist/source/latex/caption/fallback/v3.2/caption.dtx
    trunk/Master/texmf-dist/source/latex/caption/fallback/v3.2/caption3.dtx
    trunk/Master/texmf-dist/source/latex/caption/fallback/v3.3/caption.dtx
    trunk/Master/texmf-dist/source/latex/caption/fallback/v3.3/caption3.dtx
    trunk/Master/texmf-dist/source/latex/caption/fallback/v3.4/caption.dtx
    trunk/Master/texmf-dist/source/latex/caption/fallback/v3.4/caption3.dtx
    trunk/Master/texmf-dist/source/latex/caption/fallback/v3.5/caption.dtx
    trunk/Master/texmf-dist/source/latex/caption/fallback/v3.5/caption3.dtx
    trunk/Master/texmf-dist/source/latex/caption/ltcaption.dtx
    trunk/Master/texmf-dist/source/latex/caption/subcaption.dtx
    trunk/Master/texmf-dist/tex/latex/caption/caption-memoir.sto
    trunk/Master/texmf-dist/tex/latex/caption/caption.sty
    trunk/Master/texmf-dist/tex/latex/caption/caption3.sty

Modified: trunk/Master/texmf-dist/doc/latex/caption/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/caption/README	2022-02-28 21:04:10 UTC (rev 62289)
+++ trunk/Master/texmf-dist/doc/latex/caption/README	2022-02-28 21:04:36 UTC (rev 62290)
@@ -1,7 +1,7 @@
 ==========================================================================
 
 The `caption' package bundle
-Release 2022-02-20
+Release 2022-02-28
 Copyright (C) 1994-2022 Axel Sommerfeldt (axel.sommerfeldt at f-m.fm)
 
 License: LPPL = LaTeX Project Public Licence

Modified: trunk/Master/texmf-dist/source/latex/caption/bicaption.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/caption/bicaption.dtx	2022-02-28 21:04:10 UTC (rev 62289)
+++ trunk/Master/texmf-dist/source/latex/caption/bicaption.dtx	2022-02-28 21:04:36 UTC (rev 62290)
@@ -1027,7 +1027,7 @@
 % \DoNotIndex{\@ehc,\@ehd,\@empty,\@esphack,\@expandtwoargs}
 % \DoNotIndex{\@for,\@firstofone,\@firstoftwo}
 % \DoNotIndex{\@gobble,\@gobblefour,\@gobbletwo,\@hangfrom}
-% \DoNotIndex{\@ifnextchar,\@ifpackagelater,\@ifpackageloaded}
+% \DoNotIndex{\if at minipage,\@ifnextchar,\@ifpackagelater,\@ifpackageloaded}
 % \DoNotIndex{\@ifstar,\@ifundefined,\@latex at error,\@namedef,\@nameuse}
 % \DoNotIndex{\@onlypreamble,\@parboxrestore,\@plus,\@ptionlist}
 % \DoNotIndex{\@removeelement,\@restorepar,\@secondoftwo,\@setpar}

Modified: trunk/Master/texmf-dist/source/latex/caption/caption-ams-smf.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/caption/caption-ams-smf.dtx	2022-02-28 21:04:10 UTC (rev 62289)
+++ trunk/Master/texmf-dist/source/latex/caption/caption-ams-smf.dtx	2022-02-28 21:04:36 UTC (rev 62290)
@@ -126,7 +126,7 @@
 % \DoNotIndex{\@ehc,\@ehd,\@empty,\@esphack,\@expandtwoargs}
 % \DoNotIndex{\@for,\@firstofone,\@firstoftwo}
 % \DoNotIndex{\@gobble,\@gobblefour,\@gobbletwo,\@hangfrom}
-% \DoNotIndex{\if at minipage\@ifnextchar,\@ifpackagelater,\@ifpackageloaded}
+% \DoNotIndex{\if at minipage,\@ifnextchar,\@ifpackagelater,\@ifpackageloaded}
 % \DoNotIndex{\@ifstar,\@ifundefined,\@latex at error,\@minipagefalse,\@minipagetrue}
 % \DoNotIndex{\@namedef,\@nameuse}
 % \DoNotIndex{\@onlypreamble,\@parboxrestore,\@plus,\@ptionlist}

Modified: trunk/Master/texmf-dist/source/latex/caption/caption-beamer.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/caption/caption-beamer.dtx	2022-02-28 21:04:10 UTC (rev 62289)
+++ trunk/Master/texmf-dist/source/latex/caption/caption-beamer.dtx	2022-02-28 21:04:36 UTC (rev 62290)
@@ -121,7 +121,7 @@
 % \DoNotIndex{\@ehc,\@ehd,\@empty,\@esphack,\@expandtwoargs}
 % \DoNotIndex{\@for,\@firstofone,\@firstoftwo}
 % \DoNotIndex{\@gobble,\@gobblefour,\@gobbletwo,\@hangfrom}
-% \DoNotIndex{\if at minipage\@ifnextchar,\@ifpackagelater,\@ifpackageloaded}
+% \DoNotIndex{\if at minipage,\@ifnextchar,\@ifpackagelater,\@ifpackageloaded}
 % \DoNotIndex{\@ifstar,\@ifundefined,\@latex at error,\@minipagefalse,\@minipagetrue}
 % \DoNotIndex{\@namedef,\@nameuse}
 % \DoNotIndex{\@onlypreamble,\@parboxrestore,\@plus,\@ptionlist}

Modified: trunk/Master/texmf-dist/source/latex/caption/caption-elsarticle.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/caption/caption-elsarticle.dtx	2022-02-28 21:04:10 UTC (rev 62289)
+++ trunk/Master/texmf-dist/source/latex/caption/caption-elsarticle.dtx	2022-02-28 21:04:36 UTC (rev 62290)
@@ -121,7 +121,7 @@
 % \DoNotIndex{\@ehc,\@ehd,\@empty,\@esphack,\@expandtwoargs}
 % \DoNotIndex{\@for,\@firstofone,\@firstoftwo}
 % \DoNotIndex{\@gobble,\@gobblefour,\@gobbletwo,\@hangfrom}
-% \DoNotIndex{\if at minipage\@ifnextchar,\@ifpackagelater,\@ifpackageloaded}
+% \DoNotIndex{\if at minipage,\@ifnextchar,\@ifpackagelater,\@ifpackageloaded}
 % \DoNotIndex{\@ifstar,\@ifundefined,\@latex at error,\@minipagefalse,\@minipagetrue}
 % \DoNotIndex{\@namedef,\@nameuse}
 % \DoNotIndex{\@onlypreamble,\@parboxrestore,\@plus,\@ptionlist}

Modified: trunk/Master/texmf-dist/source/latex/caption/caption-koma.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/caption/caption-koma.dtx	2022-02-28 21:04:10 UTC (rev 62289)
+++ trunk/Master/texmf-dist/source/latex/caption/caption-koma.dtx	2022-02-28 21:04:36 UTC (rev 62290)
@@ -125,7 +125,7 @@
 % \DoNotIndex{\@ehc,\@ehd,\@empty,\@esphack,\@expandtwoargs}
 % \DoNotIndex{\@for,\@firstofone,\@firstoftwo}
 % \DoNotIndex{\@gobble,\@gobblefour,\@gobbletwo,\@hangfrom}
-% \DoNotIndex{\if at minipage\@ifnextchar,\@ifpackagelater,\@ifpackageloaded}
+% \DoNotIndex{\if at minipage,\@ifnextchar,\@ifpackagelater,\@ifpackageloaded}
 % \DoNotIndex{\@ifstar,\@ifundefined,\@latex at error,\@minipagefalse,\@minipagetrue}
 % \DoNotIndex{\@namedef,\@nameuse}
 % \DoNotIndex{\@onlypreamble,\@parboxrestore,\@plus,\@ptionlist}

Modified: trunk/Master/texmf-dist/source/latex/caption/caption-light.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/caption/caption-light.dtx	2022-02-28 21:04:10 UTC (rev 62289)
+++ trunk/Master/texmf-dist/source/latex/caption/caption-light.dtx	2022-02-28 21:04:36 UTC (rev 62290)
@@ -204,7 +204,7 @@
 % \DoNotIndex{\@ehc,\@ehd,\@empty,\@esphack,\@expandtwoargs}
 % \DoNotIndex{\@for,\@firstofone,\@firstoftwo}
 % \DoNotIndex{\@gobble,\@gobblefour,\@gobbletwo,\@hangfrom}
-% \DoNotIndex{\@ifnextchar,\@ifpackagelater,\@ifpackageloaded}
+% \DoNotIndex{\if at minipage,\@ifnextchar,\@ifpackagelater,\@ifpackageloaded}
 % \DoNotIndex{\@ifstar,\@ifundefined,\@latex at error,\@namedef,\@nameuse}
 % \DoNotIndex{\@onlypreamble,\@parboxrestore,\@plus,\@ptionlist}
 % \DoNotIndex{\@removeelement,\@restorepar,\@secondoftwo,\@setpar}

Modified: trunk/Master/texmf-dist/source/latex/caption/caption-memoir.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/caption/caption-memoir.dtx	2022-02-28 21:04:10 UTC (rev 62289)
+++ trunk/Master/texmf-dist/source/latex/caption/caption-memoir.dtx	2022-02-28 21:04:36 UTC (rev 62290)
@@ -31,7 +31,7 @@
 % 
 % \fi
 %
-% \CheckSum{66}
+% \CheckSum{69}
 %
 % \iffalse
 %<*driver>
@@ -121,7 +121,7 @@
 % \DoNotIndex{\@ehc,\@ehd,\@empty,\@esphack,\@expandtwoargs}
 % \DoNotIndex{\@for,\@firstofone,\@firstoftwo}
 % \DoNotIndex{\@gobble,\@gobblefour,\@gobbletwo,\@hangfrom}
-% \DoNotIndex{\if at minipage\@ifnextchar,\@ifpackagelater,\@ifpackageloaded}
+% \DoNotIndex{\if at minipage,\@ifnextchar,\@ifpackagelater,\@ifpackageloaded}
 % \DoNotIndex{\@ifstar,\@ifundefined,\@latex at error,\@minipagefalse,\@minipagetrue}
 % \DoNotIndex{\@namedef,\@nameuse}
 % \DoNotIndex{\@onlypreamble,\@parboxrestore,\@plus,\@ptionlist}
@@ -183,7 +183,7 @@
 %
 %    \begin{macrocode}
 \NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesFile{caption-memoir.sto}[2021/06/30 v2.2 Adaption of the caption package to the memoir document class (AR)]
+\ProvidesFile{caption-memoir.sto}[2022/02/28 v2.2a Adaption of the caption package to the memoir document class (AR)]
 %    \end{macrocode}
 %
 % \section{Adaptions already included in the caption package}
@@ -300,7 +300,12 @@
 %
 %    \begin{macrocode}
   \@ifundefined{DeclareCaptionAutoPosition}{}{%
-    \DeclareCaptionAutoPosition{\ifdim\prevdepth>-99\p@#2\else#1\fi}}%
+    \DeclareCaptionAutoPosition{%
+      \ifvmode
+        \ifdim\prevdepth>-99\p@#2\else#1\fi
+      \else
+        #2%
+      \fi}}%
 %    \end{macrocode}
 %
 %    \begin{macrocode}

Modified: trunk/Master/texmf-dist/source/latex/caption/caption-ntg.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/caption/caption-ntg.dtx	2022-02-28 21:04:10 UTC (rev 62289)
+++ trunk/Master/texmf-dist/source/latex/caption/caption-ntg.dtx	2022-02-28 21:04:36 UTC (rev 62290)
@@ -123,7 +123,7 @@
 % \DoNotIndex{\@ehc,\@ehd,\@empty,\@esphack,\@expandtwoargs}
 % \DoNotIndex{\@for,\@firstofone,\@firstoftwo}
 % \DoNotIndex{\@gobble,\@gobblefour,\@gobbletwo,\@hangfrom}
-% \DoNotIndex{\if at minipage\@ifnextchar,\@ifpackagelater,\@ifpackageloaded}
+% \DoNotIndex{\if at minipage,\@ifnextchar,\@ifpackagelater,\@ifpackageloaded}
 % \DoNotIndex{\@ifstar,\@ifundefined,\@latex at error,\@minipagefalse,\@minipagetrue}
 % \DoNotIndex{\@namedef,\@nameuse}
 % \DoNotIndex{\@onlypreamble,\@parboxrestore,\@plus,\@ptionlist}

Modified: trunk/Master/texmf-dist/source/latex/caption/caption-thesis.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/caption/caption-thesis.dtx	2022-02-28 21:04:10 UTC (rev 62289)
+++ trunk/Master/texmf-dist/source/latex/caption/caption-thesis.dtx	2022-02-28 21:04:36 UTC (rev 62290)
@@ -121,7 +121,7 @@
 % \DoNotIndex{\@ehc,\@ehd,\@empty,\@esphack,\@expandtwoargs}
 % \DoNotIndex{\@for,\@firstofone,\@firstoftwo}
 % \DoNotIndex{\@gobble,\@gobblefour,\@gobbletwo,\@hangfrom}
-% \DoNotIndex{\if at minipage\@ifnextchar,\@ifpackagelater,\@ifpackageloaded}
+% \DoNotIndex{\if at minipage,\@ifnextchar,\@ifpackagelater,\@ifpackageloaded}
 % \DoNotIndex{\@ifstar,\@ifundefined,\@latex at error,\@minipagefalse,\@minipagetrue}
 % \DoNotIndex{\@namedef,\@nameuse}
 % \DoNotIndex{\@onlypreamble,\@parboxrestore,\@plus,\@ptionlist}

Modified: trunk/Master/texmf-dist/source/latex/caption/caption.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/caption/caption.dtx	2022-02-28 21:04:10 UTC (rev 62289)
+++ trunk/Master/texmf-dist/source/latex/caption/caption.dtx	2022-02-28 21:04:36 UTC (rev 62290)
@@ -31,7 +31,7 @@
 % 
 % \fi
 %
-% \CheckSum{2869}
+% \CheckSum{2840}
 %
 % \iffalse
 %<*driver>
@@ -4481,7 +4481,7 @@
 % \DoNotIndex{\@ehc,\@ehd,\@empty,\@esphack,\@expandtwoargs}
 % \DoNotIndex{\@for,\@firstofone,\@firstoftwo}
 % \DoNotIndex{\@gobble,\@gobblefour,\@gobbletwo,\@hangfrom}
-% \DoNotIndex{\if at minipage\@ifnextchar,\@ifpackagelater,\@ifpackageloaded}
+% \DoNotIndex{\if at minipage,\@ifnextchar,\@ifpackagelater,\@ifpackageloaded}
 % \DoNotIndex{\@ifstar,\@ifundefined,\@latex at error,\@minipagefalse,\@minipagetrue}
 % \DoNotIndex{\@namedef,\@nameuse}
 % \DoNotIndex{\@onlypreamble,\@parboxrestore,\@plus,\@ptionlist}
@@ -4593,7 +4593,7 @@
 %
 % Identify the current version of the package.
 %    \begin{macrocode}
-\ProvidesPackage{caption}[2022/02/20 v3.6 Customizing captions (AR)]
+\ProvidesPackage{caption}[2022/02/28 v3.6a Customizing captions (AR)]
 %    \end{macrocode}
 %
 % \subsection{Loading the kernel}
@@ -4664,66 +4664,7 @@
       #2%
     \fi}}
 %    \end{macrocode}
-%    \begin{macrocode}
-\def\caption at position@a{\caption at position@auto} % needed by floatrow package, \flrow at cappos
-%    \end{macrocode}
 %
-%    \begin{macrocode}
-\SetCaptionDefault{position}{auto}
-%    \end{macrocode}
-%
-% \begin{macro}{\caption at setautoposition}
-% \changes{v3.1}{2007/06/10}{This macro added}
-% \changes{v3.5}{2020/07/27}{Adapted to current implementation of `auto'}
-% \changes{v3.6}{2021/01/03}{Adapted to current implementation of `auto'}
-%   |\caption at setautoposition|\marg{position}\\
-%   replaces the above algorithm by a different one (or a fixed position setting).
-%    \begin{macrocode}
-\newcommand*\caption at setautoposition[1]{%
-  \renewcommand*\caption at position@auto{%
-    \@nameuse{caption at position@#1}}}
-%    \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\caption at autoposition}
-% \changes{v3.0a}{2004/01/23}{\cs{ifvmode} added}
-% \changes{v3.0b}{2004/05/16}{Split into \cs{caption at fixposition} & \cs{caption at autoposition}}
-% \changes{v3.5}{2020/07/27}{Adapted to current implementation of `auto'}
-% \changes{v3.6}{2021/01/05}{Adapted to current implementation of `auto'; \cs{ifvmode} moved into definition of `auto'}
-%   We try to guess the current position of the caption by checking |\prev|\-|depth|.
-%
-%   A different solution would be setting the |\space|\-|factor| to something
-%   not much less than 1000 (for example 994) in |\caption at start| and
-%   checking this value here by |\ifnum\space|\-|factor=994|.
-%   (It's implemented in the \package{threeparttable} package\cite{threeparttable} this way.)
-%
-%   Another idea would be checking |\@if|\-|mini|\-|page|, but since some packages
-%   typeset the caption within a simple |\vbox| this does not seem to be a good one.
-%    \begin{macrocode}
-\newcommand*\caption at autoposition[2]{%
-  \edef\caption at tempa{\the\prevdepth}%
-  \caption at Debug{\string\prevdepth=\caption at tempa}%
-  \ifdim\prevdepth>-\p@
-    #2% position=bottom
-  \else
-    #1% position=top
-  \fi}
-%    \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\caption at autoposition}
-% \changes{v3.6}{2021/01/05}{This macro added}
-% |\DeclareCaptionAutoPosition|\marg{code with \#1 and \#2}\\
-% replaces the inner algorithm of |position=auto| with a custom one.
-% If \#1 is applied the skip will be typeset below the caption
-% (like |position=t|), if \#2 is applied the skip will by typeset
-% above the caption (like |position=b|).
-%    \begin{macrocode}
-\newcommand*\DeclareCaptionAutoPosition{%
-  \renewcommand*\caption at autoposition[2]}%
-%    \end{macrocode}
-% \end{macro}
-%
 % \subsection{Declaration of options}
 %
 % \subsubsection{Miscellaneous options}

Modified: trunk/Master/texmf-dist/source/latex/caption/caption3.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/caption/caption3.dtx	2022-02-28 21:04:10 UTC (rev 62289)
+++ trunk/Master/texmf-dist/source/latex/caption/caption3.dtx	2022-02-28 21:04:36 UTC (rev 62290)
@@ -31,7 +31,7 @@
 % 
 % \fi
 %
-% \CheckSum{3781}
+% \CheckSum{3814}
 %
 % \iffalse
 %<*driver>
@@ -179,7 +179,7 @@
 % \DoNotIndex{\@ehc,\@ehd,\@empty,\@esphack,\@expandtwoargs}
 % \DoNotIndex{\@for,\@firstofone,\@firstoftwo}
 % \DoNotIndex{\@gobble,\@gobblefour,\@gobbletwo,\@hangfrom}
-% \DoNotIndex{\if at minipage\@ifnextchar,\@ifpackagelater,\@ifpackageloaded}
+% \DoNotIndex{\if at minipage,\@ifnextchar,\@ifpackagelater,\@ifpackageloaded}
 % \DoNotIndex{\@ifstar,\@ifundefined,\@latex at error,\@minipagefalse,\@minipagetrue}
 % \DoNotIndex{\@namedef,\@nameuse}
 % \DoNotIndex{\@onlypreamble,\@parboxrestore,\@plus,\@ptionlist}
@@ -264,7 +264,7 @@
 %
 % Identify the current version of the package.
 %    \begin{macrocode}
-\ProvidesPackage{caption3}[2022/01/07 v2.3 caption3 kernel (AR)]
+\ProvidesPackage{caption3}[2022/02/28 v2.3a caption3 kernel (AR)]
 %    \end{macrocode}
 %
 % \section{Generic helpers}
@@ -2838,12 +2838,15 @@
 \def\caption at position@b{\caption at position@bottom}
 \def\caption at position@below{\caption at position@bottom}
 %    \end{macrocode}
+%    \begin{macrocode}
+\DeclareCaptionPosition{auto}{#2}{\caption at autoposition{#1}{#2}}
+\def\caption at position@a{\caption at position@auto} % needed by floatrow package, \flrow at cappos
+%    \end{macrocode}
 %
 % \changes{v1.1}{2007/05/08}{Default position changed from `bottom' to `auto'}
-% \changes{v1.3}{2021/01/02}{Default position changed back from `auto' to `bottom'}
-% `default' usually maps to `bottom'.
+% `default' usually maps to `auto'.
 %    \begin{macrocode}
-\SetCaptionDefault{position}{bottom}
+\SetCaptionDefault{position}{auto}
 %    \end{macrocode}
 %
 % \begin{macro}{\caption at initposition}
@@ -2896,6 +2899,63 @@
 %    \end{macrocode}
 % \end{macro}
 %
+% \begin{macro}{\caption at setautoposition}
+% \changes{v1.1}{2007/06/10}{This macro added}
+% \changes{v2.0}{2020/07/27}{Adapted to current implementation of `auto'}
+% \changes{v2.3}{2021/01/03}{Adapted to current implementation of `auto'}
+%   |\caption at setautoposition|\marg{position}\\
+%   replaces the above algorithm by a different one (or a fixed position setting).
+%    \begin{macrocode}
+\newcommand*\caption at setautoposition[1]{%
+  \renewcommand*\caption at position@auto{%
+    \@nameuse{caption at position@#1}}}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\caption at autoposition}
+% \changes{v1.0a}{2004/01/23}{\cs{ifvmode} added}
+% \changes{v1.0b}{2004/05/16}{Split into \cs{caption at fixposition} & \cs{caption at autoposition}}
+% \changes{v2.0}{2020/07/27}{Adapted to current implementation of `auto'}
+% \changes{v2.3}{2021/01/05}{Adapted to current implementation of `auto'; \cs{ifvmode} moved into definition of `auto'}
+% \changes{v2.3a}{2022/02/28}{\cs{ifvmode} moved back into this macro}
+%   We try to guess the current position of the caption by checking |\prev|\-|depth|.
+%
+%   A different solution would be setting the |\space|\-|factor| to something
+%   not much less than 1000 (for example 994) in |\caption at start| and
+%   checking this value here by |\ifnum\space|\-|factor=994|.
+%   (It's implemented in the \package{threeparttable} package\cite{threeparttable} this way.)
+%
+%   Another idea would be checking |\@if|\-|mini|\-|page|, but since some packages
+%   typeset the caption within a simple |\vbox| this does not seem to be a good one.
+%    \begin{macrocode}
+\newcommand*\caption at autoposition[2]{%
+  \ifvmode
+    \edef\caption at tempa{\the\prevdepth}%
+    \caption at Debug{\string\prevdepth=\caption at tempa}%
+    \ifdim\prevdepth>-\p@
+      #2% position=bottom
+    \else
+      #1% position=top
+    \fi
+  \else
+    #2% position=bottom
+  \fi}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\DeclareCaptionAutoPosition}
+% \changes{v2.3}{2021/01/05}{This macro added}
+% |\DeclareCaptionAutoPosition|\marg{code with \#1 and \#2}\\
+% replaces the inner algorithm of |position=auto| with a custom one.
+% If \#1 is applied the skip will be typeset below the caption
+% (like |position=t|), if \#2 is applied the skip will by typeset
+% above the caption (like |position=b|).
+%    \begin{macrocode}
+\newcommand*\DeclareCaptionAutoPosition{%
+  \renewcommand*\caption at autoposition[2]}%
+%    \end{macrocode}
+% \end{macro}
+%
 % \section{Hooks}
 %
 % \begin{macro}{\AtBeginCaption}

Modified: trunk/Master/texmf-dist/source/latex/caption/fallback/v3.0/caption.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/caption/fallback/v3.0/caption.dtx	2022-02-28 21:04:10 UTC (rev 62289)
+++ trunk/Master/texmf-dist/source/latex/caption/fallback/v3.0/caption.dtx	2022-02-28 21:04:36 UTC (rev 62290)
@@ -56,7 +56,7 @@
 %
 \usepackage{caption}[2005/08/24]
 \DeclareCaptionLabelSeparator{endash}{\space\textendash\space}
-\usepackage{hyperref}
+\usepackage{hypdoc}
 %
 \DeclareCaptionFont{red}{\color{red}}
 \DeclareCaptionFont{green}{\color{green}}

Modified: trunk/Master/texmf-dist/source/latex/caption/fallback/v3.1/caption.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/caption/fallback/v3.1/caption.dtx	2022-02-28 21:04:10 UTC (rev 62289)
+++ trunk/Master/texmf-dist/source/latex/caption/fallback/v3.1/caption.dtx	2022-02-28 21:04:36 UTC (rev 62290)
@@ -164,7 +164,7 @@
 % \DoNotIndex{\@ehc,\@ehd,\@empty,\@esphack,\@expandtwoargs}
 % \DoNotIndex{\@for,\@firstofone,\@firstoftwo}
 % \DoNotIndex{\@gobble,\@gobblefour,\@gobbletwo,\@hangfrom}
-% \DoNotIndex{\if at minipage\@ifnextchar,\@ifpackagelater,\@ifpackageloaded}
+% \DoNotIndex{\if at minipage,\@ifnextchar,\@ifpackagelater,\@ifpackageloaded}
 % \DoNotIndex{\@ifstar,\@ifundefined,\@latex at error,\@minipagefalse,\@minipagetrue}
 % \DoNotIndex{\@namedef,\@nameuse}
 % \DoNotIndex{\@onlypreamble,\@parboxrestore,\@plus,\@ptionlist}

Modified: trunk/Master/texmf-dist/source/latex/caption/fallback/v3.2/caption.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/caption/fallback/v3.2/caption.dtx	2022-02-28 21:04:10 UTC (rev 62289)
+++ trunk/Master/texmf-dist/source/latex/caption/fallback/v3.2/caption.dtx	2022-02-28 21:04:36 UTC (rev 62290)
@@ -150,7 +150,7 @@
 % \DoNotIndex{\@ehc,\@ehd,\@empty,\@esphack,\@expandtwoargs}
 % \DoNotIndex{\@for,\@firstofone,\@firstoftwo}
 % \DoNotIndex{\@gobble,\@gobblefour,\@gobbletwo,\@hangfrom}
-% \DoNotIndex{\if at minipage\@ifnextchar,\@ifpackagelater,\@ifpackageloaded}
+% \DoNotIndex{\if at minipage,\@ifnextchar,\@ifpackagelater,\@ifpackageloaded}
 % \DoNotIndex{\@ifstar,\@ifundefined,\@latex at error,\@minipagefalse,\@minipagetrue}
 % \DoNotIndex{\@namedef,\@nameuse}
 % \DoNotIndex{\@onlypreamble,\@parboxrestore,\@plus,\@ptionlist}

Modified: trunk/Master/texmf-dist/source/latex/caption/fallback/v3.2/caption3.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/caption/fallback/v3.2/caption3.dtx	2022-02-28 21:04:10 UTC (rev 62289)
+++ trunk/Master/texmf-dist/source/latex/caption/fallback/v3.2/caption3.dtx	2022-02-28 21:04:36 UTC (rev 62290)
@@ -136,7 +136,7 @@
 % \DoNotIndex{\@ehc,\@ehd,\@empty,\@esphack,\@expandtwoargs}
 % \DoNotIndex{\@for,\@firstofone,\@firstoftwo}
 % \DoNotIndex{\@gobble,\@gobblefour,\@gobbletwo,\@hangfrom}
-% \DoNotIndex{\if at minipage\@ifnextchar,\@ifpackagelater,\@ifpackageloaded}
+% \DoNotIndex{\if at minipage,\@ifnextchar,\@ifpackagelater,\@ifpackageloaded}
 % \DoNotIndex{\@ifstar,\@ifundefined,\@latex at error,\@minipagefalse,\@minipagetrue}
 % \DoNotIndex{\@namedef,\@nameuse}
 % \DoNotIndex{\@onlypreamble,\@parboxrestore,\@plus,\@ptionlist}

Modified: trunk/Master/texmf-dist/source/latex/caption/fallback/v3.3/caption.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/caption/fallback/v3.3/caption.dtx	2022-02-28 21:04:10 UTC (rev 62289)
+++ trunk/Master/texmf-dist/source/latex/caption/fallback/v3.3/caption.dtx	2022-02-28 21:04:36 UTC (rev 62290)
@@ -150,7 +150,7 @@
 % \DoNotIndex{\@ehc,\@ehd,\@empty,\@esphack,\@expandtwoargs}
 % \DoNotIndex{\@for,\@firstofone,\@firstoftwo}
 % \DoNotIndex{\@gobble,\@gobblefour,\@gobbletwo,\@hangfrom}
-% \DoNotIndex{\if at minipage\@ifnextchar,\@ifpackagelater,\@ifpackageloaded}
+% \DoNotIndex{\if at minipage,\@ifnextchar,\@ifpackagelater,\@ifpackageloaded}
 % \DoNotIndex{\@ifstar,\@ifundefined,\@latex at error,\@minipagefalse,\@minipagetrue}
 % \DoNotIndex{\@namedef,\@nameuse}
 % \DoNotIndex{\@onlypreamble,\@parboxrestore,\@plus,\@ptionlist}

Modified: trunk/Master/texmf-dist/source/latex/caption/fallback/v3.3/caption3.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/caption/fallback/v3.3/caption3.dtx	2022-02-28 21:04:10 UTC (rev 62289)
+++ trunk/Master/texmf-dist/source/latex/caption/fallback/v3.3/caption3.dtx	2022-02-28 21:04:36 UTC (rev 62290)
@@ -134,7 +134,7 @@
 % \DoNotIndex{\@ehc,\@ehd,\@empty,\@esphack,\@expandtwoargs}
 % \DoNotIndex{\@for,\@firstofone,\@firstoftwo}
 % \DoNotIndex{\@gobble,\@gobblefour,\@gobbletwo,\@hangfrom}
-% \DoNotIndex{\if at minipage\@ifnextchar,\@ifpackagelater,\@ifpackageloaded}
+% \DoNotIndex{\if at minipage,\@ifnextchar,\@ifpackagelater,\@ifpackageloaded}
 % \DoNotIndex{\@ifstar,\@ifundefined,\@latex at error,\@minipagefalse,\@minipagetrue}
 % \DoNotIndex{\@namedef,\@nameuse}
 % \DoNotIndex{\@onlypreamble,\@parboxrestore,\@plus,\@ptionlist}

Modified: trunk/Master/texmf-dist/source/latex/caption/fallback/v3.4/caption.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/caption/fallback/v3.4/caption.dtx	2022-02-28 21:04:10 UTC (rev 62289)
+++ trunk/Master/texmf-dist/source/latex/caption/fallback/v3.4/caption.dtx	2022-02-28 21:04:36 UTC (rev 62290)
@@ -151,7 +151,7 @@
 % \DoNotIndex{\@ehc,\@ehd,\@empty,\@esphack,\@expandtwoargs}
 % \DoNotIndex{\@for,\@firstofone,\@firstoftwo}
 % \DoNotIndex{\@gobble,\@gobblefour,\@gobbletwo,\@hangfrom}
-% \DoNotIndex{\if at minipage\@ifnextchar,\@ifpackagelater,\@ifpackageloaded}
+% \DoNotIndex{\if at minipage,\@ifnextchar,\@ifpackagelater,\@ifpackageloaded}
 % \DoNotIndex{\@ifstar,\@ifundefined,\@latex at error,\@minipagefalse,\@minipagetrue}
 % \DoNotIndex{\@namedef,\@nameuse}
 % \DoNotIndex{\@onlypreamble,\@parboxrestore,\@plus,\@ptionlist}

Modified: trunk/Master/texmf-dist/source/latex/caption/fallback/v3.4/caption3.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/caption/fallback/v3.4/caption3.dtx	2022-02-28 21:04:10 UTC (rev 62289)
+++ trunk/Master/texmf-dist/source/latex/caption/fallback/v3.4/caption3.dtx	2022-02-28 21:04:36 UTC (rev 62290)
@@ -129,7 +129,7 @@
 % \DoNotIndex{\@ehc,\@ehd,\@empty,\@esphack,\@expandtwoargs}
 % \DoNotIndex{\@for,\@firstofone,\@firstoftwo}
 % \DoNotIndex{\@gobble,\@gobblefour,\@gobbletwo,\@hangfrom}
-% \DoNotIndex{\if at minipage\@ifnextchar,\@ifpackagelater,\@ifpackageloaded}
+% \DoNotIndex{\if at minipage,\@ifnextchar,\@ifpackagelater,\@ifpackageloaded}
 % \DoNotIndex{\@ifstar,\@ifundefined,\@latex at error,\@minipagefalse,\@minipagetrue}
 % \DoNotIndex{\@namedef,\@nameuse}
 % \DoNotIndex{\@onlypreamble,\@parboxrestore,\@plus,\@ptionlist}

Modified: trunk/Master/texmf-dist/source/latex/caption/fallback/v3.5/caption.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/caption/fallback/v3.5/caption.dtx	2022-02-28 21:04:10 UTC (rev 62289)
+++ trunk/Master/texmf-dist/source/latex/caption/fallback/v3.5/caption.dtx	2022-02-28 21:04:36 UTC (rev 62290)
@@ -174,7 +174,7 @@
 % \DoNotIndex{\@ehc,\@ehd,\@empty,\@esphack,\@expandtwoargs}
 % \DoNotIndex{\@for,\@firstofone,\@firstoftwo}
 % \DoNotIndex{\@gobble,\@gobblefour,\@gobbletwo,\@hangfrom}
-% \DoNotIndex{\if at minipage\@ifnextchar,\@ifpackagelater,\@ifpackageloaded}
+% \DoNotIndex{\if at minipage,\@ifnextchar,\@ifpackagelater,\@ifpackageloaded}
 % \DoNotIndex{\@ifstar,\@ifundefined,\@latex at error,\@minipagefalse,\@minipagetrue}
 % \DoNotIndex{\@namedef,\@nameuse}
 % \DoNotIndex{\@onlypreamble,\@parboxrestore,\@plus,\@ptionlist}

Modified: trunk/Master/texmf-dist/source/latex/caption/fallback/v3.5/caption3.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/caption/fallback/v3.5/caption3.dtx	2022-02-28 21:04:10 UTC (rev 62289)
+++ trunk/Master/texmf-dist/source/latex/caption/fallback/v3.5/caption3.dtx	2022-02-28 21:04:36 UTC (rev 62290)
@@ -181,7 +181,7 @@
 % \DoNotIndex{\@ehc,\@ehd,\@empty,\@esphack,\@expandtwoargs}
 % \DoNotIndex{\@for,\@firstofone,\@firstoftwo}
 % \DoNotIndex{\@gobble,\@gobblefour,\@gobbletwo,\@hangfrom}
-% \DoNotIndex{\if at minipage\@ifnextchar,\@ifpackagelater,\@ifpackageloaded}
+% \DoNotIndex{\if at minipage,\@ifnextchar,\@ifpackagelater,\@ifpackageloaded}
 % \DoNotIndex{\@ifstar,\@ifundefined,\@latex at error,\@minipagefalse,\@minipagetrue}
 % \DoNotIndex{\@namedef,\@nameuse}
 % \DoNotIndex{\@onlypreamble,\@parboxrestore,\@plus,\@ptionlist}

Modified: trunk/Master/texmf-dist/source/latex/caption/ltcaption.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/caption/ltcaption.dtx	2022-02-28 21:04:10 UTC (rev 62289)
+++ trunk/Master/texmf-dist/source/latex/caption/ltcaption.dtx	2022-02-28 21:04:36 UTC (rev 62290)
@@ -407,7 +407,7 @@
 % \DoNotIndex{\@ehc,\@ehd,\@empty,\@esphack,\@expandtwoargs}
 % \DoNotIndex{\@for,\@firstofone,\@firstoftwo}
 % \DoNotIndex{\@gobble,\@gobblefour,\@gobbletwo,\@hangfrom}
-% \DoNotIndex{\@ifnextchar,\@ifpackagelater,\@ifpackageloaded}
+% \DoNotIndex{\if at minipage,\@ifnextchar,\@ifpackagelater,\@ifpackageloaded}
 % \DoNotIndex{\@ifstar,\@ifundefined,\@latex at error,\@namedef,\@nameuse}
 % \DoNotIndex{\@onlypreamble,\@parboxrestore,\@plus,\@ptionlist}
 % \DoNotIndex{\@removeelement,\@restorepar,\@secondoftwo,\@setpar}

Modified: trunk/Master/texmf-dist/source/latex/caption/subcaption.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/caption/subcaption.dtx	2022-02-28 21:04:10 UTC (rev 62289)
+++ trunk/Master/texmf-dist/source/latex/caption/subcaption.dtx	2022-02-28 21:04:36 UTC (rev 62290)
@@ -1700,7 +1700,7 @@
 % \DoNotIndex{\@ehc,\@ehd,\@empty,\@esphack,\@expandtwoargs}
 % \DoNotIndex{\@for,\@firstofone,\@firstoftwo}
 % \DoNotIndex{\@gobble,\@gobblefour,\@gobbletwo,\@hangfrom}
-% \DoNotIndex{\@ifnextchar,\@ifpackagelater,\@ifpackageloaded}
+% \DoNotIndex{\if at minipage,\@ifnextchar,\@ifpackagelater,\@ifpackageloaded}
 % \DoNotIndex{\@ifstar,\@ifundefined,\@latex at error,\@namedef,\@nameuse}
 % \DoNotIndex{\@onlypreamble,\@parboxrestore,\@plus,\@ptionlist}
 % \DoNotIndex{\@removeelement,\@restorepar,\@secondoftwo,\@setpar}

Modified: trunk/Master/texmf-dist/tex/latex/caption/caption-memoir.sto
===================================================================
--- trunk/Master/texmf-dist/tex/latex/caption/caption-memoir.sto	2022-02-28 21:04:10 UTC (rev 62289)
+++ trunk/Master/texmf-dist/tex/latex/caption/caption-memoir.sto	2022-02-28 21:04:36 UTC (rev 62290)
@@ -36,7 +36,7 @@
 %%   caption-thesis.sto, bicaption.sty, ltcaption.sty, subcaption.sty.
 %% 
 \NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesFile{caption-memoir.sto}[2021/06/30 v2.2 Adaption of the caption package to the memoir document class (AR)]
+\ProvidesFile{caption-memoir.sto}[2022/02/28 v2.2a Adaption of the caption package to the memoir document class (AR)]
 \providecommand*\AtCaptionSingleLineCheck{\g at addto@macro\caption at prepareslc} % for caption v3.5
 \AtCaptionSingleLineCheck{%
   \let\pagenote\caption at gobble}
@@ -63,7 +63,12 @@
 
   \setlength\belowcaptionskip{0pt}%
   \@ifundefined{DeclareCaptionAutoPosition}{}{%
-    \DeclareCaptionAutoPosition{\ifdim\prevdepth>-99\p@#2\else#1\fi}}%
+    \DeclareCaptionAutoPosition{%
+      \ifvmode
+        \ifdim\prevdepth>-99\p@#2\else#1\fi
+      \else
+        #2%
+      \fi}}%
 }
 \endinput
 %%

Modified: trunk/Master/texmf-dist/tex/latex/caption/caption.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/caption/caption.sty	2022-02-28 21:04:10 UTC (rev 62289)
+++ trunk/Master/texmf-dist/tex/latex/caption/caption.sty	2022-02-28 21:04:36 UTC (rev 62290)
@@ -46,7 +46,7 @@
 \DeclareRelease{v3.4}{2019-11-24}{caption_2020-07-29.sty}
 \DeclareRelease{v3.5}{2020-08-30}{caption_2020-10-26.sty}
 \DeclareCurrentRelease{v3.6}{2022-02-20}
-\ProvidesPackage{caption}[2022/02/20 v3.6 Customizing captions (AR)]
+\ProvidesPackage{caption}[2022/02/28 v3.6a Customizing captions (AR)]
 \RequirePackage{caption3}[2022/01/07] % needs v2.3 or newer
 \caption at ifbool{documentclass}{}{%
   \caption at WarningNoLine{%
@@ -78,21 +78,6 @@
     \else
       #2%
     \fi}}
-\def\caption at position@a{\caption at position@auto} % needed by floatrow package, \flrow at cappos
-\SetCaptionDefault{position}{auto}
-\newcommand*\caption at setautoposition[1]{%
-  \renewcommand*\caption at position@auto{%
-    \@nameuse{caption at position@#1}}}
-\newcommand*\caption at autoposition[2]{%
-  \edef\caption at tempa{\the\prevdepth}%
-  \caption at Debug{\string\prevdepth=\caption at tempa}%
-  \ifdim\prevdepth>-\p@
-    #2% position=bottom
-  \else
-    #1% position=top
-  \fi}
-\newcommand*\DeclareCaptionAutoPosition{%
-  \renewcommand*\caption at autoposition[2]}%
 \DeclareCaptionOption*{config}[caption]{%
    \InputIfFileExists{#1.cfg}%
      {\typeout{*** Local configuration file #1.cfg used ***}}%

Modified: trunk/Master/texmf-dist/tex/latex/caption/caption3.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/caption/caption3.sty	2022-02-28 21:04:10 UTC (rev 62289)
+++ trunk/Master/texmf-dist/tex/latex/caption/caption3.sty	2022-02-28 21:04:36 UTC (rev 62290)
@@ -45,7 +45,7 @@
 \DeclareRelease{v1.13}{2019-11-24}{caption3_2020-07-29.sty} % for caption v3.4
 \DeclareRelease{v2.0} {2020-08-30}{caption3_2020-10-26.sty} % for caption v3.5
 \DeclareCurrentRelease{v2.3}{2022-02-20}                    % for caption v3.6
-\ProvidesPackage{caption3}[2022/01/07 v2.3 caption3 kernel (AR)]
+\ProvidesPackage{caption3}[2022/02/28 v2.3a caption3 kernel (AR)]
 \providecommand*\@nameundef[1]{%
   \expandafter\let\csname #1\endcsname\@undefined}
 \providecommand\l at addto@macro[2]{%
@@ -1013,7 +1013,9 @@
 \DeclareCaptionPosition{bottom}{#2}{#2}
 \def\caption at position@b{\caption at position@bottom}
 \def\caption at position@below{\caption at position@bottom}
-\SetCaptionDefault{position}{bottom}
+\DeclareCaptionPosition{auto}{#2}{\caption at autoposition{#1}{#2}}
+\def\caption at position@a{\caption at position@auto} % needed by floatrow package, \flrow at cappos
+\SetCaptionDefault{position}{auto}
 \newcommand*\caption at initposition{%
   \let\caption@@iftop\@undefined}
 \newcommand*\caption at iftop{%
@@ -1026,6 +1028,23 @@
     \caption at position % defines \caption at fallback@position and \caption at regular@position
     #1{\let\caption@@iftop\@firstoftwo}{\let\caption@@iftop\@secondoftwo}%
   \fi}
+\newcommand*\caption at setautoposition[1]{%
+  \renewcommand*\caption at position@auto{%
+    \@nameuse{caption at position@#1}}}
+\newcommand*\caption at autoposition[2]{%
+  \ifvmode
+    \edef\caption at tempa{\the\prevdepth}%
+    \caption at Debug{\string\prevdepth=\caption at tempa}%
+    \ifdim\prevdepth>-\p@
+      #2% position=bottom
+    \else
+      #1% position=top
+    \fi
+  \else
+    #2% position=bottom
+  \fi}
+\newcommand*\DeclareCaptionAutoPosition{%
+  \renewcommand*\caption at autoposition[2]}%
 \newcommand*\caption at beginhook{}
 \newcommand*\caption at endhook{}
 \newcommand*\AtBeginCaption{\l at addto@macro\caption at beginhook}



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