summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/caption
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2009-10-11 00:11:10 +0000
committerKarl Berry <karl@freefriends.org>2009-10-11 00:11:10 +0000
commit33f064e1a7beda1691c83d430ea320c2ecc36a11 (patch)
treeda1a936dd9824252939f52fb6ae562d3160f3c79 /Master/texmf-dist/source/latex/caption
parentbcda2cdc279653e631186f23777eebe8b02c0d70 (diff)
caption update (10oct09)
git-svn-id: svn://tug.org/texlive/trunk@15752 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/caption')
-rw-r--r--Master/texmf-dist/source/latex/caption/caption.dtx850
-rw-r--r--Master/texmf-dist/source/latex/caption/caption.ins2
-rw-r--r--Master/texmf-dist/source/latex/caption/ltcaption.dtx8
3 files changed, 521 insertions, 339 deletions
diff --git a/Master/texmf-dist/source/latex/caption/caption.dtx b/Master/texmf-dist/source/latex/caption/caption.dtx
index 95d983fc112..12921707c18 100644
--- a/Master/texmf-dist/source/latex/caption/caption.dtx
+++ b/Master/texmf-dist/source/latex/caption/caption.dtx
@@ -2,7 +2,7 @@
%
% This is file `caption.dtx'.
%
-% Copyright (C) 1994-2008 Axel Sommerfeldt (caption@sommerfee.de)
+% Copyright (C) 1994-2009 Axel Sommerfeldt (caption@sommerfee.de)
%
% --------------------------------------------------------------------------
%
@@ -24,12 +24,12 @@
% user manuals caption-deu.tex, caption-eng.tex, and caption-rus.tex.
%
% \fi
-% \CheckSum{6913}
+% \CheckSum{7029}
%
% \iffalse
%<*driver>
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesFile{caption.drv}[2008/08/24 v3.1j Implementation of the caption package]
+\ProvidesFile{caption.drv}[2009/10/09 v3.1k Implementation of the caption package]
\hbadness=9999 \newcount\hbadness \hfuzz=100pt % Make TeX shut up.
%\errorcontextlines=3
%
@@ -56,7 +56,7 @@
\ifpdf\usepackage{hypdestopt}\fi
\hypersetup{pdfkeywords={LaTeX, package, caption},pdfstartpage={},pdfstartview={}}
%
-\usepackage[debug]{caption}[2008/08/01]
+\usepackage[debug]{caption}[2009/10/09]
%
\DeclareRobustCommand*\eTeX{\texorpdfstring
{\leavevmode\hbox{$\varepsilon$}-\TeX}%
@@ -233,7 +233,7 @@
%
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption3}[2008/08/24 v3.1j caption3 kernel (AR)]
+\ProvidesPackage{caption3}[2009/10/09 v3.1k caption3 kernel (AR)]
% \end{macrocode}
%
% \subsection{Generic helpers}
@@ -898,6 +898,7 @@
% \changes{v3.1b}{2007/09/18}{Usage of \cs{caption@Package} removed, we use \cs{caption@KV@err} instead}
% \changes{v3.1f}{2007/11/16}{Bugfix 07-11-09: `space hack' added}
% \changes{v3.1g}{2008/01/12}{\cs{captionsetup@starfalse} added}
+% \changes{v3.1k}{2009/09/30}{Bugfix 09-09-29: Missing error handler will be defined automatically}
% |\caption@setkeys|\oarg{package}\marg{family}\marg{key-values}\par
% This one simply calls |\setkeys|\marg{family}\marg{key-values}
% but lets the error messages not refer to the \package{keyval} package,
@@ -913,6 +914,10 @@
\expandafter\let\csname ORI@KV@err\caption@keydepth\endcsname\KV@err
\expandafter\let\csname ORI@KV@errx\caption@keydepth\endcsname\KV@errx
\expandafter\let\expandafter\KV@err\csname #1@KV@err\endcsname
+ \ifx\KV@err\relax
+ \def\KV@err##1{\PackageError{#1}{##1}{%
+ See the #1 package documentation for explanation.}}%
+ \fi
\let\KV@errx\KV@err
\edef\caption@keydepth{\caption@keydepth i}%
% \end{macrocode}
@@ -1128,13 +1133,14 @@
%
% \begin{macro}{\caption@pageref}
% \changes{v3.1}{2007/09/01}{This macro added}
+% \changes{v3.1k}{2009/10/09}{Uses \cs{@latex@warning} instead of \cs{caption@Warning} now}
% This command is a modified version of |\pageref| from \LaTeX2e.
% It will be used inside |\caption@ifoddpage| and |\FP@helpNote|.
% \begin{macrocode}
\newcommand*\caption@pageref[1]{%
\expandafter\ifx\csname caption@r@#1\endcsname\relax
\G@refundefinedtrue % => 'There are undefined references.'
- \caption@Warning{Reference on page \thepage \space undefined}%
+ \@latex@warning{Reference `#1' on page \thepage \space undefined}%
\else
\expandafter\let\expandafter\caption@thepage\csname caption@r@#1\endcsname
\fi}
@@ -1558,10 +1564,27 @@
\DeclareCaptionLabelSeparator*{endash}{\space\textendash\space}
% \end{macrocode}
%
+% \begin{macro}{\caption@setdefaultlabelsep}
+% \changes{v3.1k}{2009/03/29}{This macro added}
+% \begin{macrocode}
+\newcommand*\caption@setdefaultlabelsep[1]{%
+ \ifx\caption@lsep\caption@lsep@default
+ \caption@set@default@labelsep{#1}%
+ \caption@setlabelseparator{default}%
+ \else
+ \caption@set@default@labelsep{#1}%
+ \fi}
+% \end{macrocode}
+% \begin{macrocode}
+\newcommand*\caption@set@default@labelsep[1]{%
+ \def\caption@lsep@default{\@nameuse{caption@lsep@#1}}%
+ \def\caption@iflf@default{\@nameuse{caption@iflf@#1}}}
+% \end{macrocode}
+% \end{macro}
+%
% `default' usually maps to `colon'.
% \begin{macrocode}
-\def\caption@lsep@default{\caption@lsep@colon}
-\def\caption@iflf@default{\caption@iflf@colon}
+\caption@set@default@labelsep{colon}
% \end{macrocode}
%
% \subsection{Text formats}
@@ -1728,12 +1751,14 @@
% \end{macrocode}
%
% \changes{v3.0p}{2007/04/02}{\package{setspace} package support added (kernel)}
+% \changes{v3.1k}{2009/10/09}{Bugfix 09-05-18: \package{setspace} package support revised (kernel)}
% \begin{macrocode}
-\DeclareCaptionFont{singlespacing}{\setstretch\setspace@singlespace}% normally 1
+\DeclareCaptionFont{singlespacing}{%
+ \@ifundefined{setspace@singlespace}{}{%
+ \setstretch\setspace@singlespace}}% normally 1
\DeclareCaptionFont{onehalfspacing}{\onehalfspacing}
\DeclareCaptionFont{doublespacing}{\doublespacing}
\DeclareCaptionFont{stretch}{\setstretch{#1}}
-\caption@AtBeginDocument{\providecommand*\setstretch[1]{}}
% \end{macrocode}
%
% \begin{macrocode}
@@ -2143,8 +2168,27 @@
\DeclareCaptionListFormat{subsimple}{#2}
\DeclareCaptionListFormat{subparens}{(#2)}
% \end{macrocode}
+%
+% \begin{macro}{\caption@setdefaultlistformat}
+% \changes{v3.1k}{2009/03/29}{This macro added}
+% \begin{macrocode}
+\newcommand*\caption@setdefaultlistformat[1]{%
+ \ifx\caption@lstfmt\caption@lstfmt@default
+ \caption@set@default@listformat{#1}%
+ \caption@setlistformat{default}%
+ \else
+ \caption@set@default@listformat{#1}%
+ \fi}
+% \end{macrocode}
+% \begin{macrocode}
+\newcommand*\caption@set@default@listformat[1]{%
+ \def\caption@lstfmt@default{\@nameuse{caption@lstfmt@#1}}}
+% \end{macrocode}
+% \end{macro}
+%
+% `default' usually maps to `subsimple'.
% \begin{macrocode}
-\def\caption@lstfmt@default{\caption@lstfmt@subsimple}
+\caption@set@default@listformat{subsimple}
% \end{macrocode}
%
% \subsection{Debug option}
@@ -2512,6 +2556,37 @@
}
% \end{macrocode}
%
+% \iffalse
+% \subsubsection{The hungarian and magyar Babel option}
+% \changes{v3.2}{2009/03/29}{\package{magyar} package support added (kernel)}
+%
+% \begin{macrocode}
+\DeclareCaptionListFormat{subperiod}{#2.}
+% \end{macrocode}
+%
+% \begin{macrocode}
+%%% \def\caption@tempa#1{\@ifundefined{extras#1}{}{%
+%%% \expandafter\addto\csname extras#1\endcsname{%
+%%% % reverse changes made by magyar.ldf
+%%% \let\@makecaption\caption@makecaption
+%%% \babel@save\@makecaption
+%%% \caption@redefine
+%%% \babel@save\@caption
+%%% % change default labelsep and listformat
+%%% \caption@setdefaultlabelsep{period}%
+%%% \caption@setdefaultlistformat{subperiod}}%
+%%% \expandafter\addto\csname noextras#1\endcsname{%
+%%% % change default labelsep and listformat
+%%% \caption@setdefaultlabelsep{colon}%
+%%% \caption@setdefaultlistformat{subsimple}}%
+%%% }}
+% \end{macrocode}
+% \begin{macrocode}
+%%% \caption@tempa{hungarian}
+%%% \caption@tempa{magyar}
+% \end{macrocode}
+% \fi
+%
% \subsection{Execution of options}
%
% \begin{macrocode}
@@ -3063,26 +3138,20 @@
\define@key{caption@DCT}{without}{\KV@caption@DCT@within{none}}
\@onlypreamble@key{caption@DCT}{without}
% \end{macrocode}
+% \changes{v3.1k}{2009/03/29}{Bugfix 08-09-25: \texttt{within=section} fixed}
% \begin{macrocode}
\define@key{caption@within}{none}[]{%
\caption@within{}{}}
\@onlypreamble@key{caption@within}{none}
-\@ifundefined{c@chapter}{%
- \define@key{caption@within}{section}[]{%
- \@addtoreset\caption@type{section}%
- \caption@within{\ifnum\c@section>\z@ \thesection.\fi}{\theHsection.}}
-}{%
+\define@key{caption@within}{section}[]{%
+ \@addtoreset\caption@type{section}%
+ \caption@within{\ifnum\c@section>\z@ \thesection.\fi}{\theHsection.}}
+\@onlypreamble@key{caption@within}{section}
+\@ifundefined{c@chapter}{}{%
\define@key{caption@within}{chapter}[]{%
\@addtoreset\caption@type{chapter}%
\caption@within{\ifnum\c@chapter>\z@ \thechapter.\fi}{\theHchapter.}}
- \@onlypreamble@key{caption@within}{chapter}
- \define@key{caption@within}{section}[]{%
- \@addtoreset\caption@type{chapter}%
- \@addtoreset\caption@type{section}%
- \caption@within{\ifnum\c@chapter>\z@ \thechapter.\fi
- \ifnum\c@section>\z@ \thesection.\fi}{%
- \theHchapter.\theHsection.}}
-}\@onlypreamble@key{caption@within}{section}
+ \@onlypreamble@key{caption@within}{chapter}}
% \end{macrocode}
% \begin{macro}{\caption@within}
% \changes{v3.1f}{2007/12/21}{This macro added}
@@ -3447,9 +3516,58 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\@stpelt}
+% We patch \cs{@stpelt} so a list of `connected' counters will be reset, too.
+% (Like \cs{stepcounter} does in |ltcounts.dtx|.)
+% \begin{macrocode}
+\newcommand*\caption@patch@stpelt{%
+ \let\caption@stpelt\@stpelt
+ \def\@stpelt##1{%
+ \caption@stpelt{##1}%
+ \begingroup
+ \let\@elt\caption@stpelt
+ \csname caption@cl@##1\endcsname
+ \endgroup}%
+ \let\caption@patch@stpelt\relax}
+\@onlypreamble\caption@patch@stpelt
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\caption@addtoreset}
+% \changes{v3.1k}{2009/10/09}{This macro added}
+% Like \cs{@addtoreset} from |ltcounts.dtx|
+% \begin{macrocode}
+\newcommand*\caption@addtoreset[2]{%
+ \caption@patch@stpelt
+ \@ifundefined{caption@cl@#2}{\@namedef{caption@cl@#2}{}}{}%
+ \expandafter\@cons\csname caption@cl@#2\endcsname{{#1}}}
+\@onlypreamble\caption@addtoreset
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\caption@addtoreset}
+% \changes{v3.1k}{2009/10/09}{This macro added}
+% Like \cs{@removefromreset} from |remreset.sty|
+% \begin{macrocode}
+\newcommand*\caption@removefromreset[2]{%
+ \begingroup
+ \expandafter\let\csname c@#1\endcsname\caption@removefromreset
+ \def\@elt##1{%
+ \expandafter\ifx\csname c@##1\endcsname\caption@removefromreset
+ \else
+ \noexpand\@elt{##1}%
+ \fi}%
+ \expandafter\xdef\csname caption@cl@#2\endcsname{%
+ \csname caption@cl@#2\endcsname}%
+ \endgroup}
+\@onlypreamble\caption@removefromreset
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\DeclareCaptionSubType}
% \changes{v3.1f}{2007/11/16}{This macro added}
% \changes{v3.1g}{2008/03/11}{Bugfix: \cs{subfigurename} will be defined now}
+% \changes{v3.1k}{2009/10/09}{Bugfix 08-10-01: Usage of \cs{caption@addtoreset} added}
% |\DeclareCaptionSubType|\oarg{numbering scheme}\marg{type}\\
% |\DeclareCaptionSubType*|\oarg{numbering scheme}\marg{type}\par
% The starred variant provides the numbering format
@@ -3474,6 +3592,7 @@
{\@ifundefined{c@sub#3}%
{\caption@Debug{New subtype `sub#3'}%
\newcounter{sub#3}%
+ \caption@addtoreset{sub#3}{#3}%
\@namedef{ext@sub#3}{\csname ext@#3\endcsname}%
\@ifundefined{l@chapter}%
{\edef\@tempa{\expandafter\expandafter\expandafter\noexpand
@@ -3613,7 +3732,7 @@
%
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption}[2008/08/24 v3.1j Customizing captions (AR)]
+\ProvidesPackage{caption}[2009/10/09 v3.1k Customizing captions (AR)]
%\@ifundefined{PackageRedefines}{}{\PackageRedefines{caption}{caption}}
% \end{macrocode}
%
@@ -3633,6 +3752,17 @@
\RequirePackage{caption3}[2008/08/24] % needs v3.1j or newer
% \end{macrocode}
%
+% \subsection{Check against incompatible document classes}
+%
+% \begin{macrocode}
+\caption@ifbool{documentclass}{}{%
+ \caption@WarningNoLine{%
+ Unsupported document class (or package) detected,\MessageBreak
+ usage of the caption package is not recommended}%
+ \caption@Info{\string\@makecaption\space=\space\meaning\@makecaption}%
+}
+% \end{macrocode}
+%
% \subsection{Check against incompatible packages}
%
% \changes{v3.0p}{2007/04/06}{Check against obsolete \package{caption2} package added}
@@ -3677,192 +3807,6 @@
% \end{macrocode}
% \end{macro}
%
-% \subsection{Check document class}
-%
-% \begin{macrocode}
-\caption@ifbool{documentclass}{}{%
- \caption@WarningNoLine{%
- Unsupported document class (or package) detected,\MessageBreak
- usage of the caption package is not recommended}%
- \caption@Info{\string\@makecaption\space=\space\meaning\@makecaption}%
-}
-% \end{macrocode}
-%
-% \subsection{Adaption to the \AmS{} \& \SmF{} document classes}
-% \changes{v3.1}{2007/07/29}{\AmS\ \& \SmF\ document classes support added (package)}
-%
-% \begin{macrocode}
-\@ifundefined{@captionheadfont}{}{%
- \caption@Info{AMS or SMF document class}%
-% \end{macrocode}
-% \begin{macrocode}
- \setlength\belowcaptionskip{0pt}% set to 12pt by AMS class
-% \end{macrocode}
-% \begin{macrocode}
-}
-% \end{macrocode}
-%
-% \subsection{Emulation of the \KOMAScript{} commands}
-% \changes{v3.0a}{2004/01/18}{Minimum adaptation to \KOMAScript\ added (package)}
-% \changes{v3.0h}{2005/08/22}{\KOMAScript\ compatibility options added (package)}
-% \changes{v3.0i}{2005/11/17}{\KOMAScript\ compatibility commands added (package)}
-% \changes{v3.0l}{2007/02/18}{\KOMAScript\ compatibility revised (package)}
-% \changes{v3.1}{2007/03/17}{\KOMAScript\ compatibility options removed (package)}
-% \changes{v3.1}{2007/04/05}{\KOMAScript\ compatibility revised \& enhanced (package)}
-%
-% \begin{macrocode}
-\@ifundefined{scr@caption}{}{%
- \caption@Info{KOMA-Script document class}%
-% \end{macrocode}
-%
-% Here we emulate the caption related commands and take over the caption
-% related settings from the \KOMAScript\ classes.
-%
-% \begin{macro}{\@tablecaptionabovetrue}
-% \begin{macro}{\@tablecaptionabovefalse}
-% \changes{v3.1g}{2008/03/01}{\cs{def} changed to \cs{g@addto@macro}}
-% \begin{macrocode}
- \g@addto@macro\@tablecaptionabovetrue{\captionsetup*[table]{position=t}}
- \g@addto@macro\@tablecaptionabovefalse{\captionsetup*[table]{position=b}}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macrocode}
- \if@tablecaptionabove
- \@tablecaptionabovetrue
- \else
- \@tablecaptionabovefalse
- \fi
-% \end{macrocode}
-%
-% \begin{macro}{\onelinecaptionstrue}
-% \begin{macro}{\onelinecaptionsfalse}
-% \changes{v3.1g}{2008/03/01}{\cs{def} changed to \cs{g@addto@macro}}
-% \begin{macrocode}
- \g@addto@macro\onelinecaptionstrue{\let\caption@ifslc\@firstoftwo}
- \g@addto@macro\onelinecaptionsfalse{\let\caption@ifslc\@secondoftwo}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macrocode}
- \ifonelinecaptions
- \onelinecaptionstrue
- \else
- \onelinecaptionsfalse
- \fi
-% \end{macrocode}
-%
-% \begin{macro}{\@captionabovetrue}
-% \begin{macro}{\@captionabovefalse}
-% \changes{v3.0j}{2006/03/21}{Bugfix 06-03-21:
-% \cs{let}\cs{caption@setposition}\cs{@gobble} added}
-% \changes{v3.0n}{2006/03/09}{Accidentally this got broken in \version{3.0m}, fixed}
-% \changes{v3.1}{2007/03/31}{We redefine \cs{captionabovetrue/false} now
-% instead of \cs{captionabove/below}}
-% \changes{v3.1g}{2008/03/01}{\cs{def} changed to \cs{g@addto@macro}}
-% \begin{macrocode}
- \g@addto@macro\@captionabovetrue{\let\caption@position\@firstoftwo}
- \g@addto@macro\@captionabovefalse{\let\caption@position\@secondoftwo}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\setcapindent}
-% \begin{macrocode}
- \let\caption@KOMA@setcapindent\@setcapindent
- \renewcommand*\@setcapindent[1]{%
- \caption@KOMA@setcapindent{#1}\caption@setcapindent}
-% \end{macrocode}
-% \begin{macrocode}
- \let\caption@KOMA@@setcapindent\@@setcapindent
- \renewcommand*\@@setcapindent[1]{%
- \caption@KOMA@@setcapindent{#1}\caption@setcapindent}
-% \end{macrocode}
-% \begin{macrocode}
- \newcommand*\caption@setcapindent{%
- \captionsetup{indent=\ifdim\cap@indent<\z@\z@\else\cap@indent\fi}}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macrocode}
- \@ifundefined{cap@indent}{}{\caption@setcapindent}
-% \end{macrocode}
-%
-% \begin{macro}{\setcapwidth}
-% \Note{The optional argument of \cs{setcapwidth} if not supported (yet),
-% so we issue a warning if used.
-% (Since this does not seem to have an negative effect when used
-% by the \texttt{captionbeside} environment, we suppress the warning here.)}
-% \begin{macrocode}
- \expandafter\let\expandafter\caption@KOMA@setcapwidth
- \csname\string\setcapwidth\endcsname
- \@namedef{\string\setcapwidth}[#1]#2{%
- \caption@KOMA@setcapwidth[#1]{#2}\caption@setcapwidth{#1}}
-% \end{macrocode}
-% \begin{macrocode}
- \newcommand*\caption@setcapwidth[1]{%
- \ifx\\#1\\\else
- \@ifundefined{cap@margin}{}{%
- \def\@tempa{captionbeside}%
- \ifx\@tempa\@currenvir\else\caption@Warning{%
- Ignoring optional argument [#1] of \string\setcapwidth\MessageBreak}%
- \fi}%
- \fi
- \captionsetup{width=\cap@width}}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macrocode}
- \def\caption@tempa{\hsize}%
- \ifx\caption@tempa\cap@width \else
- \caption@setcapwidth{?}
- \fi
-% \end{macrocode}
-%
-% \begin{macro}{\setcapmargin}
-% \begin{macrocode}
- \expandafter\let\expandafter\caption@KOMA@setcapmargin
- \csname\string\@setcapmargin\endcsname
- \@namedef{\string\@setcapmargin}[#1]#2{%
- \caption@KOMA@setcapmargin[#1]{#2}\caption@setcapmargin}
-% \end{macrocode}
-% \begin{macrocode}
- \expandafter\let\expandafter\caption@KOMA@@setcapmargin
- \csname\string\@@setcapmargin\endcsname
- \@namedef{\string\@@setcapmargin}[#1]#2{%
- \caption@KOMA@@setcapmargin[#1]{#2}\caption@setcapmargin}
-% \end{macrocode}
-% \begin{macrocode}
- \newcommand*\caption@setcapmargin{%
- \begingroup
- \let\onelinecaptionsfalse\relax
- \def\@twoside{0}%
- \def\if@twoside{\def\@twoside{1}\iffalse}%
- \cap@margin
- \def\@tempa{\endgroup}%
- \ifx\cap@left\hfill\else\ifx\cap@right\hfill\else
- \def\hspace##1##{\@firstofone}%
- \edef\@tempa{\endgroup
- \noexpand\captionsetup{%
- twoside=\@twoside,slc=0,%
- margin={\cap@left,\cap@right}}}%
- \fi\fi
- \@tempa}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macrocode}
- \ifx\cap@margin\relax \else
- \caption@setcapmargin
- \fi
-% \end{macrocode}
-%
-% \begin{macrocode}
-}
-% \end{macrocode}
-%
% \subsection{Declaration of options}
%
% \subsubsection{Options for figure and table}
@@ -4080,8 +4024,8 @@
% \end{macrocode}
% \begin{macrocode}
\newcommand*\caption@setFPoption[2]{%
- \edef\@tempa{\@car#2\@nil}%
- \caption@setbool{FP#1cap}{\if c\@tempa 1\else 0\fi}}
+ \edef\caption@tempa{\@car#2\@nil}%
+ \caption@setbool{FP#1cap}{\if c\caption@tempa 1\else 0\fi}}
\@onlypreamble\caption@setFPoption
% \end{macrocode}
% \begin{macrocode}
@@ -4101,6 +4045,192 @@
\captionsetup{hypcap=1,hypcapspace=.5\baselineskip}
% \end{macrocode}
%
+% \subsection{\AmS{} \& \SmF{} document classes support}
+% \changes{v3.1}{2007/07/29}{\AmS\ \& \SmF\ document classes support added (package)}
+%
+% \begin{macrocode}
+\@ifundefined{@captionheadfont}{}{%
+ \caption@Info{AMS or SMF document class}%
+% \end{macrocode}
+% \begin{macrocode}
+ \setlength\belowcaptionskip{0pt}% set to 12pt by AMS class
+% \end{macrocode}
+% \begin{macrocode}
+}
+% \end{macrocode}
+%
+% \subsection{\KOMAScript{} document classes support}
+% \changes{v3.0a}{2004/01/18}{Minimum adaptation to \KOMAScript\ added (package)}
+% \changes{v3.0h}{2005/08/22}{\KOMAScript\ compatibility options added (package)}
+% \changes{v3.0i}{2005/11/17}{\KOMAScript\ compatibility commands added (package)}
+% \changes{v3.0l}{2007/02/18}{\KOMAScript\ compatibility revised (package)}
+% \changes{v3.1}{2007/03/17}{\KOMAScript\ compatibility options removed (package)}
+% \changes{v3.1}{2007/04/05}{\KOMAScript\ compatibility revised \& enhanced (package)}
+%
+% \begin{macrocode}
+\@ifundefined{scr@caption}{}{%
+ \caption@Info{KOMA-Script document class}%
+% \end{macrocode}
+%
+% Here we emulate the caption related commands and take over the caption
+% related settings from the \KOMAScript\ classes.
+%
+% \begin{macro}{\@tablecaptionabovetrue}
+% \begin{macro}{\@tablecaptionabovefalse}
+% \changes{v3.1g}{2008/03/01}{\cs{def} changed to \cs{g@addto@macro}}
+% \begin{macrocode}
+ \g@addto@macro\@tablecaptionabovetrue{\captionsetup*[table]{position=t}}
+ \g@addto@macro\@tablecaptionabovefalse{\captionsetup*[table]{position=b}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macrocode}
+ \if@tablecaptionabove
+ \@tablecaptionabovetrue
+ \else
+ \@tablecaptionabovefalse
+ \fi
+% \end{macrocode}
+%
+% \begin{macro}{\onelinecaptionstrue}
+% \begin{macro}{\onelinecaptionsfalse}
+% \changes{v3.1g}{2008/03/01}{\cs{def} changed to \cs{g@addto@macro}}
+% \begin{macrocode}
+ \g@addto@macro\onelinecaptionstrue{\let\caption@ifslc\@firstoftwo}
+ \g@addto@macro\onelinecaptionsfalse{\let\caption@ifslc\@secondoftwo}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macrocode}
+ \ifonelinecaptions
+ \onelinecaptionstrue
+ \else
+ \onelinecaptionsfalse
+ \fi
+% \end{macrocode}
+%
+% \begin{macro}{\@captionabovetrue}
+% \begin{macro}{\@captionabovefalse}
+% \changes{v3.0j}{2006/03/21}{Bugfix 06-03-21:
+% \cs{let}\cs{caption@setposition}\cs{@gobble} added}
+% \changes{v3.0n}{2006/03/09}{Accidentally this got broken in \version{3.0m}, fixed}
+% \changes{v3.1}{2007/03/31}{We redefine \cs{captionabovetrue/false} now
+% instead of \cs{captionabove/below}}
+% \changes{v3.1g}{2008/03/01}{\cs{def} changed to \cs{g@addto@macro}}
+% \changes{v3.1k}{2009/10/09}{\opt{figureposition} and \opt{tableposition} will issue a warning now}
+% Please note that these are stronger than the \opt{position} setting, therefore we
+% override the options \opt{figureposition} and \opt{tableposition} to typeout a warning.
+% \begin{macrocode}
+ \g@addto@macro\@captionabovetrue{\let\caption@position\@firstoftwo}
+ \g@addto@macro\@captionabovefalse{\let\caption@position\@secondoftwo}
+% \end{macrocode}
+% \begin{macrocode}
+ \DeclareCaptionOption{figureposition}{%
+ \caption@WarningNoLine{Option `figureposition=#1' has no effect\MessageBreak
+ when used with a KOMA script document class}}
+ \DeclareCaptionOption{tableposition}{%
+ \caption@WarningNoLine{Option `tableposition=#1' has no effect\MessageBreak
+ when used with a KOMA script document class}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\setcapindent}
+% \begin{macrocode}
+ \let\caption@KOMA@setcapindent\@setcapindent
+ \renewcommand*\@setcapindent[1]{%
+ \caption@KOMA@setcapindent{#1}\caption@setcapindent}
+% \end{macrocode}
+% \begin{macrocode}
+ \let\caption@KOMA@@setcapindent\@@setcapindent
+ \renewcommand*\@@setcapindent[1]{%
+ \caption@KOMA@@setcapindent{#1}\caption@setcapindent}
+% \end{macrocode}
+% \begin{macrocode}
+ \newcommand*\caption@setcapindent{%
+ \captionsetup{indent=\ifdim\cap@indent<\z@\z@\else\cap@indent\fi}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+ \@ifundefined{cap@indent}{}{\caption@setcapindent}
+% \end{macrocode}
+%
+% \begin{macro}{\setcapwidth}
+% \Note{The optional argument of \cs{setcapwidth} if not supported (yet),
+% so we issue a warning if used.
+% (Since this does not seem to have an negative effect when used
+% by the \texttt{captionbeside} environment, we suppress the warning here.)}
+% \begin{macrocode}
+ \expandafter\let\expandafter\caption@KOMA@setcapwidth
+ \csname\string\setcapwidth\endcsname
+ \@namedef{\string\setcapwidth}[#1]#2{%
+ \caption@KOMA@setcapwidth[#1]{#2}\caption@setcapwidth{#1}}
+% \end{macrocode}
+% \begin{macrocode}
+ \newcommand*\caption@setcapwidth[1]{%
+ \ifx\\#1\\\else
+ \@ifundefined{cap@margin}{}{%
+ \def\@tempa{captionbeside}%
+ \ifx\@tempa\@currenvir\else\caption@Warning{%
+ Ignoring optional argument [#1] of \string\setcapwidth\MessageBreak}%
+ \fi}%
+ \fi
+ \captionsetup{width=\cap@width}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+ \def\caption@tempa{\hsize}%
+ \ifx\caption@tempa\cap@width \else
+ \caption@setcapwidth{?}
+ \fi
+% \end{macrocode}
+%
+% \begin{macro}{\setcapmargin}
+% \begin{macrocode}
+ \expandafter\let\expandafter\caption@KOMA@setcapmargin
+ \csname\string\@setcapmargin\endcsname
+ \@namedef{\string\@setcapmargin}[#1]#2{%
+ \caption@KOMA@setcapmargin[#1]{#2}\caption@setcapmargin}
+% \end{macrocode}
+% \begin{macrocode}
+ \expandafter\let\expandafter\caption@KOMA@@setcapmargin
+ \csname\string\@@setcapmargin\endcsname
+ \@namedef{\string\@@setcapmargin}[#1]#2{%
+ \caption@KOMA@@setcapmargin[#1]{#2}\caption@setcapmargin}
+% \end{macrocode}
+% \begin{macrocode}
+ \newcommand*\caption@setcapmargin{%
+ \begingroup
+ \let\onelinecaptionsfalse\relax
+ \def\@twoside{0}%
+ \def\if@twoside{\def\@twoside{1}\iffalse}%
+ \cap@margin
+ \def\@tempa{\endgroup}%
+ \ifx\cap@left\hfill\else\ifx\cap@right\hfill\else
+ \def\hspace##1##{\@firstofone}%
+ \edef\@tempa{\endgroup
+ \noexpand\captionsetup{%
+ twoside=\@twoside,slc=0,%
+ margin={\cap@left,\cap@right}}}%
+ \fi\fi
+ \@tempa}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+ \ifx\cap@margin\relax \else
+ \caption@setcapmargin
+ \fi
+% \end{macrocode}
+%
+% \begin{macrocode}
+}
+% \end{macrocode}
+%
% \subsection{Processing of options}
%
% \changes{v3.0m}{2007/03/04}{Verbose option added (package)}
@@ -4181,11 +4311,11 @@
\@backslashchar#1captionof}{}}%
% \end{macrocode}
% \begin{macrocode}
- \edef\@tempa{#3}%
- \expandafter\ifx\csname @#1captype\endcsname\@tempa \else
+ \edef\caption@tempa{#3}%
+ \expandafter\ifx\csname @#1captype\endcsname\caption@tempa \else
\ifcaptionsetup@star\else\@nameuse{caption@#1type@warning}\fi
\fi
- \expandafter\let\csname @#1captype\endcsname\@tempa
+ \expandafter\let\csname @#1captype\endcsname\caption@tempa
% \end{macrocode}
% \begin{macrocode}
\@nameuse{caption@#1typehook}%
@@ -4270,6 +4400,7 @@
% \changes{v3.1}{2007/07/03}{This macro and its usage added}
% \changes{v3.1b}{2007/09/22}{Contents changed to \texttt{??}}
% \changes{v3.1i}{2008/04/13}{Contents changed to \cs{caption@xref}(\ldots)}
+% \changes{v3.1k}{2009/03/30}{Bugfix 08-12-08: \cs{caption@xref} is robust now}
% This label will be used for |\currentlabel| inside (floating) environments
% as default. (see above)
% \iffalse\Note{All commands used have to be robust here.}\fi
@@ -4278,7 +4409,7 @@
\protect\caption@xref{\caption@labelname}{\on@line}}
% \end{macrocode}
% \begin{macrocode}
-\newcommand*\caption@xref[2]{%
+\DeclareRobustCommand*\caption@xref[2]{%
\caption@WarningNoLine{\noexpand\label before \string\caption#2}%
\@setref\relax\@undefined{#1}}
% \end{macrocode}
@@ -4417,8 +4548,8 @@
% \end{macrocode}
% \begin{macrocode}
\def\caption@Continued@Float#1{%
- \edef\@tempa{#1}%
- \ifx\@tempa\caption@CFtype
+ \edef\caption@tempa{#1}%
+ \ifx\caption@tempa\caption@CFtype
\stepcounter{ContinuedFloat}%
\let\caption@resetContinuedFloat\@gobble
\caption@@ContinuedFloat{#1}%
@@ -4656,20 +4787,121 @@
%
% \subsection{\cs{caption}, \cs{@caption}, and \cs{@makecaption}}
%
+% \begin{macro}{\caption@caption}
+% \changes{v3.0f}{2005/05/22}{Bugfix: \cs{ContinuedFloat} added}
+% \changes{v3.0f}{2005/06/13}{Support of \cs{caption*[]} removed}
+% \changes{v3.0l}{2007/01/19}{Minimal support of \textsf{combine} package added}
+% \changes{v3.1}{2007/02/04}{Re-written, does not save\&use original definition anymore}
+% Here comes our definition of |\caption| and |\caption*|.
+% Beside the support of the starred variant this code was adapted to the
+% various packages we support.
+% We are using |\caption@dblarg| instead of |\@dblarg| so |\caption{}|
+% (with an empty arg.) will produce a list-of entry, but |\caption[]{}|
+% won't.
+% \begin{macrocode}
+\def\caption@caption{%
+ \caption@iftype
+ {\caption@checkgrouplevel\@empty\caption
+ \caption@star
+ {\caption@refstepcounter\@captype}%
+ {\caption@dblarg{\@caption\@captype}}}%
+ {\caption@Error{\noexpand\caption outside float}}}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\caption@star}
+% \changes{v3.1}{2007/06/24}{Renamed from \cs{caption@caption} to \cs{caption@star}}
+% A helper macro which processes the optional |*| after |\caption|.
+% \Note{We set \cs{caption@startrue} globally so it works with the
+% \package{sidecap} package, too.}
+% \begin{macrocode}
+\newcommand*\caption@star[2]{%
+ \@ifstar{\global\caption@startrue#2[]}{#1#2}}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\caption@@caption}
+% \changes{v3.1}{2007/02/04}{Re-written, does not save\&use original definition anymore}
+% \changes{v3.1f}{2007/11/28}{Bugfix: Handling of \texttt{@minipage} flag added}
+% \changes{v3.1f}{2007/11/28}{Support of option \opt{@minipage} added}
+% \changes{v3.1g}{2008/03/16}{Internal: Uses \cs{caption@prepareanchor} now}
+% As above, our version has been adapted to the packages we support.
+% Additionally our code is nested by |\caption@beginex| \&
+% |\caption@end| instead of |\begingroup| \& |\endgroup|.
+% Furthermore we use |\caption@boxrestore| instead of |\@parboxrestore|
+% so this code also works correctly inside list-based environments
+% like |wide| \& |addmargin|. (This, and the fact that we use
+% |\linewidth| instead of |\hsize| inside |\@makecaption|, solves
+% \href{http://www.latex-project.org/cgi-bin/ltxbugs2html?pr=latex/2472}%^^A
+% {\LaTeX\ PR \texttt{latex/2472}}.)
+% \begin{macrocode}
+\long\def\caption@@caption#1[#2]#3{%
+% \end{macrocode}
+% \begin{macrocode}
+ \ifcaption@star \else
+ \caption@prepareanchor{#1}{#2}%
+ \fi
+% \end{macrocode}
+% \begin{macrocode}
+ \par
+ \caption@beginex{#1}{#2}{#3}%
+ \caption@setfloatcapt{%
+ \caption@boxrestore
+ \if@minipage
+ \@setminipage
+ \fi
+ \caption@normalsize
+ \ifcaption@star
+ \let\caption@makeanchor\@firstofone
+ \fi
+ \@makecaption{\csname fnum@#1\endcsname}%
+ {\ignorespaces\caption@makeanchor{#3}}\par
+ \caption@if@minipage\@minipagetrue\@minipagefalse}%
+ \caption@end}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\caption@prepareanchor}
+% \changes{v3.1g}{2008/03/16}{This macro added}
+% \begin{macrocode}
+\newcommand*\caption@prepareanchor[2]{%
+ \caption@makecurrent{#1}{#2}%
+ \caption@ifhypcap\caption@@start{}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\caption@makecaption}
+% \changes{v3.1i}{2008/05/06}{Usage of \cs{caption@rule} added}
+% |\@makecaption|\marg{label}\marg{text}\par
+% We do basically the same as the original code (from the standard
+% \LaTeX\ document classes), but take care of the |position=| setting
+% and use |\caption@@make| from the \package{caption} kernel to finally
+% typeset the caption.
+% \begin{macrocode}
+\long\def\caption@makecaption#1#2{%
+ \caption@iftop
+ {\vskip\belowcaptionskip}%
+ {\caption@rule\vskip\abovecaptionskip}%
+ \caption@@make{#1}{#2}%
+ \caption@iftop
+ {\vskip\abovecaptionskip\caption@rule}%
+ {\vskip\belowcaptionskip}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\caption@redefine}
+% \changes{v3.1k}{2009/03/30}{This macro added, it contains the patching code now}
% We only redefine |\caption| and |\@caption| if the current definitions
% are well known, so documents written in the old (\package{caption}
% package \version{1.x}) days (where |\caption| \& |\@caption| were not
% redefined by us) will still compile fine.
% For example the usage of the \package{captcont} package, which brings
% it's own definition of |\caption*|, was quite common these days.
-%
-% Some packages (like the \package{hyperref} package for example) redefines
-% |\caption| and |\@caption|, too.
-% So we have to use |\AtBeginDocument| here, so we can make sure
-% our definition is the one which will be valid at last.
% \begin{macrocode}
-\caption@AtBeginDocument{%
+\newcommand*\caption@redefine{}
+\g@addto@macro\caption@redefine{%
% \end{macrocode}
+%
% \begin{macrocode}
\caption@setbool{incompatible}{0}%
% \end{macrocode}
@@ -4939,8 +5171,8 @@
% \begin{macrocode}
\@ifundefined{caption@ifcompatibility}%
{\let\caption@ifcompatibility\caption@ifincompatible
- \let\@tempa\caption@WarningNoLine}%
- {\let\@tempa\@gobble}% suppress warning
+ \let\caption@tempa\caption@WarningNoLine}%
+ {\let\caption@tempa\@gobble}% suppress warning
% \end{macrocode}
%
% \begin{macrocode}
@@ -4948,12 +5180,16 @@
% \end{macrocode}
%
% \begin{macrocode}
- \@tempa{%
+ \caption@tempa{%
\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}%
% \end{macrocode}
%
+% \begin{macrocode}
+ \renewcommand*\caption@redefine{}%
+% \end{macrocode}
+%
% |\ContinuedFloat| is not supported in compatibility mode.
% \begin{macrocode}
\renewcommand*\caption@ContinuedFloat[1]{%
@@ -4976,9 +5212,9 @@
% \end{macrocode}
%
% \begin{macro}{\caption@star}
-% We define |\caption@star| here, too, so it's defined but does not make any harm.
+% We redefine |\caption@star| here so it does not make any harm.
% \begin{macrocode}
- \newcommand*\caption@star[2]{#1#2}%
+ \renewcommand*\caption@star[2]{#1#2}%
% \end{macrocode}
% \end{macro}
%
@@ -4996,85 +5232,14 @@
% \end{macrocode}
%
% \begin{macro}{\caption}
-% \changes{v3.0f}{2005/05/22}{Bugfix: \cs{ContinuedFloat} added}
-% \changes{v3.0f}{2005/06/13}{Support of \cs{caption*[]} removed}
-% \changes{v3.0l}{2007/01/19}{Minimal support of \textsf{combine} package added}
-% \changes{v3.1}{2007/02/04}{Re-written, does not save\&use original definition anymore}
-% Here comes our definition of |\caption| and |\caption*|.
-% Beside the support of the starred variant this code was adapted to the
-% various packages we support.
-% We are using |\caption@dblarg| instead of |\@dblarg| so |\caption{}|
-% (with an empty arg.) will produce a list-of entry, but |\caption[]{}|
-% won't.
-% \begin{macrocode}
- \def\caption{%
- \caption@iftype
- {\caption@checkgrouplevel\@empty\caption
- \caption@star
- {\caption@refstepcounter\@captype}%
- {\caption@dblarg{\@caption\@captype}}}%
- {\caption@Error{\noexpand\caption outside float}}}%
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\caption@star}
-% \changes{v3.1}{2007/06/24}{Renamed from \cs{caption@caption} to \cs{caption@star}}
-% A helper macro which processes the optional |*| after |\caption|.
-% \Note{We set \cs{caption@startrue} globally so it works with the
-% \package{sidecap} package, too.}
-% \begin{macrocode}
- \newcommand*\caption@star[2]{%
- \@ifstar{\global\caption@startrue#2[]}{#1#2}}%
-% \end{macrocode}
-% \end{macro}
-%
% \begin{macro}{\@caption}
-% \changes{v3.1}{2007/02/04}{Re-written, does not save\&use original definition anymore}
-% \changes{v3.1f}{2007/11/28}{Bugfix: Handling of \texttt{@minipage} flag added}
-% \changes{v3.1f}{2007/11/28}{Support of option \opt{@minipage} added}
-% \changes{v3.1g}{2008/03/16}{Internal: Uses \cs{caption@prepareanchor} now}
-% As above, our version has been adapted to the packages we support.
-% Additionally our code is nested by |\caption@beginex| \&
-% |\caption@end| instead of |\begingroup| \& |\endgroup|.
-% Furthermore we use |\caption@boxrestore| instead of |\@parboxrestore|
-% so this code also works correctly inside list-based environments
-% like |wide| \& |addmargin|. (This, and the fact that we use
-% |\linewidth| instead of |\hsize| inside |\@makecaption|, solves
-% \href{http://www.latex-project.org/cgi-bin/ltxbugs2html?pr=latex/2472}%^^A
-% {\LaTeX\ PR \texttt{latex/2472}}.)
-% \begin{macrocode}
- \long\def\@caption#1[#2]#3{%
-% \end{macrocode}
% \begin{macrocode}
- \ifcaption@star \else
- \caption@prepareanchor{#1}{#2}%
- \fi
-% \end{macrocode}
-% \begin{macrocode}
- \par
- \caption@beginex{#1}{#2}{#3}%
- \caption@setfloatcapt{%
- \caption@boxrestore
- \if@minipage
- \@setminipage
- \fi
- \caption@normalsize
- \ifcaption@star
- \let\caption@makeanchor\@firstofone
- \fi
- \@makecaption{\csname fnum@#1\endcsname}%
- {\ignorespaces\caption@makeanchor{#3}}\par
- \caption@if@minipage\@minipagetrue\@minipagefalse}%
- \caption@end}%
+ \renewcommand*\caption@redefine{%
+ \let\caption\caption@caption
+ \let\@caption\caption@@caption}%
+ \caption@redefine
% \end{macrocode}
% \end{macro}
-% \begin{macro}{\caption@prepareanchor}
-% \changes{v3.1g}{2008/03/16}{This macro added}
-% \begin{macrocode}
- \newcommand*\caption@prepareanchor[2]{%
- \caption@makecurrent{#1}{#2}%
- \caption@ifhypcap\caption@@start{}}
-% \end{macrocode}
% \end{macro}
%
% \begin{macrocode}
@@ -5103,23 +5268,19 @@
% \begin{macrocode}
}
% \end{macrocode}
+% \end{macro}
+%
+% Some packages (like the \package{hyperref} package for example) redefines
+% |\caption| and |\@caption|, too.
+% So we have to use |\AtBeginDocument| here, so we can make sure
+% our definition is the one which will be valid at last.
+% \begin{macrocode}
+\caption@AtBeginDocument{\caption@redefine}
+% \end{macrocode}
%
% \begin{macro}{\@makecaption}
-% \changes{v3.1i}{2008/05/06}{Usage of \cs{caption@rule} added}
-% |\@makecaption|\marg{label}\marg{text}\par
-% We do basically the same as the original code (from the standard
-% \LaTeX\ document classes), but take care of the |position=| setting
-% and use |\caption@@make| from the \package{caption} kernel to finally
-% typeset the caption.
% \begin{macrocode}
-\long\def\@makecaption#1#2{%
- \caption@iftop
- {\vskip\belowcaptionskip}%
- {\caption@rule\vskip\abovecaptionskip}%
- \caption@@make{#1}{#2}%
- \caption@iftop
- {\vskip\abovecaptionskip\caption@rule}%
- {\vskip\belowcaptionskip}}
+\let\@makecaption\caption@makecaption
% \end{macrocode}
% \end{macro}
%
@@ -5153,6 +5314,7 @@
%
% \begin{macro}{\caption@subtypehook}
% \changes{v3.1g}{2008/03/20}{Redefinition of \cs{caption@setlist} added}
+% \changes{v3.1k}{2009/10/09}{Bugfix 09-08-12b: \cs{@makecaption} will now be restored here, too}
% Hook, will be used inside \cs{caption@setsubtype}.
% \begin{macrocode}
\newcommand*\caption@subtypehook{%
@@ -5187,6 +5349,7 @@
% \end{macrocode}
% \begin{macrocode}
\let\caption\caption@subcaption
+ \let\@makecaption\caption@makecaption
\fi}%
% \end{macrocode}
% \end{macro}
@@ -5370,9 +5533,9 @@
% Otherwise we must add our stuff to |\GOfrench|.
% \begin{macrocode}
\@ifundefined{GOfrench}%
- {\let\@tempa\@firstofone}%
- {\def\@tempa{\g@addto@macro\GOfrench}}%
- \@tempa{%
+ {\let\caption@tempa\@firstofone}%
+ {\def\caption@tempa{\g@addto@macro\GOfrench}}%
+ \caption@tempa{%
% \end{macrocode}
%
% \begin{macrocode}
@@ -5412,16 +5575,16 @@
% this additional code here.
% \begin{macrocode}
\let\@eatDP\@undefined
- \let\@tempa\@empty
+ \let\caption@tempa\@empty
\ifx\f@ffrench\fnum@figure
- \l@addto@macro\@tempa{\let\fnum@figure\f@ffrench}%
+ \l@addto@macro\caption@tempa{\let\fnum@figure\f@ffrench}%
\fi
\ifx\f@tfrench\fnum@table
- \l@addto@macro\@tempa{\let\fnum@table\f@tfrench}%
+ \l@addto@macro\caption@tempa{\let\fnum@table\f@tfrench}%
\fi
\def\f@ffrench{\ifx\listoffigures\relax\else\figurename~\thefigure\fi}%
\def\f@tfrench{\ifx\listoftables\relax\else\tablename~\thetable\fi}%
- \@tempa
+ \caption@tempa
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -5642,6 +5805,8 @@
% \fi
%
% \begin{macro}{\@float@setevery}
+% \changes{v3.1k}{2009/10/09}{Bugfix 08-12-05: \cs{color@begin/endgroup} added
+% to redefinition of \cs{caption@setfloatcapt}}
% |\@float@setevery|\marg{float type} is provided by the \package{float}
% package; it's called every time a floating environment defined with
% |\newfloat| or |\restylefloat| begins.
@@ -5673,9 +5838,10 @@
% |\@caption|) so the caption will be set inside the box |\@floatcapt|,
% without extra vertical space.
% \begin{macrocode}
- \renewcommand\caption@setfloatcapt{%
+ \renewcommand\caption@setfloatcapt[1]{%
\let\@makecaption\caption@@make
- \global\setbox\@floatcapt\vbox}%
+ \global\setbox\@floatcapt\vbox{%
+ \color@begingroup ##1\color@endgroup}}%
% \end{macrocode}
%
% To allow different caption styles for different float styles we also
@@ -5955,6 +6121,7 @@
%
% \begin{macro}{\FP@floatBegin}
% \changes{v3.1f}{2007/11/16}{Uses `space hack' instead of \cs{ignorespaces} now}
+% \changes{v3.1k}{2009/10/09}{Bugfix 09-09-11: Missing \cs{ignorespaces} added}
% Original code:
% \begin{verbatim}
% \newcommand{\FP@floatBegin}[1]{%
@@ -5981,7 +6148,8 @@
\caption@ifFPrefcap
{\caption@freeze\relax}%
{\def\label##1{\@bsphack\gdef\FP@LabelText{##1}\@esphack}%
- \caption@freeze*}}%
+ \caption@freeze*}%
+ \ignorespaces}%
% \end{macrocode}
% \end{macro}
%
@@ -6071,8 +6239,10 @@
% \end{macro}
%
% \changes{v3.1a}{2007/09/07}{\cs{DeclareFloatingEnvironment} defines FP-variant, too}
+% \changes{v3.1k}{2009/09/28}{Bugfix regarding newly defined \package{fltpage} environments}
% \begin{macrocode}
\caption@For{typelist}{%
+ \newcounter{FP@#1C}%
\newenvironment{FP#1}{\FP@floatBegin{#1}}{\FP@floatEnd}}%
% \end{macrocode}
%
@@ -6154,11 +6324,12 @@
% \cs{caption@currentHref} renamed to \cs{hc@currentHref}}
% \changes{v3.1}{2007/06/21}{%
% This macro renamed from \cs{capstart} to \cs{caption@start} and revised}
-% While the \package{hypcap} package defines a macro called |\capstrart|
+% While the \package{hypcap} package defines a macro called |\capstart|
% our variant is called |\caption@start| and is controlled by the option
% |hypcap=||false|/|true|.
% \begin{macrocode}
- \def\caption@start{\caption@ifhypcap{%
+ \def\caption@start{\caption@ifhypcap\caption@start@\relax}%
+ \def\caption@start@{%
% \end{macrocode}
% Generate the \package{hyperref} label and set the \package{hyperref} anchor,
% usually (if |hypcap=false|) both is done inside |\@caption|.
@@ -6182,7 +6353,7 @@
\let\caption@makeanchor\@firstofone
% \end{macrocode}
% \begin{macrocode}
- }{}}%
+ }%
% \end{macrocode}
% \end{macro}
%
@@ -6367,14 +6538,17 @@
% to the \package{hypcap} package instead.
%
% \begin{macro}{\capstart}
-% We do this simply by mapping |\capstart| to |\caption@start|,
+% \changes{v3.1k}{2009/10/09}{Support of \cs{ifcapstart} (\package{hypcap} package \version{1.10}) added}
+% We do this simply by mapping |\capstart| to |\caption@start@|,
% although our code does not behave exactly like the original one:
% The original |\capstart| has an effect on the next |\caption|
% only but our version affects \emph{all} |\caption|s in the same
% environment, at least unless a new |\capstart| will be placed.
% \begin{macrocode}
\let\caption@ORI@capstart\capstart % save for compatibility mode
- \let\capstart\caption@start
+ \@ifundefined{capstarttrue}% check for v1.10 of hypcap package
+ {\def\capstart{\caption@start@}}%
+ {\def\capstart{\ifcapstart\caption@start@\fi}}%
\let\caption@start\relax
\let\caption@@start\relax
% \end{macrocode}
@@ -6384,7 +6558,7 @@
% Furthermore we map our |\caption@hypcapspace| to |\hypcapspace|
% offered by the \package{hypcap} package.
% \begin{macrocode}
- \caption@set@bool\caption@ifhypcap1%
+ \caption@set@bool\caption@ifhypcap 1%
\renewcommand*\caption@hypcapspace{\hypcapspace}%
% \end{macrocode}
% \end{macro}
@@ -6402,6 +6576,7 @@
%
% \begin{macro}{\lst@MakeCaption}
% \changes{v3.1g}{2008/01/20}{Bugfix: Skips are handled correctly now}
+% \changes{v3.1k}{2008/03/29}{Bugfix 08-10-16-dctt: \texttt{rule=0} added}
% To support the \package{listings} package we need to redefine
% |\lst@MakeCaption| so the original stuff is nested with
% |\caption@begin| and |\caption@end| etc.
@@ -6424,6 +6599,10 @@
\belowcaptionskip\abovecaptionskip
\abovecaptionskip\@tempdima}{}%
% \end{macrocode}
+% Workaround for issue with wrong skips (should be examined further)
+% \begin{macrocode}
+ \caption@setup{rule=0}%
+% \end{macrocode}
% Afterwards we set the local `lstlisting' options.
% \begin{macrocode}
\caption@setoptions{lstlisting}%
@@ -6455,6 +6634,7 @@
% \end{macro}
%
% \begin{macro}{\ext@lstlisting}
+% \changes{v3.1}{2007/03/03}{This macro added}
% Since the \package{listings} package do not define |\ext@lstlisting|,
% but we needed it when |\captionof{lstlisting}| will be done by the end user,
% we define it here.
diff --git a/Master/texmf-dist/source/latex/caption/caption.ins b/Master/texmf-dist/source/latex/caption/caption.ins
index a28bedba27c..166acf7d088 100644
--- a/Master/texmf-dist/source/latex/caption/caption.ins
+++ b/Master/texmf-dist/source/latex/caption/caption.ins
@@ -6,7 +6,7 @@
\preamble
-Copyright (C) 1994-2008 Axel Sommerfeldt (caption@sommerfee.de)
+Copyright (C) 1994-2009 Axel Sommerfeldt (caption@sommerfee.de)
--------------------------------------------------------------------------
diff --git a/Master/texmf-dist/source/latex/caption/ltcaption.dtx b/Master/texmf-dist/source/latex/caption/ltcaption.dtx
index 8963d46dfcb..7fd8663a8b8 100644
--- a/Master/texmf-dist/source/latex/caption/ltcaption.dtx
+++ b/Master/texmf-dist/source/latex/caption/ltcaption.dtx
@@ -2,7 +2,7 @@
%
% This is file `ltcaption.dtx'.
%
-% Copyright (C) 2007-2008 Axel Sommerfeldt (caption@sommerfee.de)
+% Copyright (C) 2007-2009 Axel Sommerfeldt (caption@sommerfee.de)
%
% --------------------------------------------------------------------------
%
@@ -30,7 +30,7 @@
%<*driver>
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
\ProvidesFile{ltcaption.drv}%
- [2008/03/28 v1.2 This package fixes caption problems with
+ [2009/03/30 v1.2 This package fixes caption problems with
other-than-centered aligned longtables]
\hbadness=9999 \newcount\hbadness \hfuzz=48pt % Make TeX shut up.
%
@@ -116,7 +116,9 @@
%
% \DescribeMacro{\LTcapskip}
% This length is controlling the skip between the caption and the contents
-% below the caption and can be altered with |\setlength\LTcapskip{|\ldots|}|.
+% below the caption (which is usually the longtable contents if you place
+% the caption above the longtable), and it can be altered with
+% |\setlength\LTcapskip{|\ldots|}|.
% When \thispackage\ is loaded it will be set to |\abovecaptionskip| which
% usually represents the skip between caption and contents in floating
% environments.