diff options
author | Karl Berry <karl@freefriends.org> | 2007-09-08 15:59:17 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2007-09-08 15:59:17 +0000 |
commit | 788352558edd068d76fe19ad56b81827c0fe7646 (patch) | |
tree | ab733e20eaf33223cbfe9c59c783a30d802ee627 /Master/texmf-dist/tex/latex/caption | |
parent | ba8058f661bc514c2d960695ddb21d5501abbf97 (diff) |
caption 3.1 (7sep07)
git-svn-id: svn://tug.org/texlive/trunk@4911 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/caption')
-rw-r--r-- | Master/texmf-dist/tex/latex/caption/caption.sty | 1524 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/caption/caption2.sty | 38 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/caption/caption3.sty | 1099 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/caption/ltcaption.sty | 184 |
4 files changed, 2243 insertions, 602 deletions
diff --git a/Master/texmf-dist/tex/latex/caption/caption.sty b/Master/texmf-dist/tex/latex/caption/caption.sty index 20b2a3ceed9..bd69e94cb18 100644 --- a/Master/texmf-dist/tex/latex/caption/caption.sty +++ b/Master/texmf-dist/tex/latex/caption/caption.sty @@ -22,32 +22,186 @@ %% %% This Current Maintainer of this work is Axel Sommerfeldt. %% -%% This work consists of the files caption.ins, caption.dtx, -%% caption2.dtx, and anleitung.tex and the derived files -%% caption.sty, caption2.sty, caption3.sty, and manual.tex. +%% 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. %% \NeedsTeXFormat{LaTeX2e}[1994/12/01] -\ProvidesPackage{caption}[2007/04/16 v3.0q Customising captions (AR)] -\RequirePackage{caption3}[2007/01/31] % needs v3.0l or newer +\ProvidesPackage{caption}[2007/09/01 v3.1 Customising captions (AR)] +\newcommand*\caption@Info[1]{\PackageInfo{caption}{#1\@gobble}} +\@onlypreamble\caption@Info +\RequirePackage{caption3}[2007/09/01] % needs v3.1 or newer \@ifpackageloaded{caption2}{% - \caption@Error{You can't use both the caption *and* caption2 package}% + \caption@Error{% + You can't use both, the (obsolete) caption2 *and*\MessageBreak + the (current) caption package}% \endinput }{} -\DeclareCaptionOption{config}[caption]{% - \InputIfFileExists{#1.cfg}{\typeout{*** Local configuration file - #1.cfg used ***}}% - {\PackageWarning{caption}{Configuration - file #1.cfg not found}}} -\DeclareCaptionOption*{figureposition}{\captionsetup[figure]{position=#1}} -\DeclareCaptionOption*{tableposition}{\captionsetup[table]{position=#1}} -\DeclareCaptionOption*{figurename}{\captionsetup[figure]{name=#1}} -\DeclareCaptionOption*{tablename}{\captionsetup[table]{name=#1}} -\DeclareCaptionOption*{normal}[]{\caption@setformat{normal}} -\DeclareCaptionOption*{isu}[]{\caption@setformat{hang}} -\DeclareCaptionOption*{hang}[]{\caption@setformat{hang}} -\DeclareCaptionOption*{center}[]{\caption@setjustification{centering}} -\DeclareCaptionOption*{anne}[]{\caption@setjustification{centerlast}} -\DeclareCaptionOption*{centerlast}[]{\caption@setjustification{centerlast}} +\caption@AtBeginDocument{% + \@ifpackageloaded{ftcap}{% + \caption@IncompatiblePackage{ftcap}{}% + }{}% + \@ifpackageloaded{nonfloat}{% + \caption@IncompatiblePackage{nonfloat}{. % + Furthermore you could use \string\captionof\MessageBreak + instead of \noexpand\figcaption or \string\tabcaption}% + }{}% + \@ifpackageloaded{topcapt}{% + \caption@IncompatiblePackage{topcapt}{}% + }{}% +} +\newcommand*\caption@IncompatiblePackage[2]{% + \PackageWarningNoLine{caption}{% + Usage of the #1 package together with the\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'\MessageBreak + #2}} +\@onlypreamble\caption@IncompatiblePackage +\caption@ifbool{documentclass}{}{% + \PackageWarningNoLine{caption}{% + Unsupported document class (or package) detected,\MessageBreak + usage of the caption package is *not* recommended}% + \caption@Info{\string\@makecaption\space=\space\meaning\@makecaption}% +} +\@ifundefined{@captionheadfont}{}{% + \caption@Info{AMS or SMF document class}% + \setlength\belowcaptionskip{0pt}% set to 3pc by AMS class +} +\@ifundefined{scr@caption}{}{% + \caption@Info{KOMA-Script document class}% + \def\@tablecaptionabovetrue{\captionsetup*[table]{position=t}} + \def\@tablecaptionabovefalse{\captionsetup*[table]{position=b}} + \if@tablecaptionabove + \caption@AtBeginDocument{% + \def\caption@tempa#1{% + \@ifpackageloaded{#1}{\caption@Error{% + You can't use the global option\MessageBreak + \space\space`tablecaptionabove'\MessageBreak + and use the #1 package, too}}{}}% + \caption@tempa{ftcap}% + \caption@tempa{nonfloat}% + \caption@tempa{topcapt}}% + \@tablecaptionabovetrue + \else + \@tablecaptionabovefalse + \fi + \def\onelinecaptionstrue{\captionsetup{singlelinecheck=1}} + \def\onelinecaptionsfalse{\captionsetup{singlelinecheck=0}} + \ifonelinecaptions + \onelinecaptionstrue + \else + \onelinecaptionsfalse + \fi + \def\@captionabovetrue{\captionsetup{position=t}} + \def\@captionabovefalse{\captionsetup{position=b}} + \let\caption@KOMA@setcapindent\@setcapindent + \renewcommand*\@setcapindent[1]{% + \caption@KOMA@setcapindent{#1}\caption@setcapindent} + \let\caption@KOMA@@setcapindent\@@setcapindent + \renewcommand*\@@setcapindent[1]{% + \caption@KOMA@@setcapindent{#1}\caption@setcapindent} + \newcommand*\caption@setcapindent{% + \captionsetup{indent=\ifdim\cap@indent<\z@\z@\else\cap@indent\fi}} + \@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}{}{% + \def\@tempa{captionbeside}% + \ifx\@tempa\@currenvir\else\PackageWarning{caption}{% + Ignoring optional argument [#1] of \string\setcapwidth\MessageBreak}% + \fi}% + \fi + \captionsetup{width=\cap@width}} + \def\caption@tempa{\hsize}% + \ifx\caption@tempa\cap@width \else + \caption@setcapwidth{?} + \fi + \expandafter\let\expandafter\caption@KOMA@setcapmargin + \csname\string\@setcapmargin\endcsname + \@namedef{\string\@setcapmargin}[#1]#2{% + \caption@KOMA@setcapmargin[#1]{#2}\caption@setcapmargin} + \expandafter\let\expandafter\caption@KOMA@@setcapmargin + \csname\string\@@setcapmargin\endcsname + \@namedef{\string\@@setcapmargin}[#1]#2{% + \caption@KOMA@@setcapmargin[#1]{#2}\caption@setcapmargin} + \newcommand*\caption@setcapmargin{% + \begingroup + \let\onelinecaptionsfalse\relax + \def\@twoside{0}% + \def\if@twoside{\def\@twoside{1}\iffalse}% + \cap@margin + \def\@tempa{\endgroup}% + \ifx\cap@left\hfill\else\ifx\cap@right\hfill\else + \def\hspace##1##{\@firstofone}% + \edef\@tempa{\endgroup + \noexpand\captionsetup{% + twoside=\@twoside,singlelinecheck=0,% + margin={\cap@left,\cap@right}}}% + \fi\fi + \@tempa} + \ifx\cap@margin\relax \else + \caption@setcapmargin + \fi +} +\DeclareCaptionOption*{config}[caption]{% + \InputIfFileExists{#1.cfg}% + {\typeout{*** Local configuration file #1.cfg used ***}}% + {\PackageWarning{caption}{Configuration file #1.cfg not found}}} +\DeclareCaptionOption{figureposition}{% + \captionsetup*[figure]{position=#1}} +\@onlypreamble@key{caption}{figureposition} +\DeclareCaptionOption{tableposition}{% + \caption@AtBeginDocument{% + \def\caption@tempa##1{% + \@ifpackageloaded{##1}{\caption@Error{% + You can't use the caption package option\MessageBreak + \space\space`tableposition=#1'\MessageBreak + and use the ##1 package, too}}{}}% + \caption@tempa{ftcap}% + \caption@tempa{nonfloat}% + \caption@tempa{topcapt}}% + \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} +\newcommand*\caption@SetFloatName[2]{% + \begingroup + \def\@tempa{\endgroup\@firstofone}% + \@ifundefined{languagename}{}{% + \@ifundefined{captions\languagename}{}{% + \def\@tempa{\endgroup + \expandafter\addto\csname captions\languagename\endcsname}}}% + \@tempa{\@namedef{#1name}{#2}}} +\@onlypreamble\caption@SetFloatName +\DeclareCaptionOption{compatibility}[1]{\caption@setbool{compatibility}{#1}} +\@onlypreamble@key{caption}{compatibility} +\DeclareCaptionOption*{normal}[]{% + \caption@setformat{normal}% + \caption@setjustification{justified}} +\DeclareCaptionOption*{isu}[]{% + \caption@setformat{hang}% + \caption@setjustification{justified}} +\DeclareCaptionOption*{hang}[]{% + \caption@setformat{hang}% + \caption@setjustification{justified}} +\DeclareCaptionOption*{center}[]{% + \caption@setformat{normal}% + \caption@setjustification{centering}} +\DeclareCaptionOption*{anne}[]{% + \caption@setformat{normal}% + \caption@setjustification{centerlast}} +\DeclareCaptionOption*{centerlast}[]{% + \caption@setformat{normal}% + \caption@setjustification{centerlast}} \DeclareCaptionOption*{scriptsize}[]{\def\captionfont{\scriptsize}} \DeclareCaptionOption*{footnotesize}[]{\def\captionfont{\footnotesize}} \DeclareCaptionOption*{small}[]{\def\captionfont{\small}} @@ -66,381 +220,1105 @@ \DeclareCaptionOption*{nooneline}[]{\caption@setbool{slc}{0}} \caption@setbool{ruled}{0} \DeclareCaptionOption*{ruled}[]{\caption@setbool{ruled}{1}} -\DeclareCaptionOption*{flushleft}[]{\caption@setjustification{raggedright}} -\DeclareCaptionOption*{flushright}[]{\caption@setjustification{raggedleft}} +\DeclareCaptionOption*{flushleft}[]{% + \caption@setformat{normal}% + \caption@setjustification{raggedright}} +\DeclareCaptionOption*{flushright}[]{% + \caption@setformat{normal}% + \caption@setjustification{raggedleft}} \DeclareCaptionOption*{oneline}[]{\caption@setbool{slc}{1}} -\DeclareCaptionOption*{ignoreLTcapwidth}[]{} -\DeclareCaptionOption*{onelinecaption}[]{\caption@setbool{slc}{1}} -\DeclareCaptionOption*{noonelinecaption}[]{\caption@setbool{slc}{0}} -\DeclareCaptionOption*{tablecaptionabove}[]{\captionsetup[table]{position=t}} -\DeclareCaptionOption*{tablecaptionbelow}[]{\captionsetup[table]{position=b}} -\newcommand*\caption@declarepackage[1]{% - \caption@setbool{pkt@#1}{1}% - \DeclareCaptionOption*{#1}{\caption@setbool{pkt@#1}{##1}}} -\AtEndOfPackage{\let\caption@declarepackage\@undefined} -\newcommand\caption@ifpackage[3]{% - \edef\caption@tempa{% - \caption@ifbool{pkt@#1}% - {\@ifundefined{#2}{AtBeginDocument}{firstofone}}% - {gobble}}% - \caption@Info{#1=\caption@ifbool{pkt@#1}{1}{0} % - (\@ifundefined{#2}{not }{}loaded->\caption@tempa)}% - \caption@ifbool{pkt@#1}{% - \@ifundefined{#2}% - {\let\caption@tempa\AtBeginDocument}% - {\let\caption@tempa\@firstofone}% - }{% - \let\caption@tempa\@gobble - }% - \caption@tempa{\@ifundefined{#2}{}{#3}}% - \caption@undefbool{pkt@#1}} -\AtEndOfPackage{\let\caption@ifpackage\@undefined} -\caption@declarepackage{caption} -\caption@declarepackage{float} -\caption@declarepackage{floatrow} -\caption@declarepackage{hyperref} -\caption@declarepackage{hypcap} -\caption@declarepackage{listings} -\caption@declarepackage{longtable} -\caption@declarepackage{picins} -\caption@declarepackage{rotating} -\caption@declarepackage{sidecap} -\caption@declarepackage{supertabular} -\DeclareCaptionOption{verbose}[1]{% - \caption@setbool{verbose}{#1}% - \caption@ifverbose{% - \def\caption@Info{\PackageInfo{caption}}% - }{% - \let\caption@Info\@gobble - }} -\setkeys{caption}{verbose=0} -\caption@ProcessOptions{caption} -\caption@ifbool{pkt@caption}{}{\endinput} -\caption@undefbool{pkt@caption} -\def\captionof{\@ifstar{\caption@of{\caption*}}{\caption@of\caption}} -\newcommand*\caption@of[2]{\def\@captype{#2}#1} -\DeclareCaptionOption{name}{\caption@setfloatname\@captype{#1}} -\DeclareCaptionOption{type}{\def\@captype{#1}} -\providecommand\ContinuedFloat{% - \@ifnextchar[%] - \@ContinuedFloat - {\ifx\@captype\@undefined - \@latex@error{\noexpand\ContinuedFloat outside float}\@ehd - \else - \@ContinuedFloat[\@captype]% - \fi}} -\def\@ContinuedFloat[#1]{% - \addtocounter{#1}\m@ne - \caption@ContinuedFloat{#1}% - \caption@@ContinuedFloat{#1}} -\let\caption@ContinuedFloat\@gobble -\let\caption@resetContinuedFloat\@gobble -\providecommand*\caption@@ContinuedFloat[1]{} -\newcommand*\caption@begin[1]{% +\DeclareCaptionOption*{ignoreLTcapwidth}[]{% + \PackageWarning{caption}{Obsolete option `ignoreLTcapwidth' ignored}} +\DeclareCaptionOption*{caption}{% + \caption@setbool{temp}{#1}% + \caption@ifbool{temp}{}{% + \caption@Error{% + The package option `caption=#1' is obsolete.\MessageBreak + Please pass this option to the subfig package instead\MessageBreak + and do *not* load the caption package anymore}}} +\DeclareCaptionOption{FPlist}[1]{\caption@setFPoption{list}{#1}} +\DeclareCaptionOption{FPref}[1]{\caption@setFPoption{ref}{#1}} +\@onlypreamble@key{caption}{FPlist} +\@onlypreamble@key{caption}{FPref} +\newcommand*\caption@setFPoption[2]{% + \edef\@tempa{\@car#2\@nil}% + \caption@setbool{FP#1cap}{\if c\@tempa 1\else 0\fi}} +\@onlypreamble\caption@setFPoption +\captionsetup{FPlist=caption,FPref=figure} +\DeclareCaptionOption{hypcap}[1]{\caption@setbool{hypcap}{#1}} +\DeclareCaptionOption{hypcapspace}{\def\caption@hypcapspace{#1}} +\captionsetup{hypcap=1,hypcapspace=.5\baselineskip} +\caption@ProcessOptions*{caption} +\caption@AtBeginDocument{% + \DeclareCaptionOption{type}{\caption@settype{#1}} + \DeclareCaptionOption{type*}{\caption@settype*{#1}}} +\newcommand*\caption@settype{% + \caption@@settype{}} +\newcommand*\caption@@settype[1]{% + \caption@teststar{\caption@@@settype{#1}}\@gobble\@firstofone} +\newcommand*\caption@@@settype[3]{% + \caption@Debug{type=#3}% + \caption@checkgrouplevel{#1}{\captionsetup{#1type#2\@gobble*=#3}}% + \@ifundefined{@#1captype}{}{% + \edef\@tempa{#3}% + \expandafter\ifx\csname @#1captype\endcsname\@tempa \else + \caption@iftypewarning{% + \PackageWarning{caption}{% + 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{% \@gobble or \@firstofone + \let\@currentlabel\caption@undefinedlabel + \let\@currentHlabel\@undefined + \caption@start}} +\newcommand*\caption@settypehook{} +\newcommand*\caption@iftype{% + \@ifundefined{@captype}{\let\@captype\@undefined\@secondoftwo}\@firstoftwo} +\begingroup\expandafter\expandafter\expandafter\endgroup +\expandafter\ifx\csname currentgrouplevel\endcsname\relax + \caption@Debug{TeX engine: TeX} + \let\caption@checkgrouplevel\@gobbletwo +\else + \caption@Debug{TeX engine: e-TeX} + \newcommand*\caption@checkgrouplevel[2]{% + \@ifundefined{#1caption@grouplevel}{% + \@ifundefined{caption@grouplevel}{\let\caption@grouplevel\z@}{}% + \ifnum\currentgrouplevel>\caption@grouplevel\relax + \expandafter\edef\csname #1caption@grouplevel\endcsname{% + \the\currentgrouplevel}% + \else + \caption@Error{\string#2 outside group or environment}% + \fi + }{}} +\fi +\newcommand*\caption@undefinedlabel{% + \emph{Please place \caption@cs{label} \textbf{after} \caption@cs{caption}}}% +\DeclareRobustCommand\caption@cs[1]{\texttt{\char`\\#1}} +\def\captionof{\caption@teststar\caption@of{\caption*}\caption} +\newcommand*\caption@of[2]{% + \let\caption@setfloatcapt\@firstofone + \caption@settype*{#2}#1} +\newcommand*\captionlistentry{% + \@testopt\caption@listentry\@captype} +\def\caption@listentry[#1]#2{% + \caption@refstepcounter{#1}% + \caption@makecurrent{#1}{#2}% + \caption@addcontentsline{#1}{#2}} +\def\ContinuedFloat{% + \caption@iftype + {\addtocounter\@captype\m@ne + \caption@ContinuedFloat\@captype}% + {\caption@Error{\noexpand\ContinuedFloat outside float}}} +\def\caption@ContinuedFloat#1{% + \edef\@tempa{#1}% + \ifx\@tempa\caption@CFtype \else + \caption@Error{Continued `#1' after `\caption@CFtype'}% + \fi + \stepcounter{ContinuedFloat}% + \caption@@ContinuedFloat{#1}% + \caption@setoptions{ContinuedFloat}% + \caption@setoptions{continued#1}% + \let\caption@resetContinuedFloat\@gobble} +\newcounter{ContinuedFloat} +\newcommand*\caption@CFtype{??} +\newcommand*\caption@@ContinuedFloat[1]{} +\newcommand*\caption@resetContinuedFloat[1]{% + \@stpelt{ContinuedFloat}\xdef\caption@CFtype{#1}} +\newcommand*\caption@refstepcounter[1]{% \caption@resetContinuedFloat{#1}% + \caption@@refstepcounter{#1}% + \let\caption@ifrefstepcounter\@firstoftwo} +\newcommand*\caption@@refstepcounter{\refstepcounter} +\let\caption@ifrefstepcounter\@secondoftwo +\newcommand\caption@dblarg[1]{\kernel@ifnextchar[{#1}{\caption@xdblarg{#1}}}% +\newcommand\caption@xdblarg[2]{#1[{#2\relax}]{#2}}% +\newcommand*\caption@begin[1]{% \begingroup - \caption@setfloattype{#1}% - \ifx\caption@lfmt\caption@lfmt@default\else - \@namedef{fnum@#1}{% - \caption@lfmt{\caption@floatname{#1}}{\@nameuse{the#1}}}% - \fi - \caption@fixposition - \global\let\caption@fixedposition\caption@position} + \caption@setfnum{#1}% + \caption@fixposition + \global\let\caption@fixedposition\caption@position} \newcommand\caption@beginex[3]{% \caption@begin{#1}% - \caption@iflof% - {\def\caption@tempa{#2}}% - {\let\caption@tempa\@empty}% - \ifx\caption@tempa\@empty - \long\def\addcontentsline##1##2##3{}% There is no \@gobblethree... - \fi - \caption@ifempty{#3}{\let\caption@ifempty\@secondoftwo}% -} + \caption@addcontentsline{#1}{#2}% + \caption@ifempty{#3}{}} \newcommand*\caption@end{% \endgroup \let\caption@position\caption@fixedposition} -\let\caption@setfloattype\caption@settype -\newcommand*\caption@letfloattype[2]{% - \def\caption@setfloattype##1{% - \caption@settype{##1}#2\caption@settype{#1}}} -\newcommand*\caption@floatname[1]{\@nameuse{#1name}} -\newcommand*\caption@setfloatname[1]{\@namedef{#1name}} -\AtBeginDocument{% - \@ifundefined{cc@caption}{% - \@ifundefined{caption@old}{% - \let\caption@old\caption - \def\caption{\caption@caption\caption@old}% - \def\caption@caption#1{% - \@ifstar{\ContinuedFloat\global\caption@startrue#1[]}{#1}}% - \let\caption@@old\@caption +\newcommand*\caption@setfnum[1]{% + \@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\par\@@par + \parindent\z@ \parskip\z@skip + \leftskip\z@skip \rightskip\z@skip \@rightskip\z@skip + \parfillskip\@flushglue \lineskip\normallineskip + \baselineskip\normalbaselineskip + \sloppy +} +\newcommand*\caption@normalsize{% + \caption@font*{\KV@caption@fnt@normal\@unused}} +\let\caption@setfloatcapt\@firstofone +\newcommand*\caption@makecurrent[2]{} +\let\caption@makestart\@gobble +\let\caption@anchor\@firstofone +\let\caption@start\relax +\let\caption@@start\relax +\let\caption@freezeHref\relax +\let\caption@defrostHref\relax +\g@addto@macro\caption@prepareslc{\let\caption@anchor\@firstofone} +\caption@AtBeginDocument{% + \caption@setbool{incompatible}{0}% + \caption@CheckCommand\caption{% + % ltfloat.dtx [2002/10/01 v1.1v LaTeX Kernel (Floats)] + \def\caption{% + \ifx\@captype\@undefined + \@latex@error{\noexpand\caption outside float}\@ehd + \expandafter\@gobble + \else + \refstepcounter\@captype + \expandafter\@firstofone + \fi + {\@dblarg{\@caption\@captype}}% + }}% + \caption@CheckCommand\caption{% + % beamerbaselocalstructure.sty,v 1.53 2007/01/28 20:48:21 tantau + \def\caption{ + \ifx\@captype\@undefined + \@latex@error{\noexpand\caption outside figure or table}\@ehd + \expandafter\@gobble + \else + \refstepcounter\@captype + \expandafter\@firstofone + \fi + {\@dblarg{\@caption\@captype}}% + }}% + \caption@CheckCommand\caption{% + % float.sty [2001/11/08 v1.3d Float enhancements (AL)] + \renewcommand\caption{% + \ifx\@captype\@undefined + \@latex@error{\noexpand\caption outside float}\@ehd + \expandafter\@gobble + \else + \refstepcounter\@captype + \let\@tempf\@caption + \expandafter\ifx\csname @float@c@\@captype\endcsname\relax\else + \expandafter\expandafter\let + \expandafter\@tempf\csname @float@c@\@captype\endcsname + \fi + \fi + \@dblarg{\@tempf\@captype}}}% + \caption@CheckCommand\caption{% + % hyperref.sty [2007/02/27 v6.75t Hypertext links for LaTeX] + % hyperref.sty [2007/04/09 v6.76a Hypertext links for LaTeX] + % hyperref.sty [2007/06/12 v6.76h Hypertext links for LaTeX] + \def\caption{% + \ifx\@captype\@undefined + \@latex@error{\noexpand\caption outside float}\@ehd + \expandafter\@gobble + \else + \H@refstepcounter\@captype + \@ifundefined{fst@\@captype}{% + \let\Hy@tempa\@caption + }{% + \let\Hy@tempa\Hy@float@caption + }% + \expandafter\@firstofone + \fi + {\@dblarg{\Hy@tempa\@captype}}% + }}% + \caption@CheckCommand\caption{% + % hyperref.sty [2007/08/05 v6.76j Hypertext links for LaTeX] + \def\caption{% + \ifx\@captype\@undefined + \@latex@error{\noexpand\caption outside float}\@ehd + \expandafter\@gobble + \else + \H@refstepcounter\@captype + \let\Hy@tempa\@caption + \@ifundefined{float@caption}{% + }{% + \expandafter\ifx\csname @float@c@\@captype\endcsname\float@caption + \let\Hy@tempa\Hy@float@caption + \fi + }% + \expandafter\@firstofone + \fi + {\@dblarg{\Hy@tempa\@captype}}% + }}% + \caption@IfCheckCommand{}{% + \caption@Info{% + Incompatible package detected (regarding \string\caption).\MessageBreak + \string\caption\space=\space\meaning\caption}% + \caption@setbool{incompatible}{1}}% + \caption@CheckCommand\@caption{% + % ltfloat.dtx [2002/10/01 v1.1v LaTeX Kernel (Floats)] + \long\def\@caption#1[#2]#3{% + \par + \addcontentsline{\csname ext@#1\endcsname}{#1}% + {\protect\numberline{\csname the#1\endcsname}{\ignorespaces #2}}% + \begingroup + \@parboxrestore + \if@minipage + \@setminipage + \fi + \normalsize + \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par + \endgroup}}% + \caption@CheckCommand\@caption{% + % beamerbaselocalstructure.sty,v 1.53 2007/01/28 20:48:21 tantau + \long\def\@caption#1[#2]#3{% second argument ignored + \par\nobreak + \begingroup + \@parboxrestore + \if@minipage + \@setminipage + \fi + \beamer@makecaption{#1}{\ignorespaces #3}\par\nobreak + \endgroup}}% + \caption@CheckCommand\@caption{% + % hyperref.sty [2007/02/27 v6.75t Hypertext links for LaTeX] \long\def\@caption#1[#2]#3{% + \hyper@makecurrent{\@captype}% + \def\@currentlabelname{#2}% + \par\addcontentsline{\csname ext@#1\endcsname}{#1}{% + \protect\numberline{\csname the#1\endcsname}{\ignorespaces #2}% + }% + \begingroup + \@parboxrestore + \if@minipage + \@setminipage + \fi + \normalsize + \@makecaption{\csname fnum@#1\endcsname}{% + \ignorespaces + \ifHy@nesting + \hyper@@anchor{\@currentHref}{#3}% + \else + \Hy@raisedlink{\hyper@@anchor{\@currentHref}{\relax}}#3% + \fi + }% + \par + \endgroup + }}% + \caption@CheckCommand\@caption{% + % hyperref.sty [2007/04/09 v6.76a Hypertext links for LaTeX] + % hyperref.sty [2007/06/12 v6.76h Hypertext links for LaTeX] + % hyperref.sty [2007/08/05 v6.76j Hypertext links for LaTeX] + \long\def\@caption#1[#2]#3{% + \expandafter\ifx\csname if@capstart\expandafter\endcsname + \csname iftrue\endcsname + \global\let\@currentHref\hc@currentHref + \else + \hyper@makecurrent{\@captype}% + \fi + \def\@currentlabelname{#2}% + \par\addcontentsline{\csname ext@#1\endcsname}{#1}{% + \protect\numberline{\csname the#1\endcsname}{\ignorespaces #2}% + }% + \begingroup + \@parboxrestore + \if@minipage + \@setminipage + \fi + \normalsize + \expandafter\ifx\csname if@capstart\expandafter\endcsname + \csname iftrue\endcsname + \global\@capstartfalse + \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces#3}% + \else + \@makecaption{\csname fnum@#1\endcsname}{% + \ignorespaces + \ifHy@nesting + \hyper@@anchor{\@currentHref}{#3}% + \else + \Hy@raisedlink{\hyper@@anchor{\@currentHref}{\relax}}#3% + \fi + }% + \fi + \par + \endgroup + }}% + \caption@CheckCommand\@caption{% + % nameref.sty [2006/12/27 v2.28 Cross-referencing by name of section] + \long\def\@caption#1[#2]{% + \def\@currentlabelname{#2}% + \NR@@caption{#1}[{#2}]% + }}% + \caption@CheckCommand\@caption{% + % subfigure.sty [2002/07/30 v2.1.4 subfigure package] + \long\def\@caption#1[#2]#3{% + \@ifundefined{if#1topcap}% + {\subfig@oldcaption{#1}[{#2}]{#3}}% + {\@nameuse{if#1topcap}% + \@listsubcaptions{#1}% + \subfig@oldcaption{#1}[{#2}]{#3}% + \else + \subfig@oldcaption{#1}[{#2}]{#3}% + \@listsubcaptions{#1}% + \fi}}}% + \caption@CheckCommand\@caption{% + % subfig.sty [2005/06/28 ver: 1.3 subfig package] + \def\@caption{\caption@}% + }% + \caption@IfCheckCommand{}{% + \caption@Info{% + Incompatible package detected (regarding \string\@caption).\MessageBreak + \string\@caption\space=\space\meaning\@caption}% + \caption@setbool{incompatible}{1}}% + \@ifundefined{caption@ifcompatibility}% + {\let\caption@ifcompatibility\caption@ifincompatible + \let\@tempa\@firstofone}% + {\let\@tempa\@gobble}% suppress warning + \caption@ifcompatibility{% + \@tempa{% + \PackageWarning{caption}{% + *************************************************\MessageBreak + \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 new features of the caption\MessageBreak + package will not work as expected.\MessageBreak + *************************************************\@gobbletwo}% + }% + \renewcommand*\caption@ContinuedFloat[1]{% + \caption@Error{Not available in compatibility mode}}% + \caption@AtBeginDocument*{% + \let\caption@start\relax + \@ifundefined{caption@ORI@capstart}{}{% + \caption@Debug{% + Undo redefinition of \string\capstart\@gobble}% + \let\capstart\caption@ORI@capstart + \let\caption@ORI@capstart\@undefined}% + \@ifundefined{Hy@float@makebox}{}{% + \caption@Debug{% + Restore hyperref redefinition of \string\float@makebox\@gobble}% + \let\float@makebox\Hy@float@makebox + \let\Hy@float@makebox\@undefined}% + }% + \newcommand*\caption@star[2]{#1#2}% + }{% + \caption@ifincompatible{% + \PackageWarning{caption}{% + *****************************************************\MessageBreak + 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!\MessageBreak + *****************************************************\@gobbletwo}% + }{}% + \def\caption{% + \caption@iftype + {\caption@checkgrouplevel\@empty\caption + \caption@star + {\caption@refstepcounter\@captype}% + {\caption@dblarg{\@caption\@captype}}}% + {\caption@Error{\noexpand\caption outside float}}}% + \newcommand*\caption@star[2]{% + \@ifstar{\global\caption@startrue#2[]}{#1#2}}% + \long\def\@caption#1[#2]#3{% + \ifcaption@star \else + \caption@makecurrent{#1}{#2}% + \caption@ifhypcap{\caption@@start}{}% + \fi + \par \caption@beginex{#1}{#2}{#3}% - \caption@@old{#1}[{#2}]{#3}% + \caption@setfloatcapt{% + \caption@boxrestore + \caption@normalsize + \ifcaption@star + \let\caption@anchor\@firstofone + \fi + \@makecaption{\csname fnum@#1\endcsname}% + {\ignorespaces\caption@anchor{#3}}\par}% \caption@end}% - }{}}{% - \caption@Info{captcont package v2.0 detected}% - \def\caption@caption#1{#1}% + \let\caption@ORI@xfloat\@xfloat + \def\@xfloat#1[#2]{% + \caption@ORI@xfloat{#1}[#2]% + \caption@settype{#1}}% }% } -\renewcommand\@makecaption[2]{% +\long\def\@makecaption#1#2{% \caption@iftop{\vskip\belowcaptionskip}{\vskip\abovecaptionskip}% \caption@@make{#1}{#2}% \caption@iftop{\vskip\abovecaptionskip}{\vskip\belowcaptionskip}} +\@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} +}{} \@ifundefined{scr@caption}{}{% - \caption@Info{KOMA-Script class detected} - \AtBeginDocument{\let\scr@caption\caption} - \def\onelinecaptionstrue{\caption@setbool{slc}{1}} - \def\onelinecaptionsfalse{\caption@setbool{slc}{0}} - \def\captionabove{% - \caption@setposition{t}\let\caption@setposition\@gobble - \scr@caption} - \def\captionbelow{% - \caption@setposition{b}\let\caption@setposition\@gobble - \scr@caption} -} -\AtBeginDocument{\@ifundefined{f@ffrench}{}{% - \caption@Info{french(le) package detected}% + \caption@AtBeginDocument{\let\scr@caption\caption}} +\@ifundefined{caption@frenchb}{}{\caption@frenchb} +\caption@AtBeginDocument{\@ifundefined{frenchTeXmods}{}{% + \caption@Info{frenchle/pro package is loaded}% + \let\captionfont@ORI\captionfont + \let\captionlabelfont@ORI\captionlabelfont + \let\@makecaption@ORI\@makecaption + \@ifundefined{GOfrench}% - {\let\caption@tempa\@firstofone}% - {\def\caption@tempa{\g@addto@macro\GOfrench}}% - \caption@tempa{% + {\let\@tempa\@firstofone}% + {\def\@tempa{\g@addto@macro\GOfrench}}% + \@tempa{% + \let\captionfont\captionfont@ORI + \let\captionfont@ORI\@undefined + \let\captionlabelfont\captionlabelfont@ORI + \let\captionlabelfont@ORI\@undefined + \let\@makecaption\@makecaption@ORI + \let\@makecaption@ORI\@undefined \let\@cnORI\caption - \let\caption@tablescaption\@tablescaption - \def\@tablescaption{\caption@caption\caption@tablescaption}% + \let\caption@tcORI\@tablescaption + \def\@tablescaption{\caption@star\relax\caption@tcORI}% \let\@eatDP\@undefined - \let\caption@tempa\@empty + \let\@tempa\@empty \ifx\f@ffrench\fnum@figure - \l@addto@macro\caption@tempa{\let\fnum@figure\f@ffrench}% + \l@addto@macro\@tempa{\let\fnum@figure\f@ffrench}% \fi \ifx\f@tfrench\fnum@table - \l@addto@macro\caption@tempa{\let\fnum@table\f@tfrench}% + \l@addto@macro\@tempa{\let\fnum@table\f@tfrench}% \fi \def\f@ffrench{\ifx\listoffigures\relax\else\figurename~\thefigure\fi}% \def\f@tfrench{\ifx\listoftables\relax\else\tablename~\thetable\fi}% - \caption@tempa -}}} -\def\caption@setfloatposition{% - \caption@setposition{\@fs@iftopcapt t\else b\fi}} -\caption@ifpackage{float}{@float@setevery}{% - \caption@Info{float package v1.3 (or newer) detected}% - \let\caption@of@float\@gobble - \renewcommand*\caption@of[2]{% - \@ifundefined{fst@#2}{}{% - \let\caption@of@float\@firstofone - \@nameuse{fst@#2}\@float@setevery{#2}}% - \def\@captype{#2}#1}% - \let\caption@@float\float@caption - \long\def\float@caption#1[#2]#3{% - \caption@beginex{#1}{#2}{#3}% - \let\@fs@capt\caption@@make - \caption@@float{#1}[{#2}]{#3}% - \caption@of@float{% - \@ifundefined{hyper@@anchor}{}{% - \begingroup - \@tempdima\prevdepth - \nointerlineskip - \let\leavevmode\relax - \hyper@@anchor\@currentHref\relax - \prevdepth\@tempdima - \endgroup}% - \def\caption@@make##1##2{\unvbox\@floatcapt}% - \@makecaption{}{}}% - \caption@end}% - \let\caption@float@setevery\@float@setevery - \def\@float@setevery#1{% - \def\caption@floatname##1{\@nameuse{fname@#1}}% - \def\caption@setfloatname##1{\@namedef{fname@#1}}% - \expandafter\let\expandafter\caption@tempa\csname @float@c@#1\endcsname - \ifx\caption@tempa\float@caption - \else\ifx\caption@tempa\@caption - \else\ifx\caption@tempa\caption@@float - \caption@Info{\protect\@float@c@#1\space := \protect\float@caption}% - \expandafter\let\csname @float@c@#1\endcsname\float@caption + \@tempa + }% +}} +\newcommand\caption@IfPackageLoaded[1]{% + \@testopt{\caption@@IfPackageLoaded{#1}}{}} +\@onlypreamble\caption@IfPackageLoaded +\long\def\caption@@IfPackageLoaded#1[#2]#3#4{% + \@ifpackageloaded{#1}\@firstofone{% + \caption@Debug{#1 package is not loaded (yet)\@gobble}% + \caption@AtBeginDocument}{% + \caption@@ifpackageloaded{#1}[#2]{#3}{#4}}} +\@onlypreamble\caption@@IfPackageLoaded +\newcommand\caption@ifpackageloaded[1]{% + \@testopt{\caption@@ifpackageloaded{#1}}{}} +\@onlypreamble\caption@ifpackageloaded +\long\def\caption@@ifpackageloaded#1[#2]{% + \@ifpackageloaded{#1}{% + \caption@Info{#1 package is loaded}% + \@ifpackagelater{#1}{#2}\@firstoftwo{% + \caption@Error{% + For a successful cooperation we need at least version\MessageBreak + `#2' of package #1,\MessageBreak + but only version\MessageBreak + `\csname ver@#1.\@pkgextension\endcsname'\MessageBreak + is available}% + \@secondoftwo}% + }{\@secondoftwo}} +\@onlypreamble\caption@@ifpackageloaded +\newcommand*\caption@clearmargin{% + \setcaptionmargin\z@ + \let\caption@minmargin\@undefined} +\caption@setbool{needfreeze}{0} +\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 + \def\ContinuedFloat{% + \let\caption@ORI@setcounter\setcounter + \let\caption@ORI@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 + \global\let\caption@SCcontinued\caption@ORI@ContinuedFloat + \let\setcounter\caption@ORI@setcounter + \let\addtocounter\caption@ORI@addtocounter}% + \def\captionsetup##1{% + \caption@g@addto@list\caption@SCsetup{##1}% + \caption@setup{##1}}% + \def\caption{% + \let\captionsetup\@gobble + \caption@star + {\let\caption@ORI@refstepcounter\caption@@refstepcounter + \def\caption@@refstepcounter########1{% + \advance\csname c@########1\endcsname\@ne\relax}% + \caption@refstepcounter\@captype + \let\caption@@refstepcounter\caption@ORI@refstepcounter}% + {\caption@dblarg\@caption@SC}}% + \def\@caption@SC[##1]##2{% + \gdef\caption@SClentry{##1}\gdef\caption@SCtext{##2}% + \ignorespaces}% + #1{% is \@gobble in star form, and \@firstofone otherwise + \def\label##1{\gdef\caption@SClabel{##1}\ignorespaces}}% + }% + \newcommand*\caption@defrost{% + \ifx\caption@ORI@ContinuedFloat\@undefined + \caption@SCcontinued + \ifx\caption@SCsetup\@undefined \else + \expandafter\captionsetup\expandafter{\caption@SCsetup}% + \fi + \ifx\caption@SCtext\@undefined \else + \expandafter\expandafter\expandafter\caption + \expandafter\expandafter\expandafter[% + \expandafter\expandafter\expandafter{% + \expandafter\caption@SClentry\expandafter}\expandafter]% + \expandafter{\caption@SCtext}% + \fi + \ifx\caption@SClabel\@undefined \else + \expandafter\label\expandafter{\caption@SClabel}% + \fi \else - \caption@Info{\protect\@float@c@#1\space := \protect\@caption}% - \expandafter\let\csname @float@c@#1\endcsname\@caption - \fi\fi\fi - \expandafter\ifx\csname @float@c@#1\endcsname\float@caption - \caption@setfloatposition - \expandafter\let\expandafter\caption@fst\csname fst@#1\endcsname - \edef\caption@fst{\noexpand\string\expandafter\noexpand\caption@fst}% - \edef\caption@fst{\noexpand\@gobblefour\caption@fst}% - \caption@setstyle*\caption@fst - \caption@settype\caption@fst - \fi - \caption@float@setevery{#1}}% + \caption@Error{Internal error:\MessageBreak + \noexpand\caption@defrost in same group as \string\caption@freeze}% + \fi}% + }{}% + \caption@undefbool{needfreeze}} +\caption@IfPackageLoaded{float}[2001/11/08 v1.3d]{% + \@ifpackageloaded{floatrow}{% + \caption@ifpackageloaded{floatrow}[2007/08/24 v0.2a]{}{}% + }{% + \let\caption@ORI@float@setevery\@float@setevery + \def\@float@setevery#1{% + \float@ifcaption{#1}{% + \caption@setposition{\@fs@iftopcapt t\else b\fi}% + \renewcommand\caption@setfloatcapt{% + \let\@makecaption\caption@@make + \global\setbox\@floatcapt\vbox}% + \float@getstyle\float@style{#1}% + \caption@setstyle*\float@style + \caption@setoptions\float@style + }{}% + \caption@freezeHref % will be defrosted in \float@makebox + \caption@ORI@float@setevery{#1}}% + \renewcommand*\caption@setfloatcapt{% + \float@ifcaption\@captype{% + \caption@Error{Something is going wrong here...\MessageBreak + For a removal of this problem please consult the\MessageBreak + caption package documentation, especially the sections\MessageBreak + about the `float' and the `wrapfig' package}% + \@gobble + }{% + \@firstofone + }}% + \g@addto@macro\caption@settypehook{% + \expandafter\ifx\csname #1name\endcsname\relax + \expandafter\let\csname #1name\expandafter\endcsname + \csname fname@#1\endcsname + \fi}% \g@addto@macro\fs@plaintop{\def\@fs@mid{\vspace\abovecaptionskip\relax}}% \g@addto@macro\fs@boxed{\def\@fs@mid{\kern\abovecaptionskip\relax}}% + \providecommand*\float@ifstyle[1]{% + \expandafter\ifx\csname fst@#1\endcsname\relax + \expandafter\@secondoftwo + \else + \expandafter\@firstoftwo + \fi}% + \providecommand*\float@getstyle[2]{% + \edef#1{% + \noexpand\expandafter\noexpand\@gobblefour\noexpand\string + \expandafter\expandafter\expandafter\noexpand + \csname fst@#2\endcsname}% + \edef#1{#1}% + \caption@Debug{floatstyle{#2} = `#1'}}% + \providecommand*\float@setstyle[2]{% + \expandafter\edef\csname fst@#1\endcsname{% + \expandafter\noexpand\csname fs@#2\endcsname}}% + \providecommand*\float@dostyle[1]{% + \@nameuse{fst@#1}\@float@setevery{#1}}% + \providecommand*\float@ifcaption[1]{% + \expandafter\ifx\csname @float@c@#1\endcsname\float@caption + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi}% +}}{% + \providecommand*\float@ifstyle[1]{\@secondoftwo}% + \providecommand*\float@ifcaption[1]{\@secondoftwo}% } -\captionsetup[boxed]{skip=2pt} +\captionsetup*[boxed]{skip=2pt} % do not issue a warning when not used \caption@ifbool{ruled}{% - \captionsetup[ruled]{margin=0pt,singlelinecheck=0}% + \captionsetup[ruled]{margin=0pt,minmargin=0,singlelinecheck=0}% }{% \DeclareCaptionStyle{ruled}{labelfont=bf,labelsep=space,strut=0}% } \caption@undefbool{ruled} -\caption@ifpackage{floatrow}{flrow@setlist}{% - \caption@Info{floatrow package v0.1f (or newer) detected}% - \renewcommand*\caption@of[2]{% - \def\@captype{#2}\flrow@setlist{{#2}}#1}% - \renewcommand*\caption@floatname[1]{% - \@nameuse{\@ifundefined{fname@#1}{#1name}{fname@#1}}}% - \renewcommand*\caption@setfloatname[1]{% - \@namedef{\@ifundefined{fname@#1}{#1name}{fname@#1}}}% -} -\caption@ifpackage{hyperref}{theHfigure}{% - \caption@Info{hyperref package v6.74m (or newer) detected}% - \def\caption@ContinuedFloat#1{% - \@ifundefined{theH#1}{}{% - \@ifundefined{CF@#1}{% - \expandafter\caption@newcounter\csname CF@#1\endcsname - \caption@resetContinuedFloat{#1}}{}% - \expandafter\caption@stepcounter\csname CF@#1\endcsname - \expandafter\l@addto@macro\csname theH#1\endcsname{% - .\csname CF@#1\endcsname}% - \let\caption@resetContinuedFloat\@gobble - }}% - \def\caption@resetContinuedFloat#1{% - \@ifundefined{CF@#1}{}{% - \expandafter\caption@setcounter\csname CF@#1\endcsname0}}% -} -\caption@ifpackage{hypcap}{hc@caption}{% - \caption@Info{hypcap package v1.0 (or newer) detected}% - \let\caption@capstart\capstart - \def\capstart{% - \let\hc@org@caption\caption - \begingroup - \let\H@refstepcounter\@gobble - \Hy@hypertexnamesfalse - \caption@capstart - \@ifundefined{hc@hyperref}{}{% hypcap v1.7 - \global\advance\csname c@\@captype\endcsname\@ne}% - \global\let\hc@currentHref\@currentHref - \endgroup - \@ifundefined{hc@hyperref}% - {\let\next\@firstofone}{\let\next\hc@hyperref}% hypcap v1.7 - \next{\def\caption{% - \let\caption\hc@org@caption - \H@refstepcounter\@captype - \@ifundefined{hc@hyperref}{}{% hypcap v1.7 - \global\advance\csname c@\@captype\endcsname\m@ne}% - \caption@caption\hc@caption}}% +\caption@IfPackageLoaded{floatflt}[1996/02/27 v1.3]{% + \let\caption@ORI@floatingfigure\floatingfigure + \def\floatingfigure{% + \caption@floatflt{figure}% + \caption@ORI@floatingfigure}% + \let\caption@ORI@floatingtable\floatingtable + \def\floatingtable{% + \caption@floatflt{table}% + \caption@ORI@floatingtable}% + \newcommand*\caption@floatflt[1]{% + \caption@settype{#1}% + \caption@setoptions{floating#1}% + \let\caption@boxrestore\@parboxrestore}% +}{} +\caption@IfPackageLoaded{fltpage}[1998/10/29 v.0.3]{% + \caption@setbool{needfreeze}{1}% + \renewcommand\FP@helpNote[2]{% + \begingroup % save \caption@thepage + \caption@pageref{#2}% + \typeout{FP#1 is inserted on page \caption@thepage!}% + \endgroup}% + \renewcommand*\FP@floatBegin[1]{% + \def\@captype{#1}% + \let\FP@LabelText\@empty + \begin{lrbox}{\FP@floatCorpusBOX}% + \caption@ifFPrefcap\caption@freeze{% + \def\label##1{\gdef\FP@LabelText{##1}\ignorespaces}% + \caption@freeze*}}% + \renewcommand*\FP@floatEnd{% + \end{lrbox}% + \stepcounter{FP@\@captype C}% + \caption@label\FP@positionLabel + \FP@helpNote\@captype\FP@positionLabel + \let\FP@ContinuedFloat\relax + \FP@float + {\FP@positionLabel}% location label test + {\begin\@captype[p!]% + \FP@ContinuedFloat + \usebox\FP@floatCorpusBOX + \caption@ifFPlistcap + {\caption@refstepcounter\@captype + \expandafter\caption@makecurrent\expandafter\@captype + \expandafter{\caption@SClentry}}% + {\expandafter\captionlistentry\expandafter{\caption@SClentry}}% + \caption@anchor\relax + \ifx\FP@LabelText\@empty \else + \expandafter\label\expandafter{\FP@LabelText}% + \fi + \end\@captype}% + {\let\FP@ContinuedFloat\ContinuedFloat + \caption@ifcompatibility + {\let\caption@ContinuedFloat\@gobble}% + {\caption@clearsetup{ContinuedFloat}% + \caption@clearsetup{continued\@captype}}}% + {\begin\@captype[b!]% + \FP@ContinuedFloat + \let\FP@savedSetfnumCommand\caption@setfnum + \def\caption@setfnum##1{% + \FP@savedSetfnumCommand{##1}% + \ifx\FP@guide\@empty \else + \expandafter\l@addto@macro\csname fnum@##1\endcsname{\ {\FP@guide}}% + \fi}% + \setlength\abovecaptionskip{2pt plus 2pt minus 1pt}% length above caption + \setlength\belowcaptionskip{2pt plus 2pt minus 1pt}% length below caption + \caption@setoptions{FP\@captype}% + \FP@separatorCaption + \caption@ifFPlistcap{}{\caption@set@bool\caption@iflof0}% + \caption@defrost + \end\@captype}% }% - \let\caption@hc@@caption\hc@@caption - \long\def\hc@@caption#1[#2]#3{% - \caption@beginex{#1}{#2}{#3}% - \let\caption@hyper@makecurrent\hyper@makecurrent - \def\hyper@makecurrent\@captype{% - \let\hyper@makecurrent\caption@hyper@makecurrent - \global\let\@currentHref\hc@currentHref}% - \caption@hc@@caption{#1}[{#2}]{#3}% - \caption@end}% +}{% + \let\caption@ifFPlistcap\@undefined + \let\caption@ifFPrefcap\@undefined } -\caption@ifpackage{listings}{lst@MakeCaption}{% - \caption@Info{listings package v1.2 (or newer) detected}% - \let\caption@lst@MakeCaption\lst@MakeCaption +\caption@IfPackageLoaded{hyperref}[2003/11/30 v6.74m]{% + \@ifundefined{hyper@makecurrent}{% hyperref has stopped early + \PackageWarningNoLine{caption}{% + Hyperref support is turned off\MessageBreak + because hyperref has stopped early}% + }{% + \renewcommand*\caption@@refstepcounter{\H@refstepcounter}% + \renewcommand*\caption@makecurrent[2]{% + \caption@makecurrentHref{#1}% + \caption@Debug{hyper current=\@currentHref}% + \def\@currentlabelname{#2}}% + \newcommand*\caption@makecurrentHref{\hyper@makecurrent}% + \renewcommand*\caption@makestart[1]{% + \begingroup + \Hy@hypertexnamesfalse + \gdef\@currentHlabel{}% + \hyper@makecurrent{#1.xxx}% + \endgroup + \caption@Debug{hyper start=\@currentHref}}% + \renewcommand\caption@anchor[1]{% + \caption@Debug{hyper anchor \@currentHref}% + % If we cannot have nesting, the anchor is empty. + \ifHy@nesting + \hyper@@anchor{\@currentHref}{#1}% + \else + \Hy@raisedlink{\hyper@@anchor{\@currentHref}{\relax}}#1% + \fi}% + \newcommand*\caption@@anchor[1]{% + \caption@Debug{hyper anchor #1}% + \begingroup + \@tempdima\prevdepth + \nointerlineskip + \vspace*{-\caption@hypcapspace}% + \let\leavevmode\relax + \hyper@@anchor{#1}\relax + \vspace*{\caption@hypcapspace}% + \prevdepth\@tempdima + \endgroup}% + \renewcommand*\caption@@ContinuedFloat[1]{% + \@ifundefined{theH#1}{}{% + \expandafter\l@addto@macro\csname theH#1\endcsname{% + \@alph\c@ContinuedFloat}}}% + \newif\if@capstart + \def\caption@start{% + \caption@ifhypcap{% + \ifvmode + \caption@makestart\@captype + \caption@@anchor\@currentHref + \global\@capstarttrue + \let\hc@currentHref\@currentHref + \def\caption@makecurrentHref##1{% + \global\@capstartfalse + \global\let\@currentHref\hc@currentHref}% + \let\caption@anchor\@firstofone + \let\caption@@anchor\@gobble + \else + \PackageWarning{caption}{Wrong TeX mode, no hyperlink anchor was set}% + \fi}{}}% + \def\caption@@start{% + \@ifundefined{hc@currentHref}{% + \PackageWarning{caption}{% + The option `hypcap=true' will be ignored for this\MessageBreak + particular \string\caption}}{}}% + \def\caption@freezeHref{% + \let\caption@ORI@start\caption@start + \def\caption@start{\let\caption@start\caption@ORI@start}% + \let\caption@ORI@@start\caption@@start + \global\let\caption@currentHref\@undefined + \def\caption@@start{\global\let\caption@currentHref\@currentHref}% + \let\caption@ORI@setfloatcapt\caption@setfloatcapt + \renewcommand*\caption@setfloatcapt{% + \ifx\caption@currentHref\@undefined \else + \let\caption@anchor\@firstofone + \fi + \caption@ORI@setfloatcapt}}% + \def\caption@defrostHref{% + \ifx\caption@currentHref\@undefined \else + \caption@@anchor\caption@currentHref + \global\let\caption@currentHref\@undefined + \fi}% + \@ifundefined{HyOrg@float@makebox}{}{% + \caption@Debug{% + Redefining \noexpand\float@makebox (again)\@gobble}% + \let\Hy@float@makebox\float@makebox + \renewcommand\float@makebox[1]{% + \HyOrg@float@makebox{#1\relax \caption@defrostHref}}% + }% +}}{} +\caption@IfPackageLoaded{hypcap}{% v1.0 + \ifx\caption@start\relax \else % hyperref hasn't stopped early + \let\caption@ORI@capstart\capstart + \let\capstart\caption@start + \let\caption@start\relax + \let\caption@@start\relax + \renewcommand*\caption@hypcapspace{\hypcapspace}% + \@ifundefined{Hy@float@makebox}{}{% + \caption@Debug{% + Restore hyperref redefinition of \string\float@makebox\@gobble}% + \let\float@makebox\Hy@float@makebox + \let\Hy@float@makebox\@undefined}% + \fi}{} +\caption@IfPackageLoaded{listings}[2004/02/13 v1.2]{% + \let\caption@ORI@lst@MakeCaption\lst@MakeCaption \def\lst@MakeCaption#1{% - \def\caption@autoposition{\caption@setposition{#1}}% + \caption@setoptions{lstlisting}% + \caption@setautoposition{#1}% \caption@begin{lstlisting}% - \caption@lst@MakeCaption{#1}% + \caption@ORI@lst@MakeCaption{#1}% \caption@end}% -} -\caption@ifpackage{longtable}{LT@makecaption}{% - \caption@Info{longtable package v3.15 (or newer) detected}% - \def\LT@makecaption#1#2#3{% + \providecommand*\ext@lstlisting{lol}% + \g@addto@macro\caption@settypehook{\let\lst@@caption\relax}% +}{} +\providecommand*\LTcaptype{table} +\caption@IfPackageLoaded{longtable}[1995/05/24 v3.14]{% + \RequirePackage{ltcaption}[2007/09/01]% + \let\LT@@makecaption\@undefined + \let\caption@ORI@LT@array\LT@array + \renewcommand*\LT@array{% + \global\let\caption@opt@@longtable\@undefined + \def\captionsetup##1{\noalign{% + \@captionsetup\@gobble[@longtable]{##1}% + \global\let\caption@opt@@longtable\caption@opt@@longtable}}% + \def\captionlistentry##1{\noalign{% + \caption@listentry[\LTcaptype]{##1}}}% + \def\ContinuedFloat{\noalign{% + \caption@Error{\noexpand\ContinuedFloat outside float}}}% + \caption@ORI@LT@array}% +\def\LT@c@ption#1[#2]#3{% + \LT@makecaption#1{\csname fnum@\LTcaptype\endcsname}{#3}% + \def\@currentlabelname{#2}% + \caption@addcontentsline\LTcaptype{#2}}% + \renewcommand\LT@makecaption[3]{% \caption@LT@make{% \caption@startrue#1\caption@starfalse - \caption@letfloattype{longtable}{% - \ifdim\LTcapwidth=4in \else - \setcaptionwidth\LTcapwidth - \fi}% - \let\caption@defaultpos\@firstoftwo - \def\caption@autoposition{% - \caption@setposition{\ifcase\LT@rows t\else b\fi}}% - \caption@begin{table}% + \caption@settype*\LTcaptype + \ifdim\LTcapwidth=4in \else + \setcaptionwidth\LTcapwidth + \fi + \caption@setoptions{longtable}% + \caption@setoptions{@longtable}% + \caption@setautoposition{\ifcase\LT@rows t\else b\fi}% + \caption@resetContinuedFloat\LTcaptype + \caption@begin\LTcaptype + \caption@normalsize \vskip-\ht\strutbox \caption@iftop{\vskip\belowcaptionskip}{\vskip\abovecaptionskip}% \caption@@make{#2}{#3}\endgraf \caption@iftop{\vskip\abovecaptionskip}{\vskip\belowcaptionskip}% \caption@end}}% - \newcommand\caption@LT@make[1]{% - \LT@mcol\LT@cols c{\hbox to\z@{\hss\parbox[t]\hsize{#1}\hss}}}% -} -\caption@ifpackage{picins}{piccaption}{% - \caption@Info{picins package v3.0 (or newer) detected}% - \def\piccaption{\@dblarg\@piccaption} +}{} +\caption@IfPackageLoaded{picinpar}{% + \long\def\figwindow[#1,#2,#3,#4] {% + \caption@window{figure}% + \caption@setoptions{figwindow}% + \begin{window}[#1,#2,{#3},\caption@wincaption{#4}] }% + \long\def\tabwindow[#1,#2,#3,#4] {% + \caption@window{table}% + \caption@setoptions{tabwindow}% + \begin{window}[#1,#2,{#3},\caption@wincaption{#4}] }% + \newcommand*\caption@window{% + \let\caption@boxrestore\@parboxrestore + \let\@makecaption\caption@@make + \caption@setautoposition b% + \caption@settype}% + \newcommand\caption@wincaption[1]{% + \ifdim\picwd=\z@ + \let\caption@makecurrent\@gobbletwo + \let\caption@@start\relax + \caption@prepareslc + \fi + \edef\@tempa{\expandafter\noexpand\@car#1\@nil}% + \if\@tempa* + \let\@tempa\@firstofone + \else\if\@tempa[%] + \let\@tempa\@firstofone + \else + \let\@tempa\@empty + \fi\fi + \expandafter\caption\@tempa{#1}}% +}{} +\newcommand*\piccaptiontype[1]{\def\@piccaptype{#1}} +\caption@IfPackageLoaded{picins}{% + \@ifundefined{@piccaptype}{% + \caption@iftype{% + \let\@piccaptype\@captype + }{% + \def\@piccaptype{figure}% + }% + }{}% + \let\@captype\@undefined + \def\piccaption{\caption@star\relax{\caption@dblarg\@piccaption}}% + \let\caption@ORI@make@piccaption\make@piccaption + \def\make@piccaption{% + \let\caption@ORI\caption + \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% + \expandafter\expandafter\expandafter\caption@ORI + \expandafter\expandafter\expandafter[% + \expandafter\expandafter\expandafter{% + \expandafter##1\expandafter}\expandafter]\expandafter{##2}}% + \caption@ORI@make@piccaption + \let\caption\caption@ORI}% + + \let\caption@ORI@ivparpic\ivparpic + \def\ivparpic(#1,#2)(#3,#4)[#5][#6]#7{% + \let\caption@ORI@noindent\noindent + \def\noindent{% + \caption@defrostHref + \let\noindent\caption@ORI@noindent + \noindent}% + \caption@ORI@ivparpic(#1,#2)(#3,#4)[#5][#6]{#7}% + \let\noindent\caption@ORI@noindent}% +}{% + \let\piccaptiontype\@undefined } -\caption@ifpackage{rotating}{@rotcaption}{% - \caption@Info{rotating package v2.0 (or newer) detected}% +\caption@IfPackageLoaded{rotating}[1995/08/22 v2.10]{% \def\rotcaption{\let\@makecaption\@makerotcaption\caption}% \def\rotcaptionof{% - \@ifstar{\caption@of{\rotcaption*}}{\caption@of\rotcaption}}% + \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 - \setcaptionmargin\z@ + \caption@clearmargin \let\captionbox\@secondoftwo}% - \caption@setbool{slc}{0}% been there, done that + \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}}% -} -\caption@ifpackage{sidecap}{endSC@FLOAT}{% - \caption@Info{sidecap package v1.4d (or newer) detected}% - \@ifundefined{caption@caption}% - {\let\caption@tempa\AtBeginDocument}% - {\let\caption@tempa\@firstofone}% - \caption@tempa{\let\SC@caption=\caption}% - \let\caption@SC@zfloat\SC@zfloat +}{} +\caption@IfPackageLoaded{sidecap}[1999/05/11 v1.4d]{% + \caption@setbool{needfreeze}{1}% + \caption@AtBeginDocument{\let\SC@caption=\caption}% + \let\caption@ORI@SC@zfloat\SC@zfloat \def\SC@zfloat#1#2#3[#4]{% - \caption@SC@zfloat{#1}{#2}{#3}[#4]% - \global\let\SC@CAPsetup\@empty - \def\captionsetup##1{\g@addto@macro\SC@CAPsetup{,##1}}% - \let\caption@SC\caption - \def\caption{\caption@caption\caption@SC}% - }% - \let\caption@endSC@FLOAT\endSC@FLOAT + \caption@ORI@SC@zfloat{#1}{#2}{#3}[#4]% + \caption@settype*{#2}% + \caption@freeze*}% + \let\caption@ORI@endSC@FLOAT\endSC@FLOAT \def\endSC@FLOAT{% - \let\@captype\SC@captype - \caption@esetup\SC@CAPsetup - \caption@letfloattype{SC\@captype}{% - \@listdepth\z@ - \setcaptionmargin\z@ + \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 \@ifundefined{SC@justify}{}{% - \ifx\SC@justify\@empty\else + \ifx\SC@justify\@empty \else \let\caption@hj\SC@justify \let\SC@justify\@empty \fi}}% - \long\def\caption@ifempty##1{% - \ifx\SC@CAPtext\@empty - \expandafter\@firstofone + \let\caption\SC@orig@caption + \def\SC@orig@caption[##1]##2{\caption@defrost}% + \caption@setSC@justify % for compatibility mode + \caption@ORI@endSC@FLOAT}% +}{} +\caption@IfPackageLoaded{subfigure}[2002/01/23 v2.1]{% + \def\sf@ifpositiontop{% + \@ifundefined{if\@captype topcap}{% + \@gobbletwo + }{% + \@nameuse{if\@captype topcap}% + \expandafter\@firstoftwo \else - \expandafter\@gobble - \fi}% - \caption@endSC@FLOAT}% -} -\def\caption@setSTposition{% - \caption@setposition{\if@topcaption t\else b\fi}} -\caption@ifpackage{supertabular}{ST@caption}{% - \caption@Info{supertabular package detected}% - \let\caption@tablecaption\tablecaption - \def\tablecaption{\caption@caption\caption@tablecaption}% + \expandafter\@secondoftwo + \fi + }}% +}{} +\caption@IfPackageLoaded{supertabular}[2002/07/19 v4.1e]{% + \let\caption@ORI@tablecaption\tablecaption + \def\tablecaption{\caption@star\relax\caption@ORI@tablecaption}% \long\def\ST@caption#1[#2]#3{\par% - \caption@letfloattype{supertabular}{}% - \let\caption@fixposition\caption@setSTposition + \caption@settype*{#1}% + \caption@setoptions{supertabular}% + \def\caption@fixposition{% + \caption@setposition{\if@topcaption t\else b\fi}}% \caption@beginex{#1}{#2}{#3}% - \addcontentsline{\csname ext@#1\endcsname}{#1}% - {\protect\numberline{% - \csname the#1\endcsname}{\ignorespaces #2}}% - \@parboxrestore - \normalsize + \caption@boxrestore + \caption@normalsize \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par \caption@end}% +}{% + \let\caption@setSTposition\@undefined } +\caption@IfPackageLoaded{threeparttable}[2003/06/13 v3.0]{% + \let\caption@ORI@threeparttable\threeparttable + \renewcommand*\threeparttable{% + \caption@settype{table}% + \caption@setposition a% ? + \caption@clearmargin + \caption@setoptions{threeparttable}% + \caption@ORI@threeparttable}% + \let\caption@ORI@measuredfigure\measuredfigure + \renewcommand*\measuredfigure{% + \caption@settype{figure}% + \caption@setposition a% ? + \caption@clearmargin + \caption@setoptions{measuredfigure}% + \caption@ORI@measuredfigure}% + \def\TPT@caption#1[#2]#3{% + \gdef\TPT@docapt{% + \global\let\TPT@docapt\@undefined + \caption@setautoposition\caption@TPT@position + \TPT@LA@caption{#1}[{#2}]{#3}}% + \ifx\TPT@hsize\@empty + \let\label\TPT@gatherlabel % Bug: does not work for measuredfigures + \gdef\caption@TPT@position{t}% + \g@addto@macro\TPT@docapt\caption@TPT@eatvskip + \else + \def\caption@TPT@position{b}% + \TPT@docapt + \fi + \ignorespaces}% + %\newcommand*\caption@TPT@eatvskip{\vskip-.2\baselineskip}% + \def\caption@TPT@eatvskip#1\vskip{#1\@tempdima=}% +}{} +\caption@IfPackageLoaded{wrapfig}{% ver 3.3 (Oct 12, 1999) + \providecommand*\float@ifstyle[1]{% + \expandafter\ifx\csname fst@#1\endcsname\relax + \expandafter\@secondoftwo + \else + \expandafter\@firstoftwo + \fi}% + \newcommand*\caption@restylewrapfloat[1]{% + \expandafter\ifx\csname caption@OUR@wrap#1\expandafter\endcsname + \csname wrap#1\endcsname + \caption@Error{% + For a successful cooperation of the `wrapfig' package\MessageBreak + with the `float' package you should load the `wrapfig'\MessageBreak + package *after* the `float' package}% + \else + \expandafter\let\csname caption@ORI@wrap#1\expandafter\endcsname + \csname wrap#1\endcsname + \@namedef{wrap#1}{% + \caption@settype*{#1}% + \float@ifstyle{#1}{% + \ifx\WF@floatstyhook\@undefined + \caption@Error{% + For a successful cooperation of the `wrapfig' package\MessageBreak + with the `float' package you should use at least\MessageBreak + `wrapfig' version 3.6}% + \else + \float@dostyle{#1}% + \fi}{}% + \caption@clearmargin + \caption@setoptions{wrapfloat}% + \caption@setoptions{wrap#1}% + \@nameuse{caption@ORI@wrap#1}}% + \expandafter\let\csname caption@OUR@wrap#1\expandafter\endcsname + \csname wrap#1\endcsname + \fi}% + \caption@restylewrapfloat{figure}% + \caption@restylewrapfloat{table}% + \ifx\WF@floatstyhook\@undefined \else % wrapfig v3.6 + \@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@}}% + \@tempa}% perform redefinitions + \let\caption@ORI@wrapfloat\wrapfloat + \def\wrapfloat#1{% + \float@ifstyle{#1}{% + \caption@Error{% + For a successful cooperation of the `wrapfig' package\MessageBreak + with the `float' package you should load the `wrapfig'\MessageBreak + package *right after* the `float' package}}{}% + \caption@ORI@wrapfloat{#1}}% + \fi % wrapfig v3.6 + \def\WF@rapt[#1]#2{% final two args: #1 = overhang, #2 = width, + \gdef\WF@ovh{#1}% hold overhang for later, when \width is known + \global\setbox\WF@box\vtop\bgroup \setlength\hsize{#2}% + \caption@start + \ifdim\hsize>\z@ \@parboxrestore \else + \setbox\z@\hbox\bgroup \let\wf@@caption\caption \let\caption\wf@caption + \ignorespaces \fi}% +}{} \endinput %% %% End of file `caption.sty'. diff --git a/Master/texmf-dist/tex/latex/caption/caption2.sty b/Master/texmf-dist/tex/latex/caption/caption2.sty index bedf31d09ed..5fec636caf7 100644 --- a/Master/texmf-dist/tex/latex/caption/caption2.sty +++ b/Master/texmf-dist/tex/latex/caption/caption2.sty @@ -22,35 +22,45 @@ %% %% This Current Maintainer of this work is Axel Sommerfeldt. %% -%% This work consists of the files caption.ins, caption.dtx, -%% caption2.dtx, and anleitung.tex and the derived files -%% caption.sty, caption2.sty, caption3.sty, and manual.tex. +%% 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. %% \NeedsTeXFormat{LaTeX2e}[1994/12/01] -\ProvidesPackage{caption2}[2007/04/11 v2.2a Customising captions (AS)] -\PackageWarningNoLine{caption2}{% - *** THIS PACKAGE IS OBSOLETE, PLEASE USE caption ***} -\RequirePackage{caption3}[2007/03/04] % needs v3.0m or newer +\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 + ****************************************************\@gobbletwo}% +\RequirePackage{caption3}[2007/08/12] % needs v3.1 or newer \@ifpackageloaded{caption}{% - \PackageError{caption2}{You can't use both the caption *and* caption2 package}{\caption@eh}% + \PackageError{caption2}{% + You can't use both, the (current) caption *and*\MessageBreak + the (obsolete) caption2 package}\caption@eh \endinput }{} \newcommand*\captionlabeldelim{} \newcommand*\captionlabelsep{} \newcommand*\ifcaptionwidth{\ifdim\captionwidth>\z@} -\newif\ifcaption@temp +\let\captionindent\caption@indent \def\ifcaptionlabel{% \ifcaption@star - \caption@tempfalse + \@tempswafalse \else - \caption@temptrue + \@tempswatrue \fi - \ifcaption@temp} + \if@tempswa} \def\captionlabeltrue{\caption@starfalse} \def\captionlabelfalse{\caption@startrue} \def\ifonelinecaptions{% - \caption@ifslc{\caption@temptrue}{\caption@tempfalse}% - \ifcaption@temp} + \caption@ifslc{\@tempswatrue}{\@tempswafalse}% + \if@tempswa} \def\onelinecaptionstrue{\caption@setbool{slc}{1}} \def\onelinecaptionsfalse{\caption@setbool{slc}{0}} \newif\ifignoreLTcapwidth diff --git a/Master/texmf-dist/tex/latex/caption/caption3.sty b/Master/texmf-dist/tex/latex/caption/caption3.sty index 8dba296a100..5488a81fb14 100644 --- a/Master/texmf-dist/tex/latex/caption/caption3.sty +++ b/Master/texmf-dist/tex/latex/caption/caption3.sty @@ -22,172 +22,329 @@ %% %% This Current Maintainer of this work is Axel Sommerfeldt. %% -%% This work consists of the files caption.ins, caption.dtx, -%% caption2.dtx, and anleitung.tex and the derived files -%% caption.sty, caption2.sty, caption3.sty, and manual.tex. +%% 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. %% \NeedsTeXFormat{LaTeX2e}[1994/12/01] -\ProvidesPackage{caption3}[2007/04/11 v3.0q caption3 kernel (AR)] +\ProvidesPackage{caption3}[2007/09/01 v3.1 caption3 kernel (AR)] \providecommand*\@nameundef[1]{% \expandafter\let\csname #1\endcsname\@undefined} -\providecommand{\l@addto@macro}[2]{% +\providecommand\l@addto@macro[2]{% \begingroup \toks@\expandafter{#1#2}% \edef\@tempa{\endgroup\def\noexpand#1{\the\toks@}}% \@tempa} \def\bothIfFirst#1#2{% \protected@edef\caption@tempa{#1}% - \ifx\caption@tempa\@empty\else + \ifx\caption@tempa\@empty \else #1#2% \fi} \def\bothIfSecond#1#2{% \protected@edef\caption@tempa{#2}% - \ifx\caption@tempa\@empty\else + \ifx\caption@tempa\@empty \else #1#2% \fi} -\def\caption@ifinlist#1#2{% - \let\next\@secondoftwo - \edef\caption@tempa{#1}% - \@for\caption@tempb:={#2}\do{% - \ifx\caption@tempa\caption@tempb - \let\next\@firstoftwo +\newcommand*\caption@ifinlist{% + \@expandtwoargs\caption@@ifinlist} +\newcommand*\caption@@ifinlist[2]{% + \begingroup + \def\@tempa##1,#1,##2\@nil{% + \endgroup + \ifx\relax##2\relax + \expandafter\@secondoftwo + \else + \expandafter\@firstoftwo \fi}% - \next} -\def\caption@setbool#1#2{% + \@tempa,#2,#1,\@nil}% +\newcommand*\caption@ifin@list[2]{% + \caption@ifempty@list#1% + {\@secondoftwo}% + {\@expandtwoargs\caption@@ifinlist{#2}{#1}}} +\newcommand*\caption@g@addto@list[2]{% + \caption@ifempty@list#1{\gdef#1{#2}}{\g@addto@macro#1{,#2}}} +\newcommand*\caption@l@addto@list[2]{% + \caption@ifempty@list#1{\def#1{#2}}{\l@addto@macro#1{,#2}}} +\newcommand*\caption@g@removefrom@list[2]{% + \caption@l@removefrom@list#1{#2}% + \global\let#1#1} +\newcommand*\caption@l@removefrom@list[2]{% + \caption@ifempty@list#1{}{\@expandtwoargs\@removeelement{#2}#1#1}} +\newcommand*\caption@for@list[2]{% + \caption@ifempty@list#1{}{% + \def\caption@tempb##1{#2}% + \@for\caption@tempa:=#1\do{% + \expandafter\caption@tempb\expandafter{\caption@tempa}}}} +\newcommand*\caption@ifempty@list[1]{% + \ifx#1\@undefined + \expandafter\@firstoftwo + \else\ifx#1\relax + \expandafter\expandafter\expandafter\@firstoftwo + \else\ifx#1\@empty + \expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter\@firstoftwo + \else + \expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter\@secondoftwo + \fi\fi\fi} +\newcommand*\caption@setbool[1]{% + \expandafter\caption@set@bool\csname caption@if#1\endcsname} +\newcommand*\caption@set@bool[2]{% \caption@ifinlist{#2}{1,true,yes,on}{% - \expandafter\let\csname caption@if#1\endcsname\@firstoftwo + \let#1\@firstoftwo }{\caption@ifinlist{#2}{0,false,no,off}{% - \expandafter\let\csname caption@if#1\endcsname\@secondoftwo + \let#1\@secondoftwo }{% \caption@Error{Undefined boolean value `#2'}% }}} -\def\caption@ifbool#1{\@nameuse{caption@if#1}} -\def\caption@undefbool#1{\@nameundef{caption@if#1}} -\def\caption@newcounter#1{\gdef#1{0}} -\def\caption@setcounter#1#2{\xdef#1{#2}} -\def\caption@addtocounter#1#2{% +\newcommand*\caption@ifbool[1]{\@nameuse{caption@if#1}} +\newcommand*\caption@undefbool[1]{\@nameundef{caption@if#1}} +\newcommand*\caption@teststar[3]{\@ifstar{#1{#2}}{#1{#3}}} +\newcommand*\caption@withoptargs[1]{% + \@ifstar + {\def\caption@tempa{*}\caption@@withoptargs#1}% + {\def\caption@tempa{}\caption@@withoptargs#1}} +\def\caption@@withoptargs#1{% + \@ifnextchar[%] + {\caption@@@withoptargs#1}% + {\caption@@@@withoptargs#1}} +\def\caption@@@withoptargs#1[#2]{% + \l@addto@macro\caption@tempa{[{#2}]}% + \caption@@withoptargs#1} +\def\caption@@@@withoptargs#1{% + \expandafter#1\expandafter{\caption@tempa}} +\newcommand\caption@DoCheckCommand[2]{% \begingroup - \@tempcnta#1% - \advance\@tempcnta#2% - \xdef#1{\the\@tempcnta}% - \endgroup} -\def\caption@stepcounter#1{\caption@addtocounter#1\@ne} -\newcommand\caption@Package{caption} + \let\@tempa#1% + #2% + \ifx\@tempa#1% + \endgroup + \let\caption@CheckCommand\@gobbletwo + \else + \endgroup + \fi} +\@onlypreamble\caption@DoCheckCommand +\let\caption@CheckCommand\caption@DoCheckCommand +\@onlypreamble\caption@CheckCommand +\newcommand*\caption@IfCheckCommand{% + \ifx\caption@CheckCommand\@gobbletwo + \let\next\@firstoftwo + \else + \let\next\@secondoftwo + \fi + \let\caption@CheckCommand\caption@DoCheckCommand + \next} +\@onlypreamble\caption@IfCheckCommand +\let\caption@begindocumenthook\@empty +\let\caption@@begindocumenthook\@empty +\def\caption@AtBeginDocument{% + \caption@teststar\g@addto@macro + \caption@@begindocumenthook\caption@begindocumenthook} +\@onlypreamble\caption@AtBeginDocument +\AtBeginDocument{% + \PackageInfo{caption}{Begin \noexpand\AtBeginDocument code\@gobble}% + \def\caption@AtBeginDocument{% + \@ifstar{\g@addto@macro\caption@@begindocumenthook}\@firstofone}% + \caption@begindocumenthook + \let\caption@begindocumenthook\@undefined + \def\caption@AtBeginDocument{% + \@ifstar\@firstofone\@firstofone}% + \caption@@begindocumenthook + \let\caption@@begindocumenthook\@undefined + \PackageInfo{caption}{End \noexpand\AtBeginDocument code\@gobble}} \newcommand*\caption@Error[1]{% \PackageError\caption@Package{#1}\caption@eh} -\newcommand\caption@eh{% +\newcommand*\caption@Package{caption} +\newcommand*\caption@eh{% If you do not understand this error, please take a closer look\MessageBreak at the documentation of the `\caption@Package' package.\MessageBreak \@ehc} \RequirePackage{keyval}[1997/11/10] \providecommand*\undefine@key[2]{% \@nameundef{KV@#1@#2}\@nameundef{KV@#1@#2@default}} -\newcommand\DeclareCaptionOption{% - \@ifstar{\caption@declareoption\AtEndOfPackage}% - {\caption@declareoption\@gobble}} +\providecommand*\@onlypreamble@key[2]{% + \expandafter\@onlypreamble\csname KV@#1@#2\endcsname} +\@onlypreamble\@onlypreamble@key +\newcommand*\DeclareCaptionOption{% + \caption@teststar\caption@declareoption\AtEndOfPackage\@gobble} +\@onlypreamble\DeclareCaptionOption \newcommand*\caption@declareoption[2]{% #1{\undefine@key{caption}{#2}}\define@key{caption}{#2}} -\@onlypreamble\DeclareCaptionOption \@onlypreamble\caption@declareoption -\newcommand\captionsetup{\@ifnextchar[\caption@setuptype\caption@setup} -\newcommand\caption@typ@{caption@typ@} % This saves 74 words of TeX memory -\def\caption@setuptype[#1]#2{% - \@ifundefined{\caption@typ@#1}% - {\@namedef{\caption@typ@#1}{#2}}% - {\expandafter\l@addto@macro\csname\caption@typ@#1\endcsname{,#2}}} -\newcommand\caption@setup{\caption@setkeys{caption}} -\newcommand*\caption@setkeys{% - \@dblarg\caption@@setkeys} +\newcommand*\captionsetup{% + \caption@teststar\@captionsetup\@gobble\@firstofone} +\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} +\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{\PackageWarning{caption}{Option list `#2' undefined}}}% + {\ifx,#1,% + \caption@clearsetup{#2}% + \else + \caption@@removefromsetup{#1}{#2}% + \fi}} +\newcommand*\caption@clearsetup[1]{% + \caption@removefromoptlist{#1}% + \@nameundef{caption@opt@#1}} +\newcommand*\caption@removefromsetup{% + \let\caption@tempa\@gobble + \caption@@removefromsetup} +\newcommand*\caption@@removefromsetup[2]{% + \expandafter\let\expandafter\@tempa\csname caption@opt@#2\endcsname + \expandafter\let\csname caption@opt@#2\endcsname\@undefined + \def\@tempb##1=##2\@nil{##1}% + \edef\@tempc{#1}% + \@for\@tempa:=\@tempa\do{% + \edef\@tempd{\expandafter\@tempb\@tempa=\@nil}% + \ifx\@tempd\@tempc + \let\caption@tempa\@gobble + \else + \expandafter\expandafter\expandafter\caption@l@addto@list + \expandafter\csname caption@opt@#2\expandafter\endcsname + \expandafter{\@tempa}% + \fi}% + \expandafter\caption@ifempty@list\csname caption@opt@#2\endcsname + {\caption@removefromoptlist{#2}}{}% + \caption@tempa{% + \PackageWarning{caption}{% + Option `#1' was not in list `#2'\MessageBreak}}} +\newcommand*\showcaptionsetup[2][\@firstofone]{% + \GenericWarning{}{% + #1 Caption Info: KV list on `#2'\MessageBreak + #1 Caption Data: \@ifundefined{caption@opt@#2}{% + -none-% + }{% + {\expandafter\expandafter\expandafter\strip@prefix + \expandafter\meaning\csname caption@opt@#2\endcsname}% + }}} +\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}% + \caption@clearsetup{#1}% + \fi} +\newcommand*\caption@addtooptlist[1]{% + \@ifundefined{caption@opt@#1@lineno}{% + \caption@dooptlist\caption@g@addto@list{#1}% + \expandafter\xdef\csname caption@opt@#1@lineno\endcsname{\the\inputlineno}% + }{}} +\newcommand*\caption@removefromoptlist[1]{% + \caption@dooptlist\caption@g@removefrom@list{#1}% + \global\expandafter\let\csname caption@opt@#1@lineno\endcsname\@undefined} +\newcommand*\caption@dooptlist[2]{% + \begingroup + \edef\@tempa{#2}\@onelevel@sanitize\@tempa + \expandafter#1\expandafter\caption@optlist\expandafter{\@tempa}% + \endgroup} +\AtEndDocument{% + \caption@for@list\caption@optlist{% + \PackageWarningNoLine{caption}{% + Unused \string\captionsetup[#1] + on input line \csname caption@opt@#1@lineno\endcsname}}} +\newcommand*\caption@setkeys{\@dblarg\caption@@setkeys} \long\def\caption@@setkeys[#1]#2#3{% - \ifnum\caption@keydepth=0\relax - \let\caption@KV@errx\KV@errx - \let\caption@KV@err\KV@err + \ifx\caption@keydepth\@empty + \let\caption@ORI@KV@errx\KV@errx + \let\caption@ORI@KV@err\KV@err \let\KV@errx\caption@Error \let\KV@err\caption@Error \fi - \caption@stepcounter\caption@keydepth + \l@addto@macro\caption@keydepth.% \def\caption@Package{#1}% \caption@Debug{\protect\setkeys{#2}{#3}}% \setkeys{#2}{#3}% \def\caption@Package{caption}% - \caption@addtocounter\caption@keydepth\m@ne - \ifnum\caption@keydepth=0\relax - \let\KV@errx\caption@KV@errx - \let\KV@err\caption@KV@err + \edef\caption@keydepth{\expandafter\@cdr\caption@keydepth\@nil}% + \ifx\caption@keydepth\@empty + \let\KV@errx\caption@ORI@KV@errx + \let\KV@err\caption@ORI@KV@err \fi} -\caption@newcounter\caption@keydepth -\newcommand*\caption@settype[1]{% - \@ifundefined{\caption@typ@#1}{}{% - \caption@esetup{\csname\caption@typ@#1\endcsname}}} -\newcommand*\caption@esetup[1]{% - \edef\caption@tempa{\noexpand\caption@setup{#1}}% - \caption@tempa} -\newcommand*\clearcaptionsetup[1]{\@nameundef{\caption@typ@#1}} -\newcommand*\showcaptionsetup[2][\@firstofone]{% - \GenericWarning{}{% - #1 Caption Info: KV list on `#2'\MessageBreak - #1 Caption Data: (% - \@ifundefined{\caption@typ@#2}{% - % empty -- print nothing - }{% - \@nameuse{\caption@typ@#2}% - }% - )}} -\newcommand*\caption@ProcessOptions[1]{% +\let\caption@keydepth\@empty +\newcommand*\caption@ExecuteOptions[2]{% + \@expandtwoargs\caption@setkeys{#1}{#2}}% +\@onlypreamble\caption@ExecuteOptions +\newcommand*\caption@ProcessOptions{% + \caption@teststar\caption@@ProcessOptions\@gobble\@firstofone} +\@onlypreamble\caption@ProcessOptions +\newcommand*\caption@@ProcessOptions[2]{% \let\@tempc\relax \let\caption@tempa\@empty - \@for\CurrentOption:=\@classoptionslist\do{% - \@ifundefined{KV@#1@\CurrentOption}{% - }{% - \@ifundefined{KV@#1@\CurrentOption @default}{% - \PackageInfo{#1}{Global option `\CurrentOption' ignored}% - }{% - \PackageInfo{#1}{Global option `\CurrentOption' processed}% - \edef\caption@tempa{\caption@tempa,\CurrentOption,}% - \@expandtwoargs\@removeelement\CurrentOption - \@unusedoptionlist\@unusedoptionlist + #1{% \@firstofone -or- \@gobble + \@for\CurrentOption:=\@classoptionslist\do{% + \@ifundefined{KV@#2@\CurrentOption}{}{% + \@ifundefined{KV@#2@\CurrentOption @default}{% + \PackageInfo{#2}{Global option `\CurrentOption' ignored}% + }{% + \PackageInfo{#2}{Global option `\CurrentOption' processed}% + \edef\caption@tempa{\caption@tempa,\CurrentOption,}% + \@expandtwoargs\@removeelement\CurrentOption + \@unusedoptionlist\@unusedoptionlist + }% }% }% + \let\CurrentOption\@empty }% - \edef\caption@tempa{% - \noexpand\caption@setkeys{#1}{% - \caption@tempa\@ptionlist{\@currname.\@currext}% - }% - }% - \caption@tempa - \let\CurrentOption\@empty + \caption@ExecuteOptions{#2}{\caption@tempa\@ptionlist{\@currname.\@currext}}% \AtEndOfPackage{\let\@unprocessedoptions\relax}} -\@onlypreamble\caption@ProcessOptions +\@onlypreamble\caption@@ProcessOptions \newdimen\captionmargin \newdimen\captionmargin@ \newdimen\captionwidth \DeclareCaptionOption{margin}{\setcaptionmargin{#1}} +\DeclareCaptionOption{margin*}{\setcaptionmargin*{#1}} \DeclareCaptionOption{width}{\setcaptionwidth{#1}} -\DeclareCaptionOption{twoside}[1]{\caption@setbool{twoside}{#1}} -\newcommand*\setcaptionmargin[1]{% - \captionwidth\z@ - \caption@@setmargin#1,#1,\@nil\@@} -\def\caption@@setmargin#1,#2,#3\@@{% - \setlength\captionmargin{#1}% +\DeclareCaptionOption{twoside}[1]{\caption@set@bool\caption@iftwoside{#1}} +\DeclareCaptionOption{minmargin}{\caption@setoptcmd\caption@minmargin{#1}} +\DeclareCaptionOption{maxmargin}{\caption@setoptcmd\caption@maxmargin{#1}} +\newcommand*\setcaptionmargin{% + \caption@teststar\caption@setmargin\@gobble\@firstofone} +\newcommand*\caption@setmargin[2]{% + #1{\captionwidth\z@}% + \caption@@setmargin#2,#2,\@nil} +\def\caption@@setmargin#1,#2,#3\@nil{% \setlength\captionmargin@{#2}% - \advance\captionmargin@ by -\captionmargin} -\newcommand\setcaptionwidth{% + \setlength\captionmargin{#1}% + \addtolength\captionmargin@{-\captionmargin}} +\newcommand*\setcaptionwidth{% + \captionmargin\z@ + \captionmargin@\z@ \setlength\captionwidth} -\caption@newcounter\caption@count -\newcommand*\caption@newlabel{\@newl@bel{caption}} +\newcommand*\caption@count{0} +\newcommand*\caption@newlabel{\@newl@bel{caption@r}} \newcommand*\caption@thepage{\the\c@page} -\def\caption@ifoddpage{% +\newcommand*\caption@label[1]{% + \protected@write\@auxout{\let\caption@thepage\relax}% + {\string\caption@newlabel{#1}{\caption@thepage}}} +\newcommand*\caption@pageref[1]{% + \expandafter\ifx\csname caption@r@#1\endcsname\relax + \G@refundefinedtrue % => 'There are undefined references.' + \PackageWarning{caption}{Reference on page \thepage \space undefined}% + \else + \expandafter\let\expandafter\caption@thepage\csname caption@r@#1\endcsname + \fi} +\newcommand*\caption@ifoddpage{% \caption@iftwoside{% - \caption@stepcounter\caption@count - \protected@write\@auxout{\let\caption@thepage\relax}% - {\string\caption@newlabel{\caption@count}{\caption@thepage}}% - \expandafter\ifx\csname caption@\caption@count\endcsname\relax - \G@refundefinedtrue % => 'There are undefined references.' - \PackageWarning{caption3}{Reference on page \thepage \space undefined}% - \else - \expandafter\let\expandafter\caption@thepage - \csname caption@\caption@count\endcsname - \fi + \begingroup + \@tempcnta\caption@count + \advance\@tempcnta\@ne + \xdef\caption@count{\the\@tempcnta}% + \endgroup + \caption@label\caption@count + \caption@pageref\caption@count \ifodd\caption@thepage \let\caption@ifoddpage\@firstoftwo \else @@ -195,101 +352,122 @@ \fi }{\let\caption@ifoddpage\@firstoftwo}% \caption@ifoddpage} -\newdimen\captionindent -\newdimen\captionparindent -\newdimen\captionhangindent -\DeclareCaptionOption{indent}[\leftmargini]{\setlength\captionindent{#1}}% obsolete! -\DeclareCaptionOption{indention}[\leftmargini]{\setlength\captionindent{#1}} -\DeclareCaptionOption{hangindent}{\setlength\captionhangindent{#1}} -\DeclareCaptionOption{parindent}{\setlength\captionparindent{#1}} -\DeclareCaptionOption{parskip}{\l@addto@macro\caption@@par{\setlength\parskip{#1}}} +\newcommand*\caption@setoptcmd[2]{% + \caption@ifinlist{#2}{0,false,no,off}{\let#1\@undefined}{\def#1{#2}}} +\newdimen\caption@indent +\newdimen\caption@parindent +\newdimen\caption@hangindent +\DeclareCaptionOption{indent}[\leftmargini]{% + \setlength\caption@indent{#1}}% obsolete! +\DeclareCaptionOption{indention}[\leftmargini]{% + \setlength\caption@indent{#1}} +\DeclareCaptionOption{parindent}{% + \setlength\caption@parindent{#1}} +\DeclareCaptionOption{hangindent}{% + \setlength\caption@hangindent{#1}} +\DeclareCaptionOption{parskip}{% + \l@addto@macro\caption@@par{\setlength\parskip{#1}}} \@ifundefined{scr@caption}{}{% \let\caption@KV@parindent\KV@caption@parindent \DeclareCaptionOption{parindent}[]{% - \def\caption@tempa{#1}% - \ifx\caption@tempa\@empty - \PackageInfo{caption3}{Option `parindent' ignored}% + \ifx,#1,% + \caption@Debug{Option `parindent' ignored}% \else \caption@KV@parindent{#1}% \fi}% \let\caption@KV@parskip\KV@caption@parskip \DeclareCaptionOption{parskip}[]{% - \def\caption@tempa{#1}% - \ifx\caption@tempa\@empty - \PackageInfo{caption3}{Option `parskip' ignored}% + \ifx,#1,% + \caption@Debug{Option `parskip' ignored}% \else \caption@KV@parskip{#1}% \fi}% } \newcommand*\DeclareCaptionStyle[1]{% - \@ifnextchar[{\caption@declarestyle{#1}}{\caption@declarestyle{#1}[]}} + \@testopt{\caption@declarestyle{#1}}{}} +\@onlypreamble\DeclareCaptionStyle \def\caption@declarestyle#1[#2]#3{% \global\@namedef{caption@sls@#1}{#2}% \global\@namedef{caption@sty@#1}{#3}} -\@onlypreamble\DeclareCaptionStyle \@onlypreamble\caption@declarestyle \DeclareCaptionOption{style}{\caption@setstyle{#1}} -\newcommand\caption@setstyle{% - \@ifstar{\caption@@setstyle\@gobble}{\caption@@setstyle\@firstofone}} +\DeclareCaptionOption{singlelinecheck}{\caption@set@bool\caption@ifslc{#1}} +\newcommand*\caption@setstyle{% + \caption@teststar\caption@@setstyle\@gobble\@firstofone} \newcommand*\caption@@setstyle[2]{% \@ifundefined{caption@sty@#2}% - {#1{\caption@Error{Undefined caption style `#2'}}}% - {\expandafter\let\expandafter\caption@sls\csname caption@sls@#2\endcsname - \caption@setdefault\caption@esetup{\csname caption@sty@#2\endcsname}}} -\newcommand\caption@setdefault{\captionsetup{% - format=default,labelformat=default,labelsep=default,textformat=default,% - justification=default,font=default,labelfont=default,textfont=default,% - margin=0pt,indent=0pt,parindent=0pt,hangindent=0pt,% - singlelinecheck=1,strut=1}} -\DeclareCaptionStyle{default}[indent=0pt,justification=centering]{} + {#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 + \caption@resetstyle + \expandafter\caption@setup\expandafter{\caption@sty}% + \let\caption@setstyle@flag\@undefined + \else + \expandafter\caption@setup\expandafter{\caption@sty}% + \fi + \expandafter\let\expandafter\caption@sls\csname caption@sls@#2\endcsname + \expandafter\caption@l@addto@list\expandafter\caption@opt@SingleLine + \expandafter{\caption@sls}}} +\newcommand*\caption@resetstyle{% + \caption@setup{% + format=plain,labelformat=default,labelsep=colon,textformat=simple,% + justification=justified,font=,labelfont=,textfont=,% + margin=0pt,minmargin=0,maxmargin=0,% + indent=0pt,parindent=0pt,hangindent=0pt,% + singlelinecheck=1,strut=1}% + \caption@clearsetup{SingleLine}} +\DeclareCaptionStyle{base}[indent=0pt,justification=centering]{} +\DeclareCaptionStyle{default}[indent=0pt,justification=centering,format=plain]{% + format=default,labelsep=default,textformat=default,% + justification=default,font=default,labelfont=default,textfont=default} \newcommand\DeclareCaptionFormat{% - \@ifstar{\caption@declareformat\@gobble}% - {\caption@declareformat\@firstofone}} + \caption@teststar\caption@declareformat\@gobble\@firstofone} +\@onlypreamble\DeclareCaptionFormat \newcommand\caption@declareformat[3]{% \global\expandafter\let\csname caption@ifh@#2\endcsname#1% \global\long\@namedef{caption@fmt@#2}##1##2##3{#3}} -\@onlypreamble\DeclareCaptionFormat \@onlypreamble\caption@declareformat \DeclareCaptionOption{format}{\caption@setformat{#1}} \newcommand*\caption@setformat[1]{% \@ifundefined{caption@fmt@#1}% - {\caption@Error{Undefined caption format `#1'}}% + {\caption@Error{Undefined format `#1'}}% {\expandafter\let\expandafter\caption@ifh\csname caption@ifh@#1\endcsname \expandafter\let\expandafter\caption@fmt\csname caption@fmt@#1\endcsname}} \DeclareCaptionFormat{plain}{#1#2#3\par} \DeclareCaptionFormat{hang}{% \@hangfrom{#1#2}% - \advance\captionparindent\hangindent - \advance\captionhangindent\hangindent + \advance\caption@parindent\hangindent + \advance\caption@hangindent\hangindent \caption@@par #3\par} \def\caption@fmt@default{\caption@fmt@plain} \def\caption@ifh@default{\caption@ifh@plain} \newcommand*\DeclareCaptionLabelFormat[2]{% - \global\@namedef{caption@lfmt@#1}##1##2{#2}} + \global\@namedef{caption@lfmt@#1}##1##2##3{#2}} \@onlypreamble\DeclareCaptionLabelFormat \DeclareCaptionOption{labelformat}{\caption@setlabelformat{#1}} \newcommand*\caption@setlabelformat[1]{% \@ifundefined{caption@lfmt@#1}% - {\caption@Error{Undefined caption label format `#1'}}% + {\caption@Error{Undefined label format `#1'}}% {\expandafter\let\expandafter\caption@lfmt\csname caption@lfmt@#1\endcsname}} \DeclareCaptionLabelFormat{empty}{} \DeclareCaptionLabelFormat{simple}{\bothIfFirst{#1}{\nobreakspace}#2} \DeclareCaptionLabelFormat{parens}{\bothIfFirst{#1}{\nobreakspace}(#2)} \def\caption@lfmt@default{\caption@lfmt@simple} \newcommand\DeclareCaptionLabelSeparator{% - \@ifstar{\caption@declarelabelseparator\@gobble}% - {\caption@declarelabelseparator\@firstofone}} + \caption@teststar\caption@declarelabelseparator\@gobble\@firstofone} +\@onlypreamble\DeclareCaptionLabelSeparator \newcommand\caption@declarelabelseparator[3]{% \global\expandafter\let\csname caption@iflf@#2\endcsname#1% \global\long\@namedef{caption@lsep@#2}{#3}} -\@onlypreamble\DeclareCaptionLabelSeparator \@onlypreamble\caption@declarelabelseparator \DeclareCaptionOption{labelsep}{\caption@setlabelseparator{#1}} \DeclareCaptionOption{labelseparator}{\caption@setlabelseparator{#1}} \newcommand*\caption@setlabelseparator[1]{% \@ifundefined{caption@lsep@#1}% - {\caption@Error{Undefined caption label separator `#1'}}% + {\caption@Error{Undefined label separator `#1'}}% {\expandafter\let\expandafter\caption@iflf\csname caption@iflf@#1\endcsname \expandafter\let\expandafter\caption@lsep\csname caption@lsep@#1\endcsname}} \DeclareCaptionLabelSeparator{none}{} @@ -305,28 +483,92 @@ \global\long\@namedef{caption@tfmt@#1}##1{#2}} \@onlypreamble\DeclareCaptionTextFormat \DeclareCaptionOption{textformat}{\caption@settextformat{#1}} +\DeclareCaptionOption{strut}{\caption@set@bool\caption@ifstrut{#1}} \newcommand*\caption@settextformat[1]{% \@ifundefined{caption@tfmt@#1}% - {\caption@Error{Undefined caption text format `#1'}}% + {\caption@Error{Undefined text format `#1'}}% {\expandafter\let\expandafter\caption@tfmt\csname caption@tfmt@#1\endcsname}} \DeclareCaptionTextFormat{simple}{#1} \DeclareCaptionTextFormat{period}{#1.} \def\caption@tfmt@default{\caption@tfmt@simple} +\newcommand*\DeclareCaptionFont[2]{% + \define@key{caption@fnt}{#1}[]{\l@addto@macro\caption@fnt{#2}}} +\@onlypreamble\DeclareCaptionFont +\newcommand*\DeclareDefaultCaptionFont[2]{% + \global\@namedef{caption#1@default}{#2}} +\@onlypreamble\DeclareDefaultCaptionFont +\DeclareCaptionOption{font}{\caption@setfont{font}{#1}} +\DeclareDefaultCaptionFont{font}{} +\DeclareCaptionOption{labelfont}{\caption@setfont{labelfont}{#1}} +\DeclareDefaultCaptionFont{labelfont}{} +\DeclareCaptionOption{textfont}{\caption@setfont{textfont}{#1}} +\DeclareDefaultCaptionFont{textfont}{} +\newcommand*\caption@setfont[2]{% + \begingroup + \let\caption@fnt\@empty + \define@key{caption@fnt}{default}[]{% + \l@addto@macro\caption@fnt{\csname caption#1@default\endcsname}}% + \caption@setkeys[caption]{caption@fnt}{#2}% + \global\let\caption@tempa\caption@fnt + \endgroup + \expandafter\let\csname caption#1\endcsname\caption@tempa} +\newcommand*\caption@font{% + \caption@teststar\caption@@font\@firstofone + {\caption@setkeys[caption]{caption@fnt}}} +\newcommand*\caption@@font[2]{% + \begingroup + \def\caption@fnt{\endgroup}% + #1{#2}% + \caption@fnt} +\DeclareCaptionFont{normalcolor}{\normalcolor} +\DeclareCaptionFont{color}{\color{#1}} +\DeclareCaptionFont{normalfont}{\normalfont} +\DeclareCaptionFont{up}{\upshape} +\DeclareCaptionFont{it}{\itshape} +\DeclareCaptionFont{sl}{\slshape} +\DeclareCaptionFont{sc}{\scshape} +\DeclareCaptionFont{md}{\mdseries} +\DeclareCaptionFont{bf}{\bfseries} +\DeclareCaptionFont{rm}{\rmfamily} +\DeclareCaptionFont{sf}{\sffamily} +\DeclareCaptionFont{tt}{\ttfamily} +\DeclareCaptionFont{scriptsize}{\scriptsize} +\DeclareCaptionFont{footnotesize}{\footnotesize} +\DeclareCaptionFont{small}{\small} +\DeclareCaptionFont{normalsize}{\normalsize} +\DeclareCaptionFont{large}{\large} +\DeclareCaptionFont{Large}{\Large} +\DeclareCaptionFont{singlespacing}{\setstretch\setspace@singlespace}% normally 1 +\DeclareCaptionFont{onehalfspacing}{\onehalfspacing} +\DeclareCaptionFont{doublespacing}{\doublespacing} +\DeclareCaptionFont{stretch}{\setstretch{#1}} +\caption@AtBeginDocument{\providecommand*\setstretch[1]{}} +\DeclareCaptionFont{normal}{% + \caption@font*{% + \KV@caption@fnt@normalcolor\@unused + \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]{% - \global\@namedef{caption@hj@#1}{#2}} + \global\@namedef{caption@hj@#1}{#2}% for compatibility to v3.0 + \DeclareCaptionFont{#1}{#2}} \@onlypreamble\DeclareCaptionJustification +\newcommand*\DeclareDefaultCaptionJustification[1]{% + \global\@namedef{caption@hj@default}{#1}% for compatibility to v3.0 + \DeclareDefaultCaptionFont{@hj}{#1}} +\@onlypreamble\DeclareDefaultCaptionJustification \DeclareCaptionOption{justification}{\caption@setjustification{#1}} -\newcommand*\caption@setjustification[1]{% - \@ifundefined{caption@hj@#1}% - {\caption@Error{Undefined caption justification `#1'}}% - {\expandafter\let\expandafter\caption@hj\csname caption@hj@#1\endcsname}} +\DeclareDefaultCaptionJustification{} +\newcommand*\caption@setjustification{\caption@setfont{@hj}} \DeclareCaptionJustification{justified}{} \DeclareCaptionJustification{centering}{\centering} \DeclareCaptionJustification{centerfirst}{\centerfirst} \DeclareCaptionJustification{centerlast}{\centerlast} \DeclareCaptionJustification{raggedleft}{\raggedleft} \DeclareCaptionJustification{raggedright}{\raggedright} -\def\caption@hj@default{\caption@hj@justified} \providecommand\centerfirst{% \let\\\@centercr \edef\caption@normaladjust{% @@ -353,55 +595,30 @@ \caption@Debug{We need ragged2e}% \protected@write\@auxout{}{\string\caption@newlabel{ragged2e}{}}% \global\let\caption@ragged\caption@@ragged - \caption@@ragged} -\newcommand*\caption@@ragged[2]{% - \@ifundefined{caption\string#1}{% - \PackageWarning{caption3}{% - `ragged2e' package not loaded, therefore\MessageBreak - substituting \string#2 for \string#1\MessageBreak}% - \global\@namedef{caption\string#1}}{}% - #2} -\AtBeginDocument{% - \@ifundefined{caption@ragged2e}{% - \let\caption@@ragged\@secondoftwo % suppress warning above + \caption@ragged} +\caption@AtBeginDocument{% + \@ifundefined{caption@r@ragged2e}{% + \newcommand*\caption@@ragged{% + \PackageWarning{caption}{% + `ragged2e' support has been changed.\MessageBreak + Rerun to get captions right}% + \global\let\caption@ragged\@secondoftwo % suppress further warnings + \caption@ragged}% }{% \caption@Debug{We load ragged2e}% \IfFileExists{ragged2e.sty}{% - \RequirePackage{ragged2e}\let\caption@@ragged\@firstoftwo}{}% + \RequirePackage{ragged2e}% + \let\caption@@ragged\@firstoftwo + }{% + \newcommand*\caption@@ragged[2]{% + \@ifundefined{caption\string#1}{% + \PackageWarning{caption}{% + `ragged2e' package not loaded, therefore\MessageBreak + substituting \string#2 for \string#1\MessageBreak}% + \global\@namedef{caption\string#1}}{}% + #2}% + }% }} -\newcommand\DeclareCaptionFont[2]{% - \define@key{caption@fnt}{#1}[]{\g@addto@macro\caption@tempa{#2}}} -\@onlypreamble\DeclareCaptionFont -\DeclareCaptionOption{font}{\caption@setfont{font}{#1}} -\DeclareCaptionOption{labelfont}{\caption@setfont{labelfont}{#1}} -\DeclareCaptionOption{textfont}{\caption@setfont{textfont}{#1}} -\newcommand*\caption@setfont[2]{% - \let\caption@tempa\@empty - \begingroup - \caption@setkeys[caption]{caption@fnt}{#2}% - \endgroup - \expandafter\let\csname caption#1\endcsname\caption@tempa} -\DeclareCaptionFont{default}{} -\DeclareCaptionFont{scriptsize}{\scriptsize} -\DeclareCaptionFont{footnotesize}{\footnotesize} -\DeclareCaptionFont{small}{\small} -\DeclareCaptionFont{normalsize}{\normalsize} -\DeclareCaptionFont{large}{\large} -\DeclareCaptionFont{Large}{\Large} -\DeclareCaptionFont{up}{\upshape} -\DeclareCaptionFont{it}{\itshape} -\DeclareCaptionFont{sl}{\slshape} -\DeclareCaptionFont{sc}{\scshape} -\DeclareCaptionFont{md}{\mdseries} -\DeclareCaptionFont{bf}{\bfseries} -\DeclareCaptionFont{rm}{\rmfamily} -\DeclareCaptionFont{sf}{\sffamily} -\DeclareCaptionFont{tt}{\ttfamily} -\DeclareCaptionFont{singlespacing}{\setstretch{\setspace@singlespace}}% normally 1 -\DeclareCaptionFont{onehalfspacing}{\onehalfspacing} -\DeclareCaptionFont{doublespacing}{\doublespacing} -\providecommand\captionsize{} -\DeclareCaptionOption{size}{\caption@setfont{size}{#1}} \@ifundefined{abovecaptionskip}{% \newlength\abovecaptionskip\setlength\abovecaptionskip{10\p@}}{} \@ifundefined{belowcaptionskip}{% @@ -412,7 +629,7 @@ \DeclareCaptionOption{position}{\caption@setposition{#1}} \newcommand*\caption@setposition[1]{% \caption@ifinlist{#1}{d,default}{% - \def\caption@position{\caption@defaultpos}% + \let\caption@position\caption@defaultpos }{\caption@ifinlist{#1}{t,top,above}{% \let\caption@position\@firstoftwo }{\caption@ifinlist{#1}{b,bottom,below}{% @@ -420,20 +637,19 @@ }{\caption@ifinlist{#1}{a,auto}{% \let\caption@position\@undefined }{% - \caption@Error{Undefined caption position `#1'}% + \caption@Error{Undefined position `#1'}% }}}}} -\let\caption@defaultpos\@secondoftwo -\newcommand\caption@iftop{% +\let\caption@defaultpos\@undefined +\newcommand*\caption@iftop{% \ifx\caption@position\@undefined - \expandafter\@secondoftwo - \else - \expandafter\caption@position - \fi} -\newcommand\caption@fixposition{% + \let\caption@position\@secondoftwo + \fi + \caption@position} +\newcommand*\caption@fixposition{% \ifx\caption@position\@undefined \caption@autoposition \fi} -\newcommand\caption@autoposition{% +\newcommand*\caption@autoposition{% \ifvmode \edef\caption@tempa{\the\prevdepth}% \caption@Debug{\protect\prevdepth=\caption@tempa}% @@ -446,98 +662,373 @@ \caption@Debug{no \protect\prevdepth}% \let\caption@position\@secondoftwo \fi} -\newcommand\caption@beginhook{} -\newcommand\caption@endhook{} -\newcommand\AtBeginCaption{\l@addto@macro\caption@beginhook} -\newcommand\AtEndCaption{\l@addto@macro\caption@endhook} -\DeclareCaptionOption{listof}{\caption@setbool{lof}{#1}} -\DeclareCaptionOption{singlelinecheck}{\caption@setbool{slc}{#1}} -\DeclareCaptionOption{strut}{\caption@setbool{strut}{#1}} +\newcommand*\caption@setautoposition[1]{% + \def\caption@autoposition{\caption@setposition{#1}}} +\newcommand*\caption@beginhook{} +\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]{% + \global\@namedef{caption@lstfmt@#1}##1##2{#2}} +\@onlypreamble\DeclareCaptionListOfFormat +\DeclareCaptionOption{listofformat}{\caption@setlistofformat{#1}} +\newcommand*\caption@setlistofformat[1]{% + \@ifundefined{caption@lstfmt@#1}% + {\caption@Error{Undefined list-of 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)} +\def\caption@lstfmt@default{\caption@lstfmt@subsimple} \DeclareCaptionOption{debug}[1]{% - \caption@setbool{debug}{#1}% + \caption@set@bool\caption@ifdebug{#1}% + \let\caption@iftypewarning\caption@ifdebug \caption@ifdebug{% - \def\caption@Debug{\PackageInfo{caption3}}% + \def\caption@Debug{\PackageInfo{caption}}% }{% \let\caption@Debug\@gobble }} +\DeclareOption{debug}{\setkeys{caption}{debug}} \setkeys{caption}{debug=0} -\captionsetup{style=default,position=default,listof=1,% +\caption@CheckCommand\@makecaption{\let\@makecaption\@undefined} +\caption@CheckCommand\@makecaption{% + % article|report|book [2005/09/16 v1.4f Standard LaTeX document class] + \long\def\@makecaption#1#2{% + \vskip\abovecaptionskip + \sbox\@tempboxa{#1: #2}% + \ifdim \wd\@tempboxa >\hsize + #1: #2\par + \else + \global \@minipagefalse + \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}% + \fi + \vskip\belowcaptionskip}} +\@ifundefined{@captionheadfont}{}{% + \caption@CheckCommand\@makecaption{% + % amsart|amsproc|amsbook [2004/08/06 v2.20] + \long\def\@makecaption#1#2{% + \setbox\@tempboxa\vbox{\color@setgroup + \advance\hsize-2\captionindent\noindent + \@captionfont\@captionheadfont#1\@xp\@ifnotempty\@xp + {\@cdr#2\@nil}{.\@captionfont\upshape\enspace#2}% + \unskip\kern-2\captionindent\par + \global\setbox\@ne\lastbox\color@endgroup}% + \ifhbox\@ne % the normal case + \setbox\@ne\hbox{\unhbox\@ne\unskip\unskip\unpenalty\unkern}% + \fi + \ifdim\wd\@tempboxa=\z@ % this means caption will fit on one line + \setbox\@ne\hbox to\columnwidth{\hss\kern-2\captionindent\box\@ne\hss}% + \else % tempboxa contained more than one line + \setbox\@ne\vbox{\unvbox\@tempboxa\parskip\z@skip + \noindent\unhbox\@ne\advance\hsize-2\captionindent\par}% + \fi + \ifnum\@tempcnta<64 % if the float IS a figure... + \addvspace\abovecaptionskip + \hbox to\hsize{\kern\captionindent\box\@ne\hss}% + \else % if the float IS NOT a figure... + \hbox to\hsize{\kern\captionindent\box\@ne\hss}% + \nobreak + \vskip\belowcaptionskip + \fi + \relax + }} + \caption@CheckCommand\@makecaption{% + % smfart|smfbook [1999/11/15 v1.2f Classe LaTeX pour les articles publies par la SMF] + \long\def\@makecaption#1#2{% + \ifdim\captionindent>.1\hsize \captionindent.1\hsize \fi + \setbox\@tempboxa\vbox{\color@setgroup + \advance\hsize-2\captionindent\noindent + \@captionfont\@captionheadfont#1\@xp\@ifnotempty\@xp + {\@cdr#2\@nil}{\@addpunct{.}\@captionfont\upshape\enspace#2}% + \unskip\kern-2\captionindent\par + \global\setbox\@ne\lastbox\color@endgroup}% + \ifhbox\@ne % the normal case + \setbox\@ne\hbox{\unhbox\@ne\unskip\unskip\unpenalty\unkern}% + \fi + \ifdim\wd\@tempboxa=\z@ % this means caption will fit on one line + \setbox\@ne\hbox to\columnwidth{\hss\kern-2\captionindent\box\@ne\hss}% + \@tempdima\wd\@ne\advance\@tempdima-\captionindent + \wd\@ne\@tempdima + \else % tempboxa contained more than one line + \setbox\@ne\vbox{\rightskip=0pt plus\captionindent\relax + \unvbox\@tempboxa\parskip\z@skip + \noindent\unhbox\@ne\advance\hsize-2\captionindent\par}% + \fi + \ifnum\@tempcnta<64 % if the float IS a figure... + \addvspace\abovecaptionskip + \noindent\kern\captionindent\box\@ne + \else % if the float IS NOT a figure... + \noindent\kern\captionindent\box\@ne + \nobreak + \vskip\belowcaptionskip + \fi + \relax + }} + \let\captionmargin\captionindent + \begingroup\edef\@tempa{\endgroup + \noexpand\caption@g@addto@list\noexpand\caption@sty@default + {margin=\the\captionmargin + \@ifundefined{smf@makecaption}{}{,maxmargin=.1\linewidth}}} + \@tempa + \caption@g@addto@list\caption@sls@default{margin*=.5\captionmargin} + \DeclareCaptionLabelSeparator{default}{.\enspace} + \DeclareDefaultCaptionFont{font}{\@captionfont} + \DeclareDefaultCaptionFont{labelfont}{\@captionheadfont} + \DeclareDefaultCaptionFont{textfont}{\@captionfont\upshape} + \captionsetup*[figure]{position=b} + \captionsetup*[table]{position=t} +} +\@ifclassloaded{beamer}{% + \caption@CheckCommand\beamer@makecaption{% + % beamerbaselocalstructure.sty,v 1.53 2007/01/28 20:48:21 tantau + \long\def\beamer@makecaption#1#2{% + \def\insertcaptionname{\csname#1name\endcsname}% + \def\insertcaptionnumber{\csname the#1\endcsname}% + \def\insertcaption{#2}% + \nobreak\vskip\abovecaptionskip\nobreak + \sbox\@tempboxa{\usebeamertemplate**{caption}}% + \ifdim \wd\@tempboxa >\hsize + \usebeamertemplate**{caption}\par + \else + \global \@minipagefalse + \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}% + \fi + \nobreak\vskip\belowcaptionskip\nobreak}} + \DeclareCaptionLabelFormat{default}{#1} + \DeclareDefaultCaptionJustification{\raggedright} + \DeclareDefaultCaptionFont{font}{% + \usebeamerfont*{caption}% + \usebeamercolor[fg]{caption}} + \DeclareDefaultCaptionFont{labelfont}{% + \usebeamercolor[fg]{caption name}% + \usebeamerfont*{caption name}} + \defbeamertemplate{caption}{caption3}{% + \caption@make\insertcaptionname\insertcaptionnumber\insertcaption} + \DeclareOption{beamer}{% + % \usebeamertemplate**{caption} will set font + \DeclareDefaultCaptionFont{font}{}% + \setbeamertemplate{caption}[caption3]} +}{} +\@ifundefined{scr@caption}{}{% + \caption@CheckCommand\@makecaption{% + % scrartcl|scrreprt|scrbook [2007/03/07 v2.97a KOMA-Script document class] + \long\def\@makecaption#1#2{% + \if@captionabove + \vskip\belowcaptionskip + \else + \vskip\abovecaptionskip + \fi + \@@makecaption\@firstofone{#1}{#2}% + \if@captionabove + \vskip\abovecaptionskip + \else + \vskip\belowcaptionskip + \fi}} + \DeclareCaptionFormat{default}{% + \ifdofullc@p + \caption@fmt@hang{#1}{#2}{#3}% + \else + #1#2% + \ifdim\cap@indent<\z@ + \par + \noindent\hspace*{-\cap@indent}% + \else\if@capbreak + \par + \fi\fi + #3\par + \fi} + \DeclareCaptionLabelSeparator{default}{\captionformat} + \DeclareDefaultCaptionFont{font}{\scr@fnt@caption} + \DeclareDefaultCaptionFont{labelfont}{\scr@fnt@captionlabel} +} +\@ifundefined{CaptionFonts}{}{% + \caption@CheckCommand\@makecaption{% + % artikel|rapport|boek [2004/06/07 v2.1a NTG LaTeX document class] + \long\def\@makecaption#1#2{% + \vskip\abovecaptionskip + \sbox\@tempboxa{{\CaptionLabelFont#1:} \CaptionTextFont#2}% + \ifdim \wd\@tempboxa >\hsize + {\CaptionLabelFont#1:} \CaptionTextFont#2\par + \else + \global \@minipagefalse + \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}% + \fi + \vskip\belowcaptionskip}} + \DeclareDefaultCaptionFont{labelfont}{\CaptionLabelFont} + \DeclareDefaultCaptionFont{textfont}{\CaptionTextFont} +} +\@ifundefined{FB@makecaption}{}{% + \caption@CheckCommand\@makecaption{% + % frenchb.ldf [2005/02/06 v1.6g French support from the babel system] + \long\def\@makecaption#1#2{% + \vskip\abovecaptionskip + \sbox\@tempboxa{#1\CaptionSeparator #2}% + \ifdim \wd\@tempboxa >\hsize + #1\CaptionSeparator #2\par + \else + \global \@minipagefalse + \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}% + \fi + \vskip\belowcaptionskip}} + \ifx\@makecaption\STD@makecaption + \DeclareCaptionLabelSeparator{default}{\CaptionSeparator} + \def\caption@frenchb{% supress frenchb warning + \let\STD@makecaption\@makecaption + \let\FB@makecaption\@makecaption} + \else + \ifx\@makecaption\@undefined\else + \PackageInfo{caption}{% + The definition of \protect\@makecaption\space + has been changed,\MessageBreak + frenchb will NOT customize it}% + \fi + \fi +} +\@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/] + \def\@makecaption#1#2{% + \ifFTY% + \def\@secondofmany##1##2\void{##2}% + \def\@tempa{\@secondofmany#2\void}% + \ifx\@tempa\empty% + \let\captionseparator\empty% + \fi% + \@mcORI{#1}{\relax\captionfont{#2}}% + \else + \@mcORI{#1}{#2}% + \fi}} + \caption@CheckCommand\@makecaption{% + % french(le).sty [2007/02/11 The french(le) package /V5,9993/] + \def\@makecaption#1#2{% + \ifFTY% + \def\@secondofmany##1##2\void{##2}% + \protected@edef\@tempa{\@secondofmany#2\void}% + \ifx\@tempa\empty% + \let\captionseparator\empty% + \fi% + \@mcORI{#1}{\relax\captionfont{#2}}% + \else + \@mcORI{#1}{#2}% + \fi}} + \DeclareDefaultCaptionFont{textfont}{\itshape}% + \DeclareCaptionLabelSeparator{default}{\captionseparator\space}% +} +\captionsetup{style=default,position=default,listof=1,listofformat=default,% twoside=\if@twoside 1\else 0\fi} +\ProcessOptions* +\caption@IfCheckCommand{% + \caption@setbool{documentclass}{1}% +}{% + \caption@setbool{documentclass}{0}% + \PackageInfo{caption}{% + Unknown document class (or package),\MessageBreak + standard defaults will be used}% + \caption@Debug{\string\@makecaption\space=\space\meaning\@makecaption\@gobble}% +} +\newcommand*\caption@addcontentsline[2]{% + \caption@iflof% + {\def\@tempa{#2}}% + {\let\@tempa\@empty}% + \ifx\@tempa\@empty \else + {\let\\\space + \addcontentsline{\csname ext@#1\endcsname}{#1}% + {\protect\numberline + {\caption@lstfmt{\@nameuse{p@#1}}{\@nameuse{the#1}}}% + {\ignorespaces #2}}}% + \fi} \newif\ifcaption@star +\newcommand*\caption@fnum[1]{% + \caption@lfmt{\@nameuse{#1name}}{\@nameuse{the#1}}{\theContinuedFloat}} \newcommand\caption@make[2]{% - \caption@@make{\caption@lfmt{#1}{#2}}} + \caption@@make{\caption@lfmt{#1}{#2}{\theContinuedFloat}}} \newcommand\caption@@make[2]{% \begingroup \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@ifempty@list\caption@opt@SingleLine{}{% + \caption@slc{#1}{#2}\captionwidth\relax}}{}% \caption@calcmargin - \caption@ifslc{\ifx\caption@sls\@empty\else - \caption@slc{#1}{#2}\captionwidth\relax - \fi}{}% \@tempdima\captionmargin - \ifdim\captionmargin@=\z@\else + \ifdim\captionmargin@=\z@ \else \caption@ifoddpage{}{\advance\@tempdima\captionmargin@}% \fi - \caption@ifh{\advance\@tempdima\captionindent}% - \hskip\@tempdima + \caption@ifh{\advance\@tempdima\caption@indent}% + \hspace\@tempdima \@tempdima\captionwidth - \caption@ifh{\advance\@tempdima by -\captionindent}% + \caption@ifh{\advance\@tempdima-\caption@indent}% \captionbox\@tempdima{% \caption@ifh{% - \ifdim\captionindent=\z@ + \ifdim\caption@indent=\z@ \leavevmode \else - \hskip-\captionindent + \hskip-\caption@indent \fi}% \caption@@@make{#1}{#2}}% \@tempdima\captionmargin - \ifdim\captionmargin@=\z@\else + \ifdim\captionmargin@=\z@ \else \caption@ifoddpage{\advance\@tempdima\captionmargin@}{}% \fi - \hskip\@tempdima + \hspace\@tempdima \caption@endhook \endgroup \global\caption@starfalse} -\newcommand\caption@calcmargin{% - \@tempdima\hsize - \ifnum\@listdepth>0\relax - \advance\@tempdima by -\leftmargin - \advance\@tempdima by -\rightmargin - \fi +\newcommand*\caption@calcmargin{% \ifdim\captionwidth=\z@ - \captionwidth\@tempdima + \captionwidth\linewidth \advance\captionwidth by -2\captionmargin \advance\captionwidth by -\captionmargin@ \else - \captionmargin\@tempdima + \captionmargin\linewidth \advance\captionmargin by -\captionwidth \divide\captionmargin by 2 \captionmargin@\z@ \fi \caption@Debug{% - \protect\hsize=\the\hsize, - \protect\margin=\the\captionmargin, - \protect\marginx=\the\captionmargin@, - \protect\width=\the\captionwidth}% + \string\hsize=\the\hsize, + \string\linewidth=\the\linewidth,\MessageBreak + \string\leftmargin=\the\leftmargin, + \string\rightmargin=\the\rightmargin,\MessageBreak + \string\margin=\the\captionmargin, + \string\margin@=\the\captionmargin@, + \string\width=\the\captionwidth}% } \newcommand\caption@slc[4]{% - \caption@startslc + \caption@Debug{Begin SLC}% + \begingroup + \expandafter\caption@setup\expandafter{\caption@opt@SingleLine}% + \let\caption@hj\@empty + \caption@calcmargin % calculate #3 if necessary + \caption@prepareslc \sbox\@tempboxa{\caption@@@make{#1}{#2}}% - \ifdim\wd\@tempboxa >#3% - \caption@endslc + \ifdim\wd\@tempboxa>#3% + \endgroup \else - \caption@endslc - \caption@esetup\caption@sls + \endgroup + \expandafter\caption@setup\expandafter{\caption@opt@SingleLine}% #4% - \fi} -\newcommand\caption@startslc{% - \begingroup - \let\label\@gobble + \fi + \caption@Debug{End SLC}} +\newcommand*\caption@prepareslc{% \let\@footnotetext\@gobble\let\@endnotetext\@gobble + \def\label{\caption@withoptargs\@gobbletwo}% \def\stepcounter##1{\advance\csname c@##1\endcsname\@ne\relax}% - \let\caption@hj\relax} -\newcommand\caption@endslc{% - \endgroup} -\newcommand\captionbox{\parbox[b]} + \let\refstepcounter\stepcounter\let\H@refstepcounter\stepcounter} +\newcommand*\captionbox{\parbox[b]} \newcommand\caption@@@make[2]{% \sbox\@tempboxa{#1}% \ifdim\wd\@tempboxa=\z@ @@ -552,9 +1043,9 @@ {\ifcaption@star\else{\caption@iflf\captionlabelfont\caption@lsep}\fi}% {{\captiontextfont \caption@ifstrut{\vrule\@height\ht\strutbox\@width\z@}{}% - \nobreak\hskip\z@skip + \nobreak\hskip\z@skip % enable hyphenation \caption@tfmt{#2}% - \caption@ifstrut{\@finalstrut\strutbox}{}% + \caption@ifstrut{\ifhmode\@finalstrut\strutbox\fi}{}% \par}}} \newcommand\caption@ifempty[1]{% \def\caption@tempa{#1}% @@ -563,19 +1054,97 @@ \let\caption@tempa\@empty \fi \ifx\caption@tempa\@empty - \expandafter\@firstofone + \let\caption@ifempty\@secondoftwo \else - \expandafter\@gobble - \fi} + \let\caption@ifempty\@gobbletwo + \fi + \caption@ifempty\@unused} \newcommand*\caption@@par{% - \parindent\captionparindent\hangindent\captionhangindent}% -\AtBeginDocument{% + \parindent\caption@parindent\hangindent\caption@hangindent}% +\providecommand*\DeclareFloatingEnvironment[1]{% + \@ifundefined{c@chapter}% + {\newcounter{#1}% + \@namedef{the#1}{\arabic{#1}}% + \@namedef{theH#1}{\arabic{#1}}}% + {\newcounter{#1}[chapter]% + \@namedef{the#1}{\ifnum\c@chapter>\z@ \thechapter.\fi \arabic{#1}}% + \@namedef{theH#1}{\theHchapter.\arabic{#1}}}% + \@namedef{fps@#1}{tbp}% + \@ifundefined{c@float@type}{% + \newcounter{float@type}% + \setcounter{float@type}{\@ifundefined{c@figure}14}}{}% + \expandafter\xdef\csname ftype@#1\endcsname{\the\value{float@type}}% + \addtocounter{float@type}{\value{float@type}}% + \@namedef{ext@#1}{lo#1}% + \@namedef{fnum@#1}{\@nameuse{#1name}\nobreakspace\@nameuse{the#1}}% + \newenvironment{#1}{\@float{#1}}{\end@float}% + \newenvironment{#1*}{\@dblfloat{#1}}{\end@dblfloat}% + \expandafter\newcommand\csname listof#1s\endcsname{\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}% + \@ifundefined{l@figure}% + {\@namedef{l@#1}{\@dottedtocline{1}{1.5em}{2.3em}}}% + {\expandafter\let\csname l@#1\endcsname\l@figure}% + \expandafter\newcommand\csname #1name\endcsname{}% + \edef\@tempa{% + \def\noexpand\@tempa{\expandafter\noexpand\@car#1\@nil}}% + \uppercase\expandafter{\@tempa}% + \edef\@tempb{% + \noexpand\g@addto@macro\noexpand\@tempa{\expandafter\@cdr#1\@nil}}% + \@tempb + \expandafter\let\csname #1name\endcsname\@tempa + \expandafter\newcommand\csname list#1name\endcsname{}% + \expandafter\xdef\csname list#1name\endcsname{List of \@tempa s}% + \@cons\caption@floatlist{{#1}}} +\@onlypreamble\DeclareFloatingEnvironment +\newcommand*\caption@floatlist{} +\caption@AtBeginDocument{% \def\@tempa{\@ifstar\sf@@subref\sf@subref}% \ifx\subref\@tempa - \PackageInfo{caption3}{subref 1.2 or 1.3 detected}% + \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 \DeclareRobustCommand*\subref{\@ifstar\sf@@subref\sf@subref}% + \caption@removefromoptlist{subfloat}% + \caption@removefromoptlist{subfigure}% + \caption@removefromoptlist{subtable}% \fi -} + \let\sf@NEW@subfloat\@undefined} +\def\sf@NEW@subfloat{% + \begingroup + \caption@setfloattype\@captype + \sf@ifpositiontop{% + \maincaptiontoptrue + }{% + \maincaptiontopfalse + }% + \caption@setoptions{subfloat}% + \caption@setoptions{sub\@captype}% + \let\sf@oldlabel=\label + \let\label=\subfloat@label + \ifmaincaptiontop\else + \advance\@nameuse{c@\@captype}\@ne + \fi + \refstepcounter{sub\@captype}% + \setcounter{sub\@captype @save}{\value{sub\@captype}}% + \@ifnextchar [% %] match left bracket + {\sf@@subfloat}% + {\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 new file mode 100644 index 00000000000..3c752d16979 --- /dev/null +++ b/Master/texmf-dist/tex/latex/caption/ltcaption.sty @@ -0,0 +1,184 @@ +%% +%% This is file `ltcaption.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% ltcaption.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, +%% 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. +%% +\NeedsTeXFormat{LaTeX2e}[1994/12/01] +\ProvidesPackage{ltcaption}[2007/09/01 v1.1 longtable captions (AR)] +\providecommand*\LTcaptype{table} +\providecommand*\ext@table{lot} +\@ifundefined{caption@AtBeginDocument}\AtBeginDocument\caption@AtBeginDocument{% + \@ifpackageloaded{listings}{% + \providecommand*\ext@lstlisting{lol}% + }{}} +\@ifpackageloaded{caption}{}{% + \newskip\LTcapleft \LTcapleft=\fill + \newskip\LTcapright \LTcapright=\fill + \newif\ifLTcapmargins \LTcapmarginstrue + \providecommand*\CaptionLabelFont{} + \providecommand*\CaptionTextFont{} +} +\@ifundefined{caption@AtBeginDocument}\AtBeginDocument\caption@AtBeginDocument{% + \let\ltcaption@ORI@LT@array\LT@array + \renewcommand*\LT@array{% + \let\ltcaption@ORI@refstepcounter\refstepcounter + \let\ltcaption@ORI@H@refstepcounter\H@refstepcounter + \def\refstepcounter##1{% + \let\refstepcounter\ltcaption@ORI@refstepcounter + \let\H@refstepcounter\ltcaption@ORI@H@refstepcounter + \refstepcounter\LTcaptype}% + \def\H@refstepcounter##1{% + \let\refstepcounter\ltcaption@ORI@refstepcounter + \let\H@refstepcounter\ltcaption@ORI@H@refstepcounter + \H@refstepcounter\LTcaptype}% + \let\ltcaption@ORI@hyper@makecurrent\hyper@makecurrent + \def\hyper@makecurrent##1{% + \let\hyper@makecurrent\ltcaption@ORI@hyper@makecurrent + \hyper@makecurrent\LTcaptype}% + \def\lst@@caption{\relax}% + \ltcaption@ORI@LT@array}% +} +\def\LT@c@ption#1[#2]#3{% + \LT@makecaption#1{\csname fnum@\LTcaptype\endcsname}{#3}% + \def\@tempa{#2}% + \ifx\@tempa\@empty\else + {\let\\\space + \addcontentsline{\csname ext@\LTcaptype\endcsname}{\LTcaptype}% + {\protect\numberline{\csname the\LTcaptype\endcsname}{#2}}}% + \fi} +\renewcommand\LT@makecaption[3]{% + \LT@@makecaption{% + \sbox\@tempboxa{#1{{\CaptionLabelFont#2:} }\CaptionTextFont#3}% + \ifdim\wd\@tempboxa>\hsize + #1{\CaptionLabelFont{#2:} }\CaptionTextFont#3% + \else + \hbox to\hsize{\hfil\box\@tempboxa\hfil}% + \fi + \endgraf\vskip\baselineskip}} +\newcommand\LT@@makecaption[1]{% + \caption@LT@make{\hb@xt@\hsize{% + \ifLTcapmargins + \hspace\LTcapleft + \FBifLTcapwidth{\advance\LTcapwidth-\LTcapleft}% + \else + \hspace\LTleft + \FBifLTcapwidth{\advance\LTcapwidth-\LTleft}% + \fi + \FBifLTcapwidth{\advance\LTcapwidth-% + \ifLTcapmargins\LTcapright\else\LTright\fi}% + \parbox[t]\LTcapwidth{#1}% + \ifLTcapmargins + \hskip\LTcapright + \else + \hskip\LTright + \fi}}} +\AtBeginDocument{\providecommand*\FBifLTcapwidth[1]{}} +\newcommand\caption@LT@make[1]{% + \noalign{\caption@LT@config}% + \expandafter\LT@mcol\expandafter\LT@cols\expandafter{\caption@LTfmt}{% + \hb@xt@\z@{% + \hspace\caption@LTleft + \parbox[t]\linewidth{#1}% + \hspace\caption@LTright}}}% +\newcommand*\caption@LT@config{% + \caption@LT@parse\LTleft\caption@LTleft\caption@ifLTleft + \caption@LT@parse\LTright\caption@LTright\caption@ifLTright + \xdef\caption@LTfmt{% + @{}\caption@ifLTleft{\caption@ifLTright{c}{r}}{l}@{}}} +\newcommand*\caption@LT@parse[3]{% + \let\@pluspart\@undefined + \let\@minuspart\@undefined + \expandafter\caption@LT@parse@\expandafter\@fixpart\the#1 x % + \xdef#2{-\@fixpart + \ifx\@minuspart\@undefined\else + \space\@plus\space\@minuspart + \fi + \ifx\@pluspart\@undefined\else + \space\@minus\space\@pluspart + \fi}% + \let#3\@firstoftwo + \ifx\@pluspart\@undefined + \ifx\@minuspart\@undefined + \let#3\@secondoftwo + \fi + \fi} +\def\caption@LT@parse@#1#2 {% + \edef\@tempa{\@car#2\@nil}% + \if p\@tempa + \def\next{\caption@LT@parse@\@pluspart}% + \else\if m\@tempa + \def\next{\caption@LT@parse@\@minuspart}% + \else\if x\@tempa + \let\next\relax + \else + \def#1{#2}% + \def\next{\caption@LT@parse@ @}% + \fi\fi\fi + \next} +\newenvironment{longtable*}% + {\let\refstepcounter\@gobble + \let\H@refstepcounter\@gobble + \let\hyper@makecurrent\@gobble + \let\Hy@raisedlink\@gobble + \let\ltcaption@ORI@LT@c@ption\LT@c@ption + \def\LT@c@ption##1[##2]##3{% + \ifx##1\@firstofone + \PackageError{ltcaption}% + {Not allowed in longtable* environment}% + {If you do not understand this error, please take a closer + look\MessageBreak at the documentation of the `ltcaption' + package.\MessageBreak \@ehc}% + \else + \ltcaption@ORI@LT@c@ption{##1}[{##2}]{##3}% + \fi}% + \longtable}% + {\endlongtable} +\@ifundefined{@komalongtablefalse}{}{% + \if@komalongtable + \renewcommand{\LT@makecaption}[3]{% + \noalign{% + \if@captionabove + \vskip\belowcaptionskip + \else + \vskip\abovecaptionskip + \fi + }% + \caption@LT@make{% + \@@makecaption{#1}{#2}{#3}% + \endgraf + \if@captionabove + \vskip\abovecaptionskip + \else + \vskip\belowcaptionskip + \fi + }% + }% + \let\LT@@makecaption\@undefined + \fi} +\endinput +%% +%% End of file `ltcaption.sty'. |