summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/caption
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-01-09 00:39:21 +0000
committerKarl Berry <karl@freefriends.org>2013-01-09 00:39:21 +0000
commit60cbc8437dcfde310f54a43fd254865ec7e5296a (patch)
tree119dc082348b649e2fa1fb8eb6ba90639fe764df /Master/texmf-dist/tex/latex/caption
parent7e39ebb4ceedd3a7699e90140504b8373cdf26cf (diff)
caption (8jan13)
git-svn-id: svn://tug.org/texlive/trunk@28765 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/caption')
-rw-r--r--Master/texmf-dist/tex/latex/caption/bicaption.sty64
-rw-r--r--Master/texmf-dist/tex/latex/caption/caption.sty364
-rw-r--r--Master/texmf-dist/tex/latex/caption/caption2.sty2
-rw-r--r--Master/texmf-dist/tex/latex/caption/caption3.sty163
-rw-r--r--Master/texmf-dist/tex/latex/caption/ltcaption.sty2
-rw-r--r--Master/texmf-dist/tex/latex/caption/newfloat.sty69
-rw-r--r--Master/texmf-dist/tex/latex/caption/subcaption.sty49
7 files changed, 401 insertions, 312 deletions
diff --git a/Master/texmf-dist/tex/latex/caption/bicaption.sty b/Master/texmf-dist/tex/latex/caption/bicaption.sty
index 1f3e8f7841c..94b6fecdb8a 100644
--- a/Master/texmf-dist/tex/latex/caption/bicaption.sty
+++ b/Master/texmf-dist/tex/latex/caption/bicaption.sty
@@ -6,7 +6,7 @@
%%
%% bicaption.dtx (with options: `package')
%%
-%% Copyright (C) 1994-2012 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
+%% Copyright (C) 1994-2013 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
%%
%% --------------------------------------------------------------------------
%%
@@ -29,12 +29,16 @@
%% and the user manuals caption-deu.tex, caption-eng.tex, and caption-rus.tex.
%%
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{bicaption}[2011/10/30 v1.0a Bilingual Captions (AR)]
-\RequirePackage{caption}[2011/08/28] % needs v3.2c or newer
+\ProvidesPackage{bicaption}[2012/12/26 v1.1 Bilingual Captions (AR)]
+\RequirePackage{caption}[2012/12/26] % needs v3.3 or newer
\caption@AtBeginDocument{\caption@ifcompatibility{%
\caption@Error{%
The `bicaption' package does not work correctly\MessageBreak
in compatibility mode}}{}}
+\newcommand*\bicaption@Info[1]{%
+ \PackageInfo{bicaption}{#1}}
+\newcommand*\bicaption@InfoNoLine[1]{%
+ \PackageInfo{bicaption}{#1\@gobble}}
\newcommand*\bicaption@Warning[1]{%
\bicaption@WarningNoLine{#1\on@line}}
\newcommand*\bicaption@WarningNoLine[1]{%
@@ -65,34 +69,39 @@
\caption@set@bool\bicaption@ifswap{#1}}
\DeclareCaptionOption{lang}{\def\bicaption@language{#1}}
\let\KV@caption@language\KV@caption@lang
-\newcommand*\bicaption@selectlanguage{%
- \@ifstar
- {\bicaption@select@language\select@language}
- {\bicaption@select@language\selectlanguage}}
-\newcommand*\bicaption@select@language[1]{%
+\newcommand*\bicaption@selectlanguage[1]{%
\caption@ifundefined\bicaption@language{}{%
- \expandafter#1\expandafter{\bicaption@language}}}
+ \expandafter\selectcaptionlanguage\expandafter#1\expandafter{\bicaption@language}}}
\g@addto@macro\caption@applyfont{%
- \bicaption@selectlanguage*}
+ \bicaption@selectlanguage\@firstoftwo}
\g@addto@macro\caption@prepareslc{%
\let\bicaption@language\@undefined}
+\providecommand*\selectcaptionlanguage[1]{%
+ #1\select@language\selectlanguage}
\caption@ExecuteOptions{caption}{bi-lang=0,bi-slc=1,bi-swap=0}
-\ifcsname bbl@main@language\endcsname
- \edef\@tempa{\noexpand\captionsetup[bi-first]{lang=\bbl@main@language}}
- \@tempa
+\ifcsname captionmainlanguage\endcsname
+ \bicaption@InfoNoLine{main language is set to \captionmainlanguage}
+\else\ifcsname bbl@main@language\endcsname
+ \bicaption@InfoNoLine{babel found, main language is \bbl@main@language}
+ \let\captionmainlanguage\bbl@main@language
\else\ifcsname xpg@main@language\endcsname
- \edef\@tempa{\noexpand\captionsetup[bi-first]{lang=\xpg@main@language}}
- \@tempa
+ \bicaption@InfoNoLine{polyglossia found, main language is \xpg@main@language}
+ \let\captionmainlanguage\xpg@main@language
\else
- \bicaption@WarningNoLine{Please load this package after the babel package}
-\fi\fi
+ \bicaption@InfoNoLine{main language is not set}
+\fi\fi\fi
+\ifcsname captionmainlanguage\endcsname
+ \edef\@tempa{\noexpand\captionsetup[bi-first]{lang=\captionmainlanguage}}
+ \@tempa
+\fi
\caption@SetupOptions{bicaption}{\captionsetup[bi-second]{#2}}%
\caption@ProcessOptions*{bicaption}
-\let\caption@kernel@addcontentsline@ORI\caption@kernel@addcontentsline
-\renewcommand*\caption@kernel@addcontentsline[2]{%
+\let\bicaption@addcontentsline@ORI\caption@addcontentsline
+\renewcommand*\caption@addcontentsline[2]{%
\caption@ifundefined\bicaption@lentry
- {\caption@kernel@addcontentsline@ORI{#1}{#2}}%
- {\expandafter\bicaption@addcontentsline\expandafter{\bicaption@lentry}{#1}{#2}%
+ {\bicaption@addcontentsline@ORI{#1}{#2}}%
+ {\expandafter\bicaption@addcontentsline\expandafter
+ {\bicaption@lentry}{#1}{#2}%
\global\let\bicaption@lentry\@undefined}}
\newcommand\bicaption@addcontentsline[3]{%
\begingroup
@@ -112,22 +121,21 @@
\endgroup}
\newcommand*\bicaption@@addcontentsline[2]{%
\caption@ifcontentsline{#2}{%
- \bicaption@selectlanguage\relax
- \caption@kernel@addcontentsline@ORI{#1}{#2}}}
+ \bicaption@selectlanguage\@secondoftwo
+ \bicaption@addcontentsline@ORI{#1}{#2}}}
\let\caption@@make@ORI\caption@@make
\renewcommand\caption@@make[2]{%
\caption@ifundefined\bicaption@text
{\caption@@make@ORI{#1}{#2}}%
- {\expandafter\bicaption@@make\expandafter{\bicaption@text}{#1}{#2}%
+ {\expandafter\bicaption@@make\expandafter
+ {\bicaption@text}{#1}{#2}%
\global\let\bicaption@text\@undefined}}
\newcommand\bicaption@@make[3]{%
\caption@setoptions{bi}%
\ifnum\bicaption@lang=0\relax
\bicaption@ifslc
- {\caption@@slc{#2}{#3}{\captionwidth}{}%
- {\caption@set@bool\caption@ifslc0}%
- \caption@@slc{#2}{#1}{\captionwidth}{}%
- {\caption@set@bool\caption@ifslc0}}%
+ {\caption@slc{#2}{#3}{}{\KV@caption@singlelinecheck0}%
+ \caption@slc{#2}{#1}{}{\KV@caption@singlelinecheck0}}%
{}%
\fi
\ifnum\bicaption@lang=2\relax
diff --git a/Master/texmf-dist/tex/latex/caption/caption.sty b/Master/texmf-dist/tex/latex/caption/caption.sty
index 324e981af4f..bf396d89096 100644
--- a/Master/texmf-dist/tex/latex/caption/caption.sty
+++ b/Master/texmf-dist/tex/latex/caption/caption.sty
@@ -6,7 +6,7 @@
%%
%% caption.dtx (with options: `package')
%%
-%% Copyright (C) 1994-2012 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
+%% Copyright (C) 1994-2013 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
%%
%% --------------------------------------------------------------------------
%%
@@ -28,9 +28,10 @@
%% bicaption.sty, ltcaption.sty, subcaption.sty, and newfloat.sty,
%% and the user manuals caption-deu.tex, caption-eng.tex, and caption-rus.tex.
%%
+ % bicaption.sty, ltcaption.sty, subcaption.sty, and newfloat.sty,
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption}[2012/02/19 v3.2f Customizing captions (AR)]
-\RequirePackage{caption3}[2011/08/30] % needs v1.4 or newer
+\ProvidesPackage{caption}[2013/01/06 v3.3 Customizing captions (AR)]
+\RequirePackage{caption3}[2012/12/26] % needs v1.5 or newer
\caption@ifbool{documentclass}{}{%
\caption@WarningNoLine{%
Unsupported document class (or package) detected,\MessageBreak
@@ -65,7 +66,6 @@
\@onlypreamble@key{caption}{figurename}
\DeclareCaptionOption{tablename}{\caption@SetName{table}{#1}}
\@onlypreamble@key{caption}{tablename}
-\DeclareCaptionOption{name}{\caption@setname\@captype{#1}}
\DeclareCaptionOption{listfigurename}{\caption@SetName{listfigure}{#1}}
\@onlypreamble@key{caption}{listfigurename}
\DeclareCaptionOption{listtablename}{\caption@SetName{listtable}{#1}}
@@ -73,6 +73,7 @@
\newcommand*\caption@SetName[2]{%
\caption@NewFloat{\newfloat@setname{#1}{#2}}}
\@onlypreamble\caption@SetName
+\DeclareCaptionOption{name}{\caption@setname\@captype{#1}}
\newcommand*\caption@setname[2]{%
\@namedef{#1name}{#2}}
\newcommand*\caption@DeclareWithinOption[1]{%
@@ -97,6 +98,16 @@
\InputIfFileExists{#1.cfg}%
{\typeout{*** Local configuration file #1.cfg used ***}}%
{\caption@Warning{Configuration file #1.cfg not found}}}
+\newcommand*\caption@selectlistentry[1]{%
+ \caption@ifinlist{#1}{heading}{%
+ \let\caption@iflistheading\@firstoftwo
+ }{\caption@ifinlist{#1}{default,list-entry,entry}{%
+ \let\caption@iflistheading\@secondoftwo
+ }{%
+ \caption@Error{Undefined list-entry selection `#1'}%
+ }}}
+\DeclareCaptionOption{list-entry}{\caption@selectlistentry{#1}}
+\captionsetup{list-entry=default}
\newcommand*\caption@setparboxrestore[1]{%
\caption@ifinlist{#1}{full}{%
\caption@setfullparboxrestore
@@ -128,9 +139,6 @@
\DeclareCaptionOptionNoValue*{center}{%
\caption@setformat{plain}%
\caption@setjustification{centering}}
-\DeclareCaptionOptionNoValue*{anne}{%
- \caption@setformat{plain}%
- \caption@setjustification{centerlast}}
\DeclareCaptionOptionNoValue*{centerlast}{%
\caption@setformat{plain}%
\caption@setjustification{centerlast}}
@@ -263,12 +271,14 @@
}
\caption@SetupOptions{caption}{\caption@setkeys{#1}{#2}}
\caption@ProcessOptions*{caption}
+\newif\ifcaption@caption
+\newif\ifcaption@subcaption
+\newif\ifcaption@ContinuedFloat
\def\caption@caption{%
\caption@iftype
{\caption@checkgrouplevel\@empty\caption
\caption@star
- {\@nameuse{donemaincaptiontrue}%
- \caption@refstepcounter\@captype}%
+ {\caption@refstepcounter\@captype}%
{\caption@dblarg{\@caption\@captype}}}%
{\caption@Error{\noexpand\caption outside float}%
\caption@gobble}}
@@ -278,6 +288,7 @@
\ifcaption@star \else
\caption@prepareanchor{#1}{#2}%
\memcaptioninfo{#1}{\csname the#1\endcsname}{#2}{#3}%
+ \@nameuse{nag@hascaptiontrue}%
\fi
\par
\caption@beginex{#1}{#2}{#3}%
@@ -298,7 +309,7 @@
\providecommand\memcaptioninfo[4]{}
\newcommand*\caption@prepareanchor[2]{%
\caption@makecurrent{#1}{#2}%
- \caption@ifhypcap\caption@@start{}%
+ \caption@ifhypcap\caption@@start\relax
\M@gettitle{#2}}
\long\def\caption@makecaption#1#2{%
\caption@iftop
@@ -337,7 +348,7 @@
}}%
\caption@CheckCommand\caption{%
% float.sty [2001/11/08 v1.3d Float enhancements (AL)]
- \renewcommand\caption{%
+ \long\def\caption{%
\ifx\@captype\@undefined
\@latex@error{\noexpand\caption outside float}\@ehd
\expandafter\@gobble
@@ -391,7 +402,7 @@
\caption@CheckCommand\caption{%
% memhfixc.sty [2010/08/17 v1.15 nameref/hyperref package fixes for memoir class]
% \let\m@moldhypcaption\caption
- \renewcommand{\caption}{\donemaincaptiontrue\m@moldhypcaption}}%
+ \long\def\caption{\donemaincaptiontrue\m@moldhypcaption}}%
\caption@IfCheckCommand{}{%
\caption@InfoNoLine{%
Incompatible package detected (regarding \string\caption).\MessageBreak
@@ -423,6 +434,13 @@
\beamer@makecaption{#1}{\ignorespaces #3}\par\nobreak
\endgroup}}%
\caption@CheckCommand\@caption{%
+ % memhfixc.sty [2010/08/17 v1.15 nameref/hyperref package fixes for memoir class]
+ \long\def\@caption#1[#2]#3{%
+ \MNR@old@caption{#1}[{#2}]{#3}%
+ \def\@currentlabelname{#2}%
+ \M@gettitle{#2}%
+ }}%
+ \caption@CheckCommand\@caption{%
% magyar.ldf [2005/03/30 v1.4j Magyar support from the babel system]
\long\def\@caption#1[#2]#3{%
\csname par\endcsname
@@ -682,6 +700,11 @@
{\caption@@settype{sub}*{sub\@captype}}%
{\caption@@settype{sub}{sub\@captype}}}%
\newcommand*\caption@settype{%
+ \global\caption@captionfalse
+ \global\caption@subcaptionfalse
+ \global\caption@ContinuedFloatfalse
+ \caption@set@type}
+\newcommand*\caption@set@type{%
\caption@@settype{}}
\newcommand*\caption@@settype[1]{%
\caption@teststar{\caption@@@settype{#1}}\@firstoftwo\@secondoftwo}
@@ -704,7 +727,6 @@
The #1caption type was already set to
`\csname @#1captype\endcsname'\MessageBreak}}%
\fi
- \let\caption@ifrefstepcounter\@secondoftwo
#2{}{%
\let\@currentlabel\caption@undefinedlabel
\ifx\caption@x@label\@undefined
@@ -766,34 +788,33 @@
\caption@addcontentsline{#2}{#3}%
\@esphack}
\newcommand*\captionbox{%
- \let\captionbox@settype\@gobble
- \caption@withoptargs\caption@box}
-\newcommand\caption@box[2]{%
- \@testopt{\caption@ibox{#1}{#2}}{\wd\@tempboxa}}
-\long\def\caption@ibox#1#2[#3]{%
- \@testopt{\caption@iibox{#1}{#2}{#3}}\captionbox@hj@default}
-\long\def\caption@iibox#1#2#3[#4]#5{%
- \setbox\@tempboxa\hbox{#5}%
+ \caption@withoptargs{\caption@ibox\@gobble}}
+\newcommand\caption@ibox[3]{%
+ \@testopt{\caption@iibox{#1}{#2}{#3}}{\wd\@tempboxa}}
+\long\def\caption@iibox#1#2#3[#4]{%
+ \@testopt{\caption@iiibox{#1}{#2}{#3}{#4}}\captionbox@hj@default}
+\long\def\caption@iiibox#1#2#3#4[#5]#6{%
+ \setbox\@tempboxa\hbox{#6}%
\begingroup
- \captionbox@settype*% set \caption@position
+ #1*% set \caption@position
\caption@iftop{%
\endgroup
- \parbox[t]{#3}{%
- \captionbox@settype\relax
+ \parbox[t]{#4}{%
+ #1\relax
\caption@setposition t%
- \vbox{\caption#1{#2}}%
+ \vbox{\caption#2{#3}}%
\captionbox@hrule
- \csname caption@hj@#4\endcsname
+ \csname caption@hj@#5\endcsname
\unhbox\@tempboxa}%
}{%
\endgroup
- \parbox[b]{#3}{%
- \captionbox@settype\relax
+ \parbox[b]{#4}{%
+ #1\relax
\caption@setposition b%
- \csname caption@hj@#4\endcsname
+ \csname caption@hj@#5\endcsname
\unhbox\@tempboxa
\captionbox@hrule
- \vtop{\caption#1{#2}}}%
+ \vtop{\caption#2{#3}}}%
}}
\newcommand*\captionbox@hj@default{c}
\newcommand*\captionbox@hrule{\hrule\@height\z@\relax}
@@ -803,42 +824,38 @@
\providecommand*\caption@hj@s{}
\def\ContinuedFloat{%
\caption@iftype
- {\addtocounter\@captype\m@ne
- \caption@ContinuedFloat\@captype}%
+ {\caption@ContinuedFloat\@captype}%
{\caption@Error{\noexpand\ContinuedFloat outside float}}}
-\def\caption@ContinuedFloat#1{%
- \@ifstar{\caption@Continued@Float@{#1}}{\caption@Continued@Float{#1}}}
-\def\caption@Continued@Float@{%
- \addtocounter\@captype\@ne
- \@stpelt{ContinuedFloat}\stepcounter{ContinuedFloat}%
- \def\caption@resetContinuedFloat##1{\xdef\caption@CFtype{##1}}%
- \caption@@ContinuedFloat}
-\def\caption@Continued@Float#1{%
+\newcommand*\caption@ContinuedFloat[1]{%
+ \@ifstar
+ {\caption@@refstepcounter\@captype
+ \caption@@ContinuedFloat{#1}}%
+ {\caption@Continued@Float{#1}}}
+\newcommand*\caption@Continued@Float[1]{%
\edef\caption@tempa{#1}%
\ifx\caption@tempa\caption@CFtype
- \stepcounter{ContinuedFloat}%
- \let\caption@resetContinuedFloat\@gobble
\caption@@ContinuedFloat{#1}%
- \sf@ContinuedFloat{#1}%
\else
\caption@Error{Continued `#1' after `\caption@CFtype'}%
\fi}
-\def\caption@@ContinuedFloat#1{%
+\newcommand*\caption@@ContinuedFloat[1]{%
+ \global\caption@ContinuedFloattrue
+ \stepcounter{ContinuedFloat}%
+ \caption@@@ContinuedFloat{#1}}
+\newcommand*\caption@@@ContinuedFloat[1]{%
+ \caption@setoptions{ContinuedFloat}%
+ \caption@setoptions{continued#1}%
\expandafter\l@addto@macro\csname the#1\endcsname\theContinuedFloat
\@ifundefined{theH#1}{}{%
\expandafter\l@addto@macro\csname theH#1\endcsname{%
\@alph\c@ContinuedFloat}}%
- \caption@setoptions{ContinuedFloat}%
- \caption@setoptions{continued#1}}
-\providecommand*\sf@ContinuedFloat[1]{}
+ \let\caption@@@ContinuedFloat\@gobble}
\newcommand*\caption@CFtype{??}
\newcounter{ContinuedFloat}
\let\theContinuedFloat\@empty
\newcommand*\caption@resetContinuedFloat[1]{%
- \@stpelt{ContinuedFloat}%
\xdef\caption@CFtype{#1}%
- \def\ContinuedFloat{\caption@Error{%
- \noexpand\ContinuedFloat must be placed at the top of the environment}}}
+ \@stpelt{ContinuedFloat}}
\newcommand\phantomcaption{%
\caption@iftype
{\caption@refstepcounter\@captype}%
@@ -846,28 +863,63 @@
\newcommand*\caption@refstepcounter[1]{%
\@ifundefined{c@#1}%
{\caption@Error{No float type '#1' defined}}%
- {\caption@resetContinuedFloat{#1}%
- \caption@@refstepcounter{#1}%
- \let\caption@ifrefstepcounter\@firstoftwo}}
-\newcommand*\caption@@refstepcounter{\refstepcounter}
-\let\caption@ifrefstepcounter\@secondoftwo
-\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}}%
+ {\caption@ref@stepcounter{#1}%
+ \caption@fixposition
+ \caption@iftop{\global\caption@captiontrue}{\global\caption@captionfalse}%
+ \global\caption@subcaptionfalse
+ \@nameuse{donemaincaptiontrue}}}
+\newcommand*\caption@ref@stepcounter{%
+ \ifcaption@ContinuedFloat
+ \let\caption@tempa\caption@@refcounter
+ \global\caption@ContinuedFloatfalse
+ \else
+ \let\caption@tempa\caption@@refstepcounter
+ \ifcaption@caption \else
+ \ifcaption@subcaption
+ \let\caption@tempa\caption@@refcounter
+ \fi
+ \fi
+ \fi
+ \caption@tempa}
+\newcommand*\caption@@refcounter[1]{%
+ \let\caption@stepcounter@ORI\stepcounter
+ \def\stepcounter##1{%
+ \def\caption@tempa{#1}%
+ \def\caption@tempb{##1}%
+ \ifx\caption@tempa\caption@tempb \else
+ \caption@stepcounter@ORI{##1}%
+ \fi}%
+ \caption@@@refstepcounter{#1}%
+ \let\stepcounter\caption@stepcounter@ORI}
+\newcommand*\caption@@refstepcounter[1]{%
+ \caption@prepare@stepcounter{#1}{ref}%
+ \caption@@@refstepcounter{#1}}
+\newcommand*\caption@@stepcounter[1]{%
+ \caption@prepare@stepcounter{#1}{}%
+ \caption@@@stepcounter{#1}}
+\newcommand*\caption@prepare@stepcounter[2]{%
+ \flushsubcaptionlistentries[#2stepcounter]%
+ \caption@resetContinuedFloat{#1}}
+\newcommand*\caption@@@refstepcounter{\refstepcounter}
+\newcommand*\caption@@@stepcounter{\stepcounter}
+\@ifundefined{kernel@ifnextchar}{\let\kernel@ifnextchar\@ifnextchar}{}
+\newcommand\caption@dblarg[1]{%
+ \kernel@ifnextchar[{\caption@ydblarg{#1}}{\caption@xdblarg{#1}}}
+\newcommand\caption@xdblarg[2]{%
+ #1[{#2\relax}]{#2}}
+\long\def\caption@ydblarg#1[#2]#3{%
+ \caption@iflistheading{#1[{#3}]{#3}}{#1[{#2}]{#3}}}
\newcommand*\caption@begin[1]{%
+ \caption@fixposition
\begingroup
- \caption@setfnum{#1}%
- \caption@fixposition
- \global\let\caption@fixedposition\caption@position}
+ \caption@setfnum{#1}}
\newcommand\caption@beginex[3]{%
\caption@begin{#1}%
\let\lst@@caption\relax
\caption@addcontentsline{#1}{#2}%
\caption@ifempty{#3}{}}
\newcommand*\caption@end{%
- \endgroup
- \let\caption@position\caption@fixedposition}
+ \endgroup}
\newcommand*\caption@setfnum[1]{%
\@ifundefined{fnum@#1}{\iftrue}{\ifx\caption@lfmt\caption@lfmt@default\else}%
\@namedef{fnum@#1}{\caption@fnum{#1}}%
@@ -904,7 +956,6 @@
{\NR@gettitle{#1}}}
\def\caption@DeclareSubType sub#1\@nil{%
\caption@Debug{Initializing subtype for `#1'\@gobble}%
- \@namedef{caption@c@#1}{0}%
\@namedef{caption@beginsub#1}{\caption@beginsubfloat{#1}}}
\@onlypreamble\caption@DeclareSubType
\caption@For*{subtypelist}{\caption@DeclareSubType sub#1\@nil}
@@ -915,21 +966,20 @@
\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}%
- \caption@l@stepcounter\@captype
- \let\caption@@@addcontentsline\caption@addsubcontentsline}%
- \ifnum\csname caption@c@\@captype\endcsname=\value\@captype \else
- \caption@Debug{Reset sub\@captype\ counter}%
- \expandafter\xdef\csname caption@c@\@captype\endcsname{%
- \the\value\@captype}%
- \@stpelt\@subcaptype
+ \ifcaption@caption \else
+ \let\caption@add@contentsline\caption@addsubcontentsline
+ \ifcaption@subcaption \else
+ \ifcaption@ContinuedFloat
+ \global\caption@ContinuedFloatfalse
+ \else
+ \caption@@stepcounter\@captype
+ \fi
+ \global\caption@subcaptiontrue
+ \fi
\fi
\c@ContinuedFloat=0\relax
- \let\caption@resetContinuedFloat\@gobble
- \let\caption@addcontentsline\caption@kernel@addcontentsline
\let\caption@setfloatcapt\@firstofone
+ \caption@setbox{parbox}%
\caption@clearmargin
\caption@iflist{}{\let\caption@setlist\@gobble}%
\caption@setoptions{sub}%
@@ -954,25 +1004,20 @@
\newcommand*\caption@subcaption{%
\caption@checkgrouplevel{sub}\subcaption
\caption@star
- {\caption@refstepcounter\@subcaptype}%
+ {\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}}{}%
- \caption@kernel@addcontentsline{#1}{#2}%
- \sf@ifpositiontop{}{\@listsubcaptions{#1}}%
- \caption@addsubcontentslines{#1}}
-\newcommand*\caption@addsubcontentslines[1]{%
- \begingroup
- \caption@subcontentslines
- \endgroup
- \caption@clearsubcontentslines}%
+ \caption@@@refstepcounter\@subcaptype}
+\newcommand*\caption@clearsubcontentslines{%
+ \global\let\caption@subcontentslines\@empty}
+\caption@clearsubcontentslines
\newcommand*\caption@addsubcontentsline[4]{%
+ \caption@Debug{\string\caption@addsubcontentsline{#1}{#2}}%
\begingroup
- \let\label\caption@gobble \let\index\caption@gobble \let\glossary\caption@gobble
+ \let\label\caption@gobble
+ \let\index\caption@gobble
+ \let\glossary\caption@gobble
\protected@edef\@tempa{\endgroup
\noexpand\g@addto@macro\noexpand\caption@subcontentslines{%
\noexpand\@namedef{the#2}{\csname the#2\endcsname}%
@@ -981,20 +1026,22 @@
\fi
\protect\caption@@@addcontentsline{#1}{#2}{#3}{#4}}}%
\@tempa}
-\newcommand*\caption@checksubcontentslines{%
- \ifx\caption@subcontentslines\@empty \else
- \caption@Error{%
- Something's wrong--perhaps a missing \protect\caption\MessageBreak
- in the last figure or table}%
- \caption@clearsubcontentslines
- \fi}
-\newcommand*\caption@clearsubcontentslines{%
- \global\let\caption@subcontentslines\@empty}
-\caption@AtBeginDocument*{%
- \caption@ifundefined\sf@ifpositiontop{\let\sf@ifpositiontop\@gobbletwo}{}%
- \caption@clearsubcontentslines
- \g@addto@macro\caption@typehook{\caption@checksubcontentslines}%
- \AtEndDocument{\caption@checksubcontentslines}}%
+\newcommand*\flushsubcaptionlistentries[1][user]{%
+ \caption@Debug{\string\flushsubcaptionlistentries (#1)}%
+ \begingroup
+ \caption@subcontentslines
+ \endgroup
+ \caption@clearsubcontentslines}
+\AtBeginDocument{\caption@ifundefined\chapter{}{%
+ \let\caption@chapter@ORI\chapter
+ \def\chapter{%
+ \flushsubcaptionlistentries[chapter]\caption@chapter@ORI}}}
+\AtBeginDocument{\caption@ifundefined\appendix{}{%
+ \let\caption@appendix@ORI\appendix
+ \def\appendix{%
+ \flushsubcaptionlistentries[appendix]\caption@appendix@ORI}}}
+\AtEndDocument{%
+ \flushsubcaptionlistentries[AtEndDocument]}
\caption@ifundefined\smf@makecaption{}{\let\smf@makecaption\@makecaption}
\@ifclassloaded{beamer}{%
\caption@InfoNoLine{beamer document class}%
@@ -1085,19 +1132,13 @@
\caption@setbool{needfreeze}{0}
\caption@AtBeginDocument*{%
\caption@ifneedfreeze{%
- \newcommand*\caption@freeze{%
+ \newcommand*\caption@freeze[1]{%
+ \caption@settype*{#1}%
+ \captionsetup*[sub]{hypcap=true}% Note: This is just a (q&d) workaround!
\let\caption@frozen@ContinuedFloat\ContinuedFloat
\def\ContinuedFloat{%
- \caption@withoptargs\caption@SC@ContinuedFloat}%
- \def\caption@SC@ContinuedFloat##1{%
- \caption@@freeze{\ContinuedFloat##1}%
- \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@frozen@ContinuedFloat##1%
- \let\setcounter\caption@frozen@setcounter
- \let\addtocounter\caption@frozen@addtocounter}%
+ \caption@@freeze{\caption@@@ContinuedFloat\@captype}%
+ \caption@frozen@ContinuedFloat}%
\let\caption@frozen@setup\caption@setup
\def\caption@setup##1{%
\caption@@freeze{\caption@setup{##1}}%
@@ -1110,11 +1151,7 @@
\caption@gobble}%
\@ifstar
{\caption@SC@caption*}%
- {\let\caption@frozen@refstepcounter\caption@@refstepcounter
- \let\caption@@refstepcounter\caption@l@stepcounter
- \caption@refstepcounter\@captype
- \let\caption@@refstepcounter\caption@frozen@refstepcounter
- \let\@currentlabel\caption@SClabel
+ {\let\@currentlabel\caption@SClabel
\caption@withoptargs\caption@SC@caption}}%
\long\def\caption@SC@caption##1##2{%
\caption@@freeze{\caption##1{##2}}%
@@ -1141,6 +1178,8 @@
\let\caption@setup\caption@frozen@setup
\let\caption\caption@frozen@caption
\let\label\caption@frozen@label}}%
+ \newcommand*\caption@prepare@defrost{%
+ \let\caption@settype\caption@set@type}
\newcommand*\caption@defrost{%
\ifx\caption@frozen@caption\@undefined
\caption@frozen@content
@@ -1227,13 +1266,7 @@
\def\FP@captype{#1}%
\begin{lrbox}{\FP@floatCorpusBOX}%
\minipage\hsize % changes from LR mode to vertical mode
- \caption@settype*{#1}%
- \caption@freeze
- \global\let\FP@Label\@empty
- \caption@ifFPrefcap
- {}%
- {\def\caption@freeze@label##1##2{%
- \g@addto@macro\FP@Label{\FP@label##1{##2}}}}%
+ \caption@freeze{#1}%
\ignorespaces}%
\renewcommand*\FP@floatEnd{%
\endminipage
@@ -1241,33 +1274,16 @@
\stepcounter{FP@\FP@captype C}%
\caption@label\FP@positionLabel
\FP@helpNote\FP@captype\FP@positionLabel
- \edef\FP@RestoreCounter{%
- \noexpand\setcounter{\FP@captype}{\the\value\FP@captype}%
- \noexpand\setcounter{ContinuedFloat}{\the\value{ContinuedFloat}}}%
\FP@float
{\FP@positionLabel}% location label test
- {\begin\FP@captype[p!]%
+ {\caption@prepare@defrost
+ \begin\FP@captype[p!]%
\usebox\FP@floatCorpusBOX
- \let\caption@SClentry\@empty
- \def\caption{\caption@dblarg{\@caption\@captype}}%
- \long\def\@caption##1[##2]##3{\def\caption@SClentry{##2}}%
- \let\FP@label\label
- \let\label\caption@gobble
- \caption@defrost
- \caption@ifFPlistcap
- {\caption@refstepcounter\@captype
- \expandafter\caption@makecurrent\expandafter\@captype
- \expandafter{\caption@SClentry}}%
- {\ifx\caption@SClentry\@empty \else
- \expandafter\captionlistentry\expandafter{\caption@SClentry}%
- \fi}%
- \caption@makeanchor\relax
- \FP@Label
\end\FP@captype}%
- {\FP@RestoreCounter
- \@ifundefined{theH\FP@captype}{}{%
+ {\@ifundefined{theH\FP@captype}{}{%
\expandafter\l@addto@macro\csname theH\FP@captype\endcsname{.FP}}}%
- {\begin\FP@captype[b!]%
+ {\caption@prepare@defrost
+ \begin\FP@captype[b!]%
\let\FP@savedSetfnumCommand\caption@setfnum
\def\caption@setfnum##1{%
\FP@savedSetfnumCommand{##1}%
@@ -1278,7 +1294,6 @@
\setlength\belowcaptionskip{2pt plus 2pt minus 1pt}% length below caption
\caption@setoptions{FP\@captype}%
\FP@separatorCaption
- \caption@ifFPlistcap{}{\let\caption@addcontentsline\@gobbletwo}%
\caption@defrost
\end\FP@captype}%
}%
@@ -1305,7 +1320,7 @@
because hyperref has stopped early}%
}{%
\g@addto@macro\caption@prepareslc{\measuring@true}%
- \renewcommand*\caption@@refstepcounter{\H@refstepcounter}%
+ \renewcommand*\caption@@@refstepcounter{\H@refstepcounter}%
\renewcommand*\caption@makecurrent[2]{%
\caption@makecurrentHref{#1}%
\caption@Debug{hyperref current=\@currentHref}%
@@ -1383,6 +1398,12 @@
\caption@startanchor\caption@currentHref
\global\let\caption@currentHref\@undefined
\fi}%
+ \caption@ifundefined\HyNew@float@makebox{}{%
+ \caption@ifundefined\HyOrg@float@makebox{%
+ \caption@Debug{%
+ Correcting wrong load order hyperref-float\@gobble}%
+ \let\HyOrg@float@makebox\float@makebox
+ \let\float@makebox\HyNew@float@makebox}{}}%
\caption@ifundefined\HyOrg@float@makebox{}{%
\caption@Debug{%
Redefining \noexpand\float@makebox (again)\@gobble}%
@@ -1466,7 +1487,7 @@
\caption@setoptions{@longtable}%
\caption@setautoposition{\ifcase\LT@rows t\else b\fi}%
\caption@startrue#1\caption@starfalse
- \caption@resetContinuedFloat\LTcaptype
+ \caption@prepare@stepcounter\LTcaptype{LT}%
\caption@begin\LTcaptype
\caption@normalsize
\vskip-\ht\strutbox
@@ -1551,18 +1572,14 @@
\def\rotcaptionof{%
\caption@teststar\caption@of{\rotcaption*}\rotcaption}%
\long\def\@makerotcaption#1#2{%
- \ifdim\captionwidth=\z@
- \setcaptionwidth{.8\textheight}%
- \caption@slc{#1}{#2}{.8\vsize}{%
- \let\caption@makerot\caption@@make
- \caption@clearmargin
- \let\caption@parbox\@secondoftwo}%
- \caption@set@bool\caption@ifslc0% been there, done that
- \fi
- \rotatebox{90}{\caption@makerot{#1}{#2}}%
+ \rotatebox{90}{%
+ \ifdim\captionwidth=\z@
+ \setcaptionwidth{.8\vsize}%
+ \l@addto@macro\caption@singleline{\caption@setbox{none}}%
+ \fi
+ \let\caption@calcmargin\relax
+ \caption@@make{#1}{#2}}%
\nobreak\hspace{12pt}}%
- \newcommand\caption@makerot[2]{%
- \begin{minipage}\captionwidth\caption@@make{#1}{#2}\end{minipage}}%
}{}
\caption@IfPackageLoaded{sidecap}[2003/06/06 v1.6f]{%
\caption@setbool{needfreeze}{1}%
@@ -1570,20 +1587,12 @@
\def\SC@zfloat#1#2#3[#4]{%
\caption@ORI@SC@zfloat{#1}{#2}{#3}[#4]%
\SC@RestoreCommands
- \caption@settype*{#2}%
- \caption@freeze
+ \caption@freeze{#2}%
\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
- \def\caption@settype##1{% will be done in \@xfloat
- \caption@ORI@settype*{##1}% do not change \@currentlabel
- \caption@setSC@justify
-%%% \caption@setoptions{SCfloat}%
- \caption@setoptions{SC\@captype}%
- \caption@start}%
\def\caption@setSC@justify{%
\caption@clearmargin
\ifx\SC@justify\@empty \else
@@ -1591,8 +1600,13 @@
\let\SC@justify\@empty
\fi}%
\let\caption\SC@orig@caption
- \def\SC@orig@caption[##1]##2{\caption@defrost}%
+ \def\SC@orig@caption[##1]##2{%
+ \caption@setSC@justify
+%%% \caption@setoptions{SC}%
+ \caption@setoptions{SC\@captype}%
+ \caption@defrost}%
\caption@setSC@justify % for compatibility mode
+ \caption@prepare@defrost
\caption@ORI@endSC@FLOAT}%
}{}
\caption@IfPackageLoaded{subfigure}[2002/01/23 v2.1]{%
@@ -1708,7 +1722,7 @@
\@ifundefined{fst@#1}{}{\@float@setevery{#1}}%
\caption@settype{#1}%
\caption@clearmargin
-%%% \caption@setoptions{wrapfloat}%
+%%% \caption@setoptions{wrap}%
\caption@setoptions{wrap#1}}%
}{}
\endinput
diff --git a/Master/texmf-dist/tex/latex/caption/caption2.sty b/Master/texmf-dist/tex/latex/caption/caption2.sty
index 0cf8f362070..415b7241b01 100644
--- a/Master/texmf-dist/tex/latex/caption/caption2.sty
+++ b/Master/texmf-dist/tex/latex/caption/caption2.sty
@@ -6,7 +6,7 @@
%%
%% caption2.dtx (with options: `package')
%%
-%% Copyright (C) 1994-2012 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
+%% Copyright (C) 1994-2013 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
%%
%% --------------------------------------------------------------------------
%%
diff --git a/Master/texmf-dist/tex/latex/caption/caption3.sty b/Master/texmf-dist/tex/latex/caption/caption3.sty
index 1187760af37..17eb5c5743c 100644
--- a/Master/texmf-dist/tex/latex/caption/caption3.sty
+++ b/Master/texmf-dist/tex/latex/caption/caption3.sty
@@ -6,7 +6,7 @@
%%
%% caption3.dtx (with options: `package')
%%
-%% Copyright (C) 1994-2012 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
+%% Copyright (C) 1994-2013 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
%%
%% --------------------------------------------------------------------------
%%
@@ -29,7 +29,7 @@
%% and the user manuals caption-deu.tex, caption-eng.tex, and caption-rus.tex.
%%
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption3}[2012/01/12 v1.4b caption3 kernel (AR)]
+\ProvidesPackage{caption3}[2013/01/06 v1.5 caption3 kernel (AR)]
\providecommand*\@nameundef[1]{%
\expandafter\let\csname #1\endcsname\@undefined}
\providecommand\l@addto@macro[2]{%
@@ -122,24 +122,25 @@
\AtBeginDocument{\let\caption@ifatletter\@secondoftwo}
\newcommand*\caption@withoptargs[1]{%
\@ifstar
- {\def\caption@tempa{*}\caption@@withoptargs#1}%
- {\def\caption@tempa{}\caption@@withoptargs#1}}
+ {\def\caption@tempa{*}\caption@@withoptargs{#1}}%
+ {\def\caption@tempa{}\caption@@withoptargs{#1}}}
\def\caption@@withoptargs#1{%
\@ifnextchar[%]
- {\caption@@@withoptargs#1}%
- {\caption@@@@withoptargs#1}}
+ {\caption@@@withoptargs{#1}}%
+ {\caption@@@@withoptargs{#1}}}
\def\caption@@@withoptargs#1[#2]{%
\l@addto@macro\caption@tempa{[{#2}]}%
- \caption@@withoptargs#1}
+ \caption@@withoptargs{#1}}
\def\caption@@@@withoptargs#1{%
- \expandafter#1\expandafter{\caption@tempa}}
+ \def\caption@tempb{#1}%
+ \expandafter\caption@tempb\expandafter{\caption@tempa}}
\DeclareRobustCommand*\caption@gobble{%
\caption@withoptargs\@gobbletwo}
\newcommand\caption@DoCheckCommand[2]{%
\begingroup
- \let\@tempa#1%
+ \let\caption@tempa#1%
#2%
- \ifx\@tempa#1%
+ \ifx\caption@tempa#1%
\endgroup
\let\caption@CheckCommand\@gobbletwo
\else
@@ -175,7 +176,7 @@
\newcommand*\caption@Info[1]{%
\PackageInfo{caption}{#1}}
\newcommand*\caption@InfoNoLine[1]{%
- \PackageInfo{caption}{#1\@gobble}}
+ \caption@Info{#1\@gobble}}
\newcommand*\caption@Warning[1]{%
\caption@WarningNoLine{#1\on@line}}
\newcommand*\caption@WarningNoLine[1]{%
@@ -205,8 +206,11 @@
\caption@teststar\caption@declareoption\AtEndOfPackage\@gobble}
\@onlypreamble\DeclareCaptionOption
\newcommand*\caption@declareoption[2]{%
- #1{\undefine@key{caption}{#2}}\define@key{caption}{#2}}
+ #1{\undefine@key{caption}{#2}}\caption@declare@option{#2}}
\@onlypreamble\caption@declareoption
+\newcommand*\caption@declare@option{%
+ \define@key{caption}}
+%% no \@onlypreamble\caption@declare@option, will be used by \captionsetup
\newcommand*\DeclareCaptionOptionNoValue{%
\caption@teststar\caption@declareoption@novalue\AtEndOfPackage\@gobble}
\@onlypreamble\DeclareCaptionOptionNoValue
@@ -228,7 +232,16 @@
\captionsetup@startrue#1\captionsetup@starfalse
\@ifnextchar[\caption@setup@options\caption@setup}
\newcommand*\caption@setup{\caption@setkeys{caption}}
-\def\caption@setup@options[#1]#2{%
+\def\caption@setup@options[#1]{%
+ \@ifnextchar[%
+ {\caption@stepthecounter
+ \caption@withoptargs{\@expandtwoargs
+ \caption@setup@options@i{#1}{@\caption@thecounter}}}%
+ {\caption@setup@options@{#1}}}
+\newcommand*\caption@setup@options@i[4]{%
+ \caption@setup@options@{#1}{#2}%
+ \caption@declare@option{#2}[]{\captionsetup#3{#4}}}
+\newcommand*\caption@setup@options@[2]{%
\@bsphack
\ifcaptionsetup@star\captionsetup@starfalse\else\caption@addtooptlist{#1}\fi
\expandafter\caption@l@addto@list\csname caption@opt@#1\endcsname{#2}%
@@ -388,6 +401,7 @@
\newdimen\captionmargin
\newdimen\captionmargin@
\newdimen\captionwidth
+\newdimen\caption@tempdima
\DeclareCaptionOption{margin}{\setcaptionmargin{#1}}
\DeclareCaptionOption{margin*}{\setcaptionmargin*{#1}}
\DeclareCaptionOption{width}{\setcaptionwidth{#1}}
@@ -433,7 +447,7 @@
\caption@teststar{\caption@@setcalcmargin\caption@setwidth}%
\@secondoftwo\@firstoftwo}
\newcommand*\caption@thecounter{0}
-\newcommand*\caption@stepcounter{%
+\newcommand*\caption@stepthecounter{%
\@tempcnta\caption@thecounter
\advance\@tempcnta\@ne
\xdef\caption@thecounter{\the\@tempcnta}}
@@ -508,8 +522,6 @@
\@onlypreamble\caption@declarestyle
\DeclareCaptionOption{style}{\caption@setstyle{#1}}
\DeclareCaptionOption{style*}{\caption@setstyle*{#1}}
-\DeclareCaptionOption{singlelinecheck}[1]{\caption@set@bool\caption@ifslc{#1}}
-\DeclareCaptionOption{slc}[1]{\KV@caption@singlelinecheck{#1}}
\newcommand*\caption@setstyle{%
\caption@teststar\caption@@setstyle\@gobble\@firstofone}
\newcommand*\caption@@setstyle[2]{%
@@ -529,6 +541,7 @@
\expandafter{\caption@sls}}}
\newcommand*\caption@resetstyle{%
\caption@setup{%
+ box=parbox,boxcolor=white,%
format=plain,labelformat=default,labelsep=colon,textformat=simple,%
justification=justified,font=,size=,labelfont=,textfont=,%
margin=0pt,minmargin=0,maxmargin=0,%
@@ -537,8 +550,26 @@
\caption@clearsetup{singleline}}
\DeclareCaptionStyle{base}[indent=0pt,justification=centering]{}
\DeclareCaptionStyle{default}[indent=0pt,justification=centering]{%
- format=default,labelsep=default,textformat=default,%
+ 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}}
+\DeclareCaptionOption{slc}[1]{\KV@caption@singlelinecheck{#1}}
+\newcommand*\DeclareCaptionBox[2]{%
+ \global\long\@namedef{caption@box@#1}##1##2{#2}}
+\@onlypreamble\DeclareCaptionBox
+\DeclareCaptionOption{box}{\caption@setbox{#1}}
+\newcommand*\caption@setbox[1]{%
+ \@ifundefined{caption@box@#1}%
+ {\caption@Error{Undefined box `#1'}}%
+ {\expandafter\let\expandafter\caption@box\csname caption@box@#1\endcsname}}
+\DeclareCaptionBox{empty}{}
+\DeclareCaptionBox{none}{#2}
+\DeclareCaptionBox{parbox}{\parbox[b]{#1}{#2}}
+\DeclareCaptionBox{colorbox}{\colorbox{\caption@boxcolor}{%
+ \addtolength\caption@tempdima{-2\fboxsep}%
+ \caption@box@parbox\caption@tempdima{#2}}}
+\DeclareCaptionOption{boxcolor}{\def\caption@boxcolor{#1}}
+\def\caption@box@default{\caption@box@parbox}
\newcommand*\DeclareCaptionFormat{%
\caption@teststar\caption@declareformat\@gobble\@firstofone}
\@onlypreamble\DeclareCaptionFormat
@@ -898,6 +929,24 @@
\hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
\fi
\vskip\belowcaptionskip}}
+\providecommand*\caption@ifelsarticleclass{%
+ \@ifclassloaded{elsarticle}\@firstofone\@gobble}
+\@onlypreamble\caption@ifelsarticleclass
+\caption@ifelsarticleclass{%
+ \caption@CheckCommand\@makecaption{%
+ % elsarticle.cls,v 1.20 2008-10-13 04:24:12 cvr Exp
+ \long\def\@makecaption#1#2{%
+ \vskip\abovecaptionskip\footnotesize
+ \sbox\@tempboxa{#1: #2}%
+ \ifdim \wd\@tempboxa >\hsize
+ #1: #2\par
+ \else
+ \global \@minipagefalse
+ \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
+ \fi
+ \vskip\belowcaptionskip}}
+ \DeclareCaptionDefaultFont{font}{\footnotesize}
+}
\providecommand*\caption@ifamsclass{%
\caption@ifundefined\@captionheadfont\@gobble\@firstofone}
\@onlypreamble\caption@ifamsclass
@@ -1220,16 +1269,18 @@
{\caption@Debug{addcontentsline: #1 => \caption@listtype}%
\@namedef{the\caption@listtype}{\@nameuse{the#1}}}%
\expandafter\caption@@addcontentsline\expandafter{\caption@listtype}{#2}%
- \endgroup}}
+ \endgroup}%
+ \caption@addsubcontentslines{#1}}
\newcommand\caption@@addcontentsline[2]{%
{\let\\\space
\@ifundefined{ext@#1}%
{\caption@Error{No float type '#1' defined}}%
- {\caption@@@addcontentsline
+ {\caption@add@contentsline
{\csname ext@#1\endcsname}%
{#1}%
{\caption@lstfmt{\@nameuse{p@#1}}{\@nameuse{the#1}}}%
{\ignorespaces #2}}}}
+\newcommand*\caption@add@contentsline{\caption@@@addcontentsline}
\newcommand*\caption@@@addcontentsline[4]{%
\addcontentsline{#1}{#2}{\protect\numberline{#3}{#4}}}
\newcommand\caption@ifcontentsline[1]{%
@@ -1241,24 +1292,15 @@
\else
\expandafter\@firstofone
\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@@make[2]{%
\begingroup
- \caption@stepcounter
+ \caption@stepthecounter
\caption@beginhook
- \ifx\caption@maxmargin\@undefined \else
- \ifdim\captionmargin>\caption@maxmargin\relax
- \captionmargin\caption@maxmargin\relax
- \fi
- \fi
- \ifx\caption@minmargin\@undefined \else
- \ifdim\captionmargin<\caption@minmargin\relax
- \captionmargin\caption@minmargin\relax
- \fi
- \fi
- \caption@ifslc{\caption@slc{#1}{#2}\captionwidth\relax}{}%
+ \caption@ifslc{\caption@slc{#1}{#2}\caption@singleline\relax}{}%
\caption@calcmargin
\@tempdima\captionmargin
\ifdim\captionmargin@=\z@ \else
@@ -1266,9 +1308,9 @@
\fi
\caption@ifh{\advance\@tempdima\caption@indent}%
\hspace\@tempdima
- \@tempdima\captionwidth
- \caption@ifh{\advance\@tempdima-\caption@indent}%
- \caption@parbox\@tempdima{%
+ \caption@tempdima\captionwidth
+ \caption@ifh{\advance\caption@tempdima-\caption@indent}%
+ \caption@parbox\caption@tempdima{%
\caption@ifh{%
\ifdim\caption@indent=\z@
\leavevmode
@@ -1286,6 +1328,16 @@
\global\caption@starfalse}
\newcommand*\caption@calcmargin{%
\caption@calcmargin@hook
+ \ifx\caption@maxmargin\@undefined \else
+ \ifdim\captionmargin>\caption@maxmargin\relax
+ \captionmargin\caption@maxmargin\relax
+ \fi
+ \fi
+ \ifx\caption@minmargin\@undefined \else
+ \ifdim\captionmargin<\caption@minmargin\relax
+ \captionmargin\caption@minmargin\relax
+ \fi
+ \fi
\ifdim\captionwidth=\z@
\captionwidth\linewidth
\advance\captionwidth by -2\captionmargin
@@ -1306,21 +1358,19 @@
\string\width=\the\captionwidth}%
}
\newcommand\caption@slc[4]{%
- \caption@@slc{#1}{#2}{#3}{\caption@singleline#4}{}}
-\newcommand\caption@@slc[5]{%
\caption@Debug{Begin SLC}%
\begingroup
\caption@singleline
\let\caption@hj\@empty
- \caption@calcmargin % calculate #3 if necessary
+ \caption@calcmargin % calculate \captionwidth
\caption@prepareslc
\sbox\@tempboxa{\caption@@@make{#1}{#2}}%
- \ifdim\wd\@tempboxa>#3%
+ \ifdim\wd\@tempboxa>\captionwidth
\endgroup
- #5%
+ #4%
\else
\endgroup
- #4%
+ #3%
\fi
\caption@Debug{End SLC}}
\newcommand*\caption@singleline{%
@@ -1344,7 +1394,7 @@
\endgroup}
\newcommand*\caption@l@stepcounter[1]{%
\advance\csname c@#1\endcsname\@ne\relax}
-\newcommand*\caption@parbox{\parbox[b]}
+\newcommand*\caption@parbox{\caption@box}
\newcommand*\caption@applyfont{%
\caption@hj\captionfont\captionsize}
\newcommand\caption@@@make[2]{%
@@ -1424,33 +1474,6 @@
\edef\@tempa{\def\noexpand\newfloat@hook####1{\the\toks@}}%
\@tempa}
\providecommand*\newfloat@hook[1]{}
-\newcommand*\caption@patch@stpelt{%
- \let\caption@stpelt\@stpelt
- \def\@stpelt##1{%
- \caption@stpelt{##1}%
- \begingroup
- \let\@elt\caption@stpelt
- \csname caption@cl@##1\endcsname
- \endgroup}%
- \let\caption@patch@stpelt\relax}
-\@onlypreamble\caption@patch@stpelt
-\newcommand*\caption@addtoreset[2]{%
- \caption@patch@stpelt
- \@ifundefined{caption@cl@#2}{\@namedef{caption@cl@#2}{}}{}%
- \expandafter\@cons\csname caption@cl@#2\endcsname{{#1}}}
-\@onlypreamble\caption@addtoreset
-\newcommand*\caption@removefromreset[2]{%
- \begingroup
- \expandafter\let\csname c@#1\endcsname\caption@removefromreset
- \def\@elt##1{%
- \expandafter\ifx\csname c@##1\endcsname\caption@removefromreset
- \else
- \noexpand\@elt{##1}%
- \fi}%
- \expandafter\xdef\csname caption@cl@#2\endcsname{%
- \csname caption@cl@#2\endcsname}%
- \endgroup}
-\@onlypreamble\caption@removefromreset
\newcommand*\DeclareCaptionSubType{%
\caption@teststar\caption@declaresubtype\@firstoftwo\@secondoftwo}
\@onlypreamble\DeclareCaptionSubType
@@ -1463,7 +1486,7 @@
{\@ifundefined{c@sub#3}%
{\caption@Debug{New subtype `sub#3'}%
\newcounter{sub#3}%
- \caption@addtoreset{sub#3}{#3}%
+ \@addtoreset{sub#3}{#3}%
\@namedef{ext@sub#3}{\csname ext@#3\endcsname}%
\caption@declaresublistentry{#3}%
\@cons\caption@subtypelist{{#3}}}%
@@ -1547,7 +1570,7 @@
\endgroup}
\def\sf@NEW@subfloat{%
\begingroup
- \@nameuse{caption@warmup}%
+ \@nameuse{caption@warmup}%
\caption@setfloattype\@captype
\sf@ifpositiontop{%
\maincaptiontoptrue
diff --git a/Master/texmf-dist/tex/latex/caption/ltcaption.sty b/Master/texmf-dist/tex/latex/caption/ltcaption.sty
index 20778a3fc41..58bf6ddc01d 100644
--- a/Master/texmf-dist/tex/latex/caption/ltcaption.sty
+++ b/Master/texmf-dist/tex/latex/caption/ltcaption.sty
@@ -6,7 +6,7 @@
%%
%% ltcaption.dtx (with options: `package')
%%
-%% Copyright (C) 1994-2012 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
+%% Copyright (C) 1994-2013 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
%%
%% --------------------------------------------------------------------------
%%
diff --git a/Master/texmf-dist/tex/latex/caption/newfloat.sty b/Master/texmf-dist/tex/latex/caption/newfloat.sty
index b4ccd4b4610..507be3322d4 100644
--- a/Master/texmf-dist/tex/latex/caption/newfloat.sty
+++ b/Master/texmf-dist/tex/latex/caption/newfloat.sty
@@ -6,7 +6,7 @@
%%
%% newfloat.dtx (with options: `package')
%%
-%% Copyright (C) 1994-2012 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
+%% Copyright (C) 1994-2013 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
%%
%% --------------------------------------------------------------------------
%%
@@ -29,9 +29,11 @@
%% and the user manuals caption-deu.tex, caption-eng.tex, and caption-rus.tex.
%%
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{newfloat}[2011/11/16 v1.0a Defining new floating environments (AR)]
+\ProvidesPackage{newfloat}[2012/05/19 v1.0b Defining new floating environments (AR)]
\newcommand*\newfloat@Info[1]{%
\PackageInfo{newfloat}{#1}}
+\newcommand*\newfloat@InfoNoLine[1]{%
+ \newfloat@Info{#1\@gobble}}
\newcommand*\newfloat@Error[1]{%
\PackageError{newfloat}{#1}\newfloat@eh}
\newcommand*\newfloat@eh{%
@@ -270,6 +272,8 @@
\ifcsname ext@#1\endcsname
\@cons\newfloat@list{{#1}}%
\@namedef{newfloat@ext@\@nameuse{ext@#1}}{#1}%
+ \@ifundefined{@ifchapterlistsgap@#1}{%
+ \expandafter\let\csname @ifchapterlistsgap@#1\endcsname\@iden}{}%
\else
\newfloat@Error{`#1' does not seem to be a floating environment}%
\fi}}
@@ -297,17 +301,18 @@
\@@addchapterlistsgap{#1}{#2}}}
\providecommand*\@@addchapterlistsgap[2]{%
\@ifundefined{@addchapterlistsgap@#2}{% only once per extension
- \@namedef{@addchapterlistsgap@#2}{}%
+ \@namedef{@addchapterlistsgap@#2}{#1}%
\@@@addchapterlistsgap{#2}}{}}
\providecommand*\@@@addchapterlistsgap[1]{%
\ifdim \@chapterlistsgap>\z@
\addtocontents{#1}{\protect\addvspace{\@chapterlistsgap}}%
\fi}
\providecommand*\@addchapterlistsgaps{%
- \def\@elt##1{%
- \@expandtwoargs\@addchapterlistsgap{##1}{\@nameuse{ext@##1}}}%
- \newfloat@list
- \let\@elt\relax}
+ \begingroup
+ \def\@elt##1{%
+ \@expandtwoargs\@addchapterlistsgap{##1}{\@nameuse{ext@##1}}}%
+ \newfloat@list
+ \endgroup}
\providecommand*\@chapterlistsgap@off[1]{%
\expandafter\let\csname @ifchapterlistsgap@#1\endcsname\@gobble
\ifcsname unsettoc\endcsname
@@ -340,8 +345,25 @@
}%
\newfloat@list
\let\@elt\relax
+\define@key{newfloat}{planb}[true]{%
+ \def\@tempa{#1}%
+ \def\@tempb{false}%
+ \ifx\@tempa\@tempb
+ \let\newfloat@ifplanb\@gobble
+ \else
+ \def\@tempb{true}%
+ \ifx\@tempa\@tempb
+ \let\newfloat@ifplanb\@iden
+ \else
+ \newfloat@Error{Invalid value `#1' for option `planb'}%
+ \fi
+ \fi}
+\define@key{newfloat}{planb-fileext}{%
+ \newfloat@Info{Setting Plan B file extension to `#1'}
+ \xdef\newfloat@addtocontents@ext{#1}}
+
\let\@tempc\relax
-\@expandtwoargs\setkeys{newfloat}{\@ptionlist{\@currname.\@currext}}%
+\@expandtwoargs\setkeys{newfloat}{planb,\@ptionlist{\@currname.\@currext}}%
\AtEndOfPackage{\let\@unprocessedoptions\relax}
\newcommand*\newfloatsetup{\setkeys{newfloat}}
\newcommand\newfloat@replace@chapter[2]{%
@@ -613,10 +635,33 @@
\@afterheading
\fi}
\ifx\newfloat@replace@chapter\@gobbletwo \else
- \PackageWarningNoLine{newfloat}{%
- Unsupported document class, or\MessageBreak
- \noexpand\@chapter was already redefined by another package}
- \newfloat@Info{\string\@chapter\space=\space\meaning\@chapter}
+ \newfloat@InfoNoLine{%
+ Unsupported document class, or \noexpand\@chapter\MessageBreak
+ was already redefined by another package}
+ \newfloat@InfoNoLine{\string\@chapter\space=\space\meaning\@chapter}
+ \newfloat@InfoNoLine{\string\Hy@org@chapter\space=\space\meaning\Hy@org@chapter}
+ \newfloat@ifplanb{%
+ \newfloat@InfoNoLine{Trying Plan B..}%
+ \let\newfloat@addtocontents@ORI\addtocontents
+ \long\def\addtocontents#1#2{%
+ \newfloat@addtocontents{#1}{#2}#2\addvspace\newfloat@nil}%
+ \long\def\newfloat@addtocontents#1#2#3\addvspace#4\newfloat@nil{%
+ \def\newfloat@tempa{#4}%
+ \ifx\newfloat@tempa\@empty
+ \newfloat@addtocontents@ORI{#1}{#2}%
+ \else
+ \ifx\newfloat@addtocontents@ext\@undefined
+ \newfloat@Info{Setting Plan B file extension to `#1'...}%
+ \xdef\newfloat@addtocontents@ext{#1}%
+ \fi
+ \edef\newfloat@tempa{#1}%
+ \ifx\newfloat@tempa\newfloat@addtocontents@ext
+ \begingroup
+ \let\addtocontents\newfloat@addtocontents@ORI
+ \@addchapterlistsgaps
+ \endgroup
+ \fi
+ \fi}}
\fi
\newcommand\newfloat@ForEachNew[2][newfloat@@list]{%
\AtBeginDocument{%
diff --git a/Master/texmf-dist/tex/latex/caption/subcaption.sty b/Master/texmf-dist/tex/latex/caption/subcaption.sty
index 13cfa8b6b71..56ba02f214a 100644
--- a/Master/texmf-dist/tex/latex/caption/subcaption.sty
+++ b/Master/texmf-dist/tex/latex/caption/subcaption.sty
@@ -6,7 +6,7 @@
%%
%% subcaption.dtx (with options: `package')
%%
-%% Copyright (C) 1994-2012 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
+%% Copyright (C) 1994-2013 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
%%
%% --------------------------------------------------------------------------
%%
@@ -29,28 +29,30 @@
%% and the user manuals caption-deu.tex, caption-eng.tex, and caption-rus.tex.
%%
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{subcaption}[2012/01/12 v1.1d Sub-captions (AR)]
-\RequirePackage{caption}[2011/08/18] % needs v3.2b or newer
+\ProvidesPackage{subcaption}[2012/04/09 v1.1f Sub-captions (AR)]
+\RequirePackage{caption}[2012/03/25] % needs v3.3 or newer
\caption@AtBeginDocument{\caption@ifcompatibility{%
\caption@Error{%
The `subcaption' package does not work correctly\MessageBreak
in compatibility mode}}{}}
-\caption@ifundefined\subfigure{}{%
- \PackageError{subcaption}{%
- This package can't be used in cooperation\MessageBreak
- with the subfigure package}{RTFM}%
- \endinput}
-\caption@ifundefined\subfloat{}{%
- \PackageError{subcaption}{%
- This package can't be used in cooperation\MessageBreak
- with the subfig package}{RTFM}%
- \endinput}
+\@ifpackageloaded{subfigure}{%
+ \PackageError{subcaption}%
+ {This package can't be used in cooperation\MessageBreak
+ with the subfigure package}%
+ {RTFM}%
+ \endinput}{}%
+\@ifpackageloaded{subfig}{%
+ \PackageError{subcaption}%
+ {This package can't be used in cooperation\MessageBreak
+ with the subfig package}%
+ {RTFM}%
+ \endinput}{}%
\caption@SetupOptions{subcaption}{\captionsetup[sub]{#2}}%
\caption@ExecuteOptions{subcaption}{%
font+=small,labelformat=parens,labelsep=space,skip=6pt,list=0,hypcap=0}
\caption@ProcessOptions*{subcaption}
\caption@ForEachType{\DeclareCaptionSubType{#1}}
-\newcommand*\subcaption{%
+\def\subcaption{%
\caption@iftype
{\setcaptionsubtype*\caption}%
{\caption@Error{\noexpand\subcaption outside float}%
@@ -71,8 +73,7 @@
\minipage#1{#2}%
\setcaptionsubtype\relax}
\newcommand*\subcaptionbox{%
- \let\captionbox@settype\setcaptionsubtype
- \caption@withoptargs\caption@box}
+ \caption@withoptargs{\caption@ibox\setcaptionsubtype}}
\g@addto@macro\caption@subtypehook{%
\ifx\label\subcaption@label \else
\let\subcaption@ORI@label\label
@@ -88,16 +89,14 @@
\subcaption@ORI@label#1{sub@#2}%
\endgroup\@esphack}
\DeclareRobustCommand*\subref{%
- \@ifstar{\subcaption@ref*}\@subref}
-\newcommand*\@subref{%
- \caption@withoptargs\@@subref}
-\newcommand*\@@subref[2]{%
+ \@ifstar
+ {\caption@withoptargs\subcaption@ref*}%
+ {\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]{%
+ {\subcaption@ref{#1}{#2}}%
+ {\hyperref[#2]{\subcaption@ref{*#1}{#2}}}}
+\newcommand*\subcaption@ref[2]{%
\begingroup
\caption@setoptions{sub}%
\subcaption@reffmt\p@subref{\ref#1{sub@#2}}%