diff options
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/doc/latex/caption/README | 2 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/caption/caption3.dtx | 74 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/caption/caption3.sty | 41 |
3 files changed, 77 insertions, 40 deletions
diff --git a/Master/texmf-dist/doc/latex/caption/README b/Master/texmf-dist/doc/latex/caption/README index 080116df658..721eab665a1 100644 --- a/Master/texmf-dist/doc/latex/caption/README +++ b/Master/texmf-dist/doc/latex/caption/README @@ -1,7 +1,7 @@ ========================================================================== The `caption' package bundle -Release 2020-07-19 +Release 2020-07-20 Copyright (C) 1994-2020 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) License: LPPL = LaTeX Project Public Licence diff --git a/Master/texmf-dist/source/latex/caption/caption3.dtx b/Master/texmf-dist/source/latex/caption/caption3.dtx index 031c84fa67c..8edc856461b 100644 --- a/Master/texmf-dist/source/latex/caption/caption3.dtx +++ b/Master/texmf-dist/source/latex/caption/caption3.dtx @@ -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,14 +742,15 @@ % \begin{macrocode} \newcommand*\@captionsetup[1]{% \captionsetup@startrue#1\captionsetup@starfalse - \@ifnextchar[\caption@setup@options\caption@setup} + \@ifnextchar[%] + \caption@setup@options\caption@setup} % \end{macrocode} % \begin{macrocode} \newcommand*\caption@setup{\caption@setkeys{caption}} % \end{macrocode} % \begin{macrocode} \def\caption@setup@options[#1]{% - \@ifnextchar[% + \@ifnextchar[%] {\caption@stepthecounter \caption@withoptargs{\@expandtwoargs \caption@setup@options@i{#1}{@\caption@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@prepareslc|\par % Re-define anything which would disturb the single-line-check. % \begin{macrocode} @@ -3643,16 +3645,32 @@ \let\label\caption@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@endnotemark@ORI\endnotemark + \let\caption@footnote@ORI\footnote + \def\footnote{\caption@withoptargs\caption@footnote}% + \let\caption@footnotemark@ORI\footnotemark + \def\footnotemark{\caption@withoptargs\caption@footnotemark}% + \let\caption@footnotetext@ORI\@footnotetext + \let\@footnotetext\caption@gobble +% \end{macrocode} +% Same for \cs{endnote} +% \begin{macrocode} + \let\caption@endnote@ORI\endnote \def\endnote{\caption@withoptargs\caption@endnote}% + \let\caption@endnotemark@ORI\endnotemark \def\endnotemark{\caption@withoptargs\caption@endnotemark}% + \let\caption@endnotetext@ORI\@endnotetext \let\@endnotetext\caption@gobble % \end{macrocode} % \begin{macrocode} \let\pagenote\caption@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,43 +3689,50 @@ % \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@ifclassloaded{beamer}{}{% - \g@addto@macro\caption@prepareslc{% - \let\caption@footnote@ORI\footnote - \def\footnote{\caption@withoptargs\caption@footnote}% - \let\caption@footnotemark@ORI\footnotemark - \def\footnotemark{\caption@withoptargs\caption@footnotemark}% - \let\caption@footnotetext@ORI\@footnotetext - \let\@footnotetext\caption@gobble}} -% \end{macrocode} % \begin{macrocode} \newcommand\caption@footnote[2]{% \caption@footnotemark{#1}} +% \end{macrocode} +% \begin{macrocode} \newcommand\caption@footnotemark[1]{% \begingroup \let\stepcounter\caption@l@stepcounter - \caption@footnotemark@ORI#1% + \caption@footnotemark@ORI#1\relax \endgroup} % \end{macrocode} % \begin{macrocode} \newcommand\caption@endnote[2]{% \caption@endnotemark{#1}} +% \end{macrocode} +% \begin{macrocode} \newcommand\caption@endnotemark[1]{% \begingroup \let\stepcounter\caption@l@stepcounter - \caption@endnotemark@ORI#1 + \caption@endnotemark@ORI#1\relax \endgroup} % \end{macrocode} % \begin{macrocode} \newcommand*\caption@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@footnotetext}. (Unfortunately \cs{footnote} is defined too monolithic +% in \class{beamer} to offer a less dirty patch.) +% \begin{macrocode} +\caption@ifclassloaded{beamer}{% + \g@addto@macro\caption@prepareslc{% + \def\footnote{% + \begingroup + \let\stepcounter\caption@l@stepcounter + \renewcommand<>\beamer@framefootnotetext[1]{% + \endgroup}% + \let\@footnotetext\beamer@framefootnotetext + \caption@footnote@ORI}}}{} +% \end{macrocode} % \end{macro} % % \begin{macro}{\caption@applyfont} @@ -4113,7 +4138,8 @@ % |\caption@For|\marg{elt-list}\marg{code with \#1}\\ % |\caption@For*|\marg{elt-list}\marg{code with \#1} % \begin{macrocode} -\newcommand*\caption@For{\caption@withoptargs\caption@@For} +\newcommand*\caption@For{% + \caption@withoptargs\caption@@For} %\@onlypreamble\caption@For % \end{macrocode} % \begin{macrocode} diff --git a/Master/texmf-dist/tex/latex/caption/caption3.sty b/Master/texmf-dist/tex/latex/caption/caption3.sty index f9c5cd404da..c8b888672e7 100644 --- a/Master/texmf-dist/tex/latex/caption/caption3.sty +++ b/Master/texmf-dist/tex/latex/caption/caption3.sty @@ -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@FixArabTeX{% \def\caption@tempa##1{}% \ifx\caption@tempa\@gobble @@ -243,10 +243,11 @@ \caption@teststar@\@captionsetup\@gobble\@firstofone} \newcommand*\@captionsetup[1]{% \captionsetup@startrue#1\captionsetup@starfalse - \@ifnextchar[\caption@setup@options\caption@setup} + \@ifnextchar[%] + \caption@setup@options\caption@setup} \newcommand*\caption@setup{\caption@setkeys{caption}} \def\caption@setup@options[#1]{% - \@ifnextchar[% + \@ifnextchar[%] {\caption@stepthecounter \caption@withoptargs{\@expandtwoargs \caption@setup@options@i{#1}{@\caption@thecounter}}}% @@ -1478,39 +1479,48 @@ \g@addto@macro\caption@prepareslc{% \let\label\caption@gobble \let\hypertarget\@gobbletwo - \let\caption@endnotemark@ORI\endnotemark + \let\caption@footnote@ORI\footnote + \def\footnote{\caption@withoptargs\caption@footnote}% + \let\caption@footnotemark@ORI\footnotemark + \def\footnotemark{\caption@withoptargs\caption@footnotemark}% + \let\caption@footnotetext@ORI\@footnotetext + \let\@footnotetext\caption@gobble + \let\caption@endnote@ORI\endnote \def\endnote{\caption@withoptargs\caption@endnote}% + \let\caption@endnotemark@ORI\endnotemark \def\endnotemark{\caption@withoptargs\caption@endnotemark}% + \let\caption@endnotetext@ORI\@endnotetext \let\@endnotetext\caption@gobble \let\pagenote\caption@gobble \let\acused\@gobble \let\AC@placelabel\@gobble \let\glsunset\@gobble } -\caption@ifclassloaded{beamer}{}{% - \g@addto@macro\caption@prepareslc{% - \let\caption@footnote@ORI\footnote - \def\footnote{\caption@withoptargs\caption@footnote}% - \let\caption@footnotemark@ORI\footnotemark - \def\footnotemark{\caption@withoptargs\caption@footnotemark}% - \let\caption@footnotetext@ORI\@footnotetext - \let\@footnotetext\caption@gobble}} \newcommand\caption@footnote[2]{% \caption@footnotemark{#1}} \newcommand\caption@footnotemark[1]{% \begingroup \let\stepcounter\caption@l@stepcounter - \caption@footnotemark@ORI#1% + \caption@footnotemark@ORI#1\relax \endgroup} \newcommand\caption@endnote[2]{% \caption@endnotemark{#1}} \newcommand\caption@endnotemark[1]{% \begingroup \let\stepcounter\caption@l@stepcounter - \caption@endnotemark@ORI#1 + \caption@endnotemark@ORI#1\relax \endgroup} \newcommand*\caption@l@stepcounter[1]{% \advance\csname c@#1\endcsname\@ne\relax} +\caption@ifclassloaded{beamer}{% + \g@addto@macro\caption@prepareslc{% + \def\footnote{% + \begingroup + \let\stepcounter\caption@l@stepcounter + \renewcommand<>\beamer@framefootnotetext[1]{% + \endgroup}% + \let\@footnotetext\beamer@framefootnotetext + \caption@footnote@ORI}}}{} \newcommand*\caption@applyfont{% \caption@hj\captionfont\captionsize} \newcommand\caption@@@make[2]{% @@ -1705,7 +1715,8 @@ \noexpand\l@addto@macro\noexpand\caption@restore@counters {\noexpand\setcounter{#1}{\number\value{#1}}}}% \caption@tempa} -\newcommand*\caption@For{\caption@withoptargs\caption@@For} +\newcommand*\caption@For{% + \caption@withoptargs\caption@@For} \newcommand\caption@@For[3]{% \caption@AtBeginDocument#1{% \def\@elt##1{#3}% |