summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/caption
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-08-21 23:25:38 +0000
committerKarl Berry <karl@freefriends.org>2011-08-21 23:25:38 +0000
commit4bf6d40e1871037aeeadbc08a3aaadf63bd5afc6 (patch)
treeb449d37a95705baa0f91a85a60cfc32120fffdc2 /Master/texmf-dist/tex/latex/caption
parent4a9457dbad19d024d5327f667ed95f5cae64d41c (diff)
caption (21aug11 and earlier)
git-svn-id: svn://tug.org/texlive/trunk@23635 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/caption')
-rw-r--r--Master/texmf-dist/tex/latex/caption/bicaption.sty8
-rw-r--r--Master/texmf-dist/tex/latex/caption/caption.sty186
-rw-r--r--Master/texmf-dist/tex/latex/caption/caption3.sty73
-rw-r--r--Master/texmf-dist/tex/latex/caption/ltcaption.sty2
-rw-r--r--Master/texmf-dist/tex/latex/caption/subcaption.sty58
5 files changed, 201 insertions, 126 deletions
diff --git a/Master/texmf-dist/tex/latex/caption/bicaption.sty b/Master/texmf-dist/tex/latex/caption/bicaption.sty
index 76161048310..84f774ff430 100644
--- a/Master/texmf-dist/tex/latex/caption/bicaption.sty
+++ b/Master/texmf-dist/tex/latex/caption/bicaption.sty
@@ -29,8 +29,8 @@
%% caption-eng.tex, and caption-rus.tex.
%%
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{bicaption}[2011/07/13 v0.9a Bilingual Captions (AR)]
-\RequirePackage{caption}[2011/01/01] % needs v3.2 or newer
+\ProvidesPackage{bicaption}[2011/08/12 v0.9b Bilingual Captions (AR)]
+\RequirePackage{caption}[2011/08/12] % needs v3.2a or newer
\newcommand*\bicaption@Warning[1]{%
\bicaption@WarningNoLine{#1\on@line}}
\newcommand*\bicaption@WarningNoLine[1]{%
@@ -62,7 +62,7 @@
\DeclareCaptionOption{lang}{\def\bicaption@language{#1}}
\let\KV@caption@language\KV@caption@lang
\newcommand*\bicaption@selectlanguage{%
- \@ifundefined{bicaption@language}{}{%
+ \caption@ifundefined\bicaption@language{}{%
\expandafter\selectlanguage\expandafter{\bicaption@language}}}
\g@addto@macro\caption@applyfont{%
\bicaption@selectlanguage}
@@ -79,7 +79,7 @@
\caption@ProcessOptions*{bicaption}
\let\caption@@make@ORI\caption@@make
\renewcommand\caption@@make[2]{%
- \@ifundefined{bicaption@text}%
+ \caption@ifundefined\bicaption@text
{\caption@@make@ORI{#1}{#2}}%
{\bicaption@@make{#1}{#2}{\bicaption@text}%
\global\let\bicaption@label\@undefined
diff --git a/Master/texmf-dist/tex/latex/caption/caption.sty b/Master/texmf-dist/tex/latex/caption/caption.sty
index 75bb68422f0..0ea37e2194e 100644
--- a/Master/texmf-dist/tex/latex/caption/caption.sty
+++ b/Master/texmf-dist/tex/latex/caption/caption.sty
@@ -29,7 +29,7 @@
%% caption-eng.tex, and caption-rus.tex.
%%
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption}[2011/08/06 v3.2 Customizing captions (AR)]
+\ProvidesPackage{caption}[2011/08/18 v3.2b Customizing captions (AR)]
\RequirePackage{caption3}[2011/08/01] % needs v1.3 or newer
\caption@ifbool{documentclass}{}{%
\caption@WarningNoLine{%
@@ -69,7 +69,7 @@
\newcommand*\caption@SetName[2]{%
\caption@setname{#1}{#2}%
\begingroup
- \@ifundefined{languagename}{}{%
+ \caption@ifundefined\languagename{}{%
\@ifundefined{captions\languagename}{}{%
\expandafter\g@addto@macro\csname captions\languagename\endcsname
{\caption@setname{#1}{#2}}}}%
@@ -78,15 +78,15 @@
\caption@AtBeginDocument{\let\caption@SetName\caption@setname}
\newcommand*\caption@DeclareWithinOption[1]{%
\DeclareCaptionOption{#1within}{\caption@Within{#1}{##1}}%
- \DeclareCaptionOption{#1without}{\caption@Within{#1}{none}}}
+ \DeclareCaptionOptionNoValue{#1without}{\caption@Within{#1}{none}}}
\caption@DeclareWithinOption{figure}
\caption@DeclareWithinOption{table}
\DeclareCaptionOption{within}{%
- \@ifundefined{c@figure}{}{\caption@Within{figure}{#1}}%
- \@ifundefined{c@table}{}{\caption@Within{table}{#1}}%
+ \caption@ifundefined\c@figure{}{\caption@Within{figure}{#1}}%
+ \caption@ifundefined\c@table{}{\caption@Within{table}{#1}}%
\caption@For{typelist}{\caption@Within{##1}{#1}}%
\def\caption@within@default{#1}}
-\DeclareCaptionOption{without}{\KV@caption@within{none}}
+\DeclareCaptionOptionNoValue{without}{\KV@caption@within{none}}
\newcommand*\caption@Within[1]{\def\caption@type{#1}\KV@caption@DCT@within}
\DeclareCaptionOption*{config}[caption]{%
\InputIfFileExists{#1.cfg}%
@@ -199,14 +199,14 @@
\caption@KOMA@@setcapindent{#1}\caption@setcapindent}
\newcommand*\caption@setcapindent{%
\captionsetup{indent=\ifdim\cap@indent<\z@\z@\else\cap@indent\fi}}
- \@ifundefined{cap@indent}{}{\caption@setcapindent}
+ \caption@ifundefined\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
- \@ifundefined{cap@margin}{}{%
+ \caption@ifundefined\cap@margin{}{%
\def\@tempa{captionbeside}%
\ifx\@tempa\@currenvir\else\caption@Warning{%
Ignoring optional argument [#1] of \string\setcapwidth\MessageBreak}%
@@ -244,7 +244,7 @@
\caption@setcapmargin
\fi
}
-\caption@SetupOptions{caption}{\caption@setkeys{#1}{#2}}%
+\caption@SetupOptions{caption}{\caption@setkeys{#1}{#2}}
\caption@ProcessOptions*{caption}
\def\caption@caption{%
\caption@iftype
@@ -252,9 +252,10 @@
\caption@star
{\caption@refstepcounter\@captype}%
{\caption@dblarg{\@caption\@captype}}}%
- {\caption@Error{\noexpand\caption outside float}}}%
+ {\caption@Error{\noexpand\caption outside float}%
+ \caption@withoptargs\@gobbletwo}}
\newcommand*\caption@star[2]{%
- \@ifstar{\global\caption@startrue#2[]}{#1#2}}%
+ \@ifstar{\global\caption@startrue#2[]}{#1#2}}
\long\def\caption@@caption#1[#2]#3{%
\ifcaption@star \else
\caption@prepareanchor{#1}{#2}%
@@ -273,7 +274,7 @@
\@makecaption{\csname fnum@#1\endcsname}%
{\ignorespaces\caption@makeanchor{#3}}\par
\caption@if@minipage\@minipagetrue\@minipagefalse}%
- \caption@end}%
+ \caption@end}
\newcommand*\caption@prepareanchor[2]{%
\caption@makecurrent{#1}{#2}%
\caption@ifhypcap\caption@@start{}}
@@ -591,7 +592,7 @@
Incompatible package detected (regarding \string\@caption).\MessageBreak
\string\@caption\space=\space\meaning\@caption}%
\caption@setbool{incompatible}{1}}%
- \@ifundefined{caption@ifcompatibility}%
+ \caption@ifundefined\caption@ifcompatibility
{\let\caption@ifcompatibility\caption@ifincompatible
\let\caption@tempa\caption@WarningNoLine}%
{\let\caption@tempa\@gobble}% suppress warning
@@ -605,11 +606,11 @@
\caption@Error{Not available in compatibility mode}}%
\caption@AtBeginDocument*{%
\let\caption@start\relax
- \@ifundefined{caption@ORI@capstart}{}{%
+ \caption@ifundefined\caption@ORI@capstart{}{%
\caption@Debug{%
Restore hypcap definition of \string\capstart\@gobble}%
\let\capstart\caption@ORI@capstart}%
- \@ifundefined{caption@ORI@float@makebox}{}{%
+ \caption@ifundefined\caption@ORI@float@makebox{}{%
\caption@Debug{%
Restore hyperref redefinition of \string\float@makebox\@gobble}%
\let\float@makebox\caption@ORI@float@makebox}%
@@ -640,18 +641,22 @@
\caption@AtBeginDocument{%
\DeclareCaptionOption{type}{\setcaptiontype{#1}}%
\DeclareCaptionOption{type*}{\setcaptiontype*{#1}}%
- \DeclareCaptionOption{subtype}[sub\@captype]{\caption@setsubtype{#1}}%
- \DeclareCaptionOption{subtype*}[sub\@captype]{\caption@setsubtype*{#1}}%
+ \DeclareCaptionOptionNoValue{subtype}{\setcaptionsubtype\relax}%
+ \DeclareCaptionOptionNoValue{subtype*}{\setcaptionsubtype*}%
}
\newcommand\setcaptiontype{%
\caption@boxrestore@mini
\caption@settype}
+\newcommand\setcaptionsubtype{%
+ \caption@iftype
+ \caption@setsubtype
+ {\caption@Error{\noexpand\setcaptionsubtype outside float}}}%
+\newcommand\caption@setsubtype{%
+ \@ifstar
+ {\caption@@settype{sub}*{sub\@captype}}%
+ {\caption@@settype{sub}{sub\@captype}}}%
\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]{%
@@ -676,14 +681,14 @@
\let\caption@ifrefstepcounter\@secondoftwo
#2{}{%
\let\@currentlabel\caption@undefinedlabel
- \ifx\caption@ORI@label\@undefined
- \let\caption@ORI@label\label
+ \ifx\caption@x@label\@undefined
+ \let\caption@x@label\label
\let\label\caption@xlabel
\fi
\caption@start}}
\newcommand*\caption@typehook{}
\newcommand*\caption@iftype{%
- \@ifundefined{@captype}{\let\@captype\@undefined\@secondoftwo}\@firstoftwo}
+ \caption@ifundefined\@captype\@secondoftwo\@firstoftwo}
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname currentgrouplevel\endcsname\relax
\caption@Debug{TeX engine: TeX}
@@ -692,7 +697,7 @@
\caption@Debug{TeX engine: e-TeX}
\newcommand*\caption@checkgrouplevel[2]{%
\@ifundefined{#1caption@grouplevel}{%
- \@ifundefined{caption@grouplevel}{\let\caption@grouplevel\z@}{}%
+ \caption@ifundefined\caption@grouplevel{\let\caption@grouplevel\z@}{}%
\ifnum\currentgrouplevel>\caption@grouplevel\relax
\expandafter\edef\csname #1caption@grouplevel\endcsname{%
\the\currentgrouplevel}%
@@ -710,7 +715,7 @@
\newcommand*\caption@xlabel[1]{%
\caption@@xlabel
\def\caption@labelname{#1}%
- \caption@ORI@label{#1}}
+ \caption@x@label{#1}}
\newcommand*\caption@@xlabel{%
\global\let\caption@@xlabel\@empty
\@bsphack
@@ -733,7 +738,7 @@
\caption@addcontentsline{#2}{#3}%
\@esphack}
\newcommand*\captionbox{%
- \let\captionbox@type\@empty
+ \let\captionbox@settype\@gobble
\caption@withoptargs\caption@box}
\newcommand\caption@box[2]{%
\@testopt{\caption@ibox{#1}{#2}}{\wd\@tempboxa}}
@@ -742,11 +747,12 @@
\long\def\caption@iibox#1#2#3[#4]#5{%
\setbox\@tempboxa\hbox{#5}%
\begingroup
- \expandafter\captionsetup\expandafter{\captionbox@type*}% set \caption@position
+ \captionbox@settype*% set \caption@position
\caption@iftop{%
\endgroup
\parbox[t]{#3}{%
- \expandafter\captionsetup\expandafter{\captionbox@type,position=t}%
+ \captionbox@settype\relax
+ \caption@setposition t%
\vbox{\caption#1{#2}}%
\captionbox@hrule
\csname caption@hj@#4\endcsname
@@ -754,7 +760,8 @@
}{%
\endgroup
\parbox[b]{#3}{%
- \expandafter\captionsetup\expandafter{\captionbox@type,position=b}%
+ \captionbox@settype\relax
+ \caption@setposition b%
\csname caption@hj@#4\endcsname
\unhbox\@tempboxa
\captionbox@hrule
@@ -766,7 +773,6 @@
\providecommand*\caption@hj@l{\raggedright}
\providecommand*\caption@hj@r{\raggedleft}
\providecommand*\caption@hj@s{}
-\DeclareCaptionOption{*}[]{}
\def\ContinuedFloat{%
\@ifnextchar[\@Continued@Float\@ContinuedFloat}
\def\@Continued@Float[#1]{\addtocounter{#1}\m@ne}
@@ -817,7 +823,7 @@
\let\caption@ifrefstepcounter\@firstoftwo}}
\newcommand*\caption@@refstepcounter{\refstepcounter}
\let\caption@ifrefstepcounter\@secondoftwo
-\@ifundefined{kernel@ifnextchar}%
+\caption@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}}%
@@ -877,7 +883,7 @@
\let\caption@freezeHref\relax
\let\caption@defrostHref\relax
\newcommand\caption@gettitle[1]{%
- \@ifundefined{NR@gettitle}%
+ \caption@ifundefined\NR@gettitle
{\def\@currentlabelname{#1}}%
{\NR@gettitle{#1}}}
\def\caption@DeclareSubType sub#1\@nil{%
@@ -887,11 +893,12 @@
\@onlypreamble\caption@DeclareSubType
\caption@For*{subtypelist}{\caption@DeclareSubType sub#1\@nil}
\caption@AtBeginDocument*{%
- \@ifundefined{sf@counterlist}{}{%
+ \caption@ifundefined\sf@counterlist{}{%
\@for\sf@temp:=\sf@counterlist\do{%
\expandafter\caption@DeclareSubType\sf@temp\@nil}}}
\newcommand*\caption@subtypehook{%
\ifx\caption\caption@subcaption \else
+ \caption@warmup
\caption@ifrefstepcounter{}{%
% no \caption or \subcaption in this (floating) environment yet
\caption@Debug{Increment \@captype\ counter =\the\value\@captype}%
@@ -912,15 +919,17 @@
\caption@setoptions{sub}%
\caption@setoptions{subfloat}% for subfig-package compatibility
\let\caption\caption@subcaption
+ \let\phantomcaption\caption@subphantom
\let\@makecaption\caption@makecaption
\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}}}
+ \caption@checkgrouplevel{sub}\subcaption
+ \caption@star
+ {\caption@refstepcounter\@subcaptype}%
+ {\caption@dblarg{\@caption\@subcaptype}}}
+\newcommand*\caption@subphantom{%
+ \caption@checkgrouplevel{sub}\phantomsubcaption
+ \caption@refstepcounter\@subcaptype}
\let\caption@kernel@addcontentsline\caption@addcontentsline
\renewcommand*\caption@addcontentsline[2]{%
\sf@ifpositiontop{\@listsubcaptions{#1}}{}%
@@ -953,11 +962,11 @@
\newcommand*\caption@clearsubcontentslines{%
\global\let\caption@subcontentslines\@empty}
\caption@AtBeginDocument*{%
- \@ifundefined{sf@ifpositiontop}{\let\sf@ifpositiontop\@gobbletwo}{}%
+ \caption@ifundefined\sf@ifpositiontop{\let\sf@ifpositiontop\@gobbletwo}{}%
\caption@clearsubcontentslines
\g@addto@macro\caption@typehook{\caption@checksubcontentslines}%
\AtEndDocument{\caption@checksubcontentslines}}%
-\@ifundefined{smf@makecaption}{}{\let\smf@makecaption\@makecaption}
+\caption@ifundefined\smf@makecaption{}{\let\smf@makecaption\@makecaption}
\@ifclassloaded{beamer}{%
\caption@InfoNoLine{beamer document class}%
\expandafter\let\expandafter\caption@ORI@figure
@@ -971,16 +980,16 @@
\caption@ORI@table[#1]%
\caption@settype{table}}
}{}
-\@ifundefined{scr@caption}{}{%
+\caption@ifundefined\scr@caption{}{%
\caption@AtBeginDocument{\let\scr@caption\caption}}
\@nameuse{caption@frenchb}\@nameundef{caption@frenchb}
-\caption@AtBeginDocument{\@ifundefined{frenchTeXmods}{}{%
+\caption@AtBeginDocument{\caption@ifundefined\frenchTeXmods{}{%
\caption@InfoNoLine{frenchle/pro package is loaded}%
\let\captionfont@ORI\captionfont
\let\captionlabelfont@ORI\captionlabelfont
\let\@makecaption@ORI\@makecaption
- \@ifundefined{GOfrench}%
+ \caption@ifundefined\GOfrench
{\let\caption@tempa\@firstofone}%
{\def\caption@tempa{\g@addto@macro\GOfrench}}%
\caption@tempa{%
@@ -1051,47 +1060,58 @@
\caption@AtBeginDocument*{%
\caption@ifneedfreeze{%
\newcommand*\caption@freeze{%
- \caption@teststar\caption@@freeze\@gobble\@firstofone}%
- \newcommand*\caption@@freeze[1]{%
\global\let\caption@SCcontinued\relax
\global\let\caption@SCsetup\@undefined
\global\let\caption@SClentry\@undefined
\global\let\caption@SCtext\@undefined
\global\let\caption@SClabel\@undefined
- \let\caption@ORI@ContinuedFloat\ContinuedFloat
+ \let\caption@frozen@ContinuedFloat\ContinuedFloat
\def\ContinuedFloat{%
\caption@withoptargs\caption@SC@ContinuedFloat}%
\def\caption@SC@ContinuedFloat##1{%
- \let\caption@ORI@setcounter\setcounter
- \let\caption@ORI@addtocounter\addtocounter
+ \let\caption@frozen@setcounter\setcounter
+ \let\caption@frozen@addtocounter\addtocounter
\def\setcounter####1####2{\csname c@####1\endcsname####2\relax}%
\def\addtocounter####1####2{\advance\csname c@####1\endcsname ####2\relax}%
- \caption@ORI@ContinuedFloat##1%
- \global\let\caption@SCcontinued\caption@ORI@ContinuedFloat
- \let\setcounter\caption@ORI@setcounter
- \let\addtocounter\caption@ORI@addtocounter}%
- \let\caption@ORI@setup\captionsetup
- \def\captionsetup{%
- \caption@withoptargs\caption@SC@setup}%
- \def\caption@SC@setup##1##2{%
- \caption@g@addto@list\caption@SCsetup{##2}%
- \caption@ORI@setup##1{##2}}%
- \let\caption@ORI\caption
+ \caption@frozen@ContinuedFloat##1%
+ \global\let\caption@SCcontinued\caption@frozen@ContinuedFloat
+ \let\setcounter\caption@frozen@setcounter
+ \let\addtocounter\caption@frozen@addtocounter}%
+ \let\caption@frozen@setup\caption@setup
+ \def\caption@setup##1{%
+ \caption@g@addto@list\caption@SCsetup{##1}%
+ \caption@frozen@setup{##1}}%
+ \let\caption@frozen\caption
\def\caption{%
\def\caption{\caption@Error{%
Only one \noexpand\caption can be placed in this environment}}%
\let\captionsetup\caption@setup
\let\caption@@refstepcounter\caption@l@stepcounter
- \caption@ORI}%
+ \caption@frozen}%
+ \let\caption@frozen@\@caption
\long\def\@caption##1[##2]##3{%
\gdef\caption@SClentry{##2}%
\gdef\caption@SCtext{##3}%
+ \let\@currentlabel\caption@SCcurrentlabel
\ignorespaces}%
- #1{% is \@gobble in star form, and \@firstofone otherwise
- \def\label##1{\@bsphack\gdef\caption@SClabel{##1}\@esphack}}%
+ \let\caption@frozen@label\label
+ \def\label##1{%
+ \ifx\@currentlabel\caption@SCcurrentlabel
+ \@bsphack\gdef\caption@SClabel{##1}\@esphack
+ \else
+ \caption@frozen@label{##1}%
+ \fi}%
+ \def\caption@SCcurrentlabel{???}%
}%
+ \newcommand*\caption@warmup{%
+ \ifx\caption@frozen\@undefined\else
+ \let\caption@setup\caption@frozen@setup
+ \let\caption\caption@frozen
+ \let\@caption\caption@frozen@
+ \let\label\caption@frozen@label
+ \fi}
\newcommand*\caption@defrost{%
- \ifx\caption@ORI@ContinuedFloat\@undefined
+ \ifx\caption@frozen\@undefined
\caption@defrost@setup
\ifx\caption@SCtext\@undefined \else
\expandafter\expandafter\expandafter\caption
@@ -1112,7 +1132,7 @@
\ifx\caption@SCsetup\@undefined \else
\expandafter\captionsetup\expandafter{\caption@SCsetup}%
\fi}%
- }{}%
+ }{\let\caption@warmup\relax}%
\caption@undefbool{needfreeze}}
\caption@IfPackageLoaded{float}[2001/11/08 v1.3d]{%
\@ifpackageloaded{floatrow}{%
@@ -1200,10 +1220,10 @@
\def\@captype{#1}%
\let\FP@LabelText\@empty
\begin{lrbox}{\FP@floatCorpusBOX}%
+ \caption@freeze
\caption@ifFPrefcap
- {\caption@freeze\relax}%
- {\def\label##1{\@bsphack\gdef\FP@LabelText{##1}\@esphack}%
- \caption@freeze*}%
+ {}%
+ {\def\label##1{\@bsphack\gdef\FP@LabelText{##1}\@esphack}}%
\ignorespaces}%
\renewcommand*\FP@floatEnd{%
\end{lrbox}%
@@ -1255,11 +1275,11 @@
}
\caption@IfPackageLoaded{hyperref}[2003/11/30 v6.74m]{%
% Test if hyperref has stopped early
- \@ifundefined{ifhyp@stoppedearly}{%
+ \caption@ifundefined\ifhyp@stoppedearly{%
\newif\ifhyp@stoppedearly
- \@ifundefined{H@refstepcounter}\hyp@stoppedearlytrue{%
- \@ifundefined{hyper@makecurrent}\hyp@stoppedearlytrue{%
- \@ifundefined{measuring@true}\hyp@stoppedearlytrue{}}}}{}%
+ \caption@ifundefined\H@refstepcounter\hyp@stoppedearlytrue{%
+ \caption@ifundefined\hyper@makecurrent\hyp@stoppedearlytrue{%
+ \caption@ifundefined\measuring@true\hyp@stoppedearlytrue{}}}}{}%
\ifhyp@stoppedearly % hyperref has stopped early
\caption@InfoNoLine{%
Hyperref support is turned off\MessageBreak
@@ -1325,7 +1345,7 @@
\let\caption@raisedlink\Hy@raisedlink
\fi
\def\caption@@start{%
- \@ifundefined{hc@currentHref}{%
+ \caption@ifundefined\hc@currentHref{%
\caption@Warning{%
The option `hypcap=true' will be ignored for this\MessageBreak
particular \string\caption}}{}}%
@@ -1345,7 +1365,7 @@
\caption@startanchor\caption@currentHref
\global\let\caption@currentHref\@undefined
\fi}%
- \@ifundefined{HyOrg@float@makebox}{}{%
+ \caption@ifundefined\HyOrg@float@makebox{}{%
\caption@Debug{%
Redefining \noexpand\float@makebox (again)\@gobble}%
\let\caption@ORI@float@makebox\float@makebox % save for compatibility mode
@@ -1356,7 +1376,7 @@
\caption@IfPackageLoaded{hypcap}{% v1.0
\ifx\caption@start\relax \else % hyperref hasn't stopped early
\let\caption@ORI@capstart\capstart % save for compatibility mode
- \@ifundefined{capstarttrue}% check for v1.10 of hypcap package
+ \caption@ifundefined\capstarttrue % check for v1.10 of hypcap package
{\def\capstart{\caption@start@}}%
{\def\capstart{\ifcapstart\caption@start@\fi}}%
\let\caption@start\relax
@@ -1470,7 +1490,7 @@
}{}
\newcommand*\piccaptiontype[1]{\def\@piccaptype{#1}}
\caption@IfPackageLoaded{picins}{%
- \@ifundefined{@piccaptype}{%
+ \caption@ifundefined\@piccaptype{%
\caption@iftype{%
\let\@piccaptype\@captype
}{%
@@ -1534,11 +1554,13 @@
\caption@AtBeginDocument{\let\SC@caption=\caption}%
\let\caption@ORI@SC@zfloat\SC@zfloat
\def\SC@zfloat#1#2#3[#4]{%
- \let\caption@ORI\caption
\caption@ORI@SC@zfloat{#1}{#2}{#3}[#4]%
- \let\caption\caption@ORI
+ \SC@RestoreCommands
\caption@settype*{#2}%
- \caption@freeze*}%
+ \caption@freeze
+ \let\SC@label\label}%
+ \providecommand*\SC@RestoreCommands{%
+ \let\caption=\SC@orig@caption \let\label=\SC@orig@label}%
\let\caption@ORI@endSC@FLOAT\endSC@FLOAT
\def\endSC@FLOAT{%
\let\caption@ORI@settype\caption@settype
@@ -1550,7 +1572,7 @@
\caption@start}%
\def\caption@setSC@justify{%
\caption@clearmargin
- \@ifundefined{SC@justify}{}{%
+ \caption@ifundefined\SC@justify{}{%
\ifx\SC@justify\@empty \else
\let\caption@hj\SC@justify
\let\SC@justify\@empty
@@ -1704,7 +1726,7 @@
\newenvironment{wrap#1}{\wrapfloat{#1}}{\endwrapfloat}%
\caption@restylewrapfloat{#1}}%
\ifx\WF@floatstyhook\@undefined \else % wrapfig v3.6
- \@ifundefined{float@restyle}{}{%
+ \caption@ifundefined\float@restyle{}{%
\toks@=\expandafter{\float@restyle{#1}% (env may or may not be defined)
\caption@restylewrapfloat{#1}}%
\edef\@tempa{\def\noexpand\float@restyle##1{\the\toks@}}%
diff --git a/Master/texmf-dist/tex/latex/caption/caption3.sty b/Master/texmf-dist/tex/latex/caption/caption3.sty
index d3aa5bef452..8e1565c77f8 100644
--- a/Master/texmf-dist/tex/latex/caption/caption3.sty
+++ b/Master/texmf-dist/tex/latex/caption/caption3.sty
@@ -29,7 +29,7 @@
%% caption-eng.tex, and caption-rus.tex.
%%
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption3}[2011/08/06 v1.3 caption3 kernel (AR)]
+\ProvidesPackage{caption3}[2011/08/18 v1.3b caption3 kernel (AR)]
\providecommand*\@nameundef[1]{%
\expandafter\let\csname #1\endcsname\@undefined}
\providecommand\l@addto@macro[2]{%
@@ -47,6 +47,14 @@
\ifx\caption@tempa\@empty \else
#1#2%
\fi}
+\newcommand*\caption@ifundefined[1]{%
+ \ifx#1\@undefined
+ \expandafter\@firstoftwo
+ \else\ifx#1\relax
+ \expandafter\expandafter\expandafter\@firstoftwo
+ \else
+ \expandafter\expandafter\expandafter\@secondoftwo
+ \fi\fi}
\newcommand*\caption@ifinlist{%
\@expandtwoargs\caption@@ifinlist}
\newcommand*\caption@@ifinlist[2]{%
@@ -471,7 +479,7 @@
\DeclareCaptionOption{parskip}{%
\l@addto@macro\caption@@par{\setlength\parskip{#1}}}
\providecommand*\caption@ifkomaclass{%
- \@ifundefined{scr@caption}\@gobble\@firstofone}
+ \caption@ifundefined\scr@caption\@gobble\@firstofone}
\@onlypreamble\caption@ifkomaclass
\caption@ifkomaclass{%
\let\caption@KV@parindent\KV@caption@parindent
@@ -685,7 +693,7 @@
\DeclareCaptionFont{Large}{\Large}
\DeclareCaptionFont{sansmath}{\sansmath}
\DeclareCaptionFont{singlespacing}{%
- \@ifundefined{setspace@singlespace}{}{%
+ \caption@ifundefined\setspace@singlespace{}{%
\setstretch\setspace@singlespace}}% normally 1
\DeclareCaptionFont{onehalfspacing}{\onehalfspacing}
\DeclareCaptionFont{doublespacing}{\doublespacing}
@@ -765,9 +773,9 @@
#2}%
}%
}}
-\@ifundefined{abovecaptionskip}{%
+\caption@ifundefined\abovecaptionskip{%
\newlength\abovecaptionskip\setlength\abovecaptionskip{10\p@}}{}
-\@ifundefined{belowcaptionskip}{%
+\caption@ifundefined\belowcaptionskip{%
\newlength\belowcaptionskip\setlength\belowcaptionskip{0\p@}}{}
\DeclareCaptionOption{aboveskip}{\setlength\abovecaptionskip{#1}}
\DeclareCaptionOption{belowskip}{\setlength\belowcaptionskip{#1}}
@@ -864,7 +872,7 @@
\fi
\vskip\belowcaptionskip}}
\providecommand*\caption@ifamsclass{%
- \@ifundefined{@captionheadfont}\@gobble\@firstofone}
+ \caption@ifundefined\@captionheadfont\@gobble\@firstofone}
\@onlypreamble\caption@ifamsclass
\caption@ifamsclass{%
\caption@CheckCommand\@makecaption{%
@@ -931,7 +939,7 @@
\begingroup\edef\@tempa{\endgroup
\noexpand\caption@g@addto@list\noexpand\caption@sty@default
{margin=\the\captionmargin
- \@ifundefined{smf@makecaption}{}{,maxmargin=.1\linewidth}}}
+ \caption@ifundefined\smf@makecaption{}{,maxmargin=.1\linewidth}}}
\@tempa
\caption@g@addto@list\caption@sls@default{margin*=.5\captionmargin}
\DeclareCaptionLabelSeparator{default}{.\enspace}
@@ -996,7 +1004,7 @@
\setbeamertemplate{caption}[caption3]}
}
\providecommand*\caption@ifkomaclass{%
- \@ifundefined{scr@caption}\@gobble\@firstofone}
+ \caption@ifundefined\scr@caption\@gobble\@firstofone}
\@onlypreamble\caption@ifkomaclass
\caption@ifkomaclass{%
\caption@CheckCommand\@makecaption{%
@@ -1035,7 +1043,7 @@
\DeclareCaptionDefaultFont{labelfont}{\scr@fnt@captionlabel}
}
\providecommand*\caption@ifntgclass{%
- \@ifundefined{CaptionFonts}\@gobble\@firstofone}
+ \caption@ifundefined\CaptionFonts\@gobble\@firstofone}
\@onlypreamble\caption@ifntgclass
\caption@ifntgclass{%
\caption@CheckCommand\@makecaption{%
@@ -1054,7 +1062,7 @@
\DeclareCaptionDefaultFont{textfont}{\CaptionTextFont}
}
\providecommand*\caption@ifthesisclass{%
- \@ifundefined{cph@font}{\@gobble}{\@ifundefined{cpb@font}\@gobble\@firstofone}}
+ \caption@ifundefined\cph@font{\@gobble}{\caption@ifundefined\cpb@font\@gobble\@firstofone}}
\caption@ifthesisclass{%
\caption@CheckCommand\@makecaption{%
% thesis.cls 1996/25/01 1.0g LaTeX document class (wm).
@@ -1071,7 +1079,7 @@
\DeclareCaptionDefaultFont{labelfont}{\cph@font}
\DeclareCaptionDefaultFont{textfont}{\cpb@font}
}
-\@ifundefined{FB@makecaption}{}{%
+\caption@ifundefined\FB@makecaption{}{%
\caption@CheckCommand\@makecaption{%
% frenchb.ldf [2005/02/06 v1.6g French support from the babel system]
% frenchb.ldf [2007/10/05 v2.0e French support from the babel system]
@@ -1099,7 +1107,7 @@
\fi
\fi
}
-\@ifundefined{frenchTeXmods}{}{%
+\caption@ifundefined\frenchTeXmods{}{%
\caption@CheckCommand\@makecaption{%
% french(le).sty [2006/10/03 The french(le) package /V5,9991/]
% french(le).sty [2007/06/28 The french(le) package /V5,9994/]
@@ -1113,7 +1121,7 @@
\@mcORI{#1}{\relax\captionfont{#2}}%
\else
\@mcORI{#1}{#2}%
- \fi}}
+ \fi}}%
\caption@CheckCommand\@makecaption{%
% french(le).sty [2007/02/11 The french(le) package /V5,9993/]
\def\@makecaption#1#2{%
@@ -1126,11 +1134,24 @@
\@mcORI{#1}{\relax\captionfont{#2}}%
\else
\@mcORI{#1}{#2}%
- \fi}}
+ \fi}}%
\DeclareCaptionDefaultFont{textfont}{\itshape}%
\DeclareCaptionLabelSeparator{default}{\captionseparator\space}%
}
\DeclareCaptionListFormat{subperiod}{#2.}
+\caption@ifundefined\hunnewlabel{}{%
+ \caption@CheckCommand\@makecaption{%
+ % magyar.ldf [2005/03/30 v1.4j Magyar support from the babel system]
+ \def\@makecaption#1#2{%
+ \vskip\abovecaptionskip
+ \sbox\@tempboxa{#1. #2}%
+ \ifdim \wd\@tempboxa >\hsize
+ {#1. #2\csname par\endcsname}
+ \else
+ \global \@minipagefalse
+ \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
+ \fi
+ \vskip\belowcaptionskip}}}
\def\caption@tempa#1{\@ifundefined{extras#1}{}{%
\expandafter\addto\csname extras#1\endcsname{%
% change default labelsep and listformat
@@ -1349,9 +1370,9 @@
\KV@caption@DCT@within\caption@within@default
\caption@DeclareWithinOption{#2}%
\KV@caption@DCT@placement{tbp}%
- \@ifundefined{c@float@type}%
+ \caption@ifundefined\c@float@type
{\newcounter{float@type}%
- \setcounter{float@type}{\@ifundefined{c@figure}14}}%
+ \setcounter{float@type}{\caption@ifundefined\c@figure14}}%
{}%
\caption@Debug{float type `#2'=\the\value{float@type}}%
\expandafter\xdef\csname ftype@#2\endcsname{\the\value{float@type}}%
@@ -1362,7 +1383,7 @@
\newenvironment{#2*}{\@dblfloat{#2}}{\end@dblfloat}%
\expandafter\newcommand\csname listof#2s\endcsname{\caption@listof{#2}}%
\expandafter\newcommand\csname listof#2es\endcsname{\caption@listof{#2}}%
- \@ifundefined{l@figure}%
+ \caption@ifundefined\l@figure
{\@namedef{l@#2}{\@dottedtocline{1}{1.5em}{2.3em}}}%
{\expandafter\let\csname l@#2\endcsname\l@figure}%
\expandafter\newcommand\csname #2name\endcsname{}%
@@ -1375,14 +1396,14 @@
\expandafter\xdef\csname list#2name\endcsname{List of \@tempa s}%
\@cons\caption@typelist{{#2}}%
\caption@setkeys[caption]{caption@DCT}{#1}%
- \@ifundefined{float@exts}{\newtoks\float@exts}{}%
+ \caption@ifundefined\float@exts{\newtoks\float@exts}{}%
\let\float@do=\relax
\edef\@tempa{\noexpand\float@exts{\the\float@exts\float@do{\@nameuse{ext@#2}}}}%
\@tempa
- \@ifundefined{float@addtolists}{%
+ \caption@ifundefined\float@addtolists{%
\newcommand\float@addtolists[1]{%
\def\float@do####1{\addtocontents{####1}{##1}}\the\float@exts}%
- \@ifundefined{@chapter}{}{\caption@PatchChapter}}{}%
+ \caption@ifundefined\@chapter{}{\caption@PatchChapter}}{}%
\@ifnextchar[\@@DeclareCaptionType\relax}
\@onlypreamble\@DeclareCaptionType
\def\@@DeclareCaptionType[#1]{%
@@ -1392,9 +1413,9 @@
\def\@@@DeclareCaptionType[#1]{%
\KV@caption@DCT@listname{#1}}
\@onlypreamble\@@@DeclareCaptionType
-\let\DeclareFloatingEnvironment\DeclareCaptionType % old command name
+\let\DeclareFloatingEnvironment\DeclareCaptionType % alternative command name
\@onlypreamble\DeclareFloatingEnvironment
-\newcommand*\caption@within@default{\@ifundefined{c@chapter}{none}{chapter}}
+\newcommand*\caption@within@default{\caption@ifundefined\c@chapter{none}{chapter}}
\@onlypreamble\caption@within@default
\newcommand*\caption@listof[1]{%
\begingroup
@@ -1415,7 +1436,7 @@
\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}}%
+ \caption@ifundefined\c@chapter{}{\@removefromreset\caption@type{chapter}}%
\@removefromreset\caption@type{section}%
\begingroup
\caption@setkeys[caption]{caption@within}{#1}%
@@ -1426,7 +1447,7 @@
\define@key{caption@within}{section}[]{%
\@addtoreset\caption@type{section}%
\caption@within{\ifnum\c@section>\z@ \thesection.\fi}{\theHsection.}}
-\@ifundefined{c@chapter}{}{%
+\caption@ifundefined\c@chapter{}{%
\define@key{caption@within}{chapter}[]{%
\@addtoreset\caption@type{chapter}%
\caption@within{\ifnum\c@chapter>\z@ \thechapter.\fi}{\theHchapter.}}
@@ -1566,7 +1587,7 @@
\fi
\@makechapterhead{##2}\@afterheading}%
% scrreprt/scrbook.cls
- \@ifundefined{KOMAClassName}{}{%
+ \caption@ifundefined\KOMAClassName{}{%
\caption@Debug{document class `\KOMAClassName' detected}%
\let\caption@patch@chapter\@gobblethree}%
% rapport1/3.cls [2004/06/07 v2.1a NTG LaTeX document class]
@@ -1800,7 +1821,7 @@
}}
\@onlypreamble\caption@@declaresubtype
\newcommand*\caption@declaresublistentry{%
- \@ifundefined{l@chapter}%
+ \caption@ifundefined\l@chapter
{\caption@@declaresublistentry\l@subsubsection}%
{\caption@@declaresublistentry\l@subsection}}
\@onlypreamble\caption@declaresublistentry
diff --git a/Master/texmf-dist/tex/latex/caption/ltcaption.sty b/Master/texmf-dist/tex/latex/caption/ltcaption.sty
index 963cf11c899..9a326f141d0 100644
--- a/Master/texmf-dist/tex/latex/caption/ltcaption.sty
+++ b/Master/texmf-dist/tex/latex/caption/ltcaption.sty
@@ -30,6 +30,8 @@
%%
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
\ProvidesPackage{ltcaption}[2011/01/01 v1.2a longtable captions (AR)]
+\@ifpackageloaded{longtable}{}{%
+ \PackageError{ltcaption}{longtable package not loaded, aborting}{RTFM}}
\providecommand*\LTcaptype{table}
\providecommand*\ext@table{lot}
\@ifundefined{caption@AtBeginDocument}\AtBeginDocument\caption@AtBeginDocument{%
diff --git a/Master/texmf-dist/tex/latex/caption/subcaption.sty b/Master/texmf-dist/tex/latex/caption/subcaption.sty
index 9469cf5863b..89b2cd69f54 100644
--- a/Master/texmf-dist/tex/latex/caption/subcaption.sty
+++ b/Master/texmf-dist/tex/latex/caption/subcaption.sty
@@ -29,36 +29,47 @@
%% caption-eng.tex, and caption-rus.tex.
%%
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{subcaption}[2011/01/22 v1.0c Adding subcaptions (AR)]
-\@ifundefined{subfigure}{}{%
+\ProvidesPackage{subcaption}[2011/08/18 v1.1a Adding subcaptions (AR)]
+\RequirePackage{caption}[2011/08/18] % needs v3.2b or newer
+\caption@ifundefined\subfigure{}{%
\PackageError{subcaption}{%
This package can't be used in cooperation\MessageBreak
- with the subfigure package}%
+ with the subfigure package}{RTFM}%
\endinput}
-\@ifundefined{subfloat}{}{%
+\caption@ifundefined\subfloat{}{%
\PackageError{subcaption}{%
This package can't be used in cooperation\MessageBreak
- with the subfig package}%
+ with the subfig package}{RTFM}%
\endinput}
-\RequirePackage{caption}[2010/12/01] % needs v3.2 or newer
\caption@SetupOptions{subcaption}{\captionsetup[sub]{#2}}%
\caption@ExecuteOptions{subcaption}{%
font+=small,labelformat=parens,labelsep=space,skip=6pt,list=0,hypcap=0}
\caption@ProcessOptions*{subcaption}
-\@ifundefined{c@figure}{}{\DeclareCaptionSubType{figure}}
-\@ifundefined{c@table}{}{\DeclareCaptionSubType{table}}
+\caption@ifundefined\c@figure{}{\DeclareCaptionSubType{figure}}
+\caption@ifundefined\c@table{}{\DeclareCaptionSubType{table}}
\caption@For{typelist}{\DeclareCaptionSubType{#1}}
-\newcommand*\subcaption{\captionsetup{subtype*}\caption}
-\g@addto@macro\caption@subtypehook{\let\subcaption\caption}
+\newcommand*\subcaption{%
+ \caption@iftype
+ {\setcaptionsubtype*\caption}%
+ {\caption@Error{\noexpand\subcaption outside float}%
+ \caption@withoptargs\@gobbletwo}}%
+\g@addto@macro\caption@subtypehook{%
+ \let\subcaption\caption}
+\newcommand*\phantomsubcaption{%
+ \caption@iftype
+ {\setcaptionsubtype*\phantomcaption}%
+ {\caption@Error{\noexpand\phantomsubcaption outside float}}}%
+\g@addto@macro\caption@subtypehook{%
+ \let\phantomsubcaption\phantomcaption}
\caption@For{subtypelist}{%
\newenvironment{sub#1}%
{\caption@withoptargs\subcaption@minipage}%
{\endminipage}}%
\newcommand*\subcaption@minipage[2]{%
\minipage#1{#2}%
- \captionsetup{subtype}}
+ \setcaptionsubtype\relax}
\newcommand*\subcaptionbox{%
- \def\captionbox@type{subtype}%
+ \let\captionbox@settype\setcaptionsubtype
\caption@withoptargs\caption@box}
\g@addto@macro\caption@subtypehook{%
\ifx\label\subcaption@label \else
@@ -71,8 +82,27 @@
\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}}
+\DeclareRobustCommand*\subref{\@ifstar{\subcaption@ref*}\@subref}
+\newcommand*\@subref{%
+ \caption@withoptargs\@@subref}
+\newcommand*\@@subref[2]{%
+ \caption@ifundefined\hyperref
+ {\subcaption@ref#1{#2}}%
+ {\hyperref[#2]{\subcaption@ref*#1{#2}}}}
+\newcommand*\subcaption@ref{%
+ \caption@withoptargs\subcaption@@ref}
+\newcommand*\subcaption@@ref[2]{%
+ \begingroup
+ \caption@setoptions*{sub}%
+ \subcaption@reffmt\p@subref{\ref#1{sub@#2}}%
+ \endgroup}
+\newcommand*\p@subref{}
+\DeclareCaptionOption{subrefformat}{\subcaption@setrefformat{#1}}
+\newcommand*\subcaption@setrefformat[1]{%
+ \@ifundefined{caption@lfmt@#1}%
+ {\caption@Error{Undefined label format `#1'}}%
+ {\expandafter\let\expandafter\subcaption@reffmt\csname caption@lfmt@#1\endcsname}}
+\subcaption@setrefformat{simple}
\endinput
%%
%% End of file `subcaption.sty'.