summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/caption/caption.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/caption/caption.sty')
-rw-r--r--Master/texmf-dist/tex/latex/caption/caption.sty93
1 files changed, 35 insertions, 58 deletions
diff --git a/Master/texmf-dist/tex/latex/caption/caption.sty b/Master/texmf-dist/tex/latex/caption/caption.sty
index 382086e3532..5f799c915ba 100644
--- a/Master/texmf-dist/tex/latex/caption/caption.sty
+++ b/Master/texmf-dist/tex/latex/caption/caption.sty
@@ -6,7 +6,7 @@
%%
%% caption.dtx (with options: `package')
%%
-%% Copyright (C) 1994-2006 Axel Sommerfeldt (caption@sommerfee.de)
+%% Copyright (C) 1994-2007 Axel Sommerfeldt (caption@sommerfee.de)
%%
%% --------------------------------------------------------------------------
%%
@@ -27,8 +27,8 @@
%% caption.sty, caption2.sty, caption3.sty, and manual.tex.
%%
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption}[2007/01/07 v3.0k Customising captions (AR)]
-\RequirePackage{caption3}[2006/01/12] % needs v3.0i or newer
+\ProvidesPackage{caption}[2007/02/20 v3.0l Customising captions (AR)]
+\RequirePackage{caption3}[2007/01/31] % needs v3.0l or newer
\DeclareCaptionOption{config}[caption]{%
\InputIfFileExists{#1.cfg}{\typeout{*** Local configuration file
#1.cfg used ***}}%
@@ -36,6 +36,8 @@
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}}
@@ -65,18 +67,10 @@
\DeclareCaptionOption*{oneline}[]{\caption@setbool{slc}{1}}
\DeclareCaptionOption*{ignoreLTcapwidth}[]{}
\@ifundefined{scr@caption}{}{%
- \DeclareCaptionOption*{onelinecaption}[]{\onelinecaptionstrue}
- \DeclareCaptionOption*{noonelinecaption}[]{\onelinecaptionsfalse}
+ \DeclareCaptionOption*{onelinecaption}[]{\caption@setbool{slc}{1}}
+ \DeclareCaptionOption*{noonelinecaption}[]{\caption@setbool{slc}{0}}
\DeclareCaptionOption*{tablecaptionabove}[]{\captionsetup[table]{position=t}}
\DeclareCaptionOption*{tablecaptionbelow}[]{\captionsetup[table]{position=b}}
- \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}
}
\newcommand*\caption@declarepackage[1]{%
\caption@setbool{pkt@#1}{1}%
@@ -104,35 +98,12 @@
\caption@declarepackage{rotating}
\caption@declarepackage{sidecap}
\caption@declarepackage{supertabular}
-\def\ProcessOptionsWithKV#1{%
- \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
- }%
- }%
- }%
- \edef\caption@tempa{%
- \noexpand\caption@setkeys{#1}{%
- \caption@tempa\@ptionlist{\@currname.\@currext}%
- }%
- }%
- \caption@tempa
- \let\CurrentOption\@empty
- \AtEndOfPackage{\let\@unprocessedoptions\relax}}
-\ProcessOptionsWithKV{caption}
+\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[%]
@@ -162,14 +133,16 @@
\fi
\caption@fixposition
\global\let\caption@fixedposition\caption@position}
-\newcommand\caption@beginex[2]{%
+\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{}%
- \fi}
+ \long\def\addcontentsline##1##2##3{}% There is no \@gobblethree...
+ \fi
+ \caption@ifempty{#3}{\let\caption@ifempty\@secondoftwo}%
+}
\newcommand*\caption@end{%
\endgroup
\let\caption@position\caption@fixedposition}
@@ -178,18 +151,20 @@
\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
\long\def\@caption#1[#2]#3{%
- \caption@beginex{#1}{#2}%
+ \caption@beginex{#1}{#2}{#3}%
\caption@@old{#1}[{#2}]{#3}%
\caption@end}%
- }{%
+ }{}}{%
\PackageInfo{caption}{captcont package v2.0 detected}%
\def\caption@caption#1{#1}%
}%
@@ -198,10 +173,18 @@
\caption@iftop{\vskip\belowcaptionskip}{\vskip\abovecaptionskip}%
\caption@@make{#1}{#2}%
\caption@iftop{\vskip\abovecaptionskip}{\vskip\belowcaptionskip}}
-\AtBeginDocument{\@ifundefined{scr@caption}{}{%
+\@ifundefined{scr@caption}{}{%
\PackageInfo{caption}{KOMA-Script class detected}%
- \let\scr@caption\caption
-}}
+ \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}{}{%
\PackageInfo{caption}{french(le) package detected}%
\@ifundefined{GOfrench}%
@@ -235,7 +218,7 @@
\def\@captype{#2}#1}%
\let\caption@@float\float@caption
\long\def\float@caption#1[#2]#3{%
- \caption@beginex{#1}{#2}%
+ \caption@beginex{#1}{#2}{#3}%
\let\@fs@capt\caption@@make
\caption@@float{#1}[{#2}]{#3}%
\caption@of@float{%
@@ -254,6 +237,7 @@
\def\@float@setevery#1{%
\caption@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
@@ -311,7 +295,7 @@
\let\H@refstepcounter\@gobble
\Hy@hypertexnamesfalse
\caption@capstart
- \global\let\caption@currentHref\@currentHref
+ \global\let\hc@currentHref\@currentHref
\endgroup
\def\caption{%
\let\caption\hc@org@caption
@@ -319,11 +303,11 @@
\caption@caption\hc@caption}}%
\let\caption@hc@@caption\hc@@caption
\long\def\hc@@caption#1[#2]#3{%
- \caption@beginex{#1}{#2}%
+ \caption@beginex{#1}{#2}{#3}%
\let\caption@hyper@makecurrent\hyper@makecurrent
\def\hyper@makecurrent\@captype{%
\let\hyper@makecurrent\caption@hyper@makecurrent
- \global\let\@currentHref\caption@currentHref}%
+ \global\let\@currentHref\hc@currentHref}%
\caption@hc@@caption{#1}[{#2}]{#3}%
\caption@end}%
}
@@ -414,13 +398,6 @@
\fi}%
\caption@endSC@FLOAT}%
}
-\AtBeginDocument{%
- \def\@tempa{\@ifstar\sf@@subref\sf@subref}%
- \ifx\subref\@tempa
- \PackageInfo{caption}{subref 1.2 or 1.3 detected}%
- \DeclareRobustCommand*\subref{\@ifstar\sf@@subref\sf@subref}%
- \fi
-}
\def\caption@setSTposition{%
\caption@setposition{\if@topcaption t\else b\fi}}
\caption@ifpackage{supertabular}{ST@caption}{%
@@ -431,7 +408,7 @@
\long\def\ST@caption#1[#2]#3{\par%
\caption@letfloattype{supertabular}{}%
\let\caption@fixposition\caption@setSTposition
- \caption@beginex{#1}{#2}%
+ \caption@beginex{#1}{#2}{#3}%
\addcontentsline{\csname ext@#1\endcsname}{#1}%
{\protect\numberline{%
\csname the#1\endcsname}{\ignorespaces #2}}%