summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/caption/caption3.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2007-11-05 00:01:13 +0000
committerKarl Berry <karl@freefriends.org>2007-11-05 00:01:13 +0000
commite2cd0086d505e768cf13a3608d943108cf7f46ad (patch)
tree87756ee41d66536f09c40672750fb35b7d04e591 /Master/texmf-dist/tex/latex/caption/caption3.sty
parent15c4594cfd4253c42884e702496ce4c36416c732 (diff)
caption 3.1e
git-svn-id: svn://tug.org/texlive/trunk@5342 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/caption/caption3.sty')
-rw-r--r--Master/texmf-dist/tex/latex/caption/caption3.sty52
1 files changed, 33 insertions, 19 deletions
diff --git a/Master/texmf-dist/tex/latex/caption/caption3.sty b/Master/texmf-dist/tex/latex/caption/caption3.sty
index 5b0beadfba3..0459e0cd472 100644
--- a/Master/texmf-dist/tex/latex/caption/caption3.sty
+++ b/Master/texmf-dist/tex/latex/caption/caption3.sty
@@ -28,7 +28,7 @@
%% caption-eng.tex, and caption-rus.tex.
%%
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption3}[2007/10/25 v3.1d caption3 kernel (AR)]
+\ProvidesPackage{caption3}[2007/11/04 v3.1e caption3 kernel (AR)]
\providecommand*\@nameundef[1]{%
\expandafter\let\csname #1\endcsname\@undefined}
\providecommand\l@addto@macro[2]{%
@@ -101,6 +101,14 @@
\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@teststar@[3]{%
+ \@ifstar{#1{#2}}{\caption@ifatletter{#1{#2}}{#1{#3}}}}
+\newcommand*\caption@ifatletter{%
+ \ifnum\the\catcode`\@=11
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi}
\newcommand*\caption@withoptargs[1]{%
\@ifstar
{\def\caption@tempa{*}\caption@@withoptargs#1}%
@@ -169,9 +177,15 @@
\RequirePackage{keyval}[1997/11/10]
\providecommand*\undefine@key[2]{%
\@nameundef{KV@#1@#2}\@nameundef{KV@#1@#2@default}}
-\providecommand*\@onlypreamble@key[2]{%
- \expandafter\@onlypreamble\csname KV@#1@#2\endcsname}
+\providecommand*\@preamble@keys{}
+\providecommand*\@onlypreamble@key[2]{\@cons\@preamble@keys{{#1}{#2}}}
\@onlypreamble\@onlypreamble@key
+\@onlypreamble\@preamble@keys
+\providecommand*\@notprerr@key[1]{\KV@err{Can be used only in preamble}}
+\caption@AtBeginDocument*{%
+ \def\@elt#1#2{\expandafter\let\csname KV@#1@#2\endcsname\@notprerr@key}%
+ \@preamble@keys
+ \let\@elt\relax}
\newcommand*\DeclareCaptionOption{%
\caption@teststar\caption@declareoption\AtEndOfPackage\@gobble}
\@onlypreamble\DeclareCaptionOption
@@ -193,7 +207,7 @@
\expandafter\@gobble
\fi}
\newcommand*\captionsetup{%
- \caption@teststar\@captionsetup\@gobble\@firstofone}
+ \caption@teststar@\@captionsetup\@gobble\@firstofone}
\newcommand*\@captionsetup[1]{%
\@ifnextchar[{\caption@setup@options#1}\caption@setup}
\newcommand*\caption@setup{\caption@setkeys{caption}}
@@ -202,7 +216,7 @@
#1{\caption@addtooptlist{#2}}%
\expandafter\caption@l@addto@list\csname caption@opt@#2\endcsname}
\newcommand*\clearcaptionsetup{%
- \caption@teststar\@clearcaptionsetup\@gobble\@firstofone}
+ \caption@teststar@\@clearcaptionsetup\@gobble\@firstofone}
\newcommand*\@clearcaptionsetup[1]{%
\let\caption@tempa#1%
\@testopt\@@clearcaptionsetup{}}
@@ -240,7 +254,7 @@
Option `#1' was not in list `#2'\MessageBreak}}}
\newcommand*\showcaptionsetup[2][\@firstofone]{%
\GenericWarning{}{%
- #1 Caption Info: KV list on `#2'\MessageBreak
+ #1 Caption Info: Option list on `#2'\MessageBreak
#1 Caption Data: \@ifundefined{caption@opt@#2}{%
-none-%
}{%
@@ -282,7 +296,7 @@
{\let\KV@err\ORI@KV@err\let\KV@errx\ORI@KV@errx}%
{\expandafter\let\expandafter\KV@err\csname #1@KV@err\endcsname
\let\KV@errx\KV@err}%
- \l@addto@macro\caption@keydepth i%
+ \edef\caption@keydepth{\caption@keydepth i}%
\caption@Debug{\protect\setkeys{#2}{#3}}%
\setkeys{#2}{#3}%
\edef\caption@keydepth{\expandafter\@cdr\caption@keydepth\@nil}%
@@ -338,7 +352,11 @@
\captionmargin\z@
\captionmargin@\z@
\setlength\captionwidth}
-\newcommand*\caption@count{0}
+\newcommand*\caption@thecounter{0}
+\newcommand*\caption@stepcounter{%
+ \@tempcnta\caption@thecounter
+ \advance\@tempcnta\@ne
+ \xdef\caption@thecounter{\the\@tempcnta}}
\newcommand*\caption@newlabel{\@newl@bel{caption@r}}
\newcommand*\caption@thepage{\the\c@page}
\newcommand*\caption@label[1]{%
@@ -353,13 +371,8 @@
\fi}
\newcommand*\caption@ifoddpage{%
\caption@iftwoside{%
- \begingroup
- \@tempcnta\caption@count
- \advance\@tempcnta\@ne
- \xdef\caption@count{\the\@tempcnta}%
- \endgroup
- \caption@label\caption@count
- \caption@pageref\caption@count
+ \caption@label\caption@thecounter
+ \caption@pageref\caption@thecounter
\ifodd\caption@thepage
\let\caption@ifoddpage\@firstoftwo
\else
@@ -372,8 +385,8 @@
\newdimen\caption@indent
\newdimen\caption@parindent
\newdimen\caption@hangindent
-\DeclareCaptionOption{indent}[\leftmargini]{%
- \setlength\caption@indent{#1}}% obsolete!
+\DeclareCaptionOption{indent}[\leftmargini]{% obsolete!
+ \setlength\caption@indent{#1}}
\DeclareCaptionOption{indention}[\leftmargini]{%
\setlength\caption@indent{#1}}
\DeclareCaptionOption{parindent}{%
@@ -807,8 +820,8 @@
\DeclareDefaultCaptionFont{font}{\@captionfont}
\DeclareDefaultCaptionFont{labelfont}{\@captionheadfont}
\DeclareDefaultCaptionFont{textfont}{\@captionfont\upshape}
- \captionsetup*[figure]{position=b}
- \captionsetup*[table]{position=t}
+ \captionsetup[figure]{position=b}
+ \captionsetup[table]{position=t}
}
\@ifclassloaded{beamer}{%
\caption@CheckCommand\beamer@makecaption{%
@@ -981,6 +994,7 @@
\caption@@make{\caption@lfmt{#1}{#2}{\theContinuedFloat}}}
\newcommand\caption@@make[2]{%
\begingroup
+ \caption@stepcounter
\caption@beginhook
\ifx\caption@maxmargin\@undefined \else
\ifdim\captionmargin>\caption@maxmargin\relax