summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/caption/caption3.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-03-15 22:55:09 +0000
committerKarl Berry <karl@freefriends.org>2012-03-15 22:55:09 +0000
commit9cb823777741267aa9b1dc0a77508da79eb86025 (patch)
tree241821ff3af9d5fc8eaaaefa2a54af2e01346b75 /Master/texmf-dist/tex/latex/caption/caption3.sty
parentd1ad8fadf5a36d2b3eb1d25d8437eb6e8f1142f0 (diff)
caption 3.2 (15mar12)
git-svn-id: svn://tug.org/texlive/trunk@25657 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.sty86
1 files changed, 49 insertions, 37 deletions
diff --git a/Master/texmf-dist/tex/latex/caption/caption3.sty b/Master/texmf-dist/tex/latex/caption/caption3.sty
index 6bfa4f541a9..1187760af37 100644
--- a/Master/texmf-dist/tex/latex/caption/caption3.sty
+++ b/Master/texmf-dist/tex/latex/caption/caption3.sty
@@ -6,7 +6,7 @@
%%
%% caption3.dtx (with options: `package')
%%
-%% Copyright (C) 1994-2011 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
+%% Copyright (C) 1994-2012 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
%%
%% --------------------------------------------------------------------------
%%
@@ -29,7 +29,7 @@
%% and the user manuals caption-deu.tex, caption-eng.tex, and caption-rus.tex.
%%
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption3}[2011/11/01 v1.4a caption3 kernel (AR)]
+\ProvidesPackage{caption3}[2012/01/12 v1.4b caption3 kernel (AR)]
\providecommand*\@nameundef[1]{%
\expandafter\let\csname #1\endcsname\@undefined}
\providecommand\l@addto@macro[2]{%
@@ -284,15 +284,12 @@
}}%
\@esphack}
\DeclareCaptionOption{options}{\caption@setoptions{#1}}
-\DeclareCaptionOption{options*}{\caption@setoptions*{#1}}
-\newcommand*\caption@setoptions{%
- \caption@teststar\caption@set@options\@gobble\@firstofone}
-\newcommand*\caption@set@options[2]{%
- \caption@Debug{options=#2}%
- \expandafter\let\expandafter\caption@opt\csname caption@opt@#2\endcsname
+\newcommand*\caption@setoptions[1]{%
+ \caption@Debug{options=#1}%
+ \expandafter\let\expandafter\caption@opt\csname caption@opt@#1\endcsname
\ifx\caption@opt\relax \else
\caption@xsetup\caption@opt
- #1{\caption@clearsetup{#2}}% #1 = \@firstofone -or- \@gobble
+ \caption@clearsetup{#1}%
\fi}
\newcommand*\caption@xsetup[1]{\expandafter\caption@setup\expandafter{#1}}
\newcommand*\caption@addtooptlist[1]{%
@@ -751,34 +748,48 @@
\caption@ragged\RaggedLeft\raggedleft}
\DeclareCaptionJustification{RaggedRight}{%
\caption@ragged\RaggedRight\raggedright}
-\newcommand*\caption@ragged{%
- \caption@Debug{We need ragged2e}%
- \protected@write\@auxout{}{\string\caption@newlabel{ragged2e}{}}%
- \global\let\caption@ragged\caption@@ragged
- \caption@ragged}
-\caption@AtBeginDocument{%
- \@ifundefined{caption@r@ragged2e}{%
- \newcommand*\caption@@ragged{%
- \caption@Warning{%
- `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
- }{%
- \newcommand*\caption@@ragged[2]{%
- \@ifundefined{caption\string#1}{%
- \caption@Warning{%
- `ragged2e' package not loaded, therefore\MessageBreak
- substituting \string#2 for \string#1\MessageBreak}%
- \global\@namedef{caption\string#1}}{}%
- #2}%
- }%
- }}
+\newcommand*\caption@ragged{\caption@ifpackageloaded{ragged2e}}
+\newcommand*\caption@ifpackageloaded[1]{%
+ \@ifundefined{caption@ifpkg@#1}%
+ {\caption@RequirePackage{#1}%
+ \caption@pkg@true{#1}}%
+ {}%
+ \caption@ifpkg{#1}}
+\AtBeginDocument{\renewcommand*\caption@ifpackageloaded[1]{%
+ \@ifundefined{caption@ifpkg@#1}%
+ {\caption@addto@pkg@list{#1}%
+ \caption@pkg@false{#1}%
+ \caption@Warning{%
+ `#1' support has been changed.\MessageBreak
+ Rerun to get captions right}}%
+ {}%
+ \caption@ifpkg{#1}}}
+\newcommand*\caption@ifpkg[1]{%
+ \csname caption@ifpkg@#1\endcsname}
+\newcommand*\caption@pkg@true[1]{%
+ \global\expandafter\let\csname caption@ifpkg@#1\endcsname\@firstoftwo}
+\newcommand*\caption@pkg@false[1]{%
+ \global\expandafter\let\csname caption@ifpkg@#1\endcsname\@secondoftwo}
+\newcommand*\caption@pkg@list{}
+\newcommand*\caption@addto@pkg@list[1]{%
+ \protected@write\@auxout{}{%
+ \string\@cons\string\caption@pkg@list{{#1}}}}
+\AtBeginDocument{%
+ \def\caption@tempa{\endgroup}%
+ \begingroup
+ \def\@elt#1{%
+ \g@addto@macro\caption@tempa{%
+ \caption@RequirePackage{#1}%
+ \@namedef{caption@ifpkg@#1}{%
+ \caption@addto@pkg@list{#1}%
+ \caption@pkg@true{#1}%
+ \caption@ifpkg{#1}}}}%
+ \caption@pkg@list
+ \caption@tempa}
+\newcommand*\caption@RequirePackage[1]{%
+ \caption@Info{We need package `#1'}%
+ \RequirePackage{#1}}
+\@onlypreamble\caption@RequirePackage
\caption@ifundefined\abovecaptionskip{%
\newlength\abovecaptionskip\setlength\abovecaptionskip{10\p@}}{}
\caption@ifundefined\belowcaptionskip{%
@@ -1536,6 +1547,7 @@
\endgroup}
\def\sf@NEW@subfloat{%
\begingroup
+ \@nameuse{caption@warmup}%
\caption@setfloattype\@captype
\sf@ifpositiontop{%
\maincaptiontoptrue