summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/caption
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-08-30 21:10:24 +0000
committerKarl Berry <karl@freefriends.org>2020-08-30 21:10:24 +0000
commit4e8113d580e4cfb631552c3d78ab6aa413f1f422 (patch)
tree7166c1fd6540ca08943dc75e452cd851655a7f03 /Master/texmf-dist/tex/latex/caption
parentad35623c7373c69bc3388d72a0c95e9921816e03 (diff)
caption (30aug20)
git-svn-id: svn://tug.org/texlive/trunk@56213 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/caption')
-rw-r--r--Master/texmf-dist/tex/latex/caption/bicaption.sty34
-rw-r--r--Master/texmf-dist/tex/latex/caption/caption-ams-smf.sto54
-rw-r--r--Master/texmf-dist/tex/latex/caption/caption-beamer.sto107
-rw-r--r--Master/texmf-dist/tex/latex/caption/caption-elsarticle.sto45
-rw-r--r--Master/texmf-dist/tex/latex/caption/caption-koma.sto183
-rw-r--r--Master/texmf-dist/tex/latex/caption/caption-light.sty89
-rw-r--r--Master/texmf-dist/tex/latex/caption/caption-memoir.sto46
-rw-r--r--Master/texmf-dist/tex/latex/caption/caption-ntg.sto48
-rw-r--r--Master/texmf-dist/tex/latex/caption/caption-thesis.sto49
-rw-r--r--Master/texmf-dist/tex/latex/caption/caption.sty377
-rw-r--r--Master/texmf-dist/tex/latex/caption/caption2.sty12
-rw-r--r--Master/texmf-dist/tex/latex/caption/caption3.sty1206
-rw-r--r--Master/texmf-dist/tex/latex/caption/ltcaption.sty12
-rw-r--r--Master/texmf-dist/tex/latex/caption/subcaption.sty57
-rw-r--r--Master/texmf-dist/tex/latex/caption/totalcount.sty98
15 files changed, 1427 insertions, 990 deletions
diff --git a/Master/texmf-dist/tex/latex/caption/bicaption.sty b/Master/texmf-dist/tex/latex/caption/bicaption.sty
index 046bede13e7..4c2b2b3bab7 100644
--- a/Master/texmf-dist/tex/latex/caption/bicaption.sty
+++ b/Master/texmf-dist/tex/latex/caption/bicaption.sty
@@ -25,21 +25,21 @@
%% This Current Maintainer of this work is Axel Sommerfeldt.
%%
%% This work consists of the files
-%% caption.ins, caption.dtx, caption2.dtx, caption3.dtx,
-%% bicaption.dtx, ltcaption.dtx, subcaption.dtx, totalcount.dtx,
+%% caption.ins, caption.dtx, caption-light.dtx, caption2.dtx, caption3.dtx,
+%% caption-ams-smf.dtx, caption-beamer.dtx, caption-elsarticle.dtx,
+%% caption-koma.dtx, caption-memoir.dtx, caption-ntg.dtx,
+%% caption-thesis.dtx, bicaption.dtx, ltcaption.dtx, subcaption.dtx,
%% the derived files
-%% caption.sty, caption2.sty, caption3.sty,
-%% bicaption.sty, ltcaption.sty, subcaption.sty, totalcount.sty,
+%% caption.sty, caption-light.sty, caption2.sty, caption3.sty,
+%% caption-ams-smf.sto, caption-beamer.sto, caption-elsarticle.sto,
+%% caption-koma.sto, caption-memoir.sto, caption-ntg.sto,
+%% caption-thesis.sto, bicaption.sty, ltcaption.sty, subcaption.sty,
%% and the user manuals
%% caption-deu.tex, caption-eng.tex, caption-rus.tex.
%%
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{bicaption}[2016/03/27 v1.2 Bilingual Captions (AR)]
-\RequirePackage{caption}[2018/05/11] % needs v3.4 or newer
-\caption@AtBeginDocument{\caption@ifcompatibility{%
- \caption@Error{%
- The `bicaption' package does not work correctly\MessageBreak
- in compatibility mode}}{}}
+\ProvidesPackage{bicaption}[2020/08/23 v1.2a Bilingual Captions (AR)]
+\RequirePackage{caption}[2020/08/23] % needs v3.5 or newer
\newcommand*\bicaption@Info[1]{%
\PackageInfo{bicaption}{#1}}
\newcommand*\bicaption@InfoNoLine[1]{%
@@ -55,6 +55,16 @@
\newcommand*\bicaption@eh{%
If you do not understand this error, please take a closer look\MessageBreak
at the documentation of the `bicaption' package.\MessageBreak\@ehc}
+\newcommand*\bicaption@CheckCompatibility{%
+ \caption@ifcompatibility{%
+ \bicaption@Error
+ {This package does not work with\MessageBreak
+ caption option `compatibility=v1'}%
+ \endinput}{}}
+\bicaption@CheckCompatibility
+\caption@AtBeginDocument{%
+ \bicaption@CheckCompatibility
+ \let\bicaption@CheckCompatibility\@undefined}
\newcount\bicaption@lang
\DeclareCaptionOption{bi-lang}{%
\caption@ifinlist{#1}{0,all,both}{%
@@ -212,7 +222,7 @@
\long\def\@@@bicaption[#1]#2{%
\caption@dblarg{\@@@@bicaption{#1}{#2}}}
\long\def\@@@@bicaption#1#2[#3]#4{%
- \caption@getlabel#2\label{}\@nil
+ \caption@getlabel{#2}%
\bicaption@ifswap
{\bicaption@setup{#1}{#2}%
\bicaption@cmd[{#3}]{#4}}%
@@ -232,7 +242,7 @@
\caption@dblarg{\LT@@@@bicaption{#1}{#2}}}
\long\def\LT@@@@bicaption#1#2[#3]#4{%
\gdef\bicaption@LTsetup{%
- \caption@getlabel#2\label{}\@nil
+ \caption@getlabel{#2}%
\bicaption@LT@setup}%
\gdef\bicaption@LT@setup{%
\bicaption@ifswap
diff --git a/Master/texmf-dist/tex/latex/caption/caption-ams-smf.sto b/Master/texmf-dist/tex/latex/caption/caption-ams-smf.sto
new file mode 100644
index 00000000000..1c999f0862c
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/caption/caption-ams-smf.sto
@@ -0,0 +1,54 @@
+%%
+%% This is file `caption-ams-smf.sto',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% caption-ams-smf.dtx (with options: `package')
+%%
+%% Copyright (C) 1994-2020 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
+%%
+%% https://gitlab.com/axelsommerfeldt/caption
+%%
+%% --------------------------------------------------------------------------
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2003/12/01 or later.
+%%
+%% This work has the LPPL maintenance status "maintained".
+%%
+%% This Current Maintainer of this work is Axel Sommerfeldt.
+%%
+%% This work consists of the files
+%% caption.ins, caption.dtx, caption-light.dtx, caption2.dtx, caption3.dtx,
+%% caption-ams-smf.dtx, caption-beamer.dtx, caption-elsarticle.dtx,
+%% caption-koma.dtx, caption-memoir.dtx, caption-ntg.dtx,
+%% caption-thesis.dtx, bicaption.dtx, ltcaption.dtx, subcaption.dtx,
+%% the derived files
+%% caption.sty, caption-light.sty, caption2.sty, caption3.sty,
+%% caption-ams-smf.sto, caption-beamer.sto, caption-elsarticle.sto,
+%% caption-koma.sto, caption-memoir.sto, caption-ntg.sto,
+%% caption-thesis.sto, bicaption.sty, ltcaption.sty, subcaption.sty,
+%% and the user manuals
+%% caption-deu.tex, caption-eng.tex, caption-rus.tex.
+%%
+\NeedsTeXFormat{LaTeX2e}[1994/12/01]
+\ProvidesFile{caption-ams-smf.sto}[2020/08/22 v2.0 Adaption of the caption package to the AMS and SMF document classes (AR)]
+\SetCaptionDefault*{margin}{\the\captionindent}
+\DeclareCaptionLabelSeparator{default}{.\enspace}
+\DeclareCaptionFont{ams@font}{\@captionfont}
+\DeclareCaptionFont{ams@labelfont}{\@captionheadfont}
+\DeclareCaptionFont{ams@textfont}{\@captionfont\upshape}
+\SetCaptionDefault{font}{ams@font}
+\SetCaptionDefault{labelfont}{ams@labelfont}
+\SetCaptionDefault{textfont}{ams@textfont}
+\AtCaptionPackage{\setlength\belowcaptionskip{0pt}}
+\captionsetup{position=t,figureposition=b}
+\endinput
+%%
+%% End of file `caption-ams-smf.sto'.
diff --git a/Master/texmf-dist/tex/latex/caption/caption-beamer.sto b/Master/texmf-dist/tex/latex/caption/caption-beamer.sto
new file mode 100644
index 00000000000..3adb4194fa8
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/caption/caption-beamer.sto
@@ -0,0 +1,107 @@
+%%
+%% This is file `caption-beamer.sto',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% caption-beamer.dtx (with options: `package')
+%%
+%% Copyright (C) 1994-2020 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
+%%
+%% https://gitlab.com/axelsommerfeldt/caption
+%%
+%% --------------------------------------------------------------------------
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2003/12/01 or later.
+%%
+%% This work has the LPPL maintenance status "maintained".
+%%
+%% This Current Maintainer of this work is Axel Sommerfeldt.
+%%
+%% This work consists of the files
+%% caption.ins, caption.dtx, caption-light.dtx, caption2.dtx, caption3.dtx,
+%% caption-ams-smf.dtx, caption-beamer.dtx, caption-elsarticle.dtx,
+%% caption-koma.dtx, caption-memoir.dtx, caption-ntg.dtx,
+%% caption-thesis.dtx, bicaption.dtx, ltcaption.dtx, subcaption.dtx,
+%% the derived files
+%% caption.sty, caption-light.sty, caption2.sty, caption3.sty,
+%% caption-ams-smf.sto, caption-beamer.sto, caption-elsarticle.sto,
+%% caption-koma.sto, caption-memoir.sto, caption-ntg.sto,
+%% caption-thesis.sto, bicaption.sty, ltcaption.sty, subcaption.sty,
+%% and the user manuals
+%% caption-deu.tex, caption-eng.tex, caption-rus.tex.
+%%
+\NeedsTeXFormat{LaTeX2e}[1994/12/01]
+\ProvidesFile{caption-beamer.sto}[2020/08/22 v2.0 Adaption of the caption package to the beamer document classes (AR)]
+\newcommand*\caption@ifbeamertemplate[1]{%
+ \begingroup
+ \let\beamer@@tmpl@caption@ORI\beamer@@tmpl@caption
+ \@nameuse{beamer@@tmpop@caption@#1}%
+ \ifx\beamer@@tmpl@caption@ORI\beamer@@tmpl@caption
+ \endgroup\expandafter\@firstoftwo
+ \else
+ \endgroup\expandafter\@secondoftwo
+ \fi}
+\DeclareCaptionSinglelinecheck{default}{%
+ \caption@ifbeamertemplate{caption name own line}%
+ \@secondoftwo % \@secondoftwo -> singlelinecheck=off
+ \@firstoftwo} % \@firstoftwo -> singlelinecheck=on
+\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}}
+\DeclareCaptionLabelFormat{default}{%
+ \caption@ifbeamertemplate{numbered}%
+ \caption@labelformat@simple
+ \caption@labelformat@unnumbered
+ {#1}{#2}}
+\DeclareCaptionLabelFormat{simpleMagyar}{%
+ \caption@ifbeamertemplate{numbered}%
+ {#2.\bothIfSecond{\nobreakspace}{#1}}%
+ {\caption@labelformat@unnumbered{#1}{#2}}}
+\let\@@magyar@captionfix\relax
+\AtBeginDocument{\let\@@magyar@captionfix\relax}
+\DeclareCaptionLabelSeparator**{default}%
+ {\caption@ifbeamertemplate{caption name own line}}%
+ {\caption@ifbeamertemplate{caption name own line}%
+ {\\}%
+ {\usebeamertemplate{caption label separator}}}
+\DeclareCaptionFont{beamer@font}{%
+ \usebeamerfont*{caption}%
+ \usebeamercolor[fg]{caption}}
+\SetCaptionDefault{font}{beamer@font}
+\DeclareCaptionFont{beamer@labelfont}{%
+ \setbeamercolor*{caption}{}% avoid setting "caption" color additionally
+ \usebeamercolor[fg]{caption name}%
+ \setbeamerfont*{caption}{}% avoid setting "caption" font additionally
+ \usebeamerfont{caption name}}
+\SetCaptionDefault{labelfont}{beamer@labelfont}
+\DeclareCaptionFont{beamer@textfont}{}
+\SetCaptionDefault{textfont}{beamer@textfont}
+\SetCaptionDefault{justification}{raggedright}
+\captionsetup{list=off}
+\AtCaptionPackage{%
+ \expandafter\let\expandafter\caption@beamer@figure
+ \csname\string\figure\endcsname
+ \@namedef{\string\figure}[#1]{%
+ \caption@beamer@figure[#1]% use original beamer code first
+ \caption@settype{figure}} % set "type=figure" afterwards
+ \expandafter\let\expandafter\caption@beamer@table
+ \csname\string\table\endcsname
+ \@namedef{\string\table}[#1]{%
+ \caption@beamer@table[#1]% use original beamer code first
+ \caption@settype{table}} % set "type=table" afterwards
+}
+\endinput
+%%
+%% End of file `caption-beamer.sto'.
diff --git a/Master/texmf-dist/tex/latex/caption/caption-elsarticle.sto b/Master/texmf-dist/tex/latex/caption/caption-elsarticle.sto
new file mode 100644
index 00000000000..8274efbd6d2
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/caption/caption-elsarticle.sto
@@ -0,0 +1,45 @@
+%%
+%% This is file `caption-elsarticle.sto',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% caption-elsarticle.dtx (with options: `package')
+%%
+%% Copyright (C) 1994-2020 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
+%%
+%% https://gitlab.com/axelsommerfeldt/caption
+%%
+%% --------------------------------------------------------------------------
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2003/12/01 or later.
+%%
+%% This work has the LPPL maintenance status "maintained".
+%%
+%% This Current Maintainer of this work is Axel Sommerfeldt.
+%%
+%% This work consists of the files
+%% caption.ins, caption.dtx, caption-light.dtx, caption2.dtx, caption3.dtx,
+%% caption-ams-smf.dtx, caption-beamer.dtx, caption-elsarticle.dtx,
+%% caption-koma.dtx, caption-memoir.dtx, caption-ntg.dtx,
+%% caption-thesis.dtx, bicaption.dtx, ltcaption.dtx, subcaption.dtx,
+%% the derived files
+%% caption.sty, caption-light.sty, caption2.sty, caption3.sty,
+%% caption-ams-smf.sto, caption-beamer.sto, caption-elsarticle.sto,
+%% caption-koma.sto, caption-memoir.sto, caption-ntg.sto,
+%% caption-thesis.sto, bicaption.sty, ltcaption.sty, subcaption.sty,
+%% and the user manuals
+%% caption-deu.tex, caption-eng.tex, caption-rus.tex.
+%%
+\NeedsTeXFormat{LaTeX2e}[1994/12/01]
+\ProvidesFile{caption-elsarticle.sto}[2020/08/22 v2.0 Adaption of the caption package to the elsarticle document class (AR)]
+\SetCaptionDefault{font}{footnotesize}
+\endinput
+%%
+%% End of file `caption-elsarticle.sto'.
diff --git a/Master/texmf-dist/tex/latex/caption/caption-koma.sto b/Master/texmf-dist/tex/latex/caption/caption-koma.sto
new file mode 100644
index 00000000000..81fa13cf223
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/caption/caption-koma.sto
@@ -0,0 +1,183 @@
+%%
+%% This is file `caption-koma.sto',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% caption-koma.dtx (with options: `package')
+%%
+%% Copyright (C) 1994-2020 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
+%%
+%% https://gitlab.com/axelsommerfeldt/caption
+%%
+%% --------------------------------------------------------------------------
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2003/12/01 or later.
+%%
+%% This work has the LPPL maintenance status "maintained".
+%%
+%% This Current Maintainer of this work is Axel Sommerfeldt.
+%%
+%% This work consists of the files
+%% caption.ins, caption.dtx, caption-light.dtx, caption2.dtx, caption3.dtx,
+%% caption-ams-smf.dtx, caption-beamer.dtx, caption-elsarticle.dtx,
+%% caption-koma.dtx, caption-memoir.dtx, caption-ntg.dtx,
+%% caption-thesis.dtx, bicaption.dtx, ltcaption.dtx, subcaption.dtx,
+%% the derived files
+%% caption.sty, caption-light.sty, caption2.sty, caption3.sty,
+%% caption-ams-smf.sto, caption-beamer.sto, caption-elsarticle.sto,
+%% caption-koma.sto, caption-memoir.sto, caption-ntg.sto,
+%% caption-thesis.sto, bicaption.sty, ltcaption.sty, subcaption.sty,
+%% and the user manuals
+%% caption-deu.tex, caption-eng.tex, caption-rus.tex.
+%%
+\NeedsTeXFormat{LaTeX2e}[1994/12/01]
+\ProvidesFile{caption-koma.sto}[2020/08/22 v2.0 Adaption of the caption package to the KOMA-Script document classes (AR)]
+\expandafter\let\expandafter\caption@koma@setcapwidth
+ \csname\string\setcapwidth\endcsname
+\@namedef{\string\setcapwidth}[#1]#2{%
+ \caption@koma@setcapwidth[{#1}]{#2}%
+ \caption@setcapwidth@opt{#1}%
+ \caption@setcapwidth}
+\newcommand*\caption@setcapwidth@opt[1]{}
+\AtCaptionPackage{\renewcommand*\caption@setcapwidth@opt[1]{%
+ \ifx\\#1\\\else
+ \caption@ifdefined\cap@margin{%
+ \def\@tempa{captionbeside}%
+ \ifx\@tempa\@currenvir\else\caption@Warning{%
+ Ignoring optional argument [#1] of \string\setcapwidth\MessageBreak}%
+ \fi}{}%
+ \fi}}
+\newcommand*\caption@setcapwidth{%
+ \captionsetup{width=\cap@width}}
+\def\caption@tempa{\hsize}%
+\ifx\caption@tempa\cap@width \else
+ \caption@setcapwidth
+\fi
+\expandafter\let\expandafter\caption@koma@setcapmargin
+ \csname\string\@setcapmargin\endcsname
+\@namedef{\string\@setcapmargin}[#1]#2{%
+ \caption@koma@setcapmargin[{#1}]{#2}%
+ \caption@setcapmargin}
+\expandafter\let\expandafter\caption@koma@@setcapmargin
+ \csname\string\@@setcapmargin\endcsname
+\@namedef{\string\@@setcapmargin}[#1]#2{%
+ \caption@koma@@setcapmargin[{#1}]{#2}%
+ \caption@setcapmargin}
+\newcommand*\caption@setcapmargin{%
+ \begingroup
+ \let\onelinecaptionsfalse\relax
+ \def\@twoside{0}%
+ \def\if@twoside{\def\@twoside{1}\iffalse}%
+ \cap@margin
+ \def\@tempa{\endgroup}%
+ \ifx\cap@left\hfill\else\ifx\cap@right\hfill\else
+ \def\hspace##1##{\@firstofone}%
+ \edef\@tempa{\endgroup
+ \noexpand\captionsetup{%
+ twoside=\@twoside,slc=0,%
+ margin={\cap@left,\cap@right}}}%
+ \fi\fi
+ \@tempa}
+\ifx\cap@margin\relax \else
+ \caption@setcapmargin
+\fi
+\let\caption@koma@setcapindent\@setcapindent
+\renewcommand*\@setcapindent[1]{%
+ \caption@koma@setcapindent{#1}%
+ \caption@setcapindent}
+\let\caption@koma@@setcapindent\@@setcapindent
+\renewcommand*\@@setcapindent[1]{%
+ \caption@koma@@setcapindent{#1}%
+ \caption@setcapindent}
+\newcommand*\caption@setcapindent{%
+ \captionsetup{indent=\ifdim\cap@indent<\z@\z@\else\cap@indent\fi}}
+\caption@ifdefined\cap@indent{\caption@setcapindent}{}
+\let\caption@koma@parindent\KV@caption@parindent
+\DeclareCaptionOption{parindent}[]{%
+ \ifx,#1,%
+ \caption@Debug{Option `parindent' ignored}%
+ \else
+ \caption@koma@parindent{#1}%
+ \fi}%
+\let\caption@koma@parskip\KV@caption@parskip
+\DeclareCaptionOption{parskip}[]{%
+ \ifx,#1,%
+ \caption@Debug{Option `parskip' ignored}%
+ \else
+ \caption@koma@parskip{#1}%
+ \fi}%
+\g@addto@macro\onelinecaptionstrue{\caption@setsinglelinecheck{true}}%
+\g@addto@macro\onelinecaptionsfalse{\caption@setsinglelinecheck{false}}%
+\ifonelinecaptions
+ \onelinecaptionstrue
+\else
+ \onelinecaptionsfalse
+\fi
+\DeclareCaptionFormat{default}[#1#2#3\par]{%
+ \ifdofullc@p
+ \caption@useformat{hang}{#1}{#2}{#3}%
+ \else
+ #1#2%
+ \ifdim\cap@indent<\z@
+ \par
+ \noindent\hspace*{-\cap@indent}%
+ \else\if@capbreak
+ \par
+ \fi\fi
+ #3\par
+ \fi}
+\SetCaptionDefault{labelformat}{autodot}
+\DeclareCaptionLabelSeparator{default}{\captionformat}
+\DeclareCaptionFont{scr@font}{\scr@fnt@caption}
+\DeclareCaptionFont{scr@labelfont}{\scr@fnt@captionlabel}
+\SetCaptionDefault{font}{scr@font}
+\SetCaptionDefault{labelfont}{scr@labelfont}
+\g@addto@macro\@captionabovetrue{\caption@setposition{t}}%
+\g@addto@macro\@captionabovefalse{\caption@setposition{b}}%
+\if@captionabove
+ \@captionabovetrue
+\else
+ \@captionabovefalse
+\fi
+\AtBeginCaption{\caption@AtBeginLongtable{%
+ \def\@captionabovetrue{\LT@captionsetup{position=t}}%
+ \def\@captionabovefalse{\LT@captionsetup{position=b}}}}
+\g@addto@macro\@tablecaptionabovetrue{\captionsetup*[table]{position=t}}%
+\g@addto@macro\@tablecaptionabovefalse{\captionsetup*[table]{position=b}}%
+\if@tablecaptionabove
+ \@tablecaptionabovetrue
+\else
+ \@tablecaptionabovefalse
+\fi
+\caption@ifdefined\@figurecaptionabovetrue{%
+ \g@addto@macro\@figurecaptionabovetrue{\captionsetup*[figure]{position=t}}%
+ \g@addto@macro\@figurecaptionabovefalse{\captionsetup*[figure]{position=b}}%
+ \if@figurecaptionabove
+ \@figurecaptionabovetrue
+ \else
+ \@figurecaptionabovefalse
+ \fi}{}
+\AtCaptionPackage{%
+ \let\caption@koma@figureposition\KV@caption@figureposition
+ \DeclareCaptionOption{figureposition}{%
+ \caption@WarningNoLine{%
+ Option `figureposition=#1' has no effect\MessageBreak
+ when used with a KOMA-Script document class}%
+ \caption@koma@figureposition{#1}}
+ \let\caption@koma@tableposition\KV@caption@tableposition
+ \DeclareCaptionOption{tableposition}{%
+ \caption@WarningNoLine{%
+ Option `tableposition=#1' has no effect\MessageBreak
+ when used with a KOMA-Script document class}%
+ \caption@koma@tableposition{#1}}}
+\AtBeginDocument{\let\scr@caption\caption}
+\endinput
+%%
+%% End of file `caption-koma.sto'.
diff --git a/Master/texmf-dist/tex/latex/caption/caption-light.sty b/Master/texmf-dist/tex/latex/caption/caption-light.sty
new file mode 100644
index 00000000000..bf5300291a9
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/caption/caption-light.sty
@@ -0,0 +1,89 @@
+%%
+%% This is file `caption-light.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% caption-light.dtx (with options: `package')
+%%
+%% Copyright (C) 1994-2020 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
+%%
+%% https://gitlab.com/axelsommerfeldt/caption
+%%
+%% --------------------------------------------------------------------------
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2003/12/01 or later.
+%%
+%% This work has the LPPL maintenance status "maintained".
+%%
+%% This Current Maintainer of this work is Axel Sommerfeldt.
+%%
+%% This work consists of the files
+%% caption.ins, caption.dtx, caption-light.dtx, caption2.dtx, caption3.dtx,
+%% caption-ams-smf.dtx, caption-beamer.dtx, caption-elsarticle.dtx,
+%% caption-koma.dtx, caption-memoir.dtx, caption-ntg.dtx,
+%% caption-thesis.dtx, bicaption.dtx, ltcaption.dtx, subcaption.dtx,
+%% the derived files
+%% caption.sty, caption-light.sty, caption2.sty, caption3.sty,
+%% caption-ams-smf.sto, caption-beamer.sto, caption-elsarticle.sto,
+%% caption-koma.sto, caption-memoir.sto, caption-ntg.sto,
+%% caption-thesis.sto, bicaption.sty, ltcaption.sty, subcaption.sty,
+%% and the user manuals
+%% caption-deu.tex, caption-eng.tex, caption-rus.tex.
+%%
+\NeedsTeXFormat{LaTeX2e}[1994/12/01]
+\ProvidesPackage{caption-light}[2020/08/24 v1.0 Customizing captions (AR)]
+\RequirePackage{caption3}[2020/08/23] % needs v2.0 or newer
+\caption@ifbool{documentclass}{}{%
+ \caption@WarningNoLine{%
+ Unknown document class (or package),\MessageBreak
+ standard defaults will be used}}
+\@ifpackageloaded{caption2}{%
+ \caption@Error{%
+ You can't use both, the (obsolete) caption2 *and*\MessageBreak
+ the caption-light package}%
+ \endinput
+}{}
+\caption@SetupOptions{caption-light}{\caption@setkeys{caption}{#2}}
+\caption@ProcessOptions*{caption-light}
+\caption@ifdefined\caption@makecaption
+ {\caption@Info{\noexpand\caption@makecaption is already defined}%
+ \endinput}{}
+\long\def\caption@makecaption#1#2{%
+ \caption@iftop\caption@belowskip\caption@aboveskip
+ \caption@labelseparator % defines \caption@iflabelfont and \caption@labelsep
+ \caption@singlelinecheck
+ {\sbox\@tempboxa{\caption@@makecaption{#1}{#2}}%
+ \ifdim \wd\@tempboxa >\hsize}%
+ {\iftrue}%
+ \caption@@makecaption{#1}{#2}\par
+ \else
+ \global \@minipagefalse
+ \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
+ \fi
+ \caption@iftop\caption@aboveskip\caption@belowskip}
+\newcommand\caption@@makecaption[2]{%
+ \caption@applyfont
+ {\captionlabelfont #1}%
+ {\caption@iflabelfont\captionlabelfont
+ \relax\caption@labelsep}%
+ {\captiontextfont #2}}
+\let\@makecaption\caption@makecaption
+\caption@AtBeginDocument{%
+ \DeclareCaptionOption{type}{\setcaptiontype{#1}}%
+ \DeclareCaptionOption{type*}{\setcaptiontype*{#1}}%
+}
+\newcommand*\setcaptiontype{%
+ \caption@teststar{\def\@captype}{}{}}
+\caption@AtBeginDocument{%
+ \def\captionof{\caption@teststar\caption@of{\caption*}\caption}}
+\newcommand*\caption@of[2]{\setcaptiontype*{#2}#1}
+\endinput
+%%
+%% End of file `caption-light.sty'.
diff --git a/Master/texmf-dist/tex/latex/caption/caption-memoir.sto b/Master/texmf-dist/tex/latex/caption/caption-memoir.sto
new file mode 100644
index 00000000000..3d0d9184a2f
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/caption/caption-memoir.sto
@@ -0,0 +1,46 @@
+%%
+%% This is file `caption-memoir.sto',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% caption-memoir.dtx (with options: `package')
+%%
+%% Copyright (C) 1994-2020 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
+%%
+%% https://gitlab.com/axelsommerfeldt/caption
+%%
+%% --------------------------------------------------------------------------
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2003/12/01 or later.
+%%
+%% This work has the LPPL maintenance status "maintained".
+%%
+%% This Current Maintainer of this work is Axel Sommerfeldt.
+%%
+%% This work consists of the files
+%% caption.ins, caption.dtx, caption-light.dtx, caption2.dtx, caption3.dtx,
+%% caption-ams-smf.dtx, caption-beamer.dtx, caption-elsarticle.dtx,
+%% caption-koma.dtx, caption-memoir.dtx, caption-ntg.dtx,
+%% caption-thesis.dtx, bicaption.dtx, ltcaption.dtx, subcaption.dtx,
+%% the derived files
+%% caption.sty, caption-light.sty, caption2.sty, caption3.sty,
+%% caption-ams-smf.sto, caption-beamer.sto, caption-elsarticle.sto,
+%% caption-koma.sto, caption-memoir.sto, caption-ntg.sto,
+%% caption-thesis.sto, bicaption.sty, ltcaption.sty, subcaption.sty,
+%% and the user manuals
+%% caption-deu.tex, caption-eng.tex, caption-rus.tex.
+%%
+\NeedsTeXFormat{LaTeX2e}[1994/12/01]
+\ProvidesFile{caption-memoir.sto}[2020/07/31 v2.0 Adaption of the caption package to the memoir document class (AR)]
+\g@addto@macro\caption@prepareslc{%
+ \let\pagenote\caption@gobble}
+\endinput
+%%
+%% End of file `caption-memoir.sto'.
diff --git a/Master/texmf-dist/tex/latex/caption/caption-ntg.sto b/Master/texmf-dist/tex/latex/caption/caption-ntg.sto
new file mode 100644
index 00000000000..3ddfedc954f
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/caption/caption-ntg.sto
@@ -0,0 +1,48 @@
+%%
+%% This is file `caption-ntg.sto',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% caption-ntg.dtx (with options: `package')
+%%
+%% Copyright (C) 1994-2020 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
+%%
+%% https://gitlab.com/axelsommerfeldt/caption
+%%
+%% --------------------------------------------------------------------------
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2003/12/01 or later.
+%%
+%% This work has the LPPL maintenance status "maintained".
+%%
+%% This Current Maintainer of this work is Axel Sommerfeldt.
+%%
+%% This work consists of the files
+%% caption.ins, caption.dtx, caption-light.dtx, caption2.dtx, caption3.dtx,
+%% caption-ams-smf.dtx, caption-beamer.dtx, caption-elsarticle.dtx,
+%% caption-koma.dtx, caption-memoir.dtx, caption-ntg.dtx,
+%% caption-thesis.dtx, bicaption.dtx, ltcaption.dtx, subcaption.dtx,
+%% the derived files
+%% caption.sty, caption-light.sty, caption2.sty, caption3.sty,
+%% caption-ams-smf.sto, caption-beamer.sto, caption-elsarticle.sto,
+%% caption-koma.sto, caption-memoir.sto, caption-ntg.sto,
+%% caption-thesis.sto, bicaption.sty, ltcaption.sty, subcaption.sty,
+%% and the user manuals
+%% caption-deu.tex, caption-eng.tex, caption-rus.tex.
+%%
+\NeedsTeXFormat{LaTeX2e}[1994/12/01]
+\ProvidesFile{caption-ntg.sto}[2020/08/22 v2.0 Adaption of the caption package to the NTG document classes (AR)]
+\DeclareCaptionFont{ntg@labelfont}{\CaptionLabelFont}
+\DeclareCaptionFont{ntg@textfont}{\CaptionTextFont}
+\SetCaptionDefault{labelfont}{ntg@labelfont}
+\SetCaptionDefault{textfont}{ntg@textfont}
+\endinput
+%%
+%% End of file `caption-ntg.sto'.
diff --git a/Master/texmf-dist/tex/latex/caption/caption-thesis.sto b/Master/texmf-dist/tex/latex/caption/caption-thesis.sto
new file mode 100644
index 00000000000..fb367ab2172
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/caption/caption-thesis.sto
@@ -0,0 +1,49 @@
+%%
+%% This is file `caption-thesis.sto',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% caption-thesis.dtx (with options: `package')
+%%
+%% Copyright (C) 1994-2020 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
+%%
+%% https://gitlab.com/axelsommerfeldt/caption
+%%
+%% --------------------------------------------------------------------------
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2003/12/01 or later.
+%%
+%% This work has the LPPL maintenance status "maintained".
+%%
+%% This Current Maintainer of this work is Axel Sommerfeldt.
+%%
+%% This work consists of the files
+%% caption.ins, caption.dtx, caption-light.dtx, caption2.dtx, caption3.dtx,
+%% caption-ams-smf.dtx, caption-beamer.dtx, caption-elsarticle.dtx,
+%% caption-koma.dtx, caption-memoir.dtx, caption-ntg.dtx,
+%% caption-thesis.dtx, bicaption.dtx, ltcaption.dtx, subcaption.dtx,
+%% the derived files
+%% caption.sty, caption-light.sty, caption2.sty, caption3.sty,
+%% caption-ams-smf.sto, caption-beamer.sto, caption-elsarticle.sto,
+%% caption-koma.sto, caption-memoir.sto, caption-ntg.sto,
+%% caption-thesis.sto, bicaption.sty, ltcaption.sty, subcaption.sty,
+%% and the user manuals
+%% caption-deu.tex, caption-eng.tex, caption-rus.tex.
+%%
+\NeedsTeXFormat{LaTeX2e}[1994/12/01]
+\ProvidesFile{caption-thesis.sto}[2020/08/22 v2.0 Adaption of the caption package to the thesis document class (AR)]
+\SetCaptionDefault{format}{hang}
+\DeclareCaptionFont{cph@font}{\cph@font}
+\DeclareCaptionFont{cpb@font}{\cpb@font}
+\SetCaptionDefault{labelfont}{cph@font}
+\SetCaptionDefault{textfont}{cpb@font}
+\endinput
+%%
+%% End of file `caption-thesis.sto'.
diff --git a/Master/texmf-dist/tex/latex/caption/caption.sty b/Master/texmf-dist/tex/latex/caption/caption.sty
index 001e324884f..68fa82690cb 100644
--- a/Master/texmf-dist/tex/latex/caption/caption.sty
+++ b/Master/texmf-dist/tex/latex/caption/caption.sty
@@ -25,17 +25,21 @@
%% This Current Maintainer of this work is Axel Sommerfeldt.
%%
%% This work consists of the files
-%% caption.ins, caption.dtx, caption2.dtx, caption3.dtx,
-%% bicaption.dtx, ltcaption.dtx, subcaption.dtx, totalcount.dtx,
+%% caption.ins, caption.dtx, caption-light.dtx, caption2.dtx, caption3.dtx,
+%% caption-ams-smf.dtx, caption-beamer.dtx, caption-elsarticle.dtx,
+%% caption-koma.dtx, caption-memoir.dtx, caption-ntg.dtx,
+%% caption-thesis.dtx, bicaption.dtx, ltcaption.dtx, subcaption.dtx,
%% the derived files
-%% caption.sty, caption2.sty, caption3.sty,
-%% bicaption.sty, ltcaption.sty, subcaption.sty, totalcount.sty,
+%% caption.sty, caption-light.sty, caption2.sty, caption3.sty,
+%% caption-ams-smf.sto, caption-beamer.sto, caption-elsarticle.sto,
+%% caption-koma.sto, caption-memoir.sto, caption-ntg.sto,
+%% caption-thesis.sto, bicaption.sty, ltcaption.sty, subcaption.sty,
%% and the user manuals
%% caption-deu.tex, caption-eng.tex, caption-rus.tex.
%%
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption}[2020/05/30 v3.4k Customizing captions (AR)]
-\RequirePackage{caption3}[2020/05/10] % needs v1.10 or newer
+\ProvidesPackage{caption}[2020/08/30 v3.5 Customizing captions (AR)]
+\RequirePackage{caption3}[2020/08/23] % needs v2.0 or newer
\caption@ifbool{documentclass}{}{%
\caption@WarningNoLine{%
Unknown document class (or package),\MessageBreak
@@ -170,98 +174,9 @@
\DeclareCaptionOption{hypcap}[1]{\caption@setbool{hypcap}{#1}}
\DeclareCaptionOption{hypcapspace}{\def\caption@hypcapspace{#1}}
\captionsetup{hypcap=1,hypcapspace=.5\baselineskip}
-\caption@ifclassloaded{ams}{%
- \caption@InfoNoLine{AMS or SMF document class}%
- \setlength\belowcaptionskip{0pt}% set to 12pt by AMS class
-}{}
-\caption@ifclassloaded{koma}{%
- \caption@InfoNoLine{KOMA-Script document class}%
- \g@addto@macro\@tablecaptionabovetrue{\captionsetup*[table]{position=t}}
- \g@addto@macro\@tablecaptionabovefalse{\captionsetup*[table]{position=b}}
- \if@tablecaptionabove
- \@tablecaptionabovetrue
- \else
- \@tablecaptionabovefalse
- \fi
- \caption@ifdefined\@figurecaptionabovetrue{%
- \g@addto@macro\@figurecaptionabovetrue{\captionsetup*[figure]{position=t}}
- \g@addto@macro\@figurecaptionabovefalse{\captionsetup*[figure]{position=b}}
- \if@figurecaptionabove
- \@figurecaptionabovetrue
- \else
- \@figurecaptionabovefalse
- \fi
- }{}%
- \g@addto@macro\onelinecaptionstrue{\let\caption@ifslc\@firstoftwo}
- \g@addto@macro\onelinecaptionsfalse{\let\caption@ifslc\@secondoftwo}
- \ifonelinecaptions
- \onelinecaptionstrue
- \else
- \onelinecaptionsfalse
- \fi
- \g@addto@macro\@captionabovetrue{\let\caption@position\@firstoftwo}
- \g@addto@macro\@captionabovefalse{\let\caption@position\@secondoftwo}
- \DeclareCaptionOption{figureposition}{%
- \caption@WarningNoLine{Option `figureposition=#1' has no effect\MessageBreak
- when used with a KOMA script document class}%
- \captionsetup*[figure]{position=#1}}
- \DeclareCaptionOption{tableposition}{%
- \caption@WarningNoLine{Option `tableposition=#1' has no effect\MessageBreak
- when used with a KOMA script document class}%
- \captionsetup*[table]{position=#1}}
- \let\caption@KOMA@setcapindent\@setcapindent
- \renewcommand*\@setcapindent[1]{%
- \caption@KOMA@setcapindent{#1}\caption@setcapindent}
- \let\caption@KOMA@@setcapindent\@@setcapindent
- \renewcommand*\@@setcapindent[1]{%
- \caption@KOMA@@setcapindent{#1}\caption@setcapindent}
- \newcommand*\caption@setcapindent{%
- \captionsetup{indent=\ifdim\cap@indent<\z@\z@\else\cap@indent\fi}}
- \caption@ifdefined\cap@indent{\caption@setcapindent}{}
- \expandafter\let\expandafter\caption@KOMA@setcapwidth
- \csname\string\setcapwidth\endcsname
- \@namedef{\string\setcapwidth}[#1]#2{%
- \caption@KOMA@setcapwidth[{#1}]{#2}\caption@setcapwidth{#1}}
- \newcommand*\caption@setcapwidth[1]{%
- \ifx\\#1\\\else
- \caption@ifdefined\cap@margin{%
- \def\@tempa{captionbeside}%
- \ifx\@tempa\@currenvir\else\caption@Warning{%
- Ignoring optional argument [#1] of \string\setcapwidth\MessageBreak}%
- \fi}{}%
- \fi
- \captionsetup{width=\cap@width}}
- \def\caption@tempa{\hsize}%
- \ifx\caption@tempa\cap@width \else
- \caption@setcapwidth{?}
- \fi
- \expandafter\let\expandafter\caption@KOMA@setcapmargin
- \csname\string\@setcapmargin\endcsname
- \@namedef{\string\@setcapmargin}[#1]#2{%
- \caption@KOMA@setcapmargin[{#1}]{#2}\caption@setcapmargin}
- \expandafter\let\expandafter\caption@KOMA@@setcapmargin
- \csname\string\@@setcapmargin\endcsname
- \@namedef{\string\@@setcapmargin}[#1]#2{%
- \caption@KOMA@@setcapmargin[{#1}]{#2}\caption@setcapmargin}
- \newcommand*\caption@setcapmargin{%
- \begingroup
- \let\onelinecaptionsfalse\relax
- \def\@twoside{0}%
- \def\if@twoside{\def\@twoside{1}\iffalse}%
- \cap@margin
- \def\@tempa{\endgroup}%
- \ifx\cap@left\hfill\else\ifx\cap@right\hfill\else
- \def\hspace##1##{\@firstofone}%
- \edef\@tempa{\endgroup
- \noexpand\captionsetup{%
- twoside=\@twoside,slc=0,%
- margin={\cap@left,\cap@right}}}%
- \fi\fi
- \@tempa}
- \ifx\cap@margin\relax \else
- \caption@setcapmargin
- \fi
-}{}
+\caption@documentclass@code
+\let\caption@documentclass@code\@undefined
+\let\AtCaptionPackage\@firstofone
\caption@SetupOptions{caption}{\caption@setkeys{#1}{#2}}
\caption@ProcessOptions*{caption}
\newcounter{caption@flags}
@@ -312,12 +227,12 @@
{\ignorespaces\caption@makeanchor{#3}}\par
\caption@if@minipage\@minipagetrue\@minipagefalse}%
\caption@end}
-\providecommand\M@gettitle[1]{}
\providecommand\memcaptioninfo[4]{}
\newcommand*\caption@prepareanchor[2]{%
\caption@makecurrent{#1}{#2}%
\caption@ifhypcap\caption@@start\relax
\M@gettitle{#2}}
+\providecommand\M@gettitle[1]{}
\long\def\caption@makecaption#1#2{%
\caption@make@above
\caption@@make{#1}{#2}%
@@ -330,10 +245,6 @@
\caption@iftop
{\caption@aboveskip\caption@rule}%
\caption@belowskip}
-\newcommand*\caption@aboveskip{%
- \vskip\abovecaptionskip}
-\newcommand*\caption@belowskip{%
- \vskip\belowcaptionskip}
\newcommand*\caption@redefine{}
\g@addto@macro\caption@redefine{%
\caption@ifcompatibility{%
@@ -341,7 +252,7 @@
\noexpand\caption will not be redefined since `compatibility' is set to v1}%
\renewcommand*\caption@redefine{}%
\renewcommand*\caption@continuedfloat[1]{%
- \caption@Error{Not available in compatibility mode}}%
+ \caption@Error{Not available with option `compatibility=v1'}}%
\caption@AtBeginDocument*{%
\let\caption@start\relax
\caption@ifdefined\caption@ORI@capstart{%
@@ -361,7 +272,15 @@
\let\caption@ORI@xfloat\@xfloat
\def\@xfloat#1[#2]{%
\caption@ORI@xfloat{#1}[#2]%
- \caption@settype{#1}}%
+ \caption@settype{#1}%
+ \caption@xfloat@hook}%
+ \newcommand*\caption@xfloat@hook{}%
+ \let\caption@ORI@xdblfloat\@xdblfloat
+ \def\@xdblfloat#1[#2]{%
+ \caption@ORI@xdblfloat{#1}[#2]% expands to \@xfloat{#1}[#2] + extra stuff
+ \caption@setoptions{#1*}%
+ \caption@xdblfloat@hook}%
+ \newcommand*\caption@xdblfloat@hook{}%
}
\caption@AtBeginDocument{\caption@redefine}
\let\@makecaption\caption@makecaption
@@ -375,7 +294,7 @@
\DeclareCaptionOptionNoValue{subtype}{\setcaptionsubtype\relax}%
\DeclareCaptionOptionNoValue{subtype*}{\setcaptionsubtype*}%
}
-\newcommand\setcaptiontype{%
+\def\setcaptiontype{%
\caption@boxrestore@mini
\caption@settype}
\newcommand\setcaptionsubtype{%
@@ -422,29 +341,32 @@
\caption@start}}}
\newcommand*\caption@iftype{\caption@ifdefined\@captype}
\newcommand*\caption@checktype[1]{%
- \caption@ifsubtype{#1}%
- {\caption@Error{Should not be used with subtype `#1'}%
- \@gobble}%
- \@firstofone}
+ \caption@ifsubtype{#1}\@firstoftwo{\caption@ifin@list\sf@counterlist{#1}}%
+ {\caption@Error{Should not be used with subtype `#1'}%
+ \@gobble}%
+ \@firstofone}
\newcommand*\caption@checksubtype[1]{%
\caption@ifsubtype{#1}%
- \@firstofone
- {\caption@Error{Undefined subtype `#1'}%
- \@gobble}}
-\caption@ifeTeX{%
- \newcommand*\caption@checkgrouplevel[2]{%
- \@ifundefined{#1caption@grouplevel}{%
- \caption@ifundefined\caption@grouplevel{\let\caption@grouplevel\z@}{}%
- \ifnum\currentgrouplevel>\caption@grouplevel\relax
- \expandafter\edef\csname #1caption@grouplevel\endcsname{%
- \the\currentgrouplevel}%
- \else
- \caption@Warning{\string#2\MessageBreak outside box or environment}%
- \fi
- }{}}%
-}{%
- \let\caption@checkgrouplevel\@gobbletwo
-}
+ \@firstofone
+ {\caption@ifin@list\sf@counterlist{#1}%
+ {\caption@Warning{%
+ \noexpand\setcaptionsubtype without \string\DeclareCaptionSubType.\MessageBreak
+ This is not designed to work; you could try replacing\MessageBreak
+ the `subfig' package with `subcaption' to resolve\MessageBreak
+ this problem which occurred}%
+ \@firstofone}%
+ {\caption@Error{Undefined subtype `#1'}%
+ \@gobble}}}
+\newcommand*\caption@checkgrouplevel[2]{%
+ \@ifundefined{#1caption@grouplevel}{%
+ \caption@ifundefined\caption@grouplevel{\let\caption@grouplevel\z@}{}%
+ \ifnum\currentgrouplevel>\caption@grouplevel\relax
+ \expandafter\edef\csname #1caption@grouplevel\endcsname{%
+ \the\currentgrouplevel}%
+ \else
+ \caption@Warning{\string#2\MessageBreak outside box or environment}%
+ \fi
+ }{}}%
\newcommand*\caption@undefinedlabel{%
\protect\caption@xref{\caption@labelname}{\on@line}}
\DeclareRobustCommand*\caption@xref[2]{%
@@ -466,7 +388,7 @@
\@esphack}
\caption@AtBeginDocument{%
\def\captionof{\caption@teststar\caption@of{\caption*}\caption}}
-\newcommand*\caption@of[2]{\setcaptiontype*{#2}#1}
+\providecommand*\caption@of[2]{\setcaptiontype*{#2}#1}
\newcommand*\captionlistentry{%
\caption@teststar\@captionlistentry\@firstoftwo\@secondoftwo}
\newcommand*\@captionlistentry[1]{%
@@ -485,10 +407,10 @@
{\caption@iibox{#1}{#2}{#3}}%
{\caption@iibox@{#1}{#2}{#3}}}
\long\def\caption@iibox#1#2#3[#4]{%
- \@testopt{\caption@iiibox{#1}{#2}{#3}[{#4}]}\captionbox@hj@default}
+ \@testopt{\caption@iiibox{#1}{#2}{#3}[{#4}]}\captionbox@innerpos@default}
\long\def\caption@iibox@#1#2#3#4{%
\setbox\@tempboxa\hbox{#4}%
- \caption@iiibox{#1}{#2}{#3}[\wd\@tempboxa][\captionbox@hj@default]{\unhbox\@tempboxa}}
+ \caption@iiibox{#1}{#2}{#3}[\wd\@tempboxa][\captionbox@innerpos@default]{\unhbox\@tempboxa}}
\long\def\caption@iiibox#1{%
\caption@iiiibox{#1}\vbox\vtop}
\long\def\caption@iiiibox#1#2#3#4#5[#6][#7]#8{%
@@ -501,24 +423,24 @@
\caption@setposition t%
#2{\caption#4{#5}}%
\captionbox@hrule
- \csname caption@hj@#7\endcsname
+ \csname caption@justification@#7\endcsname
#8}%
}{%
\endgroup
\parbox[b]{#6}{%
#1\relax
\caption@setposition b%
- \csname caption@hj@#7\endcsname
+ \csname caption@justification@#7\endcsname
#8%
\captionbox@hrule
#3{\caption#4{#5}}}%
}}
-\newcommand*\captionbox@hj@default{c}
+\newcommand*\captionbox@innerpos@default{c}
\newcommand*\captionbox@hrule{\hrule\@height\z@\relax}
-\providecommand*\caption@hj@c{\centering}
-\providecommand*\caption@hj@l{\raggedright}
-\providecommand*\caption@hj@r{\raggedleft}
-\providecommand*\caption@hj@s{}
+\providecommand*\caption@justification@c{\centering}
+\providecommand*\caption@justification@l{\raggedright}
+\providecommand*\caption@justification@r{\raggedleft}
+\providecommand*\caption@justification@s{}
\def\continuedfloat{%
\caption@iftype
{\caption@continuedfloat\@captype}%
@@ -569,7 +491,7 @@
\@ifundefined{c@#1}%
{\caption@Error{No float type '#1' defined}}%
{\caption@ref@stepcounter{#1}%
- \caption@fixposition
+ \caption@fixposition % TODO: Make this independant on the "position" setting
\caption@iftop\caption@setflag\caption@clrflag2% caption
\caption@clrflag4% subcaption
\@nameuse{donemaincaptiontrue}}}
@@ -626,9 +548,10 @@
\newcommand*\caption@end{%
\endgroup}
\newcommand*\caption@setfnum[1]{%
- \@ifundefined{fnum@#1}{\iftrue}{\ifx\caption@lfmt\caption@lfmt@default\else}%
- \@namedef{fnum@#1}{\caption@fnum{#1}}%
- \fi}
+ \@ifundefined{caption@fnum@#1}%
+ {\expandafter\let\csname caption@fnum@#1\expandafter\endcsname\csname fnum@#1\endcsname
+ \@namedef{fnum@#1}{\caption@fnum{#1}}}%
+ {}}
\newcommand*\caption@boxrestore{%
\caption@parboxrestore{\@parboxrestore}{%
\let\if@nobreak\iffalse
@@ -647,7 +570,7 @@
\parindent\z@ \parskip\z@skip
\sloppy}
\newcommand*\caption@normalsize{%
- \caption@font*{\KV@caption@fnt@normal\@unused}}
+ \caption@font@normal\@unused}
\let\caption@setfloatcapt\@firstofone
\newcommand*\caption@makecurrent[1]{\caption@gettitle}
\let\caption@makeanchor\@firstofone
@@ -659,15 +582,6 @@
\caption@ifdefined\NR@gettitle
{\NR@gettitle{#1}}%
{\def\@currentlabelname{#1}}}
-\def\caption@DeclareSubType sub#1\@nil{%
- \caption@Debug{Initializing subtype for `#1'\@gobble}%
- \@namedef{caption@beginsub#1}{\caption@beginsubfloat{#1}}}
-\@onlypreamble\caption@DeclareSubType
-\caption@For*{subtypelist}{\caption@DeclareSubType sub#1\@nil}
-\caption@AtBeginDocument*{%
- \caption@ifdefined\sf@counterlist{%
- \@for\sf@temp:=\sf@counterlist\do{%
- \expandafter\caption@DeclareSubType\sf@temp\@nil}}{}}
\newcommand*\caption@subtypehook{%
\ifx\caption\caption@subcaption \else
\caption@warmup
@@ -686,7 +600,7 @@
\c@continuedfloat=0\relax
\let\caption@setfloatcapt\@firstofone
\let\caption@chkfloat\@gobbletwo
- \caption@setbox{none}%
+ \caption@set{box}{none}%
\caption@clearmargin
\caption@iflist{}{\let\caption@setlist\@gobble}%
\caption@setoptions{sub}%
@@ -767,61 +681,33 @@
\caption@addsubcontentslines{appendix}\caption@appendix@ORI}}{}%
\caption@addsubcontentslines{AtEndDocument}%
}
-\caption@ifdefined\smf@makecaption{\let\smf@makecaption\@makecaption}{}
-\@ifclassloaded{beamer}{%
- \caption@InfoNoLine{beamer document class}%
- \let\caption@ORI@figure\figure
- \def\figure{\caption@settype{figure}\caption@ORI@figure}
- \let\caption@ORI@table\table
- \def\table{\caption@settype{table}\caption@ORI@table}
+\caption@IfBabelArabi{%
+ \let\@makecaption\caption@makecaption
+ \def\fnum@figure{\figurename\nobreakspace\thefigure}%
+ \def\fnum@table{\tablename\nobreakspace\thetable}%
+}{}
+\caption@IfFrenchLe{%
+ \def\f@ffrench{\ifx\listoffigures\relax\else\figurename~\thefigure\fi}%
+ \def\f@tfrench{\ifx\listoftables\relax\else\tablename~\thetable\fi}%
+ \let\@eatDP\@undefined
+ \caption@AtBeginDocument{%
+ \let\caption@original@makecaption\@makecaption}%
+ \g@addto@macro\GOfrench{%
+ \let\@makecaption\caption@original@makecaption}%
+}{}
+\caption@IfBabelHungarian{%
+ \caption@AtBeginDocument{%
+ \let\caption@original@makecaption\@makecaption}%
+ \caption@ifdefined\extrashungarian{%
+ \addto\extrashungarian{%
+ \let\@makecaption\caption@original@makecaption}}{}%
+ \caption@ifdefined\extrasmagyar{%
+ \addto\extrasmagyar{%
+ \let\@makecaption\caption@original@makecaption}}{}%
+}{}
+\caption@IfBabelLatvian{%
+ \let\@makecaption\caption@makecaption
}{}
-\caption@ifdefined\scr@caption{%
- \caption@AtBeginDocument{\let\scr@caption\caption}}{}
-\@nameuse{caption@frenchb}\@nameundef{caption@frenchb}
-\caption@AtBeginDocument{\caption@ifdefined\frenchTeXmods{%
- \caption@InfoNoLine{frenchle/pro package is loaded}%
- \let\captionfont@ORI\captionfont
- \let\captionlabelfont@ORI\captionlabelfont
- \let\@makecaption@ORI\@makecaption
-
- \caption@ifdefined\GOfrench
- {\def\caption@tempa{\g@addto@macro\GOfrench}}%
- {\let\caption@tempa\@firstofone}%
- \caption@tempa{%
- \let\captionfont\captionfont@ORI
- \let\captionfont@ORI\@undefined
- \let\captionlabelfont\captionlabelfont@ORI
- \let\captionlabelfont@ORI\@undefined
- \let\@makecaption\@makecaption@ORI
- \let\@makecaption@ORI\@undefined
- \let\@cnORI\caption
- \let\caption@tcORI\@tablescaption
- \def\@tablescaption{\caption@star\relax\caption@tcORI}%
- \let\@eatDP\@undefined
- \let\caption@tempa\@empty
- \ifx\f@ffrench\fnum@figure
- \l@addto@macro\caption@tempa{\let\fnum@figure\f@ffrench}%
- \fi
- \ifx\f@tfrench\fnum@table
- \l@addto@macro\caption@tempa{\let\fnum@table\f@tfrench}%
- \fi
- \def\f@ffrench{\ifx\listoffigures\relax\else\figurename~\thefigure\fi}%
- \def\f@tfrench{\ifx\listoftables\relax\else\tablename~\thetable\fi}%
- \caption@tempa
- }%
-}{}}
-\def\caption@tempa#1{%
- \@ifpackagewith{babel}{#1}{%
- \caption@InfoNoLine{#1 babel option is loaded}%
- \expandafter\addto\csname extras#1\endcsname{%
- % reverse changes made by magyar.ldf
- \let\@makecaption\caption@makecaption
- \babel@save\@makecaption
- \caption@redefine
- \babel@save\@caption}%
- }{}}
-\caption@tempa{hungarian}%
-\caption@tempa{magyar}%
\newcommand\caption@IfPackageLoaded[1]{%
\@testopt{\caption@@IfPackageLoaded{#1}}{}}
\@onlypreamble\caption@IfPackageLoaded
@@ -930,7 +816,7 @@
\hsize=\linewidth
\fi
\fi}%
-\AtBeginCaption{\caption@test@adjustwidth}
+ \AtBeginCaption{\caption@test@adjustwidth}%
}{}%
\caption@IfPackageLoaded{chkfloat}[2012/08/19 v0.1]{%
\caption@ifdefined\chkfloat@addcontentsline{%
@@ -970,8 +856,7 @@
}}%
\newcommand*\caption@float@setname[1]{%
\expandafter\ifx\csname #1name\endcsname\relax
- \expandafter\let\csname #1name\expandafter\endcsname
- \csname fname@#1\endcsname
+ \expandafter\let\csname #1name\expandafter\endcsname\csname fname@#1\endcsname
\fi}%
\g@addto@macro\fs@plaintop{\def\@fs@mid{\vspace\abovecaptionskip\relax}}%
\g@addto@macro\fs@boxed{\def\@fs@mid{\kern\abovecaptionskip\relax}}%
@@ -1176,21 +1061,6 @@
\let\caption@ORI@lst@MakeCaption\lst@MakeCaption
\def\lst@MakeCaption#1{% #1 is `t' or `b'
\begingroup
-%% \caption@Debug{%
-%% linewidth=\lst@linewidth,
-%% xleftmargin=\lst@xleftmargin,\MessageBreak
-%% xrightmargin=\lst@xrightmargin,
-%% resetmargins=\lst@ifresetmargins true\else false\fi}%
-%% \caption@iflst@Init{}{%
-%% \linewidth\lst@linewidth\relax
-%% \lst@ifresetmargins
-%% \advance\linewidth\@totalleftmargin
-%% \advance\linewidth\rightmargin
-%% \@totalleftmargin\z@
-%% \fi
-%% \advance\linewidth-\lst@xleftmargin
-%% \advance\linewidth-\lst@xrightmargin
-%% \advance\@totalleftmargin\lst@xleftmargin\relax}%
\caption@iflst@Init{}{%
\edef\caption@lst@leftskip{\noexpand\hskip-\the\@totalleftmargin\noexpand\relax}%
\l@addto@macro\caption@beginhook\caption@lst@leftskip}%
@@ -1211,32 +1081,36 @@
\providecommand*\ext@lstlisting{lol}%
}{}
\providecommand*\LTcaptype{table}
+\providecommand*\caption@LT@array{}
+\newcommand\caption@AtBeginLongtable{%
+ \g@addto@macro\caption@LT@array}
\caption@IfPackageLoaded{longtable}[1995/05/24 v3.14]{%
\RequirePackage{ltcaption}[2018/08/26]%
\let\LT@@makecaption\@undefined
\caption@AtBeginDocument{%
\let\caption@ORI@LT@array\LT@array
\renewcommand*\LT@array{%
- \global\let\caption@opt@@longtable\@undefined
- \def\captionsetup{%
- \noalign\bgroup
- \@ifstar\@captionsetup\@captionsetup}% gobble *
- \def\@captionsetup##1{\LT@captionsetup{##1}\egroup}%
- \def\LT@captionsetup##1{%
- \captionsetup@startrue\caption@setup@options[@longtable]{##1}%
- \global\let\caption@opt@@longtable\caption@opt@@longtable}%
- \def\@captionabovetrue{\LT@captionsetup{position=t}}%
- \def\@captionabovefalse{\LT@captionsetup{position=b}}%
- \def\captionlistentry{%
- \noalign\bgroup
- \@ifstar{\egroup\LT@listentry\LTcaptype}% gobble *
- {\egroup\LT@listentry\LTcaptype}}%
-%% \let\Hy@LT@currentHlabel\@currentHlabel
-%% \let\@currentHlabel\Hy@LT@currentHlabel
- \def\continuedfloat{\noalign{%
- \caption@Error{\noexpand\continuedfloat outside float}}}%
- \let\bicaption\LT@bicaption
+ \caption@LT@array
\caption@ORI@LT@array}}%
+ \caption@AtBeginLongtable{%
+ \global\let\caption@opt@@longtable\@undefined
+ \def\captionsetup{%
+ \noalign\bgroup
+ \@ifstar\@captionsetup\@captionsetup}% gobble *
+ \def\@captionsetup#1{\LT@captionsetup{#1}\egroup}%
+ \def\LT@captionsetup#1{%
+ \captionsetup@startrue\caption@setup@options[@longtable]{#1}%
+ \global\let\caption@opt@@longtable\caption@opt@@longtable}%
+ \def\captionlistentry{%
+ \noalign\bgroup
+ \@ifstar{\egroup\LT@listentry\LTcaptype}% gobble *
+ {\egroup\LT@listentry\LTcaptype}}%
+%% \let\Hy@LT@currentHlabel\@currentHlabel
+%% \let\@currentHlabel\Hy@LT@currentHlabel
+ \def\continuedfloat{\noalign{%
+ \caption@Error{\noexpand\continuedfloat outside float}}}%
+ \let\bicaption\LT@bicaption
+ }%
\def\LT@capti@n{%
\@ifstar
{\egroup\LT@c@ption\@gobble[]}%
@@ -1280,7 +1154,10 @@
\fi
\caption@flrow@setlist@{#1}}%
}{}}%
-}{}
+}{%
+ \let\caption@AtBeginLongtable\@gobble
+ \let\caption@LT@array\@undefined
+}
\providecommand*\caption@LT@setup{}
\caption@IfPackageLoaded{picinpar}{%
\long\def\figwindow[#1,#2,#3,#4] {%
@@ -1385,7 +1262,7 @@
\def\caption@setSC@justify{%
\caption@clearmargin
\ifx\SC@justify\@empty \else
- \let\caption@hj\SC@justify
+ \let\caption@justification\SC@justify
\let\SC@justify\@empty
\fi}%
\let\caption\SC@orig@caption
@@ -1428,8 +1305,7 @@
\long\def\ST@caption#1[#2]#3{\par%
\caption@settype*{#1}%
\caption@setoptions{supertabular}%
- \def\caption@fixposition{%
- \caption@setposition{\if@topcaption t\else b\fi}}%
+ \caption@setposition{\if@topcaption t\else b\fi}%
\caption@beginex{#1}{#2}{#3}%
\caption@boxrestore
\caption@normalsize
@@ -1448,8 +1324,7 @@
\long\def\ST@caption#1[#2]#3{\par%
\caption@settype*{#1}%
\caption@setoptions{xtabular}%
- \def\caption@fixposition{%
- \caption@setposition{\if@topcaption t\else b\fi}}%
+ \caption@set{position}{\if@topcaption t\else b\fi}%
\@initisotab
\caption@beginex{#1}{#2}{#3}%
\caption@boxrestore
@@ -1463,14 +1338,14 @@
\let\caption@ORI@threeparttable\threeparttable
\renewcommand*\threeparttable{%
\caption@settype{\@ifundefined{@captype}{table}{\@captype}}%
-%%% \caption@setposition a% ?
+%%% \caption@setposition{auto}% ?
\caption@clearmargin
\caption@setoptions{threeparttable}%
\caption@ORI@threeparttable}%
\let\caption@ORI@measuredfigure\measuredfigure
\renewcommand*\measuredfigure{%
\caption@settype{\@ifundefined{@captype}{figure}{\@captype}}%
-%%% \caption@setposition a% ?
+%%% \caption@setposition{auto}% ?
\caption@clearmargin
\caption@setoptions{measuredfigure}%
\caption@ORI@measuredfigure}%
diff --git a/Master/texmf-dist/tex/latex/caption/caption2.sty b/Master/texmf-dist/tex/latex/caption/caption2.sty
index 686fff86ae4..09ff40ad551 100644
--- a/Master/texmf-dist/tex/latex/caption/caption2.sty
+++ b/Master/texmf-dist/tex/latex/caption/caption2.sty
@@ -25,11 +25,15 @@
%% This Current Maintainer of this work is Axel Sommerfeldt.
%%
%% This work consists of the files
-%% caption.ins, caption.dtx, caption2.dtx, caption3.dtx,
-%% bicaption.dtx, ltcaption.dtx, subcaption.dtx, totalcount.dtx,
+%% caption.ins, caption.dtx, caption-light.dtx, caption2.dtx, caption3.dtx,
+%% caption-ams-smf.dtx, caption-beamer.dtx, caption-elsarticle.dtx,
+%% caption-koma.dtx, caption-memoir.dtx, caption-ntg.dtx,
+%% caption-thesis.dtx, bicaption.dtx, ltcaption.dtx, subcaption.dtx,
%% the derived files
-%% caption.sty, caption2.sty, caption3.sty,
-%% bicaption.sty, ltcaption.sty, subcaption.sty, totalcount.sty,
+%% caption.sty, caption-light.sty, caption2.sty, caption3.sty,
+%% caption-ams-smf.sto, caption-beamer.sto, caption-elsarticle.sto,
+%% caption-koma.sto, caption-memoir.sto, caption-ntg.sto,
+%% caption-thesis.sto, bicaption.sty, ltcaption.sty, subcaption.sty,
%% and the user manuals
%% caption-deu.tex, caption-eng.tex, caption-rus.tex.
%%
diff --git a/Master/texmf-dist/tex/latex/caption/caption3.sty b/Master/texmf-dist/tex/latex/caption/caption3.sty
index c8b888672e7..7cbd1abbc32 100644
--- a/Master/texmf-dist/tex/latex/caption/caption3.sty
+++ b/Master/texmf-dist/tex/latex/caption/caption3.sty
@@ -25,44 +25,24 @@
%% This Current Maintainer of this work is Axel Sommerfeldt.
%%
%% This work consists of the files
-%% caption.ins, caption.dtx, caption2.dtx, caption3.dtx,
-%% bicaption.dtx, ltcaption.dtx, subcaption.dtx, totalcount.dtx,
+%% caption.ins, caption.dtx, caption-light.dtx, caption2.dtx, caption3.dtx,
+%% caption-ams-smf.dtx, caption-beamer.dtx, caption-elsarticle.dtx,
+%% caption-koma.dtx, caption-memoir.dtx, caption-ntg.dtx,
+%% caption-thesis.dtx, bicaption.dtx, ltcaption.dtx, subcaption.dtx,
%% the derived files
-%% caption.sty, caption2.sty, caption3.sty,
-%% bicaption.sty, ltcaption.sty, subcaption.sty, totalcount.sty,
+%% caption.sty, caption-light.sty, caption2.sty, caption3.sty,
+%% caption-ams-smf.sto, caption-beamer.sto, caption-elsarticle.sto,
+%% caption-koma.sto, caption-memoir.sto, caption-ntg.sto,
+%% caption-thesis.sto, bicaption.sty, ltcaption.sty, subcaption.sty,
%% and the user manuals
%% caption-deu.tex, caption-eng.tex, caption-rus.tex.
%%
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption3}[2020/07/20 v1.12b caption3 kernel (AR)]
-\providecommand\caption@FixArabTeX{%
- \def\caption@tempa##1{}%
- \ifx\caption@tempa\@gobble
- \PackageInfo{caption3}{Fixing ArabTeX}%
- \long\def\@gobble##1{}%
- \fi}
-\caption@FixArabTeX
-\AtBeginDocument{%
- \caption@FixArabTeX
- \let\caption@FixArabTeX\@undefined}
+\ProvidesPackage{caption3}[2020/08/30 v2.0 caption3 kernel (AR)]
\providecommand*\@nameundef[1]{%
\expandafter\let\csname #1\endcsname\@undefined}
-\begingroup\expandafter\expandafter\expandafter\endgroup
-\expandafter\ifx\csname currentgrouplevel\endcsname\relax
- \PackageInfo{caption3}{TeX engine: TeX}
- \let\caption@ifeTeX\@secondoftwo
- \providecommand\l@addto@macro[2]{%
- \begingroup
- \toks@\expandafter{#1#2}%
- \xdef\caption@addto@temp{\the\toks@}%
- \endgroup
- \let#1\caption@addto@temp}
-\else
- \PackageInfo{caption3}{TeX engine: e-TeX}
- \let\caption@ifeTeX\@firstoftwo
- \providecommand\l@addto@macro[2]{%
- \edef#1{\unexpanded\expandafter{#1#2}}}
-\fi
+\providecommand\l@addto@macro[2]{%
+ \edef#1{\unexpanded\expandafter{#1#2}}}
\def\bothIfFirst#1#2{%
\protected@edef\caption@tempa{#1}%
\ifx\caption@tempa\@empty \else
@@ -74,21 +54,25 @@
#1#2%
\fi}
\newcommand*\caption@ifundefined[1]{%
- \ifx#1\@undefined
- \expandafter\@firstoftwo
- \else\ifx#1\relax
- \expandafter\expandafter\expandafter\@firstoftwo
+ \ifdefined#1%
+ \ifx#1\relax
+ \expandafter\expandafter\expandafter\@firstoftwo
+ \else
+ \expandafter\expandafter\expandafter\@secondoftwo
+ \fi
\else
- \expandafter\expandafter\expandafter\@secondoftwo
- \fi\fi}
+ \expandafter\@firstoftwo
+ \fi}
\newcommand*\caption@ifdefined[1]{%
- \ifx#1\@undefined
- \expandafter\@secondoftwo
- \else\ifx#1\relax
- \expandafter\expandafter\expandafter\@secondoftwo
+ \ifdefined#1%
+ \ifx#1\relax
+ \expandafter\expandafter\expandafter\@secondoftwo
+ \else
+ \expandafter\expandafter\expandafter\@firstoftwo
+ \fi
\else
- \expandafter\expandafter\expandafter\@firstoftwo
- \fi\fi}
+ \expandafter\@secondoftwo
+ \fi}
\newcommand*\caption@ifinlist{%
\@expandtwoargs\caption@@ifinlist}
\newcommand*\caption@@ifinlist[2]{%
@@ -115,10 +99,10 @@
\newcommand*\caption@l@removefrom@list[2]{%
\caption@ifempty@list#1{}{\@expandtwoargs\@removeelement{#2}#1#1}}
\newcommand*\caption@for@list[2]{%
- \caption@ifempty@list#1{}{%
- \def\caption@tempb##1{#2}%
- \@for\caption@tempa:=#1\do{%
- \expandafter\caption@tempb\expandafter{\caption@tempa}}}}
+ \caption@ifempty@list#1{}%
+ {\def\caption@tempb##1{#2}%
+ \@for\caption@tempa:=#1\do{%
+ \expandafter\caption@tempb\expandafter{\caption@tempa}}}}
\newcommand*\caption@ifempty@list[1]{%
\ifx#1\@undefined
\expandafter\@firstoftwo
@@ -134,16 +118,18 @@
\newcommand*\caption@setbool[1]{%
\expandafter\caption@set@bool\csname caption@if#1\endcsname}
\newcommand*\caption@set@bool[2]{%
- \caption@ifinlist{#2}{1,true,yes,on}{%
- \let#1\@firstoftwo
- }{\caption@ifinlist{#2}{0,false,no,off}{%
- \let#1\@secondoftwo
- }{%
- \caption@Error{Undefined boolean value `#2'}%
- }}}
+ \caption@if@bool{#2}{\let#1\@firstoftwo}{\let#1\@secondoftwo}}
+\newcommand*\caption@if@bool[1]{%
+ \caption@ifinlist{#1}{1,true,yes,on}%
+ {\@firstoftwo}%
+ {\caption@ifinlist{#1}{0,false,no,off}%
+ {}%
+ {\caption@Error{Undefined boolean value `#1'}}%
+ \@secondoftwo}}
\newcommand*\caption@ifbool[1]{\@nameuse{caption@if#1}}
\newcommand*\caption@undefbool[1]{\@nameundef{caption@if#1}}
-\newcommand*\caption@teststar[3]{\@ifstar{#1{#2}}{#1{#3}}}
+\newcommand*\caption@teststar[3]{%
+ \@ifstar{#1{#2}}{#1{#3}}}
\newcommand*\caption@teststar@[3]{%
\@ifstar{#1{#2}}{\caption@ifatletter{#1{#2}}{#1{#3}}}}
\AtBeginDocument{\let\caption@teststar@\caption@teststar}
@@ -223,7 +209,7 @@
\@onlypreamble\caption@declareoption
\newcommand*\caption@declare@option{%
\define@key{caption}}
-%% no \@onlypreamble\caption@declare@option, will be used by \captionsetup
+%% no \@onlypreamble\caption@declare@option since it will be used by \captionsetup
\newcommand*\DeclareCaptionOptionNoValue{%
\caption@teststar\caption@declareoption@novalue\AtEndOfPackage\@gobble}
\@onlypreamble\DeclareCaptionOptionNoValue
@@ -330,10 +316,10 @@
\fi}
\newcommand*\caption@xsetup[1]{\expandafter\caption@setup\expandafter{#1}}
\newcommand*\caption@addtooptlist[1]{%
- \@ifundefined{caption@opt@#1@lineno}{%
- \caption@dooptlist\caption@g@addto@list{#1}%
- \expandafter\xdef\csname caption@opt@#1@lineno\endcsname{\the\inputlineno}%
- }{}}
+ \@ifundefined{caption@opt@#1@lineno}%
+ {\caption@dooptlist\caption@g@addto@list{#1}%
+ \expandafter\xdef\csname caption@opt@#1@lineno\endcsname{\the\inputlineno}}%
+ {}}
\newcommand*\caption@removefromoptlist[1]{%
\caption@dooptlist\caption@g@removefrom@list{#1}%
\global\expandafter\let\csname caption@opt@#1@lineno\endcsname\@undefined}
@@ -343,10 +329,10 @@
\expandafter#1\expandafter\caption@optlist\expandafter{\@tempa}%
\endgroup}
\AtEndDocument{%
- \caption@for@list\caption@optlist{%
- \caption@WarningNoLine{%
- Unused \string\captionsetup[#1]
- on input line \csname caption@opt@#1@lineno\endcsname}}}
+ \caption@for@list\caption@optlist
+ {\caption@WarningNoLine{%
+ Unused \string\captionsetup[#1]
+ on input line \csname caption@opt@#1@lineno\endcsname}}}
\newcommand*\caption@setkeys{\@dblarg\caption@@setkeys}
\long\def\caption@@setkeys[#1]#2#3{%
\@bsphack
@@ -361,7 +347,7 @@
\fi
\def\KV@errx{\KV@err}%
\def\XKV@err{\let\@tempa\XKV@tkey\KV@err}%
- \caption@Debug{\protect\setkeys{#2}{#3}}%
+ \caption@Debug{\noexpand\setkeys{#2}{#3}}%
\setkeys{#2}{#3}%
\edef\caption@keydepth{\expandafter\@gobble\caption@keydepth}%
\expandafter\let\expandafter\KV@err\csname ORI@KV@err\caption@keydepth\endcsname
@@ -422,9 +408,92 @@
\caption@SetupOptions@list
\@tempa}
\@onlypreamble\caption@onefilewithoptions
-\newdimen\captionmargin
-\newdimen\captionmargin@
-\newdimen\captionwidth
+\newcommand*\caption@decl[3][\def]{%
+ \global\long\expandafter#1\csname caption@#2@#3\endcsname}
+\@onlypreamble\caption@decl
+\newcommand*\caption@ifdecl[2]{%
+ \@ifundefined{caption@#1@#2}\@secondoftwo\@firstoftwo}
+\newcommand*\caption@checkdecl[2]{%
+ \caption@ifdecl{#1}{#2}%
+ \@firstofone
+ {\caption@Error{Undefined #1 `#2'}%
+ \@gobble}}
+\newcommand*\caption@set{%
+ \caption@maparg\caption@@set}%
+\newcommand*\caption@@set[3]{%
+ \caption@checkdecl{#1}{#3}{%
+ \expandafter\def\csname caption@#2\expandafter\endcsname\expandafter{\csname caption@#1@#3\endcsname}}}
+\newcommand*\SetCaptionDefault{%
+ \caption@teststar\caption@setdefault\def\edef}
+\@onlypreamble\SetCaptionDefault
+\newcommand*\caption@setdefault[2]{%
+ \@ifundefined{caption@setdefault@#2}%
+ {\caption@maparg\caption@@setdefault}%
+ {\@nameuse{caption@setdefault@#2}{#1}}%
+ {#2}}
+\newcommand*\caption@@setdefault[3]{%
+ \caption@ifdefault{#3}%
+ {\caption@Error{Invalid argument for \string\SetCaptionDefault: `#3'}}% would cause an infinite loop otherwise
+ {\caption@@set{#1}{#2@default}{#3}}}
+\newcommand*\caption@ifdefault[1]{%
+ \edef\caption@tempa{#1}%
+ \def\caption@tempb{default}%
+ \ifx\caption@tempa\caption@tempb
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi}
+\newcommand*\caption@setmapping[2]{%
+ \@namedef{caption@map@#1}{#2}}
+\@onlypreamble\caption@setmapping
+\newcommand*\caption@maparg[2]{%
+ \@ifundefined{caption@map@#2}%
+ {#1{#2}}%
+ {#1{\csname caption@map@#2\endcsname}}%
+ {#2}}
+\def\caption@switchdefault#1#2{%
+ \def\caption@tempa##1{#2}%
+ \expandafter\caption@tempa\csname caption@#1@default\endcsname
+ \caption@setdefault\def{#1}}
+\def\caption@restoredefault#1#2{%
+ \caption@checkdecl{#1}{default}{%
+ \caption@ifdefined#2{%
+ \expandafter\let\csname caption@#1@default\endcsname#2%
+ \let#2\@undefined}{}}}
+\newcommand*\caption@decl@package[2]{%
+ \@ifnextchar[%]
+ {\caption@declare@package{#1}{#2}}%
+ {\caption@declarepackage{#1}{#2}}}
+\@onlypreamble\caption@decl@package
+\def\caption@declare@package#1#2[#3]#4{%
+ \global\@namedef{caption@#1@#4@package}{#3}%
+ #2{#4}}
+\@onlypreamble\caption@declare@package
+\newcommand*\caption@declarepackage[3]{%
+ \global\@nameundef{caption@#1@#3@package}%
+ #2{#3}}
+\@onlypreamble\caption@declarepackage
+\newcommand*\caption@load@package[2]{%
+ \expandafter\let\expandafter\caption@tempa\csname caption@#1@#2@package\endcsname
+ \caption@ifdefined\caption@tempa
+ {\caption@requirepackage\caption@tempa{#1=#2}}%
+ {}}
+\newcommand*\DeclareCaptionLength[1]{%
+ \expandafter\newdimen\csname caption#1\endcsname
+ \@namedef{caption@setdefault@#1}##1{%
+ \caption@setdefault@length{##1}}%
+ \SetCaptionDefault*{#1}}
+\@onlypreamble\DeclareCaptionLength
+\newcommand*\caption@setdefault@length[3]{%
+ \expandafter#1\csname caption#2@default\endcsname{#3}}
+\newcommand*\caption@setlength[2]{%
+ \caption@ifdefault{#2}%
+ {\expandafter\let\expandafter\caption@tempa\csname caption#1@default\endcsname}%
+ {\def\caption@tempa{#2}}%
+ \expandafter\setlength\csname caption#1\endcsname\caption@tempa}
+\DeclareCaptionLength{margin}{0pt}
+\DeclareCaptionLength{margin@}{\the\captionmargin}
+\DeclareCaptionLength{width}{0pt}
\newdimen\caption@tempdima
\DeclareCaptionOption{margin}{\setcaptionmargin{#1}}
\DeclareCaptionOption{margin*}{\setcaptionmargin*{#1}}
@@ -436,6 +505,7 @@
\DeclareCaptionOption{calcwidth*}{\caption@setcalcwidth*{#1}}
\DeclareCaptionOption{twoside}[1]{\caption@set@bool\caption@iftwoside{#1}}
\DeclareCaptionOptionNoValue{oneside}{\caption@set@bool\caption@iftwoside0}
+\caption@set@bool\caption@iftwoside{\if@twoside 1\else 0\fi}
\DeclareCaptionOption{minmargin}{\caption@setoptcmd\caption@minmargin{#1}}
\DeclareCaptionOption{maxmargin}{\caption@setoptcmd\caption@maxmargin{#1}}
\newcommand*\setcaptionmargin{%
@@ -447,8 +517,8 @@
#1{\captionwidth\z@}%
\caption@@@setmargin#2,#2,\@nil}
\def\caption@@@setmargin#1,#2,#3\@nil{%
- \setlength\captionmargin@{#2}%
- \setlength\captionmargin{#1}%
+ \caption@setlength{margin}{#1}%
+ \caption@setlength{margin@}{#2}%
\addtolength\captionmargin@{-\captionmargin}}
\newcommand*\setcaptionwidth{%
\caption@resetcalcmargin
@@ -457,9 +527,7 @@
\caption@teststar\caption@@setwidth\@gobble\@firstofone}
\newcommand*\caption@@setwidth[2]{%
#1{\captionmargin\z@\captionmargin@\z@}%
- \setlength\captionwidth{#2}}%
-\newcommand*\caption@resetcalcmargin{%
- \let\caption@calcmargin@hook\@empty}
+ \caption@setlength{width}{#2}}%
\newcommand*\caption@setcalcmargin{%
\caption@teststar{\caption@@setcalcmargin\caption@setmargin}%
\@secondoftwo\@firstoftwo}
@@ -467,6 +535,8 @@
#2{\caption@resetcalcmargin
\l@addto@macro\caption@calcmargin@hook{#1{#3}}}%
{\l@addto@macro\caption@calcmargin@hook{#1*{#3}}}}
+\newcommand*\caption@resetcalcmargin{%
+ \let\caption@calcmargin@hook\@empty}
\newcommand*\caption@setcalcwidth{%
\caption@teststar{\caption@@setcalcmargin\caption@setwidth}%
\@secondoftwo\@firstoftwo}
@@ -505,83 +575,91 @@
\caption@ifoddpage}
\newcommand*\caption@setoptcmd[2]{%
\caption@ifinlist{#2}{0,false,no,off}{\let#1\@undefined}{\def#1{#2}}}
-\newdimen\caption@indent
-\newdimen\caption@parindent
-\newdimen\caption@hangindent
-\DeclareCaptionOption{indent}[\leftmargini]{% obsolete!
- \setlength\caption@indent{#1}}
+\DeclareCaptionLength{@indent}{0pt}
+\DeclareCaptionLength{@parindent}{0pt}
+\DeclareCaptionLength{@hangindent}{0pt}
+\DeclareCaptionOption{indent}[\leftmargini]{% obsolete
+ \caption@setlength{@indent}{#1}}
\DeclareCaptionOption{indention}[\leftmargini]{%
- \setlength\caption@indent{#1}}
+ \caption@setlength{@indent}{#1}}
\DeclareCaptionOption{parindent}{%
- \setlength\caption@parindent{#1}}
+ \caption@setlength{@parindent}{#1}}
\DeclareCaptionOption{hangindent}{%
- \setlength\caption@hangindent{#1}}
+ \caption@setlength{@hangindent}{#1}}
\DeclareCaptionOption{parskip}{%
- \l@addto@macro\caption@@par{\setlength\parskip{#1}}}
+ \l@addto@macro\caption@@par{\setlength\parskip{#1}}}
\newcommand*\DeclareCaptionStyle[1]{%
\@testopt{\caption@declarestyle{#1}}{}}
\@onlypreamble\DeclareCaptionStyle
\def\caption@declarestyle#1[#2]#3{%
- \global\@namedef{caption@sls@#1}{#2}%
- \global\@namedef{caption@sty@#1}{#3}}
+ \caption@decl{style}{#1}%
+ {\def\caption@slsty{#2}%
+ \def\caption@sty{#3}}%
+ \@namedef{caption@sty@#1}{\@unused}}
\@onlypreamble\caption@declarestyle
\DeclareCaptionOption{style}{\caption@setstyle{#1}}
\DeclareCaptionOption{style*}{\caption@setstyle*{#1}}
\newcommand*\caption@setstyle{%
- \caption@teststar\caption@@setstyle\@gobble\@firstofone}
+ \caption@teststar\caption@@setstyle\caption@ifdecl\caption@checkdecl}
\newcommand*\caption@@setstyle[2]{%
- \@ifundefined{caption@sty@#2}%
- {#1{\caption@Error{Undefined style `#2'}}}%
- {\expandafter\let\expandafter\caption@sty\csname caption@sty@#2\endcsname
+ #1{style}{#2}%
+ {\caption@set{style}{#2}%
+ \caption@style % defines \caption@sty & \caption@slsty
\ifx\caption@setstyle@flag\@undefined
- \let\caption@setstyle@flag\relax
+ \let\caption@setstyle@flag\relax % prevent \caption@resetstyle if called recursively
\caption@resetstyle
\caption@xsetup\caption@sty
\let\caption@setstyle@flag\@undefined
\else
\caption@xsetup\caption@sty
- \fi
- \expandafter\let\expandafter\caption@sls\csname caption@sls@#2\endcsname
- \expandafter\caption@l@addto@list\expandafter\caption@opt@singleline
- \expandafter{\caption@sls}}}
+ \fi}%
+ {}}
\newcommand*\caption@resetstyle{%
\caption@setup{%
box=none,boxcolor=white,parbox=parbox,%
format=plain,labelformat=default,labelsep=colon,textformat=simple,%
- justification=justified,font=,size=,labelfont=,textfont=,%
+ font=,labelfont=,textfont=,size=,%
+ justification=justified,slc,rule,strut,%
margin=0pt,minmargin=0,maxmargin=0,%
- indent=0pt,parindent=0pt,hangindent=0pt,%
- slc,rule,strut}%
- \caption@clearsetup{singleline}}
+ indent=0pt,parindent=0pt,hangindent=0pt}}
\DeclareCaptionStyle{base}[indent=0pt,justification=centering]{}
\DeclareCaptionStyle{default}[indent=0pt,justification=centering]{%
- box=default,format=default,labelsep=default,textformat=default,%
- justification=default,font=default,labelfont=default,textfont=default}
-\DeclareCaptionOption{singlelinecheck}[1]{\caption@set@bool\caption@ifslc{#1}}
+ box=default,%
+ format=default,labelformat=default,labelsep=default,textformat=default,%
+ font=default,labelfont=default,textfont=default,size=default,%
+ justification=default,slc=default,margin=default,%
+ indent=default,parindent=default,hangindent=default}
+\newcommand*\DeclareCaptionSinglelinecheck[2]{%
+ \caption@decl{singlelinecheck}{#1}{#2}}
+\@onlypreamble\DeclareCaptionSinglelinecheck
+\DeclareCaptionOption{singlelinecheck}[1]{\caption@setsinglelinecheck{#1}}
\DeclareCaptionOption{slc}[1]{\KV@caption@singlelinecheck{#1}}
+\DeclareCaptionSinglelinecheck{on}{\@firstoftwo}
+\DeclareCaptionSinglelinecheck{off}{\@secondoftwo}
+\SetCaptionDefault{singlelinecheck}{on}
+\newcommand*\caption@setsinglelinecheck[1]{%
+ \caption@ifdecl{singlelinecheck}{#1}%
+ {\caption@set{singlelinecheck}{#1}}%
+ {\caption@set@bool\caption@singlelinecheck{#1}}}
\newcommand*\DeclareCaptionBox[2]{%
- \global\long\@namedef{caption@box@#1}##1##2{#2}}
+ \caption@decl{box}{#1}##1##2{#2}}
\@onlypreamble\DeclareCaptionBox
-\DeclareCaptionOption{box}{\caption@setbox{#1}}
-\DeclareCaptionOption{parbox}{\caption@set@box\caption@parbox{#1}}
-\newcommand*\caption@setbox{%
- \caption@set@box\caption@box}
-\newcommand*\caption@set@box[2]{%
- \@ifundefined{caption@box@#2}%
- {\caption@Error{Undefined box `#2'}}%
- {\expandafter\let\expandafter#1\csname caption@box@#2\endcsname}}
+\DeclareCaptionOption{box}{\caption@set{box}{#1}}
+\DeclareCaptionOption{parbox}{\caption@set{parbox}{#1}}
+\caption@setmapping{parbox}{box}
\DeclareCaptionBox{empty}{}
\DeclareCaptionBox{none}{#2}
\DeclareCaptionBox{parbox}{\parbox[b]{#1}{#2}}
-\DeclareCaptionBox{colorbox}{\colorbox{\caption@boxcolor}{%
- \setlength\caption@tempdima{#1}%
- \addtolength\caption@tempdima{-2\fboxsep}%
- \linewidth\caption@tempdima
- \hsize\caption@tempdima
- #2}}
+\DeclareCaptionBox{colorbox}{%
+ \colorbox\caption@boxcolor{%
+ \setlength\caption@tempdima{#1}%
+ \addtolength\caption@tempdima{-2\fboxsep}%
+ \linewidth\caption@tempdima
+ \hsize\caption@tempdima
+ #2}}
\DeclareCaptionOption{boxcolor}{\def\caption@boxcolor{#1}}
\DeclareCaptionOption{boxsep}{\setlength\fboxsep{#1}}
-\def\caption@box@default{\caption@box@none}
+\SetCaptionDefault{box}{none}
\newcommand*\DeclareCaptionFormat{%
\caption@teststar\caption@declareformat\@gobble\@firstofone}
\@onlypreamble\DeclareCaptionFormat
@@ -589,100 +667,87 @@
\@dblarg{\caption@@declareformat#1{#2}}}
\@onlypreamble\caption@declareformat
\long\def\caption@@declareformat#1#2[#3]#4{%
- \global\expandafter\let\csname caption@ifh@#2\endcsname#1%
- \global\long\@namedef{caption@slfmt@#2}##1##2##3{#3}%
- \global\long\@namedef{caption@fmt@#2}##1##2##3{#4}}
+ \caption@decl[\edef]{format}{#2}{%
+ \unexpanded{\let\caption@ifhmode#1}%
+ \unexpanded{\long\def\caption@slfmt}####1####2####3\unexpanded{{#3}}%
+ \unexpanded{\long\def\caption@fmt}####1####2####3\unexpanded{{#4}}}}
\@onlypreamble\caption@@declareformat
-\DeclareCaptionOption{format}{\caption@setformat{#1}}
-\newcommand*\caption@setformat[1]{%
- \@ifundefined{caption@fmt@#1}%
- {\caption@Error{Undefined format `#1'}}%
- {\expandafter\let\expandafter\caption@ifh\csname caption@ifh@#1\endcsname
- \expandafter\let\expandafter\caption@slfmt\csname caption@slfmt@#1\endcsname
- \expandafter\let\expandafter\caption@fmt\csname caption@fmt@#1\endcsname}}
-\newcommand*\DeclareCaptionDefaultFormat[1]{%
- \expandafter\def\expandafter\caption@fmt@default\expandafter
- {\csname caption@fmt@#1\endcsname}%
- \expandafter\def\expandafter\caption@slfmt@default\expandafter
- {\csname caption@slfmt@#1\endcsname}%
- \expandafter\def\expandafter\caption@ifh@default\expandafter
- {\csname caption@ifh@#1\endcsname}}
-\@onlypreamble\DeclareCaptionDefaultFormat
+\newcommand*\caption@useformat[1]{% used by caption-koma.sto
+ \caption@checkdecl{format}{#1}{%
+ \begingroup
+ \@nameuse{caption@format@#1}\global\let\caption@tempa\caption@fmt
+ \endgroup\caption@tempa}}
+\DeclareCaptionOption{format}{\caption@set{format}{#1}}
\DeclareCaptionFormat{plain}{#1#2#3\par}
\DeclareCaptionFormat{hang}[#1#2#3\par]{%
- \caption@ifin@list\caption@lsepcrlist\caption@lsepname
+ \caption@iflabelseparatorwithnewline
{\caption@Error{%
- The option `labelsep=\caption@lsepname' does not work\MessageBreak
+ The option `labelsep=\caption@labelsep@name' does not work\MessageBreak
with `format=hang'}}%
{\@hangfrom{#1#2}%
\advance\caption@parindent\hangindent
\advance\caption@hangindent\hangindent
\caption@@par#3\par}}
-\DeclareCaptionDefaultFormat{plain}
+\SetCaptionDefault{format}{plain}
\newcommand*\DeclareCaptionLabelFormat[2]{%
- \global\@namedef{caption@lfmt@#1}##1##2{#2}}
+ \caption@decl{labelformat}{#1}##1##2{#2}}
\@onlypreamble\DeclareCaptionLabelFormat
-\DeclareCaptionOption{labelformat}{\caption@setlabelformat{#1}}
-\newcommand*\caption@setlabelformat[1]{%
- \@ifundefined{caption@lfmt@#1}%
- {\caption@Error{Undefined label format `#1'}}%
- {\expandafter\let\expandafter\caption@lfmt\csname caption@lfmt@#1\endcsname}}
+\DeclareCaptionOption{labelformat}{\caption@set{labelformat}{#1}}
\DeclareCaptionLabelFormat{empty}{}
\DeclareCaptionLabelFormat{simple}{\bothIfFirst{#1}{\nobreakspace}#2}
\DeclareCaptionLabelFormat{parens}{\bothIfFirst{#1}{\nobreakspace}(#2)}
\DeclareCaptionLabelFormat{brace}{\bothIfFirst{#1}{\nobreakspace}#2)}
\DeclareCaptionLabelFormat{autodot}{\bothIfFirst{#1}{\nobreakspace}#2\autodot}
\DeclareCaptionLabelFormat{unnumbered}{#1}
-\def\caption@lfmt@default{\caption@lfmt@simple}
+\DeclareCaptionLabelFormat{original}{%
+ \caption@ifdefined\caption@original@fnum
+ {\caption@original@fnum}%
+ {\caption@labelformat@simple{#1}{#2}}}
+\SetCaptionDefault{labelformat}{original}
\newcommand\DeclareCaptionLabelSeparator{%
- \caption@teststar\caption@declarelabelseparator\@gobble\@firstofone}
+ \@ifstar
+ \DeclareCaptionLabelSeparator@
+ {\caption@declarelabelseparator\@firstofone}}
\@onlypreamble\DeclareCaptionLabelSeparator
+\newcommand\DeclareCaptionLabelSeparator@{%
+ \@ifstar
+ \DeclareCaptionLabelSeparator@@
+ {\caption@declarelabelseparator\@gobble}}
+\@onlypreamble\DeclareCaptionLabelSeparator@
+\newcommand*\DeclareCaptionLabelSeparator@@[2]{%
+ \caption@declarelabelseparator
+ {#2\@gobble\@firstofone}%
+ {#1}}
+\@onlypreamble\DeclareCaptionLabelSeparator@@
\newcommand\caption@declarelabelseparator[3]{%
- \global\@namedef{caption@iflf@#2}{#1}%
- \global\long\@namedef{caption@lsep@#2}{#3}%
- \caption@@declarelabelseparator{#2}#3\\\@nil}
+ \caption@decl{labelseparator}{#2}%
+ {\def\caption@iflabelfont{#1}%
+ \def\caption@labelsep@name{#2}%
+ \def\caption@labelsep{#3}}%
+ \@namedef{caption@lsep@#2}{#3}}
+\newcommand*\caption@lsep@default{\caption@labelseparator@default\caption@labelsep}%
\@onlypreamble\caption@declarelabelseparator
-\long\def\caption@@declarelabelseparator#1#2\\#3\@nil{%
- \def\@tempa{#3}\ifx\@tempa\@empty \else
- \caption@g@addto@list\caption@lsepcrlist{#1}%
- \fi}
-\@onlypreamble\caption@@declarelabelseparator
-\DeclareCaptionOption{labelsep}{\caption@setlabelseparator{#1}}
-\DeclareCaptionOption{labelseparator}{\caption@setlabelseparator{#1}}
-\newcommand*\caption@setlabelseparator[1]{%
- \@ifundefined{caption@lsep@#1}%
- {\caption@Error{Undefined label separator `#1'}}%
- {\edef\caption@lsepname{#1}%
- \expandafter\let\expandafter\caption@iflf\csname caption@iflf@#1\endcsname
- \expandafter\let\expandafter\caption@lsep\csname caption@lsep@#1\endcsname}}
+\newcommand*\caption@LabelSeparatorWithNewline[1]{%
+ \caption@g@addto@list\caption@labelsep@crlist{#1}}
+\@onlypreamble\caption@LabelSeparatorWithNewline
+\newcommand*\caption@iflabelseparatorwithnewline{%
+ \caption@ifin@list\caption@labelsep@crlist\caption@labelsep@name}
+\DeclareCaptionOption{labelsep}{\caption@set{labelseparator}{#1}}
+\DeclareCaptionOption{labelseparator}{\caption@set{labelseparator}{#1}}
\DeclareCaptionLabelSeparator{none}{}
\DeclareCaptionLabelSeparator{colon}{: }
\DeclareCaptionLabelSeparator{period}{. }
\DeclareCaptionLabelSeparator{space}{ }
\DeclareCaptionLabelSeparator*{quad}{\quad}
\DeclareCaptionLabelSeparator*{newline}{\captionnewline}
+\caption@LabelSeparatorWithNewline{newline} % does not work with "format=hang"
\DeclareCaptionLabelSeparator*{endash}{\space\textendash\space}
-\newcommand*\captionnewline{\\}
-\newcommand*\caption@setdefaultlabelsep[1]{%
- \ifx\caption@lsep\caption@lsep@default
- \caption@set@default@labelsep{#1}%
- \caption@setlabelseparator{default}%
- \else
- \caption@set@default@labelsep{#1}%
- \fi}
-\newcommand*\caption@set@default@labelsep[1]{%
- \def\caption@lsep@default{\@nameuse{caption@lsep@#1}}%
- \def\caption@iflf@default{\@nameuse{caption@iflf@#1}}}
-\caption@set@default@labelsep{colon}
+\newcommand*\captionnewline{\\\relax}
+\SetCaptionDefault{labelseparator}{colon}
\newcommand*\DeclareCaptionTextFormat[2]{%
- \global\long\@namedef{caption@tfmt@#1}##1{#2}}
+ \caption@decl{textformat}{#1}##1{#2}}
\@onlypreamble\DeclareCaptionTextFormat
-\DeclareCaptionOption{textformat}{\caption@settextformat{#1}}
-\DeclareCaptionOption{strut}[1]{\caption@set@bool\caption@ifstrut{#1}}
-\newcommand*\caption@settextformat[1]{%
- \@ifundefined{caption@tfmt@#1}%
- {\caption@Error{Undefined text format `#1'}}%
- {\expandafter\let\expandafter\caption@tfmt\csname caption@tfmt@#1\endcsname}}
+\DeclareCaptionOption{textformat}{\caption@set{textformat}{#1}}
\DeclareCaptionTextFormat{empty}{%
\caption@get@label#1\caption@makeanchor{}\@nil
\caption@thelabel
@@ -690,14 +755,16 @@
\long\def\caption@get@label#1\caption@makeanchor#2#3\@nil{%
\def\caption@tempa{#2}%
\ifx\caption@tempa\@empty
- \caption@getlabel#1\label{}\@nil
+ \caption@getlabel{#1}%
\else
- \caption@getlabel#2\label{}\@nil
+ \caption@getlabel{#2}%
\fi}
\DeclareCaptionTextFormat{simple}{#1}
\DeclareCaptionTextFormat{period}{#1.}
-\def\caption@tfmt@default{\caption@tfmt@simple}
-\long\def\caption@getlabel#1\label#2#3\@nil{%
+\SetCaptionDefault{textformat}{simple}
+\newcommand\caption@getlabel[1]{%
+ \caption@@getlabel#1\label{}\@nil}
+\long\def\caption@@getlabel#1\label#2#3\@nil{%
\def\@tempa{#2}%
\ifx\@tempa\@empty
\let\caption@thelabel\relax
@@ -705,81 +772,55 @@
\def\@tempb{*}%
\ifx\@tempa\@tempb
\def\caption@thelabel{\label*}%
- \caption@@getlabel#3\@nil
+ \caption@@@getlabel#3\@nil
\else
\def\caption@thelabel{\label}%
- \caption@@getlabel{#2}#3\@nil
+ \caption@@@getlabel{#2}#3\@nil
\fi
\fi}
-\long\def\caption@@getlabel#1#2\@nil{%
+\long\def\caption@@@getlabel#1#2\@nil{%
\def\@tempa{#1}%
\def\@tempb{[}%
\ifx\@tempa\@tempb
- \caption@@@getlabel#1#2\@nil
+ \caption@@@@getlabel#1#2\@nil
\else
\l@addto@macro\caption@thelabel{{#1}}%
\fi}
-\long\def\caption@@@getlabel[#1]#2\@nil{%
+\long\def\caption@@@@getlabel[#1]#2\@nil{%
\l@addto@macro\caption@thelabel{[{#1}]}%
- \caption@@getlabel#2\@nil}
+ \caption@@@getlabel#2\@nil}
\let\caption@thelabel\relax
+\DeclareCaptionOption{strut}[1]{\caption@set@bool\caption@ifstrut{#1}}
\newcommand*\DeclareCaptionFont{%
- \@ifnextchar[%]
- \caption@declare@font
- \caption@declarefont}
+ \caption@decl@package{font}{\caption@declarefont}}
\@onlypreamble\DeclareCaptionFont
-\def\caption@declare@font[#1]#2{%
- \global\@namedef{caption@fnt@#2@package}{#1}%
- \caption@@declarefont{#2}}
-\@onlypreamble\caption@declare@font
-\newcommand*\caption@declarefont[1]{%
- \global\@nameundef{caption@fnt@#1@package}%
- \caption@@declarefont{#1}}
-\@onlypreamble\caption@declarefont
-\newcommand*\caption@@declarefont[2]{%
- \define@key{caption@fnt}{#1}[]{\caption@addto@fnt{#1}{#2}}%
- \caption@@@declarefont{#1}{#2}}
+\newcommand*\caption@declarefont[2]{%
+ \caption@decl{font}{#1}##1{#2}%
+ \define@key{caption@font}{#1}[]{\caption@addto@font{#1}{##1}}}
\@onlypreamble\caption@@declarefont
-\newcommand*\caption@@@declarefont[2]{}% will be used by \DeclareCaptionJustification
-\@onlypreamble\caption@@@declarefont
-\newcommand*\caption@addto@fnt[2]{%
- \expandafter\let\expandafter\caption@package\csname caption@fnt@#1@package\endcsname
- \caption@ifdefined\caption@package
- {\caption@requirepackage\caption@package{#1}}% load package, if necessary
- {}%
- \l@addto@macro\caption@fnt{#2}}
-\newcommand*\DeclareCaptionDefaultFont[2]{%
- \global\@namedef{caption#1@default}{#2}}
-\@onlypreamble\DeclareCaptionDefaultFont
+\newcommand*\caption@addto@font[1]{%
+ \caption@load@package{font}{#1}%
+ \caption@add@to@font{font}{#1}}
+\newcommand*\caption@add@to@font[3]{%
+ \expandafter\g@addto@macro\expandafter\caption@fnt\expandafter{\csname caption@#1@#2\endcsname{#3}}}
\DeclareCaptionOption{font}{\caption@setfont{font}{#1}}
\DeclareCaptionOption{font+}{\caption@addtofont{font}{#1}}
-\DeclareCaptionDefaultFont{font}{}
\DeclareCaptionOption{labelfont}{\caption@setfont{labelfont}{#1}}
\DeclareCaptionOption{labelfont+}{\caption@addtofont{labelfont}{#1}}
-\DeclareCaptionDefaultFont{labelfont}{}
+\caption@setmapping{labelfont}{font}
\DeclareCaptionOption{textfont}{\caption@setfont{textfont}{#1}}
\DeclareCaptionOption{textfont+}{\caption@addtofont{textfont}{#1}}
-\DeclareCaptionDefaultFont{textfont}{}
+\caption@setmapping{textfont}{font}
\newcommand*\caption@setfont[1]{%
\expandafter\let\csname caption#1\endcsname\@empty
\caption@addtofont{#1}}
\newcommand*\caption@addtofont[2]{%
+ \expandafter\let\expandafter\caption@fnt\csname caption#1\endcsname
\begingroup
- \expandafter\let\expandafter\caption@fnt\csname caption#1\endcsname
- \define@key{caption@fnt}{default}[]{%
- \l@addto@macro\caption@fnt{\csname caption#1@default\endcsname}}%
- \caption@setkeys[caption]{caption@fnt}{#2}%
- \global\let\caption@tempa\caption@fnt
+ \define@key{caption@font}{default}[]{\caption@add@to@font{#1}{default}{##1}}%
+ \caption@setkeys[caption]{caption@font}{#2}%
\endgroup
- \expandafter\let\csname caption#1\endcsname\caption@tempa}
-\newcommand*\caption@font{%
- \caption@teststar\caption@@font\@firstofone
- {\caption@setkeys[caption]{caption@fnt}}}
-\newcommand*\caption@@font[2]{%
- \begingroup
- \def\caption@fnt{\endgroup}%
- #1{#2}%
- \caption@fnt}
+ \expandafter\let\csname caption#1\endcsname\caption@fnt}
\DeclareCaptionFont{normalcolor}{\normalcolor}
\DeclareCaptionFont{color}{\color{#1}}
\DeclareCaptionFont{normalfont}{\normalfont}
@@ -802,6 +843,17 @@
\DeclareCaptionFont{LARGE}{\LARGE}
\DeclareCaptionFont{huge}{\huge}
\DeclareCaptionFont{Huge}{\Huge}
+\DeclareCaptionFont{smaller}{\caption@smaller}
+\DeclareCaptionFont{larger}{\caption@larger}
+\DeclareCaptionFont{none}{}
+\DeclareCaptionFont{normal}{%
+ \caption@font@normalcolor\@unused
+ \caption@font@normalfont\@unused
+ \caption@font@normalsize\@unused
+ \caption@font@singlespacing\@unused}
+\SetCaptionDefault{font}{none}
+\SetCaptionDefault{labelfont}{none}
+\SetCaptionDefault{textfont}{none}
\newcommand\caption@smaller{%
\ifx\@currsize\tiny
\relax
@@ -828,7 +880,6 @@
Cannot determine current font size.\MessageBreak
Try setting it with `size=' explicitly}%
\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}
-\DeclareCaptionFont{smaller}{\caption@smaller}
\newcommand\caption@larger{%
\ifx\@currsize\tiny
\scriptsize
@@ -855,35 +906,28 @@
Cannot determine current font size.\MessageBreak
Try setting it with `size=' explicitly}%
\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}
-\DeclareCaptionFont{larger}{\caption@larger}
-\DeclareCaptionFont{singlespacing}{}
-\DeclareCaptionFont{normal}{%
- \caption@font*{%
- \KV@caption@fnt@normalcolor\@unused
- \KV@caption@fnt@normalfont\@unused
- \KV@caption@fnt@normalsize\@unused
- \KV@caption@fnt@singlespacing\@unused}}
+\newcommand*\caption@hypersetup{\caption@ifdefined\hypersetup\hypersetup\@gobble}
+\DeclareCaptionFont{hypersetup}{\caption@hypersetup{#1}} % for usage in \captionsetup{font={hypersetup=...}}
+\DeclareCaptionOption{hypersetup}{\caption@hypersetup{#1}} % for usage in \captionsetup[<env>]{hypersetup=...}
\DeclareCaptionOption{size}{\caption@setfont{size}{#1}}
-\DeclareCaptionDefaultFont{size}{}
+\caption@setmapping{size}{font}
+\SetCaptionDefault{size}{none}
\newcommand*\DeclareCaptionJustification{%
- \def\caption@@@declarefont##1##2{%
- \global\@namedef{caption@hj@##1}{##2}% for compatibility to v1.0, needed by floatrow package
- \let\caption@@@declarefont\@gobbletwo}%
- \DeclareCaptionFont}
+ \caption@withoptargs\caption@declare@justification}
+\newcommand*\caption@declare@justification[3]{%
+ \caption@decl@package{justification}{\caption@decl{justification}}#1{#2}{#3}%
+ \expandafter\let\csname caption@hj@#2\expandafter\endcsname\csname caption@justification@#2\endcsname}
\@onlypreamble\DeclareCaptionJustification
-\newcommand*\DeclareCaptionDefaultJustification[1]{%
- \global\@namedef{caption@hj@default}{#1}% for compatibility to v1.0
- \DeclareCaptionDefaultFont{@hj}{#1}}
-\@onlypreamble\DeclareCaptionDefaultJustification
-\DeclareCaptionOption{justification}{\caption@setjustification{#1}}
-\DeclareCaptionDefaultJustification{}
-\newcommand*\caption@setjustification{\caption@setfont{@hj}}
+\DeclareCaptionOption{justification}{%
+ \caption@load@package{justification}{#1}%
+ \caption@set{justification}{#1}}
\DeclareCaptionJustification{justified}{}
\DeclareCaptionJustification{centering}{\centering}
\DeclareCaptionJustification{centerfirst}{\centerfirst}
\DeclareCaptionJustification{centerlast}{\centerlast}
\DeclareCaptionJustification{raggedleft}{\raggedleft}
\DeclareCaptionJustification{raggedright}{\raggedright}
+\SetCaptionDefault{justification}{justified}
\providecommand\centerfirst{%
\let\\\@centercr
\edef\caption@normaladjust{%
@@ -910,50 +954,41 @@
\newcommand*\caption@rule{\caption@ifrule\caption@hrule\relax}
\newcommand*\caption@hrule{\hrule\@height\z@}
\DeclareCaptionOption{rule}[1]{\caption@set@bool\caption@ifrule{#1}}
+\newcommand*\caption@declare@position[2]{%
+ \caption@decl{position}{#1}{#2}}
+\@onlypreamble\caption@declare@position
\DeclareCaptionOption{position}{\caption@setposition{#1}}
-\DeclareCaptionOption{figureposition}{%
- \captionsetup*[figure]{position=#1}}
+\DeclareCaptionOption{figureposition}{\captionsetup*[figure]{position=#1}}
\@onlypreamble@key{caption}{figureposition}
-\DeclareCaptionOption{tableposition}{%
- \captionsetup*[table]{position=#1}}
+\DeclareCaptionOption{tableposition}{\captionsetup*[table]{position=#1}}
\@onlypreamble@key{caption}{tableposition}
-\newcommand*\caption@setposition[1]{%
- \caption@ifinlist{#1}{d,default}{%
- \let\caption@position\caption@defaultpos
- }{\caption@ifinlist{#1}{t,top,above}{%
- \let\caption@position\@firstoftwo
- }{\caption@ifinlist{#1}{b,bottom,below}{%
- \let\caption@position\@secondoftwo
- }{\caption@ifinlist{#1}{a,auto}{%
- \let\caption@position\@undefined
- }{%
- \caption@Error{Undefined position `#1'}%
- }}}}}
-\let\caption@defaultpos\@undefined
-\newcommand*\caption@iftop{%
- \ifx\caption@position\@undefined
- \let\caption@position\@secondoftwo
- \fi
- \caption@position}
+\newcommand*\caption@setposition{\caption@set{position}}
+\caption@declare@position{t}{\@firstoftwo}
+\caption@declare@position{top}{\@firstoftwo}
+\caption@declare@position{above}{\@firstoftwo}
+\caption@declare@position{b}{\@secondoftwo}
+\caption@declare@position{bottom}{\@secondoftwo}
+\caption@declare@position{below}{\@secondoftwo}
+\caption@declare@position{a}{\caption@autoposition}% needed by floatrow package, \flrow@cappos
+\caption@declare@position{auto}{\caption@autoposition}
+\SetCaptionDefault{position}{auto}
+\let\caption@autoposition\@secondoftwo
+\newcommand*\caption@iftop{\caption@position}
\newcommand*\caption@fixposition{%
- \ifx\caption@position\@undefined
- \caption@autoposition
- \fi}
-\newcommand*\caption@autoposition{%
\ifvmode
\edef\caption@tempa{\the\prevdepth}%
\caption@Debug{\protect\prevdepth=\caption@tempa}%
\ifdim\prevdepth>-\p@
- \let\caption@position\@secondoftwo
+ \let\caption@autoposition\@secondoftwo % position=below
\else
- \let\caption@position\@firstoftwo
+ \let\caption@autoposition\@firstoftwo % position=above
\fi
\else
\caption@Debug{no \protect\prevdepth}%
- \let\caption@position\@secondoftwo
+ \let\caption@autoposition\@secondoftwo % position=below
\fi}
\newcommand*\caption@setautoposition[1]{%
- \def\caption@autoposition{\caption@setposition{#1}}}
+ \def\caption@fixposition{\caption@@set{position}{autoposition}{#1}}}
\newcommand*\caption@beginhook{}
\newcommand*\caption@endhook{}
\newcommand*\AtBeginCaption{\l@addto@macro\caption@beginhook}
@@ -961,6 +996,7 @@
\DeclareCaptionOption{list}[1]{\caption@setlist{#1}}
\DeclareCaptionOption{listof}[1]{\caption@setlist{#1}}
\newcommand*\caption@setlist{\caption@set@bool\caption@iflist}
+\caption@setlist{on}
\DeclareCaptionOption{listtype}{\caption@setlisttype{#1}}
\DeclareCaptionOption{listtype+}{\caption@setlisttype@ext{#1}}
\newcommand*\caption@setlisttype{%
@@ -972,29 +1008,18 @@
\newcommand*\caption@setlisttype@ext{%
\caption@@setlisttype\caption@listtype@ext}
\newcommand*\DeclareCaptionListFormat[2]{%
- \global\@namedef{caption@lstfmt@#1}##1##2{#2}}
+ \caption@decl{listformat}{#1}##1##2{#2}}
\@onlypreamble\DeclareCaptionListFormat
-\DeclareCaptionOption{listformat}{\caption@setlistformat{#1}}
-\newcommand*\caption@setlistformat[1]{%
- \@ifundefined{caption@lstfmt@#1}%
- {\caption@Error{Undefined list format `#1'}}%
- {\expandafter\let\expandafter\caption@lstfmt
- \csname caption@lstfmt@#1\endcsname}}
+\DeclareCaptionOption{listformat}{\caption@set{listformat}{#1}}
\DeclareCaptionListFormat{empty}{}
\DeclareCaptionListFormat{simple}{#1#2}
-\DeclareCaptionListFormat{parens}{#1(#2)}
\DeclareCaptionListFormat{subsimple}{#2}
+\DeclareCaptionListFormat{parens}{#1(#2)}
\DeclareCaptionListFormat{subparens}{(#2)}
-\newcommand*\caption@setdefaultlistformat[1]{%
- \ifx\caption@lstfmt\caption@lstfmt@default
- \caption@set@default@listformat{#1}%
- \caption@setlistformat{default}%
- \else
- \caption@set@default@listformat{#1}%
- \fi}
-\newcommand*\caption@set@default@listformat[1]{%
- \def\caption@lstfmt@default{\@nameuse{caption@lstfmt@#1}}}
-\caption@set@default@listformat{subsimple}
+\DeclareCaptionListFormat{period}{#1#2.}
+\DeclareCaptionListFormat{subperiod}{#2.}
+\SetCaptionDefault{listformat}{subsimple}
+\newcommand*\caption@lstfmt{\caption@listformat}
\DeclareCaptionOption{debug}[1]{%
\caption@set@bool\caption@ifdebug{#1}%
\caption@ifdebug
@@ -1002,6 +1027,45 @@
{\let\caption@Debug\@gobble}}
\DeclareOption{debug}{\setkeys{caption}{debug}}
\setkeys{caption}{debug=0}
+\newcommand\@makecaption@standard[2]{%
+ \vskip\abovecaptionskip
+ \sbox\@tempboxa{#1: #2}%
+ \ifdim \wd\@tempboxa >\hsize
+ #1: #2\par
+ \else
+ \global \@minipagefalse
+ \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
+ \fi
+ \vskip\belowcaptionskip}
+\@onlypreamble\@makecaption@standard
+\newcommand\@makecaption@arabic[2]{%
+ \vskip\abovecaptionskip
+ \sbox\@tempboxa{#1: #2}%
+ \sbox\@Arabitempboxa{\textRL{#2} : #1}%
+ \if@rl{
+ \ifdim \wd\@Arabitempboxa >\hsize
+ \textRL{#2} : #1\par
+ \else
+ \global \@minipagefalse
+ \hb@xt@\hsize{\hfil\box\@Arabitempboxa\hfil}%
+ \fi}\else{
+ \ifdim \wd\@tempboxa >\hsize
+ #1: #2\par
+ \else
+ \global \@minipagefalse
+ \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
+ \fi}\fi
+ \vskip\belowcaptionskip}
+\@onlypreamble\@makecaption@arabic
+\newcommand\@makecaption@latvian[2]{%
+ \vskip10\p@
+ \sbox\@tempboxa{#1\if\empty#2\else: #2\fi}%
+ \ifdim\wd\@tempboxa>\hsize
+ #1: #2\par
+ \else
+ \hbox to\hsize{\hfil\box\@tempboxa\hfil}%
+ \fi}
+\@onlypreamble\@makecaption@latvian
\caption@setbool{documentclass}{1}
\caption@ifundefined\caption@documentclass{%
\@ifclassloaded{beamer}{%
@@ -1018,7 +1082,7 @@
\def\caption@documentclass{koma}%
}{\caption@ifdefined\@captionheadfont{%
\caption@InfoNoLine{AMS or SMF document class detected}%
- \def\caption@documentclass{ams}%
+ \def\caption@documentclass{ams-smf}%
}{\caption@ifdefined\CaptionFonts{%
\caption@InfoNoLine{NTG document class detected}%
\def\caption@documentclass{ntg}%
@@ -1030,213 +1094,147 @@
\caption@InfoNoLine{thesis document class detected}%
\def\caption@documentclass{thesis}%
}{%
- % article|report|book [2005/09/16 v1.4f Standard LaTeX document class]
- \long\def\caption@tempa#1#2{%
- \vskip\abovecaptionskip
- \sbox\@tempboxa{#1: #2}%
- \ifdim \wd\@tempboxa >\hsize
- #1: #2\par
+ \ifx\@makecaption\@undefined
+ \caption@InfoNoLine{Document class w/o caption stuff detected}%
+ \else
+ \ifx\@makecaption\@makecaption@standard
+ \caption@InfoNoLine{Standard document class detected}%
\else
- \global \@minipagefalse
- \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
+ \ifx\@makecaption\@makecaption@arabic
+ \caption@InfoNoLine{arabic babel option detected}%
+ \else
+ \ifx\@makecaption\@makecaption@latvian
+ \caption@InfoNoLine{latvian babel option detected}%
+ \else
+ \caption@InfoNoLine{%
+ Unknown document class (or package),\MessageBreak
+ standard defaults will be used}%
+ \caption@InfoNoLine{\string\@makecaption\space=\space\meaning\@makecaption\@gobble}%
+ \caption@setbool{documentclass}{0}% unknown document class
+ \fi
+ \fi
\fi
- \vskip\belowcaptionskip}}
- \ifx\caption@tempa\@makecaption
- \caption@InfoNoLine{Standard document class detected}%
- \else
- \caption@InfoNoLine{%
- Unknown document class (or package),\MessageBreak
- standard defaults will be used}%
- \caption@InfoNoLine{\string\@makecaption\space=\space\meaning\@makecaption\@gobble}%
- \caption@setbool{documentclass}{0}%
\fi
- \def\caption@documentclass{base}%
- }}}}}}%
-}{}
-\newcommand*\caption@ifclassloaded[1]{%
- \edef\caption@tempa{#1}%
- \ifx\caption@tempa\caption@documentclass
- \expandafter\@firstoftwo
- \else
- \expandafter\@secondoftwo
- \fi}
-\caption@ifclassloaded{elsarticle}{%
- \DeclareCaptionDefaultFont{font}{\footnotesize}
+ \let\caption@documentclass\@empty % don't load adaption code later on
+ }}}}}}}%
}{}
-\caption@ifclassloaded{ams}{%
- \let\captionmargin\captionindent % set to 3pc by AMS class
- \begingroup\edef\@tempa{\endgroup
- \noexpand\caption@g@addto@list\noexpand\caption@sty@default
- {margin=\the\captionmargin
- \caption@ifdefined\smf@makecaption{,maxmargin=.1\linewidth}{}}}
- \@tempa
- \caption@g@addto@list\caption@sls@default{margin*=.5\captionmargin}
- \DeclareCaptionLabelSeparator{default}{.\enspace}
- \DeclareCaptionDefaultFont{font}{\@captionfont}
- \DeclareCaptionDefaultFont{labelfont}{\@captionheadfont}
- \DeclareCaptionDefaultFont{textfont}{\@captionfont\upshape}
- \captionsetup[figure]{position=b}
- \captionsetup[table]{position=t}
-}{}
-\caption@ifclassloaded{beamer}{%
- \newcommand*\caption@ifbeamertemplate[1]{%
- \begingroup
- \let\beamer@@tmpl@caption@ORI\beamer@@tmpl@caption
- \@nameuse{beamer@@tmpop@caption@#1}%
- \ifx\beamer@@tmpl@caption@ORI\beamer@@tmpl@caption
- \endgroup\expandafter\@firstoftwo
- \else
- \endgroup\expandafter\@secondoftwo
- \fi}
- \DeclareCaptionLabelFormat{default}{%
- \caption@ifbeamertemplate{numbered}%
- \caption@lfmt@simple
- \caption@lfmt@unnumbered
- {#1}{#2}}
- \DeclareCaptionLabelFormat{default@magyar}{%
- \caption@ifbeamertemplate{numbered}%
- \caption@lfmt@simple@magyar
- \caption@lfmt@unnumbered
- {#1}{#2}}
- \@ifundefined{@@magyar@captionfix}\AtBeginDocument\@firstofone{%
- \@ifundefined{@@magyar@captionfix}{}{%
- \g@addto@macro\@@magyar@captionfix{%
- \let\caption@lfmt@simple@magyar\caption@lfmt@simpleMagyar
- \let\caption@lfmt@simpleMagyar\caption@lfmt@default@magyar}}}
- \caption@declarelabelseparator
- {\caption@ifbeamertemplate{caption name own line}\@gobble\@firstofone}
- {default}
- {\caption@ifbeamertemplate{caption name own line}{\\}%
- {\usebeamertemplate{caption label separator}}}
- \DeclareCaptionDefaultFont{font}{%
- \usebeamerfont*{caption}%
- \usebeamercolor[fg]{caption}}
- \DeclareCaptionDefaultFont{labelfont}{%
- \setbeamercolor*{caption}{}% avoid setting "caption" color additionally
- \usebeamercolor[fg]{caption name}%
- \setbeamerfont*{caption}{}% avoid setting "caption" font additionally
- \usebeamerfont{caption name}}
- \DeclareCaptionDefaultJustification{\raggedright}
- \DeclareOption{beamerclass}{%
- \renewcommand\caption@ifslc{%
- \caption@ifbeamertemplate{caption name own line}\@secondoftwo\@firstoftwo}
- % Since the beamer class do not offer a `list of figures' we switch this support off.
- \captionsetup{list=0}}
- \PassOptionsToPackage{beamerclass}{caption3}
- \defbeamertemplate{caption}{caption3}{%
- \caption@make\insertcaptionname\insertcaptionnumber\insertcaption}
- \DeclareOption{beamer}{%
- % \usebeamertemplate**{caption} will set font
- \DeclareCaptionDefaultFont{font}{}%
- \setbeamertemplate{caption}[caption3]}
-}{}
-\caption@ifclassloaded{koma}{%
- \DeclareCaptionFormat{default}[#1#2#3\par]{%
- \ifdofullc@p
- \caption@ifin@list\caption@lsepcrlist\caption@lsepname
- {\caption@Error{%
- The option `labelsep=\caption@lsepname' does not work\MessageBreak
- with \noexpand\setcaphanging (which is set by default)}}%
- {\caption@fmt@hang{#1}{#2}{#3}}%
- \else
- #1#2%
- \ifdim\cap@indent<\z@
- \par
- \noindent\hspace*{-\cap@indent}%
- \else\if@capbreak
- \par
- \fi\fi
- #3\par
- \fi}
- \DeclareCaptionLabelSeparator{default}{\captionformat}
- \DeclareCaptionDefaultFont{font}{\scr@fnt@caption}
- \DeclareCaptionDefaultFont{labelfont}{\scr@fnt@captionlabel}
- \let\caption@KV@parindent\KV@caption@parindent
- \DeclareCaptionOption{parindent}[]{%
- \ifx,#1,%
- \caption@Debug{Option `parindent' ignored}%
- \else
- \caption@KV@parindent{#1}%
- \fi}%
- \let\caption@KV@parskip\KV@caption@parskip
- \DeclareCaptionOption{parskip}[]{%
- \ifx,#1,%
- \caption@Debug{Option `parskip' ignored}%
- \else
- \caption@KV@parskip{#1}%
- \fi}%
-}{}
-\caption@ifclassloaded{ntg}{%
- \DeclareCaptionDefaultFont{labelfont}{\CaptionLabelFont}
- \DeclareCaptionDefaultFont{textfont}{\CaptionTextFont}
-}{}
-\caption@ifclassloaded{thesis}{%
- \DeclareCaptionDefaultFormat{hang}
- \DeclareCaptionDefaultFont{labelfont}{\cph@font}
- \DeclareCaptionDefaultFont{textfont}{\cpb@font}
-}{}
-\caption@ifdefined\ArabiCoreLoaded{%
- \newcommand\caption@rl[1]{\if@rl\textRL{#1}\else\textLR{#1}\fi}
- \def\fnum@figure{\figurename\nobreakspace\thefigure}%
- \def\fnum@table{\tablename\nobreakspace\thetable}%
- \DeclareCaptionLabelSeparator{arabi}{ : }
- \DeclareCaptionLabelSeparator{default}{%
- \if@rl\caption@lsep@arabi\else\caption@lsep@colon\fi}
+\newcommand*\AtCaptionPackage{%
+ \g@addto@macro\caption@documentclass@code}
+\@onlypreamble\AtCaptionPackage
+\providecommand*\caption@documentclass@code{}
+\@onlypreamble\caption@documentclass@code
+\newcommand*\caption@IfBabelPackageLoaded[4]{%
+ \caption@ifdefined#2\@firstofone\caption@AtBeginDocument{%
+ \caption@if@bool{\@nameuse{caption@ifbabel@#1}}%
+ {\def\caption@tempa{\caption@ifdefined#2}}%
+ {\let\caption@tempa\@secondoftwo}%
+ \caption@tempa
+ {\caption@InfoNoLine{#1 babel package is loaded}#3}%
+ {#4}}}
+\@onlypreamble\caption@IfBabelPackageLoaded
+\DeclareCaptionLabelSeparator{arabi}{\if@rl\space\fi: }
+\newcommand*\caption@IfBabelArabi{%
+ \caption@IfBabelPackageLoaded{arabi}{\ArabiCoreLoaded}}
+\@onlypreamble\caption@IfBabelArabi
+\providecommand*\caption@ifbabel@arabi{true}
+\caption@IfBabelArabi{%
+ \newcommand\caption@rl[1]{\if@rl\textRL{#1}\else\textLR{#1}\fi}%
+ \caption@ifdefined\extrasarabic{%
+ \addto\extrasarabic{%
+ \caption@switchdefault{labelseparator}{\babel@save #1}{arabi}}}{}%
+ \caption@ifdefined\extrasfarsi{%
+ \addto\extrasfarsi{%
+ \caption@switchdefault{labelseparator}{\babel@save #1}{arabi}}}{}%
}{%
\let\caption@rl\@firstofone
}
-\caption@ifdefined\FB@makecaption{%
- \ifx\@makecaption\STD@makecaption
- \DeclareCaptionLabelSeparator{default}{\CaptionSeparator}
- \def\caption@frenchb{% supress frenchb warning
- \let\STD@makecaption\@makecaption
- \let\FB@makecaption\@makecaption}
- \else
- \ifx\@makecaption\@undefined\else
- \caption@InfoNoLine{%
- The definition of \protect\@makecaption\space
- has been changed,\MessageBreak
- frenchb will NOT customize it}%
- \fi
+\caption@ifdecl{labelseparator}{french}
+ {\let\caption@french@labelseparator\@undefined}%
+ {\caption@@set{labelseparator}{labelseparator@french}{default}%
+ \let\caption@french@labelseparator\caption@labelseparator@french}
+\newcommand*\caption@IfBabelFrench{%
+ \caption@IfBabelPackageLoaded{french}{\FB@makecaption}}
+\@onlypreamble\caption@IfBabelFrench
+\providecommand*\caption@ifbabel@french{true}
+\caption@IfBabelFrench{%
+ \ifx\caption@french@labelseparator\caption@labelseparator@french % still set to dummy label separator?
+ \DeclareCaptionLabelSeparator{french}{%
+ \ifFBCustomiseFigTabCaptions
+ \CaptionSeparator
+ \else
+ \space : %
+ \fi}%
\fi
+ \caption@ifdefined\extrasfrench{%
+ \addto\extrasfrench{%
+ \caption@switchdefault{labelseparator}{\babel@save #1}{french}}}{}%
+ \caption@AtBeginDocument{\@nameuse{@FBwarning@capsepfalse}}%
}{}
-\caption@ifdefined\frenchTeXmods{%
- \DeclareCaptionDefaultFont{textfont}{\itshape}%
- \DeclareCaptionLabelSeparator{default}{\captionseparator\space}%
+\newcommand*\caption@IfFrenchLe{%
+ \caption@IfBabelPackageLoaded{frenchle}{\frenchTeXmods}}
+\@onlypreamble\caption@IfBabelFrenchLe
+\providecommand*\caption@ifbabel@frenchle{true}
+\caption@IfFrenchLe{%
+ \ifx\caption@french@labelseparator\caption@labelseparator@french % still set to dummy label separator?
+ \DeclareCaptionLabelSeparator{french}{\captionseparator\space}%
+ \fi
+ \g@addto@macro\extrasfrench{%
+ \caption@switchdefault{labelseparator}{\let\caption@original@labelseparator#1}{french}%
+ \caption@switchdefault{font}{\let\caption@original@font#1}{it}%
+ \caption@switchdefault{labelfont}{\let\caption@original@labelfont#1}{up}}%
+ \g@addto@macro\extrasenglish{%
+ \caption@restoredefault{labelseparator}{\caption@original@labelseparator}%
+ \caption@restoredefault{font}{\caption@original@font}%
+ \caption@restoredefault{labelfont}{\caption@original@labelfont}}%
+ \caption@AtBeginDocument{%
+ \let\captionfont@original\captionfont
+ \let\captionlabelfont@original\captionlabelfont}%
+ \g@addto@macro\GOfrench{%
+ \let\captionfont\captionfont@original
+ \let\captionlabelfont\captionlabelfont@original}%
}{}
-\DeclareCaptionListFormat{subperiod}{#2.}
-\def\caption@tempa#1{%
- \@ifpackagewith{babel}{#1}{%
- \caption@InfoNoLine{#1 babel option is loaded}%
- \expandafter\addto\csname extras#1\endcsname{%
- % change default labelsep and listformat
- \caption@setdefaultlabelsep{period}%
- \caption@setdefaultlistformat{subperiod}}%
- \expandafter\addto\csname noextras#1\endcsname{%
- % change default labelsep and listformat
- \caption@setdefaultlabelsep{colon}%
- \caption@setdefaultlistformat{subsimple}}%
- }{}}
-\caption@tempa{hungarian}
-\caption@tempa{magyar}
-\newcommand*\caption@xpackage[2]{%
- \expandafter\ifx\csname ver@#2.\caption@pkgextension\endcsname\relax
- \expandafter\@firstofone
+\DeclareCaptionLabelFormat{magyar}{#2\bothIfSecond{.~}{#1}}
+\newcommand*\caption@IfBabelHungarian{%
+ \caption@IfBabelPackageLoaded{hungarian}{\magyar@opt@defaults}}
+\@onlypreamble\caption@IfBabelHungarian
+\providecommand*\caption@ifbabel@hungarian{true}
+\caption@IfBabelHungarian{%
+ \caption@ifdefined\extrashungarian{%
+ \addto\extrashungarian{%
+ \caption@switchdefault{labelformat}{\babel@save #1}{magyar}%
+ \caption@switchdefault{labelseparator}{\babel@save #1}{period}%
+ \caption@switchdefault{listformat}{\babel@save #1}{subperiod}}}{}%
+ \caption@ifdefined\extrasmagyar{%
+ \addto\extrasmagyar{%
+ \caption@switchdefault{labelformat}{\babel@save #1}{magyar}%
+ \caption@switchdefault{labelseparator}{\babel@save #1}{period}%
+ \caption@switchdefault{listformat}{\babel@save #1}{subperiod}}}{}%
+}{}
+\DeclareCaptionLabelFormat{latvian}{#2\bothIfSecond{~}{#1}}
+\newcommand*\caption@IfBabelLatvian{%
+ \caption@IfBabelPackageLoaded{latvian}{\bbl@latvianindent}}
+\@onlypreamble\caption@IfBabelLatvian
+\providecommand*\caption@ifbabel@latvian{true}
+\caption@IfBabelLatvian{%
+ \caption@ifdefined\extraslatvian{%
+ \addto\extraslatvian{%
+ \caption@switchdefault{labelformat}{\babel@save #1}{latvian}}}{}%
+}{}
+\newcommand*\caption@ifpackageloaded[1]{%
+ \expandafter\ifx\csname ver@#1.\caption@pkgextension\endcsname\relax
+ \expandafter\@secondoftwo
\else
- \expandafter\@gobbletwo
- \fi
- {#1{#2}}}
+ \expandafter\@firstoftwo
+ \fi}
\let\caption@pkgextension\@pkgextension
-\newcommand*\caption@loadpackage{%
- \caption@xpackage\caption@@loadpackage}
-\newcommand*\caption@@loadpackage[2]{%
- \caption@Info{Option `#2' requires the `#1' package}%
- \RequirePackage{#1}\relax}
-\newcommand*\caption@requirepackage{%
- \caption@xpackage\caption@@requirepackage}
-\newcommand*\caption@@requirepackage[2]{%
- \@cons\caption@packagelist{{#1}{#2}}}% load package later on
\newcommand*\caption@pkg@list{}
+\newcommand*\caption@requirepackage[2]{%
+ \caption@ifpackageloaded{#1}{}{\caption@@requirepackage{#1}{#2}}}
+\newcommand*\caption@@requirepackage[2]{%
+ \@cons\caption@packagelist{{#1}{#2}}} % load package later on
+\caption@AtBeginDocument{%
+ \renewcommand*\caption@@requirepackage[2]{%
+ \caption@Error{Option `#2' requires the `#1' package}}}
\newcommand*\caption@packagelist{}
\@onlypreamble\caption@packagelist
\caption@AtBeginDocument{%
@@ -1246,21 +1244,35 @@
\g@addto@macro\caption@tempa{%
\caption@loadpackage{#1}{#2}}}%
\caption@packagelist
- \caption@tempa
- \renewcommand*\caption@@loadpackage[2]{%
- \caption@Error{Option `#2' requires the `#1' package}}%
- \let\caption@@requirepackage\caption@@loadpackage
- }
-\newcommand*\caption@usepackage[3]{%
+ \caption@tempa}
+\newcommand*\caption@loadpackage[2]{%
+ \caption@ifpackageloaded{#1}{}{\caption@@loadpackage{#1}{#2}}}
+\newcommand*\caption@@loadpackage[2]{%
+ \caption@Info{Option `#2' requires the `#1' package}%
+ \RequirePackage{#1}\relax}
+\caption@AtBeginDocument{%
+ \let\caption@@loadpackage\caption@@requirepackage}
+\caption@AtBeginDocument{%
+ \def\@tempa{2008/08/02 v0.3b floatrow: float package extension}%
+ \expandafter\ifx\csname ver@floatrow.sty\endcsname\@tempa
+ \caption@InfoNoLine{floatrow package v0.3b is loaded}%
+ \renewcommand\captionlabel[1]{{% l.559
+ \def\FR@tmp{\@captype}%
+ \ifnum\floatbox@depth>\@ne
+ \def\FR@tmp{sub\@captype}\caption@setsubtype*{\FR@tmp}\stepcounter{\FR@tmp}%
+ \fi
+ \caption@format % <= This line added
+ \caption@@@make{\caption@fnum\FR@tmp}{#1}}}
+ \fi}
+\newcommand*\caption@newfloat[2]{%
\IfCaptionOptionCheck
- {\caption@requirepackage{#1}{#2}}%
+ {\caption@requirepackage{newfloat}{#1}}%
{\let\KV@prefix@ORI\KV@prefix
\let\@tempc@ORI\@tempc
- \caption@loadpackage{#1}{#2}%
- #3%
+ \caption@loadpackage{newfloat}{#1}%
+ #2%
\let\@tempc\@tempc@ORI
\let\KV@prefix\KV@prefix@ORI}}
-\newcommand*\caption@newfloat{\caption@usepackage{newfloat}}
\DeclareCaptionOption{figurename}{\caption@SetName{figure}{#1}}
\@onlypreamble@key{caption}{figurename}
\DeclareCaptionOption{tablename}{\caption@SetName{table}{#1}}
@@ -1281,9 +1293,9 @@
\DeclareCaptionOption{tablewithin}{\caption@within{table}{#1}}
\DeclareCaptionOptionNoValue{tablewithout}{\caption@within{table}{none}}
\newcommand*\caption@within[2]{%
- \caption@newfloat{#1within}{\newfloat@setwithin{#1}{#2}}}
+ \caption@newfloat{#1within=#2}{\newfloat@setwithin{#1}{#2}}}
\DeclareCaptionOption{within}{%
- \caption@newfloat{within}{\newfloatsetup{within=#1}}}
+ \caption@newfloat{within=#1}{\newfloatsetup{within=#1}}}
\DeclareCaptionOptionNoValue{without}{%
\caption@newfloat{without}{\newfloatsetup{without}}}
\DeclareCaptionJustification[ragged2e]{Justified}{\justifying}
@@ -1337,12 +1349,8 @@
\@ifnextchar [% %] match left bracket
{\sf@@subfloat}%
{\sf@@subfloat[\@empty]}}
-%%\@ifl@aded{dtx}{subfig}{\caption@loadpackage{ragged2e}{}}{} % not needed
\DeclareCaptionOption{lofdepth}[2]{\caption@ifdefined\c@lofdepth{\setcounter{lofdepth}{#1}}{}}
\DeclareCaptionOption{lotdepth}[2]{\caption@ifdefined\c@lotdepth{\setcounter{lotdepth}{#1}}{}}
-\captionsetup{style=default,position=default,%
- list,listformat=default,twoside=\if@twoside 1\else 0\fi}
-\ProcessOptions*
\newcommand\caption@addcontentsline[2]{%
\caption@ifcontentsline{#2}{%
\begingroup
@@ -1368,7 +1376,7 @@
\caption@add@contentsline
{\csname ext@#1\endcsname}%
{#1}%
- {\caption@lstfmt{\@nameuse{p@#1}}{\@nameuse{the#1}}}%
+ {\caption@listformat{\@nameuse{p@#1}}{\@nameuse{the#1}}}%
{\ignorespaces #2}%
\caption@chkfloat{#1}{#2}}}}
\newcommand*\caption@add@contentsline{%
@@ -1387,8 +1395,14 @@
\fi}
\newcommand*\caption@addsubcontentslines[1]{}
\newif\ifcaption@star
-\newcommand*\caption@fnum[1]{\caption@lfmt{\@nameuse{#1name}}{\@nameuse{the#1}}}
-\newcommand\caption@make[2]{\caption@@make{\caption@lfmt{#1}{#2}}}
+\newcommand*\caption@aboveskip{%
+ \vskip\abovecaptionskip}
+\newcommand*\caption@belowskip{%
+ \vskip\belowcaptionskip}
+\newcommand*\caption@fnum[1]{%
+ \expandafter\let\expandafter\caption@original@fnum\csname caption@fnum@#1\endcsname % for label format `original'
+ \caption@labelformat{\@nameuse{#1name}}{\@nameuse{the#1}}}
+\newcommand\caption@make[2]{\caption@@make{\caption@labelformat{#1}{#2}}}
\newcommand\caption@@make[2]{%
\begingroup
\caption@@make@{#1}{#2}%
@@ -1398,18 +1412,18 @@
\caption@stepthecounter
\caption@beginhook
\caption@box\hsize{%
- \caption@ifslc{\caption@slc{#1}{#2}\caption@singleline\relax}{}%
+ \caption@singlelinecheck{\caption@slc{#1}{#2}\caption@singleline\caption@multiline}{\caption@multiline}%
\caption@calcmargin
\caption@tempdima\captionmargin
\ifdim\captionmargin@=\z@ \else
\caption@ifoddpage{}{\advance\caption@tempdima\captionmargin@}%
\fi
- \caption@ifh{\advance\caption@tempdima\caption@indent}%
+ \caption@ifhmode{\advance\caption@tempdima\caption@indent}%
\hspace\caption@tempdima
\caption@tempdima\captionwidth
- \caption@ifh{\advance\caption@tempdima-\caption@indent}%
+ \caption@ifhmode{\advance\caption@tempdima-\caption@indent}%
\caption@parbox\caption@tempdima{%
- \caption@ifh{%
+ \caption@ifhmode{%
\ifdim\caption@indent=\z@
\leavevmode
\else
@@ -1458,7 +1472,7 @@
\singlelinecaptiontrue
\begingroup
\caption@singleline
- \let\caption@hj\@empty
+ \let\caption@justification\relax
\caption@calcmargin % calculate \captionwidth
\caption@prepareslc
\sbox\@tempboxa{\caption@@@make{#1}{#2}}%
@@ -1473,8 +1487,11 @@
\caption@Debug{End SLC}}
\newif\ifsinglelinecaption
\newcommand*\caption@singleline{%
- \caption@xsetup\caption@opt@singleline
+ \caption@xsetup\caption@slsty % Note: This could change \caption@format
+ \caption@format % defines \caption@ifhmode, \caption@slfmt, and \caption@fmt
\let\caption@fmt\caption@slfmt}
+\newcommand*\caption@multiline{%
+ \caption@format} % defines \caption@ifhmode, \caption@slfmt, and \caption@fmt
\providecommand*\caption@prepareslc{}
\g@addto@macro\caption@prepareslc{%
\let\label\caption@gobble
@@ -1491,7 +1508,6 @@
\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
@@ -1512,26 +1528,18 @@
\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}
+ \caption@justification\captionfont\captionsize}
\newcommand\caption@@@make[2]{%
\sbox\@tempboxa{#1}%
\ifdim\wd\@tempboxa=\z@
- \let\caption@lsep\relax
+ \caption@set{labelseparator}{none}%
\fi
\caption@ifempty{#2}{%
- \let\caption@lsep\@empty
- \let\caption@tfmt\@firstofone
+ \caption@set{labelseparator}{none}%
+ \caption@set{textformat}{simple}%
}%
+ \caption@labelseparator % defines \caption@iflabelfont, \caption@labelsep and \caption@labelsep@name (the latter is needed by \caption@fmt)
\@setpar{\@@par\caption@@par}\caption@@par
\caption@applyfont
\caption@fmt
@@ -1543,23 +1551,23 @@
\fi}%
{\ifcaption@star\else
\begingroup
- \caption@iflf\captionlabelfont
- \relax\caption@lsep
+ \caption@iflabelfont\captionlabelfont
+ \relax\caption@labelsep
\endgroup
\fi}%
{{\captiontextfont
- \captiontextstart
+ \caption@textstart
\caption@ifstrut
{\vrule\@height\ht\strutbox\@width\z@}%
{}%
\nobreak\hskip\z@skip % enable hyphenation
- \caption@tfmt{#2}%
+ \caption@textformat{#2}%
\caption@ifstrut
{\ifhmode\@finalstrut\strutbox\fi}%
{}%
- \captiontextend}}}
-\newcommand*\captiontextstart{}
-\newcommand*\captiontextend{\par}
+ \caption@textend}}}
+\newcommand*\caption@textstart{}
+\newcommand*\caption@textend{\par}
\newcommand\caption@ifempty[1]{%
\caption@if@empty{#1}%
\caption@ifempty\@unused}
@@ -1601,17 +1609,21 @@
\newcommand*\caption@@par{%
\parindent\caption@parindent\hangindent\caption@hangindent}%
\newcommand*\DeclareCaptionType{%
- \caption@loadpackage{newfloat}{}%
+ \caption@loadpackage{newfloat}{declare type}%
\DeclareFloatingEnvironment}
\@onlypreamble\DeclareCaptionType
-\newcommand\caption@ForEachType[1]{%
+\newcommand*\ForEachCaptionType{%
+ \@ifstar
+ {\caption@foreach@type\@gobble}%
+ {\caption@foreach@type\@iden}}
+\newcommand\caption@foreach@type[2]{%
\caption@ifdefined\ForEachFloatingEnvironment
- {\ForEachFloatingEnvironment{#1}}%
- {\def\@elt##1{#1}%
+ {\ForEachFloatingEnvironment*{#2}}%
+ {\def\@elt##1{#2}%
\caption@ifdefined\c@figure\@elt\@gobble{figure}%
\caption@ifdefined\c@table\@elt\@gobble{table}%
- \let\@elt\relax
- \newfloat@addtohook{#1}}}
+ \let\@elt\relax}%
+ #1{\newfloat@addtohook{#2}}}
\providecommand\newfloat@addtohook[1]{%
\toks@=\expandafter{\newfloat@hook{##1}#1}%
\edef\@tempa{\def\noexpand\newfloat@hook####1{\the\toks@}}%
@@ -1626,28 +1638,28 @@
\def\caption@@declaresubtype#1[#2]#3{%
\@ifundefined{c@#3}%
{\caption@Error{No float type '#3' defined}}%
- {\caption@ifsubtype{sub#3}%
- {\caption@Debug{Modify subtype `sub#3'}}%
- {\caption@Debug{New subtype `sub#3'}%
- \@ifundefined{c@sub#3}%
- {\newcounter{sub#3}\relax}%
- {\caption@Warning{Using already defined counter `sub#3'}}%
- \@addtoreset{sub#3}{#3}%
- \@namedef{ext@sub#3}{\csname ext@#3\endcsname}%
- \caption@declaresublistentry{#3}%
- \@cons\caption@subtypelist{{#3}}}%
- \caption@ifdefined\contentsuse{%
- \contentsuse{sub#3}{\csname ext@sub#3\endcsname}}{}%
- \@namedef{sub#3name}{}%
- \@namedef{sub#3autorefname}{\csname #3autorefname\endcsname}%
- #1% is \@firstoftwo in star form, and \@secondoftwo otherwise
- {\@namedef{p@sub#3}{}%
- \@namedef{thesub#3}{\csname the#3\endcsname.\@nameuse{#2}{sub#3}}}%
- {\@namedef{p@sub#3}{\csname the#3\endcsname}%
- \@namedef{thesub#3}{\@nameuse{#2}{sub#3}}}%
- \@namedef{theHsub#3}{\csname theH#3\endcsname.\arabic{sub#3}}%
- }}
+ {\caption@@@declaresubtype{#1}{#2}{#3}{sub#3}}}
\@onlypreamble\caption@@declaresubtype
+\newcommand*\caption@@@declaresubtype[4]{%
+ \caption@ifin@list\caption@subtypelist{#4}%
+ {\caption@Debug{Modify subtype `#4'}}%
+ {\caption@Debug{New subtype `#4'}%
+ \newcounter{#4}[{#3}]%
+ \@namedef{ext@#4}{\csname ext@#3\endcsname}%
+ \caption@declaresublistentry{#3}%
+ \caption@l@addto@list\caption@subtypelist{#4}%
+ \caption@subtype@hook{#4}}%
+ \caption@ifdefined\contentsuse{%
+ \contentsuse{#4}{\csname ext@#4\endcsname}}{}%
+ \@namedef{#4name}{}%
+ \@namedef{#4autorefname}{\csname #3autorefname\endcsname}%
+ #1% is \@firstoftwo in star form, and \@secondoftwo otherwise
+ {\@namedef{p@#4}{}%
+ \@namedef{the#4}{\csname the#3\endcsname.\@nameuse{#2}{#4}}}%
+ {\@namedef{p@#4}{\csname the#3\endcsname}%
+ \@namedef{the#4}{\@nameuse{#2}{#4}}}%
+ \@namedef{theH#4}{\csname theH#3\endcsname.\arabic{#4}}}
+\@onlypreamble\caption@@@declaresubtype
\newcommand*\caption@declaresublistentry{%
\caption@ifdefined\l@chapter
{\caption@@declaresublistentry\l@subsection}%
@@ -1691,37 +1703,43 @@
\fi}
\@onlypreamble\caption@@@@@@declaresublistentry
\newcommand*\caption@subtypelist{}
-\newcommand*\caption@ifsubtype[1]{%
- \begingroup
- \let\next\@secondoftwo
- \edef\@tempa{#1}%
- \def\@elt##1{%
- \def\@tempb{sub##1}%
- \ifx\@tempa\@tempb
- \let\next\@firstoftwo
- \fi}%
- \caption@subtypelist
- \expandafter\endgroup\next}
-\newcommand*\caption@restorecounters{%
- \caption@restore@counters
- \global\let\caption@restore@counters\@empty}
-\newcommand*\caption@restore@counters{}
+\newcommand*\caption@ifsubtype{%
+ \caption@ifin@list\caption@subtypelist}
+\newcommand*\ForEachCaptionSubType{%
+ \@ifstar
+ {\caption@foreach@subtype\@gobble}%
+ {\caption@foreach@subtype\@iden}}
+\newcommand\caption@foreach@subtype[2]{%
+ \caption@for@list\caption@subtypelist{#2}%
+ #1{\caption@addto@subtype@hook{#2}}}
+\providecommand\caption@addto@subtype@hook[1]{%
+ \toks@=\expandafter{\caption@subtype@hook{##1}#1}%
+ \edef\@tempa{\def\noexpand\caption@subtype@hook####1{\the\toks@}}%
+ \@tempa}
+\providecommand*\caption@subtype@hook[1]{}
\newcommand*\caption@savesubcounters{%
- \def\@elt##1{\caption@savecounter{sub##1}}%
- \caption@subtypelist
- \let\@elt\relax}%
+ \caption@for@list\caption@subtypelist{\caption@savecounter{##1}}}
\newcommand*\caption@savecounter[1]{%
\edef\caption@tempa{%
\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[3]{%
- \caption@AtBeginDocument#1{%
- \def\@elt##1{#3}%
- \@nameuse{caption@#2}%
- \let\@elt\relax}}%
+\newcommand*\caption@restorecounters{%
+ \caption@restore@counters
+ \global\let\caption@restore@counters\@empty}
+\newcommand*\caption@restore@counters{}
+\ifx\caption@documentclass\@empty\else
+ \@pushfilename
+ \edef\@currname{caption-\caption@documentclass}
+ \edef\@currext{sto}
+ \InputIfFileExists
+ {\@currname.\@currext}%
+ {}%
+ {\@missingfileerror\@currname\@currext}%
+ \@popfilename
+\fi
+\captionsetup{style=default,position=default,listformat=default}
+\ProcessOptions*
\endinput
%%
%% End of file `caption3.sty'.
diff --git a/Master/texmf-dist/tex/latex/caption/ltcaption.sty b/Master/texmf-dist/tex/latex/caption/ltcaption.sty
index 2f0130a7f74..dcad4344f7a 100644
--- a/Master/texmf-dist/tex/latex/caption/ltcaption.sty
+++ b/Master/texmf-dist/tex/latex/caption/ltcaption.sty
@@ -25,11 +25,15 @@
%% This Current Maintainer of this work is Axel Sommerfeldt.
%%
%% This work consists of the files
-%% caption.ins, caption.dtx, caption2.dtx, caption3.dtx,
-%% bicaption.dtx, ltcaption.dtx, subcaption.dtx, totalcount.dtx,
+%% caption.ins, caption.dtx, caption-light.dtx, caption2.dtx, caption3.dtx,
+%% caption-ams-smf.dtx, caption-beamer.dtx, caption-elsarticle.dtx,
+%% caption-koma.dtx, caption-memoir.dtx, caption-ntg.dtx,
+%% caption-thesis.dtx, bicaption.dtx, ltcaption.dtx, subcaption.dtx,
%% the derived files
-%% caption.sty, caption2.sty, caption3.sty,
-%% bicaption.sty, ltcaption.sty, subcaption.sty, totalcount.sty,
+%% caption.sty, caption-light.sty, caption2.sty, caption3.sty,
+%% caption-ams-smf.sto, caption-beamer.sto, caption-elsarticle.sto,
+%% caption-koma.sto, caption-memoir.sto, caption-ntg.sto,
+%% caption-thesis.sto, bicaption.sty, ltcaption.sty, subcaption.sty,
%% and the user manuals
%% caption-deu.tex, caption-eng.tex, caption-rus.tex.
%%
diff --git a/Master/texmf-dist/tex/latex/caption/subcaption.sty b/Master/texmf-dist/tex/latex/caption/subcaption.sty
index 2571116ecf8..1ccc6590fee 100644
--- a/Master/texmf-dist/tex/latex/caption/subcaption.sty
+++ b/Master/texmf-dist/tex/latex/caption/subcaption.sty
@@ -25,47 +25,50 @@
%% This Current Maintainer of this work is Axel Sommerfeldt.
%%
%% This work consists of the files
-%% caption.ins, caption.dtx, caption2.dtx, caption3.dtx,
-%% bicaption.dtx, ltcaption.dtx, subcaption.dtx, totalcount.dtx,
+%% caption.ins, caption.dtx, caption-light.dtx, caption2.dtx, caption3.dtx,
+%% caption-ams-smf.dtx, caption-beamer.dtx, caption-elsarticle.dtx,
+%% caption-koma.dtx, caption-memoir.dtx, caption-ntg.dtx,
+%% caption-thesis.dtx, bicaption.dtx, ltcaption.dtx, subcaption.dtx,
%% the derived files
-%% caption.sty, caption2.sty, caption3.sty,
-%% bicaption.sty, ltcaption.sty, subcaption.sty, totalcount.sty,
+%% caption.sty, caption-light.sty, caption2.sty, caption3.sty,
+%% caption-ams-smf.sto, caption-beamer.sto, caption-elsarticle.sto,
+%% caption-koma.sto, caption-memoir.sto, caption-ntg.sto,
+%% caption-thesis.sto, bicaption.sty, ltcaption.sty, subcaption.sty,
%% and the user manuals
%% caption-deu.tex, caption-eng.tex, caption-rus.tex.
%%
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{subcaption}[2020/01/22 v1.3d Sub-captions (AR)]
-\RequirePackage{caption}[2020/01/03] % needs v3.4h or newer
-\newcommand\subcaption@CheckCompatibility{%
- \@ifundefined{caption@ifcompatibility}{}{%
- \caption@ifcompatibility{%
- \caption@Error{%
- The `subcaption' package does not work correctly\MessageBreak
- in compatibility mode}}{}}%
+\ProvidesPackage{subcaption}[2020/08/23 v1.3g Sub-captions (AR)]
+\RequirePackage{caption}[2020/08/23] % needs v3.5 or newer
+\newcommand*\subcaption@CheckCompatibility{%
+ \caption@ifcompatibility{%
+ \PackageError{subcaption}%
+ {This package does not work with\MessageBreak
+ caption option `compatibility=v1'}%
+ {\subcaption@eh}%
+ \endinput}{}%
\@ifpackageloaded{subfigure}{%
\PackageError{subcaption}%
{This package can't be used in cooperation\MessageBreak
with the subfigure package}%
- {\subcaption@EH}%
+ {\subcaption@eh}%
\endinput}{}%
\@ifpackageloaded{subfig}{%
\PackageError{subcaption}%
{This package can't be used in cooperation\MessageBreak
with the subfig package}%
- {\subcaption@EH}%
+ {\subcaption@eh}%
\endinput}{}%
}
-\newcommand*\subcaption@EH{%
+\newcommand*\subcaption@eh{%
If you do not understand this error, please take a closer look\MessageBreak
at the documentation of the `subcaption' package, especially the\MessageBreak
section about errors.\MessageBreak\@ehc}
\subcaption@CheckCompatibility
\caption@AtBeginDocument{%
\subcaption@CheckCompatibility
- \let\subcaption@CheckCompatibility\@undefined
- \let\subcaption@EH\@undefined
-}
-\caption@ForEachType{\DeclareCaptionSubType{#1}}
+ \let\subcaption@CheckCompatibility\@undefined}
+\ForEachCaptionType{\DeclareCaptionSubType{#1}}
\caption@ifundefined\newsubfloat{}{%
\renewcommand*\newsubfloat{\DeclareCaptionSubType}}
\def\subcaption{%
@@ -81,13 +84,13 @@
{\caption@Error{\noexpand\phantomsubcaption outside float}}}%
\g@addto@macro\caption@subtypehook{%
\let\phantomsubcaption\phantomcaption}
-\caption@For{subtypelist}{%
- \newenvironment{sub#1}%
+\ForEachCaptionSubType{%
+ \newenvironment{#1}%
{\@ifnextchar[%]
\subcaption@iminipage
{\subcaption@iminipage[c]}}%
{\subcaption@endminipage
- \endminipage}}%
+ \endminipage}}
\def\subcaption@iminipage[#1]{%
\caption@withoptargs{\subcaption@iiminipage{#1}}}
\newcommand*\subcaption@iiminipage[3]{%
@@ -136,13 +139,13 @@
\newcommand*\p@subref{}
\DeclareCaptionOption{subrefformat}{\subcaption@setrefformat{#1}}
\newcommand*\subcaption@setrefformat[1]{%
- \@ifundefined{caption@lfmt@#1}%
+ \@ifundefined{caption@labelformat@#1}%
{\caption@Error{Undefined label format `#1'}}%
- {\expandafter\let\expandafter\subcaption@reffmt\csname caption@lfmt@#1\endcsname}}
+ {\expandafter\let\expandafter\subcaption@reffmt\csname caption@labelformat@#1\endcsname}}
\subcaption@setrefformat{simple}
\caption@SetupOptions{subcaption}{\captionsetup[sub]{#2}}%
\caption@ExecuteOptions{subcaption}{%
- size=smaller,labelformat=parens,labelsep=space,skip=6pt,list=0,hypcap=0}
+ font+=smaller,labelformat=parens,labelsep=space,skip=6pt,list=0,hypcap=0}
\caption@ProcessOptions*{subcaption}
\def\subfloat{%
\@ifnextchar[\@subfloat\subfloat@}
@@ -151,7 +154,7 @@
\long\def\@@subfloat#1[#2]{%
\@@@subfloat{\subcaptionbox[{#1}]}{#2}}
\long\def\@@@subfloat#1#2#3{%
- \caption@getlabel#3\label{}\@nil
+ \caption@getlabel{#3}%
#1{#2\caption@thelabel}{\let\label\caption@gobble#3}%
\global\let\caption@thelabel\relax
\ignorespaces}
@@ -162,7 +165,7 @@
{\phantomcaption\@gobble}{\phantomcaption\@gobble}% no box with \caption
{}% no optional arguments for \caption
{}% no sub-caption
- [\wd\@tempboxa][\caption@hj@default]%
+ [\wd\@tempboxa][\captionbox@innerpos@default]%
{\unhbox\@tempboxa}%
\ignorespaces}
\endinput
diff --git a/Master/texmf-dist/tex/latex/caption/totalcount.sty b/Master/texmf-dist/tex/latex/caption/totalcount.sty
deleted file mode 100644
index a4bbd5786a5..00000000000
--- a/Master/texmf-dist/tex/latex/caption/totalcount.sty
+++ /dev/null
@@ -1,98 +0,0 @@
-%%
-%% This is file `totalcount.sty',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% totalcount.dtx (with options: `package')
-%%
-%% Copyright (C) 1994-2020 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
-%%
-%% https://gitlab.com/axelsommerfeldt/caption
-%%
-%% --------------------------------------------------------------------------
-%%
-%% This work may be distributed and/or modified under the
-%% conditions of the LaTeX Project Public License, either version 1.3
-%% of this license or (at your option) any later version.
-%% The latest version of this license is in
-%% http://www.latex-project.org/lppl.txt
-%% and version 1.3 or later is part of all distributions of LaTeX
-%% version 2003/12/01 or later.
-%%
-%% This work has the LPPL maintenance status "maintained".
-%%
-%% This Current Maintainer of this work is Axel Sommerfeldt.
-%%
-%% This work consists of the files
-%% caption.ins, caption.dtx, caption2.dtx, caption3.dtx,
-%% bicaption.dtx, ltcaption.dtx, subcaption.dtx, totalcount.dtx,
-%% the derived files
-%% caption.sty, caption2.sty, caption3.sty,
-%% bicaption.sty, ltcaption.sty, subcaption.sty, totalcount.sty,
-%% and the user manuals
-%% caption-deu.tex, caption-eng.tex, caption-rus.tex.
-%%
-\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{totalcount}[2018/01/21 v1.0a Total values of counters (AR)]
-\newcommand*\DeclareTotalCounter[1]{%
- \newcounter{totalcount@#1}%
- \@namedef{total#1s}{\nfss@text{\reset@font\bfseries ??}}%
- \@namedef{total#1es}{\@nameuse{total#1s}}%
- \expandafter\newif\csname iftotal#1s\endcsname
- \@namedef{iftotal#1es}{\@nameuse{iftotal#1s}}%
- \AtBeginDocument{\@ifundefined{c@#1}%
- {\PackageError{totalcount}{Undefined counter `#1'}\@ehc}%
- {\@cons\totalcount@counters{{#1}}}}}
-\@onlypreamble\DeclareTotalCounter
-\let\totalcount@counters\@empty
-\newcommand*\totalcount@xspace{}
-\DeclareOption{xspace}{\renewcommand*\totalcount@xspace{\xspace}}
-\DeclareOption*{\expandafter\DeclareTotalCounter\expandafter{\CurrentOption}}
-\ProcessOptions\relax
-\ifx\totalcount@xspace\@empty\else
- \RequirePackage{xspace}
-\fi
-\newcommand*\totalcount@addtocounter[1]{%
- \@ifundefined{c@totalcount@#1}{}{%
- \addtocounter{totalcount@#1}{\value{#1}}}}
-\let\totalcount@stpelt@ORI\@stpelt
-\renewcommand*\@stpelt[1]{%
- \totalcount@addtocounter{#1}%
- \totalcount@stpelt@ORI{#1}}
-\newcommand*\totalcount@set[2]{%
- \@ifundefined{c@totalcount@#1}%
- {}%
- {\global\@namedef{total#1s}{#2\totalcount@xspace}%
- \ifnum#2<1\relax \else
- \global\@nameuse{total#1strue}%
- \fi}}
-\AtBeginDocument{\AtEndDocument{%
- \begingroup
- \@tempswafalse
- \if@filesw
- \immediate\write\@mainaux{%
- \string\providecommand\string\totalcount@set[2]{}}%
- \fi
- \def\@elt#1{%
- \totalcount@addtocounter{#1}%
- \edef\totalcount@tempa{\the\value{totalcount@#1}}%
- \expandafter\let\expandafter\totalcount@tempb\csname total#1s\endcsname
- \@expandtwoargs\totalcount@set{#1}{\totalcount@tempa}%
- \expandafter\ifx\csname total#1s\endcsname\totalcount@tempb \else
- \@tempswatrue
- \fi
- \if@filesw
- \immediate\write\@mainaux{%
- \string\totalcount@set{#1}{\totalcount@tempa}}%
- \fi}%
- \totalcount@counters
- \if@tempswa
- \PackageWarningNoLine{totalcount}{%
- Total counter(s) have changed.\MessageBreak
- Rerun to get them right}%
- \fi
- \endgroup}}%
-\endinput
-%%
-%% End of file `totalcount.sty'.