texlive[55900] Master/texmf-dist: caption (21jul20)
commits+karl at tug.org
commits+karl at tug.org
Tue Jul 21 23:39:45 CEST 2020
Revision: 55900
http://tug.org/svn/texlive?view=revision&revision=55900
Author: karl
Date: 2020-07-21 23:39:45 +0200 (Tue, 21 Jul 2020)
Log Message:
-----------
caption (21jul20)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/caption/README
trunk/Master/texmf-dist/source/latex/caption/caption3.dtx
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 2020-07-21 21:39:31 UTC (rev 55899)
+++ trunk/Master/texmf-dist/doc/latex/caption/README 2020-07-21 21:39:45 UTC (rev 55900)
@@ -1,7 +1,7 @@
==========================================================================
The `caption' package bundle
-Release 2020-07-19
+Release 2020-07-20
Copyright (C) 1994-2020 Axel Sommerfeldt (axel.sommerfeldt at f-m.fm)
License: LPPL = LaTeX Project Public Licence
Modified: trunk/Master/texmf-dist/source/latex/caption/caption3.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/caption/caption3.dtx 2020-07-21 21:39:31 UTC (rev 55899)
+++ trunk/Master/texmf-dist/source/latex/caption/caption3.dtx 2020-07-21 21:39:45 UTC (rev 55900)
@@ -28,7 +28,7 @@
% caption-deu.tex, caption-eng.tex, caption-rus.tex.
%
% \fi
-% \CheckSum{3585}
+% \CheckSum{3606}
%
% \iffalse
%<*driver>
@@ -191,7 +191,7 @@
%
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption3}[2020/07/19 v1.12a caption3 kernel (AR)]
+\ProvidesPackage{caption3}[2020/07/20 v1.12b caption3 kernel (AR)]
% \end{macrocode}
%
% \section{Workaround for bug in package \package{arabtex}}
@@ -742,7 +742,8 @@
% \begin{macrocode}
\newcommand*\@captionsetup[1]{%
\captionsetup at startrue#1\captionsetup at starfalse
- \@ifnextchar[\caption at setup@options\caption at setup}
+ \@ifnextchar[%]
+ \caption at setup@options\caption at setup}
% \end{macrocode}
% \begin{macrocode}
\newcommand*\caption at setup{\caption at setkeys{caption}}
@@ -749,7 +750,7 @@
% \end{macrocode}
% \begin{macrocode}
\def\caption at setup@options[#1]{%
- \@ifnextchar[%
+ \@ifnextchar[%]
{\caption at stepthecounter
\caption at withoptargs{\@expandtwoargs
\caption at setup@options at i{#1}{@\caption at thecounter}}}%
@@ -3635,6 +3636,7 @@
% \changes{v1.8}{2018/05/16}{Redefinition of \cs{acused} added}
% \changes{v1.8}{2018/05/26}{Definition method changed so it can be pre-defined by other packages}
% \changes{v1.8}{2018/05/27}{Redefinition of \cs{hypertarget} added}
+% \changes{v1.12b}{2020/07/20}{Special adaption to \class{beamer} added}
% |\caption at prepareslc|\par
% Re-define anything which would disturb the single-line-check.
% \begin{macrocode}
@@ -3643,16 +3645,32 @@
\let\label\caption at gobble
\let\hypertarget\@gobbletwo
% \end{macrocode}
+% We re-define \cs{footnote} so
+% \begin{enumerate}
+% \item The footnote counter will not be increased twice (but still the correct footnote mark will be used within the single-line-check)
+% \item The footnote text will not be evaluated twice
+% \end{enumerate}
% \begin{macrocode}
+ \let\caption at footnote@ORI\footnote
+ \def\footnote{\caption at withoptargs\caption at footnote}%
+ \let\caption at footnotemark@ORI\footnotemark
+ \def\footnotemark{\caption at withoptargs\caption at footnotemark}%
+ \let\caption at footnotetext@ORI\@footnotetext
+ \let\@footnotetext\caption at gobble
+% \end{macrocode}
+% Same for \cs{endnote}
+% \begin{macrocode}
+ \let\caption at endnote@ORI\endnote
+ \def\endnote{\caption at withoptargs\caption at endnote}%
\let\caption at endnotemark@ORI\endnotemark
- \def\endnote{\caption at withoptargs\caption at endnote}%
\def\endnotemark{\caption at withoptargs\caption at endnotemark}%
+ \let\caption at endnotetext@ORI\@endnotetext
\let\@endnotetext\caption at gobble
% \end{macrocode}
% \begin{macrocode}
\let\pagenote\caption at gobble
% \end{macrocode}
-% Adaption to the \package{acronym} package.\par
+% Adaption to the \package{acronym} package\par
% See also \url{https://tex.stackexchange.com/questions/428788}
% \begin{macrocode}
\let\acused\@gobble
@@ -3671,37 +3689,26 @@
% \begin{macrocode}
}
% \end{macrocode}
-%
-% The following patch of \cs{footnote} assumes that the optional arguments of
-% \cs{footnote} and \cs{footnotemark} match. Since this is not the case in
-% \class{beamer} based documents, and since \class{beamer} extents the
-% syntax of \cs{footnote} in a way we don't support, we don't apply the patch there.
% \begin{macrocode}
-\caption at ifclassloaded{beamer}{}{%
- \g at addto@macro\caption at prepareslc{%
- \let\caption at footnote@ORI\footnote
- \def\footnote{\caption at withoptargs\caption at footnote}%
- \let\caption at footnotemark@ORI\footnotemark
- \def\footnotemark{\caption at withoptargs\caption at footnotemark}%
- \let\caption at footnotetext@ORI\@footnotetext
- \let\@footnotetext\caption at gobble}}
+\newcommand\caption at footnote[2]{%
+ \caption at footnotemark{#1}}
% \end{macrocode}
% \begin{macrocode}
-\newcommand\caption at footnote[2]{%
- \caption at footnotemark{#1}}
\newcommand\caption at footnotemark[1]{%
\begingroup
\let\stepcounter\caption at l@stepcounter
- \caption at footnotemark@ORI#1%
+ \caption at footnotemark@ORI#1\relax
\endgroup}
% \end{macrocode}
% \begin{macrocode}
\newcommand\caption at endnote[2]{%
\caption at endnotemark{#1}}
+% \end{macrocode}
+% \begin{macrocode}
\newcommand\caption at endnotemark[1]{%
\begingroup
\let\stepcounter\caption at l@stepcounter
- \caption at endnotemark@ORI#1
+ \caption at endnotemark@ORI#1\relax
\endgroup}
% \end{macrocode}
% \begin{macrocode}
@@ -3708,6 +3715,24 @@
\newcommand*\caption at l@stepcounter[1]{%
\advance\csname c@#1\endcsname\@ne\relax}
% \end{macrocode}
+% The patch above assumes that the optional arguments of \cs{footnote} and
+% \cs{footnotemark} match. Since this is not the case in \class{beamer} based documents,
+% and since \class{beamer} extents the syntax of \cs{footnote} in a special way,
+% we need a special patch here.\par
+% \emph{Note:} For this patch we assume that \cs{footnote} will always end with the usage of
+% \cs{beamer at footnotetext}. (Unfortunately \cs{footnote} is defined too monolithic
+% in \class{beamer} to offer a less dirty patch.)
+% \begin{macrocode}
+\caption at ifclassloaded{beamer}{%
+ \g at addto@macro\caption at prepareslc{%
+ \def\footnote{%
+ \begingroup
+ \let\stepcounter\caption at l@stepcounter
+ \renewcommand<>\beamer at framefootnotetext[1]{%
+ \endgroup}%
+ \let\@footnotetext\beamer at framefootnotetext
+ \caption at footnote@ORI}}}{}
+% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\caption at applyfont}
@@ -4113,7 +4138,8 @@
% |\caption at For|\marg{elt-list}\marg{code with \#1}\\
% |\caption at For*|\marg{elt-list}\marg{code with \#1}
% \begin{macrocode}
-\newcommand*\caption at For{\caption at withoptargs\caption@@For}
+\newcommand*\caption at For{%
+ \caption at withoptargs\caption@@For}
%\@onlypreamble\caption at For
% \end{macrocode}
% \begin{macrocode}
Modified: trunk/Master/texmf-dist/tex/latex/caption/caption3.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/caption/caption3.sty 2020-07-21 21:39:31 UTC (rev 55899)
+++ trunk/Master/texmf-dist/tex/latex/caption/caption3.sty 2020-07-21 21:39:45 UTC (rev 55900)
@@ -34,7 +34,7 @@
%% caption-deu.tex, caption-eng.tex, caption-rus.tex.
%%
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption3}[2020/07/19 v1.12a caption3 kernel (AR)]
+\ProvidesPackage{caption3}[2020/07/20 v1.12b caption3 kernel (AR)]
\providecommand\caption at FixArabTeX{%
\def\caption at tempa##1{}%
\ifx\caption at tempa\@gobble
@@ -243,10 +243,11 @@
\caption at teststar@\@captionsetup\@gobble\@firstofone}
\newcommand*\@captionsetup[1]{%
\captionsetup at startrue#1\captionsetup at starfalse
- \@ifnextchar[\caption at setup@options\caption at setup}
+ \@ifnextchar[%]
+ \caption at setup@options\caption at setup}
\newcommand*\caption at setup{\caption at setkeys{caption}}
\def\caption at setup@options[#1]{%
- \@ifnextchar[%
+ \@ifnextchar[%]
{\caption at stepthecounter
\caption at withoptargs{\@expandtwoargs
\caption at setup@options at i{#1}{@\caption at thecounter}}}%
@@ -1478,9 +1479,17 @@
\g at addto@macro\caption at prepareslc{%
\let\label\caption at gobble
\let\hypertarget\@gobbletwo
+ \let\caption at footnote@ORI\footnote
+ \def\footnote{\caption at withoptargs\caption at footnote}%
+ \let\caption at footnotemark@ORI\footnotemark
+ \def\footnotemark{\caption at withoptargs\caption at footnotemark}%
+ \let\caption at footnotetext@ORI\@footnotetext
+ \let\@footnotetext\caption at gobble
+ \let\caption at endnote@ORI\endnote
+ \def\endnote{\caption at withoptargs\caption at endnote}%
\let\caption at endnotemark@ORI\endnotemark
- \def\endnote{\caption at withoptargs\caption at endnote}%
\def\endnotemark{\caption at withoptargs\caption at endnotemark}%
+ \let\caption at endnotetext@ORI\@endnotetext
\let\@endnotetext\caption at gobble
\let\pagenote\caption at gobble
\let\acused\@gobble
@@ -1487,20 +1496,12 @@
\let\AC at placelabel\@gobble
\let\glsunset\@gobble
}
-\caption at ifclassloaded{beamer}{}{%
- \g at addto@macro\caption at prepareslc{%
- \let\caption at footnote@ORI\footnote
- \def\footnote{\caption at withoptargs\caption at footnote}%
- \let\caption at footnotemark@ORI\footnotemark
- \def\footnotemark{\caption at withoptargs\caption at footnotemark}%
- \let\caption at footnotetext@ORI\@footnotetext
- \let\@footnotetext\caption at gobble}}
\newcommand\caption at footnote[2]{%
\caption at footnotemark{#1}}
\newcommand\caption at footnotemark[1]{%
\begingroup
\let\stepcounter\caption at l@stepcounter
- \caption at footnotemark@ORI#1%
+ \caption at footnotemark@ORI#1\relax
\endgroup}
\newcommand\caption at endnote[2]{%
\caption at endnotemark{#1}}
@@ -1507,10 +1508,19 @@
\newcommand\caption at endnotemark[1]{%
\begingroup
\let\stepcounter\caption at l@stepcounter
- \caption at endnotemark@ORI#1
+ \caption at endnotemark@ORI#1\relax
\endgroup}
\newcommand*\caption at l@stepcounter[1]{%
\advance\csname c@#1\endcsname\@ne\relax}
+\caption at ifclassloaded{beamer}{%
+ \g at addto@macro\caption at prepareslc{%
+ \def\footnote{%
+ \begingroup
+ \let\stepcounter\caption at l@stepcounter
+ \renewcommand<>\beamer at framefootnotetext[1]{%
+ \endgroup}%
+ \let\@footnotetext\beamer at framefootnotetext
+ \caption at footnote@ORI}}}{}
\newcommand*\caption at applyfont{%
\caption at hj\captionfont\captionsize}
\newcommand\caption@@@make[2]{%
@@ -1705,7 +1715,8 @@
\noexpand\l at addto@macro\noexpand\caption at restore@counters
{\noexpand\setcounter{#1}{\number\value{#1}}}}%
\caption at tempa}
-\newcommand*\caption at For{\caption at withoptargs\caption@@For}
+\newcommand*\caption at For{%
+ \caption at withoptargs\caption@@For}
\newcommand\caption@@For[3]{%
\caption at AtBeginDocument#1{%
\def\@elt##1{#3}%
More information about the tex-live-commits
mailing list.