summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/caption
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2007-12-25 09:56:00 +0000
committerNorbert Preining <preining@logic.at>2007-12-25 09:56:00 +0000
commit49de519af20c652c3b3cfe9ba1dd4df1de06bde8 (patch)
treee97133a8a2f4e7b1924d35a76d87837d23d918c9 /Master/texmf-dist/tex/latex/caption
parent9d2ebf24951017e4a930651f26e118128d9003a1 (diff)
caption update 07-12-25
git-svn-id: svn://tug.org/texlive/trunk@5898 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/caption')
-rw-r--r--Master/texmf-dist/tex/latex/caption/caption.sty281
-rw-r--r--Master/texmf-dist/tex/latex/caption/caption2.sty18
-rw-r--r--Master/texmf-dist/tex/latex/caption/caption3.sty325
-rw-r--r--Master/texmf-dist/tex/latex/caption/ltcaption.sty6
-rw-r--r--Master/texmf-dist/tex/latex/caption/subcaption.sty104
5 files changed, 523 insertions, 211 deletions
diff --git a/Master/texmf-dist/tex/latex/caption/caption.sty b/Master/texmf-dist/tex/latex/caption/caption.sty
index bcc8bc5ca2e..2ca6b650286 100644
--- a/Master/texmf-dist/tex/latex/caption/caption.sty
+++ b/Master/texmf-dist/tex/latex/caption/caption.sty
@@ -23,15 +23,15 @@
%% This Current Maintainer of this work is Axel Sommerfeldt.
%%
%% This work consists of the files caption.ins, caption.dtx, caption2.dtx,
-%% and ltcaption.dtx, the derived files caption.sty, caption2.sty,
-%% caption3.sty, and ltcaption.sty, and the user manuals caption-deu.tex,
-%% caption-eng.tex, and caption-rus.tex.
+%% ltcaption.dtx, and subcaption.dtx, the derived files caption.sty,
+%% caption2.sty, caption3.sty, ltcaption.sty, and subcaption.sty, and the
+%% user manuals caption-deu.tex, caption-eng.tex, and caption-rus.tex.
%%
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption}[2007/11/04 v3.1e Customising captions (AR)]
+\ProvidesPackage{caption}[2007/12/23 v3.1f Customizing captions (AR)]
\newcommand*\caption@Info[1]{\PackageInfo{caption}{#1\@gobble}}
\@onlypreamble\caption@Info
-\RequirePackage{caption3}[2007/11/04] % needs v3.1e or newer
+\RequirePackage{caption3}[2007/12/21] % needs v3.1f or newer
\@ifpackageloaded{caption2}{%
\caption@Error{%
You can't use both, the (obsolete) caption2 *and*\MessageBreak
@@ -54,7 +54,7 @@
\newcommand*\caption@IncompatiblePackage[2]{%
\PackageWarningNoLine{caption}{%
Usage of the #1 package together with the\MessageBreak
- caption package is strongly *not* recommended.\MessageBreak
+ caption package is strongly not recommended.\MessageBreak
Instead of loading the #1 package you should\MessageBreak
use the caption package option\MessageBreak
\space\space`tableposition=top'#2}}
@@ -62,7 +62,7 @@
\caption@ifbool{documentclass}{}{%
\PackageWarningNoLine{caption}{%
Unsupported document class (or package) detected,\MessageBreak
- usage of the caption package is *not* recommended}%
+ usage of the caption package is not recommended}%
\caption@Info{\string\@makecaption\space=\space\meaning\@makecaption}%
}
\@ifundefined{@captionheadfont}{}{%
@@ -149,10 +149,6 @@
\caption@setcapmargin
\fi
}
-\DeclareCaptionOption*{config}[caption]{%
- \InputIfFileExists{#1.cfg}%
- {\typeout{*** Local configuration file #1.cfg used ***}}%
- {\caption@Warning{Configuration file #1.cfg not found}}}
\DeclareCaptionOption{figureposition}{%
\captionsetup*[figure]{position=#1}}
\@onlypreamble@key{caption}{figureposition}
@@ -169,9 +165,8 @@
\captionsetup*[table]{position=#1}}
\@onlypreamble@key{caption}{tableposition}
\DeclareCaptionOption{figurename}{\caption@SetFloatName{figure}{#1}}
-\@onlypreamble@key{caption}{figurename}
\DeclareCaptionOption{tablename}{\caption@SetFloatName{table}{#1}}
-\@onlypreamble@key{caption}{tablename}
+\DeclareCaptionOption{name}{\caption@setfloatname\@captype{#1}}
\newcommand*\caption@SetFloatName[2]{%
\begingroup
\def\@tempa{\endgroup\@firstofone}%
@@ -179,8 +174,28 @@
\@ifundefined{captions\languagename}{}{%
\def\@tempa{\endgroup
\expandafter\addto\csname captions\languagename\endcsname}}}%
- \@tempa{\@namedef{#1name}{#2}}}
-\@onlypreamble\caption@SetFloatName
+ \@tempa{\caption@setfloatname{#1}{#2}}}
+\newcommand*\caption@setfloatname[2]{\@namedef{#1name}{#2}}
+\caption@AtBeginDocument{\let\caption@SetFloatName\caption@setfloatname}
+\DeclareCaptionOption{figurewithin}{\caption@Within{figure}{#1}}
+\@onlypreamble@key{caption}{figurewithin}
+\DeclareCaptionOption{figurewithout}{\caption@Within{figure}{none}}
+\@onlypreamble@key{caption}{figurewithout}
+\DeclareCaptionOption{tablewithin}{\caption@Within{table}{#1}}
+\@onlypreamble@key{caption}{tablewithin}
+\DeclareCaptionOption{tablewithout}{\caption@Within{table}{none}}
+\@onlypreamble@key{caption}{tablewithout}
+\newcommand*\caption@Within[1]{\def\caption@type{#1}\KV@caption@DCT@within}
+\@onlypreamble\caption@Within
+\DeclareCaptionOption*{config}[caption]{%
+ \InputIfFileExists{#1.cfg}%
+ {\typeout{*** Local configuration file #1.cfg used ***}}%
+ {\caption@Warning{Configuration file #1.cfg not found}}}
+\DeclareCaptionOption{@minipage}{%
+ \caption@ifinlist{#1}{auto,default}%
+ {\let\caption@if@minipage\@gobbletwo}%
+ {\caption@set@bool\caption@if@minipage{#1}}}
+\captionsetup{@minipage=default}
\DeclareCaptionOption{compatibility}[1]{\caption@setbool{compatibility}{#1}}
\@onlypreamble@key{caption}{compatibility}
\DeclareCaptionOptionNoValue*{normal}{%
@@ -249,35 +264,49 @@
\captionsetup{hypcap=1,hypcapspace=.5\baselineskip}
\caption@ProcessOptions*{caption}
\caption@AtBeginDocument{%
- \DeclareCaptionOption{type}{\caption@settype{#1}}
- \DeclareCaptionOption{type*}{\caption@settype*{#1}}}
+ \DeclareCaptionOption{type}{\caption@settype{#1}}%
+ \DeclareCaptionOption{type*}{\caption@settype*{#1}}%
+ \DeclareCaptionOption{subtype}[sub\@captype]{\caption@setsubtype{#1}}%
+ \DeclareCaptionOption{subtype*}[sub\@captype]{\caption@setsubtype*{#1}}%
+}
\newcommand*\caption@settype{%
\caption@@settype{}}
+\newcommand*\caption@setsubtype{%
+ \caption@iftype
+ {\caption@@settype{sub}}%
+ {\caption@Error{Option `subtype=' outside float}}}%
\newcommand*\caption@@settype[1]{%
\caption@teststar{\caption@@@settype{#1}}\@firstoftwo\@secondoftwo}
\newcommand*\caption@@@settype[3]{%
- \caption@Debug{type=#3}%
- \caption@checkgrouplevel{#1}{%
- \captionsetup{#1type#2*\@empty=...}#2{ or \@backslashchar#1captionof}{}}%
- \@ifundefined{@#1captype}{}{%
- \edef\@tempa{#3}%
- \expandafter\ifx\csname @#1captype\endcsname\@tempa \else
- \caption@iftypewarning{\caption@Warning{%
- Caption type was already set to `#3'\MessageBreak}}{}%
- \fi}%
- \expandafter\edef\csname @#1captype\endcsname{#3}%
- \let\caption@iftypewarning\caption@ifdebug
- \@nameuse{#1caption@settypehook}%
- \expandafter\caption@setoptions\csname @#1captype\endcsname
- \let\caption@ifrefstepcounter\@secondoftwo
- #2{}{%
- \let\@currentlabel\caption@undefinedlabel
- \ifx\caption@ORI@label\@undefined
- \let\caption@ORI@label\label
- \def\label{\caption@withoptargs\caption@xlabel}%
- \fi
- \caption@start}}
-\newcommand*\caption@settypehook{}
+ \@ifundefined{c@#3}%
+ {\caption@Error{No float type '#3' defined}}%
+ {\caption@Debug{#1type=#3}%
+ \caption@checkgrouplevel{#1}{%
+ \captionsetup{#1type#2*\@empty=...}#2{ or
+ \@backslashchar#1captionof}{}}%
+ \edef\@tempa{#3}%
+ \expandafter\ifx\csname @#1captype\endcsname\@tempa \else
+ \@nameuse{caption@#1type@warning}%
+ \fi
+ \expandafter\let\csname @#1captype\endcsname\@tempa
+ \@nameuse{caption@#1typehook}%
+ \caption@setoptions{#3}%
+ \ifx\caption@opt\relax
+ \@nameundef{caption@#1type@warning}%
+ \else
+ \@namedef{caption@#1type@warning}{\caption@Warning{%
+ The #1caption type was already set to
+ `\csname @#1captype\endcsname'\MessageBreak}}%
+ \fi
+ \let\caption@ifrefstepcounter\@secondoftwo
+ #2{}{%
+ \let\@currentlabel\caption@undefinedlabel
+ \ifx\caption@ORI@label\@undefined
+ \let\caption@ORI@label\label
+ \let\label\caption@xlabel
+ \fi
+ \caption@start}}}
+\newcommand*\caption@typehook{}
\newcommand*\caption@iftype{%
\@ifundefined{@captype}{\let\@captype\@undefined\@secondoftwo}\@firstoftwo}
\begingroup\expandafter\expandafter\expandafter\endgroup
@@ -293,16 +322,17 @@
\expandafter\edef\csname #1caption@grouplevel\endcsname{%
\the\currentgrouplevel}%
\else
- \caption@Error{\string#2\MessageBreak outside box or environment}%
+ \caption@Warning{\string#2\MessageBreak outside box or environment}%
\fi
}{}}
\fi
\newcommand*\caption@undefinedlabel{??}
-\newcommand*\caption@xlabel[2]{%
+\newcommand*\caption@xlabel{%
\ifx\@currentlabel\caption@undefinedlabel
\caption@Warning{\noexpand\label before \noexpand\caption ignored}%
+ \expandafter\@gobble
\else
- \caption@ORI@label#1{#2}%
+ \expandafter\caption@ORI@label
\fi}
\caption@AtBeginDocument{%
\def\captionof{\caption@teststar\caption@of{\caption*}\caption}}
@@ -310,9 +340,11 @@
\newcommand*\captionlistentry{%
\@testopt\caption@listentry\@captype}
\def\caption@listentry[#1]#2{%
- \caption@refstepcounter{#1}%
- \caption@makecurrent{#1}{#2}%
- \caption@addcontentsline{#1}{#2}}
+ \@bsphack
+ \caption@refstepcounter{#1}%
+ \caption@makecurrent{#1}{#2}%
+ \caption@addcontentsline{#1}{#2}%
+ \@esphack}
\def\ContinuedFloat{%
\@ifnextchar[\@ContinuedFloat{%
\caption@iftype
@@ -341,7 +373,9 @@
\let\caption@ifrefstepcounter\@firstoftwo}
\newcommand*\caption@@refstepcounter{\refstepcounter}
\let\caption@ifrefstepcounter\@secondoftwo
-\newcommand\caption@dblarg[1]{\kernel@ifnextchar[{#1}{\caption@xdblarg{#1}}}%
+\@ifundefined{kernel@ifnextchar}%
+ {\newcommand\caption@dblarg[1]{\@ifnextchar[{#1}{\caption@xdblarg{#1}}}}%
+ {\newcommand\caption@dblarg[1]{\kernel@ifnextchar[{#1}{\caption@xdblarg{#1}}}}%
\newcommand\caption@xdblarg[2]{#1[{#2\relax}]{#2}}%
\newcommand*\caption@begin[1]{%
\begingroup
@@ -359,14 +393,6 @@
\@ifundefined{fnum@#1}{\iftrue}{\ifx\caption@lfmt\caption@lfmt@default\else}%
\@namedef{fnum@#1}{\caption@fnum{#1}}%
\fi}
-\caption@AtBeginDocument*{%
- \@ifundefined{sf@ifpositiontop}{}{%
- \let\caption@kernel@addcontentsline\caption@addcontentsline
- \renewcommand*\caption@addcontentsline[2]{%
- \sf@ifpositiontop{\@listsubcaptions{#1}}{}%
- \caption@kernel@addcontentsline{#1}{#2}%
- \sf@ifpositiontop{}{\@listsubcaptions{#1}}}%
- }}
\newcommand*\caption@boxrestore{%
\let\if@nobreak\iffalse
\let\if@noskipsec\iffalse
@@ -589,16 +615,13 @@
\caption@setbool{incompatible}{1}}%
\@ifundefined{caption@ifcompatibility}%
{\let\caption@ifcompatibility\caption@ifincompatible
- \let\@tempa\@firstofone}%
+ \let\@tempa\caption@WarningNoLine}%
{\let\@tempa\@gobble}% suppress warning
\caption@ifcompatibility{%
\@tempa{%
- \caption@WarningNoLine{%
- \noexpand\caption will not be redefined since it's already\MessageBreak
- redefined by a document class or package which is\MessageBreak
- unknown to the caption package.\MessageBreak
- As a result some features will not work as expected}%
- }%
+ \noexpand\caption will not be redefined since it's already\MessageBreak
+ redefined by a document class or package which is\MessageBreak
+ unknown to the caption package}%
\renewcommand*\caption@ContinuedFloat[1]{%
\caption@Error{Not available in compatibility mode}}%
\caption@AtBeginDocument*{%
@@ -618,8 +641,7 @@
\caption@WarningNoLine{%
Forced redefinition of \noexpand\caption since the\MessageBreak
unsupported(!) package option `compatibility=false'\MessageBreak
- was given. Please fasten your seat belts, as we may\MessageBreak
- experience turbulence}%
+ was given}%
}{}%
\def\caption{%
\caption@iftype
@@ -639,12 +661,16 @@
\caption@beginex{#1}{#2}{#3}%
\caption@setfloatcapt{%
\caption@boxrestore
+ \if@minipage
+ \@setminipage
+ \fi
\caption@normalsize
\ifcaption@star
\let\caption@@anchor\@firstofone
\fi
\@makecaption{\csname fnum@#1\endcsname}%
- {\ignorespaces\caption@@anchor{#3}}\par}%
+ {\ignorespaces\caption@@anchor{#3}}\par
+ \caption@if@minipage\@minipagetrue\@minipagefalse}%
\caption@end}%
}%
\caption@AtBeginDocument*{%
@@ -659,12 +685,95 @@
\caption@iftop{\vskip\belowcaptionskip}{\vskip\abovecaptionskip}%
\caption@@make{#1}{#2}%
\caption@iftop{\vskip\abovecaptionskip}{\vskip\belowcaptionskip}}
+\def\caption@DeclareSubType sub#1\@nil{%
+ \caption@Debug{Initializing subtype for `#1'\@gobble}%
+ \@namedef{subcaption@value#1}{0}%
+ \@namedef{caption@beginsub#1}{\caption@beginsubfloat{#1}}}
+\@onlypreamble\caption@DeclareSubType
+\caption@For*{subtypelist}{\caption@DeclareSubType sub#1\@nil}
+\caption@AtBeginDocument*{%
+ \@ifundefined{sf@counterlist}{}{%
+ \@for\sf@temp:=\sf@counterlist\do{%
+ \expandafter\caption@DeclareSubType\sf@temp\@nil}}}
+\newcommand*\caption@subtypehook{%
+ \ifx\caption\caption@subcaption \else
+ \caption@ifrefstepcounter{}{%
+ % no \caption or \subcaption in this (floating) environment yet
+ \caption@Debug{Increment \@captype\ counter =\the\value\@captype}%
+ \caption@l@stepcounter\@captype
+ \let\addcontentsline\subcaption@addcontentsline}%
+ \ifnum\csname subcaption@value\@captype\endcsname=\value\@captype \else
+ \caption@Debug{Reset sub\@captype\ counter}%
+ \expandafter\xdef\csname subcaption@value\@captype\endcsname{%
+ \the\value\@captype}%
+ \@stpelt\@subcaptype
+ \fi
+ \c@ContinuedFloat=0\relax
+ \let\caption@resetContinuedFloat\@gobble
+ \let\caption@addcontentsline\caption@kernel@addcontentsline
+ \let\caption@setfloatcapt\@firstofone
+ \caption@clearmargin
+ \caption@setoptions{sub}%
+ \caption@setoptions{subfloat}% for subfig-package compatibility
+ \let\caption\caption@subcaption
+ \fi}%
+\newcommand*\caption@subcaption{%
+ \caption@iftype
+ {\caption@checkgrouplevel{sub}\subcaption
+ \caption@star
+ {\caption@refstepcounter\@subcaptype}%
+ {\caption@dblarg{\@caption\@subcaptype}}}%
+ {\caption@Error{\noexpand\subcaption outside float}}}
+\let\caption@kernel@addcontentsline\caption@addcontentsline
+\renewcommand*\caption@addcontentsline[2]{%
+ \sf@ifpositiontop{\@listsubcaptions{#1}}{}%
+ \caption@kernel@addcontentsline{#1}{#2}%
+ \sf@ifpositiontop{}{\@listsubcaptions{#1}}%
+ \caption@addsubcontentslines{#1}}
+\newcommand*\caption@addsubcontentslines[1]{%
+ \begingroup
+ \subcaption@addcontentslines
+ \endgroup
+ \subcaption@clearcontentslines}%
+\caption@AtBeginDocument*{%
+ \@ifundefined{sf@ifpositiontop}{\let\sf@ifpositiontop\@gobbletwo}{}%
+ \subcaption@clearcontentslines
+ \g@addto@macro\caption@typehook{\subcaption@checkcontentslines}%
+ \AtEndDocument{\subcaption@checkcontentslines}}%
+\newcommand*\subcaption@addcontentsline[3]{%
+ \protected@edef\@tempa{%
+ \noexpand\g@addto@macro\noexpand\subcaption@addcontentslines{%
+ \noexpand\@namedef{the#2}{\csname the#2\endcsname}%
+ \ifx\@currentHref\@undefined \else
+ \noexpand\def\noexpand\@currentHref{\@currentHref}%
+ \fi
+ \protect\addcontentsline{#1}{#2}{#3}}}%
+ \@tempa}
+\newcommand*\subcaption@checkcontentslines{%
+ \ifx\subcaption@addcontentslines\@empty \else
+ \subcaption@Error{%
+ Something's wrong--perhaps a missing \protect\caption\MessageBreak
+ in the last figure or table}%
+ \subcaption@clearcontentslines
+ \fi}
+\newcommand*\subcaption@clearcontentslines{%
+ \global\let\subcaption@addcontentslines\@empty}
\@ifundefined{smf@makecaption}{}{\let\smf@makecaption\@makecaption}
\@ifclassloaded{beamer}{%
\caption@Info{beamer document class}%
- \captionsetup{listof=false}
- \undefine@key{caption}{listof}
- \undefine@key{caption}{listofformat}
+ \captionsetup{list=false}
+ \DeclareCaptionOption{list}{}
+ \DeclareCaptionOption{listof}{}
+ \expandafter\let\expandafter\caption@ORI@figure
+ \csname\string\figure\endcsname
+ \@namedef{\string\figure}[#1]{%
+ \caption@ORI@figure[#1]%
+ \caption@settype{figure}}
+ \expandafter\let\expandafter\caption@ORI@table
+ \csname\string\table\endcsname
+ \@namedef{\string\table}[#1]{%
+ \caption@ORI@table[#1]%
+ \caption@settype{table}}
}{}
\@ifundefined{scr@caption}{}{%
\caption@AtBeginDocument{\let\scr@caption\caption}}
@@ -761,10 +870,12 @@
\let\caption@@refstepcounter\caption@l@stepcounter
\caption@ORI}%
\long\def\@caption##1[##2]##3{%
- \gdef\caption@SClentry{##2}\gdef\caption@SCtext{##3}%
- \ignorespaces}%
+ \@bsphack
+ \gdef\caption@SClentry{##2}%
+ \gdef\caption@SCtext{##3}%
+ \@esphack}%
#1{% is \@gobble in star form, and \@firstofone otherwise
- \def\label##1{\gdef\caption@SClabel{##1}\ignorespaces}}%
+ \def\label##1{\@bsphack\gdef\caption@SClabel{##1}\@esphack}}%
}%
\newcommand*\caption@defrost{%
\ifx\caption@ORI@ContinuedFloat\@undefined
@@ -805,7 +916,7 @@
}{}%
\caption@freezeHref % will be defrosted in \float@makebox
\caption@ORI@float@setevery{#1}}%
- \g@addto@macro\caption@settypehook{%
+ \g@addto@macro\caption@typehook{%
\expandafter\ifx\csname #1name\endcsname\relax
\expandafter\let\csname #1name\expandafter\endcsname
\csname fname@#1\endcsname
@@ -875,7 +986,7 @@
\begin{lrbox}{\FP@floatCorpusBOX}%
\caption@ifFPrefcap
{\caption@freeze\relax}%
- {\def\label##1{\gdef\FP@LabelText{##1}\ignorespaces}%
+ {\def\label##1{\@bsphack\gdef\FP@LabelText{##1}\@esphack}%
\caption@freeze*}}%
\renewcommand*\FP@floatEnd{%
\end{lrbox}%
@@ -919,7 +1030,7 @@
\caption@defrost
\end\@captype}%
}%
- \ForFloatingEnvironments{%
+ \caption@For{typelist}{%
\newenvironment{FP#1}{\FP@floatBegin{#1}}{\FP@floatEnd}}%
}{%
\let\caption@ifFPlistcap\@undefined
@@ -1130,11 +1241,7 @@
\long\def\caption[##1]##2{%
\caption@freezeHref % will be defrosted in \ivparpic
\caption@settype\@piccaptype
- \ifnum\c@piccaptionpos>2\relax
\caption@clearmargin
- \else
- \captionwidth\z@ % do not use "width=" setting
- \fi
\caption@setoptions{parpic}%
\let\caption@boxrestore\@parboxrestore
\caption@setautoposition b%
@@ -1167,14 +1274,14 @@
\caption@slc{#1}{#2}{.8\vsize}{%
\let\caption@makerot\caption@@make
\caption@clearmargin
- \let\captionbox\@secondoftwo}%
+ \let\caption@parbox\@secondoftwo}%
\caption@set@bool\caption@ifslc0% been there, done that
\fi
\rotatebox{90}{\caption@makerot{#1}{#2}}%
\nobreak\hspace{12pt}}%
\newcommand\caption@makerot[2]{%
\begin{minipage}\captionwidth\caption@@make{#1}{#2}\end{minipage}}%
- \ForFloatingEnvironments{%
+ \caption@For{typelist}{%
\newenvironment{sideways#1}{\@rotfloat{#1}}{\end@rotfloat}%
\newenvironment{sideways#1*}{\@rotdblfloat{#1}}{\end@rotdblfloat}}%
}{}
@@ -1208,11 +1315,15 @@
\def\SC@orig@caption[##1]##2{\caption@defrost}%
\caption@setSC@justify % for compatibility mode
\caption@ORI@endSC@FLOAT}%
- \ForFloatingEnvironments{%
- \newenvironment{SC#1}%
- {\SC@float[\@nameuse{SC@#1@vpos}]{#1}}{\endSC@float}%
- \newenvironment{SC#1*}%
- {\SC@dblfloat[\@nameuse{SC@#1@vpos}]{#1}}{\endSC@dblfloat}}%
+ \newcommand*\caption@For@SC[2]{%
+ \def#1{b}% = \sidecaptionvpos{#2}{b} (v1.6)
+ \newenvironment{SC#2}%
+ {\SC@float[#1]{#2}}{\endSC@float}%
+ \newenvironment{SC#2*}%
+ {\SC@dblfloat[#1]{#2}}{\endSC@dblfloat}}%
+ \@onlypreamble\caption@For@SC
+ \caption@For{typelist}{%
+ \expandafter\caption@For@SC\csname SC@#1@vpos\endcsname{#1}}%
}{}
\caption@IfPackageLoaded{subfigure}[2002/01/23 v2.1]{%
\def\sf@ifpositiontop{%
@@ -1318,7 +1429,7 @@
\@nameuse{caption@ORI@wrap#1}}%
\caption@restylewrapfloat{figure}%
\caption@restylewrapfloat{table}%
- \ForFloatingEnvironments{%
+ \caption@For{typelist}{%
\newenvironment{wrap#1}{\wrapfloat{#1}}{\endwrapfloat}%
\caption@restylewrapfloat{#1}}%
\ifx\WF@floatstyhook\@undefined \else % wrapfig v3.6
diff --git a/Master/texmf-dist/tex/latex/caption/caption2.sty b/Master/texmf-dist/tex/latex/caption/caption2.sty
index c23bfbcec24..d1d982f9522 100644
--- a/Master/texmf-dist/tex/latex/caption/caption2.sty
+++ b/Master/texmf-dist/tex/latex/caption/caption2.sty
@@ -23,22 +23,22 @@
%% This Current Maintainer of this work is Axel Sommerfeldt.
%%
%% This work consists of the files caption.ins, caption.dtx, caption2.dtx,
-%% and ltcaption.dtx, the derived files caption.sty, caption2.sty,
-%% caption3.sty, and ltcaption.sty, and the user manuals caption-deu.tex,
-%% caption-eng.tex, and caption-rus.tex.
+%% ltcaption.dtx, and subcaption.dtx, the derived files caption.sty,
+%% caption2.sty, caption3.sty, ltcaption.sty, and subcaption.sty, and the
+%% user manuals caption-deu.tex, caption-eng.tex, and caption-rus.tex.
%%
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
\ProvidesPackage{caption2}[2007/08/12 v2.2b Customising captions (AS)]
\PackageWarning{caption2}{%
****************************************************\MessageBreak
THIS PACKAGE IS OBSOLETE:\MessageBreak
- This package attempts to provide an caption 2.0/2.1\MessageBreak
- author environment so that OLD documents can be\MessageBreak
- successfully processed.\MessageBreak
- It should NOT be used for NEW documents! New\MessageBreak
- documents should use the caption package instead.\MessageBreak
+ This package attempts to provide an `caption2'\MessageBreak
+ package v2.0/2.1 author environment so that OLD\MessageBreak
+ documents can be successfully processed. It should\MessageBreak
+ NOT be used for NEW documents! New documents should\MessageBreak
+ use the regular `caption' package v3.x instead.\MessageBreak
****************************************************\@gobbletwo}%
-\RequirePackage{caption3}[2007/08/12] % needs v3.1 or newer
+\RequirePackage{caption3}[2007/09/01] % needs v3.1 or newer
\@ifpackageloaded{caption}{%
\PackageError{caption2}{%
You can't use both, the (current) caption *and*\MessageBreak
diff --git a/Master/texmf-dist/tex/latex/caption/caption3.sty b/Master/texmf-dist/tex/latex/caption/caption3.sty
index 0459e0cd472..02bd5e3f470 100644
--- a/Master/texmf-dist/tex/latex/caption/caption3.sty
+++ b/Master/texmf-dist/tex/latex/caption/caption3.sty
@@ -23,12 +23,12 @@
%% This Current Maintainer of this work is Axel Sommerfeldt.
%%
%% This work consists of the files caption.ins, caption.dtx, caption2.dtx,
-%% and ltcaption.dtx, the derived files caption.sty, caption2.sty,
-%% caption3.sty, and ltcaption.sty, and the user manuals caption-deu.tex,
-%% caption-eng.tex, and caption-rus.tex.
+%% ltcaption.dtx, and subcaption.dtx, the derived files caption.sty,
+%% caption2.sty, caption3.sty, ltcaption.sty, and subcaption.sty, and the
+%% user manuals caption-deu.tex, caption-eng.tex, and caption-rus.tex.
%%
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption3}[2007/11/04 v3.1e caption3 kernel (AR)]
+\ProvidesPackage{caption3}[2007/12/21 v3.1f caption3 kernel (AR)]
\providecommand*\@nameundef[1]{%
\expandafter\let\csname #1\endcsname\@undefined}
\providecommand\l@addto@macro[2]{%
@@ -211,23 +211,27 @@
\newcommand*\@captionsetup[1]{%
\@ifnextchar[{\caption@setup@options#1}\caption@setup}
\newcommand*\caption@setup{\caption@setkeys{caption}}
-\def\caption@setup@options#1[#2]{%
- % #1 is \@gobble in star form, and \@firstofone otherwise
- #1{\caption@addtooptlist{#2}}%
- \expandafter\caption@l@addto@list\csname caption@opt@#2\endcsname}
+\def\caption@setup@options#1[#2]#3{%
+ \@bsphack
+ % #1 is \@gobble in star form, and \@firstofone otherwise
+ #1{\caption@addtooptlist{#2}}%
+ \expandafter\caption@l@addto@list\csname caption@opt@#2\endcsname{#3}%
+ \@esphack}
\newcommand*\clearcaptionsetup{%
\caption@teststar@\@clearcaptionsetup\@gobble\@firstofone}
\newcommand*\@clearcaptionsetup[1]{%
\let\caption@tempa#1%
\@testopt\@@clearcaptionsetup{}}
\def\@@clearcaptionsetup[#1]#2{%
- \expandafter\caption@ifempty@list\csname caption@opt@#2\endcsname
- {\caption@tempa{\caption@Warning{Option list `#2' undefined}}}%
- {\ifx,#1,%
- \caption@clearsetup{#2}%
- \else
- \caption@@removefromsetup{#1}{#2}%
- \fi}}
+ \@bsphack
+ \expandafter\caption@ifempty@list\csname caption@opt@#2\endcsname
+ {\caption@tempa{\caption@Warning{Option list `#2' undefined}}}%
+ {\ifx,#1,%
+ \caption@clearsetup{#2}%
+ \else
+ \caption@@removefromsetup{#1}{#2}%
+ \fi}%
+ \@esphack}
\newcommand*\caption@clearsetup[1]{%
\caption@removefromoptlist{#1}%
\@nameundef{caption@opt@#1}}
@@ -253,23 +257,25 @@
\caption@tempa{\caption@Warning{%
Option `#1' was not in list `#2'\MessageBreak}}}
\newcommand*\showcaptionsetup[2][\@firstofone]{%
- \GenericWarning{}{%
- #1 Caption Info: Option list on `#2'\MessageBreak
- #1 Caption Data: \@ifundefined{caption@opt@#2}{%
- -none-%
- }{%
- {\expandafter\expandafter\expandafter\strip@prefix
- \expandafter\meaning\csname caption@opt@#2\endcsname}%
- }}}
+ \@bsphack
+ \GenericWarning{}{%
+ #1 Caption Info: Option list on `#2'\MessageBreak
+ #1 Caption Data: \@ifundefined{caption@opt@#2}{%
+ -none-%
+ }{%
+ {\expandafter\expandafter\expandafter\strip@prefix
+ \expandafter\meaning\csname caption@opt@#2\endcsname}%
+ }}%
+ \@esphack}
\DeclareCaptionOption{options}{\caption@setoptions{#1}}
\newcommand*\caption@setoptions[1]{%
\caption@Debug{options=#1}%
- \expandafter\let\expandafter\@tempa\csname caption@opt@#1\endcsname
- \ifx\@tempa\relax \else
- \let\caption@iftypewarning\@firstoftwo % = true
- \expandafter\caption@setup\expandafter{\@tempa}%
+ \expandafter\let\expandafter\caption@opt\csname caption@opt@#1\endcsname
+ \ifx\caption@opt\relax \else
+ \caption@xsetup\caption@opt
\caption@clearsetup{#1}%
\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}%
@@ -290,18 +296,18 @@
on input line \csname caption@opt@#1@lineno\endcsname}}}
\newcommand*\caption@setkeys{\@dblarg\caption@@setkeys}
\long\def\caption@@setkeys[#1]#2#3{%
+ \@bsphack
\expandafter\let\csname ORI@KV@err\caption@keydepth\endcsname\KV@err
\expandafter\let\csname ORI@KV@errx\caption@keydepth\endcsname\KV@errx
- \@ifundefined{#1@KV@err}%
- {\let\KV@err\ORI@KV@err\let\KV@errx\ORI@KV@errx}%
- {\expandafter\let\expandafter\KV@err\csname #1@KV@err\endcsname
- \let\KV@errx\KV@err}%
+ \expandafter\let\expandafter\KV@err\csname #1@KV@err\endcsname
+ \let\KV@errx\KV@err
\edef\caption@keydepth{\caption@keydepth i}%
\caption@Debug{\protect\setkeys{#2}{#3}}%
\setkeys{#2}{#3}%
\edef\caption@keydepth{\expandafter\@cdr\caption@keydepth\@nil}%
\expandafter\let\expandafter\KV@err\csname ORI@KV@err\caption@keydepth\endcsname
- \expandafter\let\expandafter\KV@errx\csname ORI@KV@errx\caption@keydepth\endcsname}
+ \expandafter\let\expandafter\KV@errx\csname ORI@KV@errx\caption@keydepth\endcsname
+ \@esphack}
\let\caption@keydepth\@empty
\newcommand*\caption@ExecuteOptions[2]{%
\@expandtwoargs\caption@setkeys{#1}{#2}}%
@@ -337,6 +343,7 @@
\DeclareCaptionOption{margin*}{\setcaptionmargin*{#1}}
\DeclareCaptionOption{width}{\setcaptionwidth{#1}}
\DeclareCaptionOption{twoside}[1]{\caption@set@bool\caption@iftwoside{#1}}
+\DeclareCaptionOptionNoValue{oneside}{\caption@set@bool\caption@iftwoside0}
\DeclareCaptionOption{minmargin}{\caption@setoptcmd\caption@minmargin{#1}}
\DeclareCaptionOption{maxmargin}{\caption@setoptcmd\caption@maxmargin{#1}}
\newcommand*\setcaptionmargin{%
@@ -360,8 +367,13 @@
\newcommand*\caption@newlabel{\@newl@bel{caption@r}}
\newcommand*\caption@thepage{\the\c@page}
\newcommand*\caption@label[1]{%
+ \caption@@label
\protected@write\@auxout{\let\caption@thepage\relax}%
{\string\caption@newlabel{#1}{\caption@thepage}}}
+\newcommand*\caption@@label{%
+ \global\let\caption@@label\relax
+ \protected@write\@auxout{}%
+ {\string\providecommand*\string\caption@newlabel[2]{}}}
\newcommand*\caption@pageref[1]{%
\expandafter\ifx\csname caption@r@#1\endcsname\relax
\G@refundefinedtrue % => 'There are undefined references.'
@@ -427,13 +439,12 @@
{#1{\caption@Error{Undefined style `#2'}}}%
{\expandafter\let\expandafter\caption@sty\csname caption@sty@#2\endcsname
\ifx\caption@setstyle@flag\@undefined
- \let\caption@setstyle@flag\caption@setstyle
- \let\caption@iftypewarning\@firstoftwo % = true
+ \let\caption@setstyle@flag\relax
\caption@resetstyle
- \expandafter\caption@setup\expandafter{\caption@sty}%
+ \caption@xsetup\caption@sty
\let\caption@setstyle@flag\@undefined
\else
- \expandafter\caption@setup\expandafter{\caption@sty}%
+ \caption@xsetup\caption@sty
\fi
\expandafter\let\expandafter\caption@sls\csname caption@sls@#2\endcsname
\expandafter\caption@l@addto@list\expandafter\caption@opt@singleline
@@ -441,7 +452,7 @@
\newcommand*\caption@resetstyle{%
\caption@setup{%
format=plain,labelformat=default,labelsep=colon,textformat=simple,%
- justification=justified,font=,labelfont=,textfont=,%
+ justification=justified,font=,size=,labelfont=,textfont=,%
margin=0pt,minmargin=0,maxmargin=0,%
indent=0pt,parindent=0pt,hangindent=0pt,%
singlelinecheck=1,strut=1}%
@@ -491,6 +502,7 @@
\DeclareCaptionLabelFormat{empty}{}
\DeclareCaptionLabelFormat{simple}{\bothIfFirst{#1}{\nobreakspace}#2}
\DeclareCaptionLabelFormat{parens}{\bothIfFirst{#1}{\nobreakspace}(#2)}
+\DeclareCaptionLabelFormat{brace}{\bothIfFirst{#1}{\nobreakspace}#2)}
\def\caption@lfmt@default{\caption@lfmt@simple}
\newcommand\DeclareCaptionLabelSeparator{%
\caption@teststar\caption@declarelabelseparator\@gobble\@firstofone}
@@ -541,14 +553,20 @@
\global\@namedef{caption#1@default}{#2}}
\@onlypreamble\DeclareDefaultCaptionFont
\DeclareCaptionOption{font}{\caption@setfont{font}{#1}}
+\DeclareCaptionOption{font+}{\caption@addtofont{font}{#1}}
\DeclareDefaultCaptionFont{font}{}
\DeclareCaptionOption{labelfont}{\caption@setfont{labelfont}{#1}}
+\DeclareCaptionOption{labelfont+}{\caption@addtofont{labelfont}{#1}}
\DeclareDefaultCaptionFont{labelfont}{}
\DeclareCaptionOption{textfont}{\caption@setfont{textfont}{#1}}
+\DeclareCaptionOption{textfont+}{\caption@addtofont{textfont}{#1}}
\DeclareDefaultCaptionFont{textfont}{}
-\newcommand*\caption@setfont[2]{%
+\newcommand*\caption@setfont[1]{%
+ \expandafter\let\csname caption#1\endcsname\@empty
+ \caption@addtofont{#1}}
+\newcommand*\caption@addtofont[2]{%
\begingroup
- \let\caption@fnt\@empty
+ \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}%
@@ -592,7 +610,6 @@
\KV@caption@fnt@normalfont\@unused
\KV@caption@fnt@normalsize\@unused
\KV@caption@fnt@singlespacing\@unused}}
-\providecommand\captionsize{}
\DeclareCaptionOption{size}{\caption@setfont{size}{#1}}
\DeclareDefaultCaptionFont{size}{}
\newcommand*\DeclareCaptionJustification[2]{%
@@ -711,25 +728,25 @@
\newcommand*\caption@endhook{}
\newcommand*\AtBeginCaption{\l@addto@macro\caption@beginhook}
\newcommand*\AtEndCaption{\l@addto@macro\caption@endhook}
-\DeclareCaptionOption{listof}{\caption@set@bool\caption@iflof{#1}}
-\newcommand*\DeclareCaptionListOfFormat[2]{%
+\DeclareCaptionOption{list}{\caption@set@bool\caption@iflist{#1}}
+\DeclareCaptionOption{listof}{\caption@set@bool\caption@iflist{#1}}
+\newcommand*\DeclareCaptionListFormat[2]{%
\global\@namedef{caption@lstfmt@#1}##1##2{#2}}
-\@onlypreamble\DeclareCaptionListOfFormat
-\DeclareCaptionOption{listofformat}{\caption@setlistofformat{#1}}
-\newcommand*\caption@setlistofformat[1]{%
+\@onlypreamble\DeclareCaptionListFormat
+\DeclareCaptionOption{listformat}{\caption@setlistformat{#1}}
+\newcommand*\caption@setlistformat[1]{%
\@ifundefined{caption@lstfmt@#1}%
- {\caption@Error{Undefined list-of format `#1'}}%
+ {\caption@Error{Undefined list format `#1'}}%
{\expandafter\let\expandafter\caption@lstfmt
\csname caption@lstfmt@#1\endcsname}}
-\DeclareCaptionListOfFormat{empty}{}
-\DeclareCaptionListOfFormat{simple}{#1#2}
-\DeclareCaptionListOfFormat{parens}{#1(#2)}
-\DeclareCaptionListOfFormat{subsimple}{#2}
-\DeclareCaptionListOfFormat{subparens}{(#2)}
+\DeclareCaptionListFormat{empty}{}
+\DeclareCaptionListFormat{simple}{#1#2}
+\DeclareCaptionListFormat{parens}{#1(#2)}
+\DeclareCaptionListFormat{subsimple}{#2}
+\DeclareCaptionListFormat{subparens}{(#2)}
\def\caption@lstfmt@default{\caption@lstfmt@subsimple}
\DeclareCaptionOption{debug}[1]{%
\caption@set@bool\caption@ifdebug{#1}%
- \let\caption@iftypewarning\caption@ifdebug
\caption@ifdebug
{\def\caption@Debug{\PackageInfo{caption}}}%
{\let\caption@Debug\@gobble}}
@@ -964,7 +981,7 @@
\DeclareDefaultCaptionFont{textfont}{\itshape}%
\DeclareCaptionLabelSeparator{default}{\captionseparator\space}%
}
-\captionsetup{style=default,position=default,listof=1,listofformat=default,%
+\captionsetup{style=default,position=default,list=1,listformat=default,%
twoside=\if@twoside 1\else 0\fi}
\ProcessOptions*
\caption@IfCheckCommand{%
@@ -977,7 +994,7 @@
\caption@Debug{\string\@makecaption\space=\space\meaning\@makecaption\@gobble}%
}
\newcommand*\caption@addcontentsline[2]{%
- \caption@iflof%
+ \caption@iflist
{\def\@tempa{#2}}%
{\let\@tempa\@empty}%
\ifx\@tempa\@empty \else
@@ -1016,7 +1033,7 @@
\hspace\@tempdima
\@tempdima\captionwidth
\caption@ifh{\advance\@tempdima-\caption@indent}%
- \captionbox\@tempdima{%
+ \caption@parbox\@tempdima{%
\caption@ifh{%
\ifdim\caption@indent=\z@
\leavevmode
@@ -1069,7 +1086,7 @@
\fi
\caption@Debug{End SLC}}
\newcommand*\caption@singleline{%
- \expandafter\caption@setup\expandafter{\caption@opt@singleline}%
+ \caption@xsetup\caption@opt@singleline
\let\caption@fmt\caption@slfmt}
\newcommand*\caption@prepareslc{%
\let\@footnotetext\@gobble\let\@endnotetext\@gobble
@@ -1077,7 +1094,7 @@
\let\stepcounter\caption@l@stepcounter
\let\refstepcounter\stepcounter\let\H@refstepcounter\stepcounter}
\newcommand*\caption@l@stepcounter[1]{\advance\csname c@#1\endcsname\@ne\relax}
-\newcommand*\captionbox{\parbox[b]}
+\newcommand*\caption@parbox{\parbox[b]}
\newcommand\caption@@@make[2]{%
\sbox\@tempboxa{#1}%
\ifdim\wd\@tempboxa=\z@
@@ -1087,7 +1104,7 @@
\let\caption@lsep\relax
}%
\@setpar{\@@par\caption@@par}\caption@@par
- \caption@hj\captionsize\captionfont\caption@fmt
+ \caption@hj\captionfont\captionsize\caption@fmt
{\ifcaption@star\else{\captionlabelfont#1}\fi}%
{\ifcaption@star\else{\caption@iflf\captionlabelfont\caption@lsep}\fi}%
{{\captiontextfont
@@ -1110,22 +1127,15 @@
\caption@ifempty\@unused}
\newcommand*\caption@@par{%
\parindent\caption@parindent\hangindent\caption@hangindent}%
-\providecommand*\DeclareFloatingEnvironment{%
- \@ifnextchar[%]
- \caption@@DeclareFloatingEnvironment\caption@DeclareFloatingEnvironment}
-\@onlypreamble\DeclareFloatingEnvironment
-\newcommand*\caption@DeclareFloatingEnvironment[1]{%
- \caption@@DeclareFloatingEnvironment[lo#1]{#1}}
-\@onlypreamble\caption@DeclareFloatingEnvironment
-\def\caption@@DeclareFloatingEnvironment[#1]#2{%
- \@ifundefined{c@chapter}%
- {\newcounter{#2}%
- \@namedef{the#2}{\arabic{#2}}%
- \@namedef{theH#2}{\arabic{#2}}}%
- {\newcounter{#2}[chapter]%
- \@namedef{the#2}{\ifnum\c@chapter>\z@ \thechapter.\fi \arabic{#2}}%
- \@namedef{theH#2}{\theHchapter.\arabic{#2}}}%
- \@namedef{fps@#2}{tbp}%
+\newcommand*\DeclareCaptionType{%
+ \@testopt\@DeclareCaptionType{}}
+\@onlypreamble\DeclareCaptionType
+\def\@DeclareCaptionType[#1]#2{%
+ \def\caption@type{#2}%
+ \caption@Debug{New type `#2'}%
+ \newcounter{#2}\@namedef{theH#2}{}%
+ \KV@caption@DCT@within{\@ifundefined{c@chapter}{none}{chapter}}%
+ \KV@caption@DCT@placement{tbp}%
\@ifundefined{c@float@type}%
{\newcounter{float@type}%
\setcounter{float@type}{\@ifundefined{c@figure}14}}%
@@ -1133,18 +1143,11 @@
\caption@Debug{float type `#2'=\the\value{float@type}}%
\expandafter\xdef\csname ftype@#2\endcsname{\the\value{float@type}}%
\addtocounter{float@type}{\value{float@type}}%
- \@namedef{ext@#2}{#1}%
+ \KV@caption@DCT@fileext{lo#2}%
\@namedef{fnum@#2}{\@nameuse{#2name}\nobreakspace\@nameuse{the#2}}%
\newenvironment{#2}{\@float{#2}}{\end@float}%
\newenvironment{#2*}{\@dblfloat{#2}}{\end@dblfloat}%
- \expandafter\newcommand\csname listof#2s\endcsname{\begingroup
- \expandafter\let\expandafter\listfigurename\csname list#2name\endcsname
- \expandafter\let\expandafter\ext@figure\csname ext@#2\endcsname
- \let\caption@ORI@starttoc\@starttoc
- \renewcommand*\@starttoc[1]{%
- \expandafter\caption@ORI@starttoc\expandafter{\ext@figure}}%
- \listoffigures
- \endgroup}%
+ \expandafter\newcommand\csname listof#2s\endcsname{\caption@listof{#2}}%
\@ifundefined{l@figure}%
{\@namedef{l@#2}{\@dottedtocline{1}{1.5em}{2.3em}}}%
{\expandafter\let\csname l@#2\endcsname\l@figure}%
@@ -1158,45 +1161,139 @@
\expandafter\let\csname #2name\endcsname\@tempa
\expandafter\newcommand\csname list#2name\endcsname{}%
\expandafter\xdef\csname list#2name\endcsname{List of \@tempa s}%
- \@cons\caption@floatlist{{#2}}%
- \@ifnextchar[{\caption@@@DeclareFloatingEnvironment{#2}}\relax}
-\@onlypreamble\caption@@DeclareFloatingEnvironment
-\def\caption@@@DeclareFloatingEnvironment#1[#2]{%
- \@namedef{#1name}{#2}%
- \@ifnextchar[{\caption@@@@DeclareFloatingEnvironment{#1}}\relax}
-\@onlypreamble\caption@@@DeclareFloatingEnvironment
-\def\caption@@@@DeclareFloatingEnvironment#1[#2]{%
- \@namedef{list#1name}{#2}}
-\@onlypreamble\caption@@@@DeclareFloatingEnvironment
-\newcommand*\caption@floatlist{}
-\providecommand\ForFloatingEnvironments[1]{%
- \caption@AtBeginDocument{%
- \def\@elt##1{#1}%
- \caption@floatlist
+ \@cons\caption@typelist{{#2}}%
+ \caption@setkeys[caption]{caption@DCT}{#1}%
+ \@ifnextchar[\@@DeclareCaptionType\relax}
+\@onlypreamble\@DeclareCaptionType
+\def\@@DeclareCaptionType[#1]{%
+ \KV@caption@DCT@name{#1}%
+ \@ifnextchar[\@@@DeclareCaptionType\relax}
+\@onlypreamble\@@DeclareCaptionType
+\def\@@@DeclareCaptionType[#1]{%
+ \KV@caption@DCT@listname{#1}}
+\@onlypreamble\@@@DeclareCaptionType
+\let\DeclareFloatingEnvironment\DeclareCaptionType % old command name
+\newcommand*\caption@listof[1]{%
+ \begingroup
+ \expandafter\let\expandafter\listfigurename\csname list#1name\endcsname
+ \expandafter\let\expandafter\ext@figure\csname ext@#1\endcsname
+ \let\caption@ORI@starttoc\@starttoc
+ \renewcommand*\@starttoc[1]{%
+ \expandafter\caption@ORI@starttoc\expandafter{\ext@figure}}%
+ \listoffigures
+ \endgroup}
+\newcommand*\caption@typelist{}
+\define@key{caption@DCT}{fileext}{\@namedef{ext@\caption@type}{#1}}
+\@onlypreamble@key{caption@DCT}{fileext}
+\define@key{caption@DCT}{listname}{\@namedef{list\caption@type name}{#1}}
+\@onlypreamble@key{caption@DCT}{listname}
+\define@key{caption@DCT}{name}{\@namedef{\caption@type name}{#1}}
+\@onlypreamble@key{caption@DCT}{name}
+\define@key{caption@DCT}{placement}{\@namedef{fps@\caption@type}{#1}}
+\@onlypreamble@key{caption@DCT}{placement}
+\define@key{caption@DCT}{within}{%
+ \@ifundefined{c@chapter}{}{\@removefromreset\caption@type{chapter}}%
+ \@removefromreset\caption@type{section}%
+ \begingroup
+ \caption@setkeys[caption]{caption@within}{#1}%
+ \endgroup}
+\@onlypreamble@key{caption@DCT}{within}
+\define@key{caption@DCT}{without}{\KV@caption@DCT@within{none}}
+\@onlypreamble@key{caption@DCT}{without}
+\define@key{caption@within}{none}[]{%
+ \caption@within{}{}}
+\@onlypreamble@key{caption@within}{none}
+\@ifundefined{c@chapter}{}{%
+ \define@key{caption@within}{chapter}[]{%
+ \@addtoreset\caption@type{chapter}%
+ \caption@within{\ifnum\c@chapter>\z@ \thechapter.\fi}{\theHchapter.}}
+ \@onlypreamble@key{caption@within}{chapter}}
+\define@key{caption@within}{section}[]{%
+ \@addtoreset\caption@type{section}%
+ \caption@within{\ifnum\c@section>\z@ \thesection.\fi}{\theHsection.}}
+\@onlypreamble@key{caption@within}{section}
+\newcommand*\caption@within{%
+ \expandafter\caption@within@\expandafter{\caption@type}}
+\@onlypreamble\caption@within
+\newcommand*\caption@within@[3]{%
+ \global\@namedef{the\caption@type}{#2\arabic{#1}}%
+ \@ifundefined{theH\caption@type}\caption@AtBeginDocument\@firstofone
+ {\global\@namedef{theH\caption@type}{#3\arabic{#1}}}}
+\@onlypreamble\caption@within@
+\providecommand*\@removefromreset[2]{{%
+ \expandafter\let\csname c@#1\endcsname\@removefromreset
+ \def\@elt##1{%
+ \expandafter\ifx\csname c@##1\endcsname\@removefromreset
+ \else
+ \noexpand\@elt{##1}%
+ \fi}%
+ \expandafter\xdef\csname cl@#2\endcsname{%
+ \csname cl@#2\endcsname}}}
+\newcommand*\DeclareCaptionSubType{%
+ \caption@teststar\@DeclareCaptionSubType\@firstoftwo\@secondoftwo}
+\@onlypreamble\DeclareCaptionSubType
+\newcommand*\@DeclareCaptionSubType[1]{%
+ \@testopt{\@@DeclareCaptionSubType{#1}}{alph}}
+\@onlypreamble\@DeclareCaptionSubType
+\def\@@DeclareCaptionSubType#1[#2]#3{%
+ \@ifundefined{c@#3}%
+ {\caption@Error{No float type '#3' defined}}%
+ {\@ifundefined{c@sub#3}%
+ {\caption@Debug{New subtype `sub#3'}%
+ \newcounter{sub#3}%
+ \@namedef{ext@sub#3}{\csname ext@#3\endcsname}%
+ \@ifundefined{l@chapter}%
+ {\edef\@tempa{\expandafter\expandafter\expandafter\noexpand
+ \expandafter\@car\l@subsubsection\@nil}%
+ \def\@tempb{\@dottedtocline}%
+ \ifx\@tempa\@tempb % \l@subsubsection starts with \@dottedtocline
+ \expandafter\edef\csname l@sub#3\endcsname{%
+ \noexpand\@dottedtocline{2}%
+ \expandafter\expandafter\expandafter\noexpand
+ \expandafter\@gobbletwo\l@subsubsection}%
+ \else
+ \@namedef{l@sub#3}{\@dottedtocline{2}{3.8em}{3.2em}}%
+ \fi}%
+ {\expandafter\let\csname l@sub#3\endcsname\l@subsection}%
+ \@cons\caption@subtypelist{{#3}}}%
+ {\caption@Debug{Modify caption `sub#3'}}%
+ #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}}%
+ \@namedef{sub#3autorefname}{\csname #3name\endcsname}}}
+\@onlypreamble\@@DeclareCaptionSubType
+\newcommand*\caption@subtypelist{}
+\newcommand*\caption@For{\caption@withoptargs\caption@@For}
+\@onlypreamble\caption@For
+\newcommand\caption@@For[3]{%
+ \caption@AtBeginDocument#1{%
+ \def\@elt##1{#3}%
+ \@nameuse{caption@#2}%
\let\@elt\relax}}%
-\@onlypreamble\ForFloatingEnvironments
+\@onlypreamble\caption@@For
\caption@AtBeginDocument{%
\def\@tempa{\@ifstar\sf@@subref\sf@subref}%
\ifx\subref\@tempa
\PackageInfo{caption3}{subfig package 1.2 or 1.3 is loaded\@gobble}%
\let\caption@setfloattype\@gobble
- \let\sf@ifpositiontop\caption@iftop
- \def\@dottedxxxline#1#2#3#4#5#6#7{%
- \begingroup
- \caption@setfloattype{#1}%
- \caption@setoptions{subfloat}%
- \caption@setoptions{sub#1}%
- \ifnum #3>\@nameuse{c@#2depth}\else
- \@dottedtocline{\z@}{#4}{#5}{#6}{#7}%
- \fi
- \endgroup}%
- \let\sf@subfloat\sf@NEW@subfloat
+ \let\@dottedxxxline\sf@NEW@dottedxxxline
+ \let\sf@subfloat\sf@NEW@subfloat
\DeclareRobustCommand*\subref{\@ifstar\sf@@subref\sf@subref}%
- \caption@removefromoptlist{subfloat}%
- \caption@removefromoptlist{subfigure}%
- \caption@removefromoptlist{subtable}%
\fi
+ \let\sf@NEW@dottedxxxline\@undefined
\let\sf@NEW@subfloat\@undefined}
+\def\sf@NEW@dottedxxxline#1#2#3#4#5#6#7{%
+ \begingroup
+ \caption@setfloattype{#1}%
+ \caption@setoptions{subfloat}%
+ \caption@setoptions{sub#1}%
+ \ifnum #3>\@nameuse{c@#2depth}\else
+ \@dottedtocline{\z@}{#4}{#5}{#6}{#7}%
+ \fi
+ \endgroup}
\def\sf@NEW@subfloat{%
\begingroup
\caption@setfloattype\@captype
@@ -1216,7 +1313,7 @@
\setcounter{sub\@captype @save}{\value{sub\@captype}}%
\@ifnextchar [% %] match left bracket
{\sf@@subfloat}%
- {\sf@@subfloat[\@empty]}}%
+ {\sf@@subfloat[\@empty]}}
\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 3c752d16979..852b6efaaa8 100644
--- a/Master/texmf-dist/tex/latex/caption/ltcaption.sty
+++ b/Master/texmf-dist/tex/latex/caption/ltcaption.sty
@@ -23,9 +23,9 @@
%% This Current Maintainer of this work is Axel Sommerfeldt.
%%
%% This work consists of the files caption.ins, caption.dtx, caption2.dtx,
-%% and ltcaption.dtx, the derived files caption.sty, caption2.sty,
-%% caption3.sty, and ltcaption.sty, and the user manuals caption-deu.tex,
-%% caption-eng.tex, and caption-rus.tex.
+%% ltcaption.dtx, and subcaption.dtx, the derived files caption.sty,
+%% caption2.sty, caption3.sty, ltcaption.sty, and subcaption.sty, and the
+%% user manuals caption-deu.tex, caption-eng.tex, and caption-rus.tex.
%%
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
\ProvidesPackage{ltcaption}[2007/09/01 v1.1 longtable captions (AR)]
diff --git a/Master/texmf-dist/tex/latex/caption/subcaption.sty b/Master/texmf-dist/tex/latex/caption/subcaption.sty
new file mode 100644
index 00000000000..5f6ee5c2508
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/caption/subcaption.sty
@@ -0,0 +1,104 @@
+%%
+%% This is file `subcaption.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% subcaption.dtx (with options: `package')
+%%
+%% Copyright (C) 1994-2007 Axel Sommerfeldt (caption@sommerfee.de)
+%%
+%% --------------------------------------------------------------------------
+%%
+%% 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,
+%% ltcaption.dtx, and subcaption.dtx, the derived files caption.sty,
+%% caption2.sty, caption3.sty, ltcaption.sty, and subcaption.sty, and the
+%% user manuals caption-deu.tex, caption-eng.tex, and caption-rus.tex.
+%%
+\NeedsTeXFormat{LaTeX2e}[1994/12/01]
+\ProvidesPackage{subcaption}[2007/12/06 v0.3 Adding subcaptions (AR)]
+\@ifundefined{caption@subtypehook}{% we need caption v3.1f or newer
+ \PackageError{subcaption}{`caption' package not loaded\MessageBreak
+ (which is needed by this package)\@gobble}{%
+ If you do not understand this error, please take a closer look\MessageBreak
+ at the documentation of the `subcaption' package.\MessageBreak
+ \@ehc}%
+ \endinput}{}
+\let\caption@setkeys@ORI\caption@setkeys
+\renewcommand\caption@setkeys[2]{\captionsetup[sub]{#2}}
+\caption@ExecuteOptions{subcaption}{%
+ font+=small,labelformat=parens,labelsep=space,skip=6pt,list=0,hypcap=0}
+\caption@ProcessOptions*{subcaption}
+\let\caption@setkeys\caption@setkeys@ORI
+\let\caption@setkeys@ORI\@undefined
+\@ifundefined{c@figure}{}{\DeclareCaptionSubType{figure}}
+\@ifundefined{c@table}{}{\DeclareCaptionSubType{table}}
+\caption@For{typelist}{\DeclareCaptionSubType{#1}}
+\newcommand*\subcaption{\captionsetup{subtype*}\caption}
+\g@addto@macro\caption@subtypehook{\let\subcaption\caption}
+\caption@For{subtypelist}{%
+ \newenvironment{sub#1}%
+ {\caption@withoptargs\subcaption@minipage}%
+ {\endminipage}}%
+\newcommand*\subcaption@minipage[2]{%
+ \minipage#1{#2}%
+ \captionsetup{subtype}}
+\newcommand*\subcaptionbox{\caption@withoptargs\subcaption@box}
+\newcommand\subcaption@box[2]{%
+ \@testopt{\subcaption@ibox{#1}{#2}}{\wd\@tempboxa}}
+\long\def\subcaption@ibox#1#2[#3]{%
+ \@testopt{\subcaption@iibox{#1}{#2}{#3}}\subcaptionbox@hj@default}
+\long\def\subcaption@iibox#1#2#3[#4]#5{%
+ \setbox\@tempboxa\hbox{#5}%
+ \begingroup
+ \captionsetup{subtype*}% set \caption@position
+ \caption@iftop{%
+ \endgroup
+ \parbox[t]{#3}{%
+ \captionsetup{subtype,position=t}%
+ \vbox{\caption#1{#2}}%
+ \hrule\@height\z@
+ \csname caption@hj@#4\endcsname
+ \unhbox\@tempboxa}%
+ }{%
+ \endgroup
+ \parbox[b]{#3}{%
+ \captionsetup{subtype,position=b}%
+ \csname caption@hj@#4\endcsname
+ \unhbox\@tempboxa
+ \hrule\@height\z@
+ \vtop{\caption#1{#2}}}%
+ }}
+\providecommand*\caption@hj@c{\centering}
+\providecommand*\caption@hj@l{\raggedright}
+\providecommand*\caption@hj@r{\raggedleft}
+\providecommand*\caption@hj@s{}
+\newcommand*\subcaptionbox@hj@default{c}
+\g@addto@macro\caption@subtypehook{%
+ \ifx\label\subcaption@label \else
+ \let\subcaption@ORI@label\label
+ \let\label\subcaption@label
+ \fi}
+\newcommand*\subcaption@label[1]{%
+ \@bsphack\begingroup
+ \subcaption@ORI@label{#1}%
+ \protected@edef\@currentlabel{\csname thesub\@captype\endcsname}%
+ \subcaption@ORI@label{sub@#1}%
+ \endgroup\@esphack}
+\DeclareRobustCommand*\subref{\caption@withoptargs\subcaption@ref}
+\newcommand*\subcaption@ref[2]{\ref#1{sub@#2}}
+\endinput
+%%
+%% End of file `subcaption.sty'.