summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/caption
diff options
context:
space:
mode:
authorReinhard Kotucha <reinhard.kotucha@web.de>2007-01-08 20:13:32 +0000
committerReinhard Kotucha <reinhard.kotucha@web.de>2007-01-08 20:13:32 +0000
commit414c8ad86b77b988ba8ce4844a664729e8774f64 (patch)
tree87a1a695f3b64d1f690afed61c75bb5905d7b57b /Master/texmf-dist/source/latex/caption
parent4d0955e8f5596298fad939a8ea13f99c675fe4ba (diff)
Update caption.
git-svn-id: svn://tug.org/texlive/trunk@3252 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/caption')
-rw-r--r--Master/texmf-dist/source/latex/caption/caption.dtx103
-rw-r--r--Master/texmf-dist/source/latex/caption/caption2.dtx2
2 files changed, 74 insertions, 31 deletions
diff --git a/Master/texmf-dist/source/latex/caption/caption.dtx b/Master/texmf-dist/source/latex/caption/caption.dtx
index 42690e04ce7..a8a4f4cbc6e 100644
--- a/Master/texmf-dist/source/latex/caption/caption.dtx
+++ b/Master/texmf-dist/source/latex/caption/caption.dtx
@@ -23,7 +23,7 @@
% caption.sty, caption2.sty, caption3.sty, and manual.tex.
%
% \fi
-% \CheckSum{1956}
+% \CheckSum{1987}
%
% \iffalse
%<*driver>
@@ -58,7 +58,7 @@
\DeclareCaptionLabelSeparator{endash}{\space\textendash\space}
\usepackage{hyperref}
%
-\DeclareCaptionFont{singlespacing}{\singlespacing}
+\DeclareCaptionFont{singlespacing}{\setstretch{1}}
\DeclareCaptionFont{onehalfspacing}{\onehalfspacing}
\DeclareCaptionFont{doublespacing}{\doublespacing}
\DeclareCaptionFont{red}{\color{red}}
@@ -115,7 +115,7 @@
% \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/01/12}
+% \date{2006/06/12}
% \maketitle
%
% \begin{abstract}
@@ -322,7 +322,7 @@
% (This is the default behaviour.)
%
% \item[empty]
-% The caption label will be empty. This option only makes sense when used
+% The caption label will be empty. This option makes sense when used
% together with other options like \texttt{labelsep=none}.
%
% \item[simple]
@@ -355,7 +355,7 @@
%
% \begin{Options}{\OptionLabel}
% \item[none]
-% There is no caption separator. This option only makes sense when used
+% There is no caption separator. This option makes sense when used
% together with other options like \texttt{labelformat=empty}.
%
% \item[colon]
@@ -1123,10 +1123,11 @@
% \end{quote}
% The line spacing could be customized using the \package{setspace} package,
% for example:\NEWdescription{v3.0h}
-% regeln:
% \begin{quote}
% |\usepackage{setspace}|\\
-% |\DeclareCaptionFont{singlespacing}{\singlespacing}|\\
+% |\DeclareCaptionFont{singlespacing}{\setstretch{1}}|\quad\footnote{%
+% \emph{Note:} Using \cs{singlespacing} does not work here since it contains
+% a \cs{vskip} command.}\\
% |\DeclareCaptionFont{onehalfspacing}{\onehalfspacing}|\\
% |\DeclareCaptionFont{doublespacing}{\doublespacing}|\\
% |\captionsetup{font={onehalfspacing,small},labelfont=bf}|
@@ -1790,7 +1791,7 @@
%
% I would like to thank Katja Melzner,
% Steven D. Cochran, Frank Mittelbach,
-% David Carlisle, Carsten Hinz, Olga Lapko, and Keith Reckdahl.
+% David Carlisle, Carsten Heinz, Olga Lapko, and Keith Reckdahl.
% Thanks a lot for all your help, ideas, patience, spirit, and support!
%
% Also I would like to thank
@@ -1806,8 +1807,9 @@
% Geoff Vallis,
% Florian Keiler,
% J\"urgen G\"obel,
+% Uwe Siart,
% and
-% Uwe Siart
+% Sang-Heon Shim
% who all helped to make this package a better one.
%
% \iffalse
@@ -1979,7 +1981,7 @@
%
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption3}[2006/03/16 v3.0j caption3 kernel (AR)]
+\ProvidesPackage{caption3}[2007/01/07 v3.0k caption3 kernel (AR)]
%<+debug>\PackageWarning{caption3}{DEBUG VERSION}
% \end{macrocode}
%
@@ -1999,9 +2001,10 @@
% \begin{macro}{\l@addto@macro}
% The \LaTeXe\ kernel offers the internal helper macro |\g@addto@macro| which
% globally adds commands to any existising macro, like in |\AtBeginDocument|.
-% This is the same but it works local, not global.
+% This is the same but it works local, not global
+% (using \cs{edef} instead of \cs{xdef}).
% \begin{macrocode}
-\providecommand\l@addto@macro[2]{%
+\providecommand{\l@addto@macro}[2]{%
\begingroup
\toks@\expandafter{#1#2}%
\edef\@tempa{\endgroup\def\noexpand#1{\the\toks@}}%
@@ -2031,6 +2034,26 @@
% \end{macro}
% \end{macro}
%
+% \begin{macro}{\AtBeginEnvironment}
+% \changes{v3.0k}{2007/01/07}{This macro added}
+% |\AtBeginEnvironment|\marg{environment}\marg{code}\par
+% Allows code to be saved and executed at begin of given environments.
+% \begin{macrocode}
+\providecommand*\AtBeginEnvironment[1]{%
+ \@ifundefined{#1}%
+ {\@latex@error{Environment #1 undefined}\@ehc
+ \@gobble}%
+ {\@ifundefined{caption@env@#1}%
+ {\expandafter\let\csname caption@env@#1\expandafter\endcsname
+ \csname #1\endcsname
+ \expandafter\let\csname caption@hook@#1\endcsname\@empty
+ \@namedef{#1}{\@nameuse{caption@hook@#1}\@nameuse{caption@env@#1}}}%
+ {}%
+ \expandafter\g@addto@macro\csname caption@hook@#1\endcsname}}
+\@onlypreamble\AtBeginEnvironment
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\caption@ifinlist}
% This helper macro checks if the first argument is in the comma separated
% list which is offered as second argument. So for example
@@ -2132,7 +2155,7 @@
% \end{macro}
%
% \begin{macro}{\caption@setkeys}
-% \changes{v3.0i}{2006/01/03}{\cs{caption@setkeys} introduced}
+% \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}
@@ -2914,6 +2937,7 @@
% \changes{v3.0i}{2005/12/04}{Uses \cs{caption@slc}}
% \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}}
% |\caption@@make|\marg{caption label}\marg{caption text}
% \begin{macrocode}
\newcommand\caption@@make[2]{%
@@ -2946,7 +2970,7 @@
% \begin{macrocode}
\@tempdima\captionwidth
\caption@ifh{\advance\@tempdima by -\captionindent}%
- \caption@startbox\@tempdima
+ \captionbox\@tempdima{%
% \end{macrocode}
%
% Typeset the indention (option |indention=|)
@@ -2960,14 +2984,10 @@
% \fi}%
% \end{macrocode}
%
-% Typeset the caption itself
-%
-% \begin{macrocode}
- \caption@@@make{#1}{#2}%
-% \end{macrocode}
+% Typeset the caption itself and close the |\captionbox|
%
% \begin{macrocode}
- \caption@endbox
+ \caption@@@make{#1}{#2}}%
% \end{macrocode}
%
% Typeset the right margin (option |margin=|)
@@ -3071,17 +3091,13 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\caption@startbox}
-% \begin{macro}{\caption@endbox}
-% These macros start and end the box which surrounds the caption paragraph.
+% \begin{macro}{\captionbox}
+% \changes{v3.0k}{2006/05/13}{We define \cs{captionbox} instead of \cs{caption@start/endbox}}
+% This macro defines the box which surrounds the caption paragraph.
% \begin{macrocode}
-\newcommand*\caption@startbox[1]{\vbox\bgroup\hsize#1}%
-%\newcommand*\caption@startbox[1]{\vbox\bgroup\setlength\hsize{#1}\@parboxrestore}%
-\newcommand*\caption@endbox{\egroup}
-%\newcommand*\caption@endbox{\@finalstrut\strutbox\@@par\egroup}
+\newcommand\captionbox{\parbox[t]}
% \end{macrocode}
% \end{macro}
-% \end{macro}
%
% \begin{macro}{\caption@@@make}
% \changes{v3.0b}{2004/05/16}{Bugfix 04-05-06: \cs{allowhyphens} added}
@@ -3189,7 +3205,7 @@
%
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption}[2006/03/21 v3.0j Customising captions (AR)]
+\ProvidesPackage{caption}[2007/01/07 v3.0k Customising captions (AR)]
%<+debug>\PackageWarning{caption}{DEBUG VERSION}
% \end{macrocode}
%
@@ -3306,7 +3322,7 @@
\scr@caption}
\def\captionbelow{%
\caption@setposition{b}\let\caption@setposition\@gobble
- \scr@caption}
+ \scr@caption}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -3550,6 +3566,16 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\DeclareCaptionEnvironment}
+% \changes{v3.0k}{2007/01/07}{This macro added}
+% |\DeclareCaptionEnvironment|\oarg{extra code}\marg{environment}
+% \begin{macrocode}
+\newcommand*\DeclareCaptionEnvironment[2][]{%
+ \AtBeginEnvironment{#2}{\caption@letfloattype{#2}{#1}}}
+\@onlypreamble\DeclareCaptionEnvironment
+% \end{macrocode}
+% \end{macro}
+%
% \subsubsection*{Internal helpers}
%
% \begin{macro}{\caption@begin}
@@ -4725,6 +4751,23 @@
}
% \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}
diff --git a/Master/texmf-dist/source/latex/caption/caption2.dtx b/Master/texmf-dist/source/latex/caption/caption2.dtx
index 4ac3b7c8ed6..12e7ed056a2 100644
--- a/Master/texmf-dist/source/latex/caption/caption2.dtx
+++ b/Master/texmf-dist/source/latex/caption/caption2.dtx
@@ -81,7 +81,7 @@
% adaptations to other packages like the \package{longtable} and
% \package{subfigure} package.
%
-% Even in the next seven years I found no time to reintegrate some of the
+% Even in the next years I found no time to reintegrate some of the
% well-tried features into the regular \package{caption} package. So I
% decided to release a version $2.1$ of the \package{caption2} package in 2002
% instead, which included some minor bug fixes and adaptations to the new