summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/caption/caption3.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-08-21 23:25:38 +0000
committerKarl Berry <karl@freefriends.org>2011-08-21 23:25:38 +0000
commit4bf6d40e1871037aeeadbc08a3aaadf63bd5afc6 (patch)
treeb449d37a95705baa0f91a85a60cfc32120fffdc2 /Master/texmf-dist/tex/latex/caption/caption3.sty
parent4a9457dbad19d024d5327f667ed95f5cae64d41c (diff)
caption (21aug11 and earlier)
git-svn-id: svn://tug.org/texlive/trunk@23635 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.sty73
1 files changed, 47 insertions, 26 deletions
diff --git a/Master/texmf-dist/tex/latex/caption/caption3.sty b/Master/texmf-dist/tex/latex/caption/caption3.sty
index d3aa5bef452..8e1565c77f8 100644
--- a/Master/texmf-dist/tex/latex/caption/caption3.sty
+++ b/Master/texmf-dist/tex/latex/caption/caption3.sty
@@ -29,7 +29,7 @@
%% caption-eng.tex, and caption-rus.tex.
%%
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption3}[2011/08/06 v1.3 caption3 kernel (AR)]
+\ProvidesPackage{caption3}[2011/08/18 v1.3b caption3 kernel (AR)]
\providecommand*\@nameundef[1]{%
\expandafter\let\csname #1\endcsname\@undefined}
\providecommand\l@addto@macro[2]{%
@@ -47,6 +47,14 @@
\ifx\caption@tempa\@empty \else
#1#2%
\fi}
+\newcommand*\caption@ifundefined[1]{%
+ \ifx#1\@undefined
+ \expandafter\@firstoftwo
+ \else\ifx#1\relax
+ \expandafter\expandafter\expandafter\@firstoftwo
+ \else
+ \expandafter\expandafter\expandafter\@secondoftwo
+ \fi\fi}
\newcommand*\caption@ifinlist{%
\@expandtwoargs\caption@@ifinlist}
\newcommand*\caption@@ifinlist[2]{%
@@ -471,7 +479,7 @@
\DeclareCaptionOption{parskip}{%
\l@addto@macro\caption@@par{\setlength\parskip{#1}}}
\providecommand*\caption@ifkomaclass{%
- \@ifundefined{scr@caption}\@gobble\@firstofone}
+ \caption@ifundefined\scr@caption\@gobble\@firstofone}
\@onlypreamble\caption@ifkomaclass
\caption@ifkomaclass{%
\let\caption@KV@parindent\KV@caption@parindent
@@ -685,7 +693,7 @@
\DeclareCaptionFont{Large}{\Large}
\DeclareCaptionFont{sansmath}{\sansmath}
\DeclareCaptionFont{singlespacing}{%
- \@ifundefined{setspace@singlespace}{}{%
+ \caption@ifundefined\setspace@singlespace{}{%
\setstretch\setspace@singlespace}}% normally 1
\DeclareCaptionFont{onehalfspacing}{\onehalfspacing}
\DeclareCaptionFont{doublespacing}{\doublespacing}
@@ -765,9 +773,9 @@
#2}%
}%
}}
-\@ifundefined{abovecaptionskip}{%
+\caption@ifundefined\abovecaptionskip{%
\newlength\abovecaptionskip\setlength\abovecaptionskip{10\p@}}{}
-\@ifundefined{belowcaptionskip}{%
+\caption@ifundefined\belowcaptionskip{%
\newlength\belowcaptionskip\setlength\belowcaptionskip{0\p@}}{}
\DeclareCaptionOption{aboveskip}{\setlength\abovecaptionskip{#1}}
\DeclareCaptionOption{belowskip}{\setlength\belowcaptionskip{#1}}
@@ -864,7 +872,7 @@
\fi
\vskip\belowcaptionskip}}
\providecommand*\caption@ifamsclass{%
- \@ifundefined{@captionheadfont}\@gobble\@firstofone}
+ \caption@ifundefined\@captionheadfont\@gobble\@firstofone}
\@onlypreamble\caption@ifamsclass
\caption@ifamsclass{%
\caption@CheckCommand\@makecaption{%
@@ -931,7 +939,7 @@
\begingroup\edef\@tempa{\endgroup
\noexpand\caption@g@addto@list\noexpand\caption@sty@default
{margin=\the\captionmargin
- \@ifundefined{smf@makecaption}{}{,maxmargin=.1\linewidth}}}
+ \caption@ifundefined\smf@makecaption{}{,maxmargin=.1\linewidth}}}
\@tempa
\caption@g@addto@list\caption@sls@default{margin*=.5\captionmargin}
\DeclareCaptionLabelSeparator{default}{.\enspace}
@@ -996,7 +1004,7 @@
\setbeamertemplate{caption}[caption3]}
}
\providecommand*\caption@ifkomaclass{%
- \@ifundefined{scr@caption}\@gobble\@firstofone}
+ \caption@ifundefined\scr@caption\@gobble\@firstofone}
\@onlypreamble\caption@ifkomaclass
\caption@ifkomaclass{%
\caption@CheckCommand\@makecaption{%
@@ -1035,7 +1043,7 @@
\DeclareCaptionDefaultFont{labelfont}{\scr@fnt@captionlabel}
}
\providecommand*\caption@ifntgclass{%
- \@ifundefined{CaptionFonts}\@gobble\@firstofone}
+ \caption@ifundefined\CaptionFonts\@gobble\@firstofone}
\@onlypreamble\caption@ifntgclass
\caption@ifntgclass{%
\caption@CheckCommand\@makecaption{%
@@ -1054,7 +1062,7 @@
\DeclareCaptionDefaultFont{textfont}{\CaptionTextFont}
}
\providecommand*\caption@ifthesisclass{%
- \@ifundefined{cph@font}{\@gobble}{\@ifundefined{cpb@font}\@gobble\@firstofone}}
+ \caption@ifundefined\cph@font{\@gobble}{\caption@ifundefined\cpb@font\@gobble\@firstofone}}
\caption@ifthesisclass{%
\caption@CheckCommand\@makecaption{%
% thesis.cls 1996/25/01 1.0g LaTeX document class (wm).
@@ -1071,7 +1079,7 @@
\DeclareCaptionDefaultFont{labelfont}{\cph@font}
\DeclareCaptionDefaultFont{textfont}{\cpb@font}
}
-\@ifundefined{FB@makecaption}{}{%
+\caption@ifundefined\FB@makecaption{}{%
\caption@CheckCommand\@makecaption{%
% frenchb.ldf [2005/02/06 v1.6g French support from the babel system]
% frenchb.ldf [2007/10/05 v2.0e French support from the babel system]
@@ -1099,7 +1107,7 @@
\fi
\fi
}
-\@ifundefined{frenchTeXmods}{}{%
+\caption@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/]
@@ -1113,7 +1121,7 @@
\@mcORI{#1}{\relax\captionfont{#2}}%
\else
\@mcORI{#1}{#2}%
- \fi}}
+ \fi}}%
\caption@CheckCommand\@makecaption{%
% french(le).sty [2007/02/11 The french(le) package /V5,9993/]
\def\@makecaption#1#2{%
@@ -1126,11 +1134,24 @@
\@mcORI{#1}{\relax\captionfont{#2}}%
\else
\@mcORI{#1}{#2}%
- \fi}}
+ \fi}}%
\DeclareCaptionDefaultFont{textfont}{\itshape}%
\DeclareCaptionLabelSeparator{default}{\captionseparator\space}%
}
\DeclareCaptionListFormat{subperiod}{#2.}
+\caption@ifundefined\hunnewlabel{}{%
+ \caption@CheckCommand\@makecaption{%
+ % magyar.ldf [2005/03/30 v1.4j Magyar support from the babel system]
+ \def\@makecaption#1#2{%
+ \vskip\abovecaptionskip
+ \sbox\@tempboxa{#1. #2}%
+ \ifdim \wd\@tempboxa >\hsize
+ {#1. #2\csname par\endcsname}
+ \else
+ \global \@minipagefalse
+ \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
+ \fi
+ \vskip\belowcaptionskip}}}
\def\caption@tempa#1{\@ifundefined{extras#1}{}{%
\expandafter\addto\csname extras#1\endcsname{%
% change default labelsep and listformat
@@ -1349,9 +1370,9 @@
\KV@caption@DCT@within\caption@within@default
\caption@DeclareWithinOption{#2}%
\KV@caption@DCT@placement{tbp}%
- \@ifundefined{c@float@type}%
+ \caption@ifundefined\c@float@type
{\newcounter{float@type}%
- \setcounter{float@type}{\@ifundefined{c@figure}14}}%
+ \setcounter{float@type}{\caption@ifundefined\c@figure14}}%
{}%
\caption@Debug{float type `#2'=\the\value{float@type}}%
\expandafter\xdef\csname ftype@#2\endcsname{\the\value{float@type}}%
@@ -1362,7 +1383,7 @@
\newenvironment{#2*}{\@dblfloat{#2}}{\end@dblfloat}%
\expandafter\newcommand\csname listof#2s\endcsname{\caption@listof{#2}}%
\expandafter\newcommand\csname listof#2es\endcsname{\caption@listof{#2}}%
- \@ifundefined{l@figure}%
+ \caption@ifundefined\l@figure
{\@namedef{l@#2}{\@dottedtocline{1}{1.5em}{2.3em}}}%
{\expandafter\let\csname l@#2\endcsname\l@figure}%
\expandafter\newcommand\csname #2name\endcsname{}%
@@ -1375,14 +1396,14 @@
\expandafter\xdef\csname list#2name\endcsname{List of \@tempa s}%
\@cons\caption@typelist{{#2}}%
\caption@setkeys[caption]{caption@DCT}{#1}%
- \@ifundefined{float@exts}{\newtoks\float@exts}{}%
+ \caption@ifundefined\float@exts{\newtoks\float@exts}{}%
\let\float@do=\relax
\edef\@tempa{\noexpand\float@exts{\the\float@exts\float@do{\@nameuse{ext@#2}}}}%
\@tempa
- \@ifundefined{float@addtolists}{%
+ \caption@ifundefined\float@addtolists{%
\newcommand\float@addtolists[1]{%
\def\float@do####1{\addtocontents{####1}{##1}}\the\float@exts}%
- \@ifundefined{@chapter}{}{\caption@PatchChapter}}{}%
+ \caption@ifundefined\@chapter{}{\caption@PatchChapter}}{}%
\@ifnextchar[\@@DeclareCaptionType\relax}
\@onlypreamble\@DeclareCaptionType
\def\@@DeclareCaptionType[#1]{%
@@ -1392,9 +1413,9 @@
\def\@@@DeclareCaptionType[#1]{%
\KV@caption@DCT@listname{#1}}
\@onlypreamble\@@@DeclareCaptionType
-\let\DeclareFloatingEnvironment\DeclareCaptionType % old command name
+\let\DeclareFloatingEnvironment\DeclareCaptionType % alternative command name
\@onlypreamble\DeclareFloatingEnvironment
-\newcommand*\caption@within@default{\@ifundefined{c@chapter}{none}{chapter}}
+\newcommand*\caption@within@default{\caption@ifundefined\c@chapter{none}{chapter}}
\@onlypreamble\caption@within@default
\newcommand*\caption@listof[1]{%
\begingroup
@@ -1415,7 +1436,7 @@
\define@key{caption@DCT}{placement}{\@namedef{fps@\caption@type}{#1}}
\@onlypreamble@key{caption@DCT}{placement}
\define@key{caption@DCT}{within}{%
- \@ifundefined{c@chapter}{}{\@removefromreset\caption@type{chapter}}%
+ \caption@ifundefined\c@chapter{}{\@removefromreset\caption@type{chapter}}%
\@removefromreset\caption@type{section}%
\begingroup
\caption@setkeys[caption]{caption@within}{#1}%
@@ -1426,7 +1447,7 @@
\define@key{caption@within}{section}[]{%
\@addtoreset\caption@type{section}%
\caption@within{\ifnum\c@section>\z@ \thesection.\fi}{\theHsection.}}
-\@ifundefined{c@chapter}{}{%
+\caption@ifundefined\c@chapter{}{%
\define@key{caption@within}{chapter}[]{%
\@addtoreset\caption@type{chapter}%
\caption@within{\ifnum\c@chapter>\z@ \thechapter.\fi}{\theHchapter.}}
@@ -1566,7 +1587,7 @@
\fi
\@makechapterhead{##2}\@afterheading}%
% scrreprt/scrbook.cls
- \@ifundefined{KOMAClassName}{}{%
+ \caption@ifundefined\KOMAClassName{}{%
\caption@Debug{document class `\KOMAClassName' detected}%
\let\caption@patch@chapter\@gobblethree}%
% rapport1/3.cls [2004/06/07 v2.1a NTG LaTeX document class]
@@ -1800,7 +1821,7 @@
}}
\@onlypreamble\caption@@declaresubtype
\newcommand*\caption@declaresublistentry{%
- \@ifundefined{l@chapter}%
+ \caption@ifundefined\l@chapter
{\caption@@declaresublistentry\l@subsubsection}%
{\caption@@declaresublistentry\l@subsection}}
\@onlypreamble\caption@declaresublistentry