summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2007-09-08 15:59:17 +0000
committerKarl Berry <karl@freefriends.org>2007-09-08 15:59:17 +0000
commit788352558edd068d76fe19ad56b81827c0fe7646 (patch)
treeab733e20eaf33223cbfe9c59c783a30d802ee627 /Master
parentba8058f661bc514c2d960695ddb21d5501abbf97 (diff)
caption 3.1 (7sep07)
git-svn-id: svn://tug.org/texlive/trunk@4911 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/caption/anleitung.pdfbin211736 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/latex/caption/anleitung.tex2044
-rw-r--r--Master/texmf-dist/doc/latex/caption/caption-deu.pdfbin0 -> 318761 bytes
-rw-r--r--Master/texmf-dist/doc/latex/caption/caption-deu.tex2909
-rw-r--r--Master/texmf-dist/doc/latex/caption/caption-eng.pdfbin0 -> 302947 bytes
-rw-r--r--Master/texmf-dist/doc/latex/caption/caption-eng.tex2645
-rw-r--r--Master/texmf-dist/doc/latex/caption/caption-rus.pdfbin0 -> 429149 bytes
-rw-r--r--Master/texmf-dist/doc/latex/caption/caption-rus.tex2554
-rw-r--r--Master/texmf-dist/doc/latex/caption/caption.pdfbin327267 -> 348118 bytes
-rw-r--r--Master/texmf-dist/doc/latex/caption/caption2.pdfbin124990 -> 138982 bytes
-rw-r--r--Master/texmf-dist/doc/latex/caption/ltcaption.pdfbin0 -> 119481 bytes
-rw-r--r--Master/texmf-dist/doc/latex/caption/manual.tex69
-rw-r--r--Master/texmf-dist/source/latex/caption/caption.dtx7727
-rw-r--r--Master/texmf-dist/source/latex/caption/caption.ins21
-rw-r--r--Master/texmf-dist/source/latex/caption/caption2.dtx130
-rw-r--r--Master/texmf-dist/source/latex/caption/ltcaption.dtx802
-rw-r--r--Master/texmf-dist/tex/latex/caption/caption.sty1524
-rw-r--r--Master/texmf-dist/tex/latex/caption/caption2.sty38
-rw-r--r--Master/texmf-dist/tex/latex/caption/caption3.sty1099
-rw-r--r--Master/texmf-dist/tex/latex/caption/ltcaption.sty184
20 files changed, 15714 insertions, 6032 deletions
diff --git a/Master/texmf-dist/doc/latex/caption/anleitung.pdf b/Master/texmf-dist/doc/latex/caption/anleitung.pdf
deleted file mode 100644
index 02748d4dc0e..00000000000
--- a/Master/texmf-dist/doc/latex/caption/anleitung.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/caption/anleitung.tex b/Master/texmf-dist/doc/latex/caption/anleitung.tex
deleted file mode 100644
index 1881f645197..00000000000
--- a/Master/texmf-dist/doc/latex/caption/anleitung.tex
+++ /dev/null
@@ -1,2044 +0,0 @@
-%%
-%% This is file `anleitung.tex',
-%%
-%% Copyright (C) 1994-2007 Axel Sommerfeldt (caption@sommerfee.de)
-%%
-%% --------------------------------------------------------------------------
-%%
-%% This work may be distributed and/or modified under the
-%% conditions of the LaTeX Project Public License, either version 1.3
-%% of this license or (at your option) any later version.
-%% The latest version of this license is in
-%% http://www.latex-project.org/lppl.txt
-%% and version 1.3 or later is part of all distributions of LaTeX
-%% version 2003/12/01 or later.
-%%
-%% This work has the LPPL maintenance status "maintained".
-%%
-%% This Current Maintainer of this work is Axel Sommerfeldt.
-%%
-%% This work consists of the files caption.ins, caption.dtx,
-%% caption2.dtx, caption.xml, and anleitung.tex and the derived files
-%% caption.sty, caption2.sty, caption3.sty, and manual.tex.
-%%
-\ProvidesFile{anleitung.tex}
-\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\documentclass[a4paper]{ltxdoc}
-\setlength\parindent{0pt}
-\setlength\parskip{\medskipamount}
-
-\errorcontextlines9
-\def\StartTracing{\typeout{StartTracing}\tracingmacros=1\tracingcommands=1\relax}
-\def\StopTracing{\tracingmacros=0\tracingcommands=0\relax\typeout{StopTracing}}
-
-\newcommand\NEWfeature{\NEW{Neues Feature}}
-\newcommand\NEWdescription{\NEW{Neue Beschreibung}}
-\newcommand\NEW[2]{\hskip 1sp \marginpar{\footnotesize\sffamily\raggedleft#1\\#2}}
-
-\font\manual=manfnt
-\newcommand\DANGER{\hskip 1sp \marginpar{\raggedleft\textcolor{blue}{{\manual\char127}}}}
-
-%%%\usepackage[T1]{fontenc}
-\ifx\pdfoutput\undefined\else
- \ifcase\pdfoutput\else
- \usepackage{mathptmx,courier}
- \usepackage[scaled=0.90]{helvet}
- \addtolength\marginparwidth{15pt}
- \fi
-\fi
-
-\usepackage[german]{babel}
-\usepackage{color,setspace}
-
-%\usepackage{float}
-\usepackage{longtable}
-%\usepackage[raggedright]{sidecap}
-
-\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}}
-
-\DeclareCaptionLabelSeparator{period-newline}{. \\}
-\DeclareCaptionStyle{period-newline}[labelsep=period]{labelsep=period-newline}
-\DeclareCaptionStyle{period-newline2}[labelsep=period,justification=centering]{labelsep=period-newline}
-\DeclareCaptionStyle{period-newline3}[labelsep=period]{labelsep=period-newline,justification=centering}
-\DeclareCaptionFormat{reverse}{#3#2#1}
-\DeclareCaptionFormat{llap}{\llap{#1#2}#3\par}
-\DeclareCaptionLabelFormat{fullparens}{(\bothIfFirst{#1}{ }#2)}
-\DeclareCaptionLabelSeparator{fill}{\hfill}
-
-\DeclareRobustCommand{\KOMAScript}{\textsf{K\kern.05em O\kern.05em%
- M\kern.05em A\kern.1em-\kern.1em Script}}
-
-\newcommand*\purerm[1]{{\upshape\mdseries\rmfamily #1}}
-\newcommand*\puresf[1]{{\upshape\mdseries\sffamily #1}}
-\newcommand*\purett[1]{{\upshape\mdseries\ttfamily #1}}
-\let\package\puresf\def\thispackage{\package{caption}}
-\let\env\purett \let\opt\purett
-
-\newcommand*\version[1]{$v#1$}
-
-\newenvironment{Options}[1]%
- {\list{}{\renewcommand{\makelabel}[1]{\texttt{##1}\hfil}%
- \settowidth{\labelwidth}{\texttt{#1\space}}%
- \setlength{\leftmargin}{\labelwidth}%
- \addtolength{\leftmargin}{\labelsep}}}%
- {\endlist}
-
-\newenvironment{Example}%
- {\ifvmode\else\unskip\par\fi
- \minipage{\linewidth}\smallskip}%
- {\smallskip\endminipage}
-\newcommand\example[3][figure]{%
- \begingroup
- \captionsetup{#2}%
- \captionof{#1}[]{#3}%
- \endgroup}
-
-\begin{document}
-
-\GetFileInfo{caption.sty}
-\title{Setzen von Abbildungs- und Tabellenbeschriftungen mit dem
- \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{9. April 2007}
-\maketitle
-
-\begin{abstract}
-Das \thispackage\ Paket bietet einem Mittel und Wege das Erscheinungsbild der
-Bildunterschriften und Tabellen"uberschriften den eigenen W"unschen
-bzw.\ bestimmten Vorgaben anzupassen.
-Hierbei wurde viel Wert auf die reibungslose Zusammenarbeit und in die
-Integration anderer Dokumentenklassen und Pakete gelegt.\footnote{F"ur die
-aktuelle Version 3.0 dieses Paketes wurde die Benutzerschnittstelle zusammen
-mit Steven D. Cochran und Frank Mittelbach komplett "uberarbeitet.}
-\end{abstract}
-
-\tableofcontents
-
-\newcommand\figuretext{%
- Die auf die Rotationsfrequenz des Innenzylinders normierten Eigenfrequenzen
- der gefundenen Grundmoden der Taylor"=Str"omung f"ur \mbox{$\eta = 0.5$}. %\\
- (Die azimutale Wellenzahl ist mit $m$ bezeichnet.)}
-
-% --------------------------------------------------------------------------- %
-
-\section{Einleitung}
-
-Mit |\caption| gesetzte Bildunterschriften und Tabellen"uberschriften werden
-von den Standard"=Dokumentenklassen eher stiefm"utterlich behandelt.
-In der Regel schlicht als ganz normaler Absatz gesetzt, ergibt sich keine
-signifikante optische Abgrenzung vom eigentlichen Text, wie z.B. hier:
-
-\example{belowskip=\abovecaptionskip}{\figuretext}
-
-Es sollte aber eine M"oglichkeit geben, diesem Umstand abzuhelfen. Es w"are
-zum Beispiel nett, wenn man den Text der Unterschrift etwas kleiner gestalten,
-extra R"ander festlegen oder den Zeichensatz des Bezeichners dem der
-Kapitel"uberschriften anpassen k"onnte. So in etwa:
-
-\example{belowskip=\abovecaptionskip,size=small,margin=10pt,labelfont=bf,labelsep=endash}{\figuretext}
-
-Mit Hilfe dieses Paketes k"onnen Sie dies leicht bewerkstelligen; es sind viele
-vorgegebene Parameter einstellbar, Sie k"onnen aber auch eigene
-Gestaltungsmerkmale einflie"sen lassen.
-
-% --------------------------------------------------------------------------- %
-
-\pagebreak[4]
-\section{Verwendung des Paketes}
-\label{usage}
-
-\DescribeMacro{\usepackage}
-Mittels
-\begin{quote}
- |\usepackage|\oarg{Optionen}|{caption}[|\texttt{\filedate}|]|
-\end{quote}
-in dem Vorspann des Dokumentes wird das \thispackage\ Paket eingebunden, die
-Optionen legen hierbei das Aussehen der "Uber- und Unterschriften fest. So
-w"urde z.B.
-\begin{quote}
- |\usepackage[margin=10pt,font=small,labelfont=bf]{caption}|%[|\texttt{\filedate}|]|
-\end{quote}
-zu dem obrigen Ergebnis mit Rand, kleinerem Zeichensatz und fetter Bezeichnung
-f"uhren.
-
-\DescribeMacro{\captionsetup}
-Eine "Anderung der Parameter ist auch zu einem sp"ateren Zeitpunkt jederzeit
-mittels des Befehls
-\begin{quote}
- |\captionsetup|\oarg{Typ}\marg{Optionen}
-\end{quote}
-m"oglich. So sind z.B. die Befehlssequenzen
-\begin{quote}
- |\usepackage[margin=10pt,font=small,labelfont=bf]{caption}|%[|\texttt{\filedate}|]|
-\end{quote}
-und
-\begin{quote}
- |\usepackage{caption}|\\%[|\texttt{\filedate}|]|
- |\captionsetup{margin=10pt,font=small,labelfont=bf}|
-\end{quote}
-in ihrer Wirkung identisch.
-
-Weiterhin gilt zu beachten, da"s sich die Verwendung von |\captionsetup|
-innerhalb von Umgebungen nur auf die Umgebung selber auswirkt, nicht aber auf
-den Rest des Dokumentes. M"ochte man also z.B. die automatische Zentrierung der
-Abbildungsunterschrift nur in einem konkreten Falle ausschalten, so kann dies
-mit
-\begin{quote}
- |\begin{figure}|\\
- | |\ldots\\
- | \captionsetup{singlelinecheck=off}|\\
- | \caption{|\ldots|}|\\
- |\end{figure}|
-\end{quote}
-geschehen, ohne da"s die restlichen Abbildungsunterschriften hiervon
-beeintr"achtigt werden.
-
-(Der optionale Parameter \meta{Typ} wird in Abschnitt
- \ref{misc}: \textit{"`N"utzliches"'} behandelt.)
-
-% --------------------------------------------------------------------------- %
-
-\pagebreak[4]
-\section{Beschreibung der Optionen}
-
-\def\OptionLabel{RaggedRight}
-\def\UserDefined{\ldots}
-\makeatletter
-\newcommand*\Section{\@ifstar{\@Section\relax}{\@Section{Abschnitt}}}
-\newcommand*\@Section[3]{#1 \ref{#2}: \textit{"`#3"'}}
-\makeatother
-\newcommand*\See[1]{{\small (Siehe #1)}}
-\newcommand*\SeeUserDefined[1][]{%
- \See{\Section{declare}{Eigene Erweiterungen}#1}}
-
-% --------------------------------------------------------------------------- %
-
-\subsection{Formatierung}
-
-\DescribeMacro{format=}
-Eine Abbildungs- oder Tabellenbeschriftung besteht im wesentlichen aus drei
-Teilen:
-Dem Bezeichner (etwa "`Abbildung 3"'), dem Trenner
-(etwa "`:\textvisiblespace"') und dem eigentlichen Text.
-Mittels der Option
-\begin{quote}
- |format=|\meta{Name}
-\end{quote}
-wird festgelegt, wie diese drei Teile zusammengesetzt werden.
-F"ur \meta{Name} sind folgende M"oglichkeiten verf"ugbar:%\footnote{Es gibt
-%hier wie auch bei vielen anderen Optionen die M"oglichkeit, auch eigene
-%Formate, Zeichens"atze etc.\ zu definieren. Wie dies geht wird in Abschnitt
-%\ref{declare}: \textit{"`Eigene Erweiterungen"'} dargelegt.}
-
-\begin{Options}{\OptionLabel}
- \item[plain]\NEWdescription{v3.0h}
- Die Beschriftung wird als gew"ohnlicher Abschnitt gesetzt.
- (Dies ist z.Z.~das Standardverhalten, ab Version $3.1$ des
- \package{caption} Paketes wird dies allerdings von der verwendeten
- Dokumentenklasse abh"angen.)
-
- \item[hang]
- Der Text wird so gesetzt, da"s er an dem Bezeichner "`h"angt"', d.h.~der
- Platz unter dem Bezeichner und dem Trenner bleibt leer.
-
- \item[\UserDefined]
- Eigene Formate k"onnen mittels |\DeclareCaptionFormat| definiert werden.
- \SeeUserDefined
-\end{Options}
-
-\begin{Example}
- Ein Beispiel: Die Angabe der Option
- \begin{quote}
- |format=hang|
- \end{quote}
- f"uhrt zu Abbildungsunterschriften der Art
- \example{format=hang}{\figuretext}
-\end{Example}
-
-\DescribeMacro{indention=}
-Bei beiden Formaten (\texttt{plain} und \texttt{hang}) kann der Einzug der Beschriftung
-ab der zweiten Textzeile angepasst werden, dies geschieht mit Hilfe der Option
-\begin{quote}
- |indention=|\meta{Einzug}\quad,
-\end{quote}
-wobei anstelle von \meta{Einzug} jedes beliebige feste Ma"s angegeben werden kann.
-
-Zwei Beispiele:
-
-\begin{Example}
- \begin{quote}
- |format=plain,indention=.5cm|
- \end{quote}
- \captionsetup{aboveskip=0pt}
- \example{format=plain,indention=.5cm}{\figuretext}
-\end{Example}
-
-\begin{Example}
- \begin{quote}
- |format=hang,indention=-0.5cm|
- \end{quote}
- \captionsetup{aboveskip=0pt}
- \example{format=hang,indention=-0.5cm}{\figuretext}
-\end{Example}
-
-%\pagebreak[3]
-\DescribeMacro{labelformat=}
-Mittels der Option
-\nopagebreak[3]
-\begin{quote}
- |labelformat=|\meta{Name}
-\end{quote}
-\nopagebreak[3]
-\NEWdescription{v3.0e}
-wird die Zusammensetzung des Bezeichners festgelegt.
-F"ur \meta{Name} sind folgende M"oglichkeiten verf"ugbar:
-
-\begin{Options}{\OptionLabel}
- \item[default]
- Der Bezeichner wird wie von der verwendeten Dokumentenklasse vorgegeben gesetzt,
- "ublicherweise ist dies der Name und die Nummer, getrennt durch ein Leerzeichen
- (wie \texttt{simple}).
- (Dies ist das Standardverhalten.)
-
- \item[empty]
- Der Bezeichner ist leer. (Diese Option macht in der Regel nur in Verbindung mit
- anderen Optionen -- wie etwa \texttt{labelsep=none} -- Sinn.)
-
- \item[simple]
- Der Bezeichner ist aus dem Namen und der Nummer zusammengesetzt.
-
- \item[parens]
- Die Nummer des Bezeichners wird in runde Klammern gesetzt.
-
- \item[\UserDefined]
- Eigene Formate k"onnen mittels |\DeclareCaptionLabelFormat| definiert werden.
- \SeeUserDefined
-\end{Options}
-
-\begin{Example}
- Ein Beispiel: Die Optionen
- \begin{quote}
- |labelformat=parens,labelsep=quad|
- \end{quote}
- f"uhren zu Abbildungsunterschriften der Art
- \example{labelformat=parens,labelsep=quad}{\figuretext}
-\end{Example}
-
-\DescribeMacro{labelsep=}
-Mittels der Option
-\begin{quote}
- |labelsep=|\meta{Name}
-\end{quote}
-wird die Zusammensetzung des Trenners festgelegt.
-F"ur \meta{Name} sind folgende M"oglichkeiten verf"ugbar:
-
-\begin{Options}{\OptionLabel}
- \item[none]
- Der Trenner ist leer. (Diese Option macht in der Regel nur in Verbindung
- mit anderen Optionen -- wie etwa \texttt{labelformat=empty} -- Sinn.)
-
- \item[colon]
- Der Trenner besteht aus einem Doppelpunkt und einem Leerzeichen.
- (Dies ist z.Z.~das Standardverhalten.)
-
- \item[period]
- Der Trenner besteht aus einem Punkt und einem Leerzeichen.
-
- \item[space]
- Der Trenner besteht lediglich aus einem einzelnen Leerzeichen.
-
- \item[quad]
- Der Trenner besteht aus einem |\quad|.
-
- \item[newline]
- Als Trenner wird ein Zeilenumbruch verwendet.
-
- \item[endash]\NEWfeature{v3.0h}
- Als Trenner wird ein Gedankenstrich verwendet.
-
- \item[\UserDefined]
- Eigene Trenner k"onnen mittels |\DeclareCaptionLabelSeparator| definiert werden.
- \SeeUserDefined
-\end{Options}
-
-Drei Beispiele:
-\begin{Example}
- \begin{quote}
- |labelsep=period|
- \end{quote}
- \captionsetup{aboveskip=0pt}
- \example{labelsep=period}{\figuretext}
-\end{Example}
-
-\begin{Example}
- \begin{quote}
- |labelsep=newline,singlelinecheck=false|
- \end{quote}
- \captionsetup{aboveskip=0pt}
- \example{labelsep=newline,singlelinecheck=false}{\figuretext}
-\end{Example}
-
-\begin{Example}
- \begin{quote}
- |labelsep=endash|
- \end{quote}
- \captionsetup{aboveskip=0pt}
- \example{labelsep=endash}{\figuretext}
-\end{Example}
-
-% --------------------------------------------------------------------------- %
-
-\subsection{Textausrichtung}
-\label{justification}
-
-\DescribeMacro{justification=}
-Mittels der Option
-\begin{quote}
- |justification=|\meta{Name}
-\end{quote}
-wird die Ausrichtung des Textes festgelegt.
-F"ur \meta{Name} sind folgende M"oglichkeiten verf"ugbar:
-
-\begin{Options}{\OptionLabel}
- \item[justified]
- Der Text wird als Blocksatz gesetzt.
- (Dies ist z.Z.~das Standardverhalten.)
-
- \item[centering]
- Der Text wird zentriert gesetzt.
-
-% \item[Centering]
-% Der Text wird zentriert gesetzt. Hierf"ur wird jedoch im Gegensatz
-% zu \texttt{centering} der Befehl |\Centering| des \package{ragged2e}-Paketes
-% verwendet, der \LaTeX\ das Trennen der Worte erlaubt.
-
- \item[centerlast]
- Lediglich die letzte Zeile des Textes wird zentriert gesetzt.
-
- \item[centerfirst]
- Lediglich die erste Zeile des Textes wird zentriert gesetzt.
-
- \item[raggedright]
- Der Text wird linksb"undig gesetzt.
-
-% \item[RaggedRight]
-% Der Text wird linksb"undig mit Hilfe des \package{ragged2e}-Paketes gesetzt.
- \item[RaggedRight]
- Der Text wird ebenfalls linksb"undig gesetzt. Hierf"ur wird jedoch im Gegensatz
- zu \texttt{raggedright} der Befehl |\RaggedRight| des \package{ragged2e}-Paketes
- verwendet, der \LaTeX\ das Trennen der Worte erlaubt.
-
- \item[raggedleft]
- Der Text wird rechtsb"undig gesetzt.
-
-% \item[RaggedLeft]
-% Der Text wird rechtsb"undig mit Hilfe des \package{ragged2e}-Paketes gesetzt.
-
- \item[\UserDefined]
- Eigene Ausrichtungen k"onnen mittels |\DeclareCaptionJustification| definiert werden.
- \SeeUserDefined
-\end{Options}
-
-Einige Beispiele:
-\begin{Example}
- \begin{quote}
- |justification=centerlast|
- \end{quote}
- \captionsetup{aboveskip=0pt}
- \example{justification=centerlast}{\figuretext}
-\end{Example}
-
-\begin{Example}
- \begin{quote}
- |format=hang,justification=raggedright|
- \end{quote}
- \captionsetup{aboveskip=0pt}
- \example{format=hang,justification=raggedright}{\figuretext}
-\end{Example}
-
-\begin{Example}
- \begin{quote}
- |format=hang,justification=RaggedRight|
- \end{quote}
- \captionsetup{aboveskip=0pt}
- \example{belowskip=\abovecaptionskip,format=hang,justification=RaggedRight}{\figuretext}
-\end{Example}
-
-\begin{Example}
- \begin{quote}
- |labelsep=newline,justification=centering|
- \end{quote}
- \captionsetup{aboveskip=0pt}
- \example{belowskip=\abovecaptionskip,labelsep=newline,justification=centering}{\figuretext}
-\end{Example}
-
-\DescribeMacro{singlelinecheck=}
-In den Standard"=Dokumentenclassen |article|, |report| und |book| sind die
-Ab\-bildungs- und Tabellenbeschriftungen so realisiert, da"s sie automatisch
-zentriert werden, wenn sie lediglich aus einer einzigen Textzeile bestehen:
-
-\example{belowskip=\abovecaptionskip}{Eine kurze Beschriftung.}
-
-%\example{belowskip=\abovecaptionskip}{%
-% Eine lange Beschriftung, die gen"ugend Text enth"alt, um l"anger als
-% eine einzelne Zeile zu sein.}
-
-\DANGER
-Diesen Mechanismus "ubernimmt das \thispackage-Paket und ignoriert damit
-in der Regel bei solch kurzen Beschriftungen die mittels der Option
-|justification=| eingestellte Textausrichtung. Dieses Verhalten kann
-jedoch mit der Option
-\begin{quote}
- |singlelinecheck=|\meta{bool}
-\end{quote}
-reguliert werden. Setzt man f"ur \meta{bool} entweder |false|, |no|, |off|
-oder |0| ein, so wird der Zentrierungsmechnismus au"ser Kraft gesetzt.
-Die obrige, kurze Abbildungsunterschrift w"urde z.B. nach Angabe der Option
-\begin{quote}
- |singlelinecheck=false|
-\end{quote}
-so aussehen:
-\begingroup
-\captionsetup{type=figure}
-\ContinuedFloat
-\endgroup
-\example{belowskip=\abovecaptionskip,singlelinecheck=false}{Eine kurze Beschriftung.}
-
-Setzt man f"ur \meta{bool} hingegen |true|, |yes|, |on| oder |1| ein, so
-wird die automatische Zentrierung wieder eingeschaltet. (Standardm"a"sig
-ist sie eingeschaltet.)
-
-% --------------------------------------------------------------------------- %
-
-\subsection{Zeichens"atze}
-
-\DescribeMacro{font=}
-\DescribeMacro{labelfont=}
-\DescribeMacro{textfont=}
-Das \thispackage-Paket kennt 3 Zeichens"atze: Denjenigen f"ur die gesammte Beschriftung
-(|font|), denjenigen, der lediglich auf den Bezeichner und den Trenner angewandt wird
-(|labelfont|), sowie denjenigen, der lediglich auf den Text wirkt (|textfont|).
-So lassen sich die unterschiedlichen Teile der Beschriftung individuell mittels
-\begin{quote}\begin{tabular}{@{}r@{}ll}
- |font=| & \marg{Zeichensatzoptionen} & ,\\
- |labelfont=| & \marg{Zeichensatzoptionen} & und\\
- |textfont=| & \marg{Zeichensatzoptionen} & \\
-\end{tabular}\end{quote}
-\nopagebreak[3]
-anpassen.
-\pagebreak[3]
-
-Als \meta{Zeichensatzoptionen} sind eine Kombination aus folgendem erlaubt:
-
-\begin{Options}{\OptionLabel}
- \item[scriptsize] {\scriptsize Sehr kleine Schrift}
- \item[footnotesize] {\footnotesize Fu"snotengr"o"se}
- \item[small] {\small Kleine Schrift}
- \item[normalsize] {\normalsize Normalgro"se Schrift}
- \item[large] {\large Gro"se Schrift}
- \item[Large] {\Large Gr"o"sere Schrift}
-
- \item[up] {\upshape Upright Schriftart}
- \item[it] {\itshape Italic Schriftart}
- \item[sl] {\slshape Slanted Schriftart}
- \item[sc] {\scshape Small Caps Schriftart}
-
- \item[md] {\mdseries Medium Schriftserie}
- \item[bf] {\bfseries Bold Schriftserie}
-
- \item[rm] {\rmfamily Roman Schriftfamilie}
- \item[sf] {\sffamily Sans Serif Schriftfamilie}
- \item[tt] {\ttfamily Typewriter Schriftfamilie}
-
- \item[\UserDefined]
- Eigene Zeichensatzoptionen k"onnen mittels |\DeclareCaptionFont| definiert werden.
- \SeeUserDefined
-\end{Options}
-
-Wird lediglich eine einzelne Zeichensatzoption ausgew"ahlt, k"onnen die
-geschweiften Klammern entfallen, d.h.~die Optionen
-%\begin{quote}
- |font={small}|
-%\end{quote}
-und
-%\begin{quote}
- |font=small|
-%\end{quote}
-sind in ihrer Wirkung identisch.
-
-Beispiele:
-\begin{Example}
- \begin{quote}
- |font={small,it},labelfont=bf|
- \end{quote}
- \captionsetup{aboveskip=0pt}
- \example{font={small,it},labelfont=bf}{\figuretext}
-\end{Example}
-
-\begin{Example}
- \begin{quote}
- |font=small,labelfont=bf,textfont=it|
- \end{quote}
- \captionsetup{aboveskip=0pt}
- \example{font=small,labelfont=bf,textfont=it}{\figuretext}
-\end{Example}
-
-% --------------------------------------------------------------------------- %
-
-\subsection{R"ander und Abs"atze}
-\label{margins}
-
-\DescribeMacro{margin=}
-\DescribeMacro{width=}
-F"ur die Abbildungs- und Tabellenbeschriftungen kann \emph{entweder} ein extra Rand
-\emph{oder} eine feste Breite festgelegt werden. Dies geschieht mit
-\begin{quote}\begin{tabular}{@{}r@{}ll}
- |margin=| & \meta{Rand} & \emph{oder}\\
- |width=| & \meta{Breite} & \\
-\end{tabular}\end{quote}
-In beiden F"allen wird die Beschriftung zentriert, d.h.~der linke und rechte Rand
-sind immer gleich gro"s.
-
-Zwei Beispiele hierzu:
-\begin{Example}
- \begin{quote}
- |margin=10pt|
- \end{quote}
- \captionsetup{aboveskip=0pt}
- \example{margin=10pt}{\figuretext}
-\end{Example}
-
-\begin{Example}
- \begin{quote}
- |width=.75\textwidth|
- \end{quote}
- \captionsetup{aboveskip=0pt}
- \example{width=.75\textwidth}{\figuretext}
-\end{Example}
-
-\DescribeMacro{parskip=}
-Diese Option wirkt auf Abbildungs- oder Tabellenbeschriftungen, die
-aus mehr als einem Absatz bestehen; sie legt den Abstand zwischen den
-Abs"atzen fest.
-\begin{quote}
- |parskip=|\meta{Abstand zwischen Abs"atzen}
-\end{quote}
-Ein Beispiel:
-\begin{Example}
- \begin{quote}
- |margin=10pt,parskip=5pt|
- \end{quote}
- \captionsetup{aboveskip=0pt}
- \example{margin=10pt,parskip=5pt}{%
- Erster Absatz der Beschriftung; dieser enth"alt einigen Text, so da"s die
- Auswirkungen der Optionen deutlich werden.
-
- Zweiter Absatz der Beschriftung; dieser enth"alt ebenfalls einigen Text,
- so da"s die Auswirkungen der Optionen deutlich werden.}
-\end{Example}
-
-\DescribeMacro{hangindent=}
-Die Option
-\begin{quote}
- |hangindent=|\meta{Einzug}
-\end{quote}
-legt einen Einzug f"ur alle Zeilen au"ser der jeweils ersten des Absatzes fest.
-Besteht die Beschriftung lediglich aus einem einzelnen Absatz, so ist die
-Wirkung mit der Option |indention=|\meta{Einzug} identisch, bei mehreren
-Abs"atzen zeigt sich jedoch der Unterschied:
-
-\begin{Example}
- \begin{quote}
- |format=hang,indention=-.5cm|
- \end{quote}
- \captionsetup{aboveskip=0pt}
- \example{format=hang,indention=-.5cm}{%
- Erster Absatz der Beschriftung; dieser enth"alt einigen Text, so da"s die
- Auswirkungen der Optionen deutlich werden.
-
- Zweiter Absatz der Beschriftung; dieser enth"alt ebenfalls einigen Text,
- so da"s die Auswirkungen der Optionen deutlich werden.}
-\end{Example}
-
-\begin{Example}
- \begin{quote}
- |format=hang,hangindent=-.5cm|
- \end{quote}
- \captionsetup{aboveskip=0pt}
- \example{format=hang,hangindent=-.5cm}{%
- Erster Absatz der Beschriftung; dieser enth"alt einigen Text, so da"s die
- Auswirkungen der Optionen deutlich werden.
-
- Zweiter Absatz der Beschriftung; dieser enth"alt ebenfalls einigen Text,
- so da"s die Auswirkungen der Optionen deutlich werden.}
-\end{Example}
-
-% --------------------------------------------------------------------------- %
-
-\subsection{Stile}
-\label{style}
-
-\DescribeMacro{style=}
-Eine geeignete Kombination aus den bisher vorgestellten Optionen wird \textit{Stil}
-genannt; dies ist in etwa mit dem Seitenstil vergleichbar, den man bekannterma"sen
-mit |\pagestyle| einstellen kann.
-
-Einen vordefinierten Abbildungs- und Tabellenbeschriftungsstil kann man mit der
-Option
-\begin{quote}
- |style=|\meta{Stil}
-\end{quote}
-ausw"ahlen. Das \thispackage-Paket definiert in der Regel lediglich den Stil
-|default|, der alle vorgehenden Optionen auf die Standardbelegung zur"ucksetzt,
-d.h.~die Angabe der Option
-\begin{quote}
- |style=default|
-\end{quote}
-entspricht den Optionen
-\begin{quote}
- |format=default,labelformat=default,labelsep=default,|\\
- |justification=default,font=default,labelfont=default,|\\
- |textfont=default,margin=0pt,indention=0pt,parindent=0pt|\\
- |hangindent=0pt,singlelinecheck=true|
-\end{quote}
-
-Eigene Stile k"onnen mittels |\DeclareCaptionStyle| definiert werden.
-\SeeUserDefined
-
-
-% --------------------------------------------------------------------------- %
-
-\subsection{Abst"ande}
-
-\DescribeMacro{aboveskip=}
-\DescribeMacro{belowskip=}
-Die Standard-\LaTeX-Klassen |article|, |report| und |book| definieren
-zwei Abst"ande, die in Zusammenhang mit den Abbildungs- und
-Tabellenbeschriftungen gebraucht werden: |\abovecaptionskip| wird \emph{vor}
-der Beschriftung angewandt und ist auf |10pt| vorbelegt. |\belowcaptionskip|
-wird \emph{nach} der Beschriftung angewandt und ist auf |0pt| vorbelegt.
-
-\pagebreak[3]
-Beide Abst"ande lassen sich gew"ohnlich mit |\setlength| "andern, aber auch mit den
-\thispackage-Optionen
-\nopagebreak[3]
-\begin{quote}\begin{tabular}{@{}r@{}ll}
- |aboveskip=| & \meta{Abstand nach oben} & und\\
- |belowskip=| & \meta{Abstand nach unten} & .\\
-\end{tabular}\end{quote}
-
-\DescribeMacro{position=}
-Die sture Anwendung von |\abovecaptionskip| und |\belowcaptionskip| bei
-Beschriftungen birgt einen gro"sen Nachteil: Ist die Beschriftung \emph{"uber}
-und nicht \emph{unter} der Abbildung oder Tabelle (wie bei Tabellen durchaus
-"ublich), so ist die Vorbelegung dieser beiden Abst"ande nicht mehr sinnvoll,
-da hier kein Abstand zwischen der Beschriftung und der Tabelle gesetzt wird.
-(Wir erinnern uns: |\belowcaptionskip| ist auf |0pt|, also kein Abstand,
-vorbelegt.)
-
-Man vergleiche:
-\begin{Example}
- \begin{minipage}[c]{.5\linewidth}%
-% \captionsetup{aboveskip=0pt}%
- \captionof{table}{Eine Tabelle}%
- \centering\begin{tabular}{ll}%
- A & B \\%
- C & D \\%
- \end{tabular}%
- \end{minipage}%
- \begin{minipage}[c]{.5\linewidth}%
- \centering\begin{tabular}{ll}%
- A & B \\%
- C & D \\%
- \end{tabular}%
- \captionof{table}{Eine Tabelle}%
- \end{minipage}%
-\end{Example}
-
-Mit Hilfe des Parameters |position| kann man jedoch festlegen, wie
-\LaTeX\ die Beschriftung behandeln soll, ob als \mbox{\emph{"Uber}schrift}
-oder als \mbox{\emph{Unter}schrift}:
-\begin{quote}
- |position=top|\quad(oder |position=above|)
-\end{quote}
-gibt an, da"s die Abst"ande so gew"ahlt werden, da"s sie f"ur \mbox{\emph{"Uber}schriften}
-sinnvoll gew"ahlt sind und
-\begin{quote}
- |position=bottom|\quad(oder |position=below|)
-\end{quote}
-gibt an, da"s die Abst"ande so gew"ahlt werden, da"s sie f"ur \mbox{\emph{"Uber}schriften}
-sinnvoll gew"ahlt sind. (Dies ist die Standardeinstellung, allerdings nicht f"ur |longtable|s.)
-
-F"ugt man nun ein |\captionsetup{position=top}| in die linke Tabelle vor dem
-|\caption| Befehl ein, so ergeben sich im Vergleich zwischen "Uberschrift und
-Unterschrift stimmige Abst"ande:
-\begin{Example}
- \begin{minipage}[c]{.5\linewidth}%
- \captionsetup{position=top}%
- \captionof{table}{Eine Tabelle}%
- \centering\begin{tabular}{ll}%
- A & B \\%
- C & D \\%
- \end{tabular}%
- \end{minipage}%
- \begin{minipage}[c]{.5\linewidth}%
- \centering\begin{tabular}{ll}%
- A & B \\%
- C & D \\%
- \end{tabular}%
- \captionof{table}{Eine Tabelle}%
- \end{minipage}%
-\end{Example}
-
-(Technisch ist dies so realisiert, da"s bei "Uberschriften die Ab\-st"an\-de
-|\abovecaptionskip| und |\belowcaptionskip| vertauscht werden, so da"s
-|\abovecaptionskip| immer derjenige Abstand ist, der zwischen Tabelle
-und Beschriftung zur Anwendung kommt.)
-
-Sinnvoll l"a"st sich diese Option insbesondere zusammen mit dem optionalen
-Parameter bei |\captionsetup| anwenden: \See{auch \Section{misc}{N"utzliches}}
-\begin{quote}
- |\captionsetup[table]{position=top}|
-\end{quote}
-bewirkt, da"s bei allen Tabellen die Beschriftung bzgl.~der Abst"ande als
-"Uberschrift behandelt wird.
-\DescribeMacro{tableposition=}
-\NEWfeature{v3.0a}
-Da dies eine sehr gebr"auchliche Einstellung ist,
-stellt das \thispackage"=Paket diesen Befehl auch als abk"urzende Option f"ur
-|\usepackage| zur Verf"ugung:
-\begin{quote}
- |\usepackage[|\ldots|,tableposition=top]{caption}|\footnote{Beachten
- Sie bitte, da"s dies \emph{nicht} ausreichend ist, wenn eine
- \KOMAScript\ Dokumentenklasse zum Einsatz kommt. In diesem Falle mu"s
- ebenfalls die \emph{globale} Option |tablecaptionabove| angegeben werden.}
-\end{quote}
-entspricht
-\begin{quote}
- |\usepackage[|\ldots|]{caption}|\\
- |\captionsetup[table]{position=top}|
-\end{quote}
-
-% --------------------------------------------------------------------------- %
-
-\pagebreak[3]
-\section{N"utzliches}
-\label{misc}
-
-\DescribeMacro{\caption}
-Der Befehl
-\nopagebreak[3]
-\begin{quote}
- |\caption|\oarg{Kurzform f"ur das Verzeichnis}\marg{Beschriftung}
-\end{quote}
-\nopagebreak[3]
-erzeugt eine "Uber- bzw.~Unterschrift innerhalb einer gleitenden Umgebung
-wie |figure| oder |table|. Dies ist an sich nichts neues, neu ist allerdings,
-da"s kein Eintrag ins Abbildungs- oder Tabellenverzeichnis vorgenommen
-wird, wenn eine leere Kurzform angegeben wird, etwa so:
-\begin{quote}
- |\caption[]{Dies ist eine Abbildung, die nicht ins|\\
- | Abbildungsverzeichnis aufgenommen wird}|
-\end{quote}
-
-\DescribeMacro{\caption*}
-Das \package{longtable}-Paket definiert zus"atzlich zum Befehl |\caption| auch
-den Befehl |\caption*|, der eine Beschriftung ohne Bezeichner und ohne Eintrag
-ins Tabellenverzeichnis erzeugt. So erzeugt z.B. der Code
-\begin{quote}
- |\begin{longtable}{cc}|\\
- | \caption*{Eine Tabelle}\\|\\
- | A & B \\|\\
- | C & D \\|\\
- |\end{longtable}|
-\end{quote}
-diese Tabelle:
-\begin{longtable}{cc}
- \caption*{Eine Tabelle}\\
- A & B \\
- C & D \\
-\end{longtable}
-
-Das \thispackage-Paket bietet diesen Mechanismus auch f"ur normale Abbildungs-
-und Tabellenbeschriftungen an. Ein Beispiel:
-\begin{quote}
- |\begin{table}|\\
- | \caption*{Eine Tabelle}|\\
- | \begin{tabular}{cc}|\\
- | A & B \\|\\
- | C & D \\|\\
- | \end{tabular}|\\
- |\end{table}|
-\end{quote}
-
-\DescribeMacro{\captionof}
-\DescribeMacro{\captionof*}
-Der Befehl |\caption| funktioniert in der Regel nur innerhalb von gleitenden
-Umgebungen, manchmal m"ochte man ihn jedoch auch anderweitig anwenden,
-etwa um eine Abbildung in eine nicht-gleitende Umgebung wie |minipage| zu
-setzen.
-
-\pagebreak[2]
-Hierf"ur stellt das
-\thispackage-Paket den Befehl
-\begin{quote}
- |\captionof|\marg{Umgebungstyp}\oarg{Kurzform}\marg{Langform}
-\end{quote}
-zur Verf"ugung. Die Angabe des Umgebungstypen ist hierbei notwendig, damit der
-gew"unschte Bezeichner gew"ahlt wird und der Eintrag in das richtige Verzeichnis
-vorgenommen wird. Ein Beispiel:
-\begin{quote}
- |\captionof{figure}{Abbildung}|\\
- |\captionof{table}{Tabelle}|
-\end{quote}
-f"uhrt zu folgendem Ergebnis:
-\begin{Example}
- \captionof{figure}{Abbildung}
- \captionsetup{belowskip=\abovecaptionskip}
- \captionof{table}{Tabelle}
-\end{Example}
-
-Analog zu |\caption*| gibt es auch den Befehl |\captionof*| f"ur Beschriftungen
-ohne Bezeichner und ohne Verzeichniseintrag.
-
-Beide Befehle, sowohl |\captionof| als auch |\captionof*|, sollten nur
-\emph{innerhalb} von Umgebungen (wie |minipage| oder |\parbox|) angewandt werden.
-Zum einen kann es sonst passieren, da"s \LaTeX\ zwischen dem Inhalt und der
-Beschreibung einen Seitenumbruch setzt; zum anderen kann es bei Mi"sachtung gar
-zu seltsamen Effekten (wie falsche Abst"ande um die Beschriftungen herum) kommen!
-
-\DescribeMacro{\ContinuedFloat}
-Manchmal m"ochte man Abbildungen oder Tabellen aufteilen, jedoch ohne den einzelnen
-Teilen eine eigene Abbildungs- oder Tabellennummer zu geben. Hierf"ur stellt das
-\thispackage-Paket den Befehl
-\begin{quote}
- |\ContinuedFloat|
-\end{quote}
-zur Verf"ugung, der gleich als erstes innerhalb der folgenden Teile angewandt
-werden sollte. Er verhindert, da"s die Z"ahlung fortgef"uhrt wird; eine Abbildung
-oder Tabelle, die ein |\ContinuedFloat| enth"alt, erh"alt also die gleiche Nummer
-wie die vorherige Abbildung oder Tabelle.
-
-Ein Beispiel:
-\begin{quote}
- |\begin{table}|\\
- |\caption{Eine Tabelle.}|\\
- \ldots\\
- |\end{table}|\\
- \ldots\\
- |\begin{table}\ContinuedFloat|\\
- |\caption{Eine Tabelle. (fortgef"uhrt)}|\\
- \ldots\\
- |\end{table}|
-\end{quote}
-ergibt als Ergebnis:
-\begin{Example}
- \makeatletter\def\@captype{table}\makeatother
- \caption[]{Eine Tabelle.}
- \centerline{\ldots}
- \ContinuedFloat
- \captionsetup{aboveskip=0pt}
- \caption[]{Eine Tabelle. (fortgef"uhrt)}
-\end{Example}
-
-\DescribeMacro{\captionsetup}
-Den Befehl |\captionsetup| haben wir ja schon im \Section{usage}
-{Verwendung des Paketes} kennengelernt,
-uns dort allerdings die Bedeutung des optionalen Parameters
-\meta{Typ} aufgespart. %Dies soll nun nachgeholt werden:
-
-Wir erinnern uns, die Syntax des Befehls lautet
-\begin{quote}
- |\captionsetup|\oarg{Typ}\marg{Optionen}
-\end{quote}
-
-Wird hierbei ein \meta{Typ} angegeben, so werden die Optionen nicht
-unmittelbar umgesetzt, sondern werden lediglich vermerkt und kommen erst dann
-zum Einsatz, wenn eine "Uber- bzw.\ Unterschrift innerhalb des passenden
-gleitenden Umgebungstyps gesetzt wird. So wirkt sich z.B. die Angabe
-\begin{quote}
- |\captionsetup[figure]|\marg{Optionen}
-\end{quote}
-lediglich auf die Unterschriften aus, die innerhalb einer |figure|"=Umgebung
-gesetzt werden.
-
-Ein Beispiel:
-\begin{quote}
- |\captionsetup{font=small}|\\
- |\captionsetup[figure]{labelfont=bf}|
-\end{quote}
-f"uhrt zu Abbildungs- und Tabellenunterschriften der Art:
-\begin{Example}
- \captionsetup{font=small}
- \captionsetup[figure]{labelfont=bf}
- \captionof{figure}[]{Eine Abbildung}
- \captionsetup{belowskip=\abovecaptionskip}
- \captionof{table}[]{Eine Tabelle}
-\end{Example}
-
-Wie man sieht, f"uhrt das |\captionsetup[figure]{labelfont=bf}| lediglich dazu,
-da"s Abbildungsunterschriften mit fettem Bezeichner gesetzt werden, alle anderen
-Unter- bzw.\ "Uberschriften werden hiervon nicht beeinflu"st.
-
-\DescribeMacro{\clearcaptionsetup}
-Um diese vermerkten, typbezogenen Parameter aus dem Ged"achnis von \LaTeX\ zu
-l"oschen, gibt es den Befehl
-\begin{quote}
- |\clearcaptionsetup|\marg{Typ}\quad.
-\end{quote}
-
-|\clearcaptionsetup{figure}| w"urde z.B. die obrige Sonderbehandlung der
-Abbildungsunterschriften wieder aufheben:
-\begin{Example}
- \captionsetup{font=small}
- \captionof{figure}[]{Eine Abbildung}
- \captionsetup{belowskip=\abovecaptionskip}
- \captionof{table}[]{Eine Tabelle}
-\end{Example}
-
-Als Umgebungstypen mit Unter- bzw.\ "Uberschriften gibt es in der Regel nur
-zwei: |figure| und |table|. Wie wir jedoch sp"ater sehen werden, kommen durch die
-Verwendung spezieller \LaTeX-Pakete (wie etwa das \package{float},
-\package{longtable} oder \package{sidecap}"=Paket)
-ggf.~weitere Typen hinzu, deren Beschriftungen ebenfalls derart individuell
-angepasst werden k"onnen.
-
-% --------------------------------------------------------------------------- %
-
-\pagebreak[4]
-\section{Eigene Erweiterungen}
-\label{declare}
-
-Wem die vorhandenen Formate, Trenner, Textausrichtungen, Zeichens"atze und Stile
-nicht ausreichen, der hat die M"oglichkeit, sich eigene zu definieren. Hierzu
-gibt es eine Reihe von Befehlen, die in dem Vorspann des Dokumentes (das ist der
-Teil vor |\begin{document}|) zum Einsatz kommen.
-
-\pagebreak[2]
-\DescribeMacro{\DeclareCaptionFormat}
-Eigene Formate k"onnen mit dem Befehl
-\begin{quote}
- |\DeclareCaptionFormat|\marg{Name}\marg{Code mit \#1, \#2 und \#3}
-\end{quote}
-definiert werden. F"ur \#1 wird sp"ater der Bezeichner, f"ur \#2 der Trenner
-und f"ur \#3 der Text eingesetzt. So ist z.B. das Standardformat |plain|,
-welches die Beschriftung als gew"ohnlichen Absatz formatiert, folgenderma"sen
-in |caption.sty| definiert:
-\begin{quote}
- |\DeclareCaptionFormat{plain}{#1#2#3\par}|
-\end{quote}
-
-\DescribeMacro{\DeclareCaptionLabelFormat}
-"Ahnlich k"onnen auch eigene Bezeichnerformate definiert werden:
-\begin{quote}
- |\DeclareCaptionLabelFormat|\marg{Name}\marg{Code mit \#1 und \#2}
-\end{quote}
-Bei den Bezeichnerformaten wird hierbei f"ur \#1 der Name (also z.B.
-"`Abbildung"'), f"ur \#2 die Nummer (also z.B. "`12"') eingesetzt.
-
-\DescribeMacro{\bothIfFirst}
-\DescribeMacro{\bothIfSecond}
-Hierbei gibt es eine Besonderheit zu beachten: Wird das Bezeichnerformat
-auch in Verbindung mit dem \package{subfig}"=Paket\cite{subfig} verwendet,
-so kann der Bezeichnername (also \#1) auch leer sein.
-Um dies flexibel handhaben zu k"onnen, stellt das \thispackage"=Paket die
-Befehle
-\begin{quote}
- |\bothIfFirst|\marg{Erstes Argument}\marg{Zweites Argument}\quad und\\
- |\bothIfSecond|\marg{Erstes Argument}\marg{Zweites Argument}
-\end{quote}
-zur Verf"ugung. |\bothIfFirst| testet, ob das erste Argument leer ist,
-|\bothIfSecond|, ob das zweite Argument leer ist. Nur wenn dies nicht der
-Fall ist, werden beide Argumente ausgegeben, ansonsten werden beide
-unterdr"uckt.
-
-So ist z.B. das Standard"=Bezeichnerformat |simple| nicht, wie man
-naiverweise annehmen k"onnte, als
-\begin{quote}
- |\DeclareCaptionLabelFormat{simple}{#1 #2}|
-\end{quote}
-definiert, weil dies zu einem st"orendem f"uhrenden Leerzeichen f"uhren w"urde,
-wenn \#1 leer ist. Stattdessen findet sich in |caption.sty| folgende
-Definition, die sowohl mit |\caption| als auch mit |\subfloat| harmoniert:
-\begin{quote}
- |\DeclareCaptionLabelFormat{simple}{\bothIfFirst{#1}{ }#2}|
-\end{quote}
-d.h.~das Leerzeichen kommt nur dann zum Einsatz, wenn \#1 nicht leer ist.
-
-\pagebreak[3]
-\DescribeMacro{\DeclareCaptionLabelSeparator}
-Eigene Trenner werden mit
-\nopagebreak[3]
-\begin{quote}
- |\DeclareCaptionLabelSeparator|\marg{Name}\marg{Code}
-\end{quote}
-\nopagebreak[3]
-definiert. Auch hier wieder als einfaches Beispiel die Definition des
-Standard"=Trenners aus |caption.sty|:
-\nopagebreak[3]
-\begin{quote}
- |\DeclareCaptionLabelSeparator{colon}{: }|
-\end{quote}
-\pagebreak[3]
-
-\DescribeMacro{\DeclareCaptionJustification}
-Eigene Textausrichtungen k"onnen mit
-\begin{quote}
- |\DeclareCaptionJustification|\marg{Name}\marg{Code}
-\end{quote}
-definiert werden. Der \meta{Code} wird dann der Beschriftung vorangestellt,
-so f"uhrt z.B. die Verwendung der Ausrichtung
-\begin{quote}
- |\DeclareCaptionJustification{raggedright}{\raggedright}|
-\end{quote}
-dazu, da"s alle Zeilen der Beschriftung linksb"undig ausgegeben werden.
-
-\DescribeMacro{\DeclareCaptionFont}
-Eigene Zeichensatzoptionen k"onnen mit
-\begin{quote}
- |\DeclareCaptionFont|\marg{Name}\marg{Code}
-\end{quote}
-definiert werden. So definiert z.B. das \thispackage"=Paket die Optionen
-|small| und |bf| folgenderma"sen:
-\begin{quote}
- |\DeclareCaptionFont{small}{\small}|\\
- |\DeclareCaptionFont{bf}{\bfseries}|
-\end{quote}
-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"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
-Ein Beispiel welches etwas Farbe ins Spiel bringt:
-\begin{quote}
- |\usepackage{color}|\\
- |\DeclareCaptionFont{red}{\color{red}}|\\
- |\DeclareCaptionFont{green}{\color{green}}|\\
- |\DeclareCaptionFont{blue}{\color{blue}}|\\
- |\captionsetup{labelfont=blue,textfont=green}|
-\end{quote}
-\example{labelfont=blue,textfont=green,singlelinecheck=off}\figuretext
-
-\DescribeMacro{\DeclareCaptionStyle}
-Zu guter letzt noch die Definition eigener Stile. Stile sind einfach eine
-Ansammlung von geeigneten Einstellungen, die unter einem eigenen Namen
-zusammengefasst werden und mit der Paketoption |style=|\meta{Name} ausgew"ahlt
-werden k"onnen. Sie werden wie folgt definiert:
-\begin{quote}
- |\DeclareCaptionStyle|\marg{Name}\oarg{zus"atzliche Optionen}\marg{Optionen}
-\end{quote}
-Hierbei ist zu beachten, da"s die \meta{Optionen} immer auf den Standardeinstellungen
-basieren (siehe auch \Section{style}{Stile}), es brauchen
-also nur davon abweichende Optionen angegeben werden.
-
-Sind \meta{zus"atzliche Optionen} angegeben, so kommen diese automatisch
-zus"atzlich zum Einsatz, sofern die Beschreibung in eine einzelne Zeile passt
-und diese Abfrage nicht mit |singlelinecheck=off| ausgeschaltet wurde.
-
-Als Beispiel mu"s mal wieder eine einfache Definition aus diesem Paket herhalten:
-\begin{quote}
- |\DeclareCaptionStyle{default}[justification=centering]{}|
-\end{quote}
-
-% --------------------------------------------------------------------------- %
-
-\subsection{Weiterf"uhrende Beispiele}
-
-M"ochte man als Trenner einen Punkt \emph{und} einen Zeilenumbruch haben,
-so lie"se sich das wie folgt realisieren:
-\begin{quote}
- |\DeclareCaptionLabelSeparator{period-newline}{. \\}|
-\end{quote}
-W"ahlt man diesen Trenner mit |\captionsetup{labelsep=period-newline}| aus, so
-ergeben sich Beschriftungen der Art
-\begin{Example}
- \captionsetup{labelsep=period-newline,labelfont=bf,margin=10pt}
- \captionsetup{aboveskip=0pt,type=figure}
- \caption[]{\figuretext}
-\end{Example}
-
-F"ur kurze Beschriftungen, die in eine Zeile passen, mag dieses Erscheinungsbild
-jedoch st"orend sein, selbst wenn die automatische Zentrierung (mit
-|singlelinecheck=off|) ausgeschaltet ist:
-\begin{Example}
- \captionsetup{labelsep=period-newline,labelfont=bf,margin=10pt,singlelinecheck=0}
- \captionsetup{aboveskip=0pt,type=figure}
- \caption[]{Eine Abbildung.}
-\end{Example}
-
-Abhilfe schafft ein eigener Stil, der bei solchen Beschriftungen einen anderen
-Trenner ohne Zeilenumbruch ausw"ahlt:
-\begin{quote}
- |\DeclareCaptionStyle{period-newline}%|\\
- | [labelsep=period]{labelsep=period-newline}|
-\end{quote}
-\begin{Example}
- \captionsetup{style=period-newline,labelfont=bf,margin=10pt}
- \captionsetup{aboveskip=0pt,type=figure}
- \ContinuedFloat
- \caption[]{Eine Abbildung.}
-\end{Example}
-M"ochte man die automatische Zentrierung ebenfalls implementieren, so w"are
-\begin{quote}
- |\DeclareCaptionStyle{period-newline}%|\\
- | [labelsep=period,justification=centering]%|\\
- | {labelsep=period-newline}|
-\end{quote}
-eine geeignete Definition:
-\begin{Example}
- \captionsetup{style=period-newline2,labelfont=bf,margin=10pt}
- \captionsetup{aboveskip=0pt,type=figure}
- \ContinuedFloat
- \caption[]{Eine Abbildung.}
-\end{Example}
-
-Leicht abgewandelt w"urde sich auch bei l"angeren Beschriftungen eine Zentrierung ergeben:
-\begin{quote}
- |\DeclareCaptionStyle{period-newline}%|\\
- | [labelsep=period]%|\\
- | {labelsep=period-newline,justification=centering}|
-\end{quote}
-\begin{Example}
- \captionsetup{style=period-newline3,labelfont=bf,margin=10pt}
- \captionsetup{aboveskip=0pt,type=figure}
- \caption[]{\figuretext}
-\end{Example}
-
-\bigskip\pagebreak[3]
-Ein anderes Beispiel: Die Beschriftungen sollen wie folgt aussehen:
-\begin{Example}
- \captionsetup{format=reverse,labelformat=fullparens,labelsep=fill,font=small,labelfont=it}
- \captionsetup{aboveskip=0pt}
- \captionof{figure}[]{\figuretext}
-\end{Example}
-\pagebreak[2]
-Dies lie"se sich z.B. wie folgt realisieren:
-\nopagebreak[3]
-{\leftmargini=10pt
- \begin{quote}
- |\DeclareCaptionFormat{reverse}{#3#2#1}|\\
- |\DeclareCaptionLabelFormat{fullparens}{(\bothIfFirst{#1}{ }#2)}|\\
- |\DeclareCaptionLabelSeparator{fill}{\hfill}|\\
- |\captionsetup{format=reverse,labelformat=fullparens,|\\
- | labelsep=fill,font=small,labelfont=it}|
- \end{quote}}
-
-\bigskip\pagebreak[3]
-Ein weiteres Beispiel: Der Bezeichner soll in den linken Rand verlagert
-werden, so da"s die komplette Absatzbreite der Beschriftung selber zugute kommt:
-{\leftmargini=10pt
- \begin{quote}
- |\DeclareCaptionFormat{llap}{\llap{#1#2}#3\par}|\\
- |\captionsetup{format=llap,singlelinecheck=no,labelsep=quad}|
- \end{quote}}
-Das Ergebnis w"aren Beschriftungen wie diese:
-\begin{Example}
- \captionsetup{format=llap,labelsep=quad,singlelinecheck=no}
- \captionsetup{aboveskip=0pt}
- \captionof{figure}[]{\figuretext}
-\end{Example}
-
-% --------------------------------------------------------------------------- %
-
-\pagebreak[4]
-\section{Verwendung mit speziellen Dokumentenklassen}
-
-\NEWdescription{v3.0p}
-Das \thispackage"=Paket ist auf die Verwendung mit den
-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[3]
-\section{Interaktion mit anderen Paketen}
-\label{packages}
-
-Das \thispackage"=Paket enth"alt spezielle Anpassungen an andere Pakete, damit
-die Beschriftungen dort ebenfalls genauso ausgegeben werden, wie man es mit den oben
-genannten Optionen eingestellt hat. Im einzelnen sind dies die folgenden Pakete:
-
-\begin{tabular}{ll}
- |float| & Erlaubt die Definition eigener gleitenen Umgebungsstile\\
-% |hyperref| & Setzt Hyperlinks\\
-% |hypcap| & Korrigiert die von \package{hyperref} gesetzten Anker bei Beschriftungen\\
- |listings| & Setzt Quelltexte diverser Programmiersprachen\\
- |longtable| & Setzt Tabellen, die sich "uber mehrere Seiten erstrecken k"onnen\\
- |rotating| & Unterst"utzt rotierende Abbildungen und Tabellen\\
- |sidecap| & Erlaubt das Setzen von Beschriftungen \emph{neben} Abbildungen\\
- |supertabular| & Setzt Tabellen, die sich "uber mehrere Seiten erstrecken k"onnen\\
-\end{tabular}
-
-\NEWfeature{v3.0b}
-Wird eines dieser Pakete zusammen mit dem \thispackage"=Paket verwendet, steht
-einem zus"atzlich die M"oglichkeit bereit, mittels
-\begin{quote}|\captionsetup|\oarg{Umgebung}\marg{Optionen}\end{quote}
-Optionen festzulegen, die lediglich f"ur diese Umgebung gelten. So bewirkt z.B.
-\begin{quote}|\captionsetup[lstlisting]{labelfont=bf}|\quad,\end{quote}
-da"s Beschriftungen innerhalb der |lstlisting|"=Umgebung automatisch mit fettem
-Bezeichner gesetzt werden.
-(Dies funktioniert allerdings nicht mit den |sideways|"=Umgebungen, die vom
-\package{rotating}"=Paket angeboten werden.)
-
-Ist die Unterst"utzung eines dieser Pakete im speziellen Falle nicht erw"unscht,
-so kann dies durch Angabe der Option
-\begin{quote}
- |\usepackage[|\ldots|,|\meta{Paketname}|=no]{caption}|
-\end{quote}
-erreicht werden, etwa |float=no|, wenn die Unterst"utzung des
-\package{float}"=Paketes nicht erw"unscht wird. (Hinweis: Diese Optionen k"onnen
-nur innerhalb des |\usepackage|"=Befehls angegeben werden, also insbesondere
-\emph{nicht} nachtr"aglich mit |\captionsetup|.)
-
-N"ahere Informationen zu den einzelnen Paketen entnehmen Sie bitte der
-dazugeh"origen Anleitung oder dem \LaTeX-Begleiter\cite{companion}.
-
-% --------------------------------------------------------------------------- %
-
-\subsection{Das \package{float}-Paket}
-\label{float}
-
-Ein sehr n"utzliches Feature stellt das \package{float}"=Paket\cite{float}
-mit dem Platzierungsparameter |[H]| bereit:
-Anders als beim Parameter |h|, den \LaTeX\ bereitstellt und der lediglich
-eine Empfehlung darstellt, die Abbildung oder Tabelle nach M"oglichkeit
-"`hier"' zu setzen, ist das |H| viel kompromi"sloser, denn es erzwingt
-das Setzen genau an diesem Ort und nirgendwo anders.
-
-Weiterhin definiert es f"ur gleitende Umgebungen die Stile |plain|,
-|plaintop|, |ruled| und |boxed|.
-F"ur die vorhandenen Umgebungen |figure| und |table| kann hierbei der Stil
-ge"andert werden, ferner k"onnen eigene Umgebungstypen definiert werden,
-die ggf.~ein eigenes Verzeichnis bekommen.
-
-Bzgl.~der Abst"ande ist zu beachten, da"s bei Umgebungen des Stils |plain|,
-|plaintop| und |boxed| lediglich |\abovecaptionskip| (und kein
-|\belowcaptionskip|) zur Anwendung kommt. Ferner wird dieser Abstand vom
-\package{float}"=Paket gesetzt und nicht vom \package{caption}"=Paket;
-das hat f"ur Sie als Anwender zur Folge, da"s dieser Abstand nicht innerhalb
-der Umgebung selbst mit |\captionsetup| ver"andert werden kann, ferner ist
-die Option |position=| bei diesen Umgebungen wirkungslos.
-
-Beim Stil |boxed| ist der Abstand mit
-\begin{quote}
- |\captionsetup[boxed]{skip=2pt}|
-\end{quote}
-voreingestellt, bei |plain| und |plaintop| wird die globale Einstellung
-verwendet, sofern keine lokale definiert wurde.
-
-Kommt das \package{float}"=Paket zusammen mit dem \thispackage"=Paket zum
-Einsatz, so wird automatisch der Beschriftungsstil |ruled| definiert, der das
-Aussehen der Beschriftungen innerhalb von Abbildungen des Umgebungsstils
-|ruled| regelt:
-\begin{quote}
- |\DeclareCaptionStyle{ruled}{labelfont=bf,labelsep=space}|
-\end{quote}
-F"ur den Anwender bedeutet dies, da"s allgemein get"atigte Einstellungen an den
-Beschriftungen hier unwirksam sind; stattdessen werden die Beschriftungen genau
-so gesetzt, wie vom \package{float}"=Paket stilistisch vorgegeben, n"amlich so:
-
-\ifx\floatstyle\undefined
-
-\begin{Example}
-\hrule height.8pt depth0pt \kern2pt
-\vbox{\strut{\bfseries Programm 7.1}
- Das erste Programm. Dies hat nichts mit dem Paket an sich zu tun,
- dient aber als Beispiel. Man beachte den \texttt{ruled} Stil.}
-\kern2pt\hrule\kern2pt
-\begin{verbatim}
-#include <stdio.h>
-
-int main(int argc, char **argv)
-{
- for (int i = 0; i < argc; ++i)
- printf("argv[%d] = %s\n", i, argv[i]);
- return 0;
-}
-\end{verbatim}
-\kern2pt\hrule\relax
-\end{Example}
-
-\else
-
-\floatstyle{ruled}
-\newfloat{Program}{tbp}{lop}[section]
-\floatname{Program}{Programm}
-
-\begin{Program}[H]
-\begin{verbatim}
-#include <stdio.h>
-
-int main(int argc, char **argv)
-{
- for (int i = 0; i < argc; ++i)
- printf("argv[%d] = %s\n", i, argv[i]);
- return 0;
-}
-\end{verbatim}
-\caption{Das erste Programm. Dies hat nichts mit dem Paket an sich zu tun,
- dient aber als Beispiel. Man beachte den \texttt{ruled} Stil.}
-\end{Program}
-
-\fi
-
-M"ochte man das Aussehen dieser Beschriftungen "andern, ist der Stil |ruled|
-mittels
-\begin{quote}
- |\DeclareCaptionStyle{ruled}|\marg{Optionen}
-\end{quote}
-geeignet zu definieren.
-
-Dieser Mechanismus funktioniert auch bei allen anderen Umgebungsstilen,
-d.h.~auch bei Umgebungen des Types |plain|, |plaintop| und |boxed| kann ein
-geeigneter Beschriftungsstil mit gleichem Namen definiert werden, der dann
-automatisch bei gleitenden Umgebungen dieses Types zum Einsatz kommt.
-
-% --------------------------------------------------------------------------- %
-
-\subsection{Das \package{listings}-Paket}
-\label{listings}
-
-\NEWdescription{v3.0b}
-Das \package{listings}"=Paket\cite{listings} erlaubt die Einbindung von
-Quelltexten diverser Programmiersprachen.
-
-\textbf{Achtung:} Die Zusammenarbeit klappt erst ab der Version 1.2 des
-\package{listings}"=Paketes. "Altere Versionen verursachen eine Fehlermeldung!
-
-% --------------------------------------------------------------------------- %
-
-\subsection{Das \package{longtable}-Paket}
-\label{longtable}
-
-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"ur "Uberschriften ausgelegt ist
-% => "tableposition=b"
-% --------------------------------------------------------------------------- %
-
-\subsection{Das \package{rotating}-Paket}
-\label{rotating}
-
-Das \package{rotating}"=Paket\cite{rotating} stellt u.a.~die
-gleitenden Umgebungen \texttt{sideways\-figure} und \texttt{sideways\-table}
-bereit, die im Gegensatz zu |figure| und |table| um 90 Grad gedreht werden
-und immer eine ganze Seite einnehmen.
-
-% --------------------------------------------------------------------------- %
-
-\subsection{Das \package{sidecap}-Paket}
-\label{sidecap}
-
-\NEWdescription{v3.0b}
-Das \package{sidecap}"=Paket\cite{sidecap} definiert die Umgebungen |SCfigure|
-und |SCtable|, die analog zu |figure| und |table| funktionieren, aber
-Beschriftungen \emph{neben} der Abbildung oder Tabelle erlauben.
-
-Bei der Verwendung des \package{sidecap}"=Paketes ist zu beachten, da"s eine
-dort angegebene Option |raggedright|, |raggedleft| oder |ragged| den Parameter
-|justification=| des \thispackage"=Paketes f"ur die betreffenen Umgebungen
-"uberschreibt, d.h.~bei Beschriftungen \emph{neben} der Abbildung oder Tabelle
-erh"alt die Option des \package{sidecap}"=Paketes den Vorzug.
-
-\DescribeMacro{listof=}
-%\NEWfeature{v3.0b}
-Ferner liegt es im Design des \package{sidecap}"=Paketes begr"undet,
-da"s das Unterdr"ucken des Verzeichniseintrages mit |\caption[]{|\ldots|}|
-hier nicht klappt. Als Alternative kann in diesen F"allen die Unterdr"uckung
-mittels |\captionsetup{listof=false}| innerhalb der Abbildung oder Tabelle
-geschehen.
-
-\ifx\SCfigure\undefined
-
-\begin{Example}
- \newsavebox\scbox
- \begin{lrbox}{\scbox}
- \setlength{\unitlength}{.75cm}%
- \setlength{\fboxsep}{0pt}%
- \fbox{\begin{picture}(4,4)%
- \put(1,3){\circle{1}}%
- \put(3,3){\circle{1}}%
- \put(2,2){\circle{1}}%
- \put(1,1){\circle{1}}%
- \put(3,1){\circle{1}}%
- \end{picture}}%
- \end{lrbox}
- \newlength\scboxwidth
- \setlength\scboxwidth{\wd\scbox}
- \makebox[\linewidth][c]{%
- \parbox[b]{\scboxwidth}{\unhbox\scbox}%
- \hspace\marginparsep
- \parbox[b]{1.5\scboxwidth}{%
- \captionsetup{justification=RaggedRight,labelfont=bf}
- \captionof{figure}[]{Ein kleines Beispiel mit Beschriftung neben der Abbildung.}%
- }%
- }
-\end{Example}
-
-\else
-
-\captionsetup{labelfont=bf}
-\begin{SCfigure}[1.5][!ht]
- \setlength{\unitlength}{.75cm}%
- \setlength{\fboxsep}{0pt}%
- \fbox{\begin{picture}(4,4)%
- \put(1,3){\circle{1}}%
- \put(3,3){\circle{1}}%
- \put(2,2){\circle{1}}%
- \put(1,1){\circle{1}}%
- \put(3,1){\circle{1}}%
- \end{picture}}%
-% \captionsetup{labelfont=bf}
- \caption[]{Ein kleines Beispiel mit Beschriftung neben der Abbildung.}
-\end{SCfigure}
-\captionsetup{labelfont=default}
-
-\fi
-
-% --------------------------------------------------------------------------- %
-
-\subsection{Das \package{supertabular}-Paket}
-
-Das \package{supertabular}"=Paket\cite{supertabular} definiert, "ahnlich wie
-das \package{longtable}"=Paket, eine Umgebung |supertabular|, die sich
-ebenfalls wie eine Tabelle anwenden l"a"st, aber im Gegensatz zu |tabular|
-Seitenumbr"uche innerhalb der Tabelle gestattet.
-
-Eine ausf"uhrliche Behandlung der Unterschiede zwischen den beiden Paketen
-\package{longtable} und \package{supertabular} ist im Buch "`Der \LaTeX-Begleiter"'
-\cite{companion} zu finden.
-
-% --------------------------------------------------------------------------- %
-
-\subsection{Bekannte Inkompatibilit"aten}
-
-\NEWdescription{v3.0b}
-Die Verwendung des \thispackage"=Paketes in Verbindung mit folgenden Paketen
-ist nicht empfehlenswert, da es zu unerw"unschten Seiteneffekten
-oder gar Fehlern kommen kann:
-\begin{quote}
- \package{ccaption}, \package{ftcap}, \package{hvfloat} und
- \package{nonfloat}
-\end{quote}
-
-% --------------------------------------------------------------------------- %
-
-\pagebreak[4]
-\section{Kompatibilit"at zu "alteren Versionen}
-\label{compatibility}
-
-\subsection{Das \package{caption}-Paket Version $1.x$}
-
-Diese Version des \thispackage"=Paketes ist weitgehend kompatibel zu "alteren
-Versionen des Paketes; alte, vorhandene Dokumente sollten sich also in der
-Regel ohne Probleme weiterhin "ubersetzen lassen. (Sollten wider Erwarten
-Probleme auftauchen, schreiben sie mir bitte eine E-Mail.)
-
-Jedoch ist zu beachten, da"s eine Mischung aus alten Befehlen und neueren
-Optionen bzw.~Befehlen zu unerw"unschten Nebeneffekten f"uhren kann.
-
-Hier eine kurze "Ubersicht "uber die alten, "uberholten Optionen und ihre
-aktuellen Entsprechungen:
-
-{\small\begin{longtable}{ll}
-\package{caption} \version{1.x} & \thispackage\ \version{3.x}\\
-\hline
-\endhead
-|normal| & |format=plain|\\
-|hang| & |format=hang|\\
-|isu| & |format=hang|\\
-|center| & |justification=centering|\\
-|centerlast| & |justification=centerlast|\\
-%|anne| & |justification=centerlast|\\
-|nooneline| & |singlelinecheck=off|\\
-|scriptsize| & |font=scriptsize|\\
-|footnotesize| & |font=footnotesize|\\
-|small| & |font=small|\\
-|normalsize| & |font=normalsize|\\
-|large| & |font=large|\\
-|Large| & |font=Large|\\
-|up| & |labelfont=up|\\
-|it| & |labelfont=it|\\
-|sl| & |labelfont=sl|\\
-|sc| & |labelfont=sc|\\
-|md| & |labelfont=md|\\
-|bf| & |labelfont=bf|\\
-|rm| & |labelfont=rm|\\
-|sf| & |labelfont=sf|\\
-|tt| & |labelfont=tt|\\
-\end{longtable}}
-
-Neben den Optionen zum Einstellen des Zeichensatzes gab es auch die Befehle
-|\captionsize| bzw. |\captionfont| und |\captionlabelfont|, die direkt
-mittels |\renewcommand| ver"andert werden konnten. Dieser Mechanismus
-wurde durch die Anweisungen
-\begin{quote}
- |\DeclareCaptionFont{|\ldots|}{|\ldots|}|\qquad und\\
- |\captionsetup{font=|\ldots|,labelfont=|\ldots|}|
-\end{quote}
-ersetzt. \SeeUserDefined
-
-Das Setzen eines Randes geschah in \version{1.x} mittels
-\begin{quote}
- |\setlength{\captionmargin}{|\ldots|}|\quad.
-\end{quote}
-Dies wurde durch
-\begin{quote}
- |\captionsetup{margin=|\ldots|}|
-\end{quote}
-ersetzt. \See{\Section{margins}{R"ander und Abs"atze}}
-
-Zum Beispiel w"urde
-\begin{quote}
-|\usepackage[hang,bf]{caption}|\\
-|\renewcommand\captionfont{\small\sffamily}|\\
-|\setlength\captionmargin{10pt}|
-\end{quote}
-in aktueller Notation
-\begin{quote}
-|\usepackage[format=hang,labelfont=bf,font={small,sf},|\\
-| margin=10pt]{caption}|
-\end{quote}
-bzw.
-\begin{quote}
-|\usepackage{caption}|\\
-|\captionsetup{format=hang,labelfont=bf,font={small,sf},|\\
-| margin=10pt}|
-\end{quote}
-hei"sen.
-
-Die etwas exotische Option |ruled|, die eine partielle Anwendung der
-eingestellten Parameter bei gleitenden Umgebungen des Typs |ruled|
-aktivierte, wird ebenfalls emuliert, hat aber keine direkte
-Entsprechung in dieser Version des \thispackage"=Paketes.
-M"ochte man gezielt das Aussehen der Abbildungen des Stils |ruled|,
-der durch das \package{float}"=Paket zur Verf"ugung gestellt wird,
-ver"andern, so ist dies nun durch
-\begin{quote}
- |\DeclareCaptionStyle{ruled}{|\ldots|}|
-\end{quote}
-bzw.
-\begin{quote}
- |\captionsetup[ruled]{|\ldots|}|
-\end{quote}
-m"oglich. \SeeUserDefined[ und \Section*{misc}{N"utzliches} sowie
- \Section*{float}{Das \package{float}-Paket}]
-
-\subsection{Das \package{caption2}-Paket Version $2.x$}
-
-Die Pakete \package{caption} und seine experimentelle, nun veraltete
-Variante \package{caption2} sind vom internen Konzept
-her zu unterschiedlich, um hier eine vollst"andige Kompatibilit"at
-gew"ahrleisten zu k"onnen.
-Daher liegt diesem Paket weiterhin die Datei |caption2.sty| bei, so da"s
-"altere Dokumente, die das \package{caption2}"=Paket verwenden, weiterhin
-"ubersetzt werden k"onnen.
-
-Neue Dokumente sollten jedoch auf dem aktuellen \thispackage"=Paket
-aufgesetzt werden. In den meisten F"allen ist es ausreichend, einfach
-ggf.~die Anweisung
-\begin{quote}
- |\usepackage[...]{caption2}|
-\end{quote}
-durch
-\begin{quote}
- |\usepackage[...]{caption}|
-\end{quote}
-zu ersetzen. Einige Optionen und Befehle werden jedoch nicht emuliert,
-so da"s sie anschlie"send Fehlermeldungen erhalten k"onnen.
-Die folgenden Abs"atze werden Ihnen jedoch bei der Umsetzung dieser
-Optionen und Befehle helfen. Sollten dar"uberhinaus noch Fragen oder
-Probleme auftreten, so z"ogern Sie bitte nicht, mich diesbez"uglich
-per E-Mail zu kontaktieren.
-
-Zus"atzlich zu den bereits im vorherigen Abschnitt vorgestellten Optionen
-werden auch folgende emuliert:
-
-{\small\begin{longtable}{ll}
-\package{caption2} \version{2.x} & \thispackage\ \version{3.x}\\
-\hline
-\endhead
-|flushleft| & |justification=raggedright|\\
-|flushright| & |justification=raggedleft|\\
-|oneline| & |singlelinecheck=on|\\
-\end{longtable}}
-
-Das Setzen eines Randes geschah in \version{2.x} mittels
-\begin{quote}\leavevmode\hbox{%
- |\setcaptionmargin{|\ldots|}| bzw.
- |\setcaptionwidth{|\ldots|}|\quad.
-}\end{quote}
-Dies wurde durch
-\begin{quote}\leavevmode\hbox{%
- |\captionsetup{margin=|\ldots|}| bzw.
- |\captionsetup{width=|\ldots|}|
-}\end{quote}
-ersetzt. \See{\Section{margins}{R"ander und Abs"atze}}
-
-Das Setzen des Einzuges wurde in \version{2.x} mit
-\begin{quote}
- |\captionstyle{indent}|\\
- |\setlength\captionindent{|\ldots|}|
-\end{quote}
-erledigt, dies geschieht nun mit
-\begin{quote}
- |\captionsetup{format=plain,indention=|\ldots|}|\quad.
-\end{quote}
-
-Die Sonderbehandlung von einzeiligen Beschriftungen lie"s sich in
-\version{2.x} mit |\oneline|\-|captions|\-|false| aus-
-bzw. |\oneline|\-|captions|\-|true| wieder einschalten. Dies wurde durch
-|\captionsetup{|\discretionary{}{}{}|singlelinecheck=|\discretionary{}{}{}|off}|
-bzw.
-|\captionsetup{|\discretionary{}{}{}|singlelinecheck=|\discretionary{}{}{}|on}|
-ersetzt. \See{\Section{justification}{Textausrichtung}}
-
-Die Befehle
-\begin{quote}
- |\captionlabeldelim|, |\captionlabelsep|, |\captionlabelfalse|,
- |\captionstyle|, |\defcaptionstyle|, |\newcaptionstyle| und |\renewcaptionstyle|
-\end{quote}
-haben keine direkte Entsprechnung und werden daher durch diese
-Version des \thispackage"=Paketes auch nicht emuliert.
-Sie f"uhren also bei der Verwendung %mit diesem \thispackage"=Paket
-zu Fehlermeldungen und m"ussen daher zwingend umgesetzt werden.
-Die Umsetzung ist von Fall zu Fall verschieden, lesen Sie sich daher bitte
-diese Anleitung gr"undlich durch und suchen Sie sich die Optionen bzw.~Befehle
-als Ersatz heraus, die Ihren W"unschen entsprechen.
-\iffalse
-Als kleine Hilfestellung hier die Beispiele aus der alten Anleitung zum
-\package{caption2}"=Paket und deren Umsetzung:
-
-\newenvironment{OldNew}%
- {\begin{minipage}\linewidth
- \def\Old{Alt:\begin{quote}}%
- \def\New{\end{quote}Neu:\begin{quote}}%
- \def\Or{\end{quote}\centerline{-- oder --}\begin{quote}}%
- }%
- {\end{quote}\end{minipage}}
-
-\begin{OldNew}
-\Old
- |\captionstyle{center}|
-\New
- |\captionsetup{justification=centering}|
-\end{OldNew}
-
-\hrule
-
-\begin{OldNew}
-\Old
- |\captionstyle{indent}|\\
- |\setlength{\captionindent}{1cm}|
-\New
- |\captionsetup{format=plain,indention=1cm}|
-\end{OldNew}
-
-\hrule
-
-\begin{OldNew}
-\Old
- |\renewcommand\captionfont{\small}|\\
- |\renewcommand\captionlabelfont{\itshape}|
-\New
- |\captionsetup{font=small,labelfont=it}|
-\end{OldNew}
-
-\hrule
-
-\begin{OldNew}
-\Old
- |\renewcommand\captionfont{\small\itshape}|\\
- |\renewcommand\captionlabelfont{\upshape}|
-\New
- |\captionsetup{font=small,textfont=it}|
-\end{OldNew}
-
-\hrule
-
-\begin{OldNew}
-\Old
- |\setcaptionwidth{.5\textwidth}|
-\New
- |\captionsetup{width=.5\textwidth}|
-\end{OldNew}
-
-\hrule
-
-\begin{OldNew}
-\Old
- |\setcaptionmargin{.25\textwidth}|
-\New
- |\captionsetup{margin=.25\textwidth}|
-\end{OldNew}
-
-\hrule
-
-\begin{OldNew}
-\Old
- |\newcaptionstyle{absatz}{\captionlabel: \captiontext\par}|\\
- |\captionstyle{absatz}|
-\New
- |\DeclareCaptionFormat{absatz}{#1: #3\par}|\\
- |\captionsetup{format=absatz,singlelinecheck=off}|
-\Or
- |\captionsetup{format=plain,singlelinecheck=off}|
-\end{OldNew}
-
-\hrule
-
-\begin{OldNew}
-\Old
- |\newcaptionstyle{fancy}{\textsf{\captionlabel}\\\captiontext\par}|\\
- |\captionstyle{fancy}|
-\New
- |\DeclareCaptionFormat{fancy}{\textsf{#1}\\#3\par}|\\
- |\captionsetup{format=fancy,singlelinecheck=off}|
-\Or
- |\captionsetup{format=plain,labelfont=sf,labelsep=newline}|
-\end{OldNew}
-
-\hrule
-
-\begin{OldNew}
-\Old
- |\newcaptionstyle{fancy2}{\captiontext\hfill\textit{(\captionlabel)}}|\\
- |\captionstyle{fancy2}|
-\New
- |\DeclareCaptionFormat{fancy2}{#3\hfill\textit{(#1)}}|\\
- |\captionsetup{format=fancy2,singlelinecheck=off}|
-\end{OldNew}
-
-\hrule
-
-\begin{OldNew}
-\Old
- |\newcaptionstyle{mystyle}{%|\\
- | \normalcaptionparams|\\
- | \renewcommand\captionlabelfont{\bfseries}%|\\
- | \renewcommand\captionlabeldelim{.}%|\\
- | \onelinecaptionsfalse|\\
- | \usecaptionstyle{centerlast}}|\\
- |\captionstyle{mystyle}|
-\New
- |\DeclareCaptionStyle{mystyle}{labelfont=bf,labelsep=period,justification=centerlast}|\\
- |\captionsetup{style=mystyle}|
-\end{OldNew}
-
-\hrule
-
-\begin{OldNew}
-\Old
- |\newcaptionstyle{hangandleft}{%|\\
- | \let\oldcaptiontext\captiontext|\\
- | \def\captiontext{\raggedright\oldcaptiontext}%|\\
- | \usecaptionstyle{hang}}|\\
- |\captionstyle{hangandleft}|
-\New
- |\captionsetup{format=hang,justification=raggedright}|
-\end{OldNew}
-
-\hrule
-
-\begin{OldNew}
-\Old
- |\newcaptionstyle{fancy}{%|\\
- | \usecaptionmargin\captionfont|\\
- | \onelinecaption|\\
- | {{\captionlabelfont\captionlabel\captionlabeldelim}%|\\
- | \captionlabelsep\captiontext}%|\\
- | {{\centering\captionlabelfont\captionlabel\par}%|\\
- | \centerlast\captiontext\par}}|\\
- |\captionstyle{fancy}|
-\New
- |\DeclareCaptionFormat{fancy}{\centering#1\par\centerlast#3\par}|\\
- |\DeclareCaptionStyle{fancy}|\\
- | [format=plain,justification=centering]|\\
- | {format=fancy}|\\
- |\captionsetup{style=fancy}|
-\Or
- |\DeclareCaptionFormat{fancy}{#1\par#3\par}|\\
- |\DeclareCaptionStyle{fancy}|\\
- | [format=plain,justification=centering]|\\
- | {format=fancy,justification=centerlast}|\\
- |\captionsetup{style=fancy}|
-\end{OldNew}
-
-\hrule
-
-\begin{OldNew}
-\Old
- |\renewcaptionstyle{longtable}{\usecaptionstyle{normal}}|
-\New
- |\captionsetup[longtable]{format=plain}|
-\end{OldNew}
-\fi
-
-Ebenfalls keine Entsprechung hat die \version{2.x}"=Option |ignoreLTcapwidth|.
-Deren Verwendung kann in der Regel einfach entfallen, da das
-\thispackage"=Paket den Wert von |\LTcapwidth| sowieso nicht beachtet,
-solange er nicht explizit auf einen anderen Wert als den Standardwert
-gesetzt wird.
-\See{\Section{longtable}{Das \package{longtable}"=Paket}}
-
-% --------------------------------------------------------------------------- %
-
-%\pagebreak[4]
-\section{Weiterf"uhrende Dokumente}
-
-Folgende Dokumente m"ochte ich an dieser Stelle jedem ans Herz legen:
-
-\begin{itemize}
-\item
- Die DANTE-FAQ:\nopagebreak
- \begin{quote}
- \url{http://www.dante.de/faq/de-tex-faq/}
- \end{quote}
-
-\item
- \emph{"`Gleitobjekte -- die richtige Schmierung"'} von Axel Reichert
- erl"autert den Umgang mit gleitenden Umgebungen und ist hier im Netz
- zu finden:\nopagebreak
- \begin{quote}
- \url{ftp://ftp.dante.de/pub/tex/info/german/gleitobjekte/}
- \end{quote}
-
-\item
- \textsf{epslatex} von Keith Reckdahl enth"alt viele n"utzliche Tips im
- Zusammenhang mit der Einbindung von Graphiken in \LaTeXe.
- Das Dokument ist unter\nopagebreak
- \begin{quote}
- \url{ftp://ftp.dante.de/pub/tex/info/epslatex/}
- \end{quote}
- zu finden.
-\end{itemize}
-
-% --------------------------------------------------------------------------- %
-
-%\pagebreak[3]
-\section{Danksagungen}
-
-Von ganzem Herzen danke ich Katja Melzner,
-Steven D. Cochran, Frank Mittelbach,
-David Carlisle, Carsten Heinz, Olga Lapko und Keith Reckdahl.
-
-Weiterhin m"ochte ich mich herzlich bei
-Harald Harders,
-Peter L\"offler,
-Peng Yu,
-Alexander Zimmermann,
-Matthias Pospiech,
-J\"urgen Wieferink,
-Christoph Bartoschek,
-Uwe St\"ohr,
-Ralf Stubner,
-Geoff Vallis,
-Florian Keiler,
-J"urgen G"obel,
-Uwe Siart,
-Sang-Heon Shim,
-Henrik Lundell,
-David Byers,
-William Asquith
-und
-Prof.~Dr.~Dirk Hoffmann
-f"ur ihre Hilfe beim stetigen Verbessern dieses Paketes bedanken.
-
-% --------------------------------------------------------------------------- %
-
-\pagebreak[4]
-\begin{thebibliography}{9}
- \bibitem{companion}
- Frank Mittelbach and Michel Goossens:
- \newblock {\em The {\LaTeX} Companion (2nd.~Ed.)},
- \newblock Addison-Wesley, 2004.
-
- \bibitem{float}
- Anselm Lingnau:
- \emph{An Improved Environment for Floats},
- 2001/11/08
-
- \bibitem{floatrow}
- Olga Lapko:
- \emph{The floatrow package documentation},
- 2005/05/22
-
- \bibitem{hyperref}
- Sebastian Rahtz \& Heiko Oberdiek:
- \emph{Hypertext marks in \LaTeX},
- 2007/01/25
-
- \bibitem{hypcap}
- Heiko Oberdiek:
- \emph{The hypcap package -- Adjusting anchors of captions}
- 2007/02/19
-
- \bibitem{listings}
- Carsten Heinz:
- \emph{The Listings Package},
- 2004/02/13
-
- \bibitem{longtable}
- David Carlisle:
- \emph{The longtable package},
- 2000/10/22
-
- \bibitem{rotating}
- Sebastian Rahtz and Leonor Barroca:
- \emph{A style option for rotated objects in \LaTeX},
- 1997/09/26
-
- \bibitem{sidecap}
- Rolf Niepraschk und Hubert G"a"slein:
- \emph{The sidecap package},
- 2003/06/06
-
- \bibitem{subfig}
- Steven D. Cochran:
- \emph{The subfig package},
- 2005/07/05
-
- \bibitem{supertabular}
- Johannes Braams und Theo Jurriens:
- \emph{The supertabular environment},
- 2002/07/19
-\end{thebibliography}
-
-\end{document}
diff --git a/Master/texmf-dist/doc/latex/caption/caption-deu.pdf b/Master/texmf-dist/doc/latex/caption/caption-deu.pdf
new file mode 100644
index 00000000000..3d0d700d8df
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/caption/caption-deu.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/caption/caption-deu.tex b/Master/texmf-dist/doc/latex/caption/caption-deu.tex
new file mode 100644
index 00000000000..c4f06dc4566
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/caption/caption-deu.tex
@@ -0,0 +1,2909 @@
+%
+% This is file `caption-deu.tex'.
+%
+% Copyright (C) 1994-2007 Axel Sommerfeldt (caption@sommerfee.de)
+%
+% --------------------------------------------------------------------------
+%
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2003/12/01 or later.
+%
+% This work has the LPPL maintenance status "maintained".
+%
+% This Current Maintainer of this work is Axel Sommerfeldt.
+%
+% This work consists of the files caption.ins, caption.dtx, caption2.dtx,
+% and ltcaption.dtx, the derived files caption.sty, caption2.sty,
+% caption3.sty, and ltcaption.sty, and the user manuals caption-deu.tex,
+% caption-eng.tex, and caption-rus.tex.
+%
+\NeedsTeXFormat{LaTeX2e}[1994/12/01]
+\ProvidesFile{caption-deu.tex}[2007/09/03 v3.1 Das caption-Paket]
+\hbadness=9999 \newcount\hbadness \hfuzz=20pt % Make TeX shut up.
+%\errorcontextlines=3
+
+\documentclass[a4paper]{ltxdoc}
+\setlength\parindent{0pt}
+\setlength\parskip{\medskipamount}
+
+%%%\usepackage[T1]{fontenc}
+\ifx\pdfoutput\undefined\else
+ \ifcase\pdfoutput\else
+ \usepackage{mathptmx,courier}
+ \usepackage[scaled=0.90]{helvet}
+ \addtolength\marginparwidth{15pt}
+ \fi
+\fi
+
+\usepackage[german]{babel}
+\IfFileExists{selinput.sty}%
+ {\usepackage{selinput}\SelectInputMappings{adieresis={ä},germandbls={ß}}}%
+ {\usepackage[latin1]{inputenc}}
+\usepackage{longtable,setspace}
+
+\usepackage{hypdoc}\hypersetup{german}
+\hypersetup{pdfkeywords={LaTeX, package, caption},pdfstartview={}}
+\usepackage[listof=0,hypcap=false]{caption}[2007/09/01]
+
+\DeclareRobustCommand*\eTeX{\texorpdfstring
+ {\leavevmode\hbox{$\varepsilon$}-\TeX}%
+ {e-TeX}}
+\DeclareRobustCommand*\AmS{\texorpdfstring
+ {{\protect\usefont{OMS}{cmsy}{m}{n}A\kern-.1667em\lower.5ex\hbox{M}\kern-.125emS}}%
+ {AMS}}
+\DeclareRobustCommand*\KOMAScript{\texorpdfstring
+ {\textsf{K\kern.05em O\kern.05em M\kern.05em A\kern.1em-\kern.1em Script}}%
+ {KOMA-Script}}
+\DeclareRobustCommand*\NTG{NTG}
+\DeclareRobustCommand*\SmF{SMF}
+
+\newcommand\NEW[2]{\hskip 1sp \marginpar{\footnotesize\sffamily\raggedleft#1\\#2}}
+
+\usepackage{marvosym}
+\makeatletter
+\newcommand*\INFO{\@ifstar{\@INFO{}}{\@INFO{\vbox to \ht\strutbox}}}
+\newcommand*\@INFO[1]{\MARGINSYM{#1{\Huge\Info}}}
+\makeatother
+\font\manual=manfnt
+\newcommand*\DANGER{\MARGINSYM{\manual\char127}}
+\newcommand*\MARGINSYM[1]{\hskip 1sp \marginpar{\raggedleft\textcolor{blue}{{#1}}}}
+
+\DeclareCaptionFormat{myformat1}{#1#2\\#3}
+\newlength\myindention
+\DeclareCaptionFormat{myformat2}{#1#2\\\hspace*\myindention#3}
+\DeclareCaptionOption{myindention}{\setlength\myindention{#1}}
+\DeclareCaptionFormat{reverse}{#3#2#1}
+\DeclareCaptionFormat{llap}{\llap{#1#2}#3\par}
+\DeclareCaptionLabelFormat{fullparens}{(\bothIfFirst{#1}{~}#2)}
+\DeclareCaptionLabelSeparator{fill}{\hfill}
+
+\newcommand*\purerm[1]{{\upshape\mdseries\rmfamily #1}}
+\newcommand*\puresf[1]{{\upshape\mdseries\sffamily #1}}
+\newcommand*\purett[1]{{\upshape\mdseries\ttfamily #1}}
+\let\package\puresf
+\let\env\purett \let\opt\purett
+
+\newcommand*\csmarg[1]{\texttt{\char`\{#1\char`\}}}
+\newcommand*\csoarg[1]{\texttt{\char`\[#1\char`\]}}
+\newcommand*\version[2][]{$v#2$}
+\newcommand*\x{\discretionary{-}{}{}}
+\newcommand*\xx{\discretionary{}{}{}}
+
+\newenvironment{Options}[1]%
+ {\list{}{\renewcommand{\makelabel}[1]{\texttt{##1}\hfil}%
+ \settowidth{\labelwidth}{\texttt{#1\space}}%
+ \setlength{\leftmargin}{\labelwidth}%
+ \addtolength{\leftmargin}{\labelsep}}}%
+ {\endlist}
+
+\newenvironment{Example}%
+ {\ifvmode\else\unskip\par\fi
+ \minipage{\linewidth}\smallskip}%
+ {\smallskip\endminipage}
+
+\makeatletter
+\newcommand\example{\@ifstar
+ {\@example{belowskip=\abovecaptionskip}}%
+ {\@example{}}}
+\def\@example#1{%
+ \@testopt{\@@example{#1}}{figure}}
+\long\def\@@example#1[#2]#3#4{%
+ \begingroup
+ \captionsetup{#1,size=small,margin={\leftmargini,10pt},#3}%
+ \captionof{#2}[]{#4}%
+ \endgroup}
+\makeatother
+
+\begin{document}
+\let\subsectionautorefname\sectionautorefname
+\let\subsubsectionautorefname\sectionautorefname
+
+\def\thispackage{das \package{caption}"=Paket}
+\def\Thispackage{Das \package{caption}"=Paket}
+
+\newcommand\NEWfeature{\NEW{Neues Feature}}
+\newcommand\NEWdescription{\NEW{Neue Beschreibung}}
+
+\makeatletter
+\newcommand*\Ref{\@ifstar{\@Ref\ref}{\@Ref\autoref}}
+\newcommand*\@Ref[2]{#1{#2}: \textit{"`\nameref{#2}"'}}
+\makeatother
+\newcommand*\See[1]{{\small (Siehe #1)}}
+\newcommand*\SeeUserDefined[1][]{\See{\Ref{declare}#1}}
+
+\def\TODO{\emph{-- Hier fehlt noch 'was --}}
+
+% --------------------------------------------------------------------------- %
+
+\GetFileInfo{caption-deu.tex}
+\let\docdate\filedate
+\GetFileInfo{caption.sty}
+
+\title{Setzen von Abbildungs- und Tabellenbeschriftungen mit dem
+ caption-Paket\texorpdfstring{\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{\docdate}
+\maketitle
+
+% --------------------------------------------------------------------------- %
+
+\begin{abstract}
+\Thispackage\ bietet einem Mittel und Wege das Erscheinungsbild der
+Bildunterschriften und Tabellen"uberschriften den eigenen W"unschen
+bzw.\ bestimmten Vorgaben anzupassen.
+Hierbei wurde viel Wert auf die reibungslose Zusammenarbeit und in die
+Integration anderer Dokumentenklassen und Pakete gelegt.\footnote{F"ur die
+Version 3.0 dieses Paketes wurde die Benutzerschnittstelle zusammen
+mit Steven D. Cochran und Frank Mittelbach komplett "uberarbeitet.}
+\end{abstract}
+
+\newcommand\exampletext{%
+ Die auf die Rotationsfrequenz des Innenzylinders normierten Eigenfrequenzen
+ der gefundenen Grundmoden der Taylor"=Str"omung f"ur \mbox{$\eta = 0.5$}. %\\
+ (Die azimutale Wellenzahl ist mit $m$ bezeichnet.)}
+
+% --------------------------------------------------------------------------- %
+
+\section*{Einleitung}
+
+Mit |\caption| gesetzte Bildunterschriften und Tabellenüberschriften werden
+von den Standard"=Dokumentenklassen eher stiefmütterlich behandelt.
+In der Regel schlicht als ganz normaler Absatz gesetzt, ergibt sich keine
+signifikante optische Abgrenzung vom eigentlichen Text, wie z.B. hier:
+
+\example*{size=normalsize,margin=0pt}{\exampletext}
+
+Es sollte aber eine Möglichkeit geben, diesem Umstand abzuhelfen. Es wäre
+zum Beispiel nett, wenn man den Text der Unterschrift etwas kleiner gestalten,
+extra Ränder festlegen oder den Zeichensatz des Bezeichners dem der
+Kapitelüberschriften anpassen könnte. So in etwa:
+
+\example*{size=small,margin=10pt,labelfont=bf,labelsep=endash}{\exampletext}
+
+Mit Hilfe dieses Paketes können Sie dies leicht bewerkstelligen; es sind viele
+vorgegebene Parameter einstellbar, Sie können aber auch eigene
+Gestaltungsmerkmale einfließen lassen.
+
+% --------------------------------------------------------------------------- %
+
+\clearpage
+\section*{Vorläufige Dokumentation}
+
+Diese Anleitung beschreibt leider noch nicht alle Fassetten und Möglichkeiten,
+die einem \thispackage\ bietet. Ich werde mich bemühen, jeden Monat eine
+etwas vollständigere Fassung bereitzustellen; die jeweile aktuelle Fassung kann
+\href{ftp://dante.ctan.org/tex-archive/macros/latex/contrib/caption/caption-eng.pdf}%
+{hier} bezogen werden.\par\bigskip
+
+% --------------------------------------------------------------------------- %
+
+%\clearpage
+\tableofcontents
+
+% --------------------------------------------------------------------------- %
+
+\clearpage
+\section{Verwendung des Paketes}
+\label{usage}
+
+\DescribeMacro{\usepackage}
+Mittels
+\begin{quote}
+ |\usepackage|\oarg{Optionen}|{caption}[|\texttt{\filedate}|]|
+\end{quote}
+in dem Vorspann des Dokumentes wird das \thispackage\ Paket eingebunden, die
+Optionen legen hierbei das Aussehen der "Uber- und Unterschriften fest. So
+w"urde z.B.
+\begin{quote}
+ |\usepackage[margin=10pt,font=small,labelfont=bf,|\\
+ | labelsep=endash]{caption}|%
+ %|[|\texttt{\filedate}|]|
+\end{quote}
+zu dem obrigen Ergebnis mit Rand, kleinerem Zeichensatz und fetter Bezeichnung
+f"uhren.
+
+\DescribeMacro{\captionsetup}
+Eine "Anderung der Parameter ist auch zu einem sp"ateren Zeitpunkt jederzeit
+mittels des Befehls
+\begin{quote}
+ |\captionsetup|\oarg{Typ}\marg{Optionen}
+\end{quote}
+m"oglich. So sind z.B. die Befehlssequenzen
+\begin{quote}
+ |\usepackage[margin=10pt,font=small,labelfont=bf]{caption}|
+\end{quote}
+und
+\begin{quote}
+ |\usepackage{caption}|\\
+ |\captionsetup{margin=10pt,font=small,labelfont=bf}|
+\end{quote}
+in ihrer Wirkung identisch.
+
+Weiterhin gilt zu beachten, da"s sich die Verwendung von |\captionsetup|
+innerhalb von Umgebungen nur auf die Umgebung selber auswirkt, nicht aber auf
+den Rest des Dokumentes. M"ochte man also z.B. die automatische Zentrierung der
+Abbildungsunterschrift nur in einem konkreten Falle ausschalten, so kann dies
+mit
+\begin{quote}
+ |\begin{figure}|\\
+ | |\ldots\\
+ | \captionsetup{singlelinecheck=off}|\\
+ | \caption{|\ldots|}|\\
+ |\end{figure}|
+\end{quote}
+geschehen, ohne da"s die restlichen Abbildungsunterschriften hiervon
+beeintr"achtigt werden.
+
+(Der optionale Parameter \meta{Typ} wird in \Ref{commands} behandelt.)
+
+% --------------------------------------------------------------------------- %
+
+\pagebreak[4]
+\section{Optionen}
+\label{options}
+
+\def\OptionLabel{RaggedRight}
+\def\UserDefined{\ldots}
+
+% --------------------------------------------------------------------------- %
+
+\subsection{Formatierung}
+\label{formats}
+
+\DescribeMacro{format=}
+Eine Abbildungs- oder Tabellenbeschriftung besteht im wesentlichen aus drei
+Teilen:
+Dem Bezeichner (etwa "`Abbildung 3"'), dem Trenner
+(etwa "`:\textvisiblespace"') und dem eigentlichen Text.
+Mittels der Option
+\begin{quote}
+ |format=|\meta{Name}
+\end{quote}
+wird festgelegt, wie diese drei Teile zusammengesetzt werden.
+F"ur \meta{Name} sind folgende M"oglichkeiten verf"ugbar:%\footnote{Es gibt
+%hier wie auch bei vielen anderen Optionen die M"oglichkeit, auch eigene
+%Formate, Zeichens"atze etc.\ zu definieren. Wie dies geht wird in Abschnitt
+%\ref{declare}: \textit{"`Eigene Erweiterungen"'} dargelegt.}
+
+\begin{Options}{\OptionLabel}
+ \item[plain]%\NEWdescription{v3.0h}
+ Die Beschriftung wird als gew"ohnlicher Abschnitt gesetzt.
+
+ \item[hang]
+ Der Text wird so gesetzt, da"s er an dem Bezeichner "`h"angt"', d.h.~der
+ Platz unter dem Bezeichner und dem Trenner bleibt leer.
+
+ \item[\UserDefined]
+ Eigene Formate k"onnen mittels |\DeclareCaptionFormat| definiert werden.
+ \SeeUserDefined
+\end{Options}
+
+\begin{Example}
+ Ein Beispiel: Die Angabe der Option
+ \begin{quote}
+ |format=hang|
+ \end{quote}
+ f"uhrt zu Abbildungsunterschriften der Art
+ \example{format=hang}{\exampletext}
+\end{Example}
+
+\DescribeMacro{indention=}
+Bei beiden Formaten (\texttt{plain} und \texttt{hang}) kann der Einzug der Beschriftung
+ab der zweiten Textzeile angepasst werden, dies geschieht mit Hilfe der Option
+\begin{quote}
+ |indention=|\meta{Einzug}\quad,
+\end{quote}
+wobei anstelle von \meta{Einzug} jedes beliebige feste Ma"s angegeben werden kann.
+
+Zwei Beispiele:
+
+\begin{Example}
+ \begin{quote}
+ |format=plain,indention=.5cm|
+ \end{quote}
+ \captionsetup{aboveskip=0pt}
+ \example{format=plain,indention=.5cm}{\exampletext}
+\end{Example}
+
+\begin{Example}
+ \begin{quote}
+ |format=hang,indention=-0.5cm|
+ \end{quote}
+ \captionsetup{aboveskip=0pt}
+ \example{format=hang,indention=-0.5cm}{\exampletext}
+\end{Example}
+
+%\pagebreak[3]
+\DescribeMacro{labelformat=}
+Mittels der Option
+\nopagebreak[3]
+\begin{quote}
+ |labelformat=|\meta{Name}
+\end{quote}
+\nopagebreak[3]
+%\NEWdescription{v3.0e}
+wird die Zusammensetzung des Bezeichners festgelegt.
+F"ur \meta{Name} sind folgende M"oglichkeiten verf"ugbar:
+
+\begin{Options}{\OptionLabel}
+ \item[default]
+ Der Bezeichner wird wie von der verwendeten Dokumentenklasse vorgegeben gesetzt,
+ "ublicherweise ist dies der Name und die Nummer, getrennt durch ein Leerzeichen
+ (wie \texttt{simple}).
+ (Dies ist das Standardverhalten.)
+
+ \item[empty]
+ Der Bezeichner ist leer. (Diese Option macht in der Regel nur in Verbindung mit
+ anderen Optionen -- wie etwa \texttt{labelsep=none} -- Sinn.)
+
+ \item[simple]
+ Der Bezeichner ist aus dem Namen und der Nummer zusammengesetzt.
+
+ \item[parens]
+ Die Nummer des Bezeichners wird in runde Klammern gesetzt.
+
+ \item[\UserDefined]
+ Eigene Formate k"onnen mittels |\DeclareCaptionLabelFormat| definiert werden.
+ \SeeUserDefined
+\end{Options}
+
+\begin{Example}
+ Ein Beispiel: Die Optionen
+ \begin{quote}
+ |labelformat=parens,labelsep=quad|
+ \end{quote}
+ f"uhren zu Abbildungsunterschriften der Art
+ \example{labelformat=parens,labelsep=quad}{\exampletext}
+\end{Example}
+
+\DescribeMacro{labelsep=}
+Mittels der Option
+\begin{quote}
+ |labelsep=|\meta{Name}
+\end{quote}
+wird die Zusammensetzung des Trenners festgelegt.
+F"ur \meta{Name} sind folgende M"oglichkeiten verf"ugbar:
+
+\begin{Options}{\OptionLabel}
+ \item[none]
+ Der Trenner ist leer. (Diese Option macht in der Regel nur in Verbindung
+ mit anderen Optionen -- wie etwa \texttt{labelformat=empty} -- Sinn.)
+
+ \item[colon]
+ Der Trenner besteht aus einem Doppelpunkt und einem Leerzeichen.
+
+ \item[period]
+ Der Trenner besteht aus einem Punkt und einem Leerzeichen.
+
+ \item[space]
+ Der Trenner besteht lediglich aus einem einzelnen Leerzeichen.
+
+ \item[quad]
+ Der Trenner besteht aus einem |\quad|.
+
+ \item[newline]
+ Als Trenner wird ein Zeilenumbruch verwendet.
+
+ \item[endash]%\NEWfeature{v3.0h}
+ Als Trenner wird ein Gedankenstrich verwendet.
+
+ \item[\UserDefined]
+ Eigene Trenner k"onnen mittels |\DeclareCaptionLabelSeparator| definiert werden.
+ \SeeUserDefined
+\end{Options}
+
+Drei Beispiele:
+\begin{Example}
+ \begin{quote}
+ |labelsep=period|
+ \end{quote}
+ \captionsetup{aboveskip=0pt}
+ \example{labelsep=period}{\exampletext}
+\end{Example}
+
+\begin{Example}
+ \begin{quote}
+ |labelsep=newline,singlelinecheck=false|
+ \end{quote}
+ \captionsetup{aboveskip=0pt}
+ \example{labelsep=newline,singlelinecheck=false}{\exampletext}
+\end{Example}
+
+\begin{Example}
+ \begin{quote}
+ |labelsep=endash|
+ \end{quote}
+ \captionsetup{aboveskip=0pt}
+ \example{labelsep=endash}{\exampletext}
+\end{Example}
+
+% --------------------------------------------------------------------------- %
+
+\subsection{Textausrichtung}
+\label{justification}
+
+\DescribeMacro{justification=}
+Mittels der Option
+\begin{quote}
+ |justification=|\meta{Name}
+\end{quote}
+wird die Ausrichtung des Textes festgelegt.
+F"ur \meta{Name} sind folgende M"oglichkeiten verf"ugbar:
+
+\begin{Options}{\OptionLabel}
+ \item[justified]
+ Der Text wird als Blocksatz gesetzt.
+
+ \item[centering]
+ Der Text wird zentriert gesetzt.
+
+% \item[Centering]
+% Der Text wird zentriert gesetzt. Hierf"ur wird jedoch im Gegensatz
+% zu \texttt{centering} der Befehl |\Centering| des \package{ragged2e}-Paketes
+% verwendet, der \LaTeX\ das Trennen der Worte erlaubt.
+
+ \item[centerlast]
+ Lediglich die letzte Zeile des Textes wird zentriert gesetzt.
+
+ \item[centerfirst]
+ Lediglich die erste Zeile des Textes wird zentriert gesetzt.
+
+ \item[raggedright]
+ Der Text wird linksb"undig gesetzt.
+
+% \item[RaggedRight]
+% Der Text wird linksb"undig mit Hilfe des \package{ragged2e}-Paketes gesetzt.
+ \item[RaggedRight]
+ Der Text wird ebenfalls linksb"undig gesetzt. Hierf"ur wird jedoch im Gegensatz
+ zu \texttt{raggedright} der Befehl |\RaggedRight| des \package{ragged2e}-Paketes
+ verwendet, der \LaTeX\ das Trennen der Worte erlaubt.
+
+ \item[raggedleft]
+ Der Text wird rechtsb"undig gesetzt.
+
+% \item[RaggedLeft]
+% Der Text wird rechtsb"undig mit Hilfe des \package{ragged2e}-Paketes gesetzt.
+
+ \item[\UserDefined]
+ Eigene Ausrichtungen k"onnen mittels |\DeclareCaptionJustification| definiert werden.
+ \SeeUserDefined
+\end{Options}
+
+Einige Beispiele:
+\begin{Example}
+ \begin{quote}
+ |justification=centerlast|
+ \end{quote}
+ \captionsetup{aboveskip=0pt}
+ \example{justification=centerlast}{\exampletext}
+\end{Example}
+
+\begin{Example}
+ \begin{quote}
+ |format=hang,justification=raggedright|
+ \end{quote}
+ \captionsetup{aboveskip=0pt}
+ \example{format=hang,justification=raggedright}{\exampletext}
+\end{Example}
+
+\begin{Example}
+ \begin{quote}
+ |format=hang,justification=RaggedRight|
+ \end{quote}
+ \captionsetup{aboveskip=0pt}
+ \example{belowskip=\abovecaptionskip,format=hang,justification=RaggedRight}{\exampletext}
+\end{Example}
+
+\begin{Example}
+ \begin{quote}
+ |labelsep=newline,justification=centering|
+ \end{quote}
+ \captionsetup{aboveskip=0pt}
+ \example{belowskip=\abovecaptionskip,labelsep=newline,justification=centering}{\exampletext}
+\end{Example}
+
+\DescribeMacro{singlelinecheck=}
+In den Standard"=Dokumentenclassen |article|, |report| und |book| sind die
+Ab\-bildungs- und Tabellenbeschriftungen so realisiert, da"s sie automatisch
+zentriert werden, wenn sie lediglich aus einer einzigen Textzeile bestehen:
+
+\example*{}{Eine kurze Beschriftung.}
+
+%\example{belowskip=\abovecaptionskip}{%
+% Eine lange Beschriftung, die gen"ugend Text enth"alt, um l"anger als
+% eine einzelne Zeile zu sein.}
+
+\INFO
+Diesen Mechanismus "ubernimmt \thispackage\ und ignoriert damit
+in der Regel bei solch kurzen Beschriftungen die mittels der Optionen
+|format=| und |justification=| eingestellte Textausrichtung.
+Dieses Verhalten kann jedoch mit der Option
+\begin{quote}
+ |singlelinecheck=|\meta{bool}
+\end{quote}
+reguliert werden. Setzt man f"ur \meta{bool} entweder |false|, |no|, |off|
+oder |0| ein, so wird der Zentrierungsmechnismus au"ser Kraft gesetzt.
+Die obrige, kurze Abbildungsunterschrift w"urde z.B. nach Angabe der Option
+\begin{quote}
+ |singlelinecheck=false|
+\end{quote}
+so aussehen:
+
+\begingroup
+ \captionsetup{type=figure}
+ \ContinuedFloat
+ \example*{singlelinecheck=false}{Eine kurze Beschriftung.}
+\endgroup
+
+Setzt man f"ur \meta{bool} hingegen |true|, |yes|, |on| oder |1| ein, so
+wird die automatische Zentrierung wieder eingeschaltet. (Standardm"a"sig
+ist sie eingeschaltet.)
+
+% --------------------------------------------------------------------------- %
+
+\subsection{Zeichens"atze}
+\label{fonts}
+
+\DescribeMacro{font=}
+\DescribeMacro{labelfont=}
+\DescribeMacro{textfont=}
+Das \thispackage-Paket kennt 3 Zeichens"atze: Denjenigen f"ur die gesammte Beschriftung
+(|font|), denjenigen, der lediglich auf den Bezeichner und den Trenner angewandt wird
+(|labelfont|), sowie denjenigen, der lediglich auf den Text wirkt (|textfont|).
+So lassen sich die unterschiedlichen Teile der Beschriftung individuell mittels
+\begin{quote}\begin{tabular}{@{}r@{}ll}
+ |font=| & \marg{Zeichensatzoptionen} & ,\\
+ |labelfont=| & \marg{Zeichensatzoptionen} & und\\
+ |textfont=| & \marg{Zeichensatzoptionen} & \\
+\end{tabular}\end{quote}
+\nopagebreak[3]
+anpassen.
+\pagebreak[3]
+
+Als \meta{Zeichensatzoptionen} sind eine Kombination aus folgendem erlaubt:
+
+\begin{Options}{\OptionLabel}
+ \item[scriptsize] {\scriptsize Sehr kleine Schrift}
+ \item[footnotesize] {\footnotesize Fu"snotengr"o"se}
+ \item[small] {\small Kleine Schrift}
+ \item[normalsize] {\normalsize Normalgro"se Schrift}
+ \item[large] {\large Gro"se Schrift}
+ \item[Large] {\Large Gr"o"sere Schrift}
+
+ \item[up] {\upshape Upright Schriftart}
+ \item[it] {\itshape Italic Schriftart}
+ \item[sl] {\slshape Slanted Schriftart}
+ \item[sc] {\scshape Small Caps Schriftart}
+
+ \item[md] {\mdseries Medium Schriftserie}
+ \item[bf] {\bfseries Bold Schriftserie}
+
+ \item[rm] {\rmfamily Roman Schriftfamilie}
+ \item[sf] {\sffamily Sans Serif Schriftfamilie}
+ \item[tt] {\ttfamily Typewriter Schriftfamilie}
+
+ \item[singlespacing] |\singlespacing| (siehe \package{setspace}-Paket)
+ \item[onehalfspacing] |\onehalfspacing|
+ \item[doublespacing] |\doublespacing|
+
+ \item[\UserDefined]
+ Eigene Zeichensatzoptionen k"onnen mittels |\DeclareCaptionFont| definiert werden.
+ \SeeUserDefined
+\end{Options}
+
+Wird lediglich eine einzelne Zeichensatzoption ausgew"ahlt, k"onnen die
+geschweiften Klammern entfallen, d.h.~die Optionen
+%\begin{quote}
+ |font={small}|
+%\end{quote}
+und
+%\begin{quote}
+ |font=small|
+%\end{quote}
+sind in ihrer Wirkung identisch.
+
+Beispiele:
+\begin{Example}
+ \begin{quote}
+ |font={small,it},labelfont=bf|
+ \end{quote}
+ \captionsetup{aboveskip=0pt}
+ \example{font={small,it},labelfont=bf}{\exampletext}
+\end{Example}
+
+\begin{Example}
+ \begin{quote}
+ |font=small,labelfont=bf,textfont=it|
+ \end{quote}
+ \captionsetup{aboveskip=0pt}
+ \example{font=small,labelfont=bf,textfont=it}{\exampletext}
+\end{Example}
+
+% --------------------------------------------------------------------------- %
+
+\subsection{R"ander und Abs"atze}
+\label{margins}
+
+\DescribeMacro{margin=}
+\DescribeMacro{width=}
+F"ur die Abbildungs- und Tabellenbeschriftungen kann \emph{entweder} ein extra Rand
+\emph{oder} eine feste Breite festgelegt werden. Dies geschieht mit
+\begin{quote}\begin{tabular}{@{}r@{}ll}
+ |margin=| & \meta{Rand} & \emph{oder}\\
+ |width=| & \meta{Breite} & \\
+\end{tabular}\end{quote}
+In beiden F"allen wird die Beschriftung zentriert, d.h.~der linke und rechte Rand
+sind immer gleich gro"s.
+
+Zwei Beispiele hierzu:
+\begin{Example}
+ \begin{quote}
+ |margin=10pt|
+ \end{quote}
+ \captionsetup{aboveskip=0pt}
+ \example{margin=10pt}{\exampletext}
+\end{Example}
+
+\begin{Example}
+ \begin{quote}
+ |width=.75\textwidth|
+ \end{quote}
+ \captionsetup{aboveskip=0pt}
+ \example{width=.75\textwidth}{\exampletext}
+\end{Example}
+
+\DescribeMacro{parskip=}
+Diese Option wirkt auf Abbildungs- oder Tabellenbeschriftungen, die
+aus mehr als einem Absatz bestehen; sie legt den Abstand zwischen den
+Abs"atzen fest.
+\begin{quote}
+ |parskip=|\meta{Abstand zwischen Abs"atzen}
+\end{quote}
+Ein Beispiel:
+\begin{Example}
+ \begin{quote}
+ |margin=10pt,parskip=5pt|
+ \end{quote}
+ \captionsetup{aboveskip=0pt}
+ \example{margin=10pt,parskip=5pt}{%
+ Erster Absatz der Beschriftung; dieser enth"alt einigen Text, so da"s die
+ Auswirkungen der Optionen deutlich werden.\par
+ Zweiter Absatz der Beschriftung; dieser enth"alt ebenfalls einigen Text,
+ so da"s die Auswirkungen der Optionen deutlich werden.}
+\end{Example}
+
+\DescribeMacro{hangindent=}
+Die Option
+\begin{quote}
+ |hangindent=|\meta{Einzug}
+\end{quote}
+legt einen Einzug f"ur alle Zeilen au"ser der jeweils ersten des Absatzes fest.
+Besteht die Beschriftung lediglich aus einem einzelnen Absatz, so ist die
+Wirkung mit der Option |indention=|\meta{Einzug} identisch, bei mehreren
+Abs"atzen zeigt sich jedoch der Unterschied:
+
+\begin{Example}
+ \begin{quote}
+ |format=hang,indention=-.5cm|
+ \end{quote}
+ \captionsetup{aboveskip=0pt}
+ \example{format=hang,indention=-.5cm}{%
+ Erster Absatz der Beschriftung; dieser enth"alt einigen Text, so da"s die
+ Auswirkungen der Optionen deutlich werden.\par
+ Zweiter Absatz der Beschriftung; dieser enth"alt ebenfalls einigen Text,
+ so da"s die Auswirkungen der Optionen deutlich werden.}
+\end{Example}
+
+\begin{Example}
+ \begin{quote}
+ |format=hang,hangindent=-.5cm|
+ \end{quote}
+ \captionsetup{aboveskip=0pt}
+ \example{format=hang,hangindent=-.5cm}{%
+ Erster Absatz der Beschriftung; dieser enth"alt einigen Text, so da"s die
+ Auswirkungen der Optionen deutlich werden.\par
+ Zweiter Absatz der Beschriftung; dieser enth"alt ebenfalls einigen Text,
+ so da"s die Auswirkungen der Optionen deutlich werden.}
+\end{Example}
+
+% --------------------------------------------------------------------------- %
+
+\subsection{Stile}
+\label{style}
+
+\DescribeMacro{style=}
+Eine geeignete Kombination aus den bisher vorgestellten Optionen wird \textit{Stil}
+genannt; dies ist in etwa mit dem Seitenstil vergleichbar, den man bekannterma"sen
+mit |\pagestyle| einstellen kann.
+
+Einen vordefinierten Abbildungs- und Tabellenbeschriftungsstil kann man mit der
+Option
+\begin{quote}
+ |style=|\meta{Stil}
+\end{quote}
+ausw"ahlen. \Thispackage\ definiert zwei Stile: |base| und |default|.
+
+\NEWfeature{v3.1}
+Der Stil |base| setzt alle bisher vorgestellten Optionen auf die Belegung
+zurück, die das Aussehen der Beschriftungen der Standard"=\LaTeX"=Dokumentenklassen
+|article|, |report| und |book| repräsentiert. D.h.~die Angabe der Option
+\begin{quote}
+ |style=default|
+\end{quote}
+entspricht den Optionen
+\begin{quote}
+ |format=plain,labelformat=default,labelsep=colon,|\\
+ |justification=justified,font=,labelfont=,|\\
+ |textfont=,margin=0pt,indention=0pt,parindent=0pt|\\
+ |hangindent=0pt,singlelinecheck=true|
+\end{quote}
+(Aber |justification=centering| wird automatisch gewählt werden,
+ wenn die Beschriftung in eine einzelne Zeile passt.)
+
+Der Stil |default| hingegen folgt den Standardwerten der verwendeten
+Dokumentenklasse. Dieser Stil wird vorausgewählt und entspricht den
+Optionen
+\begin{quote}
+ |format=default,labelformat=default,labelsep=default,|\\
+ |justification=default,font=default,labelfont=default,|\\
+ |textfont=default,margin=0pt,indention=0pt,parindent=0pt|\\
+ |hangindent=0pt,singlelinecheck=true|\quad.
+\end{quote}
+(Aber |justification=centering| und |format=plain| wird automatisch gewählt werden,
+ wenn die Beschriftung in eine einzelne Zeile passt.)
+
+Wenn also eine der drei Standard"=\LaTeX"=Dokumentenklassen verwendet wird,
+zeigen |base| und |default| auf (fast) die gleichen Einstellungen.
+
+\emph{Hinweis:} Eigene Stile k"onnen mittels |\DeclareCaptionStyle| definiert werden.
+\SeeUserDefined
+
+% --------------------------------------------------------------------------- %
+
+\subsection{Abst"ande}
+\label{skips}
+
+\DescribeMacro{aboveskip=}
+\DescribeMacro{belowskip=}
+Die vertikalen Abstände vor und nach der Beschriftung werden von
+|\abovecaptionskip| und |\belowcaptionskip| kontrolliert.
+Die Standard"=\LaTeX"=Klassen |article|, |report| und |book| belegen den
+Abstand |\abovecaptionskip| mit |10pt| und |\belowcaptionskip| mit |0pt|,
+andere Dokumentenklassen ggf.~ mit anderen Werten.
+
+\pagebreak[3]
+Beide Abst"ande lassen sich gew"ohnlich mit |\setlength| "andern, aber auch mit den
+\thispackage-Optionen
+\nopagebreak[3]
+\begin{quote}\begin{tabular}{@{}r@{}ll}
+ |aboveskip=| & \meta{Abstand nach oben} & und\\
+ |belowskip=| & \meta{Abstand nach unten} & .\\
+\end{tabular}\end{quote}
+
+\DescribeMacro{position=}
+Die sture Anwendung von |\abovecaptionskip| und |\belowcaptionskip| bei
+Beschriftungen birgt einen gro"sen Nachteil: Ist die Beschriftung \emph{"uber}
+und nicht \emph{unter} der Abbildung oder Tabelle (wie bei Tabellen durchaus
+"ublich), so ist die Vorbelegung dieser beiden Abst"ande nicht mehr sinnvoll,
+da hier kein Abstand zwischen der Beschriftung und der Tabelle gesetzt wird.
+(Wir erinnern uns: |\belowcaptionskip| ist auf |0pt|, also kein Abstand,
+vorbelegt.)
+
+Man vergleiche:
+\begin{Example}
+ \begin{minipage}[c]{.5\linewidth}%
+% \captionsetup{aboveskip=0pt}%
+ \captionof{table}{Eine Tabelle}%
+ \centering\begin{tabular}{ll}%
+ A & B \\%
+ C & D \\%
+ \end{tabular}%
+ \end{minipage}%
+ \begin{minipage}[c]{.5\linewidth}%
+ \centering\begin{tabular}{ll}%
+ A & B \\%
+ C & D \\%
+ \end{tabular}%
+ \captionof{table}{Eine Tabelle}%
+ \end{minipage}%
+\end{Example}
+
+Mit Hilfe des Parameters |position| kann man jedoch festlegen, wie
+\LaTeX\ die Beschriftung behandeln soll, ob als \mbox{\emph{"Uber}schrift}
+oder als \mbox{\emph{Unter}schrift}:
+\begin{quote}
+ |position=top|\quad(oder |position=above|)
+\end{quote}
+gibt an, da"s die Abst"ande so gew"ahlt werden, da"s sie f"ur \mbox{\emph{"Uber}schriften}
+sinnvoll gew"ahlt sind und
+\begin{quote}
+ |position=bottom|\quad(oder |position=below|)
+\end{quote}
+gibt an, da"s die Abst"ande so gew"ahlt werden, da"s sie f"ur \mbox{\emph{"Uber}schriften}
+sinnvoll gew"ahlt sind. (Dies ist die Standardeinstellung, allerdings nicht f"ur |longtable|s.)
+
+F"ugt man nun ein |\captionsetup{position=top}| in die linke Tabelle vor dem
+|\caption| Befehl ein, so ergeben sich im Vergleich zwischen "Uberschrift und
+Unterschrift stimmige Abst"ande:
+\begin{Example}
+ \begin{minipage}[c]{.5\linewidth}%
+ \captionsetup{position=top}%
+ \captionof{table}{Eine Tabelle}%
+ \centering\begin{tabular}{ll}%
+ A & B \\%
+ C & D \\%
+ \end{tabular}%
+ \end{minipage}%
+ \begin{minipage}[c]{.5\linewidth}%
+ \centering\begin{tabular}{ll}%
+ A & B \\%
+ C & D \\%
+ \end{tabular}%
+ \captionof{table}{Eine Tabelle}%
+ \end{minipage}%
+\end{Example}
+
+(Technisch ist dies so realisiert, da"s bei "Uberschriften die Ab\-st"an\-de
+|\abovecaptionskip| und |\belowcaptionskip| vertauscht werden, so da"s
+|\abovecaptionskip| immer derjenige Abstand ist, der zwischen Tabelle
+und Beschriftung zur Anwendung kommt.)
+
+Sinnvoll l"a"st sich diese Option insbesondere zusammen mit dem optionalen
+Parameter bei |\captionsetup| anwenden: \See{auch \Ref{commands}}
+\begin{quote}
+ |\captionsetup[table]{position=top}|
+\end{quote}
+bewirkt, da"s bei allen Tabellen die Beschriftung bzgl.~der Abst"ande als
+"Uberschrift behandelt wird.
+\DescribeMacro{tableposition=}%\NEWfeature{v3.0a}
+Da dies eine sehr gebr"auchliche Einstellung ist,
+stellt das \thispackage"=Paket diesen Befehl auch als abk"urzende Option f"ur
+|\usepackage| zur Verf"ugung:
+\begin{quote}
+ |\usepackage[|\ldots|,tableposition=top]{caption}|
+\end{quote}
+entspricht
+\begin{quote}
+ |\usepackage[|\ldots|]{caption}|\\
+ |\captionsetup[table]{position=top}|
+\end{quote}
+
+% --------------------------------------------------------------------------- %
+
+\pagebreak[3]
+\section{Befehle}
+\label{commands}
+
+\DescribeMacro{\caption}
+Der Befehl
+\nopagebreak[3]
+\begin{quote}
+ |\caption|\oarg{Kurzform f"ur das Verzeichnis}\marg{Beschriftung}
+\end{quote}
+\nopagebreak[3]
+erzeugt eine "Uber- bzw.~Unterschrift innerhalb einer gleitenden Umgebung
+wie |figure| oder |table|. Dies ist an sich nichts neues, neu ist allerdings,
+da"s kein Eintrag ins Abbildungs- oder Tabellenverzeichnis vorgenommen
+wird, wenn eine leere Kurzform angegeben wird, etwa so:
+\begin{quote}
+ |\caption[]{Dies ist eine Abbildung, die nicht ins|\\
+ | Abbildungsverzeichnis aufgenommen wird}|
+\end{quote}
+
+\DescribeMacro{\caption*}
+Das \package{longtable}-Paket definiert zus"atzlich zum Befehl |\caption| auch
+den Befehl |\caption*|, der eine Beschriftung ohne Bezeichner und ohne Eintrag
+ins Tabellenverzeichnis erzeugt. So erzeugt z.B. der Code
+\begin{quote}
+ |\begin{longtable}{cc}|\\
+ | \caption*{Eine Tabelle}\\|\\
+ | A & B \\|\\
+ | C & D \\|\\
+ |\end{longtable}|
+\end{quote}
+diese Tabelle:
+\begin{longtable}{cc}
+ \caption*{Eine Tabelle}\\
+ A & B \\
+ C & D \\
+\end{longtable}
+
+\Thispackage\ bietet diesen Mechanismus auch f"ur normale Abbildungs-
+und Tabellenbeschriftungen an. Ein Beispiel:
+\begin{quote}
+ |\begin{table}|\\
+ | \caption*{Eine Tabelle}|\\
+ | \begin{tabular}{cc}|\\
+ | A & B \\|\\
+ | C & D \\|\\
+ | \end{tabular}|\\
+ |\end{table}|
+\end{quote}
+
+\DescribeMacro{\captionof}
+\DescribeMacro{\captionof*}
+Der Befehl |\caption| funktioniert in der Regel nur innerhalb von gleitenden
+Umgebungen, manchmal m"ochte man ihn jedoch auch anderweitig anwenden,
+etwa um eine Abbildung in eine nicht-gleitende Umgebung wie |minipage| zu
+setzen.
+
+\pagebreak[2]
+Hierf"ur stellt \thispackage\ den Befehl
+\begin{quote}
+ |\captionof|\marg{Umgebungstyp}\oarg{Kurzform}\marg{Langform}
+\end{quote}
+zur Verf"ugung. Die Angabe des Umgebungstypen ist hierbei notwendig, damit der
+gew"unschte Bezeichner gew"ahlt wird und der Eintrag in das richtige Verzeichnis
+vorgenommen wird. Ein Beispiel:
+\begin{quote}
+ |\captionof{figure}{Abbildung}|\\
+ |\captionof{table}{Tabelle}|
+\end{quote}
+f"uhrt zu folgendem Ergebnis:
+\begin{Example}
+ \captionof{figure}{Abbildung}
+ \captionsetup{belowskip=\abovecaptionskip}
+ \captionof{table}{Tabelle}
+\end{Example}
+
+Analog zu |\caption*| gibt es auch den Befehl |\captionof*| f"ur Beschriftungen
+ohne Bezeichner und ohne Verzeichniseintrag.
+
+\DANGER % \NEWdescription{v3.1}
+Beide Befehle, sowohl |\captionof| als auch |\captionof*|, sollten nur
+\emph{innerhalb} von Umgebungen (wie |minipage| oder |\parbox|) angewandt werden;
+ansonsten hat dies einen \LaTeX"=Fehler zur Folge.\footnote{%
+Nur wenn \eTeX\ zum Einsatz kommt. Ansonsten gibt es zwar keine Fehlermeldung,
+aber es kann passieren, da"s \LaTeX\ zwischen dem Inhalt und der
+Beschreibung einen Seitenumbruch setzt; zum anderen kann es bei Mi"sachtung gar
+zu seltsamen Effekten und unerwünschten Formatierungen der folgenden
+Abbildungs- und Tabellenbeschriftungen kommen!}
+
+\DescribeMacro{\captionsetup}
+Den Befehl |\captionsetup| haben wir ja schon im \Ref{usage} kennengelernt,
+uns dort allerdings die Bedeutung des optionalen Parameters
+\meta{Typ} aufgespart. %Dies soll nun nachgeholt werden:
+
+Wir erinnern uns, die Syntax des Befehls lautet
+\begin{quote}
+ |\captionsetup|\oarg{Typ}\marg{Optionen}
+\end{quote}
+
+Wird hierbei ein \meta{Typ} angegeben, so werden die Optionen nicht
+unmittelbar umgesetzt, sondern werden lediglich vermerkt und kommen erst dann
+zum Einsatz, wenn eine "Uber- bzw.\ Unterschrift innerhalb des passenden
+gleitenden Umgebungstyps gesetzt wird. So wirkt sich z.B. die Angabe
+\begin{quote}
+ |\captionsetup[figure]|\marg{Optionen}
+\end{quote}
+lediglich auf die Unterschriften aus, die innerhalb einer |figure|"=Umgebung
+gesetzt werden.
+
+Ein Beispiel:
+\begin{quote}
+ |\captionsetup{font=small}|\\
+ |\captionsetup[figure]{labelfont=bf}|
+\end{quote}
+f"uhrt zu Abbildungs- und Tabellenunterschriften der Art:
+\begin{Example}
+ \captionsetup{font=small}
+ \captionsetup[figure]{labelfont=bf}
+ \begingroup
+ \captionof{figure}{Eine Abbildung}
+ \endgroup
+ \captionsetup{belowskip=\abovecaptionskip}
+ \begingroup
+ \captionof{table}{Eine Tabelle}
+ \endgroup
+\end{Example}
+
+Wie man sieht, f"uhrt das |\captionsetup[figure]{labelfont=bf}| lediglich dazu,
+da"s Abbildungsunterschriften mit fettem Bezeichner gesetzt werden, alle anderen
+Unter- bzw.\ "Uberschriften werden hiervon nicht beeinflu"st.
+
+\DescribeMacro{\clearcaptionsetup}
+Um diese vermerkten, typbezogenen Parameter aus dem Ged"achnis von \LaTeX\ zu
+l"oschen, gibt es den Befehl
+\begin{quote}
+ |\clearcaptionsetup|\marg{Typ}\quad.
+\end{quote}
+
+|\clearcaptionsetup{figure}| w"urde z.B. die obrige Sonderbehandlung der
+Abbildungsunterschriften wieder aufheben:
+\begin{Example}
+ \captionsetup{font=small}
+ \begingroup
+ \captionof{figure}{Eine Abbildung}
+ \endgroup
+ \captionsetup{belowskip=\abovecaptionskip}
+ \begingroup
+ \captionof{table}{Eine Tabelle}
+ \endgroup
+\end{Example}
+
+Als Umgebungstypen mit Unter- bzw.\ "Uberschriften gibt es in der Regel nur
+zwei: |figure| und |table|. Wie wir jedoch sp"ater sehen werden, kommen durch die
+Verwendung spezieller \LaTeX-Pakete (wie etwa das \package{float},
+\package{longtable} oder \package{sidecap}"=Paket)
+ggf.~weitere Typen hinzu, deren Beschriftungen ebenfalls derart individuell
+angepasst werden k"onnen.
+
+\subsection{Fortlaufende gleitende Umgebungen}
+\label{ContinuedFloat}
+
+\DescribeMacro{\ContinuedFloat}
+Manchmal m"ochte man Abbildungen oder Tabellen aufteilen, jedoch ohne den einzelnen
+Teilen eine eigene Abbildungs- oder Tabellennummer zu geben. Hierf"ur stellt das
+\thispackage-Paket den Befehl
+\begin{quote}
+ |\ContinuedFloat|
+\end{quote}
+zur Verf"ugung, der gleich als erstes innerhalb der folgenden Teile angewandt
+werden sollte. Er verhindert, da"s die Z"ahlung fortgef"uhrt wird; eine Abbildung
+oder Tabelle, die ein |\ContinuedFloat| enth"alt, erh"alt also die gleiche Nummer
+wie die vorherige Abbildung oder Tabelle.
+
+Ein Beispiel:
+\begin{quote}
+ |\begin{table}|\\
+ |\caption{Eine Tabelle.}|\\
+ \ldots\\
+ |\end{table}|\\
+ \ldots\\
+ |\begin{table}\ContinuedFloat|\\
+ |\caption{Eine Tabelle. (fortgef"uhrt)}|\\
+ \ldots\\
+ |\end{table}|
+\end{quote}
+ergibt als Ergebnis:
+\begin{Example}
+ \makeatletter\def\@captype{table}\makeatother
+ \caption[]{Eine Tabelle.}
+ \centerline{\ldots}
+ \ContinuedFloat
+ \captionsetup{aboveskip=0pt}
+ \caption[]{Eine Tabelle. (fortgef"uhrt)}
+\end{Example}
+
+% --------------------------------------------------------------------------- %
+
+\pagebreak[4]
+\section{Eigene Erweiterungen}
+\label{declare}
+
+Wem die vorhandenen Formate, Trenner, Textausrichtungen, Zeichens"atze und Stile
+nicht ausreichen, der hat die M"oglichkeit, sich eigene zu definieren. Hierzu
+gibt es eine Reihe von Befehlen, die in dem Vorspann des Dokumentes (das ist der
+Teil vor |\begin{document}|) zum Einsatz kommen.
+
+\pagebreak[2]
+\DescribeMacro{\DeclareCaptionFormat}
+Eigene Formate k"onnen mit dem Befehl
+\begin{quote}
+ |\DeclareCaptionFormat|\marg{Name}\marg{Code mit \#1, \#2 und \#3}
+\end{quote}
+definiert werden. F"ur \#1 wird sp"ater der Bezeichner, f"ur \#2 der Trenner
+und f"ur \#3 der Text eingesetzt. So ist z.B. das Standardformat |plain|,
+welches die Beschriftung als gew"ohnlichen Absatz formatiert, folgenderma"sen
+in |caption.sty| definiert:
+\begin{quote}
+ |\DeclareCaptionFormat{plain}{#1#2#3\par}|
+\end{quote}
+
+\DescribeMacro{\DeclareCaptionLabelFormat}
+"Ahnlich k"onnen auch eigene Bezeichnerformate definiert werden:
+\begin{quote}
+ |\DeclareCaptionLabelFormat|\marg{Name}\marg{Code mit \#1 und \#2}
+\end{quote}
+Bei den Bezeichnerformaten wird hierbei f"ur \#1 der Name (also z.B.
+"`Abbildung"'), f"ur \#2 die Nummer (also z.B. "`12"') eingesetzt.
+
+\DescribeMacro{\bothIfFirst}
+\DescribeMacro{\bothIfSecond}
+Hierbei gibt es eine Besonderheit zu beachten: Wird das Bezeichnerformat
+auch in Verbindung mit dem \package{subfig}"=Paket\cite{subfig} verwendet,
+so kann der Bezeichnername (also \#1) auch leer sein.
+Um dies flexibel handhaben zu k"onnen, stellt das \thispackage"=Paket die
+Befehle
+\begin{quote}
+ |\bothIfFirst|\marg{Erstes Argument}\marg{Zweites Argument}\quad und\\
+ |\bothIfSecond|\marg{Erstes Argument}\marg{Zweites Argument}
+\end{quote}
+zur Verf"ugung. |\bothIfFirst| testet, ob das erste Argument leer ist,
+|\bothIfSecond|, ob das zweite Argument leer ist. Nur wenn dies nicht der
+Fall ist, werden beide Argumente ausgegeben, ansonsten werden beide
+unterdr"uckt.
+
+So ist z.B. das Standard"=Bezeichnerformat |simple| nicht, wie man
+naiverweise annehmen k"onnte, als
+\begin{quote}
+ |\DeclareCaptionLabelFormat{simple}{#1 #2}|
+\end{quote}
+definiert, weil dies zu einem st"orendem f"uhrenden Leerzeichen f"uhren w"urde,
+wenn \#1 leer ist. Stattdessen findet sich in |caption.sty| folgende
+Definition, die sowohl mit |\caption| als auch mit |\subfloat| harmoniert:
+\begin{quote}
+ |\DeclareCaptionLabelFormat{simple}{\bothIfFirst{#1}{~}#2}|
+\end{quote}
+d.h.~das Leerzeichen kommt nur dann zum Einsatz, wenn \#1 nicht leer ist.
+
+\pagebreak[3]
+\DescribeMacro{\DeclareCaptionLabelSeparator}
+Eigene Trenner werden mit
+\nopagebreak[3]
+\begin{quote}
+ |\DeclareCaptionLabelSeparator|\marg{Name}\marg{Code}
+\end{quote}
+\nopagebreak[3]
+definiert. Auch hier wieder als einfaches Beispiel die Definition des
+Standard"=Trenners aus |caption.sty|:
+\nopagebreak[3]
+\begin{quote}
+ |\DeclareCaptionLabelSeparator{colon}{: }|
+\end{quote}
+\pagebreak[3]
+
+\DescribeMacro{\DeclareCaptionJustification}
+Eigene Textausrichtungen k"onnen mit
+\begin{quote}
+ |\DeclareCaptionJustification|\marg{Name}\marg{Code}
+\end{quote}
+definiert werden. Der \meta{Code} wird dann der Beschriftung vorangestellt,
+so f"uhrt z.B. die Verwendung der Ausrichtung
+\begin{quote}
+ |\DeclareCaptionJustification{raggedright}{\raggedright}|
+\end{quote}
+dazu, da"s alle Zeilen der Beschriftung linksb"undig ausgegeben werden.
+
+\DescribeMacro{\DeclareCaptionFont}
+Eigene Zeichensatzoptionen k"onnen mit
+\begin{quote}
+ |\DeclareCaptionFont|\marg{Name}\marg{Code}
+\end{quote}
+definiert werden. So definiert z.B. das \thispackage"=Paket die Optionen
+|small| und |bf| folgenderma"sen:
+\begin{quote}
+ |\DeclareCaptionFont{small}{\small}|\\
+ |\DeclareCaptionFont{bf}{\bfseries}|
+\end{quote}
+\iffalse
+Die Zeilenabst"ande lie"sen sich z.B.~"uber das \package{setspace}"=Paket
+regeln:%\NEWdescription{v3.0h}
+\begin{quote}
+ |\usepackage{setspace}|\\
+ |\DeclareCaptionFont{singlespacing}{\setstretch{1}}|\quad\footnote{%
+ \emph{Hinweis:} \cs{singlespacing} kann hier nicht benutzt werden,
+ da es ein \cs{vskip} Kommando enth"alt.}\\
+ |\DeclareCaptionFont{onehalfspacing}{\onehalfspacing}|\\
+ |\DeclareCaptionFont{doublespacing}{\doublespacing}|\\
+ |\captionsetup{font={onehalfspacing,small},labelfont=bf}|
+\end{quote}
+\example{font={onehalfspacing,small},labelfont=bf,singlelinecheck=off}{\exampletext}
+\fi
+Ein Beispiel, welches etwas Farbe ins Spiel bringt:
+\begin{quote}
+ |\usepackage{color}|\\
+ |\DeclareCaptionFont{red}{\color{red}}|\\
+ |\DeclareCaptionFont{green}{\color{green}}|\\
+ |\DeclareCaptionFont{blue}{\color{blue}}|\\
+ |\captionsetup{labelfont={blue,bf},textfont=green}|
+\end{quote}
+\example*{labelfont={color=blue,bf},textfont={color=green},singlelinecheck=off}{\exampletext}
+Aber da \thispackage\ schon die pfiffige Definition
+\begin{quote}
+ |\DeclareCaptionFont{color}{\color{#1}}|
+\end{quote}
+enthält, kann man das selbe Resultat auch einfach mit
+\begin{quote}
+ |\usepackage{color}|\\
+ |\captionsetup{labelfont={color=blue,bf},|\\
+ | textfont={color=green}}|\quad.
+\end{quote}
+erreichen.
+
+\DescribeMacro{\DeclareCaptionStyle}
+Zu guter letzt noch die Definition eigener Stile. Stile sind einfach eine
+Ansammlung von geeigneten Einstellungen, die unter einem eigenen Namen
+zusammengefasst werden und mit der Paketoption |style=|\meta{Name} ausgew"ahlt
+werden k"onnen. Sie werden wie folgt definiert:
+\begin{quote}
+ |\DeclareCaptionStyle|\marg{Name}\oarg{zus"atzliche Optionen}\marg{Optionen}
+\end{quote}
+Hierbei ist zu beachten, da"s die \meta{Optionen} immer auf dem Stil |base|
+basieren (siehe auch \Ref{style}), es brauchen also nur davon abweichende
+Optionen angegeben werden.
+
+Sind \meta{zus"atzliche Optionen} angegeben, so kommen diese automatisch
+zus"atzlich zum Einsatz, sofern die Beschreibung in eine einzelne Zeile passt
+und diese Abfrage nicht mit |singlelinecheck=off| ausgeschaltet wurde.
+
+Als Beispiel mu"s mal wieder eine einfache Definition innerhalb dieses Paketes
+herhalten, so ist der Stil |base| definiert als
+\begin{quote}
+ |\DeclareCaptionStyle{base}%|\\
+ | [format=plain,justification=centering]{}|\quad.
+\end{quote}
+
+% --------------------------------------------------------------------------- %
+
+\subsection{Weiterf"uhrende Beispiele}
+
+%\NEWdescription{v3.1}
+Möchte man die Bezeichnung (inkl. Trenner wie Doppelpunkt) vom Text mit einem
+Zeilenumbruch getrennt haben, so könnte man dies z.B.~so bewerkstelligen:
+\begin{quote}
+ |\DeclareCaptionFormat{myformat}{#1#2\\#3}|
+\end{quote}
+Wählt man anschließend dieses Format mit |\captionsetup{format=myformat}| aus,
+so erhält man Beschriftungen der Art:
+%\begin{Example}
+% \captionsetup{aboveskip=0pt}
+ \example{format=myformat1,labelfont=bf}{\exampletext}
+%\end{Example}
+Auch einen Einzug könnte man diesem Format mit auf den Weg geben:
+\begin{quote}
+ |\captionsetup{format=myformat,indention=1cm}|
+\end{quote}
+führt zu Beschriftungen wie:
+%\begin{Example}
+% \captionsetup{aboveskip=0pt}
+ \example{format=myformat1,indention=1cm,labelfont=bf}{\exampletext}
+%\end{Example}
+Aber Sie möchten den Einzug nur auf die erste Zeile des Texts anwenden?
+Kein Problem, so würde z.B.~die Definition
+\begin{quote}
+ |\newlength\myindention|\\
+ |\DeclareCaptionFormat{myformat}%|\\
+ | {#1#2\\\hspace*{\myindention}#3}|\\
+ \ldots\\
+ |\setlength\myindention{1cm}|\\
+ |\captionsetup{format=myformat}|
+\end{quote}
+zu Beschriftungen dieser Art führen:
+%\begin{Example}
+% \captionsetup{aboveskip=0pt}
+ \example{format=myformat2,myindention=1cm,labelfont=bf}{\exampletext}
+%\end{Example}
+Zu der Länge |\myindention| hätten Sie gerne eine Option, so daß man diesen
+Einzug auch z.B.~mit |\captionsetup|\xx|[figure]|\xx|{myindention=|\ldots|}| setzen kann?
+Auch dies läßt sich bewerkstelligen, z.B.~folgendermaßen:
+\begin{quote}
+ |\newlength\myindention|\\
+ |\DeclareCaptionOption{myindention}%|\\
+ | {\setlength\myindention{#1}}|\\
+ |\DeclareCaptionFormat{myformat}%|\\
+ | {#1#2\\\hspace\myindention #3}|\\
+ \ldots\\
+ |\captionsetup{format=myformat,myindention=1cm}|
+\end{quote}
+
+\bigskip\pagebreak[3]
+Ein anderes Beispiel: Die Beschriftungen sollen wie folgt aussehen:
+%\begin{Example}
+% \captionsetup{aboveskip=0pt}
+ \example{format=reverse,labelformat=fullparens,labelsep=fill,labelfont=it}{\exampletext}
+%\end{Example}
+\pagebreak[2]
+Dies lie"se sich z.B. wie folgt realisieren:
+\nopagebreak[3]
+{\leftmargini=10pt
+ \begin{quote}
+ |\DeclareCaptionFormat{reverse}{#3#2#1}|\\
+ |\DeclareCaptionLabelFormat{fullparens}%|\\
+ | {(\bothIfFirst{#1}{~}#2)}|\\
+ |\DeclareCaptionLabelSeparator{fill}{\hfill}|\\
+ |\captionsetup{format=reverse,labelformat=fullparens,|\\
+ | labelsep=fill,font=small,labelfont=it}|
+ \end{quote}}
+Für kurze Beschriftungen, die in eine einzige Zeile passen, wird dieses
+Format jedoch nicht automatisch angewandt, da die Option |format=plain| Teil
+der \meta{zusätzlichen Optionen} des Beschrifungsstils |default| ist.
+Dies läßt sich auf verschiedene Arten ändern, so könnte man z.B.~den
+|singlelinecheck| auf |off| setzen. Wenn man die Zentrierung aber beibehalten
+möchte, bietet sich die Definition eines eigenen Beschriftungstils an, etwa so:
+\begin{quote}
+ |\DeclareCaptionStyle{mystyle}%|\\
+ | [justification=centering]{format=myformat}|\\
+ |\captionsetup{style=mystyle}|
+\end{quote}
+oder
+\begin{quote}
+ |\DeclareCaptionFormat{myshortformat}{|\ldots
+ \textit{was-auch-immer\ldots}|}|\\
+ |\DeclareCaptionStyle{mystyle}%|\\
+ | [format=myshortformat]{format=myformat}|\\
+ |\captionsetup{style=mystyle}|
+\end{quote}
+
+\bigskip\pagebreak[3]
+Ein weiteres Beispiel: Der Bezeichner soll in den linken Rand verlagert
+werden, so da"s die komplette Absatzbreite der Beschriftung selber zugute kommt:
+{\leftmargini=10pt
+ \begin{quote}
+ |\DeclareCaptionFormat{llap}{\llap{#1#2}#3\par}|\\
+ |\captionsetup{format=llap,labelsep=quad,singlelinecheck=no}|
+ \end{quote}}
+Das Ergebnis w"aren Beschriftungen wie diese:
+%\begin{Example}
+% \captionsetup{aboveskip=0pt}
+ \example{format=llap,labelsep=quad,singlelinecheck=no,margin=0pt}{\exampletext}
+%\end{Example}
+
+% --------------------------------------------------------------------------- %
+
+\pagebreak[4]
+\section{Unterstützung der Dokumentenklassen} % \& Babel}
+\label{classes}
+
+%\NEWdescription{v3.1}
+{\small\emph{Bitte beachten Sie:} Viele Dokumentenklassen haben bereits
+eingebaute Optionen und Befehle, um das Erscheinungsbild der Abbildungs- und
+Tabellenbeschriftungen individuell anzupassen.
+Wenn diese Möglichkeiten für Sie ausreichend sind, gibt es in der Regel
+keinen Grund, \thispackage\ zu benutzen. Und falls Sie lediglich an dem
+Befehl |\captionof| interessiert sind, ist in der Regel das Laden des
+kleinen aber feinen \package{capt-of}"=Paketes hierzu völlig ausreichend.}
+
+Dieser Teil der Dokumentation möchte Ihnen einen Überblick über diejenigen
+Dokumentenklassen, an welche \thispackage\ angepasst ist, geben:
+Welche Möglichkeiten zur Beschriftungsgestaltung sie bereits verfügen,
+mit welchen Seiteneffekten Sie rechnen müssen, wenn Sie dieses Paket verwenden,
+und zuletzt mit welchen Standardwerten die Optionen belegt werden.
+
+\NEWfeature{v3.1}
+Die Standardwerte "`default"' hängen von der verwendeten Dokumentenklasse ab;
+sie repräsentieren quasi das Aussehen, wie es vom Autor der Klasse gewünscht war.
+So kann z.B.~die Einstellung |format=default| je nach verwendeter Klasse
+unterschiedliche Aussehen der Beschriftungen hervorbringen.
+
+\DANGER
+Sollten Sie Ihre Dokumentenklasse nicht in diesem Abschnitt finden, so haben Sie
+trotzdem oftmals keinen Grund zur Sorge: Viele Dokumentenklassen sind von den
+Standardklassen |article|, |report| und |book| abgeleitet, und verhalten sich
+bezüglich der Abbildungs- und Tabellenbeschriftungen gleich.
+\Thispackage überprüft automatisch die Kompatibilität zur Dokumentenklasse und
+gibt eine klare Warnung aus, wenn es eine Unverträglichkeit entdeckt.
+Wenn Sie keine solche Warnung erhalten, ist alles bestens, wenn doch, wird von
+der Verwendung des \package{caption}"=Paketes abgeraten, insbesondere wird eine
+solche Verwendung nicht supportet.
+
+{\small(Sollten Sie trotz der angemahnten Inkompatibilität \thispackage{}
+ nutzen wollen, sollten Sie vorsichtig auf Seiteneffekte achten; gewöhnlich
+ ändert sich alleine durch das Einbinden des \package{caption}"=Paketes
+ ohne Optionen bereits das eigentlich von der Dokumentenklasse vorgebene
+ Aussehen der Beschriftungen.
+ Wenn dies für Sie in Ordnung ist, sollten Sie als erstes die Option
+ |style=base| mittels |\usepackage|\xx|[style=base]|\xx|{caption}| oder
+ |\captionsetup|\xx|{style=base}| angeben, um \thispackage\ in einen
+ dokumentierten Grundstatus zu versetzen.
+ Anschließend können Sie anfangen, mittels zusätzlicher Optionen erste
+ Anpassungen vorzunehmen und die Daumen gedrückt zu halten.)}
+
+\newcommand*\Option{Option}
+\newcommand*\defaultvalue{\texttt{default} Belegung}
+\newcommand*\use{\textit{verwendet}}
+\newcommand*\settings{\textit{Einstellungen}}
+\newcommand*\nofont{\textit{keiner}}
+
+\subsection{Standard \LaTeX: article, report und book}
+
+\begin{tabular}{ll}
+\Option & \defaultvalue \\\hline
+|format=| & |plain| \\
+|labelformat=| & |simple| \\
+|labelsep=| & |colon| \\
+|justification=| & |justified| \\
+|font=| & \nofont \\
+|labelfont=| & \nofont \\
+|textfont=| & \nofont \\
+\end{tabular}
+
+\textbf{Von der Klasse angebotene Befehle:} Keine
+
+\noindent{\small(\emph{Hinweis:} Dies gilt in der Regel auch für abgeleitete
+Dokumentenklassen.)}
+
+\subsection{\AmS: amsart, amsproc und amsbook}
+\label{AMS}
+
+\TODO
+
+\subsection{beamer}
+\label{beamer}
+
+\begin{tabular}{ll}
+\Option & \defaultvalue \\\hline
+|format=| & |plain| \\
+|labelformat=| & \textit{nicht nummeriert} \\
+|labelsep=| & |colon| \\
+|justification=| & |raggedright| \\
+|font=| & \use\ \package{beamer} |caption| \settings \\
+|labelfont=| & \use\ \package{beamer} |caption name| \settings \\
+|textfont=| & \nofont \\
+\end{tabular}
+
+\textbf{Von der Klasse angebotene Befehle und Seiteneffekte:}\\
+Die Zeichensatz- und Farbeinstellungen können mit
+|\setbeamerfont|\xx|{caption}|\xx\marg{options} und
+|\setbeamerfont|\xx|{caption name}|\xx\marg{options} vorgenommen werden.
+Dies wird auch mit dem \package{caption}"=Paket noch funktionieren, zumindest
+solange Sie keinen anderen Zeichensatz mit
+|\captionsetup|\xx|{font=|\xx\meta{options}|}| oder
+|\captionsetup|\xx|{labelfont=|\xx\meta{options}|}| einstellen.\par
+Weiterhin bietet die \package{beamer}"=Klasse verschiedene "`Templates"' für
+die Beschriftungen an, diese können mit
+|\set|\x|beamter|\x|template|\xx|{caption}|\xx|[|\meta{template}|]|
+ausgewählt werden.
+Da \thispackage\ diesen Mechanismus ersetzt, haben
+|\def|\x|beamer|\x|template*|\xx|{caption}|\xx\marg{template code}
+und
+|\set|\x|beamer|\x|template|\xx|{caption}|\xx|[|\meta{template}|]|
+keine Funktion mehr, wenn \thispackage\ verwendet wird.
+
+\subsection{\KOMAScript: scrartcl, scrreprt, and scrbook}
+\label{KOMA}
+
+\begin{tabular}{ll}
+\Option & \defaultvalue \\\hline
+|format=| & \use\ |\setcapindent| \textit{\&} |\setcaphanging| \\
+|labelformat=| & |simple| \\
+|labelsep=| & \use\ |\captionformat| \\
+|justification=| & |justified| \\
+|font=| & \use\ |\setkomafont{caption}| \settings \\
+|labelfont=| & \use\ |\setkomafont{captionlabel}| \settings \\
+|textfont=| & \nofont \\
+\end{tabular}
+
+\textbf{Von der Klasse angebotene Befehle:}\\
+Die \KOMAScript"=Dokumentenklassen bietet sehr viele Möglichkeiten, das Design
+der Abbildungs- und Tabellenbeschriftungen anzupassen. Für eine Übersicht schauen
+Sie bitte in die sehr gute \KOMAScript"=Dokumentation, Abschnitt "`Tabellen
+und Abbildungen"'.
+
+\textbf{Seiteneffekte:}\\
+Das optionale Argument von |\setcapwidth| wird (noch) nicht vom
+\package{caption}"=Paket unterstützt und daher ignoriert.
+Weiterhin überschreiben die \KOMAScript"=Optionen |tablecaptionabove| \&
+|tablecaptionbelow| sowie die dazugehörigen Befehle |\captionabove| \&
+|\captionbelow| die Einstellungsmöglichkeit |position=|, die \thispackage{}
+anbietet.
+
+\subsection{\NTG: artikel, rapport und boek}
+\label{NTG}
+
+\begin{tabular}{ll}
+\Option & \defaultvalue \\\hline
+|format=| & |plain| \\
+|labelformat=| & |simple| \\
+|labelsep=| & |colon| \\
+|justification=| & |justified| \\
+|font=| & \nofont \\
+|labelfont=| & \use\ |\CaptionLabelFont| \\
+|textfont=| & \use\ |\CaptionTextFont| \\
+\end{tabular}
+
+\textbf{Von der Klasse angebotene Befehle und Seiteneffekte:}\\
+|\CaptionLabelFont| und |\CaptionTextFont| können entweder direkt oder
+indirekt über |\CaptionFonts| definiert werden.
+Beides funktioniert auch weiterhin, zumindest solange kein anderer
+Zeichensatz mittels der \package{caption}"=Paket"=Optionen
+|labelfont=| oder |textfont=| festgelegt wird.
+
+\subsection{\SmF: smfart und smfbook}
+\label{SMF}
+
+\TODO
+
+\subsection{Die französische Babel Option}
+\label{frenchb}
+
+\TODO\iffalse
+If you use the \package{frenchb} option of the \package{babel} package
+with one of the three standard \LaTeX{} classes (or a one derived from them)
+the default |labelsep=| will be set to \cs{CaptionSeparator} (offered by
+\package{frenchb}), overriding the default value set by the document class.
+So redefining \cs{CaptionSeparator} will still work, unless you don't
+select a different |labelsep=| than the default one.
+\fi
+
+\INFO*
+Bitte laden Sie \thispackage\ \emph{nach} dem \package{babel}"=Paket.
+
+\subsection{Das frenchle- und frenchpro-Paket}
+\label{frenchpro}
+
+\TODO\iffalse
+If you use the \package{frenchle} or \package{frenchpro} package,
+the default |labelsep=| will be set to \cs{captionseparator} (offered by
+\package{frenchle/pro}) plus \cs{space}, overriding the default value set
+by the document class.
+So redefining \cs{captionseparator} will still work, unless you don't
+select a different |labelsep=| than the default one.
+
+Furthermore the default |textfont=| will be set to |textfont=it|,
+since this emulates the default setting of |\captionfont| defined by the
+\package{frenchle} or \package{frenchpro} package.
+%If you redefine |\captionfont| after loading the \package{frenchle} or
+%\package{frenchpro} package, this redefinition gets lost.
+Please note that the command \cs{captionfont} is used by the
+\package{caption} package internally for a different purpose,
+so you should not change it (anymore).
+
+The command \cs{unnumberedcaptions}\marg{figure or table} will still work,
+but only unless you don't select a different |labelformat=| than the default
+one.
+\fi
+
+\INFO*
+Bitte laden Sie \thispackage\ \emph{nach} dem \package{frenchle}
+oder \package{frenchpro}"=Paket.
+
+% --------------------------------------------------------------------------- %
+
+\pagebreak[3]
+\section{Interaktion mit anderen Paketen}
+\label{packages}
+
+%\NEWdescription{v3.1}
+\Thispackage\ ist an folgende Pakete, die ebenfalls Abbildungs- oder
+Tabellenbeschriftungen anbieten, angepasst:
+\begin{quote}
+ \package{float}, \package{floatflt}, \package{fltpage},
+ \package{hyperref}, \package{hypcap}, \package{listings},
+ \package{longtable}, \package{picinpar}, \package{picins},
+ \package{rotating}, \package{sidecap}, \package{subfigure},
+ \package{supertabular}, \package{threeparttable} und \package{wrapfig}
+\end{quote}
+
+Weiterhin arbeiten das \package{floatrow}- und das \package{subfig}"=Paket
+aktiv mit diesem Paket zusammen und verwenden die |\captionsetup|"=Schnittstelle.
+
+\subsection{float}
+\label{float}
+
+\TODO
+
+\subsection{floatflt}
+\label{floatflt}
+
+\TODO
+
+\subsection{fltpage}
+\label{fltpage}
+
+\TODO
+
+\subsection{hyperref}
+\label{hyperref}
+
+\NEWfeature{v3.1}
+Zwei Optionen regeln das Setzen von Hyperlinks:
+\begin{description}
+\item{\texttt{hypcap=}}\\[\smallskipamount]
+Auf |true| gesetzt, werden alle Hyperlink"=Anker -- wohin Einträge im
+Abbildungs- und Tabellenverzeichnis, sowie |\ref| und |\autoref|
+verweisen -- an den Anfang der (gleitenden) Umgebungen wie Abbildung
+oder Tabelle plaziert.\par
+Auf |false| gesetzt zeigen hingegen alle Hyperlink"=Anker auf die
+Beschriftung.\par
+(Die Voreinstellung ist |hypcap=true|.)
+\item{\texttt{hypcapspace=}}\\[\smallskipamount]
+Dies regelt den vertikalen Abstand zwischen dem Hyperlink"=Anker und der
+(gleitenden) Umgebung, so entfernt z.B.~|hypcapspace=0pt| diesen Abstand.\par
+(Die Voreinstellung ist|hypcapspace=0.5\baselineskip|.)
+\end{description}
+
+Bitte beachten Sie:
+
+\begin{description}
+\item{\cs{captionof}\marg{type}\csmarg\ldots\ vs.
+ \cs{captionsetup}\csmarg{type=\meta{Typ}}$+$\cs{caption}\csmarg\ldots}\\[\smallskipamount]
+Ohne geladenes \package{hyperref}"=Paket bekommen Sie identische Resultate.
+Aber mit \package{hyperref} geladen und mit |hypcap=true| versehen wird der
+Hyperlink"=Anker unterschiedlich gesetzt. So plaziert z.B.
+\begin{quote}
+|\begin{minipage}{\linewidth}|\\
+| |\ldots\\
+| \captionof{figure}{A figure}|\\
+|\end{minipage}|
+\end{quote}
+den Anker bei der Beschriftung.
+(Und wenn |hypcap=true| gesetzt ist, wird eine Warnung deswegen ausgegeben.)
+\begin{quote}
+|\begin{minipage}{\linewidth}|\\
+| \captionsetup{type=figure}|\\
+| |\ldots\\
+| \caption{A figure}|\\
+|\end{minipage}|
+\end{quote}
+hingegen plaziert den Anker an den Anfang der |minipage|.
+
+\item{\cs{caption}\csoarg{}\csmarg\ldots\ vs.
+ \cs{captionsetup}\csmarg{listof=false}$+$\cs{caption}\csmarg\ldots}\\[\smallskipamount]
+Wiederum bekommen Sie ohne geladenes \package{hyperref}"=Paket identische Resultate.
+Aber mit \package{hyperref} geladen liegen die Unterschiede in den Feinheiten.
+So wird z.B.~das optionale Argument von \cs{caption} auch in die |aux|-Datei
+geschrieben und vom \cs{nameref} Befehl verwendet.
+Wenn Sie also \cs{caption} mit leerem Argument angeben, wird ein auf diese
+Abbildung oder Tabelle angewandtes \cs{nameref} nicht das erwünschte,
+nämlich ein leeres Resultat zur Folge haben.
+Daher ist es besser \cs{captionsetup}\csmarg{listof=false} zu verwenden,
+wenn Sie keinen Eintrag in dem Abbildungs- oder Tabellenverzeichnis wünschen.
+\end{description}
+
+\subsection{hypcap}
+\label{hypcap}
+
+Wird das \package{hypcap}"=Paket zusätzlich zum \package{hyperref}"=Paket
+geladen, so übernimmt es die Kontrolle über die Platzierung der Hyperlink"=Anker.
+
+Dies hat den Nebeneffekt, daß die Hyperlink"=Anker innerhalb der Umgebungen
+|floatingfigure| (vom \package{floatflt}"=Paket bereitgestellt),
+|figwindow| (vom \package{picinpar}"=Paket bereitgestellt),
+|parpic| (vom \package{picins}"=Paket bereitgestellt) und
+|wrapfigure| (vom \package{wrapfig}"=Paket bereitgestellt)
+nicht mehr optimal platziert werden.
+
+Außerdem ist zu beachten, daß dann |\captionsetup{type=|\meta{Type}|}|
+keinen Hyperlink"=Anker mehr setzt, dies muß dann stattdessen mit
+|\capstart|(welches vom \package{hypcap}"=Paket angeboten wird) geschehen.
+
+\subsection{listings}
+\label{listings}
+
+\TODO
+
+\subsection{longtable}
+\label{longtable}
+
+\TODO
+
+\subsection{picinpar}
+\label{picinpar}
+
+\TODO
+
+\subsection{picins}
+\label{picins}
+
+\TODO
+
+\subsection{rotating}
+\label{rotating}
+
+\TODO
+
+\subsection{sidecap}
+\label{sidecap}
+
+\TODO
+
+\subsection{subfigure}
+\label{subfigure}
+
+\TODO
+
+\subsection{supertabular}
+\label{supertabular}
+
+\TODO
+
+\subsection{threeparttable}
+\label{threeparttable}
+
+\TODO
+
+\subsection{wrapfig}
+\label{wrapfig}
+
+\TODO
+
+% --------------------------------------------------------------------------- %
+
+\pagebreak[4]
+\section{Kompatibilit"at zu "alteren Versionen}
+\label{compatibility}
+
+\subsection{caption v\texorpdfstring{$1.x$}{1.x}}
+\label{caption1}
+
+Diese Version des \thispackage"=Paketes ist weitgehend kompatibel zu "alteren
+Versionen des Paketes; alte, vorhandene Dokumente sollten sich also in der
+Regel ohne Probleme weiterhin "ubersetzen lassen.
+Jedoch ist zu beachten, da"s eine Mischung aus alten Befehlen und neueren
+Optionen bzw.~Befehlen zu unerw"unschten Nebeneffekten f"uhren kann.
+
+Hier eine kurze "Ubersicht "uber die alten, "uberholten Optionen und ihre
+aktuellen Entsprechungen:
+
+{\small\begin{longtable}{ll}
+\package{caption} \version{1.x} & \package{caption} \version{3.x}\\
+\hline
+\endhead
+|normal| & |format=plain|\\
+|hang| & |format=hang|\\
+|isu| & |format=hang|\\
+|center| & |justification=centering|\\
+|centerlast| & |justification=centerlast|\\
+%|anne| & |justification=centerlast|\\
+|nooneline| & |singlelinecheck=off|\\
+|scriptsize| & |font=scriptsize|\\
+|footnotesize| & |font=footnotesize|\\
+|small| & |font=small|\\
+|normalsize| & |font=normalsize|\\
+|large| & |font=large|\\
+|Large| & |font=Large|\\
+|up| & |labelfont=up|\\
+|it| & |labelfont=it|\\
+|sl| & |labelfont=sl|\\
+|sc| & |labelfont=sc|\\
+|md| & |labelfont=md|\\
+|bf| & |labelfont=bf|\\
+|rm| & |labelfont=rm|\\
+|sf| & |labelfont=sf|\\
+|tt| & |labelfont=tt|\\
+\end{longtable}}
+
+Neben den Optionen zum Einstellen des Zeichensatzes gab es auch die Befehle
+|\captionsize| bzw. |\captionfont| und |\captionlabelfont|, die direkt
+mittels |\renewcommand| ver"andert werden konnten. Dieser Mechanismus
+wurde durch die Anweisungen
+\begin{quote}
+ |\DeclareCaptionFont{|\ldots|}{|\ldots|}|\qquad und\\
+ |\captionsetup{font=|\ldots|,labelfont=|\ldots|}|
+\end{quote}
+ersetzt. \SeeUserDefined
+
+Das Setzen eines Randes geschah in \version{1.x} mittels
+\begin{quote}
+ |\setlength{\captionmargin}{|\ldots|}|\quad.
+\end{quote}
+Dies wurde durch
+\begin{quote}
+ |\captionsetup{margin=|\ldots|}|
+\end{quote}
+ersetzt. \See{\Ref{margins}}
+
+Zum Beispiel w"urde
+\begin{quote}
+|\usepackage[hang,bf]{caption}|\\
+|\renewcommand\captionfont{\small\sffamily}|\\
+|\setlength\captionmargin{10pt}|
+\end{quote}
+in aktueller Notation
+\begin{quote}
+|\usepackage[format=hang,labelfont=bf,font={small,sf},|\\
+| margin=10pt]{caption}|
+\end{quote}
+bzw.
+\begin{quote}
+|\usepackage{caption}|\\
+|\captionsetup{format=hang,labelfont=bf,font={small,sf},|\\
+| margin=10pt}|
+\end{quote}
+hei"sen.
+
+Die etwas exotische Option |ruled|, die eine partielle Anwendung der
+eingestellten Parameter bei gleitenden Umgebungen des Typs |ruled|
+aktivierte, wird ebenfalls emuliert, hat aber keine direkte
+Entsprechung in dieser Version des \package{caption}"=Paketes.
+M"ochte man gezielt das Aussehen der Abbildungen des Stils |ruled|,
+der durch das \package{float}"=Paket zur Verf"ugung gestellt wird,
+ver"andern, so ist dies nun durch
+\begin{quote}
+ |\DeclareCaptionStyle{ruled}{|\ldots|}|
+\end{quote}
+bzw.
+\begin{quote}
+ |\captionsetup[ruled]{|\ldots|}|
+\end{quote}
+m"oglich.
+\SeeUserDefined[, \Ref{commands} und \Ref{float}]
+
+\subsection{caption2 v\texorpdfstring{$2.x$}{2.x}}
+\label{caption2}
+
+Die Pakete \package{caption} und seine experimentelle, nun veraltete
+Variante \package{caption2} sind vom internen Konzept
+her zu unterschiedlich, um hier eine vollst"andige Kompatibilit"at
+gew"ahrleisten zu k"onnen.
+Daher liegt diesem Paket weiterhin die Datei |caption2.sty| bei, so da"s
+"altere Dokumente, die das \package{caption2}"=Paket verwenden, weiterhin
+"ubersetzt werden k"onnen.
+
+Neue Dokumente sollten jedoch auf dem aktuellen \package{caption}"=Paket
+aufgesetzt werden. In den meisten F"allen ist es ausreichend, einfach
+ggf.~die Anweisung
+\begin{quote}
+ |\usepackage[...]{caption2}|
+\end{quote}
+durch
+\begin{quote}
+ |\usepackage[...]{caption}|
+\end{quote}
+zu ersetzen. Einige Optionen und Befehle werden jedoch nicht emuliert,
+so da"s sie anschlie"send Fehlermeldungen erhalten k"onnen.
+Die folgenden Abs"atze werden Ihnen jedoch bei der Umsetzung dieser
+Optionen und Befehle helfen. Sollten dar"uberhinaus noch Fragen oder
+Probleme auftreten, so z"ogern Sie bitte nicht, mich diesbez"uglich
+per E-Mail zu kontaktieren.
+
+Zus"atzlich zu den bereits im vorherigen Abschnitt vorgestellten Optionen
+werden auch folgende emuliert:
+
+{\small\begin{longtable}{ll}
+\package{caption2} \version{2.x} & \thispackage\ \version{3.x}\\
+\hline
+\endhead
+|flushleft| & |justification=raggedright|\\
+|flushright| & |justification=raggedleft|\\
+|oneline| & |singlelinecheck=on|\\
+\end{longtable}}
+
+Das Setzen eines Randes geschah in \version{2.x} mittels
+\begin{quote}\leavevmode\hbox{%
+ |\setcaptionmargin{|\ldots|}| bzw.
+ |\setcaptionwidth{|\ldots|}|\quad.
+}\end{quote}
+Dies wurde durch
+\begin{quote}\leavevmode\hbox{%
+ |\captionsetup{margin=|\ldots|}| bzw.
+ |\captionsetup{width=|\ldots|}|
+}\end{quote}
+ersetzt. \See{\Ref{margins}}
+
+Das Setzen des Einzuges wurde in \version{2.x} mit
+\begin{quote}
+ |\captionstyle{indent}|\\
+ |\setlength\captionindent{|\ldots|}|
+\end{quote}
+erledigt, dies geschieht nun mit
+\begin{quote}
+ |\captionsetup{format=plain,indention=|\ldots|}|\quad.
+\end{quote}
+
+Die Sonderbehandlung von einzeiligen Beschriftungen lie"s sich in
+\version{2.x} mit |\oneline|\-|captions|\-|false| aus-
+bzw. |\oneline|\-|captions|\-|true| wieder einschalten. Dies wurde durch
+|\captionsetup{|\xx|singlelinecheck=|\xx|off}|
+bzw.
+|\captionsetup{|\xx|singlelinecheck=|\xx|on}|
+ersetzt. \See{\Ref{justification}}
+
+Die Befehle
+\begin{quote}
+ |\captionlabeldelim|, |\captionlabelsep|, |\captionstyle|,\\
+ |\defcaptionstyle|, |\newcaptionstyle| und |\renewcaptionstyle|
+\end{quote}
+haben keine direkte Entsprechnung und werden daher durch diese
+Version des \package{caption}"=Paketes auch nicht emuliert.
+Sie f"uhren also bei der Verwendung %mit diesem \thispackage"=Paket
+zu Fehlermeldungen und m"ussen daher zwingend umgesetzt werden.
+Die Umsetzung ist von Fall zu Fall verschieden, lesen Sie sich daher bitte
+diese Anleitung gr"undlich durch und suchen Sie sich die Optionen bzw.~Befehle
+als Ersatz heraus, die Ihren W"unschen entsprechen.
+
+\iffalse
+Als kleine Hilfestellung hier die Beispiele aus der alten Anleitung zum
+\package{caption2}"=Paket und deren Umsetzung:
+
+\newenvironment{OldNew}%
+ {\begin{minipage}\linewidth
+ \def\Old{Alt:\begin{quote}}%
+ \def\New{\end{quote}Neu:\begin{quote}}%
+ \def\Or{\end{quote}\centerline{-- oder --}\begin{quote}}%
+ }%
+ {\end{quote}\end{minipage}}
+
+\begin{OldNew}
+\Old
+ |\captionstyle{center}|
+\New
+ |\captionsetup{justification=centering}|
+\end{OldNew}
+
+\hrule
+
+\begin{OldNew}
+\Old
+ |\captionstyle{indent}|\\
+ |\setlength{\captionindent}{1cm}|
+\New
+ |\captionsetup{format=plain,indention=1cm}|
+\end{OldNew}
+
+\hrule
+
+\begin{OldNew}
+\Old
+ |\renewcommand\captionfont{\small}|\\
+ |\renewcommand\captionlabelfont{\itshape}|
+\New
+ |\captionsetup{font=small,labelfont=it}|
+\end{OldNew}
+
+\hrule
+
+\begin{OldNew}
+\Old
+ |\renewcommand\captionfont{\small\itshape}|\\
+ |\renewcommand\captionlabelfont{\upshape}|
+\New
+ |\captionsetup{font=small,textfont=it}|
+\end{OldNew}
+
+\hrule
+
+\begin{OldNew}
+\Old
+ |\setcaptionwidth{.5\textwidth}|
+\New
+ |\captionsetup{width=.5\textwidth}|
+\end{OldNew}
+
+\hrule
+
+\begin{OldNew}
+\Old
+ |\setcaptionmargin{.25\textwidth}|
+\New
+ |\captionsetup{margin=.25\textwidth}|
+\end{OldNew}
+
+\hrule
+
+\begin{OldNew}
+\Old
+ |\newcaptionstyle{absatz}{\captionlabel: \exampletext\par}|\\
+ |\captionstyle{absatz}|
+\New
+ |\DeclareCaptionFormat{absatz}{#1: #3\par}|\\
+ |\captionsetup{format=absatz,singlelinecheck=off}|
+\Or
+ |\captionsetup{format=plain,singlelinecheck=off}|
+\end{OldNew}
+
+\hrule
+
+\begin{OldNew}
+\Old
+ |\newcaptionstyle{fancy}{\textsf{\captionlabel}\\\exampletext\par}|\\
+ |\captionstyle{fancy}|
+\New
+ |\DeclareCaptionFormat{fancy}{\textsf{#1}\\#3\par}|\\
+ |\captionsetup{format=fancy,singlelinecheck=off}|
+\Or
+ |\captionsetup{format=plain,labelfont=sf,labelsep=newline}|
+\end{OldNew}
+
+\hrule
+
+\begin{OldNew}
+\Old
+ |\newcaptionstyle{fancy2}{\exampletext\hfill\textit{(\captionlabel)}}|\\
+ |\captionstyle{fancy2}|
+\New
+ |\DeclareCaptionFormat{fancy2}{#3\hfill\textit{(#1)}}|\\
+ |\captionsetup{format=fancy2,singlelinecheck=off}|
+\end{OldNew}
+
+\hrule
+
+\begin{OldNew}
+\Old
+ |\newcaptionstyle{mystyle}{%|\\
+ | \normalcaptionparams|\\
+ | \renewcommand\captionlabelfont{\bfseries}%|\\
+ | \renewcommand\captionlabeldelim{.}%|\\
+ | \onelinecaptionsfalse|\\
+ | \usecaptionstyle{centerlast}}|\\
+ |\captionstyle{mystyle}|
+\New
+ |\DeclareCaptionStyle{mystyle}{labelfont=bf,labelsep=period,justification=centerlast}|\\
+ |\captionsetup{style=mystyle}|
+\end{OldNew}
+
+\hrule
+
+\begin{OldNew}
+\Old
+ |\newcaptionstyle{hangandleft}{%|\\
+ | \let\oldcaptiontext\exampletext|\\
+ | \def\exampletext{\raggedright\oldcaptiontext}%|\\
+ | \usecaptionstyle{hang}}|\\
+ |\captionstyle{hangandleft}|
+\New
+ |\captionsetup{format=hang,justification=raggedright}|
+\end{OldNew}
+
+\hrule
+
+\begin{OldNew}
+\Old
+ |\newcaptionstyle{fancy}{%|\\
+ | \usecaptionmargin\captionfont|\\
+ | \onelinecaption|\\
+ | {{\captionlabelfont\captionlabel\captionlabeldelim}%|\\
+ | \captionlabelsep\exampletext}%|\\
+ | {{\centering\captionlabelfont\captionlabel\par}%|\\
+ | \centerlast\exampletext\par}}|\\
+ |\captionstyle{fancy}|
+\New
+ |\DeclareCaptionFormat{fancy}{\centering#1\par\centerlast#3\par}|\\
+ |\DeclareCaptionStyle{fancy}|\\
+ | [format=plain,justification=centering]|\\
+ | {format=fancy}|\\
+ |\captionsetup{style=fancy}|
+\Or
+ |\DeclareCaptionFormat{fancy}{#1\par#3\par}|\\
+ |\DeclareCaptionStyle{fancy}|\\
+ | [format=plain,justification=centering]|\\
+ | {format=fancy,justification=centerlast}|\\
+ |\captionsetup{style=fancy}|
+\end{OldNew}
+
+\hrule
+
+\begin{OldNew}
+\Old
+ |\renewcaptionstyle{longtable}{\usecaptionstyle{normal}}|
+\New
+ |\captionsetup[longtable]{format=plain}|
+\end{OldNew}
+\fi
+
+Ebenfalls keine Entsprechung hat die \version{2.x}"=Option |ignoreLTcapwidth|.
+Deren Verwendung kann in der Regel einfach entfallen, da \thispackage\ den
+Wert von |\LTcapwidth| sowieso nicht beachtet, solange er nicht explizit auf
+einen anderen Wert als den Standardwert ($=$|4in|) gesetzt wird.
+\See{\Ref{longtable}}
+
+\subsection{caption v\texorpdfstring{$3.0$}{3.0}}
+\label{caption3}
+
+%\NEWdescription{v3.1}
+\Thispackage\ \version{3.0} hatte keine weiteren Dokumentenklassen
+aktiv unterstützt als die drei Standard"=Klassen, die \LaTeX\ selber
+mitbringt: |article|, |report| und |book|.
+Daher waren die Vorbelegungen der Einstellungsmöglichkeiten fest durch
+dieses Paket vorgegeben, sie repräsentierten das Aussehen bei Verwendung
+einer dieser Klassen.
+Nun aber unterstützt \thispackage\ mehr Dokumentenklasse aktiv, folglich
+kann die Vorbelegung nun von der verwendeten Dokumentenklasse abhängen.
+
+Ein Beispiel: Während in \version{3.0} die Vorbelegung der Ausrichtung
+immer |justification=|\xx|justified| was, ist sie nun immer noch |justified|
+wenn eine der drei Standardklassen verwendet wird, aber
+|justification=|\xx|raggedright|, wenn die \package{beamer}"=Klasse verwendet
+wird.
+
+Möchten sie weiterhin die "`alten"' Vorbelegungen, so können Sie die Option
+|style=base| beim Laden des \package{caption}"=Paketes angeben oder später
+mittels |\captionsetup|\xx|{style=base}| den alten Grundzustand wieder herstellen.
+
+% --------------------------------------------------------------------------- %
+
+\pagebreak[4]
+\section{Alphabetische Referenz}
+
+%\newenvironment{Warnings}%
+% {\begin{trivlist}%
+% \def\Message{\pagebreak[3]\leftskip=0pt\relax\item[]\color{blue}}%
+% \def\Description{\nopagebreak\par\nopagebreak\color{black}\leftskip=1.5em\nopagebreak}%
+% }%
+% {\color{black}\end{trivlist}}
+\newenvironment{Warnings}{%
+ \newif\ifMessage
+ \def\Message{%
+ \ifMessage\end{minipage}\par\vspace\itemsep\pagebreak[3]\fi
+ \begin{minipage}{\linewidth}%
+ \setlength\parindent{0pt}%
+ \setlength\parskip{\smallskipamount}%
+ \setlength\leftskip{0pt}%
+ \color{blue}%
+ \Messagetrue}%
+ \def\Description{%
+ \par\color{black}\leftskip=1.5em}%
+}{%
+ \ifMessage\end{minipage}\par\fi
+}
+
+\subsection{Befehle}
+
+\begin{longtable}{lll}
+Befehl & & Abschnitt \\
+\hline
+\endhead
+|\abovecaptionskip| & & \ref{skips} \\
+%|\AtBeginCaption| & & \ref{x} \\
+%|\AtEndCaption| & & \ref{x} \\
+|\belowcaptionskip| & & \ref{skips} \\
+|\caption| & & \ref{commands} \\
+|\caption*| & & \ref{commands} \\
+|\captionbox| & & \ref{x} \\
+|\captionof| & & \ref{commands} \\
+|\captionof*| & & \ref{commands} \\
+|\captionsetup| & & \ref{commands} \\
+|\captionsetup*| & & \ref{commands} \\
+|\centerfirst| & & \ref{justification} \\
+|\centerlast| & & \ref{justification} \\
+|\clearcaptionsetup| & & \ref{commands} \\
+|\clearcaptionsetup*| & & \ref{commands} \\
+|\ContinuedFloat| & & \ref{ContinuedFloat} \\
+|\DeclareCaptionFont| & & \ref{declare} \\
+|\DeclareCaptionFormat| & & \ref{declare} \\
+|\DeclareCaptionFormat*| & & \ref{declare} \\
+|\DeclareCaptionJustification| & & \ref{declare} \\
+|\DeclareCaptionLabelFormat| & & \ref{declare} \\
+|\DeclareCaptionLabelSeparator| & & \ref{declare} \\
+|\DeclareCaptionLabelSeparator*| & & \ref{declare} \\
+|\DeclareCaptionListOfFormat| & & \ref{declare} \\
+|\DeclareCaptionOption| & & \ref{declare} \\
+|\DeclareCaptionStyle| & & \ref{declare} \\
+|\DeclareCaptionTextFormat| & & \ref{declare} \\
+|\showcaptionsetup| & & \ref{commands} \\
+\end{longtable}
+
+\pagebreak[4]
+\subsection{Optionen}
+\newcommand\preambleoption{ \footnotemark[1]}
+
+\begin{longtable}{lll}
+Option & Kurzbeschreibung & Abschnitt \\
+\hline
+\endhead
+|aboveskip| & setzt den Abstand über der Beschriftung & \ref{skips} \\
+|belowskip| & setzt den Abstand unter der Beschriftung & \ref{skips} \\
+|compatibility|\preambleoption & erzwingt (Nicht-)Kompatibilität & \ref{classes} \\
+%|config| & & \ref{x} \\
+|figurename|\preambleoption & setzt den Abbildungsnamen & \ref{x} \\
+|figureposition|\preambleoption & gibt einen Hinweis auf die Position & \ref{skips} \\
+|font| & wählt den Zeichensatz & \ref{fonts} \\
+|format| & wählt das Format & \ref{formats} \\
+|hangindent| & setzt den "`hängenden"' Einzug & \ref{margins} \\
+|hypcap| & wählt das "`hypcap"' Feature aus & \ref{hyperref} \\
+|hypcapspace| & setzt den Abstand über einem Hyperlink & \ref{hyperref} \\
+|indention| & setzt den Einzug & \ref{margins} \\
+|justification| & wählt die Ausrichtung & \ref{justification} \\
+|labelfont| & wählt den Zeichensatz des Bezeichners & \ref{fonts} \\
+|labelformat| & wählt das Format des Bezeichners & \ref{formats} \\
+|labelsep| & wählt den Trenner zw. Bezeichner$+$Text & \ref{formats} \\
+|labelseparator| & wählt den Trenner zw. Bezeichner$+$Text & \ref{formats} \\
+|listof| & schaltet die Listeneinträge an bzw. aus & \ref{listof} \\
+|listofformat| & wählt das Listenformat & \ref{listof} \\
+|margin| & setzt den Rand bzw. die Ränder & \ref{margins} \\
+|margin*| & setzt den Rand, sofern keine Breite gesetzt ist & \ref{margins} \\
+|maxmargin| & setzt den max. zu verwendenen Rand & \ref{margins} \\
+|minmargin| & setzt den min. zu verwendenen Rand & \ref{margins} \\
+|options| & führt die angegebene Optionsliste aus & \ref{x} \\
+|parindent| & setzt den Absatzeinzug & \ref{margins} \\
+|parskip| & setzt den Absatzabstand & \ref{margins} \\
+|position| & gibt einen Hinweis auf die Position & \ref{skips} \\
+|singlelinecheck| & schaltet die "`Ein-Zeilen-Prüfung"' ein bzw. aus & \ref{justification} \\
+%|size| & wählt die Größe des Zeichensatzes & \ref{x} \\
+|skip| & setzt den Abstand zwischen Inhalt \& Beschriftung & \ref{skips} \\
+|strut| & schaltet die Verwendung von |\strut| ein bzw. aus & \ref{formats} \\
+|style| & wählt einen kompletten Stil aus & \ref{style} \\
+|tablename|\preambleoption & setzt den Tabellennamen & \ref{x} \\
+|tableposition|\preambleoption & gibt einen Hinweis auf die Position & \ref{skips} \\
+|textfont| & wählt den Zeichensatz des Textes & \ref{fonts} \\
+|textformat| & wählt das Format des Textes & \ref{formats} \\
+|twoside| & wählt den zweiseitigen Modus & \ref{x} \\
+|type| & setzt den Typ \& setzt einen Hyperlink-Anker & \ref{x} \\
+|type*| & setzt (nur) den Typ & \ref{x} \\
+|width| & setzt eine feste Breite & \ref{margins} \\
+\end{longtable}
+\footnotetext[1]{Diese Optionen stehen nur in dem Dokumentenvorspann (Preamble)
+ zur Verfügung.}
+\nopagebreak
+{\small\emph{Hinweis:} Veraltete, aber emulierte Optionen sind hier nicht gelistet.
+ Eine Auflistung dieser Optionen ist in\\
+ \hspace*{1em}\Ref{caption1} und\\
+ \hspace*{1em}\Ref{caption2} zu finden.}
+
+\pagebreak[4]
+\subsection{Warnungen}
+
+\begin{Warnings}
+
+\Message
+ |*************************************************|\\
+ |\caption will not be redefined since it's already|\\
+ |redefined by a document class or package which is|\\
+ |unknown to the caption package.|\\
+ |As a result some new features of the caption|\\
+ |package will not work as expected.|\\
+ |*************************************************|
+\Description
+ Wenn \thispackage\ eine vorhandene (und unbekannte) Erweiterung des Befehls
+ |\caption| erkannt hat, definiert es |\caption| nicht erneut um, da dies
+ unweigerlich den Verlust der ursprünglichen Erweiterung zur Folge hätte.
+ Daher funktionieren manche Features, wie |\caption*|,
+ |\ContinuedFloat|, das optionale Argument von |\captionsetup|,
+ sowie die Optionen |listof=| und |hypcap=| nicht mehr; sie werden
+ entweder ignoriert oder arbeiten nicht erwartungsgemäß.\par
+ Wenn Sie an der ursprünglichen Erweiterung nicht interessiert sind
+ und stattdessen den vollen Umfang des \package{caption}"=Paketes
+ verwenden wollen, können Sie es mit der nicht supporteten(!)
+ Option |compatibility=false| probieren und die Daumen drücken.
+ (Aber Sie werden die nächste Warnung stattdessen bekommen.)
+ \par\See{\Ref{classes}}
+
+\Message
+ |*****************************************************|\\
+ |Forced redefinition of \caption since the|\\
+ |unsupported(!) package option `compatibility=false'|\\
+ |was given. Please fasten your seat belts, as we may|\\
+ |experience turbulence!|\\
+ |*****************************************************|
+\Description
+ Da Sie so mutig waren, die Option |compatibility=false| zu probieren,
+ wird \thispackage\ sein bestes geben, um diesen Wunsch zu erfüllen.
+ Aber je nach verwendeter Dokumentenklasse bzw.~Pakete sollten Sie sich
+ auf nicht"=funktionierende Features oder gar Fehlermeldungen einstellen.
+ Also bitte die Daumen gedrückt halten!
+ \par\See{\Ref{classes}}
+
+\Message
+ |Caption type was already set to `|\meta{type}|'.|
+\Description
+ Diese Warnung informiert Sie über vermische \package{caption}"=Optionen.
+ Wenn Sie z.B.~ein |\captionof|\xx|{table}|\xx|{|\ldots|}| in einer |figure|
+ Umgebung verwenden, werden beide Optionensätze, sowohl derjenige für |figure|
+ (mittels |\captionsetup|\xx|[figure]|\xx|{|\ldots|}| angegeben) als auch
+ derjenige für |table| (mittels |\captionsetup|\xx|[table]|\xx|{|\ldots|}|
+ angegeben), angewandt.
+ \par\See{\Ref{commands}}
+
+\Message
+ |Hyperref support is turned off because hyperref has|\\
+ |stopped early.|
+\Description
+ Wenn das \package{hyperref}"=Paket seinen Dienst einstellt (den Grund hierfür
+ teilt es Ihnen mit), ist auch die \package{hyperref}"=Unterstützung des
+ \package{caption}"=Paketes nicht verfügbar. Als Folge werden Sie einige
+ Warnungen des \package{hyperref}"=Paketes bekommen, ferner werden Hyperlinks
+ auf Abbildungen und Tabellen nicht funktionsfähig sein.
+ \par\See{\Ref{hyperref}}
+
+\Message
+ |Ignoring optional argument [|\meta{pos}|] of \setcapwidth.|
+\Description
+ \Thispackage\ bemüht sich, so gut es kann, die \KOMAScript"=Befehle
+ bzgl.~Tabellen und Abbildungen zu emulieren. Aber das optionale Argument
+ von |\setcapwidth| funktioniert (noch) nicht; wenn Sie es angeben,
+ wird diese Warnung ausgegeben.
+ \par\See{\Ref{KOMA}}
+
+\Message
+ |Option `|\meta{option}|' was not in list `|\meta{option list}|'.|
+\Description
+ Wenn Sie versuchen, eine bestimmte Option aus einer Optionsliste zu
+ entfernen, zum Beispiel mit |\clearcaptionsetup[position]{table}|,
+ und die angegebene Option kann nicht in der Liste gefunden werden, so
+ erhalten Sie die obenstehende Warnung.
+ Liegt dies nicht an einem Schreibfehler Ihrerseits und möchten Sie ferner
+ diese Warnung unterdrücken, so verwenden können Sie hierzu |\clearcaptionsetup*|
+ anstelle von |\clearcaptionsetup| verwenden.
+ \par\See{\Ref{commands}}
+
+\Message
+ |Option list `|\meta{option list}|' undefined.|
+\Description
+ Wenn Sie versuchen, eine bestimmte Option aus einer Optionsliste zu
+ entfernen, zum Beispiel mit |\clearcaptionsetup[format]{figure}|,
+ und die angegebene Optionsliste ist (noch) nicht definiert, so
+ erhalten Sie die obenstehende Warnung.
+ Liegt dies nicht an einem Schreibfehler Ihrerseits und möchten Sie ferner
+ diese Warnung unterdrücken, so verwenden können Sie hierzu |\clearcaptionsetup*|
+ anstelle von |\clearcaptionsetup| verwenden.
+ \par\See{\Ref{commands}}
+
+\iffalse
+\Message
+ |Possibly superfluous \restylefloat{|\meta{type}|} detected.|\\
+ |If you think that this warning is unjustified,|\\
+ |you can switch it off using the caption package|\\
+ |option `restylefloatcheck=off'.|
+\Description
+ \TODO
+\fi
+
+\Message
+ |`ragged2e' package not loaded, therefore|\\
+ |substituting \raggedright for \RaggedRight.|
+\Description
+ Die Option |justification=|\xx|RaggedRight| ist nur dann voll funktionsfähig,
+ wenn Sie das \package{ragged2e}"=Paket auf Ihrem \TeX"=System installiert haben.
+ Ist dies nicht der Fall, erhalten Sie diese Warnung und |justification=|\xx|RaggedRight|
+ wird im späteren Verlauf des Dokumentes wie |justification=|\xx|raggedright|
+ behandelt werden.
+ \par\See{\Ref{justification}}
+
+\Message
+ |Obsolete option `ignoreLTcapwidth' ignored.|
+\Description
+ Die Option |ignoreLTcapwidth| des \package{caption2}"=Paketes wird nicht von
+ diesem Paket emuliert. In der Regel können Sie aber diese Option ohne Nebeneffekte
+ einfach entfernen.
+ \par\See{\Ref{caption2} und \Ref{longtable}}
+
+\Message
+ |`ragged2e' support has been changed. Rerun to get|\\
+ |captions right.|
+\Description
+ Das \package{ragged2e} wird nur dann vom \package{caption}"=Paket geladen,
+ wenn es tatsächlich benötigt wird.
+ Um dies zu gewährleisten, sind zwei \LaTeX"=Läufe notwendig, daher können Sie
+ beim ersten Durchlauf diese Warnung bekommen.
+ Im nächsten \LaTeX"=Lauf sollte also diese Warnung verschwunden sein.
+ \par\See{\Ref{justification}}
+
+\Message
+ |Reference on page |\meta{page no.}| undefined.|
+\Description
+ Ist ein zweiseitiges Dokumentenlayout gewählt, benötigt \thispackage\ zwei
+ \LaTeX"=Läufe, um die Ränder richtig zuordnen zu können;
+ daher können Sie beim ersten Durchlauf diese Warnung bekommen.
+ Im nächsten \LaTeX"=Lauf sollte also diese Warnung verschwunden sein.
+ \par\See{\Ref{margins}}
+
+\Message
+ |The option `hypcap=true' will be ignored for this|\\
+ |particular \caption.|
+\Description
+ \Thispackage\ hat keinen geeigneten Hyperlink"=Anker für diese Beschriftung
+ gefunden, daher hat es entschlossen, die Einstellung |hypcap=true| (die per
+ Standard gesetzt ist) zu ignorieren.
+ Als Folge werden Hyperlinks zu dieser Abbildung oder Tabelle (etwa über das
+ Abbildungsverzeichnis, oder selber mit |\ref| oder |\autoref| angelegt)
+ nicht auf den Beginn der Abbildung oder Tabelle verweisen, sondern stattdessen
+ auf deren Beschriftung.\par
+ Dies kann z.B.~passieren, wenn eine Beschriftung mittels |\captionof| innerhalb
+ einer nicht-gleitenden Umgebung gesetzt wird, aber auch, wenn ein Sie ein Paket
+ in Ihrem Dokument verwenden, welches die Umgebungen |figure| oder |table|
+ umdefiniert hat, dieses Paket aber dem \package{caption}"=Paket unbekannt
+ ist.\par
+ Ist dies für Sie ok, aber die Warnung stört Sie, können Sie sie
+ |\captionsetup{|\xx|hypcap=|\xx|false}| direkt vor dem betroffenen |\caption|
+ oder |\captionof| Befehl platzieren.
+ Ist dies hingegen nicht für Sie ok, können Sie versuchen, selber an geeigneter
+ Stelle einen Hyperlink"=Anker mit |\captionsetup{|\xx|type=|\xx\meta{Typ}|}|
+ zu setzen.
+ \par\See{\Ref{hyperref}}
+
+\Message
+ |Unsupported document class (or package) detected,|\\
+ |usage of the caption package is *not* recommended.|
+\Description
+ Entweder ist die verwendete Dokumentenklasse dem \package{caption}"=Paket
+ unbekannt, oder aber Sie haben ein Paket in Ihrem Dokument eingebunden,
+ welches ebenfalls das interne Makro |\@makecaption| (was für das Setzen
+ der Abbildungs- und Tabellenbeschriftungen zuständig ist) umdefiniert.
+ Wie-auch-immer, \thispackage\ wird entweder das Design der Beschriftungen
+ in einer ungewollten Art \& Weise verändern, oder aber es wird zu keinem
+ geordneten Verhalten und/oder Fehlermeldungen kommen. Deswegen wird in
+ diesem Falle die Verwendung des \package{caption}"=Paketes nicht empfohlen.
+ \par\See{\Ref{classes}}
+
+\Message
+ |Unused \captionsetup[|\meta{type}|].|
+\Description
+ Es wurden Optionen mit |\captionsetup[|\meta{Typ}|]| definiert, die im Laufe
+ des Dokumentes aber nicht zur Anwendung gekommen sind.
+ Dies kann zum einen an einem Schreibfehler im Argument \meta{Typ} liegen,
+ aber auch daran, daß ein dem \package{caption}"=Paket unbekanntes Paket
+ die Umgebungen |figure| und/oder |table| umdefiniert hat, oder auch einfach,
+ weil Sie die angegebene Umgebung gar nicht im späteren Verlauf Ihres Dokumentes
+ verwenden.\par
+ Möchten Sie diese Warnung unterdrücken, so verwenden Sie hierzu
+ |\caption|\x|setup*| anstelle von |\caption|\x|setup|.
+ \par\See{\Ref{commands}}
+
+\Message
+ |Usage of the |\meta{package}| package together with the|\\
+ |caption package is strongly *not* recommended.|\\
+ |Instead of loading the |\meta{package}| package you should|\\
+ |use the caption package option `tableposition=top'.|
+\Description
+ Das angegebene Paket mischt sich ebenfalls in die Verwendung der Abstände
+ über- und unterhalb der Beschriftungen ein. Viele Köche verderben den Brei,
+ also ist es ratsam, sich für eines der Pakete -- das angegebene oder
+ \thispackage\ -- zu entscheiden, um falsche Abstände zu vermeiden.
+ \par\See{\Ref{skips}}
+
+\Message
+ |Wrong TeX mode, no hyper anchor was set.|
+\Description
+% \Thispackage\ kann nur im sog.~vertikalen Modus von \TeX\ Hyperlink"=Anker
+% setzen.\par
+ Diese Warnung sollten Sie niemals sehen; entweder verwenden Sie ein Paket,
+ welches |figure| und/oder |table| in einer dem \package{caption}"=Paket
+ unbekannten Art \& Weise verändert, oder aber es ist ein Bug im
+ \package{caption}"=Paket.
+ Bitte senden Sie mir einen Fehlerbericht diesbezüglich per E-Mail. Danke!
+
+\end{Warnings}
+
+\pagebreak[4]
+\subsection{Fehlermeldungen}
+
+\begin{Warnings}
+
+\Message
+ |! Argument of \@caption has an extra }.|
+\Description
+ Beim Setzen von Beschriftungen, die etwas spezielles wie z.B.~eine
+ Tabelle enthält, ist zu beachten, daß immer ein alternativer Listeneintrag
+ als optionales Argument bei |\caption| bzw. |\captionof| mit angegeben
+ werden muß, auch wenn Ihr Dokument gar kein Abbildungs- oder
+ Tabellenverzeichnis beeinhaltet.
+ \par\See{\Ref{commands}, \Ref{listof}, and \Ref{hyperref}\,}
+
+\Message
+ |\caption outside float.|
+\Description
+ |\caption| ist (in der Regel) nur für die Anwendung in gleitenden
+ Umgebungen wie |figure| oder |table|, oder für die Anwendung innerhalb
+ |longtable| konzipiert, ansonsten bekommen Sie obenstehende Fehlermeldung.\par
+ Um eine Beschriftung innerhalb einer anderen Umgebung zu setzen, verwenden Sie
+ bitte entweder die Kombination |\captionsetup{|\xx|type=|\xx\meta{type}|}| $+$
+ |\caption|, oder aber |\captionof|.
+ \par\See{\Ref{commands}}
+
+\Message
+ |\caption outside group or environment.|
+\Description
+ |\caption| bzw. |\captionof| sind nur für die Anwendung innerhalb einer
+ Box, Gruppe oder Umgebung konzipiert.
+ \par\See{\Ref{commands}}
+
+\Message
+ |\captionsetup{type=|\meta{type}|} outside group or environment.|
+\Description
+ |\captionof| bzw. |\captionsetup{|\xx|type=|\xx\meta{type}|}| sind nur
+ für die Anwendung innerhalb einer Box, Gruppe oder Umgebung konzipiert.
+ \par\See{\Ref{commands}}
+
+\Message
+ |\ContinuedFloat outside float.|
+\Description
+ |\ContinuedFloat| ist nur für die Anwendung innerhalb einer gleitenden
+ Umgebung wie |figure| oder |table| konzipiert. %oder auch |longtable|
+ Für die Anwendung in einer Box, Gruppe oder nicht-gleitenden Umgebung
+ bietet sich die Kombination
+ |\captionsetup{|\xx|type=|\xx\meta{Typ}|}| $+$ |\ContinuedFloat| an.\par
+ |\ContinuedFloat| innerhalb einer |longtable| funktioniert zwar (noch)
+ nicht, aber vielleicht ist die |longtable*| Umgebung, die eine longtable
+ ohne Erhöhung des Tabellenzählers setzt, für Sie hilfreich.
+ \par\See{\Ref{commands} und \Ref{longtable}}
+
+\Message
+ |Continued `|\meta{type}|' after `|\meta{type}|'.|
+\Description
+ Z.Z.~ dürfen fortlaufende Abbildungen oder Tabellen nicht von anderen gleitenden
+ Umgebungen oder einer |longtable| unterbrochen werden, so ist z.B.~ eine Tabelle
+ zwischen einer Abbildung und einer (mit |\ContinuedFloat|) fortgesetzten Abbildung
+ nicht möglich.
+ \par\See{\Ref{ContinuedFloat}}
+
+\Message
+ |For a successful cooperation of the `wrapfig' package|\\
+ |with the `float' package you should load the `wrapfig'|\\
+ |package *(right) after* the `float' package.|
+\Description
+ Achten Sie bei der gleichzeitigen Verwendung der Pakete \package{wrapfig}
+ und \package{float} unbedingt auf die richtige Ladereihenfolge und
+ Anwendung.
+ \par\See{\Ref{wrapfig}}
+
+\Message
+ |For a successful cooperation of the `wrapfig' package|\\
+ |with the `float' package you should use at least|\\
+ |`wrapfig' version 3.6.|
+\Description
+ Für die gleichzeitige Verwendung der Pakete \package{wrapfig} und
+ \package{float} wird die Version $3.6$ des \package{wrapfig}"=Paketes
+ benötigt.
+ \par\See{\Ref{wrapfig}}
+
+\Message
+ |For a successful cooperation we need at least version|\\
+ |`|\meta{date}|' of package |\meta{package}|, but only version|\\
+ |`|\meta{old-date}|' is available.|
+\Description
+ Das aktuelle \package{caption}"=Paket kann nicht mit einem solchen,
+ veralteten Paket zusammen betrieben werden.
+ Bitte aktualisieren Sie das betroffene Paket, zumindest auf die
+ benötigte Version.
+
+\Message
+ |Internal error: |\meta{internal-error-message}|.|
+\Description
+ Diesen Fehler sollten Sie niemals sehen. Wenn doch, senden Sie mir bitte
+ einen Fehlerbericht per E-Mail.
+
+\Message
+ |Not allowed in longtable* environment.|
+\Description
+ Der Befehl |\caption| ist nicht immerhalb einer |longtable*| Umgebung
+ erlaubt. Verwenden sie entweder |\caption*| für eine Beschriftung ohne
+ Bezeichner oder benutzen Sie die reguläre |longtable| Umgebung.
+
+\Message
+ |Not available in compatibility mode.|
+\Description
+ Das angeforderte Feature steht im sog.~Kompatibilitätsmodus nicht zur
+ Verfügung, d.h.~\thispackage\ hat eine inkompatible Dokumentenklasse oder
+ ein inkompatibles Paket entdeckt, welches ebenfalls |\caption| erweitert
+ und damit die Anwendung dieses Features bzw.~Befehls verhindert.
+ \par\See{\Ref{compatibility}}
+
+\Message
+ |Runaway argument?|\\
+ |! Paragraph ended before \caption@makecurrent was complete.|
+\Description
+ Beim Setzen von Beschriftungen, die mehr als aus einem Absatz bestehen,
+ ist zu beachten, daß immer ein alternativer Listeneintrag als optionales
+ Argument bei |\caption| bzw. |\captionof| mit angegeben werden muß,
+ auch wenn Ihr Dokument gar kein Abbildungs- oder Tabellenverzeichnis
+ beeinhaltet.
+ \par\See{\Ref{commands}, \Ref{listof}, and \Ref{hyperref}\,}
+
+\Message
+ |Something is going wrong here...|\\
+ |For a removal of this problem please consult the|\\
+ |caption package documentation, especially the sections|\\
+ |about the `float' and the `wrapfig' package.|
+\Description
+ Achten Sie bei der gleichzeitigen Verwendung der Pakete \package{wrapfig}
+ und \package{float} unbedingt auf die richtige Ladereihenfolge und
+ Anwendung. Aber vielleicht hat auch ein anderes Paket das
+ \package{float}"=Paket in einer für \thispackage\ inkompatiblen
+ Art \& Weise erweitert!?
+ \par\See{\Ref{float} und \Ref{wrapfig}}
+
+\iffalse
+\Message
+ |Something's wrong--perhaps a missing \caption|\\
+ |in the last figure or table.|
+\Description
+ It seems that you have used a |\subcaption| command without a
+ corresponding |\caption| command. This is not supported.
+\fi
+
+\Message
+ |The package option `caption=false' is obsolete.|\\
+ |Please pass this option to the subfig package instead|\\
+ |and do *not* load the caption package anymore.|
+\Description
+ Sie haben die Option |caption=false| angegeben. Diese war früher mal eine
+ Krücke, um nicht das komplette \package{caption}"=Paket zu laden, sondern
+ nur den für das \package{subfig}"=Paket zwingend benötigten Teil.
+ Dieser Mechanismus ist veraltet und wird nicht mehr angeboten; stattdessen
+ sollten sie diese Option dem \package{subfig}"=Paket übergeben und
+ \thispackage\ nicht mehr explizit laden.
+ \par\See{Dokumentation des \package{subfig}"=Paketes\cite{subfig}}
+
+\Message
+ |Undefined boolean value `|\meta{value}|'.|
+\Description
+ Es wurde versucht, eine boolische Option (wie z.B.~|singlelinecheck=| oder
+ |hypcap=|) auf einen unbekannten Wert zu setzen. Nur die Werte |false|, |no|,
+ |off|, |0| bzw.~|true|, |yes|, |on| und |1| sind hier möglich.
+
+\Message
+ |Undefined format `|\meta{name}|'.|
+\Description
+ Es wurde versucht, ein Beschriftungsformat auszuwählen, welches nicht
+ definiert ist. Vielleicht ein Schreibfehler!?
+ \par\See{\Ref{formats}}
+
+\Message
+ |Undefined label format `|\meta{name}|'.|
+\Description
+ Es wurde versucht, ein Bezeichnungsformat auszuwählen, welches nicht
+ definiert ist. Vielleicht ein Schreibfehler!?
+ \par\See{\Ref{formats}}
+
+\Message
+ |Undefined label separator `|\meta{name}|'.|
+\Description
+ Es wurde versucht, ein Beschriftungstrenner auszuwählen, welcher nicht
+ definiert ist. Vielleicht ein Schreibfehler!?
+ \par\See{\Ref{formats}}
+
+\Message
+ |Undefined list-of format `|\meta{name}|'.|
+\Description
+ Es wurde versucht, ein Listenformat auszuwählen, welches nicht
+ definiert ist. Vielleicht ein Schreibfehler!?
+ \par\See{\Ref{listof}}
+
+\Message
+ |Undefined position `|\meta{name}|'.|
+\Description
+ Es wurde versucht, den Positionshinweis auf einen unbekannten Wert zu
+ setzen. Vielleicht ein Schreibfehler!?
+ \par\See{\Ref{skips}}
+
+\Message
+ |Undefined style `|\meta{name}|'.|
+\Description
+ Es wurde versucht, ein Beschriftungsstil auszuwählen, welcher nicht
+ definiert ist. Vielleicht ein Schreibfehler!?
+ \par\See{\Ref{style}}
+
+\Message
+ |Undefined text format `|\meta{name}|'.|
+\Description
+ Es wurde versucht, ein Textformat auszuwählen, welches nicht
+ definiert ist. Vielleicht ein Schreibfehler!?
+ \par\See{\Ref{formats}}
+
+\Message
+ |You can't use both, the (obsolete) caption2 *and*|\\
+ |the (current) caption package.|
+\Description
+ Die Pakete \package{caption} und \package{caption2} können nicht
+ innerhalb eines Dokumentes gleichzeitig verwendet werden.
+ Verwenden Sie bitte nur das aktuelle \package{caption}"=Paket.
+ \par\See{\Ref{caption2}}
+
+\Message
+ |You can't use the caption package option|\\
+ | `tableposition=|\meta{position}|'|\\
+ |and use the |\meta{package}| package, too.|\\
+ {\color{black}\hspace{1.5em}-or-}\\
+ |You can't use the global option|\\
+ | `tablecaptionabove'|\\
+ |and use the |\meta{package}| package, too.|
+\Description
+% (ftcap,nonfloat,topcapt)
+ Das angegebene Paket mischt sich ebenfalls in die Verwendung der Abstände
+ über- und unterhalb der Beschriftungen ein.
+ Sie müssen sich daher für eines der Pakete -- das angegebene oder
+ \thispackage\ -- zu entscheiden, um falsche Abstände zu verhindern.
+ \par\See{\Ref{skips}}
+
+\end{Warnings}
+
+% --------------------------------------------------------------------------- %
+
+\pagebreak[4]
+\section{Weiterf"uhrende Dokumente}
+
+Folgende, im Internet verfügbare Dokumente m"ochte ich an dieser Stelle
+jedem ans Herz legen:
+
+\begin{itemize}
+\item
+ Die \TeX\ FAQ -- "`Frequently Asked Questions"' über \TeX\ und \LaTeX:
+ \begin{quote}\url{http://faq.tug.org/}\end{quote}
+
+\iffalse
+\item
+ Die DANTE-FAQ -- Oft gestellte Fragen \& deren Antworten:
+ \begin{quote}\url{http://www.dante.de/faq/de-tex-faq/}\end{quote}
+\fi
+
+\item
+ \emph{"`Hilfe für LaTeX-Einsteiger"'} von Christian Faulhammer:
+ \begin{quote}\url{http://www.minimalbeispiel.de/}\end{quote}
+
+\item
+ \emph{"`Gleitobjekte -- die richtige Schmierung"'} von Axel Reichert
+ erl"autert den Umgang mit gleitenden Umgebungen und ist hier im Netz
+ zu finden:
+ \begin{quote}
+ \url{ftp://dante.ctan.org/pub/tex/info/german/gleitobjekte/}
+ \end{quote}
+
+\item
+ \emph{"`Bilder einfügen in \LaTeX: Ein How-To"'} von Dominik Bischoff
+ beinhaltet die häufigsten Fragen und Antworten, die im Zusammenhang
+ mit \LaTeX\ und Abbildungen auftreten:
+ \begin{quote}
+ \url{http://tug.ctan.org/info/l2picfaq/german/l2picfaq.pdf}
+ \end{quote}
+
+\item
+ \textsf{epslatex} von Keith Reckdahl enth"alt viele n"utzliche Tips im
+ Zusammenhang mit der Einbindung von Graphiken in \LaTeXe.
+ Das Dokument ist in Englisch und unter
+ \begin{quote}\url{ftp://dante.ctan.org/pub/tex/info/epslatex/}\end{quote}
+ zu finden.
+\end{itemize}
+
+% --------------------------------------------------------------------------- %
+
+\pagebreak[2]
+\section{Danksagungen}
+
+Von ganzem Herzen danke ich Katja Melzner,
+Steven D. Cochran, Frank Mittelbach, Olga Lapko,
+David Carlisle, Carsten Heinz und Keith Reckdahl.
+
+Weiterhin m"ochte ich mich herzlich bei
+Harald Harders,
+Peter L\"offler,
+Peng Yu,
+Alexander Zimmermann,
+Matthias Pospiech,
+J\"urgen Wieferink,
+Christoph Bartoschek,
+Uwe St\"ohr,
+Ralf Stubner,
+Geoff Vallis,
+Florian Keiler,
+J"urgen G"obel,
+Uwe Siart,
+Sang-Heon Shim,
+Henrik Lundell,
+David Byers,
+William Asquith
+und
+Prof.~Dr.~Dirk Hoffmann
+f"ur ihre Hilfe beim stetigen Verbessern dieses Paketes bedanken.
+
+% --------------------------------------------------------------------------- %
+
+\pagebreak[4]
+\begin{thebibliography}{99}
+ \bibitem{TLC2}
+ Frank Mittelbach and Michel Goossens:\\
+ \newblock {\em Der {\LaTeX} Begleiter (2.\,Auflage)},\\
+ \newblock Addison-Wesley, 2004.
+
+ \bibitem{beamer}
+ Till Tantau:\\
+ \href{ftp://dante.ctan.org/tex-archive/macros/latex/contrib/beamer/doc/beameruserguide.pdf}%
+ {\emph{User Guide to the Beamer Class, Version 3.07}},\\
+ March 11, 2007
+
+ \bibitem{KOMAScript}
+ Markus Kohm \& Jens-Uwe-Morawski:\\
+ \href{ftp://dante.ctan.org/tex-archive/macros/latex/contrib/koma-script/scrguide.pdf}%
+ {\emph{KOMA-Script -- ein wandelbares \LaTeXe-Paket}},\\
+ 2007-03-02
+
+ \bibitem{NTG}
+ Victor Eijkhout:\\
+ \href{ftp://dante.ctan.org/tex-archive/macros/latex/contrib/ntgclass/classdoc.pdf}%
+ {\emph{An introduction to the Dutch \LaTeX\ document classes}},\\
+ 3 September 1989
+
+ \bibitem{float}
+ Anselm Lingnau:\\
+ \href{ftp://dante.ctan.org/tex-archive/macros/latex/contrib/float/float.pdf}%
+ {\emph{An Improved Environment for Floats}},\\
+ 2001/11/08
+
+ \bibitem{floatflt}
+ Mats Dahlgren:\\
+ \href{ftp://dante.ctan.org/tex-archive/macros/latex/contrib/floatflt/floatflt.pdf}%
+ {\emph{Welcome to the floatflt package}},\\
+ 1998/06/05
+
+ \bibitem{floatrow}
+ Olga Lapko:\\
+ \href{ftp://dante.ctan.org/tex-archive/macros/latex/contrib/floatrow/floatrow.pdf}%
+ {\emph{The floatrow package documentation}},\\
+ 2006/07/24
+
+ \bibitem{fltpage}
+ Sebastian Gross:\\
+ \href{ftp://dante.ctan.org/tex-archive/macros/latex/contrib/fltpage/fltpage.pdf}%
+ {\emph{Welcome to the beta test of fltpage package!}},\\
+ 1998/11/13
+
+ \bibitem{hyperref}
+ Sebastian Rahtz \& Heiko Oberdiek:\\
+ \href{ftp://dante.ctan.org/tex-archive/macros/latex/contrib/hyperref/hyperref.pdf}%
+ {\emph{Hypertext marks in \LaTeX}},\\
+ June 14, 2007
+
+ \bibitem{hypcap}
+ Heiko Oberdiek:\\
+ \href{ftp://dante.ctan.org/tex-archive/macros/latex/contrib/oberdiek/hypcap.pdf}%
+ {\emph{The hypcap package -- Adjusting anchors of captions}},\\
+ 2007/04/09
+
+ \bibitem{listings}
+ Carsten Heinz \& Brooks Moses:\\
+ \href{ftp://dante.ctan.org/tex-archive/macros/latex/contrib/listings/listings.pdf}%
+ {\emph{The Listings Package}},\\
+ 2007/02/22
+
+ \bibitem{longtable}
+ David Carlisle:\\
+ \href{ftp://dante.ctan.org/tex-archive/macros/latex/required/tools/longtable.pdf}%
+ {\emph{The longtable package}},\\
+ 2004/02/01
+
+ \bibitem{picinpar}
+ Friedhelm Sowa:\\
+ \href{ftp://dante.ctan.org/tex-archive/macros/latex209/contrib/picinpar/}%
+ {\emph{Pictures in Paragraphs}},\\
+ July 13, 1993
+
+ \bibitem{picins}
+ Joachim Bleser and Edmund Lang:\\
+ \href{ftp://dante.ctan.org/tex-archive/macros/latex209/contrib/picins/mpic.dvi}%
+ {\emph{PicIns-Benutzerhandbuch Version 3.0}},\\
+ September~1992
+
+ \bibitem{rotating}
+ Sebastian Rahtz and Leonor Barroca:\\
+ \href{ftp://dante.ctan.org/tex-archive/macros/latex/contrib/rotating/}%
+ {\emph{A style option for rotated objects in \LaTeX}},\\
+ 1997/09/26
+
+ \bibitem{sidecap}
+ Rolf Niepraschk \& Hubert G\"a\ss lein:\\
+ \href{ftp://dante.ctan.org/tex-archive/macros/latex/contrib/sidecap/sidecap.pdf}%
+ {\emph{The sidecap package}},\\
+ 2003/06/06
+
+ \bibitem{subfigure}
+ Steven D. Cochran:\\
+ \href{ftp://dante.ctan.org/tex-archive/macros/latex/contrib/subfigure/subfigure.pdf}%
+ {\emph{The subfigure package}},\\
+ 2002/07/02
+
+ \bibitem{subfig}
+ Steven D. Cochran:\\
+ \href{ftp://dante.ctan.org/tex-archive/macros/latex/contrib/subfig/subfig.pdf}%
+ {\emph{The subfig package}},\\
+ 2005/07/05
+
+ \bibitem{supertabular}
+ Johannes Braams and Theo Jurriens:\\
+ \href{ftp://dante.ctan.org/tex-archive/macros/latex/contrib/supertabular/supertabular.pdf}%
+ {\emph{The supertabular environment}},\\
+ 2002/07/19
+
+ \bibitem{threeparttable}
+ Donald Arseneau:\\
+ \href{ftp://dante.ctan.org/tex-archive/macros/latex/contrib/misc/threeparttable.sty}%
+ {\emph{Three part tables: title, tabular environment, notes}},\\
+ 2003/06/13
+
+ \bibitem{wrapfig}
+ Donald Arseneau:\\
+ \href{ftp://dante.ctan.org/tex-archive/macros/latex/contrib/wrapfig/wrapfig.sty}%
+ {\emph{WRAPFIG.STY ver 3.6}},\\
+ 2003/01/31
+\end{thebibliography}
+
+% --------------------------------------------------------------------------- %
+
+\end{document}
diff --git a/Master/texmf-dist/doc/latex/caption/caption-eng.pdf b/Master/texmf-dist/doc/latex/caption/caption-eng.pdf
new file mode 100644
index 00000000000..04b1557a86b
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/caption/caption-eng.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/caption/caption-eng.tex b/Master/texmf-dist/doc/latex/caption/caption-eng.tex
new file mode 100644
index 00000000000..ca513786f49
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/caption/caption-eng.tex
@@ -0,0 +1,2645 @@
+%
+% This is file `caption-eng.tex'.
+%
+% Copyright (C) 1994-2007 Axel Sommerfeldt (caption@sommerfee.de)
+%
+% --------------------------------------------------------------------------
+%
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2003/12/01 or later.
+%
+% This work has the LPPL maintenance status "maintained".
+%
+% This Current Maintainer of this work is Axel Sommerfeldt.
+%
+% This work consists of the files caption.ins, caption.dtx, caption2.dtx,
+% and ltcaption.dtx, the derived files caption.sty, caption2.sty,
+% caption3.sty, and ltcaption.sty, and the user manuals caption-deu.tex,
+% caption-eng.tex, and caption-rus.tex.
+%
+\NeedsTeXFormat{LaTeX2e}[1994/12/01]
+\ProvidesFile{caption-eng.tex}[2007/09/03 v3.1 The caption package]
+\hbadness=9999 \newcount\hbadness \hfuzz=20pt % Make TeX shut up.
+%\errorcontextlines=3
+
+\documentclass{ltxdoc}
+\setlength\parindent{0pt}
+\setlength\parskip{\smallskipamount}
+
+\ifx\pdfoutput\undefined\else
+ \ifcase\pdfoutput\else
+ \usepackage{mathptmx,courier}
+ \usepackage[scaled=0.90]{helvet}
+ \addtolength\marginparwidth{15pt}
+ \fi
+\fi
+
+\usepackage[USenglish]{babel}
+\usepackage{longtable,setspace}
+
+\usepackage{hypdoc}
+\hypersetup{pdfkeywords={LaTeX, package, caption},pdfstartview={}}
+\usepackage[listof=0,hypcap=false]{caption}[2007/09/01]
+
+\DeclareRobustCommand*\eTeX{\texorpdfstring
+ {\leavevmode\hbox{$\varepsilon$}-\TeX}%
+ {e-TeX}}
+\DeclareRobustCommand*\AmS{\texorpdfstring
+ {{\protect\usefont{OMS}{cmsy}{m}{n}A\kern-.1667em\lower.5ex\hbox{M}\kern-.125emS}}%
+ {AMS}}
+\DeclareRobustCommand*\KOMAScript{\texorpdfstring
+ {\textsf{K\kern.05em O\kern.05em M\kern.05em A\kern.1em-\kern.1em Script}}%
+ {KOMA-Script}}
+\DeclareRobustCommand*\NTG{NTG}
+\DeclareRobustCommand*\SmF{SMF}
+
+\newcommand\NEW[2]{\hskip 1sp \marginpar{\footnotesize\sffamily\raggedleft#1\\#2}}
+
+\usepackage{marvosym}
+\makeatletter
+\newcommand*\INFO{\@ifstar{\@INFO{}}{\@INFO{\vbox to \ht\strutbox}}}
+\newcommand*\@INFO[1]{\MARGINSYM{#1{\Huge\Info}}}
+\makeatother
+\font\manual=manfnt
+\newcommand*\DANGER{\MARGINSYM{\manual\char127}}
+\newcommand*\MARGINSYM[1]{\hskip 1sp \marginpar{\raggedleft\textcolor{blue}{{#1}}}}
+
+\DeclareCaptionFormat{myformat1}{#1#2\\#3}
+\newlength\myindention
+\DeclareCaptionFormat{myformat2}{#1#2\\\hspace*\myindention#3}
+\DeclareCaptionOption{myindention}{\setlength\myindention{#1}}
+\DeclareCaptionFormat{reverse}{#3#2#1}
+\DeclareCaptionFormat{llap}{\llap{#1#2}#3\par}
+\DeclareCaptionLabelFormat{fullparens}{(\bothIfFirst{#1}{~}#2)}
+\DeclareCaptionLabelSeparator{fill}{\hfill}
+
+\newcommand*\purerm[1]{{\upshape\mdseries\rmfamily #1}}
+\newcommand*\puresf[1]{{\upshape\mdseries\sffamily #1}}
+\newcommand*\purett[1]{{\upshape\mdseries\ttfamily #1}}
+\let\package\puresf
+\let\env\purett \let\opt\purett
+
+\newcommand*\csmarg[1]{\texttt{\char`\{#1\char`\}}}
+\newcommand*\csoarg[1]{\texttt{\char`\[#1\char`\]}}
+\newcommand*\version[2][]{$v#2$}
+\newcommand*\x{\discretionary{-}{}{}}
+\newcommand*\xx{\discretionary{}{}{}}
+
+\newenvironment{Options}[1]%
+ {\list{}{\renewcommand{\makelabel}[1]{\texttt{##1}\hfil}%
+ \settowidth{\labelwidth}{\texttt{#1\space}}%
+ \setlength{\leftmargin}{\labelwidth}%
+ \addtolength{\leftmargin}{\labelsep}}}%
+ {\endlist}
+
+\newenvironment{Example}%
+ {\ifvmode\else\unskip\par\fi
+ \minipage{\linewidth}\smallskip}%
+ {\smallskip\endminipage}
+
+\makeatletter
+\newcommand\example{\@ifstar
+ {\@example{belowskip=\abovecaptionskip}}%
+ {\@example{}}}
+\def\@example#1{%
+ \@testopt{\@@example{#1}}{figure}}
+\long\def\@@example#1[#2]#3#4{%
+ \begingroup
+ \captionsetup{#1,size=small,margin={\leftmargini,10pt},#3}%
+ \captionof{#2}[]{#4}%
+ \endgroup}
+\makeatother
+
+\begin{document}
+\let\subsectionautorefname\sectionautorefname
+\let\subsubsectionautorefname\sectionautorefname
+
+\def\thispackage{the \package{caption} package}
+\def\Thispackage{The \package{caption} package}
+
+\newcommand\NEWfeature{\NEW{New feature}}
+\newcommand\NEWdescription{\NEW{New description}}
+
+\makeatletter
+\newcommand*\Ref{\@ifstar{\@Ref\ref}{\@Ref\autoref}}
+\newcommand*\@Ref[2]{#1{#2}: \textit{\nameref{#2}}}
+\makeatother
+\newcommand*\See[1]{\nopagebreak{\small (See #1)}}
+\newcommand*\SeeUserDefined[1][]{\See{\Ref{declare}#1}}
+
+\def\TODO{\emph{-- Some information is missing here --}}
+
+% --------------------------------------------------------------------------- %
+
+\GetFileInfo{caption-eng.tex}
+\let\docdate\filedate
+\GetFileInfo{caption.sty}
+
+\title{Typesetting captions with the caption package\texorpdfstring{\thanks{%
+ This package has version number \fileversion,
+ last revised \filedate.}}{}}
+\author{Axel Sommerfeldt\\
+ \href{mailto:caption@sommerfee.de}{\texttt{caption@sommerfee.de}}}
+\date{\docdate}
+\maketitle
+
+% --------------------------------------------------------------------------- %
+
+\begin{abstract}
+\Thispackage\ 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 with Steven D. Cochran and Frank Mittelbach has lead to
+the enhanced version $3.0$.}
+\end{abstract}
+
+\newcommand\exampletext{%
+ White sand beaches. The pink smoothness of the conch shell. A sea abundant
+ with possibilities. Duty-free shops filled with Europe's finest gifts and
+ perfumes. Play your favorite game of golf amidst the tropical greens on one
+ of the many championship courses.}
+
+% --------------------------------------------------------------------------- %
+
+\section*{Introduction}
+
+Within the standard \LaTeX\ classes captions haven't received the attention
+they deserve. Simply typeset as an ordinary paragraph there is no
+remarkable visual difference from the rest of the text, like here:
+
+\example*{size=normalsize,margin=0pt}{\exampletext}
+
+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*{size=small,margin=10pt,labelfont=bf,labelsep=endash}{\exampletext}
+
+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.
+
+% --------------------------------------------------------------------------- %
+
+\section*{Preliminary documentation}
+
+Please note that this document is not describing all features of \thispackage\ yet.
+It'll try to update it every month; the actual version can be found
+\href{ftp://tug.ctan.org/tex-archive/macros/latex/contrib/caption/caption-eng.pdf}%
+{here}.\par\bigskip
+
+% --------------------------------------------------------------------------- %
+
+\clearpage
+\tableofcontents
+
+% --------------------------------------------------------------------------- %
+
+\clearpage
+\section{Using this package}
+\label{usage}
+
+\DescribeMacro{\usepackage}
+Insert
+\begin{quote}
+ |\usepackage|\oarg{options}|{caption}[|\texttt{\filedate}|]|
+\end{quote}
+into the preamble of your document, i.e.~the part of your document
+between |\documentclass| and |\begin{document}|.
+The options control how your captions will look like; e.g.,
+\begin{quote}
+ |\usepackage[margin=10pt,font=small,labelfont=bf,|\\
+ | labelsep=endash]{caption}|%
+ %|[|\texttt{\filedate}|]|
+\end{quote}
+would result in captions looking like the second one in the introduction.
+
+\DescribeMacro{\captionsetup}
+For a later change of options \thispackage\ provides the command
+\begin{quote}
+ |\captionsetup|\oarg{float type}\marg{options}
+\end{quote}
+So
+\begin{quote}
+ |\usepackage[margin=10pt,font=small,labelfont=bf]{caption}|
+\end{quote}
+and
+\begin{quote}
+ |\usepackage{caption}|\\
+ |\captionsetup{margin=10pt,font=small,labelfont=bf}|
+\end{quote}
+are equal in their results.
+
+It's good to know that |\captionsetup| has an effect on the current
+environment only. So if you want to change settings for the
+current |figure| or |table| only, just place the |\captionsetup| command
+inside the |figure| or |table| right before the |\caption| command.
+For example
+\begin{quote}
+ |\begin{figure}|\\
+ | |\ldots\\
+ | \captionsetup{singlelinecheck=off}|\\
+ | \caption{|\ldots|}|\\
+ |\end{figure}|
+\end{quote}
+switches the single-line-check off, but only for this |figure| so all
+the other captions remain untouched.
+
+(For a description of the optional parameter \meta{float type} see
+ \Ref{commands}.)
+
+% --------------------------------------------------------------------------- %
+
+\pagebreak[4]
+\section{Options}
+\label{options}
+
+\def\OptionLabel{RaggedRight}
+\def\UserDefined{\ldots}
+
+% --------------------------------------------------------------------------- %
+
+\subsection{Formatting}
+\label{formats}
+
+\DescribeMacro{format=}
+A figure or table caption mainly consits of three parts: the caption label,
+which says if this object is a `Figure' or `Table' and what number is
+associated with it, the caption text itself, which is normally a short
+description of contents, and the caption separator which separates the text
+from the label.
+
+The \textit{caption format} determines how this information will be presented;
+it is specified with the option
+\begin{quote}
+ |format=|\meta{format name}\quad ,
+\end{quote}
+having the name of the caption format as its argument.
+
+There are two standard caption formats:
+%\footnote{You have the option to
+%define your own ones, too. See section \ref{declare}:
+%\textit{``Do it yourself!''} for details.}
+
+\begin{Options}{\OptionLabel}
+ \item[plain]%\NEWdescription{v3.0h}
+ Typesets the captions as a normal paragraph.
+
+ \item[hang]
+ Indents the caption text, so it will `hang' under the first line of the text.
+
+ \item[\UserDefined]
+ Own formats can be defined using |\DeclareCaptionFormat|.\\
+ \SeeUserDefined
+\end{Options}
+
+\begin{Example}
+ An example: Specifying the option
+ \begin{quote}
+ |format=hang|
+ \end{quote}
+ yields captions like this:
+ \example{format=hang}{\exampletext}
+\end{Example}
+
+\DescribeMacro{indention=}
+For both formats (\texttt{plain} and \texttt{hang}) you can setup an extra
+indention starting at the second line of the caption. You do this with the
+option
+\begin{quote}
+ |indention=|\meta{amount}.
+\end{quote}
+
+Two examples:
+
+\begin{Example}
+ \begin{quote}
+ |format=plain,indention=.5cm|
+ \end{quote}
+ \captionsetup{aboveskip=0pt}
+ \example{format=plain,indention=.5cm}{\exampletext}
+\end{Example}
+
+\begin{Example}
+ \begin{quote}
+ |format=hang,indention=-0.5cm|
+ \end{quote}
+ \captionsetup{aboveskip=0pt}
+ \example{format=hang,indention=-0.5cm}{\exampletext}
+\end{Example}
+
+\pagebreak[3]
+\DescribeMacro{labelformat=}
+With the option
+\nopagebreak[3]
+\begin{quote}
+ |labelformat=|\meta{label format name}
+\end{quote}
+\nopagebreak[3]
+%\NEWdescription{v3.0e}
+you specify how the caption label will be typeset.
+There are four standard caption label formats:
+
+\begin{Options}{\OptionLabel}
+ \item[default]
+ The caption label will be typeset as specified by the document class,
+ usually this means the name and the number (like \texttt{simple}).
+ (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}.)
+
+ \item[simple]
+ The caption label will be typeset as a name and a number.
+
+ \item[parens]
+ The number of the caption label will be typeset in parentheses.
+
+ \item[\UserDefined]
+ Own label formats can be defined using |\DeclareCaptionLabelFormat|.\\
+ \SeeUserDefined
+\end{Options}
+
+\begin{Example}
+ An example: Using the options
+ \begin{quote}
+ |labelformat=parens,labelsep=quad|
+ \end{quote}
+ gives captions like this one:
+ \example{labelformat=parens,labelsep=quad}{\exampletext}
+\end{Example}
+
+\DescribeMacro{labelsep=}
+With the option
+\begin{quote}
+ |labelsep=|\meta{label separator name}
+\end{quote}
+you specify what caption separator will be used.
+You can choose one of the following:
+
+\begin{Options}{\OptionLabel}
+ \item[none]
+ 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.
+
+ \item[period]
+ The caption label and text will be separated by a period and a space.
+
+ \item[space]
+ The caption label and text will be separated by a single space.
+
+ \item[quad]
+ The caption label and text will be separated by a |\quad|.
+
+ \item[newline]
+ The caption label and text will be separated by a line break (|\\|).
+
+ \item[endash]%\NEWfeature{v3.0h}
+ The caption label and text will be separated by an en-dash,
+ surrounded by spaces (| -- |).
+
+ \item[\UserDefined]
+ Own separators can be defined using |\DeclareCaptionLabelSeparator|.\\
+ \SeeUserDefined
+\end{Options}
+
+Three examples:
+\begin{Example}
+ \begin{quote}
+ |labelsep=period|
+ \end{quote}
+ \captionsetup{aboveskip=0pt}
+ \example{labelsep=period}{\exampletext}
+\end{Example}
+
+\begin{Example}
+ \begin{quote}
+ |labelsep=newline,singlelinecheck=false|
+ \end{quote}
+ \captionsetup{aboveskip=0pt}
+ \example{labelsep=newline,singlelinecheck=false}{\exampletext}
+\end{Example}
+
+\begin{Example}
+ \begin{quote}
+ |labelsep=endash|
+ \end{quote}
+ \captionsetup{aboveskip=0pt}
+ \example{labelsep=endash}{\exampletext}
+\end{Example}
+
+% --------------------------------------------------------------------------- %
+
+\subsection{Justification}
+\label{justification}
+
+\DescribeMacro{justification=}
+As addition to the caption format you could also specify a
+\emph{caption justification}; it is specified with the option
+\begin{quote}
+ |justification=|\meta{justification name}\quad.
+\end{quote}
+
+You can choose one of the following:
+
+\begin{Options}{\OptionLabel}
+ \item[justified]
+ Typesets the caption as a normal paragraph.
+
+ \item[centering]
+ Each line of the caption will be centered.
+
+% \item[Centering]
+% Each line of the caption will be centered, too.
+% But this time the command |\Centering| 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.
+
+ \item[centerlast]
+ The last line of each paragraph of the caption text will be centered.
+
+ \item[centerfirst]
+ Only the first line of the caption will be centered.
+
+ \item[raggedright]
+ Each line of the caption will be moved to the left margin.
+
+\iffalse
+ \item[RaggedRight]
+ Each line of the caption will be moved to the left margin using
+ the command |\RaggedRight| from the \package{ragged2e} package.
+\else
+ \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.\footnote{%
+ The need for the \package{ragged2e} package will be detected at
+ run-time, therefore you maybe need a second \LaTeX\ run if this
+ option is used.}
+ The main difference is that the word breaking algorithm of \TeX\ will
+ work inside captions.
+\fi
+
+ \item[raggedleft]
+ Each line of the caption will be moved to the right margin.
+
+% \item[RaggedLeft]
+% Each line of the caption will be moved to the right margin using
+% the command |\RaggedLeft| from the \package{ragged2e} package.
+
+ \item[\UserDefined]
+ Own justifications can be defined using |\DeclareCaptionJustification|.\\
+ \SeeUserDefined
+\end{Options}
+
+Three examples:
+\begin{Example}
+ \begin{quote}
+ |justification=centerlast|
+ \end{quote}
+ \captionsetup{aboveskip=0pt}
+ \example{justification=centerlast}{\exampletext}
+\end{Example}
+
+\begin{Example}
+ \begin{quote}
+ |format=hang,justification=raggedright|
+ \end{quote}
+ \captionsetup{aboveskip=0pt}
+ \example{format=hang,justification=raggedright}{\exampletext}
+\end{Example}
+
+\begin{Example}
+ \begin{quote}
+ |labelsep=newline,justification=centering|
+ \end{quote}
+ \captionsetup{aboveskip=0pt}
+ \example*{labelsep=newline,justification=centering}{\exampletext}
+\end{Example}
+
+\DescribeMacro{singlelinecheck=}
+The standard \LaTeX\ document classes (|article|, |report|, and |book|)
+automatically center a caption if it fits in one single line:
+
+\example*{}{A short caption.}
+
+\INFO
+\Thispackage\ adapts this behaviour and therefore usually
+ignores the format \& justification you have set with |format=| \&
+|justification=| in such case.
+But you can switch this special treatment of such short captions off
+with the option
+\begin{quote}
+ |singlelinecheck=|\meta{bool}\quad.
+\end{quote}
+Using |false|, |no|, |off| or |0| for \meta{bool} switches the
+extra centering off:
+\begin{quote}
+ |singlelinecheck=false|
+\end{quote}
+Doing so the above short caption would look like
+
+\begingroup
+ \captionsetup{type=figure}
+ \ContinuedFloat
+ \example*{singlelinecheck=false}{A short caption.}
+\endgroup
+
+You switch the extra centering on again by using |true|, |yes|, |on| or |1|
+for \meta{bool}. (The default is on.)
+
+% --------------------------------------------------------------------------- %
+
+\subsection{Fonts}
+\label{fonts}
+
+\DescribeMacro{font=}
+\DescribeMacro{labelfont=}
+\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 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\\
+ |textfont=| & \marg{font options} & .\\
+\end{tabular}\end{quote}
+
+And these are the available font options:
+
+\begin{Options}{\OptionLabel}
+ \item[scriptsize] {\scriptsize Very small size}
+ \item[footnotesize] {\footnotesize The size usually used for footnotes}
+ \item[small] {\small Small size}
+ \item[normalsize] {\normalsize Normal size}
+ \item[large] {\large Large size}
+ \item[Large] {\Large Even larger size}
+
+ \item[up] {\upshape Upright shape}
+ \item[it] {\itshape Italic shape}
+ \item[sl] {\slshape Slanted shape}
+ \item[sc] {\scshape Small Caps shape}
+
+ \item[md] {\mdseries Medium series}
+ \item[bf] {\bfseries Bold series}
+
+ \item[rm] {\rmfamily Roman family}
+ \item[sf] {\sffamily Sans Serif family}
+ \item[tt] {\ttfamily Typewriter family}
+
+ \item[singlespacing] |\singlespacing| (see \package{setspace} package)
+ \item[onehalfspacing] |\onehalfspacing|
+ \item[doublespacing] |\doublespacing|
+
+ \item[\UserDefined]
+ Own font options can be defined using |\DeclareCaptionFont|.\\
+ \SeeUserDefined
+\end{Options}
+
+If you use only one of these options you can omit the braces;
+e.g., the options
+%\begin{quote}
+ |font={small}|
+%\end{quote}
+and
+%\begin{quote}
+ |font=small|
+%\end{quote}
+will give the same result.
+
+Two examples:
+\begin{Example}
+ \begin{quote}
+ |font={small,it},labelfont=bf|
+ \end{quote}
+ \captionsetup{aboveskip=0pt}
+ \example{font={small,it},labelfont=bf}{\exampletext}
+\end{Example}
+
+\begin{Example}
+ \begin{quote}
+ |font=small,labelfont=bf,textfont=it|
+ \end{quote}
+ \captionsetup{aboveskip=0pt}
+ \example{font=small,labelfont=bf,textfont=it}{\exampletext}
+\end{Example}
+
+% --------------------------------------------------------------------------- %
+
+\subsection{Margins and further paragraph options}
+\label{margins}
+
+\DescribeMacro{margin=}
+\DescribeMacro{width=}
+For all captions you can specify \emph{either} an extra margin \emph{or}
+a fixed width. You do this by using the options
+\begin{quote}\begin{tabular}{@{}r@{}ll}
+ |margin=| & \meta{amount} & \emph{or}\\
+ |width=| & \meta{amount} & \\
+\end{tabular}\end{quote}
+Nevertheless what option you use, the left and right margin will be the
+same.
+
+Two examples will illustrating this:
+\begin{Example}
+ \begin{quote}
+ |margin=10pt|
+ \end{quote}
+ \captionsetup{aboveskip=0pt}
+ \example{margin=10pt}{\exampletext}
+\end{Example}
+
+\begin{Example}
+ \begin{quote}
+ |width=.75\textwidth|
+ \end{quote}
+ \captionsetup{aboveskip=0pt}
+ \example{width=.75\textwidth}{\exampletext}
+\end{Example}
+
+\DescribeMacro{parskip=}
+This option is useful for captions containing more than one paragraph.
+It specifies the extra vertical space inserted between them:
+\begin{quote}
+ |parskip=|\meta{amount}
+\end{quote}
+One example:
+\begin{Example}
+ \begin{quote}
+ |margin=10pt,parskip=5pt|
+ \end{quote}
+ \captionsetup{aboveskip=0pt}
+ \example{margin=10pt,parskip=5pt}{%
+ First paragraph of the caption. This one contains some test, just to
+ show how these options affect the layout of the caption.\par
+ Second paragraph of the caption. This one contains some text, too, to
+ show how these options affect the layout of the caption.}
+\end{Example}
+
+\DescribeMacro{hangindent=}
+The option
+\begin{quote}
+ |hangindent=|\meta{amount}
+\end{quote}
+is for setting up a hanging indention starting from the second line of each
+paragraph. If the caption contains just a single paragraph, using this option
+leads to the same result as the option |indention=| you already know about.
+But if the caption contains multiple paragraphs you will notice the difference:
+
+\begin{Example}
+ \begin{quote}
+ |format=hang,indention=-.5cm|
+ \end{quote}
+ \captionsetup{aboveskip=0pt}
+ \example{format=hang,indention=-.5cm}{%
+ First paragraph of the caption. This one contains some test, just to
+ show how these options affect the layout of the caption.\par
+ Second paragraph of the caption. This one contains some text, too, to
+ show how these options affect the layout of the caption.}
+\end{Example}
+
+\begin{Example}
+ \begin{quote}
+ |format=hang,hangindent=-.5cm|
+ \end{quote}
+ \captionsetup{aboveskip=0pt}
+ \example{format=hang,hangindent=-.5cm}{%
+ First paragraph of the caption. This one contains some test, just to
+ show how these options affect the layout of the caption.\par
+ Second paragraph of the caption. This one contains some text, too, to
+ show how these options affect the layout of the caption.}
+\end{Example}
+
+% --------------------------------------------------------------------------- %
+
+\subsection{Styles}
+\label{style}
+
+\DescribeMacro{style=}
+A suitable combination of caption options is called \emph{caption style}.
+You can compare them more or less to page styles which you set up with
+|\pagestyle|: The caption style provides all settings for a whole caption layout.
+
+You switch to an already defined caption style with the option
+\begin{quote}
+ |style=|\meta{style name}\quad.
+\end{quote}
+\Thispackage\ pre-defines two styles: |base| and |default|.
+
+\NEWfeature{v3.1}
+The |base| style puts all options you already know about to values reflecting
+the look of the captions when using one of the base \LaTeX\ document classes
+|article|, |report|, and |book|.
+This means that specifying the option
+\begin{quote}
+ |style=base|
+\end{quote}
+has the same effect as specifying all these options:
+\begin{quote}
+ |format=plain,labelformat=default,labelsep=colon,|\\
+ |justification=justified,font=,labelfont=,|\\
+ |textfont=,margin=0pt,indention=0pt,parindent=0pt|\\
+ |hangindent=0pt,singlelinecheck=true|
+\end{quote}
+(But |justification=centering| will be set if the caption fits into a
+ single line.)
+
+In contrast the |default| style follows the default values, reflecting
+the look of the captions given by the document class you actually use.
+This style is selected by default and represents these options:
+\begin{quote}
+ |format=default,labelformat=default,labelsep=default,|\\
+ |justification=default,font=default,labelfont=default,|\\
+ |textfont=default,margin=0pt,indention=0pt,parindent=0pt|\\
+ |hangindent=0pt,singlelinecheck=true|
+\end{quote}
+(But |justification=centering| and |format=plain| will be set if the
+ caption fits into a single line.)
+
+So if you use one of the base \LaTeX\ document classes,
+both |base| and |default| point to the nearly same settings.
+
+\emph{Note:} Own caption styles can be defined using |\DeclareCaptionStyle|.
+\SeeUserDefined
+
+% --------------------------------------------------------------------------- %
+
+\subsection{Skips}
+\label{skips}
+
+\DescribeMacro{aboveskip=}
+\DescribeMacro{belowskip=}
+The vertical spaces above and below the caption are controlled by the skips
+|\abovecaptionskip| and |\belowcaptionskip|. The standard \LaTeX\ document
+classes |article|, |report| and |book| set |\abovecaptionskip| to |10pt|
+and |\belowcaptionskip| to |0pt|, other document classes may use other values.
+
+\pagebreak[3]
+Both skips can be changed with the command |\setlength|, but you can
+use these options, too:
+\nopagebreak[3]
+\begin{quote}\begin{tabular}{@{}r@{}ll}
+ |aboveskip=| & \meta{amount} & and\\
+ |belowskip=| & \meta{amount} & .\\
+\end{tabular}\end{quote}
+
+\DescribeMacro{position=}
+Using |\abovecaptionskip| and |\belowcaptionskip| has a major design flaw:
+If the caption is typeset \emph{above} (and not \emph{below}) the figure
+or table they are not set up very useful at default, because there will be
+some extra space above the caption but no space between the caption and the
+figure or table itself. (Remember: |\belowcaptionskip| is usually set to |0pt|.)
+
+Please compare the spacing in these small tables:
+\begin{Example}
+ \begin{minipage}[c]{.5\linewidth}
+% \captionsetup{aboveskip=0pt}%
+ \captionof{table}{A table}
+ \centering\begin{tabular}{ll}
+ A & B \\
+ C & D \\
+ \end{tabular}
+ \end{minipage}
+ \begin{minipage}[c]{.5\linewidth}
+ \centering\begin{tabular}{ll}
+ A & B \\
+ C & D \\
+ \end{tabular}
+ \captionof{table}{A table}
+ \end{minipage}
+\end{Example}
+
+But you can fix this by using the option |position=|: It specifies how the
+spacing above and below the caption will be used:
+\begin{quote}
+ |position=top|\quad(or |position=above|)
+\end{quote}
+tells \thispackage\ to use the spacing useful for caption
+\emph{above} the figure or table and
+\begin{quote}
+ |position=bottom|\quad(or |position=below|)
+\end{quote}
+tells \thispackage\ to use the spacing useful for captions
+\emph{below} the figure or table. (The last one is the default setting
+except for |longtable|s.)
+
+So adding an extra |\captionsetup{position=top}| to the left example
+table gives you proper spacing around both captions:
+\begin{Example}
+ \begin{minipage}[c]{.5\linewidth}
+ \captionsetup{position=top}
+ \captionof{table}{A table}
+ \centering\begin{tabular}{ll}
+ A & B \\
+ C & D \\
+ \end{tabular}
+ \end{minipage}
+ \begin{minipage}[c]{.5\linewidth}
+ \centering\begin{tabular}{ll}
+ A & B \\
+ C & D \\
+ \end{tabular}
+ \captionof{table}{A table}
+ \end{minipage}
+\end{Example}
+
+(Technically speaking |\abovecaptionskip| and |\belowcaptionskip| will
+be swapped if you specify the option |position=top|, so in both cases
+|\abovecaptionskip| will be used between the caption and the figure or
+table itself.)
+
+This option is especially useful when used together with the optional
+argument of the |\captionsetup| command.
+\See{\Ref{commands} for details}\par
+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 \thispackage\ offers
+an abbreviating option for the use with |\usepackage|:
+\begin{quote}
+ |\usepackage[|\ldots|,tableposition=top]{caption}|
+\end{quote}
+is equivalent to
+\begin{quote}
+ |\usepackage[|\ldots|]{caption}|\\
+ |\captionsetup[table]{position=top}|
+\end{quote}
+
+% --------------------------------------------------------------------------- %
+
+\pagebreak[4]
+\section{Commands}
+\label{commands}
+
+\DescribeMacro{\caption}
+The command
+\nopagebreak[3]
+\begin{quote}
+ |\caption|\oarg{lst\_entry}\marg{heading}
+\end{quote}
+\nopagebreak[3]
+typesets the caption inside a floating environment like |figure| or |table|.
+Well, you already know this, but \thispackage\ 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}
+
+\DescribeMacro{\caption*}
+The \package{longtable} package defines the command |\caption*| which
+typesets the caption without label and without entry in the list of tables.
+An example:
+\begin{quote}
+ |\begin{longtable}{cc}|\\
+ | \caption*{A table}\\|\\
+ | A & B \\|\\
+ | C & D \\|\\
+ |\end{longtable}|
+\end{quote}
+looks like
+\begin{longtable}{cc}
+ \caption*{A table}\\
+ A & B \\
+ C & D \\
+\end{longtable}
+
+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}|\\
+ | \begin{tabular}{cc}|\\
+ | A & B \\|\\
+ | C & D \\|\\
+ | \end{tabular}|\\
+ |\end{table}|
+\end{quote}
+
+\DescribeMacro{\captionof}
+\DescribeMacro{\captionof*}
+Sometimes you want to typeset a caption \emph{outside} a floating environment,
+putting a figure within a |minipage| for instance. For this purpose
+\thispackage\ offers the command
+\begin{quote}
+ |\captionof|\marg{float type}\oarg{lst\_entry}\marg{heading}\quad.
+\end{quote}
+Note that the first argument, the \meta{float type}, is mandatory here, because
+the |\captionof| command needs to know which name to put into the caption label
+(e.g. ``Figure'' or ``Table'') and in which list to put the contents entry.
+An example:
+\begin{quote}
+ |\captionof{figure}{A figure}|\\
+ |\captionof{table}{A table}|
+\end{quote}
+typesets captions like this:
+\begin{Example}
+ \captionof{figure}{A figure}
+ \captionsetup{belowskip=\abovecaptionskip}
+ \captionof{table}{A table}
+\end{Example}
+
+The star variant |\captionof*| has the same behaviour as the |\caption*| command:
+it typesets the caption without label and without entry to the list of figures
+or tables.
+
+\DANGER % \NEWdescription{v3.1}
+Please note that you should use both |\captionof| and |\captionof*| only
+\emph{inside} boxes or environments (like |\parbox| or |minipage|),
+otherwise an error message will be issued.\footnote{%
+This only happens if you use \eTeX\ as underlying \TeX\ engine.
+Otherwise no error message will be issued, but a page break can appear
+between content and caption.
+Furthermore some strange effects could occur,
+e.g., mixed-up figure and table settings regarding captions.}
+
+\DescribeMacro{\captionsetup}
+We already know the |\captionsetup| command (see \Ref{usage}),
+but this time we get enlighten about its optional argument
+\meta{float type}.
+
+Remember, the syntax of this command is
+\begin{quote}
+ |\captionsetup|\oarg{float type}\marg{options}\quad.
+\end{quote}
+
+If a \meta{float type} gets specified, all the \meta{options} don't
+change anything at this time. Instead they only get marked for a later use,
+when a caption inside of a floating environment of the particular type
+\meta{float type} gets typeset.
+For example
+\begin{quote}
+ |\captionsetup[figure]|\marg{options}
+\end{quote}
+forces captions within a |figure| environment to use the given \meta{options}.
+
+Here comes an example to illustrate this:
+\begin{quote}
+ |\captionsetup{font=small}|\\
+ |\captionsetup[figure]{labelfont=bf}|
+\end{quote}
+gives captions like this:
+\begin{Example}
+ \captionsetup{font=small}
+ \captionsetup[figure]{labelfont=bf}
+ \begingroup
+ \captionof{figure}{A figure}
+ \endgroup
+ \captionsetup{belowskip=\abovecaptionskip}
+ \begingroup
+ \captionof{table}{A table}
+ \endgroup
+\end{Example}
+
+As you see the command |\captionsetup[figure]{labelfont=bf}| only changed
+the font of the figure caption labels, not touching all other ones.
+
+\DescribeMacro{\clearcaptionsetup}
+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{float type}\quad.
+\end{quote}
+
+For example |\clearcaptionsetup{figure}| would clear the extra handling in the
+example above:
+\begin{Example}
+ \captionsetup{font=small}
+ \begingroup
+ \captionof{figure}{A figure}
+ \endgroup
+ \captionsetup{belowskip=\abovecaptionskip}
+ \begingroup
+ \captionof{table}{A table}
+ \endgroup
+\end{Example}
+
+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) offer additional floating environments and these two
+commands can also be used with them.
+
+\subsection{Continued floats}
+\label{ContinuedFloat}
+
+\DescribeMacro{\ContinuedFloat}
+Sometimes you want to split figures or tables without giving them
+their own reference number. This is what the command
+\begin{quote}
+ |\ContinuedFloat|
+\end{quote}
+is for; it should be used as first command inside the floating environment.
+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}
+ |\begin{table}|\\
+ |\caption{A table}|\\
+ \ldots\\
+ |\end{table}|\\
+ \ldots\\
+ |\begin{table}\ContinuedFloat|\\
+ |\caption{A table (cont.)}|\\
+ \ldots\\
+ |\end{table}|
+\end{quote}
+gives the following result:
+\begin{Example}
+ \captionsetup{type=table}
+ \caption{A table}
+ \centerline{\ldots}
+ \ContinuedFloat
+ \captionsetup{aboveskip=0pt}
+ \caption{A table (cont.)}
+\end{Example}
+
+% --------------------------------------------------------------------------- %
+
+\pagebreak[4]
+\section{Own enhancements}
+\label{declare}
+
+A family of commands is provided to allow users to define their own formats.
+This enables information on separators, justification, fonts, and styles to
+be associated with a name and kept in one place
+(these commands need to appear in the document preamble,
+this is the part between |\documentclass| and |\begin{document}|).
+
+\pagebreak[2]
+\DescribeMacro{\DeclareCaptionFormat}
+You can define your own caption formats using the command
+\begin{quote}
+ |\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
+pre-defined by \thispackage\ as
+\begin{quote}
+ |\DeclareCaptionFormat{plain}{#1#2#3\par}|
+\end{quote}
+
+\DescribeMacro{\DeclareCaptionLabelFormat}
+Likewise you can define your own caption label formats:
+\begin{quote}
+ |\DeclareCaptionLabelFormat|\marg{name}\marg{code using \#1 and \#2}
+\end{quote}
+At usage \#1 gets replaced with the name (e.g. ``figure'') and \#2
+gets replaced with the reference number (e.g. ``12'').
+
+\DescribeMacro{\bothIfFirst}
+\DescribeMacro{\bothIfSecond}
+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 yes,
+both arguments get typeset, otherwise none of them.
+
+For example the standard label format |simple| is \emph{not} defined as
+\begin{quote}
+ |\DeclareCaptionLabelFormat{simple}{#1~#2}|\quad,
+\end{quote}
+because this could cause an extra space if \#1 is empty. Instead |simple|
+is defined as
+\begin{quote}
+ |\DeclareCaptionLabelFormat{simple}{\bothIfFirst{#1}{~}#2}|\quad,
+\end{quote}
+causing the space to appear only if the label name is present.
+
+\pagebreak[3]
+\DescribeMacro{\DeclareCaptionLabelSeparator}
+You can define your own caption label separators with
+\nopagebreak[3]
+\begin{quote}
+ |\DeclareCaptionLabelSeparator|\marg{name}\marg{code}\quad.
+\end{quote}
+\nopagebreak[3]
+Again an easy example taken from \thispackage\ itself:
+\nopagebreak[3]
+\begin{quote}
+ |\DeclareCaptionLabelSeparator{colon}{: }|
+\end{quote}
+\pagebreak[3]
+
+\DescribeMacro{\DeclareCaptionJustification}
+You can define your own caption justifications with
+\begin{quote}
+ |\DeclareCaptionJustification|\marg{name}\marg{code}\quad.
+\end{quote}
+The \meta{code} simply gets typeset just before the caption.
+E.g.~using the justification |raggedright|, which is defined as
+\begin{quote}
+ |\DeclareCaptionJustification{raggedright}{\raggedright}|\quad,
+\end{quote}
+lets captions with all lines moved to the left margin.
+
+\DescribeMacro{\DeclareCaptionFont}
+You can define your own caption fonts with
+\begin{quote}
+ |\DeclareCaptionFont|\marg{name}\marg{code}\quad.
+\end{quote}
+For example this package defines the options |small| and |bf| as
+\begin{quote}
+ |\DeclareCaptionFont{small}{\small}|\quad and\\
+ |\DeclareCaptionFont{bf}{\bfseries}|\quad.
+\end{quote}
+\iffalse
+The line spacing could be customized using the \package{setspace} package,
+for example:%\NEWdescription{v3.0h}
+\begin{quote}
+ |\usepackage{setspace}|\\
+ |\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}|
+\end{quote}
+\example{font={onehalfspacing,small},labelfont=bf,singlelinecheck=off}{\exampletext}
+\fi
+An example which brings color into life:
+\begin{quote}
+ |\usepackage{color}|\\
+ |\DeclareCaptionFont{red}{\color{red}}|\\
+ |\DeclareCaptionFont{green}{\color{green}}|\\
+ |\DeclareCaptionFont{blue}{\color{blue}}|\\
+ |\captionsetup{labelfont={blue,bf},textfont=green}|
+\end{quote}
+\example*{labelfont={color=blue,bf},textfont={color=green},singlelinecheck=off}{\exampletext}
+But since \thispackage\ already includes the tricky definition
+\begin{quote}
+ |\DeclareCaptionFont{color}{\color{#1}}|
+\end{quote}
+you can get the same result simply with
+\begin{quote}
+ |\usepackage{color}|\\
+ |\captionsetup{labelfont={color=blue,bf},|\\
+ | textfont={color=green}}|\quad.
+\end{quote}
+
+\DescribeMacro{\DeclareCaptionStyle}
+You can define your own caption styles with
+\begin{quote}
+ |\DeclareCaptionStyle|\marg{name}\oarg{additional options}\marg{options}
+\end{quote}
+Remember, caption styles are just a collection of suitable options, saved
+under a given name. You can wake up these options at any time with the
+option |style=|\meta{style name}.
+
+All caption styles are based on the |base| set of options. (See \Ref{style}
+for a complete list.) So you only need to specify options which are different
+to them.
+
+If you specify \meta{additional options} they get used in addition when
+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 the core of this package: The
+caption style |base| is pre-defined as
+\begin{quote}
+ |\DeclareCaptionStyle{base}%|\\
+ | [format=plain,justification=centering]{}|\quad.
+\end{quote}
+
+% --------------------------------------------------------------------------- %
+
+\subsection{Further Examples}
+
+%\NEWdescription{v3.1}
+If you would like to have a line break between caption label and text
+you could define it this way:
+\begin{quote}
+ |\DeclareCaptionFormat{myformat}{#1#2\\#3}|
+\end{quote}
+If you select this format with |\captionsetup{format=myformat}|
+you get captions like this:
+%\begin{Example}
+% \captionsetup{aboveskip=0pt}
+ \example{format=myformat1,labelfont=bf}{\exampletext}
+%\end{Example}
+You could even use an indention with this caption format:
+\begin{quote}
+ |\captionsetup{format=myformat,indention=1cm}|
+\end{quote}
+This would look like this:
+%\begin{Example}
+% \captionsetup{aboveskip=0pt}
+ \example{format=myformat1,indention=1cm,labelfont=bf}{\exampletext}
+%\end{Example}
+Instead, you would like to have an indention only of the first line of
+the caption text? No problem, e.g.
+\begin{quote}
+ |\newlength\myindention|\\
+ |\DeclareCaptionFormat{myformat}%|\\
+ | {#1#2\\\hspace*{\myindention}#3}|\\
+ \ldots\\
+ |\setlength\myindention{1cm}|\\
+ |\captionsetup{format=myformat}|
+\end{quote}
+would give you captions like
+%\begin{Example}
+% \captionsetup{aboveskip=0pt}
+ \example{format=myformat2,myindention=1cm,labelfont=bf}{\exampletext}
+%\end{Example}
+But you want to have an caption option for this indention, so you can use
+it for example with |\captionsetup|\xx|[figure]|\xx|{myindention=|\ldots|}|?
+This could be done, too:
+\begin{quote}
+ |\newlength\myindention|\\
+ |\DeclareCaptionOption{myindention}%|\\
+ | {\setlength\myindention{#1}}|\\
+ |\DeclareCaptionFormat{myformat}%|\\
+ | {#1#2\\\hspace\myindention #3}|\\
+ \ldots\\
+ |\captionsetup{format=myformat,myindention=1cm}|
+\end{quote}
+would give the same result as the example above.
+
+\bigskip\pagebreak[3]
+A different example: You want captions to look like this:
+%\begin{Example}
+% \captionsetup{aboveskip=0pt}
+ \example{format=reverse,labelformat=fullparens,labelsep=fill,labelfont=it}{\exampletext}
+%\end{Example}
+\pagebreak[2]
+You could do it this way:
+\nopagebreak[3]
+{\leftmargini=10pt
+ \begin{quote}
+ |\DeclareCaptionFormat{reverse}{#3#2#1}|\\
+ |\DeclareCaptionLabelFormat{fullparens}%|\\
+ | {(\bothIfFirst{#1}{~}#2)}|\\
+ |\DeclareCaptionLabelSeparator{fill}{\hfill}|\\
+ |\captionsetup{format=reverse,labelformat=fullparens,|\\
+ | labelsep=fill,font=small,labelfont=it}|
+ \end{quote}}
+For short captions---which fit into one single line---this format will not
+be used, since |format=plain| is part of the \meta{single-line-code} of the
+caption style |default| which will be used as long as no different style is
+selected. If you don't like this, you could either switch the |singlelinecheck|
+|off|, or you could define an appropriate style for yourself, e.g.:
+\begin{quote}
+ |\DeclareCaptionStyle{mystyle}%|\\
+ | [justification=centering]{format=myformat}|\\
+ |\captionsetup{style=mystyle}|
+\end{quote}
+or
+\begin{quote}
+ |\DeclareCaptionFormat{myshortformat}{|\ldots
+ \textit{use your illusion here}|}|\\
+ |\DeclareCaptionStyle{mystyle}%|\\
+ | [format=myshortformat]{format=myformat}|\\
+ |\captionsetup{style=mystyle}|
+\end{quote}
+
+\bigskip\pagebreak[3]
+Another example: The caption text should go into the left margin; a possible
+solution would be:
+{\leftmargini=10pt
+ \begin{quote}
+ |\DeclareCaptionFormat{llap}{\llap{#1#2}#3\par}|\\
+ |\captionsetup{format=llap,labelsep=quad,singlelinecheck=no}|
+ \end{quote}}
+As a result you would get captions like this:
+%\begin{Example}
+% \captionsetup{aboveskip=0pt}
+ \example{format=llap,labelsep=quad,singlelinecheck=no,margin=0pt}{\exampletext}
+%\end{Example}
+
+% --------------------------------------------------------------------------- %
+
+\pagebreak[4]
+\section{Document classes \& Babel support}
+\label{classes}
+
+%\NEWdescription{v3.1}
+{\small\emph{Please note:} Many document classes already have build-in options and
+commands for customizing captions. If these possibilities are sufficient for
+you, there is usually no need for you to use the \package{caption} package
+at all. And if you are just interested in using the command \cs{captionof},
+loading of the very small \package{capt-of} is usually sufficient.}
+
+This section will give you an overview of the document classes the
+\package{caption} supports, what do they already offer regarding captions,
+what side effects will occur when using the \package{caption} package with
+them, and what are the `default' settings for them.
+
+\NEWfeature{v3.1}
+The `default' settings depend on the document class you use; they represent
+how the class author wanted the captions to look like. So for example
+setting |format=default| can give you different visual designs when used
+with different document classes.
+
+\DANGER
+If you don't find the document class you use in this section, you usually
+don't have to worry: Many document classes are derived from one of the
+standard document classes |article|, |report|, or |book|, and behave the
+same regarding captions.
+\Thispackage\ automatically does a compatibility check against the document
+class used and will give you a clear warning if a incompatibility was detected.
+If you don't get such warning everything is fine, but if you get it the usage of
+\thispackage\ is not recommended and especially not supported.
+
+{\small(If you get such a compatibility warning but decide to use \thispackage{}
+ anyway, you should watch carefully what side-effects occur, usually the
+ look and feel of your captions will change by just including \thispackage{}
+ without options, meaning they do not look like as intended by the author
+ of the document class.
+ If this is fine for you, you should first specify the option |style=base|
+ via |\usepackage[style=base]{caption}| or |\captionsetup{style=base}|
+ to set \thispackage\ into a well-defined state.
+ Afterwards you can start setting your own options additionally and
+ keep your fingers crossed.)}
+
+\newcommand*\Option{Option}
+\newcommand*\defaultvalue{\texttt{default} value}
+\newcommand*\use{\textit{use}}
+\newcommand*\settings{\textit{settings}}
+\newcommand*\nofont{\textit{none}}
+
+\subsection{Standard \LaTeX: article, report, and book}
+
+\begin{tabular}{ll}
+\Option & \defaultvalue \\\hline
+|format=| & |plain| \\
+|labelformat=| & |simple| \\
+|labelsep=| & |colon| \\
+|justification=| & |justified| \\
+|font=| & \nofont \\
+|labelfont=| & \nofont \\
+|textfont=| & \nofont \\
+\end{tabular}
+
+\textbf{Build-in features:} None
+
+\noindent{\small(\emph{Note:} This also applies to document classes derived from them.)}
+
+\subsection{\AmS: amsart, amsproc, and amsbook}
+\label{AMS}
+
+\TODO
+
+\subsection{beamer}
+\label{beamer}
+
+\begin{tabular}{ll}
+\Option & \defaultvalue \\\hline
+|format=| & |plain| \\
+|labelformat=| & \textit{not numbered} \\
+|labelsep=| & |colon| \\
+|justification=| & |raggedright| \\
+|font=| & \use\ \package{beamer} |caption| \settings \\
+|labelfont=| & \use\ \package{beamer} |caption name| \settings \\
+|textfont=| & \nofont \\
+\end{tabular}
+
+\textbf{Build-in features and side-effects:}\\
+You can setup font and color settings with
+|\setbeamerfont|\xx|{caption}|\xx\marg{options} and
+|\setbeamerfont|\xx|{caption name}|\xx\marg{options}.
+This will still work, unless you set a different font with
+|\captionsetup|\xx|{font=|\xx\meta{options}|}| or
+|\captionsetup|\xx|{labelfont=|\xx\meta{options}|}|.\par
+Furthermore the \package{beamer} classes offer different caption templates
+which can be choosen with
+|\set|\x|beamter|\x|template|\xx|{caption}|\xx|[|\meta{template}|]|.
+Since \thispackage\ replaces this caption template mechanism,
+|\def|\x|beamer|\x|template*|\xx|{caption}|\xx\marg{template code}
+and
+|\set|\x|beamer|\x|template|\xx|{caption}|\xx|[|\meta{template}|]|
+will have no function when \thispackage\ is used.
+
+\subsection{\KOMAScript: scrartcl, scrreprt, and scrbook}
+\label{KOMA}
+
+\begin{tabular}{ll}
+\Option & \defaultvalue \\\hline
+|format=| & \use\ |\setcapindent| \textit{\&} |\setcaphanging| \settings \\
+|labelformat=| & |simple| \\
+|labelsep=| & \use\ |\captionformat| \\
+|justification=| & |justified| \\
+|font=| & \use\ |\setkomafont{caption}| \settings \\
+|labelfont=| & \use\ |\setkomafont{captionlabel}| \settings \\
+|textfont=| & \nofont \\
+\end{tabular}
+
+\textbf{Build-in features:}\\
+The \KOMAScript\ document classes offer many ways to customize the look and
+feel of the captions. For an overview and a full description please take a
+look at the \KOMAScript\ documentation, section `Tables and Figures'.
+
+\textbf{Side effects:}\\
+The optional argument of |\setcapwidth| is not supported (yet) and will be
+ignored if used in conjunction with the \package{caption} package.
+Furthermore the \KOMAScript\ options |tablecaptionabove| \&
+|tablecaptionbelow| and the commands |\captionabove| \& |\captionbelow|
+are stronger than the |position=| setting offered by the \package{caption}
+package.
+
+\subsection{\NTG: artikel, rapport, and boek}
+\label{NTG}
+
+\begin{tabular}{ll}
+\Option & \defaultvalue \\\hline
+|format=| & |plain| \\
+|labelformat=| & |simple| \\
+|labelsep=| & |colon| \\
+|justification=| & |justified| \\
+|font=| & \nofont \\
+|labelfont=| & \use\ |\CaptionLabelFont| \\
+|textfont=| & \use\ |\CaptionTextFont| \\
+\end{tabular}
+
+\textbf{Build-in features and side-effects:}\\
+|\CaptionLabelFont| and |\CaptionTextFont| can be set either directly or
+by using |\CaptionFonts|. Both is still supported unless you use
+one of the two options |labelfont=| or |textfont=| offered by \thispackage.
+
+\subsection{\SmF{} classes: smfart and smfbook}
+\label{SMF}
+
+\TODO
+
+\subsection{The frenchb Babel option}
+\label{frenchb}
+
+If you use the \package{frenchb} option of the \package{babel} package
+with one of the three standard \LaTeX{} classes (or a one derived from them)
+the default |labelsep=| will be set to \cs{CaptionSeparator} (offered by
+\package{frenchb}), overriding the default value set by the document class.
+So redefining \cs{CaptionSeparator} will still work, unless you don't
+select a different |labelsep=| than the default one.
+
+\INFO*
+Please load \thispackage\ \emph{after} the \package{babel} package.
+
+\subsection{The frenchle and frenchpro packages}
+\label{frenchpro}
+
+If you use the \package{frenchle} or \package{frenchpro} package,
+the default |labelsep=| will be set to \cs{captionseparator} (offered by
+\package{frenchle/pro}) plus \cs{space}, overriding the default value set
+by the document class.
+So redefining \cs{captionseparator} will still work, unless you don't
+select a different |labelsep=| than the default one.
+
+Furthermore the default |textfont=| will be set to |textfont=it|,
+since this emulates the default setting of |\captionfont| defined by the
+\package{frenchle} or \package{frenchpro} package.
+%If you redefine |\captionfont| after loading the \package{frenchle} or
+%\package{frenchpro} package, this redefinition gets lost.
+Please note that the command \cs{captionfont} is used by the
+\package{caption} package internally for a different purpose,
+so you should not change it (anymore).
+
+The command \cs{unnumberedcaptions}\marg{figure or table} will still work,
+but only unless you don't select a different |labelformat=| than the default
+one.
+
+\INFO*
+Please load \thispackage\ \emph{after} the \package{frenchle}
+or \package{frenchpro} package.
+
+% --------------------------------------------------------------------------- %
+
+\pagebreak[4]
+\section{Supported packages}
+\label{packages}
+
+%\NEWdescription{v3.1}
+\Thispackage\ was adapted to the following packages which deals with
+captions, too:
+\begin{quote}
+ \package{float}, \package{floatflt}, \package{fltpage},
+ \package{hyperref}, \package{hypcap}, \package{listings},
+ \package{longtable}, \package{picinpar}, \package{picins},
+ \package{rotating}, \package{sidecap}, \package{subfigure},
+ \package{supertabular}, \package{threeparttable}, and \package{wrapfig}
+\end{quote}
+
+Furthermore the \package{floatrow} and the \package{subfig} package
+supports \thispackage\ and use its |\captionsetup| interface.
+
+\subsection{float}
+\label{float}
+
+\TODO
+
+\subsection{floatflt}
+\label{floatflt}
+
+\TODO
+
+\subsection{fltpage}
+\label{fltpage}
+
+\TODO
+
+\subsection{hyperref}
+\label{hyperref}
+
+\NEWfeature{v3.1}
+There are two options available to control hyperlinks:
+\begin{description}
+\item{\texttt{hypcap=}}\\[\smallskipamount]
+If set to |true| all hyperlink anchors -- where entries in the
+List of Figures, |\ref|, and |\autoref| will link to -- are placed at
+the beginning of the (floating) environment.\par
+If set to |false| the hyperlink anchor is placed at the caption.\par
+(The default setting is |hypcap=true|.)
+\item{\texttt{hypcapspace=}}\\[\smallskipamount]
+This controls the vertical distance between the hyperlink anchor and
+the (floating) environment, e.g.~|hypcapspace=0pt| removes the space.\par
+(The default setting is |hypcapspace=0.5\baselineskip|.)
+\end{description}
+
+Please note:
+
+\begin{description}
+\item{\cs{captionof}\marg{type}\csmarg\ldots\ vs.
+ \cs{captionsetup}\csmarg{type=\meta{type}}$+$\cs{caption}\csmarg\ldots}\\[\smallskipamount]
+Without \package{hyperref} loaded, both will give you identical results.
+But with \package{hyperref} loaded, and with |hypcap=true| requested, the
+hyperlink anchor will be placed different.
+For example:
+\begin{quote}
+|\begin{minipage}{\linewidth}|\\
+| |\ldots\\
+| \captionof{figure}{A figure}|\\
+|\end{minipage}|
+\end{quote}
+will place the hyperlink anchor at the caption.
+(And if |hypcap=true| is set, you will get a warning about this.)
+But
+\begin{quote}
+|\begin{minipage}{\linewidth}|\\
+| \captionsetup{type=figure}|\\
+| |\ldots\\
+| \caption{A figure}|\\
+|\end{minipage}|
+\end{quote}
+will place the hyperlink anchor at the beginning of the |minipage|.
+
+\item{\cs{caption}\csoarg{}\csmarg\ldots\ vs.
+ \cs{captionsetup}\csmarg{listof=false}$+$\cs{caption}\csmarg\ldots}\\[\smallskipamount]
+Again, without \package{hyperref} loaded, both will give you identical results.
+But with \package{hyperref} loaded, the difference is in the nuances.
+So for example the optional argument of \cs{caption} will also be written to
+the |aux| file, and will be used by the \cs{nameref} command.
+So if you choose to use \cs{caption} with empty optional argument,
+\cs{nameref} will also give you an empty result.
+So it's better to use \cs{captionsetup}\csmarg{listof=false} if you don't
+want an entry in the List of Figures or List of Tables.
+\end{description}
+
+\subsection{hypcap}
+\label{hypcap}
+
+If the \package{hypcap} package is loaded additionally to the \package{hyperref}
+package, it takes over the control of the hyperlink anchor placement.
+
+This has the side-effect that you lost the good placement of the hyperlink anchors
+in |floatingfigure|s (provided by the \package{floatflt} package),
+in |figwindow|s (provided by the \package{picinpar} package),
+in |parpic|s (provided by the \package{picins} package), and
+in |wrapfigure|s (provided by the \package{wrapfig} package).
+
+Furthermore |\captionsetup{type=|\meta{type}|}| will not place hyperlink anchors
+anymore, instead you need to use |\capstart| (provided by the \package{hypcap} package).
+
+\subsection{listings}
+\label{listings}
+
+\TODO
+
+\subsection{longtable}
+\label{longtable}
+
+\TODO
+
+\subsection{picinpar}
+\label{picinpar}
+
+\TODO
+
+\subsection{picins}
+\label{picins}
+
+\TODO
+
+\subsection{rotating}
+\label{rotating}
+
+\TODO
+
+\subsection{sidecap}
+\label{sidecap}
+
+\TODO
+
+\subsection{subfigure}
+\label{subfigure}
+
+\TODO
+
+\subsection{supertabular}
+\label{supertabular}
+
+\TODO
+
+\subsection{threeparttable}
+\label{threeparttable}
+
+\TODO
+
+\subsection{wrapfig}
+\label{wrapfig}
+
+\TODO
+
+% --------------------------------------------------------------------------- %
+
+\pagebreak[4]
+\section{Compatibility to older versions}
+\label{compatibility}
+
+\subsection{caption v\texorpdfstring{$1.x$}{1.x}}
+\label{caption1}
+
+This version of \thispackage\ still supports the old options
+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
+cause ugly side effects.
+
+Here comes a short oversight of the obsolete options and how
+they have been replaced within this version of \thispackage:
+
+{\small\begin{longtable}{ll}
+\package{caption} \version{1.x} & \package{caption} \version{3.x}\\
+\hline
+\endhead
+|normal| & |format=plain|\\
+|hang| & |format=hang|\\
+|isu| & |format=hang|\\
+|center| & |justification=centering|\\
+|centerlast| & |justification=centerlast|\\
+%|anne| & |justification=centerlast|\\
+|nooneline| & |singlelinecheck=off|\\
+|scriptsize| & |font=scriptsize|\\
+|footnotesize| & |font=footnotesize|\\
+|small| & |font=small|\\
+|normalsize| & |font=normalsize|\\
+|large| & |font=large|\\
+|Large| & |font=Large|\\
+|up| & |labelfont=up|\\
+|it| & |labelfont=it|\\
+|sl| & |labelfont=sl|\\
+|sc| & |labelfont=sc|\\
+|md| & |labelfont=md|\\
+|bf| & |labelfont=bf|\\
+|rm| & |labelfont=rm|\\
+|sf| & |labelfont=sf|\\
+|tt| & |labelfont=tt|\\
+\end{longtable}}
+
+Beside the options for setting up the desired font there were also
+the commands |\captionsize| resp.~|\captionfont| and |\captionlabelfont|
+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{quote}
+ |\DeclareCaptionFont{|\ldots|}{|\ldots|}|\qquad and\\
+ |\captionsetup{font=|\ldots|,labelfont=|\ldots|}|\qquad.
+\end{quote}\SeeUserDefined
+
+Setting the margin for captions was done in \version{1.x} with
+\begin{quote}
+ |\setlength{\captionmargin}{|\ldots|}|\quad.
+\end{quote}
+This was replaced by
+\begin{quote}
+ |\captionsetup{margin=|\ldots|}|\qquad.
+\end{quote}
+\See{\Ref{margins}}
+
+For example the old-style code
+\begin{quote}
+|\usepackage[hang,bf]{caption}|\\
+|\renewcommand\captionfont{\small\sffamily}|\\
+|\setlength\captionmargin{10pt}|
+\end{quote}
+will still work fine, but should be written today as
+\begin{quote}
+|\usepackage[format=hang,labelfont=bf,font={small,sf},|\\
+| margin=10pt]{caption}|
+\end{quote}
+or
+\begin{quote}
+|\usepackage{caption}|\\
+|\captionsetup{format=hang,labelfont=bf,font={small,sf},|\\
+| margin=10pt}|\qquad.
+\end{quote}
+
+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.
+But using this option is not recommended anymore since this
+version of \thispackage\ offers a more flexible way
+for changing the captions of these floating environments:
+\begin{quote}
+ |\DeclareCaptionStyle{ruled}{|\ldots|}|
+\end{quote}
+resp.
+\begin{quote}
+ |\captionsetup[ruled]{|\ldots|}|\qquad.
+\end{quote}
+\SeeUserDefined[, \Ref{commands}, and \Ref{float}]
+
+\subsection{caption2 v\texorpdfstring{$2.x$}{2.x}}
+\label{caption2}
+
+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.
+For that reason you will still find a file called |caption2.sty| in
+this package distribution, so old documents using the \package{caption2}
+package will still compile fine.
+
+Newly created documents should use the actual version of
+\thispackage\ instead. In most cases it's sufficient to replace the command
+\begin{quote}
+ |\usepackage[...]{caption2}|
+\end{quote}
+by
+\begin{quote}
+ |\usepackage[...]{caption}|\qquad.
+\end{quote}
+But some options and commands will not be emulated, so you can get
+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 asking
+for help.
+
+In addition to the obsolete options shown in the last section
+these ones will be emulated, too:
+
+{\small\begin{longtable}{ll}
+\package{caption2} \version{2.x} & \package{caption} \version{3.x}\\
+\hline
+\endhead
+|flushleft| & |justification=raggedright|\\
+|flushright| & |justification=raggedleft|\\
+|oneline| & |singlelinecheck=on|\\
+\end{longtable}}
+
+Setting the margin for captions was done in \version{2.x} with
+\begin{quote}\leavevmode\hbox{%
+ |\setcaptionmargin{|\ldots|}| resp.
+ |\setcaptionwidth{|\ldots|}|\quad.
+}\end{quote}
+This was replaced by
+\begin{quote}\leavevmode\hbox{%
+ |\captionsetup{margin=|\ldots|}| resp.
+ |\captionsetup{width=|\ldots|}|\quad.
+}\end{quote}
+\See{\Ref{margins}}
+
+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).
+This was replaced by
+|\captionsetup{|\xx|singlelinecheck=|\xx|off}|
+resp.
+|\captionsetup{|\xx|singlelinecheck=|\xx|on}|.
+\See{\Ref{justification}}
+
+The commands
+\begin{quote}
+ |\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 \thispackage. (So using them will
+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.
+
+\iffalse
+... (some examples)
+\fi
+
+The \version{2.x} option |ignoreLTcapwidth| do not have a replacement, too.
+But in most cases you can simply drop using that option because
+in this version of \thispackage\ the value of |\LTcapwidth|
+will be ignored anyway (unless you set it to a different value than the
+default one which is |4in|).
+\See{\Ref{longtable}}
+
+\subsection{caption v\texorpdfstring{$3.0$}{3.0}}
+\label{caption3}
+
+%\NEWdescription{v3.1}
+\Thispackage\ \version{3.0} did not support any document classes
+other than the standard \LaTeX\ ones: |article|, |report|, and |book|.
+Therefore the default settings used to be fixed, but now \thispackage{}
+supports more classes, therefore they are now set in dependence on the
+document class used.
+
+For example: While in \version{3.0} the default caption |justification| used
+to be always |justified|, it's now still |justified| when using one of the
+standard document classes, but |raggedright| will be used as default format
+when when used with the \package{beamer} document class.
+
+%An easy way to select the `old' defaults---if desired---is using the option
+An easy way to select the `old' defaults is using the option
+|style=base| when loading \thispackage\ (or later on using |\captionsetup|).
+
+% --------------------------------------------------------------------------- %
+
+\pagebreak[4]
+\section{Alphabetical Reference}
+
+%\newenvironment{Warnings}%
+% {\begin{trivlist}%
+% \def\Message{\pagebreak[3]\leftskip=0pt\relax\item[]\color{blue}}%
+% \def\Description{\nopagebreak\par\nopagebreak\color{black}\leftskip=1.5em\nopagebreak}%
+% }%
+% {\color{black}\end{trivlist}}
+\newenvironment{Warnings}{%
+ \newif\ifMessage
+ \def\Message{%
+ \ifMessage\end{minipage}\par\vspace\itemsep\pagebreak[3]\fi
+ \begin{minipage}{\linewidth}%
+ \setlength\parindent{0pt}%
+ \setlength\parskip{\smallskipamount}%
+ \setlength\leftskip{0pt}%
+ \color{blue}%
+ \Messagetrue}%
+ \def\Description{%
+ \par\color{black}\leftskip=1.5em}%
+}{%
+ \ifMessage\end{minipage}\par\fi
+}
+
+\subsection{Commands}
+
+\begin{longtable}{lll}
+Command & & Section \\
+\hline
+\endhead
+|\abovecaptionskip| & & \ref{skips} \\
+%|\AtBeginCaption| & & \ref{x} \\
+%|\AtEndCaption| & & \ref{x} \\
+|\belowcaptionskip| & & \ref{skips} \\
+|\caption| & & \ref{commands} \\
+|\caption*| & & \ref{commands} \\
+|\captionbox| & & \ref{x} \\
+|\captionof| & & \ref{commands} \\
+|\captionof*| & & \ref{commands} \\
+|\captionsetup| & & \ref{commands} \\
+|\captionsetup*| & & \ref{commands} \\
+|\centerfirst| & & \ref{justification} \\
+|\centerlast| & & \ref{justification} \\
+|\clearcaptionsetup| & & \ref{commands} \\
+|\clearcaptionsetup*| & & \ref{commands} \\
+|\ContinuedFloat| & & \ref{ContinuedFloat} \\
+|\DeclareCaptionFont| & & \ref{declare} \\
+|\DeclareCaptionFormat| & & \ref{declare} \\
+|\DeclareCaptionFormat*| & & \ref{declare} \\
+|\DeclareCaptionJustification| & & \ref{declare} \\
+|\DeclareCaptionLabelFormat| & & \ref{declare} \\
+|\DeclareCaptionLabelSeparator| & & \ref{declare} \\
+|\DeclareCaptionLabelSeparator*| & & \ref{declare} \\
+|\DeclareCaptionListOfFormat| & & \ref{declare} \\
+|\DeclareCaptionOption| & & \ref{declare} \\
+|\DeclareCaptionStyle| & & \ref{declare} \\
+|\DeclareCaptionTextFormat| & & \ref{declare} \\
+|\showcaptionsetup| & & \ref{commands} \\
+\end{longtable}
+
+\pagebreak[4]
+\subsection{Options}
+\newcommand\preambleoption{ \footnotemark[1]}
+
+\begin{longtable}{lll}
+Option & Short description & Section \\
+\hline
+\endhead
+|aboveskip| & sets the skip above caption & \ref{skips} \\
+|belowskip| & sets the skip below caption & \ref{skips} \\
+|compatibility|\preambleoption & force (non-)compatibility & \ref{classes} \\
+%|config| & & \ref{x} \\
+|figurename|\preambleoption & sets the figure name & \ref{x} \\
+|figureposition|\preambleoption & gives a hint about the figure caption position & \ref{skips} \\
+|font| & sets the font & \ref{fonts} \\
+|format| & sets the format & \ref{formats} \\
+|hangindent| & sets the hang indention & \ref{margins} \\
+|hypcap| & select `hypcap' feature & \ref{hyperref} \\
+|hypcapspace| & sets the distance between hyperlink \& contents & \ref{hyperref} \\
+|indention| & sets the indention & \ref{margins} \\
+|justification| & sets the justification & \ref{justification} \\
+|labelfont| & sets the font of the caption label & \ref{fonts} \\
+|labelformat| & sets the format of the caption label & \ref{formats} \\
+|labelsep| & sets the label separator & \ref{formats} \\
+|labelseparator| & sets the label separator & \ref{formats} \\
+|listof| & switches the entries in the `List of' on or off & \ref{listof} \\
+|listofformat| & sets the `List of' entry format & \ref{listof} \\
+|margin| & sets the margin & \ref{margins} \\
+|margin*| & sets the margin, but only if no width is set & \ref{margins} \\
+|maxmargin| & sets the max. margin & \ref{margins} \\
+|minmargin| & sets the min. margin & \ref{margins} \\
+|options| & executes the given option list & \ref{x} \\
+|parindent| & sets the paragraph indention & \ref{margins} \\
+|parskip| & sets the skip between paragraphs & \ref{margins} \\
+|position| & gives a hint about the caption position & \ref{skips} \\
+|singlelinecheck| & switches the single-line-check on or off & \ref{justification} \\
+%|size| & sets the size of font & \ref{x} \\
+|skip| & sets the skip between content \& caption & \ref{skips} \\
+|strut| & switches the usage of |\strut|s on or off & \ref{formats} \\
+|style| & sets the caption style & \ref{style} \\
+|tablename|\preambleoption & sets the table name & \ref{x} \\
+|tableposition|\preambleoption & gives a hint about the table caption position & \ref{skips} \\
+|textfont| & sets the font of the caption text & \ref{fonts} \\
+|textformat| & sets the format of the caption text & \ref{formats} \\
+|twoside| & selects the two-side mode & \ref{x} \\
+|type| & sets the caption type \& places a hyperlink anchor & \ref{x} \\
+|type*| & sets the caption type only & \ref{x} \\
+|width| & sets a fixed caption width & \ref{margins} \\
+\end{longtable}
+\footnotetext[1]{These options are only available in the preamble of the document.}
+
+\nopagebreak
+{\small\emph{Note:} Obsolete options are not listed here. See\\
+ \hspace*{1em}\Ref{caption1} and\\
+ \hspace*{1em}\Ref{caption2} for a list of these options.}
+
+\pagebreak[4]
+\subsection{Warnings}
+
+\begin{Warnings}
+
+\Message
+ |*************************************************|\\
+ |\caption will not be redefined since it's already|\\
+ |redefined by a document class or package which is|\\
+ |unknown to the caption package.|\\
+ |As a result some new features of the caption|\\
+ |package will not work as expected.|\\
+ |*************************************************|
+\Description
+ If \thispackage\ detects that some (unknown) documentclass or
+ package has enhanced |\caption|, it will not redefine
+ |\caption|, too, since this would simply kill the enhancement.
+ As a result some features, like |\caption*|, |\ContinuedFloat|,
+ using the optional argument of |\captionsetup|,
+ or the options |listof=| \& |hypcap=| will be ignored or
+ not work as expected.\par
+ If you don't care about the original enhancements but would
+ like to use the full range of features of \thispackage\ instead
+ you can give the unsupported(!) option |compatibility=false|
+ a try and keep your fingers crossed.
+ (But you will get the next warning instead.)
+ \par\See{\Ref{classes}}
+
+\Message
+ |*****************************************************|\\
+ |Forced redefinition of \caption since the|\\
+ |unsupported(!) package option `compatibility=false'|\\
+ |was given. Please fasten your seat belts, as we may|\\
+ |experience turbulence!|\\
+ |*****************************************************|
+\Description
+ Since you were so keen to specify the option |compatibility=false|
+ \thispackage\ will try to do its best to fulfill your wishes.
+ But depending on the document class or other packages you use that
+ can end in non-functional features or even errors. So keep your
+ fingers crossed!
+ \par\See{\Ref{classes}}
+
+\Message
+ |Caption type was already set to `|\meta{type}|'.|
+\Description
+ This warning informs you about mixed caption options. For example if
+ you use a |\captionof{table}{|\ldots|}| inside a |figure| environment,
+ this would result in using both option sets for that specific caption,
+ the ones for |figure| (specified with |\captionsetup[figure]{|\ldots|}|)
+ and the one for |table| (specified with |\captionsetup[table]{|\ldots|}|)
+ as well.
+ \par\See{\Ref{commands}}
+
+\Message
+ |Hyperref support is turned off because hyperref has|\\
+ |stopped early.|
+\Description
+ If the \package{hyperref} package stopps early during loading
+ (because of what-ever reason), the \package{hyperref} support of
+ \thispackage\ will not be available. As a result you could get
+ \package{hyperref} warnings and non-functional hyperlinks to figures
+ or tables.
+ \par\See{\Ref{hyperref}}
+
+\Message
+ |Ignoring optional argument [|\meta{pos}|] of \setcapwidth.|
+\Description
+ \Thispackage\ tries to emulate the \KOMAScript\ commands regarding
+ captions as best as it can. But the optional argument of the
+ \KOMAScript\ command |\setcapwidth| is not (yet) working if you use
+ this package, so if you try to use it anyway, you will get this warning.
+ \par\See{\Ref{KOMA}}
+
+\Message
+ |Option `|\meta{option}|' was not in list `|\meta{option list}|'.|
+\Description
+ If you try to remove a specific option of an option list,
+ for example with\linebreak|\clearcaptionsetup[position]{table}|,
+ and this option can not be found inside the option list, you will
+ get this warning. If this is not because of a typo and you would like
+ to suppress this warning, use |\clearcaptionsetup*| instead of
+ |\clearcaptionsetup|.
+ \par\See{\Ref{commands}}
+
+\Message
+ |Option list `|\meta{option list}|' undefined.|
+\Description
+ If you try to remove a specific option of an option list,
+ for example with\linebreak|\clearcaptionsetup[format]{figure}|,
+ and this option list is not defined (yet), you will
+ get this warning. If this is not because of a typo and you would like
+ to suppress this warning, use |\clearcaptionsetup*| instead of
+ |\clearcaptionsetup|.
+ \par\See{\Ref{commands}}
+
+\iffalse
+\Message
+ |Possibly superfluous \restylefloat{|\meta{type}|} detected.|\\
+ |If you think that this warning is unjustified,|\\
+ |you can switch it off using the caption package|\\
+ |option `restylefloatcheck=off'.|
+\Description
+ \TODO
+\fi
+
+\Message
+ |`ragged2e' package not loaded, therefore|\\
+ |substituting \raggedright for \RaggedRight.|
+\Description
+ The caption option |justification=|\xx|RaggedRight| is only full functional
+ if you have the \package{ragged2e} package installed in your \TeX\ system.
+ If not, you will get this warning, and |justification=|\xx|RaggedRight|
+ will be treated as |justification=|\xx|raggedright|.
+ \par\See{\Ref{justification}}
+
+\Message
+ |Obsolete option `ignoreLTcapwidth' ignored.|
+\Description
+ The \package{caption2} package option |ignoreLTcapwidth| will not be
+ emulated by this version of \thispackage, usually you can simply wipe it
+ away.
+ \par\See{\Ref{caption2} and \Ref{longtable}}
+
+\Message
+ |`ragged2e' support has been changed. Rerun to get|\\
+ |captions right.|
+\Description
+ The \package{ragged2e} package will only be loaded by \thispackage\ if it
+ is actually needed.
+ At least two \LaTeX\ runs are needed for that, so on the first run you could
+ get this warning.
+ Just compile your document again and this warning should go away.
+ \par\See{\Ref{justification}}
+
+\Message
+ |Reference on page |\meta{page no.}| undefined.|
+\Description
+ If you use a |twoside| page layout, \thispackage\ needs to track the
+ page numbers to get the margins right.
+ At least two \LaTeX\ runs are needed for that, on the first run you could get
+ this warning.
+ Just compile your document again and this warning should go away.
+ \par\See{\Ref{margins}}
+
+\Message
+ |The option `hypcap=true' will be ignored for this|\\
+ |particular \caption.|
+\Description
+ \Thispackage\ hasn't found a proper hyperlink anchor for this particular
+ caption, so it decides to ignore the setting |hypcap=true| (which is set by
+ default). As a result a link to this caption (e.g.~in the List of Figures,
+ or set by |\ref| or |\autoref|) will link you to the caption of the figure
+ or table, not to the figure or table itself.\par
+ This can happen if you use |\captionof| inside a non-floating environment,
+ but also if you use some package which redefines |figure| or |table|, and
+ which is unknown to \thispackage.\par
+ If this is ok for you but you want to supress this warning, simply place a
+ |\captionsetup{|\xx|hypcap=|\xx|false}| just before the |\caption| or
+ |\captionof| command which is causing the warning.
+ If this is not ok for you you can try to set a hyperlink anchor with
+ |\captionsetup{|\xx|type=|\xx\meta{float type}|}| for yourself.
+ \par\See{\Ref{hyperref}}
+
+\Message
+ |Unsupported document class (or package) detected,|\\
+ |usage of the caption package is *not* recommended.|
+\Description
+ Either the document class you use is unknown to \thispackage, or you
+ have included a package in your document which redefines |\@makecaption|
+ (which is responsible for typeseting the caption) as well.
+ This means \thispackage\ will either change the design of captions in an
+ unwanted way, or it even refuses to work correctly at all.
+ \par\See{\Ref{classes}}
+
+\Message
+ |Unused \captionsetup[|\meta{type}|].|
+\Description
+ You have specified options with |\captionsetup[|\meta{type}|]| which are
+ not used later on in the document. This can be because of a typo in \meta{type},
+ or because you use a package which redefines |figure| or |table| and
+ which is unknown to \thispackage, or simply because you don't have any usage
+ of the environment \meta{type} after this line.\par
+ If you want to supress this warning you can use |\captionsetup*| instead of
+ |\captionsetup|.
+ \par\See{\Ref{commands}}
+
+\Message
+ |Usage of the |\meta{package}| package together with the|\\
+ |caption package is strongly *not* recommended.|\\
+ |Instead of loading the |\meta{package}| package you should|\\
+ |use the caption package option `tableposition=top'.|
+\Description
+ The package \meta{package} is dealing with caption skips as well.
+ Please decide which one do you actually want to use, \thispackage\ or the
+ other one, using both can lead to wrong skips above or below the caption.
+ \par\See{\Ref{skips}}
+
+\Message
+ |Wrong TeX mode, no hyperlink anchor was set.|
+\Description
+% \Thispackage\ can only set hyperanchors in \TeX s vertical mode.\par
+ You should never see this warning, either you use a package which redefines
+ |figure| or |table| and which is unknown to \thispackage, or this is a bug
+ in \thispackage.
+ Please send me an e-mail reporting this issue.
+
+\end{Warnings}
+
+\pagebreak[4]
+\subsection{Errors}
+
+\begin{Warnings}
+
+\Message
+ |! Argument of \@caption has an extra }.|
+\Description
+ If you want to typeset something special (like a tabular) as caption,
+ you need to give an optional argument to |\caption| resp.~|\captionof|
+ for the List of Figures resp.~List of Tables, too, even if you don't
+ use such list.
+ \par\See{\Ref{commands}, \Ref{listof}, and \Ref{hyperref}\,}
+
+\Message
+ |\caption outside float.|
+\Description
+ You have placed a |\caption| command outside a floating environment or
+ a |longtable|. If this is what you want to, please use either
+ |\captionsetup{|\xx|type=|\xx\meta{type}|}| $+$ |\caption| or |\captionof|.
+ \par\See{\Ref{commands}}
+
+\Message
+ |\caption outside group or environment.|
+\Description
+ You have placed a |\caption| command outside an box, group, or environment.
+ This is not supported.
+ \par\See{\Ref{commands}}
+
+\Message
+ |\captionsetup{type=|\meta{type}|} outside group or environment.|
+\Description
+ You have placed a |\captionof| or |\captionsetup{|\xx|type=|\xx\meta{type}|}|
+ command outside an box, group, or environment. This is not supported.
+ \par\See{\Ref{commands}}
+
+\Message
+ |\ContinuedFloat outside float.|
+\Description
+ You have placed a |\ContinuedFloat| command outside a floating environment.
+% or |longtable|.
+ If this is what you want to, please use the combination
+ |\captionsetup{|\xx|type=|\xx\meta{type}|}| $+$ |\ContinuedFloat|.\par
+ Please note that |\ContinuedFloat| inside a |longtable| is not working (yet),
+ but maybe using the |longtable*| environment, which typesets a longtable
+ without incrementing the |table| counter, if sufficient for you.
+ \par\See{\Ref{commands} and \Ref{longtable}}
+
+\Message
+ |Continued `|\meta{type}|' after `|\meta{type}|'.|
+\Description
+ At the moment continued figures or tables are not allowed to be interrupted
+ by a floating envionment of another type, e.g.~a table between a figure and a
+ continued figure.
+ \par\See{\Ref{ContinuedFloat}}
+
+\Message
+ |For a successful cooperation of the `wrapfig' package|\\
+ |with the `float' package you should load the `wrapfig'|\\
+ |package *(right) after* the `float' package.|
+\Description
+ Please take care of the load order of packages
+ if you use the \package{wrapfig} package in coorperation with the
+ \package{float} package.
+ \par\See{\Ref{wrapfig}}
+
+\Message
+ |For a successful cooperation of the `wrapfig' package|\\
+ |with the `float' package you should use at least|\\
+ |`wrapfig' version 3.6.|
+\Description
+ Please take care of the version of the \package{wrapfig} package
+ if you use the \package{wrapfig} package in coorperation with the
+ \package{float} package.
+ \par\See{\Ref{wrapfig}}
+
+\Message
+ |For a successful cooperation we need at least version|\\
+ |`|\meta{date}|' of package |\meta{package}|, but only version|\\
+ |`|\meta{old-date}|' is available.|
+\Description
+ \Thispackage\ does not work with such an outdated package, please update it
+ to a more recent version, at least to the one requested.
+
+\Message
+ |Internal error: |\meta{internal-error-message}|.|
+\Description
+ You should never see this error.
+ Please send me an e-mail reporting this issue.
+
+\Message
+ |Not allowed in longtable* environment.|
+\Description
+ The usage of |\caption| is not allowed inside the |longtable*| environment.
+ Please use either |\caption*| for a caption without label or use the regular
+ |longtable| environment instead.
+
+\Message
+ |Not available in compatibility mode.|
+\Description
+ The feature required is not supported in compatibility mode.
+ `compatibility mode' means that \thispackage\ has detected either an
+ incompatible document class or an incompatible package which also
+ extents the |\caption| command. Leaving the original extention intact,
+ some features of \thispackage\ are not supported.
+ \par\See{\Ref{compatibility}}
+
+\Message
+ |Runaway argument?|\\
+ |! Paragraph ended before \caption@makecurrent was complete.|
+\Description
+ If you want to typeset multi-paragraph captions, you need to give an
+ optional argument to |\caption| resp.~|\captionof| for the List of
+ Figures resp.~List of Tables, too, even if you don't use such list.
+ \par\See{\Ref{commands}, \Ref{listof}, and \Ref{hyperref}\,}
+
+\Message
+ |Something is going wrong here...|\\
+ |For a removal of this problem please consult the|\\
+ |caption package documentation, especially the sections|\\
+ |about the `float' and the `wrapfig' package.|
+\Description
+ Please take care of the load order of packages
+ if you use the \package{wrapfig} package in coorperation with the
+ \package{float} package. But maybe a different package tried to extent
+ the \package{float} package in a manner which is incompatible to
+ \thispackage!?
+ \par\See{\Ref{float} and \Ref{wrapfig}}
+
+\iffalse
+\Message
+ |Something's wrong--perhaps a missing \caption|\\
+ |in the last figure or table.|
+\Description
+ It seems that you have used a |\subcaption| command without a
+ corresponding |\caption| command. This is not supported.
+\fi
+
+\Message
+ |The package option `caption=false' is obsolete.|\\
+ |Please pass this option to the subfig package instead|\\
+ |and do *not* load the caption package anymore.|
+\Description
+ You have specified the option |caption=false|. This used to be a workaround
+ for not using the whole \package{caption} package, leaving the caption stuff
+ offered by the document class or other packages intact, but keeping the
+ \package{subfig} package working. This mechanism is obsolet and not offered
+ anymore, please pass this option to the \package{subfig} instead and do not
+ load \thispackage\ anymore.
+ \par\See{the \package{subfig}\cite{subfig} documentation}
+
+\Message
+ |Undefined boolean value `|\meta{value}|'.|
+\Description
+ You tried to set a boolean option (like |singlelinecheck=| or |hypcap=|)
+ with an improper value. Only |false|, |no|, |off|, |0| or |true|, |yes|,
+ |on|, |1| is allowed here.
+
+\Message
+ |Undefined format `|\meta{name}|'.|
+\Description
+ You tried to set a caption format which does not exists.
+ Maybe a typo!?
+ \par\See{\Ref{formats}}
+
+\Message
+ |Undefined label format `|\meta{name}|'.|
+\Description
+ You tried to set a caption label format which does not exists.
+ Maybe a typo!?
+ \par\See{\Ref{formats}}
+
+\Message
+ |Undefined label separator `|\meta{name}|'.|
+\Description
+ You tried to set a caption label separator which does not exists.
+ Maybe a typo!?
+ \par\See{\Ref{formats}}
+
+\Message
+ |Undefined list-of format `|\meta{name}|'.|
+\Description
+ You tried to set a caption list-of format which does not exists.
+ Maybe a typo!?
+ \par\See{\Ref{listof}}
+
+\Message
+ |Undefined position `|\meta{name}|'.|
+\Description
+ You tried to set a caption position with an improper value.
+ Maybe a typo!?
+ \par\See{\Ref{skips}}
+
+\Message
+ |Undefined style `|\meta{name}|'.|
+\Description
+ You tried to set a caption style which does not exists.
+ Maybe a typo!?
+ \par\See{\Ref{style}}
+
+\Message
+ |Undefined text format `|\meta{name}|'.|
+\Description
+ You tried to set a caption text format which does not exists.
+ Maybe a typo!?
+ \par\See{\Ref{formats}}
+
+\Message
+ |You can't use both, the (obsolete) caption2 *and*|\\
+ |the (current) caption package.|
+\Description
+ This error message says it all, you simply can't do that.
+ Please use only \thispackage.
+ \par\See{\Ref{caption2}}
+
+\Message
+ |You can't use the caption package option|\\
+ | `tableposition=|\meta{position}|'|\\
+ |and use the |\meta{package}| package, too.|\\
+ {\color{black}\hspace{1.5em}-or-}\\
+ |You can't use the global option|\\
+ | `tablecaptionabove'|\\
+ |and use the |\meta{package}| package, too.|
+\Description
+% (ftcap,nonfloat,topcapt)
+ The package \meta{package} is dealing with caption skips as well.
+ Please decide which one do you actually want to use, \thispackage\ or the
+ other one, using both this way will lead to wrong skips above or below the
+ caption.
+ \par\See{\Ref{skips}}
+
+\end{Warnings}
+
+% --------------------------------------------------------------------------- %
+
+\pagebreak[4]
+\section{Further reading}
+
+I recommend the following documents for further reading:
+
+\begin{itemize}
+\item
+ The \TeX\ FAQ -- Frequently asked questions about \TeX\ and \LaTeX:
+ \begin{quote}\url{http://faq.tug.org/}\end{quote}
+
+\item
+ A French FAQ can be found at
+ \begin{quote}\url{http://www.grappa.univ-lille3.fr/FAQ-LaTeX/}\end{quote}
+
+\item
+ ``What is a minimal working example?'' from Christian Faulhammer and Ulrich Schwarz:
+ \begin{quote}\url{http://www.minimalbeispiel.de/mini-en.html}\end{quote}
+
+\item
+ \textsf{epslatex} from Keith Reckdahl contains many tips around
+ including graphics in \LaTeXe\ documents.
+ You will find this document in the directory
+ \begin{quote}\url{ftp://tug.ctan.org/pub/tex/info/epslatex/}\end{quote}
+\end{itemize}
+
+% --------------------------------------------------------------------------- %
+
+\pagebreak[2]
+\section{Thanks}
+
+I would like to thank Katja Melzner,
+Steven D. Cochran, Frank Mittelbach, Olga Lapko,
+David Carlisle, Carsten Heinz, and Keith Reckdahl.
+Thanks a lot for all your help, ideas, patience, spirit, and support!
+
+Also I would like to thank
+Harald Harders,
+Peter L\"offler,
+Peng Yu,
+Alexander Zimmermann,
+Matthias Pospiech,
+J\"urgen Wieferink,
+Christoph Bartoschek,
+Uwe St\"ohr,
+Ralf Stubner,
+Geoff Vallis,
+Florian Keiler,
+J\"urgen G\"obel,
+Uwe Siart,
+Sang-Heon Shim,
+Henrik Lundell,
+David Byers,
+William Asquith,
+and
+Prof.~Dr.~Dirk Hoffmann,
+who all helped to make this package a better one.
+
+% --------------------------------------------------------------------------- %
+
+\pagebreak[4]
+\begin{thebibliography}{99}
+ \bibitem{TLC2}
+ Frank Mittelbach and Michel Goossens:\\
+ \newblock {\em The {\LaTeX} Companion (2nd.~Ed.)},\\
+ \newblock Addison-Wesley, 2004.
+
+ \bibitem{beamer}
+ Till Tantau:\\
+ \href{ftp://tug.ctan.org/tex-archive/macros/latex/contrib/beamer/doc/beameruserguide.pdf}%
+ {\emph{User Guide to the Beamer Class, Version 3.07}},\\
+ March 11, 2007
+
+ \bibitem{KOMAScript}
+ Markus Kohm \& Jens-Uwe-Morawski:\\
+ \href{ftp://tug.ctan.org/tex-archive/macros/latex/contrib/koma-script/scrguien.pdf}%
+ {\emph{KOMA-Script -- a versatile \LaTeXe\ bundle}},\\
+ 2007-01-09
+
+ \bibitem{NTG}
+ Victor Eijkhout:\\
+ \href{ftp://tug.ctan.org/tex-archive/macros/latex/contrib/ntgclass/classdoc.pdf}%
+ {\emph{An introduction to the Dutch \LaTeX\ document classes}},\\
+ 3 September 1989
+
+ \bibitem{float}
+ Anselm Lingnau:\\
+ \href{ftp://tug.ctan.org/tex-archive/macros/latex/contrib/float/float.pdf}%
+ {\emph{An Improved Environment for Floats}},\\
+ 2001/11/08
+
+ \bibitem{floatflt}
+ Mats Dahlgren:\\
+ \href{ftp://tug.ctan.org/tex-archive/macros/latex/contrib/floatflt/floatflt.pdf}%
+ {\emph{Welcome to the floatflt package}},\\
+ 1998/06/05
+
+ \bibitem{floatrow}
+ Olga Lapko:\\
+ \href{ftp://tug.ctan.org/tex-archive/macros/latex/contrib/floatrow/floatrow.pdf}%
+ {\emph{The floatrow package documentation}},\\
+ 2006/07/24
+
+ \bibitem{fltpage}
+ Sebastian Gross:\\
+ \href{ftp://tug.ctan.org/tex-archive/macros/latex/contrib/fltpage/fltpage.pdf}%
+ {\emph{Welcome to the beta test of fltpage package!}},\\
+ 1998/11/13
+
+ \bibitem{hyperref}
+ Sebastian Rahtz \& Heiko Oberdiek:\\
+ \href{ftp://tug.ctan.org/tex-archive/macros/latex/contrib/hyperref/hyperref.pdf}%
+ {\emph{Hypertext marks in \LaTeX}},\\
+ June 14, 2007
+
+ \bibitem{hypcap}
+ Heiko Oberdiek:\\
+ \href{ftp://tug.ctan.org/tex-archive/macros/latex/contrib/oberdiek/hypcap.pdf}%
+ {\emph{The hypcap package -- Adjusting anchors of captions}},\\
+ 2007/04/09
+
+ \bibitem{listings}
+ Carsten Heinz \& Brooks Moses:\\
+ \href{ftp://tug.ctan.org/tex-archive/macros/latex/contrib/listings/listings.pdf}%
+ {\emph{The Listings Package}},\\
+ 2007/02/22
+
+ \bibitem{longtable}
+ David Carlisle:\\
+ \href{ftp://tug.ctan.org/tex-archive/macros/latex/required/tools/longtable.pdf}%
+ {\emph{The longtable package}},\\
+ 2004/02/01
+
+ \bibitem{picinpar}
+ Friedhelm Sowa:\\
+ \href{ftp://tug.ctan.org/tex-archive/macros/latex209/contrib/picinpar/}%
+ {\emph{Pictures in Paragraphs}},\\
+ July 13, 1993
+
+ \bibitem{picins}
+ Joachim Bleser and Edmund Lang:\\
+ \href{ftp://tug.ctan.org/tex-archive/macros/latex209/contrib/picins/mpic.dvi}%
+ {\emph{PicIns-Benutzerhandbuch Version 3.0}},\\
+ September~1992
+
+ \bibitem{rotating}
+ Sebastian Rahtz and Leonor Barroca:\\
+ \href{ftp://tug.ctan.org/tex-archive/macros/latex/contrib/rotating/}%
+ {\emph{A style option for rotated objects in \LaTeX}},\\
+ 1997/09/26
+
+ \bibitem{sidecap}
+ Rolf Niepraschk \& Hubert G\"a\ss lein:\\
+ \href{ftp://tug.ctan.org/tex-archive/macros/latex/contrib/sidecap/sidecap.pdf}%
+ {\emph{The sidecap package}},\\
+ 2003/06/06
+
+ \bibitem{subfigure}
+ Steven D. Cochran:\\
+ \href{ftp://tug.ctan.org/tex-archive/macros/latex/contrib/subfigure/subfigure.pdf}%
+ {\emph{The subfigure package}},\\
+ 2002/07/02
+
+ \bibitem{subfig}
+ Steven D. Cochran:\\
+ \href{ftp://tug.ctan.org/tex-archive/macros/latex/contrib/subfig/subfig.pdf}%
+ {\emph{The subfig package}},\\
+ 2005/07/05
+
+ \bibitem{supertabular}
+ Johannes Braams and Theo Jurriens:\\
+ \href{ftp://tug.ctan.org/tex-archive/macros/latex/contrib/supertabular/supertabular.pdf}%
+ {\emph{The supertabular environment}},\\
+ 2002/07/19
+
+ \bibitem{threeparttable}
+ Donald Arseneau:\\
+ \href{ftp://tug.ctan.org/tex-archive/macros/latex/contrib/misc/threeparttable.sty}%
+ {\emph{Three part tables: title, tabular environment, notes}},\\
+ 2003/06/13
+
+ \bibitem{wrapfig}
+ Donald Arseneau:\\
+ \href{ftp://tug.ctan.org/tex-archive/macros/latex/contrib/wrapfig/wrapfig.sty}%
+ {\emph{WRAPFIG.STY ver 3.6}},\\
+ 2003/01/31
+\end{thebibliography}
+
+% --------------------------------------------------------------------------- %
+
+\end{document}
diff --git a/Master/texmf-dist/doc/latex/caption/caption-rus.pdf b/Master/texmf-dist/doc/latex/caption/caption-rus.pdf
new file mode 100644
index 00000000000..80802bf0584
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/caption/caption-rus.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/caption/caption-rus.tex b/Master/texmf-dist/doc/latex/caption/caption-rus.tex
new file mode 100644
index 00000000000..8a47c6521c8
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/caption/caption-rus.tex
@@ -0,0 +1,2554 @@
+% \iffalse meta-comment
+%
+% This is file `caption-rus.tex'.
+% Russian translation of documented part of `caption.dtx'
+%
+% Copyright (C) 1994-2007 Axel Sommerfeldt (caption@sommerfee.de)
+% and Olga Lapko (Lapko.O@g23.relcom.ru)
+%
+% --------------------------------------------------------------------------
+%
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2003/12/01 or later.
+%
+% This work has the LPPL maintenance status "maintained".
+%
+% This Current Maintainer of this work is Axel Sommerfeldt.
+%
+% This work consists of the files caption.ins, caption.dtx, caption2.dtx,
+% ltcaption.dtx, and subcaption.dtx, the derived files caption.sty,
+% caption2.sty, caption3.sty, ltcaption.sty, and subcaption.sty, and the
+% user manuals caption-deu.tex, caption-eng.tex, and caption-rus.tex.
+%
+% \fi
+% \CheckSum{0}
+%
+% \iffalse
+%<*driver>
+\documentclass[russian]{ltxdoc}
+
+\usepackage{mathtext}
+\usepackage[T2A]{fontenc}
+\usepackage[cp1251]{inputenc}
+\usepackage{babel}
+\usepackage{listpen}
+\setlength\parindent{0pt}
+\setlength\parskip{\smallskipamount}
+%
+\newcommand\NEWfeature{\NEW{Íîâàÿ âîçìîæíîñòü}}
+\newcommand\NEWdescription{\NEW{Íîâîå îïèñàíèå}}
+%
+\font\manual=manfnt
+\newcommand\DANGER{\hskip 1sp \marginpar{\raggedleft\textcolor{blue}{{\manual\char127}}}}
+%
+\ifx\pdfoutput\undefined\else
+ \ifcase\pdfoutput\else
+% \usepackage{mathptmx,courier}
+% \usepackage[scaled=0.90]{helvet}
+% \def\rmdefault{ftm}
+% \def\sfdefault{ftx}
+% \def\ttdefault{cmtt}
+ \addtolength\marginparwidth{15pt}
+ \fi
+\fi
+%
+%\usepackage[french,USenglish]{babel}
+\usepackage{color,setspace}
+%
+%\usepackage{float}
+\usepackage{longtable}
+%\usepackage[raggedright]{sidecap}
+%
+\usepackage{caption}[2005/08/24]
+\DeclareCaptionLabelSeparator{endash}{\space\textendash\space}
+\usepackage[unicode]{hyperref}
+%
+\DeclareCaptionFont{singlespacing}{\setstretch{1}}
+\DeclareCaptionFont{onehalfspacing}{\onehalfspacing}
+\DeclareCaptionFont{doublespacing}{\doublespacing}
+\DeclareCaptionFont{red}{\color{red}}
+\DeclareCaptionFont{green}{\color{green}}
+\DeclareCaptionFont{blue}{\color{blue}}
+%
+\DeclareCaptionLabelSeparator{period-newline}{. \\}
+\DeclareCaptionStyle{period-newline}[labelsep=period]{labelsep=period-newline}
+\DeclareCaptionStyle{period-newline2}[labelsep=period,justification=centering]{labelsep=period-newline}
+\DeclareCaptionStyle{period-newline3}[labelsep=period]{labelsep=period-newline,justification=centering}
+\DeclareCaptionFormat{reverse}{#3#2#1}
+\DeclareCaptionFormat{llap}{\llap{#1#2}#3\par}
+\DeclareCaptionLabelFormat{fullparens}{(\bothIfFirst{#1}{ }#2)}
+\DeclareCaptionLabelSeparator{fill}{\hfill}
+%
+\DeclareRobustCommand{\KOMAScript}{\textsf{K\kern.05em O\kern.05em%
+ M\kern.05em A\kern.1em-\kern.1em Script}}
+\clubpenalty10000
+
+\let\oriquote\quote
+\def\quote{\allowprelistbreaks[-4]\oriquote}
+
+\makeatletter
+\let\NoBreak\@nobreaktrue
+\newcommand\NEW[2]{\hskip 1sp\@nobreaktrue
+ \marginpar
+ {\footnotesize\sffamily\raggedleft#1\\#2}}
+\makeatother
+\setcounter{IndexColumns}2
+\def\IndexParms{\raggedright\advance\rightskip1em}
+%
+%<+driver>\OnlyDescription
+%
+\begin{document}
+ \DocInput{caption-rus.tex}
+\end{document}
+%</driver>
+% \fi
+%
+%
+%
+% \iffalse
+% --------------------------------------------------------------------------- %
+% \fi
+% \newcommand*\purerm[1]{{\upshape\mdseries\rmfamily #1}}
+% \newcommand*\puresf[1]{{\upshape\mdseries\sffamily #1}}
+% \newcommand*\purett[1]{{\upshape\mdseries\ttfamily #1}}
+% \let\package\puresf\def\thispackage{\package{caption}}
+% \let\env\purett \let\opt\purett
+%
+% \newcommand*\version[2][]{$v#2$}
+%
+% \newenvironment{Options}[1]%
+% {\list{}{\renewcommand{\makelabel}[1]{\texttt{##1}\hfil}%
+% \settowidth{\labelwidth}{\texttt{#1\space}}%
+% \setlength{\leftmargin}{\labelwidth}%
+% \addtolength{\leftmargin}{\labelsep}}}%
+% {\endlist}
+%
+% \newenvironment{Example}%
+% {\ifvmode\else\unskip\par\fi
+% \minipage{\linewidth}\smallskip}%
+% {\smallskip\endminipage}
+% \newcommand\example[3][figure]{%
+% \begingroup
+% \captionsetup{#2}%
+% \captionof{#1}[]{#3}%
+% \endgroup}
+%
+% \GetFileInfo{caption.sty}
+% \title{Ïå÷àòü ïîäïèñåé ïëàâàþùèõ îáúåêòîâ (ôëîòîâ) ñ~ïîìîùüþ ïàêåòà
+% \thispackage\thanks{Äàííûé ïàêåò âåðñèè
+% \fileversion, ïîñëåäíèé ðàç ìîäèôèöèðîâàí \filedate.
+%^^A% Translated by O. Lapko 2007/05/24. The questions and notes
+%^^A% about translation please
+%^^A% send to \texttt{Lapko.O@g23.relcom.ru} (Olga Lapko).
+%^^A% The version of translation could be obsolete. Please
+%^^A% look English or German documentation for the new information
+%^^A% (see margin labels).}}
+% Ïåðåâîä Î.\,Ëàïêî, 2007/05/24. Âîïðîñû è~çàìå÷àíèÿ ïî ïåðåâîäó
+% íàïðàâëÿéòå ïî àäðåñó \texttt{Lapko.O@g23.relcom.ru}.
+% \emph{Âåðñèÿ ïåðåâîäà îòíîñèòñÿ ê~îäíîé èç ïðåäûäóùèõ âåðñèé ïàêåòà è~ìîæåò
+% ñîäåðæàòü óñòàðåâøèå äàííûå.
+% Îáðàùàéòåñü ê~àíãëèéñêîé èëè íåìåöêîé äîêóìåíòàöèè çà áîëåå ñâåæåé èíôîðìàöèåé
+% (ñì.~ïîìåòêè íà ïîëÿõ)}.}}
+% \author{Àêñåëü Çîììåðôåëüäò (Axel Sommerfeldt)\\
+% \href{mailto:caption@sommerfee.de}{\texttt{caption@sommerfee.de}}}
+% \date{2007/04/09}
+% \maketitle
+%
+%^^A \begin{abstract}
+%^^A The \thispackage\ package offers customization of captions
+%^^A in floating environments such |figure| and |table| and cooperates with
+%^^A many other packages.\footnote{A complete re-work of the user interface
+%^^A done with Steven D. Cochran and Frank Mittelbach has lead to
+%^^A this new enhanced version 3.0.}
+%^^A \end{abstract}
+% \begin{abstract}
+% Ïàêåò \thispackage\ ïðåäëàãàåò ìíîæåñòâî ïóòåé íàñòðîéêè ïå÷àòè
+% ïîäïèñåé äëÿ ïëàâàþùèõ îáúåêòîâ (ôëîòîâ)
+% |figure| è~|table| è~ñîâìåñòèì (êîîïåðèðóåòñÿ)
+% ñî~ìíîãèìè ïàêåòàìè.\footnote{Ïîëíàÿ ïåðåðàáîòêà ïîëüçîâàòåëüñêîãî
+% èíòåðôåéñà ñäåëàíà ñîâìåñòíî ñî~Ñòèâåíîì Êîêðåéíîì (Steven~D.~Cochran)
+% è~Ôðàíêîì Ìèòòåëüáàõîì (Frank Mittelbach)
+% è~ñîçäàíà äëÿ íîâîé ðàñøèðåííîé âåðñèè~3.0.}
+% \end{abstract}
+%
+% \begingroup\small
+%^^A% \vspace{2ex}\centerline{\textbf{Frequently Appeared Design\footnote
+%^^A% {Added in translated text.}}\nopagebreak}
+% \vspace{2ex}\centerline{\textbf{\TeX íè÷åñêîå ðåäàêòèðîâàíèå\footnote
+% {Äîáàâëåíî ïðè ïåðåâîäå.}}\nopagebreak}
+% \begin{multicols}{2}\raggedright\advance\rightskip1em
+% \makeatletter\let\item\@idxitem\ignorespaces\makeatother
+%^^A% \item Last line of caption centered
+% \item Âûêëþ÷êà ïîñëåäíåé ñòðîêè ïî öåíòðó
+% \pageref{TeXr:centerlast}
+%^^A% \item Hanged caption label
+% \item Íóìåðàöèîííûé çàãîëîâîê íà âåñó
+% \pageref{TeXr:hang:label}
+%
+% %^^A \indexspace
+%
+%^^A% \item Spaces above and below captions
+% \item Îòáèâêè ó~ïîäïèñåé íàä è~ïîä ôëîòàìè
+% \pageref{TeXr:captionskips:a}%^^A--\pageref{TeXr:captionskips:z}
+%^^A% \item Settings, for caption label
+% \item Îôîðìëåíèå
+%^^A% \subitem for caption label
+% \subitem íóìåðàöèîííûõ çàãîëîâêîâ
+% \pageref{TeXr:caplabel:a}%^^A--\pageref{TeXr:caplabel:z}
+%^^A% \subitem for one-line captions
+% \subitem îäíîñòðî÷íûõ ïîäïèñåé
+% \pageref{TeXr:singleline:a}%^^A--\pageref{TeXr:singleline:z}
+%^^A% \subitem for multi-paragraph captions
+% \subitem ïîäïèñåé èç íåñêîëüêèõ àáçàöåâ
+% \pageref{TeXr:multipar:a}%^^A--\pageref{TeXr:multipar:z}
+%
+% %^^A \indexspace
+%
+%^^A% \item Captions
+% \item Ïîäïèñè\nopagebreak
+%^^A% \subitem for continued floats
+% \subitem ê~ôëîòàì ñ~ïðîäîëæåíèåì
+% \pageref{TeXr:continued:a}\nopagebreak %^^A--\pageref{TeXr:continued:z}
+%^^A% \subitem above tables
+% \subitem íàä òàáëèöàìè
+% \pageref{TeXr:captop:a}%^^A--\pageref{TeXr:captop:z}
+%^^A% \subitem skipped entry in list
+% \subitem áåç çàïèñè â~ñïèñêå ðèñóíêîâ,
+%^^A% \subsubitem trick with empty option
+% \subsubitem òðþê ñ~äîïîëíèòåëüíûì àðãóìåíòîì êîìàíäû
+% |\caption| \pageref{TeXr:nolistentry:I}
+%^^A% \subsubitem key |listof=|
+% \subsubitem êëþ÷ ïàêåòà |listof=|
+% \pageref{TeXr:nolistentry:II}
+%^^A% \subitem unlabeled
+% \subitem áåç íóìåðàöèîííîãî çàãîëîâêà
+% \pageref{TeXr:starcaption:a}%^^A--\pageref{TeXr:starcaption:z}
+%^^A% \subitem outside float
+% \subitem âíå îêðóæåíèÿ ôëîòà
+% \pageref{TeXr:captiononof:a}%^^A--\pageref{TeXr:captiononof:z}
+%
+% \end{multicols}%
+% \endgroup
+% \newpage
+%
+% \tableofcontents
+%^^A \newcommand\figuretext{^^A
+%^^A White sand beaches. The pink smoothness of the conch shell. A sea abundant
+%^^A with possibilities. Duty-free shops filled with Europe's finest gifts and
+%^^A perfumes. Play your favorite game of golf amidst the tropical greens on one
+%^^A of the many championship courses.}
+%^^A^^A Here is not translation!
+% \newcommand\figuretext{^^A
+% Òèáåòñêàÿ ìàíäàëà (1800\,ã.) ïðåäñòàâëÿåò ñîáîé ñâîåîáðàçíóþ êàðòó êàê
+% îñîáîãî õðàìà, òàê è Øàìáàëû~(?). Õîðîøî âèäíû âîðîòà ïî ÷åòûð¸ì ñòîðîíàì
+% ñâåòà, ñàìà ïîñòðîéêà èä¸ò óñòóïàìè ââåðõ. (Ìîçàèêà ïîëà ðûöàðñêîãî õðàìà
+% íà î.~Ðîäîñ òî÷íûì îáðàçîì âîñïðîèçâîäèò óçîð òèáåòñêîé ìàíäàëû.)}
+%
+% \iffalse
+% --------------------------------------------------------------------------- %
+% \fi
+%
+%^^A \section{Introduction}
+% \section{Ââåäåíèå}
+%
+%^^A Within the standard \LaTeX\ classes captions haven't received the attention
+%^^A they deserve. Simply typeset as an ordinary paragraph there is no
+%^^A remarkable visual difference from the rest of the text, like here:
+% Âíóòðè ñòàíäàðòíûõ êëàññîâ \LaTeX'à~ïîäïèñè íå ïîëó÷èëè çàñëóæåííîãî
+% âíèìàíèÿ. Îíè íàáèðàþòñÿ êàê îáû÷íûé àáçàö áåç âñÿêèõ îòëè÷èé îò îñíîâíîãî
+% òåêñòà, êàê çäåñü:
+%
+% \example{belowskip=\abovecaptionskip}{\figuretext}
+%
+%^^A There should be possibilities to change this; for example, it would be nice
+%^^A if you could make the text of the caption a little bit smaller as the normal
+%^^A text, add an extra margin, typeset the caption label with the same font
+%^^A family and shape as your headings etc. Just like this one:
+% Äîëæíà áûòü âîçìîæíîñòü èçìåíèòü ýòî; íàïðèìåð áóäåò ëó÷øå, åñëè òåêñò
+% çàäàòü ìåíüøèì êåãëåì, äîáàâèòü âòÿæêó (ñ~îáåèõ ñòîðîí), íàáðàòü
+% íóìåðàöèîííûé çàãîëîâîê ïîäïèñè øðèôòîì îñíîâíîãî òåêñòà, íî çàäàòü
+% íà÷åðòàíèå èëè íàñûùåííîñòü êàê ó~çàãîëîâêîâ è~ò.\,ä. Íàïðèìåð, êàê ñëåäóþùóþ ïîäïèñü:
+%
+% \example{belowskip=\abovecaptionskip,size=small,margin=10pt,labelfont=bf,labelsep=endash}{\figuretext}
+%
+%^^A You can do this easily with this package as there are many ready-to-use
+%^^A caption formatting options, but you are free to define your very own stuff, too.
+% Ñ~äàííûì ïàêåòîì ýòî ïðîñòî ñäåëàòü, ïîñêîëüêó â~í¸ì óæå åñòü ìíîæåñòâî ãîòîâûõ
+% îïöèé êëþ÷åé íàñòðîéêè, è~âû ñâîáîäíû è~âûáðàòü ñâî¸ ñî÷åòàíèå îïöèé äëÿ
+% îôîðìëåíèÿ, è~ñîçäàòü ñâîè îïöèè.
+%
+% \iffalse
+% --------------------------------------------------------------------------- %
+% \fi
+%
+%
+%^^A \section{Using the package}
+% \section{Èñïîëüçîâàíèå ïàêåòà}
+% \label{usage}
+%
+% \DescribeMacro{\usepackage}
+%^^A Insert
+% Äîáàâüòå
+% \begin{quote}
+% |\usepackage|\oarg{options}|{caption}[|\texttt{\filedate}|]|
+% \end{quote}
+%^^A into the preamble of your document, i.e.~the part of your document
+%^^A between |\documentclass| and |\begin{document}|.
+%^^A The options control how your captions will look like; e.g.,
+% â~ïðåàìáóëó âàøåãî äîêóìåíòà, ò.\,å. â~÷àñòü ôàéëà ìåæäó êîìàíäàìè
+% |\documentclass| è~|\begin{document}|.
+% Îïöèè çàäàþò íàñòðîéêè îôîðìëåíèÿ ïîäïèñåé â~êíèãå; íàïðèìåð, îïöèè
+% \begin{quote}
+% |\usepackage[margin=10pt,font=small,labelfont=bf]{caption}|
+% \end{quote}
+%^^A would result in captions looking like the second one in the introduction.
+% çàäàäóò ïîäïèñè, ïîõîæèå íà âòîðîé ïðèìåð âî ââåäåíèè.
+%
+% \DescribeMacro{\captionsetup}
+%^^A For a later change of options the \thispackage\ package provides the command
+% Äëÿ ïîñëåäóþùèõ èçìåíåíèé ïàêåò \thispackage\ ïðåäëàãàåò êîìàíäó
+% \begin{quote}
+% |\captionsetup|\oarg{float type}\marg{options}
+% \end{quote}
+%^^A So
+% Ñëåäîâàòåëüíî, îïðåäåëåíèÿ
+% \begin{quote}
+% |\usepackage[margin=10pt,font=small,labelfont=bf]{caption}|
+% \end{quote}
+%^^A and
+% è
+% \begin{quote}
+% |\usepackage{caption}|\\
+% |\captionsetup{margin=10pt,font=small,labelfont=bf}|
+% \end{quote}
+%^^A are equal in their results.
+% ýêâèâàëåíòíû.
+%
+%^^A It's good to know that |\captionsetup| has an effect on the current
+%^^A environment only. So if you want to change some settings for the
+%^^A current |figure| or |table| only, just place the |\captionsetup| command
+%^^A inside the |figure| or |table| right before the |\caption| command.
+%^^A For example
+% Íóæíî îáðàòèòü âíèìàíèå, ÷òî óñòàíîâêè |\captionsetup| ìîãóò äåéñòâîâàòü è~íà îäíî
+% îêðóæåíèå. Òàê ÷òî, åñëè âû õîòèòå èçìåíèòü óñòàíîâêè òîëüêî
+% òåêóùåãî îêðóæåíèÿ |figure| èëè |table|, ïîìåñòèòå êîìàíäó |\captionsetup|
+% âíóòðè |figure| èëè |table| ïðÿìî ïåðåä êîìàíäîé |\caption|.
+% Íàïðèìåð
+% \begin{quote}
+% |\begin{figure}|\\
+% | |\ldots\\
+% | \captionsetup{singlelinecheck=off}|\\
+% | \caption{|\ldots|}|\\
+% |\end{figure}|
+% \end{quote}
+%^^A switches the single-line-check off, but only for this |figure| so all
+%^^A the other captions remain untouched.
+% îòêëþ÷àåò êîíòðîëü îäíîñòðî÷íîé ïîäïèñè (ñì.~îá ýòîì íèæå), íî òîëüêî äëÿ äàííîãî
+% îêðóæåíèÿ |figure|, äðóãèå ïîäïèñè íå èçìåíÿòñÿ.
+%
+%^^A (For a description of the optional parameter \meta{float type} see
+%^^A section \ref{misc}: \textit{``Useful stuff''}.)
+% (Äëÿ îïèñàíèÿ äîïîëíèòåëüíîãî ïàðàìåòðà \meta{float type}
+% ñì.~ðàçä.~\ref{misc}: \textit{«Ïîëåçíûå óòèëèòû»}.)
+%
+% \iffalse
+% --------------------------------------------------------------------------- %
+% \fi
+%
+%
+%^^A \section{Options}
+% \section{Îïöèè}
+%
+% \def\OptionLabel{RaggedRight}
+% \def\UserDefined{\ldots}
+% \makeatletter
+% \newcommand*\Section{\@ifstar{\@Section\relax}{\@Section{ðàçä.}}}
+% \newcommand*\@Section[3]{#1 \ref{#2}: \textit{«#3»}}
+% \makeatother
+% \newcommand*\See[1]{{\small (Ñì.~#1)}}
+% \newcommand*\SeeUserDefined[1][]{%
+% \See{\Section{declare}{Äåëàåì ñàìè}#1}}
+%
+% \iffalse
+% --------------------------------------------------------------------------- %
+% \fi
+%
+%^^A \subsection{Formatting}
+% \subsection{Îôîðìëåíèå}
+%
+% \DescribeMacro{format=}
+%^^A A figure or table caption mainly consists of three parts: the caption label,
+%^^A which says if this object is a `Figure' or `Table' and what number is
+%^^A associated with it, the caption text itself, which is normally a short
+%^^A description of contents, and the caption separator which separates the text
+%^^A from the label.
+% Ïîäïèñü ðèñóíêà èëè òàáëèöû îáû÷íî èìååò òðè ÷àñòè\nopagebreak: íóìåðàöèîííûé
+% çàãîëîâîê, êîòîðûé îáúÿâëÿåò, ÷òî ýòîò îáúåêò `Ðèñ'óíîê èëè `Òàáëèöà' è~êàêîé
+% íîìåð îí èìååò, ñîáñòâåííî òåêñò ïîäïèñè, êîòîðûé îáû÷íî äà¸ò êðàòêîå îïèñàíèå
+% ñîäåðæàíèÿ, è~ðàçäåëèòåëü ìåæäó íóìåðàöèîííîé ÷àñòüþ ïîäïèñè è~òåêñòîì.
+%
+%^^A The \textit{caption format} determines how this information will be presented;
+%^^A it is specified with the option
+% \textit{Ôîðìàò ïîäïèñè} îïðåäåëÿåò, êàê äàííàÿ èíôîðìàöèÿ áóäåò ïðåäñòàâëåíà;
+% ýòî îïðåäåëÿåòñÿ êëþ÷îì
+% \begin{quote}
+% |format=|\meta{format name}\quad ,
+% \end{quote}
+%^^A having the name of the caption format as its argument.
+% ñ~îïöèåé, îïðåäåëÿþùåé îôîðìëåíèå (ôîðìàò) ïîäïèñè.
+%
+%^^A There are two standard caption formats:
+% Äàëåå äâà ñòàíäàðòíûõ îôîðìëåíèÿ ïîäïèñè:
+% \iffalse
+%^^A \footnote{You have the option to
+%^^A define your own ones, too. See section \ref{declare}:
+%^^A \textit{``Do it yourself!''} for details.}
+% \footnote{Âû ìîæåòå çàäàâàòü îïöèè
+% äëÿ ñîçäàíèÿ ñâîåãî îôîðìëåíèÿ. Ñì. ïîäðîáíåå â~ðàçä.~\ref{declare}:
+% \textit{«Äåëàåì ñàìè!»}.}
+% \fi
+%
+% \begin{Options}{\OptionLabel}
+% \item[plain]\NEWdescription{v3.0h}
+%^^A Typesets the captions as a normal paragraph.
+%^^A (This is the default behaviour, it
+%^^A is adapted from the standard \LaTeX\ document classes.)
+% Ïå÷àòàåò ïîäïèñè êàê îáû÷íûé àáçàö.
+% (Ýòî îôîðìëåíèå çàäàíî ïî óìîë÷àíèþ,
+% è~àíàëîãè÷íî ñòàíäàðòíîìó îôîðìëåíèþ êëàññîâ \LaTeX'à.)
+%
+% \item[hang]
+%^^A Indents the caption text, so it will `hang' under the first line of the text.
+% Äåëàåò âòÿæêó òàê, ÷òî ïåðâàÿ ñòðîêà (íóìåðàöèîííûé çàãîëîâîê) âûñòóïàåò âëåâî.%^^A
+% \label{TeXr:hang:label}
+%
+% \item[\UserDefined]
+%^^A Own formats can be defined using |\DeclareCaptionFormat|.
+% Ñîáñòâåííîå îôîðìëåíèå ìîæåò áûòü îïðåäåëåíî, ñ~ïîìîùüþ êîìàíäû
+% |\DeclareCaptionFormat|. \SeeUserDefined
+% \end{Options}
+%
+% \begin{Example}
+%^^A An example: Specifying the option
+% Ïðèìåð: çàäàíèå îïöèè
+% \begin{quote}
+% |format=hang|
+% \end{quote}
+%^^A yields captions like this:
+% ñîçäà¸ò ïîäïèñè êàê ýòà:
+% \example{format=hang}{\figuretext}
+% \end{Example}
+%
+% \DescribeMacro{indention=}
+%^^A For both formats (\texttt{plain} and \texttt{hang}) you can setup an extra
+%^^A indention starting at the second line of the caption. You do this with the
+%^^A option
+% Äëÿ îáîèõ îôîðìëåíèé (\texttt{plain} è~\texttt{hang}) ìîæíî óñòàíîâèòü
+% äîïîëíèòåëüíóþ âòÿæêó âòîðîé ñòðîêè ïîäïèñè. Ýòî ìîæíî ñäåëàòü ñ~êëþ÷îì
+% \begin{quote}
+% |indention=|\meta{amount}.
+% \end{quote}
+%^^A% [Please note, that indention of the keys \verb|format=hang| and
+%^^A% |indention=|\meta{amount} are summarized.---\emph{Trans.}]
+% [Îáðàòèòå âíèìàíèå, ÷òî âòÿæêà èç êëþ÷åé \verb|format=hang| è~|indention=|\meta{amount}
+% ñóììèðóþòñÿ. \cdash--- \emph{Ïðèì.\,ïåðåâ.}]
+%
+%^^A Two examples:
+% Ïàðà ïðèìåðîâ:
+%
+% \begin{Example}
+% \begin{quote}
+% |format=plain,indention=.5cm|
+% \end{quote}
+% \captionsetup{aboveskip=0pt}
+% \example{format=plain,indention=.5cm}{\figuretext}
+% \end{Example}
+%
+% \begin{Example}
+% \begin{quote}
+% |format=hang,indention=-0.5cm|
+% \end{quote}
+% \captionsetup{aboveskip=0pt}
+% \example{format=hang,indention=-0.5cm}{\figuretext}
+% \end{Example}
+%
+%
+% \DescribeMacro{labelformat=}
+%^^A With the option
+% Ñ~êëþ÷îì\label{TeXr:caplabel:a}
+% \nopagebreak[3]
+% \begin{quote}
+% |labelformat=|\meta{label format name}
+% \end{quote}
+% \NEWdescription{v3.0e}
+%^^A you specify how the caption label will be typeset.
+%^^A There are four standard caption label formats:
+% âû çàäà¸òå, êàê ïå÷àòàåòñÿ íóìåðàöèîííàÿ ÷àñòü.
+% Ñóùåñòâóþò ÷åòûðå ñòàíäàðòíûõ îôîðìëåíèÿ íóìåðàöèîííîãî çàãîëîâêà:
+%
+% \begin{Options}{\OptionLabel}
+% \item[default]
+%^^A the caption label will be typeset as specified by the document class,
+%^^A usually this means the name and the number (like \texttt{simple}).
+%^^A (this is the default behaviour.)
+% íóìåðàöèîííûé çàãîëîâîê ïå÷àòàåòñÿ òàê æå êàê â~ñòàíäàðòíûõ êëàññàõ,
+% ýòî îáû÷íî íàçâàíèå ôëîòà è~íîìåð (êàê \texttt{simple}).
+% (Çàäà¸òñÿ ïî óìîë÷àíèþ.)
+%
+% \item[empty]
+%^^A The caption label will be empty. (This option makes sense when used
+%^^A together with other options like \texttt{labelsep=none}.)
+% Íóìåðàöèîííûé çàãîëîâîê îòñóòñòâóåò. (Ýòà îïöèÿ èìååò ñìûñë âìåñòå
+% ñ~îïöèÿìè òèïà \texttt{labelsep=none}.)
+%
+% \item[simple]
+%^^A The caption label will be typeset as a name and a number.
+% Íóìåðàöèîííûé çàãîëîâîê ïå÷àòàåòñÿ êàê íàçâàíèå ôëîòà è~åãî íîìåð.
+%
+% \item[parens]
+%^^A The number of the caption label will be typeset in parentheses.
+% Íîìåð â~íóìåðàöèîííîé ÷àñòè çàãîëîâêà ïå÷àòàåòñÿ â~ñêîáêàõ.
+%
+% \item[\UserDefined]
+%^^A Own label formats can be defined using |\DeclareCaptionLabelFormat|.
+% Ñîáñòâåííîå îôîðìëåíèå ìîæåò áûòü îïðåäåëåíî ñ~ïîìîùüþ
+% êîìàíäû |\DeclareCaptionLabelFormat|.
+% \SeeUserDefined
+% \end{Options}
+%
+% \begin{Example}
+%^^A An example: Using the options
+% Ïðèìåð: ñ~îïöèÿìè êëþ÷åé
+% \begin{quote}
+% |labelformat=parens,labelsep=quad|
+% \end{quote}
+%^^A gives captions like this one:
+% ñîçäà¸òñÿ òàêàÿ ïîäïèñü:
+% \example{labelformat=parens,labelsep=quad}{\figuretext}
+% \end{Example}
+%
+% \DescribeMacro{labelsep=}
+%^^A With the option
+% Ñ~êëþ÷îì
+% \begin{quote}
+% |labelsep=|\meta{label separator name}
+% \end{quote}
+%^^A you specify what caption separator will be used.
+%^^A You can choose one of the following:
+% âû îïðåäåëÿåòå êàêîé ðàçäåëèòåëü [ìåæäó íóìåðàöèîííûì çàãîëîâêîì è~òåêñòîì]
+% áóäåò èñïîëüçîâàòüñÿ.
+% Âû ìîæåòå çàäàòü ñëåäóþùèå îïöèè:
+%
+% \begin{Options}{\OptionLabel}
+% \item[none]
+%^^A There is no caption separator. (This option makes sense when used
+%^^A together with other options like \texttt{labelformat=empty}.)
+% Îòñóòñòâóåò ðàçäåëèòåëü íóìåðàöèîííîé ÷àñòè è~òåêñòà ïîäïèñè. (Ïðèìåíåíèå ýòîé îïöèè
+% èìååò ñìûñë âìåñòå ñ~îïöèÿìè òèïà \texttt{labelformat=empty}.)
+%
+% \item[colon]
+%^^A The caption label and text will be separated by a colon and a space.
+%^^A (This is the default one.)
+% Íóìåðàöèîííûé çàãîëîâîê è~òåêñò ðàçäåëåíû äâîåòî÷èåì è~ïðîáåëîì.
+% (Çàäà¸òñÿ ïî óìîë÷àíèþ.)
+%
+% \item[period]
+%^^A The caption label and text will be separated by a period and a space.
+% Íóìåðàöèîííàÿ ÷àñòü è~òåêñò ðàçäåëåíû òî÷êîé è~ïðîáåëîì.
+%
+% \item[space]
+%^^A The caption label and text will be separated by a single space.
+% Íóìåðàöèîííàÿ ÷àñòü è~òåêñò ðàçäåëÿåòñÿ ïðîáåëîì.
+%
+% \item[quad]
+%^^A The caption label and text will be separated by a |\quad|.
+% Íóìåðàöèîííàÿ ÷àñòü è~òåêñò ðàçäåëÿåòñÿ êåãåëüíîé (|\quad|).
+%
+% \item[newline]
+%^^A The caption label and text will be separated by a line break (|\\|).
+% Íóìåðàöèîííûé çàãîëîâîê è~òåêñò ðàçäåëåíû íîâîé ñòðîêîé~(|\\|).
+%
+%
+% \item[endash]\NEWfeature{v3.0h}
+%^^A The caption label and text will be separated by an en-dash,
+%^^A surrounded by spaces (| -- |).
+% Íóìåðàöèîííûé çàãîëîâîê è~òåêñò ðàçäåëÿåòñÿ êðàòêèì òèðå,
+% îêðóæ¸ííûì ïðîáåëàìè (| -- |).
+%
+% \item[\UserDefined]
+%^^A Own separators can be defined using |\DeclareCaptionLabelSeparator|.
+% Ñîáñòâåííûå ðàçäåëèòåëè ìîæíî îïðåäåëèòü, èñïîëüçóÿ êîìàíäó
+% |\DeclareCaptionLabelSeparator|.
+% \SeeUserDefined
+% \end{Options}
+%
+%^^A Three examples:
+% Òðè ïðèìåðà:
+% \begin{Example}
+% \begin{quote}
+% |labelsep=period|
+% \end{quote}
+% \captionsetup{aboveskip=0pt}
+% \example{labelsep=period}{\figuretext}
+% \end{Example}
+%
+% \begin{Example}
+% \begin{quote}
+% |labelsep=newline,singlelinecheck=false|
+% \end{quote}
+% \captionsetup{aboveskip=0pt}
+% \example{labelsep=newline,singlelinecheck=false}{\figuretext}
+% \end{Example}
+%
+% \begin{Example}
+% \begin{quote}
+% |labelsep=endash|
+% \end{quote}
+% \captionsetup{aboveskip=0pt}
+% \example{labelsep=endash}{\figuretext}%^^A
+% \label{TeXr:caplabel:z}
+% \end{Example}
+%
+% \iffalse
+% --------------------------------------------------------------------------- %
+% \fi
+%
+%^^A \subsection{Justification}
+% \subsection{Âûêëþ÷êà}
+% \label{justification}
+%
+% \DescribeMacro{justification=}
+%^^A As addition to the caption format you could also specify a
+%^^A \emph{caption justification}; it is specified with the option
+% Ïðè îôîðìëåíèè ïîäïèñè âû ìîæåòå îïðåäåëèòü
+% \emph{âûêëþ÷êó ïîäïèñè}; îíà çàäà¸òñÿ êëþ÷îì
+% \begin{quote}
+% |justification=|\meta{justification name}\quad.
+% \end{quote}
+%
+%^^A You can choose one of the following:
+% Âû ìîæåòå âûáðàòü ñëåäóþùèå îïöèè:
+%
+% \begin{Options}{\OptionLabel}
+% \item[justified]
+%^^A Typesets the caption as a normal paragraph. (This is the default.)
+% Ïå÷àòàåò ïîäïèñü â~âèäå îáû÷íîãî àáçàöà. (Ïî óìîë÷àíèþ.)
+%
+% \item[centering]
+%^^A Each line of the caption will be centered.
+% Âñå ñòðîêè âûêëþ÷åíû ïî öåíòðó.
+%
+% \iffalse
+% \item[Centering]
+%^^A Each line of the caption will be centered, too.
+%^^A But this time the command |\Centering| of the \package{ragged2e} package
+%^^A will be used to achieve this. This difference is that this time the word
+%^^A breaking algorithm of \TeX\ will work inside the caption.
+% Êàæäàÿ ñòðîêà òàêæå âûêëþ÷åíà ïî öåíòðó.
+% Íî â~äàííîì ñëó÷àå èñïîëüçóåòñÿ êîìàíäà |\Centering| èç ïàêåòà \package{ragged2e}.
+% Ýòî îçíà÷àåò ÷òî âêëþ÷àåòñÿ àëãîðèòì ðàçðûâà [ñëîâ] íà ñòðîêè Plain \TeX'à.
+% \fi
+%
+% \item[centerlast]
+%^^A The last line of each paragraph of the caption text will be centered.
+% Àáçàö íàáèðàåòñÿ íà ïîëíûé ôîðìàò, ïîñëåäíÿÿ ñòðîêà âûêëþ÷åíà ïî öåíòðó.
+%
+% \item[centerfirst]
+%^^A Only the first line of the caption will be centered.
+% Öåíòðèðóåòñÿ òîëüêî ïåðâàÿ ñòðîêà [îñòàëüíûå, â~òîì ÷èñëå è~êîíöåâàÿ,
+% âûêëþ÷àþòñÿ íà ïîëíûé ôîðìàò].
+%
+% \item[raggedright]
+%^^A Each line of the caption will be moved to the left margin.
+% Ñòðîêè ïîäïèñè âûêëþ÷åíû âëåâî.
+%
+% \iffalse
+% \item[RaggedRight]
+%^^A Each line of the caption will be moved to the left margin using
+%^^A the command |\RaggedRight| from the \package{ragged2e} package.
+% Ñòðîêè ïîäïèñè âûêëþ÷åíû âëåâî ñ~èñïîëüçîâàíèåì êîìàíäû
+% |\RaggedRight| èç ïàêåòà \package{ragged2e}.
+% \fi
+% \item[RaggedRight]
+%^^A Each line of the caption will be moved to the left margin, too.
+%^^A But this time the command |\RaggedRight| of the \package{ragged2e} package
+%^^A will be used to achieve this. The main difference is that the word
+%^^A breaking algorithm of \TeX\ will work inside captions.
+% Ñòðîêè ïîäïèñè òàêæå âûêëþ÷åíû âëåâî,
+% íî â~äàííîì ñëó÷àå èñïîëüçóåòñÿ |\RaggedRight| ïàêåòà \package{ragged2e}.
+% Îòëè÷èå ñîñòîèò â~òîì, ÷òî èñïîëüçóåòñÿ
+% àëãîðèòì ðàçðûâà [ñëîâ] íà ñòðîêè Plain \TeX'à.
+%
+% \item[raggedleft]
+%^^A Each line of the caption will be moved to the right margin.
+% Ñòðîêè ïîäïèñè âûêëþ÷åíû âïðàâî.
+%
+% \iffalse
+% \item[RaggedLeft]
+%^^A Each line of the caption will be moved to the right margin using
+%^^A the command |\RaggedLeft| from the \package{ragged2e} package.
+% Ñòðîêè ïîäïèñè âûêëþ÷åíû âïðàâî ñ~èñïîëüçîâàíèåì êîìàíäû
+% |\RaggedRight| èç ïàêåòà \package{ragged2e}.
+% \fi
+%
+% \item[\UserDefined]
+%^^A Own justifications can be defined using |\DeclareCaptionJustification|.
+% Ñîáñòâåííûå îïðåäåëåíèÿ âûêëþ÷êè ìîæíî çàäàòü ñ~ïîìîùüþ êîìàíäû
+% |\DeclareCaptionJustification|.
+% \SeeUserDefined
+% \end{Options}
+%
+%^^A Three examples:
+% Òðè ïðèìåðà:\label{TeXr:centerlast}
+% \begin{Example}
+% \begin{quote}
+% |justification=centerlast|
+% \end{quote}
+% \captionsetup{aboveskip=0pt}
+% \example{justification=centerlast}{\figuretext}
+% \end{Example}
+%
+% \begin{Example}
+% \begin{quote}
+% |format=hang,justification=raggedright|
+% \end{quote}
+% \captionsetup{aboveskip=0pt}
+% \example{format=hang,justification=raggedright}{\figuretext}
+% \end{Example}
+%
+% \begin{Example}
+% \begin{quote}
+% |labelsep=newline,justification=centering|
+% \end{quote}
+% \captionsetup{aboveskip=0pt}
+% \example{belowskip=\abovecaptionskip,labelsep=newline,justification=centering}{\figuretext}
+% \end{Example}
+%
+% \DescribeMacro{singlelinecheck=}\label{TeXr:singleline:a}
+%^^A The standard \LaTeX\ document classes (|article|, |report|, and |book|)
+%^^A automatically center a caption if it fits in one single line:
+% Ñòàíäàðòíûå êëàññû \LaTeX'à (|article|, |report|, è~|book|)
+% àâòîìàòè÷åñêè öåíòðèðóþò ïîäïèñü åñëè îíà îäíîñòðî÷íàÿ:
+%
+% \example{belowskip=\abovecaptionskip}{Êîðîòåíüêàÿ ïîäïèñü.}
+%
+% \DANGER
+%^^A The \thispackage\ package adapts this behaviour and therefore usually
+%^^A ignores the justification you have set with |justification=| in such case.
+%^^A But you can switch this special treatment of such short captions off
+%^^A with the option
+% Ïàêåò \thispackage\ ñëåäóåò çà ýòèì àëãîðèòìîì è~ïîýòîìó
+% â~òàêèõ ñëó÷àÿõ èãíîðèðóåò âûêëþ÷êó, çàäàííóþ êëþ÷îì |justification=|.
+% Îïðåäåëèòü, ñëåäîâàòü ýòîìó àëãîðèòìó èëè íåò ìîæíî,
+% çàäàâ êëþ÷
+% \begin{quote}
+% |singlelinecheck=|\meta{bool}\quad.
+% \end{quote}
+%^^A Using |false|, |no|, |off| or |0| for \meta{bool} switches the
+%^^A extra centering off:
+% Èñïîëüçóÿ |false|, |no|, |off| èëè |0| âìåñòî \meta{bool} âû îòêëþ÷èòå
+% öåíòðèðîâàíèå îäíîñòðî÷íîé ïîäïèñè:
+% \begin{quote}
+% |singlelinecheck=false|
+% \end{quote}
+%^^A Doing so the above short caption would look like
+% Ïîñëå ýòîãî îïðåäåëåíèÿ êîðîòêèå ïîäïèñè
+% [ïðè çàäàíèè âûêëþ÷êè ïî óìîë÷àíèþ â~âèäå îáû÷íîãî àáçàöà]
+% áóäóò âûãëÿäåòü òàê
+%
+% \begingroup
+% \captionsetup{type=figure}
+% \ContinuedFloat
+% \endgroup
+% \example{belowskip=\abovecaptionskip,singlelinecheck=false}{Êîðîòåíüêàÿ ïîäïèñü.}
+%
+%^^A You switch the extra centering on again by using |true|, |yes|, |on| or |1|
+%^^A for \meta{bool}. (The default is on.)
+% Èñïîëüçóÿ |true|, |yes|, |on| èëè |1| âìåñòî \meta{bool} âû âêëþ÷èòå ìåõàíèçì
+% öåíòðèðîâàíèÿ êîðîòêèõ ïîäïèñåé. (Çàäàíî ïî óìîë÷àíèþ.)%^^A
+% \label{TeXr:singleline:z}
+%
+% \iffalse
+% --------------------------------------------------------------------------- %
+% \fi
+%
+%^^A \subsection{Fonts}
+% \subsection{Øðèôòû}
+% \label{fonts}
+%
+% \DescribeMacro{font=}
+% \DescribeMacro{labelfont=}
+% \DescribeMacro{textfont=}
+%^^A There are three font options which affects different parts of the caption:
+%^^A One affecting the whole caption (|font|), one which only affects the caption
+%^^A label and separator (|labelfont|) and at least one which only affects the
+%^^A caption text (|textfont|).
+%^^A You set them up using the options
+% Çàäàíû òðè êëþ÷à êîòîðûå îïðåäåëÿþò øðèôò ðàçíûõ ýëåìåíòîâ ïîäïèñè:
+% Îäèí çàäà¸ò øðèôò äëÿ âñåé ïîäïèñè (|font|), äðóãîé çàäà¸ò øðèôò òîëüêî
+% äëÿ íóìåðàöèîííîãî çàãîëîâêà è~ðàçäåëèòåëÿ (|labelfont|), è~åù¸ îäèí
+% \cdash--- øðèôò äëÿ òåêñòà (|testfont|).
+% Âû çàäà¸òå èõ, èñïîëüçóÿ êëþ÷è
+% \begin{quote}\begin{tabular}{@{}r@{}ll}
+% |font=| & \marg{font options} & ,\\
+% |labelfont=| & \marg{font options} & è\\
+% |textfont=| & \marg{font options} & .\\
+% \end{tabular}\end{quote}
+%
+%^^A And these are the available font options:
+% Òåïåðü ñóùåñòâóþùèå îïöèè äàííûõ êëþ÷åé:
+%
+% \begin{Options}{\OptionLabel}
+% \item[scriptsize] {\scriptsize Very small size}
+% \item[footnotesize] {\footnotesize The size usually used for footnotes}
+% \item[small] {\small Small size}
+% \item[normalsize] {\normalsize Normal size}
+% \item[large] {\large Large size}
+% \item[Large] {\Large Even larger size}
+%
+% \item[up] {\upshape Upright shape}
+% \item[it] {\itshape Italic shape}
+% \item[sl] {\slshape Slanted shape}
+% \item[sc] {\scshape Small Caps shape}
+%
+% \item[md] {\mdseries Medium series}
+% \item[bf] {\bfseries Bold series}
+%
+% \item[rm] {\rmfamily Roman family}
+% \item[sf] {\sffamily Sans Serif family}
+% \item[tt] {\ttfamily Typewriter family}
+%
+% \item[\UserDefined]
+%^^A Own font options can be defined using |\DeclareCaptionFont|.
+% Ñîáñòâåííûå îïöèè ìîãóò áûòü îïðåäåëåíû ñ~ïîìîùüþ êîìàíäû
+% |\DeclareCaptionFont|.
+% \SeeUserDefined
+% \end{Options}
+%
+%^^A If you use only one of these options you can omit the braces;
+%^^A e.g., the options
+% Åñëè èñïîëüçóåòñÿ îäíà îïöèÿ êëþ÷à, ôèãóðíûå ñêîáêè ìîæíî îïóñòèòü;
+% íàïðèìåð, îïöèè
+% \iffalse
+% \begin{quote}
+% \fi
+% |font={small}|
+% \iffalse
+% \end{quote}
+% \fi
+% è
+% \iffalse
+% \begin{quote}
+% \fi
+% |font=small|
+% \iffalse
+% \end{quote}
+% \fi
+%^^A will give the same result.
+% äàäóò îäèíàêîâûé ðåçóëüòàò.
+%
+%^^A Two examples:
+% Ïàðà ïðèìåðîâ:
+% \begin{Example}
+% \begin{quote}
+% |font={small,it},labelfont=bf|
+% \end{quote}
+% \captionsetup{aboveskip=0pt}
+% \example{font={small,it},labelfont=bf}{\figuretext}
+% \end{Example}
+%
+% \begin{Example}
+% \begin{quote}
+% |font=small,labelfont=bf,textfont=it|
+% \end{quote}
+% \captionsetup{aboveskip=0pt}
+% \example{font=small,labelfont=bf,textfont=it}{\figuretext}
+% \end{Example}
+%
+% \iffalse
+% --------------------------------------------------------------------------- %
+% \fi
+%
+%^^A \subsection{Margins and further paragraph options}
+% \subsection{Ïîëÿ è~äðóãèå îïöèè ôîðìèðîâàíèÿ àáçàöà}
+% \label{margins}
+%
+% \DescribeMacro{margin=}
+% \DescribeMacro{width=}
+%^^A For all captions you can specify \emph{either} an extra margin \emph{or}
+%^^A a fixed width. You do this by using the options
+% Äëÿ âñåõ ïîäïèñåé ìîæíî îïðåäåëèòü \emph{ëèáî} äîïîëíèòåëüíóþ âòÿæêó
+% \emph{ëèáî} ôèêñèðîâàííóþ øèðèíó. Ýòî çàäà¸òñÿ êëþ÷àìè
+% \begin{quote}
+% \begin{tabular}{@{}r@{}ll}
+% |margin=| & \meta{amount} & \emph{èëè}\\
+% |width=| & \meta{amount} & \\
+% \end{tabular}\end{quote}
+%^^A Nevertheless what option you use, the left and right margin will be the
+%^^A same.
+% Íåçàâèñèìî îò òîãî, êàêîé êëþ÷ èñïîëüçóåòñÿ, ëåâîå è~ïðàâîå ïîëå
+% áóäóò ñèììåòðè÷íû.
+%
+%^^A Two examples will illustrating this:
+% Äâà èëëþñòðèðóþùèõ ïðèìåðà:
+% \begin{Example}
+% \begin{quote}
+% |margin=10pt|
+% \end{quote}
+% \captionsetup{aboveskip=0pt}
+% \example{margin=10pt}{\figuretext}
+% \end{Example}
+%
+% \begin{Example}
+% \begin{quote}
+% |width=.75\textwidth|
+% \end{quote}
+% \captionsetup{aboveskip=0pt}
+% \example{width=.75\textwidth}{\figuretext}
+% \end{Example}
+%
+% \DescribeMacro{parskip=}\label{TeXr:multipar:a}
+%^^A This option is useful for captions containing more than one paragraph.
+%^^A It specifies the extra vertical space inserted between them:
+% Äàííûé êëþ÷ ïîíàäîáèòñÿ, åñëè ïîäïèñè ñîäåðæàò áîëåå îäíîãî àáçàöà.
+% Îí çàäà¸ò äîïîëíèòåëüíóþ âåðòèêàëüíóþ îòáèâêó ìåæäó àáçàöàìè:
+% \begin{quote}
+% |parskip=|\meta{amount}
+% \end{quote}
+%^^A One example:
+% Ïðèìåð:
+% \begin{Example}
+% \begin{quote}
+% |margin=10pt,parskip=5pt|
+% \end{quote}
+% \captionsetup{aboveskip=0pt}
+% \example{margin=10pt,parskip=5pt}{
+%^^A First paragraph of the caption. This one contains some test, just to
+%^^A show how these options affect the layout of the caption.
+%^^A
+%^^A Second paragraph of the caption. This one contains some text, too, to
+%^^A show how these options affect the layout of the caption.}
+% Ïåðâûé àáçàö ïîäïèñè. Îí ñîäåðæèò íåìíîãî òåêñòà, ÷òîáû ïîêàçàòü
+% êàê çàäàííûå íàñòðîéêè ñîçäàþò îôîðìëåíèå ïîäïèñè.
+%
+% Âòîðîé àáçàö ïîäïèñè. Îí òîæå ñîäåðæèò íåìíîãî òåêñòà, ÷òîáû ïîêàçàòü
+% êàê çàäàííûå íàñòðîéêè ñîçäàþò îôîðìëåíèå ïîäïèñè.}
+% \end{Example}
+%
+% \DescribeMacro{hangindent=}
+%^^A The option
+% Êëþ÷
+% \begin{quote}
+% |hangindent=|\meta{amount}
+% \end{quote}
+%^^A is for setting up a hanging indention starting from the second line of each
+%^^A paragraph. If the caption contains just a single paragraph, using this option
+%^^A leads to the same result as the option |indention=| you already know about.
+%^^A But if the caption contains multiple paragraphs you will notice the difference:
+% çàäà¸ò âòÿæêó äëÿ âòîðûõ ñòðîê êàæäîãî àáçàöà ïîäïèñè.
+% Åñëè ïîäïèñü ñîñòîèò èç îäíîãî àáçàöà, ýòîò êëþ÷ äà¸ò òîò æå ðåçóëüòàò
+% ÷òî è~èçâåñòíûé âàì êëþ÷ |indention=|.
+% Íî â~ïîäïèñè èç íåñêîëüêèõ àáçàöåâ âû óâèäèòå ðàçíèöó:
+%
+% \begin{Example}
+% \begin{quote}
+% |format=hang,indention=-.5cm|
+% \end{quote}
+% \captionsetup{aboveskip=0pt}
+% \example{format=hang,indention=-.5cm}{
+% Ïåðâûé àáçàö ïîäïèñè. Îí ñîäåðæèò íåìíîãî òåêñòà, ÷òîáû ïîêàçàòü
+% êàê çàäàííûå íàñòðîéêè ñîçäàþò îôîðìëåíèå ïîäïèñè.
+%
+% Âòîðîé àáçàö ïîäïèñè. Îí òîæå ñîäåðæèò íåìíîãî òåêñòà, ÷òîáû ïîêàçàòü
+% êàê çàäàííûå íàñòðîéêè ñîçäàþò îôîðìëåíèå ïîäïèñè.}
+% \end{Example}
+%
+% \begin{Example}
+% \begin{quote}
+% |format=hang,hangindent=-.5cm|
+% \end{quote}
+% \captionsetup{aboveskip=0pt}
+% \example{format=hang,hangindent=-.5cm}{
+% Ïåðâûé àáçàö ïîäïèñè. Îí ñîäåðæèò íåìíîãî òåêñòà, ÷òîáû ïîêàçàòü
+% êàê çàäàííûå íàñòðîéêè ñîçäàþò îôîðìëåíèå ïîäïèñè.
+%
+% Âòîðîé àáçàö ïîäïèñè. Îí òîæå ñîäåðæèò íåìíîãî òåêñòà, ÷òîáû ïîêàçàòü
+% êàê çàäàííûå íàñòðîéêè ñîçäàþò îôîðìëåíèå ïîäïèñè.}
+% \label{TeXr:multipar:z}
+% \end{Example}
+%
+% \iffalse
+% --------------------------------------------------------------------------- %
+% \fi
+%
+%
+%^^A \subsection{Styles}
+% \subsection{Ñòèëè}
+% \label{style}
+%
+% \NoBreak\DescribeMacro{style=}
+%^^A A suitable combination of caption options is called \emph{caption style}.
+%^^A You can compare them more or less to page styles which you set up with
+%^^A |\pagestyle|: The caption style provides all settings for a whole caption layout.
+% Îïðåäåë¸ííàÿ\nopagebreak[4] êîìáèíàöèÿ íåñêîëüêèõ êëþ÷åé ñîçäà¸ò \emph{ñòèëü ïîäïèñè}.
+% Ýòî ìîæíî ñðàâíèòü ñî ñòèëÿìè êîëîíòèòóëà, çàäàâàåìîãî êîìàíäîé
+% |\pagestyle|: ñòèëü ïîäïèñè çàäà¸ò âñå íàñòðîéêè äëÿ îôîðìëåíèÿ ïîäïèñè.
+%
+%^^A You switch to an already defined caption style with the option
+% Ïðåäâàðèòåëüíî ñîçäàííûé ñòèëü ìîæíî âûçâàòü êëþ÷îì
+% \begin{quote}
+% |style=|\meta{style name}\quad.
+% \end{quote}
+%^^A The \thispackage\ package usually defines only the style |default| which
+%^^A puts all options you already know about to the default ones.
+%^^A This means that specifying the option
+% Ïàêåò \thispackage\ çàäà¸ò ñòèëü |default|, êîòîðûé
+% óñòàíàâëèâàåò èçâåñòíûì âàì êëþ÷àì çíà÷åíèÿ ïî óìîë÷àíèþ.
+% Ýòî îçíà÷àåò, ÷òî îïðåäåëåíèå ýòîãî êëþ÷à êàê
+% \begin{quote}
+% |style=default|
+% \end{quote}
+%^^A has the same effect as specifying all these options:
+% äàñò òîò æå ýôôåêò, ÷òî è~çàäàíèå âñåõ êëþ÷åé, ïðèâåä¸ííûõ íèæå:
+% \begin{quote}
+% |format=default,labelformat=default,labelsep=default,|\\
+% |justification=default,font=default,labelfont=default,|\\
+% |textfont=default,margin=0pt,indention=0pt,parindent=0pt|\\
+% |hangindent=0pt,singlelinecheck=true|
+% \end{quote}
+%
+%^^A Own caption styles can be defined using |\DeclareCaptionStyle|.
+% Ñîáñòâåííûé ñòèëü ïîäïèñè ìîæíî îïðåäåëèòü, èñïîëüçóÿ |\DeclareCaptionStyle|.
+% \SeeUserDefined
+%
+% \iffalse
+% --------------------------------------------------------------------------- %
+% \fi
+%
+%^^A \subsection{Skips}
+% \subsection{Îòáèâêè}
+%
+% \DescribeMacro{aboveskip=}
+% \DescribeMacro{belowskip=}
+%^^A The spaces above and below the caption are controlled by the skips
+%^^A |\abovecaptionskip| and |\belowcaptionskip|. The standard \LaTeX\ document
+%^^A classes |article|, |report| and |book| set |\abovecaptionskip| to |10pt|
+%^^A and |\belowcaptionskip| to |0pt|.
+% Îòáèâêè ñâåðõó è~ñíèçó ïîäïèñè îïðåäåëÿþòñÿ êîìàíäàìè
+% |\abovecaptionskip| è~|\belowcaptionskip|. Ñòàíäàðòíûå êëàññû \LaTeX'à
+% |article|, |report| è~|book| çàäàþò |\abovecaptionskip| ðàâíûì |10pt|,
+% à~|\belowcaptionskip|\hbox{ \cdash--- |0pt|}.
+%
+%
+%^^A Both skips can be changed with the command |\setlength|, but you can
+%^^A use these options, too:
+% Îáå îòáèâêè ìîãóò áûòü èçìåíåíû êîìàíäîé |\setlength|, íî òàêæå ìîæíî
+% èñïîëüçîâàòü è~êëþ÷è:
+% \nopagebreak[3]
+% \begin{quote}\begin{tabular}{@{}r@{}ll}
+% |aboveskip=| & \meta{amount} & è\\
+% |belowskip=| & \meta{amount} & .\\
+% \end{tabular}\end{quote}
+%
+% \DescribeMacro{position=}\label{TeXr:captionskips:a}
+%^^A Using |\abovecaptionskip| and |\belowcaptionskip| has a major design flaw:
+%^^A If the caption is typeset \emph{above} (and not \emph{below}) the figure
+%^^A or table they are not set up very useful at default, because there will be
+%^^A some extra space above the caption but no space between the caption and the
+%^^A figure or table itself. (Remember: |\belowcaptionskip| is usually set to |0pt|.)
+% Èñïîëüçîâàíèå êîìàíä |\abovecaptionskip| è~|\belowcaptionskip| èìååò îäèí
+% íåäîñòàòîê: åñëè ïîäïèñü äîëæíà áûòü ïîìåùåíà \emph{íàä}, à~íå \emph{ïîä}
+% ïëàâàþùèì îáúåêòîì, òî, â~ðåçóëüòàòå, ìû ìîæåì ïîëó÷èòü íåíóæíóþ îòáèâêó ñâåðõó
+% è~íèêàêîé îòáèâêè ìåæäó ïîäïèñüþ è~îáúåêòîì.
+% (Íàïîìíèì: |\belowcaptionskip| îáû÷íî îïðåäåëåíà êàê~|0pt|.)
+%
+%^^A Please compare the spacing in these small tables:
+% Ïîæàëóéñòà, ñðàâíèòå îòáèâêè ó~äâóõ íåáîëüøèõ òàáëèö:
+% \begin{Example}
+% \begin{minipage}[c]{.5\linewidth}
+% \iffalse
+% \captionsetup{aboveskip=0pt}%
+% \fi
+% \captionof{table}{Òàáëè÷êà}
+% \centering\begin{tabular}{ll}
+% A & B \\
+% C & D \\
+% \end{tabular}
+% \end{minipage}
+% \begin{minipage}[c]{.5\linewidth}
+% \centering\begin{tabular}{ll}
+% A & B \\
+% C & D \\
+% \end{tabular}
+% \captionof{table}{Òàáëè÷êà}
+% \end{minipage}
+% \end{Example}
+%
+%^^A But you can fix this by using the option |position=|: It specifies how the
+%^^A spacing above and below the caption will be used:
+% Íî ýòî ìîæíî èñïðàâèòü èñïîëüçóÿ êëþ÷ |position=|: îí îïðåäåëÿåò, êàê
+% îòáèâêè ñâåðõó è~ñíèçó áóäóò èñïîëüçîâàíû; îïöèÿ
+% \begin{quote}
+% |position=top|\quad(èëè |position=above|)
+% \end{quote}
+%^^A tells the \thispackage\ package to use the spacing useful for caption
+%^^A \emph{above} the figure or table and
+% ãîâîðèò ïàêåòó \thispackage, ÷òî íóæíî çàäàòü ñîîòâåòñòâóþùèå îòáèâêè äëÿ ïîäïèñè
+% \emph{ñâåðõó} ðèñóíêà èëè òàáëèöû è~îïöèÿ
+% \begin{quote}
+% |position=bottom|\quad(èëè |position=below|)
+% \end{quote}
+%^^A tells the \thispackage\ package to use the spacing useful for captions
+%^^A \emph{below} the figure or table. (The last one is the default setting
+%^^A except for |longtable|s.)
+% âåëèò ïàêåòó \thispackage\ ðàññòàâèòü ñîîòâåòñòâóþùèå îòáèâêè äëÿ ïîäïèñè
+% \emph{ñíèçó} ðèñóíêà èëè òàáëèöû. (Äàííàÿ îïöèÿ çàäà¸òñÿ ïî óìîë÷àíèþ
+% êðîìå îêðóæåíèÿ ìíîãîñòðàíè÷íîé òàáëèöû |longtable|.)
+%
+%^^A So adding an extra |\captionsetup{position=top}| to the left example
+%^^A table gives you proper spacing around both captions:
+% Èòàê çàäàíèå |\captionsetup{position=top}| äëÿ ëåâîé òàáëèöû,
+% â~ïðèìåðå âûøå äàñò íóæíûå îòáèâêè äëÿ îáåèõ ïîäïèñåé:
+% \begin{Example}
+% \begin{minipage}[c]{.5\linewidth}
+% \captionsetup{position=top}
+% \captionof{table}{Òàáëè÷êà}
+% \centering\begin{tabular}{ll}
+% A & B \\
+% C & D \\
+% \end{tabular}
+% \end{minipage}
+% \begin{minipage}[c]{.5\linewidth}
+% \centering\begin{tabular}{ll}
+% A & B \\
+% C & D \\
+% \end{tabular}
+% \captionof{table}{Òàáëè÷êà}
+% \end{minipage}
+% \end{Example}
+%
+%^^A (Technically speaking |\abovecaptionskip| and |\belowcaptionskip| will
+%^^A be swapped if you specify the option |position=top|, so in both cases
+%^^A |\abovecaptionskip| will be used between the caption and the figure or
+%^^A table itself.)
+% («Òåõíèêà» ðàáîòû êëþ÷à òàêîâà: |\abovecaptionskip| è~|\belowcaptionskip|
+% ìåíÿþòñÿ ìåñòàìè åñëè çàäàíà îïöèÿ |position=top|, ïîýòîìó â~îáîèõ ñëó÷àÿõ
+% |\abovecaptionskip| çàäà¸òñÿ ìåæäó ïîäïèñüþ è~ðèñóíêîì èëè òàáëèöåé.)
+%
+%^^A This option is especially useful when used together with the optional
+%^^A argument of the |\captionsetup| command.
+%^^A \See{\Section{misc}{Useful stuff} for details}\par
+%^^A For example
+% Ýòîò êëþ÷ íóæåí êîãäà èñïîëüçóåòñÿ âìåñòå ñ~äîïîëíèòåëüíûì àðãóìåíòîì
+% êîìàíäû |\captionsetup|.
+% \See{\Section{misc}{Ïîëåçíûå óòèëèòû}, ÷òîáû óçíàòü
+% ïîäðîáíîñòè.}\par Íàïðèìåð, îïöèÿ êëþ÷à
+% \begin{quote}
+% |\captionsetup[table]{position=top}|
+% \end{quote}
+%^^A causes all captions within tables to be treated as captions \emph{above}
+%^^A the table (regarding spacing around it).
+% ãîâîðèò, ÷òî ïîäïèñè â~ïëàâàþùèõ òàáëèöàõ ïîìåùàþòñÿ \emph{ñâåðõó}
+% (ñ~ñîîòâåòñòâóþùèì îòáèâêàìè).
+% \DescribeMacro{tableposition=}\label{TeXr:captop:a}%^^A
+% \NEWfeature{v3.0a}
+%^^A Because this is a very common setting the \thispackage\ package offers
+%^^A an abbreviating option for the use with |\usepackage|:
+% Ïîñêîëüêó òàêàÿ óñòàíîâêà î÷åíü ïîïóëÿðíà, ïàêåò \thispackage\ ïðåäëàãàåò
+% êëþ÷"=àááðåâèàòóðó, äëÿ èñïîëüçîâàíèÿ åãî â~ñòðîêå |\usepackage|:
+% \begin{quote}
+%^^A% |\usepackage[|\ldots|,tableposition=top]{caption}|\footnote{Please
+%^^A% note that this is \emph{not} sufficient when using a
+%^^A% \KOMAScript\ document class, you need to use the \emph{global}
+%^^A% option |tablecaptionabove|, too.}
+% |\usepackage[|\ldots|,tableposition=top]{caption}|\footnote{Îáðàòèòå âíèìàíèå,
+% ÷òî ýòîò êëþ÷ \emph{íå} äîñòàòî÷åí, åñëè èñïîëüçóåòñÿ êëàññ
+% \KOMAScript, âàì ïîíàäîáèòñÿ òàêæå \emph{ãëîáàëüíàÿ}
+% îïöèÿ |tablecaptionabove|.}
+% \end{quote}
+%^^A is equivalent to
+% ÷òî ýêâèâàëåíòíî
+% \begin{quote}
+% |\usepackage[|\ldots|]{caption}|\\
+% |\captionsetup[table]{position=top}|
+% \end{quote}\label{TeXr:captionskip:z}%^^A
+% \label{TeXr:captop:z}
+%
+% \iffalse
+% --------------------------------------------------------------------------- %
+% \fi
+%
+%
+%^^A \section{Useful stuff}
+% \section{Ïîëåçíûå óòèëèòû}
+% \label{misc}
+%
+% \DescribeMacro{\caption}
+%^^A The command
+% Êîìàíäà
+% \nopagebreak[3]
+% \begin{quote}
+% |\caption|\oarg{lst\_entry}\marg{heading}
+% \end{quote}
+% \nopagebreak[3]
+%^^A typesets the caption inside a floating environment like |figure| or |table|.
+%^^A Well, you already know this, but the \thispackage\ package offers an extension:
+%^^A If you leave the argument \meta{lst\_entry} empty, no entry in the list of
+%^^A figures or tables will be made. For example:
+% ïå÷àòàåò ïîäïèñü âíóòðè îêðóæåíèÿ ôëîòà, òèïà |figure| èëè |table|.
+% Òàê, ýòî íàì èçâåñòíî, íî íîâîñòü ñîñòîèò â~òîì, ÷òî åñëè
+% çàäàòü àðãóìåíò \meta{lst\_entry} ïóñòûì, ïîäïèñü â~ñïèñêå ðèñóíêîâ èëè
+% òàáëèö íå ïîÿâèòñÿ; íàïðèìåð,
+% \begin{quote}
+%^^A |\caption[]{A figure without entry in the list of figures.}|
+% |\caption[]{Ïîäïèñü áåç çàïèñè â ñïèñêå ðèñóíêîâ.}|
+% \label{TeXr:nolistentry:I}
+% \end{quote}
+%
+% \DescribeMacro{\caption*}\label{TeXr:starcaption:a}%^^A
+%^^A The \package{longtable} package defines the command |\caption*| which
+%^^A typesets the caption without label and without entry in the list of tables.
+%^^A An example:
+% Ïàêåò \package{longtable} îïðåäåëÿåò êîìàíäó |\caption*| êîòîðàÿ
+% ïå÷àòàåò ïîäïèñü áåç ìåòêè è~çàíåñåíèÿ å¸ â~ñïèñîê òàáëèö.
+% Ïðèìåð:
+% \begin{quote}
+% |\begin{longtable}{cc}|\\
+% | \caption*{Òàáëè÷êà}\\|\\
+% | A & B \\|\\
+% | C & D \\|\\
+% |\end{longtable}|
+% \end{quote}
+% âûãëÿäèò ñëåäóþùèì îáðàçîì:\nopagebreak
+% \begin{longtable}{cc}
+% \caption*{Òàáëè÷êà}\\
+% A & B \\
+% C & D \\
+% \end{longtable}
+%
+%^^A This package offers this feature, too, so you can use this command now within
+%^^A every floating environment like |figure| or |table|, like:
+% Äàííûé ïàêåò òîæå ïðåäëàãàåò òàêóþ âîçìîæíîñòü. È~òåïåðü âû ìîæåòå èñïîëüçîâàòü ýòó êîìàíäó
+% ñ~ëþáûì îêðóæåíèåì ïëàâàþùåãî îáúåêòà, íàïðèìåð |figure| èëè |table|, êàê çäåñü:
+% \begin{quote}
+% |\begin{table}|\\
+% | \caption*{Òàáëè÷êà}|\\
+% | \begin{tabular}{cc}|\\
+% | A & B \\|\\
+% | C & D \\|\\
+% | \end{tabular}|\\
+% |\end{table}|
+% \end{quote}
+%
+% \DescribeMacro{\captionof}%^^A
+% \DescribeMacro{\captionof*}\label{TeXr:captiononof:a}%^^A
+%^^A Sometimes you want to typeset a caption \emph{outside} a floating environment,
+%^^A putting a figure within a |minipage| for instance. For this purpose the
+%^^A \thispackage\ package offers the command
+% Èíîãäà âàì íóæíî ñîçäàòü ïîäïèñü \emph{âíå} îêðóæåíèÿ ôëîòà,
+% ïîìåñòèâ, ê~ïðèìåðó, ïîäïèñü âíóòðè îêðóæåíèÿ |minipage|. Äëÿ ýòîé öåëè ïàêåò
+% \thispackage\ ïðåäëàãàåò êîìàíäó
+% \begin{quote}
+% |\captionof|\marg{float type}\oarg{lst\_entry}\marg{heading}\quad.
+% \end{quote}
+%^^A Note that the first argument, the \meta{float type}, is mandatory here, because
+%^^A the |\captionof| command needs to know which name to put into the caption label
+%^^A (e.g. ``Figure'' or ``Table'') and in which list to put the contents entry.
+%^^A An example:
+% Îáðàòèòå âíèìàíèå, ÷òî ïåðâûé àðãóìåíò, \meta{float type}, â~äàííîì ñëó÷àå ÿâëÿåòñÿ
+% îáÿçàòåëüíûì, ïîñêîëüêó êîìàíäà |\captionof| äîëæíà çíàòü, ê~êàêîìó ïëàâàþùåìó
+% îáúåêòó ñîçäàòü ïîäïèñü (íàïðèìåð. «Ðèñ.» èëè «Òàáëèöà») è~â~êàêîé ñïèñîê ïîìåñòèòü
+% ïîäïèñü. Ïðèìåð
+% \begin{quote}
+% |\captionof{figure}{Êàðòèíêà}|\\
+% |\captionof{table}{Òàáëè÷êà}|
+% \end{quote}
+%^^A typesets captions like this:
+% ñîçäà¸ò ïîäïèñè êàê çäåñü:
+% \begin{Example}
+% \captionof{figure}{Êàðòèíêà}
+% \captionsetup{belowskip=\abovecaptionskip}
+% \captionof{table}{Òàáëè÷êà}
+% \end{Example}
+%
+%^^A The star variant |\captionof*| has the same behaviour as the |\caption*| command:
+%^^A it typesets the caption without label and without entry to the list of figures
+%^^A or tables.
+% «Çâ¸çäíûé» âàðèàíò |\captionof*| äà¸ò òîò æå ðåçóëüòàò, ÷òî è~|\caption*|:
+% ïå÷àòàåò ïîäïèñü áåç íóìåðàöèîííîãî çàãîëîâêà è~âûâîäà â~ñïèñîê ðèñóíêîâ èëè
+% òàáëèö.
+%
+%^^A Please use both |\captionof| and |\captionof*| only \emph{inside} environments
+%^^A (like |minipage| or |\parbox|), otherwise a page break can appear between content
+%^^A and caption. Furthermore some strange effects could occur (e.g., wrong spacing
+%^^A around captions).
+% Èñïîëüçóéòå îáå êîìàíäû, |\captionof| è~|\captionof*|, òîëüêî â~îêðóæåíèÿõ
+% (òèïà |minipage| èëè |\parbox|), èíà÷å ïîäïèñü ìîæåò ðàçîðâàòüñÿ ìåæäó ñòðàíèöàìè.
+% Êðîìå ýòîãî ìîãóò âîçíèêíóòü ïîáî÷íûå ýôôåêòû (íàïðèìåð, íåâåðíûå îòáèâêè
+% âîêðóã ïîäïèñè).\label{TeXr:captiononof:z}\label{TeXr:starcaption:z}
+%
+% \DescribeMacro{\ContinuedFloat}\label{TeXr:continued:a}
+%^^A Sometimes you want to split figures or tables without giving them
+%^^A their own reference number. This is what the command
+% Èíîãäà âîçíèêàåò íåîáõîäèìîñòü ðàçáèòü ðèñóíêè èëè òàáëèöû íà íåñêîëüêî
+% ÷àñòåé, çàäàâ èì îáùèé íîìåð. Äëÿ ýòîãî ïðåäíàçíà÷åíà êîìàíäà
+% \begin{quote}
+% |\ContinuedFloat|\quad.
+% \end{quote}
+%^^A is for; it should be used as first command inside the floating environment.
+%^^A It prevents the increment of the relevant counter (usually done by |\caption|)
+%^^A so a figure or table with a |\ContinuedFloat| in it gets the same reference
+%^^A number as the figure or table before.
+% Ëó÷øå å¸ ïîñòàâèòü ïåðâîé âíóòðè îêðóæåíèÿ ôëîòà.
+% Êîìàíäà |\ContinuedFloat| îòìåíÿåò óâåëè÷åíèå ñîîòâåòñòâóþùåãî ñ÷¸ò÷èêà ôëîòà
+% (èñïîëüçóåìîãî êîìàíäîé |\caption|)
+% è~çàäà¸ò òîò æå íîìåð êàê è~ó~ðèñóíêà èëè òàáëèöû âûøå.
+%
+%^^A An example:
+% Ïðèìåð:
+% \begin{quote}
+% |\begin{table}|\\
+% |\caption{Òàáëè÷êà}|\\
+% \ldots\\
+% |\end{table}|\\
+% \ldots\\
+% |\begin{table}\ContinuedFloat|\\
+% |\caption{Òàáëè÷êà (ïðîäîëæåíèå)}|\\
+% \ldots\\
+% |\end{table}|
+% \end{quote}
+%^^A gives the following result:
+% äàñò ñëåäóþùèé ðåçóëüòàò:
+% \begin{Example}
+% \makeatletter\def\@captype{table}\makeatother
+% \caption[]{Òàáëè÷êà}
+% \centerline{\ldots}
+% \ContinuedFloat
+% \captionsetup{aboveskip=0pt}
+% \caption[]{Òàáëè÷êà (ïðîäîëæåíèå)}
+% \label{TeXr:continued:z}
+% \end{Example}
+%
+% \DescribeMacro{\captionsetup}
+%^^A We already know the |\captionsetup| command (see \Section{usage}
+%^^A {Using the package}), but this time we get enlighten about
+%^^A its optional argument \meta{float type}.
+% Íàì óæå èçâåñòíà êîìàíäà |\captionsetup| (ñì.~\Section{usage}
+% {Èñïîëüçîâàíèå ïàêåòà}), Íî ñåé÷àñ ìû ðàçáåð¸ì çíà÷åíèå
+% äîïîëíèòåëüíîãî àðãóìåíòà, \meta{float type}.
+%
+%^^A Remember, the syntax of this command is
+% Íàïîìíèì ñèíòàêñèñ ýòîé êîìàíäû
+% \begin{quote}
+% |\captionsetup|\oarg{float type}\marg{options}\quad.
+% \end{quote}
+%
+%^^A If a \meta{float type} gets specified, all the \meta{options} don't
+%^^A change anything at this time. Instead they only get marked for a later use,
+%^^A when a caption inside of a floating environment of the particular type
+%^^A \meta{float type} gets typeset.
+%^^A For example
+% Åñëè \meta{float type} çàäàí, âñå êëþ÷è è~îïöèè, \meta{options} íè÷åãî
+% íå èçìåíÿò â~ìåñòå çàäàíèÿ. Îíè òîëüêî îïðåäåëåíû äëÿ áóäóùåãî èñïîëüçîâàíèÿ,
+% â~ìîìåíò, êîãäà ïîäïèñü âíóòðè îêðóæåíèÿ ôëîòà äàííîãî òèïà,
+% \meta{float type}, áóäåò íàïå÷àòàíà.
+% Íàïðèìåð
+% \begin{quote}
+% |\captionsetup[figure]|\marg{options}
+% \end{quote}
+%^^A forces captions within a |figure| environment to use the given \meta{options}.
+% îïðåäåëÿåò îôîðìëåíèå \meta{options} äëÿ ïîäïèñè âíóòðè îêðóæåíèÿ |figure|.
+%
+%^^A Here comes an example to illustrate this:
+% Äàëåå èä¸ò ïðèìåð èëëþñòðèðóþùèé ñêàçàííîå:
+% \begin{quote}
+% |\captionsetup{font=small}|\\
+% |\captionsetup[figure]{labelfont=bf}|
+% \end{quote}
+%^^A gives captions like this:
+% ñîçäàñò ïîäïèñè âèäà:
+% \begin{Example}
+% \captionsetup{font=small}
+% \captionsetup[figure]{labelfont=bf}
+% \captionof{figure}[]{Êàðòèíêà}
+% \captionsetup{belowskip=\abovecaptionskip}
+% \captionof{table}[]{Òàáëè÷êà}
+% \end{Example}
+%
+%^^A As you see the command |\captionsetup[figure]{labelfont=bf}| only changed
+%^^A the font of the figure caption labels, not touching all other ones.
+% Êàê âû âèäèòå óñòàíîâêà |\captionsetup[figure]{labelfont=bf}| èçìåíÿåò
+% òîëüêî øðèôò íóìåðàöèîííîé ÷àñòè ïîäïèñè, âñ¸ îñòàëüíîå îñòà¸òñÿ.
+%
+% \DescribeMacro{\clearcaptionsetup}
+%^^A If you want to get rid of these parameters marked for an automatic use within
+%^^A a particular environment you can use the command
+% Åñëè âàì âíóòðè äàííîãî îêðóæåíèÿ íóæíî îòìåíèòü ïàðàìåòðû, çàäàííûå äëÿ
+% òåêóùåãî òèïà ôëîòà, èñïîëüçóéòå êîìàíäó
+% \begin{quote}
+% |\clearcaptionsetup|\marg{float type}\quad.
+% \end{quote}
+%
+%^^A For example |\clearcaptionsetup{figure}| would clear the extra handling in the
+%^^A example above:
+% Íàïðèìåð |\clearcaptionsetup{figure}| îòìåíèò äîïîëíèòåëüíûå íàñòðîéêè
+% èç ïðèìåðà âûøå:
+% \begin{Example}
+% \captionsetup{font=small}
+% \captionof{figure}[]{Êàðòèêà}
+% \captionsetup{belowskip=\abovecaptionskip}
+% \captionof{table}[]{Òàáëè÷êà}
+% \end{Example}
+%
+%^^A As \meta{float type} you can usually give one of these two only:
+%^^A |figure| or |table|.
+%^^A But as we will see later some \LaTeX\ packages (like the
+%^^A \package{float}, \package{longtable}, and \package{sidecap} package
+%^^A for example) offer additional floating environments and these two
+%^^A commands can also be used with them.
+% Â~êà÷åñòâå îïöèè â~\meta{float type} âû ìîæåòå îáû÷íî óêàçûâàòü äâà èç íèõ:
+% |figure| èëè |table|.
+% Íî, êàê óâèäèòå ïîçæå, íåêîòîðûå ïàêåòû \LaTeX'à (êàê, íàïðèìåð,
+% \package{float}, \package{longtable}, è~\package{sidecap})
+% îïðåäåëÿþò äîïîëíèòåëüíûå îêðóæåíèÿ è~ýòè äâå êîìàíäû ìîãóò áûòü
+% â~íèõ èñïîëüçîâàíû.
+%
+% \iffalse
+% --------------------------------------------------------------------------- %
+% \fi
+%
+%
+%^^A \section{Do it yourself!}
+% \section{Äåëàåì ñàìè!}
+% \label{declare}
+%
+%^^A A family of commands is provided to allow users to define their own formats.
+%^^A This enables information on separators, justification, fonts, and styles to
+%^^A be associated with a name and kept in one place
+%^^A (these commands need to appear in the document preamble,
+%^^A this is the part between |\documentclass| and |\begin{document}|).
+% Èìååòñÿ ñåìåéñòâî êîìàíä, ïîçâîëÿþùèõ ïîëüçîâàòåëþ ñàìîñòîÿòåëüíî
+% ñîçäàòü ñîáñòâåííîå îôîðìëåíèå.
+% Ýòî ïîçâîëÿåò èíôîðìàöèþ î~ðàçäåëèòåëÿõ, âûêëþ÷êå, øðèôòàõ, è~ñòèëÿõ
+% ïðèâÿçàòü ê~îïðåäåë¸ííîìó êëþ÷ó, è~ïîìåñòèòü âñ¸ ýòî â~îäíîì ìåñòå
+% (òàêèå êîìàíäû äîëæíû íàõîäèòüñÿ â~ïðåàìáóëå äîêóìåíòà \cdash---
+% ýòî ÷àñòü ìåæäó ñòðîêàìè êîìàíä |\documentclass| è~|\begin{document}|).
+%
+%
+% \DescribeMacro{\DeclareCaptionFormat}
+%^^A You can define your own caption formats using the command
+% Âû ìîæåòå îïðåäåëèòü ñâî¸ îôîðìëåíèå ïîäïèñè, èñïîëüçóÿ êîìàíäó
+% \begin{quote}
+% |\DeclareCaptionFormat|\marg{name}\marg{code using \#1, \#2 and \#3}\quad.
+% \end{quote}
+%^^A At usage the system replaces \#1 with the caption label, \#2 with the
+%^^A separator and \#3 with the text. So the standard format |plain| is
+%^^A pre-defined by the \thispackage\ package as
+% Ïðè èñïîëüçîâàíèè ïàêåò çàìåíÿåò \#1 íà íóìåðàöèîííûé çàãîëîâîê, \#2 íà
+% ðàçäåëèòåëü è~\#3 íà òåêñò ïîäïèñè. Èòàê, ñòàíäàðòíûé ôîðìàò |plain| îïðåäåë¸í
+% âíóòðè ïàêåòà \thispackage\ êàê
+% \begin{quote}
+% |\DeclareCaptionFormat{plain}{#1#2#3\par}|
+% \end{quote}
+%
+% \DescribeMacro{\DeclareCaptionLabelFormat}
+%^^A Likewise you can define your own caption label formats:
+% Àíàëîãè÷íî âû ìîæåòå îïðåäåëèòü ôîðìàò íóìåðàöèîííîãî çàãîëîâêà:
+% \begin{quote}
+% |\DeclareCaptionLabelFormat|\marg{name}\marg{code using \#1 and \#2}
+% \end{quote}
+%^^A At usage \#1 gets replaced with the name (e.g. ``figure'') and \#2
+%^^A gets replaced with the reference number (e.g. ``12'').
+% Ïðè èñïîëüçîâàíèè \#1 çàìåíÿåòñÿ íà èìÿ ôëîòà (íàïðèìåð. «Ðèñ.») è~\#2
+% çàìåíÿåòñÿ íà ïîðÿäêîâûé íîìåð (íàïðèìåð «12»).
+%
+% \DescribeMacro{\bothIfFirst}
+% \DescribeMacro{\bothIfSecond}
+%^^A If you define your own caption label formats and use the \package{subfig}
+%^^A package\cite{subfig}, you should take care of empty caption label names.
+%^^A For this purpose the commands
+% Êîãäà âû îïðåäåëÿåòå ñâî¸ îôîðìëåíèå íóìåðàöèîííîãî çàãîëîâêà è~èñïîëüçóåòå
+% òàêæå ïàêåò \package{subfig}, âû äîëæíû ïîìíèòü ÷òî â~ïîäôëîòàõ ýëåìåíò
+% «èìÿ ôëîòà» áóäåò ïóñòûì. Äëÿ ýòîé öåëè ñëåäóþùèå êîìàíäû
+% \begin{quote}
+% |\bothIfFirst|\marg{first arg}\marg{second arg}\quad è\\
+% |\bothIfSecond|\marg{first arg}\marg{second arg}
+% \end{quote}
+%^^A are offered. |\bothIfFirst| tests if the first argument exists (means: is
+%^^A not empty), |\bothIfSecond| tests if the second argument exists. If yes,
+%^^A both arguments get typeset, otherwise none of them.
+% è~ïðåäëîæåíû. Êîìàíäà |\bothIfFirst| òåñòèðóåò íàëè÷èå ïåðâîãî àðãóìåíòà (÷òî îí
+% íåïóñòîé), êîìàíäà |\bothIfSecond| òåñòèðóåò íàëè÷èå âòîðîãî. Åñëè òåñòèðóåìûé
+% àðãóìåíò åñòü, òî ïå÷àòàþòñÿ îáà àðãóìåíòà, â~ïðîòèâíîì ñëó÷àå íè îäíîãî.
+%
+%^^A For example the standard label format |simple| is \emph{not} defined as
+% Íàïðèìåð, ñòàíäàðòíîå îôîðìëåíèå íóìåðàöèè |simple| îïðåäåëåíî íå òàê:
+% \begin{quote}
+% |\DeclareCaptionLabelFormat{simple}{#1 #2}|\quad,
+% \end{quote}
+%^^A because this could cause an extra space if \#1 is empty. Instead |simple|
+%^^A is defined as
+% ïîñêîëüêó àðãóìåíò \#1 ìîæåò áûòü ïóñòûì. Âìåñòî ýòîãî |simple|
+% îïðåäåë¸í ñëåäóþùèì îáðàçîì
+% \begin{quote}
+% |\DeclareCaptionLabelFormat{simple}{\bothIfFirst{#1}{ }#2}|\quad,
+% \end{quote}
+%^^A causing the space to appear only if the label name is present.
+% â~ðåçóëüòàòå ïðîáåë ïîÿâèòñÿ òîëüêî òîãäà, êîãäà åñòü èìÿ íóìåðàöèîííîãî
+% çàãîëîâêà.
+%
+%
+% \DescribeMacro{\DeclareCaptionLabelSeparator}
+%^^A You can define your own caption label separators with
+% Ìîæíî îïðåäåëèòü ñâîé ðàçäåëèòåëü íîìåðà è~òåêñòà ïîäïèñè ñ~ïîìîùüþ
+% êîìàíäû
+% \begin{quote}
+% |\DeclareCaptionLabelSeparator|\marg{name}\marg{code}\quad.
+% \end{quote}
+% \nopagebreak[3]
+%^^A Again an easy example taken from the \thispackage\ package itself:
+% È~îïÿòü ïðîñòîé ïðèìåð èç ñàìîãî ïàêåòà \thispackage:
+% \nopagebreak[3]
+% \begin{quote}
+% |\DeclareCaptionLabelSeparator{colon}{: }|
+% \end{quote}
+%
+%
+% \DescribeMacro{\DeclareCaptionJustification}
+%^^A You can define your own caption justifications with
+% Âû ìîæåòå îïðåäåëèòü ñîáñòâåííóþ âûêëþ÷êó ñ~ïîìîùüþ êîìàíäû
+% \begin{quote}
+% |\DeclareCaptionJustification|\marg{name}\marg{code}\quad.
+% \end{quote}
+%^^A The \meta{code} simply gets typeset just before the caption.
+%^^A E.g.~using the justification |raggedright|, which is defined as
+% Àðãóìåíò \meta{code} çàäà¸ò âûêëþ÷êó äî íà÷àëà ïîäïèñè.
+% Íàïðèìåð èñïîëüçîâàíèå âûêëþ÷êè |raggedright|, êîòîðàÿ îïðåäåëåíà êàê
+% \begin{quote}
+% |\DeclareCaptionJustification{raggedright}{\raggedright}|\quad,
+% \end{quote}
+%^^A lets captions with all lines moved to the left margin.
+% âûêëþ÷àåò âñå ñòðîêè ïîäïèñè ê~ëåâîìó ïîëþ.
+%
+% \DescribeMacro{\DeclareCaptionFont}
+%^^A You can define your own caption fonts with
+% Âû ìîæåòå çàäàòü ñâîé øðèôò äëÿ ïîäïèñè ñ~ïîìîùüþ
+% \begin{quote}
+% |\DeclareCaptionFont|\marg{name}\marg{code}\quad.
+% \end{quote}
+%^^A For example this package defines the options |small| and |bf| as
+% Íàïðèìåð äàííûé ïàêåò îïðåäåëÿåò îïöèè |small| è~|bf| êàê
+% \begin{quote}
+% |\DeclareCaptionFont{small}{\small}|\quad è\\
+% |\DeclareCaptionFont{bf}{\bfseries}|\quad.
+% \end{quote}
+%^^A The line spacing could be customized using the \package{setspace} package,
+%^^A for example:\NEWdescription{v3.0h}
+% Èíòåðëèíüÿæ ìîæåò áûòü íàñòðîåí ñ~ïîìîùüþ ïàêåòà \package{setspace},
+% íàïðèìåð:\NEWdescription{v3.0h}
+% \begin{quote}
+% |\usepackage{setspace}|\\
+% \iffalse
+%^^A |\DeclareCaptionFont{singlespacing}{\setstretch{1}}|\quad\footnote{%
+%^^A \emph{Note:} Using \cs{singlespacing} does not work here since it contains
+%^^A a \cs{vskip} command.}\\
+% |\DeclareCaptionFont{singlespacing}{\setstretch{1}}|\quad\footnote{%
+% \emph{Ïðèìå÷àíèå:} Èñïîëüçîâàíèå \cs{singlespacing} â äàííîì ñëó÷àå
+% íå ðàáîòàåò ïîñêîëüêó ñîäåðæèò êîìàíäó \cs{vskip}.}\\
+% |\DeclareCaptionFont{onehalfspacing}{\onehalfspacing}|\\
+% |\DeclareCaptionFont{doublespacing}{\doublespacing}|\\
+% \fi
+% |\captionsetup{font={onehalfspacing,small},labelfont=bf}|
+% \end{quote}
+% \example{font={onehalfspacing,small},labelfont=bf,singlelinecheck=off}\figuretext
+%^^A An example which brings color into life:
+% Ïðèìåð èñïîëüçîâàíèÿ öâåòà:
+% \begin{quote}
+% |\usepackage{color}|\\
+% |\DeclareCaptionFont{red}{\color{red}}|\\
+% |\DeclareCaptionFont{green}{\color{green}}|\\
+% |\DeclareCaptionFont{blue}{\color{blue}}|\\
+% |\captionsetup{labelfont=blue,textfont=green}|
+% \end{quote}
+% \example{labelfont=blue,textfont=green,singlelinecheck=off}\figuretext
+%
+% \DescribeMacro{\DeclareCaptionStyle}
+%^^A You can define your own caption styles with
+% Âû ìîæåòå îïðåäåëèòü ñâîè ñîáñòâåííûå ñòèëè ñ~ïîìîùüþ
+% \begin{quote}
+% |\DeclareCaptionStyle|\marg{name}\oarg{additional options}\marg{options}
+% \end{quote}
+%^^A Remember, caption styles are just a collection of suitable options, saved
+%^^A under a given name. You can wake up these options at any time with the
+%^^A option |style=|\meta{style name}.
+% Âñïîìíèì, ÷òî ñòèëè ïîäïèñè ýòî êîëëåêöèÿ êëþ÷åé, ñîõðàí¸ííûõ
+% ïîä äàííûì èìåíåì. Âû ìîæåòå ïðèâåñòè èõ â~äåéñòâèå ñ~ïîìîùüþ êëþ÷à
+% |style=|\meta{style name}.
+%
+%^^A All caption styles are based on the default set of options. (See \Section
+%^^A {style}{Styles} for a complete list.) So you only need
+%^^A to specify options which are different to them.
+% Âñå ñòèëè ïîäïèñåé áàçèðóþòñÿ íà óñòàíîâêàõ ïî óìîë÷àíèþ. (Ñì. ïîëíûé ñïèñîê
+% â~\Section {style}{Ñòèëè}.) Ïîýòîìó äîñòàòî÷íî îïðåäåëèòü îïöèè, îòëè÷íûå
+% îò óæå çàäàííûõ.
+%
+%^^A If you specify \meta{additional options} they get used in addition when
+%^^A the caption fits into a single line and this check was not disabled with
+%^^A the option |singlelinecheck=off|.
+% Åñëè âû îïðåäåëèòå \meta{additional options} îíè áóäóò èñïîëüçîâàòüñÿ êîãäà
+% ïîäïèñü áóäåò îäíîñòðî÷íîé, è~êîíòðîëü êîðîòêèõ ïîäïèñåé íå îòêëþ÷åí
+% çàäàíèåì îïöèè |singlelinecheck=off|.
+%
+%^^A Again a very easy example taken from the core of this package: The
+%^^A caption style |default| is pre-defined as
+% Îïÿòü æå î÷åíü ïðîñòîé ïðèìåð èç ñàìîãî |caption.sty|:
+% \begin{quote}
+% |\DeclareCaptionStyle{default}[justification=centering]{}|
+% \end{quote}
+%
+% \iffalse
+% --------------------------------------------------------------------------- %
+% \fi
+%
+%^^A \subsection{Further Examples}
+% \subsection{Åù¸ íåñêîëüêî ïðèìåðîâ}
+%
+%^^A If you would like to have a colon \emph{and} a line break as caption
+%^^A separator you could define it this way:
+% Åñëè âàì íóæíî òî÷êà è íîâàÿ ñòðîêà êàê ðàçäåëèòåëü ìåæäó íîìåðîì è~òåêñòîì
+% îïðåäåëèòå ýòî òàê:
+% \begin{quote}
+% |\DeclareCaptionLabelSeparator{period-newline}{. \\}|
+% \end{quote}
+%^^A Selecting this separator with |\captionsetup{labelsep=period-newline}| you
+%^^A get captions like this:
+% Çàäàâ ýòîò ðàçäåëèòåëü êàê |\captionsetup{labelsep=period-newline}| âû
+% ïîëó÷èòå ñëåäóþùóþ ïîäïèñü:
+% \begin{Example}
+% \captionsetup{labelsep=period-newline,labelfont=bf,margin=10pt}
+% \captionsetup{aboveskip=0pt,type=figure}
+% \caption[]{\figuretext}
+% \end{Example}
+%
+%^^A For short captions---which fit into one single line---this separator
+%^^A may not be satisfying, even when the automatically centering process
+%^^A is switched off (with |singlelinecheck=off|):
+% Äëÿ êðàòêèõ ïîäïèñåé \cdash--- êîòîðûå ïîìåùàþòñÿ íà îäíîé ñòðîêå \cdash--- òàêîé
+% ðàçäåëèòåëü íå ãîäèòñÿ, äàæå åñëè îòìåíåíî àâòîìàòè÷åñêîå öåíòðèðîâàíèå
+% (ñ~ïîìîùüþ |singlelinecheck=off|):
+% \begin{Example}
+% \captionsetup{labelsep=period-newline,labelfont=bf,margin=10pt,singlelinecheck=0}
+% \captionsetup{aboveskip=0pt,type=figure}
+% \caption[]{Êàðòèíêà.}
+% \end{Example}
+%
+%^^A An own caption style which selects another caption separator automatically
+%^^A puts this right:
+% Ñïåöèàëüíûé ñòèëü, êîòîðûé îïðåäåëÿåò äðóãîé ðàçäåëèòåëü àâòîìàòè÷åñêè
+% âîçâðàùàåò âñ¸ íà ìåñòà:
+% \begin{quote}
+% |\DeclareCaptionStyle{period-newline}%|\\
+% | [labelsep=period]{labelsep=period-newline}|
+% \end{quote}
+% \begin{Example}
+% \captionsetup{style=period-newline,labelfont=bf,margin=10pt}
+% \captionsetup{aboveskip=0pt,type=figure}
+% \ContinuedFloat
+% \caption[]{Êàðòèíêà.}
+% \end{Example}
+%^^A If you would like to keep the centering of these captions instead, an
+%^^A appropriate definition would be something like
+% Åñëè âû ïðåäïî÷ò¸òå îñòàâèòü öåíòðèðîâàíèå êîðîòêîé ñòðîêè
+% íóæíî îïðåäåëèòü
+% \begin{quote}
+% |\DeclareCaptionStyle{period-newline}%|\\
+% | [labelsep=period,justification=centering]%|\\
+% | {labelsep=period-newline}|\quad.
+% \end{quote}
+%^^A Using this definition short captions look like
+% Ïðè ýòîì îïðåäåëåíèè êîðîòêèå ïîäïèñè áóäóò âûãëÿäåòü òàê
+% \begin{Example}
+% \captionsetup{style=period-newline2,labelfont=bf,margin=10pt}
+% \captionsetup{aboveskip=0pt,type=figure}
+% \ContinuedFloat
+% \caption[]{Êàðòèíêà.}
+% \end{Example}
+%^^A while long ones still have a line break after the caption label.
+% â~òî æå âðåìÿ äëèííûå ïîäïèñè ñîõðàíÿò ðàçðûâ ïîñëå íîìåðà ôëîòà.
+%
+%^^A Slightly changed, you also get centered captions if they are longer than
+%^^A one line:
+% ×óòü èçìåíèâ ñòèëü, âû ïîëó÷èòå è~äëèííûå ïîäïèñè öåíòðèðîâàííûìè:
+% \begin{quote}
+% |\DeclareCaptionStyle{period-newline}%|\\
+% | [labelsep=period]%|\\
+% | {labelsep=period-newline,justification=centering}|
+% \end{quote}
+% \begin{Example}
+% \captionsetup{style=period-newline3,labelfont=bf,margin=10pt}
+% \captionsetup{aboveskip=0pt,type=figure}
+% \caption[]{\figuretext}
+% \end{Example}
+%
+% \bigskip
+%^^A Another example: You want captions to look like this:
+% Äðóãîé ïðèìåð: âû õîòèòå ïîëó÷èòü òàêèå ïîäïèñè:
+% \begin{Example}
+% \captionsetup{format=reverse,labelformat=fullparens,labelsep=fill,font=small,labelfont=it}
+% \captionsetup{aboveskip=0pt}
+% \captionof{figure}[]{\figuretext}
+% \end{Example}
+% \pagebreak[2]
+%^^A You could do it this way:
+% Âû äîëæíû çàäàòü èõ ñëåäóþùèì îáðàçîì:
+% \nopagebreak[3]
+% {\leftmargini=10pt
+% \begin{quote}
+% |\DeclareCaptionFormat{reverse}{#3#2#1}|\\
+% |\DeclareCaptionLabelFormat{fullparens}{(\bothIfFirst{#1}{ }#2)}|\\
+% |\DeclareCaptionLabelSeparator{fill}{\hfill}|\\
+% |\captionsetup{format=reverse,labelformat=fullparens,|\\
+% | labelsep=fill,font=small,labelfont=it}|
+% \end{quote}}
+%
+% \bigskip\pagebreak[3]
+%^^A Another example: The caption text should go into the left margin; a possible
+%^^A solution would be:
+% Åù¸ ïðèìåð: ïîìåñòèòü íóìåðàöèîííûé çàãîëîâîê ïîäïèñè íà ëåâîì ïîëå; âîçìîæíîå ðåøåíèå:
+% {\leftmargini=10pt
+% \begin{quote}
+% |\DeclareCaptionFormat{llap}{\llap{#1#2}#3\par}|\\
+% |\captionsetup{format=llap,labelsep=quad,singlelinecheck=no}|
+% \end{quote}}
+%^^A As a result you would get captions like this:
+% Â~ðåçóëüòàòå âû ïîëó÷èòå òàêóþ ïîäïèñü:
+% \begin{Example}
+% \captionsetup{format=llap,singlelinecheck=no,labelsep=quad}
+% \captionsetup{aboveskip=0pt}
+% \captionof{figure}[]{\figuretext}
+% \end{Example}
+%
+% \iffalse
+% --------------------------------------------------------------------------- %
+% \fi
+%
+% \pagebreak[1]
+%^^A \section{Using non-standard document classes}
+% \section{Èñïîëüçîâàíèå íåñòàíäàðòíûõ êëàññîâ äîêóìåíòà}
+%
+% \NEWdescription{v3.0p}
+%^^A% The \thispackage\ package was developed using the standard document classes
+%^^A% |article|, |report| and |book|, it also works with the Dutch document classes
+%^^A% |artikel|, |rapport| and |boek|. It is \emph{incompatible} with all other
+%^^A% document classes, except the ones based on one of the above.
+% Ïàêåò \thispackage\nopagebreak\ íàñòðîåí íà èñïîëüçîâàíèå ñî ñòàíäàðòíûìè êëàññàìè
+% |article|, |report| è~|book|, îí òàêæå ðàáîòàåò ñ~êëàññàìè äëÿ íåìåöêèõ ïóáëèêàöèé
+% |artikel|, |rapport| è~|boek|.
+%
+%^^A% If you are unsure if your document class is supported or not, it's better
+%^^A% \emph{not} to use this package. You could try if your document will compile
+%^^A% fine with the \thispackage\ package anyway, but you should watch carefully
+%^^A% if side-effects occur, i.e. the look and feel of your captions should
+%^^A% \emph{not} change if you just include the caption package without options.
+%^^A% (If it does, you can carry on, but you should be warned that the output
+%^^A% could change with upcoming versions of the \thispackage\ package.)
+%^^A% If this is fine, you can start setting options with
+%^^A% |\usepackage[|\ldots|]{caption}| or |\captionsetup| and keep your fingers
+%^^A% crossed.
+% Åñëè âû íå óâåðåíû ïîääåðæèâàåòñÿ ëè âàø êëàññ äîêóìåíòà èëè íåò,
+% ëó÷øå äàííûé ïàêåò íå èñïîëüçîâàòü. Âû â~ëþáîì ñëó÷àå ìîæåòå ïîïðîáîâàòü
+% îáðàáîòàòü ñâîé äîêóìåíò ñ~ïàêåòîì \thispackage, íî â~ýòîì ñëó÷àå âíèìàòåëüíî
+% ïðîâåðüòå, åñòü ëè ïîáî÷íûå ýôôåêòû, ò.\,å. ïðè ïîäêëþ÷¸ííîì áåç îïöèé ïàêåòå
+% è~áåç íåãî âèä ïîäðèñóíî÷íûõ ïîäïèñåé \emph{íå} äîëæåí ìåíÿòüñÿ.
+% (Åñëè ýòî ïðîèñõîäèò, ìîæåòå ïðîäîëæèòü, íî çíàéòå, ÷òî ñëåäóþùèå âåðñèè
+% ïàêåòà \thispackage\ ìîãóò èçìåíèòü âûâîä âàøåãî äîêóìåíòà.)
+% Åñëè âñ¸ ïðåêðàñíî, ìîæíî òåïåðü çàäàòü îïöèè, èñïîëüçóÿ
+% |\usepackage[|\ldots|]{caption}| èëè |\captionsetup| è~íàäåÿòüñÿ íà ëó÷øåå.
+%
+%^^A% The upcoming version \version{3.1} of the \thispackage\ package will be
+%^^A% adapted to several document classes, e.g. the \package{beamer} class and
+%^^A% the \KOMAScript\ ones. It's planned for release during Summer 2007.
+% Ñëåäóþùàÿ âåðñèÿ \version{3.1} ïàêåòà \thispackage\ áóäåò ðàáîòàòü ñ~òàêèìè êëàññàìè,
+% êàê \package{beamer} è~êëàññû \KOMAScript. Âûõîä âåðñèè ïëàíèðóåòñÿ íà ëåòî 2007\,ã.
+%
+% \iffalse
+% --------------------------------------------------------------------------- %
+% \fi
+%
+%^^A \section{Compatibility to other packages}
+% \section{Ñîâìåñòèìîñòü ñ äðóãèìè ïàêåòàìè}
+% \label{packages}
+%
+%^^A The \thispackage\ package contains special adaptations to other packages,
+%^^A so the captions should always look like you have specified them to look like.
+% Ïàêåò \thispackage\ ñîäåðæèò ñïåöèàëüíûå àäàïòàöèè ñ~äðóãèìè ïàêåòàìè,
+% òàêæå ðàáîòàþùèìè ñ~ïîäïèñÿìè, ïîýòîìó ïîäïèñè \emph{âñåãäà} âûãëÿäÿò òàê,
+% êàê âû îïðåäåëèëè èì íàñòðîéêè.
+%
+%^^A These are the packages the \thispackage\ package is adapted to:
+% Çäåñü ïðèâåäåíû ïàêåòû, êîòîðûå àäàïòèðîâàíû íà ñîâìåñòíîå èñïîëüçîâàíèå
+% ñ~\thispackage:
+%
+%^^A \begin{tabular}{ll}
+%^^A |float| & Gives you the possibility to define new floating environments\\
+%^^A |listings| & Typesets source code listings\\
+%^^A |longtable| & Typesets tables spanned over multiple pages\\
+%^^A |rotating| & Supports rotated figures and tables\\
+%^^A |sidecap| & Offers captions \emph{beside} figures or tables\\
+%^^A |supertabular| & Typesets tables spanned over multiple pages\\
+%^^A \end{tabular}
+% \begin{tabular}{ll}
+% |float| & Äà¸ò âîçìîæíîñòü îïðåäåëèòü íîâîå îêðóæåíèå ôëîòà \\
+% |listings| & Ïå÷àòàåò èñõîäíûå òåêñòû ïðîãðàìì\\
+% |longtable| & Ïå÷àòàåò ìíîãîñòðàíè÷íûå òàáëèöû\\
+% |rotating| & Ïîääåðæèâàåò ïîâîðîò ðèñóíêîâ è òàáëèö\\
+% |sidecap| & Ïðåäëàãàåò îêðóæåíèÿ ñ ïîäïèñÿìè ñáîêó\\
+% |supertabular| & Ïå÷àòàåò ìíîãîñòðàíè÷íûå òàáëèöû [àëüòåðíàòèâà |longtable|]\\
+% \end{tabular}
+%
+% \NEWfeature{v3.0b}
+%^^A If you use one of the above packages together with the {\thispackage} package
+%^^A you get the additional possibility to set up captions with
+% Åñëè âû èñïîëüçóåòå îäèí èç ýòèõ ïàêåòîâ âìåñòå ñ~ïàêåòîì {\thispackage}
+% âû ïîëó÷àåòå äîïîëíèòåëüíûå âîçìîæíîñòè äëÿ íàñòðîåê îôîðìëåíèÿ ñ~ïîìîùüþ
+% \begin{quote}|\captionsetup|\oarg{environment}\marg{options}\quad,\end{quote}
+%^^A where \meta{environment} stands for any environment the above packages offer.
+%^^A (Please note that this do not work with the |sideways| environments offered by
+%^^A the \package{rotating} package.)
+%^^A For example
+% ãäå \meta{environment} îïðåäåëÿåò îêðóæåíèÿ, çàäàííûå óïîìÿíóòûìè âûøå ïàêåòàìè.
+% (Îáðàòèòå âíèìàíèå, ÷òî ýòî íå ðàáîòàåò ñ~îêðóæåíèÿìè |sideways...| ïàêåòà
+% \package{rotating}.)
+% Íàïðèìåð
+% \begin{quote}|\captionsetup[lstlisting]{labelfont=bf}|\end{quote}
+%^^A forces captions inside the |lstlisting| environment to have bold labels.
+% Çàäà¸ò ïîäïèñÿì âíóòðè îêðóæåíèÿ |lstlisting| ïîëóæèðíûå íóìåðàöèîííûå ÷àñòè.
+%
+%^^A If a certain support is not desired you can switch it off using the
+%^^A \thispackage\ package option
+% Åñëè òàêàÿ ïîääåðæêà íåæåëàòåëüíà âû ìîæåòå çàäàòü ñîîòâåòñòâóþùóþ îïöèþ
+% ïàêåòà \thispackage
+% \begin{quote}
+% |\usepackage[|\ldots|,|\meta{package}|=no]{caption}|\quad.
+% \end{quote}
+%^^A For example specifying the option |float=no| means you don't like the
+%^^A \thispackage\ package to support the \package{float} package.
+%^^A (Note: You can specify these options only within the |\usepackage| command,
+%^^A especially \emph{not} at a later time with |\captionsetup|.)
+% Íàïðèìåð, çàäàíèå îïöèè |float=no| îçíà÷àåò, ÷òî âû íå õîòèòå, ÷òîáû ïàêåò
+% \thispackage\ ïîääåðæèâàë ïàêåò \package{float}. (Ïðèìå÷àíèå:
+% âû ìîæåòå îïðåäåëèòü ýòè îïöèè òîëüêî â~ñòðîêå êîìàíäû |\usepackage|,
+% òåì áîëåå \emph{íå} â~êîìàíäàõ |\captionsetup|.)
+%
+%^^A For further information about the packages mentioned above please take a look
+%^^A at the documentation belonging to them or buy yourself
+%^^A The \LaTeX\ Companion\cite{companion}.
+% Äëÿ ïîäðîáíîé èíôîðìàöèè î~ïàêåòàõ, êîòîðûå ïîääåðæèâàþòñÿ ñì. äîêóìåíòàöèþ
+% ýòèõ ïàêåòîâ èëè â~êíèãå The \LaTeX\ Companion\cite{companion}.
+%
+% \iffalse
+% --------------------------------------------------------------------------- %
+% \fi
+%
+%^^A \subsection{The \package{float} package}
+% \subsection{Ïàêåò \package{float}}
+% \label{float}
+%
+%^^A A very useful feature is provided by the \package{float} package\cite{float}:
+%^^A It offers the float placement specifier |H| which is much more restrictive
+%^^A than the specifier |h| offered by \LaTeX. While the latter one is only a
+%^^A recommendation to \LaTeX\ to set the float ``here'', the |H| forces the
+%^^A float to appear exactly at the spot where it occurs in your input file
+%^^A and nowhere else.
+% Î÷åíü ïîëåçíûå íàñòðîéêè ïðåäëàãàþòñÿ ïàêåòîì \package{float}\cite{float}.
+% Ïàêåò ïðåäëàãàåò ñïåöèàëüíóþ îïöèþ ðàçìåùåíèÿ ôëîòà |H| êîòîðàÿ æ¸ñò÷å, ïî
+% ñðàâíåíèþ ñ~îïöèåé |h| ñòàíäàðòíîãî \LaTeX'à. Åñëè ñòàíäàðòíàÿ îïöèÿ òîëüêî
+% «ðåêîìåíäóåò» \LaTeX'ó~ïîìåñòèòü ôëîò «çäåñü», îïöèÿ |H| ïîìåùàåò
+% ôëîò òî÷íî â~òîì ìåñòå ãäå îí çàïèñàí è~íèãäå áîëüøå [Ïðè ýòîé
+% îïöèè ôëîò ðåàëüíî âñòà¸ò íà ÿêîðü! \cdash--- \emph{Ïðèì. ïåðåâ}].
+%
+%^^A Furthermore it offers different styles for floating environments, these
+%^^A styles are |plain|, |plaintop|, |ruled|, and |boxed|.
+%^^A You can link one of these styles to either new floating environments or
+%^^A to one of the existing environments |figure| and |table|.
+% Ïîìèìî ýòîãî ïàêåò ïðåäëàãàåò ðàçëè÷íûå ñòèëè äëÿ îêðóæåíèé ôëîòîâ, ýòî ñòèëè
+% |plain|, |plaintop|, |ruled|, è~|boxed|.
+% Âû ìîæåòå çàäàòü îäèí èç ýòèõ ñòèëåé êàê äëÿ íîâûõ îêðóæåíèé ôëîòîâ, òàê
+% è~äëÿ óæå ñóùåñòâóþùèõ |figure| è~|table|.
+%
+%^^A If you are using the \thispackage\ package together with the \package{float}
+%^^A package a caption style called |ruled| gets defined automatically:
+% Åñëè âû èñïîëüçóåòå ïàêåò \thispackage\ âìåñòå ñ~ïàêåòîì \package{float}
+% ñòèëü ïîäïèñè |ruled| áóäåò îïðåäåë¸í àâòîìàòè÷åñêè:
+% \begin{quote}
+% |\DeclareCaptionStyle{ruled}{labelfont=bf,labelsep=space}|
+% \end{quote}
+%^^A This style represents the caption layout in |ruled| styled floats.
+%^^A For you as an end user this means that captions within |ruled| floats will
+%^^A always look like this, nevertheless what generic caption options do you
+%^^A specify:
+% Ýòîò ñòèëü ïðåäëàãàåò ñòèëü ïîäïèñåé â~ñòèëå ôëîòîâ |ruled|.
+% Äëÿ âàñ êàê ïîëüçîâàòåëÿ ýòî çíà÷èò, ÷òî ïîäïèñè âíóòðè |ruled| ôëîòîâ áóäóò
+% âñåãäà âûãëÿäåòü òàê, åñëè òîëüêî íå ïåðåîïðåäåëåíû çàäàííûå îïöèè ïàêåòà:
+%
+% \ifx\floatstyle\undefined
+%
+% \begin{Example}
+% \hrule height.8pt depth0pt \kern2pt
+% \vbox{\strut{\bfseries Program 7.1}
+% The first program. This hasn't got anything to do with the package
+% but is included as an example. Note the \texttt{ruled} float style.}
+% \kern2pt\hrule\kern2pt
+% \begin{verbatim}
+% #include <stdio.h>
+%
+% int main(int argc, char **argv)
+% {
+% for (int i = 0; i < argc; ++i)
+% printf("argv[%d] = %s\n", i, argv[i]);
+% return 0;
+% }
+% \end{verbatim}
+% \kern2pt\hrule\relax
+% \end{Example}
+%
+% \else
+%
+% \floatstyle{ruled}
+% \newfloat{Program}{tbp}{lop}[section]
+% \floatname{Program}{Program}
+%
+% \begin{Program}[H]
+% \begin{verbatim}
+% #include <stdio.h>
+%
+% int main(int argc, char **argv)
+% {
+% for (int i = 0; i < argc; ++i)
+% printf("argv[%d] = %s\n", i, argv[i]);
+% return 0;
+% }
+% \end{verbatim}
+% \caption{The first program. This hasn't got anything to do with the package
+% but is included as an example. Note the \texttt{ruled} float style.}
+% \end{Program}
+%
+% \fi
+%
+%^^A If you want a different layout for |ruled| captions you have to define
+%^^A your own one using the command
+% Åñëè âû æåëàåòå äðóãîå îôîðìëåíèå äëÿ |ruled| ïîäïèñåé íóæíî
+% çàäàòü ñâîè óñòàíîâêè, èñïîëüçóÿ êîìàíäó
+% \begin{quote}
+% |\DeclareCaptionStyle{ruled}|\marg{options}\quad.
+% \end{quote}
+%
+%^^A This mechanism also works with all other float styles. If you want a special
+%^^A caption layout---for |plain| or |boxed| floats for example---you can simply define
+%^^A a suitable caption style with the same name as the float style.
+% Ýòîò ìåõàíèçì äåéñòâóåò è~íà äðóãèå ñòèëè ôëîòîâ. Åñëè âàì íóæíî ñïåöèàëüíîå
+% îôîðìëåíèå ïîäïèñè äëÿ ñòèëÿ |plain| èëè |boxed|, âû ïðîñòî
+% îïðåäåëÿåòå ñîîòâåòñòâóþùèé ñòèëü ñ~òåì æå íàçâàíèåì.
+%
+%^^A \textbf{Note:} For successful cooperation you need the float package
+%^^A version 1.3 or newer.
+% \textbf{Ïðèìå÷àíèå:} Äëÿ óñïåøíîé êîîïåðàöèè âàì íóæíà âåðñèÿ ïàêåòà
+% ïîä íîìåðîì 1.3 èëè âûøå.
+%
+% \iffalse
+% --------------------------------------------------------------------------- %
+% \fi
+%
+% \pagebreak[3]
+%^^A \subsection{The \package{listings} package}
+% \subsection{Ïàêåò \package{listings}}
+% \label{listings}
+%
+% \NEWdescription{v3.0b}
+%^^A The \package{listings} package\cite{listings} is a source code printer for \LaTeX.
+%^^A You can typeset stand alone files as well as listings with an environment
+%^^A similar to \texttt{verbatim} as well as you can print code snippets using
+%^^A a command similar to |\verb|.
+%^^A Many parameters control the output and if your preferred programming
+%^^A language isn't already supported, you can make your own definition.
+% Ïàêåò \package{listings} \cite{listings} ïðåäíàçíà÷åí äëÿ ïå÷àòè èñõîäíîãî
+% êîäà â~\LaTeX'å. Âû ìîæåòå ïå÷àòàòü îòäåëüíûå ôàéëû â~îêðóæåíèè, àíàëîãè÷íîì
+% îêðóæåíèþ \texttt{verbatim} èëè ôðàãìåíòû êîäà òàê æå êàê ïðè èñïîëüçîâàíèè
+% êîìàíäû |\verb|.
+% Ìíîæåñòâî ïàðàìåòðîâ êîíòðîëèðóþò âûâîä êîäà è~åñëè âàì íóæíî îôîðìèòü
+% ÿçûê, êîòîðûé åù¸ íå èìååò ïîääåðæêè, âû ìîæåòå çàäàòü ñâîè îïðåäåëåíèÿ.
+%
+%^^A \textbf{Note:} For successful cooperation you need the listings package
+%^^A version 1.2 or higher. You'll get an error message when using an
+%^^A older version!
+% \textbf{Ïðèìå÷àíèå:} äëÿ óñïåøíîé êîîïåðàöèè âàì íóæåí ïàêåò
+% âåðñèè íå íèæå 1.2. Èíà÷å âû ïîëó÷èòå ñîîáùåíèå îá îøèáêå!
+%
+% \iffalse
+% --------------------------------------------------------------------------- %
+% \fi
+%
+%^^A \subsection{The \package{longtable} package}
+% \subsection{Ïàêåò \package{longtable}}
+% \label{longtable}
+%
+%^^A The \package{longtable} package\cite{longtable} offers the environment
+%^^A |longtable| which behaves similar to the |tabular| environment, but
+%^^A the table itself can span multiple pages.
+% Ïàêåò \package{longtable} \cite{longtable} ïðåäëàãàåò îêðóæåíèå
+% |longtable| êîòîðîå, àíàëîãè÷íî îêðóæåíèå |tabular|, ñîçäà¸ò òàáëè÷íûé
+% ìàòåðèàë, íî îí ìîæåò ðàçìåñòèòüñÿ íà íåñêîëüêèõ ïîëîñàõ.
+%
+%^^A \textbf{Note:} For successful cooperation you need the longtable package
+%^^A version 3.15 or newer.
+% \textbf{Ïðèìå÷àíèå:} Äëÿ óñïåøíîé êîîïåðàöèè èñïîëüçóéòå âåðñèþ
+% 3.15 èëè âûøå.
+%
+% \iffalse
+% --------------------------------------------------------------------------- %
+% \fi
+%
+%^^A \subsection{The \package{rotating} package}
+% \subsection{Ïàêåò \package{rotating}}
+% \label{rotating}
+%
+%^^A The \package{rotating} package\cite{rotating} offers the floating
+%^^A environments \texttt{sideways\-figure} and \texttt{sideways\-table}
+%^^A which are just like normal figures and tables but rotated by 90 degree.
+%^^A Furthermore they always use a full page on their own.
+% Ïàêåò \package{rotating} \cite{rotating} ïðåäëàãàåò îêðóæåíèÿ
+% \texttt{sideways\-figure} è~\texttt{sideways\-table}
+% êîòîðûå, àíàëîãè÷íû îáû÷íûì ðèñóíêàì è~òàáëèöàì, íî ïîâ¸ðíóòû íà 90 ãðàäóñîâ.
+% Ýòè îêðóæåíèÿ âñåãäà çàíèìàþò ïîëíóþ ïîëîñó.
+%
+% \iffalse
+% --------------------------------------------------------------------------- %
+% \fi
+%
+%^^A \subsection{The \package{sidecap} package}
+% \subsection{Ïàêåò \package{sidecap}}
+% \label{sidecap}
+%
+% \NEWdescription{v3.0b}
+%^^A The \package{sidecap} package\cite{sidecap} offers the floating
+%^^A environments |SCfigure| and |SCtable| which are like normal figures
+%^^A and tables but the caption will be put \emph{beside} the contents.
+% Ïàêåò \package{sidecap}\cite{sidecap} ïðåäëàãàåò îêðóæåíèÿ ôëîòîâ
+% |SCfigure| è~|SCtable|, êîòîðûå àíàëîãè÷íû îáû÷íûì ðèñóíêàì è~òàáëèöàì
+% íî ïîäïèñü ïîìåùàåòñÿ \emph{ñáîêó}.
+%
+%^^A The \package{sidecap} package offers it's own options for justification.
+%^^A If set, they will override the one specified with the caption option
+%^^A |justification=| for captions beside their contents.
+% Ïàêåò \package{sidecap} ïðåäëàãàåò ñâîè îïöèè âûêëþ÷êè.
+% Åñëè îíè çàäàíû, îíè ïåðåêðûâàþò çàäàííûå îïöèè â~êëþ÷å
+% |justification=|.
+%
+% \DescribeMacro{listof=}\label{TeXr:nolistentry:II}
+%^^A Using the \package{sidecap} package you will probably notice that
+%^^A suppressing the entry in the list of figures or tables with
+%^^A |\caption[]{|\ldots|}| won't work inside these environments.
+%^^A This is caused by the implementation design of the \package{sidecap}
+%^^A package, but you can use |\captionsetup{listof=false}| inside the
+%^^A figure or table as an alternative here.
+% Èñïîëüçóÿ ïàêåò the \package{sidecap} âû âîçìîæíî çàìåòèòå, ÷òî
+% îòìåíà âûâîäà â~ñïèñîê ïîäïèñè ñ~ïîìîùüþ êîäà
+% |\caption[]{|\ldots|}| íå ðàáîòàåò â~ýòèõ îêðóæåíèÿõ.
+% Ýòî ñâÿçàíî ñ~íàñòðîéêàìè ïàêåòà \package{sidecap},
+% íî ìîæíî èñïîëüçîâàòü äëÿ ýòîãî êëþ÷ |\captionsetup{listof=false}| âíóòðè
+% íóæíîé ôèãóðû èëè òàáëèöû.
+%
+% \ifx\SCfigure\undefined
+%
+% \begin{Example}
+% \newsavebox\scbox
+% \begin{lrbox}{\scbox}
+% \setlength{\unitlength}{.75cm}
+% \setlength{\fboxsep}{0pt}
+% \fbox{\begin{picture}(4,4)
+% \put(1,3){\circle{1}}
+% \put(3,3){\circle{1}}
+% \put(2,2){\circle{1}}
+% \put(1,1){\circle{1}}
+% \put(3,1){\circle{1}}
+% \end{picture}}
+% \end{lrbox}
+% \newlength\scboxwidth
+% \setlength\scboxwidth{\wd\scbox}
+% \makebox[\linewidth][c]{
+% \parbox[b]{\scboxwidth}{\unhbox\scbox}
+% \hspace\marginparsep
+% \parbox[b]{1.5\scboxwidth}{
+% \captionsetup{justification=raggedright,labelfont=bf}
+% \captionof{figure}[]{Íåáîëüøîé ïðèìåð ñ~ïîäïèñüþ ñáîêó.}
+% }
+% }
+% \end{Example}
+%
+% \else
+%
+% \captionsetup{labelfont=bf}
+% \begin{SCfigure}[1.5][!ht]
+% \setlength{\unitlength}{.75cm}
+% \setlength{\fboxsep}{0pt}
+% \fbox{\begin{picture}(4,4)
+% \put(1,3){\circle{1}}
+% \put(3,3){\circle{1}}
+% \put(2,2){\circle{1}}
+% \put(1,1){\circle{1}}
+% \put(3,1){\circle{1}}
+% \end{picture}}
+% \iffalse
+% \captionsetup{labelfont=bf}
+% \fi
+% \caption[]{A small example with the caption beside the figure.}
+% \end{SCfigure}
+% \captionsetup{labelfont=default}
+%
+% \fi
+%
+% \iffalse
+% --------------------------------------------------------------------------- %
+% \fi
+%
+%^^A \subsection{The \package{supertabular} package}
+% \subsection{Ïàêåò \package{supertabular}}
+% \label{supertabular}
+%
+%^^A The \package{supertabular} package\cite{supertabular} offers the environment
+%^^A |supertabular| which is quite similar to the |longtable| environment provided
+%^^A by the \package{longtable} package. Both offers the typesetting of tables
+%^^A which can span multiple pages. For a detailed discussion about the
+%^^A differences between these powerful packages please take a look at
+%^^A The \LaTeX\ Companion\cite{companion}.
+% Ïàêåò \package{supertabular}\cite{supertabular} ïðåäëàãàåò îêðóæåíèå
+% |supertabular| êîòîðîå àíàëîãè÷íî |longtable| èç ïàêåòà
+% \package{longtable}. Îáà îíè ïðåäëàãàþò ñîçäàíèå òàáëèö íà íåñêîëüêî
+% ñòðàíèö. Äåòàëüíûé ðàçáîð ðàçëè÷èé ýòèõ ïàêåòîâ
+% ïðèâåä¸í â~The \LaTeX\ Companion\cite{companion}.
+%
+% \iffalse
+% --------------------------------------------------------------------------- %
+% \fi
+%
+%\begingroup\samepage
+%^^A \subsection{Known incompatibilities}
+% \subsection{Èçâåñòíûå íåñîâìåñòèìîñòè}
+%
+% \NEWdescription{v3.0b}
+%^^A Using the \thispackage\ package together with one of the following packages
+%^^A is not recommended; usually this would cause unwanted side effects or even
+%^^A errors
+%^^A\footnote{This translation could be obsolete, please check German or English
+%^^A version for new information.}:
+% Èñïîëüçîâàíèå ïàêåòà \thispackage\ âìåñòå ñ~îäíèì èç ñëåäóþùèõ ïàêåòîâ
+% íå ðåêîìåíäóåòñÿ; îáû÷íî ýòî äà¸ò íåîæèäàííûå ïîáî÷íûå ýôôåêòû èëè äàæå
+% îøèáêè\footnote{Äàííûå ïåðåâîäà ýòîãî ðàçäåëà ìîãóò ñîäåðæàòü óñòàðåâøèå äàííûå.
+% Îáðàùàéòåñü ê~àíãëèéñêîé èëè íåìåöêîé äîêóìåíòàöèè çà áîëåå ñâåæåé èíôîðìàöèåé. \cdash---
+% \emph{Ïðèì. ïåðåâ.}}:
+% \begin{quote}
+% \package{captcont}, \package{ccaption}, \package{ftcapt}, (\package{hvfloat}),
+% \package{multicap}, \package{topcapt}, \package{nonfloat}
+% \end{quote}
+%\endgroup
+%
+% \iffalse
+% --------------------------------------------------------------------------- %
+% \fi
+%
+%^^A \section{Compatibility to older versions}
+% \section{Ñîâìåñòèìîñòü ñî ñòàðûìè âåðñèÿìè}
+% \label{compatibility}
+%
+%^^A \subsection{The \thispackage\ package version $1.x$}
+% \subsection{Ïàêåò \thispackage\ âåðñèè $1.x$}
+%
+%^^A This version of the \thispackage\ package still supports the old options
+%^^A and commands provided by the version $1.x$ of this package. So there
+%^^A shouldn't occur any problems compiling old documents, but please don't mix
+%^^A old options and commands with the new ones. This isn't supported and can
+%^^A cause ugly side effects.
+% Ýòà âåðñèÿ ïàêåòà \thispackage\ ïîääåðæèâàåò ñòàðûå îïöèè è~êîìàíäû
+% ñîçäàííûå â~âåðñèÿõ $1.x$ ýòîãî ïàêåòà. Ïîýòîìó íå äîëæíî âîçíèêàòü
+% ïðîáëåì â~êîìïèëÿöèè ñòàðûõ äîêóìåíòîâ, íî, ïîæàëóéñòà, íå ñìåøèâàéòå
+% ñòàðûå îïöèè è~êîìàíäû ñ~íîâûìè. Ýòî íå ïîääåðæèâàåòñÿ
+% è~ìîæåò äàòü íåïðèÿòíûå ïîáî÷íûå ýôôåêòû.
+%
+%^^A Here comes a short oversight of the obsolete options and commands and how
+%^^A they have been replaced within this version of the \thispackage\ package:
+% Çäåñü äàí êðàòêèé îáçîð óñòàðåâøèõ îïöèé è~êîìàíä è~÷åì
+% îíè çàìåíåíû â~ñîâðåìåííîé âåðñèè ïàêåòà \thispackage:
+%
+% {\small\begin{longtable}{ll}
+% \thispackage\ \version{1.x} & \thispackage\ \version{3.x}\\
+% \hline
+% \endhead
+% |normal| & |format=plain|\\
+% |hang| & |format=hang|\\
+% |isu| & |format=hang|\\
+% |center| & |justification=centering|\\
+% |centerlast| & |justification=centerlast|\\
+% \iffalse
+% |anne| & |justification=centerlast|\\
+% \fi
+% |nooneline| & |singlelinecheck=off|\\
+% |scriptsize| & |font=scriptsize|\\
+% |footnotesize| & |font=footnotesize|\\
+% |small| & |font=small|\\
+% |normalsize| & |font=normalsize|\\
+% |large| & |font=large|\\
+% |Large| & |font=Large|\\
+% |up| & |labelfont=up|\\
+% |it| & |labelfont=it|\\
+% |sl| & |labelfont=sl|\\
+% |sc| & |labelfont=sc|\\
+% |md| & |labelfont=md|\\
+% |bf| & |labelfont=bf|\\
+% |rm| & |labelfont=rm|\\
+% |sf| & |labelfont=sf|\\
+% |tt| & |labelfont=tt|\\
+% \end{longtable}}
+%
+%^^A Beside the options for setting up the desired font there were also
+%^^A the commands |\captionsize| resp.~|\captionfont| and |\captionlabelfont|
+%^^A who could be redefined with |\renewcommand| and allowed an alternate and
+%^^A more flexible way to change the font used for captions.
+%^^A This mechanism was replaced by the commands
+% Ïîìèìî îïöèé äëÿ íàñòðîåê íóæíîãî øðèôòà áûëè òàêæå êîìàíäû
+% |\captionsize|, à~òàêæå |\captionfont| è~|\captionlabelfont|
+% êîòîðûå ìîãëè áûòü ïåðåîïðåäåëåíû ñ~ïîìîùüþ |\renewcommand| è~ïîçâîëÿëè
+% àëüòåðíàòèâíûé è~áîëåå ãèáêèé ñïîñîá èçìåíèòü øðèôò ïîäïèñåé.
+% Äàííûé ìåõàíèçì çàìåí¸í íà êîìàíäû
+% \begin{quote}
+% |\DeclareCaptionFont{|\ldots|}{|\ldots|}|\qquad è\\
+% |\captionsetup{font=|\ldots|,labelfont=|\ldots|}|\qquad.
+% \end{quote}\SeeUserDefined
+%
+%^^A Setting the margin for captions was done in \version{1.x} with
+% Óñòàíîâêè ïîëåé â~âåðñèè \version{1.x} çàäàâàëèñü ñ~ïîìîùüþ
+% \begin{quote}
+% |\setlength{\captionmargin}{|\ldots|}|\quad.
+% \end{quote}
+%^^A This was replaced by
+% Ýòî çàìåíåíî íà
+% \begin{quote}
+% |\captionsetup{margin=|\ldots|}|\qquad.
+% \end{quote}
+%^^A \See{\Section{margins}{Margins and further paragraph options}}
+% \See{\Section{margins}{Ïîëÿ è äðóãèå îïöèè ôîðìèðîâàíèÿ àáçàöà}}
+%
+%^^A For example the old-style code
+% Íàïðèìåð, ñòàðûé êîä
+% \begin{quote}
+% |\usepackage[hang,bf]{caption}|\\
+% |\renewcommand\captionfont{\small\sffamily}|\\
+% |\setlength\captionmargin{10pt}|
+% \end{quote}
+%^^A will still work fine, but should be written today as
+% äî ñèõ ïîð ðàáîòàåò, íî ëó÷øå ïåðåïèñàòü åãî êàê
+% \begin{quote}
+% |\usepackage[format=hang,labelfont=bf,font={small,sf},|\\
+% | margin=10pt]{caption}|
+% \end{quote}
+%^^A or
+% èëè
+% \begin{quote}
+% |\usepackage{caption}|\\
+% |\captionsetup{format=hang,labelfont=bf,font={small,sf},|\\
+% | margin=10pt}|\qquad.
+% \end{quote}
+%
+%^^A The quite exotic option |ruled| which allowed a partial usage of
+%^^A the caption settings for |ruled| floats defined with the
+%^^A \package{float} package will be emulated by this version of the
+%^^A caption package, too.
+%^^A But using this option is not recommended anymore since this
+%^^A version of the \thispackage\ package offers a more flexible way
+%^^A for changing the captions of these floating environments:
+% Òàêàÿ ýêçîòè÷åñêàÿ îïöèÿ |ruled| êîòîðàÿ ïîçâîëÿëà ÷àñòè÷íî èñïîëüçîâàòü
+% íàñòðîéêè ïîäïèñè äëÿ ôëîòîâ ñ~îôîðìëåíèåì |ruled| èç ïàêåòà
+% \package{float} ýìóëèðóåòñÿ è~äàííûì ïàêåòîì òîæå.
+% Íî èñïîëüçîâàíèå ýòîé îïöèè íå ðåêîìåíäóåòñÿ, ïîñêîëüêó äàííàÿ âåðñèÿ ïàêåòà
+% \thispackage\ ïðåäëàãàåò áîëåå ãèáêèé ñïîñîá äëÿ èçìåíåíèÿ ïîäïèñåé
+% òàêèõ îêðóæåíèé ïëàâàþùèõ ôëîòîâ:
+% \begin{quote}
+% |\DeclareCaptionStyle{ruled}{|\ldots|}|
+% \end{quote}
+%^^A resp.
+% è, ñîîòâåòñòâåííî
+% \begin{quote}
+% |\captionsetup[ruled]{|\ldots|}|\qquad.
+% \end{quote}
+% \SeeUserDefined[, \Section*{misc}{Ïîëåçíûå óòèëèòû} è
+% \Section*{float}{Ïàêåò \package{float}}]
+%
+%^^A \subsection{The \package{caption2} package version $2.x$}
+% \subsection{Ïàêåò \package{caption2} âåðñèè $2.x$}
+%
+%^^A Although they do very similar stuff, the packages \package{caption} and
+%^^A its experimental and now obsolete variant \package{caption2} have a
+%^^A very different implementation design.
+%^^A Therefore a full compatibility could not be offered.
+%^^A For that reason you will still find a file called |caption2.sty| in
+%^^A this package distribution, so old documents using the \package{caption2}
+%^^A package will still compile fine.
+% Õîòÿ èñïîëüçóþòñÿ îäíè è~òå æå íàñòðîéêè è~â~ïàêåòå \package{caption}
+% è~â~ýêñïåðèìåíòàëüíîé, íî ñåé÷àñ óñòàðåâøåé âåðñèè"=ïàêåòå
+% \package{caption2}, ó~ýòèõ ïàêåòîâ ñîâåðøåííî ðàçíûé ìåõàíèçì èõ çàäàíèÿ.
+% Ïîýòîìó ïîëíàÿ ñîâìåñòèìîñòü íåâîçìîæíà.
+% Ïî ýòîé ïðè÷èíå äî ñèõ ïîð ñóùåñòâóåò ïàêåò |caption2.sty| â~äàííîì
+% äèñòðèáóòèâå, è~ñòàðûå äîêóìåíòû, èñïîëüçóþùèå ïàêåò \package{caption2}
+% áóäóò êîìïèëèðîâàòüñÿ.
+%
+%^^A Newly created documents should use the actual version of the
+%^^A \thispackage\ package instead. In most cases it's sufficient to replace
+%^^A the command
+% Íîâûå äîêóìåíòû äîëæíû èñïîëüçîâàòü ñîâðåìåííûå âåðñèè ïàêåòà
+% \thispackage. Â~áîëüøèíñòâå ñëó÷àåâ ìîæíî çàìåíèòü ñòðîêó
+% \begin{quote}
+% |\usepackage[...]{caption2}|
+% \end{quote}
+%^^A by
+% íà
+% \begin{quote}
+% |\usepackage[...]{caption}|\qquad.
+% \end{quote}
+%^^A But some options and commands will not be emulated, so you can get
+%^^A error messages afterwards. This section will hopefully help you removing
+%^^A these errors. If you have problems migrating from \package{caption2}
+%^^A to \package{caption} please don't hesitate to send me an e-mail asking
+%^^A for help.
+% Íî íåêîòîðûå îïöèè è~êîìàíäû íå ýìóëèðóþòñÿ, è~âû ìîæåòå
+% ïîëó÷èòü ñîîáùåíèÿ îá îøèáêàõ. Äàííûé ðàçäåë ïîìîæåò âàì ëèêâèäèðîâàòü
+% òàêèå îøèáêè. Åñëè ó~âàñ ïðîáëåìû ïî çàìåíå ïàêåòà \package{caption2}
+% íà \package{caption} íå ðàçäóìûâàéòå è~îòïðàâëÿéòå ìíå e-mail.
+%
+%^^A In addition to the obsolete options shown in the last section
+%^^A these ones will be emulated, too:
+% Ïîìèìî óñòàðåâøèõ îïöèé èç ïðåäûäóùåãî ðàçäåëà
+% ñëåäóþùèå òàêæå ýìóëèðóþòñÿ:
+%
+% {\small\begin{longtable}{ll}
+% \package{caption2} \version{2.x} & \thispackage\ \version{3.x}\\
+% \hline
+% \endhead
+% |flushleft| & |justification=raggedright|\\
+% |flushright| & |justification=raggedleft|\\
+% |oneline| & |singlelinecheck=on|\\
+% \end{longtable}}
+%
+%^^A Setting the margin for captions was done in \version{2.x} with
+% Çàäàíèå âòÿæåê (ïîëåé) äëÿ ïîäïèñåé, ñîçäàííûõ â~\version{2.x}
+% \begin{quote}\leavevmode\hbox{%
+% |\setcaptionmargin{|\ldots|}| resp.
+% |\setcaptionwidth{|\ldots|}|\quad.
+% }\end{quote}
+%^^A This was replaced by
+% Îíè ìîãóò áûòü çàìåíåíû íà
+% \begin{quote}\leavevmode\hbox{%
+% |\captionsetup{margin=|\ldots|}| resp.
+% |\captionsetup{width=|\ldots|}|\quad.
+% }\end{quote}
+%^^A \See{\Section{margins}{Margins and further paragraph options}}
+% \See{\Section{margins}{Ïîëÿ è äðóãèå îïöèè ôîðìèðîâàíèÿ àáçàöà}}
+%
+%^^A Setting an indention was done in \version{2.x} with
+% Çàäàíèå âòÿæêè â~âåðñèè \version{2.x} çàäàâàëîñü êàê
+% \begin{quote}
+% |\captionstyle{indent}|\\
+% |\setlength\captionindent{|\ldots|}|\quad.
+% \end{quote}
+%^^A This is now done with
+% Ñåé÷àñ ýòî çàäà¸òñÿ â~âèäå
+% \begin{quote}
+% |\captionsetup{format=plain,indention=|\ldots|}|\quad.
+% \end{quote}
+%
+%^^A The so-called single-line-check was controlled by the commands
+%^^A |\oneline|\-|captions|\-|false| (for switching the check off) and
+%^^A |\oneline|\-|captions|\-|true| (for switching the check on).
+%^^A This was replaced by
+% Êîíòðîëü êîðîòêîé ïîäïèñè êîíòðîëèðóåòñÿ êîìàíäàìè
+% |\oneline|\-|captions|\-|false| (îòêëþ÷àåò êîíòðîëü)
+% è~|\oneline|\-|captions|\-|true| (äëÿ âêëþ÷åíèÿ êîíòðîëÿ).
+% Ýòî çàìåíåíî
+% |\captionsetup{|\discretionary{}{}{}|singlelinecheck=|\discretionary{}{}{}|off}|
+%^^A resp.
+% è, ñîîòâåòñòâåííî
+% |\captionsetup{|\discretionary{}{}{}|singlelinecheck=|\discretionary{}{}{}|on}|.
+% \See{\Section{justification}{Âûêëþ÷êà}}
+%
+%^^A The commands
+% Êîìàíäû
+% \begin{quote}
+% |\captionlabeldelim|, |\captionlabelsep|, |\captionstyle|,\\
+% |\defcaptionstyle|, |\newcaptionstyle|, and |\renewcaptionstyle|
+% \end{quote}
+%^^A do not have a simple replacement and therefore will not be emulated
+%^^A by this version of the \thispackage\ package. (So using them will
+%^^A cause error messages.) Rewriting such code is not always easy and
+%^^A straight-ahead, but by conscientious reading of this manual you should
+%^^A find appropriate options and commands instead.
+% íå èìåþò ïðîñòîé çàìåíû ïîýòîìó íå ýìóëèðóþòñÿ
+% äàííîé âåðñèåé ïàêåòà \thispackage. (Èõ èñïîëüçîâàíèå âûçîâåò
+% ñîîáùåíèå îá îøèáêå.) Çàìåíà ýòîãî êîäà íå âñåãäà ïðîñòà,
+% íî äîáðîñîâåñòíî ïðî÷èòàâ äàííîå ðóêîâîäñòâî, âû íàéä¸òå
+% ïîäõîäÿùèå îïöèè è~êîìàíäû çàìåíû.
+%
+% \iffalse
+% ... (some examples)
+% \fi
+%
+%^^A The \version{2.x} option |ignoreLTcapwidth| do not have a replacement, too.
+%^^A But in most cases you can simply drop using that option because
+%^^A in this version of the \thispackage\ package the value of |\LTcapwidth|
+%^^A will be ignored anyway (unless you set it to a different value than the
+%^^A default one).
+%^^A \See{\Section{longtable}{The \package{longtable} package}}
+% Îïöèÿ âåðñèè \version{2.x} |ignoreLTcapwidth| òîæå íå èìååò çàìåíû.
+% Íî â~áîëüøèíñòâå ñëó÷àåâ ýòó îïöèþ ìîæíî îïóñòèòü, ïîòîìó ÷òî â~äàííîé
+% âåðñèè ïàêåòà \thispackage\ çíà÷åíèå |\LTcapwidth|
+% áóäåò èãíîðèðîâàòü â~ëþáîì ñëó÷àå (åñëè òîëüêî âû íå çàäàäèòå çíà÷åíèå,
+% îòëè÷íîå îò çàäàííîãî ïî óìîë÷àíèþ).
+% \See{\Section{longtable}{Ïàêåò \package{longtable}}}
+%
+% \iffalse
+% --------------------------------------------------------------------------- %
+% \fi
+%
+% \pagebreak[3]
+%^^A \section{Further reading}
+% \section{Ðåêîìåíäóåìàÿ ëèòåðàòóðà}
+%
+%^^A I recommend the following documents for further reading:
+% ß ðåêîìåíäóþ ñëåäóþùèå äîêóìåíòû äëÿ äàëüíåéøåãî ÷òåíèÿ:
+% \begin{itemize}
+% \def\tempa{ftm}\ifx\rmdefault\tempa
+% \fontencoding{T1}\fontfamily{ptm}\selectfont\fi
+% \item
+% The \TeX\ FAQ - Frequently asked questions about \TeX\ and \LaTeX :
+% \begin{quote}\url{http://faq.tug.org/}\end{quote}
+%
+% \item
+% A French FAQ can be found at
+% \begin{quote}\url{http://www.grappa.univ-lille3.fr/FAQ-LaTeX/}\end{quote}
+%
+% \item
+% \textsf{epslatex} from Keith Reckdahl contains many tips around
+% including graphics in \LaTeXe\ documents.
+% You will find this document in the directory
+% \begin{quote}\url{ftp://ftp.ctan.org/pub/tex/info/epslatex/}\end{quote}
+% \end{itemize}
+%
+% \iffalse
+% --------------------------------------------------------------------------- %
+% \fi
+%
+%^^A \section{Thanks}
+% \section{Áëàãîäàíîñòè}
+%
+%\begingroup
+% \fontencoding{T1}\fontfamily{ptm}\selectfont
+% I would like to thank Katja Melzner,
+% Steven D. Cochran, Frank Mittelbach,
+% 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
+% Harald Harders,
+% Peter L\"offler,
+% Peng Yu,
+% Alexander Zimmermann,
+% Matthias Pospiech,
+% J\"urgen Wieferink,
+% Christoph Bartoschek,
+% Uwe St\"ohr,
+% Ralf Stubner,
+% Geoff Vallis,
+% Florian Keiler,
+% J\"urgen G\"obel,
+% Uwe Siart,
+% Sang-Heon Shim,
+% Henrik Lundell,
+% David Byers,
+% William Asquith,
+% and
+% Prof.~Dr.~Dirk Hoffmann,
+% who all helped to make this package a better one.
+%
+%\endgroup
+%
+% \iffalse
+% --------------------------------------------------------------------------- %
+% \fi
+% \StopEventually{\begin{thebibliography}{9}
+% \fontencoding{T1}\fontfamily{ptm}\selectfont
+% \bibitem{companion}
+% Frank Mittelbach and Michel Goossens:
+% \newblock {\em The {\LaTeX} Companion (2nd.~Ed.)},
+% \newblock Addison-Wesley, 2004.
+%
+% \bibitem{float}
+% Anselm Lingnau:
+% \emph{An Improved Environment for Floats},
+% 2001/11/08
+%
+% \bibitem{floatrow}
+% Olga Lapko:
+% \emph{The floatrow package documentation},
+% 2005/05/22
+%
+% \bibitem{hyperref}
+% Sebastian Rahtz \& Heiko Oberdiek:
+% \emph{Hypertext marks in \LaTeX},
+% 2007/01/25
+%
+% \bibitem{hypcap}
+% Heiko Oberdiek:
+% \emph{The hypcap package -- Adjusting anchors of captions}
+% 2001/08/27
+%
+% \bibitem{listings}
+% Carsten Heinz:
+% \emph{The Listings Package},
+% 2004/02/13
+%
+% \bibitem{longtable}
+% David Carlisle:
+% \emph{The longtable package},
+% 2000/10/22
+%
+% \bibitem{rotating}
+% Sebastian Rahtz and Leonor Barroca:
+% \emph{A style option for rotated objects in \LaTeX},
+% 1997/09/26
+%
+% \bibitem{sidecap}
+% Rolf Niepraschk und Hubert G\"a\ss lein:
+% \emph{The sidecap package},
+% 2003/06/06
+%
+% \bibitem{subfig}
+% Steven D. Cochran:
+% \emph{The subfig package},
+% 2005/07/05
+%
+% \bibitem{supertabular}
+% Johannes Braams und Theo Jurriens:
+% \emph{The supertabular environment},
+% 2002/07/19
+%
+% \bibitem{Anne}
+% Anne Br\"uggemann-Klein:
+% \emph{Einf\"uhrung in die Dokumentverarbeitung},
+% B.G. Teubner, Stuttgart, 1989
+% \end{thebibliography}}
+%
+% \Finale
+%
+\endinput
diff --git a/Master/texmf-dist/doc/latex/caption/caption.pdf b/Master/texmf-dist/doc/latex/caption/caption.pdf
index ba899d3fc9a..3977586333f 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 18d202beb92..a5f59885e63 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/ltcaption.pdf b/Master/texmf-dist/doc/latex/caption/ltcaption.pdf
new file mode 100644
index 00000000000..a3bdde8d319
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/caption/ltcaption.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/caption/manual.tex b/Master/texmf-dist/doc/latex/caption/manual.tex
deleted file mode 100644
index fcf3be9b2c9..00000000000
--- a/Master/texmf-dist/doc/latex/caption/manual.tex
+++ /dev/null
@@ -1,69 +0,0 @@
-%%
-%% This is file `manual.tex',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% caption.dtx (with options: `driver')
-%%
-%% Copyright (C) 1994-2007 Axel Sommerfeldt (caption@sommerfee.de)
-%%
-%% --------------------------------------------------------------------------
-%%
-%% This work may be distributed and/or modified under the
-%% conditions of the LaTeX Project Public License, either version 1.3
-%% of this license or (at your option) any later version.
-%% The latest version of this license is in
-%% http://www.latex-project.org/lppl.txt
-%% and version 1.3 or later is part of all distributions of LaTeX
-%% version 2003/12/01 or later.
-%%
-%% This work has the LPPL maintenance status "maintained".
-%%
-%% This Current Maintainer of this work is Axel Sommerfeldt.
-%%
-%% This work consists of the files caption.ins, caption.dtx,
-%% caption2.dtx, and anleitung.tex and the derived files
-%% caption.sty, caption2.sty, caption3.sty, and manual.tex.
-%%
-\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\documentclass{ltxdoc}
-\setlength\parindent{0pt}
-\setlength\parskip{\smallskipamount}
-\newcommand\NEWfeature{\NEW{New feature}}
-\newcommand\NEWdescription{\NEW{New description}}
-\newcommand\NEW[2]{\hskip 1sp \marginpar{\footnotesize\sffamily\raggedleft#1\\#2}}
-\font\manual=manfnt
-\newcommand\DANGER{\hskip 1sp \marginpar{\raggedleft\textcolor{blue}{{\manual\char127}}}}
-\ifx\pdfoutput\undefined\else
- \ifcase\pdfoutput\else
- \usepackage{mathptmx,courier}
- \usepackage[scaled=0.90]{helvet}
- \addtolength\marginparwidth{15pt}
- \fi
-\fi
-\usepackage{color,setspace}
-\usepackage{longtable}
-\usepackage{caption}[2005/08/24]
-\DeclareCaptionLabelSeparator{endash}{\space\textendash\space}
-\usepackage{hyperref}
-\DeclareCaptionFont{red}{\color{red}}
-\DeclareCaptionFont{green}{\color{green}}
-\DeclareCaptionFont{blue}{\color{blue}}
-\DeclareCaptionLabelSeparator{period-newline}{. \\}
-\DeclareCaptionStyle{period-newline}[labelsep=period]{labelsep=period-newline}
-\DeclareCaptionStyle{period-newline2}[labelsep=period,justification=centering]{labelsep=period-newline}
-\DeclareCaptionStyle{period-newline3}[labelsep=period]{labelsep=period-newline,justification=centering}
-\DeclareCaptionFormat{reverse}{#3#2#1}
-\DeclareCaptionFormat{llap}{\llap{#1#2}#3\par}
-\DeclareCaptionLabelFormat{fullparens}{(\bothIfFirst{#1}{ }#2)}
-\DeclareCaptionLabelSeparator{fill}{\hfill}
-\DeclareRobustCommand{\KOMAScript}{\textsf{K\kern.05em O\kern.05em%
- M\kern.05em A\kern.1em-\kern.1em Script}}
-\OnlyDescription
-\begin{document}
- \DocInput{caption.dtx}
-\end{document}
-\endinput
-%%
-%% End of file `manual.tex'.
diff --git a/Master/texmf-dist/source/latex/caption/caption.dtx b/Master/texmf-dist/source/latex/caption/caption.dtx
index 99e1ed531d4..b8ab6d161ac 100644
--- a/Master/texmf-dist/source/latex/caption/caption.dtx
+++ b/Master/texmf-dist/source/latex/caption/caption.dtx
@@ -18,63 +18,54 @@
%
% This Current Maintainer of this work is Axel Sommerfeldt.
%
-% This work consists of the files caption.ins, caption.dtx,
-% caption2.dtx, and anleitung.tex and the derived files
-% caption.sty, caption2.sty, caption3.sty, and manual.tex.
+% This work consists of the files caption.ins, caption.dtx, caption2.dtx,
+% and ltcaption.dtx, the derived files caption.sty, caption2.sty,
+% caption3.sty, and ltcaption.sty, and the user manuals caption-deu.tex,
+% caption-eng.tex, and caption-rus.tex.
%
% \fi
-% \CheckSum{2194}
+% \CheckSum{5253}
%
% \iffalse
%<*driver>
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
+\ProvidesFile{caption.drv}[2007/09/01 v3.1 Implementation of the caption package]
+\hbadness=9999 \newcount\hbadness \hfuzz=100pt % Make TeX shut up.
+%\errorcontextlines=3
+%
\documentclass{ltxdoc}
\setlength\parindent{0pt}
\setlength\parskip{\smallskipamount}
%
-\newcommand\NEWfeature{\NEW{New feature}}
-\newcommand\NEWdescription{\NEW{New description}}
-\newcommand\NEW[2]{\hskip 1sp \marginpar{\footnotesize\sffamily\raggedleft#1\\#2}}
-%
-\font\manual=manfnt
-\newcommand\DANGER{\hskip 1sp \marginpar{\raggedleft\textcolor{blue}{{\manual\char127}}}}
+\makeatletter % make room for subsections like 2.16.14 in the TOC
+%\newcommand*\l@subsubsection{\@dottedtocline{3}{3.8em}{3.2em}}
+\renewcommand*\l@subsubsection{\@dottedtocline{3}{3.8em}{3.6em}}
+\makeatother
%
-\ifx\pdfoutput\undefined\else
- \ifcase\pdfoutput\else
+\ifx\pdfoutput\undefined \else
+ \ifcase\pdfoutput \else
\usepackage{mathptmx,courier}
\usepackage[scaled=0.90]{helvet}
\addtolength\marginparwidth{15pt}
\fi
\fi
%
-%\usepackage[french,USenglish]{babel}
-\usepackage{color,setspace}
-%
-%\usepackage{float}
-\usepackage{longtable}
-%\usepackage[raggedright]{sidecap}
-%
-\usepackage{caption}[2005/08/24]
-\DeclareCaptionLabelSeparator{endash}{\space\textendash\space}
-\usepackage{hyperref}
+\usepackage{hypdoc}
+\hypersetup{pdfkeywords={LaTeX, package, caption},pdfstartview={}}
%
-\DeclareCaptionFont{red}{\color{red}}
-\DeclareCaptionFont{green}{\color{green}}
-\DeclareCaptionFont{blue}{\color{blue}}
+\usepackage[debug]{caption}[2007/09/01]
%
-\DeclareCaptionLabelSeparator{period-newline}{. \\}
-\DeclareCaptionStyle{period-newline}[labelsep=period]{labelsep=period-newline}
-\DeclareCaptionStyle{period-newline2}[labelsep=period,justification=centering]{labelsep=period-newline}
-\DeclareCaptionStyle{period-newline3}[labelsep=period]{labelsep=period-newline,justification=centering}
-\DeclareCaptionFormat{reverse}{#3#2#1}
-\DeclareCaptionFormat{llap}{\llap{#1#2}#3\par}
-\DeclareCaptionLabelFormat{fullparens}{(\bothIfFirst{#1}{ }#2)}
-\DeclareCaptionLabelSeparator{fill}{\hfill}
-%
-\DeclareRobustCommand{\KOMAScript}{\textsf{K\kern.05em O\kern.05em%
- M\kern.05em A\kern.1em-\kern.1em Script}}
-%
-%<+driver>\OnlyDescription
+\DeclareRobustCommand*\eTeX{\texorpdfstring
+ {\leavevmode\hbox{$\varepsilon$}-\TeX}%
+ {e-TeX}}
+\DeclareRobustCommand*\AmS{\texorpdfstring
+ {{\protect\usefont{OMS}{cmsy}{m}{n}A\kern-.1667em\lower.5ex\hbox{M}\kern-.125emS}}%
+ {AMS}}
+\DeclareRobustCommand*\KOMAScript{\texorpdfstring
+ {\textsf{K\kern.05em O\kern.05em M\kern.05em A\kern.1em-\kern.1em Script}}%
+ {KOMA-Script}}
+\DeclareRobustCommand*\NTG{NTG}
+\DeclareRobustCommand*\SmF{SMF}
%
\begin{document}
\DocInput{caption.dtx}
@@ -85,1834 +76,93 @@
% \newcommand*\purerm[1]{{\upshape\mdseries\rmfamily #1}}
% \newcommand*\puresf[1]{{\upshape\mdseries\sffamily #1}}
% \newcommand*\purett[1]{{\upshape\mdseries\ttfamily #1}}
-% \let\package\puresf\def\thispackage{\package{caption}}
+% \let\package\puresf
% \let\env\purett \let\opt\purett
%
-% \newcommand*\version[2][]{$v#2$}
-%
-% \newenvironment{Options}[1]%
-% {\list{}{\renewcommand{\makelabel}[1]{\texttt{##1}\hfil}%
-% \settowidth{\labelwidth}{\texttt{#1\space}}%
-% \setlength{\leftmargin}{\labelwidth}%
-% \addtolength{\leftmargin}{\labelsep}}}%
-% {\endlist}
-%
-% \newenvironment{Example}%
-% {\ifvmode\else\unskip\par\fi
-% \minipage{\linewidth}\smallskip}%
-% {\smallskip\endminipage}
-% \newcommand\example[3][figure]{%
-% \begingroup
-% \captionsetup{#2}%
-% \captionof{#1}[]{#3}%
-% \endgroup}
-%
-% \GetFileInfo{caption.sty}
-% \title{Typesetting captions with the
-% \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/04/09}
-% \maketitle
-%
-% \begin{abstract}
-% 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 with Steven D. Cochran and Frank Mittelbach has lead to
-% this new enhanced version 3.0.}
-% \end{abstract}
-%
-% \tableofcontents
-%
-% \newcommand\figuretext{^^A
-% White sand beaches. The pink smoothness of the conch shell. A sea abundant
-% with possibilities. Duty-free shops filled with Europe's finest gifts and
-% perfumes. Play your favorite game of golf amidst the tropical greens on one
-% of the many championship courses.}
-%
-% \iffalse
-% --------------------------------------------------------------------------- %
-% \fi
-%
-% \section{Introduction}
-%
-% Within the standard \LaTeX\ classes captions haven't received the attention
-% they deserve. Simply typeset as an ordinary paragraph there is no
-% remarkable visual difference from the rest of the text, like here:
-%
-% \example{belowskip=\abovecaptionskip}{\figuretext}
-%
-% 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}
-%
-% 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
-% --------------------------------------------------------------------------- %
-% \fi
-%
-% \pagebreak[4]
-% \section{Using the package}
-% \label{usage}
-%
-% \DescribeMacro{\usepackage}
-% Insert
-% \begin{quote}
-% |\usepackage|\oarg{options}|{caption}[|\texttt{\filedate}|]|
-% \end{quote}
-% into the preamble of your document, i.e.~the part of your document
-% between |\documentclass| and |\begin{document}|.
-% The options control how your captions will look like; e.g.,
-% \begin{quote}
-% |\usepackage[margin=10pt,font=small,labelfont=bf]{caption}|
-% \end{quote}
-% would result in captions looking like the second one in the introduction.
-%
-% \DescribeMacro{\captionsetup}
-% For a later change of options the \thispackage\ package provides the command
-% \begin{quote}
-% |\captionsetup|\oarg{float type}\marg{options}
-% \end{quote}
-% So
-% \begin{quote}
-% |\usepackage[margin=10pt,font=small,labelfont=bf]{caption}|
-% \end{quote}
-% and
-% \begin{quote}
-% |\usepackage{caption}|\\
-% |\captionsetup{margin=10pt,font=small,labelfont=bf}|
-% \end{quote}
-% are equal in their results.
-%
-% It's good to know that |\captionsetup| has an effect on the current
-% environment only. So if you want to change some settings for the
-% current |figure| or |table| only, just place the |\captionsetup| command
-% inside the |figure| or |table| right before the |\caption| command.
-% For example
-% \begin{quote}
-% |\begin{figure}|\\
-% | |\ldots\\
-% | \captionsetup{singlelinecheck=off}|\\
-% | \caption{|\ldots|}|\\
-% |\end{figure}|
-% \end{quote}
-% switches the single-line-check off, but only for this |figure| so all
-% the other captions remain untouched.
-%
-% (For a description of the optional parameter \meta{float type} see
-% section \ref{misc}: \textit{``Useful stuff''}.)
-%
-% \iffalse
-% --------------------------------------------------------------------------- %
-% \fi
-%
-% \pagebreak[3]
-% \section{Options}
-%
-% \def\OptionLabel{RaggedRight}
-% \def\UserDefined{\ldots}
-% \makeatletter
-% \newcommand*\Section{\@ifstar{\@Section\relax}{\@Section{section}}}
-% \newcommand*\@Section[3]{#1 \ref{#2}: \textit{``#3''}}
-% \makeatother
-% \newcommand*\See[1]{{\small (See #1)}}
-% \newcommand*\SeeUserDefined[1][]{%
-% \See{\Section{declare}{Do it yourself}#1}}
-%
-% \iffalse
-% --------------------------------------------------------------------------- %
-% \fi
-%
-% \subsection{Formatting}
-%
-% \DescribeMacro{format=}
-% A figure or table caption mainly consits of three parts: the caption label,
-% which says if this object is a `Figure' or `Table' and what number is
-% associated with it, the caption text itself, which is normally a short
-% description of contents, and the caption separator which separates the text
-% from the label.
-%
-% The \textit{caption format} determines how this information will be presented;
-% it is specified with the option
-% \begin{quote}
-% |format=|\meta{format name}\quad ,
-% \end{quote}
-% having the name of the caption format as its argument.
-%
-% There are two standard caption formats:
-% \iffalse
-% \footnote{You have the option to
-% define your own ones, too. See section \ref{declare}:
-% \textit{``Do it yourself!''} for details.}
-% \fi
-%
-% \begin{Options}{\OptionLabel}
-% \item[plain]\NEWdescription{v3.0h}
-% Typesets the captions as a normal paragraph.
-% (This is the default behaviour, it
-% is adapted from the standard \LaTeX\ document classes.)
-%
-% \item[hang]
-% Indents the caption text, so it will `hang' under the first line of the text.
-%
-% \item[\UserDefined]
-% Own formats can be defined using |\DeclareCaptionFormat|.
-% \SeeUserDefined
-% \end{Options}
-%
-% \begin{Example}
-% An example: Specifying the option
-% \begin{quote}
-% |format=hang|
-% \end{quote}
-% yields captions like this:
-% \example{format=hang}{\figuretext}
-% \end{Example}
-%
-% \DescribeMacro{indention=}
-% For both formats (\texttt{plain} and \texttt{hang}) you can setup an extra
-% indention starting at the second line of the caption. You do this with the
-% option
-% \begin{quote}
-% |indention=|\meta{amount}.
-% \end{quote}
-%
-% Two examples:
-%
-% \begin{Example}
-% \begin{quote}
-% |format=plain,indention=.5cm|
-% \end{quote}
-% \captionsetup{aboveskip=0pt}
-% \example{format=plain,indention=.5cm}{\figuretext}
-% \end{Example}
-%
-% \begin{Example}
-% \begin{quote}
-% |format=hang,indention=-0.5cm|
-% \end{quote}
-% \captionsetup{aboveskip=0pt}
-% \example{format=hang,indention=-0.5cm}{\figuretext}
-% \end{Example}
-%
-% \pagebreak[3]
-% \DescribeMacro{labelformat=}
-% With the option
-% \nopagebreak[3]
-% \begin{quote}
-% |labelformat=|\meta{label format name}
-% \end{quote}
-% \NEWdescription{v3.0e}
-% you specify how the caption label will be typeset.
-% There are four standard caption label formats:
-%
-% \begin{Options}{\OptionLabel}
-% \item[default]
-% The caption label will be typeset as specified by the document class,
-% usually this means the name and the number (like \texttt{simple}).
-% (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}.)
-%
-% \item[simple]
-% The caption label will be typeset as a name and a number.
-%
-% \item[parens]
-% The number of the caption label will be typeset in parentheses.
-%
-% \item[\UserDefined]
-% Own label formats can be defined using |\DeclareCaptionLabelFormat|.
-% \SeeUserDefined
-% \end{Options}
-%
-% \begin{Example}
-% An example: Using the options
-% \begin{quote}
-% |labelformat=parens,labelsep=quad|
-% \end{quote}
-% gives captions like this one:
-% \example{labelformat=parens,labelsep=quad}{\figuretext}
-% \end{Example}
-%
-% \DescribeMacro{labelsep=}
-% With the option
-% \begin{quote}
-% |labelsep=|\meta{label separator name}
-% \end{quote}
-% you specify what caption separator will be used.
-% You can choose one of the following:
-%
-% \begin{Options}{\OptionLabel}
-% \item[none]
-% 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.
-% (This is the default one.)
-%
-% \item[period]
-% The caption label and text will be separated by a period and a space.
-%
-% \item[space]
-% The caption label and text will be separated by a single space.
-%
-% \item[quad]
-% The caption label and text will be separated by a |\quad|.
-%
-% \item[newline]
-% The caption label and text will be separated by a line break (|\\|).
-%
-% \item[endash]\NEWfeature{v3.0h}
-% The caption label and text will be separated by an en-dash,
-% surrounded by spaces (| -- |).
-%
-% \item[\UserDefined]
-% Own separators can be defined using |\DeclareCaptionLabelSeparator|.
-% \SeeUserDefined
-% \end{Options}
-%
-% Three examples:
-% \begin{Example}
-% \begin{quote}
-% |labelsep=period|
-% \end{quote}
-% \captionsetup{aboveskip=0pt}
-% \example{labelsep=period}{\figuretext}
-% \end{Example}
-%
-% \begin{Example}
-% \begin{quote}
-% |labelsep=newline,singlelinecheck=false|
-% \end{quote}
-% \captionsetup{aboveskip=0pt}
-% \example{labelsep=newline,singlelinecheck=false}{\figuretext}
-% \end{Example}
-%
-% \begin{Example}
-% \begin{quote}
-% |labelsep=endash|
-% \end{quote}
-% \captionsetup{aboveskip=0pt}
-% \example{labelsep=endash}{\figuretext}
-% \end{Example}
-%
-% \iffalse
-% --------------------------------------------------------------------------- %
-% \fi
-%
-% \subsection{Justification}
-% \label{justification}
-%
-% \DescribeMacro{justification=}
-% As addition to the caption format you could also specify a
-% \emph{caption justification}; it is specified with the option
-% \begin{quote}
-% |justification=|\meta{justification name}\quad.
-% \end{quote}
-%
-% You can choose one of the following:
-%
-% \begin{Options}{\OptionLabel}
-% \item[justified]
-% Typesets the caption as a normal paragraph. (This is the default.)
-%
-% \item[centering]
-% Each line of the caption will be centered.
-%
-% \iffalse
-% \item[Centering]
-% Each line of the caption will be centered, too.
-% But this time the command |\Centering| 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.
-% \fi
-%
-% \item[centerlast]
-% The last line of each paragraph of the caption text will be centered.
-%
-% \item[centerfirst]
-% Only the first line of the caption will be centered.
-%
-% \item[raggedright]
-% Each line of the caption will be moved to the left margin.
-%
-% \iffalse
-% \item[RaggedRight]
-% Each line of the caption will be moved to the left margin using
-% the command |\RaggedRight| from the \package{ragged2e} package.
-% \fi
-% \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. 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.
-%
-% \iffalse
-% \item[RaggedLeft]
-% Each line of the caption will be moved to the right margin using
-% the command |\RaggedLeft| from the \package{ragged2e} package.
-% \fi
-%
-% \item[\UserDefined]
-% Own justifications can be defined using |\DeclareCaptionJustification|.
-% \SeeUserDefined
-% \end{Options}
-%
-% Three examples:
-% \begin{Example}
-% \begin{quote}
-% |justification=centerlast|
-% \end{quote}
-% \captionsetup{aboveskip=0pt}
-% \example{justification=centerlast}{\figuretext}
-% \end{Example}
-%
-% \begin{Example}
-% \begin{quote}
-% |format=hang,justification=raggedright|
-% \end{quote}
-% \captionsetup{aboveskip=0pt}
-% \example{format=hang,justification=raggedright}{\figuretext}
-% \end{Example}
-%
-% \begin{Example}
-% \begin{quote}
-% |labelsep=newline,justification=centering|
-% \end{quote}
-% \captionsetup{aboveskip=0pt}
-% \example{belowskip=\abovecaptionskip,labelsep=newline,justification=centering}{\figuretext}
-% \end{Example}
-%
-% \DescribeMacro{singlelinecheck=}
-% The standard \LaTeX\ document classes (|article|, |report|, and |book|)
-% automatically center a caption if it fits in one single line:
-%
-% \example{belowskip=\abovecaptionskip}{A short caption.}
+% \def\thispackage{the \package{caption} package}
+% \def\Thispackage{The \package{caption} package}
+% \newcommand*\version[2][]{\textit{v#2}}
%
-% \DANGER
-% The \thispackage\ package adapts this behaviour and therefore usually
-% ignores the justification you have set with |justification=| in such case.
-% But you can switch this special treatment of such short captions off
-% with the option
-% \begin{quote}
-% |singlelinecheck=|\meta{bool}\quad.
-% \end{quote}
-% Using |false|, |no|, |off| or |0| for \meta{bool} switches the
-% extra centering off:
-% \begin{quote}
-% |singlelinecheck=false|
-% \end{quote}
-% Doing so the above short caption would look like
-%
-% \begingroup
-% \captionsetup{type=figure}
-% \ContinuedFloat
-% \endgroup
-% \example{belowskip=\abovecaptionskip,singlelinecheck=false}{A short caption.}
-%
-% You switch the extra centering on again by using |true|, |yes|, |on| or |1|
-% for \meta{bool}. (The default is on.)
-%
-% \iffalse
-% --------------------------------------------------------------------------- %
-% \fi
-%
-% \subsection{Fonts}
-% \label{fonts}
-%
-% \DescribeMacro{font=}
-% \DescribeMacro{labelfont=}
-% \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 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\\
-% |textfont=| & \marg{font options} & .\\
-% \end{tabular}\end{quote}
-%
-% And these are the available font options:
-%
-% \begin{Options}{\OptionLabel}
-% \item[scriptsize] {\scriptsize Very small size}
-% \item[footnotesize] {\footnotesize The size usually used for footnotes}
-% \item[small] {\small Small size}
-% \item[normalsize] {\normalsize Normal size}
-% \item[large] {\large Large size}
-% \item[Large] {\Large Even larger size}
-%
-% \item[up] {\upshape Upright shape}
-% \item[it] {\itshape Italic shape}
-% \item[sl] {\slshape Slanted shape}
-% \item[sc] {\scshape Small Caps shape}
-%
-% \item[md] {\mdseries Medium series}
-% \item[bf] {\bfseries Bold series}
-%
-% \item[rm] {\rmfamily Roman family}
-% \item[sf] {\sffamily Sans Serif family}
-% \item[tt] {\ttfamily Typewriter family}
-%
-% \item[\UserDefined]
-% Own font options can be defined using |\DeclareCaptionFont|.
-% \SeeUserDefined
-% \end{Options}
-%
-% If you use only one of these options you can omit the braces;
-% e.g., the options
-% \iffalse
-% \begin{quote}
-% \fi
-% |font={small}|
-% \iffalse
-% \end{quote}
-% \fi
-% and
-% \iffalse
-% \begin{quote}
-% \fi
-% |font=small|
-% \iffalse
-% \end{quote}
-% \fi
-% will give the same result.
-%
-% Two examples:
-% \begin{Example}
-% \begin{quote}
-% |font={small,it},labelfont=bf|
-% \end{quote}
-% \captionsetup{aboveskip=0pt}
-% \example{font={small,it},labelfont=bf}{\figuretext}
-% \end{Example}
-%
-% \begin{Example}
-% \begin{quote}
-% |font=small,labelfont=bf,textfont=it|
-% \end{quote}
-% \captionsetup{aboveskip=0pt}
-% \example{font=small,labelfont=bf,textfont=it}{\figuretext}
-% \end{Example}
-%
-% \iffalse
-% --------------------------------------------------------------------------- %
-% \fi
-%
-% \subsection{Margins and further paragraph options}
-% \label{margins}
-%
-% \DescribeMacro{margin=}
-% \DescribeMacro{width=}
-% For all captions you can specify \emph{either} an extra margin \emph{or}
-% a fixed width. You do this by using the options
-% \begin{quote}\begin{tabular}{@{}r@{}ll}
-% |margin=| & \meta{amount} & \emph{or}\\
-% |width=| & \meta{amount} & \\
-% \end{tabular}\end{quote}
-% Nevertheless what option you use, the left and right margin will be the
-% same.
-%
-% Two examples will illustrating this:
-% \begin{Example}
-% \begin{quote}
-% |margin=10pt|
-% \end{quote}
-% \captionsetup{aboveskip=0pt}
-% \example{margin=10pt}{\figuretext}
-% \end{Example}
-%
-% \begin{Example}
-% \begin{quote}
-% |width=.75\textwidth|
-% \end{quote}
-% \captionsetup{aboveskip=0pt}
-% \example{width=.75\textwidth}{\figuretext}
-% \end{Example}
-%
-% \DescribeMacro{parskip=}
-% This option is useful for captions containing more than one paragraph.
-% It specifies the extra vertical space inserted between them:
-% \begin{quote}
-% |parskip=|\meta{amount}
-% \end{quote}
-% One example:
-% \begin{Example}
-% \begin{quote}
-% |margin=10pt,parskip=5pt|
-% \end{quote}
-% \captionsetup{aboveskip=0pt}
-% \example{margin=10pt,parskip=5pt}{
-% First paragraph of the caption. This one contains some test, just to
-% show how these options affect the layout of the caption.
-%
-% Second paragraph of the caption. This one contains some text, too, to
-% show how these options affect the layout of the caption.}
-% \end{Example}
-%
-% \DescribeMacro{hangindent=}
-% The option
-% \begin{quote}
-% |hangindent=|\meta{amount}
-% \end{quote}
-% is for setting up a hanging indention starting from the second line of each
-% paragraph. If the caption contains just a single paragraph, using this option
-% leads to the same result as the option |indention=| you already know about.
-% But if the caption contains multiple paragraphs you will notice the difference:
-%
-% \begin{Example}
-% \begin{quote}
-% |format=hang,indention=-.5cm|
-% \end{quote}
-% \captionsetup{aboveskip=0pt}
-% \example{format=hang,indention=-.5cm}{
-% First paragraph of the caption. This one contains some test, just to
-% show how these options affect the layout of the caption.
-%
-% Second paragraph of the caption. This one contains some text, too, to
-% show how these options affect the layout of the caption.}
-% \end{Example}
-%
-% \begin{Example}
-% \begin{quote}
-% |format=hang,hangindent=-.5cm|
-% \end{quote}
-% \captionsetup{aboveskip=0pt}
-% \example{format=hang,hangindent=-.5cm}{
-% First paragraph of the caption. This one contains some test, just to
-% show how these options affect the layout of the caption.
-%
-% Second paragraph of the caption. This one contains some text, too, to
-% show how these options affect the layout of the caption.}
-% \end{Example}
-%
-% \iffalse
-% --------------------------------------------------------------------------- %
-% \fi
-%
-% \subsection{Styles}
-% \label{style}
-%
-% \DescribeMacro{style=}
-% A suitable combination of caption options is called \emph{caption style}.
-% You can compare them more or less to page styles which you set up with
-% |\pagestyle|: The caption style provides all settings for a whole caption layout.
-%
-% You switch to an already defined caption style with the option
-% \begin{quote}
-% |style=|\meta{style name}\quad.
-% \end{quote}
-% The \thispackage\ package usually defines only the style |default| which
-% puts all options you already know about to the default ones.
-% This means that specifying the option
-% \begin{quote}
-% |style=default|
-% \end{quote}
-% has the same effect as specifying all these options:
-% \begin{quote}
-% |format=default,labelformat=default,labelsep=default,|\\
-% |justification=default,font=default,labelfont=default,|\\
-% |textfont=default,margin=0pt,indention=0pt,parindent=0pt|\\
-% |hangindent=0pt,singlelinecheck=true|
-% \end{quote}
-%
-% Own caption styles can be defined using |\DeclareCaptionStyle|.
-% \SeeUserDefined
-%
-% \iffalse
-% --------------------------------------------------------------------------- %
-% \fi
-%
-% \subsection{Skips}
-%
-% \DescribeMacro{aboveskip=}
-% \DescribeMacro{belowskip=}
-% The spaces above and below the caption are controlled by the skips
-% |\abovecaptionskip| and |\belowcaptionskip|. The standard \LaTeX\ document
-% classes |article|, |report| and |book| set |\abovecaptionskip| to |10pt|
-% and |\belowcaptionskip| to |0pt|.
-%
-% \pagebreak[3]
-% Both skips can be changed with the command |\setlength|, but you can
-% use these options, too:
-% \nopagebreak[3]
-% \begin{quote}\begin{tabular}{@{}r@{}ll}
-% |aboveskip=| & \meta{amount} & and\\
-% |belowskip=| & \meta{amount} & .\\
-% \end{tabular}\end{quote}
-%
-% \DescribeMacro{position=}
-% Using |\abovecaptionskip| and |\belowcaptionskip| has a major design flaw:
-% If the caption is typeset \emph{above} (and not \emph{below}) the figure
-% or table they are not set up very useful at default, because there will be
-% some extra space above the caption but no space between the caption and the
-% figure or table itself. (Remember: |\belowcaptionskip| is usually set to |0pt|.)
-%
-% Please compare the spacing in these small tables:
-% \begin{Example}
-% \begin{minipage}[c]{.5\linewidth}
-% \iffalse
-% \captionsetup{aboveskip=0pt}%
-% \fi
-% \captionof{table}{A table}
-% \centering\begin{tabular}{ll}
-% A & B \\
-% C & D \\
-% \end{tabular}
-% \end{minipage}
-% \begin{minipage}[c]{.5\linewidth}
-% \centering\begin{tabular}{ll}
-% A & B \\
-% C & D \\
-% \end{tabular}
-% \captionof{table}{A table}
-% \end{minipage}
-% \end{Example}
-%
-% But you can fix this by using the option |position=|: It specifies how the
-% spacing above and below the caption will be used:
-% \begin{quote}
-% |position=top|\quad(or |position=above|)
-% \end{quote}
-% tells the \thispackage\ package to use the spacing useful for caption
-% \emph{above} the figure or table and
-% \begin{quote}
-% |position=bottom|\quad(or |position=below|)
-% \end{quote}
-% tells the \thispackage\ package to use the spacing useful for captions
-% \emph{below} the figure or table. (The last one is the default setting
-% except for |longtable|s.)
-%
-% So adding an extra |\captionsetup{position=top}| to the left example
-% table gives you proper spacing around both captions:
-% \begin{Example}
-% \begin{minipage}[c]{.5\linewidth}
-% \captionsetup{position=top}
-% \captionof{table}{A table}
-% \centering\begin{tabular}{ll}
-% A & B \\
-% C & D \\
-% \end{tabular}
-% \end{minipage}
-% \begin{minipage}[c]{.5\linewidth}
-% \centering\begin{tabular}{ll}
-% A & B \\
-% C & D \\
-% \end{tabular}
-% \captionof{table}{A table}
-% \end{minipage}
-% \end{Example}
-%
-% (Technically speaking |\abovecaptionskip| and |\belowcaptionskip| will
-% be swapped if you specify the option |position=top|, so in both cases
-% |\abovecaptionskip| will be used between the caption and the figure or
-% table itself.)
-%
-% This option is especially useful when used together with the optional
-% argument of the |\captionsetup| command.
-% \See{\Section{misc}{Useful stuff} for details}\par
-% 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}|\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}
-% |\usepackage[|\ldots|]{caption}|\\
-% |\captionsetup[table]{position=top}|
-% \end{quote}
-%
-% \iffalse
-% --------------------------------------------------------------------------- %
-% \fi
-%
-% \pagebreak[3]
-% \section{Useful stuff}
-% \label{misc}
-%
-% \DescribeMacro{\caption}
-% The command
-% \nopagebreak[3]
-% \begin{quote}
-% |\caption|\oarg{lst\_entry}\marg{heading}
-% \end{quote}
-% \nopagebreak[3]
-% typesets the caption inside a floating environment like |figure| or |table|.
-% 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}
-%
-% \DescribeMacro{\caption*}
-% The \package{longtable} package defines the command |\caption*| which
-% typesets the caption without label and without entry in the list of tables.
-% An example:
-% \begin{quote}
-% |\begin{longtable}{cc}|\\
-% | \caption*{A table}\\|\\
-% | A & B \\|\\
-% | C & D \\|\\
-% |\end{longtable}|
-% \end{quote}
-% looks like
-% \begin{longtable}{cc}
-% \caption*{A table}\\
-% A & B \\
-% C & D \\
-% \end{longtable}
-%
-% 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}|\\
-% | \begin{tabular}{cc}|\\
-% | A & B \\|\\
-% | C & D \\|\\
-% | \end{tabular}|\\
-% |\end{table}|
-% \end{quote}
-%
-% \DescribeMacro{\captionof}
-% \DescribeMacro{\captionof*}
-% Sometimes you want to typeset a caption \emph{outside} a floating environment,
-% putting a figure within a |minipage| for instance. For this purpose the
-% \thispackage\ package offers the command
-% \begin{quote}
-% |\captionof|\marg{float type}\oarg{lst\_entry}\marg{heading}\quad.
-% \end{quote}
-% Note that the first argument, the \meta{float type}, is mandatory here, because
-% the |\captionof| command needs to know which name to put into the caption label
-% (e.g. ``Figure'' or ``Table'') and in which list to put the contents entry.
-% An example:
-% \begin{quote}
-% |\captionof{figure}{A figure}|\\
-% |\captionof{table}{A table}|
-% \end{quote}
-% typesets captions like this:
-% \begin{Example}
-% \captionof{figure}{A figure}
-% \captionsetup{belowskip=\abovecaptionskip}
-% \captionof{table}{A table}
-% \end{Example}
-%
-% The star variant |\captionof*| has the same behaviour as the |\caption*| command:
-% it typesets the caption without label and without entry to the list of figures
-% or tables.
-%
-% Please use both |\captionof| and |\captionof*| only \emph{inside} environments
-% (like |minipage| or |\parbox|), otherwise a page break can appear between content
-% and caption. Furthermore some strange effects could occur (e.g., wrong spacing
-% around captions).
-%
-% \DescribeMacro{\ContinuedFloat}
-% Sometimes you want to split figures or tables without giving them
-% their own reference number. This is what the command
-% \begin{quote}
-% |\ContinuedFloat|
-% \end{quote}
-% is for; it should be used as first command inside the floating environment.
-% 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}
-% |\begin{table}|\\
-% |\caption{A table}|\\
-% \ldots\\
-% |\end{table}|\\
-% \ldots\\
-% |\begin{table}\ContinuedFloat|\\
-% |\caption{A table (cont.)}|\\
-% \ldots\\
-% |\end{table}|
-% \end{quote}
-% gives the following result:
-% \begin{Example}
-% \makeatletter\def\@captype{table}\makeatother
-% \caption[]{A table}
-% \centerline{\ldots}
-% \ContinuedFloat
-% \captionsetup{aboveskip=0pt}
-% \caption[]{A table (cont.)}
-% \end{Example}
-%
-% \DescribeMacro{\captionsetup}
-% We already know the |\captionsetup| command (see \Section{usage}
-% {Using the package}), but this time we get enlighten about
-% its optional argument \meta{float type}.
-%
-% Remember, the syntax of this command is
-% \begin{quote}
-% |\captionsetup|\oarg{float type}\marg{options}\quad.
-% \end{quote}
-%
-% If a \meta{float type} gets specified, all the \meta{options} don't
-% change anything at this time. Instead they only get marked for a later use,
-% when a caption inside of a floating environment of the particular type
-% \meta{float type} gets typeset.
-% For example
-% \begin{quote}
-% |\captionsetup[figure]|\marg{options}
-% \end{quote}
-% forces captions within a |figure| environment to use the given \meta{options}.
+% \GetFileInfo{caption.drv}
+% \let\docdate\filedate
+% \GetFileInfo{caption.sty}
%
-% Here comes an example to illustrate this:
-% \begin{quote}
-% |\captionsetup{font=small}|\\
-% |\captionsetup[figure]{labelfont=bf}|
-% \end{quote}
-% gives captions like this:
-% \begin{Example}
-% \captionsetup{font=small}
-% \captionsetup[figure]{labelfont=bf}
-% \captionof{figure}[]{A figure}
-% \captionsetup{belowskip=\abovecaptionskip}
-% \captionof{table}[]{A table}
-% \end{Example}
-%
-% As you see the command |\captionsetup[figure]{labelfont=bf}| only changed
-% the font of the figure caption labels, not touching all other ones.
-%
-% \DescribeMacro{\clearcaptionsetup}
-% 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{float type}\quad.
-% \end{quote}
+% \title{The Implementation of
+% \texorpdfstring{\thispackage\thanks{%^^A
+% This package has version number \fileversion, last revised \filedate.}}%^^A
+% {the caption package}}
+% \author{Axel Sommerfeldt\\
+% \href{mailto:caption@sommerfee.de}{\texttt{caption@sommerfee.de}}}
+% \date{\docdate}
+% \maketitle
%
-% For example |\clearcaptionsetup{figure}| would clear the extra handling in the
-% example above:
-% \begin{Example}
-% \captionsetup{font=small}
-% \captionof{figure}[]{A figure}
-% \captionsetup{belowskip=\abovecaptionskip}
-% \captionof{table}[]{A table}
-% \end{Example}
-%
-% 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) offer additional floating environments and these two
-% commands can also be used with them.
-%
-% \iffalse
-% --------------------------------------------------------------------------- %
-% \fi
-%
-% \pagebreak[3]
-% \section{Do it yourself!}
-% \label{declare}
-%
-% A family of commands is provided to allow users to define their own formats.
-% This enables information on separators, justification, fonts, and styles to
-% be associated with a name and kept in one place
-% (these commands need to appear in the document preamble,
-% this is the part between |\documentclass| and |\begin{document}|).
-%
-% \pagebreak[2]
-% \DescribeMacro{\DeclareCaptionFormat}
-% You can define your own caption formats using the command
-% \begin{quote}
-% |\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
-% pre-defined by the \thispackage\ package as
-% \begin{quote}
-% |\DeclareCaptionFormat{plain}{#1#2#3\par}|
-% \end{quote}
-%
-% \DescribeMacro{\DeclareCaptionLabelFormat}
-% Likewise you can define your own caption label formats:
-% \begin{quote}
-% |\DeclareCaptionLabelFormat|\marg{name}\marg{code using \#1 and \#2}
-% \end{quote}
-% At usage \#1 gets replaced with the name (e.g. ``figure'') and \#2
-% gets replaced with the reference number (e.g. ``12'').
-%
-% \DescribeMacro{\bothIfFirst}
-% \DescribeMacro{\bothIfSecond}
-% 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 yes,
-% both arguments get typeset, otherwise none of them.
-%
-% For example the standard label format |simple| is \emph{not} defined as
-% \begin{quote}
-% |\DeclareCaptionLabelFormat{simple}{#1 #2}|\quad,
-% \end{quote}
-% because this could cause an extra space if \#1 is empty. Instead |simple|
-% is defined as
-% \begin{quote}
-% |\DeclareCaptionLabelFormat{simple}{\bothIfFirst{#1}{ }#2}|\quad,
-% \end{quote}
-% causing the space to appear only if the label name is present.
-%
-% \pagebreak[3]
-% \DescribeMacro{\DeclareCaptionLabelSeparator}
-% You can define your own caption label separators with
-% \nopagebreak[3]
-% \begin{quote}
-% |\DeclareCaptionLabelSeparator|\marg{name}\marg{code}\quad.
-% \end{quote}
-% \nopagebreak[3]
-% Again an easy example taken from the \thispackage\ package itself:
-% \nopagebreak[3]
-% \begin{quote}
-% |\DeclareCaptionLabelSeparator{colon}{: }|
-% \end{quote}
-% \pagebreak[3]
-%
-% \DescribeMacro{\DeclareCaptionJustification}
-% You can define your own caption justifications with
-% \begin{quote}
-% |\DeclareCaptionJustification|\marg{name}\marg{code}\quad.
-% \end{quote}
-% The \meta{code} simply gets typeset just before the caption.
-% E.g.~using the justification |raggedright|, which is defined as
-% \begin{quote}
-% |\DeclareCaptionJustification{raggedright}{\raggedright}|\quad,
-% \end{quote}
-% lets captions with all lines moved to the left margin.
-%
-% \DescribeMacro{\DeclareCaptionFont}
-% You can define your own caption fonts with
-% \begin{quote}
-% |\DeclareCaptionFont|\marg{name}\marg{code}\quad.
-% \end{quote}
-% For example this package defines the options |small| and |bf| as
-% \begin{quote}
-% |\DeclareCaptionFont{small}{\small}|\quad and\\
-% |\DeclareCaptionFont{bf}{\bfseries}|\quad.
-% \end{quote}
-% The line spacing could be customized using the \package{setspace} package,
-% 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
-% An example which brings color into life:
-% \begin{quote}
-% |\usepackage{color}|\\
-% |\DeclareCaptionFont{red}{\color{red}}|\\
-% |\DeclareCaptionFont{green}{\color{green}}|\\
-% |\DeclareCaptionFont{blue}{\color{blue}}|\\
-% |\captionsetup{labelfont=blue,textfont=green}|
-% \end{quote}
-% \example{labelfont=blue,textfont=green,singlelinecheck=off}\figuretext
-%
-% \DescribeMacro{\DeclareCaptionStyle}
-% You can define your own caption styles with
-% \begin{quote}
-% |\DeclareCaptionStyle|\marg{name}\oarg{additional options}\marg{options}
-% \end{quote}
-% Remember, caption styles are just a collection of suitable options, saved
-% under a given name. You can wake up these options at any time with the
-% option |style=|\meta{style name}.
+% \begin{abstract}
+% \Thispackage\ consists of two parts -- the kernel
+% (|caption3.sty|) and the main package (|caption.sty|).
%
-% All caption styles are based on the default set of options. (See \Section
-% {style}{Styles} for a complete list.) So you only need
-% to specify options which are different to them.
-%
-% If you specify \meta{additional options} they get used in addition when
-% 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 the core of this package: The
-% caption style |default| is pre-defined as
-% \begin{quote}
-% |\DeclareCaptionStyle{default}[justification=centering]{}|\quad.
-% \end{quote}
-%
-% \iffalse
-% --------------------------------------------------------------------------- %
-% \fi
-%
-% \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:
-% \begin{quote}
-% |\DeclareCaptionLabelSeparator{period-newline}{. \\}|
-% \end{quote}
-% Selecting this separator with |\captionsetup{labelsep=period-newline}| you
-% get captions like this:
-% \begin{Example}
-% \captionsetup{labelsep=period-newline,labelfont=bf,margin=10pt}
-% \captionsetup{aboveskip=0pt,type=figure}
-% \caption[]{\figuretext}
-% \end{Example}
-%
-% For short captions---which fit into one single line---this separator
-% may not be satisfying, even when the automatically centering process
-% is switched off (with |singlelinecheck=off|):
-% \begin{Example}
-% \captionsetup{labelsep=period-newline,labelfont=bf,margin=10pt,singlelinecheck=0}
-% \captionsetup{aboveskip=0pt,type=figure}
-% \caption[]{A figure.}
-% \end{Example}
-%
-% An own caption style which selects another caption separator automatically
-% puts this right:
-% \begin{quote}
-% |\DeclareCaptionStyle{period-newline}%|\\
-% | [labelsep=period]{labelsep=period-newline}|
-% \end{quote}
-% \begin{Example}
-% \captionsetup{style=period-newline,labelfont=bf,margin=10pt}
-% \captionsetup{aboveskip=0pt,type=figure}
-% \ContinuedFloat
-% \caption[]{A figure.}
-% \end{Example}
-% 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}|\quad.
-% \end{quote}
-% Using this definition short captions look like
-% \begin{Example}
-% \captionsetup{style=period-newline2,labelfont=bf,margin=10pt}
-% \captionsetup{aboveskip=0pt,type=figure}
-% \ContinuedFloat
-% \caption[]{A figure.}
-% \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:
-% \begin{quote}
-% |\DeclareCaptionStyle{period-newline}%|\\
-% | [labelsep=period]%|\\
-% | {labelsep=period-newline,justification=centering}|
-% \end{quote}
-% \begin{Example}
-% \captionsetup{style=period-newline3,labelfont=bf,margin=10pt}
-% \captionsetup{aboveskip=0pt,type=figure}
-% \caption[]{\figuretext}
-% \end{Example}
-%
-% \bigskip\pagebreak[3]
-% Another example: You want captions to look like this:
-% \begin{Example}
-% \captionsetup{format=reverse,labelformat=fullparens,labelsep=fill,font=small,labelfont=it}
-% \captionsetup{aboveskip=0pt}
-% \captionof{figure}[]{\figuretext}
-% \end{Example}
-% \pagebreak[2]
-% You could do it this way:
-% \nopagebreak[3]
-% {\leftmargini=10pt
-% \begin{quote}
-% |\DeclareCaptionFormat{reverse}{#3#2#1}|\\
-% |\DeclareCaptionLabelFormat{fullparens}{(\bothIfFirst{#1}{ }#2)}|\\
-% |\DeclareCaptionLabelSeparator{fill}{\hfill}|\\
-% |\captionsetup{format=reverse,labelformat=fullparens,|\\
-% | labelsep=fill,font=small,labelfont=it}|
-% \end{quote}}
-%
-% \bigskip\pagebreak[3]
-% Another example: The caption text should go into the left margin; a possible
-% solution would be:
-% {\leftmargini=10pt
-% \begin{quote}
-% |\DeclareCaptionFormat{llap}{\llap{#1#2}#3\par}|\\
-% |\captionsetup{format=llap,labelsep=quad,singlelinecheck=no}|
-% \end{quote}}
-% As a result you would get captions like this:
-% \begin{Example}
-% \captionsetup{format=llap,singlelinecheck=no,labelsep=quad}
-% \captionsetup{aboveskip=0pt}
-% \captionof{figure}[]{\figuretext}
-% \end{Example}
-%
-% \iffalse
-% --------------------------------------------------------------------------- %
-% \fi
-%
-% \pagebreak[3]
-% \section{Using non-standard document classes}
-%
-% \NEWdescription{v3.0p}
-% The \thispackage\ package was developed using the standard 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.
+% The kernel provides all the user commands and internal macros which are
+% necessary for typesetting captions and setting parameters regarding these.
+% While the standard \LaTeX\ document classes provides an internal command
+% called |\@makecaption| and no options to control its behavior (except the
+% vertical skips above and below the caption itself), we provide similar
+% commands called |\caption@make| and |\caption@@make|, but with a lot of
+% options which can be selected with |\captionsetup|.
+% Loading the kernel part do not change the output of a \LaTeX\ document
+% -- it just provides functionality which can be used by \LaTeXe\ packages
+% which typesets captions, like \thispackage\ and the \package{subfig} package.
%
-% \iffalse
-% --------------------------------------------------------------------------- %
-% \fi
-%
-% \section{Compatibility to other packages}
-% \label{packages}
+% \Thispackage\ itself redefines the \LaTeX\ commands
+% |\caption|, |\@caption|, and |\@makecaption| and maps the latter one to
+% |\caption@@make|, giving the user the possibility to control the look \& feel
+% of the captions from floating environments like |figure| and |table|.
+% Furthermore it does similar to the caption stuff coming from other packages
+% (like the \package{longtable} or \package{supertabular} package):
+% Mapping the appropriate internal commands (like |\LT@makecaption| or
+% |\ST@caption|) to the ones offered by the \package{caption3} kernel.
+% So you can think of \thispackage\ as a layer package, it
+% simply provides adaptation layers between the caption stuff coming from
+% \LaTeXe\ itself or \LaTeXe\ packages, and the caption stuff offered by the
+% \package{caption3} kernel.
+% \end{abstract}
%
-% The \thispackage\ package contains special adaptations to other packages,
-% so the captions should always look like you have specified them to look like.
+% \section*{User manuals}
%
-% These are the packages the \thispackage\ package is adapted to:
-%
+% This document is describing the code implementation only. The user
+% documentation can be found in
+% \nopagebreak\begin{quote}
% \begin{tabular}{ll}
-% |float| & Gives you the possibility to define new floating environments\\
-% |listings| & Typesets source code listings\\
-% |longtable| & Typesets tables spanned over multiple pages\\
-% |rotating| & Supports rotated figures and tables\\
-% |sidecap| & Offers captions \emph{beside} figures or tables\\
-% |supertabular| & Typesets tables spanned over multiple pages\\
+% \href{ftp://ctan.tug.org/tex-archive/macros/latex/contrib/caption/caption-eng.pdf}%
+% {\texttt{caption-eng.pdf}} & The English documentation \\
+% \href{ftp://ctan.tug.org/tex-archive/macros/latex/contrib/caption/caption-rus.pdf}%
+% {\texttt{caption-rus.pdf}} & The Russian documentation\footnotemark \\
+% \href{ftp://dante.ctan.org/tex-archive/macros/latex/contrib/caption/caption-deu.pdf}%
+% {\texttt{caption-deu.pdf}} & The German documentation \\
% \end{tabular}
-%
-% \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}
-% 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.
-%
-% If a certain support is not desired you can switch it off using the
-% \thispackage\ package option
-% \begin{quote}
-% |\usepackage[|\ldots|,|\meta{package}|=no]{caption}|\quad.
-% \end{quote}
-% For example specifying the option |float=no| means you don't like the
-% \thispackage\ package to support the \package{float} package.
-% (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 packages mentioned above please take a look
-% at the documentation belonging to them or buy yourself
-% The \LaTeX\ Companion\cite{companion}.
-%
-% \iffalse
-% --------------------------------------------------------------------------- %
-% \fi
-%
-% \subsection{The \package{float} package}
-% \label{float}
-%
-% A very useful feature is provided by the \package{float} package\cite{float}:
-% It offers the float placement specifier |H| which is much more restrictive
-% than the specifier |h| offered by \LaTeX. While the latter one is only a
-% recommendation to \LaTeX\ to set the float ``here'', the |H| forces the
-% float to appear exactly at the spot where it occurs in your input file
-% and nowhere else.
-%
-% Furthermore it offers different styles for floating environments, these
-% styles are |plain|, |plaintop|, |ruled|, and |boxed|.
-% You can link one of these styles to either new floating environments or
-% to one of the existing environments |figure| and |table|.
-%
-% If you are using the \thispackage\ package together with the \package{float}
-% package a caption style called |ruled| gets defined automatically:
-% \begin{quote}
-% |\DeclareCaptionStyle{ruled}{labelfont=bf,labelsep=space}|
-% \end{quote}
-% This style represents the caption layout in |ruled| styled floats.
-% For you as an end user this means that captions within |ruled| floats will
-% always look like this, nevertheless what generic caption options do you
-% specify:
-%
-% \ifx\floatstyle\undefined
-%
-% \begin{Example}
-% \hrule height.8pt depth0pt \kern2pt
-% \vbox{\strut{\bfseries Program 7.1}
-% The first program. This hasn't got anything to do with the package
-% but is included as an example. Note the \texttt{ruled} float style.}
-% \kern2pt\hrule\kern2pt
-% \begin{verbatim}
-% #include <stdio.h>
-%
-% int main(int argc, char **argv)
-% {
-% for (int i = 0; i < argc; ++i)
-% printf("argv[%d] = %s\n", i, argv[i]);
-% return 0;
-% }
-% \end{verbatim}
-% \kern2pt\hrule\relax
-% \end{Example}
-%
-% \else
-%
-% \floatstyle{ruled}
-% \newfloat{Program}{tbp}{lop}[section]
-% \floatname{Program}{Program}
-%
-% \begin{Program}[H]
-% \begin{verbatim}
-% #include <stdio.h>
-%
-% int main(int argc, char **argv)
-% {
-% for (int i = 0; i < argc; ++i)
-% printf("argv[%d] = %s\n", i, argv[i]);
-% return 0;
-% }
-% \end{verbatim}
-% \caption{The first program. This hasn't got anything to do with the package
-% but is included as an example. Note the \texttt{ruled} float style.}
-% \end{Program}
-%
-% \fi
-%
-% If you want a different layout for |ruled| captions you have to define
-% your own one using the command
-% \begin{quote}
-% |\DeclareCaptionStyle{ruled}|\marg{options}\quad.
+% \footnotetext{Thanks a lot to Olga Lapko for this translation}
% \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
-% a suitable caption style with the same name as the float style.
-%
-% \textbf{Note:} For successful cooperation you need the float package
-% version 1.3 or newer.
-%
-% \iffalse
-% --------------------------------------------------------------------------- %
-% \fi
-%
-% \subsection{The \package{listings} package}
-% \label{listings}
-%
-% \NEWdescription{v3.0b}
-% The \package{listings} package\cite{listings} is a source code printer for \LaTeX.
-% You can typeset stand alone files as well as listings with an environment
-% similar to \texttt{verbatim} as well as you can print code snippets using
-% a command similar to |\verb|.
-% Many parameters control the output and if your preferred programming
-% language isn't already supported, you can make your own definition.
-%
-% \textbf{Note:} For successful cooperation you need the listings package
-% version 1.2 or higher. You'll get an error message when using an
-% older version!
-%
-% \iffalse
-% --------------------------------------------------------------------------- %
-% \fi
-%
-% \subsection{The \package{longtable} package}
-% \label{longtable}
-%
-% The \package{longtable} package\cite{longtable} offers the environment
-% |longtable| which behaves similar to the |tabular| environment, but
-% the table itself can span multiple pages.
%
-% \textbf{Note:} For successful cooperation you need the longtable package
-% version 3.15 or newer.
-%
-% \iffalse
-% --------------------------------------------------------------------------- %
-% \fi
-%
-% \subsection{The \package{rotating} package}
-% \label{rotating}
-%
-% The \package{rotating} package\cite{rotating} offers the floating
-% environments \texttt{sideways\-figure} and \texttt{sideways\-table}
-% which are just like normal figures and tables but rotated by 90 degree.
-% Furthermore they always use a full page on their own.
-%
-% \iffalse
-% --------------------------------------------------------------------------- %
-% \fi
-%
-% \subsection{The \package{sidecap} package}
-% \label{sidecap}
-%
-% \NEWdescription{v3.0b}
-% The \package{sidecap} package\cite{sidecap} offers the floating
-% environments |SCfigure| and |SCtable| which are like normal figures
-% and tables but the caption will be put \emph{beside} the contents.
-%
-% The \package{sidecap} package offers it's own options for justification.
-% If set, they will override the one specified with the caption option
-% |justification=| for captions beside their contents.
-%
-% \DescribeMacro{listof=}
-% Using the \package{sidecap} package you will probably notice that
-% suppressing the entry in the list of figures or tables with
-% |\caption[]{|\ldots|}| won't work inside these environments.
-% This is caused by the implementation design of the \package{sidecap}
-% package, but you can use |\captionsetup{listof=false}| inside the
-% figure or table as an alternative here.
-%
-% \ifx\SCfigure\undefined
-%
-% \begin{Example}
-% \newsavebox\scbox
-% \begin{lrbox}{\scbox}
-% \setlength{\unitlength}{.75cm}
-% \setlength{\fboxsep}{0pt}
-% \fbox{\begin{picture}(4,4)
-% \put(1,3){\circle{1}}
-% \put(3,3){\circle{1}}
-% \put(2,2){\circle{1}}
-% \put(1,1){\circle{1}}
-% \put(3,1){\circle{1}}
-% \end{picture}}
-% \end{lrbox}
-% \newlength\scboxwidth
-% \setlength\scboxwidth{\wd\scbox}
-% \makebox[\linewidth][c]{
-% \parbox[b]{\scboxwidth}{\unhbox\scbox}
-% \hspace\marginparsep
-% \parbox[b]{1.5\scboxwidth}{
-% \captionsetup{justification=raggedright,labelfont=bf}
-% \captionof{figure}[]{A small example with the caption beside the figure.}
-% }
-% }
-% \end{Example}
-%
-% \else
-%
-% \captionsetup{labelfont=bf}
-% \begin{SCfigure}[1.5][!ht]
-% \setlength{\unitlength}{.75cm}
-% \setlength{\fboxsep}{0pt}
-% \fbox{\begin{picture}(4,4)
-% \put(1,3){\circle{1}}
-% \put(3,3){\circle{1}}
-% \put(2,2){\circle{1}}
-% \put(1,1){\circle{1}}
-% \put(3,1){\circle{1}}
-% \end{picture}}
-% \iffalse
-% \captionsetup{labelfont=bf}
-% \fi
-% \caption[]{A small example with the caption beside the figure.}
-% \end{SCfigure}
-% \captionsetup{labelfont=default}
-%
-% \fi
-%
-% \iffalse
-% --------------------------------------------------------------------------- %
-% \fi
-%
-% \subsection{The \package{supertabular} package}
-% \label{supertabular}
-%
-% The \package{supertabular} package\cite{supertabular} offers the environment
-% |supertabular| which is quite similar to the |longtable| environment provided
-% by the \package{longtable} package. Both offers the typesetting of tables
-% which can span multiple pages. For a detailed discussion about the
-% differences between these powerful packages please take a look at
-% The \LaTeX\ Companion\cite{companion}.
-%
-% \iffalse
-% --------------------------------------------------------------------------- %
-% \fi
-%
-% \subsection{Known incompatibilities}
-%
-% \NEWdescription{v3.0b}
-% Using the \thispackage\ package together with one of the following packages
-% is not recommended; usually this would cause unwanted side effects or even
-% errors:
-% \begin{quote}
-% \package{ccaption}, \package{ftcap}, \package{hvfloat}, and
-% \package{nonfloat}
-% \end{quote}
-%
-% \iffalse
-% --------------------------------------------------------------------------- %
-% \fi
-%
-% \section{Compatibility to older versions}
-% \label{compatibility}
-%
-% \subsection{The \thispackage\ package version $1.x$}
-%
-% This version of the \thispackage\ package still supports the old options
-% 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
-% 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:
-%
-% {\small\begin{longtable}{ll}
-% \thispackage\ \version{1.x} & \thispackage\ \version{3.x}\\
-% \hline
-% \endhead
-% |normal| & |format=plain|\\
-% |hang| & |format=hang|\\
-% |isu| & |format=hang|\\
-% |center| & |justification=centering|\\
-% |centerlast| & |justification=centerlast|\\
-% \iffalse
-% |anne| & |justification=centerlast|\\
-% \fi
-% |nooneline| & |singlelinecheck=off|\\
-% |scriptsize| & |font=scriptsize|\\
-% |footnotesize| & |font=footnotesize|\\
-% |small| & |font=small|\\
-% |normalsize| & |font=normalsize|\\
-% |large| & |font=large|\\
-% |Large| & |font=Large|\\
-% |up| & |labelfont=up|\\
-% |it| & |labelfont=it|\\
-% |sl| & |labelfont=sl|\\
-% |sc| & |labelfont=sc|\\
-% |md| & |labelfont=md|\\
-% |bf| & |labelfont=bf|\\
-% |rm| & |labelfont=rm|\\
-% |sf| & |labelfont=sf|\\
-% |tt| & |labelfont=tt|\\
-% \end{longtable}}
-%
-% Beside the options for setting up the desired font there were also
-% the commands |\captionsize| resp.~|\captionfont| and |\captionlabelfont|
-% 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{quote}
-% |\DeclareCaptionFont{|\ldots|}{|\ldots|}|\qquad and\\
-% |\captionsetup{font=|\ldots|,labelfont=|\ldots|}|\qquad.
-% \end{quote}\SeeUserDefined
-%
-% Setting the margin for captions was done in \version{1.x} with
-% \begin{quote}
-% |\setlength{\captionmargin}{|\ldots|}|\quad.
-% \end{quote}
-% This was replaced by
-% \begin{quote}
-% |\captionsetup{margin=|\ldots|}|\qquad.
-% \end{quote}
-% \See{\Section{margins}{Margins and further paragraph options}}
-%
-% For example the old-style code
-% \begin{quote}
-% |\usepackage[hang,bf]{caption}|\\
-% |\renewcommand\captionfont{\small\sffamily}|\\
-% |\setlength\captionmargin{10pt}|
-% \end{quote}
-% will still work fine, but should be written today as
-% \begin{quote}
-% |\usepackage[format=hang,labelfont=bf,font={small,sf},|\\
-% | margin=10pt]{caption}|
-% \end{quote}
-% or
-% \begin{quote}
-% |\usepackage{caption}|\\
-% |\captionsetup{format=hang,labelfont=bf,font={small,sf},|\\
-% | margin=10pt}|\qquad.
-% \end{quote}
-%
-% 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.
-% But using this option is not recommended anymore since this
-% version of the \thispackage\ package offers a more flexible way
-% for changing the captions of these floating environments:
-% \begin{quote}
-% |\DeclareCaptionStyle{ruled}{|\ldots|}|
-% \end{quote}
-% resp.
-% \begin{quote}
-% |\captionsetup[ruled]{|\ldots|}|\qquad.
-% \end{quote}
-% \SeeUserDefined[, \Section*{misc}{Useful stuff}, and
-% \Section*{float}{The \package{float} package}]
-%
-% \subsection{The \package{caption2} package version $2.x$}
-%
-% 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.
-% For that reason you will still find a file called |caption2.sty| in
-% this package distribution, so old documents using the \package{caption2}
-% package will still compile fine.
-%
-% Newly created documents should use the actual version of the
-% \thispackage\ package instead. In most cases it's sufficient to replace
-% the command
-% \begin{quote}
-% |\usepackage[...]{caption2}|
-% \end{quote}
-% by
-% \begin{quote}
-% |\usepackage[...]{caption}|\qquad.
-% \end{quote}
-% But some options and commands will not be emulated, so you can get
-% 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 asking
-% for help.
-%
-% In addition to the obsolete options shown in the last section
-% these ones will be emulated, too:
-%
-% {\small\begin{longtable}{ll}
-% \package{caption2} \version{2.x} & \thispackage\ \version{3.x}\\
-% \hline
-% \endhead
-% |flushleft| & |justification=raggedright|\\
-% |flushright| & |justification=raggedleft|\\
-% |oneline| & |singlelinecheck=on|\\
-% \end{longtable}}
-%
-% Setting the margin for captions was done in \version{2.x} with
-% \begin{quote}\leavevmode\hbox{%
-% |\setcaptionmargin{|\ldots|}| resp.
-% |\setcaptionwidth{|\ldots|}|\quad.
-% }\end{quote}
-% This was replaced by
-% \begin{quote}\leavevmode\hbox{%
-% |\captionsetup{margin=|\ldots|}| resp.
-% |\captionsetup{width=|\ldots|}|\quad.
-% }\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).
-% This was replaced by
-% |\captionsetup{|\discretionary{}{}{}|singlelinecheck=|\discretionary{}{}{}|off}|
-% resp.
-% |\captionsetup{|\discretionary{}{}{}|singlelinecheck=|\discretionary{}{}{}|on}|.
-% \See{\Section{justification}{Justification}}
-%
-% The commands
-% \begin{quote}
-% |\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
-% 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.
-%
-% \iffalse
-% ... (some examples)
-% \fi
-%
-% The \version{2.x} option |ignoreLTcapwidth| do not have a replacement, too.
-% 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).
-% \See{\Section{longtable}{The \package{longtable} package}}
-%
-% \iffalse
-% --------------------------------------------------------------------------- %
-% \fi
-%
-% \pagebreak[4]
-% \section{Further reading}
-%
-% I recommend the following documents for further reading:
-%
-% \begin{itemize}
-% \item
-% The \TeX\ FAQ - Frequently asked questions about \TeX\ and \LaTeX :
-% \begin{quote}\url{http://faq.tug.org/}\end{quote}
-%
-% \item
-% A French FAQ can be found at
-% \begin{quote}\url{http://www.grappa.univ-lille3.fr/FAQ-LaTeX/}\end{quote}
-%
-% \item
-% \textsf{epslatex} from Keith Reckdahl contains many tips around
-% including graphics in \LaTeXe\ documents.
-% You will find this document in the directory
-% \begin{quote}\url{ftp://ftp.ctan.org/pub/tex/info/epslatex/}\end{quote}
-% \end{itemize}
-%
-% \iffalse
-% --------------------------------------------------------------------------- %
-% \fi
-%
-% \section{Thanks}
-%
-% I would like to thank Katja Melzner,
-% Steven D. Cochran, Frank Mittelbach,
-% 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
-% Harald Harders,
-% Peter L\"offler,
-% Peng Yu,
-% Alexander Zimmermann,
-% Matthias Pospiech,
-% J\"urgen Wieferink,
-% Christoph Bartoschek,
-% Uwe St\"ohr,
-% Ralf Stubner,
-% Geoff Vallis,
-% Florian Keiler,
-% J\"urgen G\"obel,
-% Uwe Siart,
-% Sang-Heon Shim,
-% Henrik Lundell,
-% David Byers,
-% William Asquith,
-% and
-% Prof.~Dr.~Dirk Hoffmann,
-% who all helped to make this package a better one.
+% \StopEventually{}
+% \clearpage
+% \tableofcontents
%
% \iffalse
% --------------------------------------------------------------------------- %
% \fi
-%
-% \StopEventually{\begin{thebibliography}{9}
-% \bibitem{companion}
-% Frank Mittelbach and Michel Goossens:
-% \newblock {\em The {\LaTeX} Companion (2nd.~Ed.)},
-% \newblock Addison-Wesley, 2004.
-%
-% \bibitem{float}
-% Anselm Lingnau:
-% \emph{An Improved Environment for Floats},
-% 2001/11/08
-%
-% \bibitem{floatrow}
-% Olga Lapko:
-% \emph{The floatrow package documentation},
-% 2005/05/22
-%
-% \bibitem{hyperref}
-% Sebastian Rahtz \& Heiko Oberdiek:
-% \emph{Hypertext marks in \LaTeX},
-% 2007/01/25
%
-% \bibitem{hypcap}
-% Heiko Oberdiek:
-% \emph{The hypcap package -- Adjusting anchors of captions}
-% 2007/02/19
-%
-% \bibitem{listings}
-% Carsten Heinz:
-% \emph{The Listings Package},
-% 2004/02/13
-%
-% \bibitem{longtable}
-% David Carlisle:
-% \emph{The longtable package},
-% 2000/10/22
-%
-% \bibitem{rotating}
-% Sebastian Rahtz and Leonor Barroca:
-% \emph{A style option for rotated objects in \LaTeX},
-% 1997/09/26
-%
-% \bibitem{sidecap}
-% Rolf Niepraschk und Hubert G\"a\ss lein:
-% \emph{The sidecap package},
-% 2003/06/06
-%
-% \bibitem{subfig}
-% Steven D. Cochran:
-% \emph{The subfig package},
-% 2005/07/05
-%
-% \bibitem{supertabular}
-% Johannes Braams und Theo Jurriens:
-% \emph{The supertabular environment},
-% 2002/07/19
-%
-% \bibitem{Anne}
-% Anne Br\"uggemann-Klein:
-% \emph{Einf\"uhrung in die Dokumentverarbeitung},
-% B.G. Teubner, Stuttgart, 1989
-% \end{thebibliography}}
-%
-% \iffalse
-% --------------------------------------------------------------------------- %
-% \fi
-%
% \DoNotIndex{\\,\_,\ ,\@@par}
% \DoNotIndex{\@classoptionslist,\@currext,\@currname}
% \DoNotIndex{\@ehc,\@ehd,\@empty,\@expandtwoargs}
% \DoNotIndex{\@for,\@firstofone,\@firstoftwo}
% \DoNotIndex{\@gobble,\@gobblefour,\@gobbletwo,\@hangfrom}
-% \DoNotIndex{\@ifnextchar,\@ifstar,\@ifundefined,\@latex@error}
-% \DoNotIndex{\@namedef,\@nameuse}
+% \DoNotIndex{\@ifnextchar,\@ifpackagelater,\@ifpackageloaded}
+% \DoNotIndex{\@ifstar,\@ifundefined,\@latex@error,\@namedef,\@nameuse}
% \DoNotIndex{\@onlypreamble,\@parboxrestore,\@plus,\@ptionlist}
% \DoNotIndex{\@removeelement,\@restorepar,\@secondoftwo,\@setpar}
% \DoNotIndex{\@tempa,\@tempboxa,\@tempdima,\@tempdimb,\@tempdimc,\@tempb,\@tempc}
+% \DoNotIndex{\@testopt}
% \DoNotIndex{\@undefined,\@unprocessedoptions,\@unusedoptionlist}
% \DoNotIndex{\p@,\z@}
-% \DoNotIndex{\active,\addtocounter,\addtolength,\advance}
+% \DoNotIndex{\active,\addtocounter,\addtolength,\advance,\aftergroup}
% \DoNotIndex{\baselineskip,\begin,\begingroup,\bfseries,\box}
% \DoNotIndex{\catcode,\centering,\changes,\csname,\def,\divide,\do,\downarrow}
% \DoNotIndex{\edef,\else,\empty,\end,\endcsname,\endgraf,\endgroup,\expandafter}
@@ -1924,9 +174,9 @@
% \DoNotIndex{\llap,\long,\m@ne,\margin,\mdseries,\message}
% \DoNotIndex{\newcommand,\newdimen,\newlength,\newline,\newif,\newsavebox}
% \DoNotIndex{\next,\nobreak,\nobreakspace,\noexpand,\noindent,\numberline}
-% \DoNotIndex{\normalsize,\or,\par,\parbox,\parfillskip}
-% \DoNotIndex{\parindent,\parskip,\prevdepth,\protect,\protected@edef,\providecommand}
-% \DoNotIndex{\quad}
+% \DoNotIndex{\normalcolor,\normalfont,\normalsize,\or,\par,\parbox,\parfillskip}
+% \DoNotIndex{\parindent,\parskip,\prevdepth,\protect,\protected@edef,\protected@write}
+% \DoNotIndex{\providecommand,\quad}
% \DoNotIndex{\raggedleft,\raggedright,\relax,\renewcommand,\RequirePackage}
% \DoNotIndex{\rightskip,\rmfamily}
% \DoNotIndex{\sbox,\scriptsize,\scshape,\setbox,\setlength,\sffamily,\slshape}
@@ -1938,72 +188,44 @@
% \DoNotIndex{\ExecuteOptions,\GenericWarning,\IfFileExists,\InputIfFileExists}
% \DoNotIndex{\NeedsTeXFormat,\MessageBreak}
% \DoNotIndex{\PackageError,\PackageInfo,\PackageWarning,\PackageWarningNoLine}
-% \DoNotIndex{\ProcessOptions,\ProvidesPackage}
+% \DoNotIndex{\PassOptionsToPackage,\ProcessOptions,\ProvidesPackage}
%
% \iffalse
% --------------------------------------------------------------------------- %
% \fi
-%
-% \clearpage
-% \setlength{\parskip}{0pt plus 1pt}
%
-% \section{The Implementation}
+% \setlength{\parskip}{0pt plus 1pt}
%
% \changes{v1.0}{1994/10/27}{First release}
-% \changes{v1.1}{1994/11/03}{New captiontype \cs{centerlast}}
+% \changes{v1.1}{1994/11/03}{New option \cs{centerlast}}
% \changes{v1.2}{1994/11/28}{Support of the \package{float} package}
% \changes{v1.3}{1995/01/09}{Support of \cs{captionlabelfont} in subcaptions}
% \changes{v1.4}{1995/01/30}{New option \cs{nooneline}}
% \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}}
+% \changes{v3.0d}{2004/11/28}{Split into two packages:
+% \package{caption} \& \package{caption3}}
%
-% The \package{caption} package consists of two parts -- the kernel
-% (|caption3.sty|) and the main package (|caption.sty|).
-%
-% The kernel provides all the user commands and internal macros which are
-% necessary for typesetting captions and setting parameters regarding these.
-% While the standard \LaTeX\ document classes provides an internal command
-% called |\@makecaption| and no options to control its behavior (except the
-% vertical skips above and below the caption itself), we provide similar
-% commands called |\caption@make| and |\caption@@make|, but with a lot of
-% options which can be selected with |\captionsetup|.
-% Loading the kernel part do not change the output of a \LaTeX\ document
-% -- it just provides functionality which can be used by \LaTeXe\ packages
-% which typesets captions, like the \package{caption} package or the
-% \package{subfig} package.
-%
-% The \package{caption} package itself redefines the \LaTeX\ commands
-% |\caption|, |\@caption|, and |\@makecaption| and maps the latter one to
-% |\caption@@make|, giving the user the possibility to control the captions of
-% the floating environments |figure| and |table|. Furthermore it does similar
-% to the caption stuff coming from other packages (like the \package{longtable}
-% or \package{supertabular} package):
-% Mapping the appropriate internal commands (like |\LT@makecaption| or
-% |\ST@caption|) to the ones offered by the \package{caption} kernel.
-% So you can think of the \package{caption} package as a layer package, it
-% simply provides adaptation layers between the caption stuff coming from
-% \LaTeXe\ itself or a \LaTeXe\ package and the caption stuff offered by the
-% \package{caption} kernel.
+% \newcommand*\Note[2][Note]{\par{\small\emph{#1:} #2}}
%
% \iffalse
% --------------------------------------------------------------------------- %
% \fi
%
-% \subsection{Kernel}
+% \clearpage
+% \section{Kernel}
% \iffalse
%<*kernel>
% \fi
%
-% \subsubsection*{Identification}
+% \subsection{Identification}
%
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption3}[2007/04/11 v3.0q caption3 kernel (AR)]
+\ProvidesPackage{caption3}[2007/09/01 v3.1 caption3 kernel (AR)]
% \end{macrocode}
%
-% \subsubsection*{Generic helpers}
+% \subsection{Generic helpers}
%
% \begin{macro}{\@nameundef}
% This is the opposite to |\@namedef| which is offered by the \LaTeX\ kernel.
@@ -2018,11 +240,11 @@
%
% \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|.
+% globally adds tokens to existing macros, like in |\AtBeginDocument|.
% 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@}}%
@@ -2038,14 +260,14 @@
% \begin{macrocode}
\def\bothIfFirst#1#2{%
\protected@edef\caption@tempa{#1}%
- \ifx\caption@tempa\@empty\else
+ \ifx\caption@tempa\@empty \else
#1#2%
\fi}
% \end{macrocode}
% \begin{macrocode}
\def\bothIfSecond#1#2{%
\protected@edef\caption@tempa{#2}%
- \ifx\caption@tempa\@empty\else
+ \ifx\caption@tempa\@empty \else
#1#2%
\fi}
% \end{macrocode}
@@ -2053,25 +275,112 @@
% \end{macro}
%
% \begin{macro}{\caption@ifinlist}
+% \changes{2007/07/29}{Rewritten}
% This helper macro checks if the first argument is in the comma separated
% list which is offered as second argument. So for example
% \begin{quote}
-% |\caption@ifinlist{frank}{axel,frank,steven}{yes}{no}|
+% |\caption@ifinlist{frank}{axel,frank,olga,steven}{yes}{no}|
% \end{quote}
% would expand to |yes|.
% \begin{macrocode}
-\def\caption@ifinlist#1#2{%
- \let\next\@secondoftwo
- \edef\caption@tempa{#1}%
- \@for\caption@tempb:={#2}\do{%
- \ifx\caption@tempa\caption@tempb
- \let\next\@firstoftwo
+\newcommand*\caption@ifinlist{%
+ \@expandtwoargs\caption@@ifinlist}
+% \end{macrocode}
+% \begin{macrocode}
+\newcommand*\caption@@ifinlist[2]{%
+ \begingroup
+ \def\@tempa##1,#1,##2\@nil{%
+ \endgroup
+ \ifx\relax##2\relax
+ \expandafter\@secondoftwo
+ \else
+ \expandafter\@firstoftwo
\fi}%
- \next}
+ \@tempa,#2,#1,\@nil}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\caption@ifin@list}
+% \changes{v3.1}{2007/08/12}{This macro added}
+% |\caption@ifin@list|\marg{cmd}\marg{list entry}\marg{yes}\marg{no}
+% \begin{macrocode}
+\newcommand*\caption@ifin@list[2]{%
+ \caption@ifempty@list#1%
+ {\@secondoftwo}%
+ {\@expandtwoargs\caption@@ifinlist{#2}{#1}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\caption@g@addto@list}
+% \changes{v3.1}{2007/07/29}{This macro added}
+% |\caption@g@addto@list|\marg{cmd}\marg{list entry}
+% \begin{macrocode}
+\newcommand*\caption@g@addto@list[2]{%
+ \caption@ifempty@list#1{\gdef#1{#2}}{\g@addto@macro#1{,#2}}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\caption@l@addto@list}
+% \changes{v3.1}{2007/07/29}{This macro added}
+% |\caption@l@addto@list|\marg{cmd}\marg{list entry}
+% \begin{macrocode}
+\newcommand*\caption@l@addto@list[2]{%
+ \caption@ifempty@list#1{\def#1{#2}}{\l@addto@macro#1{,#2}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\caption@g@removefrom@list}
+% \changes{v3.1}{2007/07/29}{This macro added}
+% |\caption@g@removefrom@list|\marg{cmd}\marg{list entry}
+% \begin{macrocode}
+\newcommand*\caption@g@removefrom@list[2]{%
+ \caption@l@removefrom@list#1{#2}%
+ \global\let#1#1}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\caption@l@removefrom@list}
+% \changes{v3.1}{2007/07/29}{This macro added}
+% |\caption@l@removefrom@list|\marg{cmd}\marg{list entry}\par
+% \Note[Caveat]{\meta{cmd} will be expanded during this process since
+% \cs{@removeelement} is using \cs{edef} to build the new list!}
+% \begin{macrocode}
+\newcommand*\caption@l@removefrom@list[2]{%
+ \caption@ifempty@list#1{}{\@expandtwoargs\@removeelement{#2}#1#1}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\caption@for@list}
+% \changes{v3.1}{2007/07/29}{This macro added}
+% |\caption@for@list|\marg{cmd}\marg{code with \#1}
+% \begin{macrocode}
+\newcommand*\caption@for@list[2]{%
+ \caption@ifempty@list#1{}{%
+ \def\caption@tempb##1{#2}%
+ \@for\caption@tempa:=#1\do{%
+ \expandafter\caption@tempb\expandafter{\caption@tempa}}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\caption@ifempty@list}
+% \changes{v3.1}{2007/07/29}{This macro added}
+% |\caption@ifempty@list|\marg{cmd}\marg{true}\marg{false}
+% \begin{macrocode}
+\newcommand*\caption@ifempty@list[1]{%
+ \ifx#1\@undefined
+ \expandafter\@firstoftwo
+ \else\ifx#1\relax
+ \expandafter\expandafter\expandafter\@firstoftwo
+ \else\ifx#1\@empty
+ \expandafter\expandafter\expandafter\expandafter
+ \expandafter\expandafter\expandafter\@firstoftwo
+ \else
+ \expandafter\expandafter\expandafter\expandafter
+ \expandafter\expandafter\expandafter\@secondoftwo
+ \fi\fi\fi}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\caption@setbool}
+% \changes{v3.1}{2007/04/05}{\cs{caption@set@bool}\marg{cmd}\marg{value} added}
% \begin{macro}{\caption@ifbool}
% \begin{macro}{\caption@undefbool}
% For setting and testing boolean options we offer these three helper macros:
@@ -2082,72 +391,174 @@
% |\caption@undefbool|\marg{name}
% \end{quote}
% \begin{macrocode}
-\def\caption@setbool#1#2{%
+\newcommand*\caption@setbool[1]{%
+ \expandafter\caption@set@bool\csname caption@if#1\endcsname}
+% \end{macrocode}
+% \begin{macrocode}
+\newcommand*\caption@set@bool[2]{%
\caption@ifinlist{#2}{1,true,yes,on}{%
- \expandafter\let\csname caption@if#1\endcsname\@firstoftwo
+ \let#1\@firstoftwo
}{\caption@ifinlist{#2}{0,false,no,off}{%
- \expandafter\let\csname caption@if#1\endcsname\@secondoftwo
+ \let#1\@secondoftwo
}{%
\caption@Error{Undefined boolean value `#2'}%
}}}
% \end{macrocode}
% \begin{macrocode}
-\def\caption@ifbool#1{\@nameuse{caption@if#1}}
+\newcommand*\caption@ifbool[1]{\@nameuse{caption@if#1}}
% \end{macrocode}
% \begin{macrocode}
-\def\caption@undefbool#1{\@nameundef{caption@if#1}}
+\newcommand*\caption@undefbool[1]{\@nameundef{caption@if#1}}
% \end{macrocode}
% \end{macro}
% \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{macro}{\caption@teststar}
+% \changes{v3.1}{2007/05/08}{This macro and its usage added}
+% |\caption@teststar|\marg{cmd}\marg{star arg}\marg{non-star arg}
% \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}
+\newcommand*\caption@teststar[3]{\@ifstar{#1{#2}}{#1{#3}}}
% \end{macrocode}
% \end{macro}
+%
+% \begin{macro}{\caption@withoptargs}
+% \changes{v3.1}{2007/08/12}{This macro added}
+% |\caption@withoptargs|\marg{cmd}
+% \begin{macrocode}
+\newcommand*\caption@withoptargs[1]{%
+ \@ifstar
+ {\def\caption@tempa{*}\caption@@withoptargs#1}%
+ {\def\caption@tempa{}\caption@@withoptargs#1}}
+% \end{macrocode}
+% \begin{macrocode}
+\def\caption@@withoptargs#1{%
+ \@ifnextchar[%]
+ {\caption@@@withoptargs#1}%
+ {\caption@@@@withoptargs#1}}
+% \end{macrocode}
+% \begin{macrocode}
+\def\caption@@@withoptargs#1[#2]{%
+ \l@addto@macro\caption@tempa{[{#2}]}%
+ \caption@@withoptargs#1}
+% \end{macrocode}
+% \begin{macrocode}
+\def\caption@@@@withoptargs#1{%
+ \expandafter#1\expandafter{\caption@tempa}}
+% \end{macrocode}
% \end{macro}
+%
+% \begin{macro}{\caption@CheckCommand}
+% \changes{v3.1}{2007/04/10}{This macro added}
+% \begin{macro}{\caption@IfCheckCommand}
+% |\caption@CheckCommand|\marg{macro}\marg{definition of macro}\par
+% checks if a command already exists, with the same definition.
+% It can be used more-than-once to check if one of multiple definitions will
+% finally match.
+% (It redefines itself later on to |\@gobbletwo| if the two commands match
+% fine, making further checks harmless.)\par
+% |\caption@IfCheckCommand|\marg{true}\marg{false}\par
+% will execute the \meta{true} code if one match was finally given,
+% the \meta{false} code otherwise.
+% (It simply checks if |\caption@CheckCommand| is |\@gobbletwo| and
+% restores the starting definition of |\caption@CheckCommand|.)
+% \begin{macrocode}
+\newcommand\caption@DoCheckCommand[2]{%
+ \begingroup
+ \let\@tempa#1%
+ #2%
+ \ifx\@tempa#1%
+ \endgroup
+ \let\caption@CheckCommand\@gobbletwo
+ \else
+ \endgroup
+ \fi}
+\@onlypreamble\caption@DoCheckCommand
+% \end{macrocode}
+% \begin{macrocode}
+\let\caption@CheckCommand\caption@DoCheckCommand
+\@onlypreamble\caption@CheckCommand
+% \end{macrocode}
+% \begin{macrocode}
+\newcommand*\caption@IfCheckCommand{%
+ \ifx\caption@CheckCommand\@gobbletwo
+ \let\next\@firstoftwo
+ \else
+ \let\next\@secondoftwo
+ \fi
+ \let\caption@CheckCommand\caption@DoCheckCommand
+ \next}
+\@onlypreamble\caption@IfCheckCommand
+% \end{macrocode}
% \end{macro}
% \end{macro}
%
-% \subsubsection*{Errors}
+% \begin{macro}{\caption@AtBeginDocument}
+% \changes{v3.1}{2007/04/13}{This macro and its usage added}
+% |\caption@AtBeginDocument*|\marg{code}\\
+% Same as |\AtBeginDocument| but the execution of code
+% will be surrounded by two |\PackageInfo|s.
+% The starred variant causes the code to be executed after all code
+% specified using the non-starred variant.
+% \begin{macrocode}
+\let\caption@begindocumenthook\@empty
+\let\caption@@begindocumenthook\@empty
+% \end{macrocode}
+% \begin{macrocode}
+\def\caption@AtBeginDocument{%
+ \caption@teststar\g@addto@macro
+ \caption@@begindocumenthook\caption@begindocumenthook}
+\@onlypreamble\caption@AtBeginDocument
+% \end{macrocode}
+% \begin{macrocode}
+\AtBeginDocument{%
+ \PackageInfo{caption}{Begin \noexpand\AtBeginDocument code\@gobble}%
+% \end{macrocode}
+% \begin{macrocode}
+ \def\caption@AtBeginDocument{%
+ \@ifstar{\g@addto@macro\caption@@begindocumenthook}\@firstofone}%
+ \caption@begindocumenthook
+ \let\caption@begindocumenthook\@undefined
+% \end{macrocode}
+% \begin{macrocode}
+ \def\caption@AtBeginDocument{%
+ \@ifstar\@firstofone\@firstofone}%
+ \caption@@begindocumenthook
+ \let\caption@@begindocumenthook\@undefined
+% \end{macrocode}
+% \begin{macrocode}
+ \PackageInfo{caption}{End \noexpand\AtBeginDocument code\@gobble}}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Errors}
%
% \begin{macro}{\caption@Error}
-% \changes{v3.0l}{2007/01/20}{This macro added}
+% \changes{v3.0l}{2007/01/20}{This macro added, will now be used for errors}
% \changes{v3.0q}{2007/04/11}{Renamed from \cs{caption@error} to \cs{caption@Error}}
-% This is mainly identical to |\PackageError{caption}{#1}{\caption@eh}|.
+% |\caption@Error|\marg{message}\par
+% This is mainly identical to |\PackageError{caption}{|\meta{message}|}{\caption@eh}|.
% \begin{macrocode}
-\newcommand\caption@Package{caption}
\newcommand*\caption@Error[1]{%
\PackageError\caption@Package{#1}\caption@eh}
% \end{macrocode}
+% \begin{macrocode}
+\newcommand*\caption@Package{caption}
+% \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{%
+\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}
+% \subsection{Using the keyval package}
%
% We need the \package{keyval} package for option handling, so we load it here.
% \begin{macrocode}
@@ -2155,6 +566,7 @@
% \end{macrocode}
%
% \begin{macro}{\undefine@key}
+% |\undefine@key|\marg{family}\marg{key}\par
% This helper macro is the opposite of |\define@key|, it removes a keyval
% definition.
% \begin{macrocode}
@@ -2163,6 +575,17 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\@onlypreamble@key}
+% \changes{v3.1}{2007/07/22}{This macro added}
+% |\onlypreamble@key|\marg{family}\marg{key}\par
+% Analogous to |\@onlypreamble| from \LaTeXe.
+% \begin{macrocode}
+\providecommand*\@onlypreamble@key[2]{%
+ \expandafter\@onlypreamble\csname KV@#1@#2\endcsname}
+\@onlypreamble\@onlypreamble@key
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\DeclareCaptionOption}
% |\DeclareCaptionOption|\marg{option}\marg{code}\\
% |\DeclareCaptionOption*|\marg{option}\marg{code}\par
@@ -2172,107 +595,105 @@
% current package only, so they can be used with |\usepackage|, but
% \emph{not} with |\captionsetup| later on.
% \begin{macrocode}
-\newcommand\DeclareCaptionOption{%
- \@ifstar{\caption@declareoption\AtEndOfPackage}%
- {\caption@declareoption\@gobble}}
+\newcommand*\DeclareCaptionOption{%
+ \caption@teststar\caption@declareoption\AtEndOfPackage\@gobble}
+\@onlypreamble\DeclareCaptionOption
+% \end{macrocode}
+% \begin{macrocode}
\newcommand*\caption@declareoption[2]{%
#1{\undefine@key{caption}{#2}}\define@key{caption}{#2}}
-\@onlypreamble\DeclareCaptionOption
\@onlypreamble\caption@declareoption
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\captionsetup}
% \changes{v3.0a}{2004/01/17}{Bugfix: Missing \% added}
+% \changes{v3.1}{2007/07/22}{Star-variant added}
% |\captionsetup|\oarg{type}\marg{keyval-list of options}\par
% If the optional argument `type' is specified, we simply save or append
% the option list, otherwise we `execute' it with |\setkeys|.
% \begin{macrocode}
-\newcommand\captionsetup{\@ifnextchar[\caption@setuptype\caption@setup}
-\newcommand\caption@typ@{caption@typ@} % This saves 74 words of TeX memory
-\def\caption@setuptype[#1]#2{%
- \@ifundefined{\caption@typ@#1}%
- {\@namedef{\caption@typ@#1}{#2}}%
- {\expandafter\l@addto@macro\csname\caption@typ@#1\endcsname{,#2}}}
-\newcommand\caption@setup{\caption@setkeys{caption}}
+\newcommand*\captionsetup{%
+ \caption@teststar\@captionsetup\@gobble\@firstofone}
% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\caption@setkeys}
-% \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}
-\newcommand*\caption@setkeys{%
- \@dblarg\caption@@setkeys}
+\newcommand*\@captionsetup[1]{%
+ \@ifnextchar[{\caption@setup@options#1}\caption@setup}
% \end{macrocode}
% \begin{macrocode}
-\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
- \caption@stepcounter\caption@keydepth
-%
- \def\caption@Package{#1}%
- \caption@Debug{\protect\setkeys{#2}{#3}}%
- \setkeys{#2}{#3}%
- \def\caption@Package{caption}%
-%
- \caption@addtocounter\caption@keydepth\m@ne
- \ifnum\caption@keydepth=0\relax
- \let\KV@errx\caption@KV@errx
- \let\KV@err\caption@KV@err
- \fi}
+\newcommand*\caption@setup{\caption@setkeys{caption}}
% \end{macrocode}
% \begin{macrocode}
-\caption@newcounter\caption@keydepth
+\def\caption@setup@options#1[#2]{%
+ % #1 is \@gobble in star form, and \@firstofone otherwise
+ #1{\caption@addtooptlist{#2}}%
+ \expandafter\caption@l@addto@list\csname caption@opt@#2\endcsname}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\caption@settype}
-% \changes{v3.0i}{2006/01/03}{Optional argument added}
-% \changes{v3.0j}{2006/01/26}{Revised}
-% \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{macro}{\clearcaptionsetup}
+% \changes{v3.1}{2007/07/29}{Optional argument added}
+% \changes{v3.1}{2007/08/17}{Starred variant added}
+% |\clearcaptionsetup|\oarg{option}\marg{type}\\
+% |\clearcaptionsetup*|\oarg{option}\marg{type}\par
+% This removes the saved option list associated with \meta{type}.
+% If \meta{option} is given, only this option will be removed from the list.
+% The starred variant does not issue a warning.
% \begin{macrocode}
-\newcommand*\caption@settype[1]{%
- \@ifundefined{\caption@typ@#1}{}{%
- \caption@esetup{\csname\caption@typ@#1\endcsname}}}
+\newcommand*\clearcaptionsetup{%
+ \caption@teststar\@clearcaptionsetup\@gobble\@firstofone}
% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\caption@esetup}
-% |\caption@esetup|\marg{keyval-list of options}\par
-% To execute a keyval-list of options saved within a macro we
-% need this special version of |\caption@setup| which expands the
-% argument first.
% \begin{macrocode}
-\newcommand*\caption@esetup[1]{%
- \edef\caption@tempa{\noexpand\caption@setup{#1}}%
- \caption@tempa}
+\newcommand*\@clearcaptionsetup[1]{%
+ \let\caption@tempa#1%
+ \@testopt\@@clearcaptionsetup{}}
+% \end{macrocode}
+% \begin{macrocode}
+\def\@@clearcaptionsetup[#1]#2{%
+ \expandafter\caption@ifempty@list\csname caption@opt@#2\endcsname
+ {\caption@tempa{\PackageWarning{caption}{Option list `#2' undefined}}}%
+ {\ifx,#1,%
+ \caption@clearsetup{#2}%
+ \else
+ \caption@@removefromsetup{#1}{#2}%
+ \fi}}
+% \end{macrocode}
+% \begin{macrocode}
+\newcommand*\caption@clearsetup[1]{%
+ \caption@removefromoptlist{#1}%
+ \@nameundef{caption@opt@#1}}
% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\clearcaptionsetup}
-% |\clearcaptionsetup|\marg{type}\par
-% This removes the saved option list associated with \meta{type}.
% \begin{macrocode}
-\newcommand*\clearcaptionsetup[1]{\@nameundef{\caption@typ@#1}}
+\newcommand*\caption@removefromsetup{%
+ \let\caption@tempa\@gobble
+ \caption@@removefromsetup}
+% \end{macrocode}
+% \begin{macrocode}
+\newcommand*\caption@@removefromsetup[2]{%
+ \expandafter\let\expandafter\@tempa\csname caption@opt@#2\endcsname
+ \expandafter\let\csname caption@opt@#2\endcsname\@undefined
+ \def\@tempb##1=##2\@nil{##1}%
+ \edef\@tempc{#1}%
+ \@for\@tempa:=\@tempa\do{%
+ \edef\@tempd{\expandafter\@tempb\@tempa=\@nil}%
+ \ifx\@tempd\@tempc
+ \let\caption@tempa\@gobble
+ \else
+ \expandafter\expandafter\expandafter\caption@l@addto@list
+ \expandafter\csname caption@opt@#2\expandafter\endcsname
+ \expandafter{\@tempa}%
+ \fi}%
+ \expandafter\caption@ifempty@list\csname caption@opt@#2\endcsname
+ {\caption@removefromoptlist{#2}}{}%
+ \caption@tempa{%
+ \PackageWarning{caption}{%
+ Option `#1' was not in list `#2'\MessageBreak}}}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\showcaptionsetup}
% \changes{v3.0e}{2005/05/03}{Optimized for memory usage}
+% \changes{v3.1}{2007/07/29}{Bugfix: Does not expand option list anymore}
% |\showcaptionsetup|\oarg{package}\marg{type}\par
% This comes for debugging issues: It shows the saved option list which
% is associated with \meta{type}.
@@ -2280,62 +701,185 @@
\newcommand*\showcaptionsetup[2][\@firstofone]{%
\GenericWarning{}{%
#1 Caption Info: KV list on `#2'\MessageBreak
- #1 Caption Data: (%
- \@ifundefined{\caption@typ@#2}{%
- % empty -- print nothing
+ #1 Caption Data: \@ifundefined{caption@opt@#2}{%
+ -none-%
}{%
- \@nameuse{\caption@typ@#2}%
- }%
- )}}
+ {\expandafter\expandafter\expandafter\strip@prefix
+ \expandafter\meaning\csname caption@opt@#2\endcsname}%
+ }}}
+% \end{macrocode}
+% \end{macro}
+%
+% \changes{v3.1}{2007/07/02}{Option \opt{options=} added}
+% \begin{macrocode}
+\DeclareCaptionOption{options}{\caption@setoptions{#1}}
+% \end{macrocode}
+%
+% \begin{macro}{\caption@setoptions}
+% \changes{v3.0i}{2006/01/03}{Optional argument added}
+% \changes{v3.0j}{2006/01/26}{Revised}
+% \changes{v3.0l}{2007/01/30}{Optional argument removed}
+% \changes{v3.1}{2007/04/11}{Usage of \cs{clearcaptionsetup} added}
+% \changes{v3.1}{2007/05/09}{Renamed from \cs{caption@settype} to \cs{caption@setoptions}}
+% |\caption@setoptions|\marg{type or environment or\ldots}\par
+% Caption options which have been saved with |\captionsetup|\oarg{type} can
+% be executed by using this command.
+% It simply executes the saved option list (and clears it afterwards),
+% if there is any.
+% \begin{macrocode}
+\newcommand*\caption@setoptions[1]{%
+ \caption@Debug{options=#1}%
+ \expandafter\let\expandafter\@tempa\csname caption@opt@#1\endcsname
+ \ifx\@tempa\relax \else
+ \let\caption@iftypewarning\@firstoftwo % = true
+ \expandafter\caption@setup\expandafter{\@tempa}%
+ \caption@clearsetup{#1}%
+ \fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\caption@addtooptlist}
+% \changes{v3.1}{2007/07/22}{This macro added}
+% \begin{macro}{\caption@removefromoptlist}
+% \changes{v3.1}{2007/07/22}{This macro added}
+% |\caption@addtooptlist|\marg{type}\\
+% |\caption@removefromoptlist|\marg{type}\par
+% Adds or removes an \meta{type} to the list of unused caption options.
+% Note that the catcodes of \meta{type} are sanitized here so removing
+% \meta{type} from the list do not fail when the \package{float} package
+% is used (since |\float@getstyle| gives a result which tokens have catcode
+% 12 $=$ ``other'').
+% \begin{macrocode}
+\newcommand*\caption@addtooptlist[1]{%
+ \@ifundefined{caption@opt@#1@lineno}{%
+ \caption@dooptlist\caption@g@addto@list{#1}%
+ \expandafter\xdef\csname caption@opt@#1@lineno\endcsname{\the\inputlineno}%
+ }{}}
+% \end{macrocode}
+% \begin{macrocode}
+\newcommand*\caption@removefromoptlist[1]{%
+ \caption@dooptlist\caption@g@removefrom@list{#1}%
+ \global\expandafter\let\csname caption@opt@#1@lineno\endcsname\@undefined}
+% \end{macrocode}
+% \begin{macrocode}
+\newcommand*\caption@dooptlist[2]{%
+ \begingroup
+ \edef\@tempa{#2}\@onelevel@sanitize\@tempa
+ \expandafter#1\expandafter\caption@optlist\expandafter{\@tempa}%
+ \endgroup}
+% \end{macrocode}
+% \begin{macrocode}
+\AtEndDocument{%
+ \caption@for@list\caption@optlist{%
+ \PackageWarningNoLine{caption}{%
+ Unused \string\captionsetup[#1]
+ on input line \csname caption@opt@#1@lineno\endcsname}}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\caption@setkeys}
+% \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}
+% |\caption@setkeys|\oarg{package}\marg{family}\marg{key-values}\par
+% This one simply calls |\setkeys|\marg{family}\marg{key-values}
+% but lets the error messages not refer to the \package{keyval} package,
+% but to the \meta{package} package instead.
+% \begin{macrocode}
+\newcommand*\caption@setkeys{\@dblarg\caption@@setkeys}
+% \end{macrocode}
+% \begin{macrocode}
+\long\def\caption@@setkeys[#1]#2#3{%
+ \ifx\caption@keydepth\@empty
+ \let\caption@ORI@KV@errx\KV@errx
+ \let\caption@ORI@KV@err\KV@err
+ \let\KV@errx\caption@Error
+ \let\KV@err\caption@Error
+ \fi
+ \l@addto@macro\caption@keydepth.%
+% \end{macrocode}
+% \begin{macrocode}
+ \def\caption@Package{#1}%
+ \caption@Debug{\protect\setkeys{#2}{#3}}%
+ \setkeys{#2}{#3}%
+ \def\caption@Package{caption}%
+% \end{macrocode}
+% \begin{macrocode}
+ \edef\caption@keydepth{\expandafter\@cdr\caption@keydepth\@nil}%
+ \ifx\caption@keydepth\@empty
+ \let\KV@errx\caption@ORI@KV@errx
+ \let\KV@err\caption@ORI@KV@err
+ \fi}
+% \end{macrocode}
+% \begin{macrocode}
+\let\caption@keydepth\@empty
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\caption@ExecuteOptions}
+% \changes{v3.1}{2007/07/15}{This macro added}
+% |\caption@ExecuteOptions|\marg{family}\marg{key-values}\par
+% We execute our options using the keyval interface, so we use this one
+% instead of |\ExecuteOptions| offered by \LaTeXe.
+% \begin{macrocode}
+\newcommand*\caption@ExecuteOptions[2]{%
+ \@expandtwoargs\caption@setkeys{#1}{#2}}%
+\@onlypreamble\caption@ExecuteOptions
% \end{macrocode}
% \end{macro}
%
% \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}
+% \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}
+% \changes{v3.1}{2007/04/17}{Star variant added}
+% |\caption@ProcessOptions*|\marg{family}\par
% 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.)
+% The starred variant do not process the global options.
+% (This code was taken from the \package{hyperref} package\cite{hyperref}
+% \version{6.74} and improved.)
% \begin{macrocode}
-\newcommand*\caption@ProcessOptions[1]{%
- \let\@tempc\relax
+\newcommand*\caption@ProcessOptions{%
+ \caption@teststar\caption@@ProcessOptions\@gobble\@firstofone}
+\@onlypreamble\caption@ProcessOptions
% \end{macrocode}
-%
% \begin{macrocode}
+\newcommand*\caption@@ProcessOptions[2]{%
+ \let\@tempc\relax
\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
+ #1{% \@firstofone -or- \@gobble
+ \@for\CurrentOption:=\@classoptionslist\do{%
+ \@ifundefined{KV@#2@\CurrentOption}{}{%
+ \@ifundefined{KV@#2@\CurrentOption @default}{%
+ \PackageInfo{#2}{Global option `\CurrentOption' ignored}%
+ }{%
+ \PackageInfo{#2}{Global option `\CurrentOption' processed}%
+ \edef\caption@tempa{\caption@tempa,\CurrentOption,}%
+ \@expandtwoargs\@removeelement\CurrentOption
+ \@unusedoptionlist\@unusedoptionlist
+ }%
}%
}%
+ \let\CurrentOption\@empty
}%
- \edef\caption@tempa{%
- \noexpand\caption@setkeys{#1}{%
- \caption@tempa\@ptionlist{\@currname.\@currext}%
- }%
- }%
- \caption@tempa
-% \end{macrocode}
-%
-% \begin{macrocode}
- \let\CurrentOption\@empty
+ \caption@ExecuteOptions{#2}{\caption@tempa\@ptionlist{\@currname.\@currext}}%
\AtEndOfPackage{\let\@unprocessedoptions\relax}}
-\@onlypreamble\caption@ProcessOptions
+\@onlypreamble\caption@@ProcessOptions
% \end{macrocode}
% \end{macro}
%
-% \subsubsection*{Margin resp. width}
+% \subsection{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}
+% \changes{v3.0p}{2007/04/03}{Option `twoside' added}
+% \changes{v3.1}{2007/08/11}{Options `margin*', `minmargin', and `maxmargin' added}
%
% \begin{macro}{\captionmargin}
% \begin{macro}{\captionwidth}
@@ -2356,45 +900,63 @@
%
% \begin{macrocode}
\DeclareCaptionOption{margin}{\setcaptionmargin{#1}}
+\DeclareCaptionOption{margin*}{\setcaptionmargin*{#1}}
\DeclareCaptionOption{width}{\setcaptionwidth{#1}}
-\DeclareCaptionOption{twoside}[1]{\caption@setbool{twoside}{#1}}
+\DeclareCaptionOption{twoside}[1]{\caption@set@bool\caption@iftwoside{#1}}
+% \end{macrocode}
+% \begin{macrocode}
+\DeclareCaptionOption{minmargin}{\caption@setoptcmd\caption@minmargin{#1}}
+\DeclareCaptionOption{maxmargin}{\caption@setoptcmd\caption@maxmargin{#1}}
% \end{macrocode}
%
% \begin{macro}{\setcaptionmargin}
-% |\setcaptionmargin|\marg{amount}
% \changes{v3.0h}{2005/10/24}{Renamed from \cs{caption@setmargin} to \cs{setcaptionmargin}}
-% \changes{v3.0h}{2005/10/24}{\cs{setcaptionmargin} enhanced so it can take left+right margin}
-% |\setcaptionmargin|\marg{amount}\par
+% \changes{v3.0h}{2005/10/24}{\cs{setcaptionmargin} enhanced so it can take
+% left+right margin}
+% \changes{v3.1}{2007/08/11}{Starred variant added}
+% \changes{v3.1}{2007/08/12}{\cs{setlength}\cs{captionmargin} \&
+% \cs{setlength}\cs{captionmargin@} swapped so
+% `\texttt{margin*=}\cs{captionmargin}' works in SingleLine options}
+% |\setcaptionmargin|\marg{amount}\\
+% |\setcaptionmargin*|\marg{amount}\par
% Please never use this in user documents, it's just there to
-% provide compatibility to |caption2.sty| \version{2.x}.
+% provide compatibility to the \package{caption2} package.
% \begin{macrocode}
-\newcommand*\setcaptionmargin[1]{%
- \captionwidth\z@
- \caption@@setmargin#1,#1,\@nil\@@}
-\def\caption@@setmargin#1,#2,#3\@@{%
- \setlength\captionmargin{#1}%
+\newcommand*\setcaptionmargin{%
+ \caption@teststar\caption@setmargin\@gobble\@firstofone}
+% \end{macrocode}
+% \begin{macrocode}
+\newcommand*\caption@setmargin[2]{%
+ #1{\captionwidth\z@}%
+ \caption@@setmargin#2,#2,\@nil}
+% \end{macrocode}
+% \begin{macrocode}
+\def\caption@@setmargin#1,#2,#3\@nil{%
\setlength\captionmargin@{#2}%
- \advance\captionmargin@ by -\captionmargin}
+ \setlength\captionmargin{#1}%
+ \addtolength\captionmargin@{-\captionmargin}}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\setcaptionwidth}
-% |\setcaptionwidth|\marg{amount}
% \changes{v3.0h}{2005/10/24}{Renamed from \cs{caption@setwidth} to \cs{setcaptionwidth}}
% |\setcaptionwidth|\marg{amount}\par
% Please never use this in user documents, it's just there to
-% provide compatibility to |caption2.sty| \version{2.x}.
+% provide compatibility to the \package{caption2} package.
% \begin{macrocode}
-\newcommand\setcaptionwidth{%
+\newcommand*\setcaptionwidth{%
+ \captionmargin\z@
+ \captionmargin@\z@
\setlength\captionwidth}
% \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.
+% This counter numbers the captions. At the moment it will be used inside
+% |\caption@ifoddpage| only.
% \begin{macrocode}
-\caption@newcounter\caption@count
+\newcommand*\caption@count{0}
% \end{macrocode}
% \end{macro}
%
@@ -2403,9 +965,9 @@
% 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|.
+% (We use it inside |\caption@ifoddpage| and |\caption@ragged|.)
% \begin{macrocode}
-\newcommand*\caption@newlabel{\@newl@bel{caption}}
+\newcommand*\caption@newlabel{\@newl@bel{caption@r}}
% \end{macrocode}
% \end{macro}
%
@@ -2418,35 +980,49 @@
% \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{macro}{\caption@label}
+% \changes{v3.1}{2007/09/01}{This macro added}
+% This command is a modified version of |\label| from \LaTeX2e.
+% It will be used inside |\caption@ifoddpage| and |\FP@helpNote|.
% \begin{macrocode}
- \protected@write\@auxout{\let\caption@thepage\relax}%
- {\string\caption@newlabel{\caption@count}{\caption@thepage}}%
+\newcommand*\caption@label[1]{%
+ \protected@write\@auxout{\let\caption@thepage\relax}%
+ {\string\caption@newlabel{#1}{\caption@thepage}}}
% \end{macrocode}
-% |\edef\caption@thepage{\pageref{\the\caption@count}}|
+% \end{macro}
+%
+% \begin{macro}{\caption@pageref}
+% \changes{v3.1}{2007/09/01}{This macro added}
+% This command is a modified version of |\pageref| from \LaTeX2e.
+% It will be used inside |\caption@ifoddpage| and |\FP@helpNote|.
% \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
+\newcommand*\caption@pageref[1]{%
+ \expandafter\ifx\csname caption@r@#1\endcsname\relax
+ \G@refundefinedtrue % => 'There are undefined references.'
+ \PackageWarning{caption}{Reference on page \thepage \space undefined}%
+ \else
+ \expandafter\let\expandafter\caption@thepage\csname caption@r@#1\endcsname
+ \fi}
% \end{macrocode}
-% |\ifodd\caption@thepage|\ldots
+% \end{macro}
+%
+% \begin{macro}{\caption@ifoddpage}
+% \changes{v3.0p}{2007/04/03}{This macro added}
+% At the moment this macro uses an own label\ldots ref mechanism,
+% but an alternative implementation method would be using the
+% \package{refcount} package\cite{refcount} and |\ifodd\getpagerefnumber{|\ldots|}|.
+% \Note{This macro re-defines itself so the \texttt{.aux} file will
+% only be used once per group.}
% \begin{macrocode}
+\newcommand*\caption@ifoddpage{%
+ \caption@iftwoside{%
+ \begingroup
+ \@tempcnta\caption@count
+ \advance\@tempcnta\@ne
+ \xdef\caption@count{\the\@tempcnta}%
+ \endgroup
+ \caption@label\caption@count
+ \caption@pageref\caption@count
\ifodd\caption@thepage
\let\caption@ifoddpage\@firstoftwo
\else
@@ -2459,148 +1035,194 @@
% \end{macrocode}
% \end{macro}
%
-% \subsubsection*{Indentions}
+% \begin{macro}{\caption@setoptcmd}
+% \changes{v3.1}{2007/08/11}{This macro added}
+% |\caption@setoptcmd|\marg{cmd}\marg{off -or- value}
+% \begin{macrocode}
+\newcommand*\caption@setoptcmd[2]{%
+ \caption@ifinlist{#2}{0,false,no,off}{\let#1\@undefined}{\def#1{#2}}}
+% \end{macrocode}
+% \end{macro}
%
-% \begin{macro}{\captionindent}
-% \begin{macro}{\captionparindent}
-% \begin{macro}{\captionhangindent}
+% \subsection{Indentions}
+%
+% \begin{macro}{\caption@indent}
+% \changes{v3.1}{2007/07/29}{Renamed from \cs{captionindent} to \cs{caption@indent}}
+% \begin{macro}{\caption@parindent}
+% \begin{macro}{\caption@hangindent}
% These are the indentions we support.
% \begin{macrocode}
-\newdimen\captionindent
-\newdimen\captionparindent
-\newdimen\captionhangindent
+\newdimen\caption@indent
+\newdimen\caption@parindent
+\newdimen\caption@hangindent
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
-% \changes{v3.0b}{2004/05/16}{Defaults added for options \opt{parindent=} and \opt{hangindent=}}
-% \changes{v3.0h}{2005/08/22}{Option \opt{parskip=}: \cs{AtBeginCaption} replaced by \cs{caption@@par}}
-% \changes{v3.0h}{2005/08/22}{Undocumented defaults for \opt{parindent=}, \opt{hangindent=},
-% and \opt{parskip=} removed}
-% \begin{macrocode}
-\DeclareCaptionOption{indent}[\leftmargini]{\setlength\captionindent{#1}}% obsolete!
-\DeclareCaptionOption{indention}[\leftmargini]{\setlength\captionindent{#1}}
-\DeclareCaptionOption{hangindent}{\setlength\captionhangindent{#1}}
-\DeclareCaptionOption{parindent}{\setlength\captionparindent{#1}}
-\DeclareCaptionOption{parskip}{\l@addto@macro\caption@@par{\setlength\parskip{#1}}}
-% \end{macrocode}
-%
-% \changes{v3.0h}{2005/08/22}{Increased compatibility to KOMA-Script: A special version of options
-% `parindent' and `parskip' added}
-% \changes{v3.0i}{2006/01/03}{Bugfix 06-01-03: KOMA-Script variants of `parskip' and `parindent' options
-% revised and moved into caption kernel}
-% \changes{v3.0j}{2006/02/23}{KOMA-Script variants of `parskip' and `parindent' are obsolete now, removed}
-% \changes{v3.0o}{2007/03/30}{KOMA-Script variants of `parskip' and `parindent' re-added, since they
-% still collide with the actual version of subfig (Sigh!)}
-%
-% \begin{macrocode}
-\@ifundefined{scr@caption}{}{%
-% \end{macrocode}
+% \changes{v3.0b}{2004/05/16}{Defaults added for options \opt{parindent=}
+% and \opt{hangindent=}}
+% \changes{v3.0h}{2005/08/22}{Option \opt{parskip=}: \cs{AtBeginCaption}
+% replaced by \cs{caption@@par}}
+% \changes{v3.0h}{2005/08/22}{Undocumented defaults for \opt{parindent=},
+% \opt{hangindent=}, and \opt{parskip=} removed}
+% \begin{macrocode}
+\DeclareCaptionOption{indent}[\leftmargini]{%
+ \setlength\caption@indent{#1}}% obsolete!
+\DeclareCaptionOption{indention}[\leftmargini]{%
+ \setlength\caption@indent{#1}}
+\DeclareCaptionOption{parindent}{%
+ \setlength\caption@parindent{#1}}
+\DeclareCaptionOption{hangindent}{%
+ \setlength\caption@hangindent{#1}}
+\DeclareCaptionOption{parskip}{%
+ \l@addto@macro\caption@@par{\setlength\parskip{#1}}}
+% \end{macrocode}
+%
+% \changes{v3.0h}{2005/08/22}{Increased compatibility to KOMA-Script:
+% A special version of options `parindent' and `parskip' added}
+% \changes{v3.0i}{2006/01/03}{Bugfix 06-01-03: KOMA-Script variants of
+% `parskip' and `parindent' options revised and moved into caption kernel}
+% \changes{v3.0j}{2006/02/23}{KOMA-Script variants of `parskip' and
+% `parindent' are obsolete now, removed}
+% \changes{v3.0o}{2007/03/30}{KOMA-Script variants of `parskip' and
+% `parindent' re-added, since they still collide with the current
+% version of the subfig package (Sigh!)}
%
% There is an option clash between the \KOMAScript\ document classes
-% and the \package{caption} kernel,
-% both define the options |parindent| and |parskip| but with different meaning.
+% and the \package{caption} kernel, both define the options |parindent| and
+% |parskip| but with different meaning.
% Furthermore the ones defined by the \package{caption} kernel take a
% value as parameter but the \KOMAScript\ ones do not.
-% So we need special versions of the options |parindent| and |parskip| here,
-% ones who determine if a value is given (and therefore should be treated as
-% our option) or not (and therefore should be ignored by us).
-%
+% So we need special versions of the options |parindent| and |parskip| here
+% which determine if a value is given (and therefore should be treated as
+% our option) or not (and therefore should be ignored by us).\footnote{%^^A
+% This problem was completely solved due a change of \cs{caption@ProcessOptions}
+% in \thispackage\ \version{3.0j}, but we still need this workaround since
+% these options otherwise would still collide with the current version $1.3$
+% of the \package{subfig} package (Sigh!)}
+% \begin{macrocode}
+\@ifundefined{scr@caption}{}{%
+% \end{macrocode}
% \begin{macrocode}
\let\caption@KV@parindent\KV@caption@parindent
\DeclareCaptionOption{parindent}[]{%
- \def\caption@tempa{#1}%
- \ifx\caption@tempa\@empty
- \PackageInfo{caption3}{Option `parindent' ignored}%
+ \ifx,#1,%
+ \caption@Debug{Option `parindent' ignored}%
\else
\caption@KV@parindent{#1}%
\fi}%
% \end{macrocode}
-%
% \begin{macrocode}
\let\caption@KV@parskip\KV@caption@parskip
\DeclareCaptionOption{parskip}[]{%
- \def\caption@tempa{#1}%
- \ifx\caption@tempa\@empty
- \PackageInfo{caption3}{Option `parskip' ignored}%
+ \ifx,#1,%
+ \caption@Debug{Option `parskip' ignored}%
\else
\caption@KV@parskip{#1}%
\fi}%
% \end{macrocode}
-%
% \begin{macrocode}
}
% \end{macrocode}
%
-% \subsubsection*{Styles}
+% \subsection{Styles}
%
% \begin{macro}{\DeclareCaptionStyle}
-% \changes{v3.0a}{2004/01/17}{Pass through argument \#3 so extra spaces between arguments do make any harm}
+% \changes{v3.0a}{2004/01/17}{Pass through argument \#3 so extra spaces
+% between arguments do make any harm}
% |\DeclareCaptionStyle|\marg{name}\oarg{single-line-list-of-KV}\marg{list-of-KV}
% \begin{macrocode}
\newcommand*\DeclareCaptionStyle[1]{%
- \@ifnextchar[{\caption@declarestyle{#1}}{\caption@declarestyle{#1}[]}}
+ \@testopt{\caption@declarestyle{#1}}{}}
+\@onlypreamble\DeclareCaptionStyle
+% \end{macrocode}
+% \begin{macrocode}
\def\caption@declarestyle#1[#2]#3{%
\global\@namedef{caption@sls@#1}{#2}%
\global\@namedef{caption@sty@#1}{#3}}
-\@onlypreamble\DeclareCaptionStyle
\@onlypreamble\caption@declarestyle
% \end{macrocode}
% \end{macro}
%
% \begin{macrocode}
\DeclareCaptionOption{style}{\caption@setstyle{#1}}
+\DeclareCaptionOption{singlelinecheck}{\caption@set@bool\caption@ifslc{#1}}
% \end{macrocode}
%
% \begin{macro}{\caption@setstyle}
% \changes{v3.0f}{2005/06/01}{Starred variant added}
+% \changes{v3.1}{2007/07/29}{Recursive style definitions should work now}
% |\caption@setstyle|\marg{name}\\
% |\caption@setstyle*|\marg{name}\par
% Selecting a caption style means saving the additional
% \meta{single-line-list-of-KV} (this will be done by |\caption@sls|),
-% resetting the caption options to the default ones (this will be done using
-% |\caption@setdefault|) and executing the \meta{list-of-KV} options
-% (this will be done using |\caption@esetup|).\par
+% resetting the caption options to the base ones (this will be done using
+% |\caption@resetstyle|) and executing the \meta{list-of-KV} options
+% (this will be done using |\caption@setup|).\par
% The starred version will give no error message if the given style is not
% defined.
% \begin{macrocode}
-\newcommand\caption@setstyle{%
- \@ifstar{\caption@@setstyle\@gobble}{\caption@@setstyle\@firstofone}}
+\newcommand*\caption@setstyle{%
+ \caption@teststar\caption@@setstyle\@gobble\@firstofone}
+% \end{macrocode}
+% \begin{macrocode}
\newcommand*\caption@@setstyle[2]{%
\@ifundefined{caption@sty@#2}%
- {#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}}}
+ {#1{\caption@Error{Undefined style `#2'}}}%
+ {\expandafter\let\expandafter\caption@sty\csname caption@sty@#2\endcsname
+ \ifx\caption@setstyle@flag\@undefined
+ \let\caption@setstyle@flag\caption@setstyle
+ \let\caption@iftypewarning\@firstoftwo % = true
+ \caption@resetstyle
+ \expandafter\caption@setup\expandafter{\caption@sty}%
+ \let\caption@setstyle@flag\@undefined
+ \else
+ \expandafter\caption@setup\expandafter{\caption@sty}%
+ \fi
+ \expandafter\let\expandafter\caption@sls\csname caption@sls@#2\endcsname
+ \expandafter\caption@l@addto@list\expandafter\caption@opt@SingleLine
+ \expandafter{\caption@sls}}}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\caption@setdefault}
-% This resets (nearly) all caption options to the default ones.
+% \begin{macro}{\caption@resetstyle}
+% \changes{v3.1}{2007/02/04}{%
+% This macro renamed from \cs{caption@setdefault} to \cs{caption@resetstyle}}
+% This resets (nearly) all caption options to the base ones.
% \emph{Note that this does not touch the skips and the positioning!}
% \begin{macrocode}
-\newcommand\caption@setdefault{\captionsetup{%
- 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}}
+\newcommand*\caption@resetstyle{%
+ \caption@setup{%
+ format=plain,labelformat=default,labelsep=colon,textformat=simple,%
+ justification=justified,font=,labelfont=,textfont=,%
+ margin=0pt,minmargin=0,maxmargin=0,%
+ indent=0pt,parindent=0pt,hangindent=0pt,%
+ singlelinecheck=1,strut=1}%
+ \caption@clearsetup{SingleLine}}
% \end{macrocode}
% \end{macro}
%
% \changes{v3.0d}{2005/02/12}{\opt{indent=0pt} added to caption style \opt{default}}
-% Currently there is only one pre-defined style, called `default'.
-% It's a perfect match to the behaviour of |\@makecaption| offered by the
-% standard \LaTeX\ document classes:
-% If the caption fits in one single line, it is typeset centered.
-%
+% \changes{v3.1}{2007/02/04}{Caption style `default' renamed to `base', and a new `default' added}
+% \changes{v3.1}{2007/03/31}{\opt{format=plain} added to caption style \opt{default}}
+% Currently there are two pre-defined styles, called `base' \& `default'.
+% The first one is a perfect match to the behavior of |\@makecaption| offered
+% by the standard \LaTeX\ document classes (and was called `default' in
+% \thispackage\ \version{3.0}), the second one matches the document
+% class actually used.
% \begin{macrocode}
-\DeclareCaptionStyle{default}[indent=0pt,justification=centering]{}
+\DeclareCaptionStyle{base}[indent=0pt,justification=centering]{}
+\DeclareCaptionStyle{default}[indent=0pt,justification=centering,format=plain]{%
+ format=default,labelsep=default,textformat=default,%
+ justification=default,font=default,labelfont=default,textfont=default}
% \end{macrocode}
%
-% \subsubsection*{Formats}
+% \subsection{Formats}
%
% \begin{macro}{\DeclareCaptionFormat}
-% \changes{v3.0a}{2004/01/17}{Pass through argument \#3 so extra spaces between arguments do make any harm}
+% \changes{v3.0a}{2004/01/17}{Pass through argument \#3 so extra spaces
+% between arguments do make any harm}
% \changes{v3.0d}{2005/02/09}{Starred variant added}
% |\DeclareCaptionFormat|\marg{name}\marg{code with \#1, \#2, and \#3}\\
% |\DeclareCaptionFormat*|\marg{name}\marg{code with \#1, \#2, and \#3}\par
@@ -2608,12 +1230,13 @@
% horizontal) mode, but does not support the |indention=| option.
% \begin{macrocode}
\newcommand\DeclareCaptionFormat{%
- \@ifstar{\caption@declareformat\@gobble}%
- {\caption@declareformat\@firstofone}}
+ \caption@teststar\caption@declareformat\@gobble\@firstofone}
+\@onlypreamble\DeclareCaptionFormat
+% \end{macrocode}
+% \begin{macrocode}
\newcommand\caption@declareformat[3]{%
\global\expandafter\let\csname caption@ifh@#2\endcsname#1%
\global\long\@namedef{caption@fmt@#2}##1##2##3{#3}}
-\@onlypreamble\DeclareCaptionFormat
\@onlypreamble\caption@declareformat
% \end{macrocode}
% \end{macro}
@@ -2629,23 +1252,25 @@
% \begin{macrocode}
\newcommand*\caption@setformat[1]{%
\@ifundefined{caption@fmt@#1}%
- {\caption@Error{Undefined caption format `#1'}}%
+ {\caption@Error{Undefined format `#1'}}%
{\expandafter\let\expandafter\caption@ifh\csname caption@ifh@#1\endcsname
\expandafter\let\expandafter\caption@fmt\csname caption@fmt@#1\endcsname}}
% \end{macrocode}
% \end{macro}
%
-% \changes{v3.0a}{2004/01/23}{Caption format \opt{default} renamed to \opt{normal}}
-% \changes{v3.0f}{2005/05/12}{Caption format \opt{normal} renamed to \opt{@normal}}
-% \changes{v3.0h}{2005/08/25}{Caption format \opt{@normal} renamed to \opt{plain} and documented}
+% \changes{v3.0a}{2004/01/23}{%
+% Caption format \opt{default} renamed to \opt{normal}}
+% \changes{v3.0f}{2005/05/12}{%
+% Caption format \opt{normal} renamed to \opt{@normal}}
+% \changes{v3.0h}{2005/08/25}{%
+% Caption format \opt{@normal} renamed to \opt{plain} and documented}
% There are two pre-defined formats, called `plain' and `hang'.
-%
% \begin{macrocode}
\DeclareCaptionFormat{plain}{#1#2#3\par}
\DeclareCaptionFormat{hang}{%
\@hangfrom{#1#2}%
- \advance\captionparindent\hangindent
- \advance\captionhangindent\hangindent
+ \advance\caption@parindent\hangindent
+ \advance\caption@hangindent\hangindent
\caption@@par
#3\par}
% \end{macrocode}
@@ -2653,20 +1278,22 @@
% \changes{v3.0a}{2004/01/23}{Caption format \opt{default} linked to \opt{normal}}
% \changes{v3.0e}{2005/04/28}{Bugfix 05-04-28: Missing \cs{caption@ifh@default} added}
% `default' usually maps to `plain'.
-%
% \begin{macrocode}
\def\caption@fmt@default{\caption@fmt@plain}
\def\caption@ifh@default{\caption@ifh@plain}
% \end{macrocode}
%
-% \subsubsection*{Label formats}
+% \subsection{Label formats}
%
% \begin{macro}{\DeclareCaptionLabelFormat}
-% \changes{v3.0a}{2004/01/17}{Pass through argument \#2 so extra spaces between arguments do make any harm}
-% |\DeclareCaptionLabelFormat|\marg{name}\marg{code with \#1 and \#2}
+% \changes{v3.0a}{2004/01/17}{%
+% Pass through argument \#2 so extra spaces between arguments do make any harm}
+% \changes{v3.1}{2007/07/07}{%
+% Label formats have three arguments now}
+% |\DeclareCaptionLabelFormat|\marg{name}\marg{code with \#1, \#2, and \#3}
% \begin{macrocode}
\newcommand*\DeclareCaptionLabelFormat[2]{%
- \global\@namedef{caption@lfmt@#1}##1##2{#2}}
+ \global\@namedef{caption@lfmt@#1}##1##2##3{#2}}
\@onlypreamble\DeclareCaptionLabelFormat
% \end{macrocode}
% \end{macro}
@@ -2681,13 +1308,13 @@
% \begin{macrocode}
\newcommand*\caption@setlabelformat[1]{%
\@ifundefined{caption@lfmt@#1}%
- {\caption@Error{Undefined caption label format `#1'}}%
+ {\caption@Error{Undefined label format `#1'}}%
{\expandafter\let\expandafter\caption@lfmt\csname caption@lfmt@#1\endcsname}}
% \end{macrocode}
% \end{macro}
%
-% There are three pre-defined label formats, called `empty', `simple', and `parens'.
-%
+% There are three pre-defined label formats, called `empty', `simple',
+% and `parens'.
% \begin{macrocode}
\DeclareCaptionLabelFormat{empty}{}
\DeclareCaptionLabelFormat{simple}{\bothIfFirst{#1}{\nobreakspace}#2}
@@ -2695,27 +1322,28 @@
% \end{macrocode}
%
% `default' usually maps to `simple'.
-%
% \begin{macrocode}
\def\caption@lfmt@default{\caption@lfmt@simple}
% \end{macrocode}
%
-% \subsubsection*{Label separators}
+% \subsection{Label separators}
%
% \begin{macro}{\DeclareCaptionLabelSeparator}
-% \changes{v3.0a}{2004/01/17}{Pass through argument \#2 so extra spaces between arguments do make any harm}
+% \changes{v3.0a}{2004/01/17}{Pass through argument \#2 so extra spaces
+% between arguments do make any harm}
% \changes{v3.0h}{2005/08/25}{Starred variant added}
% |\DeclareCaptionLabelSeparator|\marg{name}\marg{code}\\
% |\DeclareCaptionLabelSeparator*|\marg{name}\marg{code}\par
% The starred form causes the label separator to be typeset \emph{without} using |\captionlabelfont|.
% \begin{macrocode}
\newcommand\DeclareCaptionLabelSeparator{%
- \@ifstar{\caption@declarelabelseparator\@gobble}%
- {\caption@declarelabelseparator\@firstofone}}
+ \caption@teststar\caption@declarelabelseparator\@gobble\@firstofone}
+\@onlypreamble\DeclareCaptionLabelSeparator
+% \end{macrocode}
+% \begin{macrocode}
\newcommand\caption@declarelabelseparator[3]{%
\global\expandafter\let\csname caption@iflf@#2\endcsname#1%
\global\long\@namedef{caption@lsep@#2}{#3}}
-\@onlypreamble\DeclareCaptionLabelSeparator
\@onlypreamble\caption@declarelabelseparator
% \end{macrocode}
% \end{macro}
@@ -2731,18 +1359,17 @@
% \begin{macrocode}
\newcommand*\caption@setlabelseparator[1]{%
\@ifundefined{caption@lsep@#1}%
- {\caption@Error{Undefined caption label separator `#1'}}%
+ {\caption@Error{Undefined 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}
% \end{macro}
%
-% \changes{v3.0f}{2005/06/11}{Bugfix 05-03-23: Caption label separator \opt{newline} implementation
-% changed from \cs{newline} to \cs{\textbackslash}}
+% \changes{v3.0f}{2005/06/11}{Bugfix 05-03-23: Caption label separator
+% \opt{newline} implementation changed from \cs{newline} to \cs{\textbackslash}}
% \changes{v3.0h}{2005/08/24}{Caption label separator \opt{endash} added}
% There are seven pre-defined label separators, called `none', `colon', `period', `space',
% `quad', `newline', and `endash'.
-%
% \begin{macrocode}
\DeclareCaptionLabelSeparator{none}{}
\DeclareCaptionLabelSeparator{colon}{: }
@@ -2754,13 +1381,12 @@
% \end{macrocode}
%
% `default' usually maps to `colon'.
-%
% \begin{macrocode}
\def\caption@lsep@default{\caption@lsep@colon}
\def\caption@iflf@default{\caption@iflf@colon}
% \end{macrocode}
%
-% \subsubsection*{Text formats}
+% \subsection{Text formats}
%
% \begin{macro}{\DeclareCaptionTextFormat}
% \changes{v3.0l}{2007/02/18}{This macro added}
@@ -2772,8 +1398,10 @@
% \end{macrocode}
% \end{macro}
%
+% \changes{v3.0d}{2005/02/12}{Option \opt{strut=} added}
% \begin{macrocode}
\DeclareCaptionOption{textformat}{\caption@settextformat{#1}}
+\DeclareCaptionOption{strut}{\caption@set@bool\caption@ifstrut{#1}}
% \end{macrocode}
%
% \begin{macro}{\caption@settextformat}
@@ -2783,55 +1411,208 @@
% \begin{macrocode}
\newcommand*\caption@settextformat[1]{%
\@ifundefined{caption@tfmt@#1}%
- {\caption@Error{Undefined caption text format `#1'}}%
+ {\caption@Error{Undefined 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}
+% \subsection{Fonts}
+%
+% \begin{macro}{\DeclareCaptionFont}
+% \changes{v3.0a}{2004/01/22}{%
+% Bugfix: Multi token arguments are allowed now}
+% \changes{v3.1}{2007/05/07}{%
+% Internal: Uses \cs{caption@fnt} instead of \cs{caption@temp} now}
+% |\DeclareCaptionFont|\marg{name}\marg{code}
+% \begin{macrocode}
+\newcommand*\DeclareCaptionFont[2]{%
+ \define@key{caption@fnt}{#1}[]{\l@addto@macro\caption@fnt{#2}}}
+\@onlypreamble\DeclareCaptionFont
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\DeclareDefaultCaptionFont}
+% \changes{v3.1}{2006/05/14}{This macro added}
+% |\DeclareDefaultCaptionFont|\marg{name}\marg{code}
+% \begin{macrocode}
+\newcommand*\DeclareDefaultCaptionFont[2]{%
+ \global\@namedef{caption#1@default}{#2}}
+\@onlypreamble\DeclareDefaultCaptionFont
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+\DeclareCaptionOption{font}{\caption@setfont{font}{#1}}
+\DeclareDefaultCaptionFont{font}{}
+% \end{macrocode}
+% \begin{macrocode}
+\DeclareCaptionOption{labelfont}{\caption@setfont{labelfont}{#1}}
+\DeclareDefaultCaptionFont{labelfont}{}
+% \end{macrocode}
+% \begin{macrocode}
+\DeclareCaptionOption{textfont}{\caption@setfont{textfont}{#1}}
+\DeclareDefaultCaptionFont{textfont}{}
+% \end{macrocode}
+%
+% \begin{macro}{\caption@setfont}
+% \changes{v3.0l}{2007/01/30}{Usage of \cs{caption@setkeys} with optional argument}
+% \changes{v3.1}{2006/05/14}{Support of \cs{DeclareDefaultCaptionFont} added}
+% |\caption@setfont|\marg{name}\marg{keyval-list of names}\par
+% Selecting a caption font means saving all the code snippets
+% (in |\caption#1|).
+% Because we use |\setkeys| recursive here we need to do this inside an
+% extra group and collect all the code snippets in |\caption@tempa| first.
+% \begin{macrocode}
+\newcommand*\caption@setfont[2]{%
+ \begingroup
+ \let\caption@fnt\@empty
+ \define@key{caption@fnt}{default}[]{%
+ \l@addto@macro\caption@fnt{\csname caption#1@default\endcsname}}%
+ \caption@setkeys[caption]{caption@fnt}{#2}%
+ \global\let\caption@tempa\caption@fnt
+ \endgroup
+ \expandafter\let\csname caption#1\endcsname\caption@tempa}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\caption@font}
+% \changes{v3.1}{2007/05/07}{This macro added}
+% |\caption@font|\marg{keyval-list of names}\\
+% |\caption@font*|\marg{keyval-code}\par
+% Sets the given font, e.g.~|\caption@font{small,it}|
+% is equivalent to |\small\itshape|.
+% \begin{macrocode}
+\newcommand*\caption@font{%
+ \caption@teststar\caption@@font\@firstofone
+ {\caption@setkeys[caption]{caption@fnt}}}
+\newcommand*\caption@@font[2]{%
+ \begingroup
+ \def\caption@fnt{\endgroup}%
+ #1{#2}%
+ \caption@fnt}
+% \end{macrocode}
+% \end{macro}
+%
+% These are the pre-defined font code snippets.
+%
+% \changes{v3.1}{2007/05/07}{Color font support added (kernel)}
+% \begin{macrocode}
+\DeclareCaptionFont{normalcolor}{\normalcolor}
+\DeclareCaptionFont{color}{\color{#1}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareCaptionFont{normalfont}{\normalfont}
+\DeclareCaptionFont{up}{\upshape}
+\DeclareCaptionFont{it}{\itshape}
+\DeclareCaptionFont{sl}{\slshape}
+\DeclareCaptionFont{sc}{\scshape}
+\DeclareCaptionFont{md}{\mdseries}
+\DeclareCaptionFont{bf}{\bfseries}
+\DeclareCaptionFont{rm}{\rmfamily}
+\DeclareCaptionFont{sf}{\sffamily}
+\DeclareCaptionFont{tt}{\ttfamily}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareCaptionFont{scriptsize}{\scriptsize}
+\DeclareCaptionFont{footnotesize}{\footnotesize}
+\DeclareCaptionFont{small}{\small}
+\DeclareCaptionFont{normalsize}{\normalsize}
+\DeclareCaptionFont{large}{\large}
+\DeclareCaptionFont{Large}{\Large}
+% \end{macrocode}
+%
+% \changes{v3.0p}{2007/04/02}{\package{setspace} package support added (kernel)}
+% \begin{macrocode}
+\DeclareCaptionFont{singlespacing}{\setstretch\setspace@singlespace}% normally 1
+\DeclareCaptionFont{onehalfspacing}{\onehalfspacing}
+\DeclareCaptionFont{doublespacing}{\doublespacing}
+\DeclareCaptionFont{stretch}{\setstretch{#1}}
+\caption@AtBeginDocument{\providecommand*\setstretch[1]{}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+%\DeclareCaptionFont{normal}{%
+% \caption@font{normalcolor,normalfont,normalsize,singlespacing}
+\DeclareCaptionFont{normal}{%
+ \caption@font*{%
+ \KV@caption@fnt@normalcolor\@unused
+ \KV@caption@fnt@normalfont\@unused
+ \KV@caption@fnt@normalsize\@unused
+ \KV@caption@fnt@singlespacing\@unused}}
+% \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}}
+% The old versions \version{1.x} of \thispackage\ offered this
+% command to setup the font size used for captions. We still do
+% so old documents will work fine.
+% \begin{macrocode}
+\providecommand\captionsize{}
+% \end{macrocode}
+% \end{macro}
+%
+% \changes{v3.0a}{2004/01/23}{Option \opt{size=} now sets \cs{captionsize} instead of \cs{captionfont}}
+% \begin{macrocode}
+\DeclareCaptionOption{size}{\caption@setfont{size}{#1}}
+\DeclareDefaultCaptionFont{size}{}
+% \end{macrocode}
+%
+% \subsection{Justifications}
%
% \begin{macro}{\DeclareCaptionJustification}
-% \changes{v3.0a}{2004/01/17}{Pass through argument \#2 so extra spaces between arguments do make any harm}
+% \changes{v3.0a}{2004/01/17}{Pass through argument \#2 so extra spaces
+% between arguments do make any harm}
+% \changes{v3.1}{2007/07/03}{Mapped to \cs{DeclareCaptionFont}}
% |\DeclareCaptionJustification|\marg{name}\marg{code}
% \begin{macrocode}
\newcommand*\DeclareCaptionJustification[2]{%
- \global\@namedef{caption@hj@#1}{#2}}
-%\newcommand\DeclareCaptionJustification{\DeclareCaptionFont}
+ \global\@namedef{caption@hj@#1}{#2}% for compatibility to v3.0
+ \DeclareCaptionFont{#1}{#2}}
\@onlypreamble\DeclareCaptionJustification
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\DeclareDefaultCaptionJustification}
+% \changes{v3.1}{2007/07/03}{This macro added}
+% |\DeclareDefaultCaptionJustification|\marg{code}
+% \begin{macrocode}
+\newcommand*\DeclareDefaultCaptionJustification[1]{%
+ \global\@namedef{caption@hj@default}{#1}% for compatibility to v3.0
+ \DeclareDefaultCaptionFont{@hj}{#1}}
+\@onlypreamble\DeclareDefaultCaptionJustification
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macrocode}
\DeclareCaptionOption{justification}{\caption@setjustification{#1}}
+\DeclareDefaultCaptionJustification{}
% \end{macrocode}
%
% \begin{macro}{\caption@setjustification}
+% \changes{v3.1}{2007/07/03}{Mapped to \cs{caption@setfont}}
% |\caption@setjustification|\marg{name}\par
% Selecting a caption justification simply means saving the code (in |\caption@hj|).
% \begin{macrocode}
-\newcommand*\caption@setjustification[1]{%
- \@ifundefined{caption@hj@#1}%
- {\caption@Error{Undefined caption justification `#1'}}%
- {\expandafter\let\expandafter\caption@hj\csname caption@hj@#1\endcsname}}
-%\newcommand\caption@setjustification{\caption@setfont{@hj}}
+\newcommand*\caption@setjustification{\caption@setfont{@hj}}
% \end{macrocode}
% \end{macro}
%
% These are the pre-defined justification code snippets.
-%
% \begin{macrocode}
\DeclareCaptionJustification{justified}{}
\DeclareCaptionJustification{centering}{\centering}
@@ -2841,16 +1622,10 @@
\DeclareCaptionJustification{raggedright}{\raggedright}
% \end{macrocode}
%
-% `default' usually maps to `justified'.
-%
-% \begin{macrocode}
-\def\caption@hj@default{\caption@hj@justified}
-% \end{macrocode}
-%
% \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| |:-)|
+% Please blame Frank Mittelbach for the code of |\caption@centerfirst| |:-)|
% \begin{macrocode}
\providecommand\centerfirst{%
\let\\\@centercr
@@ -2879,7 +1654,9 @@
% \end{macrocode}
% \end{macro}
%
+% \subsubsection{The ragged2e package}
% \changes{v3.0b}{2004/05/16}{Improved \package{ragged2e} package support}
+%
% We also support the upper-case commands offered by the \package{ragged2e}
% package.
% Note that these just map to their lower-case variants if the
@@ -2894,15 +1671,19 @@
% \end{macrocode}
%
% \begin{macro}{\caption@ragged}
-% \changes{v3.0p}{2007/04/07}{The `ragged2e' package will now only been loaded when needed}
-% \changes{v3.0q}{2007/04/11}{Bugfix: Usage of \cs{caption@Info} replaced by \cs{caption@Debug}}
-% \changes{v3.0q}{2007/04/16}{Warnung will be suppressed on first \LaTeX\ run}
-% |\caption@ragged| will be basically defined as\par
-% |\AtBeginDocument{\IfFileExists{ragged2e.sty}%|\\
-% | {\RequirePackage{ragged2e}\let\caption@ragged\@firstoftwo}%|\\
-% | {\let\caption@ragged\@secondoftwo}}|\par
+% \changes{v3.0p}{2007/04/07}{The `ragged2e' package will now only been
+% loaded when needed}
+% \changes{v3.0q}{2007/04/11}{Bugfix: Usage of \cs{caption@Info} replaced
+% by \cs{caption@Debug}}
+% \changes{v3.1}{2007/04/16}{A different warning will be given on first \LaTeX\ run}
+% |\caption@ragged| will be basically defined as
+% \begin{quote}
+% |\AtBeginDocument{\IfFileExists{ragged2e.sty}%|\\
+% | {\RequirePackage{ragged2e}\let\caption@ragged\@firstoftwo}%|\\
+% | {\let\caption@ragged\@secondoftwo}}|
+% \end{quote}
% 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
+% (This warning will be type out 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}
@@ -2910,120 +1691,38 @@
\caption@Debug{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{caption3}{%
- `ragged2e' package not loaded, therefore\MessageBreak
- substituting \string#2 for \string#1\MessageBreak}%
- \global\@namedef{caption\string#1}}{}%
- #2}
+ \caption@ragged}
% \end{macrocode}
% \begin{macrocode}
-\AtBeginDocument{%
- \@ifundefined{caption@ragged2e}{%
- \let\caption@@ragged\@secondoftwo % suppress warning above
+\caption@AtBeginDocument{%
+ \@ifundefined{caption@r@ragged2e}{%
+ \newcommand*\caption@@ragged{%
+ \PackageWarning{caption}{%
+ `ragged2e' support has been changed.\MessageBreak
+ Rerun to get captions right}%
+ \global\let\caption@ragged\@secondoftwo % suppress further warnings
+ \caption@ragged}%
}{%
\caption@Debug{We load ragged2e}%
\IfFileExists{ragged2e.sty}{%
- \RequirePackage{ragged2e}\let\caption@@ragged\@firstoftwo}{}%
+ \RequirePackage{ragged2e}%
+ \let\caption@@ragged\@firstoftwo
+ }{%
+ \newcommand*\caption@@ragged[2]{%
+ \@ifundefined{caption\string#1}{%
+ \PackageWarning{caption}{%
+ `ragged2e' package not loaded, therefore\MessageBreak
+ substituting \string#2 for \string#1\MessageBreak}%
+ \global\@namedef{caption\string#1}}{}%
+ #2}%
+ }%
}}
% \end{macrocode}
-% \end{macro}
-%
-% \subsubsection*{Fonts}
-%
-% \begin{macro}{\DeclareCaptionFont}
-% \changes{v3.0a}{2004/01/22}{Bugfix: Multi token arguments are allowed now}
-% |\DeclareCaptionFont|\marg{name}\marg{code}
% \begin{macrocode}
-\newcommand\DeclareCaptionFont[2]{%
- \define@key{caption@fnt}{#1}[]{\g@addto@macro\caption@tempa{#2}}}
-\@onlypreamble\DeclareCaptionFont
% \end{macrocode}
% \end{macro}
%
-% \begin{macrocode}
-\DeclareCaptionOption{font}{\caption@setfont{font}{#1}}
-\DeclareCaptionOption{labelfont}{\caption@setfont{labelfont}{#1}}
-\DeclareCaptionOption{textfont}{\caption@setfont{textfont}{#1}}
-% \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|).
-% Because we use |\setkeys| recursive here we need to do this inside an
-% extra group and collect all the code snippets in |\caption@tempa| first.
-% \begin{macrocode}
-\newcommand*\caption@setfont[2]{%
- \let\caption@tempa\@empty
- \begingroup
-% \define@key{caption@fnt}{default}[]{%
-% \global\expandafter\let\expandafter\caption@tempa
-% \csname caption#1@default\endcsname}%
- \caption@setkeys[caption]{caption@fnt}{#2}%
- \endgroup
- \expandafter\let\csname caption#1\endcsname\caption@tempa}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macrocode}
-\DeclareCaptionFont{default}{}
-% \end{macrocode}
-%
-% These are the pre-defined font code snippets.
-%
-% \begin{macrocode}
-\DeclareCaptionFont{scriptsize}{\scriptsize}
-\DeclareCaptionFont{footnotesize}{\footnotesize}
-\DeclareCaptionFont{small}{\small}
-\DeclareCaptionFont{normalsize}{\normalsize}
-\DeclareCaptionFont{large}{\large}
-\DeclareCaptionFont{Large}{\Large}
-% \end{macrocode}
-%
-% \begin{macrocode}
-\DeclareCaptionFont{up}{\upshape}
-\DeclareCaptionFont{it}{\itshape}
-\DeclareCaptionFont{sl}{\slshape}
-\DeclareCaptionFont{sc}{\scshape}
-\DeclareCaptionFont{md}{\mdseries}
-\DeclareCaptionFont{bf}{\bfseries}
-\DeclareCaptionFont{rm}{\rmfamily}
-\DeclareCaptionFont{sf}{\sffamily}
-\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}
-% The old versions \version{1.x} of the \package{caption} package offered this
-% command to setup the font size used for captions. We still do
-% so old documents will work fine.
-% \begin{macrocode}
-\providecommand\captionsize{}
-% \end{macrocode}
-% \end{macro}
-%
-% \changes{v3.0a}{2004/01/23}{Option \opt{size=} now sets \cs{captionsize} instead of \cs{captionfont}}
-% \begin{macrocode}
-\DeclareCaptionOption{size}{\caption@setfont{size}{#1}}
-% \end{macrocode}
-%
-% \subsubsection*{Vertical spaces before and after captions}
+% \subsection{Vertical spaces before and after captions}
%
% \begin{macro}{\abovecaptionskip}
% \begin{macro}{\belowcaptionskip}
@@ -3045,21 +1744,16 @@
\DeclareCaptionOption{skip}{\setlength\abovecaptionskip{#1}}
% \end{macrocode}
%
-% \subsubsection*{Positioning}
+% \subsection{Positioning}
%
% These macros handle the right position of the caption.
% Note that the position is actually \emph{not} controlled by the
-% \package{caption} kernel options, but by the user (or a specific package
+% \package{caption3} kernel options, but by the user (or a specific package
% like the \package{float} package) instead.
% The user can put the |\caption| command wherever he likes! So this stuff
% is only to give us a \emph{hint} where to put the right skips, the user
% usually has to take care for himself that this hint actually matches the
% right position.
-% The user can also try out the experimental setting |position=auto| which
-% means that the \package{caption} package should try to guess the actual
-% position of the caption for himself. (But in many cases, for example in
-% |longtable|s, this is doomed to fail, so it's not documented in the
-% user part of the documentation.)
%
% \begin{macrocode}
\DeclareCaptionOption{position}{\caption@setposition{#1}}
@@ -3077,7 +1771,7 @@
% \begin{macrocode}
\newcommand*\caption@setposition[1]{%
\caption@ifinlist{#1}{d,default}{%
- \def\caption@position{\caption@defaultpos}%
+ \let\caption@position\caption@defaultpos
}{\caption@ifinlist{#1}{t,top,above}{%
\let\caption@position\@firstoftwo
}{\caption@ifinlist{#1}{b,bottom,below}{%
@@ -3085,45 +1779,50 @@
}{\caption@ifinlist{#1}{a,auto}{%
\let\caption@position\@undefined
}{%
- \caption@Error{Undefined caption position `#1'}%
+ \caption@Error{Undefined position `#1'}%
}}}}}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\caption@defaultpos}
-% The default `position' is usually `bottom', this means that the (larger)
-% skip will be typeset above the caption.
-% This correspondents to the |\@makecaption| implementation in the standard
-% \LaTeX\ document classes.
+% \changes{v3.1}{2007/05/08}{Default position changed from `bottom' to `auto'}
+% The default `position' is `auto', this means that \thispackage\ will try
+% to guess the current position of the caption.
+% (But in many cases, for example in |longtable|s, this is doomed to fail!)\par
+% The setting `bottom' correspondents to the |\@makecaption| implementation
+% in the standard \LaTeX\ document classes, but `auto' should give better
+% results in most cases.
% \begin{macrocode}
-%\caption@setdefaultpos{b}% default = bottom
-\let\caption@defaultpos\@secondoftwo
+%\caption@setdefaultpos{a}% default = auto
+\let\caption@defaultpos\@undefined
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\caption@iftop}
% \changes{v3.0a}{2004/01/23}{Split into \cs{caption@iftop} \& \cs{caption@fixposition}}
% \changes{v3.0d}{2005/02/12}{Adapted to \cs{caption@defaultpos}}
+% \changes{v3.1}{2007/05/08}{Position will be fixed to `bottom' if `auto'}
% |\caption@iftop|\marg{true-code}\marg{false-code}\par
-% (If the |position=| is set to |auto| we assume a |bottom| position.)
+% (If the |position=| is set to |auto| we assume a |bottom| position here.)
% \begin{macrocode}
-\newcommand\caption@iftop{%
+\newcommand*\caption@iftop{%
\ifx\caption@position\@undefined
- \expandafter\@secondoftwo
- \else
- \expandafter\caption@position
- \fi}
+ \let\caption@position\@secondoftwo
+% = \caption@setposition b%
+ \fi
+ \caption@position}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\caption@fixposition}
-% \changes{v3.0b}{2004/05/16}{Split into \cs{caption@fixposition} & \cs{caption@autoposition}}
+% \changes{v3.0b}{2004/05/16}{%
+% Split into \cs{caption@fixposition} & \cs{caption@autoposition}}
% |\caption@fixposition|\par
% This macro checks if the `position' is set to `auto'.
% If yes, |\caption@autoposition| will be called to
% set |\caption@position| to a proper value we can actually use.
% \begin{macrocode}
-\newcommand\caption@fixposition{%
+\newcommand*\caption@fixposition{%
\ifx\caption@position\@undefined
\caption@autoposition
\fi}
@@ -3133,27 +1832,44 @@
% \begin{macro}{\caption@autoposition}
% \changes{v3.0a}{2004/01/23}{\cs{ifvmode} added}
% |\caption@autoposition|\par
-% We guess the actual position of the caption by checking |\prevdepth|.
-% \begin{macrocode}
-\newcommand\caption@autoposition{%
+% We guess the current position of the caption by checking |\prevdepth|.\par
+% A different solution would be setting the |\spacefactor| to something
+% not much less than 1000 (for example 994) in |\caption@start| and
+% checking this value here by |\ifnum\spacefactor=994|.
+% (It's implemented in the \package{threeparttable}
+% package\cite{threeparttable} this way.)\par
+% Another idea would be checking |\@ifminipage|, but since some packages
+% typeset the caption within a simple |\vbox| this does not seem to be a
+% good one.
+% \begin{macrocode}
+\newcommand*\caption@autoposition{%
\ifvmode
\edef\caption@tempa{\the\prevdepth}%
\caption@Debug{\protect\prevdepth=\caption@tempa}%
-% \caption@setposition{\ifdim\prevdepth>-\p@ b\else t\fi}%
\ifdim\prevdepth>-\p@
\let\caption@position\@secondoftwo
\else
\let\caption@position\@firstoftwo
\fi
+% = \caption@setposition{\ifdim\prevdepth>-\p@ b\else t\fi}%
\else
\caption@Debug{no \protect\prevdepth}%
-% \caption@setposition{b}%
\let\caption@position\@secondoftwo
+% = \caption@setposition b%
\fi}
% \end{macrocode}
% \end{macro}
+% \begin{macro}{\caption@setautoposition}
+% \changes{v3.1}{2007/06/10}{This macro added}
+% |\caption@setautoposition|\marg{position}\par
+% replaces the above algorithm by a different one (or a fixed position setting).
+% \begin{macrocode}
+\newcommand*\caption@setautoposition[1]{%
+ \def\caption@autoposition{\caption@setposition{#1}}}
+% \end{macrocode}
+% \end{macro}
%
-% \subsubsection*{Hooks}
+% \subsection{Hooks}
%
% \begin{macro}{\AtBeginCaption}
% \begin{macro}{\AtEndCaption}
@@ -3161,44 +1877,445 @@
% |\AtEndCaption| \marg{code}\par
% These hooks can be used analogous to |\AtBeginDocument| and |\AtEndDocument|.
% \begin{macrocode}
-\newcommand\caption@beginhook{}
-\newcommand\caption@endhook{}
-\newcommand\AtBeginCaption{\l@addto@macro\caption@beginhook}
-\newcommand\AtEndCaption{\l@addto@macro\caption@endhook}
+\newcommand*\caption@beginhook{}
+\newcommand*\caption@endhook{}
+\newcommand*\AtBeginCaption{\l@addto@macro\caption@beginhook}
+\newcommand*\AtEndCaption{\l@addto@macro\caption@endhook}
% \end{macrocode}
% \end{macro}
% \end{macro}
%
-% \subsubsection*{Miscellaneous options}
+% \subsection{Lists}
%
% \changes{v3.0b}{2004/05/16}{Option \opt{listof=} added}
-% \changes{v3.0d}{2005/02/12}{Option \opt{strut=} added}
% \begin{macrocode}
-\DeclareCaptionOption{listof}{\caption@setbool{lof}{#1}}
-\DeclareCaptionOption{singlelinecheck}{\caption@setbool{slc}{#1}}
-\DeclareCaptionOption{strut}{\caption@setbool{strut}{#1}}
+\DeclareCaptionOption{listof}{\caption@set@bool\caption@iflof{#1}}
+% \end{macrocode}
+%
+% \begin{macro}{\DeclareCaptionListOfFormat}
+% \changes{v3.1}{2004/07/15}{This macro added}
+% |\DeclareCaptionListOfFormat|\marg{name}\marg{code with \#1 and \#2}
+% \begin{macrocode}
+\newcommand*\DeclareCaptionListOfFormat[2]{%
+ \global\@namedef{caption@lstfmt@#1}##1##2{#2}}
+\@onlypreamble\DeclareCaptionListOfFormat
+% \end{macrocode}
+% \end{macro}
+%
+% \changes{v3.1}{2007/07/15}{Option \opt{listofformat=} added}
+% \begin{macrocode}
+\DeclareCaptionOption{listofformat}{\caption@setlistofformat{#1}}
+% \end{macrocode}
+%
+% \begin{macro}{\caption@setlistofformat}
+% \changes{v3.1}{2004/07/15}{This macro added}
+% |\caption@setlistofformat|\marg{name}\par
+% Selecting a caption list-of format simply means saving the code (in |\caption@lstfmt|).
+% \begin{macrocode}
+\newcommand*\caption@setlistofformat[1]{%
+ \@ifundefined{caption@lstfmt@#1}%
+ {\caption@Error{Undefined list-of format `#1'}}%
+ {\expandafter\let\expandafter\caption@lstfmt
+ \csname caption@lstfmt@#1\endcsname}}
+% \end{macrocode}
+% \end{macro}
+%
+% There are five pre-defined list formats, taken from the \package{subfig} package.
+% \begin{macrocode}
+\DeclareCaptionListOfFormat{empty}{}
+\DeclareCaptionListOfFormat{simple}{#1#2}
+\DeclareCaptionListOfFormat{parens}{#1(#2)}
+\DeclareCaptionListOfFormat{subsimple}{#2}
+\DeclareCaptionListOfFormat{subparens}{(#2)}
+% \end{macrocode}
+% \begin{macrocode}
+\def\caption@lstfmt@default{\caption@lstfmt@subsimple}
% \end{macrocode}
%
-% \subsubsection*{Debug option}
-% \changes{v3.0m}{2007/03/04}{Debug option added to kernel}
+% \subsection{Debug option}
+% \changes{v3.0m}{2007/03/04}{Debug option added (kernel)}
%
% \begin{macrocode}
\DeclareCaptionOption{debug}[1]{%
- \caption@setbool{debug}{#1}%
+ \caption@set@bool\caption@ifdebug{#1}%
+ \let\caption@iftypewarning\caption@ifdebug
\caption@ifdebug{%
- \def\caption@Debug{\PackageInfo{caption3}}%
+ \def\caption@Debug{\PackageInfo{caption}}%
}{%
\let\caption@Debug\@gobble
}}
+% \end{macrocode}
+% \begin{macrocode}
+\DeclareOption{debug}{\setkeys{caption}{debug}}
+% \end{macrocode}
+% \begin{macrocode}
\setkeys{caption}{debug=0}
% \end{macrocode}
%
-% \subsubsection*{Initialization of parameters}
+% \subsection{Document classes \& Babel support}
%
% \begin{macrocode}
-\captionsetup{style=default,position=default,listof=1,%
+\caption@CheckCommand\@makecaption{\let\@makecaption\@undefined}
+% \end{macrocode}
+%
+% \subsubsection{The standard \texorpdfstring{\LaTeX{}}{LaTeX} classes}
+%
+% \begin{macrocode}
+\caption@CheckCommand\@makecaption{%
+ % article|report|book [2005/09/16 v1.4f Standard LaTeX document class]
+ \long\def\@makecaption#1#2{%
+ \vskip\abovecaptionskip
+ \sbox\@tempboxa{#1: #2}%
+ \ifdim \wd\@tempboxa >\hsize
+ #1: #2\par
+ \else
+ \global \@minipagefalse
+ \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
+ \fi
+ \vskip\belowcaptionskip}}
+% \end{macrocode}
+%
+% \subsubsection{The \AmS{} \& \SmF{} classes}
+% \changes{v3.1}{2007/07/29}{\AmS\ \& \SmF\ classes support added (kernel)}
+%
+% \begin{macrocode}
+\@ifundefined{@captionheadfont}{}{%
+% \end{macrocode}
+% \begin{macrocode}
+ \caption@CheckCommand\@makecaption{%
+ % amsart|amsproc|amsbook [2004/08/06 v2.20]
+ \long\def\@makecaption#1#2{%
+ \setbox\@tempboxa\vbox{\color@setgroup
+ \advance\hsize-2\captionindent\noindent
+ \@captionfont\@captionheadfont#1\@xp\@ifnotempty\@xp
+ {\@cdr#2\@nil}{.\@captionfont\upshape\enspace#2}%
+ \unskip\kern-2\captionindent\par
+ \global\setbox\@ne\lastbox\color@endgroup}%
+ \ifhbox\@ne % the normal case
+ \setbox\@ne\hbox{\unhbox\@ne\unskip\unskip\unpenalty\unkern}%
+ \fi
+ \ifdim\wd\@tempboxa=\z@ % this means caption will fit on one line
+ \setbox\@ne\hbox to\columnwidth{\hss\kern-2\captionindent\box\@ne\hss}%
+ \else % tempboxa contained more than one line
+ \setbox\@ne\vbox{\unvbox\@tempboxa\parskip\z@skip
+ \noindent\unhbox\@ne\advance\hsize-2\captionindent\par}%
+ \fi
+ \ifnum\@tempcnta<64 % if the float IS a figure...
+ \addvspace\abovecaptionskip
+ \hbox to\hsize{\kern\captionindent\box\@ne\hss}%
+ \else % if the float IS NOT a figure...
+ \hbox to\hsize{\kern\captionindent\box\@ne\hss}%
+ \nobreak
+ \vskip\belowcaptionskip
+ \fi
+ \relax
+ }}
+% \end{macrocode}
+% \begin{macrocode}
+ \caption@CheckCommand\@makecaption{%
+ % smfart|smfbook [1999/11/15 v1.2f Classe LaTeX pour les articles publies par la SMF]
+ \long\def\@makecaption#1#2{%
+ \ifdim\captionindent>.1\hsize \captionindent.1\hsize \fi
+ \setbox\@tempboxa\vbox{\color@setgroup
+ \advance\hsize-2\captionindent\noindent
+ \@captionfont\@captionheadfont#1\@xp\@ifnotempty\@xp
+ {\@cdr#2\@nil}{\@addpunct{.}\@captionfont\upshape\enspace#2}%
+ \unskip\kern-2\captionindent\par
+ \global\setbox\@ne\lastbox\color@endgroup}%
+ \ifhbox\@ne % the normal case
+ \setbox\@ne\hbox{\unhbox\@ne\unskip\unskip\unpenalty\unkern}%
+ \fi
+ \ifdim\wd\@tempboxa=\z@ % this means caption will fit on one line
+ \setbox\@ne\hbox to\columnwidth{\hss\kern-2\captionindent\box\@ne\hss}%
+ \@tempdima\wd\@ne\advance\@tempdima-\captionindent
+ \wd\@ne\@tempdima
+ \else % tempboxa contained more than one line
+ \setbox\@ne\vbox{\rightskip=0pt plus\captionindent\relax
+ \unvbox\@tempboxa\parskip\z@skip
+ \noindent\unhbox\@ne\advance\hsize-2\captionindent\par}%
+ \fi
+ \ifnum\@tempcnta<64 % if the float IS a figure...
+ \addvspace\abovecaptionskip
+ \noindent\kern\captionindent\box\@ne
+ \else % if the float IS NOT a figure...
+ \noindent\kern\captionindent\box\@ne
+ \nobreak
+ \vskip\belowcaptionskip
+ \fi
+ \relax
+ }}
+% \end{macrocode}
+% \begin{macrocode}
+ \let\captionmargin\captionindent
+ \begingroup\edef\@tempa{\endgroup
+ \noexpand\caption@g@addto@list\noexpand\caption@sty@default
+ {margin=\the\captionmargin
+ \@ifundefined{smf@makecaption}{}{,maxmargin=.1\linewidth}}}
+ \@tempa
+ \caption@g@addto@list\caption@sls@default{margin*=.5\captionmargin}
+ \DeclareCaptionLabelSeparator{default}{.\enspace}
+ \DeclareDefaultCaptionFont{font}{\@captionfont}
+ \DeclareDefaultCaptionFont{labelfont}{\@captionheadfont}
+ \DeclareDefaultCaptionFont{textfont}{\@captionfont\upshape}
+ \captionsetup*[figure]{position=b}
+ \captionsetup*[table]{position=t}
+% \end{macrocode}
+% \begin{macrocode}
+}
+% \end{macrocode}
+%
+% \subsubsection{The beamer class}
+% \changes{v3.1}{2007/03/10}{beamer class support added (kernel)}
+%
+% \begin{macrocode}
+\@ifclassloaded{beamer}{%
+% \end{macrocode}
+% \begin{macrocode}
+ \caption@CheckCommand\beamer@makecaption{%
+ % beamerbaselocalstructure.sty,v 1.53 2007/01/28 20:48:21 tantau
+ \long\def\beamer@makecaption#1#2{%
+ \def\insertcaptionname{\csname#1name\endcsname}%
+ \def\insertcaptionnumber{\csname the#1\endcsname}%
+ \def\insertcaption{#2}%
+ \nobreak\vskip\abovecaptionskip\nobreak
+ \sbox\@tempboxa{\usebeamertemplate**{caption}}%
+ \ifdim \wd\@tempboxa >\hsize
+ \usebeamertemplate**{caption}\par
+ \else
+ \global \@minipagefalse
+ \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
+ \fi
+ \nobreak\vskip\belowcaptionskip\nobreak}}
+% \end{macrocode}
+% \begin{macrocode}
+ \DeclareCaptionLabelFormat{default}{#1}
+ \DeclareDefaultCaptionJustification{\raggedright}
+ \DeclareDefaultCaptionFont{font}{%
+ \usebeamerfont*{caption}%
+ \usebeamercolor[fg]{caption}}
+ \DeclareDefaultCaptionFont{labelfont}{%
+ \usebeamercolor[fg]{caption name}%
+ \usebeamerfont*{caption name}}
+% \end{macrocode}
+% If the \package{beamer} document class is used, we offer a beamer
+% template called `caption3' which can be used with option `beamer' or
+% |\setbeamertemplate{caption}[caption3]|.\par
+% (Note that this is of no use when \thispackage\ is used, too.)
+% \begin{macrocode}
+ \defbeamertemplate{caption}{caption3}{%
+ \caption@make\insertcaptionname\insertcaptionnumber\insertcaption}
+% \end{macrocode}
+% \begin{macrocode}
+ \DeclareOption{beamer}{%
+ % \usebeamertemplate**{caption} will set font
+ \DeclareDefaultCaptionFont{font}{}%
+ \setbeamertemplate{caption}[caption3]}
+% \end{macrocode}
+% \begin{macrocode}
+}{}
+% \end{macrocode}
+%
+% \subsubsection{The \KOMAScript{} classes}
+% \changes{v3.1}{2007/03/31}{\KOMAScript\ classes support added (kernel)}
+%
+% \begin{macrocode}
+\@ifundefined{scr@caption}{}{%
+% \end{macrocode}
+% \begin{macrocode}
+ \caption@CheckCommand\@makecaption{%
+ % scrartcl|scrreprt|scrbook [2007/03/07 v2.97a KOMA-Script document class]
+ \long\def\@makecaption#1#2{%
+ \if@captionabove
+ \vskip\belowcaptionskip
+ \else
+ \vskip\abovecaptionskip
+ \fi
+ \@@makecaption\@firstofone{#1}{#2}%
+ \if@captionabove
+ \vskip\abovecaptionskip
+ \else
+ \vskip\belowcaptionskip
+ \fi}}
+% \end{macrocode}
+% \begin{macrocode}
+ \DeclareCaptionFormat{default}{%
+ \ifdofullc@p
+ \caption@fmt@hang{#1}{#2}{#3}%
+ \else
+ #1#2%
+ \ifdim\cap@indent<\z@
+ \par
+ \noindent\hspace*{-\cap@indent}%
+ \else\if@capbreak
+ \par
+ \fi\fi
+ #3\par
+ \fi}
+ \DeclareCaptionLabelSeparator{default}{\captionformat}
+ \DeclareDefaultCaptionFont{font}{\scr@fnt@caption}
+ \DeclareDefaultCaptionFont{labelfont}{\scr@fnt@captionlabel}
+% \end{macrocode}
+% \begin{macrocode}
+}
+% \end{macrocode}
+%
+% \subsubsection{The \NTG{} Dutch classes}
+% \changes{v3.1}{2007/04/06}{NTG classes support added (kernel)}
+%
+% \begin{macrocode}
+\@ifundefined{CaptionFonts}{}{%
+% \end{macrocode}
+% \begin{macrocode}
+ \caption@CheckCommand\@makecaption{%
+ % artikel|rapport|boek [2004/06/07 v2.1a NTG LaTeX document class]
+ \long\def\@makecaption#1#2{%
+ \vskip\abovecaptionskip
+ \sbox\@tempboxa{{\CaptionLabelFont#1:} \CaptionTextFont#2}%
+ \ifdim \wd\@tempboxa >\hsize
+ {\CaptionLabelFont#1:} \CaptionTextFont#2\par
+ \else
+ \global \@minipagefalse
+ \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
+ \fi
+ \vskip\belowcaptionskip}}
+% \end{macrocode}
+% \begin{macrocode}
+ \DeclareDefaultCaptionFont{labelfont}{\CaptionLabelFont}
+ \DeclareDefaultCaptionFont{textfont}{\CaptionTextFont}
+% \end{macrocode}
+% \begin{macrocode}
+}
+% \end{macrocode}
+%
+% \subsubsection{The frenchb Babel option}
+% \changes{v3.1}{2006/05/14}{\package{frenchb} package support added (kernel)}
+%
+% \begin{macrocode}
+\@ifundefined{FB@makecaption}{}{%
+% \end{macrocode}
+% \begin{macrocode}
+ \caption@CheckCommand\@makecaption{%
+ % frenchb.ldf [2005/02/06 v1.6g French support from the babel system]
+ \long\def\@makecaption#1#2{%
+ \vskip\abovecaptionskip
+ \sbox\@tempboxa{#1\CaptionSeparator #2}%
+ \ifdim \wd\@tempboxa >\hsize
+ #1\CaptionSeparator #2\par
+ \else
+ \global \@minipagefalse
+ \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
+ \fi
+ \vskip\belowcaptionskip}}
+% \end{macrocode}
+% \begin{macrocode}
+ \ifx\@makecaption\STD@makecaption
+ \DeclareCaptionLabelSeparator{default}{\CaptionSeparator}
+ \def\caption@frenchb{% supress frenchb warning
+ \let\STD@makecaption\@makecaption
+ \let\FB@makecaption\@makecaption}
+ \else
+ \ifx\@makecaption\@undefined\else
+ \PackageInfo{caption}{%
+ The definition of \protect\@makecaption\space
+ has been changed,\MessageBreak
+ frenchb will NOT customize it}%
+ \fi
+ \fi
+% \end{macrocode}
+% \begin{macrocode}
+}
+% \end{macrocode}
+%
+% \subsubsection{The frenchle/pro package}
+% \changes{v3.1}{2006/05/14}{\package{frenchle/pro} package support added (kernel)}
+%
+% \begin{macrocode}
+\@ifundefined{frenchTeXmods}{}{%
+% \end{macrocode}
+% \begin{macrocode}
+ \caption@CheckCommand\@makecaption{%
+ % french(le).sty [2006/10/03 The french(le) package /V5,9991/]
+ % french(le).sty [2007/06/28 The french(le) package /V5,9994/]
+ \def\@makecaption#1#2{%
+ \ifFTY%
+ \def\@secondofmany##1##2\void{##2}%
+ \def\@tempa{\@secondofmany#2\void}%
+ \ifx\@tempa\empty%
+ \let\captionseparator\empty%
+ \fi%
+ \@mcORI{#1}{\relax\captionfont{#2}}%
+ \else
+ \@mcORI{#1}{#2}%
+ \fi}}
+% \end{macrocode}
+% \begin{macrocode}
+ \caption@CheckCommand\@makecaption{%
+ % french(le).sty [2007/02/11 The french(le) package /V5,9993/]
+ \def\@makecaption#1#2{%
+ \ifFTY%
+ \def\@secondofmany##1##2\void{##2}%
+ \protected@edef\@tempa{\@secondofmany#2\void}%
+ \ifx\@tempa\empty%
+ \let\captionseparator\empty%
+ \fi%
+ \@mcORI{#1}{\relax\captionfont{#2}}%
+ \else
+ \@mcORI{#1}{#2}%
+ \fi}}
+% \end{macrocode}
+% \begin{macrocode}
+ \DeclareDefaultCaptionFont{textfont}{\itshape}%
+ \DeclareCaptionLabelSeparator{default}{\captionseparator\space}%
+% \end{macrocode}
+% \begin{macrocode}
+}
+% \end{macrocode}
+%
+% \subsection{Execution of options}
+%
+% \begin{macrocode}
+\captionsetup{style=default,position=default,listof=1,listofformat=default,%
twoside=\if@twoside 1\else 0\fi}
% \end{macrocode}
+% \begin{macrocode}
+\ProcessOptions*
+% \end{macrocode}
+%
+% \changes{v3.1}{2007/04/10}{Check of document class added}
+% \begin{macrocode}
+\caption@IfCheckCommand{%
+ \caption@setbool{documentclass}{1}%
+}{%
+ \caption@setbool{documentclass}{0}%
+ \PackageInfo{caption}{%
+ Unknown document class (or package),\MessageBreak
+ standard defaults will be used}%
+ \caption@Debug{\string\@makecaption\space=\space\meaning\@makecaption\@gobble}%
+}
+% \end{macrocode}
+%
+% \subsection{Typesetting the caption}
+%
+% \begin{macro}{\caption@addcontentsline}
+% \changes{v3.1}{2007/07/01}{This macro added}
+% |\caption@addcontentsline|\marg{type}\marg{list entry}\par
+% Makes an entry in the list-of-whatever, if requested,
+% i.e.~the argument \meta{list entry} is not empty and
+% |listof=| was set to |true|.
+% \begin{macrocode}
+\newcommand*\caption@addcontentsline[2]{%
+ \caption@iflof%
+ {\def\@tempa{#2}}%
+ {\let\@tempa\@empty}%
+ \ifx\@tempa\@empty \else
+ {\let\\\space
+ \addcontentsline{\csname ext@#1\endcsname}{#1}%
+ {\protect\numberline
+ {\caption@lstfmt{\@nameuse{p@#1}}{\@nameuse{the#1}}}%
+ {\ignorespaces #2}}}%
+ \fi}
+% \end{macrocode}
+% \end{macro}
%
% \begin{macro}{\ifcaption@star}
% If the starred form of |\caption| is used, this will be set to |true|.
@@ -3208,96 +2325,117 @@
% \end{macrocode}
% \end{macro}
%
-% \subsubsection*{Typesetting the caption}
+% \begin{macro}{\caption@fnum}
+% \changes{v3.1}{2007/08/21}{This macro added}
+% |\caption@fnum|\marg{float type}\par
+% Typesets the caption label; as replacement for |\fnum@|\meta{float type}.
+% \begin{macrocode}
+\newcommand*\caption@fnum[1]{%
+ \caption@lfmt{\@nameuse{#1name}}{\@nameuse{the#1}}{\theContinuedFloat}}
+% \end{macrocode}
+% \end{macro}
%
% \begin{macro}{\caption@make}
-% |\caption@make|\marg{float name}\marg{ref.\ number}\marg{text}
+% |\caption@make|\marg{float name}\marg{ref.\ number}\marg{text}\par
+% Typesets the caption.
% \begin{macrocode}
\newcommand\caption@make[2]{%
- \caption@@make{\caption@lfmt{#1}{#2}}}
+ \caption@@make{\caption@lfmt{#1}{#2}{\theContinuedFloat}}}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\caption@@make}
% \changes{v3.0b}{2004/05/16}{Bugfix 04-05-05: \cs{ifdim}\cs{captionindent=}\cs{z@} added}
-% \changes{v3.0d}{2005/02/12}{Bugfix 04-10-26: Use \cs{@tempdima} instead of \cs{captionmargin} resp. \cs{captionwidth};
-% check for \cs{z@} added}
-% \changes{v3.0d}{2005/02/12}{Bugfix: \cs{hskip}\cs{captionmargin} to the end of caption added}
+% \changes{v3.0d}{2005/02/12}{Bugfix 04-10-26: Use \cs{@tempdima} instead of
+% \cs{captionmargin} resp. \cs{captionwidth}; check for \cs{z@} added}
+% \changes{v3.0d}{2005/02/12}{Bugfix: \cs{hskip}\cs{captionmargin} to the end
+% of caption added}
% \changes{v3.0d}{2005/02/12}{Bugfix: \cs{strut} moved from here to \cs{caption@@@make}}
% \changes{v3.0d}{2005/02/12}{Single-line-check moved up so it can affect margins now}
% \changes{v3.0d}{2005/02/09}{Improvement: \cs{caption@ifh} added}
% \changes{v3.0d}{2005/02/09}{Bugfix: \cs{leavevmode} added}
% \changes{v3.0h}{2005/08/24}{Uses \cs{sbox} instead of \cs{setbox} in single-line-check}
% \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.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}
% \changes{v3.0p}{2007/04/03}{Usage of \cs{caption@ifoddpage} added}
+% \changes{v3.1}{2007/07/29}{\cs{caption@calcmargin} moved below single-line-check}
% |\caption@@make|\marg{caption label}\marg{caption text}
% \begin{macrocode}
\newcommand\caption@@make[2]{%
\begingroup
\caption@beginhook
- \caption@calcmargin
% \end{macrocode}
%
-% Special single-line treatment (option |singlelinecheck=|)
+% Check margin, if |\caption@minmargin| or |\caption@maxmargin| is set
+% \begin{macrocode}
+ \ifx\caption@maxmargin\@undefined \else
+ \ifdim\captionmargin>\caption@maxmargin\relax
+ \captionmargin\caption@maxmargin\relax
+ \fi
+ \fi
+ \ifx\caption@minmargin\@undefined \else
+ \ifdim\captionmargin<\caption@minmargin\relax
+ \captionmargin\caption@minmargin\relax
+ \fi
+ \fi
+% \end{macrocode}
%
+% Special single-line treatment (option |singlelinecheck=|)
% \begin{macrocode}
- \caption@ifslc{\ifx\caption@sls\@empty\else
- \caption@slc{#1}{#2}\captionwidth\relax
- \fi}{}%
+ \caption@ifslc{\caption@ifempty@list\caption@opt@SingleLine{}{%
+ \caption@slc{#1}{#2}\captionwidth\relax}}{}%
% \end{macrocode}
%
% Typeset the left margin (option |margin=|)
-%
% \begin{macrocode}
+ \caption@calcmargin
\@tempdima\captionmargin
- \ifdim\captionmargin@=\z@\else
+ \ifdim\captionmargin@=\z@ \else
\caption@ifoddpage{}{\advance\@tempdima\captionmargin@}%
\fi
- \caption@ifh{\advance\@tempdima\captionindent}%
- \hskip\@tempdima
+ \caption@ifh{\advance\@tempdima\caption@indent}%
+ \hspace\@tempdima
% \end{macrocode}
%
-% We actually use a |\vbox| of width |\captionwidth - \captionindent|
-% to typeset the caption
-% (Note: |\captionindent| is \emph{not} supported if the caption format
-% was defined with |\DeclareCaptionFormat*|.)
-%
+% We actually use a |\vbox| of width |\captionwidth - \caption@indent|
+% to typeset the caption.
+% \Note{\cs{captionindent} is \emph{not} supported if the caption format
+% was defined with \cs{DeclareCaptionFormat*}.}
% \begin{macrocode}
\@tempdima\captionwidth
- \caption@ifh{\advance\@tempdima by -\captionindent}%
+ \caption@ifh{\advance\@tempdima-\caption@indent}%
\captionbox\@tempdima{%
% \end{macrocode}
%
% Typeset the indention (option |indention=|)\\
-% Bugfix 04-05-05: |\hskip-\captionindent| replaced by |\ifdim\captionindent=\z@|\ldots
-%
+% {\small Bugfix 04-05-05:
+% |\hskip-\caption@indent| replaced by |\ifdim\caption@indent=\z@|\ldots}
% \begin{macrocode}
\caption@ifh{%
- \ifdim\captionindent=\z@
+ \ifdim\caption@indent=\z@
\leavevmode
\else
- \hskip-\captionindent
+ \hskip-\caption@indent
\fi}%
% \end{macrocode}
%
% Typeset the caption itself and close the |\captionbox|
-%
% \begin{macrocode}
\caption@@@make{#1}{#2}}%
% \end{macrocode}
%
% Typeset the right margin (option |margin=|)
-%
% \begin{macrocode}
\@tempdima\captionmargin
- \ifdim\captionmargin@=\z@\else
+ \ifdim\captionmargin@=\z@ \else
\caption@ifoddpage{\advance\@tempdima\captionmargin@}{}%
\fi
- \hskip\@tempdima
+ \hspace\@tempdima
% \end{macrocode}
%
% \begin{macrocode}
@@ -3311,31 +2449,22 @@
% \end{macro}
%
% \begin{macro}{\caption@calcmargin}
+% \changes{v3.0h}{2005/10/24}{Internal: \cs{ifcaption@width} replaced by
+% \cs{ifdim}\cs{captionwidth=}\cs{z@}}
+% \changes{v3.0i}{2006/01/12}{Improvement: Takes care of list environment now}
+% \changes{v3.1}{2006/05/13}{Check of \cs{@listdepth} removed (not necessary anymore),
+% use \cs{linewidth} instead of \cs{hsize}}
+% |\caption@calcmargin|\par
% Calculate |\captionmargin| \& |\captionwidth|, so both contain valid
% values.
-% \changes{v3.0h}{2005/10/24}{Internal: \cs{ifcaption@width} replaced by \cs{ifdim}\cs{captionwidth=}\cs{z@}}
-% \changes{v3.0i}{2006/01/12}{Improvement: Takes care of list environment now}
-% \begin{macrocode}
-\newcommand\caption@calcmargin{%
-% \end{macrocode}
-% \emph{Note:} Inside a |list| environment |\linewidth| do not contain
-% the proper value, because |\@caption| calls |\@parboxrestore| which
-% resets |\linewidth| to |\hsize|. Therefore we have to calculate the
-% proper line width on our own in this case.
-% \begin{macrocode}
- \@tempdima\hsize
- \ifnum\@listdepth>0\relax
- \advance\@tempdima by -\leftmargin
- \advance\@tempdima by -\rightmargin
- \fi
-% \end{macrocode}
% \begin{macrocode}
+\newcommand*\caption@calcmargin{%
\ifdim\captionwidth=\z@
- \captionwidth\@tempdima
+ \captionwidth\linewidth
\advance\captionwidth by -2\captionmargin
\advance\captionwidth by -\captionmargin@
\else
- \captionmargin\@tempdima
+ \captionmargin\linewidth
\advance\captionmargin by -\captionwidth
\divide\captionmargin by 2
\captionmargin@\z@
@@ -3343,10 +2472,13 @@
% \end{macrocode}
% \begin{macrocode}
\caption@Debug{%
- \protect\hsize=\the\hsize,
- \protect\margin=\the\captionmargin,
- \protect\marginx=\the\captionmargin@,
- \protect\width=\the\captionwidth}%
+ \string\hsize=\the\hsize,
+ \string\linewidth=\the\linewidth,\MessageBreak
+ \string\leftmargin=\the\leftmargin,
+ \string\rightmargin=\the\rightmargin,\MessageBreak
+ \string\margin=\the\captionmargin,
+ \string\margin@=\the\captionmargin@,
+ \string\width=\the\captionwidth}%
% \end{macrocode}
% \begin{macrocode}
}
@@ -3354,63 +2486,74 @@
% \end{macro}
%
% \begin{macro}{\caption@slc}
+% \changes{v3.1}{2007/06/13}{\cs{let}\cs{caption@hj}\cs{relax} added}
+% \changes{v3.1}{2007/07/29}{\cs{caption@setup}\cs{caption@sls} added after \cs{begingroup}}
+% \changes{v3.1}{2007/07/29}{\cs{caption@calcmargin} added}
+% |\caption@slc|\marg{label}\marg{text}\marg{width}\marg{extra code}\par
% This one does the single-line-check.
% \begin{macrocode}
\newcommand\caption@slc[4]{%
- \caption@startslc
+ \caption@Debug{Begin SLC}%
+ \begingroup
+ \expandafter\caption@setup\expandafter{\caption@opt@SingleLine}%
+ \let\caption@hj\@empty
+ \caption@calcmargin % calculate #3 if necessary
+ \caption@prepareslc
\sbox\@tempboxa{\caption@@@make{#1}{#2}}%
- \ifdim\wd\@tempboxa >#3%
- \caption@endslc
+ \ifdim\wd\@tempboxa>#3%
+ \endgroup
\else
- \caption@endslc
- \caption@esetup\caption@sls
+ \endgroup
+ \expandafter\caption@setup\expandafter{\caption@opt@SingleLine}%
#4%
- \fi}
+ \fi
+ \caption@Debug{End SLC}}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\caption@startslc}
+% \begin{macro}{\caption@prepareslc}
% \changes{v3.0b}{2004/05/16}{Bugfix: Redefinition of \cs{label} \& \cs{@footnotetext} added}
% \changes{v3.0b}{2004/05/16}{Redefine \cs{stepcounter} instead of \cs{footnote(mark)}}
% \changes{v3.0d}{2005/02/12}{\cs{let}\cs{caption@hj}\cs{relax} added}
% \changes{v3.0h}{2005/07/09}{Support of \package{endnotes} package added}
+% \changes{v3.1}{2007/06/13}{\cs{let}\cs{caption@hj}\cs{relax} moved to \cs{caption@slc}}
+% \changes{v3.1}{2007/06/13}{Redefinition of \cs{(H@)refstepcounter} added}
+% \changes{v3.1}{2007/08/12}{Redefinition of \cs{label} improved}
+% |\caption@prepareslc|\par
% Re-define anything which would disturb the single-line-check.
% \begin{macrocode}
-\newcommand\caption@startslc{%
- \begingroup
- \let\label\@gobble
+\newcommand*\caption@prepareslc{%
\let\@footnotetext\@gobble\let\@endnotetext\@gobble
+ \def\label{\caption@withoptargs\@gobbletwo}%
\def\stepcounter##1{\advance\csname c@##1\endcsname\@ne\relax}%
- \let\caption@hj\relax}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\caption@endslc}
-% This ends the single-line-check.
-% \begin{macrocode}
-\newcommand\caption@endslc{%
- \endgroup}
+ \let\refstepcounter\stepcounter\let\H@refstepcounter\stepcounter}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\captionbox}
-% \changes{v3.0k}{2006/05/13}{We define \cs{captionbox} instead of \cs{caption@start/endbox}}
-% \changes{v3.0n}{2006/03/09}{Bugfix 07-03-09: \cs{captionbox} changed from \cs{parbox-t} to \cs{parbox-b}}
+% \changes{v3.0k}{2006/05/13}{We define \cs{captionbox} instead of
+% \cs{caption@start/endbox}}
+% \changes{v3.0n}{2006/03/09}{Bugfix 07-03-09: \cs{captionbox} changed from
+% \cs{parbox-t} to \cs{parbox-b}}
+% |\captionbox|\marg{width}\marg{contents}\par
% This macro defines the box which surrounds the caption paragraph.
% \begin{macrocode}
-\newcommand\captionbox{\parbox[b]}
+\newcommand*\captionbox{\parbox[b]}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\caption@@@make}
% \changes{v3.0b}{2004/05/16}{Bugfix 04-05-06: \cs{allowhyphens} added}
-% \changes{v3.0d}{2005/02/12}{Bugfix 04-12-16: Use some kind of \cs{@startstrut}\cs{strutbox} instead of \cs{strut}}
+% \changes{v3.0d}{2005/02/12}{Bugfix 04-12-16: Use some kind of
+% \cs{@startstrut}\cs{strutbox} instead of \cs{strut}}
% \changes{v3.0d}{2005/02/12}{Bugfix 05-01-23: \cs{@finalstrut}\cs{strutbox} added}
-% \changes{v3.0e}{2005/05/05}{Use \cs{caption@ifempty}; \cs{let}\cs{caption@ifstrut}\cs{@secondoftwo} added}
+% \changes{v3.0e}{2005/05/05}{Use \cs{caption@ifempty};
+% \cs{let}\cs{caption@ifstrut}\cs{@secondoftwo} added}
% \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}
+% \changes{v3.1}{2007/05/07}{Bugfix: \cs{ifhmode} added to \cs{@finalstrut}}
% |\caption@@@make|\marg{caption label}\marg{caption text}\par
% This one finally typesets the caption paragraph, without margin and indention.
% \begin{macrocode}
@@ -3418,52 +2561,53 @@
% \end{macrocode}
%
% If the label is empty, we use no caption label separator.
-%
% \begin{macrocode}
\sbox\@tempboxa{#1}%
\ifdim\wd\@tempboxa=\z@
\let\caption@lsep\relax
+% \@capbreakfalse
\fi
% \end{macrocode}
%
% If the text is empty, we use no caption label separator, too.
-%
% \begin{macrocode}
\caption@ifempty{#2}{%
\let\caption@lsep\relax
+% \@capbreakfalse
% \let\caption@ifstrut\@secondoftwo
}%
% \end{macrocode}
%
-% Take care that |\captionparindent| and |\captionhangindent| will be used
+% Take care that |\caption@parindent| and |\caption@hangindent| will be used
% to typeset the paragraph.
-%
% \begin{macrocode}
\@setpar{\@@par\caption@@par}\caption@@par
% \end{macrocode}
%
-% Finally the caption will be typeset.
-%
+% Finally typeset the caption.
% \begin{macrocode}
\caption@hj\captionsize\captionfont\caption@fmt
{\ifcaption@star\else{\captionlabelfont#1}\fi}%
{\ifcaption@star\else{\caption@iflf\captionlabelfont\caption@lsep}\fi}%
{{\captiontextfont
\caption@ifstrut{\vrule\@height\ht\strutbox\@width\z@}{}%
- \nobreak\hskip\z@skip
+ \nobreak\hskip\z@skip % enable hyphenation
\caption@tfmt{#2}%
% \caption@ifstrut{\vrule\@height\z@\@depth\dp\strutbox\@width\z@}{}%
- \caption@ifstrut{\@finalstrut\strutbox}{}%
+ \caption@ifstrut{\ifhmode\@finalstrut\strutbox\fi}{}%
\par}}}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\caption@ifempty}
% \changes{v3.0e}{2005/05/05}{This macro added}
-% |\caption@ifempty|\marg{text}\marg{if-clause}\par
-% This one tests if the \meta{text} is actually empty.\par
-% \emph{Note:} This will be done without expanding the text, therefore this
-% is far away from being bullet-proof.
+% \changes{v3.1}{2007/07/04}{Re-defines itself now}
+% |\caption@ifempty|\marg{text}\marg{true} (\emph{no} \meta{false})\par
+% This one tests if the \meta{text} is actually empty.
+% \Note{This will be done without expanding the text,
+% therefore this is far away from being bullet-proof.}
+% \Note{This macro is re-defining itself so only
+% the first test (in a group) will actually be done.}
% \begin{macrocode}
\newcommand\caption@ifempty[1]{%
\def\caption@tempa{#1}%
@@ -3472,10 +2616,11 @@
\let\caption@tempa\@empty
\fi
\ifx\caption@tempa\@empty
- \expandafter\@firstofone
+ \let\caption@ifempty\@secondoftwo
\else
- \expandafter\@gobble
- \fi}
+ \let\caption@ifempty\@gobbletwo
+ \fi
+ \caption@ifempty\@unused}
% \end{macrocode}
% \end{macro}
%
@@ -3485,26 +2630,135 @@
% This command will be executed with every |\par| inside the caption.
% \begin{macrocode}
\newcommand*\caption@@par{%
- \parindent\captionparindent\hangindent\captionhangindent}%
+ \parindent\caption@parindent\hangindent\caption@hangindent}%
% \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}
+% \iffalse\subsection{\cs{DeclareFloatingEnvironment}}\fi
+% \subsection{Bonus features}
+% \changes{v3.1}{2007/08/12}{\cs{DeclareFloatingEnvironment} added}
+%
+% \begin{macro}{\DeclareFloatingEnvironment}
+% |\DeclareFloatingEnvironment|\marg{environment name}
+% \begin{macrocode}
+\providecommand*\DeclareFloatingEnvironment[1]{%
+ \@ifundefined{c@chapter}%
+ {\newcounter{#1}%
+ \@namedef{the#1}{\arabic{#1}}%
+ \@namedef{theH#1}{\arabic{#1}}}%
+ {\newcounter{#1}[chapter]%
+ \@namedef{the#1}{\ifnum\c@chapter>\z@ \thechapter.\fi \arabic{#1}}%
+ \@namedef{theH#1}{\theHchapter.\arabic{#1}}}%
+ \@namedef{fps@#1}{tbp}%
+ \@ifundefined{c@float@type}{%
+ \newcounter{float@type}%
+ \setcounter{float@type}{\@ifundefined{c@figure}14}}{}%
+ \expandafter\xdef\csname ftype@#1\endcsname{\the\value{float@type}}%
+ \addtocounter{float@type}{\value{float@type}}%
+ \@namedef{ext@#1}{lo#1}%
+ \@namedef{fnum@#1}{\@nameuse{#1name}\nobreakspace\@nameuse{the#1}}%
+ \newenvironment{#1}{\@float{#1}}{\end@float}%
+ \newenvironment{#1*}{\@dblfloat{#1}}{\end@dblfloat}%
+ \expandafter\newcommand\csname listof#1s\endcsname{\begingroup
+ \expandafter\let\expandafter\listfigurename\csname list#1name\endcsname
+ \expandafter\let\expandafter\ext@figure\csname ext@#1\endcsname
+ \let\caption@ORI@starttoc\@starttoc
+ \renewcommand*\@starttoc[1]{%
+ \expandafter\caption@ORI@starttoc\expandafter{\ext@figure}}%
+ \listoffigures
+ \endgroup}%
+ \@ifundefined{l@figure}%
+ {\@namedef{l@#1}{\@dottedtocline{1}{1.5em}{2.3em}}}%
+ {\expandafter\let\csname l@#1\endcsname\l@figure}%
+ \expandafter\newcommand\csname #1name\endcsname{}%
+ \edef\@tempa{%
+ \def\noexpand\@tempa{\expandafter\noexpand\@car#1\@nil}}%
+ \uppercase\expandafter{\@tempa}%
+ \edef\@tempb{%
+ \noexpand\g@addto@macro\noexpand\@tempa{\expandafter\@cdr#1\@nil}}%
+ \@tempb
+ \expandafter\let\csname #1name\endcsname\@tempa
+ \expandafter\newcommand\csname list#1name\endcsname{}%
+ \expandafter\xdef\csname list#1name\endcsname{List of \@tempa s}%
+ \@cons\caption@floatlist{{#1}}}
+\@onlypreamble\DeclareFloatingEnvironment
+% \end{macrocode}
+% \begin{macrocode}
+\newcommand*\caption@floatlist{}
+% \end{macrocode}
+% \end{macro}
%
-% 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 |;-)|
+% \subsection{subfig package adaptions}
+% \changes{v3.0k}{2007/01/07}{Very small bugfix of \package{subfig} package added}
+% \changes{v3.0l}{2007/01/31}{Bugfix of subfig package moved from package (kernel)}
+% \changes{v3.1}{2007/07/07}{Several adaptions to the \package{subfig} package added}
%
+% Unfortunately the author of the \package{subfig} package does not seem to
+% maintain his package anymore, so we have to make several adaptions here.
% \begin{macrocode}
-\AtBeginDocument{%
+\caption@AtBeginDocument{%
\def\@tempa{\@ifstar\sf@@subref\sf@subref}%
\ifx\subref\@tempa
- \PackageInfo{caption3}{subref 1.2 or 1.3 detected}%
+ \PackageInfo{caption3}{subfig package 1.2 or 1.3 is loaded\@gobble}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \let\caption@setfloattype\@gobble
+% \end{macrocode}
+% \begin{macrocode}
+% \let\sf@ifinlist\caption@ifinlist
+ \let\sf@ifpositiontop\caption@iftop
+% \end{macrocode}
+% \begin{macrocode}
+ \def\@dottedxxxline#1#2#3#4#5#6#7{%
+ \begingroup
+ \caption@setfloattype{#1}%
+ \caption@setoptions{subfloat}%
+ \caption@setoptions{sub#1}%
+ \ifnum #3>\@nameuse{c@#2depth}\else
+ \@dottedtocline{\z@}{#4}{#5}{#6}{#7}%
+ \fi
+ \endgroup}%
+% \end{macrocode}
+% \begin{macrocode}
+ \let\sf@subfloat\sf@NEW@subfloat
+% \end{macrocode}
+% This is a very small bugfix for \version{1.2} and \version{1.3} or the
+% \package{subfig} package, making \cs{subref} robust, so it works in
+% captions, too.
+% \begin{macrocode}
\DeclareRobustCommand*\subref{\@ifstar\sf@@subref\sf@subref}%
+% \end{macrocode}
+% \begin{macrocode}
+ \caption@removefromoptlist{subfloat}%
+ \caption@removefromoptlist{subfigure}%
+ \caption@removefromoptlist{subtable}%
+% \end{macrocode}
+% \begin{macrocode}
\fi
-}
+ \let\sf@NEW@subfloat\@undefined}
+% \end{macrocode}
+% \begin{macrocode}
+\def\sf@NEW@subfloat{%
+ \begingroup
+ \caption@setfloattype\@captype
+ \sf@ifpositiontop{%
+ \maincaptiontoptrue
+ }{%
+ \maincaptiontopfalse
+ }%
+ \caption@setoptions{subfloat}%
+ \caption@setoptions{sub\@captype}%
+ \let\sf@oldlabel=\label
+ \let\label=\subfloat@label
+ \ifmaincaptiontop\else
+ \advance\@nameuse{c@\@captype}\@ne
+ \fi
+ \refstepcounter{sub\@captype}%
+ \setcounter{sub\@captype @save}{\value{sub\@captype}}%
+ \@ifnextchar [% %] match left bracket
+ {\sf@@subfloat}%
+ {\sf@@subfloat[\@empty]}}%
% \end{macrocode}
%
% \iffalse
@@ -3515,67 +2769,360 @@
% --------------------------------------------------------------------------- %
% \fi
%
-% \subsection{Main package}
+% \clearpage
+% \section{Main package}
% \iffalse
%<*package>
% \fi
%
-% \subsubsection*{Identification}
+% \subsection{Identification}
%
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption}[2007/04/16 v3.0q Customising captions (AR)]
+\ProvidesPackage{caption}[2007/09/01 v3.1 Customising captions (AR)]
+% \end{macrocode}
+%
+% \begin{macro}{\caption@Info}
+% \Note{The \cs{@gobble} at the end of the 2nd argument of
+% \cs{PackageInfo} suppresses the line number info.
+% See TLC2\cite{TLC2}, A.4.7, p885 for details.}
+% \begin{macrocode}
+\newcommand*\caption@Info[1]{\PackageInfo{caption}{#1\@gobble}}
+\@onlypreamble\caption@Info
% \end{macrocode}
+% \end{macro}
%
-% \subsubsection*{Loading the kernel}
+% \subsection{Loading the kernel}
%
% \begin{macrocode}
-\RequirePackage{caption3}[2007/01/31] % needs v3.0l or newer
+\RequirePackage{caption3}[2007/09/01] % needs v3.1 or newer
% \end{macrocode}
%
-% \subsection*{Check against the obsolete \package{caption2} package}
-% \changes{v3.0p}{2007/04/06}{Check against obsolete \package{caption2} package added}
+% \subsection{Check against incompatible packages}
%
+% \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}%
+ \caption@Error{%
+ You can't use both, the (obsolete) caption2 *and*\MessageBreak
+ the (current) caption package}%
\endinput
}{}
% \end{macrocode}
%
-% \subsubsection*{Option for configuration files}
+% \changes{v3.1}{2007/06/15}{Check against incompatible \package{ftcap} package added}
+% \changes{v3.1}{2007/06/15}{Check against incompatible \package{nonfloat} package added}
+% \changes{v3.1}{2007/06/18}{Check against incompatible \package{topcapt} package added}
+% \begin{macrocode}
+\caption@AtBeginDocument{%
+ \@ifpackageloaded{ftcap}{%
+ \caption@IncompatiblePackage{ftcap}{}%
+ }{}%
+ \@ifpackageloaded{nonfloat}{%
+ \caption@IncompatiblePackage{nonfloat}{. %
+ Furthermore you could use \string\captionof\MessageBreak
+ instead of \noexpand\figcaption or \string\tabcaption}%
+ }{}%
+ \@ifpackageloaded{topcapt}{%
+ \caption@IncompatiblePackage{topcapt}{}%
+ }{}%
+}
+% \end{macrocode}
+%
+% \begin{macro}{\caption@Incompatible}
+% Issue an `incompatible' warning.
+% \begin{macrocode}
+\newcommand*\caption@IncompatiblePackage[2]{%
+ \PackageWarningNoLine{caption}{%
+ Usage of the #1 package together with the\MessageBreak
+ caption package is strongly *not* recommended.\MessageBreak
+ Instead of loading the #1 package you should\MessageBreak
+ use the caption package option\MessageBreak
+ \space\space`tableposition=top'\MessageBreak
+ #2}}
+% \end{macrocode}
+% \begin{macrocode}
+\@onlypreamble\caption@IncompatiblePackage
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Check document class}
+%
+% \begin{macrocode}
+\caption@ifbool{documentclass}{}{%
+ \PackageWarningNoLine{caption}{%
+ Unsupported document class (or package) detected,\MessageBreak
+ usage of the caption package is *not* recommended}%
+ \caption@Info{\string\@makecaption\space=\space\meaning\@makecaption}%
+}
+% \end{macrocode}
+%
+% \subsection{Adaption to the \AmS{} \& \SmF{} document classes}
+% \changes{v3.1}{2007/07/29}{\AmS\ \& \SmF\ document classes support added (package)}
+%
+% \begin{macrocode}
+\@ifundefined{@captionheadfont}{}{%
+ \caption@Info{AMS or SMF document class}%
+% \end{macrocode}
+% \begin{macrocode}
+ \setlength\belowcaptionskip{0pt}% set to 3pc by AMS class
+% \end{macrocode}
+% \begin{macrocode}
+}
+% \end{macrocode}
+%
+% \subsection{Emulation of the \KOMAScript{} commands}
+% \changes{v3.0a}{2004/01/18}{Minimum adaptation to \KOMAScript\ added (package)}
+% \changes{v3.0h}{2005/08/22}{\KOMAScript\ compatibility options added (package)}
+% \changes{v3.0i}{2005/11/17}{\KOMAScript\ compatibility commands added (package)}
+% \changes{v3.0l}{2007/02/18}{\KOMAScript\ compatibility revised (package)}
+% \changes{v3.1}{2007/03/17}{\KOMAScript\ compatibility options removed (package)}
+% \changes{v3.1}{2007/04/05}{\KOMAScript\ compatibility revised \& enhanced (package)}
+%
+% \begin{macrocode}
+\@ifundefined{scr@caption}{}{%
+ \caption@Info{KOMA-Script document class}%
+% \end{macrocode}
+%
+% Here we emulate the caption related commands and take over the caption
+% related settings from the \KOMAScript\ classes.
+%
+% \begin{macro}{\@tablecaptionabovetrue}
+% \begin{macro}{\@tablecaptionabovefalse}
+% \begin{macrocode}
+ \def\@tablecaptionabovetrue{\captionsetup*[table]{position=t}}
+ \def\@tablecaptionabovefalse{\captionsetup*[table]{position=b}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macrocode}
+ \if@tablecaptionabove
+ \caption@AtBeginDocument{%
+ \def\caption@tempa#1{%
+ \@ifpackageloaded{#1}{\caption@Error{%
+ You can't use the global option\MessageBreak
+ \space\space`tablecaptionabove'\MessageBreak
+ and use the #1 package, too}}{}}%
+ \caption@tempa{ftcap}%
+ \caption@tempa{nonfloat}%
+ \caption@tempa{topcapt}}%
+ \@tablecaptionabovetrue
+ \else
+ \@tablecaptionabovefalse
+ \fi
+% \end{macrocode}
+%
+% \begin{macro}{\onelinecaptionstrue}
+% \begin{macro}{\onelinecaptionsfalse}
+% \begin{macrocode}
+ \def\onelinecaptionstrue{\captionsetup{singlelinecheck=1}}
+ \def\onelinecaptionsfalse{\captionsetup{singlelinecheck=0}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macrocode}
+ \ifonelinecaptions
+ \onelinecaptionstrue
+ \else
+ \onelinecaptionsfalse
+ \fi
+% \end{macrocode}
+%
+% \begin{macro}{\@captionabovetrue}
+% \begin{macro}{\@captionabovefalse}
+% \changes{v3.0j}{2006/03/21}{Bugfix 06-03-21:
+% \cs{let}\cs{caption@setposition}\cs{@gobble} added}
+% \changes{v3.0n}{2006/03/09}{Accidentally this got broken in \version{3.0m}, fixed}
+% \changes{v3.1}{2007/03/31}{We redefine \cs{captionabovetrue/false} now
+% instead of \cs{captionabove/below}}
+% \begin{macrocode}
+ \def\@captionabovetrue{\captionsetup{position=t}}
+ \def\@captionabovefalse{\captionsetup{position=b}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\setcapindent}
+% \begin{macrocode}
+ \let\caption@KOMA@setcapindent\@setcapindent
+ \renewcommand*\@setcapindent[1]{%
+ \caption@KOMA@setcapindent{#1}\caption@setcapindent}
+% \end{macrocode}
+% \begin{macrocode}
+ \let\caption@KOMA@@setcapindent\@@setcapindent
+ \renewcommand*\@@setcapindent[1]{%
+ \caption@KOMA@@setcapindent{#1}\caption@setcapindent}
+% \end{macrocode}
+% \begin{macrocode}
+ \newcommand*\caption@setcapindent{%
+ \captionsetup{indent=\ifdim\cap@indent<\z@\z@\else\cap@indent\fi}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+ \@ifundefined{cap@indent}{}{\caption@setcapindent}
+% \end{macrocode}
%
+% \begin{macro}{\setcapwidth}
+% \Note{The optional argument of \cs{setcapwidth} if not supported (yet),
+% so we issue a warning if used.
+% (Since this does not seem to have an negative effect when used
+% by the \texttt{captionbeside} environment, we suppress the warning here.)}
+% \begin{macrocode}
+ \expandafter\let\expandafter\caption@KOMA@setcapwidth
+ \csname\string\setcapwidth\endcsname
+ \@namedef{\string\setcapwidth}[#1]#2{%
+ \caption@KOMA@setcapwidth[#1]{#2}\caption@setcapwidth{#1}}
+% \end{macrocode}
% \begin{macrocode}
-\DeclareCaptionOption{config}[caption]{%
- \InputIfFileExists{#1.cfg}{\typeout{*** Local configuration file
- #1.cfg used ***}}%
- {\PackageWarning{caption}{Configuration
- file #1.cfg not found}}}
+ \newcommand*\caption@setcapwidth[1]{%
+ \ifx\\#1\\\else
+ \@ifundefined{cap@margin}{}{%
+ \def\@tempa{captionbeside}%
+ \ifx\@tempa\@currenvir\else\PackageWarning{caption}{%
+ Ignoring optional argument [#1] of \string\setcapwidth\MessageBreak}%
+ \fi}%
+ \fi
+ \captionsetup{width=\cap@width}}
% \end{macrocode}
+% \end{macro}
%
-% \subsubsection*{Options for |figure| and |table|}
+% \begin{macrocode}
+ \def\caption@tempa{\hsize}%
+ \ifx\caption@tempa\cap@width \else
+ \caption@setcapwidth{?}
+ \fi
+% \end{macrocode}
+%
+% \begin{macro}{\setcapmargin}
+% \begin{macrocode}
+ \expandafter\let\expandafter\caption@KOMA@setcapmargin
+ \csname\string\@setcapmargin\endcsname
+ \@namedef{\string\@setcapmargin}[#1]#2{%
+ \caption@KOMA@setcapmargin[#1]{#2}\caption@setcapmargin}
+% \end{macrocode}
+% \begin{macrocode}
+ \expandafter\let\expandafter\caption@KOMA@@setcapmargin
+ \csname\string\@@setcapmargin\endcsname
+ \@namedef{\string\@@setcapmargin}[#1]#2{%
+ \caption@KOMA@@setcapmargin[#1]{#2}\caption@setcapmargin}
+% \end{macrocode}
+% \begin{macrocode}
+ \newcommand*\caption@setcapmargin{%
+ \begingroup
+ \let\onelinecaptionsfalse\relax
+ \def\@twoside{0}%
+ \def\if@twoside{\def\@twoside{1}\iffalse}%
+ \cap@margin
+ \def\@tempa{\endgroup}%
+ \ifx\cap@left\hfill\else\ifx\cap@right\hfill\else
+ \def\hspace##1##{\@firstofone}%
+ \edef\@tempa{\endgroup
+ \noexpand\captionsetup{%
+ twoside=\@twoside,singlelinecheck=0,%
+ margin={\cap@left,\cap@right}}}%
+ \fi\fi
+ \@tempa}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+ \ifx\cap@margin\relax \else
+ \caption@setcapmargin
+ \fi
+% \end{macrocode}
+%
+% \begin{macrocode}
+}
+% \end{macrocode}
+%
+% \subsection{Option for configuration files}
+%
+% \begin{macrocode}
+\DeclareCaptionOption*{config}[caption]{%
+ \InputIfFileExists{#1.cfg}%
+ {\typeout{*** Local configuration file #1.cfg used ***}}%
+ {\PackageWarning{caption}{Configuration file #1.cfg not found}}}
+% \end{macrocode}
+%
+% \subsection{Options for figure and table}
%
% \changes{v3.0a}{2004/01/09}{Options \opt{figureposition} and \opt{tableposition} added}
% \begin{macrocode}
-\DeclareCaptionOption*{figureposition}{\captionsetup[figure]{position=#1}}
-\DeclareCaptionOption*{tableposition}{\captionsetup[table]{position=#1}}
+\DeclareCaptionOption{figureposition}{%
+ \captionsetup*[figure]{position=#1}}
+\@onlypreamble@key{caption}{figureposition}
+% \end{macrocode}
+% \begin{macrocode}
+\DeclareCaptionOption{tableposition}{%
+ \caption@AtBeginDocument{%
+ \def\caption@tempa##1{%
+ \@ifpackageloaded{##1}{\caption@Error{%
+ You can't use the caption package option\MessageBreak
+ \space\space`tableposition=#1'\MessageBreak
+ and use the ##1 package, too}}{}}%
+ \caption@tempa{ftcap}%
+ \caption@tempa{nonfloat}%
+ \caption@tempa{topcapt}}%
+ \captionsetup*[table]{position=#1}}
+\@onlypreamble@key{caption}{tableposition}
% \end{macrocode}
%
% \changes{v3.0d}{2004/08/03}{Options \opt{figurename} and \opt{tablename} added}
+% \changes{v3.1}{2007/07/04}{Options \opt{figurename} and \opt{tablename} re-written}
% \begin{macrocode}
-\DeclareCaptionOption*{figurename}{\captionsetup[figure]{name=#1}}
-\DeclareCaptionOption*{tablename}{\captionsetup[table]{name=#1}}
+\DeclareCaptionOption{figurename}{\caption@SetFloatName{figure}{#1}}
+\@onlypreamble@key{caption}{figurename}
+\DeclareCaptionOption{tablename}{\caption@SetFloatName{table}{#1}}
+\@onlypreamble@key{caption}{tablename}
% \end{macrocode}
%
-% \subsubsection*{caption \version{1.x} compatibility options}
+% \begin{macro}{\caption@SetFloatName}
+% \changes{v3.1}{2007/07/04}{This macro added}
+% |\caption@SetFloatName|\marg{cmd}\marg{value}
+% \begin{macrocode}
+\newcommand*\caption@SetFloatName[2]{%
+ \begingroup
+ \def\@tempa{\endgroup\@firstofone}%
+ \@ifundefined{languagename}{}{%
+ \@ifundefined{captions\languagename}{}{%
+ \def\@tempa{\endgroup
+ \expandafter\addto\csname captions\languagename\endcsname}}}%
+ \@tempa{\@namedef{#1name}{#2}}}
+\@onlypreamble\caption@SetFloatName
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{caption v1.x compatibility options}
%
+% \changes{v3.1}{2005/07/21}{Option `compatibility' added}
% \begin{macrocode}
-\DeclareCaptionOption*{normal}[]{\caption@setformat{normal}}
-\DeclareCaptionOption*{isu}[]{\caption@setformat{hang}}
-\DeclareCaptionOption*{hang}[]{\caption@setformat{hang}}
-\DeclareCaptionOption*{center}[]{\caption@setjustification{centering}}
-\DeclareCaptionOption*{anne}[]{\caption@setjustification{centerlast}}
-\DeclareCaptionOption*{centerlast}[]{\caption@setjustification{centerlast}}
+\DeclareCaptionOption{compatibility}[1]{\caption@setbool{compatibility}{#1}}
+\@onlypreamble@key{caption}{compatibility}
+% \end{macrocode}
+%
+% \changes{v3.1}{2007/09/01}{caption v1.x compatibility options revised}
+% \begin{macrocode}
+\DeclareCaptionOption*{normal}[]{%
+ \caption@setformat{normal}%
+ \caption@setjustification{justified}}
+\DeclareCaptionOption*{isu}[]{%
+ \caption@setformat{hang}%
+ \caption@setjustification{justified}}
+\DeclareCaptionOption*{hang}[]{%
+ \caption@setformat{hang}%
+ \caption@setjustification{justified}}
+\DeclareCaptionOption*{center}[]{%
+ \caption@setformat{normal}%
+ \caption@setjustification{centering}}
+\DeclareCaptionOption*{anne}[]{%
+ \caption@setformat{normal}%
+ \caption@setjustification{centerlast}}
+\DeclareCaptionOption*{centerlast}[]{%
+ \caption@setformat{normal}%
+ \caption@setjustification{centerlast}}
% \end{macrocode}
%
% \begin{macrocode}
@@ -3608,491 +3155,1054 @@
\DeclareCaptionOption*{ruled}[]{\caption@setbool{ruled}{1}}
% \end{macrocode}
%
-% \subsubsection*{Some caption2 \version{2.x} compatibility options}
+% \subsection{caption2 v2.x compatibility options}
% \changes{v3.0h}{2005/07/08}{caption2 \version{2.x} compatibility options added}
%
+% \changes{v3.1}{2007/09/01}{caption2 v2.x compatibility options revised}
+% \begin{macrocode}
+\DeclareCaptionOption*{flushleft}[]{%
+ \caption@setformat{normal}%
+ \caption@setjustification{raggedright}}
+\DeclareCaptionOption*{flushright}[]{%
+ \caption@setformat{normal}%
+ \caption@setjustification{raggedleft}}
+% \end{macrocode}
% \begin{macrocode}
-\DeclareCaptionOption*{flushleft}[]{\caption@setjustification{raggedright}}
-\DeclareCaptionOption*{flushright}[]{\caption@setjustification{raggedleft}}
\DeclareCaptionOption*{oneline}[]{\caption@setbool{slc}{1}}
-\DeclareCaptionOption*{ignoreLTcapwidth}[]{}
% \end{macrocode}
-%
-% \subsubsection*{Some \KOMAScript\ compatibility options}
-% \changes{v3.0h}{2005/08/22}{\KOMAScript\ compatibility options added}
-%
% \begin{macrocode}
-\DeclareCaptionOption*{onelinecaption}[]{\caption@setbool{slc}{1}}
-\DeclareCaptionOption*{noonelinecaption}[]{\caption@setbool{slc}{0}}
-\DeclareCaptionOption*{tablecaptionabove}[]{\captionsetup[table]{position=t}}
-\DeclareCaptionOption*{tablecaptionbelow}[]{\captionsetup[table]{position=b}}
+\DeclareCaptionOption*{ignoreLTcapwidth}[]{%
+ \PackageWarning{caption}{Obsolete option `ignoreLTcapwidth' ignored}}
% \end{macrocode}
%
-% \subsubsection*{Generic package support}
+% \subsection{Obsolete caption v3.0 options}
+% \changes{v3.1}{2007/05/07}{Package option \opt{caption} marked as obsolete,
+% gives error now}
%
-% \begin{macro}{\caption@declarepackage}
-% |\caption@declarepackage|\marg{package name}\par
-% Each single package support can be switched on or off by using the
-% appropriate option. By default all of them are enabled.
% \begin{macrocode}
-\newcommand*\caption@declarepackage[1]{%
- \caption@setbool{pkt@#1}{1}%
- \DeclareCaptionOption*{#1}{\caption@setbool{pkt@#1}{##1}}}
-\AtEndOfPackage{\let\caption@declarepackage\@undefined}
+\DeclareCaptionOption*{caption}{%
+ \caption@setbool{temp}{#1}%
+ \caption@ifbool{temp}{}{%
+ \caption@Error{%
+ The package option `caption=#1' is obsolete.\MessageBreak
+ Please pass this option to the subfig package instead\MessageBreak
+ and do *not* load the caption package anymore}}}
% \end{macrocode}
-% \end{macro}
%
-% \begin{macro}{\caption@ifpackage}
-% \changes{v3.0f}{2005/05/29}{3rd argument \meta{code} added, so no extra check is needed}
-% |\caption@ifpackage|\marg{package name}\marg{package macro}\marg{code}\par
-% If a certain package support is requested the appropriate code will
-% be used. `Requested' means that the option belonging to it is set to
-% |true| and the macro called \meta{package macro} is defined.
-% (If \meta{package macro} is not yet defined we use |\AtBeginDocument|
-% here, so the package could be loaded after this package, too.)
+% \subsection{fltpage package support options}
+%
+% \changes{v3.1}{2007/09/01}{Options `FPlist' \& `FPref' added}
+% With these options is controlled where the list-of entry and |\ref| resp.
+% |\pageref| or |\autoref| will link to.
+% Defaults are |FPlist=caption| and |FPref=figure| which is inconsistent,
+% but compatible to the usual behaviour of the \package{fltpage} package.
% \begin{macrocode}
-\newcommand\caption@ifpackage[3]{%
+\DeclareCaptionOption{FPlist}[1]{\caption@setFPoption{list}{#1}}
+\DeclareCaptionOption{FPref}[1]{\caption@setFPoption{ref}{#1}}
+\@onlypreamble@key{caption}{FPlist}
+\@onlypreamble@key{caption}{FPref}
% \end{macrocode}
% \begin{macrocode}
- \edef\caption@tempa{%
- \caption@ifbool{pkt@#1}%
- {\@ifundefined{#2}{AtBeginDocument}{firstofone}}%
- {gobble}}%
- \caption@Info{#1=\caption@ifbool{pkt@#1}{1}{0} %
- (\@ifundefined{#2}{not }{}loaded->\caption@tempa)}%
+\newcommand*\caption@setFPoption[2]{%
+ \edef\@tempa{\@car#2\@nil}%
+ \caption@setbool{FP#1cap}{\if c\@tempa 1\else 0\fi}}
+\@onlypreamble\caption@setFPoption
% \end{macrocode}
% \begin{macrocode}
- \caption@ifbool{pkt@#1}{%
- \@ifundefined{#2}%
- {\let\caption@tempa\AtBeginDocument}%
- {\let\caption@tempa\@firstofone}%
- }{%
- \let\caption@tempa\@gobble
- }%
- \caption@tempa{\@ifundefined{#2}{}{#3}}%
+\captionsetup{FPlist=caption,FPref=figure}
% \end{macrocode}
%
+% \subsection{hyperref package support options}
+%
+% \changes{v3.1}{2007/06/21}{Options `hypcap' \& `hypcapspace' added}
+% With |hypcap=off| one can turn the \package{hypcap} support off
+% (default is |on|).
% \begin{macrocode}
- \caption@undefbool{pkt@#1}}
-\AtEndOfPackage{\let\caption@ifpackage\@undefined}
+\DeclareCaptionOption{hypcap}[1]{\caption@setbool{hypcap}{#1}}
+\DeclareCaptionOption{hypcapspace}{\def\caption@hypcapspace{#1}}
+% \end{macrocode}
+% \begin{macrocode}
+\captionsetup{hypcap=1,hypcapspace=.5\baselineskip}
% \end{macrocode}
-% \end{macro}
%
-% You can also switch the caption support off using the package option
-% |caption=false|.
-% This may look strange, but there are certain circumstances where this could
-% be useful.
-% Such a situation might be the usage of the \package{subfig} package without
-% disturbing the main caption code of the document class.\par
-% \emph{Note: This mechanism is obsolete now, it has been superseeded by the
-% \package{subfig} package option {\rm|caption=false|} which causes that only the
-% caption kernel \package{caption3} is loaded.}
+% \subsection{Processing of options}
%
+% \changes{v3.0m}{2007/03/04}{Verbose option added (package)}
+% \changes{v3.1}{2007/07/02}{Verbose option removed from package}
+%
+% \changes{v3.1}{2007/03/17}{We do not process global options anymore}
% \begin{macrocode}
-\caption@declarepackage{caption}
+\caption@ProcessOptions*{caption}
% \end{macrocode}
%
-% These are the packages we support:
+% \subsection{Option `type', \cs{captionof} and \cs{ContinuedFloat}}
%
+% \changes{v3.0d}{2004/08/03}{Option \opt{type=} added}
+% \changes{v3.1}{2007/06/25}{Option \opt{type*=} added}
% \begin{macrocode}
-\caption@declarepackage{float}
-\caption@declarepackage{floatrow}
-\caption@declarepackage{hyperref}
-\caption@declarepackage{hypcap}
-\caption@declarepackage{listings}
-\caption@declarepackage{longtable}
-\caption@declarepackage{picins}
-\caption@declarepackage{rotating}
-\caption@declarepackage{sidecap}
-\caption@declarepackage{supertabular}
+\caption@AtBeginDocument{%
+ \DeclareCaptionOption{type}{\caption@settype{#1}}
+ \DeclareCaptionOption{type*}{\caption@settype*{#1}}}
% \end{macrocode}
%
-% \subsubsection*{Processing of options}
+% \emph{Important Note:}
+% Like |\captionof| the option |type=| should only be used inside a
+% group, box, or environment and does not check if the argument is a valid
+% floating environment or not.
%
-% \changes{v3.0m}{2007/03/04}{Verbose option added to package}
+% \begin{macro}{\caption@settype}
+% \changes{v3.1}{2007/05/09}{This macro added}
+% |\caption@settype*|\marg{type}\par
+% sets |\@captype| and executes the options associated with it
+% (using |\caption@setoptions|).
+% Furthermore we check |\currentgrouplevel| (if avail),
+% redefine |\@currentlabel| so a |\label| before |\caption| will result
+% in a hint instead of a wrong reference, and
+% use the macro |\caption@settypehook| (which will be used by our
+% \package{float} package support).\par
+% The non-starred version sets a \package{hyperref} anchor additionally
+% (if |hypcap=true| and the \package{hypcap} package is not loaded).
+% \begin{macrocode}
+\newcommand*\caption@settype{%
+ \caption@@settype{}}
+% \end{macrocode}
+% \begin{macrocode}
+\newcommand*\caption@@settype[1]{%
+ \caption@teststar{\caption@@@settype{#1}}\@gobble\@firstofone}
+% \end{macrocode}
+% \begin{macrocode}
+\newcommand*\caption@@@settype[3]{%
+% #1 = "" or "sub"
+% #2 = \@gobble in star form, \@firstofone otherwise
+% #3 = <type>, e.g. "figure" or "table"
+ \caption@Debug{type=#3}%
+ \caption@checkgrouplevel{#1}{\captionsetup{#1type#2\@gobble*=#3}}%
+% \end{macrocode}
+% \begin{macrocode}
+ \@ifundefined{@#1captype}{}{%
+ \edef\@tempa{#3}%
+ \expandafter\ifx\csname @#1captype\endcsname\@tempa \else
+ \caption@iftypewarning{%
+ \PackageWarning{caption}{%
+ Caption type was already set to `#3'\MessageBreak}}{}%
+ \fi}%
+ \expandafter\edef\csname @#1captype\endcsname{#3}%
+ \let\caption@iftypewarning\caption@ifdebug
+% \end{macrocode}
% \begin{macrocode}
-\DeclareCaptionOption{verbose}[1]{%
- \caption@setbool{verbose}{#1}%
- \caption@ifverbose{%
- \def\caption@Info{\PackageInfo{caption}}%
- }{%
- \let\caption@Info\@gobble
- }}
-\setkeys{caption}{verbose=0}
+ \@nameuse{#1caption@settypehook}%
+ \expandafter\caption@setoptions\csname @#1captype\endcsname
+% \end{macrocode}
+% \begin{macrocode}
+ \let\caption@ifrefstepcounter\@secondoftwo
+ #2{% \@gobble or \@firstofone
+ \let\@currentlabel\caption@undefinedlabel
+ \let\@currentHlabel\@undefined
+ \caption@start}}
% \end{macrocode}
+% \end{macro}
%
+% \begin{macro}{\caption@settypehook}
+% Hook, will be extended by our \package{float} package support.
% \begin{macrocode}
-\caption@ProcessOptions{caption}
+\newcommand*\caption@settypehook{}
% \end{macrocode}
+% \end{macro}
%
-% If the option |caption=false| was given we stop processing this file
-% immediately.
+% \begin{macro}{\caption@iftype}
+% \changes{v3.1}{2007/04/11}{This macro and its usage added}
+% Since we often need to check if |\@captype| is defined (means: we
+% are inside a floating environment) this helper macro was introduced.
% \begin{macrocode}
-\caption@ifbool{pkt@caption}{}{\endinput}
-\caption@undefbool{pkt@caption}
+\newcommand*\caption@iftype{%
+ \@ifundefined{@captype}{\let\@captype\@undefined\@secondoftwo}\@firstoftwo}
% \end{macrocode}
+% \iffalse
+% \newcommand*\caption@iftype{%
+% \begingroup
+% \@ifundefined{@captype}%
+% {\aftergroup\@secondoftwo}%
+% {\aftergroup\@firstoftwo}%
+% \endgroup}
+% \fi
+% \end{macro}
%
-% \subsubsection*{Useful stuff}
+% \begin{macro}{\caption@checkgrouplevel}
+% \changes{v3.1}{2007/07/15}{This macro and its usage added}
+% Checks if |\captionsetup{type=|\ldots|}| or |\caption| is done
+% inside a group or not -- in the latter case an error will be issued.
+% (needs \eTeX)
+% \begin{macrocode}
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname currentgrouplevel\endcsname\relax
+ \caption@Debug{TeX engine: TeX}
+ \let\caption@checkgrouplevel\@gobbletwo
+\else
+ \caption@Debug{TeX engine: e-TeX}
+ \newcommand*\caption@checkgrouplevel[2]{%
+ \@ifundefined{#1caption@grouplevel}{%
+ \@ifundefined{caption@grouplevel}{\let\caption@grouplevel\z@}{}%
+ \ifnum\currentgrouplevel>\caption@grouplevel\relax
+ \expandafter\edef\csname #1caption@grouplevel\endcsname{%
+ \the\currentgrouplevel}%
+ \else
+ \caption@Error{\string#2 outside group or environment}%
+ \fi
+ }{}}
+\fi
+% \end{macrocode}
+% \end{macro}
%
-% \begin{macro}{\captionof}
-% |\captionof|(|*|)\marg{type}\oarg{lst\_entry}\marg{heading}
+% \begin{macro}{\caption@undefinedlabel}
+% \changes{v3.1}{2007/07/03}{This macro and its usage added}
+% This label will be used for |\currentlabel| inside (floating) environments
+% as default. (see above)
+% \Note{All commands used have to be robust here.}
% \begin{macrocode}
-\def\captionof{\@ifstar{\caption@of{\caption*}}{\caption@of\caption}}
-\newcommand*\caption@of[2]{\def\@captype{#2}#1}
+\newcommand*\caption@undefinedlabel{%
+ \emph{Please place \caption@cs{label} \textbf{after} \caption@cs{caption}}}%
+% \end{macrocode}
+% \begin{macrocode}
+\DeclareRobustCommand\caption@cs[1]{\texttt{\char`\\#1}}
% \end{macrocode}
% \end{macro}
%
-% Note: Like |\captionof| the option |type=| should only be used inside a
-% group or environment and does not check if the argument is a valid
-% floating environment or not.
+% \begin{macro}{\captionof}
+% \changes{v3.1}{2007/05/09}{Uses \cs{caption@settype} instead of \cs{def}\cs{@captype}}
+% |\captionof|\marg{type}\oarg{lst\_entry}\marg{heading}\\
+% |\captionof*|\oarg{lst\_entry}\marg{heading}
+% \begin{macrocode}
+\def\captionof{\caption@teststar\caption@of{\caption*}\caption}
+% \end{macrocode}
+% \begin{macrocode}
+\newcommand*\caption@of[2]{%
+ \let\caption@setfloatcapt\@firstofone
+ \caption@settype*{#2}#1}
+% \end{macrocode}
+% \end{macro}
%
-% \changes{v3.0d}{2004/08/03}{Option \opt{name=} added}
-% \changes{v3.0d}{2004/08/03}{Option \opt{type=} added}
+% \begin{macro}{\captionlistentry}
+% \changes{v3.1}{2007/07/28}{This macro added}
+% |\captionlistentry|\oarg{float type}\marg{list entry}
+% \begin{macrocode}
+\newcommand*\captionlistentry{%
+ \@testopt\caption@listentry\@captype}
+% \end{macrocode}
% \begin{macrocode}
-\DeclareCaptionOption{name}{\caption@setfloatname\@captype{#1}}
-\DeclareCaptionOption{type}{\def\@captype{#1}}
+\def\caption@listentry[#1]#2{%
+ \caption@refstepcounter{#1}%
+ \caption@makecurrent{#1}{#2}%
+ \caption@addcontentsline{#1}{#2}}
% \end{macrocode}
+% \end{macro}
%
% \begin{macro}{\ContinuedFloat}
-% \changes{v3.0f}{2005/06/11}{Call of \cs{caption@ContinuedFloat} added}
-% \changes{v3.0i}{2005/11/12}{Optional argument and call of \cs{caption@@ContinuedFloat} added}
-% |\ContinuedFloat|\oarg{type}\par
-% This mainly decreases the appropriate counter by $-1$.
+% \changes{v3.0f}{2005/06/11}{%
+% Call of \cs{caption@ContinuedFloat} added}
+% \changes{v3.0i}{2005/11/12}{%
+% Optional argument and call of \cs{caption@@ContinuedFloat} added}
+% \changes{v3.0g}{2005/06/28}{%
+% Bugfix: \cs{newcounter} replaced by \cs{newcount}}
+% \changes{v3.1}{2007/07/07}{%
+% Optional argument temporarily removed, since it makes trouble}
+% \changes{v3.1}{2007/07/07}{%
+% \cs{caption@setoptions} added}
+% |\ContinuedFloat|\par
+% This mainly decrements the appropriate counter and increments the
+% continuation counter instead.
+% Furthermore we set |\caption@resetContinuedFloat| to |\@gobble| so the
+% continuation counter will not be reset to zero inside |\caption@refstepcounter|.
+% \Note{The definition of \cs{ContinuedFloat} itself is compatible
+% to the one inside the \package{subfig} package.}
% \begin{macrocode}
-\providecommand\ContinuedFloat{%
- \@ifnextchar[%]
- \@ContinuedFloat
- {\ifx\@captype\@undefined
- \@latex@error{\noexpand\ContinuedFloat outside float}\@ehd
- \else
- \@ContinuedFloat[\@captype]%
- \fi}}
-\def\@ContinuedFloat[#1]{%
- \addtocounter{#1}\m@ne
- \caption@ContinuedFloat{#1}%
- \caption@@ContinuedFloat{#1}}
+\def\ContinuedFloat{%
+ \caption@iftype
+ {\addtocounter\@captype\m@ne
+ \caption@ContinuedFloat\@captype}%
+ {\caption@Error{\noexpand\ContinuedFloat outside float}}}
+% \end{macrocode}
+% \begin{macrocode}
+\def\caption@ContinuedFloat#1{%
+ \edef\@tempa{#1}%
+ \ifx\@tempa\caption@CFtype \else
+ \caption@Error{Continued `#1' after `\caption@CFtype'}%
+ \fi
+ \stepcounter{ContinuedFloat}%
+ \caption@@ContinuedFloat{#1}%
+ \caption@setoptions{ContinuedFloat}%
+ \caption@setoptions{continued#1}%
+ \let\caption@resetContinuedFloat\@gobble}
+% \end{macrocode}
+% \begin{macrocode}
+\newcounter{ContinuedFloat}
+\newcommand*\caption@CFtype{??}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\caption@ContinuedFloat}
-% \begin{macro}{\caption@resetContinuedFloat}
-% |\caption@ContinuedFloat|\marg{type}\par
-% |\caption@resetContinuedFloat|\marg{type}\par
-% The first one will be called inside |\ContinuedFloat|, the second one
-% inside |\caption|. Usually they do nothing but this changes if the
-% \package{hyperref} package is loaded. (See \package{hyperref} package
-% support for details.)
+% \begin{macro}{\caption@@ContinuedFloat}
+% |\caption@@ContinuedFloat|\marg{type}\par
+% Usually this do nothing but this changes if the \package{hyperref} package
+% is loaded. (See \package{hyperref} package support for details.)
% \begin{macrocode}
-\let\caption@ContinuedFloat\@gobble
-\let\caption@resetContinuedFloat\@gobble
+\newcommand*\caption@@ContinuedFloat[1]{}
% \end{macrocode}
% \end{macro}
-% \end{macro}
%
-% \begin{macro}{\caption@@ContinuedFloat}
-% This hook is for foreign packages which link themself into |\ContinuedFloat|,
-% for example the \package{subfig} package\cite{subfig}.
+% \begin{macro}{\caption@resetContinuedFloat}
+% |\caption@resetContinuedFloat|\marg{type}\par
+% If a continuation counter is defined, we reset it.
+% (This one will be called inside |\@caption|.)
% \begin{macrocode}
-\providecommand*\caption@@ContinuedFloat[1]{}
+\newcommand*\caption@resetContinuedFloat[1]{%
+ \@stpelt{ContinuedFloat}\xdef\caption@CFtype{#1}}
% \end{macrocode}
% \end{macro}
%
-% \subsubsection*{Internal helpers}
+% \subsection{Internal helpers}
%
-% \begin{macro}{\caption@begin}
-% \changes{v3.0a}{2004/01/23}{\cs{caption@settype} changed by \cs{caption@setfloattype}}
-% \changes{v3.0e}{2005/04/12}{Check for default label format added}
-% \changes{v3.0f}{2005/06/11}{Call of \cs{caption@resetContinuedFloat} added}
-% Our handling of |\caption| will always be surrounded by
-% |\caption@begin| (or |\caption@beginex|) and |\caption@end|.\par
-% |\caption@begin|\marg{type} performs these tasks:
-% \begin{itemize}
-% \item Call |\caption@resetContinuedFloat| (see above)
-% and start a new group
-% \item Execute the options set with |\captionsetup|\oarg{type}
-% \item Define |\fnum@|\meta{type} if the caption label format is set
-% to non-default
-% \item Override the |position=| setting, if necessary
-% (for example if set to |auto| or used inside a |supertabular|)
-% \end{itemize}
+% \begin{macro}{\caption@refstepcounter}
+% \changes{v3.1}{2007/07/28}{This macro added}
+% Resets the continuation counter, increments the float (i.e. |figure| or
+% |table|) counter, and sets the |refstepcounter| flag.
% \begin{macrocode}
-\newcommand*\caption@begin[1]{%
+\newcommand*\caption@refstepcounter[1]{%
\caption@resetContinuedFloat{#1}%
- \begingroup
+ \caption@@refstepcounter{#1}%
+ \let\caption@ifrefstepcounter\@firstoftwo}
% \end{macrocode}
% \begin{macrocode}
- \caption@setfloattype{#1}%
+\newcommand*\caption@@refstepcounter{\refstepcounter}
+\let\caption@ifrefstepcounter\@secondoftwo
% \end{macrocode}
+% \end{macro}
%
+% \begin{macro}{\caption@dblarg}
+% \changes{v3.1}{2007/02/05}{This macro added}
+% A |\relax| was added compared to |\@dblarg| so |\caption{}| will be
+% expanded to |\caption[\relax]{}| (and not to |\caption[]{}|).
% \begin{macrocode}
- \ifx\caption@lfmt\caption@lfmt@default\else
- \@namedef{fnum@#1}{%
- \caption@lfmt{\caption@floatname{#1}}{\@nameuse{the#1}}}%
- \fi
+\newcommand\caption@dblarg[1]{\kernel@ifnextchar[{#1}{\caption@xdblarg{#1}}}%
+\newcommand\caption@xdblarg[2]{#1[{#2\relax}]{#2}}%
% \end{macrocode}
+% \end{macro}
%
+% \begin{macro}{\caption@begin}
+% \changes{v3.0a}{2004/01/23}{\cs{caption@settype} changed to \cs{caption@setfloattype}}
+% \changes{v3.0e}{2005/04/12}{Check for default label format added}
+% \changes{v3.0f}{2005/06/11}{Usage of \cs{caption@resetContinuedFloat} added}
+% \changes{v3.1}{2007/05/09}{Usage of \cs{caption@setfloattype} \&
+% \cs{caption@resetContinuedFloat} removed}
+% Our handling of |\caption| will always be surrounded by
+% |\caption@begin| (or |\caption@beginex|) and |\caption@end|.\par
+% |\caption@begin|\marg{type} performs these tasks:
+% \begin{enumerate}
+% \item[1.] Start a new group.
+% \item[2.] Define |\fnum@|\meta{type} if the caption label format is set
+% to non-default.
+% \item[3.] Override the |position=| setting, if necessary.
+% (for example if set to |auto| or used inside a |supertabular|)
+% \end{enumerate}
% \begin{macrocode}
- \caption@fixposition
- \global\let\caption@fixedposition\caption@position}
+\newcommand*\caption@begin[1]{%
+ \begingroup
+ \caption@setfnum{#1}%
+ \caption@fixposition
+ \global\let\caption@fixedposition\caption@position}
% \end{macrocode}
% \end{macro}
%
% \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}}
% \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}\\
+% \changes{v3.1}{2007/07/01}{Makes lst-entry now instead of redefining \cs{addcontentsline}}
+% |\caption@beginex|\marg{type}\marg{list entry}\marg{heading}\par
% 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{enumerate}
+% \item[5.] Make an entry in the list-of-whatever.
+% \item[6.] Set |\caption@ifempty| according argument \meta{heading}.
+% \end{enumerate}
% \begin{macrocode}
\newcommand\caption@beginex[3]{%
\caption@begin{#1}%
+ \caption@addcontentsline{#1}{#2}%
+ \caption@ifempty{#3}{}}
% \end{macrocode}
+% \end{macro}
%
+% \begin{macro}{\caption@end}
+% |\caption@end| closes the group.
% \begin{macrocode}
- \caption@iflof%
- {\def\caption@tempa{#2}}%
- {\let\caption@tempa\@empty}%
- \ifx\caption@tempa\@empty
- \long\def\addcontentsline##1##2##3{}% There is no \@gobblethree...
- \fi
+\newcommand*\caption@end{%
+ \endgroup
+ \let\caption@position\caption@fixedposition}
% \end{macrocode}
+% \end{macro}
%
-% \begin{macrocode}
- \caption@ifempty{#3}{\let\caption@ifempty\@secondoftwo}%
+% \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}
+%
+% \begin{macro}{\caption@setfnum}
+% \changes{v3.1}{2007/03/10}{This macro added}
+% |\caption@setfnum|\marg{type}\\
+% redefines |\fnum@|\meta{type} according the caption label format
+% set with |labelformat=|. But if |labelformat=default| is set,
+% |\fnum@|\meta{type} will not be overwritten by us.
+% \begin{macrocode}
+\newcommand*\caption@setfnum[1]{%
+ \@ifundefined{fnum@#1}{\iftrue}{\ifx\caption@lfmt\caption@lfmt@default\else}%
+ \@namedef{fnum@#1}{\caption@fnum{#1}}%
+ \fi}
% \end{macrocode}
+% \end{macro}
%
-% \begin{macrocode}
+% \begin{macro}{\caption@addcontentsline}
+% If |\sf@ifpositiontop| is defined, we extend |\caption@addcontentsline|
+% so it handles sub-captions, too.
+% \begin{macrocode}
+\caption@AtBeginDocument*{%
+ \@ifundefined{sf@ifpositiontop}{}{%
+ \let\caption@kernel@addcontentsline\caption@addcontentsline
+ \renewcommand*\caption@addcontentsline[2]{%
+ \sf@ifpositiontop{\@listsubcaptions{#1}}{}%
+ \caption@kernel@addcontentsline{#1}{#2}%
+ \sf@ifpositiontop{}{\@listsubcaptions{#1}}}%
+ }}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\caption@boxrestore}
+% \changes{v3.1}{2007/03/03}{This macro and its usage added}
+% The original code (from |latex/base/ltboxes.dtx|):
+% \begin{verbatim}
+% \def\@parboxrestore{\@arrayparboxrestore\let\\\@normalcr}
+% \def\@arrayparboxrestore{%
+% \let\if@nobreak\iffalse
+% \let\if@noskipsec\iffalse
+% \let\par\@@par
+% \let\-\@dischyph
+% \let\'\@acci\let\`\@accii\let\=\@acciii
+% \parindent\z@ \parskip\z@skip
+% \everypar{}%
+% \linewidth\hsize
+% \@totalleftmargin\z@
+% \leftskip\z@skip \rightskip\z@skip \@rightskip\z@skip
+% \parfillskip\@flushglue \lineskip\normallineskip
+% \baselineskip\normalbaselineskip
+% \sloppy}
+% \end{verbatim}%^^A
+% This one will be used by |\@caption| instead of |\@parboxrestore|.
+% \begin{macrocode}
+\newcommand*\caption@boxrestore{%
+% \let\if@nobreak\iffalse
+% \let\if@noskipsec\iffalse
+ \let\par\@@par
+% \let\-\@dischyph
+% \let\'\@acci\let\`\@accii\let\=\@acciii
+ \parindent\z@ \parskip\z@skip
+% \everypar{}%
+% \linewidth\hsize
+% \@totalleftmargin\z@
+ \leftskip\z@skip \rightskip\z@skip \@rightskip\z@skip
+ \parfillskip\@flushglue \lineskip\normallineskip
+ \baselineskip\normalbaselineskip
+ \sloppy
+% \let\\\@normalcr
}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\caption@end}
-% |\caption@end| closes the group.
+% \begin{macro}{\caption@normalsize}
+% \changes{v3.1}{2007/05/05}{This macro and its usage added}
+% This one will be used by |\@caption| instead of |\normalsize|.\par
+% Its code is equivalent to
+% \begin{quote}
+% |\caption@font{normal}%|
+% \end{quote}
+% but executes faster (since the starred form of |\caption@font|
+% does not use |\setkeys| internally).
% \begin{macrocode}
-\newcommand*\caption@end{%
- \endgroup
+\newcommand*\caption@normalsize{%
+ \caption@font*{\KV@caption@fnt@normal\@unused}}
% \end{macrocode}
+% \end{macro}
%
+% \begin{macro}{\caption@setfloatcapt}
+% Needed for support of the \package{float} package, where the caption will
+% not be typeset directly, but catched in a |\vbox| called |\@floatcapt|
+% instead.
% \begin{macrocode}
- \let\caption@position\caption@fixedposition}
+\let\caption@setfloatcapt\@firstofone
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\caption@setfloattype}
-% \changes{v3.0a}{2004/01/23}{This macro added}
-% |\caption@setfloattype|\marg{type}\\
-% sets up the right float type within |\@caption|, |\LT@makecaption| etc.
-% Usually this is equivalent to |\caption@settype| but I made it an own macro so
-% I can extend it later on, for example if the \package{float} or
-% \package{sidecap} package is loaded.
+% \begin{macro}{\caption@makecurrent}
+% \begin{macro}{\caption@makestart}
+% \begin{macro}{\caption@anchor}
+% \begin{macro}{\caption@start}
+% \begin{macro}{\caption@@start}
+% \begin{macro}{\caption@freezeHref}
+% \begin{macro}{\caption@defrostHref}
+% All these are needed for support of the \package{hyperref} package.
% \begin{macrocode}
-\let\caption@setfloattype\caption@settype
+\newcommand*\caption@makecurrent[2]{}
+\let\caption@makestart\@gobble
+\let\caption@anchor\@firstofone
+\let\caption@start\relax
+\let\caption@@start\relax
+\let\caption@freezeHref\relax
+\let\caption@defrostHref\relax
% \end{macrocode}
+% \begin{macrocode}
+\g@addto@macro\caption@prepareslc{\let\caption@anchor\@firstofone}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
% \end{macro}
%
-% \begin{macro}{\caption@letfloattype}
-% \changes{v3.0b}{2004/05/16}{This macro added}
-% \changes{v3.0e}{2005/05/05}{Argument \meta{extra code} added}
-% |\caption@letfloattype|\marg{type}\marg{extra code}\\
-% redefines |\caption@setfloattype| so it does not only
-% |\caption@settype|\marg{type} but two additional tasks:
-% Executing extra code given as second argument and
-% execute options with |\caption@settype{#1}| afterwards.\par
-% You can find an example of its usage in the \package{longtable}
-% support, where this macro is called so
-% |\captionsetup[longtable]{|\ldots|}| can be used to setup options
-% for longtables which have a higher priority than the options which
-% have been setup with |\captionsetup[table]{|\ldots|}| or
-% |\setlength\LTcapwidth{|\ldots|}|.
+% \subsection{\cs{caption}, \cs{@caption}, and \cs{@makecaption}}
+%
+% We only redefine |\caption| and |\@caption| if the current definitions
+% are well known, so documents written in the old (\package{caption}
+% package \version{1.x}) days (where |\caption| \& |\@caption| were not
+% redefined by us) will still compile fine.
+% For example the usage of the \package{captcont} package, which brings
+% it's own definition of |\caption*|, was quite common these days.
+%
+% Some packages (like the \package{hyperref} package for example) redefines
+% |\caption| and |\@caption|, too.
+% So we have to use |\AtBeginDocument| here, so we can make sure
+% our definition is the one which will be valid at last.
% \begin{macrocode}
-\newcommand*\caption@letfloattype[2]{%
- \def\caption@setfloattype##1{%
- \caption@settype{##1}#2\caption@settype{#1}}}
+\caption@AtBeginDocument{%
+% \end{macrocode}
+% \begin{macrocode}
+ \caption@setbool{incompatible}{0}%
% \end{macrocode}
-% \end{macro}
%
-% \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{macrocode}
+ \caption@CheckCommand\caption{%
+ % ltfloat.dtx [2002/10/01 v1.1v LaTeX Kernel (Floats)]
+ \def\caption{%
+ \ifx\@captype\@undefined
+ \@latex@error{\noexpand\caption outside float}\@ehd
+ \expandafter\@gobble
+ \else
+ \refstepcounter\@captype
+ \expandafter\@firstofone
+ \fi
+ {\@dblarg{\@caption\@captype}}%
+ }}%
+% \end{macrocode}
%
-% \begin{macro}{\caption@floatname}
-% |\caption@floatname|\marg{type}\par
-% Usually all float names (which partly build the caption label)
-% follow the same naming convention. But some packages (for example
-% the \package{float} package) do not, so we use this wrapper macro which
-% can be changed later on.
% \begin{macrocode}
-\newcommand*\caption@floatname[1]{\@nameuse{#1name}}
-\newcommand*\caption@setfloatname[1]{\@namedef{#1name}}
+ \caption@CheckCommand\caption{%
+ % beamerbaselocalstructure.sty,v 1.53 2007/01/28 20:48:21 tantau
+ \def\caption{
+ \ifx\@captype\@undefined
+ \@latex@error{\noexpand\caption outside figure or table}\@ehd
+ \expandafter\@gobble
+ \else
+ \refstepcounter\@captype
+ \expandafter\@firstofone
+ \fi
+ {\@dblarg{\@caption\@captype}}%
+ }}%
% \end{macrocode}
-% \end{macro}
%
-% \subsubsection*{Caption support}
+% \begin{macrocode}
+ \caption@CheckCommand\caption{%
+ % float.sty [2001/11/08 v1.3d Float enhancements (AL)]
+ \renewcommand\caption{%
+ \ifx\@captype\@undefined
+ \@latex@error{\noexpand\caption outside float}\@ehd
+ \expandafter\@gobble
+ \else
+ \refstepcounter\@captype
+ \let\@tempf\@caption
+ \expandafter\ifx\csname @float@c@\@captype\endcsname\relax\else
+ \expandafter\expandafter\let
+ \expandafter\@tempf\csname @float@c@\@captype\endcsname
+ \fi
+ \fi
+ \@dblarg{\@tempf\@captype}}}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \caption@CheckCommand\caption{%
+ % hyperref.sty [2007/02/27 v6.75t Hypertext links for LaTeX]
+ % hyperref.sty [2007/04/09 v6.76a Hypertext links for LaTeX]
+ % hyperref.sty [2007/06/12 v6.76h Hypertext links for LaTeX]
+ \def\caption{%
+ \ifx\@captype\@undefined
+ \@latex@error{\noexpand\caption outside float}\@ehd
+ \expandafter\@gobble
+ \else
+ \H@refstepcounter\@captype
+ \@ifundefined{fst@\@captype}{%
+ \let\Hy@tempa\@caption
+ }{%
+ \let\Hy@tempa\Hy@float@caption
+ }%
+ \expandafter\@firstofone
+ \fi
+ {\@dblarg{\Hy@tempa\@captype}}%
+ }}%
+% \end{macrocode}
%
-% \iffalse\begin{quote}
-% \small\emph{Note:}
-% Our aim is patching the existing |\caption| code so changes done by other
-% packages will not get lost. We do similar in our \package{float},
-% \package{hyperref}, and \package{hypcap} support so get the disadvantage
-% of having ugly code with some negative side-effects, like the non-working
-% |\caption{}| feature when the \package{french(le)} or \package{hyperref}
-% package is loaded.
-% \end{quote}\fi
+% \begin{macrocode}
+ \caption@CheckCommand\caption{%
+ % hyperref.sty [2007/08/05 v6.76j Hypertext links for LaTeX]
+ \def\caption{%
+ \ifx\@captype\@undefined
+ \@latex@error{\noexpand\caption outside float}\@ehd
+ \expandafter\@gobble
+ \else
+ \H@refstepcounter\@captype
+ \let\Hy@tempa\@caption
+ \@ifundefined{float@caption}{%
+ }{%
+ \expandafter\ifx\csname @float@c@\@captype\endcsname\float@caption
+ \let\Hy@tempa\Hy@float@caption
+ \fi
+ }%
+ \expandafter\@firstofone
+ \fi
+ {\@dblarg{\Hy@tempa\@captype}}%
+ }}%
+% \end{macrocode}
%
-% Some packages (like the \package{hyperref} package for example) redefines
-% |\caption| and |\@caption|, too, but without chaining to their previous
-% definitions. So we have to use |\AtBeginDocument| here, so we can make sure
-% our definition don't get lost.
+% \begin{macrocode}
+ \caption@IfCheckCommand{}{%
+ \caption@Info{%
+ Incompatible package detected (regarding \string\caption).\MessageBreak
+ \string\caption\space=\space\meaning\caption}%
+ \caption@setbool{incompatible}{1}}%
+% \end{macrocode}
%
% \begin{macrocode}
-\AtBeginDocument{%
+ \caption@CheckCommand\@caption{%
+ % ltfloat.dtx [2002/10/01 v1.1v LaTeX Kernel (Floats)]
+ \long\def\@caption#1[#2]#3{%
+ \par
+ \addcontentsline{\csname ext@#1\endcsname}{#1}%
+ {\protect\numberline{\csname the#1\endcsname}{\ignorespaces #2}}%
+ \begingroup
+ \@parboxrestore
+ \if@minipage
+ \@setminipage
+ \fi
+ \normalsize
+ \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par
+ \endgroup}}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \caption@CheckCommand\@caption{%
+ % beamerbaselocalstructure.sty,v 1.53 2007/01/28 20:48:21 tantau
+ \long\def\@caption#1[#2]#3{% second argument ignored
+ \par\nobreak
+ \begingroup
+ \@parboxrestore
+ \if@minipage
+ \@setminipage
+ \fi
+ \beamer@makecaption{#1}{\ignorespaces #3}\par\nobreak
+ \endgroup}}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+% \caption@CheckCommand\float@caption{%
+% % float.sty [2001/11/08 v1.3d Float enhancements (AL)]
+% \long\def\float@caption#1[#2]#3{%
+% \addcontentsline{\@nameuse{ext@#1}}{#1}%
+% {\protect\numberline{\@nameuse{the#1}}{\ignorespaces #2}}
+% \global\setbox\@floatcapt\vbox\bgroup\@parboxrestore
+% \normalsize\@fs@capt{\@nameuse{fnum@#1}}{\ignorespaces #3}%
+% \@ifnextchar[{\float@ccon}{\egroup}}%
+% \long\def\float@ccon[#1]{#1\par\egroup}}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \caption@CheckCommand\@caption{%
+ % hyperref.sty [2007/02/27 v6.75t Hypertext links for LaTeX]
+ \long\def\@caption#1[#2]#3{%
+ \hyper@makecurrent{\@captype}%
+ \def\@currentlabelname{#2}%
+ \par\addcontentsline{\csname ext@#1\endcsname}{#1}{%
+ \protect\numberline{\csname the#1\endcsname}{\ignorespaces #2}%
+ }%
+ \begingroup
+ \@parboxrestore
+ \if@minipage
+ \@setminipage
+ \fi
+ \normalsize
+ \@makecaption{\csname fnum@#1\endcsname}{%
+ \ignorespaces
+ \ifHy@nesting
+ \hyper@@anchor{\@currentHref}{#3}%
+ \else
+ \Hy@raisedlink{\hyper@@anchor{\@currentHref}{\relax}}#3%
+ \fi
+ }%
+ \par
+ \endgroup
+ }}%
+% \end{macrocode}
+% \begin{macrocode}
+ \caption@CheckCommand\@caption{%
+ % hyperref.sty [2007/04/09 v6.76a Hypertext links for LaTeX]
+ % hyperref.sty [2007/06/12 v6.76h Hypertext links for LaTeX]
+ % hyperref.sty [2007/08/05 v6.76j Hypertext links for LaTeX]
+ \long\def\@caption#1[#2]#3{%
+ \expandafter\ifx\csname if@capstart\expandafter\endcsname
+ \csname iftrue\endcsname
+ \global\let\@currentHref\hc@currentHref
+ \else
+ \hyper@makecurrent{\@captype}%
+ \fi
+ \def\@currentlabelname{#2}%
+ \par\addcontentsline{\csname ext@#1\endcsname}{#1}{%
+ \protect\numberline{\csname the#1\endcsname}{\ignorespaces #2}%
+ }%
+ \begingroup
+ \@parboxrestore
+ \if@minipage
+ \@setminipage
+ \fi
+ \normalsize
+ \expandafter\ifx\csname if@capstart\expandafter\endcsname
+ \csname iftrue\endcsname
+ \global\@capstartfalse
+ \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces#3}%
+ \else
+ \@makecaption{\csname fnum@#1\endcsname}{%
+ \ignorespaces
+ \ifHy@nesting
+ \hyper@@anchor{\@currentHref}{#3}%
+ \else
+ \Hy@raisedlink{\hyper@@anchor{\@currentHref}{\relax}}#3%
+ \fi
+ }%
+ \fi
+ \par
+ \endgroup
+ }}%
+% \end{macrocode}
+% \begin{macrocode}
+ \caption@CheckCommand\@caption{%
+ % nameref.sty [2006/12/27 v2.28 Cross-referencing by name of section]
+ \long\def\@caption#1[#2]{%
+ \def\@currentlabelname{#2}%
+ \NR@@caption{#1}[{#2}]%
+ }}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \caption@CheckCommand\@caption{%
+ % subfigure.sty [2002/07/30 v2.1.4 subfigure package]
+ \long\def\@caption#1[#2]#3{%
+ \@ifundefined{if#1topcap}%
+ {\subfig@oldcaption{#1}[{#2}]{#3}}%
+ {\@nameuse{if#1topcap}%
+ \@listsubcaptions{#1}%
+ \subfig@oldcaption{#1}[{#2}]{#3}%
+ \else
+ \subfig@oldcaption{#1}[{#2}]{#3}%
+ \@listsubcaptions{#1}%
+ \fi}}}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \caption@CheckCommand\@caption{%
+ % subfig.sty [2005/06/28 ver: 1.3 subfig package]
+ \def\@caption{\caption@}%
+% \long\def\caption@#1[#2]#3{%
+% \@ifundefined{caption@setfloattype}%
+% \caption@settype
+% \caption@setfloattype
+% \@captype
+% \sf@ifpositiontop{%
+% \@listsubcaptions{#1}%
+% \sf@old@caption{#1}[{#2}]{#3}%
+% }{%
+% \sf@old@caption{#1}[{#2}]{#3}%
+% \@listsubcaptions{#1}%
+% }}%
+ }%
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \caption@IfCheckCommand{}{%
+ \caption@Info{%
+ Incompatible package detected (regarding \string\@caption).\MessageBreak
+ \string\@caption\space=\space\meaning\@caption}%
+ \caption@setbool{incompatible}{1}}%
% \end{macrocode}
%
-% We only patch |\caption| and |\@caption| if the \package{captcont} package
-% (which brings it's own definition of |\caption*|) is not used.
-% It does not make much sense using the actual version of the \package{caption}
-% package with the \package{captcont} package, but this was different in the
-% old (\version{1.x}) days so we take care to be backward compatible.
+% The option |compatibility=| will override the compatibility mode.
+% \begin{macrocode}
+ \@ifundefined{caption@ifcompatibility}%
+ {\let\caption@ifcompatibility\caption@ifincompatible
+ \let\@tempa\@firstofone}%
+ {\let\@tempa\@gobble}% suppress warning
+% \end{macrocode}
%
% \begin{macrocode}
- \@ifundefined{cc@caption}{%
- \@ifundefined{caption@old}{%
+ \caption@ifcompatibility{%
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \@tempa{%
+ \PackageWarning{caption}{%
+ *************************************************\MessageBreak
+ \noexpand\caption will not be redefined since it's already\MessageBreak
+ redefined by a document class or package which is\MessageBreak
+ unknown to the caption package.\MessageBreak
+ As a result some new features of the caption\MessageBreak
+ package will not work as expected.\MessageBreak
+ *************************************************\@gobbletwo}%
+ }%
+% \end{macrocode}
+%
+% |\ContinuedFloat| is not supported in compatibility mode.
+% \begin{macrocode}
+ \renewcommand*\caption@ContinuedFloat[1]{%
+ \caption@Error{Not available in compatibility mode}}%
+% \end{macrocode}
+%
+% |\caption@start| is not supported in compatibility mode.
+% \begin{macrocode}
+ \caption@AtBeginDocument*{%
+ \let\caption@start\relax
+ \@ifundefined{caption@ORI@capstart}{}{%
+ \caption@Debug{%
+ Undo redefinition of \string\capstart\@gobble}%
+ \let\capstart\caption@ORI@capstart
+ \let\caption@ORI@capstart\@undefined}%
+ \@ifundefined{Hy@float@makebox}{}{%
+ \caption@Debug{%
+ Restore hyperref redefinition of \string\float@makebox\@gobble}%
+ \let\float@makebox\Hy@float@makebox
+ \let\Hy@float@makebox\@undefined}%
+ }%
+% \end{macrocode}
+%
+% \begin{macro}{\caption@star}
+% We define |\caption@star| here, too, so it's defined but does not make any harm.
+% \begin{macrocode}
+ \newcommand*\caption@star[2]{#1#2}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+ }{%
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \caption@ifincompatible{%
+ \PackageWarning{caption}{%
+ *****************************************************\MessageBreak
+ Forced redefinition of \noexpand\caption since the\MessageBreak
+ unsupported(!) package option `compatibility=false'\MessageBreak
+ was given. Please fasten your seat belts, as we may\MessageBreak
+ experience turbulence!\MessageBreak
+ *****************************************************\@gobbletwo}%
+ }{}%
% \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}
+% \changes{v3.1}{2007/02/04}{Re-written, does not save\&use original definition anymore}
% Here comes our definition of |\caption| and |\caption*|.
-% (We set |\caption@startrue| globally so it works with the \package{sidecap} package, too.)
+% Beside the support of the starred variant this code was adapted to the
+% various packages we support.
+% We are using |\caption@dblarg| instead of |\@dblarg| so |\caption{}|
+% (with an empty arg.) will produce a list-of entry, but |\caption[]{}|
+% won't.
+% \begin{macrocode}
+ \def\caption{%
+ \caption@iftype
+ {\caption@checkgrouplevel\@empty\caption
+ \caption@star
+ {\caption@refstepcounter\@captype}%
+ {\caption@dblarg{\@caption\@captype}}}%
+ {\caption@Error{\noexpand\caption outside float}}}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\caption@star}
+% \changes{v3.1}{2007/06/24}{Renamed from \cs{caption@caption} to \cs{caption@star}}
+% A helper macro which processes the optional |*| after |\caption|.
+% \Note{We set \cs{caption@startrue} globally so it works with the
+% \package{sidecap} package, too.}
% \begin{macrocode}
- \let\caption@old\caption
- \def\caption{\caption@caption\caption@old}%
- \def\caption@caption#1{%
- \@ifstar{\ContinuedFloat\global\caption@startrue#1[]}{#1}}%
+ \newcommand*\caption@star[2]{%
+ \@ifstar{\global\caption@startrue#2[]}{#1#2}}%
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@caption}
-% Our definition of |\@caption| simply calls the old definition,
-% nested by |\caption@beginex| and |\caption@end|.
+% \changes{v3.1}{2007/02/04}{Re-written, does not save\&use original definition anymore}
+% As above, our version has been adapted to the packages we support.
+% Additionally our code is nested by |\caption@beginex| \&
+% |\caption@end| instead of |\begingroup| \& |\endgroup|.
+% Furthermore we use |\caption@boxrestore| instead of |\@parboxrestore|
+% so this code also works correctly inside list-based environments
+% like |wide| \& |addmargin|. (This, and the fact that we use
+% |\linewidth| instead of |\hsize| inside |\@makecaption|, solves
+% \href{http://www.latex-project.org/cgi-bin/ltxbugs2html?pr=latex/2472}%^^A
+% {\LaTeX\ PR \texttt{latex/2472}}.)
% \begin{macrocode}
- \let\caption@@old\@caption
\long\def\@caption#1[#2]#3{%
+% \end{macrocode}
+% \begin{macrocode}
+ \ifcaption@star \else
+ \caption@makecurrent{#1}{#2}%
+ \caption@ifhypcap{\caption@@start}{}%
+ \fi
+% \end{macrocode}
+% \begin{macrocode}
+ \par
\caption@beginex{#1}{#2}{#3}%
- \caption@@old{#1}[{#2}]{#3}%
+ \caption@setfloatcapt{%
+ \caption@boxrestore
+ \caption@normalsize
+ \ifcaption@star
+ \let\caption@anchor\@firstofone
+ \fi
+ \@makecaption{\csname fnum@#1\endcsname}%
+ {\ignorespaces\caption@anchor{#3}}\par}%
\caption@end}%
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\@xfloat}
+% \changes{v3.1}{2007/05/09}{This re-definition added}
+% We redefine |\@xfloat| so inside floating environments our
+% type-specific options will be used, a \package{hyperref}
+% anchor will be set etc.
% \begin{macrocode}
- }{}}{%
+ \let\caption@ORI@xfloat\@xfloat
+ \def\@xfloat#1[#2]{%
+ \caption@ORI@xfloat{#1}[#2]%
+ \caption@settype{#1}}%
% \end{macrocode}
-%
-% \changes{v3.0c}{2004/07/16}{Bugfix 04-07-15: \package{captcont} support fixed}
-% Minimum \package{captcont} package support:\\
-% We define |\caption@caption| here so it's there but does not make any harm.
+% \end{macro}
%
% \begin{macrocode}
- \caption@Info{captcont package v2.0 detected}%
- \def\caption@caption#1{#1}%
}%
+% \end{macrocode}
+%
+% \begin{macrocode}
}
% \end{macrocode}
%
% \begin{macro}{\@makecaption}
+% \changes{v3.1}{2007/03/10}{\cs{nobreak}s added, needed for beamer class}
% |\@makecaption|\marg{label}\marg{text}\par
-% The original code (from |latex/base/classes.dtx|):
-% \begin{verbatim}
-% \long\def\@makecaption#1#2{%
-% \vskip\abovecaptionskip
-% \sbox\@tempboxa{#1: #2}%
-% \ifdim \wd\@tempboxa >\hsize
-% #1: #2\par
-% \else
-% \global \@minipagefalse
-% \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
-% \fi
-% \vskip\belowcaptionskip}
-% \end{verbatim}
-% We do basically the same, but take care of the |position=| setting
-% and use |\caption@@make| from the \package{caption} kernel to actually
+% We do basically the same as the original code (from the standard
+% \LaTeX\ document classes), but take care of the |position=| setting
+% and use |\caption@@make| from the \package{caption} kernel to finally
% typeset the caption.
% \begin{macrocode}
-\renewcommand\@makecaption[2]{%
+\long\def\@makecaption#1#2{%
\caption@iftop{\vskip\belowcaptionskip}{\vskip\abovecaptionskip}%
\caption@@make{#1}{#2}%
\caption@iftop{\vskip\abovecaptionskip}{\vskip\belowcaptionskip}}
% \end{macrocode}
% \end{macro}
%
-% \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}
-% \changes{v3.0q}{2007/04/16}{\KOMAScript\ compatibility revised}
+% \subsection{Document class \& Babel package support}
+%
+% \subsubsection{The \AmS{} \& \SmF{} classes}
+% \changes{v3.1}{2007/07/29}{\AmS\ \& \SmF\ classes support added (package)}
%
% \begin{macrocode}
-\@ifundefined{scr@caption}{}{%
- \caption@Info{KOMA-Script class detected}
- \AtBeginDocument{\let\scr@caption\caption}
+\@ifundefined{smf@makecaption}{}{\let\smf@makecaption\@makecaption}
% \end{macrocode}
%
-% \begin{macro}{\onelinecaptionsfalse}
-% \begin{macro}{\onelinecaptionstrue}
+% \subsubsection{The beamer class}
+% \changes{v3.1}{2007/03/10}{beamer class support added (package)}
+%
% \begin{macrocode}
- \def\onelinecaptionstrue{\caption@setbool{slc}{1}}
- \def\onelinecaptionsfalse{\caption@setbool{slc}{0}}
+\@ifclassloaded{beamer}{%
+ \caption@Info{beamer document class}%
% \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}
-% \changes{v3.0n}{2006/03/09}{Accidentally this got broken in \version{3.0m}, fixed}
-% Original code:
-% \begin{verbatim}
-% \newcommand{\captionabove}{\@captionabovetrue\scr@caption}
-% \newcommand{\captionbelow}{\@captionabovefalse\scr@caption}
-% \end{verbatim}
+% Since the beamer class do not offer a `list of figures' we switch
+% this support in \thispackage\ off.
% \begin{macrocode}
- \def\captionabove{%
- \caption@setposition{t}\let\caption@setposition\@gobble
- \scr@caption}
- \def\captionbelow{%
- \caption@setposition{b}\let\caption@setposition\@gobble
- \scr@caption}
+ \captionsetup{listof=false}
+ \undefine@key{caption}{listof}
+ \undefine@key{caption}{listofformat}
% \end{macrocode}
-% \end{macro}
-% \end{macro}
%
% \begin{macrocode}
-}
+}{}
% \end{macrocode}
%
-% \subsubsection*{\package{french(le)} package support}
-% \changes{v3.0h}{2005/10/03}{Minimum adaptation to \package{french(le)} added}
+% \subsubsection{The \KOMAScript{} classes}
+%
+% \KOMAScript\ contains the code
+% |\AtBeginDocument{\let\scr@caption\caption}|
+% so we need to update |\scr@caption| here, too.
+%
+% \begin{macrocode}
+\@ifundefined{scr@caption}{}{%
+ \caption@AtBeginDocument{\let\scr@caption\caption}}
+% \end{macrocode}
+%
+% \subsubsection{The frenchb Babel option}
+% \changes{v3.1}{2006/05/14}{Adaptation to \package{frenchb} added (package)}
+%
+% Suppress
+% ``Package |frenchb.ldf| Warning: The definition of |\@makecaption| has been
+% changed, frenchb will NOT customize it.''
+% (but only if we emulate this customization)
+% \begin{macrocode}
+\@ifundefined{caption@frenchb}{}{\caption@frenchb}
+% \end{macrocode}
+%
+% \subsubsection{The frenchle/pro package}
+% \changes{v3.0h}{2005/10/03}{Adaptation to \package{frenchle/pro} added (package)}
%
% \begin{macrocode}
-\AtBeginDocument{\@ifundefined{f@ffrench}{}{%
- \caption@Info{french(le) package detected}%
+\caption@AtBeginDocument{\@ifundefined{frenchTeXmods}{}{%
+ \caption@Info{frenchle/pro package is loaded}%
% \end{macrocode}
%
+% \begin{macrocode}
+ \let\captionfont@ORI\captionfont
+ \let\captionlabelfont@ORI\captionlabelfont
+ \let\@makecaption@ORI\@makecaption
+% \end{macrocode}
+
% If |\GOfrench| is defined as |\relax| all the re-definitions regarding
% captions have already been done, so we can do our patches immediately.
% Otherwise we must add our stuff to |\GOfrench|.
-%
% \begin{macrocode}
\@ifundefined{GOfrench}%
- {\let\caption@tempa\@firstofone}%
- {\def\caption@tempa{\g@addto@macro\GOfrench}}%
- \caption@tempa{%
+ {\let\@tempa\@firstofone}%
+ {\def\@tempa{\g@addto@macro\GOfrench}}%
+ \@tempa{%
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \let\captionfont\captionfont@ORI
+ \let\captionfont@ORI\@undefined
+ \let\captionlabelfont\captionlabelfont@ORI
+ \let\captionlabelfont@ORI\@undefined
+ \let\@makecaption\@makecaption@ORI
+ \let\@makecaption@ORI\@undefined
% \end{macrocode}
%
% \begin{macro}{\@cnORI}
@@ -4104,44 +4214,191 @@
% \end{macro}
%
% \begin{macro}{\@tablescaption}
-% The \package{french(le)} package sets |\caption| to |\@tablescaption| at
+% The \package{frenchle/pro} package sets |\caption| to |\@tablescaption| at
% |\begin{table}| for special treatment of footnotes.
% Therefore we have to patch |\@tablescaption| so |\caption*| will work
% inside the |table| environment.
% \begin{macrocode}
- \let\caption@tablescaption\@tablescaption
- \def\@tablescaption{\caption@caption\caption@tablescaption}%
+ \let\caption@tcORI\@tablescaption
+ \def\@tablescaption{\caption@star\relax\caption@tcORI}%
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\f@ffrench}
% \begin{macro}{\f@tfrench}
% |\f@ffrench| and |\f@tfrench| reflect |\fnum@figure| and |\fnum@table|
-% when used in french mode. These contain additional code which typesets
+% when used in French mode. These contain additional code which typesets
% the caption separator |\captionseparator| instead of the usual colon.
% Because this breaks with our |\@makecaption| code we have to remove
% this additional code here.
% \begin{macrocode}
\let\@eatDP\@undefined
- \let\caption@tempa\@empty
+ \let\@tempa\@empty
\ifx\f@ffrench\fnum@figure
- \l@addto@macro\caption@tempa{\let\fnum@figure\f@ffrench}%
+ \l@addto@macro\@tempa{\let\fnum@figure\f@ffrench}%
\fi
\ifx\f@tfrench\fnum@table
- \l@addto@macro\caption@tempa{\let\fnum@table\f@tfrench}%
+ \l@addto@macro\@tempa{\let\fnum@table\f@tfrench}%
\fi
\def\f@ffrench{\ifx\listoffigures\relax\else\figurename~\thefigure\fi}%
\def\f@tfrench{\ifx\listoftables\relax\else\tablename~\thetable\fi}%
- \caption@tempa
+ \@tempa
% \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macrocode}
-}}}
+ }%
+}}
+% \end{macrocode}
+%
+% \subsection{Package support}
+% \changes{v3.1}{2007/04/11}{Package options `float', `longtable' etc.
+% are not supported anymore, removed}
+%
+% \begin{macro}{\caption@IfPackageLoaded}
+% \changes{v3.0f}{2005/05/29}{3rd argument \meta{code} added,
+% so no extra check is needed}
+% \changes{v3.1}{2007/07/04}{Re-written \& renamed from \cs{caption@ifpackage}
+% to \cs{caption@IfPackageLoaded}}
+% |\caption@IfPackageLoaded|\marg{package}\oarg{version}\marg{true}\marg{false}\par
+% Some kind of combination of |\@ifpackageloaded| and |\@ifpackagelater|.
+% If the \meta{package} is not loaded yet, the check will be (re-)done
+% |\AtBeginDocument|, so the \meta{package} could be loaded later on, too.
+% \begin{macrocode}
+\newcommand\caption@IfPackageLoaded[1]{%
+ \@testopt{\caption@@IfPackageLoaded{#1}}{}}
+\@onlypreamble\caption@IfPackageLoaded
+% \end{macrocode}
+% \begin{macrocode}
+\long\def\caption@@IfPackageLoaded#1[#2]#3#4{%
+ \@ifpackageloaded{#1}\@firstofone{%
+ \caption@Debug{#1 package is not loaded (yet)\@gobble}%
+ \caption@AtBeginDocument}{%
+ \caption@@ifpackageloaded{#1}[#2]{#3}{#4}}}
+\@onlypreamble\caption@@IfPackageLoaded
+% \end{macrocode}
+% \begin{macrocode}
+\newcommand\caption@ifpackageloaded[1]{%
+ \@testopt{\caption@@ifpackageloaded{#1}}{}}
+\@onlypreamble\caption@ifpackageloaded
+% \end{macrocode}
+% \begin{macrocode}
+\long\def\caption@@ifpackageloaded#1[#2]{%
+ \@ifpackageloaded{#1}{%
+ \caption@Info{#1 package is loaded}%
+ \@ifpackagelater{#1}{#2}\@firstoftwo{%
+ \caption@Error{%
+ For a successful cooperation we need at least version\MessageBreak
+ `#2' of package #1,\MessageBreak
+ but only version\MessageBreak
+ `\csname ver@#1.\@pkgextension\endcsname'\MessageBreak
+ is available}%
+ \@secondoftwo}%
+ }{\@secondoftwo}}
+\@onlypreamble\caption@@ifpackageloaded
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\caption@clearmargin}
+% \changes{v3.1}{2007/05/05}{This macro and its usage added}
+% This macro will be used by some package support stuff where the usual
+% margin setting is not welcome, e.g. in the \package{sidecap} package.
+% \begin{macrocode}
+\newcommand*\caption@clearmargin{%
+ \setcaptionmargin\z@
+ \let\caption@minmargin\@undefined}
% \end{macrocode}
+% \end{macro}
%
-% \subsubsection*{\package{float} package support}
+% \begin{macrocode}
+\caption@setbool{needfreeze}{0}
+\caption@AtBeginDocument*{%
+ \caption@ifneedfreeze{%
+% \end{macrocode}
+%
+% \begin{macro}{\caption@freeze}
+% \changes{v3.1}{2007/07/22}{This macro added}
+% |\caption@freeze*|\par
+% Used by the \package{fltpage} \& \package{sidecap} package support.
+% \begin{macrocode}
+ \newcommand*\caption@freeze{%
+ \caption@teststar\caption@@freeze\@gobble\@firstofone}%
+% \end{macrocode}
+% \begin{macrocode}
+ \newcommand*\caption@@freeze[1]{%
+ \global\let\caption@SCcontinued\relax
+ \global\let\caption@SCsetup\@undefined
+ \global\let\caption@SClentry\@undefined
+ \global\let\caption@SCtext\@undefined
+ \global\let\caption@SClabel\@undefined
+% \end{macrocode}
+% \begin{macrocode}
+ \let\caption@ORI@ContinuedFloat\ContinuedFloat
+ \def\ContinuedFloat{%
+ \let\caption@ORI@setcounter\setcounter
+ \let\caption@ORI@addtocounter\addtocounter
+ \def\setcounter####1####2{\csname c@####1\endcsname####2\relax}%
+ \def\addtocounter####1####2{\advance\csname c@####1\endcsname ####2\relax}%
+ \caption@ORI@ContinuedFloat
+ \global\let\caption@SCcontinued\caption@ORI@ContinuedFloat
+ \let\setcounter\caption@ORI@setcounter
+ \let\addtocounter\caption@ORI@addtocounter}%
+ \def\captionsetup##1{%
+ \caption@g@addto@list\caption@SCsetup{##1}%
+ \caption@setup{##1}}%
+ \def\caption{%
+ \let\captionsetup\@gobble
+ \caption@star
+ {\let\caption@ORI@refstepcounter\caption@@refstepcounter
+ \def\caption@@refstepcounter########1{%
+ \advance\csname c@########1\endcsname\@ne\relax}%
+ \caption@refstepcounter\@captype
+ \let\caption@@refstepcounter\caption@ORI@refstepcounter}%
+ {\caption@dblarg\@caption@SC}}%
+ \def\@caption@SC[##1]##2{%
+ \gdef\caption@SClentry{##1}\gdef\caption@SCtext{##2}%
+ \ignorespaces}%
+ #1{% is \@gobble in star form, and \@firstofone otherwise
+ \def\label##1{\gdef\caption@SClabel{##1}\ignorespaces}}%
+% \end{macrocode}
+% \begin{macrocode}
+ }%
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\caption@defrost}
+% \changes{v3.1}{2007/07/22}{This macro added}
+% |\caption@defrost|
+% \begin{macrocode}
+ \newcommand*\caption@defrost{%
+ \ifx\caption@ORI@ContinuedFloat\@undefined
+ \caption@SCcontinued
+ \ifx\caption@SCsetup\@undefined \else
+ \expandafter\captionsetup\expandafter{\caption@SCsetup}%
+ \fi
+ \ifx\caption@SCtext\@undefined \else
+ \expandafter\expandafter\expandafter\caption
+ \expandafter\expandafter\expandafter[%
+ \expandafter\expandafter\expandafter{%
+ \expandafter\caption@SClentry\expandafter}\expandafter]%
+ \expandafter{\caption@SCtext}%
+ \fi
+ \ifx\caption@SClabel\@undefined \else
+ \expandafter\label\expandafter{\caption@SClabel}%
+ \fi
+ \else
+ \caption@Error{Internal error:\MessageBreak
+ \noexpand\caption@defrost in same group as \string\caption@freeze}%
+ \fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+ }{}%
+ \caption@undefbool{needfreeze}}
+% \end{macrocode}
+%
+% \subsubsection{The float package}
% \changes{v3.0f}{2005/05/31}{\package{float} package support rewritten and improved}
% \iffalse
% (This is a more straight-ahead implementation, but it only works with v1.3
@@ -4156,8 +4413,8 @@
%
% The main two things |\float@caption| is doing different are:
% \begin{itemize}
-% \item The caption will be typeset inside a savebox called |\@floatcapt| so
-% it can be placed above or below the float contents afterwards.
+% \item The caption will be typeset inside a |\savebox| called |\@floatcapt|
+% so it can be placed above or below the float contents afterwards.
% \item |\@makecaption| will not be used to finally typeset the caption.
% Instead |\@fs@capt| will be used which definition is part of the float
% style.
@@ -4166,191 +4423,166 @@
% itself.)
% \end{itemize}
%
-% So our main goal is to re-define |\float@caption| so our macro
-% |\caption@@make| will be used instead of |\@fs@capt|.
-%
-% To allow different caption styles for different float styles we will also
-% determine the current float style (e.g. `ruled') at run time and select
-% a caption style (and additional settings) with the same name, if defined.
-%
-% \begin{macro}{\caption@setfloatposition}
-% First of all we provide a macro which converts |\@fs@iftopcapt| (which
-% is part of a float style and controls where the caption will be typeset,
-% above or below the float contents) to our |position=| setting. Since the
-% spacing above and below the caption will be done by the float style and
-% \emph{not} by us this sounds quite useless. But in fact it isn't, since some
-% packages based on the \package{caption} package (like the \package{subfig}
-% package) could have an interest for this information and therefore use the
-% |\caption@iftop| macro we provide in our kernel. Furthermore we need this
-% information for ourself in |\captionof| which uses |\@makecaption| to
-% finally typeset the caption with skips.
% \begin{macrocode}
-\def\caption@setfloatposition{%
- \caption@setposition{\@fs@iftopcapt t\else b\fi}}
+\caption@IfPackageLoaded{float}[2001/11/08 v1.3d]{%
+ \@ifpackageloaded{floatrow}{%
+ \caption@ifpackageloaded{floatrow}[2007/08/24 v0.2a]{}{}%
+ }{%
% \end{macrocode}
-% \end{macro}
-%
-% \begin{macrocode}
-\caption@ifpackage{float}{@float@setevery}{%
- \caption@Info{float package v1.3 (or newer) detected}%
-% \end{macrocode}
-%
-% Since |\float@caption| puts the float contents into a savebox we need
-% a special version of |\captionof| which `unfolds' this box afterwards,
-% so the caption actually gets typeset. Furthermore we have to typeset
-% the spacing above and below the caption for ourself, since this space is
-% not part of the box.
-%
-% Please note that this version of |\captionof| only works \emph{outside}
-% floating environments defined with the float package, so for example
-% a |\captionof{Program}| used within a `standard' |figure| or a
-% |minipage| will work fine, but not within a re-styled |figure| or
-% an |Example| environment defined with |\newfloat|.
-% (We don't check for this so you'll get wired errors if you try to do so!)
-%
-% \begin{macro}{\caption@of@float}
-% Usually no special action is necessary, so we define |\caption@of@float|
-% to |\@gobble|. We will redefine it later on to |\@firstofone| to activate
-% the code which `unfolds' the savebox.
-% \begin{macrocode}
- \let\caption@of@float\@gobble
-% \end{macrocode}
-% \end{macro}
%
+% \iffalse
% \begin{macro}{\caption@of}
% If the float is defined by the float package (which means |\fst@|\meta{type}
-% is defined) we activate the special treatment for such captions typeset
-% with |\captionof|. Furthermore we `execute' this float style, so
-% |\@fs@iftopcapt| is set to its proper value.
+% is defined) we `execute' this float style, so |\@fs@iftopcapt| is set to its
+% proper value.
+% Furthermore we undo the re-definition of |\caption@setfloatcapt| which was
+% done by |\float@dostyle|.
% \begin{macrocode}
- \renewcommand*\caption@of[2]{%
- \@ifundefined{fst@#2}{}{%
- \let\caption@of@float\@firstofone
- \@nameuse{fst@#2}\@float@setevery{#2}}%
- \def\@captype{#2}#1}%
+% \renewcommand*\caption@of[2]{%
+% \float@ifstyle{#2}{%
+% \float@dostyle{#2}%
+% \let\caption@setfloatcapt\@firstofone}{}%
+% \caption@settype*{#2}#1}%
% \end{macrocode}
% \end{macro}
+% \fi
%
-% \begin{macro}{\float@caption}
-% \changes{v3.0h}{2005/08/23}{Bugfix 05-08-12: \cs{captionof} sets hyperref anchor now}
-% Our version of |\float@caption| nearly looks like our version of |\@caption|.
-% The main differences are that |\@fs@capt| will be replaced by our |\caption@@make|
-% and that the savebox called |\@floatcapt| will be unfolded if requested by
-% |\captionof|. (see above)
+% \begin{macro}{\@float@setevery}
+% |\@float@setevery|\marg{float type} is provided by the \package{float}
+% package; it's called every time a floating environment defined with
+% |\newfloat| or |\restylefloat| begins.
+% We use this hook to do some adaptations and to setup the proper caption
+% style (if defined) and additional settings declared with
+% |\captionsetup|\oarg{float style}.
% \begin{macrocode}
- \let\caption@@float\float@caption
- \long\def\float@caption#1[#2]#3{%
- \caption@beginex{#1}{#2}{#3}%
- \let\@fs@capt\caption@@make
- \caption@@float{#1}[{#2}]{#3}%
+ \let\caption@ORI@float@setevery\@float@setevery
+ \def\@float@setevery#1{%
+ \float@ifcaption{#1}{%
% \end{macrocode}
%
+% First of all we set the caption position to it's proper value by
+% converting |\@fs@iftopcapt| (which is part of a float style and
+% controls where the caption will be typeset, above or below the float
+% contents) to our |position=| setting.
+% Since the spacing above and below the caption will be done by the float
+% style and \emph{not} by us this sounds quite useless. But in fact it isn't,
+% since some packages based on \thispackage\ (like the \package{subfig}
+% package) could have an interest for this information and therefore use the
+% |\caption@iftop| macro we provide in our kernel. Furthermore we need this
+% information for ourself in |\captionof| which uses |\@makecaption| to
+% finally typeset the caption with skips.
% \begin{macrocode}
- \caption@of@float{%
+ \caption@setposition{\@fs@iftopcapt t\else b\fi}%
% \end{macrocode}
-% If the \package{hyperref} package is loaded, we need to set the appropriate
-% anchor for ourself. To do so without adding extra vertical space we need
-% to save (and restore) |\prevdepth| and switch off the interline skip.
+%
+% Afterward we redefine |\caption@setfloatcapt| (which will be used inside
+% |\@caption|) so the caption will be set inside the box |\@floatcapt|,
+% without extra vertical space.
% \begin{macrocode}
- \@ifundefined{hyper@@anchor}{}{%
- \begingroup
- \@tempdima\prevdepth
- \nointerlineskip
- \let\leavevmode\relax
- \hyper@@anchor\@currentHref\relax
- \prevdepth\@tempdima
- \endgroup}%
+ \renewcommand\caption@setfloatcapt{%
+ \let\@makecaption\caption@@make
+ \global\setbox\@floatcapt\vbox}%
% \end{macrocode}
%
+% To allow different caption styles for different float styles we also
+% determine the current float style (e.g. `ruled') and select
+% a caption style (and additional settings) with the same name, if defined.
% \begin{macrocode}
- \def\caption@@make##1##2{\unvbox\@floatcapt}%
- \@makecaption{}{}}%
+ \float@getstyle\float@style{#1}%
+ \caption@setstyle*\float@style
+ \caption@setoptions\float@style
% \end{macrocode}
%
% \begin{macrocode}
- \caption@end}%
+ }{}%
+ \caption@freezeHref % will be defrosted in \float@makebox
+ \caption@ORI@float@setevery{#1}}%
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\@float@setevery}
-% |\@float@setevery|\marg{float type} is provided by the \package{float} package;
-% it's called every time a floating environment defined with |\newfloat| or
-% |\restylefloat| begins.
-% We use this hook to do some adaptations and to setup the proper caption style
-% (if defined) and additional settings declared with
-% |\captionsetup|\oarg{float style}.
-% \begin{macrocode}
- \let\caption@float@setevery\@float@setevery
- \def\@float@setevery#1{%
+% \begin{macro}{\caption@setfloatcapt}
+% \changes{v3.1}{2007/06/23}{This macro added}
+% Here we do a consistency check: If the caption to handle is a one from
+% the \package{float} package (|\newfloat| or |\restylefloat|),
+% |\setfloatcapt| should be redefined, so actually this error should never
+% occur.
+% \begin{macrocode}
+ \renewcommand*\caption@setfloatcapt{%
+ \float@ifcaption\@captype{%
+ \caption@Error{Something is going wrong here...\MessageBreak
+ For a removal of this problem please consult the\MessageBreak
+ caption package documentation, especially the sections\MessageBreak
+ about the `float' and the `wrapfig' package}%
+ \@gobble
+ }{%
+ \@firstofone
+ }}%
% \end{macrocode}
+% \end{macro}
%
-% \LaTeX{} and most packages use |\|\meta{type}|name|
-% to provide a macro for the float name -- for example the command
-% |\figurename| will usually contain the name of the floating environment
-% |figure|:
+% \begin{macro}{\caption@settypehook}
+% \changes{v3.1}{2007/07/08}{float package hook added}
+% \LaTeX\ and almost every other packages use
+% |\|\meta{type}|name|
+% to provide a macro for the type resp.~environment name -- for example
+% the command |\figurename| will usually contain the name of the floating
+% environment |figure|:
% \begin{quote}
% |\newcommand\figurename{Figure}|
% \end{quote}
-%
-% But the \package{float} package don't follow this naming convention,
-% it uses |\fname@|\meta{type} instead. So we have to adapt
-% |\caption@floatname| here, so our captions will be still ok.
-%
-% \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
-% |\@caption| or |\float@caption| in |\@float@c@|\meta{captype} with |\let|
-% (instead of using |\def|), so redefinitions of |\@caption| (and of course
-% our redefinition of |\float@caption|) will never been used if the
-% |\newfloat| or |\restylefloat| command takes place in front of the
-% redefinitions provided by the \package{caption} or other packages like the
-% \package{hyperref} package.
-%
-% So here we determine if the user has used |\restylefloat| or
-% |\restylefloat*| and bring |\@float@c@|\meta{captype} up-to-date.
-% This is quite easy: If |\@float@c@|\meta{captype} is the same as the
-% original or our own definition of |\float@caption|, the user has used
-% |\restylefloat| (and |\float@caption| should be used), otherwise
-% we assume he has used |\restylefloat*| (and |\@caption| should be used).
-% (This test will fail if some other package re-defines |\float@caption|,
-% too, so we have to assume that we are the only one.)
-%
-% \begin{macrocode}
- \expandafter\let\expandafter\caption@tempa\csname @float@c@#1\endcsname
- \ifx\caption@tempa\float@caption
- \else\ifx\caption@tempa\@caption
- \else\ifx\caption@tempa\caption@@float
- \caption@Info{\protect\@float@c@#1\space := \protect\float@caption}%
- \expandafter\let\csname @float@c@#1\endcsname\float@caption
- \else
- \caption@Info{\protect\@float@c@#1\space := \protect\@caption}%
- \expandafter\let\csname @float@c@#1\endcsname\@caption
- \fi\fi\fi
+% But the \package{float} package doesn't follow this common naming
+% convention:
+% For floats defined with |\newfloat| it uses |\fname@|\meta{type} instead,
+% which breaks with our code (and with |\autoref| and some other things as
+% well).
+% So we have to map the \package{float} package name to the common one here.\par
+% \Note{If the float was not defined with \cs{newfloat} but with
+% \cs{restylefloat} instead, \cs{fname@}\meta{type} is not defined.}
+% \begin{macrocode}
+ \g@addto@macro\caption@settypehook{%
+ \expandafter\ifx\csname #1name\endcsname\relax
+ \expandafter\let\csname #1name\expandafter\endcsname
+ \csname fname@#1\endcsname
+ \fi}%
% \end{macrocode}
+% \end{macro}
%
-% If the floating environment is defined with |\newfloat| or |\restylefloat|
-% (and \emph{not} with |\restylefloat*|), |\@float@c@|\meta{type}
-% will now be identical to |\float@caption|.
-%
+% \changes{v3.0f}{2005/06/26}{Skips of \env{plaintop} and \env{boxed} floats corrected}
+% \begin{macro}{\fs@plaintop}
+% \begin{macro}{\fs@boxed}
+% Since the float styles |plaintop| and |boxed| don't use |\abovecaptionskip|
+% which could be set with |skip=| (|plaintop| uses |\belowcaptionskip| instead of
+% |\abovecaptionskip|, and |boxed| uses a fixed space of |2pt|)
+% we patch the according float style macros here to change this.
% \begin{macrocode}
- \expandafter\ifx\csname @float@c@#1\endcsname\float@caption
+ \g@addto@macro\fs@plaintop{\def\@fs@mid{\vspace\abovecaptionskip\relax}}%
+ \g@addto@macro\fs@boxed{\def\@fs@mid{\kern\abovecaptionskip\relax}}%
% \end{macrocode}
+% \end{macro}
+% \end{macro}
%
-% First of all we set the caption position to it's proper value.
-% (See above definition of |\caption@setfloatposition|)
-%
+% \begin{macro}{\float@ifstyle}
+% \changes{v3.1}{2007/06/10}{This macro added}
+% |\float@ifstyle|\marg{type}\marg{if-clause}\marg{else-clause}\par
+% Checks if the given \meta{type} (e.g.~|figure|) is associated with a
+% float style (e.g.~|boxed|).
% \begin{macrocode}
- \caption@setfloatposition
+ \providecommand*\float@ifstyle[1]{%
+ \expandafter\ifx\csname fst@#1\endcsname\relax
+ \expandafter\@secondoftwo
+ \else
+ \expandafter\@firstoftwo
+ \fi}%
% \end{macrocode}
+% \end{macro}
%
-% Now we'll have to determine the current float style.
-% This is not so easy because the only hint provided by the \package{float}
-% package is the macro |\fst@|\meta{float type} which points to the macro
-% which represents the float style.
-% So for example after
+% \begin{macro}{\float@getstyle}
+% \changes{v3.1}{2007/06/10}{This macro added}
+% |\float@getstyle|\marg{cmd}\marg{type}\par
+% Determining the float style is not so easy because the only hint
+% provided by the \package{float} package is the macro
+% |\fst@|\meta{float type} which points to the macro which represents the
+% float style. So for example after
% \begin{quote}
% |\floatstyle{ruled}|\\
% |\newfloat{Program}{tbp}{lop}|
@@ -4358,298 +4590,617 @@
% |\fst@Program| will be defined as
% \begin{quote}
% |\def\fst@Program{\fs@ruled}|\quad.
-% \end{quote}
-%
-% So here is what we do: We copy |\fst@|\meta{float type} to |\caption@fst| and
-% make it a string so we can gobble the first four tokens (= |\fs@|), so only the
-% the name of the float style is left.
-%
-% \begin{macrocode}
- \expandafter\let\expandafter\caption@fst\csname fst@#1\endcsname
- \edef\caption@fst{\noexpand\string\expandafter\noexpand\caption@fst}%
- \edef\caption@fst{\noexpand\@gobblefour\caption@fst}%
-% \edef\caption@fst{\caption@fst}%
-% \end{macrocode}
-%
-% |\caption@fst| now contains the float style (e.g. `ruled')
-% so we can use it to set the corresponding style (if defined) and additional options.
-%
-% \begin{macrocode}
- \caption@setstyle*\caption@fst
- \caption@settype\caption@fst
+% \end{quote}\par
+% So here is what we do: We make the first level expansion of
+% |\fst@|\meta{float type} a string so we can gobble the first four tokens
+% (= |\fs@|), so only the the name of the float style is left.\par
+% \emph{TODO:} We need to convert the catcodes here.
+% \begin{macrocode}
+ \providecommand*\float@getstyle[2]{%
+ \edef#1{%
+ \noexpand\expandafter\noexpand\@gobblefour\noexpand\string
+ \expandafter\expandafter\expandafter\noexpand
+ \csname fst@#2\endcsname}%
+ \edef#1{#1}%
+ \caption@Debug{floatstyle{#2} = `#1'}}%
% \end{macrocode}
+% \end{macro}
%
+% \begin{macro}{\float@setstyle}
+% \changes{v3.1}{2007/06/10}{This macro added}
+% |\float@setstyle|\marg{type}\marg{style}\par
+% Sets or changes the float style associated with \meta{type}.
% \begin{macrocode}
- \fi
+ \providecommand*\float@setstyle[2]{%
+ \expandafter\edef\csname fst@#1\endcsname{%
+ \expandafter\noexpand\csname fs@#2\endcsname}}%
% \end{macrocode}
+% \end{macro}
%
+% \begin{macro}{\float@dostyle}
+% \changes{v3.1}{2007/07/23}{This macro added}
+% |\float@dostyle|\marg{type}
% \begin{macrocode}
- \caption@float@setevery{#1}}%
+ \providecommand*\float@dostyle[1]{%
+ \@nameuse{fst@#1}\@float@setevery{#1}}%
% \end{macrocode}
% \end{macro}
%
-% \changes{v3.0f}{2005/06/26}{Skips of \env{plaintop} and \env{boxed} floats corrected}
-%
-% \begin{macro}{\fs@plaintop}
-% \begin{macro}{\fs@boxed}
-% The float styles |plaintop| and |boxed| don't use our skip which can be set
-% with |skip=| : |plaintop| uses |\belowcaptionskip| instead of
-% |\abovecaptionskip|, and |boxed| uses a fixed space of |2pt|.
-% So we patch the according float style macros here to change this.
-% \begin{macrocode}
- \g@addto@macro\fs@plaintop{\def\@fs@mid{\vspace\abovecaptionskip\relax}}%
- \g@addto@macro\fs@boxed{\def\@fs@mid{\kern\abovecaptionskip\relax}}%
+% \begin{macro}{\float@ifcaption}
+% \changes{v3.1}{2007/06/23}{This macro added}
+% |\float@ifcaption|\marg{type}\marg{if-clause}\marg{else-clause}\par
+% Here we determine if the user has used |\newfloat| resp.~|\restylefloat|,
+% or |\restylefloat*|.
+% This is quite easy: If |\@float@c@|\meta{captype} is the same as
+% |\float@caption|, the user has used |\newfloat| or |\restylefloat|,
+% otherwise we assume he has used |\restylefloat*|.
+% (This test will fail if some package re-defines |\float@caption|,
+% so we have to assume that there is no one.)
+% \begin{macrocode}
+ \providecommand*\float@ifcaption[1]{%
+ \expandafter\ifx\csname @float@c@#1\endcsname\float@caption
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi}%
% \end{macrocode}
% \end{macro}
-% \end{macro}
%
% \begin{macrocode}
+}}{%
+ \providecommand*\float@ifstyle[1]{\@secondoftwo}%
+ \providecommand*\float@ifcaption[1]{\@secondoftwo}%
+% \clearcaptionsetup{boxed}% used by the floatrow package?
}
% \end{macrocode}
%
% The skip between `boxed' floats and their caption defaults to |2pt|.
%
% \begin{macrocode}
-\captionsetup[boxed]{skip=2pt}
+\captionsetup*[boxed]{skip=2pt} % do not issue a warning when not used
% \end{macrocode}
%
% \changes{v3.0f}{2005/05/26}{\opt{strut=0} added to caption style \opt{ruled}}
% \changes{v3.0f}{2005/05/27}{Option \opt{ruled} fixed}
% To emulate the `ruled' definition of |\@fs@capt| we provide a caption style
% `ruled' with appropriate options. But if the package option |ruled| was
-% specified, we setup some caption parameters to emulate the behaviour
-% of the \package{caption} package \version{1.x} option |ruled| instead:
-% The current caption settings will be used, but without margin and without
+% specified, we setup some caption parameters to emulate the behavior
+% of \thispackage\ \version{1.x} option |ruled| instead, i.e.,
+% the current caption settings will be used, but without margin and without
% `single-line-check'.
% \begin{macrocode}
\caption@ifbool{ruled}{%
- \captionsetup[ruled]{margin=0pt,singlelinecheck=0}%
+ \captionsetup[ruled]{margin=0pt,minmargin=0,singlelinecheck=0}%
}{%
\DeclareCaptionStyle{ruled}{labelfont=bf,labelsep=space,strut=0}%
}
\caption@undefbool{ruled}
% \end{macrocode}
%
-% \subsubsection*{\package{floatrow} package support}
-% \changes{v3.0f}{2005/06/01}{Support of the \package{floatrow} package added}
+% \subsubsection{The floatflt package}
+% \changes{v3.1}{2007/06/10}{Support of the \package{floatflt} package added}
%
-% The \package{floatrow} package is already adapted for usage with the
-% \package{caption} package. So the main work has already been done by
-% Mrs.Lapko, there are only two little things we have to take care about:
+% \begin{macrocode}
+\caption@IfPackageLoaded{floatflt}[1996/02/27 v1.3]{%
+% \end{macrocode}
%
+% \begin{macro}{\floatingfigure}
+% We patch |\floatingfigure| so |\caption@floatflt| will be used.
% \begin{macrocode}
-\caption@ifpackage{floatrow}{flrow@setlist}{%
- \caption@Info{floatrow package v0.1f (or newer) detected}%
+ \let\caption@ORI@floatingfigure\floatingfigure
+ \def\floatingfigure{%
+ \caption@floatflt{figure}%
+ \caption@ORI@floatingfigure}%
% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\floatingtable}
+% Same with |\floatingtable|\ldots
+% \begin{macrocode}
+ \let\caption@ORI@floatingtable\floatingtable
+ \def\floatingtable{%
+ \caption@floatflt{table}%
+% \caption@setautoposition b%
+ \caption@ORI@floatingtable}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\caption@floatflt}
+% Here we do two things:
+% \begin{enumerate}
+% \item We use |\caption@setoptions{floating|\meta{type}|}| so
+% |\captionsetup[floating|\meta{type}|]{|\ldots|}| is supported.
+% \item |\linewidth| must be set correctly.
+% Usually this is done by |\@parboxrestore| inside |\@caption|,
+% but since we use |\@caption@boxrestore| we have to map this to
+% |\@parboxrestore| instead.
+% \end{enumerate}
+% \begin{macrocode}
+ \newcommand*\caption@floatflt[1]{%
+ \caption@settype{#1}%
+ \caption@setoptions{floating#1}%
+ \let\caption@boxrestore\@parboxrestore}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+}{}
+% \end{macrocode}
+%
+% \iffalse
+% \subsubsection{The floatrow package}
+% \changes{v3.0f}{2005/06/01}{Support of the \package{floatrow} package added}
+%
+% \begin{macrocode}
+%\caption@IfPackageLoaded{floatrow}[2007/07/01 v0.1p]{%
+% \end{macrocode}
+%
+% The \package{floatrow} package is already adapted for usage with
+% \thispackage. So the main work has already been done by
+% Mrs.~Lapko, there is only one little thing we have to take care about:
%
% \begin{macro}{\caption@of}
% Captions typeset with |\captionof| should have the correct layout,
-% so we have to `activate' this layout here with |\flrow@setlist|.
-% \par{\small (Please note that this version of |\captionof| has the same
-% restrictions than the |\captionof| offered for floating environments
-% defined with the \package{float} package, see above.)}
+% therefore we have to `activate' this layout here with |\flrow@setlist|.
% \begin{macrocode}
- \renewcommand*\caption@of[2]{%
- \def\@captype{#2}\flrow@setlist{{#2}}#1}%
+% \renewcommand*\caption@of[2]{%
+% \flrow@setlist{{#2}}% TODO: always do this?
+% \caption@settype*{#2}#1}%
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\caption@floatname}
-% The \package{floatrow} package follows the same naming convention
-% as the \package{float} package; so we have to adapt |\caption@floatname|
-% here, too.
% \begin{macrocode}
- \renewcommand*\caption@floatname[1]{%
- \@nameuse{\@ifundefined{fname@#1}{#1name}{fname@#1}}}%
- \renewcommand*\caption@setfloatname[1]{%
- \@namedef{\@ifundefined{fname@#1}{#1name}{fname@#1}}}%
+%}{}
+% \end{macrocode}
+% \fi
+%
+% \subsubsection{The fltpage package}
+% \changes{v3.1}{2007/07/22}{Support of the \package{fltpage} package added}
+%
+% \begin{macrocode}
+\caption@IfPackageLoaded{fltpage}[1998/10/29 v.0.3]{%
+ \caption@setbool{needfreeze}{1}%
+% \end{macrocode}
+%
+% \begin{macro}{\FP@helpNote}
+% Original code:
+% \begin{verbatim}
+% \newcommand{\FP@helpNote}[2]{%
+% \typeout{FP#1 is inserted on page \pageref{#2}!}}%
+% \end{verbatim}%^^A
+% \begin{macrocode}
+ \renewcommand\FP@helpNote[2]{%
+ \begingroup % save \caption@thepage
+ \caption@pageref{#2}%
+ \typeout{FP#1 is inserted on page \caption@thepage!}%
+ \endgroup}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\FP@floatBegin}
+% Original code:
+% \begin{verbatim}
+% \newcommand{\FP@floatBegin}[1]{%
+% \gdef\@captype{#1}%
+% \global\let\FP@savedCaptionCommand\caption%
+% \global\let\FP@savedLabelCommand\label%
+% \ifthenelse{\equal{\@captype}{figure}}
+% {\global\let\old@Fnum\fnum@figure}%
+% {\global\let\old@Fnum\fnum@table}%
+% \let\FP@LabelText\@empty%
+% \let\FP@CaptionText\@empty%
+% \let\FP@optionalCaptionText\@empty%
+% \renewcommand\label[1]{\gdef\FP@LabelText{##1}}%
+% \renewcommand\caption[2][]{%
+% \gdef\FP@optionalCaptionText{##1}\gdef\FP@CaptionText{##2}}%
+% \begin{lrbox}{\FP@floatCorpusBOX}%
+% }%
+% \end{verbatim}%^^A
+% \begin{macrocode}
+ \renewcommand*\FP@floatBegin[1]{%
+ \def\@captype{#1}%
+ \let\FP@LabelText\@empty
+ \begin{lrbox}{\FP@floatCorpusBOX}%
+ \caption@ifFPrefcap\caption@freeze{%
+ \def\label##1{\gdef\FP@LabelText{##1}\ignorespaces}%
+ \caption@freeze*}}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\FP@floatEnd}
+% Original code:
+% \begin{verbatim}
+% \newcommand{\FP@floatEnd}{%
+% \end{lrbox}%
+% \global\setbox\FP@floatCorpusBOX=\box\FP@floatCorpusBOX
+% \stepcounter{FP@\@captype C}%
+% \FP@savedLabelCommand{\FP@positionLabel}%
+% \FP@helpNote{\@captype}{\FP@positionLabel}%
+% \FP@float
+% {\FP@positionLabel}% location label test
+% {\begin{\@captype}[p!]
+% \usebox{\FP@floatCorpusBOX}%
+% \refstepcounter{\@captype}%
+% \ifthenelse{\equal{\FP@LabelText}{\@empty}}
+% {}{\FP@savedLabelCommand{\expandafter\protect\FP@LabelText}}%
+% \end{\@captype}}
+% {\addtocounter{\@captype}{-1}}
+% {\begin{\@captype}[b!]%
+% \ifthenelse{\equal{\FP@guide}{\@empty}}%
+% {}{\ifthenelse{\equal{\@captype}{figure}}%
+% {\renewcommand{\fnum@figure}{\old@Fnum\ {\FP@guide}}}%
+% {\renewcommand{\fnum@table}{\old@Fnum\ {\FP@guide}}}}%
+% \setlength{\abovecaptionskip}{2pt plus2pt minus 1pt} % length above caption
+% \setlength{\belowcaptionskip}{2pt plus2pt minus 1pt} % length above caption
+% \FP@separatorCaption%
+% \ifthenelse{\equal{\FP@optionalCaptionText}{\@empty}}%
+% {\FP@savedCaptionCommand{\expandafter\protect\FP@CaptionText}}%
+% {\FP@savedCaptionCommand[\expandafter\protect\FP@optionalCaptionText]%
+% {\expandafter\protect\FP@CaptionText}}%
+% \end{\@captype}}%
+% }%
+% \end{verbatim}%^^A
+% \begin{macrocode}
+ \renewcommand*\FP@floatEnd{%
+ \end{lrbox}%
+% \end{macrocode}
+% \begin{macrocode}
+ \stepcounter{FP@\@captype C}%
+ \caption@label\FP@positionLabel
+ \FP@helpNote\@captype\FP@positionLabel
+% \end{macrocode}
+% \begin{macrocode}
+ \let\FP@ContinuedFloat\relax
+ \FP@float
+ {\FP@positionLabel}% location label test
+ {\begin\@captype[p!]%
+ \FP@ContinuedFloat
+ \usebox\FP@floatCorpusBOX
+ \caption@ifFPlistcap
+ {\caption@refstepcounter\@captype
+ \expandafter\caption@makecurrent\expandafter\@captype
+ \expandafter{\caption@SClentry}}%
+ {\expandafter\captionlistentry\expandafter{\caption@SClentry}}%
+ \caption@anchor\relax
+ \ifx\FP@LabelText\@empty \else
+ \expandafter\label\expandafter{\FP@LabelText}%
+ \fi
+ \end\@captype}%
+ {\let\FP@ContinuedFloat\ContinuedFloat
+ \caption@ifcompatibility
+ {\let\caption@ContinuedFloat\@gobble}%
+ {\caption@clearsetup{ContinuedFloat}%
+ \caption@clearsetup{continued\@captype}}}%
+ {\begin\@captype[b!]%
+ \FP@ContinuedFloat
+ \let\FP@savedSetfnumCommand\caption@setfnum
+ \def\caption@setfnum##1{%
+ \FP@savedSetfnumCommand{##1}%
+ \ifx\FP@guide\@empty \else
+ \expandafter\l@addto@macro\csname fnum@##1\endcsname{\ {\FP@guide}}%
+ \fi}%
+ \setlength\abovecaptionskip{2pt plus 2pt minus 1pt}% length above caption
+ \setlength\belowcaptionskip{2pt plus 2pt minus 1pt}% length below caption
+ \caption@setoptions{FP\@captype}%
+ \FP@separatorCaption
+ \caption@ifFPlistcap{}{\caption@set@bool\caption@iflof0}%
+ \caption@defrost
+ \end\@captype}%
+ }%
% \end{macrocode}
% \end{macro}
%
% \begin{macrocode}
+}{%
+ \let\caption@ifFPlistcap\@undefined
+ \let\caption@ifFPrefcap\@undefined
}
% \end{macrocode}
%
-% \subsubsection*{\package{hyperref} package support}
+% \subsubsection{The hyperref package}
% \changes{v3.0f}{2005/06/11}{Support of the \package{hyperref} package added}
+% \changes{v3.1}{2007/03/09}{Usage of \cs{hyper@makecurrent} instead of
+% \cs{theHfigure} as indicator for \package{hyperref} package}
%
-% When the \package{hyperref} package is used we have the problem
-% that the usage of |\ContinuedFloat| will create duplicate
-% hyperlinks -- both |\@currentHlabel| and |\@currentHref| will be the same
-% for the main float and the continued ones. So we have to make sure
-% unique labels and references will be created each time. We do this
-% by extending |\theHfigure| and |\theHtable|, so for continued floats
-% the scheme
-% \begin{quote}\meta{type}|.|\meta{type \#}|.|\meta{continue \#}\end{quote}
-% will be used instead of
-% \begin{quote}\meta{type}|.|\meta{type \#}\quad\quad.\end{quote}
-% \par{\small(This implementation follows an idea from Steven Douglas Cochran.)}
-% \par{\small Note: This does not help if |\Hy@naturalnamestrue| is set.}
+% \begin{macrocode}
+\caption@IfPackageLoaded{hyperref}[2003/11/30 v6.74m]{%
+ \@ifundefined{hyper@makecurrent}{% hyperref has stopped early
+ \PackageWarningNoLine{caption}{%
+ Hyperref support is turned off\MessageBreak
+ because hyperref has stopped early}%
+ }{%
+% \end{macrocode}
%
+% \begin{macro}{\caption@@refstepcounter}
+% We redefine |\caption@@refstepcounter| so |\H@refstepcounter| will be used
+% instead of |\refstepcounter| inside |\caption| \& |\captionlistentry|.
% \begin{macrocode}
-\caption@ifpackage{hyperref}{theHfigure}{%
- \caption@Info{hyperref package v6.74m (or newer) detected}%
+ \renewcommand*\caption@@refstepcounter{\H@refstepcounter}%
% \end{macrocode}
+% \end{macro}
%
-% \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|.
-% \begin{macrocode}
- \def\caption@ContinuedFloat#1{%
- \@ifundefined{theH#1}{}{%
- \@ifundefined{CF@#1}{%
- \expandafter\caption@newcounter\csname CF@#1\endcsname
- \caption@resetContinuedFloat{#1}}{}%
- \expandafter\caption@stepcounter\csname CF@#1\endcsname
- \expandafter\l@addto@macro\csname theH#1\endcsname{%
- .\csname CF@#1\endcsname}%
- \let\caption@resetContinuedFloat\@gobble
- }}%
+% \begin{macro}{\caption@makecurrent}
+% We redefine |\caption@makecurrent| so a \package{hyperref} label
+% will be defined inside |\@caption|.
+% \begin{macrocode}
+ \renewcommand*\caption@makecurrent[2]{%
+ \caption@makecurrentHref{#1}%
+ \caption@Debug{hyper current=\@currentHref}%
+ \def\@currentlabelname{#2}}%
+% \end{macrocode}
+% \begin{macrocode}
+ \newcommand*\caption@makecurrentHref{\hyper@makecurrent}%
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\caption@resetContinuedFloat}
-% If a continuation counter is defined, we reset it.
+% \begin{macro}{\caption@makestart}
+% We redefine |\caption@makestart| so a \package{hyperref} label
+% will be defined inside |\caption@start|.\par
+% Since we offer |\ContinuedFloat| the float counter can be change between
+% `now' and |\caption|, i.e., we simply don't know the figure or table counter
+% yet and therefore we are not able to generate the `right' \package{hyperref}
+% label.
+% Two different solutions of this problem came into my mind:
+% \begin{enumerate}
+% \item I could use the aux file for this purpose.\par
+% -or-
+% \item I set |hypertexnames=false| locally.
+% Furthermore I use |#1.xxx.|\meta{counter} (instead of |#1.|\meta{counter})
+% as naming scheme for |\@currentHref| to avoid conflicts with other hyper
+% links which are generated with |hypertexnames=true|.
+% \end{enumerate}
+% The first idea has the advantage that the `right' anchor name will be
+% generated, but one needs an additional \LaTeX\ run if figures or tables
+% will be inserted or removed.\par
+% The second idea has the advantage that it's very easy to implement, but
+% has some side-effects, e.g. the anchor names don't follow the figure or
+% table label names anymore.\par
+% Since I'm lazy I implemented the second idea, maybe I will revise this
+% later on.
+% \begin{macrocode}
+ \renewcommand*\caption@makestart[1]{%
+ \begingroup
+ \Hy@hypertexnamesfalse
+ \gdef\@currentHlabel{}%
+ \hyper@makecurrent{#1.xxx}%
+ \endgroup
+ \caption@Debug{hyper start=\@currentHref}}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\caption@anchor}
+% We redefine |\caption@anchor| so a \package{hyperref} anchor
+% will be set inside |\@caption|.
% \begin{macrocode}
- \def\caption@resetContinuedFloat#1{%
- \@ifundefined{CF@#1}{}{%
- \expandafter\caption@setcounter\csname CF@#1\endcsname0}}%
+ \renewcommand\caption@anchor[1]{%
+ \caption@Debug{hyper anchor \@currentHref}%
+ % If we cannot have nesting, the anchor is empty.
+ \ifHy@nesting
+ \hyper@@anchor{\@currentHref}{#1}%
+ \else
+ \Hy@raisedlink{\hyper@@anchor{\@currentHref}{\relax}}#1%
+ \fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\caption@@anchor}
+% We define |\caption@@anchor| so a \package{hyperref} anchor
+% will be set inside |\caption@start|.
+% \begin{macrocode}
+ \newcommand*\caption@@anchor[1]{%
+ \caption@Debug{hyper anchor #1}%
+ \begingroup
+ \@tempdima\prevdepth
+ \nointerlineskip
+ \vspace*{-\caption@hypcapspace}%
+ \let\leavevmode\relax
+ \hyper@@anchor{#1}\relax
+ \vspace*{\caption@hypcapspace}%
+ \prevdepth\@tempdima
+ \endgroup}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\caption@@ContinuedFloat}
+% \changes{v3.1}{2007/07/02}{Format of \package{hyperref} extension changed}
+% When the \package{hyperref} package is used we have the problem
+% that the usage of |\ContinuedFloat| will create duplicate
+% hyper links -- |\@currentHref| will be the same for the main float and
+% the continued ones. So we have to make sure unique labels and references
+% will be created each time. We do this by extending |\theHfigure| and
+% |\theHtable|, so for continued floats the scheme
+% \begin{quote}\meta{type}|.|\meta{type \#}|\alph{|\meta{continued \#}|}|\end{quote}
+% will be used instead of
+% \begin{quote}\meta{type}|.|\meta{type \#}\quad\quad.\end{quote}
+% \par{\small(This implementation follows an idea from Steven Douglas Cochran.)}
+% \Note{This does not help if the \package{hyperref} package option
+% \texttt{naturalnames=true} is set.}
+% \begin{macrocode}
+ \renewcommand*\caption@@ContinuedFloat[1]{%
+ \@ifundefined{theH#1}{}{%
+ \expandafter\l@addto@macro\csname theH#1\endcsname{%
+ \@alph\c@ContinuedFloat}}}%
% \end{macrocode}
% \end{macro}
%
% \begin{macrocode}
-}
+ \newif\if@capstart
% \end{macrocode}
%
-% \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|.\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.
-% We have to change this so our definition of |\caption| will always be
-% used.
-% \item Both, |\capstart| and |\hc@@caption|, call |\hyper@makecurrent|.
-% But since we offer |\ContinuedFloat| the float counters could have changed
-% between these both calls! So we fix this by saving the \package{hyperref}
-% 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.\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
-% number. This collides with a following |\ContinuedFloat|, too, so we have
-% to move this call from here to |\caption|. (Since we set
-% |\Hy@hypertexnamesfalse| we can do this without problems.)
-% \end{enumerate}
+% \begin{macro}{\caption@start}
+% \changes{v3.0l}{2007/02/20}{%
+% \cs{caption@currentHref} renamed to \cs{hc@currentHref}}
+% \changes{v3.1}{2007/06/21}{%
+% This macro renamed from \cs{capstart} to \cs{caption@start} and revised}
+% This one emulates the \package{hypcap} package (if |hypcap=true|).
+% \begin{macrocode}
+ \def\caption@start{%
+ \caption@ifhypcap{%
+ \ifvmode
+% \end{macrocode}
%
+% Generate the \package{hyperref} label and set the \package{hyperref} anchor,
+% usually both is done inside |\@caption|.
% \begin{macrocode}
-\caption@ifpackage{hypcap}{hc@caption}{%
- \caption@Info{hypcap package v1.0 (or newer) detected}%
+ \caption@makestart\@captype
+ \caption@@anchor\@currentHref
% \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|:
+% Prevent |\@caption| from generating a new \package{hyperref} label,
+% use the label we save in |\hc@currentHref| instead.
+% (We also support the |\@capstart| flag from the \package{hypcap} package.)
% \begin{macrocode}
- \let\caption@capstart\capstart
- \def\capstart{%
+ \global\@capstarttrue
+ \let\hc@currentHref\@currentHref
+ \def\caption@makecurrentHref##1{%
+ \global\@capstartfalse
+ \global\let\@currentHref\hc@currentHref}%
% \end{macrocode}
-% First of all we update |\hc@org@caption| to correct the problem that the
-% \package{hypcap} package has saved an older definition of |\caption|.
+%
+% Prevent |\@caption| from generating a \package{hyperref} anchor since this
+% has already been done.
% \begin{macrocode}
- \let\hc@org@caption\caption
+ \let\caption@anchor\@firstofone
+ \let\caption@@anchor\@gobble
% \end{macrocode}
-% Since we don't know the float counter yet (it could be changed with
-% |\ContinuedFloat| afterwards!) we make sure |\H@refstepcounter| will
-% not be used and |\Hy@hypertexnamesfalse| is set, so unique
-% \package{hyperref} labels will be generated by the original
-% definition of |\capstart|.
-% Afterwards we save the reference which was generated by
-% |\hyper@makecurrent|.
% \begin{macrocode}
- \begingroup
- \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
+ \else
+ \PackageWarning{caption}{Wrong TeX mode, no hyperlink anchor was set}%
+ \fi}{}}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\caption@@start}
+% Will be used by |\caption@freezeHref|. Apart from that we issue a warning
+% if we expect a saved \package{hyperref} label coming from |\caption@start|,
+% but there isn't any.
+% \begin{macrocode}
+ \def\caption@@start{%
+ \@ifundefined{hc@currentHref}{%
+ \PackageWarning{caption}{%
+ The option `hypcap=true' will be ignored for this\MessageBreak
+ particular \string\caption}}{}}%
% \end{macrocode}
+% \end{macro}
%
-% The \package{hypcap} package restores the previous definition of |\caption|
-% inside |\hc@@caption|. But since we will call this inside a group later on
-% (making this restauration non-working), we have to make this for ourself
-% inside |\caption|.
-% (This would not be necessary if \package{hypcap} would do this inside
-% |\hc@caption| instead of |\hc@@caption|.)\par
-% 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}
- \@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}}%
+% \begin{macro}{\caption@freezeHref}
+% Suppress |\caption@start| from generating a \package{hyperref} label and
+% setting a \package{hyperref} anchor. Instead if |\@caption| generates a
+% \package{hyperref} label, it will be stored in |\caption@currentHref|.
+% Furthermore we need to redefine |\caption@setfloatcapt| so no
+% \package{hyperref} anchor will be set in |\@caption|.
+% \iffalse
+% (Since |\caption@setfloatcapt| will be set to |\@firstofone| inside
+% |\subcaption| there is no need to add its restauration to
+% |\subcaption@settypehook|.)
+% \fi
+% \begin{macrocode}
+ \def\caption@freezeHref{%
+ \let\caption@ORI@start\caption@start
+ \def\caption@start{\let\caption@start\caption@ORI@start}%
% \end{macrocode}
% \begin{macrocode}
- }%
+ \let\caption@ORI@@start\caption@@start
+% \l@addto@macro\subcaption@settypehook{%
+% \let\caption@@start\caption@ORI@@start}%
+ \global\let\caption@currentHref\@undefined
+ \def\caption@@start{\global\let\caption@currentHref\@currentHref}%
+% \end{macrocode}
+% \begin{macrocode}
+ \let\caption@ORI@setfloatcapt\caption@setfloatcapt
+ \renewcommand*\caption@setfloatcapt{%
+ \ifx\caption@currentHref\@undefined \else
+ \let\caption@anchor\@firstofone
+ \fi
+ \caption@ORI@setfloatcapt}}%
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\hc@@caption}
-% Here comes our version of |\hc@@caption|:
+% \begin{macro}{\caption@defrostHref}
+% If there is a freezed |\@currentHref|, we set the \package{hyperref}
+% anchor here.
% \begin{macrocode}
- \let\caption@hc@@caption\hc@@caption
- \long\def\hc@@caption#1[#2]#3{%
- \caption@beginex{#1}{#2}{#3}%
+ \def\caption@defrostHref{%
+ \ifx\caption@currentHref\@undefined \else
+ \caption@@anchor\caption@currentHref
+ \global\let\caption@currentHref\@undefined
+ \fi}%
% \end{macrocode}
+% \end{macro}
%
-% Beside the usual |\caption@begin| and |\caption@end| stuff (to support local
-% options etc.) we make sure our saved \package{hyperref} reference will be
-% used.
+% \begin{macro}{\float@makebox}
+% Do our own redefinition of |\float@makebox|, if it was redefined by
+% the \package{hyperref} package.
% \begin{macrocode}
- \let\caption@hyper@makecurrent\hyper@makecurrent
- \def\hyper@makecurrent\@captype{%
- \let\hyper@makecurrent\caption@hyper@makecurrent
- \global\let\@currentHref\hc@currentHref}%
+ \@ifundefined{HyOrg@float@makebox}{}{%
+ \caption@Debug{%
+ Redefining \noexpand\float@makebox (again)\@gobble}%
+ \let\Hy@float@makebox\float@makebox
+ \renewcommand\float@makebox[1]{%
+ \HyOrg@float@makebox{#1\relax \caption@defrostHref}}%
+ }%
% \end{macrocode}
+% \end{macro}
%
% \begin{macrocode}
- \caption@hc@@caption{#1}[{#2}]{#3}%
- \caption@end}%
+}}{}
+% \end{macrocode}
+%
+% \subsubsection{The hypcap package}
+% \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}
+%
+% \begin{macrocode}
+\caption@IfPackageLoaded{hypcap}{% v1.0
+ \ifx\caption@start\relax \else % hyperref hasn't stopped early
+% \end{macrocode}
+%
+% If the \package{hypcap} package was loaded, we give up our own
+% \package{hypcap} emulation and give the control to the \package{hypcap}
+% package instead.
+%
+% \begin{macro}{\capstart}
+% We do this simply by mapping |\capstart| to |\caption@start|,
+% although our code does not behave exactly like the original one:
+% The original |\capstart| has an effect on the next |\caption|
+% only but our version affects \emph{all} |\caption|s in the same
+% environment, at least unless a new |\capstart| will be placed.
+% \begin{macrocode}
+ \let\caption@ORI@capstart\capstart
+ \let\capstart\caption@start
+ \let\caption@start\relax
+ \let\caption@@start\relax
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\caption@hypcapspace}
+% Furthermore we map our |\caption@hypcapspace| to |\hypcapspace|
+% offered by the \package{hypcap} package.
% \begin{macrocode}
-}
+ \renewcommand*\caption@hypcapspace{\hypcapspace}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\float@makebox}
+% Redo the redefinition of |\float@makebox|, if necessary.
+% \begin{macrocode}
+ \@ifundefined{Hy@float@makebox}{}{%
+ \caption@Debug{%
+ Restore hyperref redefinition of \string\float@makebox\@gobble}%
+ \let\float@makebox\Hy@float@makebox
+ \let\Hy@float@makebox\@undefined}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+ \fi}{}
% \end{macrocode}
%
-% \subsubsection*{\package{listings} package support}
+% \subsubsection{The listings package}
% \changes{v3.0b}{2004/05/16}{Support of the \package{listings} package added}
%
% \begin{macrocode}
-\caption@ifpackage{listings}{lst@MakeCaption}{%
- \caption@Info{listings package v1.2 (or newer) detected}%
+\caption@IfPackageLoaded{listings}[2004/02/13 v1.2]{%
% \end{macrocode}
%
% \begin{macro}{\lst@MakeCaption}
@@ -4657,43 +5208,153 @@
% |\lst@MakeCaption| so the original stuff is nested with
% |\caption@begin| and |\caption@end|.
% \begin{macrocode}
- \let\caption@lst@MakeCaption\lst@MakeCaption
+ \let\caption@ORI@lst@MakeCaption\lst@MakeCaption
\def\lst@MakeCaption#1{%
+ \caption@setoptions{lstlisting}%
% \end{macrocode}
%
% If the |position=| is set to |auto|, we take over the |captionpos=| setting
% from the \package{listings} package.
% Note that we won't do this otherwise, so \package{listings} settings like
% |abovecaptionskip=0pt,belowcaptionskip=10pt,captionpos=t| will \emph{not}
-% cause different outputs with or without the \package{caption} package loaded.
+% cause different outputs with or without \thispackage\ loaded.
% \begin{macrocode}
- \def\caption@autoposition{\caption@setposition{#1}}%
+ \caption@setautoposition{#1}%
% \end{macrocode}
%
% \begin{macrocode}
\caption@begin{lstlisting}%
- \caption@lst@MakeCaption{#1}%
+ \caption@ORI@lst@MakeCaption{#1}%
\caption@end}%
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\ext@lstlisting}
+% Since the \package{listings} package do not define |\ext@lstlisting|,
+% but we needed it when |\captionof{lstlisting}| will be done by the end user,
+% we define it here.
% \begin{macrocode}
-}
+ \providecommand*\ext@lstlisting{lol}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\lst@@caption}
+% We define |\lst@@caption| to non-|\@empty|, so |\fnum@lstlisting| will
+% produce a numbered listing caption, which makes |\captionof{lstlisting}|
+% work correctly.
+% \begin{macrocode}
+ \g@addto@macro\caption@settypehook{\let\lst@@caption\relax}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+}{}
% \end{macrocode}
%
-% \subsubsection*{\package{longtable} package support}
+% \subsubsection{The longtable package}
+%
+% \begin{macro}{\LTcaptype}
+% \changes{v3.1}{2007/07/06}{This macro and its support added}
+% |\LTcaptype| is preset to |table|.
+% \begin{macrocode}
+\providecommand*\LTcaptype{table}
+% \end{macrocode}
+% \end{macro}
%
% \begin{macrocode}
-\caption@ifpackage{longtable}{LT@makecaption}{%
- \caption@Info{longtable package v3.15 (or newer) detected}%
+\caption@IfPackageLoaded{longtable}[1995/05/24 v3.14]{%
+% \end{macrocode}
+% \begin{macrocode}
+ \RequirePackage{ltcaption}[2007/09/01]%
+ \let\LT@@makecaption\@undefined
% \end{macrocode}
%
+% \begin{macro}{\LT@array}
+% \changes{v3.1}{2007/07/22}{This redefinition added}
+% We redefine |\LT@array| here to get |\captionsetup|\marg{options}
+% working inside |longtable|s.
+% \begin{macrocode}
+ \let\caption@ORI@LT@array\LT@array
+ \renewcommand*\LT@array{%
+% \end{macrocode}
+% |\captionsetup| for longtable:
+% \begin{macrocode}
+ \global\let\caption@opt@@longtable\@undefined
+ \def\captionsetup##1{\noalign{%
+ \@captionsetup\@gobble[@longtable]{##1}%
+ \global\let\caption@opt@@longtable\caption@opt@@longtable}}%
+% \end{macrocode}
+% |\captionlistentry| for longtable:
+% \begin{macrocode}
+ \def\captionlistentry##1{\noalign{%
+ \caption@listentry[\LTcaptype]{##1}}}%
+% \end{macrocode}
+% |\ContinuedFloat| for longtable:\\
+% {\small(Commented out, since it's not deeply tested and quite useless anyway)}
+% \Note{\package{hyperref} versions $<$ v6.76j uses $2\times$ \cs{hyper@makecurrent}}
+% \begin{macrocode}
+% \caption@ifhypcap{%
+% \let\caption@ORI@hyper@makecurrent\hyper@makecurrent
+% \def\hyper@makecurrent##1{%
+% \let\hyper@makecurrent\caption@ORI@hyper@makecurrent
+% \caption@makestart{##1}%
+% \let\Hy@LT@currentHlabel\@currentHlabel
+% \let\Hy@LT@currentHref\@currentHref
+% \def\hyper@makecurrent####1{%
+% \let\@currentHlabel\Hy@LT@currentHlabel
+% \let\@currentHref\Hy@LT@currentHref}}%
+% \let\caption@ORI@ContinuedFloat\ContinuedFloat
+% \def\ContinuedFloat{\noalign{%
+% \gdef\caption@setContinuedFloat{%
+% \let\caption@resetContinuedFloat\@gobble}%
+% \def\caption@setoptions####1{%
+% \g@addto@macro\caption@setContinuedFloat{%
+% \caption@setoptions{####1}}}%
+% \let\@captype\LTcaptype
+% \caption@ORI@ContinuedFloat}}%
+% }{%
+% \def\ContinuedFloat{\noalign{%
+% \caption@Error{\noexpand\ContinuedFloat inside longtables\MessageBreak
+% is only available with `hypcap=true'}}}%
+% }%
+% \global\let\caption@setContinuedFloat\@empty
+ \def\ContinuedFloat{\noalign{%
+ \caption@Error{\noexpand\ContinuedFloat outside float}}}%
+% \end{macrocode}
+% \begin{macrocode}
+ \caption@ORI@LT@array}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\LT@c@ption}
+% The original implementation:
+% \begin{verbatim}
+% \def\LT@c@ption#1[#2]#3{%
+% \LT@makecaption#1\fnum@table{#3}%
+% \def\@tempa{#2}%
+% \ifx\@tempa\@empty\else
+% {\let\\\space
+% \addcontentsline{lot}{table}{\protect\numberline{\thetable}{#2}}}%
+% \fi}
+% \end{verbatim}%^^A
+% Our implementation uses |\LTcaptype| instead of |{table}|:
+% \begin{macrocode}
+\def\LT@c@ption#1[#2]#3{%
+ \LT@makecaption#1{\csname fnum@\LTcaptype\endcsname}{#3}%
+ \def\@currentlabelname{#2}%
+ \caption@addcontentsline\LTcaptype{#2}}%
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\LT@makecaption}
-% \changes{v3.0d}{2004/08/10}{Bugfix 04-08-04: \cs{abovecaptionskip} \& \cs{belowcaptionskip} will be used now}
-% \changes{v3.0e}{2005/05/05}{Bugfix: \cs{captionsetup[longtable]} overrides \cs{LTcapwidth} now}
+% \changes{v3.0d}{2004/08/10}{%
+% Bugfix 04-08-04: \cs{abovecaptionskip} \& \cs{belowcaptionskip} will be used now}
+% \changes{v3.0e}{2005/05/05}{%
+% Bugfix: \cs{captionsetup[longtable]} overrides \cs{LTcapwidth} now}
% \changes{v3.0h}{2005/10/07}{\cs{caption@LT@make} introduced}
% |\LT@makecaption|\marg{cmd}\marg{label}\marg{text}\par
-% Original code:
+% \smallskip
+% The original definition:
% \begin{verbatim}
% \def\LT@makecaption#1#2#3{%
% \LT@mcol\LT@cols c{\hbox to\z@{\hss\parbox[t]\LTcapwidth{%
@@ -4707,9 +5368,10 @@
% \fi
% \endgraf\vskip\baselineskip}%
% \hss}}}
-% \end{verbatim}
+% \end{verbatim}%^^A
+% Our definition:
% \begin{macrocode}
- \def\LT@makecaption#1#2#3{%
+ \renewcommand\LT@makecaption[3]{%
\caption@LT@make{%
% \end{macrocode}
%
@@ -4722,46 +5384,51 @@
% that it shall overwrite our own setting.
% (But |\captionsetup[longtable]{width=|\ldots|}| will overwrite |\LTcapwidth|.)
% \begin{macrocode}
- \caption@letfloattype{longtable}{%
- \ifdim\LTcapwidth=4in \else
- \setcaptionwidth\LTcapwidth
- \fi}%
+ \caption@settype*\LTcaptype
+ \ifdim\LTcapwidth=4in \else
+ \setcaptionwidth\LTcapwidth
+ \fi
+ \caption@setoptions{longtable}%
+% \caption@setContinuedFloat
+ \caption@setoptions{@longtable}%
% \end{macrocode}
%
+% \iffalse
% The default |position=| setting for longtables is |top|.
-% (This emulates the standard behaviour of the \package{longtable} package
+% (This emulates the standard behavior of the \package{longtable} package
% which has no skip above the caption but a skip below it.)
-% \begin{macrocode}
-% \caption@setdefaultpos{t}%
- \let\caption@defaultpos\@firstoftwo
-% \end{macrocode}
+% \fi
%
% |position=auto| is a bad idea for longtables, but we do our very best.
% This works quite well for captions inside the longtable contents, but
% not for captions inside the longtable (end)foot.
+% \Note{This should be `top' if unclear!}
% \begin{macrocode}
- \def\caption@autoposition{%
- \caption@setposition{\ifcase\LT@rows t\else b\fi}}%
+ \caption@setautoposition{\ifcase\LT@rows t\else b\fi}%
% \end{macrocode}
%
+% \changes{v3.1}{2007/05/05}{\cs{caption@normalsize} added}
% \begin{macrocode}
- \caption@begin{table}%
+ \caption@resetContinuedFloat\LTcaptype
+ \caption@begin\LTcaptype
+ \caption@normalsize
% \end{macrocode}
%
% The following skip has the purpose to correct the height of the
% |\parbox[t]|. Usually it's the height of the very first line, but
% because of our extra skips (|\abovecaptionskip| and |\belowcaptionskip|)
-% it's always |0pt|.
+% it's always |0pt|.\par
% (A different idea would be typesetting the first skip outside the longtable
% column with |\noalign{\vskip|\ldots|}|, but this means we have to move
% |\caption@begin| to some other place because it does not work in tabular
-% mode\ldots)
+% mode. And at the moment I have no idea on how to do this in an elegant
+% way\ldots)
% \begin{macrocode}
\vskip-\ht\strutbox
% \end{macrocode}
%
-% This should look familiar. We do our skips and use |\caption@@make| to
-% typeset the caption itself.
+% The following code should look familiar. We do our skips and use
+% |\caption@@make| to typeset the caption itself.
% \begin{macrocode}
\caption@iftop{\vskip\belowcaptionskip}{\vskip\abovecaptionskip}%
\caption@@make{#2}{#3}\endgraf
@@ -4770,52 +5437,230 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\caption@LT@make}
-% Typesets the caption as centered |\multicolumn|\ldots
% \begin{macrocode}
- \newcommand\caption@LT@make[1]{%
- \LT@mcol\LT@cols c{\hbox to\z@{\hss\parbox[t]\hsize{#1}\hss}}}%
+}{}
+% \end{macrocode}
+%
+% \subsubsection{The picinpar package}
+% \changes{v3.1}{2007/06/13}{Support of the \package{picinpar} package added}
+%
+% \begin{macrocode}
+\caption@IfPackageLoaded{picinpar}{%
+% \end{macrocode}
+%
+% \begin{macro}{\figwindow}
+% \begin{macro}{\tabwindow}
+% The \package{picinpar} package comes with its own caption code
+% (|\wincaption|, |\@wincaption|, |\@makewincaption|, \ldots)
+% so we redefine |\figwindow| \& |\tabwindow| to use |\caption| instead.
+% \begin{macrocode}
+ \long\def\figwindow[#1,#2,#3,#4] {%
+ \caption@window{figure}%
+ \caption@setoptions{figwindow}%
+ \begin{window}[#1,#2,{#3},\caption@wincaption{#4}] }%
+% \end{macrocode}
+% \begin{macrocode}
+ \long\def\tabwindow[#1,#2,#3,#4] {%
+ \caption@window{table}%
+ \caption@setoptions{tabwindow}%
+ \begin{window}[#1,#2,{#3},\caption@wincaption{#4}] }%
% \end{macrocode}
% \end{macro}
+% \end{macro}
%
+% \begin{macro}{\caption@window}
+% Beside calling |\caption@settype| we redefine |\caption@boxrestore|
+% (as in \package{floatflt} \& \package{picins} package support)
+% and |\@makecaption| (as in \package{float} package support) here.
% \begin{macrocode}
-}
+ \newcommand*\caption@window{%
+ \let\caption@boxrestore\@parboxrestore
+ \let\@makecaption\caption@@make
+ \caption@setautoposition b%
+ \caption@settype}%
% \end{macrocode}
+% \end{macro}
%
-% \subsubsection*{\package{picins} package support}
+% \begin{macro}{\caption@wincaption}
+% This one finally typesets the caption using |\caption|.
+% \begin{macrocode}
+ \newcommand\caption@wincaption[1]{%
+% \end{macrocode}
+% This will be done twice for every |figwindow| \& |tabwindow| caption --
+% on the first run |\picwd| is |0pt|, on the second run |\picwd| is |\hsize|.
+% \begin{macrocode}
+ \ifdim\picwd=\z@
+ \let\caption@makecurrent\@gobbletwo
+ \let\caption@@start\relax
+ \caption@prepareslc
+ \fi
+% \end{macrocode}
+% The argument |#1| could contain simply the caption text
+% (e.g.~|A figure caption|), but it could also contain an optional argument,
+% the \meta{lst\_entry}
+% (e.g.~|[An| |entry| |to| |the| |LOF]||{A| |figure| |caption}|).
+% Therefore we have to test if |#1| begins with~|[| or not; furthermore we
+% support a starred variant -- as in |\caption*| -- so we test for~|*|, too.
+% \begin{macrocode}
+ \edef\@tempa{\expandafter\noexpand\@car#1\@nil}%
+ \if\@tempa*
+ \let\@tempa\@firstofone
+ \else\if\@tempa[%]
+ \let\@tempa\@firstofone
+ \else
+ \let\@tempa\@empty
+ \fi\fi
+ \expandafter\caption\@tempa{#1}}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+}{}
+% \end{macrocode}
+%
+% \subsubsection{The picins package}
% \changes{v3.0j}{2006/01/26}{Support of the \package{picins} package added}
%
+% \begin{macro}{\piccaptiontype}
+% |\piccaptiontype|\marg{type}\par
+% We offer this macro for changing the \meta{type} of the caption, so the user
+% doesn't have to redefine |\@captype|, as proposed in the \package{picins}
+% documentation.
+% \Note{We define this macro here so it can be used in the
+% preamble of the document, even when \thispackage\ was loaded prior to the
+% \package{picins} package.}
% \begin{macrocode}
-\caption@ifpackage{picins}{piccaption}{%
- \caption@Info{picins package v3.0 (or newer) detected}%
+\newcommand*\piccaptiontype[1]{\def\@piccaptype{#1}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+\caption@IfPackageLoaded{picins}{%
+% \end{macrocode}
+%
+% Initial set |\@piccaptype| and undefine |\@captype| which was set to
+% |figure| by the \package{picins} package.
+% \begin{macrocode}
+ \@ifundefined{@piccaptype}{%
+ \caption@iftype{%
+ \let\@piccaptype\@captype
+ }{%
+ \def\@piccaptype{figure}%
+ }%
+ }{}%
+ \let\@captype\@undefined
% \end{macrocode}
%
% \begin{macro}{\piccaption}
-% Original code:
+% The original code:
% \begin{verbatim}
% \def\piccaption{\@ifnextchar [{\@piccaption}{\@piccaption[]}}
-% \end{verbatim}
+% \end{verbatim}%^^A
+% Our code uses |\caption@star| so |\piccaption*| works,
+% and |\caption@dblarg| so |\piccaption{}| works correctly.
+% \begin{macrocode}
+ \def\piccaption{\caption@star\relax{\caption@dblarg\@piccaption}}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\make@piccaption}
+% The original code:
+% \begin{verbatim}
+% \def\make@piccaption{%
+% [...]
+% \setbox\@TEXT=\vbox{\hsize\hsiz@\caption[\sh@rtf@rm]{\capti@nt@xt}}%
+% }
+% \end{verbatim}%^^A
+% In our code we have to correct several things:
+% \begin{enumerate}
+% \item |\@captype| must be defined, since we have removed the global
+% definition.
+% \item We use |\caption@setoptions{parpic}| so
+% |\captionsetup[parpic]{|\ldots|}| is supported.
+% \item |\linewidth| must be set correctly.
+% Usually this is done by |\@parboxrestore| inside |\@caption|,
+% but since we use |\@caption@boxrestore| we have to map this to
+% |\@parboxrestore| instead.
+% \item The two arguments of |\caption| (|\sh@rtf@rm| \& |\capti@nt@xt|)
+% should be expanded on first level so |\caption[]{|\ldots|}| and
+% |\caption[|\ldots|]{}| work correctly.
+% \end{enumerate}
+% \begin{macrocode}
+ \let\caption@ORI@make@piccaption\make@piccaption
+ \def\make@piccaption{%
+ \let\caption@ORI\caption
+% \end{macrocode}
+% \begin{macrocode}
+ \long\def\caption[##1]##2{%
+ \caption@freezeHref % will be defrosted in \ivparpic
+ \caption@settype\@piccaptype
+ \ifnum\c@piccaptionpos>2\relax
+ \caption@clearmargin
+ \else
+ \captionwidth\z@ % do not use "width=" setting
+ \fi
+ \caption@setoptions{parpic}%
+ \let\caption@boxrestore\@parboxrestore
+ \caption@setautoposition b%
+% \end{macrocode}
+% \begin{macrocode}
+ \expandafter\expandafter\expandafter\caption@ORI
+ \expandafter\expandafter\expandafter[%
+ \expandafter\expandafter\expandafter{%
+ \expandafter##1\expandafter}\expandafter]\expandafter{##2}}%
+% \end{macrocode}
+% {\footnotesize\begin{quote}
+% \leavevmode\llap{-or-\quad}%^^A
+% |\begingroup|\\
+% | \toks0\expandafter{##1}| |\toks2\expandafter{##2}|\\
+% | \edef\x{\endgroup|\\
+% | \noexpand\caption@ORI[{\the\toks0}]{\the\toks2}}|\\
+% | \x|
+% \end{quote}
+% \begin{quote}
+% \leavevmode\llap{-or-\quad}%^^A
+% |\edef\x{%|\\
+% | \noexpand\caption@ORI[{\unexpanded\expandafter{##1}}]%|\\
+% | {\unexpanded\expandafter{##2}}}|\\
+% |\x|
+% \end{quote}}
% \begin{macrocode}
- \def\piccaption{\@dblarg\@piccaption}
-% \def\piccaption{\caption@caption{\@dblarg\@piccaption}}
+ \caption@ORI@make@piccaption
+ \let\caption\caption@ORI}%
% \end{macrocode}
% \end{macro}
%
-% {\itshape TODO: Make |\piccaption[]{|\ldots|}| and |\piccaption{}| work}
+
+% \begin{macro}{\ivparpic}
+% We need to set our \package{hyperref} anchor here.
+% Not bullet-proof since we have to redefine |\noindent| here!
+% \begin{macrocode}
+ \let\caption@ORI@ivparpic\ivparpic
+ \def\ivparpic(#1,#2)(#3,#4)[#5][#6]#7{%
+ \let\caption@ORI@noindent\noindent
+ \def\noindent{%
+ \caption@defrostHref
+ \let\noindent\caption@ORI@noindent
+ \noindent}%
+ \caption@ORI@ivparpic(#1,#2)(#3,#4)[#5][#6]{#7}%
+ \let\noindent\caption@ORI@noindent}%
+% \end{macrocode}
+% \end{macro}
%
% \begin{macrocode}
+}{%
+ \let\piccaptiontype\@undefined
}
% \end{macrocode}
%
-% \subsubsection*{\package{rotating} package support}
+% \subsubsection{The rotating package}
%
% \begin{macrocode}
-\caption@ifpackage{rotating}{@rotcaption}{%
- \caption@Info{rotating package v2.0 (or newer) detected}%
+\caption@IfPackageLoaded{rotating}[1995/08/22 v2.10]{%
% \end{macrocode}
%
% \begin{macro}{\rotcaption}
-% \changes{v3.0c}{2004/07/16}{Bugfix: Check for \cs{caption@caption} removed}
+% \changes{v3.0c}{2004/07/16}{Bugfix: Check for \cs{caption@star} removed}
% \changes{v3.0i}{2005/12/07}{Rewritten, works with \package{hyperref} now}
% Make |\rotcaption*| work.
% \begin{macrocode}
@@ -4829,7 +5674,7 @@
% Make |\rotcaptionof(*)| work.
% \begin{macrocode}
\def\rotcaptionof{%
- \@ifstar{\caption@of{\rotcaption*}}{\caption@of\rotcaption}}%
+ \caption@teststar\caption@of{\rotcaption*}\rotcaption}%
% \end{macrocode}
% \end{macro}
%
@@ -4849,8 +5694,8 @@
% \fi
% \nobreak\hspace{12pt}% <== \nobreak added (AR)
% }
-% \end{verbatim}
-% Our version emulates this behaviour, but if |width=| is set,
+% \end{verbatim}%^^A
+% Our version emulates this behavior, but if |width=| is set,
% the rotated caption is always typeset as |minipage|.
% (Note that |margin=| is not supported here.)
% \begin{macrocode}
@@ -4862,12 +5707,11 @@
\setcaptionwidth{.8\textheight}%
\caption@slc{#1}{#2}{.8\vsize}{%
\let\caption@makerot\caption@@make
- \setcaptionmargin\z@
-% \setlength\captionindent\z@
+ \caption@clearmargin
% \long\def\captionbox##1##2{\hbox{\hsize=.8\textheight\relax##2}}%
% (not needed because \rotatebox uses an \hbox anyway)
\let\captionbox\@secondoftwo}%
- \caption@setbool{slc}{0}% been there, done that
+ \caption@set@bool\caption@ifslc0% been there, done that
\fi
% \end{macrocode}
%
@@ -4883,14 +5727,14 @@
% \end{macro}
%
% \begin{macrocode}
-}
+}{}
% \end{macrocode}
%
-% \subsubsection*{\package{sidecap} package support}
+% \subsubsection{The sidecap package}
%
% \begin{macrocode}
-\caption@ifpackage{sidecap}{endSC@FLOAT}{%
- \caption@Info{sidecap package v1.4d (or newer) detected}%
+\caption@IfPackageLoaded{sidecap}[1999/05/11 v1.4d]{%
+ \caption@setbool{needfreeze}{1}%
% \end{macrocode}
%
% \begin{macro}{\SC@caption}
@@ -4898,71 +5742,58 @@
% \changes{v3.0e}{2005/05/05}{Bugfix: Empty captions are handled correctly now}
% \changes{v3.0e}{2005/05/05}{Priority of options fixed}
% \changes{v3.0h}{2005/10/03}{Bugfix: Always use \cs{AtBeginDocument} to set \cs{SC@caption}}
-% First of all, we let sidecap use an actual definition of |\caption|.\\
-% (This is only required for version 1.5d of the sidecap package.)
+% First of all, we let \package{sidecap} use a current definition of |\caption|.\\
+% (This is only required for version 1.5d of the \package{sidecap} package.)
% \begin{macrocode}
- \@ifundefined{caption@caption}%
- {\let\caption@tempa\AtBeginDocument}%
- {\let\caption@tempa\@firstofone}%
- \caption@tempa{\let\SC@caption=\caption}%
+ \caption@AtBeginDocument{\let\SC@caption=\caption}%
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\SC@zfloat}
% \changes{v3.0b}{2004/05/16}{Local definition of \cs{captionsetup} added}
-% \changes{v3.0c}{2004/07/16}{Bugfix 04-07-15: Check for \cs{caption@caption} removed}
+% \changes{v3.0c}{2004/07/16}{Bugfix 04-07-15: Check for \cs{caption@star} removed}
% This macro will be called at the start of the environment, here is a good
% opportunity to do some adaptations to |\caption| and |\captionsetup|.
% \begin{macrocode}
- \let\caption@SC@zfloat\SC@zfloat
+ \let\caption@ORI@SC@zfloat\SC@zfloat
\def\SC@zfloat#1#2#3[#4]{%
-% \end{macrocode}
-%
-% Note: |#2| is either |figure| or |table| and will be stored to |\SC@captype|
-% by the original version of |\SC@zfloat|.
-% \begin{macrocode}
- \caption@SC@zfloat{#1}{#2}{#3}[#4]%
+ \caption@ORI@SC@zfloat{#1}{#2}{#3}[#4]%
% \end{macrocode}
%
% Since the sidecap package uses our |\caption| code outside the
-% floating environment the regular |\captionsetup| will not work.
+% environment the regular |\captionsetup| will not work.
% So we need a special version here which saves the given argument list
% which will be executed later on.
+% Furthermore we need to make |\caption*| work.
% \begin{macrocode}
- \global\let\SC@CAPsetup\@empty
- \def\captionsetup##1{\g@addto@macro\SC@CAPsetup{,##1}}%
-% \end{macrocode}
-%
-% Make |\caption*| work.
-% \begin{macrocode}
- \let\caption@SC\caption
-% \def\caption{\renewcommand\captionsetup[1]{}\caption@caption\caption@SC}%
- \def\caption{\caption@caption\caption@SC}%
- }%
+ \caption@settype*{#2}%
+ \caption@freeze*}%
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\endSC@FLOAT}
% \changes{v3.0i}{2006/01/12}{\cs{@listdepth}\cs{z@} added}
+% \changes{v3.1}{2007/05/05}{Call of \cs{caption@setoptions}\arg{SCfloat} added}
% This macro will be called at the end of the environment, here we need to
% setup our stuff before the \package{sidecap} package actually typesets
% its caption.
% \begin{macrocode}
- \let\caption@endSC@FLOAT\endSC@FLOAT
+ \let\caption@ORI@endSC@FLOAT\endSC@FLOAT
\def\endSC@FLOAT{%
% \end{macrocode}
%
-% Note that |\@captype| isn't defined so far, this will be done inside
-% the original definition of |\endSC@FLOAT|.
-% But we define |\@captype| already here to make |\captionsetup| work
-% with |\@captype|-based options (like |type=|).
-% \begin{macrocode}
- \let\@captype\SC@captype
-% \end{macrocode}
+% \Note{\cs{@captype} isn't defined here, this will be done inside
+% the original definition of \cs{endSC@FLOAT}. But \cs{SC@captype} is
+% defined and can be used here, if needed.}
%
-% Here we execute the options set with |\captionsetup| inside this environment.
% \begin{macrocode}
- \caption@esetup\SC@CAPsetup
+ \let\caption@ORI@settype\caption@settype
+ \def\caption@settype##1{% will be done in \@xfloat
+ \caption@ORI@settype*{##1}% do not change \@currentlabel
+ \caption@setSC@justify
+ \caption@setoptions{SCfloat}%
+ \caption@setoptions{SC\@captype}%
+ \caption@start}%
% \end{macrocode}
%
% Before we can typeset the caption we need to set the margin to zero
@@ -4979,80 +5810,82 @@
% Version 1.6: & |\SC@justify| is |\@empty| when not set\\
% \end{tabular}
% \begin{macrocode}
- \caption@letfloattype{SC\@captype}{%
- \@listdepth\z@
- \setcaptionmargin\z@
+ \def\caption@setSC@justify{%
+ \caption@clearmargin
\@ifundefined{SC@justify}{}{%
- \ifx\SC@justify\@empty\else
+ \ifx\SC@justify\@empty \else
\let\caption@hj\SC@justify
\let\SC@justify\@empty
\fi}}%
% \end{macrocode}
%
-% We adapt |\caption@ifempty| so |\caption{}| will work within these
-% environments, too.
+% Make the original definition of |\endSC@FLOAT| to use our caption
+% stuff instead of its own.
+% \Note{At this point the \package{sidecap} definition of \cs{caption} is valid,
+% not the regular one!}
% \begin{macrocode}
- \long\def\caption@ifempty##1{%
- \ifx\SC@CAPtext\@empty
- \expandafter\@firstofone
- \else
- \expandafter\@gobble
- \fi}%
+ \let\caption\SC@orig@caption
+ \def\SC@orig@caption[##1]##2{\caption@defrost}%
% \end{macrocode}
%
-% \iffalse % Does not work anyway...
-% Furthermore we adapt |\caption@ifnocontentsline| so |\caption[]{|\ldots|}|
-% will work within these environments, too.
+% Finally we call the original definition of |\endSC@FLOAT|.
% \begin{macrocode}
-% \long\def\caption@ifnocontentsline##1{%
-% \ifx\SC@OPTCAPtext\@empty
-% \expandafter\@firstofone
-% \else
-% \expandafter\@gobble
-% \fi}%
+ \caption@setSC@justify % for compatibility mode
+ \caption@ORI@endSC@FLOAT}%
% \end{macrocode}
-% \fi
+% \end{macro}
%
-% Finally we call the original definition of |\endSC@FLOAT| which will
-% call our version of |\caption| to typeset the caption.
% \begin{macrocode}
- \caption@endSC@FLOAT}%
+}{}
% \end{macrocode}
-% \end{macro}
+%
+% \subsubsection{The subfigure package}
+% \changes{v3.1}{2007/04/06}{subfigure package support added (package)}
%
% \begin{macrocode}
-}
+\caption@IfPackageLoaded{subfigure}[2002/01/23 v2.1]{%
% \end{macrocode}
%
-% \subsubsection*{\package{supertabular} package support}
-%
-% \begin{macro}{\caption@setSTposition}
-% The |position=| setting will be overwritten by the
-% \package{supertabular} package: If |\topcaption| is used,
-% the position will be |top| automatically, |bottom| otherwise.
+% \begin{macro}{\sf@ifpositiontop}
+% If the \package{subfigure} package is loaded, we map |\sf@ifpositiontop|
+% to |\iffiguretopcap| resp. |\iftabletopcap|, so the \package{subfigure}
+% \version{2.1} options \opt{figbotcap} etc. will still work.
% \begin{macrocode}
-\def\caption@setSTposition{%
- \caption@setposition{\if@topcaption t\else b\fi}}
+ \def\sf@ifpositiontop{%
+ \@ifundefined{if\@captype topcap}{%
+ \@gobbletwo
+ }{%
+ \@nameuse{if\@captype topcap}%
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi
+ }}%
% \end{macrocode}
% \end{macro}
%
% \begin{macrocode}
-\caption@ifpackage{supertabular}{ST@caption}{%
- \caption@Info{supertabular package detected}%
+}{}
+% \end{macrocode}
+%
+% \subsubsection{The supertabular package}
+%
+% \begin{macrocode}
+\caption@IfPackageLoaded{supertabular}[2002/07/19 v4.1e]{%
% \end{macrocode}
%
% \begin{macro}{\tablecaption}
% \changes{v3.0e}{2005/05/05}{Made \cs{topcaption*} and \cs{bottomcaption*} work}
% Make |\topcaption*| and |\bottomcaption*| work.
% \begin{macrocode}
- \let\caption@tablecaption\tablecaption
- \def\tablecaption{\caption@caption\caption@tablecaption}%
+ \let\caption@ORI@tablecaption\tablecaption
+ \def\tablecaption{\caption@star\relax\caption@ORI@tablecaption}%
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\ST@caption}
% \changes{v3.0a}{2004/01/23}{Bugfix: Missing \cs{par} added}
-% Original code:
+% The original code:
% \begin{verbatim}
% \long\def\ST@caption#1[#2]#3{\par%
% \addcontentsline{\csname ext@#1\endcsname}{#1}%
@@ -5065,30 +5898,390 @@
% \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par
% \if@topcaption \vskip 10\p@ \fi
% \endgroup}
-% \end{verbatim}
+% \end{verbatim}%^^A
% \begin{macrocode}
\long\def\ST@caption#1[#2]#3{\par%
- \caption@letfloattype{supertabular}{}%
- \let\caption@fixposition\caption@setSTposition
+ \caption@settype*{#1}%
+ \caption@setoptions{supertabular}%
+% \end{macrocode}
+% The |position=| setting will be overwritten by the
+% \package{supertabular} package: If |\topcaption| was used,
+% the position will be |top| automatically, |bottom| otherwise.
+% \begin{macrocode}
+ \def\caption@fixposition{%
+ \caption@setposition{\if@topcaption t\else b\fi}}%
+% \end{macrocode}
+% \begin{macrocode}
\caption@beginex{#1}{#2}{#3}%
- \addcontentsline{\csname ext@#1\endcsname}{#1}%
- {\protect\numberline{%
- \csname the#1\endcsname}{\ignorespaces #2}}%
- \@parboxrestore
- \normalsize
+ \caption@boxrestore
+ \caption@normalsize
\@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par
\caption@end}%
% \end{macrocode}
% \end{macro}
%
% \begin{macrocode}
+}{%
+ \let\caption@setSTposition\@undefined
}
% \end{macrocode}
%
+% \subsubsection{The threeparttable package}
+% \changes{v3.1}{2007/05/08}{Support of the \package{threeparttable} package added}
+%
+% \begin{macrocode}
+\caption@IfPackageLoaded{threeparttable}[2003/06/13 v3.0]{%
+% \end{macrocode}
+%
+% \begin{macro}{\threeparttable}
+% Unfortunately |\@captype| is not set when |\TPT@common| will be used,
+% so we have to redefine |\threeparttable| and |\measuredfigure| instead.
+% \begin{macrocode}
+ \let\caption@ORI@threeparttable\threeparttable
+ \renewcommand*\threeparttable{%
+ \caption@settype{table}%
+ \caption@setposition a% ?
+ \caption@clearmargin
+ \caption@setoptions{threeparttable}%
+ \caption@ORI@threeparttable}%
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\measuredfigure}
+% Same here\ldots
+% \begin{macrocode}
+ \let\caption@ORI@measuredfigure\measuredfigure
+ \renewcommand*\measuredfigure{%
+ \caption@settype{figure}%
+ \caption@setposition a% ?
+ \caption@clearmargin
+ \caption@setoptions{measuredfigure}%
+ \caption@ORI@measuredfigure}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\TPT@caption}
+% The original code:
+% \begin{verbatim}
+% \def\TPT@caption#1[#2]#3{\gdef\TPT@docapt
+% {\par\global\let\TPT@docapt\@undefined \TPT@LA@caption{#1}[{#2}]%
+% {\strut\ignorespaces#3\ifhmode\unskip\@finalstrut\strutbox\fi}}%
+% \ifx\TPT@hsize\@empty \let\label\TPT@gatherlabel \abovecaptionskip\z@skip
+% \else \TPT@docapt \fi \ignorespaces}
+% \end{verbatim}%^^A
+% \begin{macrocode}
+ \def\TPT@caption#1[#2]#3{%
+ \gdef\TPT@docapt{%
+ \global\let\TPT@docapt\@undefined
+ \caption@setautoposition\caption@TPT@position
+ \TPT@LA@caption{#1}[{#2}]{#3}}%
+ \ifx\TPT@hsize\@empty
+ \let\label\TPT@gatherlabel % Bug: does not work for measuredfigures
+ \gdef\caption@TPT@position{t}%
+ \g@addto@macro\TPT@docapt\caption@TPT@eatvskip
+ \else
+ \def\caption@TPT@position{b}%
+ \TPT@docapt
+ \fi
+ \ignorespaces}%
+% \end{macrocode}
+% \begin{macrocode}
+ %\newcommand*\caption@TPT@eatvskip{\vskip-.2\baselineskip}%
+ \def\caption@TPT@eatvskip#1\vskip{#1\@tempdima=}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+}{}
+% \end{macrocode}
+%
+% \subsubsection{The wrapfig package}
+% \changes{v3.1}{2007/05/05}{Support of the \package{wrapfig} package added}
+%
+% \begin{macrocode}
+\caption@IfPackageLoaded{wrapfig}{% ver 3.3 (Oct 12, 1999)
+% \end{macrocode}
+%
+% \begin{macro}{\float@ifstyle}
+% \changes{v3.1}{2007/06/10}{This macro added}
+% |\float@ifstyle|\marg{type}\marg{if-clause}\marg{else-clause}\par
+% (see \package{float} package support for details)
+% \begin{macrocode}
+ \providecommand*\float@ifstyle[1]{%
+ \expandafter\ifx\csname fst@#1\endcsname\relax
+ \expandafter\@secondoftwo
+ \else
+ \expandafter\@firstoftwo
+ \fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\caption@restylewrapfloat}
+% This one redefines the |wrap#1| environment, e.g.~|wrapfigure|.
+% Our code uses |\caption@setoptions{wrapfigure}| so
+% |\captionsetup[wrapfigure]{|\ldots|}| will work.\par
+% But first we check if our redefinition was already done, this could
+% happen inside |\float@restyle| when the \package{wrapfig} support of
+% the \package{float} package was not installed successfully, so it has
+% not redefined |\wrap#1| there.
+% \begin{macrocode}
+ \newcommand*\caption@restylewrapfloat[1]{%
+ \expandafter\ifx\csname caption@OUR@wrap#1\expandafter\endcsname
+ \csname wrap#1\endcsname
+ \caption@Error{%
+ For a successful cooperation of the `wrapfig' package\MessageBreak
+ with the `float' package you should load the `wrapfig'\MessageBreak
+ package *after* the `float' package}%
+ \else
+ \expandafter\let\csname caption@ORI@wrap#1\expandafter\endcsname
+ \csname wrap#1\endcsname
+ \@namedef{wrap#1}{%
+ \caption@settype*{#1}%
+ \float@ifstyle{#1}{%
+ \ifx\WF@floatstyhook\@undefined
+ \caption@Error{%
+ For a successful cooperation of the `wrapfig' package\MessageBreak
+ with the `float' package you should use at least\MessageBreak
+ `wrapfig' version 3.6}%
+ \else
+ \float@dostyle{#1}%
+ \fi}{}%
+ \caption@clearmargin
+ \caption@setoptions{wrapfloat}%
+ \caption@setoptions{wrap#1}%
+ \@nameuse{caption@ORI@wrap#1}}%
+ \expandafter\let\csname caption@OUR@wrap#1\expandafter\endcsname
+ \csname wrap#1\endcsname
+ \fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% Now we redefine the \package{wrapfig} environments we know about.\par
+% If someone has placed a |\newfloat| right between |\usepackage{wrapfig}|
+% and |\usepackage{caption}| (or loads \thispackage\ first, so all these
+% patches will be done with |\AtBeginDocument|) we have bad luck since the
+% \package{float} package do not offer a list of (re)styled floats.
+% (This would finally lead to an error in |\caption@setfloatcapt|.)
+%
+% \begin{macrocode}
+ \caption@restylewrapfloat{figure}%
+ \caption@restylewrapfloat{table}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \ifx\WF@floatstyhook\@undefined \else % wrapfig v3.6
+% \end{macrocode}
+%
+% \begin{macro}{\float@restyle}
+% If the \package{wrapfig} package \version{3.6} is used, we patch
+% |\float@restyle| (if defined), too, so new or restyled floats will be
+% handled correctly, too.
+% \begin{macrocode}
+ \@ifundefined{float@restyle}{}{%
+ \toks@=\expandafter{\float@restyle{#1}% (env may or may not be defined)
+ \caption@restylewrapfloat{#1}}%
+ \edef\@tempa{\def\noexpand\float@restyle##1{\the\toks@}}%
+ \@tempa}% perform redefinitions
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\wrapfloat}
+% An additional check of the package load order:
+% If both, neither the \package{wrapfig} package nor \thispackage\ haven't
+% catch |\float@restyle|, we finally splash down at |\wrapfloat|.
+% \begin{macrocode}
+ \let\caption@ORI@wrapfloat\wrapfloat
+ \def\wrapfloat#1{%
+ \float@ifstyle{#1}{%
+ \caption@Error{%
+ For a successful cooperation of the `wrapfig' package\MessageBreak
+ with the `float' package you should load the `wrapfig'\MessageBreak
+ package *right after* the `float' package}}{}%
+ \caption@ORI@wrapfloat{#1}}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+ \fi % wrapfig v3.6
+% \end{macrocode}
+%
+% \begin{macro}{\WF@rapt}
+% We place our \package{hyperref} anchor here.\par
+% Original code:
+% \begin{verbatim}
+% \def\WF@rapt[#1]#2{% final two args: #1 = overhang, #2 = width,
+% \gdef\WF@ovh{#1}% hold overhang for later, when \width is known
+% \global\setbox\WF@box\vtop\bgroup \setlength\hsize{#2}%
+% \ifdim\hsize>\z@ \@parboxrestore \else
+% \setbox\z@\hbox\bgroup \let\wf@@caption\caption \let\caption\wf@caption
+% \ignorespaces \fi}
+% \end{verbatim}%^^A
+% Our code:
+% \begin{macrocode}
+ \def\WF@rapt[#1]#2{% final two args: #1 = overhang, #2 = width,
+ \gdef\WF@ovh{#1}% hold overhang for later, when \width is known
+ \global\setbox\WF@box\vtop\bgroup \setlength\hsize{#2}%
+ \caption@start
+ \ifdim\hsize>\z@ \@parboxrestore \else
+ \setbox\z@\hbox\bgroup \let\wf@@caption\caption \let\caption\wf@caption
+ \ignorespaces \fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+}{}
+% \end{macrocode}
+%
% \iffalse
%</package>
% \fi
%
+% \iffalse
+% --------------------------------------------------------------------------- %
+% \fi
+%
+% \clearpage
+% \begin{thebibliography}{99}
+% \bibitem{TLC2}
+% Frank Mittelbach and Michel Goossens:\\
+% \newblock {\em The {\LaTeX} Companion (2nd.~Ed.)},\\
+% \newblock Addison-Wesley, 2004.
+%
+% \bibitem{beamer}
+% Till Tantau:\\
+% \href{ftp://ctan.tug.org/tex-archive/macros/latex/contrib/beamer/doc/beameruserguide.pdf}%
+% {\emph{User Guide to the Beamer Class, Version 3.07}},\\
+% March 11, 2007
+%
+% \bibitem{KOMAScript}
+% Markus Kohm \& Jens-Uwe-Morawski:\\
+% \href{ftp://ctan.tug.org/tex-archive/macros/latex/contrib/koma-script/scrguien.pdf}%
+% {\emph{KOMA-Script -- a versatile \LaTeXe\ bundle}},\\
+% 2007-01-09
+%
+% \bibitem{NTG}
+% Victor Eijkhout:\\
+% \href{ftp://ctan.tug.org/tex-archive/macros/latex/contrib/ntgclass/classdoc.pdf}%
+% {\emph{An introduction to the Dutch \LaTeX\ document classes}},\\
+% 3 September 1989
+%
+% \bibitem{float}
+% Anselm Lingnau:\\
+% \href{ftp://ctan.tug.org/tex-archive/macros/latex/contrib/float/float.pdf}%
+% {\emph{An Improved Environment for Floats}},\\
+% 2001/11/08
+%
+% \bibitem{floatflt}
+% Mats Dahlgren:\\
+% \href{ftp://ctan.tug.org/tex-archive/macros/latex/contrib/floatflt/floatflt.pdf}%
+% {\emph{Welcome to the floatflt package}},\\
+% 1998/06/05
+%
+% \bibitem{floatrow}
+% Olga Lapko:\\
+% \href{ftp://ctan.tug.org/tex-archive/macros/latex/contrib/floatrow/floatrow.pdf}%
+% {\emph{The floatrow package documentation}},\\
+% 2006/07/24
+%
+% \bibitem{fltpage}
+% Sebastian Gross:\\
+% \href{ftp://ctan.tug.org/tex-archive/macros/latex/contrib/fltpage/fltpage.pdf}%
+% {\emph{Welcome to the beta test of fltpage package!}},\\
+% 1998/11/13
+%
+% \bibitem{hyperref}
+% Sebastian Rahtz \& Heiko Oberdiek:\\
+% \href{ftp://ctan.tug.org/tex-archive/macros/latex/contrib/hyperref/hyperref.pdf}%
+% {\emph{Hypertext marks in \LaTeX}},\\
+% June 14, 2007
+%
+% \bibitem{hypcap}
+% Heiko Oberdiek:\\
+% \href{ftp://ctan.tug.org/tex-archive/macros/latex/contrib/oberdiek/hypcap.pdf}%
+% {\emph{The hypcap package -- Adjusting anchors of captions}},\\
+% 2007/04/09
+%
+% \bibitem{listings}
+% Carsten Heinz \& Brooks Moses:\\
+% \href{ftp://ctan.tug.org/tex-archive/macros/latex/contrib/listings/listings.pdf}%
+% {\emph{The Listings Package}},\\
+% 2007/02/22
+%
+% \bibitem{longtable}
+% David Carlisle:\\
+% \href{ftp://ctan.tug.org/tex-archive/macros/latex/required/tools/longtable.pdf}%
+% {\emph{The longtable package}},\\
+% 2004/02/01
+%
+% \bibitem{picinpar}
+% Friedhelm Sowa:\\
+% \href{ftp://ctan.tug.org/tex-archive/macros/latex209/contrib/picinpar/}%
+% {\emph{Pictures in Paragraphs}},\\
+% July 13, 1993
+%
+% \bibitem{picins}
+% Joachim Bleser and Edmund Lang:\\
+% \href{ftp://ctan.tug.org/tex-archive/macros/latex209/contrib/picins/mpic.dvi}%
+% {\emph{PicIns-Benutzerhandbuch Version 3.0}},\\
+% September~1992
+%
+% \bibitem{rotating}
+% Sebastian Rahtz and Leonor Barroca:\\
+% \href{ftp://ctan.tug.org/tex-archive/macros/latex/contrib/rotating/}%
+% {\emph{A style option for rotated objects in \LaTeX}},\\
+% 1997/09/26
+%
+% \bibitem{sidecap}
+% Rolf Niepraschk \& Hubert G\"a\ss lein:\\
+% \href{ftp://ctan.tug.org/tex-archive/macros/latex/contrib/sidecap/sidecap.pdf}%
+% {\emph{The sidecap package}},\\
+% 2003/06/06
+%
+% \bibitem{subfigure}
+% Steven D. Cochran:\\
+% \href{ftp://ctan.tug.org/tex-archive/macros/latex/contrib/subfigure/subfigure.pdf}%
+% {\emph{The subfigure package}},\\
+% 2002/07/02
+%
+% \bibitem{subfig}
+% Steven D. Cochran:\\
+% \href{ftp://ctan.tug.org/tex-archive/macros/latex/contrib/subfig/subfig.pdf}%
+% {\emph{The subfig package}},\\
+% 2005/07/05
+%
+% \bibitem{supertabular}
+% Johannes Braams and Theo Jurriens:\\
+% \href{ftp://ctan.tug.org/tex-archive/macros/latex/contrib/supertabular/supertabular.pdf}%
+% {\emph{The supertabular environment}},\\
+% 2002/07/19
+%
+% \bibitem{threeparttable}
+% Donald Arseneau:\\
+% \href{ftp://ctan.tug.org/tex-archive/macros/latex/contrib/misc/threeparttable.sty}%
+% {\emph{Three part tables: title, tabular environment, notes}},\\
+% 2003/06/13
+%
+% \bibitem{wrapfig}
+% Donald Arseneau:\\
+% \href{ftp://ctan.tug.org/tex-archive/macros/latex/contrib/wrapfig/wrapfig.sty}%
+% {\emph{WRAPFIG.STY ver 3.6}},\\
+% 2003/01/31
+%
+% \bibitem{Anne}
+% Anne Br\"uggemann-Klein:\\
+% \emph{Einf\"uhrung in die Dokumentverarbeitung},\\
+% B.G. Teubner, Stuttgart, 1989
+%
+% \bibitem{refcount}
+% Heiko Oberdiek:\\
+% \href{ftp://ctan.tug.org/tex-archive/macros/latex/contrib/oberdiek/refcount.pdf}%
+% {\emph{The refcount package}},\\
+% 2006/02/20
+% \end{thebibliography}
+%
+% \iffalse
+% --------------------------------------------------------------------------- %
+% \fi
+%
% \clearpage
% \Finale
%
diff --git a/Master/texmf-dist/source/latex/caption/caption.ins b/Master/texmf-dist/source/latex/caption/caption.ins
index f6d27ff5ec0..9d140a7027f 100644
--- a/Master/texmf-dist/source/latex/caption/caption.ins
+++ b/Master/texmf-dist/source/latex/caption/caption.ins
@@ -22,25 +22,28 @@ This work has the LPPL maintenance status "maintained".
This Current Maintainer of this work is Axel Sommerfeldt.
-This work consists of the files caption.ins, caption.dtx,
-caption2.dtx, and anleitung.tex and the derived files
-caption.sty, caption2.sty, caption3.sty, and manual.tex.
+This work consists of the files caption.ins, caption.dtx, caption2.dtx,
+and ltcaption.dtx, the derived files caption.sty, caption2.sty,
+caption3.sty, and ltcaption.sty, and the user manuals caption-deu.tex,
+caption-eng.tex, and caption-rus.tex.
\endpreamble
\generate{\file{caption.sty}{\from{caption.dtx}{package}}
- \file{caption3.sty}{\from{caption.dtx}{kernel}}
- \file{manual.tex}{\from{caption.dtx}{driver}}}
+ \file{caption3.sty}{\from{caption.dtx}{kernel}}}
\generate{\file{caption2.sty}{\from{caption2.dtx}{package}}}
+\generate{\file{ltcaption.sty}{\from{ltcaption.dtx}{package}}}
\Msg{***********************************************************}
\Msg{*}
\Msg{* To finish the installation you have to move the files}
-\Msg{* `caption.sty', `caption2.sty', and 'caption3.sty'}
+\Msg{* `caption.sty', `caption2.sty', 'caption3.sty',}
+\Msg{* and `ltcaption.sty'}
\Msg{* into a directory searched by TeX.}
\Msg{*}
-\Msg{* To produce the documentation run the file `manual.tex'}
-\Msg{* (english version) or the file `anleitung.tex' (german}
-\Msg{* version) through LaTeX.}
+\Msg{* To produce the documentation run the file}
+\Msg{* `caption-eng.tex' (English version) or `caption-rus.tex'}
+\Msg{* (Russian version) or `caption-deu.tex' (German version)}
+\Msg{* through LaTeX.}
\Msg{*}
\Msg{***********************************************************}
diff --git a/Master/texmf-dist/source/latex/caption/caption2.dtx b/Master/texmf-dist/source/latex/caption/caption2.dtx
index e25b98a6723..f315613407d 100644
--- a/Master/texmf-dist/source/latex/caption/caption2.dtx
+++ b/Master/texmf-dist/source/latex/caption/caption2.dtx
@@ -18,16 +18,22 @@
%
% This Current Maintainer of this work is Axel Sommerfeldt.
%
-% This work consists of the files caption.ins, caption.dtx,
-% caption2.dtx, manual.tex, and anleitung.tex and the derived
-% files caption.sty, caption2.sty, and caption3.sty.
+% This work consists of the files caption.ins, caption.dtx, caption2.dtx,
+% and ltcaption.dtx, the derived files caption.sty, caption2.sty,
+% caption3.sty, and ltcaption.sty, and the user manuals caption-deu.tex,
+% caption-eng.tex, and caption-rus.tex.
%
% \fi
-% \CheckSum{836}
+% \CheckSum{846}
%
% \iffalse
%<*driver>
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
+\ProvidesFile{caption2.drv}%
+ [2007/08/12 v2.2 Documentated code of the (obsolete) caption2 package]
+\hbadness=9999 \newcount\hbadness \hfuzz=100pt % Make TeX shut up.
+%\errorcontextlines=3
+%
\documentclass{ltxdoc}
\setlength\parindent{0pt}
\setlength\parskip{\smallskipamount}
@@ -39,7 +45,10 @@
\fi
\fi
%
-\usepackage{caption2}[2007/04/06]
+\usepackage{hypdoc}
+\hypersetup{pdfkeywords={LaTeX, package, caption2},pdfstartview={}}
+%
+\usepackage{caption2}[2007/08/12]
%
%<+driver>\OnlyDescription
%
@@ -55,11 +64,16 @@
% \let\package\puresf\def\thispackage{\package{caption2}}
% \let\env\purett \let\opt\purett
%
+% \GetFileInfo{caption2.drv}
+% \let\docdate\filedate
% \GetFileInfo{caption2.sty}
-% \title{The \thispackage\ package\thanks{This package has version number
-% \fileversion, last revised \filedate.}}
-% \author{Axel Sommerfeldt\\\texttt{caption@sommerfee.de}}
-% \date{2007/04/06}
+%
+% \title{The (obsolete) \texorpdfstring{\package{caption2} package\thanks{%^^A
+% This package has version number \fileversion, last revised \filedate.}}%^^A
+% {caption2 package}}
+% \author{Axel Sommerfeldt\\
+% \href{mailto:caption@sommerfee.de}{\texttt{caption@sommerfee.de}}}
+% \date{\docdate}
% \maketitle
%
% \changes{v2.0}{1995/10/09}{New experimental version: Many new commands and features}
@@ -78,11 +92,11 @@
%
% 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
-% without documentation in 1995 because of the demand for new features and
+% without documentation in 1995 because of the strong demand for new features and
% adaptations to other packages like the \package{longtable} and
% \package{subfigure} package.
%
-% Even in the next years I found no time to reintegrate some of the
+% But within 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
@@ -92,7 +106,7 @@
%
% In 2003 I finally found some (more) time, so a new regular release $3.0$
% of the \package{caption} package could be build with massive help from
-% Frank Mittelbach\cite{A-W:GMS94} and Steven Cochran\cite{subfigure}.
+% Frank Mittelbach and Steven Cochran.
% It was released in December 2003 and superseded the neglected
% \package{caption2} package.
%
@@ -127,7 +141,7 @@
%
% This means migrating to the actual \package{caption} package should not be
% 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
+% If not, please don't hesitate to write me an e-mail asking for
% maintainance.
%
% \StopEventually{}
@@ -183,24 +197,37 @@
%
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption2}[2007/04/11 v2.2a Customising captions (AS)]
-\PackageWarningNoLine{caption2}{%
- *** THIS PACKAGE IS OBSOLETE, PLEASE USE caption ***}
+\ProvidesPackage{caption2}[2007/08/12 v2.2b Customising captions (AS)]
+% \end{macrocode}
+%
+% \changes{v2.2b}{2007/06/15}{Made obsolete warning even more annoying}
+% \begin{macrocode}
+\PackageWarning{caption2}{%
+ ****************************************************\MessageBreak
+ THIS PACKAGE IS OBSOLETE:\MessageBreak
+ This package attempts to provide an caption 2.0/2.1\MessageBreak
+ author environment so that OLD documents can be\MessageBreak
+ successfully processed.\MessageBreak
+ It should NOT be used for NEW documents! New\MessageBreak
+ documents should use the caption package instead.\MessageBreak
+ ****************************************************\@gobbletwo}%
% \end{macrocode}
%
% \subsection{Loading the caption3 kernel}
%
% \begin{macrocode}
-\RequirePackage{caption3}[2007/03/04] % needs v3.0m or newer
+\RequirePackage{caption3}[2007/08/12] % needs v3.1 or newer
% \end{macrocode}
%
-% \subsection{Check against the regular \package{caption} package}
+% \subsection{Check against the regular caption package}
% \changes{v2.2}{2007/04/06}{Check against regular \package{caption} package added}
% \changes{v2.2a}{2007/04/11}{Bugfix: Usage of \cs{caption@error} replaced by \cs{PackageError}}
%
% \begin{macrocode}
\@ifpackageloaded{caption}{%
- \PackageError{caption2}{You can't use both the caption *and* caption2 package}{\caption@eh}%
+ \PackageError{caption2}{%
+ You can't use both, the (current) caption *and*\MessageBreak
+ the (obsolete) caption2 package}\caption@eh
\endinput
}{}
% \end{macrocode}
@@ -229,10 +256,16 @@
% \end{macrocode}
% \end{macro}
%
-% \changes{v2.1}{2002/02/20}{New ifs \cs{ifcaptionlabel} and \cs{ifignoreLTcapwidth}}
+% \begin{macro}{\captionindent}
+% \changes{v2.2b}{2007/08/12}{Re-added since the \package{caption3} kernel uses \cs{caption@indent} now}
+% \cs{captionindent} will be used in caption style \texttt{indent} and specifies the indention
+% after the first line.
% \begin{macrocode}
-\newif\ifcaption@temp
+\let\captionindent\caption@indent
% \end{macrocode}
+% \end{macro}
+%
+% \changes{v2.1}{2002/02/20}{New ifs \cs{ifcaptionlabel} and \cs{ifignoreLTcapwidth}}
%
% \begin{macro}{\ifcaptionlabel}
% If \cs{ifcaptionlabel} is not set the caption label should be suppressed;
@@ -241,11 +274,11 @@
% \begin{macrocode}
\def\ifcaptionlabel{%
\ifcaption@star
- \caption@tempfalse
+ \@tempswafalse
\else
- \caption@temptrue
+ \@tempswatrue
\fi
- \ifcaption@temp}
+ \if@tempswa}
\def\captionlabeltrue{\caption@starfalse}
\def\captionlabelfalse{\caption@startrue}
% \end{macrocode}
@@ -257,8 +290,8 @@
% \changes{v2.2}{2007/04/06}{New definition, based on \cs{caption@ifslc}}
% \begin{macrocode}
\def\ifonelinecaptions{%
- \caption@ifslc{\caption@temptrue}{\caption@tempfalse}%
- \ifcaption@temp}
+ \caption@ifslc{\@tempswatrue}{\@tempswafalse}%
+ \if@tempswa}
\def\onelinecaptionstrue{\caption@setbool{slc}{1}}
\def\onelinecaptionsfalse{\caption@setbool{slc}{0}}
% \end{macrocode}
@@ -839,7 +872,7 @@
% \end{macrocode}
% \end{macro}
%
-% \subsubsection{Support of the \puresf{float} package}
+% \subsubsection{Support of the float package}
%
% \begin{macrocode}
\caption@ifpackage{float}{floatc@plain}{}{%
@@ -954,7 +987,7 @@
\fi}
% \end{macrocode}
%
-% \subsubsection{Support of the \puresf{longtable} package}
+% \subsubsection{Support of the longtable package}
%
% \begin{macrocode}
\caption@ifpackage{longtable}{LT@makecaption}{}{%
@@ -1009,7 +1042,7 @@
\fi}
% \end{macrocode}
%
-% \subsubsection{Support of the \puresf{subfigure} package}
+% \subsubsection{Support of the subfigure package}
%
% Some of the following code will not work within \cs{if},
% because of the (yet) undefined \cs{if}\textit{xxx}s. So we simply define
@@ -1285,32 +1318,47 @@
%</package>
% \fi
%
+% \clearpage
% \begin{thebibliography}{9}
-% \bibitem{float}
+% \bibitem{float}
% Anselm Lingnau:
-% \textsl{An Improved Environment for Floats},
+% \href{ftp://ctan.tug.org/tex-archive/macros/latex/contrib/float/float.pdf}%
+% {\emph{An Improved Environment for Floats}},
% 2001/11/08
-% \bibitem{longtable}
+%
+% \bibitem{longtable}
% David Carlisle:
-% \textsl{The longtable package},
+% \href{ftp://ctan.tug.org/tex-archive/macros/latex/required/tools/longtable.pdf}%
+% {\emph{The longtable package}},
% 2000/10/22
-% \bibitem{rotating}
+%
+% \bibitem{rotating}
% Sebastian Rahtz and Leonor Barroca:
-% \textsl{A style option for rotated objects in \LaTeX},
+% \iffalse
+% \href{ftp://ctan.tug.org/tex-archive/macros/latex/contrib/rotating/rotating.dtx}%
+% {\emph{A style option for rotated objects in \LaTeX}},
+% \else
+% \emph{A style option for rotated objects in \LaTeX},
+% \fi
% 1997/09/26
-% \bibitem{subfigure}
-% Steven Douglas Cochran:
-% \textsl{The subfigure package},
+%
+% \bibitem{subfigure}
+% Steven D. Cochran:
+% \href{ftp://ctan.tug.org/tex-archive/macros/latex/contrib/subfigure/subfigure.pdf}%
+% {\emph{The subfigure package}},
% 2002/02/14
-% \bibitem{A-W:GMS94}
+%
+% \bibitem{A-W:GMS94}
% Michel Goossens, Frank Mittelbach and Alexander Samarin:
% \newblock \textsl{The {\LaTeX} Companion},
% \newblock Addison-Wesley, Reading, Massachusetts, 1994.
-% \bibitem{Anne}
+%
+% \bibitem{Anne}
% Anne Br\"uggemann-Klein:
% \textsl{Einf\"uhrung in die Dokumentverarbeitung},
% B.G. Teubner, Stuttgart, 1989
-% \bibitem{Kopka-E}
+%
+% \bibitem{Kopka-E}
% Helmut Kopka:
% \textsl{\LaTeX -- Erweiterungsm\"oglichkeiten},
% 3. \"uberarbeitete Auf\/lage, Addison-Wesley, Bonn, 1991
diff --git a/Master/texmf-dist/source/latex/caption/ltcaption.dtx b/Master/texmf-dist/source/latex/caption/ltcaption.dtx
new file mode 100644
index 00000000000..f7a2e0e9c0c
--- /dev/null
+++ b/Master/texmf-dist/source/latex/caption/ltcaption.dtx
@@ -0,0 +1,802 @@
+% \iffalse meta-comment
+%
+% This is file `ltcaption.dtx'.
+%
+% Copyright (C) 2007 Axel Sommerfeldt (caption@sommerfee.de)
+%
+% --------------------------------------------------------------------------
+%
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2003/12/01 or later.
+%
+% This work has the LPPL maintenance status "maintained".
+%
+% This Current Maintainer of this work is Axel Sommerfeldt.
+%
+% This work consists of the files caption.ins, caption.dtx, caption2.dtx,
+% and ltcaption.dtx, the derived files caption.sty, caption2.sty,
+% caption3.sty, and ltcaption.sty, and the user manuals caption-deu.tex,
+% caption-eng.tex, and caption-rus.tex.
+%
+% \fi
+% \CheckSum{333}
+%
+% \iffalse
+%<*driver>
+\NeedsTeXFormat{LaTeX2e}[1994/12/01]
+\ProvidesFile{ltcaption.drv}%
+ [2007/09/01 v1.1 This package fixes caption problems with
+ other-than-centered aligned longtables]
+\hbadness=9999 \newcount\hbadness \hfuzz=48pt % Make TeX shut up.
+%
+\documentclass{ltxdoc}
+\setlength\parindent{0pt}
+\setlength\parskip{\smallskipamount}
+%
+\ifx\pdfoutput\undefined\else
+ \ifcase\pdfoutput\else
+ \usepackage{mathptmx,courier}
+ \usepackage[scaled=0.90]{helvet}
+% \addtolength\marginparwidth{15pt}
+ \fi
+\fi
+%
+\usepackage{longtable}
+\makeatletter\let\LT@makecaption@ORI\LT@makecaption\makeatother
+%
+\usepackage{hypdoc}
+\hypersetup{pdfkeywords={LaTeX, package, ltcaption},pdfstartview={}}
+%
+\usepackage{ltcaption}[2007/09/01]
+%\usepackage[LTcapwidthtotable]{fr-longtable}
+%
+\DeclareRobustCommand{\KOMAScript}{\textsf{K\kern.05em O\kern.05em%
+ M\kern.05em A\kern.1em-\kern.1em Script}}
+%
+\begin{document}
+ \DocInput{ltcaption.dtx}
+\end{document}
+%</driver>
+% \fi
+%
+% \newcommand*\purerm[1]{{\upshape\mdseries\rmfamily #1}}
+% \newcommand*\puresf[1]{{\upshape\mdseries\sffamily #1}}
+% \newcommand*\purett[1]{{\upshape\mdseries\ttfamily #1}}
+% \let\package\puresf
+% \let\env\purett \let\opt\purett
+%
+% \def\thispackage{the \package{ltcaption} package}
+% \def\Thispackage{The \package{ltcaption} package}
+% \newcommand*\version[2][]{\textit{v#2}}
+%
+% \GetFileInfo{ltcaption.drv}
+% \let\docdate\filedate
+% \GetFileInfo{ltcaption.sty}
+%
+% \title{\texorpdfstring{\Thispackage\thanks{%^^A
+% This package has version number \fileversion, last revised \filedate.}}%^^A
+% {The ltcaption package}}
+% \author{Axel Sommerfeldt\\
+% \href{mailto:caption@sommerfee.de}{\texttt{caption@sommerfee.de}}}
+% \date{\docdate}
+% \maketitle
+%
+% \begin{abstract}
+% \centering
+% \mbox{This package fixes caption problems with other-than-centered aligned longtables.}\\
+% (solves \href{http://www.latex-project.org/cgi-bin/ltxbugs2html?pr=tools/3387}%^^A
+% {\LaTeX\ PR \texttt{tools/3387}})
+% \end{abstract}
+%
+% \tableofcontents
+%
+% \clearpage
+% \section{The user interface}
+%
+% Just include this package \emph{after} the \package{longtable} package\cite{longtable}, e.g.:
+% \begin{quote}
+% |\usepackage{longtable,ltcaption}|
+% \end{quote}
+%
+% \bigskip
+%
+% \DescribeMacro{\LTcapleft}
+% \DescribeMacro{\LTcapright}
+% You can alter the centering of the caption box (of width |\LTcapwidth|)
+% by setting the lengths |\LTcapleft| \& |\LTcapright| to appropriate values.
+% These are set to |\fill| by default, just like the values |\LTleft| \& |\LTright|.
+%
+% \DescribeMacro{\LTcapmarginsfalse}
+% Another option is the usage of the command |\LTcapmarginsfalse| which makes
+% \thispackage\ using the values |\LTleft| \& |\LTright| instead of
+% |\LTcapleft| \& |\LTcapright|.
+%
+% \emph{Note:}
+% If \thispackage\ will be used with one of the \package{NTG} document
+% classes\cite{NTGclasses}, |\CaptionLabelFont| \& |\CaptionTextFont| will
+% not only be used for |figure| \& |table| captions, but for |longtable|
+% captions as well.
+%
+% \emph{Note:}
+% These adaptions do not work when used with one of the \KOMAScript\
+% classes\cite{KOMAScript} |scrartcl|, |scrreprt| or |scrbook|,
+% the \KOMAScript\ settings for captions are used instead.
+% Same with the \package{caption} package which also uses its own options
+% and settings.
+%
+% \bigskip
+%
+% \DescribeMacro{\LTcaptype}
+% As a bonus feature this package patches the \package{longtable} package
+% so |\LTcaptype| will be used internally instead of the fixed caption type
+% `table'. So for example this code snipped:
+% \begin{quote}
+% |\renewcommand\LTcaptype{figure}|\\
+% |\begin{longtable}{ll}|\\
+% |\caption{An example longtable}\\|\\
+% | A & B \\|\\
+% | C & D \\|\\
+% |\end{longtable}|
+% \end{quote}
+% will result in a longtable like this:
+% \setcounter{figure}{6}
+% \begingroup
+% \renewcommand\LTcaptype{figure}
+% \begin{longtable}{ll}
+% \caption{An example longtable}\\
+% A & B \\
+% C & D \\
+% \end{longtable}
+% \endgroup
+%
+% \bigskip
+%
+% \DescribeEnv{longtable*}
+% Another bonus feature is the addition of the environment |longtable*| which
+% does not increment the |table| counter. (As a consequence, |\caption| is not
+% available for such longtables, but |\caption*| still is.)
+%
+% \clearpage
+% \section{Spot the difference}
+%
+% \begin{minipage}{\linewidth}
+% Without \thispackage:
+% \makeatletter
+% \let\LT@makecaption\LT@makecaption@ORI
+% \makeatother
+%
+% \iffalse show textwidth \fi
+% \noindent\rule{\textwidth}{1pt}
+%
+% \begin{longtable}[l]{l}
+% \caption{Left aligned longtable left aligned longtable left aligned
+% longtable}\\
+% This is only a test\\
+% \end{longtable}
+%
+% \begin{longtable}[r]{l}
+% \caption{Right aligned longtable right aligned longtable right aligned
+% longtable}\\
+% This is only a test\\
+% \end{longtable}
+%
+% \begin{longtable}[c]{l}
+% \caption{Centered longtable centered longtable centered longtable
+% centered longtable}\\
+% This is only a test\\
+% \end{longtable}
+%
+% \noindent\rule{\textwidth}{1pt}
+% \end{minipage}
+%
+% \bigskip
+%
+% \begin{minipage}{\linewidth}
+% With \thispackage\ (and the default value of |\LTcapwidth|):
+%
+% \noindent\rule{\textwidth}{1pt}
+%
+% \begin{longtable}[l]{l}
+% \caption{Left aligned longtable left aligned longtable left aligned
+% longtable}\\
+% This is only a test\\
+% \end{longtable}
+%
+% \begin{longtable}[r]{l}
+% \caption{Right aligned longtable right aligned longtable right aligned
+% longtable}\\
+% This is only a test\\
+% \end{longtable}
+%
+% \begin{longtable}[c]{l}
+% \caption{Centered longtable centered longtable centered longtable
+% centered longtable}\\
+% This is only a test\\
+% \end{longtable}
+%
+% \noindent\rule{\textwidth}{1pt}
+% \end{minipage}
+%
+% \bigskip
+%
+% \begin{minipage}{\linewidth}
+% With \thispackage\ and |\LTcapwidth=\linewidth|:
+% \LTcapwidth=\linewidth
+%
+% \noindent\rule{\textwidth}{1pt}
+%
+% \begin{longtable}[l]{l}
+% \caption{Left aligned longtable left aligned longtable
+% left aligned longtable left aligned longtable}\\
+% This is only a test\\
+% \end{longtable}
+%
+% \begin{longtable}[r]{l}
+% \caption{Right aligned longtable right aligned longtable
+% right aligned longtable right aligned longtable}\\
+% This is only a test\\
+% \end{longtable}
+%
+% \begin{longtable}[c]{l}
+% \caption{Centered longtable centered longtable centered longtable
+% centered longtable}\\
+% This is only a test\\
+% \end{longtable}
+%
+% \noindent\rule{\textwidth}{1pt}
+% \end{minipage}
+%
+% \bigskip
+%
+% \begin{minipage}{\linewidth}
+% With \thispackage\ and |\LTcapleft=0pt|
+% resp. |\LTcapright=0pt|:
+%
+% \noindent\rule{\textwidth}{1pt}
+%
+% \LTcapleft=0pt\relax
+% \LTcapright=\fill
+% \begin{longtable}[l]{l}
+% \caption{Left aligned longtable left aligned longtable left aligned
+% longtable}\\
+% This is only a test\\
+% \end{longtable}
+%
+% \LTcapleft=\fill
+% \LTcapright=0pt\relax
+% \begin{longtable}[r]{l}
+% \caption{Right aligned longtable right aligned longtable right aligned
+% longtable}\\
+% This is only a test\\
+% \end{longtable}
+%
+% \noindent\rule{\textwidth}{1pt}
+% \end{minipage}
+%
+% \bigskip
+%
+% \begin{minipage}{\linewidth}
+% With \thispackage\ and |\LTcapleft=\tabcolsep|\\
+% resp. |\LTcapright=\tabcolsep|:
+%
+% \noindent\rule{\textwidth}{1pt}
+%
+% \LTcapleft=\tabcolsep
+% \LTcapright=\tabcolsep plus 1fill
+% \begin{longtable}[l]{l}
+% \caption{Left aligned longtable left aligned longtable left aligned
+% longtable}\\
+% This is only a test\\
+% \end{longtable}
+%
+% \LTcapleft=\tabcolsep plus 1fill
+% \LTcapright=\tabcolsep
+% \begin{longtable}[r]{l}
+% \caption{Right aligned longtable right aligned longtable right aligned
+% longtable}\\
+% This is only a test\\
+% \end{longtable}
+%
+% \noindent\rule{\textwidth}{1pt}
+% \end{minipage}
+%
+% \bigskip
+%
+% \begin{minipage}{\linewidth}
+% With \thispackage\ and |\LTcapmarginsfalse|:
+% \LTcapmarginsfalse
+%
+% \noindent\rule{\textwidth}{1pt}
+%
+% \begin{longtable}[l]{l}
+% \caption{Left aligned longtable left aligned longtable left aligned
+% longtable}\\
+% This is only a test\\
+% \end{longtable}
+%
+% \begin{longtable}[r]{l}
+% \caption{Right aligned longtable right aligned longtable right aligned
+% longtable}\\
+% This is only a test\\
+% \end{longtable}
+%
+% \begin{longtable}[c]{l}
+% \caption{Centered longtable centered longtable centered longtable
+% centered longtable}\\
+% This is only a test\\
+% \end{longtable}
+%
+% \noindent\rule{\textwidth}{1pt}
+% \end{minipage}
+%
+% \iffalse
+% --------------------------------------------------------------------------- %
+% \fi
+%
+% \StopEventually{%^^A
+% \begin{thebibliography}{9}
+% \bibitem{longtable}
+% David Carlisle:
+% \href{ftp://ctan.tug.org/tex-archive/macros/latex/required/tools/longtable.pdf}%
+% {\emph{The longtable package}},
+% 2004/02/01
+%
+% \bibitem{NTGclasses}
+% Victor Eijkhout:
+% \href{ftp://ctan.tug.org/tex-archive/macros/latex/contrib/ntgclass/classdoc.pdf}%
+% {\emph{An introduction to the Dutch \LaTeX\ document classes}},\\
+% \mbox{3~September~1989}
+%
+% \bibitem{KOMAScript}
+% Markus Kohm \& Jens-Uwe-Morawski:
+% \href{ftp://ctan.tug.org/tex-archive/macros/latex/contrib/koma-script/scrguien.pdf}%
+% {\emph{KOMA-Script -- a versatile \LaTeXe\ bundle}},\\
+% 2007-01-09
+%
+% \bibitem{floatrow}
+% Olga Lapko:
+% \href{ftp://ctan.tug.org/tex-archive/macros/latex/contrib/floatrow/floatrow.pdf}%
+% {\emph{The floatrow package documentation}},
+% 2006/07/24
+% \end{thebibliography}
+% }
+%
+% \iffalse
+% --------------------------------------------------------------------------- %
+% \fi
+%
+% \DoNotIndex{\\,\_,\ ,\@@par}
+% \DoNotIndex{\@classoptionslist,\@currext,\@currname}
+% \DoNotIndex{\@ehc,\@ehd,\@empty,\@expandtwoargs}
+% \DoNotIndex{\@for,\@firstofone,\@firstoftwo}
+% \DoNotIndex{\@gobble,\@gobblefour,\@gobbletwo,\@hangfrom}
+% \DoNotIndex{\@ifnextchar,\@ifpackagelater,\@ifpackageloaded}
+% \DoNotIndex{\@ifstar,\@ifundefined,\@latex@error,\@namedef,\@nameuse}
+% \DoNotIndex{\@onlypreamble,\@parboxrestore,\@plus,\@ptionlist}
+% \DoNotIndex{\@removeelement,\@restorepar,\@secondoftwo,\@setpar}
+% \DoNotIndex{\@tempa,\@tempboxa,\@tempdima,\@tempdimb,\@tempdimc,\@tempb,\@tempc}
+% \DoNotIndex{\@testopt}
+% \DoNotIndex{\@undefined,\@unprocessedoptions,\@unusedoptionlist}
+% \DoNotIndex{\p@,\z@}
+% \DoNotIndex{\active,\addtocounter,\addtolength,\advance,\aftergroup}
+% \DoNotIndex{\baselineskip,\begin,\begingroup,\bfseries,\box}
+% \DoNotIndex{\catcode,\centering,\changes,\csname,\def,\divide,\do,\downarrow}
+% \DoNotIndex{\edef,\else,\empty,\end,\endcsname,\endgraf,\endgroup,\expandafter}
+% \DoNotIndex{\fi,\footnotesize,\global}
+% \DoNotIndex{\hangindent,\hbox,\hfil,\hsize,\hskip,\hspace,\hss}
+% \DoNotIndex{\ifcase,\ifdim,\ifnum,\ifodd,\ifvoid,\ifvmode}
+% \DoNotIndex{\ifx,\ignorespaces,\itshape}
+% \DoNotIndex{\Large,\large,\leavevmode,\leftmargini,\leftskip,\let,\linewidth}
+% \DoNotIndex{\llap,\long,\m@ne,\margin,\mdseries,\message}
+% \DoNotIndex{\newcommand,\newdimen,\newlength,\newline,\newif,\newsavebox}
+% \DoNotIndex{\next,\nobreak,\nobreakspace,\noexpand,\noindent,\numberline}
+% \DoNotIndex{\normalcolor,\normalfont,\normalsize,\or,\par,\parbox,\parfillskip}
+% \DoNotIndex{\parindent,\parskip,\prevdepth,\protect,\protected@edef,\protected@write}
+% \DoNotIndex{\providecommand,\quad}
+% \DoNotIndex{\raggedleft,\raggedright,\relax,\renewcommand,\RequirePackage}
+% \DoNotIndex{\rightskip,\rmfamily}
+% \DoNotIndex{\sbox,\scriptsize,\scshape,\setbox,\setlength,\sffamily,\slshape}
+% \DoNotIndex{\small,\string,\space,\strut}
+% \DoNotIndex{\textheight,\the,\toks@,\typeout,\ttfamily}
+% \DoNotIndex{\unvbox,\uparrow,\upshape,\usebox,\usepackage}
+% \DoNotIndex{\value,\vbox,\vsize,\vskip,\wd,\width,\z@skip}
+% \DoNotIndex{\AtBeginDocument,\AtEndOfPackage,\CurrentOption,\DeclareOption}
+% \DoNotIndex{\ExecuteOptions,\GenericWarning,\IfFileExists,\InputIfFileExists}
+% \DoNotIndex{\NeedsTeXFormat,\MessageBreak}
+% \DoNotIndex{\PackageError,\PackageInfo,\PackageWarning,\PackageWarningNoLine}
+% \DoNotIndex{\PassOptionsToPackage,\ProcessOptions,\ProvidesPackage}
+%
+% \iffalse
+% --------------------------------------------------------------------------- %
+% \fi
+%
+% \setlength{\parskip}{0pt plus 1pt}
+% \changes{v1.0}{2007/04/15}{First release}
+% \changes{v1.1}{2007/07/06}{Support of |\LTcaptype| added}
+%
+% \iffalse
+% --------------------------------------------------------------------------- %
+% \fi
+%
+% \clearpage
+% \section{The Implementation}
+% \iffalse
+%<*package>
+% \fi
+%
+% \subsection{Identification}
+%
+% \begin{macrocode}
+\NeedsTeXFormat{LaTeX2e}[1994/12/01]
+\ProvidesPackage{ltcaption}[2007/09/01 v1.1 longtable captions (AR)]
+% \end{macrocode}
+%
+% \subsection{User interface}
+%
+% \begin{macro}{\LTcaptype}
+% |\LTcaptype| is preset to |table|.
+% \begin{macrocode}
+\providecommand*\LTcaptype{table}
+\providecommand*\ext@table{lot}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\ext@lstlisting}
+% Since the \package{listings} package do not define |\ext@lstlisting|,
+% but we needed it when |\renewcommand\LTcaptype{lstlisting}| was done
+% by the end user, we define it here.
+% \begin{macrocode}
+\@ifundefined{caption@AtBeginDocument}\AtBeginDocument\caption@AtBeginDocument{%
+ \@ifpackageloaded{listings}{%
+ \providecommand*\ext@lstlisting{lol}%
+ }{}}
+% \end{macrocode}
+% \end{macro}
+%
+% To save \TeX\ memory some stuff will not be defined if the
+% \package{caption} package is loaded.
+%
+% \begin{macrocode}
+\@ifpackageloaded{caption}{}{%
+% \end{macrocode}
+%
+% \changes{v1.1}{2007/04/20}{The skips will not be defined if the
+% \package{caption} package is loaded}
+%
+% \begin{macro}{\LTcapleft}
+% \begin{macro}{\LTcapright}
+% \begin{macro}{\ifLTcapmargins}
+% Our skips and the flag belonging to them.\\
+% (Default: Use these skips (and not |\LTleft| \& |\LTright|.)\par
+% \begin{macrocode}
+ \newskip\LTcapleft \LTcapleft=\fill
+ \newskip\LTcapright \LTcapright=\fill
+ \newif\ifLTcapmargins \LTcapmarginstrue
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \changes{v1.1}{2007/05/05}{Usage of \cs{CaptionLabelFont} \&
+% \cs{CaptionTextFont} added}
+%
+% \begin{macro}{\CaptionLabelFont}
+% \begin{macro}{\CaptionTextFont}
+% These commands are provided by the \package{NTG} document classes.
+% To make this package work with other document classes as well,
+% we need to define |\CaptionLabelFont| \& |\CaptionTextFont| here.
+% \begin{macrocode}
+ \providecommand*\CaptionLabelFont{}
+ \providecommand*\CaptionTextFont{}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macrocode}
+}
+% \end{macrocode}
+%
+% \subsection{The longtable patch}
+%
+% \begin{macro}{\LT@array}
+% We insert our stuff into the definition of |\LT@array| here.
+% Since the \package{hyperref} package patches |\LT@array| as well
+% and since this only works with the original definition of |\LT@array|,
+% we have to do this after the \package{hyperref} package,
+% i.e. |\AtBeginDocument|.
+% \begin{macrocode}
+\@ifundefined{caption@AtBeginDocument}\AtBeginDocument\caption@AtBeginDocument{%
+% \end{macrocode}
+% \begin{macrocode}
+ \let\ltcaption@ORI@LT@array\LT@array
+ \renewcommand*\LT@array{%
+% \end{macrocode}
+% We modify the next |\refstepcounter| resp. |\H@refstepcounter| \&
+% |\hyper@makecurrent|, so |\LTcaptype| is used instead of |{table}|.
+% \begin{macrocode}
+ \let\ltcaption@ORI@refstepcounter\refstepcounter
+ \let\ltcaption@ORI@H@refstepcounter\H@refstepcounter
+ \def\refstepcounter##1{%
+ \let\refstepcounter\ltcaption@ORI@refstepcounter
+ \let\H@refstepcounter\ltcaption@ORI@H@refstepcounter
+ \refstepcounter\LTcaptype}%
+ \def\H@refstepcounter##1{%
+ \let\refstepcounter\ltcaption@ORI@refstepcounter
+ \let\H@refstepcounter\ltcaption@ORI@H@refstepcounter
+ \H@refstepcounter\LTcaptype}%
+% \end{macrocode}
+% \begin{macrocode}
+ \let\ltcaption@ORI@hyper@makecurrent\hyper@makecurrent
+ \def\hyper@makecurrent##1{%
+ \let\hyper@makecurrent\ltcaption@ORI@hyper@makecurrent
+ \hyper@makecurrent\LTcaptype}%
+% \end{macrocode}
+% We redefine |\lst@@caption| so |\thelstlisting| will
+% printout its counter, too.
+% \begin{macrocode}
+ \def\lst@@caption{\relax}%
+% \end{macrocode}
+% \begin{macrocode}
+ \ltcaption@ORI@LT@array}%
+% \end{macrocode}
+% \begin{macrocode}
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\LT@c@ption}
+% The original implementation:
+% \begin{verbatim}
+% \def\LT@c@ption#1[#2]#3{%
+% \LT@makecaption#1\fnum@table{#3}%
+% \def\@tempa{#2}%
+% \ifx\@tempa\@empty\else
+% {\let\\\space
+% \addcontentsline{lot}{table}{\protect\numberline{\thetable}{#2}}}%
+% \fi}
+% \end{verbatim}%^^A
+% Our implementation simply uses |\LTcaptype| instead of |{table}|:
+% \begin{macrocode}
+\def\LT@c@ption#1[#2]#3{%
+ \LT@makecaption#1{\csname fnum@\LTcaptype\endcsname}{#3}%
+ \def\@tempa{#2}%
+ \ifx\@tempa\@empty\else
+ {\let\\\space
+ \addcontentsline{\csname ext@\LTcaptype\endcsname}{\LTcaptype}%
+ {\protect\numberline{\csname the\LTcaptype\endcsname}{#2}}}%
+ \fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\LT@makecaption}
+% \changes{v1.1}{2007/04/20}{\cs{LT@@makecaption} added}
+% |\LT@makecaption|\marg{cmd}\marg{label}\marg{text}\par
+% \smallskip
+% Original code:
+% \begin{verbatim}
+% \def\LT@makecaption#1#2#3{%
+% \LT@mcol\LT@cols c{\hbox to\z@{\hss\parbox[t]\LTcapwidth{%
+% % Based on article class "\@makecaption", "#1" is "\@gobble" in star
+% % form, and "\@firstofone" otherwise.
+% \sbox\@tempboxa{#1{#2: }#3}%
+% \ifdim\wd\@tempboxa>\hsize
+% #1{#2: }#3%
+% \else
+% \hbox to\hsize{\hfil\box\@tempboxa\hfil}%
+% \fi
+% \endgraf\vskip\baselineskip}%
+% \hss}}}
+% \end{verbatim}%^^A
+% Our code:\footnote{Adapted to the \package{floatrow} package by Olga Lapko}
+% \changes{v1.1}{2007/06/27}{Adapted to the \package{floatrow} package by Olga Lapko}
+% \begin{macrocode}
+\renewcommand\LT@makecaption[3]{%
+ \LT@@makecaption{%
+ \sbox\@tempboxa{#1{{\CaptionLabelFont#2:} }\CaptionTextFont#3}%
+ \ifdim\wd\@tempboxa>\hsize
+ #1{\CaptionLabelFont{#2:} }\CaptionTextFont#3%
+ \else
+ \hbox to\hsize{\hfil\box\@tempboxa\hfil}%
+ \fi
+ \endgraf\vskip\baselineskip}}
+% \end{macrocode}
+% \begin{macrocode}
+\newcommand\LT@@makecaption[1]{%
+ \caption@LT@make{\hb@xt@\hsize{%
+ \ifLTcapmargins
+ \hspace\LTcapleft
+ \FBifLTcapwidth{\advance\LTcapwidth-\LTcapleft}%
+ \else
+ \hspace\LTleft
+ \FBifLTcapwidth{\advance\LTcapwidth-\LTleft}%
+ \fi
+ \FBifLTcapwidth{\advance\LTcapwidth-%
+ \ifLTcapmargins\LTcapright\else\LTright\fi}%
+ \parbox[t]\LTcapwidth{#1}%
+ \ifLTcapmargins
+ \hskip\LTcapright
+ \else
+ \hskip\LTright
+ \fi}}}
+% \end{macrocode}
+% This one will be usually defined by the \package{fr-longtable} package,
+% which is part of the \package{floatrow} package\cite{floatrow}:
+% \begin{macrocode}
+\AtBeginDocument{\providecommand*\FBifLTcapwidth[1]{}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\caption@LT@make}
+% Typesets the caption as |\multicolumn|\ldots
+% \begin{macrocode}
+\newcommand\caption@LT@make[1]{%
+ \noalign{\caption@LT@config}%
+% \end{macrocode}
+% Note: If used with the \package{array} package |\caption@LTfmt| needs
+% to be expanded, therefore we need some |\expandafter| here.
+% \begin{macrocode}
+ \expandafter\LT@mcol\expandafter\LT@cols\expandafter{\caption@LTfmt}{%
+ \hb@xt@\z@{%
+ \hspace\caption@LTleft
+ \parbox[t]\linewidth{#1}%
+ \hspace\caption@LTright}}}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\caption@LT@config}
+% |\caption@LT@config| analyses |\LTleft| \& |\LTright|
+% and set |\caption@LTleft| \& |\caption@LTright| accordingly
+% to the `opposite' values, e.g., |\LTleft=1cm| will result to
+% |\caption@LTleft=-1cm| and |\LTleft=0pt plus 1fill|
+% will result to |\caption@LTleft=0pt minus 1fill|.
+% Furthermore |\caption@LTfmt| is set to the according
+% multicolumn format; this is far away from being bulletproof
+% (e.g., a stretch or shrink will always be treated as `fill')
+% but will hopefully cover all `real' cases.
+% \begin{macrocode}
+\newcommand*\caption@LT@config{%
+% \end{macrocode}
+% \begin{macrocode}
+ \caption@LT@parse\LTleft\caption@LTleft\caption@ifLTleft
+ \caption@LT@parse\LTright\caption@LTright\caption@ifLTright
+% \end{macrocode}
+% \begin{macrocode}
+ \xdef\caption@LTfmt{%
+ @{}\caption@ifLTleft{\caption@ifLTright{c}{r}}{l}@{}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \iffalse
+% \def\@defplusminus#1 #2 #3 #4 #5\@nil{%
+% \def\@plus{#2}\def\@minus{#4}}
+% \@tempskipa=1pt plus 1pt minus 1pt\relax
+% \expandafter\@defplusminus\the\@tempskipa\@nil
+% \fi
+%
+% \begin{macro}{\caption@LT@parse}
+% Parsing of the skip, we collect a |\@fixpart|, a |@pluspart|,
+% and a |\@minuspart| and make our definitions based on that.
+% \begin{macrocode}
+\newcommand*\caption@LT@parse[3]{%
+% \end{macrocode}
+% \begin{macrocode}
+ \let\@pluspart\@undefined
+ \let\@minuspart\@undefined
+ \expandafter\caption@LT@parse@\expandafter\@fixpart\the#1 x %
+% \end{macrocode}
+% \begin{macrocode}
+ \xdef#2{-\@fixpart
+ \ifx\@minuspart\@undefined\else
+ \space\@plus\space\@minuspart
+ \fi
+ \ifx\@pluspart\@undefined\else
+ \space\@minus\space\@pluspart
+ \fi}%
+% \end{macrocode}
+% \changes{v1.1}{2007/04/17}{Made it 5 token shorter}
+% \begin{macrocode}
+ \let#3\@firstoftwo
+ \ifx\@pluspart\@undefined
+ \ifx\@minuspart\@undefined
+ \let#3\@secondoftwo
+ \fi
+ \fi}
+% \end{macrocode}
+% \begin{macrocode}
+\def\caption@LT@parse@#1#2 {%
+% \end{macrocode}
+% Note: |\def\@tempa{#2}\ifx\@tempa\@plus|\ldots would not work here
+% because of different catcodes.
+% \begin{macrocode}
+ \edef\@tempa{\@car#2\@nil}%
+ \if p\@tempa
+ \def\next{\caption@LT@parse@\@pluspart}%
+ \else\if m\@tempa
+ \def\next{\caption@LT@parse@\@minuspart}%
+ \else\if x\@tempa
+ \let\next\relax
+ \else
+ \def#1{#2}%
+ \def\next{\caption@LT@parse@ @}%
+ \fi\fi\fi
+ \next}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{The \texttt{longtable*} environment}
+% \changes{v1.1}{2007/09/01}{Environment \env{longtable*} added}
+%
+% \begin{environment}{longtable*}
+% We simply supress anything which has to do with reference counters
+% or hyper links here.
+% \begin{macrocode}
+\newenvironment{longtable*}%
+ {\let\refstepcounter\@gobble
+ \let\H@refstepcounter\@gobble
+ \let\hyper@makecurrent\@gobble
+ \let\Hy@raisedlink\@gobble
+ \let\ltcaption@ORI@LT@c@ption\LT@c@ption
+ \def\LT@c@ption##1[##2]##3{%
+ \ifx##1\@firstofone
+ \PackageError{ltcaption}%
+ {Not allowed in longtable* environment}%
+ {If you do not understand this error, please take a closer
+ look\MessageBreak at the documentation of the `ltcaption'
+ package.\MessageBreak \@ehc}%
+ \else
+ \ltcaption@ORI@LT@c@ption{##1}[{##2}]{##3}%
+ \fi}%
+ \longtable}%
+ {\endlongtable}
+% \end{macrocode}
+% \end{environment}
+%
+% \subsection{Adaption for \texorpdfstring{\KOMAScript}{KOMA Script}}
+%
+% \begin{macrocode}
+\@ifundefined{@komalongtablefalse}{}{%
+ \if@komalongtable
+% \end{macrocode}
+% \begin{macrocode}
+ \renewcommand{\LT@makecaption}[3]{%
+ \noalign{%
+ \if@captionabove
+ \vskip\belowcaptionskip
+ \else
+ \vskip\abovecaptionskip
+ \fi
+ }%
+ \caption@LT@make{%
+ \@@makecaption{#1}{#2}{#3}%
+ \endgraf
+ \if@captionabove
+ \vskip\abovecaptionskip
+ \else
+ \vskip\belowcaptionskip
+ \fi
+ }%
+ }%
+% \end{macrocode}
+% \begin{macrocode}
+ \let\LT@@makecaption\@undefined
+% \end{macrocode}
+% \begin{macrocode}
+ \fi}
+% \end{macrocode}
+%
+% \iffalse
+%</package>
+% \fi
+%
+% \iffalse
+% --------------------------------------------------------------------------- %
+% \fi
+%
+% \Finale
+%
+\endinput
diff --git a/Master/texmf-dist/tex/latex/caption/caption.sty b/Master/texmf-dist/tex/latex/caption/caption.sty
index 20b2a3ceed9..bd69e94cb18 100644
--- a/Master/texmf-dist/tex/latex/caption/caption.sty
+++ b/Master/texmf-dist/tex/latex/caption/caption.sty
@@ -22,32 +22,186 @@
%%
%% This Current Maintainer of this work is Axel Sommerfeldt.
%%
-%% This work consists of the files caption.ins, caption.dtx,
-%% caption2.dtx, and anleitung.tex and the derived files
-%% caption.sty, caption2.sty, caption3.sty, and manual.tex.
+%% This work consists of the files caption.ins, caption.dtx, caption2.dtx,
+%% and ltcaption.dtx, the derived files caption.sty, caption2.sty,
+%% caption3.sty, and ltcaption.sty, and the user manuals caption-deu.tex,
+%% caption-eng.tex, and caption-rus.tex.
%%
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption}[2007/04/16 v3.0q Customising captions (AR)]
-\RequirePackage{caption3}[2007/01/31] % needs v3.0l or newer
+\ProvidesPackage{caption}[2007/09/01 v3.1 Customising captions (AR)]
+\newcommand*\caption@Info[1]{\PackageInfo{caption}{#1\@gobble}}
+\@onlypreamble\caption@Info
+\RequirePackage{caption3}[2007/09/01] % needs v3.1 or newer
\@ifpackageloaded{caption2}{%
- \caption@Error{You can't use both the caption *and* caption2 package}%
+ \caption@Error{%
+ You can't use both, the (obsolete) caption2 *and*\MessageBreak
+ the (current) caption package}%
\endinput
}{}
-\DeclareCaptionOption{config}[caption]{%
- \InputIfFileExists{#1.cfg}{\typeout{*** Local configuration file
- #1.cfg used ***}}%
- {\PackageWarning{caption}{Configuration
- file #1.cfg not found}}}
-\DeclareCaptionOption*{figureposition}{\captionsetup[figure]{position=#1}}
-\DeclareCaptionOption*{tableposition}{\captionsetup[table]{position=#1}}
-\DeclareCaptionOption*{figurename}{\captionsetup[figure]{name=#1}}
-\DeclareCaptionOption*{tablename}{\captionsetup[table]{name=#1}}
-\DeclareCaptionOption*{normal}[]{\caption@setformat{normal}}
-\DeclareCaptionOption*{isu}[]{\caption@setformat{hang}}
-\DeclareCaptionOption*{hang}[]{\caption@setformat{hang}}
-\DeclareCaptionOption*{center}[]{\caption@setjustification{centering}}
-\DeclareCaptionOption*{anne}[]{\caption@setjustification{centerlast}}
-\DeclareCaptionOption*{centerlast}[]{\caption@setjustification{centerlast}}
+\caption@AtBeginDocument{%
+ \@ifpackageloaded{ftcap}{%
+ \caption@IncompatiblePackage{ftcap}{}%
+ }{}%
+ \@ifpackageloaded{nonfloat}{%
+ \caption@IncompatiblePackage{nonfloat}{. %
+ Furthermore you could use \string\captionof\MessageBreak
+ instead of \noexpand\figcaption or \string\tabcaption}%
+ }{}%
+ \@ifpackageloaded{topcapt}{%
+ \caption@IncompatiblePackage{topcapt}{}%
+ }{}%
+}
+\newcommand*\caption@IncompatiblePackage[2]{%
+ \PackageWarningNoLine{caption}{%
+ Usage of the #1 package together with the\MessageBreak
+ caption package is strongly *not* recommended.\MessageBreak
+ Instead of loading the #1 package you should\MessageBreak
+ use the caption package option\MessageBreak
+ \space\space`tableposition=top'\MessageBreak
+ #2}}
+\@onlypreamble\caption@IncompatiblePackage
+\caption@ifbool{documentclass}{}{%
+ \PackageWarningNoLine{caption}{%
+ Unsupported document class (or package) detected,\MessageBreak
+ usage of the caption package is *not* recommended}%
+ \caption@Info{\string\@makecaption\space=\space\meaning\@makecaption}%
+}
+\@ifundefined{@captionheadfont}{}{%
+ \caption@Info{AMS or SMF document class}%
+ \setlength\belowcaptionskip{0pt}% set to 3pc by AMS class
+}
+\@ifundefined{scr@caption}{}{%
+ \caption@Info{KOMA-Script document class}%
+ \def\@tablecaptionabovetrue{\captionsetup*[table]{position=t}}
+ \def\@tablecaptionabovefalse{\captionsetup*[table]{position=b}}
+ \if@tablecaptionabove
+ \caption@AtBeginDocument{%
+ \def\caption@tempa#1{%
+ \@ifpackageloaded{#1}{\caption@Error{%
+ You can't use the global option\MessageBreak
+ \space\space`tablecaptionabove'\MessageBreak
+ and use the #1 package, too}}{}}%
+ \caption@tempa{ftcap}%
+ \caption@tempa{nonfloat}%
+ \caption@tempa{topcapt}}%
+ \@tablecaptionabovetrue
+ \else
+ \@tablecaptionabovefalse
+ \fi
+ \def\onelinecaptionstrue{\captionsetup{singlelinecheck=1}}
+ \def\onelinecaptionsfalse{\captionsetup{singlelinecheck=0}}
+ \ifonelinecaptions
+ \onelinecaptionstrue
+ \else
+ \onelinecaptionsfalse
+ \fi
+ \def\@captionabovetrue{\captionsetup{position=t}}
+ \def\@captionabovefalse{\captionsetup{position=b}}
+ \let\caption@KOMA@setcapindent\@setcapindent
+ \renewcommand*\@setcapindent[1]{%
+ \caption@KOMA@setcapindent{#1}\caption@setcapindent}
+ \let\caption@KOMA@@setcapindent\@@setcapindent
+ \renewcommand*\@@setcapindent[1]{%
+ \caption@KOMA@@setcapindent{#1}\caption@setcapindent}
+ \newcommand*\caption@setcapindent{%
+ \captionsetup{indent=\ifdim\cap@indent<\z@\z@\else\cap@indent\fi}}
+ \@ifundefined{cap@indent}{}{\caption@setcapindent}
+ \expandafter\let\expandafter\caption@KOMA@setcapwidth
+ \csname\string\setcapwidth\endcsname
+ \@namedef{\string\setcapwidth}[#1]#2{%
+ \caption@KOMA@setcapwidth[#1]{#2}\caption@setcapwidth{#1}}
+ \newcommand*\caption@setcapwidth[1]{%
+ \ifx\\#1\\\else
+ \@ifundefined{cap@margin}{}{%
+ \def\@tempa{captionbeside}%
+ \ifx\@tempa\@currenvir\else\PackageWarning{caption}{%
+ Ignoring optional argument [#1] of \string\setcapwidth\MessageBreak}%
+ \fi}%
+ \fi
+ \captionsetup{width=\cap@width}}
+ \def\caption@tempa{\hsize}%
+ \ifx\caption@tempa\cap@width \else
+ \caption@setcapwidth{?}
+ \fi
+ \expandafter\let\expandafter\caption@KOMA@setcapmargin
+ \csname\string\@setcapmargin\endcsname
+ \@namedef{\string\@setcapmargin}[#1]#2{%
+ \caption@KOMA@setcapmargin[#1]{#2}\caption@setcapmargin}
+ \expandafter\let\expandafter\caption@KOMA@@setcapmargin
+ \csname\string\@@setcapmargin\endcsname
+ \@namedef{\string\@@setcapmargin}[#1]#2{%
+ \caption@KOMA@@setcapmargin[#1]{#2}\caption@setcapmargin}
+ \newcommand*\caption@setcapmargin{%
+ \begingroup
+ \let\onelinecaptionsfalse\relax
+ \def\@twoside{0}%
+ \def\if@twoside{\def\@twoside{1}\iffalse}%
+ \cap@margin
+ \def\@tempa{\endgroup}%
+ \ifx\cap@left\hfill\else\ifx\cap@right\hfill\else
+ \def\hspace##1##{\@firstofone}%
+ \edef\@tempa{\endgroup
+ \noexpand\captionsetup{%
+ twoside=\@twoside,singlelinecheck=0,%
+ margin={\cap@left,\cap@right}}}%
+ \fi\fi
+ \@tempa}
+ \ifx\cap@margin\relax \else
+ \caption@setcapmargin
+ \fi
+}
+\DeclareCaptionOption*{config}[caption]{%
+ \InputIfFileExists{#1.cfg}%
+ {\typeout{*** Local configuration file #1.cfg used ***}}%
+ {\PackageWarning{caption}{Configuration file #1.cfg not found}}}
+\DeclareCaptionOption{figureposition}{%
+ \captionsetup*[figure]{position=#1}}
+\@onlypreamble@key{caption}{figureposition}
+\DeclareCaptionOption{tableposition}{%
+ \caption@AtBeginDocument{%
+ \def\caption@tempa##1{%
+ \@ifpackageloaded{##1}{\caption@Error{%
+ You can't use the caption package option\MessageBreak
+ \space\space`tableposition=#1'\MessageBreak
+ and use the ##1 package, too}}{}}%
+ \caption@tempa{ftcap}%
+ \caption@tempa{nonfloat}%
+ \caption@tempa{topcapt}}%
+ \captionsetup*[table]{position=#1}}
+\@onlypreamble@key{caption}{tableposition}
+\DeclareCaptionOption{figurename}{\caption@SetFloatName{figure}{#1}}
+\@onlypreamble@key{caption}{figurename}
+\DeclareCaptionOption{tablename}{\caption@SetFloatName{table}{#1}}
+\@onlypreamble@key{caption}{tablename}
+\newcommand*\caption@SetFloatName[2]{%
+ \begingroup
+ \def\@tempa{\endgroup\@firstofone}%
+ \@ifundefined{languagename}{}{%
+ \@ifundefined{captions\languagename}{}{%
+ \def\@tempa{\endgroup
+ \expandafter\addto\csname captions\languagename\endcsname}}}%
+ \@tempa{\@namedef{#1name}{#2}}}
+\@onlypreamble\caption@SetFloatName
+\DeclareCaptionOption{compatibility}[1]{\caption@setbool{compatibility}{#1}}
+\@onlypreamble@key{caption}{compatibility}
+\DeclareCaptionOption*{normal}[]{%
+ \caption@setformat{normal}%
+ \caption@setjustification{justified}}
+\DeclareCaptionOption*{isu}[]{%
+ \caption@setformat{hang}%
+ \caption@setjustification{justified}}
+\DeclareCaptionOption*{hang}[]{%
+ \caption@setformat{hang}%
+ \caption@setjustification{justified}}
+\DeclareCaptionOption*{center}[]{%
+ \caption@setformat{normal}%
+ \caption@setjustification{centering}}
+\DeclareCaptionOption*{anne}[]{%
+ \caption@setformat{normal}%
+ \caption@setjustification{centerlast}}
+\DeclareCaptionOption*{centerlast}[]{%
+ \caption@setformat{normal}%
+ \caption@setjustification{centerlast}}
\DeclareCaptionOption*{scriptsize}[]{\def\captionfont{\scriptsize}}
\DeclareCaptionOption*{footnotesize}[]{\def\captionfont{\footnotesize}}
\DeclareCaptionOption*{small}[]{\def\captionfont{\small}}
@@ -66,381 +220,1105 @@
\DeclareCaptionOption*{nooneline}[]{\caption@setbool{slc}{0}}
\caption@setbool{ruled}{0}
\DeclareCaptionOption*{ruled}[]{\caption@setbool{ruled}{1}}
-\DeclareCaptionOption*{flushleft}[]{\caption@setjustification{raggedright}}
-\DeclareCaptionOption*{flushright}[]{\caption@setjustification{raggedleft}}
+\DeclareCaptionOption*{flushleft}[]{%
+ \caption@setformat{normal}%
+ \caption@setjustification{raggedright}}
+\DeclareCaptionOption*{flushright}[]{%
+ \caption@setformat{normal}%
+ \caption@setjustification{raggedleft}}
\DeclareCaptionOption*{oneline}[]{\caption@setbool{slc}{1}}
-\DeclareCaptionOption*{ignoreLTcapwidth}[]{}
-\DeclareCaptionOption*{onelinecaption}[]{\caption@setbool{slc}{1}}
-\DeclareCaptionOption*{noonelinecaption}[]{\caption@setbool{slc}{0}}
-\DeclareCaptionOption*{tablecaptionabove}[]{\captionsetup[table]{position=t}}
-\DeclareCaptionOption*{tablecaptionbelow}[]{\captionsetup[table]{position=b}}
-\newcommand*\caption@declarepackage[1]{%
- \caption@setbool{pkt@#1}{1}%
- \DeclareCaptionOption*{#1}{\caption@setbool{pkt@#1}{##1}}}
-\AtEndOfPackage{\let\caption@declarepackage\@undefined}
-\newcommand\caption@ifpackage[3]{%
- \edef\caption@tempa{%
- \caption@ifbool{pkt@#1}%
- {\@ifundefined{#2}{AtBeginDocument}{firstofone}}%
- {gobble}}%
- \caption@Info{#1=\caption@ifbool{pkt@#1}{1}{0} %
- (\@ifundefined{#2}{not }{}loaded->\caption@tempa)}%
- \caption@ifbool{pkt@#1}{%
- \@ifundefined{#2}%
- {\let\caption@tempa\AtBeginDocument}%
- {\let\caption@tempa\@firstofone}%
- }{%
- \let\caption@tempa\@gobble
- }%
- \caption@tempa{\@ifundefined{#2}{}{#3}}%
- \caption@undefbool{pkt@#1}}
-\AtEndOfPackage{\let\caption@ifpackage\@undefined}
-\caption@declarepackage{caption}
-\caption@declarepackage{float}
-\caption@declarepackage{floatrow}
-\caption@declarepackage{hyperref}
-\caption@declarepackage{hypcap}
-\caption@declarepackage{listings}
-\caption@declarepackage{longtable}
-\caption@declarepackage{picins}
-\caption@declarepackage{rotating}
-\caption@declarepackage{sidecap}
-\caption@declarepackage{supertabular}
-\DeclareCaptionOption{verbose}[1]{%
- \caption@setbool{verbose}{#1}%
- \caption@ifverbose{%
- \def\caption@Info{\PackageInfo{caption}}%
- }{%
- \let\caption@Info\@gobble
- }}
-\setkeys{caption}{verbose=0}
-\caption@ProcessOptions{caption}
-\caption@ifbool{pkt@caption}{}{\endinput}
-\caption@undefbool{pkt@caption}
-\def\captionof{\@ifstar{\caption@of{\caption*}}{\caption@of\caption}}
-\newcommand*\caption@of[2]{\def\@captype{#2}#1}
-\DeclareCaptionOption{name}{\caption@setfloatname\@captype{#1}}
-\DeclareCaptionOption{type}{\def\@captype{#1}}
-\providecommand\ContinuedFloat{%
- \@ifnextchar[%]
- \@ContinuedFloat
- {\ifx\@captype\@undefined
- \@latex@error{\noexpand\ContinuedFloat outside float}\@ehd
- \else
- \@ContinuedFloat[\@captype]%
- \fi}}
-\def\@ContinuedFloat[#1]{%
- \addtocounter{#1}\m@ne
- \caption@ContinuedFloat{#1}%
- \caption@@ContinuedFloat{#1}}
-\let\caption@ContinuedFloat\@gobble
-\let\caption@resetContinuedFloat\@gobble
-\providecommand*\caption@@ContinuedFloat[1]{}
-\newcommand*\caption@begin[1]{%
+\DeclareCaptionOption*{ignoreLTcapwidth}[]{%
+ \PackageWarning{caption}{Obsolete option `ignoreLTcapwidth' ignored}}
+\DeclareCaptionOption*{caption}{%
+ \caption@setbool{temp}{#1}%
+ \caption@ifbool{temp}{}{%
+ \caption@Error{%
+ The package option `caption=#1' is obsolete.\MessageBreak
+ Please pass this option to the subfig package instead\MessageBreak
+ and do *not* load the caption package anymore}}}
+\DeclareCaptionOption{FPlist}[1]{\caption@setFPoption{list}{#1}}
+\DeclareCaptionOption{FPref}[1]{\caption@setFPoption{ref}{#1}}
+\@onlypreamble@key{caption}{FPlist}
+\@onlypreamble@key{caption}{FPref}
+\newcommand*\caption@setFPoption[2]{%
+ \edef\@tempa{\@car#2\@nil}%
+ \caption@setbool{FP#1cap}{\if c\@tempa 1\else 0\fi}}
+\@onlypreamble\caption@setFPoption
+\captionsetup{FPlist=caption,FPref=figure}
+\DeclareCaptionOption{hypcap}[1]{\caption@setbool{hypcap}{#1}}
+\DeclareCaptionOption{hypcapspace}{\def\caption@hypcapspace{#1}}
+\captionsetup{hypcap=1,hypcapspace=.5\baselineskip}
+\caption@ProcessOptions*{caption}
+\caption@AtBeginDocument{%
+ \DeclareCaptionOption{type}{\caption@settype{#1}}
+ \DeclareCaptionOption{type*}{\caption@settype*{#1}}}
+\newcommand*\caption@settype{%
+ \caption@@settype{}}
+\newcommand*\caption@@settype[1]{%
+ \caption@teststar{\caption@@@settype{#1}}\@gobble\@firstofone}
+\newcommand*\caption@@@settype[3]{%
+ \caption@Debug{type=#3}%
+ \caption@checkgrouplevel{#1}{\captionsetup{#1type#2\@gobble*=#3}}%
+ \@ifundefined{@#1captype}{}{%
+ \edef\@tempa{#3}%
+ \expandafter\ifx\csname @#1captype\endcsname\@tempa \else
+ \caption@iftypewarning{%
+ \PackageWarning{caption}{%
+ Caption type was already set to `#3'\MessageBreak}}{}%
+ \fi}%
+ \expandafter\edef\csname @#1captype\endcsname{#3}%
+ \let\caption@iftypewarning\caption@ifdebug
+ \@nameuse{#1caption@settypehook}%
+ \expandafter\caption@setoptions\csname @#1captype\endcsname
+ \let\caption@ifrefstepcounter\@secondoftwo
+ #2{% \@gobble or \@firstofone
+ \let\@currentlabel\caption@undefinedlabel
+ \let\@currentHlabel\@undefined
+ \caption@start}}
+\newcommand*\caption@settypehook{}
+\newcommand*\caption@iftype{%
+ \@ifundefined{@captype}{\let\@captype\@undefined\@secondoftwo}\@firstoftwo}
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname currentgrouplevel\endcsname\relax
+ \caption@Debug{TeX engine: TeX}
+ \let\caption@checkgrouplevel\@gobbletwo
+\else
+ \caption@Debug{TeX engine: e-TeX}
+ \newcommand*\caption@checkgrouplevel[2]{%
+ \@ifundefined{#1caption@grouplevel}{%
+ \@ifundefined{caption@grouplevel}{\let\caption@grouplevel\z@}{}%
+ \ifnum\currentgrouplevel>\caption@grouplevel\relax
+ \expandafter\edef\csname #1caption@grouplevel\endcsname{%
+ \the\currentgrouplevel}%
+ \else
+ \caption@Error{\string#2 outside group or environment}%
+ \fi
+ }{}}
+\fi
+\newcommand*\caption@undefinedlabel{%
+ \emph{Please place \caption@cs{label} \textbf{after} \caption@cs{caption}}}%
+\DeclareRobustCommand\caption@cs[1]{\texttt{\char`\\#1}}
+\def\captionof{\caption@teststar\caption@of{\caption*}\caption}
+\newcommand*\caption@of[2]{%
+ \let\caption@setfloatcapt\@firstofone
+ \caption@settype*{#2}#1}
+\newcommand*\captionlistentry{%
+ \@testopt\caption@listentry\@captype}
+\def\caption@listentry[#1]#2{%
+ \caption@refstepcounter{#1}%
+ \caption@makecurrent{#1}{#2}%
+ \caption@addcontentsline{#1}{#2}}
+\def\ContinuedFloat{%
+ \caption@iftype
+ {\addtocounter\@captype\m@ne
+ \caption@ContinuedFloat\@captype}%
+ {\caption@Error{\noexpand\ContinuedFloat outside float}}}
+\def\caption@ContinuedFloat#1{%
+ \edef\@tempa{#1}%
+ \ifx\@tempa\caption@CFtype \else
+ \caption@Error{Continued `#1' after `\caption@CFtype'}%
+ \fi
+ \stepcounter{ContinuedFloat}%
+ \caption@@ContinuedFloat{#1}%
+ \caption@setoptions{ContinuedFloat}%
+ \caption@setoptions{continued#1}%
+ \let\caption@resetContinuedFloat\@gobble}
+\newcounter{ContinuedFloat}
+\newcommand*\caption@CFtype{??}
+\newcommand*\caption@@ContinuedFloat[1]{}
+\newcommand*\caption@resetContinuedFloat[1]{%
+ \@stpelt{ContinuedFloat}\xdef\caption@CFtype{#1}}
+\newcommand*\caption@refstepcounter[1]{%
\caption@resetContinuedFloat{#1}%
+ \caption@@refstepcounter{#1}%
+ \let\caption@ifrefstepcounter\@firstoftwo}
+\newcommand*\caption@@refstepcounter{\refstepcounter}
+\let\caption@ifrefstepcounter\@secondoftwo
+\newcommand\caption@dblarg[1]{\kernel@ifnextchar[{#1}{\caption@xdblarg{#1}}}%
+\newcommand\caption@xdblarg[2]{#1[{#2\relax}]{#2}}%
+\newcommand*\caption@begin[1]{%
\begingroup
- \caption@setfloattype{#1}%
- \ifx\caption@lfmt\caption@lfmt@default\else
- \@namedef{fnum@#1}{%
- \caption@lfmt{\caption@floatname{#1}}{\@nameuse{the#1}}}%
- \fi
- \caption@fixposition
- \global\let\caption@fixedposition\caption@position}
+ \caption@setfnum{#1}%
+ \caption@fixposition
+ \global\let\caption@fixedposition\caption@position}
\newcommand\caption@beginex[3]{%
\caption@begin{#1}%
- \caption@iflof%
- {\def\caption@tempa{#2}}%
- {\let\caption@tempa\@empty}%
- \ifx\caption@tempa\@empty
- \long\def\addcontentsline##1##2##3{}% There is no \@gobblethree...
- \fi
- \caption@ifempty{#3}{\let\caption@ifempty\@secondoftwo}%
-}
+ \caption@addcontentsline{#1}{#2}%
+ \caption@ifempty{#3}{}}
\newcommand*\caption@end{%
\endgroup
\let\caption@position\caption@fixedposition}
-\let\caption@setfloattype\caption@settype
-\newcommand*\caption@letfloattype[2]{%
- \def\caption@setfloattype##1{%
- \caption@settype{##1}#2\caption@settype{#1}}}
-\newcommand*\caption@floatname[1]{\@nameuse{#1name}}
-\newcommand*\caption@setfloatname[1]{\@namedef{#1name}}
-\AtBeginDocument{%
- \@ifundefined{cc@caption}{%
- \@ifundefined{caption@old}{%
- \let\caption@old\caption
- \def\caption{\caption@caption\caption@old}%
- \def\caption@caption#1{%
- \@ifstar{\ContinuedFloat\global\caption@startrue#1[]}{#1}}%
- \let\caption@@old\@caption
+\newcommand*\caption@setfnum[1]{%
+ \@ifundefined{fnum@#1}{\iftrue}{\ifx\caption@lfmt\caption@lfmt@default\else}%
+ \@namedef{fnum@#1}{\caption@fnum{#1}}%
+ \fi}
+\caption@AtBeginDocument*{%
+ \@ifundefined{sf@ifpositiontop}{}{%
+ \let\caption@kernel@addcontentsline\caption@addcontentsline
+ \renewcommand*\caption@addcontentsline[2]{%
+ \sf@ifpositiontop{\@listsubcaptions{#1}}{}%
+ \caption@kernel@addcontentsline{#1}{#2}%
+ \sf@ifpositiontop{}{\@listsubcaptions{#1}}}%
+ }}
+\newcommand*\caption@boxrestore{%
+ \let\par\@@par
+ \parindent\z@ \parskip\z@skip
+ \leftskip\z@skip \rightskip\z@skip \@rightskip\z@skip
+ \parfillskip\@flushglue \lineskip\normallineskip
+ \baselineskip\normalbaselineskip
+ \sloppy
+}
+\newcommand*\caption@normalsize{%
+ \caption@font*{\KV@caption@fnt@normal\@unused}}
+\let\caption@setfloatcapt\@firstofone
+\newcommand*\caption@makecurrent[2]{}
+\let\caption@makestart\@gobble
+\let\caption@anchor\@firstofone
+\let\caption@start\relax
+\let\caption@@start\relax
+\let\caption@freezeHref\relax
+\let\caption@defrostHref\relax
+\g@addto@macro\caption@prepareslc{\let\caption@anchor\@firstofone}
+\caption@AtBeginDocument{%
+ \caption@setbool{incompatible}{0}%
+ \caption@CheckCommand\caption{%
+ % ltfloat.dtx [2002/10/01 v1.1v LaTeX Kernel (Floats)]
+ \def\caption{%
+ \ifx\@captype\@undefined
+ \@latex@error{\noexpand\caption outside float}\@ehd
+ \expandafter\@gobble
+ \else
+ \refstepcounter\@captype
+ \expandafter\@firstofone
+ \fi
+ {\@dblarg{\@caption\@captype}}%
+ }}%
+ \caption@CheckCommand\caption{%
+ % beamerbaselocalstructure.sty,v 1.53 2007/01/28 20:48:21 tantau
+ \def\caption{
+ \ifx\@captype\@undefined
+ \@latex@error{\noexpand\caption outside figure or table}\@ehd
+ \expandafter\@gobble
+ \else
+ \refstepcounter\@captype
+ \expandafter\@firstofone
+ \fi
+ {\@dblarg{\@caption\@captype}}%
+ }}%
+ \caption@CheckCommand\caption{%
+ % float.sty [2001/11/08 v1.3d Float enhancements (AL)]
+ \renewcommand\caption{%
+ \ifx\@captype\@undefined
+ \@latex@error{\noexpand\caption outside float}\@ehd
+ \expandafter\@gobble
+ \else
+ \refstepcounter\@captype
+ \let\@tempf\@caption
+ \expandafter\ifx\csname @float@c@\@captype\endcsname\relax\else
+ \expandafter\expandafter\let
+ \expandafter\@tempf\csname @float@c@\@captype\endcsname
+ \fi
+ \fi
+ \@dblarg{\@tempf\@captype}}}%
+ \caption@CheckCommand\caption{%
+ % hyperref.sty [2007/02/27 v6.75t Hypertext links for LaTeX]
+ % hyperref.sty [2007/04/09 v6.76a Hypertext links for LaTeX]
+ % hyperref.sty [2007/06/12 v6.76h Hypertext links for LaTeX]
+ \def\caption{%
+ \ifx\@captype\@undefined
+ \@latex@error{\noexpand\caption outside float}\@ehd
+ \expandafter\@gobble
+ \else
+ \H@refstepcounter\@captype
+ \@ifundefined{fst@\@captype}{%
+ \let\Hy@tempa\@caption
+ }{%
+ \let\Hy@tempa\Hy@float@caption
+ }%
+ \expandafter\@firstofone
+ \fi
+ {\@dblarg{\Hy@tempa\@captype}}%
+ }}%
+ \caption@CheckCommand\caption{%
+ % hyperref.sty [2007/08/05 v6.76j Hypertext links for LaTeX]
+ \def\caption{%
+ \ifx\@captype\@undefined
+ \@latex@error{\noexpand\caption outside float}\@ehd
+ \expandafter\@gobble
+ \else
+ \H@refstepcounter\@captype
+ \let\Hy@tempa\@caption
+ \@ifundefined{float@caption}{%
+ }{%
+ \expandafter\ifx\csname @float@c@\@captype\endcsname\float@caption
+ \let\Hy@tempa\Hy@float@caption
+ \fi
+ }%
+ \expandafter\@firstofone
+ \fi
+ {\@dblarg{\Hy@tempa\@captype}}%
+ }}%
+ \caption@IfCheckCommand{}{%
+ \caption@Info{%
+ Incompatible package detected (regarding \string\caption).\MessageBreak
+ \string\caption\space=\space\meaning\caption}%
+ \caption@setbool{incompatible}{1}}%
+ \caption@CheckCommand\@caption{%
+ % ltfloat.dtx [2002/10/01 v1.1v LaTeX Kernel (Floats)]
+ \long\def\@caption#1[#2]#3{%
+ \par
+ \addcontentsline{\csname ext@#1\endcsname}{#1}%
+ {\protect\numberline{\csname the#1\endcsname}{\ignorespaces #2}}%
+ \begingroup
+ \@parboxrestore
+ \if@minipage
+ \@setminipage
+ \fi
+ \normalsize
+ \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par
+ \endgroup}}%
+ \caption@CheckCommand\@caption{%
+ % beamerbaselocalstructure.sty,v 1.53 2007/01/28 20:48:21 tantau
+ \long\def\@caption#1[#2]#3{% second argument ignored
+ \par\nobreak
+ \begingroup
+ \@parboxrestore
+ \if@minipage
+ \@setminipage
+ \fi
+ \beamer@makecaption{#1}{\ignorespaces #3}\par\nobreak
+ \endgroup}}%
+ \caption@CheckCommand\@caption{%
+ % hyperref.sty [2007/02/27 v6.75t Hypertext links for LaTeX]
\long\def\@caption#1[#2]#3{%
+ \hyper@makecurrent{\@captype}%
+ \def\@currentlabelname{#2}%
+ \par\addcontentsline{\csname ext@#1\endcsname}{#1}{%
+ \protect\numberline{\csname the#1\endcsname}{\ignorespaces #2}%
+ }%
+ \begingroup
+ \@parboxrestore
+ \if@minipage
+ \@setminipage
+ \fi
+ \normalsize
+ \@makecaption{\csname fnum@#1\endcsname}{%
+ \ignorespaces
+ \ifHy@nesting
+ \hyper@@anchor{\@currentHref}{#3}%
+ \else
+ \Hy@raisedlink{\hyper@@anchor{\@currentHref}{\relax}}#3%
+ \fi
+ }%
+ \par
+ \endgroup
+ }}%
+ \caption@CheckCommand\@caption{%
+ % hyperref.sty [2007/04/09 v6.76a Hypertext links for LaTeX]
+ % hyperref.sty [2007/06/12 v6.76h Hypertext links for LaTeX]
+ % hyperref.sty [2007/08/05 v6.76j Hypertext links for LaTeX]
+ \long\def\@caption#1[#2]#3{%
+ \expandafter\ifx\csname if@capstart\expandafter\endcsname
+ \csname iftrue\endcsname
+ \global\let\@currentHref\hc@currentHref
+ \else
+ \hyper@makecurrent{\@captype}%
+ \fi
+ \def\@currentlabelname{#2}%
+ \par\addcontentsline{\csname ext@#1\endcsname}{#1}{%
+ \protect\numberline{\csname the#1\endcsname}{\ignorespaces #2}%
+ }%
+ \begingroup
+ \@parboxrestore
+ \if@minipage
+ \@setminipage
+ \fi
+ \normalsize
+ \expandafter\ifx\csname if@capstart\expandafter\endcsname
+ \csname iftrue\endcsname
+ \global\@capstartfalse
+ \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces#3}%
+ \else
+ \@makecaption{\csname fnum@#1\endcsname}{%
+ \ignorespaces
+ \ifHy@nesting
+ \hyper@@anchor{\@currentHref}{#3}%
+ \else
+ \Hy@raisedlink{\hyper@@anchor{\@currentHref}{\relax}}#3%
+ \fi
+ }%
+ \fi
+ \par
+ \endgroup
+ }}%
+ \caption@CheckCommand\@caption{%
+ % nameref.sty [2006/12/27 v2.28 Cross-referencing by name of section]
+ \long\def\@caption#1[#2]{%
+ \def\@currentlabelname{#2}%
+ \NR@@caption{#1}[{#2}]%
+ }}%
+ \caption@CheckCommand\@caption{%
+ % subfigure.sty [2002/07/30 v2.1.4 subfigure package]
+ \long\def\@caption#1[#2]#3{%
+ \@ifundefined{if#1topcap}%
+ {\subfig@oldcaption{#1}[{#2}]{#3}}%
+ {\@nameuse{if#1topcap}%
+ \@listsubcaptions{#1}%
+ \subfig@oldcaption{#1}[{#2}]{#3}%
+ \else
+ \subfig@oldcaption{#1}[{#2}]{#3}%
+ \@listsubcaptions{#1}%
+ \fi}}}%
+ \caption@CheckCommand\@caption{%
+ % subfig.sty [2005/06/28 ver: 1.3 subfig package]
+ \def\@caption{\caption@}%
+ }%
+ \caption@IfCheckCommand{}{%
+ \caption@Info{%
+ Incompatible package detected (regarding \string\@caption).\MessageBreak
+ \string\@caption\space=\space\meaning\@caption}%
+ \caption@setbool{incompatible}{1}}%
+ \@ifundefined{caption@ifcompatibility}%
+ {\let\caption@ifcompatibility\caption@ifincompatible
+ \let\@tempa\@firstofone}%
+ {\let\@tempa\@gobble}% suppress warning
+ \caption@ifcompatibility{%
+ \@tempa{%
+ \PackageWarning{caption}{%
+ *************************************************\MessageBreak
+ \noexpand\caption will not be redefined since it's already\MessageBreak
+ redefined by a document class or package which is\MessageBreak
+ unknown to the caption package.\MessageBreak
+ As a result some new features of the caption\MessageBreak
+ package will not work as expected.\MessageBreak
+ *************************************************\@gobbletwo}%
+ }%
+ \renewcommand*\caption@ContinuedFloat[1]{%
+ \caption@Error{Not available in compatibility mode}}%
+ \caption@AtBeginDocument*{%
+ \let\caption@start\relax
+ \@ifundefined{caption@ORI@capstart}{}{%
+ \caption@Debug{%
+ Undo redefinition of \string\capstart\@gobble}%
+ \let\capstart\caption@ORI@capstart
+ \let\caption@ORI@capstart\@undefined}%
+ \@ifundefined{Hy@float@makebox}{}{%
+ \caption@Debug{%
+ Restore hyperref redefinition of \string\float@makebox\@gobble}%
+ \let\float@makebox\Hy@float@makebox
+ \let\Hy@float@makebox\@undefined}%
+ }%
+ \newcommand*\caption@star[2]{#1#2}%
+ }{%
+ \caption@ifincompatible{%
+ \PackageWarning{caption}{%
+ *****************************************************\MessageBreak
+ Forced redefinition of \noexpand\caption since the\MessageBreak
+ unsupported(!) package option `compatibility=false'\MessageBreak
+ was given. Please fasten your seat belts, as we may\MessageBreak
+ experience turbulence!\MessageBreak
+ *****************************************************\@gobbletwo}%
+ }{}%
+ \def\caption{%
+ \caption@iftype
+ {\caption@checkgrouplevel\@empty\caption
+ \caption@star
+ {\caption@refstepcounter\@captype}%
+ {\caption@dblarg{\@caption\@captype}}}%
+ {\caption@Error{\noexpand\caption outside float}}}%
+ \newcommand*\caption@star[2]{%
+ \@ifstar{\global\caption@startrue#2[]}{#1#2}}%
+ \long\def\@caption#1[#2]#3{%
+ \ifcaption@star \else
+ \caption@makecurrent{#1}{#2}%
+ \caption@ifhypcap{\caption@@start}{}%
+ \fi
+ \par
\caption@beginex{#1}{#2}{#3}%
- \caption@@old{#1}[{#2}]{#3}%
+ \caption@setfloatcapt{%
+ \caption@boxrestore
+ \caption@normalsize
+ \ifcaption@star
+ \let\caption@anchor\@firstofone
+ \fi
+ \@makecaption{\csname fnum@#1\endcsname}%
+ {\ignorespaces\caption@anchor{#3}}\par}%
\caption@end}%
- }{}}{%
- \caption@Info{captcont package v2.0 detected}%
- \def\caption@caption#1{#1}%
+ \let\caption@ORI@xfloat\@xfloat
+ \def\@xfloat#1[#2]{%
+ \caption@ORI@xfloat{#1}[#2]%
+ \caption@settype{#1}}%
}%
}
-\renewcommand\@makecaption[2]{%
+\long\def\@makecaption#1#2{%
\caption@iftop{\vskip\belowcaptionskip}{\vskip\abovecaptionskip}%
\caption@@make{#1}{#2}%
\caption@iftop{\vskip\abovecaptionskip}{\vskip\belowcaptionskip}}
+\@ifundefined{smf@makecaption}{}{\let\smf@makecaption\@makecaption}
+\@ifclassloaded{beamer}{%
+ \caption@Info{beamer document class}%
+ \captionsetup{listof=false}
+ \undefine@key{caption}{listof}
+ \undefine@key{caption}{listofformat}
+}{}
\@ifundefined{scr@caption}{}{%
- \caption@Info{KOMA-Script class detected}
- \AtBeginDocument{\let\scr@caption\caption}
- \def\onelinecaptionstrue{\caption@setbool{slc}{1}}
- \def\onelinecaptionsfalse{\caption@setbool{slc}{0}}
- \def\captionabove{%
- \caption@setposition{t}\let\caption@setposition\@gobble
- \scr@caption}
- \def\captionbelow{%
- \caption@setposition{b}\let\caption@setposition\@gobble
- \scr@caption}
-}
-\AtBeginDocument{\@ifundefined{f@ffrench}{}{%
- \caption@Info{french(le) package detected}%
+ \caption@AtBeginDocument{\let\scr@caption\caption}}
+\@ifundefined{caption@frenchb}{}{\caption@frenchb}
+\caption@AtBeginDocument{\@ifundefined{frenchTeXmods}{}{%
+ \caption@Info{frenchle/pro package is loaded}%
+ \let\captionfont@ORI\captionfont
+ \let\captionlabelfont@ORI\captionlabelfont
+ \let\@makecaption@ORI\@makecaption
+
\@ifundefined{GOfrench}%
- {\let\caption@tempa\@firstofone}%
- {\def\caption@tempa{\g@addto@macro\GOfrench}}%
- \caption@tempa{%
+ {\let\@tempa\@firstofone}%
+ {\def\@tempa{\g@addto@macro\GOfrench}}%
+ \@tempa{%
+ \let\captionfont\captionfont@ORI
+ \let\captionfont@ORI\@undefined
+ \let\captionlabelfont\captionlabelfont@ORI
+ \let\captionlabelfont@ORI\@undefined
+ \let\@makecaption\@makecaption@ORI
+ \let\@makecaption@ORI\@undefined
\let\@cnORI\caption
- \let\caption@tablescaption\@tablescaption
- \def\@tablescaption{\caption@caption\caption@tablescaption}%
+ \let\caption@tcORI\@tablescaption
+ \def\@tablescaption{\caption@star\relax\caption@tcORI}%
\let\@eatDP\@undefined
- \let\caption@tempa\@empty
+ \let\@tempa\@empty
\ifx\f@ffrench\fnum@figure
- \l@addto@macro\caption@tempa{\let\fnum@figure\f@ffrench}%
+ \l@addto@macro\@tempa{\let\fnum@figure\f@ffrench}%
\fi
\ifx\f@tfrench\fnum@table
- \l@addto@macro\caption@tempa{\let\fnum@table\f@tfrench}%
+ \l@addto@macro\@tempa{\let\fnum@table\f@tfrench}%
\fi
\def\f@ffrench{\ifx\listoffigures\relax\else\figurename~\thefigure\fi}%
\def\f@tfrench{\ifx\listoftables\relax\else\tablename~\thetable\fi}%
- \caption@tempa
-}}}
-\def\caption@setfloatposition{%
- \caption@setposition{\@fs@iftopcapt t\else b\fi}}
-\caption@ifpackage{float}{@float@setevery}{%
- \caption@Info{float package v1.3 (or newer) detected}%
- \let\caption@of@float\@gobble
- \renewcommand*\caption@of[2]{%
- \@ifundefined{fst@#2}{}{%
- \let\caption@of@float\@firstofone
- \@nameuse{fst@#2}\@float@setevery{#2}}%
- \def\@captype{#2}#1}%
- \let\caption@@float\float@caption
- \long\def\float@caption#1[#2]#3{%
- \caption@beginex{#1}{#2}{#3}%
- \let\@fs@capt\caption@@make
- \caption@@float{#1}[{#2}]{#3}%
- \caption@of@float{%
- \@ifundefined{hyper@@anchor}{}{%
- \begingroup
- \@tempdima\prevdepth
- \nointerlineskip
- \let\leavevmode\relax
- \hyper@@anchor\@currentHref\relax
- \prevdepth\@tempdima
- \endgroup}%
- \def\caption@@make##1##2{\unvbox\@floatcapt}%
- \@makecaption{}{}}%
- \caption@end}%
- \let\caption@float@setevery\@float@setevery
- \def\@float@setevery#1{%
- \def\caption@floatname##1{\@nameuse{fname@#1}}%
- \def\caption@setfloatname##1{\@namedef{fname@#1}}%
- \expandafter\let\expandafter\caption@tempa\csname @float@c@#1\endcsname
- \ifx\caption@tempa\float@caption
- \else\ifx\caption@tempa\@caption
- \else\ifx\caption@tempa\caption@@float
- \caption@Info{\protect\@float@c@#1\space := \protect\float@caption}%
- \expandafter\let\csname @float@c@#1\endcsname\float@caption
+ \@tempa
+ }%
+}}
+\newcommand\caption@IfPackageLoaded[1]{%
+ \@testopt{\caption@@IfPackageLoaded{#1}}{}}
+\@onlypreamble\caption@IfPackageLoaded
+\long\def\caption@@IfPackageLoaded#1[#2]#3#4{%
+ \@ifpackageloaded{#1}\@firstofone{%
+ \caption@Debug{#1 package is not loaded (yet)\@gobble}%
+ \caption@AtBeginDocument}{%
+ \caption@@ifpackageloaded{#1}[#2]{#3}{#4}}}
+\@onlypreamble\caption@@IfPackageLoaded
+\newcommand\caption@ifpackageloaded[1]{%
+ \@testopt{\caption@@ifpackageloaded{#1}}{}}
+\@onlypreamble\caption@ifpackageloaded
+\long\def\caption@@ifpackageloaded#1[#2]{%
+ \@ifpackageloaded{#1}{%
+ \caption@Info{#1 package is loaded}%
+ \@ifpackagelater{#1}{#2}\@firstoftwo{%
+ \caption@Error{%
+ For a successful cooperation we need at least version\MessageBreak
+ `#2' of package #1,\MessageBreak
+ but only version\MessageBreak
+ `\csname ver@#1.\@pkgextension\endcsname'\MessageBreak
+ is available}%
+ \@secondoftwo}%
+ }{\@secondoftwo}}
+\@onlypreamble\caption@@ifpackageloaded
+\newcommand*\caption@clearmargin{%
+ \setcaptionmargin\z@
+ \let\caption@minmargin\@undefined}
+\caption@setbool{needfreeze}{0}
+\caption@AtBeginDocument*{%
+ \caption@ifneedfreeze{%
+ \newcommand*\caption@freeze{%
+ \caption@teststar\caption@@freeze\@gobble\@firstofone}%
+ \newcommand*\caption@@freeze[1]{%
+ \global\let\caption@SCcontinued\relax
+ \global\let\caption@SCsetup\@undefined
+ \global\let\caption@SClentry\@undefined
+ \global\let\caption@SCtext\@undefined
+ \global\let\caption@SClabel\@undefined
+ \let\caption@ORI@ContinuedFloat\ContinuedFloat
+ \def\ContinuedFloat{%
+ \let\caption@ORI@setcounter\setcounter
+ \let\caption@ORI@addtocounter\addtocounter
+ \def\setcounter####1####2{\csname c@####1\endcsname####2\relax}%
+ \def\addtocounter####1####2{\advance\csname c@####1\endcsname ####2\relax}%
+ \caption@ORI@ContinuedFloat
+ \global\let\caption@SCcontinued\caption@ORI@ContinuedFloat
+ \let\setcounter\caption@ORI@setcounter
+ \let\addtocounter\caption@ORI@addtocounter}%
+ \def\captionsetup##1{%
+ \caption@g@addto@list\caption@SCsetup{##1}%
+ \caption@setup{##1}}%
+ \def\caption{%
+ \let\captionsetup\@gobble
+ \caption@star
+ {\let\caption@ORI@refstepcounter\caption@@refstepcounter
+ \def\caption@@refstepcounter########1{%
+ \advance\csname c@########1\endcsname\@ne\relax}%
+ \caption@refstepcounter\@captype
+ \let\caption@@refstepcounter\caption@ORI@refstepcounter}%
+ {\caption@dblarg\@caption@SC}}%
+ \def\@caption@SC[##1]##2{%
+ \gdef\caption@SClentry{##1}\gdef\caption@SCtext{##2}%
+ \ignorespaces}%
+ #1{% is \@gobble in star form, and \@firstofone otherwise
+ \def\label##1{\gdef\caption@SClabel{##1}\ignorespaces}}%
+ }%
+ \newcommand*\caption@defrost{%
+ \ifx\caption@ORI@ContinuedFloat\@undefined
+ \caption@SCcontinued
+ \ifx\caption@SCsetup\@undefined \else
+ \expandafter\captionsetup\expandafter{\caption@SCsetup}%
+ \fi
+ \ifx\caption@SCtext\@undefined \else
+ \expandafter\expandafter\expandafter\caption
+ \expandafter\expandafter\expandafter[%
+ \expandafter\expandafter\expandafter{%
+ \expandafter\caption@SClentry\expandafter}\expandafter]%
+ \expandafter{\caption@SCtext}%
+ \fi
+ \ifx\caption@SClabel\@undefined \else
+ \expandafter\label\expandafter{\caption@SClabel}%
+ \fi
\else
- \caption@Info{\protect\@float@c@#1\space := \protect\@caption}%
- \expandafter\let\csname @float@c@#1\endcsname\@caption
- \fi\fi\fi
- \expandafter\ifx\csname @float@c@#1\endcsname\float@caption
- \caption@setfloatposition
- \expandafter\let\expandafter\caption@fst\csname fst@#1\endcsname
- \edef\caption@fst{\noexpand\string\expandafter\noexpand\caption@fst}%
- \edef\caption@fst{\noexpand\@gobblefour\caption@fst}%
- \caption@setstyle*\caption@fst
- \caption@settype\caption@fst
- \fi
- \caption@float@setevery{#1}}%
+ \caption@Error{Internal error:\MessageBreak
+ \noexpand\caption@defrost in same group as \string\caption@freeze}%
+ \fi}%
+ }{}%
+ \caption@undefbool{needfreeze}}
+\caption@IfPackageLoaded{float}[2001/11/08 v1.3d]{%
+ \@ifpackageloaded{floatrow}{%
+ \caption@ifpackageloaded{floatrow}[2007/08/24 v0.2a]{}{}%
+ }{%
+ \let\caption@ORI@float@setevery\@float@setevery
+ \def\@float@setevery#1{%
+ \float@ifcaption{#1}{%
+ \caption@setposition{\@fs@iftopcapt t\else b\fi}%
+ \renewcommand\caption@setfloatcapt{%
+ \let\@makecaption\caption@@make
+ \global\setbox\@floatcapt\vbox}%
+ \float@getstyle\float@style{#1}%
+ \caption@setstyle*\float@style
+ \caption@setoptions\float@style
+ }{}%
+ \caption@freezeHref % will be defrosted in \float@makebox
+ \caption@ORI@float@setevery{#1}}%
+ \renewcommand*\caption@setfloatcapt{%
+ \float@ifcaption\@captype{%
+ \caption@Error{Something is going wrong here...\MessageBreak
+ For a removal of this problem please consult the\MessageBreak
+ caption package documentation, especially the sections\MessageBreak
+ about the `float' and the `wrapfig' package}%
+ \@gobble
+ }{%
+ \@firstofone
+ }}%
+ \g@addto@macro\caption@settypehook{%
+ \expandafter\ifx\csname #1name\endcsname\relax
+ \expandafter\let\csname #1name\expandafter\endcsname
+ \csname fname@#1\endcsname
+ \fi}%
\g@addto@macro\fs@plaintop{\def\@fs@mid{\vspace\abovecaptionskip\relax}}%
\g@addto@macro\fs@boxed{\def\@fs@mid{\kern\abovecaptionskip\relax}}%
+ \providecommand*\float@ifstyle[1]{%
+ \expandafter\ifx\csname fst@#1\endcsname\relax
+ \expandafter\@secondoftwo
+ \else
+ \expandafter\@firstoftwo
+ \fi}%
+ \providecommand*\float@getstyle[2]{%
+ \edef#1{%
+ \noexpand\expandafter\noexpand\@gobblefour\noexpand\string
+ \expandafter\expandafter\expandafter\noexpand
+ \csname fst@#2\endcsname}%
+ \edef#1{#1}%
+ \caption@Debug{floatstyle{#2} = `#1'}}%
+ \providecommand*\float@setstyle[2]{%
+ \expandafter\edef\csname fst@#1\endcsname{%
+ \expandafter\noexpand\csname fs@#2\endcsname}}%
+ \providecommand*\float@dostyle[1]{%
+ \@nameuse{fst@#1}\@float@setevery{#1}}%
+ \providecommand*\float@ifcaption[1]{%
+ \expandafter\ifx\csname @float@c@#1\endcsname\float@caption
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi}%
+}}{%
+ \providecommand*\float@ifstyle[1]{\@secondoftwo}%
+ \providecommand*\float@ifcaption[1]{\@secondoftwo}%
}
-\captionsetup[boxed]{skip=2pt}
+\captionsetup*[boxed]{skip=2pt} % do not issue a warning when not used
\caption@ifbool{ruled}{%
- \captionsetup[ruled]{margin=0pt,singlelinecheck=0}%
+ \captionsetup[ruled]{margin=0pt,minmargin=0,singlelinecheck=0}%
}{%
\DeclareCaptionStyle{ruled}{labelfont=bf,labelsep=space,strut=0}%
}
\caption@undefbool{ruled}
-\caption@ifpackage{floatrow}{flrow@setlist}{%
- \caption@Info{floatrow package v0.1f (or newer) detected}%
- \renewcommand*\caption@of[2]{%
- \def\@captype{#2}\flrow@setlist{{#2}}#1}%
- \renewcommand*\caption@floatname[1]{%
- \@nameuse{\@ifundefined{fname@#1}{#1name}{fname@#1}}}%
- \renewcommand*\caption@setfloatname[1]{%
- \@namedef{\@ifundefined{fname@#1}{#1name}{fname@#1}}}%
-}
-\caption@ifpackage{hyperref}{theHfigure}{%
- \caption@Info{hyperref package v6.74m (or newer) detected}%
- \def\caption@ContinuedFloat#1{%
- \@ifundefined{theH#1}{}{%
- \@ifundefined{CF@#1}{%
- \expandafter\caption@newcounter\csname CF@#1\endcsname
- \caption@resetContinuedFloat{#1}}{}%
- \expandafter\caption@stepcounter\csname CF@#1\endcsname
- \expandafter\l@addto@macro\csname theH#1\endcsname{%
- .\csname CF@#1\endcsname}%
- \let\caption@resetContinuedFloat\@gobble
- }}%
- \def\caption@resetContinuedFloat#1{%
- \@ifundefined{CF@#1}{}{%
- \expandafter\caption@setcounter\csname CF@#1\endcsname0}}%
-}
-\caption@ifpackage{hypcap}{hc@caption}{%
- \caption@Info{hypcap package v1.0 (or newer) detected}%
- \let\caption@capstart\capstart
- \def\capstart{%
- \let\hc@org@caption\caption
- \begingroup
- \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
- \@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}}%
+\caption@IfPackageLoaded{floatflt}[1996/02/27 v1.3]{%
+ \let\caption@ORI@floatingfigure\floatingfigure
+ \def\floatingfigure{%
+ \caption@floatflt{figure}%
+ \caption@ORI@floatingfigure}%
+ \let\caption@ORI@floatingtable\floatingtable
+ \def\floatingtable{%
+ \caption@floatflt{table}%
+ \caption@ORI@floatingtable}%
+ \newcommand*\caption@floatflt[1]{%
+ \caption@settype{#1}%
+ \caption@setoptions{floating#1}%
+ \let\caption@boxrestore\@parboxrestore}%
+}{}
+\caption@IfPackageLoaded{fltpage}[1998/10/29 v.0.3]{%
+ \caption@setbool{needfreeze}{1}%
+ \renewcommand\FP@helpNote[2]{%
+ \begingroup % save \caption@thepage
+ \caption@pageref{#2}%
+ \typeout{FP#1 is inserted on page \caption@thepage!}%
+ \endgroup}%
+ \renewcommand*\FP@floatBegin[1]{%
+ \def\@captype{#1}%
+ \let\FP@LabelText\@empty
+ \begin{lrbox}{\FP@floatCorpusBOX}%
+ \caption@ifFPrefcap\caption@freeze{%
+ \def\label##1{\gdef\FP@LabelText{##1}\ignorespaces}%
+ \caption@freeze*}}%
+ \renewcommand*\FP@floatEnd{%
+ \end{lrbox}%
+ \stepcounter{FP@\@captype C}%
+ \caption@label\FP@positionLabel
+ \FP@helpNote\@captype\FP@positionLabel
+ \let\FP@ContinuedFloat\relax
+ \FP@float
+ {\FP@positionLabel}% location label test
+ {\begin\@captype[p!]%
+ \FP@ContinuedFloat
+ \usebox\FP@floatCorpusBOX
+ \caption@ifFPlistcap
+ {\caption@refstepcounter\@captype
+ \expandafter\caption@makecurrent\expandafter\@captype
+ \expandafter{\caption@SClentry}}%
+ {\expandafter\captionlistentry\expandafter{\caption@SClentry}}%
+ \caption@anchor\relax
+ \ifx\FP@LabelText\@empty \else
+ \expandafter\label\expandafter{\FP@LabelText}%
+ \fi
+ \end\@captype}%
+ {\let\FP@ContinuedFloat\ContinuedFloat
+ \caption@ifcompatibility
+ {\let\caption@ContinuedFloat\@gobble}%
+ {\caption@clearsetup{ContinuedFloat}%
+ \caption@clearsetup{continued\@captype}}}%
+ {\begin\@captype[b!]%
+ \FP@ContinuedFloat
+ \let\FP@savedSetfnumCommand\caption@setfnum
+ \def\caption@setfnum##1{%
+ \FP@savedSetfnumCommand{##1}%
+ \ifx\FP@guide\@empty \else
+ \expandafter\l@addto@macro\csname fnum@##1\endcsname{\ {\FP@guide}}%
+ \fi}%
+ \setlength\abovecaptionskip{2pt plus 2pt minus 1pt}% length above caption
+ \setlength\belowcaptionskip{2pt plus 2pt minus 1pt}% length below caption
+ \caption@setoptions{FP\@captype}%
+ \FP@separatorCaption
+ \caption@ifFPlistcap{}{\caption@set@bool\caption@iflof0}%
+ \caption@defrost
+ \end\@captype}%
}%
- \let\caption@hc@@caption\hc@@caption
- \long\def\hc@@caption#1[#2]#3{%
- \caption@beginex{#1}{#2}{#3}%
- \let\caption@hyper@makecurrent\hyper@makecurrent
- \def\hyper@makecurrent\@captype{%
- \let\hyper@makecurrent\caption@hyper@makecurrent
- \global\let\@currentHref\hc@currentHref}%
- \caption@hc@@caption{#1}[{#2}]{#3}%
- \caption@end}%
+}{%
+ \let\caption@ifFPlistcap\@undefined
+ \let\caption@ifFPrefcap\@undefined
}
-\caption@ifpackage{listings}{lst@MakeCaption}{%
- \caption@Info{listings package v1.2 (or newer) detected}%
- \let\caption@lst@MakeCaption\lst@MakeCaption
+\caption@IfPackageLoaded{hyperref}[2003/11/30 v6.74m]{%
+ \@ifundefined{hyper@makecurrent}{% hyperref has stopped early
+ \PackageWarningNoLine{caption}{%
+ Hyperref support is turned off\MessageBreak
+ because hyperref has stopped early}%
+ }{%
+ \renewcommand*\caption@@refstepcounter{\H@refstepcounter}%
+ \renewcommand*\caption@makecurrent[2]{%
+ \caption@makecurrentHref{#1}%
+ \caption@Debug{hyper current=\@currentHref}%
+ \def\@currentlabelname{#2}}%
+ \newcommand*\caption@makecurrentHref{\hyper@makecurrent}%
+ \renewcommand*\caption@makestart[1]{%
+ \begingroup
+ \Hy@hypertexnamesfalse
+ \gdef\@currentHlabel{}%
+ \hyper@makecurrent{#1.xxx}%
+ \endgroup
+ \caption@Debug{hyper start=\@currentHref}}%
+ \renewcommand\caption@anchor[1]{%
+ \caption@Debug{hyper anchor \@currentHref}%
+ % If we cannot have nesting, the anchor is empty.
+ \ifHy@nesting
+ \hyper@@anchor{\@currentHref}{#1}%
+ \else
+ \Hy@raisedlink{\hyper@@anchor{\@currentHref}{\relax}}#1%
+ \fi}%
+ \newcommand*\caption@@anchor[1]{%
+ \caption@Debug{hyper anchor #1}%
+ \begingroup
+ \@tempdima\prevdepth
+ \nointerlineskip
+ \vspace*{-\caption@hypcapspace}%
+ \let\leavevmode\relax
+ \hyper@@anchor{#1}\relax
+ \vspace*{\caption@hypcapspace}%
+ \prevdepth\@tempdima
+ \endgroup}%
+ \renewcommand*\caption@@ContinuedFloat[1]{%
+ \@ifundefined{theH#1}{}{%
+ \expandafter\l@addto@macro\csname theH#1\endcsname{%
+ \@alph\c@ContinuedFloat}}}%
+ \newif\if@capstart
+ \def\caption@start{%
+ \caption@ifhypcap{%
+ \ifvmode
+ \caption@makestart\@captype
+ \caption@@anchor\@currentHref
+ \global\@capstarttrue
+ \let\hc@currentHref\@currentHref
+ \def\caption@makecurrentHref##1{%
+ \global\@capstartfalse
+ \global\let\@currentHref\hc@currentHref}%
+ \let\caption@anchor\@firstofone
+ \let\caption@@anchor\@gobble
+ \else
+ \PackageWarning{caption}{Wrong TeX mode, no hyperlink anchor was set}%
+ \fi}{}}%
+ \def\caption@@start{%
+ \@ifundefined{hc@currentHref}{%
+ \PackageWarning{caption}{%
+ The option `hypcap=true' will be ignored for this\MessageBreak
+ particular \string\caption}}{}}%
+ \def\caption@freezeHref{%
+ \let\caption@ORI@start\caption@start
+ \def\caption@start{\let\caption@start\caption@ORI@start}%
+ \let\caption@ORI@@start\caption@@start
+ \global\let\caption@currentHref\@undefined
+ \def\caption@@start{\global\let\caption@currentHref\@currentHref}%
+ \let\caption@ORI@setfloatcapt\caption@setfloatcapt
+ \renewcommand*\caption@setfloatcapt{%
+ \ifx\caption@currentHref\@undefined \else
+ \let\caption@anchor\@firstofone
+ \fi
+ \caption@ORI@setfloatcapt}}%
+ \def\caption@defrostHref{%
+ \ifx\caption@currentHref\@undefined \else
+ \caption@@anchor\caption@currentHref
+ \global\let\caption@currentHref\@undefined
+ \fi}%
+ \@ifundefined{HyOrg@float@makebox}{}{%
+ \caption@Debug{%
+ Redefining \noexpand\float@makebox (again)\@gobble}%
+ \let\Hy@float@makebox\float@makebox
+ \renewcommand\float@makebox[1]{%
+ \HyOrg@float@makebox{#1\relax \caption@defrostHref}}%
+ }%
+}}{}
+\caption@IfPackageLoaded{hypcap}{% v1.0
+ \ifx\caption@start\relax \else % hyperref hasn't stopped early
+ \let\caption@ORI@capstart\capstart
+ \let\capstart\caption@start
+ \let\caption@start\relax
+ \let\caption@@start\relax
+ \renewcommand*\caption@hypcapspace{\hypcapspace}%
+ \@ifundefined{Hy@float@makebox}{}{%
+ \caption@Debug{%
+ Restore hyperref redefinition of \string\float@makebox\@gobble}%
+ \let\float@makebox\Hy@float@makebox
+ \let\Hy@float@makebox\@undefined}%
+ \fi}{}
+\caption@IfPackageLoaded{listings}[2004/02/13 v1.2]{%
+ \let\caption@ORI@lst@MakeCaption\lst@MakeCaption
\def\lst@MakeCaption#1{%
- \def\caption@autoposition{\caption@setposition{#1}}%
+ \caption@setoptions{lstlisting}%
+ \caption@setautoposition{#1}%
\caption@begin{lstlisting}%
- \caption@lst@MakeCaption{#1}%
+ \caption@ORI@lst@MakeCaption{#1}%
\caption@end}%
-}
-\caption@ifpackage{longtable}{LT@makecaption}{%
- \caption@Info{longtable package v3.15 (or newer) detected}%
- \def\LT@makecaption#1#2#3{%
+ \providecommand*\ext@lstlisting{lol}%
+ \g@addto@macro\caption@settypehook{\let\lst@@caption\relax}%
+}{}
+\providecommand*\LTcaptype{table}
+\caption@IfPackageLoaded{longtable}[1995/05/24 v3.14]{%
+ \RequirePackage{ltcaption}[2007/09/01]%
+ \let\LT@@makecaption\@undefined
+ \let\caption@ORI@LT@array\LT@array
+ \renewcommand*\LT@array{%
+ \global\let\caption@opt@@longtable\@undefined
+ \def\captionsetup##1{\noalign{%
+ \@captionsetup\@gobble[@longtable]{##1}%
+ \global\let\caption@opt@@longtable\caption@opt@@longtable}}%
+ \def\captionlistentry##1{\noalign{%
+ \caption@listentry[\LTcaptype]{##1}}}%
+ \def\ContinuedFloat{\noalign{%
+ \caption@Error{\noexpand\ContinuedFloat outside float}}}%
+ \caption@ORI@LT@array}%
+\def\LT@c@ption#1[#2]#3{%
+ \LT@makecaption#1{\csname fnum@\LTcaptype\endcsname}{#3}%
+ \def\@currentlabelname{#2}%
+ \caption@addcontentsline\LTcaptype{#2}}%
+ \renewcommand\LT@makecaption[3]{%
\caption@LT@make{%
\caption@startrue#1\caption@starfalse
- \caption@letfloattype{longtable}{%
- \ifdim\LTcapwidth=4in \else
- \setcaptionwidth\LTcapwidth
- \fi}%
- \let\caption@defaultpos\@firstoftwo
- \def\caption@autoposition{%
- \caption@setposition{\ifcase\LT@rows t\else b\fi}}%
- \caption@begin{table}%
+ \caption@settype*\LTcaptype
+ \ifdim\LTcapwidth=4in \else
+ \setcaptionwidth\LTcapwidth
+ \fi
+ \caption@setoptions{longtable}%
+ \caption@setoptions{@longtable}%
+ \caption@setautoposition{\ifcase\LT@rows t\else b\fi}%
+ \caption@resetContinuedFloat\LTcaptype
+ \caption@begin\LTcaptype
+ \caption@normalsize
\vskip-\ht\strutbox
\caption@iftop{\vskip\belowcaptionskip}{\vskip\abovecaptionskip}%
\caption@@make{#2}{#3}\endgraf
\caption@iftop{\vskip\abovecaptionskip}{\vskip\belowcaptionskip}%
\caption@end}}%
- \newcommand\caption@LT@make[1]{%
- \LT@mcol\LT@cols c{\hbox to\z@{\hss\parbox[t]\hsize{#1}\hss}}}%
-}
-\caption@ifpackage{picins}{piccaption}{%
- \caption@Info{picins package v3.0 (or newer) detected}%
- \def\piccaption{\@dblarg\@piccaption}
+}{}
+\caption@IfPackageLoaded{picinpar}{%
+ \long\def\figwindow[#1,#2,#3,#4] {%
+ \caption@window{figure}%
+ \caption@setoptions{figwindow}%
+ \begin{window}[#1,#2,{#3},\caption@wincaption{#4}] }%
+ \long\def\tabwindow[#1,#2,#3,#4] {%
+ \caption@window{table}%
+ \caption@setoptions{tabwindow}%
+ \begin{window}[#1,#2,{#3},\caption@wincaption{#4}] }%
+ \newcommand*\caption@window{%
+ \let\caption@boxrestore\@parboxrestore
+ \let\@makecaption\caption@@make
+ \caption@setautoposition b%
+ \caption@settype}%
+ \newcommand\caption@wincaption[1]{%
+ \ifdim\picwd=\z@
+ \let\caption@makecurrent\@gobbletwo
+ \let\caption@@start\relax
+ \caption@prepareslc
+ \fi
+ \edef\@tempa{\expandafter\noexpand\@car#1\@nil}%
+ \if\@tempa*
+ \let\@tempa\@firstofone
+ \else\if\@tempa[%]
+ \let\@tempa\@firstofone
+ \else
+ \let\@tempa\@empty
+ \fi\fi
+ \expandafter\caption\@tempa{#1}}%
+}{}
+\newcommand*\piccaptiontype[1]{\def\@piccaptype{#1}}
+\caption@IfPackageLoaded{picins}{%
+ \@ifundefined{@piccaptype}{%
+ \caption@iftype{%
+ \let\@piccaptype\@captype
+ }{%
+ \def\@piccaptype{figure}%
+ }%
+ }{}%
+ \let\@captype\@undefined
+ \def\piccaption{\caption@star\relax{\caption@dblarg\@piccaption}}%
+ \let\caption@ORI@make@piccaption\make@piccaption
+ \def\make@piccaption{%
+ \let\caption@ORI\caption
+ \long\def\caption[##1]##2{%
+ \caption@freezeHref % will be defrosted in \ivparpic
+ \caption@settype\@piccaptype
+ \ifnum\c@piccaptionpos>2\relax
+ \caption@clearmargin
+ \else
+ \captionwidth\z@ % do not use "width=" setting
+ \fi
+ \caption@setoptions{parpic}%
+ \let\caption@boxrestore\@parboxrestore
+ \caption@setautoposition b%
+ \expandafter\expandafter\expandafter\caption@ORI
+ \expandafter\expandafter\expandafter[%
+ \expandafter\expandafter\expandafter{%
+ \expandafter##1\expandafter}\expandafter]\expandafter{##2}}%
+ \caption@ORI@make@piccaption
+ \let\caption\caption@ORI}%
+
+ \let\caption@ORI@ivparpic\ivparpic
+ \def\ivparpic(#1,#2)(#3,#4)[#5][#6]#7{%
+ \let\caption@ORI@noindent\noindent
+ \def\noindent{%
+ \caption@defrostHref
+ \let\noindent\caption@ORI@noindent
+ \noindent}%
+ \caption@ORI@ivparpic(#1,#2)(#3,#4)[#5][#6]{#7}%
+ \let\noindent\caption@ORI@noindent}%
+}{%
+ \let\piccaptiontype\@undefined
}
-\caption@ifpackage{rotating}{@rotcaption}{%
- \caption@Info{rotating package v2.0 (or newer) detected}%
+\caption@IfPackageLoaded{rotating}[1995/08/22 v2.10]{%
\def\rotcaption{\let\@makecaption\@makerotcaption\caption}%
\def\rotcaptionof{%
- \@ifstar{\caption@of{\rotcaption*}}{\caption@of\rotcaption}}%
+ \caption@teststar\caption@of{\rotcaption*}\rotcaption}%
\long\def\@makerotcaption#1#2{%
\ifdim\captionwidth=\z@
\setcaptionwidth{.8\textheight}%
\caption@slc{#1}{#2}{.8\vsize}{%
\let\caption@makerot\caption@@make
- \setcaptionmargin\z@
+ \caption@clearmargin
\let\captionbox\@secondoftwo}%
- \caption@setbool{slc}{0}% been there, done that
+ \caption@set@bool\caption@ifslc0% been there, done that
\fi
\rotatebox{90}{\caption@makerot{#1}{#2}}%
\nobreak\hspace{12pt}}%
\newcommand\caption@makerot[2]{%
\begin{minipage}\captionwidth\caption@@make{#1}{#2}\end{minipage}}%
-}
-\caption@ifpackage{sidecap}{endSC@FLOAT}{%
- \caption@Info{sidecap package v1.4d (or newer) detected}%
- \@ifundefined{caption@caption}%
- {\let\caption@tempa\AtBeginDocument}%
- {\let\caption@tempa\@firstofone}%
- \caption@tempa{\let\SC@caption=\caption}%
- \let\caption@SC@zfloat\SC@zfloat
+}{}
+\caption@IfPackageLoaded{sidecap}[1999/05/11 v1.4d]{%
+ \caption@setbool{needfreeze}{1}%
+ \caption@AtBeginDocument{\let\SC@caption=\caption}%
+ \let\caption@ORI@SC@zfloat\SC@zfloat
\def\SC@zfloat#1#2#3[#4]{%
- \caption@SC@zfloat{#1}{#2}{#3}[#4]%
- \global\let\SC@CAPsetup\@empty
- \def\captionsetup##1{\g@addto@macro\SC@CAPsetup{,##1}}%
- \let\caption@SC\caption
- \def\caption{\caption@caption\caption@SC}%
- }%
- \let\caption@endSC@FLOAT\endSC@FLOAT
+ \caption@ORI@SC@zfloat{#1}{#2}{#3}[#4]%
+ \caption@settype*{#2}%
+ \caption@freeze*}%
+ \let\caption@ORI@endSC@FLOAT\endSC@FLOAT
\def\endSC@FLOAT{%
- \let\@captype\SC@captype
- \caption@esetup\SC@CAPsetup
- \caption@letfloattype{SC\@captype}{%
- \@listdepth\z@
- \setcaptionmargin\z@
+ \let\caption@ORI@settype\caption@settype
+ \def\caption@settype##1{% will be done in \@xfloat
+ \caption@ORI@settype*{##1}% do not change \@currentlabel
+ \caption@setSC@justify
+ \caption@setoptions{SCfloat}%
+ \caption@setoptions{SC\@captype}%
+ \caption@start}%
+ \def\caption@setSC@justify{%
+ \caption@clearmargin
\@ifundefined{SC@justify}{}{%
- \ifx\SC@justify\@empty\else
+ \ifx\SC@justify\@empty \else
\let\caption@hj\SC@justify
\let\SC@justify\@empty
\fi}}%
- \long\def\caption@ifempty##1{%
- \ifx\SC@CAPtext\@empty
- \expandafter\@firstofone
+ \let\caption\SC@orig@caption
+ \def\SC@orig@caption[##1]##2{\caption@defrost}%
+ \caption@setSC@justify % for compatibility mode
+ \caption@ORI@endSC@FLOAT}%
+}{}
+\caption@IfPackageLoaded{subfigure}[2002/01/23 v2.1]{%
+ \def\sf@ifpositiontop{%
+ \@ifundefined{if\@captype topcap}{%
+ \@gobbletwo
+ }{%
+ \@nameuse{if\@captype topcap}%
+ \expandafter\@firstoftwo
\else
- \expandafter\@gobble
- \fi}%
- \caption@endSC@FLOAT}%
-}
-\def\caption@setSTposition{%
- \caption@setposition{\if@topcaption t\else b\fi}}
-\caption@ifpackage{supertabular}{ST@caption}{%
- \caption@Info{supertabular package detected}%
- \let\caption@tablecaption\tablecaption
- \def\tablecaption{\caption@caption\caption@tablecaption}%
+ \expandafter\@secondoftwo
+ \fi
+ }}%
+}{}
+\caption@IfPackageLoaded{supertabular}[2002/07/19 v4.1e]{%
+ \let\caption@ORI@tablecaption\tablecaption
+ \def\tablecaption{\caption@star\relax\caption@ORI@tablecaption}%
\long\def\ST@caption#1[#2]#3{\par%
- \caption@letfloattype{supertabular}{}%
- \let\caption@fixposition\caption@setSTposition
+ \caption@settype*{#1}%
+ \caption@setoptions{supertabular}%
+ \def\caption@fixposition{%
+ \caption@setposition{\if@topcaption t\else b\fi}}%
\caption@beginex{#1}{#2}{#3}%
- \addcontentsline{\csname ext@#1\endcsname}{#1}%
- {\protect\numberline{%
- \csname the#1\endcsname}{\ignorespaces #2}}%
- \@parboxrestore
- \normalsize
+ \caption@boxrestore
+ \caption@normalsize
\@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par
\caption@end}%
+}{%
+ \let\caption@setSTposition\@undefined
}
+\caption@IfPackageLoaded{threeparttable}[2003/06/13 v3.0]{%
+ \let\caption@ORI@threeparttable\threeparttable
+ \renewcommand*\threeparttable{%
+ \caption@settype{table}%
+ \caption@setposition a% ?
+ \caption@clearmargin
+ \caption@setoptions{threeparttable}%
+ \caption@ORI@threeparttable}%
+ \let\caption@ORI@measuredfigure\measuredfigure
+ \renewcommand*\measuredfigure{%
+ \caption@settype{figure}%
+ \caption@setposition a% ?
+ \caption@clearmargin
+ \caption@setoptions{measuredfigure}%
+ \caption@ORI@measuredfigure}%
+ \def\TPT@caption#1[#2]#3{%
+ \gdef\TPT@docapt{%
+ \global\let\TPT@docapt\@undefined
+ \caption@setautoposition\caption@TPT@position
+ \TPT@LA@caption{#1}[{#2}]{#3}}%
+ \ifx\TPT@hsize\@empty
+ \let\label\TPT@gatherlabel % Bug: does not work for measuredfigures
+ \gdef\caption@TPT@position{t}%
+ \g@addto@macro\TPT@docapt\caption@TPT@eatvskip
+ \else
+ \def\caption@TPT@position{b}%
+ \TPT@docapt
+ \fi
+ \ignorespaces}%
+ %\newcommand*\caption@TPT@eatvskip{\vskip-.2\baselineskip}%
+ \def\caption@TPT@eatvskip#1\vskip{#1\@tempdima=}%
+}{}
+\caption@IfPackageLoaded{wrapfig}{% ver 3.3 (Oct 12, 1999)
+ \providecommand*\float@ifstyle[1]{%
+ \expandafter\ifx\csname fst@#1\endcsname\relax
+ \expandafter\@secondoftwo
+ \else
+ \expandafter\@firstoftwo
+ \fi}%
+ \newcommand*\caption@restylewrapfloat[1]{%
+ \expandafter\ifx\csname caption@OUR@wrap#1\expandafter\endcsname
+ \csname wrap#1\endcsname
+ \caption@Error{%
+ For a successful cooperation of the `wrapfig' package\MessageBreak
+ with the `float' package you should load the `wrapfig'\MessageBreak
+ package *after* the `float' package}%
+ \else
+ \expandafter\let\csname caption@ORI@wrap#1\expandafter\endcsname
+ \csname wrap#1\endcsname
+ \@namedef{wrap#1}{%
+ \caption@settype*{#1}%
+ \float@ifstyle{#1}{%
+ \ifx\WF@floatstyhook\@undefined
+ \caption@Error{%
+ For a successful cooperation of the `wrapfig' package\MessageBreak
+ with the `float' package you should use at least\MessageBreak
+ `wrapfig' version 3.6}%
+ \else
+ \float@dostyle{#1}%
+ \fi}{}%
+ \caption@clearmargin
+ \caption@setoptions{wrapfloat}%
+ \caption@setoptions{wrap#1}%
+ \@nameuse{caption@ORI@wrap#1}}%
+ \expandafter\let\csname caption@OUR@wrap#1\expandafter\endcsname
+ \csname wrap#1\endcsname
+ \fi}%
+ \caption@restylewrapfloat{figure}%
+ \caption@restylewrapfloat{table}%
+ \ifx\WF@floatstyhook\@undefined \else % wrapfig v3.6
+ \@ifundefined{float@restyle}{}{%
+ \toks@=\expandafter{\float@restyle{#1}% (env may or may not be defined)
+ \caption@restylewrapfloat{#1}}%
+ \edef\@tempa{\def\noexpand\float@restyle##1{\the\toks@}}%
+ \@tempa}% perform redefinitions
+ \let\caption@ORI@wrapfloat\wrapfloat
+ \def\wrapfloat#1{%
+ \float@ifstyle{#1}{%
+ \caption@Error{%
+ For a successful cooperation of the `wrapfig' package\MessageBreak
+ with the `float' package you should load the `wrapfig'\MessageBreak
+ package *right after* the `float' package}}{}%
+ \caption@ORI@wrapfloat{#1}}%
+ \fi % wrapfig v3.6
+ \def\WF@rapt[#1]#2{% final two args: #1 = overhang, #2 = width,
+ \gdef\WF@ovh{#1}% hold overhang for later, when \width is known
+ \global\setbox\WF@box\vtop\bgroup \setlength\hsize{#2}%
+ \caption@start
+ \ifdim\hsize>\z@ \@parboxrestore \else
+ \setbox\z@\hbox\bgroup \let\wf@@caption\caption \let\caption\wf@caption
+ \ignorespaces \fi}%
+}{}
\endinput
%%
%% End of file `caption.sty'.
diff --git a/Master/texmf-dist/tex/latex/caption/caption2.sty b/Master/texmf-dist/tex/latex/caption/caption2.sty
index bedf31d09ed..5fec636caf7 100644
--- a/Master/texmf-dist/tex/latex/caption/caption2.sty
+++ b/Master/texmf-dist/tex/latex/caption/caption2.sty
@@ -22,35 +22,45 @@
%%
%% This Current Maintainer of this work is Axel Sommerfeldt.
%%
-%% This work consists of the files caption.ins, caption.dtx,
-%% caption2.dtx, and anleitung.tex and the derived files
-%% caption.sty, caption2.sty, caption3.sty, and manual.tex.
+%% This work consists of the files caption.ins, caption.dtx, caption2.dtx,
+%% and ltcaption.dtx, the derived files caption.sty, caption2.sty,
+%% caption3.sty, and ltcaption.sty, and the user manuals caption-deu.tex,
+%% caption-eng.tex, and caption-rus.tex.
%%
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption2}[2007/04/11 v2.2a Customising captions (AS)]
-\PackageWarningNoLine{caption2}{%
- *** THIS PACKAGE IS OBSOLETE, PLEASE USE caption ***}
-\RequirePackage{caption3}[2007/03/04] % needs v3.0m or newer
+\ProvidesPackage{caption2}[2007/08/12 v2.2b Customising captions (AS)]
+\PackageWarning{caption2}{%
+ ****************************************************\MessageBreak
+ THIS PACKAGE IS OBSOLETE:\MessageBreak
+ This package attempts to provide an caption 2.0/2.1\MessageBreak
+ author environment so that OLD documents can be\MessageBreak
+ successfully processed.\MessageBreak
+ It should NOT be used for NEW documents! New\MessageBreak
+ documents should use the caption package instead.\MessageBreak
+ ****************************************************\@gobbletwo}%
+\RequirePackage{caption3}[2007/08/12] % needs v3.1 or newer
\@ifpackageloaded{caption}{%
- \PackageError{caption2}{You can't use both the caption *and* caption2 package}{\caption@eh}%
+ \PackageError{caption2}{%
+ You can't use both, the (current) caption *and*\MessageBreak
+ the (obsolete) caption2 package}\caption@eh
\endinput
}{}
\newcommand*\captionlabeldelim{}
\newcommand*\captionlabelsep{}
\newcommand*\ifcaptionwidth{\ifdim\captionwidth>\z@}
-\newif\ifcaption@temp
+\let\captionindent\caption@indent
\def\ifcaptionlabel{%
\ifcaption@star
- \caption@tempfalse
+ \@tempswafalse
\else
- \caption@temptrue
+ \@tempswatrue
\fi
- \ifcaption@temp}
+ \if@tempswa}
\def\captionlabeltrue{\caption@starfalse}
\def\captionlabelfalse{\caption@startrue}
\def\ifonelinecaptions{%
- \caption@ifslc{\caption@temptrue}{\caption@tempfalse}%
- \ifcaption@temp}
+ \caption@ifslc{\@tempswatrue}{\@tempswafalse}%
+ \if@tempswa}
\def\onelinecaptionstrue{\caption@setbool{slc}{1}}
\def\onelinecaptionsfalse{\caption@setbool{slc}{0}}
\newif\ifignoreLTcapwidth
diff --git a/Master/texmf-dist/tex/latex/caption/caption3.sty b/Master/texmf-dist/tex/latex/caption/caption3.sty
index 8dba296a100..5488a81fb14 100644
--- a/Master/texmf-dist/tex/latex/caption/caption3.sty
+++ b/Master/texmf-dist/tex/latex/caption/caption3.sty
@@ -22,172 +22,329 @@
%%
%% This Current Maintainer of this work is Axel Sommerfeldt.
%%
-%% This work consists of the files caption.ins, caption.dtx,
-%% caption2.dtx, and anleitung.tex and the derived files
-%% caption.sty, caption2.sty, caption3.sty, and manual.tex.
+%% This work consists of the files caption.ins, caption.dtx, caption2.dtx,
+%% and ltcaption.dtx, the derived files caption.sty, caption2.sty,
+%% caption3.sty, and ltcaption.sty, and the user manuals caption-deu.tex,
+%% caption-eng.tex, and caption-rus.tex.
%%
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption3}[2007/04/11 v3.0q caption3 kernel (AR)]
+\ProvidesPackage{caption3}[2007/09/01 v3.1 caption3 kernel (AR)]
\providecommand*\@nameundef[1]{%
\expandafter\let\csname #1\endcsname\@undefined}
-\providecommand{\l@addto@macro}[2]{%
+\providecommand\l@addto@macro[2]{%
\begingroup
\toks@\expandafter{#1#2}%
\edef\@tempa{\endgroup\def\noexpand#1{\the\toks@}}%
\@tempa}
\def\bothIfFirst#1#2{%
\protected@edef\caption@tempa{#1}%
- \ifx\caption@tempa\@empty\else
+ \ifx\caption@tempa\@empty \else
#1#2%
\fi}
\def\bothIfSecond#1#2{%
\protected@edef\caption@tempa{#2}%
- \ifx\caption@tempa\@empty\else
+ \ifx\caption@tempa\@empty \else
#1#2%
\fi}
-\def\caption@ifinlist#1#2{%
- \let\next\@secondoftwo
- \edef\caption@tempa{#1}%
- \@for\caption@tempb:={#2}\do{%
- \ifx\caption@tempa\caption@tempb
- \let\next\@firstoftwo
+\newcommand*\caption@ifinlist{%
+ \@expandtwoargs\caption@@ifinlist}
+\newcommand*\caption@@ifinlist[2]{%
+ \begingroup
+ \def\@tempa##1,#1,##2\@nil{%
+ \endgroup
+ \ifx\relax##2\relax
+ \expandafter\@secondoftwo
+ \else
+ \expandafter\@firstoftwo
\fi}%
- \next}
-\def\caption@setbool#1#2{%
+ \@tempa,#2,#1,\@nil}%
+\newcommand*\caption@ifin@list[2]{%
+ \caption@ifempty@list#1%
+ {\@secondoftwo}%
+ {\@expandtwoargs\caption@@ifinlist{#2}{#1}}}
+\newcommand*\caption@g@addto@list[2]{%
+ \caption@ifempty@list#1{\gdef#1{#2}}{\g@addto@macro#1{,#2}}}
+\newcommand*\caption@l@addto@list[2]{%
+ \caption@ifempty@list#1{\def#1{#2}}{\l@addto@macro#1{,#2}}}
+\newcommand*\caption@g@removefrom@list[2]{%
+ \caption@l@removefrom@list#1{#2}%
+ \global\let#1#1}
+\newcommand*\caption@l@removefrom@list[2]{%
+ \caption@ifempty@list#1{}{\@expandtwoargs\@removeelement{#2}#1#1}}
+\newcommand*\caption@for@list[2]{%
+ \caption@ifempty@list#1{}{%
+ \def\caption@tempb##1{#2}%
+ \@for\caption@tempa:=#1\do{%
+ \expandafter\caption@tempb\expandafter{\caption@tempa}}}}
+\newcommand*\caption@ifempty@list[1]{%
+ \ifx#1\@undefined
+ \expandafter\@firstoftwo
+ \else\ifx#1\relax
+ \expandafter\expandafter\expandafter\@firstoftwo
+ \else\ifx#1\@empty
+ \expandafter\expandafter\expandafter\expandafter
+ \expandafter\expandafter\expandafter\@firstoftwo
+ \else
+ \expandafter\expandafter\expandafter\expandafter
+ \expandafter\expandafter\expandafter\@secondoftwo
+ \fi\fi\fi}
+\newcommand*\caption@setbool[1]{%
+ \expandafter\caption@set@bool\csname caption@if#1\endcsname}
+\newcommand*\caption@set@bool[2]{%
\caption@ifinlist{#2}{1,true,yes,on}{%
- \expandafter\let\csname caption@if#1\endcsname\@firstoftwo
+ \let#1\@firstoftwo
}{\caption@ifinlist{#2}{0,false,no,off}{%
- \expandafter\let\csname caption@if#1\endcsname\@secondoftwo
+ \let#1\@secondoftwo
}{%
\caption@Error{Undefined boolean value `#2'}%
}}}
-\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{%
+\newcommand*\caption@ifbool[1]{\@nameuse{caption@if#1}}
+\newcommand*\caption@undefbool[1]{\@nameundef{caption@if#1}}
+\newcommand*\caption@teststar[3]{\@ifstar{#1{#2}}{#1{#3}}}
+\newcommand*\caption@withoptargs[1]{%
+ \@ifstar
+ {\def\caption@tempa{*}\caption@@withoptargs#1}%
+ {\def\caption@tempa{}\caption@@withoptargs#1}}
+\def\caption@@withoptargs#1{%
+ \@ifnextchar[%]
+ {\caption@@@withoptargs#1}%
+ {\caption@@@@withoptargs#1}}
+\def\caption@@@withoptargs#1[#2]{%
+ \l@addto@macro\caption@tempa{[{#2}]}%
+ \caption@@withoptargs#1}
+\def\caption@@@@withoptargs#1{%
+ \expandafter#1\expandafter{\caption@tempa}}
+\newcommand\caption@DoCheckCommand[2]{%
\begingroup
- \@tempcnta#1%
- \advance\@tempcnta#2%
- \xdef#1{\the\@tempcnta}%
- \endgroup}
-\def\caption@stepcounter#1{\caption@addtocounter#1\@ne}
-\newcommand\caption@Package{caption}
+ \let\@tempa#1%
+ #2%
+ \ifx\@tempa#1%
+ \endgroup
+ \let\caption@CheckCommand\@gobbletwo
+ \else
+ \endgroup
+ \fi}
+\@onlypreamble\caption@DoCheckCommand
+\let\caption@CheckCommand\caption@DoCheckCommand
+\@onlypreamble\caption@CheckCommand
+\newcommand*\caption@IfCheckCommand{%
+ \ifx\caption@CheckCommand\@gobbletwo
+ \let\next\@firstoftwo
+ \else
+ \let\next\@secondoftwo
+ \fi
+ \let\caption@CheckCommand\caption@DoCheckCommand
+ \next}
+\@onlypreamble\caption@IfCheckCommand
+\let\caption@begindocumenthook\@empty
+\let\caption@@begindocumenthook\@empty
+\def\caption@AtBeginDocument{%
+ \caption@teststar\g@addto@macro
+ \caption@@begindocumenthook\caption@begindocumenthook}
+\@onlypreamble\caption@AtBeginDocument
+\AtBeginDocument{%
+ \PackageInfo{caption}{Begin \noexpand\AtBeginDocument code\@gobble}%
+ \def\caption@AtBeginDocument{%
+ \@ifstar{\g@addto@macro\caption@@begindocumenthook}\@firstofone}%
+ \caption@begindocumenthook
+ \let\caption@begindocumenthook\@undefined
+ \def\caption@AtBeginDocument{%
+ \@ifstar\@firstofone\@firstofone}%
+ \caption@@begindocumenthook
+ \let\caption@@begindocumenthook\@undefined
+ \PackageInfo{caption}{End \noexpand\AtBeginDocument code\@gobble}}
\newcommand*\caption@Error[1]{%
\PackageError\caption@Package{#1}\caption@eh}
-\newcommand\caption@eh{%
+\newcommand*\caption@Package{caption}
+\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}
\RequirePackage{keyval}[1997/11/10]
\providecommand*\undefine@key[2]{%
\@nameundef{KV@#1@#2}\@nameundef{KV@#1@#2@default}}
-\newcommand\DeclareCaptionOption{%
- \@ifstar{\caption@declareoption\AtEndOfPackage}%
- {\caption@declareoption\@gobble}}
+\providecommand*\@onlypreamble@key[2]{%
+ \expandafter\@onlypreamble\csname KV@#1@#2\endcsname}
+\@onlypreamble\@onlypreamble@key
+\newcommand*\DeclareCaptionOption{%
+ \caption@teststar\caption@declareoption\AtEndOfPackage\@gobble}
+\@onlypreamble\DeclareCaptionOption
\newcommand*\caption@declareoption[2]{%
#1{\undefine@key{caption}{#2}}\define@key{caption}{#2}}
-\@onlypreamble\DeclareCaptionOption
\@onlypreamble\caption@declareoption
-\newcommand\captionsetup{\@ifnextchar[\caption@setuptype\caption@setup}
-\newcommand\caption@typ@{caption@typ@} % This saves 74 words of TeX memory
-\def\caption@setuptype[#1]#2{%
- \@ifundefined{\caption@typ@#1}%
- {\@namedef{\caption@typ@#1}{#2}}%
- {\expandafter\l@addto@macro\csname\caption@typ@#1\endcsname{,#2}}}
-\newcommand\caption@setup{\caption@setkeys{caption}}
-\newcommand*\caption@setkeys{%
- \@dblarg\caption@@setkeys}
+\newcommand*\captionsetup{%
+ \caption@teststar\@captionsetup\@gobble\@firstofone}
+\newcommand*\@captionsetup[1]{%
+ \@ifnextchar[{\caption@setup@options#1}\caption@setup}
+\newcommand*\caption@setup{\caption@setkeys{caption}}
+\def\caption@setup@options#1[#2]{%
+ % #1 is \@gobble in star form, and \@firstofone otherwise
+ #1{\caption@addtooptlist{#2}}%
+ \expandafter\caption@l@addto@list\csname caption@opt@#2\endcsname}
+\newcommand*\clearcaptionsetup{%
+ \caption@teststar\@clearcaptionsetup\@gobble\@firstofone}
+\newcommand*\@clearcaptionsetup[1]{%
+ \let\caption@tempa#1%
+ \@testopt\@@clearcaptionsetup{}}
+\def\@@clearcaptionsetup[#1]#2{%
+ \expandafter\caption@ifempty@list\csname caption@opt@#2\endcsname
+ {\caption@tempa{\PackageWarning{caption}{Option list `#2' undefined}}}%
+ {\ifx,#1,%
+ \caption@clearsetup{#2}%
+ \else
+ \caption@@removefromsetup{#1}{#2}%
+ \fi}}
+\newcommand*\caption@clearsetup[1]{%
+ \caption@removefromoptlist{#1}%
+ \@nameundef{caption@opt@#1}}
+\newcommand*\caption@removefromsetup{%
+ \let\caption@tempa\@gobble
+ \caption@@removefromsetup}
+\newcommand*\caption@@removefromsetup[2]{%
+ \expandafter\let\expandafter\@tempa\csname caption@opt@#2\endcsname
+ \expandafter\let\csname caption@opt@#2\endcsname\@undefined
+ \def\@tempb##1=##2\@nil{##1}%
+ \edef\@tempc{#1}%
+ \@for\@tempa:=\@tempa\do{%
+ \edef\@tempd{\expandafter\@tempb\@tempa=\@nil}%
+ \ifx\@tempd\@tempc
+ \let\caption@tempa\@gobble
+ \else
+ \expandafter\expandafter\expandafter\caption@l@addto@list
+ \expandafter\csname caption@opt@#2\expandafter\endcsname
+ \expandafter{\@tempa}%
+ \fi}%
+ \expandafter\caption@ifempty@list\csname caption@opt@#2\endcsname
+ {\caption@removefromoptlist{#2}}{}%
+ \caption@tempa{%
+ \PackageWarning{caption}{%
+ Option `#1' was not in list `#2'\MessageBreak}}}
+\newcommand*\showcaptionsetup[2][\@firstofone]{%
+ \GenericWarning{}{%
+ #1 Caption Info: KV list on `#2'\MessageBreak
+ #1 Caption Data: \@ifundefined{caption@opt@#2}{%
+ -none-%
+ }{%
+ {\expandafter\expandafter\expandafter\strip@prefix
+ \expandafter\meaning\csname caption@opt@#2\endcsname}%
+ }}}
+\DeclareCaptionOption{options}{\caption@setoptions{#1}}
+\newcommand*\caption@setoptions[1]{%
+ \caption@Debug{options=#1}%
+ \expandafter\let\expandafter\@tempa\csname caption@opt@#1\endcsname
+ \ifx\@tempa\relax \else
+ \let\caption@iftypewarning\@firstoftwo % = true
+ \expandafter\caption@setup\expandafter{\@tempa}%
+ \caption@clearsetup{#1}%
+ \fi}
+\newcommand*\caption@addtooptlist[1]{%
+ \@ifundefined{caption@opt@#1@lineno}{%
+ \caption@dooptlist\caption@g@addto@list{#1}%
+ \expandafter\xdef\csname caption@opt@#1@lineno\endcsname{\the\inputlineno}%
+ }{}}
+\newcommand*\caption@removefromoptlist[1]{%
+ \caption@dooptlist\caption@g@removefrom@list{#1}%
+ \global\expandafter\let\csname caption@opt@#1@lineno\endcsname\@undefined}
+\newcommand*\caption@dooptlist[2]{%
+ \begingroup
+ \edef\@tempa{#2}\@onelevel@sanitize\@tempa
+ \expandafter#1\expandafter\caption@optlist\expandafter{\@tempa}%
+ \endgroup}
+\AtEndDocument{%
+ \caption@for@list\caption@optlist{%
+ \PackageWarningNoLine{caption}{%
+ Unused \string\captionsetup[#1]
+ on input line \csname caption@opt@#1@lineno\endcsname}}}
+\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
+ \ifx\caption@keydepth\@empty
+ \let\caption@ORI@KV@errx\KV@errx
+ \let\caption@ORI@KV@err\KV@err
\let\KV@errx\caption@Error
\let\KV@err\caption@Error
\fi
- \caption@stepcounter\caption@keydepth
+ \l@addto@macro\caption@keydepth.%
\def\caption@Package{#1}%
\caption@Debug{\protect\setkeys{#2}{#3}}%
\setkeys{#2}{#3}%
\def\caption@Package{caption}%
- \caption@addtocounter\caption@keydepth\m@ne
- \ifnum\caption@keydepth=0\relax
- \let\KV@errx\caption@KV@errx
- \let\KV@err\caption@KV@err
+ \edef\caption@keydepth{\expandafter\@cdr\caption@keydepth\@nil}%
+ \ifx\caption@keydepth\@empty
+ \let\KV@errx\caption@ORI@KV@errx
+ \let\KV@err\caption@ORI@KV@err
\fi}
-\caption@newcounter\caption@keydepth
-\newcommand*\caption@settype[1]{%
- \@ifundefined{\caption@typ@#1}{}{%
- \caption@esetup{\csname\caption@typ@#1\endcsname}}}
-\newcommand*\caption@esetup[1]{%
- \edef\caption@tempa{\noexpand\caption@setup{#1}}%
- \caption@tempa}
-\newcommand*\clearcaptionsetup[1]{\@nameundef{\caption@typ@#1}}
-\newcommand*\showcaptionsetup[2][\@firstofone]{%
- \GenericWarning{}{%
- #1 Caption Info: KV list on `#2'\MessageBreak
- #1 Caption Data: (%
- \@ifundefined{\caption@typ@#2}{%
- % empty -- print nothing
- }{%
- \@nameuse{\caption@typ@#2}%
- }%
- )}}
-\newcommand*\caption@ProcessOptions[1]{%
+\let\caption@keydepth\@empty
+\newcommand*\caption@ExecuteOptions[2]{%
+ \@expandtwoargs\caption@setkeys{#1}{#2}}%
+\@onlypreamble\caption@ExecuteOptions
+\newcommand*\caption@ProcessOptions{%
+ \caption@teststar\caption@@ProcessOptions\@gobble\@firstofone}
+\@onlypreamble\caption@ProcessOptions
+\newcommand*\caption@@ProcessOptions[2]{%
\let\@tempc\relax
\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
+ #1{% \@firstofone -or- \@gobble
+ \@for\CurrentOption:=\@classoptionslist\do{%
+ \@ifundefined{KV@#2@\CurrentOption}{}{%
+ \@ifundefined{KV@#2@\CurrentOption @default}{%
+ \PackageInfo{#2}{Global option `\CurrentOption' ignored}%
+ }{%
+ \PackageInfo{#2}{Global option `\CurrentOption' processed}%
+ \edef\caption@tempa{\caption@tempa,\CurrentOption,}%
+ \@expandtwoargs\@removeelement\CurrentOption
+ \@unusedoptionlist\@unusedoptionlist
+ }%
}%
}%
+ \let\CurrentOption\@empty
}%
- \edef\caption@tempa{%
- \noexpand\caption@setkeys{#1}{%
- \caption@tempa\@ptionlist{\@currname.\@currext}%
- }%
- }%
- \caption@tempa
- \let\CurrentOption\@empty
+ \caption@ExecuteOptions{#2}{\caption@tempa\@ptionlist{\@currname.\@currext}}%
\AtEndOfPackage{\let\@unprocessedoptions\relax}}
-\@onlypreamble\caption@ProcessOptions
+\@onlypreamble\caption@@ProcessOptions
\newdimen\captionmargin
\newdimen\captionmargin@
\newdimen\captionwidth
\DeclareCaptionOption{margin}{\setcaptionmargin{#1}}
+\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}%
+\DeclareCaptionOption{twoside}[1]{\caption@set@bool\caption@iftwoside{#1}}
+\DeclareCaptionOption{minmargin}{\caption@setoptcmd\caption@minmargin{#1}}
+\DeclareCaptionOption{maxmargin}{\caption@setoptcmd\caption@maxmargin{#1}}
+\newcommand*\setcaptionmargin{%
+ \caption@teststar\caption@setmargin\@gobble\@firstofone}
+\newcommand*\caption@setmargin[2]{%
+ #1{\captionwidth\z@}%
+ \caption@@setmargin#2,#2,\@nil}
+\def\caption@@setmargin#1,#2,#3\@nil{%
\setlength\captionmargin@{#2}%
- \advance\captionmargin@ by -\captionmargin}
-\newcommand\setcaptionwidth{%
+ \setlength\captionmargin{#1}%
+ \addtolength\captionmargin@{-\captionmargin}}
+\newcommand*\setcaptionwidth{%
+ \captionmargin\z@
+ \captionmargin@\z@
\setlength\captionwidth}
-\caption@newcounter\caption@count
-\newcommand*\caption@newlabel{\@newl@bel{caption}}
+\newcommand*\caption@count{0}
+\newcommand*\caption@newlabel{\@newl@bel{caption@r}}
\newcommand*\caption@thepage{\the\c@page}
-\def\caption@ifoddpage{%
+\newcommand*\caption@label[1]{%
+ \protected@write\@auxout{\let\caption@thepage\relax}%
+ {\string\caption@newlabel{#1}{\caption@thepage}}}
+\newcommand*\caption@pageref[1]{%
+ \expandafter\ifx\csname caption@r@#1\endcsname\relax
+ \G@refundefinedtrue % => 'There are undefined references.'
+ \PackageWarning{caption}{Reference on page \thepage \space undefined}%
+ \else
+ \expandafter\let\expandafter\caption@thepage\csname caption@r@#1\endcsname
+ \fi}
+\newcommand*\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
+ \begingroup
+ \@tempcnta\caption@count
+ \advance\@tempcnta\@ne
+ \xdef\caption@count{\the\@tempcnta}%
+ \endgroup
+ \caption@label\caption@count
+ \caption@pageref\caption@count
\ifodd\caption@thepage
\let\caption@ifoddpage\@firstoftwo
\else
@@ -195,101 +352,122 @@
\fi
}{\let\caption@ifoddpage\@firstoftwo}%
\caption@ifoddpage}
-\newdimen\captionindent
-\newdimen\captionparindent
-\newdimen\captionhangindent
-\DeclareCaptionOption{indent}[\leftmargini]{\setlength\captionindent{#1}}% obsolete!
-\DeclareCaptionOption{indention}[\leftmargini]{\setlength\captionindent{#1}}
-\DeclareCaptionOption{hangindent}{\setlength\captionhangindent{#1}}
-\DeclareCaptionOption{parindent}{\setlength\captionparindent{#1}}
-\DeclareCaptionOption{parskip}{\l@addto@macro\caption@@par{\setlength\parskip{#1}}}
+\newcommand*\caption@setoptcmd[2]{%
+ \caption@ifinlist{#2}{0,false,no,off}{\let#1\@undefined}{\def#1{#2}}}
+\newdimen\caption@indent
+\newdimen\caption@parindent
+\newdimen\caption@hangindent
+\DeclareCaptionOption{indent}[\leftmargini]{%
+ \setlength\caption@indent{#1}}% obsolete!
+\DeclareCaptionOption{indention}[\leftmargini]{%
+ \setlength\caption@indent{#1}}
+\DeclareCaptionOption{parindent}{%
+ \setlength\caption@parindent{#1}}
+\DeclareCaptionOption{hangindent}{%
+ \setlength\caption@hangindent{#1}}
+\DeclareCaptionOption{parskip}{%
+ \l@addto@macro\caption@@par{\setlength\parskip{#1}}}
\@ifundefined{scr@caption}{}{%
\let\caption@KV@parindent\KV@caption@parindent
\DeclareCaptionOption{parindent}[]{%
- \def\caption@tempa{#1}%
- \ifx\caption@tempa\@empty
- \PackageInfo{caption3}{Option `parindent' ignored}%
+ \ifx,#1,%
+ \caption@Debug{Option `parindent' ignored}%
\else
\caption@KV@parindent{#1}%
\fi}%
\let\caption@KV@parskip\KV@caption@parskip
\DeclareCaptionOption{parskip}[]{%
- \def\caption@tempa{#1}%
- \ifx\caption@tempa\@empty
- \PackageInfo{caption3}{Option `parskip' ignored}%
+ \ifx,#1,%
+ \caption@Debug{Option `parskip' ignored}%
\else
\caption@KV@parskip{#1}%
\fi}%
}
\newcommand*\DeclareCaptionStyle[1]{%
- \@ifnextchar[{\caption@declarestyle{#1}}{\caption@declarestyle{#1}[]}}
+ \@testopt{\caption@declarestyle{#1}}{}}
+\@onlypreamble\DeclareCaptionStyle
\def\caption@declarestyle#1[#2]#3{%
\global\@namedef{caption@sls@#1}{#2}%
\global\@namedef{caption@sty@#1}{#3}}
-\@onlypreamble\DeclareCaptionStyle
\@onlypreamble\caption@declarestyle
\DeclareCaptionOption{style}{\caption@setstyle{#1}}
-\newcommand\caption@setstyle{%
- \@ifstar{\caption@@setstyle\@gobble}{\caption@@setstyle\@firstofone}}
+\DeclareCaptionOption{singlelinecheck}{\caption@set@bool\caption@ifslc{#1}}
+\newcommand*\caption@setstyle{%
+ \caption@teststar\caption@@setstyle\@gobble\@firstofone}
\newcommand*\caption@@setstyle[2]{%
\@ifundefined{caption@sty@#2}%
- {#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}}}
-\newcommand\caption@setdefault{\captionsetup{%
- 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}}
-\DeclareCaptionStyle{default}[indent=0pt,justification=centering]{}
+ {#1{\caption@Error{Undefined style `#2'}}}%
+ {\expandafter\let\expandafter\caption@sty\csname caption@sty@#2\endcsname
+ \ifx\caption@setstyle@flag\@undefined
+ \let\caption@setstyle@flag\caption@setstyle
+ \let\caption@iftypewarning\@firstoftwo % = true
+ \caption@resetstyle
+ \expandafter\caption@setup\expandafter{\caption@sty}%
+ \let\caption@setstyle@flag\@undefined
+ \else
+ \expandafter\caption@setup\expandafter{\caption@sty}%
+ \fi
+ \expandafter\let\expandafter\caption@sls\csname caption@sls@#2\endcsname
+ \expandafter\caption@l@addto@list\expandafter\caption@opt@SingleLine
+ \expandafter{\caption@sls}}}
+\newcommand*\caption@resetstyle{%
+ \caption@setup{%
+ format=plain,labelformat=default,labelsep=colon,textformat=simple,%
+ justification=justified,font=,labelfont=,textfont=,%
+ margin=0pt,minmargin=0,maxmargin=0,%
+ indent=0pt,parindent=0pt,hangindent=0pt,%
+ singlelinecheck=1,strut=1}%
+ \caption@clearsetup{SingleLine}}
+\DeclareCaptionStyle{base}[indent=0pt,justification=centering]{}
+\DeclareCaptionStyle{default}[indent=0pt,justification=centering,format=plain]{%
+ format=default,labelsep=default,textformat=default,%
+ justification=default,font=default,labelfont=default,textfont=default}
\newcommand\DeclareCaptionFormat{%
- \@ifstar{\caption@declareformat\@gobble}%
- {\caption@declareformat\@firstofone}}
+ \caption@teststar\caption@declareformat\@gobble\@firstofone}
+\@onlypreamble\DeclareCaptionFormat
\newcommand\caption@declareformat[3]{%
\global\expandafter\let\csname caption@ifh@#2\endcsname#1%
\global\long\@namedef{caption@fmt@#2}##1##2##3{#3}}
-\@onlypreamble\DeclareCaptionFormat
\@onlypreamble\caption@declareformat
\DeclareCaptionOption{format}{\caption@setformat{#1}}
\newcommand*\caption@setformat[1]{%
\@ifundefined{caption@fmt@#1}%
- {\caption@Error{Undefined caption format `#1'}}%
+ {\caption@Error{Undefined format `#1'}}%
{\expandafter\let\expandafter\caption@ifh\csname caption@ifh@#1\endcsname
\expandafter\let\expandafter\caption@fmt\csname caption@fmt@#1\endcsname}}
\DeclareCaptionFormat{plain}{#1#2#3\par}
\DeclareCaptionFormat{hang}{%
\@hangfrom{#1#2}%
- \advance\captionparindent\hangindent
- \advance\captionhangindent\hangindent
+ \advance\caption@parindent\hangindent
+ \advance\caption@hangindent\hangindent
\caption@@par
#3\par}
\def\caption@fmt@default{\caption@fmt@plain}
\def\caption@ifh@default{\caption@ifh@plain}
\newcommand*\DeclareCaptionLabelFormat[2]{%
- \global\@namedef{caption@lfmt@#1}##1##2{#2}}
+ \global\@namedef{caption@lfmt@#1}##1##2##3{#2}}
\@onlypreamble\DeclareCaptionLabelFormat
\DeclareCaptionOption{labelformat}{\caption@setlabelformat{#1}}
\newcommand*\caption@setlabelformat[1]{%
\@ifundefined{caption@lfmt@#1}%
- {\caption@Error{Undefined caption label format `#1'}}%
+ {\caption@Error{Undefined label format `#1'}}%
{\expandafter\let\expandafter\caption@lfmt\csname caption@lfmt@#1\endcsname}}
\DeclareCaptionLabelFormat{empty}{}
\DeclareCaptionLabelFormat{simple}{\bothIfFirst{#1}{\nobreakspace}#2}
\DeclareCaptionLabelFormat{parens}{\bothIfFirst{#1}{\nobreakspace}(#2)}
\def\caption@lfmt@default{\caption@lfmt@simple}
\newcommand\DeclareCaptionLabelSeparator{%
- \@ifstar{\caption@declarelabelseparator\@gobble}%
- {\caption@declarelabelseparator\@firstofone}}
+ \caption@teststar\caption@declarelabelseparator\@gobble\@firstofone}
+\@onlypreamble\DeclareCaptionLabelSeparator
\newcommand\caption@declarelabelseparator[3]{%
\global\expandafter\let\csname caption@iflf@#2\endcsname#1%
\global\long\@namedef{caption@lsep@#2}{#3}}
-\@onlypreamble\DeclareCaptionLabelSeparator
\@onlypreamble\caption@declarelabelseparator
\DeclareCaptionOption{labelsep}{\caption@setlabelseparator{#1}}
\DeclareCaptionOption{labelseparator}{\caption@setlabelseparator{#1}}
\newcommand*\caption@setlabelseparator[1]{%
\@ifundefined{caption@lsep@#1}%
- {\caption@Error{Undefined caption label separator `#1'}}%
+ {\caption@Error{Undefined label separator `#1'}}%
{\expandafter\let\expandafter\caption@iflf\csname caption@iflf@#1\endcsname
\expandafter\let\expandafter\caption@lsep\csname caption@lsep@#1\endcsname}}
\DeclareCaptionLabelSeparator{none}{}
@@ -305,28 +483,92 @@
\global\long\@namedef{caption@tfmt@#1}##1{#2}}
\@onlypreamble\DeclareCaptionTextFormat
\DeclareCaptionOption{textformat}{\caption@settextformat{#1}}
+\DeclareCaptionOption{strut}{\caption@set@bool\caption@ifstrut{#1}}
\newcommand*\caption@settextformat[1]{%
\@ifundefined{caption@tfmt@#1}%
- {\caption@Error{Undefined caption text format `#1'}}%
+ {\caption@Error{Undefined text format `#1'}}%
{\expandafter\let\expandafter\caption@tfmt\csname caption@tfmt@#1\endcsname}}
\DeclareCaptionTextFormat{simple}{#1}
\DeclareCaptionTextFormat{period}{#1.}
\def\caption@tfmt@default{\caption@tfmt@simple}
+\newcommand*\DeclareCaptionFont[2]{%
+ \define@key{caption@fnt}{#1}[]{\l@addto@macro\caption@fnt{#2}}}
+\@onlypreamble\DeclareCaptionFont
+\newcommand*\DeclareDefaultCaptionFont[2]{%
+ \global\@namedef{caption#1@default}{#2}}
+\@onlypreamble\DeclareDefaultCaptionFont
+\DeclareCaptionOption{font}{\caption@setfont{font}{#1}}
+\DeclareDefaultCaptionFont{font}{}
+\DeclareCaptionOption{labelfont}{\caption@setfont{labelfont}{#1}}
+\DeclareDefaultCaptionFont{labelfont}{}
+\DeclareCaptionOption{textfont}{\caption@setfont{textfont}{#1}}
+\DeclareDefaultCaptionFont{textfont}{}
+\newcommand*\caption@setfont[2]{%
+ \begingroup
+ \let\caption@fnt\@empty
+ \define@key{caption@fnt}{default}[]{%
+ \l@addto@macro\caption@fnt{\csname caption#1@default\endcsname}}%
+ \caption@setkeys[caption]{caption@fnt}{#2}%
+ \global\let\caption@tempa\caption@fnt
+ \endgroup
+ \expandafter\let\csname caption#1\endcsname\caption@tempa}
+\newcommand*\caption@font{%
+ \caption@teststar\caption@@font\@firstofone
+ {\caption@setkeys[caption]{caption@fnt}}}
+\newcommand*\caption@@font[2]{%
+ \begingroup
+ \def\caption@fnt{\endgroup}%
+ #1{#2}%
+ \caption@fnt}
+\DeclareCaptionFont{normalcolor}{\normalcolor}
+\DeclareCaptionFont{color}{\color{#1}}
+\DeclareCaptionFont{normalfont}{\normalfont}
+\DeclareCaptionFont{up}{\upshape}
+\DeclareCaptionFont{it}{\itshape}
+\DeclareCaptionFont{sl}{\slshape}
+\DeclareCaptionFont{sc}{\scshape}
+\DeclareCaptionFont{md}{\mdseries}
+\DeclareCaptionFont{bf}{\bfseries}
+\DeclareCaptionFont{rm}{\rmfamily}
+\DeclareCaptionFont{sf}{\sffamily}
+\DeclareCaptionFont{tt}{\ttfamily}
+\DeclareCaptionFont{scriptsize}{\scriptsize}
+\DeclareCaptionFont{footnotesize}{\footnotesize}
+\DeclareCaptionFont{small}{\small}
+\DeclareCaptionFont{normalsize}{\normalsize}
+\DeclareCaptionFont{large}{\large}
+\DeclareCaptionFont{Large}{\Large}
+\DeclareCaptionFont{singlespacing}{\setstretch\setspace@singlespace}% normally 1
+\DeclareCaptionFont{onehalfspacing}{\onehalfspacing}
+\DeclareCaptionFont{doublespacing}{\doublespacing}
+\DeclareCaptionFont{stretch}{\setstretch{#1}}
+\caption@AtBeginDocument{\providecommand*\setstretch[1]{}}
+\DeclareCaptionFont{normal}{%
+ \caption@font*{%
+ \KV@caption@fnt@normalcolor\@unused
+ \KV@caption@fnt@normalfont\@unused
+ \KV@caption@fnt@normalsize\@unused
+ \KV@caption@fnt@singlespacing\@unused}}
+\providecommand\captionsize{}
+\DeclareCaptionOption{size}{\caption@setfont{size}{#1}}
+\DeclareDefaultCaptionFont{size}{}
\newcommand*\DeclareCaptionJustification[2]{%
- \global\@namedef{caption@hj@#1}{#2}}
+ \global\@namedef{caption@hj@#1}{#2}% for compatibility to v3.0
+ \DeclareCaptionFont{#1}{#2}}
\@onlypreamble\DeclareCaptionJustification
+\newcommand*\DeclareDefaultCaptionJustification[1]{%
+ \global\@namedef{caption@hj@default}{#1}% for compatibility to v3.0
+ \DeclareDefaultCaptionFont{@hj}{#1}}
+\@onlypreamble\DeclareDefaultCaptionJustification
\DeclareCaptionOption{justification}{\caption@setjustification{#1}}
-\newcommand*\caption@setjustification[1]{%
- \@ifundefined{caption@hj@#1}%
- {\caption@Error{Undefined caption justification `#1'}}%
- {\expandafter\let\expandafter\caption@hj\csname caption@hj@#1\endcsname}}
+\DeclareDefaultCaptionJustification{}
+\newcommand*\caption@setjustification{\caption@setfont{@hj}}
\DeclareCaptionJustification{justified}{}
\DeclareCaptionJustification{centering}{\centering}
\DeclareCaptionJustification{centerfirst}{\centerfirst}
\DeclareCaptionJustification{centerlast}{\centerlast}
\DeclareCaptionJustification{raggedleft}{\raggedleft}
\DeclareCaptionJustification{raggedright}{\raggedright}
-\def\caption@hj@default{\caption@hj@justified}
\providecommand\centerfirst{%
\let\\\@centercr
\edef\caption@normaladjust{%
@@ -353,55 +595,30 @@
\caption@Debug{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{caption3}{%
- `ragged2e' package not loaded, therefore\MessageBreak
- substituting \string#2 for \string#1\MessageBreak}%
- \global\@namedef{caption\string#1}}{}%
- #2}
-\AtBeginDocument{%
- \@ifundefined{caption@ragged2e}{%
- \let\caption@@ragged\@secondoftwo % suppress warning above
+ \caption@ragged}
+\caption@AtBeginDocument{%
+ \@ifundefined{caption@r@ragged2e}{%
+ \newcommand*\caption@@ragged{%
+ \PackageWarning{caption}{%
+ `ragged2e' support has been changed.\MessageBreak
+ Rerun to get captions right}%
+ \global\let\caption@ragged\@secondoftwo % suppress further warnings
+ \caption@ragged}%
}{%
\caption@Debug{We load ragged2e}%
\IfFileExists{ragged2e.sty}{%
- \RequirePackage{ragged2e}\let\caption@@ragged\@firstoftwo}{}%
+ \RequirePackage{ragged2e}%
+ \let\caption@@ragged\@firstoftwo
+ }{%
+ \newcommand*\caption@@ragged[2]{%
+ \@ifundefined{caption\string#1}{%
+ \PackageWarning{caption}{%
+ `ragged2e' package not loaded, therefore\MessageBreak
+ substituting \string#2 for \string#1\MessageBreak}%
+ \global\@namedef{caption\string#1}}{}%
+ #2}%
+ }%
}}
-\newcommand\DeclareCaptionFont[2]{%
- \define@key{caption@fnt}{#1}[]{\g@addto@macro\caption@tempa{#2}}}
-\@onlypreamble\DeclareCaptionFont
-\DeclareCaptionOption{font}{\caption@setfont{font}{#1}}
-\DeclareCaptionOption{labelfont}{\caption@setfont{labelfont}{#1}}
-\DeclareCaptionOption{textfont}{\caption@setfont{textfont}{#1}}
-\newcommand*\caption@setfont[2]{%
- \let\caption@tempa\@empty
- \begingroup
- \caption@setkeys[caption]{caption@fnt}{#2}%
- \endgroup
- \expandafter\let\csname caption#1\endcsname\caption@tempa}
-\DeclareCaptionFont{default}{}
-\DeclareCaptionFont{scriptsize}{\scriptsize}
-\DeclareCaptionFont{footnotesize}{\footnotesize}
-\DeclareCaptionFont{small}{\small}
-\DeclareCaptionFont{normalsize}{\normalsize}
-\DeclareCaptionFont{large}{\large}
-\DeclareCaptionFont{Large}{\Large}
-\DeclareCaptionFont{up}{\upshape}
-\DeclareCaptionFont{it}{\itshape}
-\DeclareCaptionFont{sl}{\slshape}
-\DeclareCaptionFont{sc}{\scshape}
-\DeclareCaptionFont{md}{\mdseries}
-\DeclareCaptionFont{bf}{\bfseries}
-\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}{%
\newlength\abovecaptionskip\setlength\abovecaptionskip{10\p@}}{}
\@ifundefined{belowcaptionskip}{%
@@ -412,7 +629,7 @@
\DeclareCaptionOption{position}{\caption@setposition{#1}}
\newcommand*\caption@setposition[1]{%
\caption@ifinlist{#1}{d,default}{%
- \def\caption@position{\caption@defaultpos}%
+ \let\caption@position\caption@defaultpos
}{\caption@ifinlist{#1}{t,top,above}{%
\let\caption@position\@firstoftwo
}{\caption@ifinlist{#1}{b,bottom,below}{%
@@ -420,20 +637,19 @@
}{\caption@ifinlist{#1}{a,auto}{%
\let\caption@position\@undefined
}{%
- \caption@Error{Undefined caption position `#1'}%
+ \caption@Error{Undefined position `#1'}%
}}}}}
-\let\caption@defaultpos\@secondoftwo
-\newcommand\caption@iftop{%
+\let\caption@defaultpos\@undefined
+\newcommand*\caption@iftop{%
\ifx\caption@position\@undefined
- \expandafter\@secondoftwo
- \else
- \expandafter\caption@position
- \fi}
-\newcommand\caption@fixposition{%
+ \let\caption@position\@secondoftwo
+ \fi
+ \caption@position}
+\newcommand*\caption@fixposition{%
\ifx\caption@position\@undefined
\caption@autoposition
\fi}
-\newcommand\caption@autoposition{%
+\newcommand*\caption@autoposition{%
\ifvmode
\edef\caption@tempa{\the\prevdepth}%
\caption@Debug{\protect\prevdepth=\caption@tempa}%
@@ -446,98 +662,373 @@
\caption@Debug{no \protect\prevdepth}%
\let\caption@position\@secondoftwo
\fi}
-\newcommand\caption@beginhook{}
-\newcommand\caption@endhook{}
-\newcommand\AtBeginCaption{\l@addto@macro\caption@beginhook}
-\newcommand\AtEndCaption{\l@addto@macro\caption@endhook}
-\DeclareCaptionOption{listof}{\caption@setbool{lof}{#1}}
-\DeclareCaptionOption{singlelinecheck}{\caption@setbool{slc}{#1}}
-\DeclareCaptionOption{strut}{\caption@setbool{strut}{#1}}
+\newcommand*\caption@setautoposition[1]{%
+ \def\caption@autoposition{\caption@setposition{#1}}}
+\newcommand*\caption@beginhook{}
+\newcommand*\caption@endhook{}
+\newcommand*\AtBeginCaption{\l@addto@macro\caption@beginhook}
+\newcommand*\AtEndCaption{\l@addto@macro\caption@endhook}
+\DeclareCaptionOption{listof}{\caption@set@bool\caption@iflof{#1}}
+\newcommand*\DeclareCaptionListOfFormat[2]{%
+ \global\@namedef{caption@lstfmt@#1}##1##2{#2}}
+\@onlypreamble\DeclareCaptionListOfFormat
+\DeclareCaptionOption{listofformat}{\caption@setlistofformat{#1}}
+\newcommand*\caption@setlistofformat[1]{%
+ \@ifundefined{caption@lstfmt@#1}%
+ {\caption@Error{Undefined list-of format `#1'}}%
+ {\expandafter\let\expandafter\caption@lstfmt
+ \csname caption@lstfmt@#1\endcsname}}
+\DeclareCaptionListOfFormat{empty}{}
+\DeclareCaptionListOfFormat{simple}{#1#2}
+\DeclareCaptionListOfFormat{parens}{#1(#2)}
+\DeclareCaptionListOfFormat{subsimple}{#2}
+\DeclareCaptionListOfFormat{subparens}{(#2)}
+\def\caption@lstfmt@default{\caption@lstfmt@subsimple}
\DeclareCaptionOption{debug}[1]{%
- \caption@setbool{debug}{#1}%
+ \caption@set@bool\caption@ifdebug{#1}%
+ \let\caption@iftypewarning\caption@ifdebug
\caption@ifdebug{%
- \def\caption@Debug{\PackageInfo{caption3}}%
+ \def\caption@Debug{\PackageInfo{caption}}%
}{%
\let\caption@Debug\@gobble
}}
+\DeclareOption{debug}{\setkeys{caption}{debug}}
\setkeys{caption}{debug=0}
-\captionsetup{style=default,position=default,listof=1,%
+\caption@CheckCommand\@makecaption{\let\@makecaption\@undefined}
+\caption@CheckCommand\@makecaption{%
+ % article|report|book [2005/09/16 v1.4f Standard LaTeX document class]
+ \long\def\@makecaption#1#2{%
+ \vskip\abovecaptionskip
+ \sbox\@tempboxa{#1: #2}%
+ \ifdim \wd\@tempboxa >\hsize
+ #1: #2\par
+ \else
+ \global \@minipagefalse
+ \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
+ \fi
+ \vskip\belowcaptionskip}}
+\@ifundefined{@captionheadfont}{}{%
+ \caption@CheckCommand\@makecaption{%
+ % amsart|amsproc|amsbook [2004/08/06 v2.20]
+ \long\def\@makecaption#1#2{%
+ \setbox\@tempboxa\vbox{\color@setgroup
+ \advance\hsize-2\captionindent\noindent
+ \@captionfont\@captionheadfont#1\@xp\@ifnotempty\@xp
+ {\@cdr#2\@nil}{.\@captionfont\upshape\enspace#2}%
+ \unskip\kern-2\captionindent\par
+ \global\setbox\@ne\lastbox\color@endgroup}%
+ \ifhbox\@ne % the normal case
+ \setbox\@ne\hbox{\unhbox\@ne\unskip\unskip\unpenalty\unkern}%
+ \fi
+ \ifdim\wd\@tempboxa=\z@ % this means caption will fit on one line
+ \setbox\@ne\hbox to\columnwidth{\hss\kern-2\captionindent\box\@ne\hss}%
+ \else % tempboxa contained more than one line
+ \setbox\@ne\vbox{\unvbox\@tempboxa\parskip\z@skip
+ \noindent\unhbox\@ne\advance\hsize-2\captionindent\par}%
+ \fi
+ \ifnum\@tempcnta<64 % if the float IS a figure...
+ \addvspace\abovecaptionskip
+ \hbox to\hsize{\kern\captionindent\box\@ne\hss}%
+ \else % if the float IS NOT a figure...
+ \hbox to\hsize{\kern\captionindent\box\@ne\hss}%
+ \nobreak
+ \vskip\belowcaptionskip
+ \fi
+ \relax
+ }}
+ \caption@CheckCommand\@makecaption{%
+ % smfart|smfbook [1999/11/15 v1.2f Classe LaTeX pour les articles publies par la SMF]
+ \long\def\@makecaption#1#2{%
+ \ifdim\captionindent>.1\hsize \captionindent.1\hsize \fi
+ \setbox\@tempboxa\vbox{\color@setgroup
+ \advance\hsize-2\captionindent\noindent
+ \@captionfont\@captionheadfont#1\@xp\@ifnotempty\@xp
+ {\@cdr#2\@nil}{\@addpunct{.}\@captionfont\upshape\enspace#2}%
+ \unskip\kern-2\captionindent\par
+ \global\setbox\@ne\lastbox\color@endgroup}%
+ \ifhbox\@ne % the normal case
+ \setbox\@ne\hbox{\unhbox\@ne\unskip\unskip\unpenalty\unkern}%
+ \fi
+ \ifdim\wd\@tempboxa=\z@ % this means caption will fit on one line
+ \setbox\@ne\hbox to\columnwidth{\hss\kern-2\captionindent\box\@ne\hss}%
+ \@tempdima\wd\@ne\advance\@tempdima-\captionindent
+ \wd\@ne\@tempdima
+ \else % tempboxa contained more than one line
+ \setbox\@ne\vbox{\rightskip=0pt plus\captionindent\relax
+ \unvbox\@tempboxa\parskip\z@skip
+ \noindent\unhbox\@ne\advance\hsize-2\captionindent\par}%
+ \fi
+ \ifnum\@tempcnta<64 % if the float IS a figure...
+ \addvspace\abovecaptionskip
+ \noindent\kern\captionindent\box\@ne
+ \else % if the float IS NOT a figure...
+ \noindent\kern\captionindent\box\@ne
+ \nobreak
+ \vskip\belowcaptionskip
+ \fi
+ \relax
+ }}
+ \let\captionmargin\captionindent
+ \begingroup\edef\@tempa{\endgroup
+ \noexpand\caption@g@addto@list\noexpand\caption@sty@default
+ {margin=\the\captionmargin
+ \@ifundefined{smf@makecaption}{}{,maxmargin=.1\linewidth}}}
+ \@tempa
+ \caption@g@addto@list\caption@sls@default{margin*=.5\captionmargin}
+ \DeclareCaptionLabelSeparator{default}{.\enspace}
+ \DeclareDefaultCaptionFont{font}{\@captionfont}
+ \DeclareDefaultCaptionFont{labelfont}{\@captionheadfont}
+ \DeclareDefaultCaptionFont{textfont}{\@captionfont\upshape}
+ \captionsetup*[figure]{position=b}
+ \captionsetup*[table]{position=t}
+}
+\@ifclassloaded{beamer}{%
+ \caption@CheckCommand\beamer@makecaption{%
+ % beamerbaselocalstructure.sty,v 1.53 2007/01/28 20:48:21 tantau
+ \long\def\beamer@makecaption#1#2{%
+ \def\insertcaptionname{\csname#1name\endcsname}%
+ \def\insertcaptionnumber{\csname the#1\endcsname}%
+ \def\insertcaption{#2}%
+ \nobreak\vskip\abovecaptionskip\nobreak
+ \sbox\@tempboxa{\usebeamertemplate**{caption}}%
+ \ifdim \wd\@tempboxa >\hsize
+ \usebeamertemplate**{caption}\par
+ \else
+ \global \@minipagefalse
+ \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
+ \fi
+ \nobreak\vskip\belowcaptionskip\nobreak}}
+ \DeclareCaptionLabelFormat{default}{#1}
+ \DeclareDefaultCaptionJustification{\raggedright}
+ \DeclareDefaultCaptionFont{font}{%
+ \usebeamerfont*{caption}%
+ \usebeamercolor[fg]{caption}}
+ \DeclareDefaultCaptionFont{labelfont}{%
+ \usebeamercolor[fg]{caption name}%
+ \usebeamerfont*{caption name}}
+ \defbeamertemplate{caption}{caption3}{%
+ \caption@make\insertcaptionname\insertcaptionnumber\insertcaption}
+ \DeclareOption{beamer}{%
+ % \usebeamertemplate**{caption} will set font
+ \DeclareDefaultCaptionFont{font}{}%
+ \setbeamertemplate{caption}[caption3]}
+}{}
+\@ifundefined{scr@caption}{}{%
+ \caption@CheckCommand\@makecaption{%
+ % scrartcl|scrreprt|scrbook [2007/03/07 v2.97a KOMA-Script document class]
+ \long\def\@makecaption#1#2{%
+ \if@captionabove
+ \vskip\belowcaptionskip
+ \else
+ \vskip\abovecaptionskip
+ \fi
+ \@@makecaption\@firstofone{#1}{#2}%
+ \if@captionabove
+ \vskip\abovecaptionskip
+ \else
+ \vskip\belowcaptionskip
+ \fi}}
+ \DeclareCaptionFormat{default}{%
+ \ifdofullc@p
+ \caption@fmt@hang{#1}{#2}{#3}%
+ \else
+ #1#2%
+ \ifdim\cap@indent<\z@
+ \par
+ \noindent\hspace*{-\cap@indent}%
+ \else\if@capbreak
+ \par
+ \fi\fi
+ #3\par
+ \fi}
+ \DeclareCaptionLabelSeparator{default}{\captionformat}
+ \DeclareDefaultCaptionFont{font}{\scr@fnt@caption}
+ \DeclareDefaultCaptionFont{labelfont}{\scr@fnt@captionlabel}
+}
+\@ifundefined{CaptionFonts}{}{%
+ \caption@CheckCommand\@makecaption{%
+ % artikel|rapport|boek [2004/06/07 v2.1a NTG LaTeX document class]
+ \long\def\@makecaption#1#2{%
+ \vskip\abovecaptionskip
+ \sbox\@tempboxa{{\CaptionLabelFont#1:} \CaptionTextFont#2}%
+ \ifdim \wd\@tempboxa >\hsize
+ {\CaptionLabelFont#1:} \CaptionTextFont#2\par
+ \else
+ \global \@minipagefalse
+ \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
+ \fi
+ \vskip\belowcaptionskip}}
+ \DeclareDefaultCaptionFont{labelfont}{\CaptionLabelFont}
+ \DeclareDefaultCaptionFont{textfont}{\CaptionTextFont}
+}
+\@ifundefined{FB@makecaption}{}{%
+ \caption@CheckCommand\@makecaption{%
+ % frenchb.ldf [2005/02/06 v1.6g French support from the babel system]
+ \long\def\@makecaption#1#2{%
+ \vskip\abovecaptionskip
+ \sbox\@tempboxa{#1\CaptionSeparator #2}%
+ \ifdim \wd\@tempboxa >\hsize
+ #1\CaptionSeparator #2\par
+ \else
+ \global \@minipagefalse
+ \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
+ \fi
+ \vskip\belowcaptionskip}}
+ \ifx\@makecaption\STD@makecaption
+ \DeclareCaptionLabelSeparator{default}{\CaptionSeparator}
+ \def\caption@frenchb{% supress frenchb warning
+ \let\STD@makecaption\@makecaption
+ \let\FB@makecaption\@makecaption}
+ \else
+ \ifx\@makecaption\@undefined\else
+ \PackageInfo{caption}{%
+ The definition of \protect\@makecaption\space
+ has been changed,\MessageBreak
+ frenchb will NOT customize it}%
+ \fi
+ \fi
+}
+\@ifundefined{frenchTeXmods}{}{%
+ \caption@CheckCommand\@makecaption{%
+ % french(le).sty [2006/10/03 The french(le) package /V5,9991/]
+ % french(le).sty [2007/06/28 The french(le) package /V5,9994/]
+ \def\@makecaption#1#2{%
+ \ifFTY%
+ \def\@secondofmany##1##2\void{##2}%
+ \def\@tempa{\@secondofmany#2\void}%
+ \ifx\@tempa\empty%
+ \let\captionseparator\empty%
+ \fi%
+ \@mcORI{#1}{\relax\captionfont{#2}}%
+ \else
+ \@mcORI{#1}{#2}%
+ \fi}}
+ \caption@CheckCommand\@makecaption{%
+ % french(le).sty [2007/02/11 The french(le) package /V5,9993/]
+ \def\@makecaption#1#2{%
+ \ifFTY%
+ \def\@secondofmany##1##2\void{##2}%
+ \protected@edef\@tempa{\@secondofmany#2\void}%
+ \ifx\@tempa\empty%
+ \let\captionseparator\empty%
+ \fi%
+ \@mcORI{#1}{\relax\captionfont{#2}}%
+ \else
+ \@mcORI{#1}{#2}%
+ \fi}}
+ \DeclareDefaultCaptionFont{textfont}{\itshape}%
+ \DeclareCaptionLabelSeparator{default}{\captionseparator\space}%
+}
+\captionsetup{style=default,position=default,listof=1,listofformat=default,%
twoside=\if@twoside 1\else 0\fi}
+\ProcessOptions*
+\caption@IfCheckCommand{%
+ \caption@setbool{documentclass}{1}%
+}{%
+ \caption@setbool{documentclass}{0}%
+ \PackageInfo{caption}{%
+ Unknown document class (or package),\MessageBreak
+ standard defaults will be used}%
+ \caption@Debug{\string\@makecaption\space=\space\meaning\@makecaption\@gobble}%
+}
+\newcommand*\caption@addcontentsline[2]{%
+ \caption@iflof%
+ {\def\@tempa{#2}}%
+ {\let\@tempa\@empty}%
+ \ifx\@tempa\@empty \else
+ {\let\\\space
+ \addcontentsline{\csname ext@#1\endcsname}{#1}%
+ {\protect\numberline
+ {\caption@lstfmt{\@nameuse{p@#1}}{\@nameuse{the#1}}}%
+ {\ignorespaces #2}}}%
+ \fi}
\newif\ifcaption@star
+\newcommand*\caption@fnum[1]{%
+ \caption@lfmt{\@nameuse{#1name}}{\@nameuse{the#1}}{\theContinuedFloat}}
\newcommand\caption@make[2]{%
- \caption@@make{\caption@lfmt{#1}{#2}}}
+ \caption@@make{\caption@lfmt{#1}{#2}{\theContinuedFloat}}}
\newcommand\caption@@make[2]{%
\begingroup
\caption@beginhook
+ \ifx\caption@maxmargin\@undefined \else
+ \ifdim\captionmargin>\caption@maxmargin\relax
+ \captionmargin\caption@maxmargin\relax
+ \fi
+ \fi
+ \ifx\caption@minmargin\@undefined \else
+ \ifdim\captionmargin<\caption@minmargin\relax
+ \captionmargin\caption@minmargin\relax
+ \fi
+ \fi
+ \caption@ifslc{\caption@ifempty@list\caption@opt@SingleLine{}{%
+ \caption@slc{#1}{#2}\captionwidth\relax}}{}%
\caption@calcmargin
- \caption@ifslc{\ifx\caption@sls\@empty\else
- \caption@slc{#1}{#2}\captionwidth\relax
- \fi}{}%
\@tempdima\captionmargin
- \ifdim\captionmargin@=\z@\else
+ \ifdim\captionmargin@=\z@ \else
\caption@ifoddpage{}{\advance\@tempdima\captionmargin@}%
\fi
- \caption@ifh{\advance\@tempdima\captionindent}%
- \hskip\@tempdima
+ \caption@ifh{\advance\@tempdima\caption@indent}%
+ \hspace\@tempdima
\@tempdima\captionwidth
- \caption@ifh{\advance\@tempdima by -\captionindent}%
+ \caption@ifh{\advance\@tempdima-\caption@indent}%
\captionbox\@tempdima{%
\caption@ifh{%
- \ifdim\captionindent=\z@
+ \ifdim\caption@indent=\z@
\leavevmode
\else
- \hskip-\captionindent
+ \hskip-\caption@indent
\fi}%
\caption@@@make{#1}{#2}}%
\@tempdima\captionmargin
- \ifdim\captionmargin@=\z@\else
+ \ifdim\captionmargin@=\z@ \else
\caption@ifoddpage{\advance\@tempdima\captionmargin@}{}%
\fi
- \hskip\@tempdima
+ \hspace\@tempdima
\caption@endhook
\endgroup
\global\caption@starfalse}
-\newcommand\caption@calcmargin{%
- \@tempdima\hsize
- \ifnum\@listdepth>0\relax
- \advance\@tempdima by -\leftmargin
- \advance\@tempdima by -\rightmargin
- \fi
+\newcommand*\caption@calcmargin{%
\ifdim\captionwidth=\z@
- \captionwidth\@tempdima
+ \captionwidth\linewidth
\advance\captionwidth by -2\captionmargin
\advance\captionwidth by -\captionmargin@
\else
- \captionmargin\@tempdima
+ \captionmargin\linewidth
\advance\captionmargin by -\captionwidth
\divide\captionmargin by 2
\captionmargin@\z@
\fi
\caption@Debug{%
- \protect\hsize=\the\hsize,
- \protect\margin=\the\captionmargin,
- \protect\marginx=\the\captionmargin@,
- \protect\width=\the\captionwidth}%
+ \string\hsize=\the\hsize,
+ \string\linewidth=\the\linewidth,\MessageBreak
+ \string\leftmargin=\the\leftmargin,
+ \string\rightmargin=\the\rightmargin,\MessageBreak
+ \string\margin=\the\captionmargin,
+ \string\margin@=\the\captionmargin@,
+ \string\width=\the\captionwidth}%
}
\newcommand\caption@slc[4]{%
- \caption@startslc
+ \caption@Debug{Begin SLC}%
+ \begingroup
+ \expandafter\caption@setup\expandafter{\caption@opt@SingleLine}%
+ \let\caption@hj\@empty
+ \caption@calcmargin % calculate #3 if necessary
+ \caption@prepareslc
\sbox\@tempboxa{\caption@@@make{#1}{#2}}%
- \ifdim\wd\@tempboxa >#3%
- \caption@endslc
+ \ifdim\wd\@tempboxa>#3%
+ \endgroup
\else
- \caption@endslc
- \caption@esetup\caption@sls
+ \endgroup
+ \expandafter\caption@setup\expandafter{\caption@opt@SingleLine}%
#4%
- \fi}
-\newcommand\caption@startslc{%
- \begingroup
- \let\label\@gobble
+ \fi
+ \caption@Debug{End SLC}}
+\newcommand*\caption@prepareslc{%
\let\@footnotetext\@gobble\let\@endnotetext\@gobble
+ \def\label{\caption@withoptargs\@gobbletwo}%
\def\stepcounter##1{\advance\csname c@##1\endcsname\@ne\relax}%
- \let\caption@hj\relax}
-\newcommand\caption@endslc{%
- \endgroup}
-\newcommand\captionbox{\parbox[b]}
+ \let\refstepcounter\stepcounter\let\H@refstepcounter\stepcounter}
+\newcommand*\captionbox{\parbox[b]}
\newcommand\caption@@@make[2]{%
\sbox\@tempboxa{#1}%
\ifdim\wd\@tempboxa=\z@
@@ -552,9 +1043,9 @@
{\ifcaption@star\else{\caption@iflf\captionlabelfont\caption@lsep}\fi}%
{{\captiontextfont
\caption@ifstrut{\vrule\@height\ht\strutbox\@width\z@}{}%
- \nobreak\hskip\z@skip
+ \nobreak\hskip\z@skip % enable hyphenation
\caption@tfmt{#2}%
- \caption@ifstrut{\@finalstrut\strutbox}{}%
+ \caption@ifstrut{\ifhmode\@finalstrut\strutbox\fi}{}%
\par}}}
\newcommand\caption@ifempty[1]{%
\def\caption@tempa{#1}%
@@ -563,19 +1054,97 @@
\let\caption@tempa\@empty
\fi
\ifx\caption@tempa\@empty
- \expandafter\@firstofone
+ \let\caption@ifempty\@secondoftwo
\else
- \expandafter\@gobble
- \fi}
+ \let\caption@ifempty\@gobbletwo
+ \fi
+ \caption@ifempty\@unused}
\newcommand*\caption@@par{%
- \parindent\captionparindent\hangindent\captionhangindent}%
-\AtBeginDocument{%
+ \parindent\caption@parindent\hangindent\caption@hangindent}%
+\providecommand*\DeclareFloatingEnvironment[1]{%
+ \@ifundefined{c@chapter}%
+ {\newcounter{#1}%
+ \@namedef{the#1}{\arabic{#1}}%
+ \@namedef{theH#1}{\arabic{#1}}}%
+ {\newcounter{#1}[chapter]%
+ \@namedef{the#1}{\ifnum\c@chapter>\z@ \thechapter.\fi \arabic{#1}}%
+ \@namedef{theH#1}{\theHchapter.\arabic{#1}}}%
+ \@namedef{fps@#1}{tbp}%
+ \@ifundefined{c@float@type}{%
+ \newcounter{float@type}%
+ \setcounter{float@type}{\@ifundefined{c@figure}14}}{}%
+ \expandafter\xdef\csname ftype@#1\endcsname{\the\value{float@type}}%
+ \addtocounter{float@type}{\value{float@type}}%
+ \@namedef{ext@#1}{lo#1}%
+ \@namedef{fnum@#1}{\@nameuse{#1name}\nobreakspace\@nameuse{the#1}}%
+ \newenvironment{#1}{\@float{#1}}{\end@float}%
+ \newenvironment{#1*}{\@dblfloat{#1}}{\end@dblfloat}%
+ \expandafter\newcommand\csname listof#1s\endcsname{\begingroup
+ \expandafter\let\expandafter\listfigurename\csname list#1name\endcsname
+ \expandafter\let\expandafter\ext@figure\csname ext@#1\endcsname
+ \let\caption@ORI@starttoc\@starttoc
+ \renewcommand*\@starttoc[1]{%
+ \expandafter\caption@ORI@starttoc\expandafter{\ext@figure}}%
+ \listoffigures
+ \endgroup}%
+ \@ifundefined{l@figure}%
+ {\@namedef{l@#1}{\@dottedtocline{1}{1.5em}{2.3em}}}%
+ {\expandafter\let\csname l@#1\endcsname\l@figure}%
+ \expandafter\newcommand\csname #1name\endcsname{}%
+ \edef\@tempa{%
+ \def\noexpand\@tempa{\expandafter\noexpand\@car#1\@nil}}%
+ \uppercase\expandafter{\@tempa}%
+ \edef\@tempb{%
+ \noexpand\g@addto@macro\noexpand\@tempa{\expandafter\@cdr#1\@nil}}%
+ \@tempb
+ \expandafter\let\csname #1name\endcsname\@tempa
+ \expandafter\newcommand\csname list#1name\endcsname{}%
+ \expandafter\xdef\csname list#1name\endcsname{List of \@tempa s}%
+ \@cons\caption@floatlist{{#1}}}
+\@onlypreamble\DeclareFloatingEnvironment
+\newcommand*\caption@floatlist{}
+\caption@AtBeginDocument{%
\def\@tempa{\@ifstar\sf@@subref\sf@subref}%
\ifx\subref\@tempa
- \PackageInfo{caption3}{subref 1.2 or 1.3 detected}%
+ \PackageInfo{caption3}{subfig package 1.2 or 1.3 is loaded\@gobble}%
+ \let\caption@setfloattype\@gobble
+ \let\sf@ifpositiontop\caption@iftop
+ \def\@dottedxxxline#1#2#3#4#5#6#7{%
+ \begingroup
+ \caption@setfloattype{#1}%
+ \caption@setoptions{subfloat}%
+ \caption@setoptions{sub#1}%
+ \ifnum #3>\@nameuse{c@#2depth}\else
+ \@dottedtocline{\z@}{#4}{#5}{#6}{#7}%
+ \fi
+ \endgroup}%
+ \let\sf@subfloat\sf@NEW@subfloat
\DeclareRobustCommand*\subref{\@ifstar\sf@@subref\sf@subref}%
+ \caption@removefromoptlist{subfloat}%
+ \caption@removefromoptlist{subfigure}%
+ \caption@removefromoptlist{subtable}%
\fi
-}
+ \let\sf@NEW@subfloat\@undefined}
+\def\sf@NEW@subfloat{%
+ \begingroup
+ \caption@setfloattype\@captype
+ \sf@ifpositiontop{%
+ \maincaptiontoptrue
+ }{%
+ \maincaptiontopfalse
+ }%
+ \caption@setoptions{subfloat}%
+ \caption@setoptions{sub\@captype}%
+ \let\sf@oldlabel=\label
+ \let\label=\subfloat@label
+ \ifmaincaptiontop\else
+ \advance\@nameuse{c@\@captype}\@ne
+ \fi
+ \refstepcounter{sub\@captype}%
+ \setcounter{sub\@captype @save}{\value{sub\@captype}}%
+ \@ifnextchar [% %] match left bracket
+ {\sf@@subfloat}%
+ {\sf@@subfloat[\@empty]}}%
\endinput
%%
%% End of file `caption3.sty'.
diff --git a/Master/texmf-dist/tex/latex/caption/ltcaption.sty b/Master/texmf-dist/tex/latex/caption/ltcaption.sty
new file mode 100644
index 00000000000..3c752d16979
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/caption/ltcaption.sty
@@ -0,0 +1,184 @@
+%%
+%% This is file `ltcaption.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% ltcaption.dtx (with options: `package')
+%%
+%% Copyright (C) 1994-2007 Axel Sommerfeldt (caption@sommerfee.de)
+%%
+%% --------------------------------------------------------------------------
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2003/12/01 or later.
+%%
+%% This work has the LPPL maintenance status "maintained".
+%%
+%% This Current Maintainer of this work is Axel Sommerfeldt.
+%%
+%% This work consists of the files caption.ins, caption.dtx, caption2.dtx,
+%% and ltcaption.dtx, the derived files caption.sty, caption2.sty,
+%% caption3.sty, and ltcaption.sty, and the user manuals caption-deu.tex,
+%% caption-eng.tex, and caption-rus.tex.
+%%
+\NeedsTeXFormat{LaTeX2e}[1994/12/01]
+\ProvidesPackage{ltcaption}[2007/09/01 v1.1 longtable captions (AR)]
+\providecommand*\LTcaptype{table}
+\providecommand*\ext@table{lot}
+\@ifundefined{caption@AtBeginDocument}\AtBeginDocument\caption@AtBeginDocument{%
+ \@ifpackageloaded{listings}{%
+ \providecommand*\ext@lstlisting{lol}%
+ }{}}
+\@ifpackageloaded{caption}{}{%
+ \newskip\LTcapleft \LTcapleft=\fill
+ \newskip\LTcapright \LTcapright=\fill
+ \newif\ifLTcapmargins \LTcapmarginstrue
+ \providecommand*\CaptionLabelFont{}
+ \providecommand*\CaptionTextFont{}
+}
+\@ifundefined{caption@AtBeginDocument}\AtBeginDocument\caption@AtBeginDocument{%
+ \let\ltcaption@ORI@LT@array\LT@array
+ \renewcommand*\LT@array{%
+ \let\ltcaption@ORI@refstepcounter\refstepcounter
+ \let\ltcaption@ORI@H@refstepcounter\H@refstepcounter
+ \def\refstepcounter##1{%
+ \let\refstepcounter\ltcaption@ORI@refstepcounter
+ \let\H@refstepcounter\ltcaption@ORI@H@refstepcounter
+ \refstepcounter\LTcaptype}%
+ \def\H@refstepcounter##1{%
+ \let\refstepcounter\ltcaption@ORI@refstepcounter
+ \let\H@refstepcounter\ltcaption@ORI@H@refstepcounter
+ \H@refstepcounter\LTcaptype}%
+ \let\ltcaption@ORI@hyper@makecurrent\hyper@makecurrent
+ \def\hyper@makecurrent##1{%
+ \let\hyper@makecurrent\ltcaption@ORI@hyper@makecurrent
+ \hyper@makecurrent\LTcaptype}%
+ \def\lst@@caption{\relax}%
+ \ltcaption@ORI@LT@array}%
+}
+\def\LT@c@ption#1[#2]#3{%
+ \LT@makecaption#1{\csname fnum@\LTcaptype\endcsname}{#3}%
+ \def\@tempa{#2}%
+ \ifx\@tempa\@empty\else
+ {\let\\\space
+ \addcontentsline{\csname ext@\LTcaptype\endcsname}{\LTcaptype}%
+ {\protect\numberline{\csname the\LTcaptype\endcsname}{#2}}}%
+ \fi}
+\renewcommand\LT@makecaption[3]{%
+ \LT@@makecaption{%
+ \sbox\@tempboxa{#1{{\CaptionLabelFont#2:} }\CaptionTextFont#3}%
+ \ifdim\wd\@tempboxa>\hsize
+ #1{\CaptionLabelFont{#2:} }\CaptionTextFont#3%
+ \else
+ \hbox to\hsize{\hfil\box\@tempboxa\hfil}%
+ \fi
+ \endgraf\vskip\baselineskip}}
+\newcommand\LT@@makecaption[1]{%
+ \caption@LT@make{\hb@xt@\hsize{%
+ \ifLTcapmargins
+ \hspace\LTcapleft
+ \FBifLTcapwidth{\advance\LTcapwidth-\LTcapleft}%
+ \else
+ \hspace\LTleft
+ \FBifLTcapwidth{\advance\LTcapwidth-\LTleft}%
+ \fi
+ \FBifLTcapwidth{\advance\LTcapwidth-%
+ \ifLTcapmargins\LTcapright\else\LTright\fi}%
+ \parbox[t]\LTcapwidth{#1}%
+ \ifLTcapmargins
+ \hskip\LTcapright
+ \else
+ \hskip\LTright
+ \fi}}}
+\AtBeginDocument{\providecommand*\FBifLTcapwidth[1]{}}
+\newcommand\caption@LT@make[1]{%
+ \noalign{\caption@LT@config}%
+ \expandafter\LT@mcol\expandafter\LT@cols\expandafter{\caption@LTfmt}{%
+ \hb@xt@\z@{%
+ \hspace\caption@LTleft
+ \parbox[t]\linewidth{#1}%
+ \hspace\caption@LTright}}}%
+\newcommand*\caption@LT@config{%
+ \caption@LT@parse\LTleft\caption@LTleft\caption@ifLTleft
+ \caption@LT@parse\LTright\caption@LTright\caption@ifLTright
+ \xdef\caption@LTfmt{%
+ @{}\caption@ifLTleft{\caption@ifLTright{c}{r}}{l}@{}}}
+\newcommand*\caption@LT@parse[3]{%
+ \let\@pluspart\@undefined
+ \let\@minuspart\@undefined
+ \expandafter\caption@LT@parse@\expandafter\@fixpart\the#1 x %
+ \xdef#2{-\@fixpart
+ \ifx\@minuspart\@undefined\else
+ \space\@plus\space\@minuspart
+ \fi
+ \ifx\@pluspart\@undefined\else
+ \space\@minus\space\@pluspart
+ \fi}%
+ \let#3\@firstoftwo
+ \ifx\@pluspart\@undefined
+ \ifx\@minuspart\@undefined
+ \let#3\@secondoftwo
+ \fi
+ \fi}
+\def\caption@LT@parse@#1#2 {%
+ \edef\@tempa{\@car#2\@nil}%
+ \if p\@tempa
+ \def\next{\caption@LT@parse@\@pluspart}%
+ \else\if m\@tempa
+ \def\next{\caption@LT@parse@\@minuspart}%
+ \else\if x\@tempa
+ \let\next\relax
+ \else
+ \def#1{#2}%
+ \def\next{\caption@LT@parse@ @}%
+ \fi\fi\fi
+ \next}
+\newenvironment{longtable*}%
+ {\let\refstepcounter\@gobble
+ \let\H@refstepcounter\@gobble
+ \let\hyper@makecurrent\@gobble
+ \let\Hy@raisedlink\@gobble
+ \let\ltcaption@ORI@LT@c@ption\LT@c@ption
+ \def\LT@c@ption##1[##2]##3{%
+ \ifx##1\@firstofone
+ \PackageError{ltcaption}%
+ {Not allowed in longtable* environment}%
+ {If you do not understand this error, please take a closer
+ look\MessageBreak at the documentation of the `ltcaption'
+ package.\MessageBreak \@ehc}%
+ \else
+ \ltcaption@ORI@LT@c@ption{##1}[{##2}]{##3}%
+ \fi}%
+ \longtable}%
+ {\endlongtable}
+\@ifundefined{@komalongtablefalse}{}{%
+ \if@komalongtable
+ \renewcommand{\LT@makecaption}[3]{%
+ \noalign{%
+ \if@captionabove
+ \vskip\belowcaptionskip
+ \else
+ \vskip\abovecaptionskip
+ \fi
+ }%
+ \caption@LT@make{%
+ \@@makecaption{#1}{#2}{#3}%
+ \endgraf
+ \if@captionabove
+ \vskip\abovecaptionskip
+ \else
+ \vskip\belowcaptionskip
+ \fi
+ }%
+ }%
+ \let\LT@@makecaption\@undefined
+ \fi}
+\endinput
+%%
+%% End of file `ltcaption.sty'.