From a892f739b50b6ddc5321c834017cdcbc42a3f056 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Fri, 18 Mar 2022 03:01:39 +0000 Subject: CTAN sync 202203180301 --- .../contrib/caption/fallback/v3.5/caption.dtx | 35 ++++++++++++++++------ 1 file changed, 26 insertions(+), 9 deletions(-) (limited to 'macros/latex/contrib/caption/fallback/v3.5') diff --git a/macros/latex/contrib/caption/fallback/v3.5/caption.dtx b/macros/latex/contrib/caption/fallback/v3.5/caption.dtx index c1cf692b74..463e9052fa 100644 --- a/macros/latex/contrib/caption/fallback/v3.5/caption.dtx +++ b/macros/latex/contrib/caption/fallback/v3.5/caption.dtx @@ -2,7 +2,7 @@ % % This is file `caption.dtx'. % -% Copyright (C) 1994-2020 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) +% Copyright (C) 1994-2022 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) % % -------------------------------------------------------------------------- % @@ -32,7 +32,7 @@ % caption-deu.tex, caption-eng.tex, caption-rus.tex. % % \fi -% \CheckSum{2692} +% \CheckSum{2702} % % \iffalse %<*driver> @@ -241,7 +241,7 @@ % % \begin{macrocode} \NeedsTeXFormat{LaTeX2e}[1994/12/01] -\ProvidesPackage{caption}[2020/10/26 v3.5g Customizing captions (AR)] +\ProvidesPackage{caption}[2022/03/01 v3.5h Customizing captions (AR)] % \end{macrocode} % % \section{Loading the kernel} @@ -768,6 +768,10 @@ \caption@if@minipage\@minipagetrue\@minipagefalse}% \caption@end} % \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@before@parboxrestore{} +\newcommand*\caption@after@parboxrestore{} +% \end{macrocode} % \class{memoir} document class stuff: % \begin{macrocode} \providecommand\memcaptioninfo[4]{} @@ -1610,20 +1614,24 @@ % \changes{v3.0l}{2007/02/04}{Takes now 3 args instead of 2, check for empty heading added} % \changes{v3.1}{2007/07/01}{Makes lst-entry now instead of redefining \cs{addcontentsline}} % \changes{v3.2}{2010/10/26}{Bugfix 09-05-15: Setting of \cs{lst@@caption} added} +% \changes{v3.5h}{2022/03/01}{Hook added, setting of \cs{lst@@caption} removed} % |\caption@beginex|\marg{type}\marg{list entry}\marg{heading}\par % performs the same tasks as |\caption@begin| and additionally: % \begin{enumerate} -% \item[4.] Set |\lst@@caption|, so |\fnum@lstlisting| will include a numbering. +% \item[4.] Apply the hook |\caption@beginex@hook| % \item[5.] Make an entry in the list-of-whatever. % \item[6.] Set |\caption@ifempty| according argument \meta{heading}. % \end{enumerate} % \begin{macrocode} \newcommand\caption@beginex[3]{% \caption@begin{#1}% - \let\lst@@caption\relax + \caption@beginex@hook \caption@addcontentsline{#1}{#2}% \caption@ifempty{#3}{}} % \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@beginex@hook{} +% \end{macrocode} % \end{macro} % % \begin{macro}{\caption@end} @@ -2243,11 +2251,13 @@ % % \begin{macro}{\caption@set@adjustwidth} % \changes{v3.4k}{2020/05/30}{This macro and its usage added} +% \changes{v3.5h}{2022/03/01}{Usage of \cs{AtBeginCaption} replaced by \cs{l@addto@macro}\cs{caption@beginex@hook}} % Store the values of \cs{hsize} and \cs{linewidth}. % \begin{macrocode} \providecommand*\caption@set@adjustwidth{% \caption@adjustwidth@hsize\hsize - \caption@adjustwidth@linewidth\linewidth}% + \caption@adjustwidth@linewidth\linewidth + \l@addto@macro\caption@beginex@hook\caption@test@adjustwidth}% % \end{macrocode} % \begin{macrocode} \providecommand*\caption@patch@changepage[1]{% @@ -2274,9 +2284,6 @@ \fi \fi}% % \end{macrocode} -% \begin{macrocode} - \AtBeginCaption{\caption@test@adjustwidth}% -% \end{macrocode} % \end{macro} % % \begin{macrocode} @@ -3154,7 +3161,17 @@ % \end{macrocode} % \end{macro} % +% \begin{macro}{\lst@@caption} +% \changes{v3.1}{2007/03/03}{This macro added} % \changes{v3.1a}{2007/07/13}{Bugfix 07-09-13: \cs{lst@@caption} will not be re-defined anymore} +% \changes{v3.2}{2010/10/26}{Bugfix 09-05-15: Setting of \cs{lst@@caption} added to \cs{caption@beginex}} +% \changes{v3.5h}{2022/03/01}{Re-definition of \cs{lst@@caption} moved from \cs{caption@beginex} to \cs{caption@beginex@hook}} +% We define |\lst@@caption| to non-|\@empty|, so |\fnum@lst|\-|listing| will +% include a numbering. +% \begin{macrocode} + \l@addto@macro\caption@beginex@hook{\let\lst@@caption\relax}% +% \end{macrocode} +% \end{macro} % % \begin{macrocode} }{} -- cgit v1.2.3