summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
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
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')
-rw-r--r--Master/texmf-dist/tex/latex/caption/caption.sty47
-rw-r--r--Master/texmf-dist/tex/latex/caption/caption3.sty52
2 files changed, 54 insertions, 45 deletions
diff --git a/Master/texmf-dist/tex/latex/caption/caption.sty b/Master/texmf-dist/tex/latex/caption/caption.sty
index 6b9a5319ccb..bcc8bc5ca2e 100644
--- a/Master/texmf-dist/tex/latex/caption/caption.sty
+++ b/Master/texmf-dist/tex/latex/caption/caption.sty
@@ -28,10 +28,10 @@
%% caption-eng.tex, and caption-rus.tex.
%%
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption}[2007/10/25 v3.1d Customising captions (AR)]
+\ProvidesPackage{caption}[2007/11/04 v3.1e Customising captions (AR)]
\newcommand*\caption@Info[1]{\PackageInfo{caption}{#1\@gobble}}
\@onlypreamble\caption@Info
-\RequirePackage{caption3}[2007/10/25] % needs v3.1d or newer
+\RequirePackage{caption3}[2007/11/04] % needs v3.1e or newer
\@ifpackageloaded{caption2}{%
\caption@Error{%
You can't use both, the (obsolete) caption2 *and*\MessageBreak
@@ -43,9 +43,9 @@
\caption@IncompatiblePackage{ftcap}{}%
}{}%
\@ifpackageloaded{nonfloat}{%
- \caption@IncompatiblePackage{nonfloat}{. %
- Furthermore you could use \string\captionof\MessageBreak
- instead of \noexpand\figcaption or \string\tabcaption}%
+ \caption@IncompatiblePackage{nonfloat}{.\MessageBreak
+ Furthermore you could use \noexpand\captionof instead of\MessageBreak
+ \noexpand\figcaption or \string\tabcaption}%
}{}%
\@ifpackageloaded{topcapt}{%
\caption@IncompatiblePackage{topcapt}{}%
@@ -57,8 +57,7 @@
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}}
+ \space\space`tableposition=top'#2}}
\@onlypreamble\caption@IncompatiblePackage
\caption@ifbool{documentclass}{}{%
\PackageWarningNoLine{caption}{%
@@ -228,7 +227,7 @@
\caption@setjustification{raggedleft}}
\DeclareCaptionOptionNoValue*{oneline}{\caption@setbool{slc}{1}}
\DeclareCaptionOptionNoValue*{ignoreLTcapwidth}{%
- \caption@Warning{Obsolete option `ignoreLTcapwidth' ignored}}
+ \caption@WarningNoLine{Obsolete option `ignoreLTcapwidth' ignored}}
\DeclareCaptionOption*{caption}{%
\caption@setbool{temp}{#1}%
\caption@ifbool{temp}{}{%
@@ -305,7 +304,8 @@
\else
\caption@ORI@label#1{#2}%
\fi}
-\def\captionof{\caption@teststar\caption@of{\caption*}\caption}
+\caption@AtBeginDocument{%
+ \def\captionof{\caption@teststar\caption@of{\caption*}\caption}}
\newcommand*\caption@of[2]{\caption@settype*{#2}#1}
\newcommand*\captionlistentry{%
\@testopt\caption@listentry\@captype}
@@ -597,8 +597,7 @@
\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}%
+ As a result some features will not work as expected}%
}%
\renewcommand*\caption@ContinuedFloat[1]{%
\caption@Error{Not available in compatibility mode}}%
@@ -606,14 +605,12 @@
\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}{}{%
+ Restore hypcap definition of \string\capstart\@gobble}%
+ \let\capstart\caption@ORI@capstart}%
+ \@ifundefined{caption@ORI@float@makebox}{}{%
\caption@Debug{%
Restore hyperref redefinition of \string\float@makebox\@gobble}%
- \let\float@makebox\Hy@float@makebox
- \let\Hy@float@makebox\@undefined}%
+ \let\float@makebox\caption@ORI@float@makebox}%
}%
\newcommand*\caption@star[2]{#1#2}%
}{%
@@ -650,6 +647,9 @@
{\ignorespaces\caption@@anchor{#3}}\par}%
\caption@end}%
}%
+ \caption@AtBeginDocument*{%
+ \let\caption@ORI@capstart\@undefined
+ \let\caption@ORI@float@makebox\@undefined}%
\let\caption@ORI@xfloat\@xfloat
\def\@xfloat#1[#2]{%
\caption@ORI@xfloat{#1}[#2]%
@@ -840,7 +840,7 @@
\providecommand*\float@ifstyle[1]{\@secondoftwo}%
\providecommand*\float@ifcaption[1]{\@secondoftwo}%
}
-\captionsetup*[boxed]{skip=2pt} % do not issue a warning when not used
+\captionsetup[boxed]{skip=2pt} % do not issue a warning when not used
\caption@ifbool{ruled}{%
\captionsetup[ruled]{margin=0pt,minmargin=0,singlelinecheck=0}%
}{%
@@ -1014,24 +1014,19 @@
\@ifundefined{HyOrg@float@makebox}{}{%
\caption@Debug{%
Redefining \noexpand\float@makebox (again)\@gobble}%
- \let\Hy@float@makebox\float@makebox
+ \let\caption@ORI@float@makebox\float@makebox % save for compatibility mode
\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\caption@ORI@capstart\capstart % save for compatibility mode
\let\capstart\caption@start
\let\caption@start\relax
\let\caption@@start\relax
- \caption@@setbool\caption@ifhypcap1%
+ \caption@set@bool\caption@ifhypcap1%
\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
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