summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/caption
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2007-02-21 23:53:27 +0000
committerKarl Berry <karl@freefriends.org>2007-02-21 23:53:27 +0000
commitd13b89bc23ac3bf2bce2bd534b97ed97e0b091c1 (patch)
treefde2418c28764709391c818906401e93fdf9014f /Master/texmf-dist/source/latex/caption
parentc454d8e2cafa481c5856580b78c273b5445114a9 (diff)
caption 3.0l (21feb07)
git-svn-id: svn://tug.org/texlive/trunk@3976 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/caption')
-rw-r--r--Master/texmf-dist/source/latex/caption/caption.dtx735
-rw-r--r--Master/texmf-dist/source/latex/caption/caption.ins4
2 files changed, 427 insertions, 312 deletions
diff --git a/Master/texmf-dist/source/latex/caption/caption.dtx b/Master/texmf-dist/source/latex/caption/caption.dtx
index a8a4f4cbc6e..830ee5ea1b7 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-2006 Axel Sommerfeldt (caption@sommerfee.de)
+% Copyright (C) 1994-2007 Axel Sommerfeldt (caption@sommerfee.de)
%
% --------------------------------------------------------------------------
%
@@ -23,7 +23,7 @@
% caption.sty, caption2.sty, caption3.sty, and manual.tex.
%
% \fi
-% \CheckSum{1987}
+% \CheckSum{2055}
%
% \iffalse
%<*driver>
@@ -115,14 +115,14 @@
% \thispackage\ package\thanks{This package has version number
% \fileversion, last revised \filedate.}}
% \author{Axel Sommerfeldt\\\href{mailto:caption@sommerfee.de}{\texttt{caption@sommerfee.de}}}
-% \date{2006/06/12}
+% \date{2007/02/20}
% \maketitle
%
% \begin{abstract}
-% The \thispackage\ package provides many ways to customise the captions
+% The \thispackage\ package offers customization of captions
% in floating environments such |figure| and |table| and cooperates with
% many other packages.\footnote{A complete re-work of the user interface
-% done together with Steven D. Cochran and Frank Mittelbach has lead to
+% done with Steven D. Cochran and Frank Mittelbach has lead to
% this new enhanced version 3.0.}
% \end{abstract}
%
@@ -146,14 +146,14 @@
%
% \example{belowskip=\abovecaptionskip}{\figuretext}
%
-% There should be possibilities to change this; e.g., it would be nice if you
-% can make the text of the caption a little bit smaller as the normal text,
-% add an extra margin, typeset the caption label with the same font family and
-% shape as your headings etc. Just like this one:
+% There should be possibilities to change this; for example, it would be nice
+% if you could make the text of the caption a little bit smaller as the normal
+% text, add an extra margin, typeset the caption label with the same font
+% family and shape as your headings etc. Just like this one:
%
% \example{belowskip=\abovecaptionskip,size=small,margin=10pt,labelfont=bf,labelsep=endash}{\figuretext}
%
-% With this package you can do this easily as there are many ready-to-use
+% You can do this easily with this package as there are many ready-to-use
% caption formatting options, but you are free to define your very own stuff, too.
%
% \iffalse
@@ -286,7 +286,7 @@
% |indention=|\meta{amount}.
% \end{quote}
%
-% Three examples:
+% Two examples:
%
% \begin{Example}
% \begin{quote}
@@ -313,7 +313,7 @@
% \end{quote}
% \NEWdescription{v3.0e}
% you specify how the caption label will be typeset.
-% There are three standard caption label formats:
+% There are four standard caption label formats:
%
% \begin{Options}{\OptionLabel}
% \item[default]
@@ -322,8 +322,8 @@
% (This is the default behaviour.)
%
% \item[empty]
-% The caption label will be empty. This option makes sense when used
-% together with other options like \texttt{labelsep=none}.
+% The caption label will be empty. (This option makes sense when used
+% together with other options like \texttt{labelsep=none}.)
%
% \item[simple]
% The caption label will be typeset as a name and a number.
@@ -341,12 +341,12 @@
% \begin{quote}
% |labelformat=parens,labelsep=quad|
% \end{quote}
-% yields captions like this one:
+% gives captions like this one:
% \example{labelformat=parens,labelsep=quad}{\figuretext}
% \end{Example}
%
% \DescribeMacro{labelsep=}
-% With the options
+% With the option
% \begin{quote}
% |labelsep=|\meta{label separator name}
% \end{quote}
@@ -355,8 +355,8 @@
%
% \begin{Options}{\OptionLabel}
% \item[none]
-% There is no caption separator. This option makes sense when used
-% together with other options like \texttt{labelformat=empty}.
+% There is no caption separator. (This option makes sense when used
+% together with other options like \texttt{labelformat=empty}.)
%
% \item[colon]
% The caption label and text will be separated by a colon and a space.
@@ -456,8 +456,8 @@
% \item[RaggedRight]
% Each line of the caption will be moved to the left margin, too.
% But this time the command |\RaggedRight| of the \package{ragged2e} package
-% will be used to achieve this. This difference is that this time the word
-% breaking algorithm of \TeX\ will work inside the caption.
+% will be used to achieve this. The main difference is that the word
+% breaking algorithm of \TeX\ will work inside captions.
%
% \item[raggedleft]
% Each line of the caption will be moved to the right margin.
@@ -473,7 +473,7 @@
% \SeeUserDefined
% \end{Options}
%
-% Two examples:
+% Three examples:
% \begin{Example}
% \begin{quote}
% |justification=centerlast|
@@ -512,8 +512,8 @@
% \begin{quote}
% |singlelinecheck=|\meta{bool}\quad.
% \end{quote}
-% Using |false|, |no|, |off| or |0| for \meta{bool} you switch off the
-% extra centering:
+% Using |false|, |no|, |off| or |0| for \meta{bool} switches the
+% extra centering off:
% \begin{quote}
% |singlelinecheck=false|
% \end{quote}
@@ -525,8 +525,8 @@
% \endgroup
% \example{belowskip=\abovecaptionskip,singlelinecheck=false}{A short caption.}
%
-% Using |true|, |yes|, |on| or |1| for \meta{bool} you switch on the
-% extra centering again. (The default is on.)
+% You switch the extra centering on again by using |true|, |yes|, |on| or |1|
+% for \meta{bool}. (The default is on.)
%
% \iffalse
% --------------------------------------------------------------------------- %
@@ -540,12 +540,12 @@
% \DescribeMacro{textfont=}
% There are three font options which affects different parts of the caption:
% One affecting the whole caption (|font|), one which only affects the caption
-% label and separator (|labelfont|) and at last one which only affects the
-% caption text (|testfont|).
+% label and separator (|labelfont|) and at least one which only affects the
+% caption text (|textfont|).
% You set them up using the options
% \begin{quote}\begin{tabular}{@{}r@{}ll}
% |font=| & \marg{font options} & ,\\
-% |labelfont=| & \marg{font options} & and\\
+% |labelfont=| & \marg{font options} & , and\\
% |textfont=| & \marg{font options} & .\\
% \end{tabular}\end{quote}
%
@@ -593,7 +593,7 @@
% \iffalse
% \end{quote}
% \fi
-% yield the same result.
+% will give the same result.
%
% Two examples:
% \begin{Example}
@@ -622,7 +622,7 @@
% \DescribeMacro{margin=}
% \DescribeMacro{width=}
% For all captions you can specify \emph{either} an extra margin \emph{or}
-% a fixed width. You do this using the options
+% a fixed width. You do this by using the options
% \begin{quote}\begin{tabular}{@{}r@{}ll}
% |margin=| & \meta{amount} & \emph{or}\\
% |width=| & \meta{amount} & \\
@@ -630,7 +630,7 @@
% Nevertheless what option you use, the left and right margin will be the
% same.
%
-% Two examples illustrating this:
+% Two examples will illustrating this:
% \begin{Example}
% \begin{quote}
% |margin=10pt|
@@ -649,7 +649,7 @@
%
% \DescribeMacro{parskip=}
% This option is useful for captions containing more than one paragraph.
-% If specifies the extra vertical space inserted between them:
+% It specifies the extra vertical space inserted between them:
% \begin{quote}
% |parskip=|\meta{amount}
% \end{quote}
@@ -825,21 +825,24 @@
% |\abovecaptionskip| will be used between the caption and the figure or
% table itself.)
%
-% \DescribeMacro{tableposition=}
% This option is especially useful when used together with the optional
% argument of the |\captionsetup| command.
% \See{\Section{misc}{Useful stuff} for details}\par
-% E.g.,
+% For example
% \begin{quote}
% |\captionsetup[table]{position=top}|
% \end{quote}
% causes all captions within tables to be treated as captions \emph{above}
% the table (regarding spacing around it).
+% \DescribeMacro{tableposition=}
% \NEWfeature{v3.0a}
% Because this is a very common setting the \thispackage\ package offers
% an abbreviating option for the use with |\usepackage|:
% \begin{quote}
-% |\usepackage[|\ldots|,tableposition=top]{caption}|
+% |\usepackage[|\ldots|,tableposition=top]{caption}|\footnote{Please
+% note that this is \emph{not} sufficient when using a
+% \KOMAScript\ document class, you need to use the \emph{global}
+% option |tablecaptionabove|, too.}
% \end{quote}
% is equivalent to
% \begin{quote}
@@ -863,9 +866,9 @@
% \end{quote}
% \nopagebreak[3]
% typesets the caption inside a floating environment like |figure| or |table|.
-% Well, you already know this, but what is new is the fact then when you leave
-% the argument \meta{lst\_entry} empty, no entry in the list of figures or
-% tables will be made; e.g.,
+% Well, you already know this, but the \thispackage\ package offers an extension:
+% If you leave the argument \meta{lst\_entry} empty, no entry in the list of
+% figures or tables will be made. For example:
% \begin{quote}
% |\caption[]{A figure without entry in the list of figures.}|
% \end{quote}
@@ -888,8 +891,8 @@
% C & D \\
% \end{longtable}
%
-% This package does it, too, so you can use this command now within every
-% floating environment like |figure| or |table|, like here:
+% This package offers this feature, too, so you can use this command now within
+% every floating environment like |figure| or |table|, like:
% \begin{quote}
% |\begin{table}|\\
% | \caption*{A table}|\\
@@ -939,9 +942,9 @@
% |\ContinuedFloat|
% \end{quote}
% is for; it should be used as first command inside the floating environment.
-% It prevents the increment of the relevant counter so a figure or table
-% with a |\ContinuedFloat| in it gets the same reference number as the figure
-% or table before.
+% It prevents the increment of the relevant counter (usually done by |\caption|)
+% so a figure or table with a |\ContinuedFloat| in it gets the same reference
+% number as the figure or table before.
%
% An example:
% \begin{quote}
@@ -968,7 +971,7 @@
% \DescribeMacro{\captionsetup}
% We already know the |\captionsetup| command (see \Section{usage}
% {Using the package}), but this time we get enlighten about
-% the optional argument \meta{float type}.
+% its optional argument \meta{float type}.
%
% Remember, the syntax of this command is
% \begin{quote}
@@ -1006,7 +1009,7 @@
% If you want to get rid of these parameters marked for an automatic use within
% a particular environment you can use the command
% \begin{quote}
-% |\clearcaptionsetup|\marg{Typ}\quad.
+% |\clearcaptionsetup|\marg{float type}\quad.
% \end{quote}
%
% For example |\clearcaptionsetup{figure}| would clear the extra handling in the
@@ -1018,11 +1021,11 @@
% \captionof{table}[]{A table}
% \end{Example}
%
-% As \meta{float type} you can usually give one of these only two:
-% |figure| and |table|.
-% But as we will see later that some \LaTeX\ packages exist (like the
+% As \meta{float type} you can usually give one of these two only:
+% |figure| or |table|.
+% But as we will see later some \LaTeX\ packages (like the
% \package{float}, \package{longtable}, and \package{sidecap} package
-% for example) who can define additional floating enviroments and these two
+% for example) offer additional floating environments and these two
% commands can also be used with them.
%
% \iffalse
@@ -1046,8 +1049,8 @@
% |\DeclareCaptionFormat|\marg{name}\marg{code using \#1, \#2 and \#3}\quad.
% \end{quote}
% At usage the system replaces \#1 with the caption label, \#2 with the
-% separator and \#3 with the text. So the standard format |plain| is defined
-% inside |caption.sty| as
+% separator and \#3 with the text. So the standard format |plain| is
+% pre-defined by the \thispackage\ package as
% \begin{quote}
% |\DeclareCaptionFormat{plain}{#1#2#3\par}|
% \end{quote}
@@ -1062,18 +1065,18 @@
%
% \DescribeMacro{\bothIfFirst}
% \DescribeMacro{\bothIfSecond}
-% When you define your own caption label formats and use the \package{subfig}
-% package\cite{subfig}, too, you must take care of empty caption label names.
+% If you define your own caption label formats and use the \package{subfig}
+% package\cite{subfig}, you should take care of empty caption label names.
% For this purpose the commands
% \begin{quote}
% |\bothIfFirst|\marg{first arg}\marg{second arg}\quad and\\
% |\bothIfSecond|\marg{first arg}\marg{second arg}
% \end{quote}
% are offered. |\bothIfFirst| tests if the first argument exists (means: is
-% not empty), |\bothIfSecond| tests if the second argument exists. If it is
-% so both arguments get typeset, otherwise none of them.
+% not empty), |\bothIfSecond| tests if the second argument exists. If yes,
+% both arguments get typeset, otherwise none of them.
%
-% For example the standard label format |simple| isn't defined as
+% For example the standard label format |simple| is \emph{not} defined as
% \begin{quote}
% |\DeclareCaptionLabelFormat{simple}{#1 #2}|\quad,
% \end{quote}
@@ -1092,7 +1095,7 @@
% |\DeclareCaptionLabelSeparator|\marg{name}\marg{code}\quad.
% \end{quote}
% \nopagebreak[3]
-% Again an easy example taken from |caption.sty| itself:
+% Again an easy example taken from the \thispackage\ package itself:
% \nopagebreak[3]
% \begin{quote}
% |\DeclareCaptionLabelSeparator{colon}{: }|
@@ -1109,7 +1112,7 @@
% \begin{quote}
% |\DeclareCaptionJustification{raggedright}{\raggedright}|\quad,
% \end{quote}
-% yields captions with all lines moved to the left margin.
+% lets captions with all lines moved to the left margin.
%
% \DescribeMacro{\DeclareCaptionFont}
% You can define your own caption fonts with
@@ -1144,7 +1147,7 @@
% \example{labelfont=blue,textfont=green,singlelinecheck=off}\figuretext
%
% \DescribeMacro{\DeclareCaptionStyle}
-% The best one comes at last: You can define your own caption styles with
+% You can define your own caption styles with
% \begin{quote}
% |\DeclareCaptionStyle|\marg{name}\oarg{additional options}\marg{options}
% \end{quote}
@@ -1160,16 +1163,17 @@
% the caption fits into a single line and this check was not disabled with
% the option |singlelinecheck=off|.
%
-% Again a very easy example taken from |caption.sty|:
+% Again a very easy example taken from the core of this package: The
+% caption style |default| is pre-defined as
% \begin{quote}
-% |\DeclareCaptionStyle{default}[justification=centering]{}|
+% |\DeclareCaptionStyle{default}[justification=centering]{}|\quad.
% \end{quote}
%
% \iffalse
% --------------------------------------------------------------------------- %
% \fi
%
-% \subsection{Examples}
+% \subsection{Further Examples}
%
% If you would like to have a colon \emph{and} a line break as caption
% separator you could define it this way:
@@ -1205,12 +1209,12 @@
% \ContinuedFloat
% \caption[]{A figure.}
% \end{Example}
-% If you would like to keep the centering of these captions an appropriate
-% definition is
+% If you would like to keep the centering of these captions instead, an
+% appropriate definition would be something like
% \begin{quote}
% |\DeclareCaptionStyle{period-newline}%|\\
% | [labelsep=period,justification=centering]%|\\
-% | {labelsep=period-newline}|
+% | {labelsep=period-newline}|\quad.
% \end{quote}
% Using this definition short captions look like
% \begin{Example}
@@ -1221,7 +1225,8 @@
% \end{Example}
% while long ones still have a line break after the caption label.
%
-% Slightly changed, you also get centered captions if they are longer than one line:
+% Slightly changed, you also get centered captions if they are longer than
+% one line:
% \begin{quote}
% |\DeclareCaptionStyle{period-newline}%|\\
% | [labelsep=period]%|\\
@@ -1282,16 +1287,15 @@
% \KOMAScript\ classes or with the \package{memoir} class, you have to take
% into consideration that all the possibilities for customization of the
% captions the \KOMAScript\ classes or \package{memoir} class have
-% to offer will get lost. (And they have a lot of possibilites to offer!)
-% So class options like |tablecaptionabove| and commands like |\captionabove|,
-% |\captionbelow|, |\captionformat|, |\figureformat|, |\tableformat|,
+% to offer will get lost. (And they have a lot of possibilities to offer!)
+% So class commands like |\captionformat|, |\figureformat|, |\tableformat|,
% |\setcapindent|, |\setcaphanging|, |\captionstyle| etc.\ will not work
% anymore. So make a wise decision!
%
% Using the \thispackage\ package together with document classes not mentioned
% so far is not recommended at the moment -- unwanted layout changes,
% side effects or failures could occur. (But future versions of the
-% \thispackage\ package will contain adaptations for more document classes!
+% \thispackage\ package will contain adaptations for more document classes!)
%
% \iffalse
% --------------------------------------------------------------------------- %
@@ -1300,15 +1304,13 @@
% \section{Using other packages}
% \label{packages}
%
-% The \thispackage\ package contains special adaptations to other packages who
-% handle with captions, too, so the captions always should look like you
-% have specified them to look like.
+% The \thispackage\ package contains special adaptations to other packages,
+% so the captions should always look like you have specified them to look like.
%
% These are the packages the \thispackage\ package is adapted to:
%
% \begin{tabular}{ll}
% |float| & Gives you the possibility to define new floating environments\\
-% |hypcap| & Adjusting \package{hyperref} anchors of captions\\
% |listings| & Typesets source code listings\\
% |longtable| & Typesets tables spanned over multiple pages\\
% |rotating| & Supports rotated figures and tables\\
@@ -1319,13 +1321,13 @@
% \NEWfeature{v3.0b}
% If you use one of the above packages together with the {\thispackage} package
% you get the additional possibility to set up captions with
-% \begin{quote}|\captionsetup|\oarg{environment}\marg{options}\quad.\end{quote}
-% These options will apply for captions inside these environments automatically.
+% \begin{quote}|\captionsetup|\oarg{environment}\marg{options}\quad,\end{quote}
+% where \meta{environment} stands for any environment the above packages offer.
+% (Please note that this do not work with the |sideways| environments offered by
+% the \package{rotating} package.)
% For example
% \begin{quote}|\captionsetup[lstlisting]{labelfont=bf}|\end{quote}
% forces captions inside the |lstlisting| environment to have bold labels.
-% (Please note that this do not work with the |sideways| environments offered by
-% the \package{rotating} package.)
%
% If a certain support is not desired you can switch it off using the
% \thispackage\ package option
@@ -1337,8 +1339,8 @@
% (Note: You can specify these options only within the |\usepackage| command,
% especially \emph{not} at a later time with |\captionsetup|.)
%
-% For further information about the supported packages please take a look
-% at the documentation belonging to it or buy yourself
+% For further information about the packages mentioned above please take a look
+% at the documentation belonging to them or buy yourself
% The \LaTeX\ Companion\cite{companion}.
%
% \iffalse
@@ -1361,7 +1363,7 @@
% to one of the existing environments |figure| and |table|.
%
% If you are using the \thispackage\ package together with the \package{float}
-% package this caption style called |ruled| gets defined automatically:
+% package a caption style called |ruled| gets defined automatically:
% \begin{quote}
% |\DeclareCaptionStyle{ruled}{labelfont=bf,labelsep=space}|
% \end{quote}
@@ -1421,7 +1423,7 @@
% \end{quote}
%
% This mechanism also works with all other float styles. If you want a special
-% caption layout for |plain| or |boxed| floats for example you can simply define
+% caption layout---for |plain| or |boxed| floats for example---you can simply define
% a suitable caption style with the same name as the float style.
%
% \textbf{Note:} For successful cooperation you need the float package
@@ -1587,7 +1589,7 @@
% and commands provided by the version $1.x$ of this package. So there
% shouldn't occur any problems compiling old documents, but please don't mix
% old options and commands with the new ones. This isn't supported and can
-% yield to ugly side effects.
+% cause ugly side effects.
%
% Here comes a short oversight of the obsolete options and commands and how
% they have been replaced within this version of the \thispackage\ package:
@@ -1627,10 +1629,10 @@
% who could be redefined with |\renewcommand| and allowed an alternate and
% more flexible way to change the font used for captions.
% This mechanism was replaced by the commands
-% \begin{minipage}\linewidth\begin{quote}
+% \begin{quote}
% |\DeclareCaptionFont{|\ldots|}{|\ldots|}|\qquad and\\
% |\captionsetup{font=|\ldots|,labelfont=|\ldots|}|\qquad.
-% \end{quote}\SeeUserDefined\strut\end{minipage}
+% \end{quote}\SeeUserDefined
%
% Setting the margin for captions was done in \version{1.x} with
% \begin{quote}
@@ -1648,7 +1650,7 @@
% |\renewcommand\captionfont{\small\sffamily}|\\
% |\setlength\captionmargin{10pt}|
% \end{quote}
-% should now be written as
+% will still work fine, but should be written today as
% \begin{quote}
% |\usepackage[format=hang,labelfont=bf,font={small,sf},|\\
% | margin=10pt]{caption}|
@@ -1660,7 +1662,7 @@
% | margin=10pt}|\qquad.
% \end{quote}
%
-% The quite exotic option |ruled| who allowed a partial usage of
+% The quite exotic option |ruled| which allowed a partial usage of
% the caption settings for |ruled| floats defined with the
% \package{float} package will be emulated by this version of the
% caption package, too.
@@ -1679,7 +1681,7 @@
%
% \subsection{The \package{caption2} package version $2.x$}
%
-% Although they do very similar stuff the packages \package{caption} and
+% Although they do very similar stuff, the packages \package{caption} and
% its experimental and now obsolete variant \package{caption2} have a
% very different implementation design.
% Therefore a full compatibility could not be offered.
@@ -1698,9 +1700,10 @@
% |\usepackage[...]{caption}|\qquad.
% \end{quote}
% But some options and commands will not be emulated, so you can get
-% error messages afterwards. This section will help you removing
+% error messages afterwards. This section will hopefully help you removing
% these errors. If you have problems migrating from \package{caption2}
-% to \package{caption} please don't hesitate to send me an e-mail.
+% to \package{caption} please don't hesitate to send me an e-mail asking
+% for help.
%
% In addition to the obsolete options shown in the last section
% these ones will be emulated, too:
@@ -1726,6 +1729,16 @@
% }\end{quote}
% \See{\Section{margins}{Margins and further paragraph options}}
%
+% Setting an indention was done in \version{2.x} with
+% \begin{quote}
+% |\captionstyle{indent}|\\
+% |\setlength\captionindent{|\ldots|}|\quad.
+% \end{quote}
+% This is now done with
+% \begin{quote}
+% |\captionsetup{format=plain,indention=|\ldots|}|\quad.
+% \end{quote}
+%
% The so-called single-line-check was controlled by the commands
% |\oneline|\-|captions|\-|false| (for switching the check off) and
% |\oneline|\-|captions|\-|true| (for switching the check on).
@@ -1737,13 +1750,12 @@
%
% The commands
% \begin{quote}
-% |\captionstyle|, |\captionlabeldelim|, |\captionlabelsep|,\\
-% |\captionindent|, |\captionlabelfalse|, |\defcaptionstyle|,\\
-% |\newcaptionstyle|, and |\renewcaptionstyle|
+% |\captionlabeldelim|, |\captionlabelsep|, |\captionstyle|,\\
+% |\defcaptionstyle|, |\newcaptionstyle|, and |\renewcaptionstyle|
% \end{quote}
% do not have a simple replacement and therefore will not be emulated
% by this version of the \thispackage\ package. (So using them will
-% yield to error messages.) Rewriting such code is not always easy and
+% cause error messages.) Rewriting such code is not always easy and
% straight-ahead, but by conscientious reading of this manual you should
% find appropriate options and commands instead.
%
@@ -1752,7 +1764,7 @@
% \fi
%
% The \version{2.x} option |ignoreLTcapwidth| do not have a replacement, too.
-% But in most cases you could simply drop using that option because
+% But in most cases you can simply drop using that option because
% in this version of the \thispackage\ package the value of |\LTcapwidth|
% will be ignored anyway (unless you set it to a different value than the
% default one).
@@ -1808,8 +1820,11 @@
% Florian Keiler,
% J\"urgen G\"obel,
% Uwe Siart,
+% Sang-Heon Shim,
+% Henrik Lundell,
+% David Byers,
% and
-% Sang-Heon Shim
+% William Asquith,
% who all helped to make this package a better one.
%
% \iffalse
@@ -1833,14 +1848,14 @@
% 2005/05/22
%
% \bibitem{hyperref}
-% Sebastian Rahtz:
+% Sebastian Rahtz \& Heiko Oberdiek:
% \emph{Hypertext marks in \LaTeX},
-% 2003/11/30
+% 2007/01/25
%
% \bibitem{hypcap}
% Heiko Oberdiek:
% \emph{The hypcap package -- Adjusting anchors of captions}
-% 2001/08/27
+% 2007/02/19
%
% \bibitem{listings}
% Carsten Heinz:
@@ -1939,6 +1954,7 @@
% \changes{v1.4b}{1995/04/05}{Bugfix release}
% \changes{v3.0}{2003/12/20}{Rewritten; many new commands and features}
% \changes{v3.0d}{2004/11/28}{Split into two packages: \package{caption} \& \package{caption3}}
+% \changes{v3.0l}{2007/01/20}{Usage of \cs{PackageError} replaced by \cs{caption@error}}
%
% The \package{caption} package consists of two parts -- the kernel
% (|caption3.sty|) and the main package (|caption.sty|).
@@ -1981,7 +1997,7 @@
%
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption3}[2007/01/07 v3.0k caption3 kernel (AR)]
+\ProvidesPackage{caption3}[2007/02/18 v3.0l caption3 kernel (AR)]
%<+debug>\PackageWarning{caption3}{DEBUG VERSION}
% \end{macrocode}
%
@@ -2090,7 +2106,7 @@
}{\caption@ifinlist{#2}{0,false,no,off}{%
\expandafter\let\csname caption@if#1\endcsname\@secondoftwo
}{%
- \PackageError{caption}{Undefined boolean value `#2'}{\caption@eh}%
+ \caption@error{Undefined boolean value `#2'}%
}}}
% \end{macrocode}
% \begin{macrocode}
@@ -2103,6 +2119,29 @@
% \end{macro}
% \end{macro}
%
+% \subsubsection*{Errors}
+%
+% \begin{macro}{\caption@error}
+% \changes{v3.0l}{2007/01/20}{This macro added}
+% This is mainly identical to |\PackageError{caption}{#1}{\caption@eh}|.
+% \begin{macrocode}
+\newcommand\caption@package{caption}
+\newcommand*\caption@error[1]{%
+ \PackageError\caption@package{#1}\caption@eh}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\caption@eh}
+% At the moment we only offer this simple error message as generic helper
+% for the user.
+% \begin{macrocode}
+\newcommand\caption@eh{%
+ If you do not understand this error, please take a closer look\MessageBreak
+ at the documentation of the `\caption@package' package.\MessageBreak
+ \@ehc}
+% \end{macrocode}
+% \end{macro}
+%
% \subsubsection*{Using the keyval package}
%
% We need the \package{keyval} package for option handling, so we load it here.
@@ -2156,36 +2195,48 @@
%
% \begin{macro}{\caption@setkeys}
% \changes{v3.0i}{2006/01/03}{This macro added}
-% This one simply calls |\setkeys| but lets error messages refer to
-% the \package{caption} package instead of the \package{keyval} package.
-% \begin{macrocode}
-\newcommand*\caption@setkeys[2]{%
- \let\caption@KV@errx\KV@errx
- \let\caption@KV@err\KV@err
- \def\KV@errx##1{\PackageError\caption@package{##1}\@ehc}%
- \let\KV@err\KV@errx
- \setkeys{#1}{#2}%
- \let\KV@errx\caption@KV@errx
- \let\KV@err\caption@KV@err}
-\newcommand\caption@package{caption}
+% \changes{v3.0l}{2007/01/20}{Bugfix: Usage of \cs{caption@keydepth} added}
+% \changes{v3.0l}{2007/01/30}{Optional argument added}
+% This one simply calls |\setkeys|\marg{package}\marg{args} but lets the
+% error messages refer to the \meta{package} package instead of the
+% \package{keyval} package.
+% \begin{macrocode}
+\newcount\caption@keydepth \caption@keydepth=0
+\newcommand*\caption@setkeys{%
+ \@dblarg\caption@@setkeys}
+\long\def\caption@@setkeys[#1]#2#3{%
+ \ifnum\caption@keydepth =0\relax
+ \let\caption@KV@errx\KV@errx
+ \let\caption@KV@err\KV@err
+ \let\KV@errx\caption@error
+ \let\KV@err\caption@error
+ \fi
+ \advance\caption@keydepth\@ne
+%
+ \def\caption@package{#1}%
+ \setkeys{#2}{#3}%
+ \def\caption@package{caption}%
+%
+ \advance\caption@keydepth\m@ne
+ \ifnum\caption@keydepth =0\relax
+ \let\KV@errx\caption@KV@errx
+ \let\KV@err\caption@KV@err
+ \fi}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\caption@settype}
% \changes{v3.0i}{2006/01/03}{Optional argument added}
% \changes{v3.0j}{2006/01/26}{Revised}
-% |\caption@settype|\oarg{package}\marg{type}\par
+% \changes{v3.0l}{2007/01/30}{Optional argument removed}
+% |\caption@settype|\marg{type}\par
% Caption options which have been saved with |\captionsetup|\oarg{type} can
% be executed using this command.
% (It simply executes the saved option list, if there is any.)
% \begin{macrocode}
-\newcommand\caption@settype{%
- \@ifnextchar[\caption@@settype{\caption@@settype[caption]}}
-\def\caption@@settype[#1]#2{%
- \@ifundefined{\caption@typ@#2}{}{%
- \def\caption@package{#1}%
- \caption@esetup{\csname\caption@typ@#2\endcsname}%
- \def\caption@package{caption}}}
+\newcommand*\caption@settype[1]{%
+ \@ifundefined{\caption@typ@#1}{}{%
+ \caption@esetup{\csname\caption@typ@#1\endcsname}}}
% \end{macrocode}
% \end{macro}
%
@@ -2228,16 +2279,46 @@
% \end{macrocode}
% \end{macro}
%
-% \subsubsection*{Errors}
+% \begin{macro}{\caption@ProcessOptions}
+% \changes{v3.0a}{2004/01/23}{Bugfix, see \purett{news:400D360C.9678329F@gmx.net} for details}
+% \changes{v3.0i}{2006/01/03}{Improvement, uses \cs{caption@setkeys} instead of \cs{setkeys}}
+% \changes{v3.0j}{2006/02/23}{Bugfix, now processes only those global options which have a default value}
+% \changes{v3.0l}{2007/01/30}{\cs{ProcessOptionsWithKV} renamed to \cs{caption@ProcessOptions} and moved from the package to the kernel}
+% We process our options using the keyval package, so we use this one
+% instead of |\ProcessOptions| offered by \LaTeXe.
+% (This code was taken from the \package{hyperref} package and improved.)
+% \begin{macrocode}
+\newcommand*\caption@ProcessOptions[1]{%
+ \let\@tempc\relax
+% \end{macrocode}
%
-% \begin{macro}{\caption@eh}
-% At the moment we only offer this simple error message as generic helper
-% for the user.
% \begin{macrocode}
-\newcommand\caption@eh{%
- If you do not understand this error, please take a closer look\MessageBreak
- at the documentation of the `caption' package.\MessageBreak
- \@ehc}
+ \let\caption@tempa\@empty
+ \@for\CurrentOption:=\@classoptionslist\do{%
+ \@ifundefined{KV@#1@\CurrentOption}{%
+ }{%
+ \@ifundefined{KV@#1@\CurrentOption @default}{%
+ \PackageInfo{#1}{Global option `\CurrentOption' ignored}%
+ }{%
+ \PackageInfo{#1}{Global option `\CurrentOption' processed}%
+ \edef\caption@tempa{\caption@tempa,\CurrentOption,}%
+ \@expandtwoargs\@removeelement\CurrentOption
+ \@unusedoptionlist\@unusedoptionlist
+ }%
+ }%
+ }%
+ \edef\caption@tempa{%
+ \noexpand\caption@setkeys{#1}{%
+ \caption@tempa\@ptionlist{\@currname.\@currext}%
+ }%
+ }%
+ \caption@tempa
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \let\CurrentOption\@empty
+ \AtEndOfPackage{\let\@unprocessedoptions\relax}}
+\@onlypreamble\caption@ProcessOptions
% \end{macrocode}
% \end{macro}
%
@@ -2359,7 +2440,7 @@
\@ifstar{\caption@@setstyle\@gobble}{\caption@@setstyle\@firstofone}}
\newcommand*\caption@@setstyle[2]{%
\@ifundefined{caption@sty@#2}%
- {#1{\PackageError{caption}{Undefined caption style `#2'}{\caption@eh}}}%
+ {#1{\caption@error{Undefined caption style `#2'}}}%
{\expandafter\let\expandafter\caption@sls\csname caption@sls@#2\endcsname
\caption@setdefault\caption@esetup{\csname caption@sty@#2\endcsname}}}
% \end{macrocode}
@@ -2370,7 +2451,7 @@
% \emph{Note that this does not touch the skips and the positioning!}
% \begin{macrocode}
\newcommand\caption@setdefault{\captionsetup{%
- format=default,labelformat=default,labelsep=default,%
+ format=default,labelformat=default,labelsep=default,textformat=default,%
justification=default,font=default,labelfont=default,textfont=default,%
margin=0pt,indent=0pt,parindent=0pt,hangindent=0pt,%
singlelinecheck=1,strut=1}}
@@ -2419,7 +2500,7 @@
% \begin{macrocode}
\newcommand*\caption@setformat[1]{%
\@ifundefined{caption@fmt@#1}%
- {\PackageError{caption}{Undefined caption format `#1'}{\caption@eh}}%
+ {\caption@error{Undefined caption format `#1'}}%
{\expandafter\let\expandafter\caption@ifh\csname caption@ifh@#1\endcsname
\expandafter\let\expandafter\caption@fmt\csname caption@fmt@#1\endcsname}}
% \end{macrocode}
@@ -2471,7 +2552,7 @@
% \begin{macrocode}
\newcommand*\caption@setlabelformat[1]{%
\@ifundefined{caption@lfmt@#1}%
- {\PackageError{caption}{Undefined caption label format `#1'}{\caption@eh}}%
+ {\caption@error{Undefined caption label format `#1'}}%
{\expandafter\let\expandafter\caption@lfmt\csname caption@lfmt@#1\endcsname}}
% \end{macrocode}
% \end{macro}
@@ -2521,7 +2602,7 @@
% \begin{macrocode}
\newcommand*\caption@setlabelseparator[1]{%
\@ifundefined{caption@lsep@#1}%
- {\PackageError{caption}{Undefined caption label separator `#1'}{\caption@eh}}%
+ {\caption@error{Undefined caption label separator `#1'}}%
{\expandafter\let\expandafter\caption@iflf\csname caption@iflf@#1\endcsname
\expandafter\let\expandafter\caption@lsep\csname caption@lsep@#1\endcsname}}
% \end{macrocode}
@@ -2550,6 +2631,47 @@
\def\caption@iflf@default{\caption@iflf@colon}
% \end{macrocode}
%
+% \subsubsection*{Text formats}
+%
+% \begin{macro}{\DeclareCaptionTextFormat}
+% \changes{v3.0l}{2007/02/18}{This macro added}
+% |\DeclareCaptionTextFormat|\marg{name}\marg{code with \#1}
+% \begin{macrocode}
+\newcommand*\DeclareCaptionTextFormat[2]{%
+ \global\long\@namedef{caption@tfmt@#1}##1{#2}}
+\@onlypreamble\DeclareCaptionTextFormat
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+\DeclareCaptionOption{textformat}{\caption@settextformat{#1}}
+% \end{macrocode}
+%
+% \begin{macro}{\caption@settextformat}
+% \changes{v3.0l}{2007/02/18}{This macro added}
+% |\caption@settextformat|\marg{name}\par
+% Selecting a caption text format simply means saving the code (in |\caption@tfmt|).
+% \begin{macrocode}
+\newcommand*\caption@settextformat[1]{%
+ \@ifundefined{caption@tfmt@#1}%
+ {\caption@error{Undefined caption text format `#1'}}%
+ {\expandafter\let\expandafter\caption@tfmt\csname caption@tfmt@#1\endcsname}}
+% \end{macrocode}
+% \end{macro}
+%
+% There are two pre-defined text formats, called `simple' and `period'.
+%
+% \begin{macrocode}
+\DeclareCaptionTextFormat{simple}{#1}
+\DeclareCaptionTextFormat{period}{#1.}
+% \end{macrocode}
+%
+% `default' usually maps to `simple'.
+%
+% \begin{macrocode}
+\def\caption@tfmt@default{\caption@tfmt@simple}
+% \end{macrocode}
+%
% \subsubsection*{Justifications}
%
% \begin{macro}{\DeclareCaptionJustification}
@@ -2573,7 +2695,7 @@
% \begin{macrocode}
\newcommand*\caption@setjustification[1]{%
\@ifundefined{caption@hj@#1}%
- {\PackageError{caption}{Undefined caption justification `#1'}{\caption@eh}}%
+ {\caption@error{Undefined caption justification `#1'}}%
{\expandafter\let\expandafter\caption@hj\csname caption@hj@#1\endcsname}}
%\newcommand\caption@setjustification{\caption@setfont{@hj}}
% \end{macrocode}
@@ -2584,8 +2706,8 @@
% \begin{macrocode}
\DeclareCaptionJustification{justified}{}
\DeclareCaptionJustification{centering}{\centering}
-\DeclareCaptionJustification{centerfirst}{\caption@centerfirst}
-\DeclareCaptionJustification{centerlast}{\caption@centerlast}
+\DeclareCaptionJustification{centerfirst}{\centerfirst}
+\DeclareCaptionJustification{centerlast}{\centerlast}
\DeclareCaptionJustification{raggedleft}{\raggedleft}
\DeclareCaptionJustification{raggedright}{\raggedright}
% \end{macrocode}
@@ -2596,12 +2718,13 @@
\def\caption@hj@default{\caption@hj@justified}
% \end{macrocode}
%
-% \begin{macro}{\caption@centerfirst}
-% \begin{macro}{\caption@centerlast}
-% Please blame Frank Mittelbach for |\caption@centerfirst| and
-% Anne Br\"uggemann-Klein\cite{Anne} for |\caption@centerlast| |:-)|
+% \begin{macro}{\centerfirst}
+% \changes{v3.0l}{2007/01/21}{Bugfix: Usage of \cs{@centercr} added (Thanks to Olga!)}
+% \changes{v3.0l}{2007/01/21}{This macro renamed from \cs{caption@centerfirst} to \cs{centerfirst}}
+% Please blame Frank Mittelbach for |\caption@centerfirst| |:-)|
% \begin{macrocode}
-\newcommand\caption@centerfirst{%
+\providecommand\centerfirst{%
+ \let\\\@centercr
\edef\caption@normaladjust{%
\leftskip\the\leftskip
\rightskip\the\rightskip
@@ -2611,13 +2734,21 @@
\parfillskip\z@skip
\noindent\hskip\z@\@plus 2fil%
\@setpar{\@@par\@restorepar\caption@normaladjust}}
-\newcommand\caption@centerlast{%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\centerlast}
+% \changes{v3.0l}{2007/01/21}{Bugfix: Usage of \cs{@centercr} added (Thanks to Olga!)}
+% \changes{v3.0l}{2007/01/21}{This macro renamed from \cs{caption@centerlast} to \cs{centerlast}}
+% This is based on code from Anne Br\"uggemann-Klein\cite{Anne}
+% \begin{macrocode}
+\providecommand\centerlast{%
+ \let\\\@centercr
\leftskip\z@\@plus 1fil%
\rightskip\z@\@plus -1fil%
\parfillskip\z@\@plus 2fil\relax}
% \end{macrocode}
% \end{macro}
-% \end{macro}
%
% \changes{v3.0b}{2004/05/16}{Improved \package{ragged2e} package support}
% We also support the upper-case commands offered by the \package{ragged2e}
@@ -2675,6 +2806,7 @@
% \end{macrocode}
%
% \begin{macro}{\caption@setfont}
+% \changes{v3.0l}{2007/01/30}{Usage of \cs{caption@setkeys} with optional argument}
% |\caption@setfont|\marg{name}\marg{keyval-list of names}\par
% Selecting a caption font means saving all the code snippets
% (in |\caption#1|).
@@ -2687,7 +2819,7 @@
% \define@key{caption@fnt}{default}[]{%
% \global\expandafter\let\expandafter\caption@tempa
% \csname caption#1@default\endcsname}%
- \caption@setkeys{caption@fnt}{#2}%
+ \caption@setkeys[caption]{caption@fnt}{#2}%
\endgroup
\expandafter\let\csname caption#1\endcsname\caption@tempa}
% \end{macrocode}
@@ -2798,7 +2930,7 @@
}{\caption@ifinlist{#1}{a,auto}{%
\let\caption@position\@undefined
}{%
- \PackageError{caption}{Undefined caption position `#1'}{\caption@eh}%
+ \caption@error{Undefined caption position `#1'}%
}}}}}
% \end{macrocode}
% \end{macro}
@@ -2938,6 +3070,7 @@
% \changes{v3.0i}{2006/01/11}{Bugfix: \cs{caption@calcmargin} inside single-line-check replaced by \cs{relax}}
% \changes{v3.0i}{2006/01/11}{Bugfix: \cs{caption@startbox} will always be typeset in horizontal mode}
% \changes{v3.0k}{2006/05/13}{Uses \cs{captionbox} instead of \cs{caption@start/endbox}}
+% \changes{v3.0l}{2007/01/04}{Oops, bugfix 04-05-05 got lost in v3.0j, re-added}
% |\caption@@make|\marg{caption label}\marg{caption text}
% \begin{macrocode}
\newcommand\caption@@make[2]{%
@@ -2973,15 +3106,16 @@
\captionbox\@tempdima{%
% \end{macrocode}
%
-% Typeset the indention (option |indention=|)
+% Typeset the indention (option |indention=|)\\
+% Bugfix 04-05-05: |\hskip-\captionindent| replaced by |\ifdim\captionindent=\z@|\ldots
%
% \begin{macrocode}
\caption@ifh{%
-% \ifdim\captionindent=\z@
-% \leavevmode
-% \else
- \hskip-\captionindent}%
-% \fi}%
+ \ifdim\captionindent=\z@
+ \leavevmode
+ \else
+ \hskip-\captionindent
+ \fi}%
% \end{macrocode}
%
% Typeset the caption itself and close the |\captionbox|
@@ -3107,6 +3241,7 @@
% \changes{v3.0e}{2005/05/05}{Bugfix: Handling of \cs{ifcaption@star} changed}
% \changes{v3.0h}{2005/08/24}{Check for empty label added}
% \changes{v3.0h}{2005/08/25}{\cs{caption@iflf} added}
+% \changes{v3.0l}{2007/02/18}{Usage of \cs{caption@tfmt} added}
% |\caption@@@make|\marg{caption label}\marg{caption text}\par
% This one finally typesets the caption paragraph, without margin and indention.
% \begin{macrocode}
@@ -3150,7 +3285,7 @@
{{\captiontextfont
\caption@ifstrut{\vrule\@height\ht\strutbox\@width\z@}{}%
\nobreak\hskip\z@skip
- #2%
+ \caption@tfmt{#2}%
% \caption@ifstrut{\vrule\@height\z@\@depth\dp\strutbox\@width\z@}{}%
\caption@ifstrut{\@finalstrut\strutbox}{}%
\par}}}
@@ -3188,6 +3323,24 @@
% \end{macrocode}
% \end{macro}
%
+% \subsubsection*{\package{subfig} package support}
+% \changes{v3.0k}{2007/01/07}{Very small bugfix of subfig package added}
+% \changes{v3.0l}{2007/01/31}{Bugfix of subfig package moved from package to kernel}
+%
+% This is a very small bugfix for \version{1.2} and \version{1.3} or the subfig package,
+% making \cs{subfig} robust.
+% I do this here because it's caption related stuff and I get all the bug reports |;-)|
+%
+% \begin{macrocode}
+\AtBeginDocument{%
+ \def\@tempa{\@ifstar\sf@@subref\sf@subref}%
+ \ifx\subref\@tempa
+ \PackageInfo{caption}{subref 1.2 or 1.3 detected}%
+ \DeclareRobustCommand*\subref{\@ifstar\sf@@subref\sf@subref}%
+ \fi
+}
+% \end{macrocode}
+%
% \iffalse
%</kernel>
% \fi
@@ -3205,14 +3358,14 @@
%
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption}[2007/01/07 v3.0k Customising captions (AR)]
+\ProvidesPackage{caption}[2007/02/20 v3.0l Customising captions (AR)]
%<+debug>\PackageWarning{caption}{DEBUG VERSION}
% \end{macrocode}
%
% \subsubsection*{Loading the caption kernel}
%
% \begin{macrocode}
-\RequirePackage{caption3}[2006/01/12] % needs v3.0i or newer
+\RequirePackage{caption3}[2007/01/31] % needs v3.0l or newer
% \end{macrocode}
%
% \subsubsection*{Option for configuration files}
@@ -3233,6 +3386,12 @@
\DeclareCaptionOption*{tableposition}{\captionsetup[table]{position=#1}}
% \end{macrocode}
%
+% \changes{v3.0d}{2004/08/03}{Options \opt{figurename} and \opt{tablename} added}
+% \begin{macrocode}
+\DeclareCaptionOption*{figurename}{\captionsetup[figure]{name=#1}}
+\DeclareCaptionOption*{tablename}{\captionsetup[table]{name=#1}}
+% \end{macrocode}
+%
% \subsubsection*{caption \version{1.x} compatibility options}
%
% \begin{macrocode}
@@ -3284,91 +3443,15 @@
\DeclareCaptionOption*{ignoreLTcapwidth}[]{}
% \end{macrocode}
%
-% \subsubsection*{Some \KOMAScript\ compatibility stuff}
+% \subsubsection*{Some \KOMAScript\ compatibility options}
% \changes{v3.0h}{2005/08/22}{\KOMAScript\ compatibility options added}
-% \changes{v3.0i}{2005/11/17}{\KOMAScript\ compatibility commands added}
%
% \begin{macrocode}
\@ifundefined{scr@caption}{}{%
-% \end{macrocode}
-%
-% \begin{macrocode}
- \DeclareCaptionOption*{onelinecaption}[]{\onelinecaptionstrue}
- \DeclareCaptionOption*{noonelinecaption}[]{\onelinecaptionsfalse}
+ \DeclareCaptionOption*{onelinecaption}[]{\caption@setbool{slc}{1}}
+ \DeclareCaptionOption*{noonelinecaption}[]{\caption@setbool{slc}{0}}
\DeclareCaptionOption*{tablecaptionabove}[]{\captionsetup[table]{position=t}}
\DeclareCaptionOption*{tablecaptionbelow}[]{\captionsetup[table]{position=b}}
-% \end{macrocode}
-%
-% \begin{macro}{\onelinecaptionsfalse}
-% \begin{macro}{\onelinecaptionstrue}
-% \begin{macrocode}
- \def\onelinecaptionstrue{\caption@setbool{slc}{1}}
- \def\onelinecaptionsfalse{\caption@setbool{slc}{0}}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\captionabove}
-% \begin{macro}{\captionbelow}
-% \changes{v3.0j}{2006/03/21}{Bugfix 06-03-21: \cs{let}\cs{caption@setposition}\cs{@gobble} added}
-% Original code:
-% \begin{verbatim}
-% \newcommand{\captionabove}{\@captionabovetrue\scr@caption}
-% \newcommand{\captionbelow}{\@captionabovefalse\scr@caption}
-% \end{verbatim}
-% \begin{macrocode}
- \def\captionabove{%
- \caption@setposition{t}\let\caption@setposition\@gobble
- \scr@caption}
- \def\captionbelow{%
- \caption@setposition{b}\let\caption@setposition\@gobble
- \scr@caption}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \iffalse % Not very useful...
-% \begin{macro}{\setcapindent}
-% \begin{macrocode}
-% \def\setcapindent{\@ifstar{\@@setcapindent}{\@setcapindent}}
-% \def\@setcapindent#1{%
-% \caption@setformat{plain}\setlength\captionindent{#1}}
-% \def\@@setcapindent#1{%
-% \PackageError{caption}{\string\setcapindent* is not supported yet}{\caption@eh}}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\setcaphanging}
-% \begin{macrocode}
-% \def\setcaphanging{%
-% \caption@setformat{hang}\setlength\captionindent\@z}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\setcapwidth}
-% \begin{macrocode}
-% \renewcommand*\setcapwidth[2][]{%
-% \PackageWarning{caption}{%
-% Ignoring optional argument of \string\setcapwidth!\MessageBreak
-% You're using package caption.\MessageBreak}%
-% \setcaptionwidth{#2}}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\setcapmargin}
-% \begin{macrocode}
-% \renewcommand*\setcapmargin{\@ifstar\@setcapmargin\@@setcapmargin}
-% \renewcommand*\@setcapmargin[2][\@tempdimb]{%
-% \setlength\@tempdimb{#2}%
-% \setlength\@tempdima{#1}%
-% \setcaptionmargin{\@tempdima,\@tempdimb}}
-% \renewcommand*\@@setcapmargin[2][\@tempdimb]{%
-% \PackageError{caption}{\string\setcapmargin* is not supported yet}{\caption@eh}}
-% \end{macrocode}
-% \end{macro}
-% \fi
-%
-% \begin{macrocode}
}
% \end{macrocode}
%
@@ -3451,49 +3534,8 @@
\caption@declarepackage{supertabular}
% \end{macrocode}
%
-% \begin{macro}{\ProcessOptionsWithKV}
-% \changes{v3.0a}{2004/01/23}{Bugfix, see \purett{news:400D360C.9678329F@gmx.net} for details}
-% \changes{v3.0i}{2006/01/03}{Improvement, uses \cs{caption@setkeys} instead of \cs{setkeys}}
-% \changes{v3.0j}{2006/02/23}{Bugfix, now processes only those global options which have a default value}
-% We process our options using the keyval package, so we use this one
-% instead of |\ProcessOptions| offered by \LaTeXe.
-% (This code was taken from the \package{hyperref} package.)
% \begin{macrocode}
-\def\ProcessOptionsWithKV#1{%
- \let\@tempc\relax
-% \end{macrocode}
-%
-% \begin{macrocode}
- \let\caption@tempa\@empty
- \@for\CurrentOption:=\@classoptionslist\do{%
- \@ifundefined{KV@#1@\CurrentOption}{%
- }{%
- \@ifundefined{KV@#1@\CurrentOption @default}{%
- \PackageInfo{#1}{Global option `\CurrentOption' ignored}%
- }{%
- \PackageInfo{#1}{Global option `\CurrentOption' processed}%
- \edef\caption@tempa{\caption@tempa,\CurrentOption,}%
- \@expandtwoargs\@removeelement\CurrentOption
- \@unusedoptionlist\@unusedoptionlist
- }%
- }%
- }%
- \edef\caption@tempa{%
- \noexpand\caption@setkeys{#1}{%
- \caption@tempa\@ptionlist{\@currname.\@currext}%
- }%
- }%
- \caption@tempa
-% \end{macrocode}
-%
-% \begin{macrocode}
- \let\CurrentOption\@empty
- \AtEndOfPackage{\let\@unprocessedoptions\relax}}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macrocode}
-\ProcessOptionsWithKV{caption}
+\caption@ProcessOptions{caption}
% \end{macrocode}
%
% If the option |caption=false| was given we stop processing this file
@@ -3517,8 +3559,10 @@
% group or environment and does not check if the argument is a valid
% floating environment or not.
%
-% \changes{v3.0d}{2005/11/28}{Option \opt{type=} added}
+% \changes{v3.0d}{2004/08/03}{Option \opt{name=} added}
+% \changes{v3.0d}{2004/08/03}{Option \opt{type=} added}
% \begin{macrocode}
+\DeclareCaptionOption{name}{\caption@setfloatname\@captype{#1}}
\DeclareCaptionOption{type}{\def\@captype{#1}}
% \end{macrocode}
%
@@ -3619,13 +3663,14 @@
% \begin{macro}{\caption@beginex}
% \changes{v3.0b}{2004/05/16}{Support of \opt{listof=} added}
% \changes{v3.0h}{2005/09/16}{Bugfix: Made this macro and \cs{addcontentsline} \cs{long}}
-% |\caption@beginex|\marg{type}\marg{list entry}\\
+% \changes{v3.0l}{2007/02/04}{Takes now 3 args instead of 2, check for empty heading added}
+% |\caption@beginex|\marg{type}\marg{list entry}\marg{heading}\\
% performs the same tasks as |\caption@begin| and additionally:
% Redefine |\addcontentsline| if no list-of entry is requested, that
% means either the argument \meta{list entry} is empty or |listof=| was
% set to |false|.
% \begin{macrocode}
-\newcommand\caption@beginex[2]{%
+\newcommand\caption@beginex[3]{%
\caption@begin{#1}%
% \end{macrocode}
%
@@ -3634,8 +3679,16 @@
{\def\caption@tempa{#2}}%
{\let\caption@tempa\@empty}%
\ifx\caption@tempa\@empty
- \long\def\addcontentsline##1##2##3{}%
- \fi}
+ \long\def\addcontentsline##1##2##3{}% There is no \@gobblethree...
+ \fi
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \caption@ifempty{#3}{\let\caption@ifempty\@secondoftwo}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+}
% \end{macrocode}
% \end{macro}
%
@@ -3686,6 +3739,7 @@
%
% \changes{v3.0a}{2004/01/23}{Internal hooks \cs{caption@@begin} \& \cs{caption@@end} added}
% \changes{v3.0h}{2005/10/06}{Internal hooks \cs{caption@@begin} \& \cs{caption@@end} removed}
+% \changes{v3.0d}{2004/08/03}{\cs{caption@setfloatname} added}
%
% \begin{macro}{\caption@floatname}
% |\caption@floatname|\marg{type}\par
@@ -3695,6 +3749,7 @@
% can be changed later on.
% \begin{macrocode}
\newcommand*\caption@floatname[1]{\@nameuse{#1name}}
+\newcommand*\caption@setfloatname[1]{\@namedef{#1name}}
% \end{macrocode}
% \end{macro}
%
@@ -3727,12 +3782,14 @@
%
% \begin{macrocode}
\@ifundefined{cc@caption}{%
+ \@ifundefined{caption@old}{%
% \end{macrocode}
%
% \begin{macro}{\caption}
% \iffalse\changes{v3.0}{2003/07/18}{Bugfix: \cs{global} added, so this works with sidecap}\fi
% \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}
% Here comes our definition of |\caption| and |\caption*|.
% (We set |\caption@startrue| globally so it works with the \package{sidecap} package, too.)
% \begin{macrocode}
@@ -3749,14 +3806,14 @@
% \begin{macrocode}
\let\caption@@old\@caption
\long\def\@caption#1[#2]#3{%
- \caption@beginex{#1}{#2}%
+ \caption@beginex{#1}{#2}{#3}%
\caption@@old{#1}[{#2}]{#3}%
\caption@end}%
% \end{macrocode}
% \end{macro}
%
% \begin{macrocode}
- }{%
+ }{}}{%
% \end{macrocode}
%
% \changes{v3.0c}{2004/07/16}{Bugfix 04-07-15: \package{captcont} support fixed}
@@ -3808,9 +3865,11 @@
% \subsubsection*{\package{\KOMAScript} classes support}
% \changes{v3.0a}{2004/01/18}{Minimum adaptation to \KOMAScript\ added}
% \changes{v3.0h}{2005/08/22}{\cs{PackageInfo} added to \KOMAScript\ support}
+% \changes{v3.0i}{2005/11/17}{\KOMAScript\ compatibility commands added}
+% \changes{v3.0l}{2007/02/18}{\KOMAScript\ compatibility revised}
%
% \begin{macrocode}
-\AtBeginDocument{\@ifundefined{scr@caption}{}{%
+\@ifundefined{scr@caption}{}{%
\PackageInfo{caption}{KOMA-Script class detected}%
% \end{macrocode}
%
@@ -3818,15 +3877,84 @@
% We update the definition of |\scr@caption| so it actually reflects
% our definition of |\caption|.
% \begin{macrocode}
- \let\scr@caption\caption
+ \AtBeginDocument{\let\scr@caption\caption}
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\onelinecaptionsfalse}
+% \begin{macro}{\onelinecaptionstrue}
% \begin{macrocode}
-}}
+ \def\onelinecaptionstrue{\caption@setbool{slc}{1}}
+ \def\onelinecaptionsfalse{\caption@setbool{slc}{0}}
% \end{macrocode}
+% \end{macro}
+% \end{macro}
%
-% \subsubsection*{french(le) package support}
+% \begin{macro}{\captionabove}
+% \begin{macro}{\captionbelow}
+% \changes{v3.0j}{2006/03/21}{Bugfix 06-03-21: \cs{let}\cs{caption@setposition}\cs{@gobble} added}
+% Original code:
+% \begin{verbatim}
+% \newcommand{\captionabove}{\@captionabovetrue\scr@caption}
+% \newcommand{\captionbelow}{\@captionabovefalse\scr@caption}
+% \end{verbatim}
+% \begin{macrocode}
+ \def\captionabove{%
+ \caption@setposition{t}\let\caption@setposition\@gobble
+ \scr@caption}
+ \def\captionbelow{%
+ \caption@setposition{b}\let\caption@setposition\@gobble
+ \scr@caption}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \iffalse % Not very useful...
+% \begin{macro}{\setcapindent}
+% \begin{macrocode}
+% \def\setcapindent{\@ifstar{\@@setcapindent}{\@setcapindent}}
+% \def\@setcapindent#1{%
+% \caption@setformat{plain}\setlength\captionindent{#1}}
+% \def\@@setcapindent#1{%
+% \caption@error{\string\setcapindent* is not supported yet}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\setcaphanging}
+% \begin{macrocode}
+% \def\setcaphanging{%
+% \caption@setformat{hang}\setlength\captionindent\@z}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\setcapwidth}
+% \begin{macrocode}
+% \renewcommand*\setcapwidth[2][]{%
+% \PackageWarning{caption}{%
+% Ignoring optional argument of \string\setcapwidth!\MessageBreak
+% You're using package caption.\MessageBreak}%
+% \setcaptionwidth{#2}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\setcapmargin}
+% \begin{macrocode}
+% \renewcommand*\setcapmargin{\@ifstar\@setcapmargin\@@setcapmargin}
+% \renewcommand*\@setcapmargin[2][\@tempdimb]{%
+% \setlength\@tempdimb{#2}%
+% \setlength\@tempdima{#1}%
+% \setcaptionmargin{\@tempdima,\@tempdimb}}
+% \renewcommand*\@@setcapmargin[2][\@tempdimb]{%
+% \caption@error{\string\setcapmargin* is not supported yet}}
+% \end{macrocode}
+% \end{macro}
+% \fi
+%
+% \begin{macrocode}
+}
+% \end{macrocode}
+%
+% \subsubsection*{\package{french(le)} package support}
% \changes{v3.0h}{2005/10/03}{Minimum adaptation to \package{french(le)} added}
%
% \begin{macrocode}
@@ -3990,7 +4118,7 @@
% \begin{macrocode}
\let\caption@@float\float@caption
\long\def\float@caption#1[#2]#3{%
- \caption@beginex{#1}{#2}%
+ \caption@beginex{#1}{#2}{#3}%
\let\@fs@capt\caption@@make
\caption@@float{#1}[{#2}]{#3}%
% \end{macrocode}
@@ -4049,6 +4177,7 @@
%
% \begin{macrocode}
\def\caption@floatname##1{\@nameuse{fname@#1}}%
+ \def\caption@setfloatname##1{\@namedef{fname@#1}}%
% \end{macrocode}
%
% Both |\newfloat| and |\restylefloat| save the \emph{actual} definition of
@@ -4268,6 +4397,7 @@
%
% \subsubsection*{\package{hypcap} package support}
% \changes{v3.0f}{2005/06/22}{Support of the \package{hypcap} package added}
+% \changes{v3.0l}{2007/02/20}{Adapted to \package{hypcap} v1.6}
%
% When the \package{hypcap} package is used the following problems occur:
% \begin{enumerate}
@@ -4284,7 +4414,8 @@
% reference (= |\@currentHref|) in |\capstart| and restoring it later on in
% |\hc@@caption|.
% \par{\small (This also fixes the problem that \package{hypcap} does not
-% work if |\Hy@hypertexnamesfalse| is set. This come in handy; we set
+% work if |\Hy@hypertexnamesfalse| is set.\footnote{This issue was fixed
+% in \package{hypcap} \version{1.6}} This come in handy; we set
% it locally to avoid duplicated \package{hyperref} labels which could
% occur if |\ContinuedFloat| will be used.)}
% \item |\capstart| will call |\H@refstepcounter| to increase the float
@@ -4299,6 +4430,7 @@
% \end{macrocode}
%
% \begin{macro}{\capstart}
+% \changes{v3.0l}{2007/02/20}{\cs{caption@currentHref} renamed to \cs{hc@currentHref}}
% Here comes our version of |\capstart|:
% \begin{macrocode}
\let\caption@capstart\capstart
@@ -4321,7 +4453,7 @@
\let\H@refstepcounter\@gobble
\Hy@hypertexnamesfalse
\caption@capstart
- \global\let\caption@currentHref\@currentHref
+ \global\let\hc@currentHref\@currentHref
\endgroup
% \end{macrocode}
%
@@ -4347,7 +4479,7 @@
% \begin{macrocode}
\let\caption@hc@@caption\hc@@caption
\long\def\hc@@caption#1[#2]#3{%
- \caption@beginex{#1}{#2}%
+ \caption@beginex{#1}{#2}{#3}%
% \end{macrocode}
%
% Beside the usual |\caption@begin| and |\caption@end| stuff (to support local
@@ -4357,7 +4489,7 @@
\let\caption@hyper@makecurrent\hyper@makecurrent
\def\hyper@makecurrent\@captype{%
\let\hyper@makecurrent\caption@hyper@makecurrent
- \global\let\@currentHref\caption@currentHref}%
+ \global\let\@currentHref\hc@currentHref}%
% \end{macrocode}
%
% \begin{macrocode}
@@ -4751,23 +4883,6 @@
}
% \end{macrocode}
%
-% \subsubsection*{\package{subfig} package support}
-% \changes{v3.0k}{2007/01/07}{Very small bugfix of subfig package added}
-%
-% This is a very small bugfix for \version{1.2} and \version{1.3} or the subfig package,
-% making \cs{subfig} robust.
-% I do this here because it's caption related stuff and I get all the bug reports |;-)|
-%
-% \begin{macrocode}
-\AtBeginDocument{%
- \def\@tempa{\@ifstar\sf@@subref\sf@subref}%
- \ifx\subref\@tempa
- \PackageInfo{caption}{subref 1.2 or 1.3 detected}%
- \DeclareRobustCommand*\subref{\@ifstar\sf@@subref\sf@subref}%
- \fi
-}
-% \end{macrocode}
-%
% \subsubsection*{\package{supertabular} package support}
%
% \begin{macro}{\caption@setSTposition}
@@ -4815,7 +4930,7 @@
\long\def\ST@caption#1[#2]#3{\par%
\caption@letfloattype{supertabular}{}%
\let\caption@fixposition\caption@setSTposition
- \caption@beginex{#1}{#2}%
+ \caption@beginex{#1}{#2}{#3}%
\addcontentsline{\csname ext@#1\endcsname}{#1}%
{\protect\numberline{%
\csname the#1\endcsname}{\ignorespaces #2}}%
diff --git a/Master/texmf-dist/source/latex/caption/caption.ins b/Master/texmf-dist/source/latex/caption/caption.ins
index 3226249de58..f6d27ff5ec0 100644
--- a/Master/texmf-dist/source/latex/caption/caption.ins
+++ b/Master/texmf-dist/source/latex/caption/caption.ins
@@ -1,12 +1,12 @@
\def\batchfile{caption.ins}
\input docstrip
-\askonceonly
+\askforoverwritefalse
\keepsilent
\preamble
-Copyright (C) 1994-2006 Axel Sommerfeldt (caption@sommerfee.de)
+Copyright (C) 1994-2007 Axel Sommerfeldt (caption@sommerfee.de)
--------------------------------------------------------------------------