summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2007-04-11 23:10:18 +0000
committerKarl Berry <karl@freefriends.org>2007-04-11 23:10:18 +0000
commit26c7201725a630fb71ec1c952974cd207170d70f (patch)
treeed170f312b75edfdab76756c9c253424999ab62e
parent7518aae005c5ab74eae9c9902b7ffc82c7da1cd6 (diff)
caption 3.0p (10apr07)
git-svn-id: svn://tug.org/texlive/trunk@4152 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/caption/anleitung.pdfbin216562 -> 211737 bytes
-rw-r--r--Master/texmf-dist/doc/latex/caption/anleitung.tex56
-rw-r--r--Master/texmf-dist/doc/latex/caption/caption.pdfbin332072 -> 327164 bytes
-rw-r--r--Master/texmf-dist/doc/latex/caption/caption2.pdfbin125170 -> 125143 bytes
-rw-r--r--Master/texmf-dist/doc/latex/caption/manual.tex3
-rw-r--r--Master/texmf-dist/source/latex/caption/caption.dtx295
-rw-r--r--Master/texmf-dist/source/latex/caption/caption2.dtx253
-rw-r--r--Master/texmf-dist/tex/latex/caption/caption.sty27
-rw-r--r--Master/texmf-dist/tex/latex/caption/caption2.sty106
-rw-r--r--Master/texmf-dist/tex/latex/caption/caption3.sty104
-rw-r--r--Master/texmf-dist/tpm/caption.tpm10
11 files changed, 513 insertions, 341 deletions
diff --git a/Master/texmf-dist/doc/latex/caption/anleitung.pdf b/Master/texmf-dist/doc/latex/caption/anleitung.pdf
index e1b3803e8c7..6582634184b 100644
--- a/Master/texmf-dist/doc/latex/caption/anleitung.pdf
+++ b/Master/texmf-dist/doc/latex/caption/anleitung.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/caption/anleitung.tex b/Master/texmf-dist/doc/latex/caption/anleitung.tex
index 2452a70393c..1881f645197 100644
--- a/Master/texmf-dist/doc/latex/caption/anleitung.tex
+++ b/Master/texmf-dist/doc/latex/caption/anleitung.tex
@@ -109,7 +109,7 @@
\thispackage-Paket\thanks{Dieses Paket hat die Versionsnummer
\fileversion, zuletzt ge"andert am \filedate.}}
\author{Axel Sommerfeldt\\\href{mailto:caption@sommerfee.de}{\texttt{caption@sommerfee.de}}}
-\date{20. Februar 2007}
+\date{9. April 2007}
\maketitle
\begin{abstract}
@@ -831,7 +831,7 @@ entspricht
% --------------------------------------------------------------------------- %
-\pagebreak[4]
+\pagebreak[3]
\section{N"utzliches}
\label{misc}
@@ -1118,10 +1118,12 @@ Die Zeilenabst"ande lie"sen sich z.B.~"uber das \package{setspace}"=Paket
regeln:\NEWdescription{v3.0h}
\begin{quote}
|\usepackage{setspace}|\\
+\iffalse
|\DeclareCaptionFont{singlespacing}{\setstretch{1}}|\quad\footnote{%
- \emph{Hinweis:} \cs{singlespacing} kann hier nicht benutzt werden, da es ein \cs{vskip} Kommando enthält.}\\
+ \emph{Hinweis:} \cs{singlespacing} kann hier nicht benutzt werden, da es ein \cs{vskip} Kommando enth"alt.}\\
|\DeclareCaptionFont{onehalfspacing}{\onehalfspacing}|\\
|\DeclareCaptionFont{doublespacing}{\doublespacing}|\\
+\fi
|\captionsetup{font={onehalfspacing,small},labelfont=bf}|
\end{quote}
\example{font={onehalfspacing,small},labelfont=bf,singlelinecheck=off}\figuretext
@@ -1158,7 +1160,7 @@ Als Beispiel mu"s mal wieder eine einfache Definition aus diesem Paket herhalten
% --------------------------------------------------------------------------- %
-\subsection{Weiterführende Beispiele}
+\subsection{Weiterf"uhrende Beispiele}
M"ochte man als Trenner einen Punkt \emph{und} einen Zeilenumbruch haben,
so lie"se sich das wie folgt realisieren:
@@ -1259,33 +1261,31 @@ Das Ergebnis w"aren Beschriftungen wie diese:
\pagebreak[4]
\section{Verwendung mit speziellen Dokumentenklassen}
-\NEWdescription{v3.0d}
+\NEWdescription{v3.0p}
Das \thispackage"=Paket ist auf die Verwendung mit den
-Standard"=Dokumentenklassen |article|, |report| und |book| ausgelegt.
-
-M"ochte man das \thispackage"=Paket mit den \KOMAScript"=Klassen oder der
-\package{memoir}"=Klasse verwenden, so ist sorgf"altig abzuw"agen, ob die
-in diesen Klassen reichlich enthaltenden M"oglichkeiten zur Anpassung der
-Beschriftungen nicht ausreichend sind.
-Denn das \thispackage"=Paket funktioniert zwar auch mit den
-\KOMAScript"=Klassen und der \package{memoir}"=Klasse, allerdings sollte
-darauf geachtet werden, da"s die verschiedenen Anpassungsm"oglichkeiten nicht
-im Dokument vermischt werden.
-Ist das \thispackage"=Paket erst einmal geladen, verlieren Befehle wie
-|\captionformat|, |\figureformat|, |\tableformat|,
-|\setcapindent|, |\setcaphanging|, |\captionstyle|
-usw.\ ihre Wirkung.
-
-Das \thispackage"=Paket sollte zwar auch mit anderen als den oben erw"ahnten
-Dokumentenklassen zusammenarbeiten, ist jedoch nicht uneingeschr"ankt
-empfehlenswert, da es zu unerw"unschten Layout"="Anderungen,
-sonstigen Nebenwirkungen oder gar Fehlfunktionen kommen kann.
-(Zuk"unftige Versionen des \thispackage"=Paketes werden allerdings mehr
-Dokumentenklassen unterst"utzen als dies derzeit der Fall ist.)
+Standard"=Dokumentenklassen |article|, |report| und |book| ausgelegt;
+ferner funktioniert es mit den Niederl"andischen Klassen |artikel|,
+|rapport| und |boek|. Es ist \emph{inkompatibel} mit allen anderen
+Dokumentenklassen, es sei denn, sie basieren auf einer der oben genannten.
+
+Im Zweifelsfalle ist von der Verwendung des \thispackage"=Paketes abzuraten.
+Man kann versuchen, es trotzdem einzubinden und hoffen, da"s das Dokument
+"ubersetzt und sich keine Nebeneffekte einstellen. Ein Nebeneffekt w"are
+zum Beispiel die Tatsache, da"s sich alleine durch das Einbinden des
+\thispackage"=Paketes ohne Optionen das Aussehen der Bild- oder
+Tabellenbeschriftungen "andert. (Ist dies der Fall, mu"s man damit rechnen,
+da"s sich die Ausgabe bei der Verwendung von zuk"unftigen Versionen des
+\thispackage"=Paketes "andern kann.) Ist dies in Ordnung, so kann man
+Einstellungen an den Beschriftungen setzen und die Finger gekreuzt halten.
+
+Die Version \version{3.1} des \thispackage"=Paketes wird an viele
+weitere Dokumentenklassen, wie z.B.~die \package{beamer}"=Klasse und
+die \KOMAScript"=Klassen, angepasst sein. Die Ver"offentlichung ist
+f"ur Sommer 2007 geplant.
% --------------------------------------------------------------------------- %
-\pagebreak[4]
+\pagebreak[3]
\section{Interaktion mit anderen Paketen}
\label{packages}
@@ -1449,7 +1449,7 @@ Das \package{longtable}"=Paket\cite{longtable} definiert die Umgebung
|longtable|, die sich wie eine Tabelle anwenden l"a"st, aber im Gegensatz zu
|tabular| Seitenumbr"uche innerhalb der Tabelle gestattet.
-% TODO: \DANGER wg. Abstand zur \caption, der für Überschriften ausgelegt ist
+% TODO: \DANGER wg. Abstand zur \caption, der f"ur "Uberschriften ausgelegt ist
% => "tableposition=b"
% --------------------------------------------------------------------------- %
diff --git a/Master/texmf-dist/doc/latex/caption/caption.pdf b/Master/texmf-dist/doc/latex/caption/caption.pdf
index f9437169104..86d327a6121 100644
--- a/Master/texmf-dist/doc/latex/caption/caption.pdf
+++ b/Master/texmf-dist/doc/latex/caption/caption.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/caption/caption2.pdf b/Master/texmf-dist/doc/latex/caption/caption2.pdf
index f64b7b6215b..9cf8f8d8114 100644
--- a/Master/texmf-dist/doc/latex/caption/caption2.pdf
+++ b/Master/texmf-dist/doc/latex/caption/caption2.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/caption/manual.tex b/Master/texmf-dist/doc/latex/caption/manual.tex
index ca8e8a96ae2..fcf3be9b2c9 100644
--- a/Master/texmf-dist/doc/latex/caption/manual.tex
+++ b/Master/texmf-dist/doc/latex/caption/manual.tex
@@ -47,9 +47,6 @@
\usepackage{caption}[2005/08/24]
\DeclareCaptionLabelSeparator{endash}{\space\textendash\space}
\usepackage{hyperref}
-\DeclareCaptionFont{singlespacing}{\setstretch{1}}
-\DeclareCaptionFont{onehalfspacing}{\onehalfspacing}
-\DeclareCaptionFont{doublespacing}{\doublespacing}
\DeclareCaptionFont{red}{\color{red}}
\DeclareCaptionFont{green}{\color{green}}
\DeclareCaptionFont{blue}{\color{blue}}
diff --git a/Master/texmf-dist/source/latex/caption/caption.dtx b/Master/texmf-dist/source/latex/caption/caption.dtx
index 794171bde9b..ad7af11deb6 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{2089}
+% \CheckSum{2198}
%
% \iffalse
%<*driver>
@@ -58,9 +58,6 @@
\DeclareCaptionLabelSeparator{endash}{\space\textendash\space}
\usepackage{hyperref}
%
-\DeclareCaptionFont{singlespacing}{\setstretch{1}}
-\DeclareCaptionFont{onehalfspacing}{\onehalfspacing}
-\DeclareCaptionFont{doublespacing}{\doublespacing}
\DeclareCaptionFont{red}{\color{red}}
\DeclareCaptionFont{green}{\color{green}}
\DeclareCaptionFont{blue}{\color{blue}}
@@ -115,7 +112,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{2007/02/20}
+% \date{2007/04/09}
% \maketitle
%
% \begin{abstract}
@@ -1128,11 +1125,13 @@
% for example:\NEWdescription{v3.0h}
% \begin{quote}
% |\usepackage{setspace}|\\
+% \iffalse
% |\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}|\\
+% \fi
% |\captionsetup{font={onehalfspacing,small},labelfont=bf}|
% \end{quote}
% \example{font={onehalfspacing,small},labelfont=bf,singlelinecheck=off}\figuretext
@@ -1279,29 +1278,32 @@
% \pagebreak[3]
% \section{Using non-standard document classes}
%
-% \NEWdescription{v3.0d}
+% \NEWdescription{v3.0p}
% The \thispackage\ package was developed using the standard document classes
-% |article|, |report| and |book|.
-%
-% If you would like to use the \thispackage\ package with the
-% \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 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!)
-%
+% |article|, |report| and |book|, it also works with the Dutch document classes
+% |artikel|, |rapport| and |boek|. It is \emph{incompatible} with all other
+% document classes, except the ones based on one of the above.
+%
+% If you are unsure if your document class is supported or not, it's better
+% \emph{not} to use this package. You could try if your document will compile
+% fine with the \thispackage\ package anyway, but you should watch carefully
+% if side-effects occur, i.e. the look and feel of your captions should
+% \emph{not} change if you just include the caption package without options.
+% (If it does, you can carry on, but you should be warned that the output
+% could change with upcoming versions of the \thispackage\ package.)
+% If this is fine, you can start setting options with
+% |\usepackage[|\ldots|]{caption}| or |\captionsetup| and keep your fingers
+% crossed.
+%
+% The upcoming version \version{3.1} of the \thispackage\ package will be
+% adapted to several document classes, e.g. the \package{beamer} class and
+% the \KOMAScript\ ones. It's planned for release during Summer 2007.
+%
% \iffalse
% --------------------------------------------------------------------------- %
% \fi
%
-% \section{Using other packages}
+% \section{Compatibility to other packages}
% \label{packages}
%
% The \thispackage\ package contains special adaptations to other packages,
@@ -1519,7 +1521,7 @@
% \parbox[b]{\scboxwidth}{\unhbox\scbox}
% \hspace\marginparsep
% \parbox[b]{1.5\scboxwidth}{
-% \captionsetup{justification=RaggedRight,labelfont=bf}
+% \captionsetup{justification=raggedright,labelfont=bf}
% \captionof{figure}[]{A small example with the caption beside the figure.}
% }
% }
@@ -1774,7 +1776,7 @@
% --------------------------------------------------------------------------- %
% \fi
%
-% \pagebreak[3]
+% \pagebreak[4]
% \section{Further reading}
%
% I recommend the following documents for further reading:
@@ -1998,7 +2000,7 @@
%
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption3}[2007/03/30 v3.0o caption3 kernel (AR)]
+\ProvidesPackage{caption3}[2007/04/09 v3.0p caption3 kernel (AR)]
% \end{macrocode}
%
% \subsubsection*{Generic helpers}
@@ -2050,26 +2052,6 @@
% \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
@@ -2119,6 +2101,28 @@
% \end{macro}
% \end{macro}
%
+% \begin{macro}{\caption@newcounter}
+% \changes{v3.0p}{2007/04/08}{\cs{caption@XXXcounter} added}
+% \begin{macro}{\caption@setcounter}
+% \begin{macro}{\caption@addtocounter}
+% \begin{macro}{\caption@stepcounter}
+% To save counter space we use commands instead of counters.
+% \begin{macrocode}
+\def\caption@newcounter#1{\gdef#1{0}}
+\def\caption@setcounter#1#2{\xdef#1{#2}}
+\def\caption@addtocounter#1#2{%
+ \begingroup
+ \@tempcnta#1%
+ \advance\@tempcnta#2%
+ \xdef#1{\the\@tempcnta}%
+ \endgroup}
+\def\caption@stepcounter#1{\caption@addtocounter#1\@ne}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
% \subsubsection*{Errors}
%
% \begin{macro}{\caption@error}
@@ -2197,33 +2201,38 @@
% \changes{v3.0i}{2006/01/03}{This macro added}
% \changes{v3.0l}{2007/01/20}{Bugfix: Usage of \cs{caption@keydepth} added}
% \changes{v3.0l}{2007/01/30}{Optional argument added}
+% \changes{v3.0p}{2007/04/08}{\cs{caption@keydepth} is now a command instead of a counter}
% 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}
+% \end{macrocode}
+% \begin{macrocode}
\long\def\caption@@setkeys[#1]#2#3{%
- \ifnum\caption@keydepth =0\relax
+ \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
+ \caption@stepcounter\caption@keydepth
%
\def\caption@package{#1}%
\caption@Debug{\protect\setkeys{#2}{#3}}%
\setkeys{#2}{#3}%
\def\caption@package{caption}%
%
- \advance\caption@keydepth\m@ne
- \ifnum\caption@keydepth =0\relax
+ \caption@addtocounter\caption@keydepth\m@ne
+ \ifnum\caption@keydepth=0\relax
\let\KV@errx\caption@KV@errx
\let\KV@err\caption@KV@err
\fi}
% \end{macrocode}
+% \begin{macrocode}
+\caption@newcounter\caption@keydepth
+% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\caption@settype}
@@ -2324,9 +2333,10 @@
% \end{macro}
%
% \subsubsection*{Margin resp. width}
+% \changes{v3.0p}{2007/04/01}{\cs{captionmarginx} renamed to \cs{captionmargin@}}
+% \changes{v3.0p}{2007/04/03}{Option `twoside' added to kernel}
%
% \begin{macro}{\captionmargin}
-% \begin{macro}{\captionmarginx}
% \begin{macro}{\captionwidth}
% |\captionmargin| and |\captionwidth| contain the extra margin
% resp. the total width used for captions. Please never set these values in
@@ -2334,19 +2344,19 @@
% compatibility to |caption.sty| \version{1.x}.\par
% Note that we can only set one value at a time, `margin' \emph{or} `width'.
% If |\captionwidth| is not zero we will take this value afterwards,
-% otherwise |\captionmargin| and |\captionmarginx|.
+% otherwise |\captionmargin| and |\captionmargin@|.
% \begin{macrocode}
\newdimen\captionmargin
-\newdimen\captionmarginx
+\newdimen\captionmargin@
\newdimen\captionwidth
% \end{macrocode}
% \end{macro}
% \end{macro}
-% \end{macro}
%
% \begin{macrocode}
\DeclareCaptionOption{margin}{\setcaptionmargin{#1}}
\DeclareCaptionOption{width}{\setcaptionwidth{#1}}
+\DeclareCaptionOption{twoside}[1]{\caption@setbool{twoside}{#1}}
% \end{macrocode}
%
% \begin{macro}{\setcaptionmargin}
@@ -2362,8 +2372,8 @@
\caption@@setmargin#1,#1,\@nil\@@}
\def\caption@@setmargin#1,#2,#3\@@{%
\setlength\captionmargin{#1}%
- \setlength\captionmarginx{#2}%
- \advance\captionmarginx by -\captionmargin}
+ \setlength\captionmargin@{#2}%
+ \advance\captionmargin@ by -\captionmargin}
% \end{macrocode}
% \end{macro}
%
@@ -2379,7 +2389,77 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\caption@count}
+% \changes{v3.0p}{2007/04/03}{This counter added}
+% This counter numbers the captions. It will be used inside |\caption@ifoddpage| only.
+% \begin{macrocode}
+\caption@newcounter\caption@count
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\caption@newlabel}
+% \changes{v3.0p}{2007/04/03}{This macro added}
+% This command is a modified version of |\newlabel| from \LaTeX2e.
+% It will be written to the \texttt{.aux} file to
+% pass label information from one run to another.
+% It will be used inside |\caption@ifoddpage| and |\caption@ragged|.
+% \begin{macrocode}
+\newcommand*\caption@newlabel{\@newl@bel{caption}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\caption@thepage}
+% \changes{v3.0p}{2007/04/03}{This macro added}
+% This command is a modified version of |\thepage| from \LaTeX2e.
+% It will be used inside |\caption@ifoddpage| only.
+% \begin{macrocode}
+\newcommand*\caption@thepage{\the\c@page}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\caption@ifoddpage}
+% \changes{v3.0p}{2007/04/03}{This macro added}
+% \emph{Note:} This macro re-defines itself so the \texttt{.aux} file will
+% only be used once per group.
+% \begin{macrocode}
+\def\caption@ifoddpage{%
+ \caption@iftwoside{%
+% \end{macrocode}
+% |\refstepcounter{caption@count}|
+% \begin{macrocode}
+ \caption@stepcounter\caption@count
+% \end{macrocode}
+% |\label{\the\caption@count}|
+% \begin{macrocode}
+ \protected@write\@auxout{\let\caption@thepage\relax}%
+ {\string\caption@newlabel{\caption@count}{\caption@thepage}}%
+% \end{macrocode}
+% |\edef\caption@thepage{\pageref{\the\caption@count}}|
+% \begin{macrocode}
+ \expandafter\ifx\csname caption@\caption@count\endcsname\relax
+ \G@refundefinedtrue % => 'There are undefined references.'
+ \PackageWarning{caption3}{Reference on page \thepage \space undefined}%
+ \else
+ \expandafter\let\expandafter\caption@thepage
+ \csname caption@\caption@count\endcsname
+ \fi
+% \end{macrocode}
+% |\ifodd\caption@thepage|\ldots
+% \begin{macrocode}
+ \ifodd\caption@thepage
+ \let\caption@ifoddpage\@firstoftwo
+ \else
+ \let\caption@ifoddpage\@secondoftwo
+ \fi
+ }{\let\caption@ifoddpage\@firstoftwo}%
+% \end{macrocode}
+% \begin{macrocode}
+ \caption@ifoddpage}
+% \end{macrocode}
+% \end{macro}
+%
% \subsubsection*{Indentions}
+%
% \begin{macro}{\captionindent}
% \begin{macro}{\captionparindent}
% \begin{macro}{\captionhangindent}
@@ -2813,25 +2893,38 @@
% \end{macrocode}
%
% \begin{macro}{\caption@ragged}
+% \changes{v3.0p}{2007/04/07}{The `ragged2e' package will now only been loaded when needed}
% |\caption@ragged| will be basically defined as\par
% |\AtBeginDocument{\IfFileExists{ragged2e.sty}%|\\
% | {\RequirePackage{ragged2e}\let\caption@ragged\@firstoftwo}%|\\
% | {\let\caption@ragged\@secondoftwo}}|\par
-% but with an additional warning if the ragged2e package is not avail.
+% but with an additional warning if the ragged2e package is not loaded (yet).
% (This warning will be typeout only one time per option, that's why
% we need the |caption\string#1| stuff.)
+% Furthermore we load the \package{ragged2e} package, if needed and available.
% \begin{macrocode}
-\newcommand*\caption@ragged[2]{%
+\newcommand*\caption@ragged{%
+ \caption@Info{We need ragged2e}%
+ \protected@write\@auxout{}{\string\caption@newlabel{ragged2e}{}}%
+ \global\let\caption@ragged\caption@@ragged
+ \caption@@ragged}
+% \end{macrocode}
+% \begin{macrocode}
+\newcommand*\caption@@ragged[2]{%
\@ifundefined{caption\string#1}{%
- \PackageWarning{caption}{%
- Cannot locate the `ragged2e' package, therefore\MessageBreak
+ \PackageWarning{caption3}{%
+ `ragged2e' package not loaded, therefore\MessageBreak
substituting \string#2 for \string#1\MessageBreak}%
\global\@namedef{caption\string#1}}{}%
#2}
% \end{macrocode}
% \begin{macrocode}
-\AtBeginDocument{\IfFileExists{ragged2e.sty}{%
- \RequirePackage{ragged2e}\let\caption@ragged\@firstoftwo}{}}
+\AtBeginDocument{%
+ \@ifundefined{caption@ragged2e}{}{%
+ \caption@Info{We load ragged2e}%
+ \IfFileExists{ragged2e.sty}{%
+ \RequirePackage{ragged2e}\let\caption@@ragged\@firstoftwo}{}%
+ }}
% \end{macrocode}
% \end{macro}
%
@@ -2900,6 +2993,15 @@
\DeclareCaptionFont{tt}{\ttfamily}
% \end{macrocode}
%
+% \subsubsection*{\package{setspace} package support}
+% \changes{v3.0p}{2007/04/02}{\package{setspace} package support added to kernel}
+%
+% \begin{macrocode}
+\DeclareCaptionFont{singlespacing}{\setstretch{\setspace@singlespace}}% normally 1
+\DeclareCaptionFont{onehalfspacing}{\onehalfspacing}
+\DeclareCaptionFont{doublespacing}{\doublespacing}
+% \end{macrocode}
+%
% \begin{macro}{\captionsize}
% \changes{v3.0a}{2004/01/23}{Implementation changed from \cs{captionfont} to \cs{@empty}}
% \changes{v3.0c}{2004/07/16}{Use \cs{providecommand} instead of \cs{newcommand} in respect of the memoir class}
@@ -3073,12 +3175,12 @@
% \end{macrocode}
%
% \subsubsection*{Debug option}
-% \changes{v3.1}{2007/03/04}{Debug option added to kernel}
+% \changes{v3.0m}{2007/03/04}{Debug option added to kernel}
%
% \begin{macrocode}
\DeclareCaptionOption{debug}[1]{%
\caption@setbool{debug}{#1}%
- \caption@ifbool{debug}{%
+ \caption@ifdebug{%
\def\caption@Debug{\PackageInfo{caption3}}%
}{%
\let\caption@Debug\@gobble
@@ -3089,7 +3191,8 @@
% \subsubsection*{Initialization of parameters}
%
% \begin{macrocode}
-\captionsetup{style=default,position=default,listof=1}
+\captionsetup{style=default,position=default,listof=1,%
+ twoside=\if@twoside 1\else 0\fi}
% \end{macrocode}
%
% \begin{macro}{\ifcaption@star}
@@ -3125,6 +3228,7 @@
% \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}
+% \changes{v3.0p}{2007/04/03}{Usage of \cs{caption@ifoddpage} added}
% |\caption@@make|\marg{caption label}\marg{caption text}
% \begin{macrocode}
\newcommand\caption@@make[2]{%
@@ -3145,7 +3249,10 @@
%
% \begin{macrocode}
\@tempdima\captionmargin
- \caption@ifh{\advance\@tempdima by \captionindent}%
+ \ifdim\captionmargin@=\z@\else
+ \caption@ifoddpage{}{\advance\@tempdima\captionmargin@}%
+ \fi
+ \caption@ifh{\advance\@tempdima\captionindent}%
\hskip\@tempdima
% \end{macrocode}
%
@@ -3182,7 +3289,9 @@
%
% \begin{macrocode}
\@tempdima\captionmargin
- \advance\@tempdima by \captionmarginx
+ \ifdim\captionmargin@=\z@\else
+ \caption@ifoddpage{\advance\@tempdima\captionmargin@}{}%
+ \fi
\hskip\@tempdima
% \end{macrocode}
%
@@ -3219,19 +3328,19 @@
\ifdim\captionwidth=\z@
\captionwidth\@tempdima
\advance\captionwidth by -2\captionmargin
- \advance\captionwidth by -\captionmarginx
+ \advance\captionwidth by -\captionmargin@
\else
\captionmargin\@tempdima
\advance\captionmargin by -\captionwidth
\divide\captionmargin by 2
- \captionmarginx\z@
+ \captionmargin@\z@
\fi
% \end{macrocode}
% \begin{macrocode}
\caption@Debug{%
\protect\hsize=\the\hsize,
\protect\margin=\the\captionmargin,
- \protect\marginx=\the\captionmarginx,
+ \protect\marginx=\the\captionmargin@,
\protect\width=\the\captionwidth}%
% \end{macrocode}
% \begin{macrocode}
@@ -3410,13 +3519,24 @@
%
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption}[2007/03/09 v3.0o Customising captions (AR)]
+\ProvidesPackage{caption}[2007/04/09 v3.0p Customising captions (AR)]
% \end{macrocode}
%
-% \subsubsection*{Loading the caption kernel}
+% \subsubsection*{Loading the kernel}
%
% \begin{macrocode}
\RequirePackage{caption3}[2007/01/31] % needs v3.0l or newer
+\def\caption@package{caption}%
+% \end{macrocode}
+%
+% \subsection*{Check against the obsolete \package{caption2} package}
+% \changes{v3.0p}{2007/04/06}{Check against obsolete \package{caption2} package added}
+%
+% \begin{macrocode}
+\@ifpackageloaded{caption2}{%
+ \caption@error{You can't use both the caption *and* caption2 package}%
+ \endinput
+}{}
% \end{macrocode}
%
% \subsubsection*{Option for configuration files}
@@ -3589,7 +3709,7 @@
% \begin{macrocode}
\DeclareCaptionOption{verbose}[1]{%
\caption@setbool{verbose}{#1}%
- \caption@ifbool{verbose}{%
+ \caption@ifverbose{%
\def\caption@Info{\PackageInfo{caption}}%
}{%
\let\caption@Info\@gobble
@@ -4414,6 +4534,7 @@
%
% \begin{macro}{\caption@ContinuedFloat}
% \changes{v3.0g}{2005/06/28}{Bugfix: \cs{newcounter} replaced by \cs{newcount}}
+% \changes{v3.0p}{2007/04/08}{\cs{newcount} replaced by \cs{caption@newcounter}}
% If |\theH|\meta{type} is defined, we extend it with |.|\meta{continue \#}.
% Furthermore we set |\caption@resetContinuedFloat| to |\@gobble| so the
% continuation counter will not be reset to zero inside |\caption|.
@@ -4421,11 +4542,11 @@
\def\caption@ContinuedFloat#1{%
\@ifundefined{theH#1}{}{%
\@ifundefined{CF@#1}{%
- \expandafter\newcount\csname CF@#1\endcsname
+ \expandafter\caption@newcounter\csname CF@#1\endcsname
\caption@resetContinuedFloat{#1}}{}%
- \global\advance\csname CF@#1\endcsname\@ne\relax
+ \expandafter\caption@stepcounter\csname CF@#1\endcsname
\expandafter\l@addto@macro\csname theH#1\endcsname{%
- .\expandafter\@arabic\csname CF@#1\endcsname}%
+ .\csname CF@#1\endcsname}%
\let\caption@resetContinuedFloat\@gobble
}}%
% \end{macrocode}
@@ -4435,7 +4556,8 @@
% If a continuation counter is defined, we reset it.
% \begin{macrocode}
\def\caption@resetContinuedFloat#1{%
- \@ifundefined{CF@#1}{}{\global\csname CF@#1\endcsname\z@\relax}}%
+ \@ifundefined{CF@#1}{}{%
+ \expandafter\caption@setcounter\csname CF@#1\endcsname0}}%
% \end{macrocode}
% \end{macro}
%
@@ -4446,11 +4568,13 @@
% \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}
+% \changes{v3.0p}{2007/04/09}{Adapted to \package{hypcap} v1.7}
%
% When the \package{hypcap} package is used the following problems occur:
% \begin{enumerate}
% \item The \package{hypcap} package uses |\capstart|, |\hc@caption|, and
-% |\hc@@caption| instead of |\caption| and |\@caption|.
+% |\hc@@caption| instead of |\caption| and |\@caption|.\footnote{This issue
+% was fixed in \package{hypcap} \version{1.7}}
% So we have to patch these macros, too.
% \item |\caption| will be saved to |\hc@org@caption| when the
% \package{hypcap} package is loaded.
@@ -4501,6 +4625,8 @@
\let\H@refstepcounter\@gobble
\Hy@hypertexnamesfalse
\caption@capstart
+ \@ifundefined{hc@hyperref}{}{% hypcap v1.7
+ \global\advance\csname c@\@captype\endcsname\@ne}%
\global\let\hc@currentHref\@currentHref
\endgroup
% \end{macrocode}
@@ -4514,12 +4640,21 @@
% Additionally we increase the float counter here (since we have suppressed this
% in |\capstart|) and use |\caption@caption| here, so |\caption*| will work as
% expected.
+% (This is surrounded by |\hc@hyperref| so it does not make any harm when used
+% with \package{hypcap} \version{1.7}.)
% \begin{macrocode}
- \def\caption{%
+ \@ifundefined{hc@hyperref}%
+ {\let\next\@firstofone}{\let\next\hc@hyperref}% hypcap v1.7
+ \next{\def\caption{%
\let\caption\hc@org@caption
\H@refstepcounter\@captype
+ \@ifundefined{hc@hyperref}{}{% hypcap v1.7
+ \global\advance\csname c@\@captype\endcsname\m@ne}%
\caption@caption\hc@caption}}%
% \end{macrocode}
+% \begin{macrocode}
+ }%
+% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\hc@@caption}
diff --git a/Master/texmf-dist/source/latex/caption/caption2.dtx b/Master/texmf-dist/source/latex/caption/caption2.dtx
index 12e7ed056a2..d2b92bce82f 100644
--- a/Master/texmf-dist/source/latex/caption/caption2.dtx
+++ b/Master/texmf-dist/source/latex/caption/caption2.dtx
@@ -23,7 +23,7 @@
% caption.sty, caption2.sty, caption3.sty, and manual.tex.
%
% \fi
-% \CheckSum{843}
+% \CheckSum{837}
%
% \iffalse
%<*driver>
@@ -39,7 +39,7 @@
\fi
\fi
%
-\usepackage{caption2}[2004/04/16]
+\usepackage{caption2}[2007/04/06]
%
%<+driver>\OnlyDescription
%
@@ -59,21 +59,22 @@
% \title{The \thispackage\ package\thanks{This package has version number
% \fileversion, last revised \filedate.}}
% \author{Axel Sommerfeldt\\\texttt{caption@sommerfee.de}}
-% \date{2005/11/02}
+% \date{2007/04/06}
% \maketitle
%
-% \changes{v2.0}{ 9 Oct 95}{New experimental version: Many new commands and features}
-% \changes{v2.0}{ 9 Oct 95}{Support of the longtable package added}
-% \changes{v2.1}{20 Feb 02}{Revised: New commands and options}
-% \changes{v2.1}{26 Feb 02}{Adapted to version 2.1 of the subfigure package}
-% \changes{v2.1a}{12 Nov 03}{Some minor bug fixes and improved compatibility to v2.0}
-% \changes{v2.1b}{16 Apr 04}{Some minor bug fixes and improved compatibility to v2.0}
-% \changes{v2.1c}{10 May 04}{Some minor bug fixes and improved compatibility to v2.0}
-% \changes{v2.1d}{ 3 Oct 05}{Some superfluous brackets removed; warning added}
+% \changes{v2.0}{1995/10/09}{New experimental version: Many new commands and features}
+% \changes{v2.0}{1995/10/09}{Support of the longtable package added}
+% \changes{v2.1}{2002/02/20}{Revised: New commands and options}
+% \changes{v2.1}{2002/02/26}{Adapted to version 2.1 of the subfigure package}
+% \changes{v2.1a}{2003/11/12}{Some minor bug fixes and improved compatibility to v2.0}
+% \changes{v2.1b}{2004/04/16}{Some minor bug fixes and improved compatibility to v2.0}
+% \changes{v2.1c}{2004/05/10}{Some minor bug fixes and improved compatibility to v2.0}
+% \changes{v2.1d}{2005/10/03}{Some superfluous brackets removed; warning added}
+% \changes{v2.2}{2007/04/06}{Uses the caption3 kernel now}
%
% \providecommand\LaTeXcomp{The \LaTeX{} Companion}
%
-% \section*{This package is obsolete!}
+% \section*{THIS PACKAGE IS OBSOLETE!}
%
% The \package{caption2} package used to be an experimental side-version of
% the regular \package{caption} package. It was made public as beta test version
@@ -111,7 +112,9 @@
% commands of the \package{caption2} package.
% If you get some errors or wired results afterwards, please take a closer
% look at the \package{caption} package documentation which will hopefully
-% help you clearing these problems.
+% help you clearing these problems. You will also find a section called
+% `Compatibility to older versions' there which should help you with the
+% migration process.
% If all this should fail you can write me an e-mail asking for help.
%
% \section*{What will happen to this package?}
@@ -123,7 +126,9 @@
% of foreign packages.
%
% This means migrating to the actual \package{caption} package should not be
-% necessary for old documents.
+% necessary for old documents -- they should still compile fine as they are.
+% If they don't please don't hesitate to write me an e-mail asking for
+% maintainance.
%
% \StopEventually{}
%
@@ -178,22 +183,29 @@
%
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption2}[2005/10/03 v2.1d Customising captions (AS)]
+\ProvidesPackage{caption2}[2007/04/06 v2.2 Customising captions (AS)]
\PackageWarning{caption2}{%
- THIS PACKAGE IS OBSOLETE, PLEASE USE caption INSTEAD}
+ *** THIS PACKAGE IS OBSOLETE, PLEASE USE caption ***}
% \end{macrocode}
%
-% \subsection{Preliminary declarations}
+% \subsection{Loading the caption3 kernel}
%
-% \begin{macro}{\captionfont}
-% \begin{macro}{\captionlabelfont}
-% \cs{captionfont} and \cs{captionlabelfont} will hold the font specifications for the caption.
% \begin{macrocode}
-\newcommand*\captionfont{}
-\newcommand*\captionlabelfont{}
+\RequirePackage{caption3}[2007/03/04] % needs v3.0m or newer
+\def\caption@package{caption2}
% \end{macrocode}
-% \end{macro}
-% \end{macro}
+%
+% \subsection{Check against the regular \package{caption} package}
+% \changes{v2.2}{2007/04/06}{Check against regular \package{caption} package added}
+%
+% \begin{macrocode}
+\@ifpackageloaded{caption}{%
+ \caption@error{You can't use both the caption *and* caption2 package}%
+ \endinput
+}{}
+% \end{macrocode}
+%
+% \subsection{Preliminary declarations}
%
% \begin{macro}{\captionlabeldelim}
% \begin{macro}{\captionlabelsep}
@@ -208,75 +220,62 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}{\captionsize}
-% The macro \cs{captionsize} is obsolete since v1.4 of the \textsf{caption} package,
-% but we still support it to provide backward compatibility.
-% \begin{macrocode}
-\newcommand*\captionsize{}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\captionmargin}
-% \begin{macro}{\captionwidth}
% \begin{macro}{\ifcaptionwidth}
% Either \cs{captionmargin} (with specifies an extra margin) or \cs{captionwidth}
% (with specifies an explicit width) can be set, therefore we need the flag \cs{ifcaptionwidth}
% to determine with parameter we should pay attention to.
% \begin{macrocode}
-\newdimen\captionmargin
-\newdimen\captionwidth
-\newif\ifcaptionwidth
+\newcommand*\ifcaptionwidth{\ifdim\captionwidth>\z@}
% \end{macrocode}
% \end{macro}
-% \end{macro}
-% \end{macro}
%
-% \begin{macro}{\captionindent}
-% \cs{captionindent} will be used in caption style \texttt{indent} and specifies the indention
-% after the first line.
+% \changes{v2.1}{2002/02/20}{New ifs \cs{ifcaptionlabel} and \cs{ifignoreLTcapwidth}}
% \begin{macrocode}
-\newdimen\captionindent
+\newif\ifcaption@temp
% \end{macrocode}
-% \end{macro}
%
% \begin{macro}{\ifcaptionlabel}
-% \begin{macro}{\ifonelinecaptions}
-% \begin{macro}{\ifignoreLTcapwidth}
-% More flags. If \cs{ifcaptionlabel} is not set the caption label should be suppressed;
+% If \cs{ifcaptionlabel} is not set the caption label should be suppressed;
% we need this flag to support the \cs{caption*} command.
+% \changes{v2.2}{2007/04/06}{New definition, based on \cs{ifcaption@star}}
+% \begin{macrocode}
+\def\ifcaptionlabel{%
+ \ifcaption@star
+ \caption@tempfalse
+ \else
+ \caption@temptrue
+ \fi
+ \ifcaption@temp}
+\def\captionlabeltrue{\caption@starfalse}
+\def\captionlabelfalse{\caption@startrue}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\ifonelinecaptions}
% If \cs{ifonelinecaptions} is set we support the \LaTeX\ base style 'one line captions',
% that means the caption will be typeset centered if it fits to one line.
-% If \cs{ifignoreLTcapwidth} is set we ignore the \cs{LTcapwidth} of \textsf{longtable}.
-% \changes{v2.1}{20 Feb 02}{New ifs \cs{ifcaptionlabel} and \cs{ifignoreLTcapwidth}}
+% \changes{v2.2}{2007/04/06}{New definition, based on \cs{caption@ifslc}}
% \begin{macrocode}
-\newif\ifcaptionlabel\captionlabeltrue
-\newif\ifonelinecaptions
-\newif\ifignoreLTcapwidth
+\def\ifonelinecaptions{%
+ \caption@ifslc{\caption@temptrue}{\caption@tempfalse}%
+ \ifcaption@temp}
+\def\onelinecaptionstrue{\caption@setbool{slc}{1}}
+\def\onelinecaptionsfalse{\caption@setbool{slc}{0}}
% \end{macrocode}
% \end{macro}
-% \end{macro}
-% \end{macro}
%
-% \begin{macro}{\setcaptionmargin}
-% \begin{macro}{\setcaptionwidth}
-% User-friendly commands to set the caption margin resp.\ width.
-% Note that they additionally set the \cs{ifcaptionwidth} flag.
+% \begin{macro}{\ifignoreLTcapwidth}
+% If \cs{ifignoreLTcapwidth} is set we ignore the \cs{LTcapwidth} of \textsf{longtable}.
% \begin{macrocode}
-\newcommand*\setcaptionmargin{%
- \captionwidthfalse
- \setlength\captionmargin}
-\newcommand*\setcaptionwidth{%
- \captionwidthtrue
- \setlength\captionwidth}
+\newif\ifignoreLTcapwidth
% \end{macrocode}
% \end{macro}
-% \end{macro}
%
% \begin{macro}{\normalcaptionparams}
% \cs{normalcaptionparams} resets all caption related parameters to it's normal default values.
% \cs{captionfont} will be set to \cs{captionsize} so setting the obsolete \cs{captionsize} will still work.
% Same story with \cs{captiondelim} and the obsolete \cs{captionlabeldelim}.
-% \changes{v2.1}{29 Jan 02}{New command \cs{normalcaptionparams}}
+% \changes{v2.1}{2002/01/29}{New command \cs{normalcaptionparams}}
% \begin{macrocode}
\newcommand*\normalcaptionparams{%
\let\captionsize\@empty
@@ -284,21 +283,12 @@
\let\captionlabelfont\@empty
\renewcommand*\captionlabeldelim{:}%
\renewcommand*\captionlabelsep{\space}%
- \setcaptionmargin\z@\setlength\captionindent\z@
+ \setcaptionmargin\z@
+ \setlength\captionindent\z@
\onelinecaptionstrue}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\caption@eh}
-% Some commands will produce an error message, use this as help text.
-% \begin{macrocode}
-\newcommand*\caption@eh{%
- If you do not understand this error, please take a closer look\MessageBreak
- at the documentation of the `caption2' package.\MessageBreak
- \@ehc}
-% \end{macrocode}
-% \end{macro}
-%
% \begin{macro}{\defcaptionstyle}
% \begin{macro}{\newcaptionstyle}
% \begin{macro}{\renewcaptionstyle}
@@ -397,30 +387,31 @@
% Our predefined caption styles. \cs{caption@makecaption} takes the style
% name as parameter, it does the common stuff and calls a macro
% (build out of the style name) to do the uncommon stuff if neccessary.
-% \changes{v2.1}{26 Feb 02}{Renamed from \cs{caption@make} to \cs{caption@makecaption}}
-% \changes{v2.1b}{16 Apr 04}{We offer and use \cs{caption@make}, again}
-% \changes{v2.1c}{10 May 04}{Bugfix: Extra \cs{par} added}
+% \changes{v2.1}{2002/02/26}{Renamed from \cs{caption@make} to \cs{caption@makecaption}}
+% \changes{v2.1b}{2004/04/16}{We offer and use \cs{caption@make}, again}
+% \changes{v2.1c}{2004/05/10}{Bugfix: Extra \cs{par} added}
% \begin{macrocode}
\newcommand*\caption@makecaption[1]{%
\usecaptionmargin
-%
+% \end{macrocode}
+% \begin{macrocode}
\ifcaptionlabel
\def\caption@label{%
{\captionlabelfont\captionlabel\captionlabeldelim}\captionlabelsep}%
\else
\let\caption@label\@empty
\fi
-%
+% \end{macrocode}
+% \begin{macrocode}
\captionfont
\onelinecaption
{\caption@label\captiontext}%
{\parbox[b]\captionlinewidth{\strut\@nameuse{caption@@@#1}\par}\par}}
-\newcommand*\caption@make{\caption@makecaption}
% \end{macrocode}
% \end{macro}
%
-% \changes{v2.1}{26 Feb 02}{Removed all extra parboxes from caption styles}
-% \changes{v2.1a}{12 Nov 03}{\ldots and put the parbox into \cs{caption@makecaption} instead}
+% \changes{v2.1}{2002/02/26}{Removed all extra parboxes from caption styles}
+% \changes{v2.1a}{2003/11/12}{\ldots and put the parbox into \cs{caption@makecaption} instead}
%
% \begin{macro}{\caption@@@normal}
% The `normal' caption style. Just typeset caption (label \& text) as paragraph.
@@ -443,13 +434,10 @@
% The idea how to do this was taken from Br\"uggemann-Klein\cite{Anne},
% it is also mentioned in Kopka\cite[p227]{Kopka-E}.
% \begin{macrocode}
-\newcommand*\caption@centerlast{%
- \advance\leftskip by 0pt plus 1fil%
- \advance\rightskip by 0pt plus -1fil%
- \parfillskip0pt plus 2fil\relax}
-%
+% \end{macrocode}
+% \begin{macrocode}
\newcommand*\caption@@@centerlast{%
- \caption@centerlast\caption@label\captiontext}
+ \centerlast\caption@label\captiontext}
% \end{macrocode}
% \end{macro}
%
@@ -478,7 +466,8 @@
\sbox\@tempboxa{\caption@label}%
\hangindent\wd\@tempboxa\noindent
\usebox\@tempboxa\caption@hangplus\captiontext}
-%
+% \end{macrocode}
+% \begin{macrocode}
\newcommand*\caption@hangplus{}
% \end{macrocode}
% \end{macro}
@@ -496,7 +485,7 @@
% The `hang+flushleft' caption style.
% \begin{macrocode}
\newcommand*\caption@@@hang@centerlast{%
- \let\caption@hangplus\caption@centerlast\caption@@@hang}
+ \let\caption@hangplus\centerlast\caption@@@hang}
% \end{macrocode}
% \end{macro}
%
@@ -605,24 +594,24 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}{\caption@package}
+% \begin{macro}{\caption@setpackage}
% A helper macro, a value of 1 within parameter \#2 will activate the support
% of the package given in parameter \#1, a value of 0 will deactivate it.
% \begin{macrocode}
-\newcommand*\caption@package[1]{\@namedef{caption@pkt@#1}}
+\newcommand*\caption@setpackage[1]{\@namedef{caption@pkt@#1}}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{float}
% \begin{macro}{longtable}
% \begin{macro}{subfigure}
-% \changes{v2.1}{19 Feb 02}{New options for interaction with other packages}
+% \changes{v2.1}{2002/02/19}{New options for interaction with other packages}
% These options will enable or suppress the support of the packages
% \textsf{float}, \textsf{longtable}, and \textsf{subfigure}.
% \begin{macrocode}
-\DeclareOption{float}{\caption@twozerofalse\caption@package{float}{1}}
-\DeclareOption{longtable}{\caption@twozerofalse\caption@package{longtable}{1}}
-\DeclareOption{subfigure}{\caption@twozerofalse\caption@package{subfigure}{1}}
+\DeclareOption{float}{\caption@twozerofalse\caption@setpackage{float}{1}}
+\DeclareOption{longtable}{\caption@twozerofalse\caption@setpackage{longtable}{1}}
+\DeclareOption{subfigure}{\caption@twozerofalse\caption@setpackage{subfigure}{1}}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -633,8 +622,8 @@
% These options will enable or suppress the support of all the above packages.
% \begin{macrocode}
\DeclareOption{none}{\caption@twozerofalse
- \caption@package{float}{0}\caption@package{longtable}{0}%
- \caption@package{subfigure}{0}}
+ \caption@setpackage{float}{0}\caption@setpackage{longtable}{0}%
+ \caption@setpackage{subfigure}{0}}
\DeclareOption{all}{\ExecuteOptions{float,longtable,subfigure}}
% \end{macrocode}
% \end{macro}
@@ -664,7 +653,7 @@
% \begin{macro}{debug}
% This option will put additional debug information in the log file.
% \begin{macrocode}
-\DeclareOption{debug}{\caption@debugtrue}
+\DeclareOption{debug}{\captionsetup{debug}}
% \end{macrocode}
% \end{macro}
%
@@ -672,9 +661,8 @@
% (If \cs{caption@twozero} is set to true (default) we will emulate the package
% load algorithm of \textsf{caption} v2.0: If the package is already loaded
% patch it, otherwise do nothing.)
-% \changes{v2.1}{19 Feb 02}{\cs{ProcessOptions} changed to \cs{ProcessOptions*}}
+% \changes{v2.1}{2002/02/19}{\cs{ProcessOptions} changed to \cs{ProcessOptions*}}
% \begin{macrocode}
-\newif\ifcaption@debug
\newif\ifcaption@twozero
\normalcaptionparams
\ExecuteOptions{none,normal}
@@ -692,7 +680,7 @@
% \cs{captionof} resp.\ \cs{captionof*} will just set \cs{@captype} and do the normal
% \cs{caption} resp.\ \cs{caption*}, so we can also typeset captions outside floating
% environments.
-% \changes{v2.1}{19 Feb 02}{New commands \cs{captionof} and \cs{captionof*}}
+% \changes{v2.1}{2002/02/19}{New commands \cs{captionof} and \cs{captionof*}}
% \begin{macrocode}
\def\captionof{\@ifstar{\caption@of{\caption*}}{\caption@of\caption}}
\newcommand*\caption@of[2]{\def\@captype{#2}#1}
@@ -704,7 +692,7 @@
% \begin{macro}{\belowcaptionskip}
% Not all document classes define \cs{abovecaptionskip} and \cs{belowcaptionskip}
% (like \textsf{ucthesis}), so we do it here if not already done.
-% \changes{v2.1}{19 Feb 02}{\cs{abovecaptionskip} and \cs{belowcaptionskip} will be defined if neccessary}
+% \changes{v2.1}{2002/02/19}{\cs{abovecaptionskip} and \cs{belowcaptionskip} will be defined if neccessary}
% \begin{macrocode}
\@ifundefined{abovecaptionskip}{%
\newlength\abovecaptionskip\setlength\abovecaptionskip{10\p@}}{}
@@ -715,8 +703,8 @@
% \end{macro}
%
% \begin{macro}{\captionlinewidth}
-% \changes{v2.1}{26 Feb 02}{Renamed from \cs{realcaptionwidth} to \cs{captionlinewidth}}
-% \changes{v2.1a}{12 Nov 03}{We offer \cs{realcaptionwidth}, again}
+% \changes{v2.1}{2002/02/26}{Renamed from \cs{realcaptionwidth} to \cs{captionlinewidth}}
+% \changes{v2.1a}{2003/11/12}{We offer \cs{realcaptionwidth}, again}
% \begin{macro}{\captionlabel}
% \begin{macro}{\captiontext}
% These values are only set and used within the caption code itself.
@@ -780,7 +768,8 @@
% First we check if we are inside a caption -- if \cs{captiontext} is undefined we are not.
% If we are we call the appropriate caption definition.
%
-% \changes{v2.1b}{16 Apr 04}{Missing percent added (and extra space removed)}
+% \changes{v2.1b}{2004/04/16}{Missing percent added (and extra space removed)}
+% \changes{v2.2}{2007/04/06}{\cs{let}\cs{caption@make}\cs{caption@makecaption} added}
% \begin{macrocode}
\newcommand*\usecaptionstyle[1]{%
\@ifundefined{captiontext}{%
@@ -792,7 +781,8 @@
}{%
\@ifundefined{caption@@#1}%
{\PackageError{caption2}{Caption style `#1' undefined}{\caption@eh}}%
- {\@nameuse{caption@@#1}}%
+ {\let\caption@make\caption@makecaption
+ \@nameuse{caption@@#1}}%
}}
% \end{macrocode}
% \end{macro}
@@ -818,16 +808,16 @@
%
% \subsection{Support of other packages}
%
-% \begin{macro}{\caption@package}
+% \begin{macro}{\caption@ifpackage}
% This macro will execute the code needed to support the package
% named within argument \#1. The parameter \#2 is the command
% which shows if the package is loaded -- it is defined, it is
% already loaded, otherwise not. The parameter \#3 contains code
% which will be executed if no support is required -- this is for
% cleanup purposes. The final parameter \#4 contains the code itself.
-% \changes{v2.1c}{9 May 04}{Compatibility warning removed}
+% \changes{v2.1c}{2004/05/09}{Compatibility warning removed}
% \begin{macrocode}
-\renewcommand*\caption@package[3]{%
+\newcommand*\caption@ifpackage[3]{%
\if1\@nameuse{caption@pkt@#1}%
\@ifundefined{#2}%
{\let\next\AtBeginDocument}%
@@ -840,12 +830,11 @@
#3\let\next\@gobble
\fi\fi
\expandafter\let\csname caption@pkt@#1\endcsname\undefined
- \ifcaption@debug
+ \caption@ifdebug{%
\ifx\next\@gobble\PackageInfo{caption2}{#1 => gobble}%
\else\ifx\next\@firstofone\PackageInfo{caption2}{#1 => firstofone}%
\else\ifx\next\AtBeginDocument\PackageInfo{caption2}{#1 => AtBeginDocument}%
- \fi\fi\fi
- \fi
+ \fi\fi\fi}{}%
\next}
% \end{macrocode}
% \end{macro}
@@ -853,7 +842,7 @@
% \subsubsection{Support of the \puresf{float} package}
%
% \begin{macrocode}
-\caption@package{float}{floatc@plain}{}{%
+\caption@ifpackage{float}{floatc@plain}{}{%
\ifx\floatc@plain\relax
\PackageWarning{caption2}{%
Option `float' was set but there is no float package loaded}
@@ -872,7 +861,7 @@
% So we test if a \cs{captionlabelfont} has been set by the user -- if not
% \cs{@fs@cfont} will be used, otherwise \cs{captionlabelfont}.
%
-% \changes{v2.1b}{19 Mar 04}{\cs{realcaptionwidth}$=$\cs{hsize} was missing here}
+% \changes{v2.1b}{2004/03/19}{\cs{realcaptionwidth}$=$\cs{hsize} was missing here}
% \begin{macrocode}
\newcommand\caption@floatc[3]{%
\ifx\captionlabelfont\@empty
@@ -914,7 +903,8 @@
{\@fs@cfont\captionlabel}\space%
\fi\captiontext\par}%
\fi
-%
+% \end{macrocode}
+% \begin{macrocode}
\renewcommand*\floatc@ruled{\caption@floatc{ruled}}
% \end{macrocode}
% \end{macro}
@@ -967,7 +957,7 @@
% \subsubsection{Support of the \puresf{longtable} package}
%
% \begin{macrocode}
-\caption@package{longtable}{LT@makecaption}{}{%
+\caption@ifpackage{longtable}{LT@makecaption}{}{%
\ifx\LT@makecaption\relax
\PackageWarning{caption2}{%
Option `longtable' was set but there is no longtable package loaded}
@@ -996,7 +986,8 @@
% and |\@firstofone| otherwise.)
% \begin{macrocode}
\dummycaptionstyle{longtable}{}
-%
+% \end{macrocode}
+% \begin{macrocode}
\renewcommand\LT@makecaption[3]{%
\LT@mcol\LT@cols c{\hbox to\z@{\hss\parbox[t]\hsize{%
\ifignoreLTcapwidth
@@ -1115,7 +1106,7 @@
% the helper macros in the garbage can.
%
% \begin{macrocode}
-\caption@package{subfigure}{@makesubfigurecaption}{%
+\caption@ifpackage{subfigure}{@makesubfigurecaption}{%
\let\setsubcapstyle\undefined
\let\caption@makesubcaption\undefined}{%
\ifx\@makesubfigurecaption\relax
@@ -1154,11 +1145,11 @@
% Note: \cs{subfigcapmargin} is a command in v2.0 of \textsf{subfigure}.
% So we make \cs{subfigcapwidth} a command, too.
% \begin{macrocode}
- \newcommand*\subfigcapwidth{\z@}
- \newcommand*\setsubcapmargin{%
+ \newcommand\subfigcapwidth{\z@}
+ \newcommand\setsubcapmargin{%
\subfigcapwidthfalse
\renewcommand*\subfigcapmargin}
- \newcommand*\setsubcapwidth{%
+ \newcommand\setsubcapwidth{%
\subfigcapwidthtrue
\renewcommand*\subfigcapwidth}
% \end{macrocode}
@@ -1169,7 +1160,7 @@
% \begin{macro}{\subcaplabelsep}
% Analogous to \cs{captionlabelsep} we define \cs{subcaplabelsep}.
% \begin{macrocode}
- \newcommand*\subcaplabelsep{\space}
+ \newcommand\subcaplabelsep{\space}
% \end{macrocode}
% \end{macro}
%
@@ -1196,10 +1187,10 @@
% So we make \cs{subfigcapwidth} a length, too.
% \begin{macrocode}
\newdimen\subfigcapwidth
- \newcommand*\setsubcapmargin{%
+ \newcommand\setsubcapmargin{%
\subfigcapwidthfalse
\setlength\subfigcapmargin}
- \newcommand*\setsubcapwidth{%
+ \newcommand\setsubcapwidth{%
\subfigcapwidthtrue
\setlength\subfigcapwidth}
% \end{macrocode}
@@ -1210,7 +1201,7 @@
% \begin{macro}{\subcaplabelsep}
% Analogous to \cs{captionlabelsep} we define \cs{subcaplabelsep}.
% \begin{macrocode}
- \newcommand*\subcaplabelsep{\hskip\subfiglabelskip}
+ \newcommand\subcaplabelsep{\hskip\subfiglabelskip}
% \end{macrocode}
% \end{macro}
%
@@ -1235,7 +1226,7 @@
% \begin{macrocode}
\newif\ifsubfigcapwidth
\newdimen\subcapindent
- \newcommand*\subcaplabeldelim{}
+ \newcommand\subcaplabeldelim{}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1287,7 +1278,7 @@
% That's all folks!
%
% \begin{macrocode}
-\let\caption@package\undefined
+\let\caption@ifpackage\undefined
% \end{macrocode}
%
% \iffalse
diff --git a/Master/texmf-dist/tex/latex/caption/caption.sty b/Master/texmf-dist/tex/latex/caption/caption.sty
index cf8c40c921a..9fac17f8caf 100644
--- a/Master/texmf-dist/tex/latex/caption/caption.sty
+++ b/Master/texmf-dist/tex/latex/caption/caption.sty
@@ -27,8 +27,13 @@
%% caption.sty, caption2.sty, caption3.sty, and manual.tex.
%%
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption}[2007/03/09 v3.0o Customising captions (AR)]
+\ProvidesPackage{caption}[2007/04/09 v3.0p Customising captions (AR)]
\RequirePackage{caption3}[2007/01/31] % needs v3.0l or newer
+\def\caption@package{caption}%
+\@ifpackageloaded{caption2}{%
+ \caption@error{You can't use both the caption *and* caption2 package}%
+ \endinput
+}{}
\DeclareCaptionOption{config}[caption]{%
\InputIfFileExists{#1.cfg}{\typeout{*** Local configuration file
#1.cfg used ***}}%
@@ -104,7 +109,7 @@
\caption@declarepackage{supertabular}
\DeclareCaptionOption{verbose}[1]{%
\caption@setbool{verbose}{#1}%
- \caption@ifbool{verbose}{%
+ \caption@ifverbose{%
\def\caption@Info{\PackageInfo{caption}}%
}{%
\let\caption@Info\@gobble
@@ -294,15 +299,16 @@
\def\caption@ContinuedFloat#1{%
\@ifundefined{theH#1}{}{%
\@ifundefined{CF@#1}{%
- \expandafter\newcount\csname CF@#1\endcsname
+ \expandafter\caption@newcounter\csname CF@#1\endcsname
\caption@resetContinuedFloat{#1}}{}%
- \global\advance\csname CF@#1\endcsname\@ne\relax
+ \expandafter\caption@stepcounter\csname CF@#1\endcsname
\expandafter\l@addto@macro\csname theH#1\endcsname{%
- .\expandafter\@arabic\csname CF@#1\endcsname}%
+ .\csname CF@#1\endcsname}%
\let\caption@resetContinuedFloat\@gobble
}}%
\def\caption@resetContinuedFloat#1{%
- \@ifundefined{CF@#1}{}{\global\csname CF@#1\endcsname\z@\relax}}%
+ \@ifundefined{CF@#1}{}{%
+ \expandafter\caption@setcounter\csname CF@#1\endcsname0}}%
}
\caption@ifpackage{hypcap}{hc@caption}{%
\caption@Info{hypcap package v1.0 (or newer) detected}%
@@ -313,12 +319,19 @@
\let\H@refstepcounter\@gobble
\Hy@hypertexnamesfalse
\caption@capstart
+ \@ifundefined{hc@hyperref}{}{% hypcap v1.7
+ \global\advance\csname c@\@captype\endcsname\@ne}%
\global\let\hc@currentHref\@currentHref
\endgroup
- \def\caption{%
+ \@ifundefined{hc@hyperref}%
+ {\let\next\@firstofone}{\let\next\hc@hyperref}% hypcap v1.7
+ \next{\def\caption{%
\let\caption\hc@org@caption
\H@refstepcounter\@captype
+ \@ifundefined{hc@hyperref}{}{% hypcap v1.7
+ \global\advance\csname c@\@captype\endcsname\m@ne}%
\caption@caption\hc@caption}}%
+ }%
\let\caption@hc@@caption\hc@@caption
\long\def\hc@@caption#1[#2]#3{%
\caption@beginex{#1}{#2}{#3}%
diff --git a/Master/texmf-dist/tex/latex/caption/caption2.sty b/Master/texmf-dist/tex/latex/caption/caption2.sty
index 02197eb69e7..0fd4bd37639 100644
--- a/Master/texmf-dist/tex/latex/caption/caption2.sty
+++ b/Master/texmf-dist/tex/latex/caption/caption2.sty
@@ -27,39 +27,43 @@
%% caption.sty, caption2.sty, caption3.sty, and manual.tex.
%%
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption2}[2005/10/03 v2.1d Customising captions (AS)]
+\ProvidesPackage{caption2}[2007/04/06 v2.2 Customising captions (AS)]
\PackageWarning{caption2}{%
- THIS PACKAGE IS OBSOLETE, PLEASE USE caption INSTEAD}
-\newcommand*\captionfont{}
-\newcommand*\captionlabelfont{}
+ *** THIS PACKAGE IS OBSOLETE, PLEASE USE caption ***}
+\RequirePackage{caption3}[2007/03/04] % needs v3.0m or newer
+\def\caption@package{caption2}
+\@ifpackageloaded{caption}{%
+ \caption@error{You can't use both the caption *and* caption2 package}%
+ \endinput
+}{}
\newcommand*\captionlabeldelim{}
\newcommand*\captionlabelsep{}
-\newcommand*\captionsize{}
-\newdimen\captionmargin
-\newdimen\captionwidth
-\newif\ifcaptionwidth
-\newdimen\captionindent
-\newif\ifcaptionlabel\captionlabeltrue
-\newif\ifonelinecaptions
+\newcommand*\ifcaptionwidth{\ifdim\captionwidth>\z@}
+\newif\ifcaption@temp
+\def\ifcaptionlabel{%
+ \ifcaption@star
+ \caption@tempfalse
+ \else
+ \caption@temptrue
+ \fi
+ \ifcaption@temp}
+\def\captionlabeltrue{\caption@starfalse}
+\def\captionlabelfalse{\caption@startrue}
+\def\ifonelinecaptions{%
+ \caption@ifslc{\caption@temptrue}{\caption@tempfalse}%
+ \ifcaption@temp}
+\def\onelinecaptionstrue{\caption@setbool{slc}{1}}
+\def\onelinecaptionsfalse{\caption@setbool{slc}{0}}
\newif\ifignoreLTcapwidth
-\newcommand*\setcaptionmargin{%
- \captionwidthfalse
- \setlength\captionmargin}
-\newcommand*\setcaptionwidth{%
- \captionwidthtrue
- \setlength\captionwidth}
\newcommand*\normalcaptionparams{%
\let\captionsize\@empty
\renewcommand*\captionfont{\captionsize}%
\let\captionlabelfont\@empty
\renewcommand*\captionlabeldelim{:}%
\renewcommand*\captionlabelsep{\space}%
- \setcaptionmargin\z@\setlength\captionindent\z@
+ \setcaptionmargin\z@
+ \setlength\captionindent\z@
\onelinecaptionstrue}
-\newcommand*\caption@eh{%
- If you do not understand this error, please take a closer look\MessageBreak
- at the documentation of the `caption2' package.\MessageBreak
- \@ehc}
\newcommand*\defcaptionstyle[1]{%
\@namedef{caption@@#1}}
\newcommand*\newcaptionstyle[1]{%
@@ -118,17 +122,12 @@
\onelinecaption
{\caption@label\captiontext}%
{\parbox[b]\captionlinewidth{\strut\@nameuse{caption@@@#1}\par}\par}}
-\newcommand*\caption@make{\caption@makecaption}
\newcommand*\caption@@@normal{%
\caption@label\captiontext}
\newcommand*\caption@@@center{%
\centering\caption@label\captiontext}%
-\newcommand*\caption@centerlast{%
- \advance\leftskip by 0pt plus 1fil%
- \advance\rightskip by 0pt plus -1fil%
- \parfillskip0pt plus 2fil\relax}
\newcommand*\caption@@@centerlast{%
- \caption@centerlast\caption@label\captiontext}
+ \centerlast\caption@label\captiontext}
\newcommand*\caption@@@flushleft{%
\raggedright\caption@label\captiontext}%
\newcommand*\caption@@@flushright{%
@@ -141,7 +140,7 @@
\newcommand*\caption@@@hang@center{%
\let\caption@hangplus\centering\caption@@@hang}
\newcommand*\caption@@@hang@centerlast{%
- \let\caption@hangplus\caption@centerlast\caption@@@hang}
+ \let\caption@hangplus\centerlast\caption@@@hang}
\newcommand*\caption@@@hang@flushleft{%
\let\caption@hangplus\raggedright\caption@@@hang}
\newcommand*\caption@@@indent{%
@@ -176,20 +175,19 @@
\DeclareOption{tt}{\g@addto@macro\captionlabelfont\ttfamily}
\DeclareOption{oneline}{\onelinecaptionstrue}
\DeclareOption{nooneline}{\onelinecaptionsfalse}
-\newcommand*\caption@package[1]{\@namedef{caption@pkt@#1}}
-\DeclareOption{float}{\caption@twozerofalse\caption@package{float}{1}}
-\DeclareOption{longtable}{\caption@twozerofalse\caption@package{longtable}{1}}
-\DeclareOption{subfigure}{\caption@twozerofalse\caption@package{subfigure}{1}}
+\newcommand*\caption@setpackage[1]{\@namedef{caption@pkt@#1}}
+\DeclareOption{float}{\caption@twozerofalse\caption@setpackage{float}{1}}
+\DeclareOption{longtable}{\caption@twozerofalse\caption@setpackage{longtable}{1}}
+\DeclareOption{subfigure}{\caption@twozerofalse\caption@setpackage{subfigure}{1}}
\DeclareOption{none}{\caption@twozerofalse
- \caption@package{float}{0}\caption@package{longtable}{0}%
- \caption@package{subfigure}{0}}
+ \caption@setpackage{float}{0}\caption@setpackage{longtable}{0}%
+ \caption@setpackage{subfigure}{0}}
\DeclareOption{all}{\ExecuteOptions{float,longtable,subfigure}}
\newif\ifcaption@ruled
\DeclareOption{ruled}{\caption@ruledtrue}
\DeclareOption{boxed}{}
\DeclareOption{ignoreLTcapwidth}{\ignoreLTcapwidthtrue}
-\DeclareOption{debug}{\caption@debugtrue}
-\newif\ifcaption@debug
+\DeclareOption{debug}{\captionsetup{debug}}
\newif\ifcaption@twozero
\normalcaptionparams
\ExecuteOptions{none,normal}
@@ -238,7 +236,8 @@
}{%
\@ifundefined{caption@@#1}%
{\PackageError{caption2}{Caption style `#1' undefined}{\caption@eh}}%
- {\@nameuse{caption@@#1}}%
+ {\let\caption@make\caption@makecaption
+ \@nameuse{caption@@#1}}%
}}
\renewcommand\@makecaption[2]{%
\vskip\abovecaptionskip
@@ -248,7 +247,7 @@
\def\captiontext{#2}%
\usecaptionstyle\caption@style
\vskip\belowcaptionskip}
-\renewcommand*\caption@package[3]{%
+\newcommand*\caption@ifpackage[3]{%
\if1\@nameuse{caption@pkt@#1}%
\@ifundefined{#2}%
{\let\next\AtBeginDocument}%
@@ -261,14 +260,13 @@
#3\let\next\@gobble
\fi\fi
\expandafter\let\csname caption@pkt@#1\endcsname\undefined
- \ifcaption@debug
+ \caption@ifdebug{%
\ifx\next\@gobble\PackageInfo{caption2}{#1 => gobble}%
\else\ifx\next\@firstofone\PackageInfo{caption2}{#1 => firstofone}%
\else\ifx\next\AtBeginDocument\PackageInfo{caption2}{#1 => AtBeginDocument}%
- \fi\fi\fi
- \fi
+ \fi\fi\fi}{}%
\next}
-\caption@package{float}{floatc@plain}{}{%
+\caption@ifpackage{float}{floatc@plain}{}{%
\ifx\floatc@plain\relax
\PackageWarning{caption2}{%
Option `float' was set but there is no float package loaded}
@@ -306,7 +304,7 @@
\vskip\belowcaptionskip
\bgroup}%
\fi}
-\caption@package{longtable}{LT@makecaption}{}{%
+\caption@ifpackage{longtable}{LT@makecaption}{}{%
\ifx\LT@makecaption\relax
\PackageWarning{caption2}{%
Option `longtable' was set but there is no longtable package loaded}
@@ -369,7 +367,7 @@
\def\captiontext{\ignorespaces #2}%
\usecaptionstyle\caption@substyle}%
\caption@subfig@hss}}
-\caption@package{subfigure}{@makesubfigurecaption}{%
+\caption@ifpackage{subfigure}{@makesubfigurecaption}{%
\let\setsubcapstyle\undefined
\let\caption@makesubcaption\undefined}{%
\ifx\@makesubfigurecaption\relax
@@ -381,30 +379,30 @@
\ifx\subcapfont\undefined
\PackageInfo{caption2}{subfigure package v2.0 detected}
\let\subcapfont\@empty
- \newcommand*\subfigcapwidth{\z@}
- \newcommand*\setsubcapmargin{%
+ \newcommand\subfigcapwidth{\z@}
+ \newcommand\setsubcapmargin{%
\subfigcapwidthfalse
\renewcommand*\subfigcapmargin}
- \newcommand*\setsubcapwidth{%
+ \newcommand\setsubcapwidth{%
\subfigcapwidthtrue
\renewcommand*\subfigcapwidth}
- \newcommand*\subcaplabelsep{\space}
+ \newcommand\subcaplabelsep{\space}
\let\caption@subfig@hss\hfil
\else
\PackageInfo{caption2}{subfigure package v2.1 (or newer) detected}
\newdimen\subfigcapwidth
- \newcommand*\setsubcapmargin{%
+ \newcommand\setsubcapmargin{%
\subfigcapwidthfalse
\setlength\subfigcapmargin}
- \newcommand*\setsubcapwidth{%
+ \newcommand\setsubcapwidth{%
\subfigcapwidthtrue
\setlength\subfigcapwidth}
- \newcommand*\subcaplabelsep{\hskip\subfiglabelskip}
+ \newcommand\subcaplabelsep{\hskip\subfiglabelskip}
\let\caption@subfig@hss\hss
\fi
\newif\ifsubfigcapwidth
\newdimen\subcapindent
- \newcommand*\subcaplabeldelim{}
+ \newcommand\subcaplabeldelim{}
\newcommand*\subcapstyle[1]{%
\expandafter\ifx\csname caption@@#1\endcsname\relax
\PackageError{caption2}{Undefined caption style `#1'}{\caption@eh}%
@@ -417,7 +415,7 @@
\let\@makesubfigurecaption\caption@makesubcaption
\let\@makesubtablecaption\caption@makesubcaption
\fi}
-\let\caption@package\undefined
+\let\caption@ifpackage\undefined
\endinput
%%
%% End of file `caption2.sty'.
diff --git a/Master/texmf-dist/tex/latex/caption/caption3.sty b/Master/texmf-dist/tex/latex/caption/caption3.sty
index 3a760aa1bb6..34a8e52fb0d 100644
--- a/Master/texmf-dist/tex/latex/caption/caption3.sty
+++ b/Master/texmf-dist/tex/latex/caption/caption3.sty
@@ -27,7 +27,7 @@
%% caption.sty, caption2.sty, caption3.sty, and manual.tex.
%%
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption3}[2007/03/30 v3.0o caption3 kernel (AR)]
+\ProvidesPackage{caption3}[2007/04/09 v3.0p caption3 kernel (AR)]
\providecommand*\@nameundef[1]{%
\expandafter\let\csname #1\endcsname\@undefined}
\providecommand{\l@addto@macro}[2]{%
@@ -45,18 +45,6 @@
\ifx\caption@tempa\@empty\else
#1#2%
\fi}
-\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
\def\caption@ifinlist#1#2{%
\let\next\@secondoftwo
\edef\caption@tempa{#1}%
@@ -75,6 +63,15 @@
}}}
\def\caption@ifbool#1{\@nameuse{caption@if#1}}
\def\caption@undefbool#1{\@nameundef{caption@if#1}}
+\def\caption@newcounter#1{\gdef#1{0}}
+\def\caption@setcounter#1#2{\xdef#1{#2}}
+\def\caption@addtocounter#1#2{%
+ \begingroup
+ \@tempcnta#1%
+ \advance\@tempcnta#2%
+ \xdef#1{\the\@tempcnta}%
+ \endgroup}
+\def\caption@stepcounter#1{\caption@addtocounter#1\@ne}
\newcommand\caption@package{caption}
\newcommand*\caption@error[1]{%
\PackageError\caption@package{#1}\caption@eh}
@@ -99,26 +96,26 @@
{\@namedef{\caption@typ@#1}{#2}}%
{\expandafter\l@addto@macro\csname\caption@typ@#1\endcsname{,#2}}}
\newcommand\caption@setup{\caption@setkeys{caption}}
-\newcount\caption@keydepth \caption@keydepth=0
\newcommand*\caption@setkeys{%
\@dblarg\caption@@setkeys}
\long\def\caption@@setkeys[#1]#2#3{%
- \ifnum\caption@keydepth =0\relax
+ \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
+ \caption@stepcounter\caption@keydepth
\def\caption@package{#1}%
\caption@Debug{\protect\setkeys{#2}{#3}}%
\setkeys{#2}{#3}%
\def\caption@package{caption}%
- \advance\caption@keydepth\m@ne
- \ifnum\caption@keydepth =0\relax
+ \caption@addtocounter\caption@keydepth\m@ne
+ \ifnum\caption@keydepth=0\relax
\let\KV@errx\caption@KV@errx
\let\KV@err\caption@KV@err
\fi}
+\caption@newcounter\caption@keydepth
\newcommand*\caption@settype[1]{%
\@ifundefined{\caption@typ@#1}{}{%
\caption@esetup{\csname\caption@typ@#1\endcsname}}}
@@ -162,19 +159,42 @@
\AtEndOfPackage{\let\@unprocessedoptions\relax}}
\@onlypreamble\caption@ProcessOptions
\newdimen\captionmargin
-\newdimen\captionmarginx
+\newdimen\captionmargin@
\newdimen\captionwidth
\DeclareCaptionOption{margin}{\setcaptionmargin{#1}}
\DeclareCaptionOption{width}{\setcaptionwidth{#1}}
+\DeclareCaptionOption{twoside}[1]{\caption@setbool{twoside}{#1}}
\newcommand*\setcaptionmargin[1]{%
\captionwidth\z@
\caption@@setmargin#1,#1,\@nil\@@}
\def\caption@@setmargin#1,#2,#3\@@{%
\setlength\captionmargin{#1}%
- \setlength\captionmarginx{#2}%
- \advance\captionmarginx by -\captionmargin}
+ \setlength\captionmargin@{#2}%
+ \advance\captionmargin@ by -\captionmargin}
\newcommand\setcaptionwidth{%
\setlength\captionwidth}
+\caption@newcounter\caption@count
+\newcommand*\caption@newlabel{\@newl@bel{caption}}
+\newcommand*\caption@thepage{\the\c@page}
+\def\caption@ifoddpage{%
+ \caption@iftwoside{%
+ \caption@stepcounter\caption@count
+ \protected@write\@auxout{\let\caption@thepage\relax}%
+ {\string\caption@newlabel{\caption@count}{\caption@thepage}}%
+ \expandafter\ifx\csname caption@\caption@count\endcsname\relax
+ \G@refundefinedtrue % => 'There are undefined references.'
+ \PackageWarning{caption3}{Reference on page \thepage \space undefined}%
+ \else
+ \expandafter\let\expandafter\caption@thepage
+ \csname caption@\caption@count\endcsname
+ \fi
+ \ifodd\caption@thepage
+ \let\caption@ifoddpage\@firstoftwo
+ \else
+ \let\caption@ifoddpage\@secondoftwo
+ \fi
+ }{\let\caption@ifoddpage\@firstoftwo}%
+ \caption@ifoddpage}
\newdimen\captionindent
\newdimen\captionparindent
\newdimen\captionhangindent
@@ -329,15 +349,24 @@
\caption@ragged\RaggedLeft\raggedleft}
\DeclareCaptionJustification{RaggedRight}{%
\caption@ragged\RaggedRight\raggedright}
-\newcommand*\caption@ragged[2]{%
+\newcommand*\caption@ragged{%
+ \caption@Info{We need ragged2e}%
+ \protected@write\@auxout{}{\string\caption@newlabel{ragged2e}{}}%
+ \global\let\caption@ragged\caption@@ragged
+ \caption@@ragged}
+\newcommand*\caption@@ragged[2]{%
\@ifundefined{caption\string#1}{%
- \PackageWarning{caption}{%
- Cannot locate the `ragged2e' package, therefore\MessageBreak
+ \PackageWarning{caption3}{%
+ `ragged2e' package not loaded, therefore\MessageBreak
substituting \string#2 for \string#1\MessageBreak}%
\global\@namedef{caption\string#1}}{}%
#2}
-\AtBeginDocument{\IfFileExists{ragged2e.sty}{%
- \RequirePackage{ragged2e}\let\caption@ragged\@firstoftwo}{}}
+\AtBeginDocument{%
+ \@ifundefined{caption@ragged2e}{}{%
+ \caption@Info{We load ragged2e}%
+ \IfFileExists{ragged2e.sty}{%
+ \RequirePackage{ragged2e}\let\caption@@ragged\@firstoftwo}{}%
+ }}
\newcommand\DeclareCaptionFont[2]{%
\define@key{caption@fnt}{#1}[]{\g@addto@macro\caption@tempa{#2}}}
\@onlypreamble\DeclareCaptionFont
@@ -366,6 +395,9 @@
\DeclareCaptionFont{rm}{\rmfamily}
\DeclareCaptionFont{sf}{\sffamily}
\DeclareCaptionFont{tt}{\ttfamily}
+\DeclareCaptionFont{singlespacing}{\setstretch{\setspace@singlespace}}% normally 1
+\DeclareCaptionFont{onehalfspacing}{\onehalfspacing}
+\DeclareCaptionFont{doublespacing}{\doublespacing}
\providecommand\captionsize{}
\DeclareCaptionOption{size}{\caption@setfont{size}{#1}}
\@ifundefined{abovecaptionskip}{%
@@ -421,13 +453,14 @@
\DeclareCaptionOption{strut}{\caption@setbool{strut}{#1}}
\DeclareCaptionOption{debug}[1]{%
\caption@setbool{debug}{#1}%
- \caption@ifbool{debug}{%
+ \caption@ifdebug{%
\def\caption@Debug{\PackageInfo{caption3}}%
}{%
\let\caption@Debug\@gobble
}}
\setkeys{caption}{debug=0}
-\captionsetup{style=default,position=default,listof=1}
+\captionsetup{style=default,position=default,listof=1,%
+ twoside=\if@twoside 1\else 0\fi}
\newif\ifcaption@star
\newcommand\caption@make[2]{%
\caption@@make{\caption@lfmt{#1}{#2}}}
@@ -439,7 +472,10 @@
\caption@slc{#1}{#2}\captionwidth\relax
\fi}{}%
\@tempdima\captionmargin
- \caption@ifh{\advance\@tempdima by \captionindent}%
+ \ifdim\captionmargin@=\z@\else
+ \caption@ifoddpage{}{\advance\@tempdima\captionmargin@}%
+ \fi
+ \caption@ifh{\advance\@tempdima\captionindent}%
\hskip\@tempdima
\@tempdima\captionwidth
\caption@ifh{\advance\@tempdima by -\captionindent}%
@@ -452,7 +488,9 @@
\fi}%
\caption@@@make{#1}{#2}}%
\@tempdima\captionmargin
- \advance\@tempdima by \captionmarginx
+ \ifdim\captionmargin@=\z@\else
+ \caption@ifoddpage{\advance\@tempdima\captionmargin@}{}%
+ \fi
\hskip\@tempdima
\caption@endhook
\endgroup
@@ -466,17 +504,17 @@
\ifdim\captionwidth=\z@
\captionwidth\@tempdima
\advance\captionwidth by -2\captionmargin
- \advance\captionwidth by -\captionmarginx
+ \advance\captionwidth by -\captionmargin@
\else
\captionmargin\@tempdima
\advance\captionmargin by -\captionwidth
\divide\captionmargin by 2
- \captionmarginx\z@
+ \captionmargin@\z@
\fi
\caption@Debug{%
\protect\hsize=\the\hsize,
\protect\margin=\the\captionmargin,
- \protect\marginx=\the\captionmarginx,
+ \protect\marginx=\the\captionmargin@,
\protect\width=\the\captionwidth}%
}
\newcommand\caption@slc[4]{%
diff --git a/Master/texmf-dist/tpm/caption.tpm b/Master/texmf-dist/tpm/caption.tpm
index 95635463c57..de1a3f02109 100644
--- a/Master/texmf-dist/tpm/caption.tpm
+++ b/Master/texmf-dist/tpm/caption.tpm
@@ -3,7 +3,7 @@
<rdf:Description about="http://texlive.dante.de/texlive/Package/caption.zip">
<TPM:Name>caption</TPM:Name>
<TPM:Type>Package</TPM:Type>
- <TPM:Date>2007/04/02 18:51:59</TPM:Date>
+ <TPM:Date>2007/04/11 23:10:07</TPM:Date>
<TPM:Version>3.0f</TPM:Version>
<TPM:Creator>rahtz</TPM:Creator>
<TPM:Title>
@@ -17,23 +17,23 @@ captions, as well as backward compatibility.
[description copied from TeX Catalogue]
</TPM:Description>
<TPM:Author>Harald Axel Sommerfeldt</TPM:Author>
- <TPM:Size>1023530</TPM:Size>
+ <TPM:Size>1027051</TPM:Size>
<TPM:License></TPM:License>
<TPM:Build/>
- <TPM:RunFiles size="54573">
+ <TPM:RunFiles size="56394">
texmf-dist/tex/latex/caption/caption.sty
texmf-dist/tex/latex/caption/caption2.sty
texmf-dist/tex/latex/caption/caption3.sty
texmf-dist/tpm/caption.tpm
</TPM:RunFiles>
- <TPM:DocFiles size="745070">
+ <TPM:DocFiles size="735157">
texmf-dist/doc/latex/caption/anleitung.pdf
texmf-dist/doc/latex/caption/anleitung.tex
texmf-dist/doc/latex/caption/caption.pdf
texmf-dist/doc/latex/caption/caption2.pdf
texmf-dist/doc/latex/caption/manual.tex
</TPM:DocFiles>
- <TPM:SourceFiles size="227408">
+ <TPM:SourceFiles size="232319">
texmf-dist/source/latex/caption/caption.dtx
texmf-dist/source/latex/caption/caption.ins
texmf-dist/source/latex/caption/caption2.dtx