summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-01-09 00:39:21 +0000
committerKarl Berry <karl@freefriends.org>2013-01-09 00:39:21 +0000
commit60cbc8437dcfde310f54a43fd254865ec7e5296a (patch)
tree119dc082348b649e2fa1fb8eb6ba90639fe764df
parent7e39ebb4ceedd3a7699e90140504b8373cdf26cf (diff)
caption (8jan13)
git-svn-id: svn://tug.org/texlive/trunk@28765 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/caption/CHANGELOG12
-rw-r--r--Master/texmf-dist/doc/latex/caption/README10
-rw-r--r--Master/texmf-dist/doc/latex/caption/bicaption.pdfbin110635 -> 101444 bytes
-rw-r--r--Master/texmf-dist/doc/latex/caption/caption-deu.pdfbin320279 -> 319767 bytes
-rw-r--r--Master/texmf-dist/doc/latex/caption/caption-eng.pdfbin309296 -> 308303 bytes
-rw-r--r--Master/texmf-dist/doc/latex/caption/caption-rus.pdfbin720326 -> 719015 bytes
-rw-r--r--Master/texmf-dist/doc/latex/caption/caption.pdfbin216622 -> 53240 bytes
-rw-r--r--Master/texmf-dist/doc/latex/caption/caption2.pdfbin131773 -> 65041 bytes
-rw-r--r--Master/texmf-dist/doc/latex/caption/caption3.pdfbin193522 -> 48342 bytes
-rw-r--r--Master/texmf-dist/doc/latex/caption/ltcaption.pdfbin108778 -> 79903 bytes
-rw-r--r--Master/texmf-dist/doc/latex/caption/newfloat.pdfbin153349 -> 93983 bytes
-rw-r--r--Master/texmf-dist/doc/latex/caption/subcaption.pdfbin141558 -> 133292 bytes
-rw-r--r--Master/texmf-dist/source/latex/caption/bicaption.dtx219
-rw-r--r--Master/texmf-dist/source/latex/caption/caption-deu.tex12
-rw-r--r--Master/texmf-dist/source/latex/caption/caption-eng.tex12
-rw-r--r--Master/texmf-dist/source/latex/caption/caption-rus.tex11
-rw-r--r--Master/texmf-dist/source/latex/caption/caption.dtx636
-rw-r--r--Master/texmf-dist/source/latex/caption/caption.ins2
-rw-r--r--Master/texmf-dist/source/latex/caption/caption2.dtx2
-rw-r--r--Master/texmf-dist/source/latex/caption/caption3.dtx298
-rw-r--r--Master/texmf-dist/source/latex/caption/newfloat.dtx112
-rw-r--r--Master/texmf-dist/source/latex/caption/subcaption.dtx79
-rw-r--r--Master/texmf-dist/tex/latex/caption/bicaption.sty64
-rw-r--r--Master/texmf-dist/tex/latex/caption/caption.sty364
-rw-r--r--Master/texmf-dist/tex/latex/caption/caption2.sty2
-rw-r--r--Master/texmf-dist/tex/latex/caption/caption3.sty163
-rw-r--r--Master/texmf-dist/tex/latex/caption/ltcaption.sty2
-rw-r--r--Master/texmf-dist/tex/latex/caption/newfloat.sty69
-rw-r--r--Master/texmf-dist/tex/latex/caption/subcaption.sty49
-rwxr-xr-xMaster/tlpkg/bin/tlpkg-ctan-check10
30 files changed, 1305 insertions, 823 deletions
diff --git a/Master/texmf-dist/doc/latex/caption/CHANGELOG b/Master/texmf-dist/doc/latex/caption/CHANGELOG
index dc23417117e..d023f660e45 100644
--- a/Master/texmf-dist/doc/latex/caption/CHANGELOG
+++ b/Master/texmf-dist/doc/latex/caption/CHANGELOG
@@ -93,6 +93,15 @@ v3.2 (2011/07/30)
- New command \setcaptionsubtype as replacement for \captionsetup{subtype}
- "Hyperref support is turned off because hyperref has stopped early" is not a warning anymore but an information instead
+v3.3 (2013/01/06)
+- Revised handling of continued floats and sub-captions
+- New option box= and appropriate command \DeclareCaptionBox
+- New option list-entry= (see also endfloat package documentation)
+- Support of multiple optional arguments added to \captionsetup
+- Adapted to the elsarticle document class
+- Adapted to the current version of memhfixc package, provided by the memoir document class
+- Fixed compatibility problem with breqn and nag packages
+
bicaption package
=================
@@ -103,6 +112,9 @@ v0.9 (2010/09/19)
v1.0 (2011/09/03)
- Support for list entries added
+v1.1 (2012/04/08)
+- \captionmainlanguage and \selectcaptionlanguage added
+
ltcaption package
=================
diff --git a/Master/texmf-dist/doc/latex/caption/README b/Master/texmf-dist/doc/latex/caption/README
index b24f060023a..72e5896e04c 100644
--- a/Master/texmf-dist/doc/latex/caption/README
+++ b/Master/texmf-dist/doc/latex/caption/README
@@ -1,7 +1,7 @@
==========================================================================
The `caption' package bundle
-Copyright (C) 1994-2012 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
+Copyright (C) 1994-2013 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
License: LPPL = LaTeX Project Public Licence
Maintenance Status: maintained (by Axel Sommerfeldt)
@@ -13,7 +13,7 @@ http://www.tex.ac.uk/cgi-bin/texfaq2html?label=privinst
--------------------------------------------------------------------------
-The `caption' package v3.2 offers customization of captions of floating
+The `caption' package v3.3 offers customization of captions of floating
environments such `figure' and `table' and cooperates with the packages
float, floatflt, fltpage, hyperref, hypcap, listings, longtable,
@@ -24,19 +24,19 @@ Furthermore the `floatrow', the `subcaption', and the `subfig' package
supports the `caption' package and uses its \captionsetup interface.
User Manual: caption-eng.pdf (English)
- caption-rus.pdf (Russian)
+ caption-rus.pdf (Russian, outdated)
caption-deu.pdf (German)
--------------------------------------------------------------------------
-The `bicaption' package v1.0 is a tiny package supporting the typesetting
+The `bicaption' package v1.1 is a tiny package supporting the typesetting
of bilingual captions.
User Manual: bicaption.pdf (English)
--------------------------------------------------------------------------
-The `ltcaption' package v1.2 fixes caption problems with
+The `ltcaption' package v1.3 fixes caption problems with
other-than-center aligned longtables. (solving LaTeX PR `tools/3387')
A bonus feature is the addition of the environment longtable* which does
diff --git a/Master/texmf-dist/doc/latex/caption/bicaption.pdf b/Master/texmf-dist/doc/latex/caption/bicaption.pdf
index 3c421f85ee1..05163c02d43 100644
--- a/Master/texmf-dist/doc/latex/caption/bicaption.pdf
+++ b/Master/texmf-dist/doc/latex/caption/bicaption.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/caption/caption-deu.pdf b/Master/texmf-dist/doc/latex/caption/caption-deu.pdf
index 9c71dcc842d..60162c204ac 100644
--- a/Master/texmf-dist/doc/latex/caption/caption-deu.pdf
+++ b/Master/texmf-dist/doc/latex/caption/caption-deu.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/caption/caption-eng.pdf b/Master/texmf-dist/doc/latex/caption/caption-eng.pdf
index 3b310ae1c75..2f93fbd0e51 100644
--- a/Master/texmf-dist/doc/latex/caption/caption-eng.pdf
+++ b/Master/texmf-dist/doc/latex/caption/caption-eng.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/caption/caption-rus.pdf b/Master/texmf-dist/doc/latex/caption/caption-rus.pdf
index 7009ed7fe5a..d4f5ef1f03a 100644
--- a/Master/texmf-dist/doc/latex/caption/caption-rus.pdf
+++ b/Master/texmf-dist/doc/latex/caption/caption-rus.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/caption/caption.pdf b/Master/texmf-dist/doc/latex/caption/caption.pdf
index ff59b87505b..bdbcc87b94e 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 65f6ef3b379..5128cc499bd 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/caption3.pdf b/Master/texmf-dist/doc/latex/caption/caption3.pdf
index 353339029a9..add870fa9cb 100644
--- a/Master/texmf-dist/doc/latex/caption/caption3.pdf
+++ b/Master/texmf-dist/doc/latex/caption/caption3.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/caption/ltcaption.pdf b/Master/texmf-dist/doc/latex/caption/ltcaption.pdf
index af0e42b9502..78aa26bf735 100644
--- a/Master/texmf-dist/doc/latex/caption/ltcaption.pdf
+++ b/Master/texmf-dist/doc/latex/caption/ltcaption.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/caption/newfloat.pdf b/Master/texmf-dist/doc/latex/caption/newfloat.pdf
index 0ba3f9866c8..b7c303c371e 100644
--- a/Master/texmf-dist/doc/latex/caption/newfloat.pdf
+++ b/Master/texmf-dist/doc/latex/caption/newfloat.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/caption/subcaption.pdf b/Master/texmf-dist/doc/latex/caption/subcaption.pdf
index 35153a937c6..ca25bcbd691 100644
--- a/Master/texmf-dist/doc/latex/caption/subcaption.pdf
+++ b/Master/texmf-dist/doc/latex/caption/subcaption.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/caption/bicaption.dtx b/Master/texmf-dist/source/latex/caption/bicaption.dtx
index fb3d58f932d..fdfe5a62602 100644
--- a/Master/texmf-dist/source/latex/caption/bicaption.dtx
+++ b/Master/texmf-dist/source/latex/caption/bicaption.dtx
@@ -2,7 +2,7 @@
%
% This is file `bicaption.dtx'.
%
-% Copyright (C) 2010-2011 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
+% Copyright (C) 2010-2012 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
%
% --------------------------------------------------------------------------
%
@@ -14,7 +14,7 @@
% 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".F
+% This work has the LPPL maintenance status "maintained".
%
% This Current Maintainer of this work is Axel Sommerfeldt.
%
@@ -25,12 +25,12 @@
% and the user manuals caption-deu.tex, caption-eng.tex, and caption-rus.tex.
%
% \fi
-% \CheckSum{369}
+% \CheckSum{385}
%
% \iffalse
%<*driver>
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesFile{bicaption.drv}[2011/10/30 v1.0 Adds a bilingual caption feature to the caption package]
+\ProvidesFile{bicaption.drv}[2012/12/26 v1.1 Adds a bilingual caption feature to the caption package]
\hbadness=9999 \newcount\hbadness \hfuzz=74pt % Make TeX shut up.
%\errorcontextlines=3
%
@@ -61,8 +61,8 @@
\ifpdf\usepackage{hypdestopt}\fi
\hypersetup{pdfkeywords={LaTeX, package, bicaption},pdfstartpage={},pdfstartview={}}
%
-\usepackage{bicaption}[2010/09/01]
-\usepackage{subcaption}[2010/09/01]
+\usepackage{bicaption}[2012/12/26]
+\usepackage{subcaption}[2012/04/09]
%
\newcommand*\purerm[1]{{\upshape\mdseries\rmfamily #1}}
\newcommand*\puresf[1]{{\upshape\mdseries\sffamily #1}}
@@ -73,7 +73,6 @@
\newcommand*\csmarg[1]{\texttt{\char`\{#1\char`\}}}
\newcommand*\csoarg[1]{\texttt{\char`\[#1\char`\]}}
\newcommand*\version[2][]{$v#2$}
-\newcommand*\x{\discretionary{}{}{}}
%
\usepackage{marvosym}
\makeatletter
@@ -140,6 +139,7 @@
% \section{The user interface}
%
% \subsection{Loading the package}
+% \label{sec:loading}
%
% \DescribeMacro{\usepackage}
% This package will be loaded by
@@ -159,7 +159,12 @@
% |\captionsetup[bi-second]|\marg{options}\quad.
% \end{quote}
%
+% When used with the \package{babel} or \package{polyglossia} package, the
+% \package{bicaption} package should be loaded \emph{after} it, so the main
+% language will be set automatically. See \autoref{sec:babel} for details.
+%
% \subsection{Setting options}
+% \label{sec:options}
%
% \DescribeMacro{\captionsetup}
% \begin{quote}
@@ -186,7 +191,7 @@
%
% \bigskip
%
-% Options specified with |\usepackage[|\ldots|]{bi|\-|caption}| and
+% Options specified with |\use|\-|package[|\ldots|]{bi|\-|caption}| and
% |\caption|\-|setup[bi|\ldots|]{|\ldots|}| will override the ones specified by
% |\caption|\-|setup{|\ldots|}| and |\caption|\-|setup[fig|\-|ure]{|\ldots|}|
% (same for `table'). So finally we have the following order how
@@ -217,7 +222,19 @@
% |labelsep=quad,indention=10pt,position=top,labelfont=bf|~.
% \end{quote}
%
+% \bigskip
+%
+% To limit |bi|, |bi-first|, or |bi-second| options to specific environments one can use
+% multiple optional arguments for |\caption|\-|setup|, e.g.:
+% \begin{quote}
+% |\captionsetup[figure][bi-first]|\oarg{options}
+% \end{quote}
+% will limit the settings to the first heading of |figure| environments only.
+% Please note that the environment name has to be specified as first optional argument
+% while the bilingual selection as second one.
+%
% \subsection{Additional options}
+% \label{sec:additional-options}
%
% These options are available additional to the ones offered by the
% \package{caption} package:
@@ -228,8 +245,8 @@
% Sets the language of the caption, e.g.
% \begin{quote}|\use|\-|package|\-|[lang=eng|\-|lish]{bi|\-|caption}|\end{quote}
% will typeset the second caption of bilingual captions in English.
-% (The language will be set with |\select|\-|language| internally,
-% so the \package{babel} package must be loaded for using this option.)
+% (The language will be set with |\select|\-|caption|\-|language| internally,
+% see \autoref{sec:babel} for details.)
%
% \item[bi-lang=]
% \DescribeMacro{bi-lang=}
@@ -258,6 +275,7 @@
% \end{Options}
%
% \subsection{The \cs{bicaption} commands}
+% \label{sec:bicaption}
%
% \DescribeMacro\bicaption
% Bilingual captions will be typeset by
@@ -320,6 +338,7 @@
%
% \PageBreak
% \subsection{A sample document}
+% \label{sec:example}
%
% \begin{quote}
% |\documentclass[english,ngerman]{article}|\\
@@ -517,6 +536,7 @@
%
% \PageBreak
% \subsection{Customising lists}
+% \label{sec:lists}
%
% \DescribeMacro{list=}
% As default both caption texts will be insert into the List of Figures resp. List of Tables.
@@ -593,8 +613,9 @@
% |\usepackage[lang=english,listtype+=2]{bicaption}|\\
% ||\\
% |% We load the titletoc package for customizing lists|\\
-% |% Note: Loading titletoc should be done prior defining|\\
-% |% additional floating environments with \DeclareFloatingEnvironment|\\
+% |% Note: Loading titletoc should be done prior|\\
+% |% defining additional floating environments with|\\
+% |% \DeclareFloatingEnvironment|\\
% |\usepackage{titletoc}|\\
% ||\\
% |\usepackage{newfloat}|\\
@@ -630,6 +651,64 @@
% |\end{document}|
% \end{quote}
%
+% \subsection{Language Selection}
+% \label{sec:babel}
+%
+% For language selection \thispackage\ uses two macros internally:
+%
+% \medskip
+%
+% \DescribeMacro\captionmainlanguage
+% |\caption|\-|main|\-|lan|\-|guage| contains the main language, e.g. |english| or |german|.
+% If not set prior to loading \thispackage, \thispackage\ will try to obtain this setting from
+% the \package{babel} or \package{polyglossia} package.
+%
+% So if you are using either \package{babel} or \package{polyglossia}, and want to adopt
+% the main language setting from it, then just load \thispackage\ \emph{after} it,
+% and simply forget about the |\caption|\-|main|\-|lan|\-|guage| stuff.
+%
+% Otherwise one can either define |\caption|\-|main|\-|lan|\-|guage| prior to
+% loading \thispackage, e.g.:
+% \begin{quote}
+% |\newcommand\captionmainlanguage{french}|\\
+% |\usepackage|\oarg{options}|{bicaption}|
+% \end{quote}
+% Or one can specify the main language via |\caption|\-|setup| after loading \thispackage, e.g.:
+% \begin{quote}
+% |\usepackage|\oarg{options}|{bicaption}|\\
+% |\captionsetup[bi-first]{lang=french}|
+% \end{quote}
+% When not using the \package{babel} or \package{polyglossia} package both approaches
+% will have exactly the same effect.
+% But when using the \package{babel} or \package{polyglossia} package, and one want to
+% specify the main caption language manually, the first approach is preferable since
+% defining |\caption|\-|main|\-|lan|\-|guage| will suppress the automatic detection mechanism.
+%
+% \medskip
+%
+% \DescribeMacro\selectcaptionlanguage
+% |\select|\-|caption|\-|lan|\-|guage| will be used internally to select the language:
+% \begin{quote}
+% |\selectcaptionlanguage|\marg{font-or-list-entry}\marg{language}
+% \end{quote}
+% For setting the language of the caption \meta{font-or-list-entry} will be |\@first|\-|of|\-|two|,
+% for setting the language of the list entry \meta{font-or-list-entry} will be
+% |\@second|\-|of|\-|two|.~\footnote{\cs{@firstoftwo} and \cs{@secondoftwo} are defined
+% in the \LaTeX\ kernel and simply pick either the 1st or 2nd argument.}
+% It defaults to |\select@lan|\-|guage| (caption) resp.~|\select|\-|lan|\-|guage| (list entry)
+% offered by the \package{babel} and \package{polyglossia} package:
+% \begin{quote}
+% |\providecommand*\selectcaptionlanguage[2]{%|\\
+% | #1{\select@language}{\selectlanguage}{#2}}|
+% \end{quote}
+% If you need to alter this, just either define |\select|\-|caption|\-|lan|\-|guage| prior
+% loading \thispackage, or redefine it afterwards.
+%
+% \medskip
+%
+% Please note that all of this will only be relevant if the |lang=| option will be used.
+% Otherwise |\select|\-|caption|\-|lan|\-|guage| won't be used by \thispackage\ at all.
+%
% \iffalse
% --------------------------------------------------------------------------- %
% \fi
@@ -715,10 +794,10 @@
%
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{bicaption}[2011/10/30 v1.0a Bilingual Captions (AR)]
+\ProvidesPackage{bicaption}[2012/12/26 v1.1 Bilingual Captions (AR)]
% \end{macrocode}
% \begin{macrocode}
-\RequirePackage{caption}[2011/08/28] % needs v3.2c or newer
+\RequirePackage{caption}[2012/12/26] % needs v3.3 or newer
% \end{macrocode}
% \changes{v1.0}{2011/09/01}{Compatibility error added}
% \begin{macrocode}
@@ -733,6 +812,24 @@
% \pagebreak[3]
% \subsection{Initial code}
%
+% \begin{macro}{\bicaption@Info}
+% |\bicaption@Info|\marg{message}
+% \begin{macrocode}
+\newcommand*\bicaption@Info[1]{%
+ \PackageInfo{bicaption}{#1}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\bicaption@InfoNoLine}
+% |\bicaption@InfoNoLine|\marg{message}\par
+% \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*\bicaption@InfoNoLine[1]{%
+ \PackageInfo{bicaption}{#1\@gobble}}
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\bicaption@Warning}
% |\bicaption@Warning|\marg{message}
% \begin{macrocode}
@@ -751,6 +848,7 @@
See the bicaption package documentation for explanation.}
% \end{macrocode}
% \end{macro}
+%
% \begin{macro}{\bicaption@Error}
% |\bicaption@Error|\marg{message}
% \begin{macrocode}
@@ -809,23 +907,19 @@
%
% \begin{macro}{\bicaption@selectlanguage}
% \changes{v1.0}{2011/08/31}{Starred variant added}
-% Set the language via \cs{selectlanguage}.
-% \begin{macrocode}
-\newcommand*\bicaption@selectlanguage{%
- \@ifstar
- {\bicaption@select@language\select@language}
- {\bicaption@select@language\selectlanguage}}
-% \end{macrocode}
+% \changes{v1.1}{2012/04/09}{Support of \cs{selectcaptionlanguage} added}
+% Set the language (stored in |\bi|\-|caption@lan|\-|guage|)
+% via |\select|\-|bi|\-|caption|\-|lan|\-|guage|.
% \begin{macrocode}
-\newcommand*\bicaption@select@language[1]{%
+\newcommand*\bicaption@selectlanguage[1]{%
\caption@ifundefined\bicaption@language{}{%
- \expandafter#1\expandafter{\bicaption@language}}}
+ \expandafter\selectcaptionlanguage\expandafter#1\expandafter{\bicaption@language}}}
% \end{macrocode}
% |\caption@applyfont| (of the \package{caption} package kernel) will be extended here
% so the language setting will actually take effect.
% \begin{macrocode}
\g@addto@macro\caption@applyfont{%
- \bicaption@selectlanguage*}
+ \bicaption@selectlanguage\@firstoftwo}
% \end{macrocode}
% \begin{macrocode}
\g@addto@macro\caption@prepareslc{%
@@ -833,6 +927,15 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\selectcaptionlanguage}
+% |\selectcaptionlanguage|\marg{font-or-list-entry}\marg{language}
+% will finally be used to set up the language.
+% \begin{macrocode}
+\providecommand*\selectcaptionlanguage[1]{%
+ #1\select@language\selectlanguage}
+% \end{macrocode}
+% \end{macro}
+%
% \pagebreak[3]
% \subsection{Execution of options}
%
@@ -843,17 +946,25 @@
%
% Set the language for the first caption.
% \begin{macrocode}
-\ifcsname bbl@main@language\endcsname
- \edef\@tempa{\noexpand\captionsetup[bi-first]{lang=\bbl@main@language}}
- \@tempa
+\ifcsname captionmainlanguage\endcsname
+ \bicaption@InfoNoLine{main language is set to \captionmainlanguage}
+\else\ifcsname bbl@main@language\endcsname
+ \bicaption@InfoNoLine{babel found, main language is \bbl@main@language}
+ \let\captionmainlanguage\bbl@main@language
\else\ifcsname xpg@main@language\endcsname
- \edef\@tempa{\noexpand\captionsetup[bi-first]{lang=\xpg@main@language}}
- \@tempa
+ \bicaption@InfoNoLine{polyglossia found, main language is \xpg@main@language}
+ \let\captionmainlanguage\xpg@main@language
\else
- \bicaption@WarningNoLine{Please load this package after the babel package}
-\fi\fi
+ \bicaption@InfoNoLine{main language is not set}
+\fi\fi\fi
% \end{macrocode}
-% We use |\caption@ProcessOptions| here to add the options to the `|bi-second|' option
+% \begin{macrocode}
+\ifcsname captionmainlanguage\endcsname
+ \edef\@tempa{\noexpand\captionsetup[bi-first]{lang=\captionmainlanguage}}
+ \@tempa
+\fi
+% \end{macrocode}
+% We use |\caption@Process|\-|Options| here to add the options to the `|bi-second|' option
% list instead of executing them immediately.
% \begin{macrocode}
\caption@SetupOptions{bicaption}{\captionsetup[bi-second]{#2}}%
@@ -863,16 +974,18 @@
% \pagebreak[3]
% \subsection{Main code}
%
-% \begin{macro}{\caption@kernel@addcontentsline}
+% \begin{macro}{\caption@addcontentsline}
% \changes{v1.0}{2011/08/31}{Redefinition of \cs{caption@kernel@addcontentsline} added}
-% We patch \cs{caption@kernel@addcontentsline} (of the \package{caption} package kernel)
-% so \cs{bicaption@addcontentsline} will be used for bilingual captions instead.
+% \changes{v1.0b}{2012/01/15}{\cs{caption@kernel@addcontentsline} changed to \cs{caption@addcontentsline}}
+% We patch |\caption@add|\-|contents|\-|line| (of the \package{caption} package kernel)
+% so |bi|\-|caption@add|\-|contents|\-|line| will be used for bilingual captions instead.
% \begin{macrocode}
-\let\caption@kernel@addcontentsline@ORI\caption@kernel@addcontentsline
-\renewcommand*\caption@kernel@addcontentsline[2]{%
+\let\bicaption@addcontentsline@ORI\caption@addcontentsline
+\renewcommand*\caption@addcontentsline[2]{%
\caption@ifundefined\bicaption@lentry
- {\caption@kernel@addcontentsline@ORI{#1}{#2}}%
- {\expandafter\bicaption@addcontentsline\expandafter{\bicaption@lentry}{#1}{#2}%
+ {\bicaption@addcontentsline@ORI{#1}{#2}}%
+ {\expandafter\bicaption@addcontentsline\expandafter
+ {\bicaption@lentry}{#1}{#2}%
\global\let\bicaption@lentry\@undefined}}
% \end{macrocode}
% \end{macro}
@@ -880,7 +993,7 @@
% \begin{macro}{\bicaption@addcontentsline}
% \changes{v1.0}{2011/08/31}{This macro added}
% |\bicaption@addcontentsline|\marg{list entry \#2}\marg{type}\marg{list entry \#1}\par
-% Typeset both captions using the original version of \cs{caption@addcontentsline}.
+% Typeset both captions using the original version of |\caption@add|\-|contents|\-|line|.
% \begin{macrocode}
\newcommand\bicaption@addcontentsline[3]{%
\begingroup
@@ -913,20 +1026,21 @@
% \begin{macrocode}
\newcommand*\bicaption@@addcontentsline[2]{%
\caption@ifcontentsline{#2}{%
- \bicaption@selectlanguage\relax
- \caption@kernel@addcontentsline@ORI{#1}{#2}}}
+ \bicaption@selectlanguage\@secondoftwo
+ \bicaption@addcontentsline@ORI{#1}{#2}}}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\caption@@make}
-% We patch \cs{caption@@make} (of the \package{caption} package kernel)
-% so \cs{bicaption@@make} will be used for bilingual captions instead.
+% We patch |\caption@@make| (of the \package{caption} package kernel)
+% so |\bi|\-|caption@@make| will be used for bilingual captions instead.
% \begin{macrocode}
\let\caption@@make@ORI\caption@@make
\renewcommand\caption@@make[2]{%
\caption@ifundefined\bicaption@text
{\caption@@make@ORI{#1}{#2}}%
- {\expandafter\bicaption@@make\expandafter{\bicaption@text}{#1}{#2}%
+ {\expandafter\bicaption@@make\expandafter
+ {\bicaption@text}{#1}{#2}%
\global\let\bicaption@text\@undefined}}
% \end{macrocode}
% \end{macro}
@@ -945,10 +1059,8 @@
% \begin{macrocode}
\ifnum\bicaption@lang=0\relax
\bicaption@ifslc
- {\caption@@slc{#2}{#3}{\captionwidth}{}%
- {\caption@set@bool\caption@ifslc0}%
- \caption@@slc{#2}{#1}{\captionwidth}{}%
- {\caption@set@bool\caption@ifslc0}}%
+ {\caption@slc{#2}{#3}{}{\KV@caption@singlelinecheck0}%
+ \caption@slc{#2}{#1}{}{\KV@caption@singlelinecheck0}}%
{}%
\fi
% \end{macrocode}
@@ -1045,7 +1157,7 @@
%
% \begin{macro}{\bicaption@getlabel}
% \changes{v1.0}{2011/09/03}{\cs{label} can have optional arguments now}
-% Gets the label command out of the (first) caption text and stores it to |\bicaption@label|.
+% Gets the label command out of the (first) caption text and stores it to |\bi|\-|caption@label|.
% \begin{macrocode}
\long\def\bicaption@getlabel#1\label#2#3\@nil{%
\def\@tempa{#2}%
@@ -1134,6 +1246,13 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{thebibliography}{9}
+% \bibitem{TLC2}
+% Frank Mittelbach and Michel Goossens:\\
+% \newblock {\em The {\LaTeX} Companion (2nd.~Ed.)},
+% \newblock Addison-Wesley, 2004.
+% \end{thebibliography}
+%
% \iffalse
%</package>
% \fi
diff --git a/Master/texmf-dist/source/latex/caption/caption-deu.tex b/Master/texmf-dist/source/latex/caption/caption-deu.tex
index 451a55b6db4..f3e88f0dc9a 100644
--- a/Master/texmf-dist/source/latex/caption/caption-deu.tex
+++ b/Master/texmf-dist/source/latex/caption/caption-deu.tex
@@ -1,7 +1,7 @@
%
% This is file `caption-deu.tex'.
%
-% Copyright (C) 1994-2011 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
+% Copyright (C) 1994-2012 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
%
% --------------------------------------------------------------------------
%
@@ -2750,6 +2750,7 @@ Beschriftung für Abbildungen und Tabellen, die die gesamte Seitenhöhe
einnehmen, an. Hierbei wird die Beschriftung ans Ende der vorherigen
oder nächsten Seite verschoben.}
+\iffalse
\NEWfeature{v3.1}
Zwei Optionen regeln die Verweise auf die Umgebungen |FPfigure| und |FPtable|:
\begin{description}
@@ -2764,6 +2765,7 @@ oder \cs{nameref} plazierten Referenzen auf die Beschriftung der Abbildung
bzw.~Tabelle verweisen, auf "`|figure|"' gesetzt auf den Inhalt der Abbildung.
(Die Vorbelegung ist |FP|\-|ref=|\x|figure|.)
\end{description}
+\fi
Spezielle Einstellungen für die Umgebungen |FPfigure| und |FPtable| können mit
\begin{quote}
@@ -3314,8 +3316,9 @@ Prof.~Dr.~Dirk Hoffmann,
Frank Martini,
Danie Els,
Philipp Woock,
-Fadi Semmo und
-Matthias Stevens
+Fadi Semmo,
+Matthias Stevens und
+Leo Liu
für ihre Hilfe beim stetigen Verbessern dieses Paketes bedanken.
% --------------------------------------------------------------------------- %
@@ -3372,8 +3375,10 @@ Option & Kurzbeschreibung & Abschnitt \\
|figureposition|\preambleoption & gibt einen Hinweis auf die Position & \ref{skips} \\
|font|(|+|) & wählt den Zeichensatz & \ref{fonts} \\
|format| & wählt das Format & \ref{formats} \\
+\iffalse
|FPlist| & Wohin soll der Listeneintrag einer FPfigure zeigen? & \ref{fltpage} \\
|FPref| & Wohin soll ein |\ref| einer FPfigure zeigen? & \ref{fltpage} \\
+\fi
|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} \\
@@ -4015,7 +4020,6 @@ aktuellen Entsprechungen:
|isu| & |format=hang|\\
|center| & |justification=centering|\\
|centerlast| & |justification=centerlast|\\
-%|anne| & |justification=centerlast|\\
|nooneline| & |singlelinecheck=off|\\
|scriptsize| & |font=scriptsize|\\
|footnotesize| & |font=footnotesize|\\
diff --git a/Master/texmf-dist/source/latex/caption/caption-eng.tex b/Master/texmf-dist/source/latex/caption/caption-eng.tex
index 0893e216c9f..381d745be3e 100644
--- a/Master/texmf-dist/source/latex/caption/caption-eng.tex
+++ b/Master/texmf-dist/source/latex/caption/caption-eng.tex
@@ -1,7 +1,7 @@
%
% This is file `caption-eng.tex'.
%
-% Copyright (C) 1994-2011 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
+% Copyright (C) 1994-2012 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
%
% --------------------------------------------------------------------------
%
@@ -2660,6 +2660,7 @@ caption for |figure|s or |table|s which needs the whole page
for its contents. This will be done by placing the caption on the bottom
of the previous or next page.}
+\iffalse
\NEWfeature{v3.1}
Two options control the links to the environments |FPfigure| and |FPtable|:
\begin{description}
@@ -2672,6 +2673,7 @@ If set to |caption|, a \cs{ref}, \cs{pageref}, \cs{autoref}, or \cs{nameref}
will link to the caption; if set to |figure|, it will link to the figure contents.
(The default setting is |FP|\-|ref=|\x|figure|.)
\end{description}
+\fi
If you want to setup special options for the |FPfigure| and |FPtable|
environments you can use
@@ -3183,8 +3185,9 @@ Prof.~Dr.~Dirk Hoffmann,
Frank Martini,
Danie Els,
Philipp Woock,
-Fadi Semmo, and
-Matthias Stevens
+Fadi Semmo,
+Matthias Stevens, and
+Leo Liu
who all helped to make this package a better one.
% --------------------------------------------------------------------------- %
@@ -3241,8 +3244,10 @@ Option & Short description & Section \\
|figureposition|\preambleoption & gives a hint about the figure caption position & \ref{skips} \\
|font|(|+|) & sets the font & \ref{fonts} \\
|format| & sets the format & \ref{formats} \\
+\iffalse
|FPlist| & To where the list entry of a FPfigure should link? & \ref{fltpage} \\
|FPref| & To where a |\ref| to a FPfigure should link? & \ref{fltpage} \\
+\fi
|hangindent| & sets the hang indention & \ref{margins} \\
|hypcap| & selects `hypcap' feature & \ref{hyperref} \\
|hypcapspace| & sets the distance between hyperlink and contents & \ref{hyperref} \\
@@ -3851,7 +3856,6 @@ they have been replaced within this version of \thispackage:
|isu| & |format=hang|\\
|center| & |justification=centering|\\
|centerlast| & |justification=centerlast|\\
-%|anne| & |justification=centerlast|\\
|nooneline| & |singlelinecheck=off|\\
|scriptsize| & |font=scriptsize|\\
|footnotesize| & |font=footnotesize|\\
diff --git a/Master/texmf-dist/source/latex/caption/caption-rus.tex b/Master/texmf-dist/source/latex/caption/caption-rus.tex
index a7fc44a3479..8bf60c425c4 100644
--- a/Master/texmf-dist/source/latex/caption/caption-rus.tex
+++ b/Master/texmf-dist/source/latex/caption/caption-rus.tex
@@ -635,13 +635,11 @@
% An example: Using the options
Ïðèìåð: ñ~îïöèÿìè êëþ÷åé
\begin{quote}
- |format=plain,labelformat=parens,labelsep=quad,|\\
- | figurename=\CYRR\cyri\cyrs\cyru\cyrn\cyro\cyrk|
+ |format=plain,labelformat=parens,labelsep=quad|
\end{quote}
% gives captions like this one:
ñîçäà¸òñÿ òàêàÿ ïîäïèñü:
- \example{format=plain,labelformat=parens,labelsep=quad,
- figurename=\CYRR\cyri\cyrs\cyru\cyrn\cyro\cyrk}{\exampletext}
+ \example{format=plain,labelformat=parens,labelsep=quad}{\exampletext}
\end{Example}
[Íàçâàíèå â~íóìåðàöèîííîì çàãîëîâêå äëÿ äàííîãî ïðèìåðà èçìåíåíî ñ~ïîìîùüþ
îïöèè |figurename|. \See{\Ref{names}}]
@@ -3902,6 +3900,7 @@ extension} äëÿ Ñïèñêà, «|tbp|» êàê îïöèÿ ðàçìåùåíèÿ \meta{placement}
|figure| èëè |table|, ñîäåðæèìîå êîòîðûõ çàíèìàåò öåëóþ ñòðàíèöó.
Ïîäïèñü ïðè ýòîì ðàçìåùàåòñÿ íà ïðåäûäóùåé èëè ñëåäóþùåé ñòðàíèöå [íà ðàçâîðîòå].}
+\iffalse
\NEWfeature{v3.1}
% Two options control the links to the environments |FPfigure| and |FPtable|:
Ñëåäóþùèå êëþ÷è êîíòðîëèðóþò ññûëêè íà îêðóæåíèÿ |FPfigure| è~|FPtable|:
@@ -3923,6 +3922,7 @@ extension} äëÿ Ñïèñêà, «|tbp|» êàê îïöèÿ ðàçìåùåíèÿ \meta{placement}
áóäóò ïðèâÿçàíû ê~ïîäïèñè; à~åñëè |figure| \cdash--- òî ê~ñîäåðæèìîìó ôëîòà.
(Çíà÷åíèå ïî óìîë÷àíèþ |FPref=figure|.)
\end{description}
+\fi
% If you want to setup special options for the |FPfigure| and |FPtable|
% environments you can use
@@ -4787,10 +4787,12 @@ who all helped to make this package a better one.}
|font|(|+|) & çàäà¸ò øðèôò & \ref{fonts} \\
% |format| & sets the format & \ref{formats} \\
|format| & çàäà¸ò ôîðìàò & \ref{formats} \\
+\iffalse
% |FPlist| & to where the list entry of a FPfigure should link? & \ref{fltpage} \\
|FPlist| & ê~÷åìó ïðèâÿçûâàòü FPfigure â~Ñïèñêå ôëîòîâ? & \ref{fltpage} \\
% |FPref| & to where a |\ref| to a FPfigure should link? & \ref{fltpage} \\
|FPref| & ê~÷åìó ïðèâÿçûâàòü |\ref| äëÿ FPfigure? & \ref{fltpage} \\
+\fi
% |hangindent| & sets the hang indention & \ref{margins} \\
|hangindent| & \cell{çàäà¸ò âòÿæêó [íà âåñó;\\ ñîîòâåòñòâóåò êîìàíäå \cs{hangindent}]} & \ref{margins} \\
% |hypcap| & select `hypcap' feature & \ref{hyperref} \\
@@ -5762,7 +5764,6 @@ who all helped to make this package a better one.}
|isu| & |format=hang|\\
|center| & |justification=centering|\\
|centerlast| & |justification=centerlast|\\
-%|anne| & |justification=centerlast|\\
|nooneline| & |singlelinecheck=off|\\
|scriptsize| & |font=scriptsize|\\
|footnotesize| & |font=footnotesize|\\
diff --git a/Master/texmf-dist/source/latex/caption/caption.dtx b/Master/texmf-dist/source/latex/caption/caption.dtx
index e60749285e8..84af747aa8d 100644
--- a/Master/texmf-dist/source/latex/caption/caption.dtx
+++ b/Master/texmf-dist/source/latex/caption/caption.dtx
@@ -2,7 +2,7 @@
%
% This is file `caption.dtx'.
%
-% Copyright (C) 1994-2012 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
+% Copyright (C) 1994-2013 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
%
% --------------------------------------------------------------------------
%
@@ -21,16 +21,16 @@
% This work consists of the files caption.ins, caption.dtx, caption2.dtx,
% caption3.dtx, bicaption.dtx, ltcaption.dtx, subcaption.dtx, and newfloat.dtx,
% the derived files caption.sty, caption2.sty, caption3.sty,
-% bicaption.sty, ltcaption.sty, subcaption.sty, and newfloat.sty,
+ % bicaption.sty, ltcaption.sty, subcaption.sty, and newfloat.sty,
% and the user manuals caption-deu.tex, caption-eng.tex, and caption-rus.tex.
%
% \fi
-% \CheckSum{3545}
+% \CheckSum{3475}
%
% \iffalse
%<*driver>
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesFile{caption.drv}[2011/08/06 v3.2 Implementation of the caption package]
+\ProvidesFile{caption.drv}[2012/12/26 v3.3 Implementation of the caption package]
\hbadness=9999 \newcount\hbadness \hfuzz=100pt % Make TeX shut up.
%\errorcontextlines=3
%
@@ -54,7 +54,7 @@
\ifpdf\usepackage{hypdestopt}\fi
\hypersetup{pdfkeywords={LaTeX, package, caption},pdfstartpage={},pdfstartview={}}
%
-\usepackage[debug]{caption}[2010/09/01]
+\usepackage[debug]{caption}[2013/01/01]
%
\DeclareRobustCommand*\eTeX{\texorpdfstring
{\leavevmode\hbox{$\varepsilon$}-\TeX}%
@@ -86,8 +86,6 @@
% \newcommand*\csmarg[1]{\texttt{\char`\{#1\char`\}}}
% \newcommand*\csoarg[1]{\texttt{\char`\[#1\char`\]}}
% \newcommand*\version[2][]{\textit{v#2}}
-% \newcommand*\x{\discretionary{-}{}{}}
-% \newcommand*\xx{\discretionary{}{}{}}
%
% \GetFileInfo{caption.drv}
% \let\docdate\filedate
@@ -220,14 +218,14 @@
%
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption}[2012/02/19 v3.2f Customizing captions (AR)]
+\ProvidesPackage{caption}[2013/01/06 v3.3 Customizing captions (AR)]
%\@ifundefined{PackageRedefines}{}{\PackageRedefines{caption}{caption}}
% \end{macrocode}
%
% \subsection{Loading the kernel}
%
% \begin{macrocode}
-\RequirePackage{caption3}[2011/08/30] % needs v1.4 or newer
+\RequirePackage{caption3}[2012/12/26] % needs v1.5 or newer
% \end{macrocode}
%
% \subsection{Check against incompatible document classes}
@@ -303,15 +301,12 @@
%
% \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}
-% \changes{v3.1f}{2007/11/18}{Options \opt{figurename} and \opt{tablename} are now
-% available after the document preamble, too.}
% \changes{v3.1f}{2007/11/18}{Option \opt{name} added}
% \begin{macrocode}
\DeclareCaptionOption{figurename}{\caption@SetName{figure}{#1}}
\@onlypreamble@key{caption}{figurename}
\DeclareCaptionOption{tablename}{\caption@SetName{table}{#1}}
\@onlypreamble@key{caption}{tablename}
-\DeclareCaptionOption{name}{\caption@setname\@captype{#1}}
% \end{macrocode}
%
% \changes{v3.1g}{2008/02/28}{Options \opt{listfigurename} and \opt{listtablename} added}
@@ -335,6 +330,13 @@
\caption@NewFloat{\newfloat@setname{#1}{#2}}}
\@onlypreamble\caption@SetName
% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+\DeclareCaptionOption{name}{\caption@setname\@captype{#1}}
+% \end{macrocode}
+% \begin{macro}{\caption@setname}
+% |\caption@setname|\marg{float}\marg{name}
% \begin{macrocode}
\newcommand*\caption@setname[2]{%
\@namedef{#1name}{#2}}
@@ -407,6 +409,27 @@
{\caption@Warning{Configuration file #1.cfg not found}}}
% \end{macrocode}
%
+% \begin{macro}{\caption@selectlistentry}
+% \changes{v3.2}{2010/11/07}{This macro added}
+% |\caption@selectlistentry|\marg{\purett{heading} or \purett{entry}}
+% \begin{macrocode}
+\newcommand*\caption@selectlistentry[1]{%
+ \caption@ifinlist{#1}{heading}{%
+ \let\caption@iflistheading\@firstoftwo
+ }{\caption@ifinlist{#1}{default,list-entry,entry}{%
+ \let\caption@iflistheading\@secondoftwo
+ }{%
+ \caption@Error{Undefined list-entry selection `#1'}%
+ }}}
+% \end{macrocode}
+% \end{macro}
+%
+% \changes{v3.3}{2012-03-25}{Option \opt{list-entry} added}
+% \begin{macrocode}
+\DeclareCaptionOption{list-entry}{\caption@selectlistentry{#1}}
+\captionsetup{list-entry=default}
+% \end{macrocode}
+%
% \begin{macro}{\caption@setparboxrestore}
% \changes{v3.2}{2010/11/07}{This macro added}
% |\caption@setparboxrestore|\marg{\purett{partial} or \purett{full}}
@@ -470,9 +493,6 @@
\DeclareCaptionOptionNoValue*{center}{%
\caption@setformat{plain}%
\caption@setjustification{centering}}
-\DeclareCaptionOptionNoValue*{anne}{%
- \caption@setformat{plain}%
- \caption@setjustification{centerlast}}
\DeclareCaptionOptionNoValue*{centerlast}{%
\caption@setformat{plain}%
\caption@setjustification{centerlast}}
@@ -778,12 +798,37 @@
%
% \subsection{\cs{caption}, \cs{@caption}, and \cs{@makecaption}}
%
+% \begin{macro}{\ifcaption@caption}
+% \changes{v3.3}{2011/12/28}{This switch added}
+% \begin{macro}{\ifcaption@subcaption}
+% \changes{v3.3}{2011/12/28}{This switch added}
+% \begin{macro}{\ifcaption@ContinuedFloat}
+% \changes{v3.3}{2011/12/28}{This switch added}
+% Since we support continued floats and sub-figures it's not an easy task
+% to manage the figure (and table) counter. (Especially since previous versions
+% of the caption package has proven that correcting a counter locally is not a good idea.)
+%
+% These three switches hold the
+% current status: |\if|\-|caption@caption| is set if the caption was already
+% typeset (so the counter doesn't need to be incremented for sub-figures),
+% |\if|\-|caption@sub|\-|caption| is set if there is already content which have
+% incremented the counter (so the counter doesn't need to be incremented
+% for the main caption, further sub-figures, and other stuff), and
+% |\if|\-|caption@Continued|\-|Float| is set if |\Continued|\-|Float| was given.
+% \begin{macrocode}
+\newif\ifcaption@caption
+\newif\ifcaption@subcaption
+\newif\ifcaption@ContinuedFloat
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
% \begin{macro}{\caption@caption}
% \changes{v3.0f}{2005/05/22}{Bugfix: \cs{ContinuedFloat} added}
% \changes{v3.0f}{2005/06/13}{Support of \cs{caption*[]} removed}
% \changes{v3.0l}{2007/01/19}{Minimal support of \textsf{combine} package added}
% \changes{v3.1}{2007/02/04}{Re-written, does not save\&use original definition anymore}
-% \changes{v3.2c}{2011/09/04}{Support of \cs{donemaincaptiontrue} from \textsf{memoir} document class added}
% Here comes our definition of |\caption| and |\caption*|.
% Beside the support of the starred variant this code was adapted to the
% various packages we support.
@@ -795,8 +840,7 @@
\caption@iftype
{\caption@checkgrouplevel\@empty\caption
\caption@star
- {\@nameuse{donemaincaptiontrue}%
- \caption@refstepcounter\@captype}%
+ {\caption@refstepcounter\@captype}%
{\caption@dblarg{\@caption\@captype}}}%
{\caption@Error{\noexpand\caption outside float}%
\caption@gobble}}
@@ -820,6 +864,7 @@
% \changes{v3.1g}{2008/03/16}{Internal: Uses \cs{caption@prepareanchor} now}
% \changes{v3.2d}{2011/10/21}{Adapted to the \textsf{memoir} document class}
% \changes{v3.2f}{2012/01/14}{Usage of \cs{M@gettitle} moved to \cs{caption@prepareanchor}}
+% \changes{v3.3}{2013/01/06}{Adapted to the \textsf{nag} package}
% 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|.
@@ -836,6 +881,7 @@
\ifcaption@star \else
\caption@prepareanchor{#1}{#2}%
\memcaptioninfo{#1}{\csname the#1\endcsname}{#2}{#3}%
+ \@nameuse{nag@hascaptiontrue}%
\fi
% \end{macrocode}
% \begin{macrocode}
@@ -868,7 +914,7 @@
% \begin{macrocode}
\newcommand*\caption@prepareanchor[2]{%
\caption@makecurrent{#1}{#2}%
- \caption@ifhypcap\caption@@start{}%
+ \caption@ifhypcap\caption@@start\relax
\M@gettitle{#2}}
% \end{macrocode}
% \end{macro}
@@ -898,8 +944,8 @@
% 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.
+% For example the usage of the (now obsolete) \package{captcont} package,
+% which brings its own definition of |\caption*|, was quite common these days.
% \begin{macrocode}
\newcommand*\caption@redefine{}
\g@addto@macro\caption@redefine{%
@@ -942,7 +988,7 @@
% \begin{macrocode}
\caption@CheckCommand\caption{%
% float.sty [2001/11/08 v1.3d Float enhancements (AL)]
- \renewcommand\caption{%
+ \long\def\caption{%
\ifx\@captype\@undefined
\@latex@error{\noexpand\caption outside float}\@ehd
\expandafter\@gobble
@@ -1003,7 +1049,7 @@
\caption@CheckCommand\caption{%
% memhfixc.sty [2010/08/17 v1.15 nameref/hyperref package fixes for memoir class]
% \let\m@moldhypcaption\caption
- \renewcommand{\caption}{\donemaincaptiontrue\m@moldhypcaption}}%
+ \long\def\caption{\donemaincaptiontrue\m@moldhypcaption}}%
% \end{macrocode}
% \begin{macrocode}
\caption@IfCheckCommand{}{%
@@ -1046,6 +1092,16 @@
%
% \begin{macrocode}
\caption@CheckCommand\@caption{%
+ % memhfixc.sty [2010/08/17 v1.15 nameref/hyperref package fixes for memoir class]
+ \long\def\@caption#1[#2]#3{%
+ \MNR@old@caption{#1}[{#2}]{#3}%
+ \def\@currentlabelname{#2}%
+ \M@gettitle{#2}%
+ }}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \caption@CheckCommand\@caption{%
% magyar.ldf [2005/03/30 v1.4j Magyar support from the babel system]
\long\def\@caption#1[#2]#3{%
\csname par\endcsname
@@ -1469,18 +1525,26 @@
% \changes{v3.1f}{2007/12/03}{Crappy \cs{caption@iftypewarning} replaced}
% \changes{v3.1g}{2008/01/12}{Usage of \cs{ifcaptionsetup@star} added}
% \changes{v3.2}{2010/10/26}{Error message moved from here to \cs{caption@refstepcounter}}
+% \changes{v3.3}{2011/12/28}{Resetting of \cs{ifcaption@caption} and \cs{ifcaption@subcaption} added}
% |\caption@settype*|\marg{type}\par
% sets |\@captype| and executes the options associated with it
-% (using |\caption@setoptions|).
-% Furthermore we check |\currentgrouplevel| (if avail),
+% (using |\caption@set|\-|options|).
+% Furthermore we check |\current|\-|group|\-|level| (if avail),
% redefine |\@currentlabel| so a |\label| before |\caption| will result
% in a hint instead of a wrong reference, and
-% use the macro |\caption@|(|sub|)|typehook| (which will be used by our
+% use the macro |\caption@|(|sub|)|type|\-|hook| (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).
+% (if |hypcap=|\-|true| and the \package{hypcap} package is not loaded).
% \begin{macrocode}
\newcommand*\caption@settype{%
+ \global\caption@captionfalse
+ \global\caption@subcaptionfalse
+ \global\caption@ContinuedFloatfalse
+ \caption@set@type}
+% \end{macrocode}
+% \begin{macrocode}
+\newcommand*\caption@set@type{%
\caption@@settype{}}
% \end{macrocode}
% \begin{macrocode}
@@ -1518,7 +1582,6 @@
\fi
% \end{macrocode}
% \begin{macrocode}
- \let\caption@ifrefstepcounter\@secondoftwo
#2{}{%
\let\@currentlabel\caption@undefinedlabel
% \let\@currentHlabel\@undefined
@@ -1677,43 +1740,43 @@
% \begin{macro}{\captionbox}
% \changes{v3.2}{2010/12/17}{This macro added}
% \changes{v3.2a}{2011/08/16}{\cs{captionsetup} replaces with \cs{captionbox@settype} and \cs{caption@setposition}}
+% \changes{v3.3}{2012/04/09}{Adapted to revised version of \cs{caption@withoptargs}}
% A |\parbox| with contents and caption, separated by an invisible |\hrule|.
% \begin{macrocode}
\newcommand*\captionbox{%
- \let\captionbox@settype\@gobble
- \caption@withoptargs\caption@box}
+ \caption@withoptargs{\caption@ibox\@gobble}}
% \end{macrocode}
% \begin{macrocode}
-\newcommand\caption@box[2]{%
- \@testopt{\caption@ibox{#1}{#2}}{\wd\@tempboxa}}
+\newcommand\caption@ibox[3]{%
+ \@testopt{\caption@iibox{#1}{#2}{#3}}{\wd\@tempboxa}}
% \end{macrocode}
% \begin{macrocode}
-\long\def\caption@ibox#1#2[#3]{%
- \@testopt{\caption@iibox{#1}{#2}{#3}}\captionbox@hj@default}
+\long\def\caption@iibox#1#2#3[#4]{%
+ \@testopt{\caption@iiibox{#1}{#2}{#3}{#4}}\captionbox@hj@default}
% \end{macrocode}
% \begin{macrocode}
-\long\def\caption@iibox#1#2#3[#4]#5{%
- \setbox\@tempboxa\hbox{#5}%
+\long\def\caption@iiibox#1#2#3#4[#5]#6{%
+ \setbox\@tempboxa\hbox{#6}%
\begingroup
- \captionbox@settype*% set \caption@position
+ #1*% set \caption@position
\caption@iftop{%
\endgroup
- \parbox[t]{#3}{%
- \captionbox@settype\relax
+ \parbox[t]{#4}{%
+ #1\relax
\caption@setposition t%
- \vbox{\caption#1{#2}}%
+ \vbox{\caption#2{#3}}%
\captionbox@hrule
- \csname caption@hj@#4\endcsname
+ \csname caption@hj@#5\endcsname
\unhbox\@tempboxa}%
}{%
\endgroup
- \parbox[b]{#3}{%
- \captionbox@settype\relax
+ \parbox[b]{#4}{%
+ #1\relax
\caption@setposition b%
- \csname caption@hj@#4\endcsname
+ \csname caption@hj@#5\endcsname
\unhbox\@tempboxa
\captionbox@hrule
- \vtop{\caption#1{#2}}}%
+ \vtop{\caption#2{#3}}}%
}}
% \end{macrocode}
% \begin{macrocode}
@@ -1739,26 +1802,21 @@
% Bugfix: \cs{newcounter} replaced by \cs{newcount}}
% \changes{v3.1}{2007/07/02}{Format of \package{hyperref} extension changed}
% \changes{v3.1}{2007/07/07}{\cs{caption@setoptions} added}
-% \changes{v3.1g}{2008/01/29}{Starred variant and hook \cs{sf@ContinuedFloat} added}
+% \changes{v3.1g}{2008/01/29}{Starred variant added}
% \changes{v3.2f}{2011/12/17}{Undocumented optional argument removed}
+% \changes{v3.3}{2011/12/28}{Uses \cs{ifcaption@ContinuedFloat} now}
% |\ContinuedFloat|\\
% |\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|.
-% Please forget about the optional argument, it was never working well, is
-% incompatible to the \package{subfig} package, but is still there for
-% compatibility reasons.
-% \Note{The definition of \cs{ContinuedFloat} itself is compatible
-% to the one inside the \package{subfig} package, except for the
-% starred variant and the optional argument.}
+% This mainly sets the appropriate flag, increments the
+% continuation counter, and executes the given options.
+% Furthermore we set |\caption@reset|\-|Continued|\-|Float| to |\@gobble| so the
+% continuation counter will not be reset to zero inside |\caption@ref|\-|step|\-|counter|.\par
% 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
+% that the usage of |\Continued|\-|Float| will create duplicate
+% hyper links -- |\@current|\-|Href| 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
+% will be created each time. We do this by extending |\the|\-|H|\-|figure| and
+% |\the|\-|H|\-|table|, 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}
@@ -1768,44 +1826,40 @@
% \begin{macrocode}
\def\ContinuedFloat{%
\caption@iftype
- {\addtocounter\@captype\m@ne
- \caption@ContinuedFloat\@captype}%
+ {\caption@ContinuedFloat\@captype}%
{\caption@Error{\noexpand\ContinuedFloat outside float}}}
% \end{macrocode}
% \begin{macrocode}
-\def\caption@ContinuedFloat#1{%
- \@ifstar{\caption@Continued@Float@{#1}}{\caption@Continued@Float{#1}}}
-% \end{macrocode}
-% \begin{macrocode}
-\def\caption@Continued@Float@{%
- \addtocounter\@captype\@ne
- \@stpelt{ContinuedFloat}\stepcounter{ContinuedFloat}%
- \def\caption@resetContinuedFloat##1{\xdef\caption@CFtype{##1}}%
- \caption@@ContinuedFloat}
+\newcommand*\caption@ContinuedFloat[1]{%
+ \@ifstar
+ {\caption@@refstepcounter\@captype
+ \caption@@ContinuedFloat{#1}}%
+ {\caption@Continued@Float{#1}}}
% \end{macrocode}
% \begin{macrocode}
-\def\caption@Continued@Float#1{%
+\newcommand*\caption@Continued@Float[1]{%
\edef\caption@tempa{#1}%
\ifx\caption@tempa\caption@CFtype
- \stepcounter{ContinuedFloat}%
- \let\caption@resetContinuedFloat\@gobble
\caption@@ContinuedFloat{#1}%
- \sf@ContinuedFloat{#1}%
\else
\caption@Error{Continued `#1' after `\caption@CFtype'}%
\fi}
% \end{macrocode}
% \begin{macrocode}
-\def\caption@@ContinuedFloat#1{%
+\newcommand*\caption@@ContinuedFloat[1]{%
+ \global\caption@ContinuedFloattrue
+ \stepcounter{ContinuedFloat}%
+ \caption@@@ContinuedFloat{#1}}
+% \end{macrocode}
+% \begin{macrocode}
+\newcommand*\caption@@@ContinuedFloat[1]{%
+ \caption@setoptions{ContinuedFloat}%
+ \caption@setoptions{continued#1}%
\expandafter\l@addto@macro\csname the#1\endcsname\theContinuedFloat
\@ifundefined{theH#1}{}{%
\expandafter\l@addto@macro\csname theH#1\endcsname{%
\@alph\c@ContinuedFloat}}%
- \caption@setoptions{ContinuedFloat}%
- \caption@setoptions{continued#1}}
-% \end{macrocode}
-% \begin{macrocode}
-\providecommand*\sf@ContinuedFloat[1]{}
+ \let\caption@@@ContinuedFloat\@gobble}
% \end{macrocode}
% \begin{macrocode}
\newcommand*\caption@CFtype{??}
@@ -1813,7 +1867,7 @@
% \end{macro}
%
% \begin{macro}{\theContinuedFloat}
-% Its preset to \cs{@empty}, so usually the continuation counter is not
+% This one is preset to \cs{@empty}, so usually the continuation counter is not
% included in the caption label or references.
% \begin{macrocode}
\newcounter{ContinuedFloat}
@@ -1828,10 +1882,8 @@
% (This one will be called inside |\@caption|.)
% \begin{macrocode}
\newcommand*\caption@resetContinuedFloat[1]{%
- \@stpelt{ContinuedFloat}%
\xdef\caption@CFtype{#1}%
- \def\ContinuedFloat{\caption@Error{%
- \noexpand\ContinuedFloat must be placed at the top of the environment}}}
+ \@stpelt{ContinuedFloat}}
% \end{macrocode}
% \end{macro}
%
@@ -1852,19 +1904,80 @@
% \begin{macro}{\caption@refstepcounter}
% \changes{v3.1}{2007/07/28}{This macro added}
% \changes{v3.2}{2010/10/26}{Error message moved from \cs{caption@@@settype} to here}
-% Resets the continuation counter, increments the float (i.e. |figure| or
-% |table|) counter, and sets the |refstepcounter| flag.
+% \changes{v3.2c}{2011/09/04}{Support of \cs{donemaincaptiontrue} from \textsf{memoir} document class added}
+% \changes{v3.3}{2011/12/28}{Usage of \cs{ifcaption@caption}, \cs{ifcaption@subcaption}, and \cs{ifcaption@ContinuedFloat} added}
+% Increments the float (i.e. |figure| or |table|) counter,
+% resets the continuation counter, and redefines itself to |\@gobble|.
% \begin{macrocode}
\newcommand*\caption@refstepcounter[1]{%
\@ifundefined{c@#1}%
{\caption@Error{No float type '#1' defined}}%
- {\caption@resetContinuedFloat{#1}%
- \caption@@refstepcounter{#1}%
- \let\caption@ifrefstepcounter\@firstoftwo}}
+ {\caption@ref@stepcounter{#1}%
% \end{macrocode}
+% Set flag if this part of the figure (or table) contains a caption now.
+% (If |\caption@if|\-|top| is not set, |\caption| is at the bottom of this part,
+% therefore ending this part, so we set the flag to |false| in this case.)
% \begin{macrocode}
-\newcommand*\caption@@refstepcounter{\refstepcounter}
-\let\caption@ifrefstepcounter\@secondoftwo
+ \caption@fixposition
+ \caption@iftop{\global\caption@captiontrue}{\global\caption@captionfalse}%
+% \end{macrocode}
+% This part does not contain content (like sub-figures) yet,
+% so we set |\if|\-|caption@sub|\-|caption| to |false|.
+% \begin{macrocode}
+ \global\caption@subcaptionfalse
+% \end{macrocode}
+% Support of the \textsf{memoir} document class.
+% \begin{macrocode}
+ \@nameuse{donemaincaptiontrue}}}
+% \end{macrocode}
+% \begin{macrocode}
+\newcommand*\caption@ref@stepcounter{%
+ \ifcaption@ContinuedFloat
+ \let\caption@tempa\caption@@refcounter
+ \global\caption@ContinuedFloatfalse
+ \else
+ \let\caption@tempa\caption@@refstepcounter
+ \ifcaption@caption \else
+ \ifcaption@subcaption
+% Counter was already incremented by content, so we suppress \stepcounter{#1} here
+ \let\caption@tempa\caption@@refcounter
+ \fi
+ \fi
+ \fi
+ \caption@tempa}
+% \end{macrocode}
+% \begin{macrocode}
+\newcommand*\caption@@refcounter[1]{%
+ \let\caption@stepcounter@ORI\stepcounter
+ \def\stepcounter##1{%
+ \def\caption@tempa{#1}%
+ \def\caption@tempb{##1}%
+ \ifx\caption@tempa\caption@tempb \else
+ \caption@stepcounter@ORI{##1}%
+ \fi}%
+ \caption@@@refstepcounter{#1}%
+ \let\stepcounter\caption@stepcounter@ORI}
+% \end{macrocode}
+% \begin{macrocode}
+\newcommand*\caption@@refstepcounter[1]{%
+ \caption@prepare@stepcounter{#1}{ref}%
+ \caption@@@refstepcounter{#1}}
+% \end{macrocode}
+% \begin{macrocode}
+\newcommand*\caption@@stepcounter[1]{%
+ \caption@prepare@stepcounter{#1}{}%
+ \caption@@@stepcounter{#1}}
+% \end{macrocode}
+% \begin{macrocode}
+\newcommand*\caption@prepare@stepcounter[2]{%
+ \flushsubcaptionlistentries[#2stepcounter]%
+ \caption@resetContinuedFloat{#1}}
+% \end{macrocode}
+% \begin{macrocode}
+\newcommand*\caption@@@refstepcounter{\refstepcounter}
+% \end{macrocode}
+% \begin{macrocode}
+\newcommand*\caption@@@stepcounter{\stepcounter}
% \end{macrocode}
% \end{macro}
%
@@ -1872,13 +1985,24 @@
% \changes{v3.1}{2007/02/05}{This macro added}
% \changes{v3.1f}{2007/12/06}{Bugfix 07-12-06: Changed so it works without \cs{kernel@ifnextchar}
% (which was introduced in \LaTeXe\ 2004/01/23), too}
+% \changes{v3.3}{2012/03/25}{Support of option \opt{list-entry} added}
% A |\relax| was added compared to |\@dblarg| so |\caption{}| will be
% expanded to |\caption[\relax]{}| (and not to |\caption[]{}|).
+% Furthermore support for option \opt{list-entry} was added.
% \begin{macrocode}
-\caption@ifundefined\kernel@ifnextchar
- {\newcommand\caption@dblarg[1]{\@ifnextchar[{#1}{\caption@xdblarg{#1}}}}%
- {\newcommand\caption@dblarg[1]{\kernel@ifnextchar[{#1}{\caption@xdblarg{#1}}}}%
-\newcommand\caption@xdblarg[2]{#1[{#2\relax}]{#2}}%
+\@ifundefined{kernel@ifnextchar}{\let\kernel@ifnextchar\@ifnextchar}{}
+% \end{macrocode}
+% \begin{macrocode}
+\newcommand\caption@dblarg[1]{%
+ \kernel@ifnextchar[{\caption@ydblarg{#1}}{\caption@xdblarg{#1}}}
+% \end{macrocode}
+% \begin{macrocode}
+\newcommand\caption@xdblarg[2]{%
+ #1[{#2\relax}]{#2}}
+% \end{macrocode}
+% \begin{macrocode}
+\long\def\caption@ydblarg#1[#2]#3{%
+ \caption@iflistheading{#1[{#3}]{#3}}{#1[{#2}]{#3}}}
% \end{macrocode}
% \end{macro}
%
@@ -1888,22 +2012,22 @@
% \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}
+% \changes{v3.3}{2011/12/29}{Usage of \cs{caption@fixedposition} 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.
+% \item[1.] Override the |position=| setting, if necessary.
% (for example if set to |auto| or used inside a |supertabular|)
+% \item[2.] Start a new group.
+% \item[3.] Define |\fnum@|\meta{type} if the caption label format is set
+% to non-default.
% \end{enumerate}
% \begin{macrocode}
\newcommand*\caption@begin[1]{%
+ \caption@fixposition
\begingroup
- \caption@setfnum{#1}%
- \caption@fixposition
- \global\let\caption@fixedposition\caption@position}
+ \caption@setfnum{#1}}
% \end{macrocode}
% \end{macro}
%
@@ -1929,11 +2053,11 @@
% \end{macro}
%
% \begin{macro}{\caption@end}
+% \changes{v3.3}{2011/12/29}{Usage of \cs{caption@fixedposition} removed}
% |\caption@end| closes the group.
% \begin{macrocode}
\newcommand*\caption@end{%
- \endgroup
- \let\caption@position\caption@fixedposition}
+ \endgroup}
% \end{macrocode}
% \end{macro}
%
@@ -2038,7 +2162,7 @@
%
% \begin{macro}{\caption@makecurrent}
% This one is needed for support of the \package{nameref} and \package{hyperref} package.
-% \changes{v3.3}{2012/01/14}{Bugfix: Usage of \cs{caption@gettitle} added}
+% \changes{v3.2f}{2012/01/14}{Bugfix: Usage of \cs{caption@gettitle} added}
% \begin{macrocode}
\newcommand*\caption@makecurrent[1]{\caption@gettitle}
% \end{macrocode}
@@ -2083,7 +2207,6 @@
% \begin{macrocode}
\def\caption@DeclareSubType sub#1\@nil{%
\caption@Debug{Initializing subtype for `#1'\@gobble}%
- \@namedef{caption@c@#1}{0}%
\@namedef{caption@beginsub#1}{\caption@beginsubfloat{#1}}}
\@onlypreamble\caption@DeclareSubType
% \end{macrocode}
@@ -2109,6 +2232,8 @@
% \changes{v3.2a}{2011/08/17}{Redefinition of \cs{phantomcaption} added}
% \changes{v3.2a}{2011/08/17}{Usage of \cs{caption@warmup} added}
% \changes{v3.2c}{2011/09/30}{Bugfix 11-09-26: Usage of \cs{if@subfloatrow} added}
+% \changes{v3.3}{2011/12/28}{Bugfix 11-12-16: \cs{caption@l@stepcounter} replaced by \cs{stepcounter}}
+% \changes{v3.3}{2012/03/15}{Usage of \cs{caption@setbox} added}
% Hook, will be used inside \cs{caption@setsubtype}.\par
% (Note: If we are inside an |sub|\-|float|\-|row| environment we have to keep
% the |\@make|\-|caption| code of the \package{floatrow} package intact.)
@@ -2118,27 +2243,26 @@
\caption@warmup
% \end{macrocode}
% \begin{macrocode}
- \caption@ifrefstepcounter{}{%
- % no \caption or \subcaption in this (floating) environment yet
- \caption@Debug{Increment \@captype\ counter =\the\value\@captype}%
- \caption@l@stepcounter\@captype
- \let\caption@@@addcontentsline\caption@addsubcontentsline}%
-% \end{macrocode}
-% \begin{macrocode}
- \ifnum\csname caption@c@\@captype\endcsname=\value\@captype \else
- \caption@Debug{Reset sub\@captype\ counter}%
- \expandafter\xdef\csname caption@c@\@captype\endcsname{%
- \the\value\@captype}%
- \@stpelt\@subcaptype
+ \ifcaption@caption \else
+% no \caption in this part of the (floating) environment yet
+ \let\caption@add@contentsline\caption@addsubcontentsline
+ \ifcaption@subcaption \else
+% no \subcaption in this part of the (floating) environment yet
+ \ifcaption@ContinuedFloat
+ \global\caption@ContinuedFloatfalse
+ \else
+ \caption@@stepcounter\@captype
+ \fi
+ \global\caption@subcaptiontrue
+ \fi
\fi
% \end{macrocode}
% \begin{macrocode}
\c@ContinuedFloat=0\relax
- \let\caption@resetContinuedFloat\@gobble
- \let\caption@addcontentsline\caption@kernel@addcontentsline
\let\caption@setfloatcapt\@firstofone
% \end{macrocode}
% \begin{macrocode}
+ \caption@setbox{parbox}%
\caption@clearmargin
\caption@iflist{}{\let\caption@setlist\@gobble}%
\caption@setoptions{sub}%
@@ -2178,7 +2302,7 @@
\newcommand*\caption@subcaption{%
\caption@checkgrouplevel{sub}\subcaption
\caption@star
- {\caption@refstepcounter\@subcaptype}%
+ {\caption@@@refstepcounter\@subcaptype}%
{\caption@dblarg{\@caption\@subcaptype}}}
% \end{macrocode}
% \end{macro}
@@ -2189,30 +2313,18 @@
% \begin{macrocode}
\newcommand*\caption@subphantom{%
\caption@checkgrouplevel{sub}\phantomsubcaption
- \caption@refstepcounter\@subcaptype}
+ \caption@@@refstepcounter\@subcaptype}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\caption@addcontentsline}
-% \changes{v3.1g}{2008/01/12}{Argument of \cs{caption@addsubcontentslines} removed}
-% \changes{v3.1i}{2008/08/02}{Argument of \cs{caption@addsubcontentslines} re-added}
-% We extend |\caption@addcontentsline| so it handles sub-captions, too.
-% \Note{\cs{sf@ifpositiontop} \& \cs{@listsubcaptions} are defined by the
-% \package{subfigure} \& \package{subfig} packages.}
+% \begin{macro}{caption@clearsubcontentslines}
+% Clear pending sub-caption list entries.
% \begin{macrocode}
-\let\caption@kernel@addcontentsline\caption@addcontentsline
-\renewcommand\caption@addcontentsline[2]{%
- \sf@ifpositiontop{\@listsubcaptions{#1}}{}%
- \caption@kernel@addcontentsline{#1}{#2}%
- \sf@ifpositiontop{}{\@listsubcaptions{#1}}%
- \caption@addsubcontentslines{#1}}
+\newcommand*\caption@clearsubcontentslines{%
+ \global\let\caption@subcontentslines\@empty}
% \end{macrocode}
% \begin{macrocode}
-\newcommand*\caption@addsubcontentslines[1]{%
- \begingroup
- \caption@subcontentslines
- \endgroup
- \caption@clearsubcontentslines}%
+\caption@clearsubcontentslines
% \end{macrocode}
% \end{macro}
%
@@ -2221,11 +2333,15 @@
% \cs{label}, \cs{index}, and \cs{glossary} are allowed inside the list entry now}
% \changes{v3.2}{2011/06/26}{Uses \cs{caption@@addcontentsline} instead of \cs{addcontentsline} now}
% \changes{v3.2c}{2011/08/19}{Uses \cs{caption@gobble} instead of \cs{@gobble} now}
+% \changes{v3.3}{2012/01/15}{Debug message added}
% Add a pending sub-caption list entry.
% \begin{macrocode}
\newcommand*\caption@addsubcontentsline[4]{%
+ \caption@Debug{\string\caption@addsubcontentsline{#1}{#2}}%
\begingroup
- \let\label\caption@gobble \let\index\caption@gobble \let\glossary\caption@gobble
+ \let\label\caption@gobble
+ \let\index\caption@gobble
+ \let\glossary\caption@gobble
\protected@edef\@tempa{\endgroup
\noexpand\g@addto@macro\noexpand\caption@subcontentslines{%
\noexpand\@namedef{the#2}{\csname the#2\endcsname}%
@@ -2237,36 +2353,41 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\caption@checksubcontentslines}
-% \changes{v3.1g}{2008/01/07}{Bugfix: Uses \cs{caption@Error} instead of \cs{subcaption@Error} now}
-% Checks if the list of pending sub-captions is empty, if not,
-% a warning will be issued.
+% \begin{macro}{\flushsubcaptionlistentries}
+% \changes{v3.3}{2012/01/15}{Renamed from \cs{caption@addsubcontentslines} to \cs{flushsubcaptionlistentries}}
+% Writes pending sub-caption list entries.
% \begin{macrocode}
-\newcommand*\caption@checksubcontentslines{%
- \ifx\caption@subcontentslines\@empty \else
- \caption@Error{%
- Something's wrong--perhaps a missing \protect\caption\MessageBreak
- in the last figure or table}%
- \caption@clearsubcontentslines
- \fi}
+\newcommand*\flushsubcaptionlistentries[1][user]{%
+ \caption@Debug{\string\flushsubcaptionlistentries (#1)}%
+ \begingroup
+ \caption@subcontentslines
+ \endgroup
+ \caption@clearsubcontentslines}
% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\caption@clearsubcontentslines}
-% Clear pending sub-caption list entries.
+% We need to patch \cs{chapter} otherwise a vertical gap will be inserted into
+% the list prior pending sub-caption list entries.
+% We do this |\At|\-|Begin|\-|Document| so packages like \package{newfloat}
+% will not complain about an unknown document class.
% \begin{macrocode}
-\newcommand*\caption@clearsubcontentslines{%
- \global\let\caption@subcontentslines\@empty}
+\AtBeginDocument{\caption@ifundefined\chapter{}{%
+ \let\caption@chapter@ORI\chapter
+ \def\chapter{%
+ \flushsubcaptionlistentries[chapter]\caption@chapter@ORI}}}
% \end{macrocode}
-% \end{macro}
-%
+% Same for \cs{appendix}.
% \begin{macrocode}
-\caption@AtBeginDocument*{%
- \caption@ifundefined\sf@ifpositiontop{\let\sf@ifpositiontop\@gobbletwo}{}%
- \caption@clearsubcontentslines
- \g@addto@macro\caption@typehook{\caption@checksubcontentslines}%
- \AtEndDocument{\caption@checksubcontentslines}}%
+\AtBeginDocument{\caption@ifundefined\appendix{}{%
+ \let\caption@appendix@ORI\appendix
+ \def\appendix{%
+ \flushsubcaptionlistentries[appendix]\caption@appendix@ORI}}}
+% \end{macrocode}
+% Flush the list of pending sub-caption list entries at the end of the document.
+% \begin{macrocode}
+\AtEndDocument{%
+ \flushsubcaptionlistentries[AtEndDocument]}
% \end{macrocode}
+% \end{macro}
+%
%
% \subsection{Document class \& Babel package support}
%
@@ -2503,24 +2624,19 @@
% \changes{v3.2b}{2011/08/18}{Redefines \cs{caption@setup} instead of \cs{captionsetup} now}
% \changes{v3.2b}{2011/08/18}{Redefinition of \cs{label} revised}
% \changes{v3.2c}{2011/08/21}{Revised}
+% \changes{v3.3}{2013/01/06}{Adapted to new switch \cs{caption@caption} etc.}
% |\caption@freeze|\par
% Used by the \package{fltpage} \& \package{sidecap} package support.
% \begin{macrocode}
- \newcommand*\caption@freeze{%
+ \newcommand*\caption@freeze[1]{%
+ \caption@settype*{#1}%
+ \captionsetup*[sub]{hypcap=true}% Note: This is just a (q&d) workaround!
% \end{macrocode}
% \begin{macrocode}
\let\caption@frozen@ContinuedFloat\ContinuedFloat
\def\ContinuedFloat{%
- \caption@withoptargs\caption@SC@ContinuedFloat}%
- \def\caption@SC@ContinuedFloat##1{%
- \caption@@freeze{\ContinuedFloat##1}%
- \let\caption@frozen@setcounter\setcounter
- \let\caption@frozen@addtocounter\addtocounter
- \def\setcounter####1####2{\csname c@####1\endcsname####2\relax}%
- \def\addtocounter####1####2{\advance\csname c@####1\endcsname ####2\relax}%
- \caption@frozen@ContinuedFloat##1%
- \let\setcounter\caption@frozen@setcounter
- \let\addtocounter\caption@frozen@addtocounter}%
+ \caption@@freeze{\caption@@@ContinuedFloat\@captype}%
+ \caption@frozen@ContinuedFloat}%
% \end{macrocode}
% \begin{macrocode}
\let\caption@frozen@setup\caption@setup
@@ -2537,11 +2653,7 @@
\caption@gobble}%
\@ifstar
{\caption@SC@caption*}%
- {\let\caption@frozen@refstepcounter\caption@@refstepcounter
- \let\caption@@refstepcounter\caption@l@stepcounter
- \caption@refstepcounter\@captype
- \let\caption@@refstepcounter\caption@frozen@refstepcounter
- \let\@currentlabel\caption@SClabel
+ {\let\@currentlabel\caption@SClabel
\caption@withoptargs\caption@SC@caption}}%
\long\def\caption@SC@caption##1##2{%
\caption@@freeze{\caption##1{##2}}%
@@ -2577,6 +2689,15 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\caption@prepare@defrost}
+% \changes{v3.3}{2013/01/06}{This macro added}
+% Prevent resetting the caption flags
+% \begin{macrocode}
+ \newcommand*\caption@prepare@defrost{%
+ \let\caption@settype\caption@set@type}
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\caption@defrost}
% \changes{v3.1}{2007/07/22}{This macro added}
% \changes{v3.1g}{2008/01/30}{\cs{caption@defrost@setup} added}
@@ -2932,13 +3053,7 @@
\def\FP@captype{#1}%
\begin{lrbox}{\FP@floatCorpusBOX}%
\minipage\hsize % changes from LR mode to vertical mode
- \caption@settype*{#1}%
- \caption@freeze
- \global\let\FP@Label\@empty
- \caption@ifFPrefcap
- {}%
- {\def\caption@freeze@label##1##2{%
- \g@addto@macro\FP@Label{\FP@label##1{##2}}}}%
+ \caption@freeze{#1}%
\ignorespaces}%
% \end{macrocode}
% \end{macro}
@@ -2990,35 +3105,16 @@
\FP@helpNote\FP@captype\FP@positionLabel
% \end{macrocode}
% \begin{macrocode}
- \edef\FP@RestoreCounter{%
- \noexpand\setcounter{\FP@captype}{\the\value\FP@captype}%
- \noexpand\setcounter{ContinuedFloat}{\the\value{ContinuedFloat}}}%
-% \end{macrocode}
-% \begin{macrocode}
\FP@float
{\FP@positionLabel}% location label test
- {\begin\FP@captype[p!]%
+ {\caption@prepare@defrost
+ \begin\FP@captype[p!]%
\usebox\FP@floatCorpusBOX
- \let\caption@SClentry\@empty
- \def\caption{\caption@dblarg{\@caption\@captype}}%
- \long\def\@caption##1[##2]##3{\def\caption@SClentry{##2}}%
- \let\FP@label\label
- \let\label\caption@gobble
- \caption@defrost
- \caption@ifFPlistcap
- {\caption@refstepcounter\@captype
- \expandafter\caption@makecurrent\expandafter\@captype
- \expandafter{\caption@SClentry}}%
- {\ifx\caption@SClentry\@empty \else
- \expandafter\captionlistentry\expandafter{\caption@SClentry}%
- \fi}%
- \caption@makeanchor\relax
- \FP@Label
\end\FP@captype}%
- {\FP@RestoreCounter
- \@ifundefined{theH\FP@captype}{}{%
+ {\@ifundefined{theH\FP@captype}{}{%
\expandafter\l@addto@macro\csname theH\FP@captype\endcsname{.FP}}}%
- {\begin\FP@captype[b!]%
+ {\caption@prepare@defrost
+ \begin\FP@captype[b!]%
\let\FP@savedSetfnumCommand\caption@setfnum
\def\caption@setfnum##1{%
\FP@savedSetfnumCommand{##1}%
@@ -3029,7 +3125,6 @@
\setlength\belowcaptionskip{2pt plus 2pt minus 1pt}% length below caption
\caption@setoptions{FP\@captype}%
\FP@separatorCaption
- \caption@ifFPlistcap{}{\let\caption@addcontentsline\@gobbletwo}%
\caption@defrost
\end\FP@captype}%
}%
@@ -3072,11 +3167,11 @@
\g@addto@macro\caption@prepareslc{\measuring@true}%
% \end{macrocode}
%
-% \begin{macro}{\caption@@refstepcounter}
+% \begin{macro}{\caption@@@refstepcounter}
% We redefine |\caption@@refstepcounter| so |\H@refstepcounter| will be used
% instead of |\refstepcounter| inside |\caption| \& |\captionlistentry|.
% \begin{macrocode}
- \renewcommand*\caption@@refstepcounter{\H@refstepcounter}%
+ \renewcommand*\caption@@@refstepcounter{\H@refstepcounter}%
% \end{macrocode}
% \end{macro}
%
@@ -3314,8 +3409,19 @@
% \end{macro}
%
% \begin{macro}{\float@makebox}
+% \changes{v3.3}{2013/01/06}{Corrects wrong load order hyperref-float now}
% Do our own redefinition of |\float@makebox|, if it was redefined by
% the \package{hyperref} package.
+% (But first of all we correct a wrong load order \package{hyperref}-\package{float},
+% if possible.)
+% \begin{macrocode}
+ \caption@ifundefined\HyNew@float@makebox{}{%
+ \caption@ifundefined\HyOrg@float@makebox{%
+ \caption@Debug{%
+ Correcting wrong load order hyperref-float\@gobble}%
+ \let\HyOrg@float@makebox\float@makebox
+ \let\float@makebox\HyNew@float@makebox}{}}%
+% \end{macrocode}
% \begin{macrocode}
\caption@ifundefined\HyOrg@float@makebox{}{%
\caption@Debug{%
@@ -3643,9 +3749,12 @@
\caption@startrue#1\caption@starfalse
% \end{macrocode}
%
+% \begin{macrocode}
+ \caption@prepare@stepcounter\LTcaptype{LT}%
+% \end{macrocode}
+%
% \changes{v3.1}{2007/05/05}{\cs{caption@normalsize} added}
% \begin{macrocode}
- \caption@resetContinuedFloat\LTcaptype
\caption@begin\LTcaptype
\caption@normalsize
% \end{macrocode}
@@ -3862,7 +3971,7 @@
% |\edef\x{%|\\
% | \noexpand\caption@ORI[{\unexpanded\expandafter{##1}}]%|\\
% | {\unexpanded\expandafter{##2}}}|\\
-% |\x|
+% |\-|
% \end{quote}}
% \begin{macrocode}
\caption@ORI@make@piccaption
@@ -3921,6 +4030,7 @@
% \begin{macro}{\@makerotcaption}
% \changes{v3.0i}{2005/12/06}{Rewritten, should finally work proper now}
% \changes{v3.0m}{2007/03/04}{Uses \cs{caption@parbox} instead of \cs{caption@start/endbox} now}
+% \changes{v3.3}{2012/12/26}{Rewritten (again)}
% Original (bugfixed) code:
% \begin{verbatim}
% \long\def\@makerotcaption#1#2{%
@@ -3936,34 +4046,19 @@
% }
% \end{verbatim}%^^A
% Our version emulates this behavior, but if |width=| is set,
-% the rotated caption is always typeset as |minipage|.
+% the rotated caption is always typeset as |\parbox|.
% (Note that |margin=| is not supported here.)
% \begin{macrocode}
\long\def\@makerotcaption#1#2{%
-% \end{macrocode}
-%
-% \begin{macrocode}
- \ifdim\captionwidth=\z@
- \setcaptionwidth{.8\textheight}%
- \caption@slc{#1}{#2}{.8\vsize}{%
- \let\caption@makerot\caption@@make
- \caption@clearmargin
-% \long\def\caption@parbox##1##2{\hbox{\hsize=.8\textheight\relax##2}}%
-% (not needed because \rotatebox uses an \hbox anyway)
- \let\caption@parbox\@secondoftwo}%
- \caption@set@bool\caption@ifslc0% been there, done that
- \fi
-% \end{macrocode}
-%
-% \begin{macrocode}
- \rotatebox{90}{\caption@makerot{#1}{#2}}%
+ \rotatebox{90}{%
+ \ifdim\captionwidth=\z@
+ \setcaptionwidth{.8\vsize}%
+ \l@addto@macro\caption@singleline{\caption@setbox{none}}%
+ \fi
+ \let\caption@calcmargin\relax
+ \caption@@make{#1}{#2}}%
\nobreak\hspace{12pt}}%
% \end{macrocode}
-%
-% \begin{macrocode}
- \newcommand\caption@makerot[2]{%
- \begin{minipage}\captionwidth\caption@@make{#1}{#2}\end{minipage}}%
-% \end{macrocode}
% \end{macro}
%
% \begin{macrocode}
@@ -4000,8 +4095,7 @@
% which will be executed later on.
% Furthermore we need to make |\caption*| work.
% \begin{macrocode}
- \caption@settype*{#2}%
- \caption@freeze
+ \caption@freeze{#2}%
% \end{macrocode}
% The sidecap package uses |\ifx\label\SC@label| to test if it is just inside a
% |SC|\-|figure| or not. So we redefine |\SC@label| here so this test will still work.
@@ -4024,18 +4118,6 @@
\let\caption@ORI@endSC@FLOAT\endSC@FLOAT
\def\endSC@FLOAT{%
% \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.}
-% \begin{macrocode}
- \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
% because any extra margin would only be disturbing here.\par
% (We don't need to take care about the caption position because
@@ -4063,11 +4145,16 @@
% not the regular one!}
% \begin{macrocode}
\let\caption\SC@orig@caption
- \def\SC@orig@caption[##1]##2{\caption@defrost}%
+ \def\SC@orig@caption[##1]##2{%
+ \caption@setSC@justify
+%%% \caption@setoptions{SC}%
+ \caption@setoptions{SC\@captype}%
+ \caption@defrost}%
% \end{macrocode}
% Finally we call the original definition of |\endSC@FLOAT|.
% \begin{macrocode}
\caption@setSC@justify % for compatibility mode
+ \caption@prepare@defrost
\caption@ORI@endSC@FLOAT}%
% \end{macrocode}
% \end{macro}
@@ -4335,10 +4422,10 @@
% \changes{v3.2d}{2011/11/02}{Redefinition of this macro added}
% First of all we make the \package{wrapfig} package independent from the package
% load order regarding the \package{float} package.
-% Since the usage of |\@float@set|\x|every| is missing in the code of the \package{wrapfig}
-% package (it should be in the redefinition of |\float@re|\x|style|, right after
+% Since the usage of |\@float@set|\-|every| is missing in the code of the \package{wrapfig}
+% package (it should be in the redefinition of |\float@re|\-|style|, right after
% |\@nameuse{fst@#1}|), we don't use it here, too,
-% especially since |\wrap|\x|float| will usually not be used when used with re-styled floats.
+% especially since |\wrap|\-|float| will usually not be used when used with re-styled floats.
% \begin{macrocode}
\renewcommand*\wrapfloat[1]{%
\def\@captype{#1}%
@@ -4378,7 +4465,7 @@
% \changes{v3.2d}{2011/11/02}{This macro added}
% \changes{v3.2e}{2011/11/10}{Bugfix 11-11-09: float package support fixed}
% We place our \package{hyperref} anchor here, apply the `wrap' options etc.
-% Since the usage of |\@float@set|\x|every| is missing in the \package{wrapfig}
+% Since the usage of |\@float@set|\-|every| is missing in the \package{wrapfig}
% package we will catch it up here for making the necessary adaptions to the
% \package{float} package.
% \begin{macrocode}
@@ -4387,7 +4474,7 @@
\@ifundefined{fst@#1}{}{\@float@setevery{#1}}%
\caption@settype{#1}%
\caption@clearmargin
-%%% \caption@setoptions{wrapfloat}%
+%%% \caption@setoptions{wrap}%
\caption@setoptions{wrap#1}}%
% \end{macrocode}
% \end{macro}
@@ -4406,22 +4493,17 @@
%
% \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{http://tug.ctan.org/tex-archive/macros/latex/contrib/beamer/}%
-% {\emph{User Guide to the Beamer Class, Version 3.07}},\\
-% March 11, 2007
+% {\emph{The beamer class, User Guide for version 3.25}},\\
+% December 26, 2012
%
% \bibitem{KOMAScript}
% Markus Kohm \& Jens-Uwe-Morawski:\\
% \href{http://tug.ctan.org/tex-archive/macros/latex/contrib/koma-script/}%
% {\emph{KOMA-Script -- a versatile \LaTeXe\ bundle}},\\
-% 2007-01-09
+% 2012-07-22
%
% \bibitem{NTG}
% Victor Eijkhout:\\
@@ -4445,7 +4527,7 @@
% Olga Lapko:\\
% \href{http://tug.ctan.org/tex-archive/macros/latex/contrib/floatrow/}%
% {\emph{The floatrow package documentation}},\\
-% 2007/08/24
+% 2009/08/02
%
% \bibitem{fltpage}
% Sebastian Gross:\\
@@ -4456,14 +4538,14 @@
% \bibitem{hyperref}
% Sebastian Rahtz \& Heiko Oberdiek:\\
% \href{http://tug.ctan.org/tex-archive/macros/latex/contrib/hyperref/}%
-% {\emph{Hypertext marks in \LaTeX}},\\
-% November 12, 2007
+% {\emph{Hypertext marks in \LaTeX: a manual for hyperref}},\\
+% November 2012
%
% \bibitem{hypcap}
% Heiko Oberdiek:\\
% \href{http://tug.ctan.org/tex-archive/macros/latex/contrib/oberdiek/}%
% {\emph{The hypcap package -- Adjusting anchors of captions}},\\
-% 2007/04/09
+% 2011/02/16
%
% \bibitem{listings}
% Carsten Heinz \& Brooks Moses:\\
@@ -4505,7 +4587,7 @@
% Steven D. Cochran:\\
% \href{http://tug.ctan.org/tex-archive/macros/latex/contrib/subfigure/}%
% {\emph{The subfigure package}},\\
-% 2002/07/02
+% 2005/03/15
%
% \bibitem{subfig}
% Steven D. Cochran:\\
@@ -4517,25 +4599,25 @@
% Johannes Braams and Theo Jurriens:\\
% \href{http://tug.ctan.org/tex-archive/macros/latex/contrib/supertabular/}%
% {\emph{The supertabular environment}},\\
-% 2002/07/19
+% 2004/02/20
%
% \bibitem{threeparttable}
% Donald Arseneau:\\
% \href{http://tug.ctan.org/tex-archive/macros/latex/contrib/misc/}%
% {\emph{Three part tables: title, tabular environment, notes}},\\
-% 2003/06/13
+% March 5, 2010
%
% \bibitem{wrapfig}
% Donald Arseneau:\\
% \href{http://tug.ctan.org/tex-archive/macros/latex/contrib/wrapfig/}%
% {\emph{WRAPFIG.STY ver 3.6}},\\
-% 2003/01/31
+% Jan 31, 2003
%
% \bibitem{xtab}
% Peter Wilson:\\
% \href{http://tug.ctan.org/tex-archive/macros/latex/contrib/xtab/}%
% {\emph{The xtab package}},\\
-% 2004/05/24
+% 2011/07/31
% \end{thebibliography}
%
% \iffalse
diff --git a/Master/texmf-dist/source/latex/caption/caption.ins b/Master/texmf-dist/source/latex/caption/caption.ins
index 412fe0ce3cd..763f86f2156 100644
--- a/Master/texmf-dist/source/latex/caption/caption.ins
+++ b/Master/texmf-dist/source/latex/caption/caption.ins
@@ -6,7 +6,7 @@
\preamble
-Copyright (C) 1994-2012 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
+Copyright (C) 1994-2013 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
--------------------------------------------------------------------------
diff --git a/Master/texmf-dist/source/latex/caption/caption2.dtx b/Master/texmf-dist/source/latex/caption/caption2.dtx
index 88b7f1fc906..f5195233adf 100644
--- a/Master/texmf-dist/source/latex/caption/caption2.dtx
+++ b/Master/texmf-dist/source/latex/caption/caption2.dtx
@@ -2,7 +2,7 @@
%
% This is file `caption2.dtx'.
%
-% Copyright (C) 1994-2008 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
+% Copyright (C) 1994-2011 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
%
% --------------------------------------------------------------------------
%
diff --git a/Master/texmf-dist/source/latex/caption/caption3.dtx b/Master/texmf-dist/source/latex/caption/caption3.dtx
index 4a084501a2a..d80fb43d646 100644
--- a/Master/texmf-dist/source/latex/caption/caption3.dtx
+++ b/Master/texmf-dist/source/latex/caption/caption3.dtx
@@ -2,7 +2,7 @@
%
% This is file `caption3.dtx'.
%
-% Copyright (C) 1994-2012 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
+% Copyright (C) 1994-2013 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
%
% --------------------------------------------------------------------------
%
@@ -25,12 +25,12 @@
% and the user manuals caption-deu.tex, caption-eng.tex, and caption-rus.tex.
%
% \fi
-% \CheckSum{3410}
+% \CheckSum{3461}
%
% \iffalse
%<*driver>
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesFile{caption3.drv}[2011/10/09 v1.4 Implementation of the caption kernel]
+\ProvidesFile{caption3.drv}[2013/01/06 v1.5 Implementation of the caption kernel]
\hbadness=9999 \newcount\hbadness \hfuzz=100pt % Make TeX shut up.
%\errorcontextlines=3
%
@@ -57,7 +57,7 @@
\ifpdf\usepackage{hypdestopt}\fi
\hypersetup{pdfkeywords={LaTeX, package, caption},pdfstartpage={},pdfstartview={}}
%
-\usepackage[debug]{caption3}[2011/07/01]
+\usepackage[debug]{caption3}[2013/01/01]
%
\DeclareRobustCommand*\eTeX{\texorpdfstring
{\leavevmode\hbox{$\varepsilon$}-\TeX}%
@@ -89,8 +89,6 @@
% \newcommand*\csmarg[1]{\texttt{\char`\{#1\char`\}}}
% \newcommand*\csoarg[1]{\texttt{\char`\[#1\char`\]}}
% \newcommand*\version[2][]{\textit{v#2}}
-% \newcommand*\x{\discretionary{-}{}{}}
-% \newcommand*\xx{\discretionary{}{}{}}
%
% \GetFileInfo{caption3.drv}
% \let\docdate\filedate
@@ -200,7 +198,7 @@
%
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption3}[2012/01/12 v1.4b caption3 kernel (AR)]
+\ProvidesPackage{caption3}[2013/01/06 v1.5 caption3 kernel (AR)]
% \end{macrocode}
%
% \subsection{Generic helpers}
@@ -438,27 +436,29 @@
%
% \begin{macro}{\caption@withoptargs}
% \changes{v1.1}{2007/08/12}{This macro added}
+% \changes{v1.5}{2012/04/09}{This macro revised}
% |\caption@withoptargs|\marg{cmd}
% \begin{macrocode}
\newcommand*\caption@withoptargs[1]{%
\@ifstar
- {\def\caption@tempa{*}\caption@@withoptargs#1}%
- {\def\caption@tempa{}\caption@@withoptargs#1}}
+ {\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}}
+ {\caption@@@withoptargs{#1}}%
+ {\caption@@@@withoptargs{#1}}}
% \end{macrocode}
% \begin{macrocode}
\def\caption@@@withoptargs#1[#2]{%
\l@addto@macro\caption@tempa{[{#2}]}%
- \caption@@withoptargs#1}
+ \caption@@withoptargs{#1}}
% \end{macrocode}
% \begin{macrocode}
\def\caption@@@@withoptargs#1{%
- \expandafter#1\expandafter{\caption@tempa}}
+ \def\caption@tempb{#1}%
+ \expandafter\caption@tempb\expandafter{\caption@tempa}}
% \end{macrocode}
% \end{macro}
%
@@ -477,6 +477,7 @@
% \begin{macro}{\caption@IfCheckCommand}
% \changes{v1.1}{2007/04/10}{This macro added}
% \changes{v1.2b}{2008/08/02}{Revised so \cs{next} is no longer used}
+% \changes{v1.5}{2012/08/25}{Bugfix: Uses \cs{caption@tempa} instead of \cs{@tempa}}
% |\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
@@ -491,9 +492,9 @@
% \begin{macrocode}
\newcommand\caption@DoCheckCommand[2]{%
\begingroup
- \let\@tempa#1%
+ \let\caption@tempa#1%
#2%
- \ifx\@tempa#1%
+ \ifx\caption@tempa#1%
\endgroup
\let\caption@CheckCommand\@gobbletwo
\else
@@ -575,9 +576,10 @@
% See TLC2\cite{TLC2}, A.4.7, p885 for details.}
% \begin{macrocode}
\newcommand*\caption@InfoNoLine[1]{%
- \PackageInfo{caption}{#1\@gobble}}
+ \caption@Info{#1\@gobble}}
% \end{macrocode}
% \end{macro}
+%
% \begin{macro}{\caption@Warning}
% \changes{v1.1c}{2007/10/14}{This macro added, will now be used for warnings}
% |\caption@Warning|\marg{message}
@@ -598,6 +600,7 @@
See the caption package documentation for explanation.}
% \end{macrocode}
% \end{macro}
+%
% \begin{macro}{\caption@Error}
% \changes{v1.0j}{2007/01/20}{This macro added, will now be used for errors}
% \changes{v1.0o}{2007/04/11}{Renamed from \cs{caption@error} to \cs{caption@Error}}
@@ -614,6 +617,7 @@
section about errors.\MessageBreak\@ehc}
% \end{macrocode}
% \end{macro}
+%
% \begin{macro}{\caption@KV@err}
% \changes{v1.1b}{2007/09/18}{This macro added}
% \begin{macrocode}
@@ -675,9 +679,14 @@
% \end{macrocode}
% \begin{macrocode}
\newcommand*\caption@declareoption[2]{%
- #1{\undefine@key{caption}{#2}}\define@key{caption}{#2}}
+ #1{\undefine@key{caption}{#2}}\caption@declare@option{#2}}
\@onlypreamble\caption@declareoption
% \end{macrocode}
+% \begin{macrocode}
+\newcommand*\caption@declare@option{%
+ \define@key{caption}}
+%% no \@onlypreamble\caption@declare@option, will be used by \captionsetup
+% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\DeclareCaptionOptionNoValue}
@@ -722,8 +731,9 @@
% \changes{v1.1e}{2007/07/27}{Inside packages the starred variant will be used automatically}
% \changes{v1.2}{2007/11/16}{Bugfix 07-11-09: `space hack' added}
% \changes{v1.2a}{2008/01/12}{\cs{ifcaptionsetup@star} will be set now}
-% |\captionsetup|\oarg{type}\marg{keyval-list of options}\\
-% |\captionsetup*|\oarg{type}\marg{keyval-list of options}\par
+% \changes{v1.5}{2012/04/09}{Support of multiple optional arguments added}
+% |\captionsetup|\oarg{type}\ldots\marg{keyval-list of options}\\
+% |\captionsetup*|\oarg{type}\ldots\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|.
% (The non-starred variant issues a warning if \meta{keyval-list of options}
@@ -742,7 +752,20 @@
\newcommand*\caption@setup{\caption@setkeys{caption}}
% \end{macrocode}
% \begin{macrocode}
-\def\caption@setup@options[#1]#2{%
+\def\caption@setup@options[#1]{%
+ \@ifnextchar[%
+ {\caption@stepthecounter
+ \caption@withoptargs{\@expandtwoargs
+ \caption@setup@options@i{#1}{@\caption@thecounter}}}%
+ {\caption@setup@options@{#1}}}
+% \end{macrocode}
+% \begin{macrocode}
+\newcommand*\caption@setup@options@i[4]{%
+ \caption@setup@options@{#1}{#2}%
+ \caption@declare@option{#2}[]{\captionsetup#3{#4}}}
+% \end{macrocode}
+% \begin{macrocode}
+\newcommand*\caption@setup@options@[2]{%
\@bsphack
\ifcaptionsetup@star\captionsetup@starfalse\else\caption@addtooptlist{#1}\fi
\expandafter\caption@l@addto@list\csname caption@opt@#1\endcsname{#2}%
@@ -1090,6 +1113,7 @@
\newdimen\captionmargin
\newdimen\captionmargin@
\newdimen\captionwidth
+\newdimen\caption@tempdima
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1209,13 +1233,14 @@
% \begin{macro}{\caption@counter}
% \changes{v1.0n}{2007/04/03}{This counter added}
% \changes{v1.1e}{2007/10/28}{Renamed to \cs{caption@thecounter}; \cs{caption@stepcounter} added}
-% This counter numbers the captions. At the moment it will be used inside
+% \changes{v1.5}{2012/04/09}{\cs{caption@stepcounter} renamed to \cs{caption@stepthecounter}}
+% Internal counter. At the moment it will be used inside
% |\caption@ifoddpage| only.
% \begin{macrocode}
\newcommand*\caption@thecounter{0}
% \end{macrocode}
% \begin{macrocode}
-\newcommand*\caption@stepcounter{%
+\newcommand*\caption@stepthecounter{%
\@tempcnta\caption@thecounter
\advance\@tempcnta\@ne
\xdef\caption@thecounter{\the\@tempcnta}}
@@ -1418,12 +1443,9 @@
% \end{macro}
%
% \changes{v1.2a}{2008/01/20}{Option \opt{style*=} added}
-% \changes{v1.2b}{2008/05/06}{Option \opt{slc=} added}
% \begin{macrocode}
\DeclareCaptionOption{style}{\caption@setstyle{#1}}
\DeclareCaptionOption{style*}{\caption@setstyle*{#1}}
-\DeclareCaptionOption{singlelinecheck}[1]{\caption@set@bool\caption@ifslc{#1}}
-\DeclareCaptionOption{slc}[1]{\KV@caption@singlelinecheck{#1}}
% \end{macrocode}
%
% \begin{macro}{\caption@setstyle}
@@ -1467,13 +1489,15 @@
% \changes{v1.1}{2007/02/04}{%
% This macro renamed from \cs{caption@setdefault} to \cs{caption@resetstyle}}
% \changes{v1.1d}{2007/10/23}{`SingleLine' renamed to `singleline' for consistency}
-% \changes{v1.2}{2007/11/17}{Usage of \texttt{size=} added}
-% \changes{v1.2b}{2008/05/06}{Usage of \texttt{rule} added}
+% \changes{v1.2}{2007/11/17}{Usage of \opt{size=} added}
+% \changes{v1.2b}{2008/05/06}{Usage of \opt{rule} added}
+% \changes{v1.5}{2012/03/15}{\opt{box=parbox} added}
% 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@resetstyle{%
\caption@setup{%
+ box=parbox,boxcolor=white,%
format=plain,labelformat=default,labelsep=colon,textformat=simple,%
justification=justified,font=,size=,labelfont=,textfont=,%
margin=0pt,minmargin=0,maxmargin=0,%
@@ -1487,6 +1511,7 @@
% \changes{v1.1}{2007/02/04}{Caption style `default' renamed to `base', and a new `default' added}
% \changes{v1.1}{2007/03/31}{\opt{format=plain} added to caption style \opt{default}}
% \changes{v1.1c}{2007/10/14}{\opt{format=plain} removed from caption style \opt{default}}
+% \changes{v1.5}{2012/03/15}{\opt{box=default} 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
@@ -1495,10 +1520,63 @@
% \begin{macrocode}
\DeclareCaptionStyle{base}[indent=0pt,justification=centering]{}
\DeclareCaptionStyle{default}[indent=0pt,justification=centering]{%
- format=default,labelsep=default,textformat=default,%
+ box=default,format=default,labelsep=default,textformat=default,%
justification=default,font=default,labelfont=default,textfont=default}
% \end{macrocode}
%
+% \changes{v1.2b}{2008/05/06}{Option \opt{slc=} added}
+% \begin{macrocode}
+\DeclareCaptionOption{singlelinecheck}[1]{\caption@set@bool\caption@ifslc{#1}}
+\DeclareCaptionOption{slc}[1]{\KV@caption@singlelinecheck{#1}}
+% \end{macrocode}
+%
+% \subsection{Boxes}
+%
+% \begin{macro}{\DeclareCaptionBox}
+% \changes{v1.5}{2012/03/15}{This macro added}
+% |\DeclareCaptionBox|\marg{name}\marg{code with \#1 and \#2}
+% \begin{macrocode}
+\newcommand*\DeclareCaptionBox[2]{%
+ \global\long\@namedef{caption@box@#1}##1##2{#2}}
+\@onlypreamble\DeclareCaptionBox
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+\DeclareCaptionOption{box}{\caption@setbox{#1}}
+% \end{macrocode}
+%
+% \begin{macro}{\caption@setbox}
+% |\caption@setbox|\marg{name}\par
+% Selecting a caption box simply means saving the code (in |\caption@box|).
+% \begin{macrocode}
+\newcommand*\caption@setbox[1]{%
+ \@ifundefined{caption@box@#1}%
+ {\caption@Error{Undefined box `#1'}}%
+ {\expandafter\let\expandafter\caption@box\csname caption@box@#1\endcsname}}
+% \end{macrocode}
+% \end{macro}
+%
+% There are four pre-defined label formats, called `empty', `simple',
+% `parens', and `brace'.
+% \begin{macrocode}
+\DeclareCaptionBox{empty}{}
+\DeclareCaptionBox{none}{#2}
+\DeclareCaptionBox{parbox}{\parbox[b]{#1}{#2}}
+%\DeclareCaptionBox{colorbox}{%
+% \colorbox{\caption@boxcolor}{\caption@box@parbox{\dimexpr #1-2\fboxsep}{#2}}}
+\DeclareCaptionBox{colorbox}{\colorbox{\caption@boxcolor}{%
+% \setlength\caption@tempdima{#1}%
+ \addtolength\caption@tempdima{-2\fboxsep}%
+ \caption@box@parbox\caption@tempdima{#2}}}
+\DeclareCaptionOption{boxcolor}{\def\caption@boxcolor{#1}}
+% \end{macrocode}
+%
+% `default' usually maps to `parbox'.
+% \begin{macrocode}
+\def\caption@box@default{\caption@box@parbox}
+% \end{macrocode}
+%
% \subsection{Formats}
%
% \begin{macro}{\DeclareCaptionFormat}
@@ -2424,6 +2502,41 @@
\vskip\belowcaptionskip}}
% \end{macrocode}
%
+% \subsubsection{The elsarticle classes}
+% \changes{v1.5}{2013/01/06}{elsarticle class support added}
+%
+% \begin{macro}{\caption@ifelsarticleclass}
+% \begin{macrocode}
+\providecommand*\caption@ifelsarticleclass{%
+ \@ifclassloaded{elsarticle}\@firstofone\@gobble}
+\@onlypreamble\caption@ifelsarticleclass
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+\caption@ifelsarticleclass{%
+% \end{macrocode}
+% \begin{macrocode}
+ \caption@CheckCommand\@makecaption{%
+ % elsarticle.cls,v 1.20 2008-10-13 04:24:12 cvr Exp
+ \long\def\@makecaption#1#2{%
+ \vskip\abovecaptionskip\footnotesize
+ \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}
+% \begin{macrocode}
+ \DeclareCaptionDefaultFont{font}{\footnotesize}
+% \end{macrocode}
+% \begin{macrocode}
+}
+% \end{macrocode}
+%
% \subsubsection{The \AmS{} \& \SmF{} classes}
% \changes{v1.1}{2007/07/29}{\AmS\ \& \SmF\ classes support added}
%
@@ -2899,6 +3012,7 @@
% \changes{v1.3}{2011/06/24}{Split into two macros}
% \changes{v1.4}{2011/08/19}{Split into three macros}
% \changes{v1.4}{2011/08/30}{Support for option \opt{listtype=} added}
+% \changes{v1.5}{2012/01/15}{Usage of \cs{caption@addsubcontentslines} 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
@@ -2920,20 +3034,24 @@
% \caption@setoptions\caption@listtype
\@namedef{the\caption@listtype}{\@nameuse{the#1}}}%
\expandafter\caption@@addcontentsline\expandafter{\caption@listtype}{#2}%
- \endgroup}}
+ \endgroup}%
+ \caption@addsubcontentslines{#1}}
% \end{macrocode}
% \begin{macrocode}
\newcommand\caption@@addcontentsline[2]{%
{\let\\\space
\@ifundefined{ext@#1}%
{\caption@Error{No float type '#1' defined}}%
- {\caption@@@addcontentsline
+ {\caption@add@contentsline
{\csname ext@#1\endcsname}%
{#1}%
{\caption@lstfmt{\@nameuse{p@#1}}{\@nameuse{the#1}}}%
{\ignorespaces #2}}}}
% \end{macrocode}
% \begin{macrocode}
+\newcommand*\caption@add@contentsline{\caption@@@addcontentsline}
+% \end{macrocode}
+% \begin{macrocode}
\newcommand*\caption@@@addcontentsline[4]{%
\addcontentsline{#1}{#2}{\protect\numberline{#3}{#4}}}
% \end{macrocode}
@@ -2948,6 +3066,9 @@
\expandafter\@firstofone
\fi}
% \end{macrocode}
+% \begin{macrocode}
+\newcommand*\caption@addsubcontentslines[1]{}
+% \end{macrocode}
% \end{macro}
%
% \subsection{Typesetting the caption}
@@ -2998,32 +3119,19 @@
% \changes{v1.0n}{2007/04/03}{Usage of \cs{caption@ifoddpage} added}
% \changes{v1.1}{2007/07/29}{\cs{caption@calcmargin} moved below single-line-check}
% \changes{v1.1e}{2007/10/28}{\cs{caption@stepcounter} added}
+% \changes{v1.5}{2012/03/15}{Uses \cs{caption@tempdima} instead of \cs{@tempdima}}
+% \changes{v1.5}{2012/12/26}{max-margin stuff moved to \cs{caption@calcmargin}}
% |\caption@@make|\marg{caption label}\marg{caption text}
% \begin{macrocode}
\newcommand\caption@@make[2]{%
\begingroup
- \caption@stepcounter
+ \caption@stepthecounter
\caption@beginhook
% \end{macrocode}
%
-% Check margin, if |\caption@minmargin| or |\caption@maxmargin| is set
-% \begin{macrocode}
-% TODO: Move this to \caption@calcmargin!?
- \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{\caption@slc{#1}{#2}\captionwidth\relax}{}%
+ \caption@ifslc{\caption@slc{#1}{#2}\caption@singleline\relax}{}%
% \end{macrocode}
%
% Typeset the left margin (option |margin=|)
@@ -3042,9 +3150,9 @@
% \Note{\cs{captionindent} is \emph{not} supported if the caption format
% was defined with \cs{DeclareCaptionFormat*}.}
% \begin{macrocode}
- \@tempdima\captionwidth
- \caption@ifh{\advance\@tempdima-\caption@indent}%
- \caption@parbox\@tempdima{%
+ \caption@tempdima\captionwidth
+ \caption@ifh{\advance\caption@tempdima-\caption@indent}%
+ \caption@parbox\caption@tempdima{%
% \end{macrocode}
%
% Typeset the indention (option |indention=|)\\
@@ -3089,12 +3197,28 @@
% \changes{v1.0g}{2006/01/12}{Improvement: Takes care of list environment now}
% \changes{v1.1}{2006/05/13}{Check of \cs{@listdepth} removed (not necessary anymore),
% use \cs{linewidth} instead of \cs{hsize}}
+% \changes{v1.5}{2012/12/26}{max-margin stuff moved from \cs{caption@@make} to here}
% |\caption@calcmargin|\par
% Calculate |\captionmargin| \& |\captionwidth|, so both contain valid
% values.
% \begin{macrocode}
\newcommand*\caption@calcmargin{%
\caption@calcmargin@hook
+% \end{macrocode}
+% 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}
+% \begin{macrocode}
\ifdim\captionwidth=\z@
\captionwidth\linewidth
\advance\captionwidth by -2\captionmargin
@@ -3128,27 +3252,24 @@
% \changes{v1.1c}{2007/10/14}{Support of \cs{caption@slfmt} added}
% \changes{v1.1d}{2007/10/23}{`SingleLine' renamed to `singleline' for consistency}
% \changes{v1.3}{2010/09/04}{Split into \cs{caption@slc} and \cs{caption@@slc}}
-% |\caption@slc|\marg{label}\marg{text}\marg{width}\marg{extra code}\par
+% \changes{v1.5}{2012/12/26}{Merged into a single macro again}
+% |\caption@slc|\marg{label}\marg{text}\marg{single-line-code}\marg{multi-line-code}\par
% This one does the single-line-check.
% \begin{macrocode}
\newcommand\caption@slc[4]{%
- \caption@@slc{#1}{#2}{#3}{\caption@singleline#4}{}}
-% \end{macrocode}
-% \begin{macrocode}
-\newcommand\caption@@slc[5]{%
\caption@Debug{Begin SLC}%
\begingroup
\caption@singleline
\let\caption@hj\@empty
- \caption@calcmargin % calculate #3 if necessary
+ \caption@calcmargin % calculate \captionwidth
\caption@prepareslc
\sbox\@tempboxa{\caption@@@make{#1}{#2}}%
- \ifdim\wd\@tempboxa>#3%
+ \ifdim\wd\@tempboxa>\captionwidth
\endgroup
- #5%
+ #4%
\else
\endgroup
- #4%
+ #3%
\fi
\caption@Debug{End SLC}}
% \end{macrocode}
@@ -3213,10 +3334,12 @@
% \changes{v1.0l}{2006/03/09}{Bugfix 07-03-09: \cs{caption@parbox} changed from
% \cs{parbox-t} to \cs{parbox-b}}
% \changes{v1.2}{2007/11/11}{Renamed from \cs{captionbox} to \cs{caption@parbox}}
+% \changes{v1.5}{2012/03/15}{Adapted to \cs{DeclareCaptionBox}}
% |\caption@parbox|\marg{width}\marg{contents}\par
% This macro defines the box which surrounds the caption paragraph.
+% (For compatibility reasons we still use |\caption@par|\-|box| instead of |\caption@box|.)
% \begin{macrocode}
-\newcommand*\caption@parbox{\parbox[b]}
+\newcommand*\caption@parbox{\caption@box}
% \end{macrocode}
% \end{macro}
%
@@ -3407,60 +3530,13 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\@stpelt}
-% We patch \cs{@stpelt} so a list of `connected' counters will be reset, too.
-% (Like \cs{stepcounter} does in |ltcounts.dtx|.)
-% \begin{macrocode}
-\newcommand*\caption@patch@stpelt{%
- \let\caption@stpelt\@stpelt
- \def\@stpelt##1{%
- \caption@stpelt{##1}%
- \begingroup
- \let\@elt\caption@stpelt
- \csname caption@cl@##1\endcsname
- \endgroup}%
- \let\caption@patch@stpelt\relax}
-\@onlypreamble\caption@patch@stpelt
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\caption@addtoreset}
-% \changes{v1.2d}{2009/10/09}{This macro added}
-% Like \cs{@addtoreset} from |ltcounts.dtx|
-% \begin{macrocode}
-\newcommand*\caption@addtoreset[2]{%
- \caption@patch@stpelt
- \@ifundefined{caption@cl@#2}{\@namedef{caption@cl@#2}{}}{}%
- \expandafter\@cons\csname caption@cl@#2\endcsname{{#1}}}
-\@onlypreamble\caption@addtoreset
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\caption@removefromreset}
-% \changes{v1.2d}{2009/10/09}{This macro added}
-% Like \cs{@removefromreset} from |remreset.sty|
-% \begin{macrocode}
-\newcommand*\caption@removefromreset[2]{%
- \begingroup
- \expandafter\let\csname c@#1\endcsname\caption@removefromreset
- \def\@elt##1{%
- \expandafter\ifx\csname c@##1\endcsname\caption@removefromreset
- \else
- \noexpand\@elt{##1}%
- \fi}%
- \expandafter\xdef\csname caption@cl@#2\endcsname{%
- \csname caption@cl@#2\endcsname}%
- \endgroup}
-\@onlypreamble\caption@removefromreset
-% \end{macrocode}
-% \end{macro}
-%
% \begin{macro}{\DeclareCaptionSubType}
% \changes{v1.2}{2007/11/16}{This macro added}
% \changes{v1.2a}{2008/03/11}{Bugfix: \cs{subfigurename} will be defined now}
% \changes{v1.2d}{2009/10/09}{Bugfix 08-10-01: Usage of \cs{caption@addtoreset} added}
% \changes{v1.3}{2011/01/01}{\cs{@dottedlofline} will be defined \& used now}
% \changes{v1.4}{2011/10/09}{Support of the titletoc package added}
+% \changes{v1.5}{2011/12/29}{Usage of \cs{caption@addtoreset} replaced by \cs{@addtoreset}}
% |\DeclareCaptionSubType|\oarg{numbering scheme}\marg{type}\\
% |\DeclareCaptionSubType*|\oarg{numbering scheme}\marg{type}\par
% The starred variant provides the numbering format
@@ -3485,7 +3561,7 @@
{\@ifundefined{c@sub#3}%
{\caption@Debug{New subtype `sub#3'}%
\newcounter{sub#3}%
- \caption@addtoreset{sub#3}{#3}%
+ \@addtoreset{sub#3}{#3}%
\@namedef{ext@sub#3}{\csname ext@#3\endcsname}%
\caption@declaresublistentry{#3}%
\@cons\caption@subtypelist{{#3}}}%
@@ -3568,7 +3644,7 @@
%
% \begin{macro}{\caption@subtypelist}
% An \cs{@elt}-list containing the subtypes defined
-% with |\Declare|\x|Caption|\x|Sub|\x|Type|.
+% with |\Declare|\-|Caption|\-|Sub|\-|Type|.
% \begin{macrocode}
\newcommand*\caption@subtypelist{}
% \end{macrocode}
@@ -3642,7 +3718,7 @@
% \begin{macrocode}
\def\sf@NEW@subfloat{%
\begingroup
- \@nameuse{caption@warmup}%
+ \@nameuse{caption@warmup}%
\caption@setfloattype\@captype
\sf@ifpositiontop{%
\maincaptiontoptrue
diff --git a/Master/texmf-dist/source/latex/caption/newfloat.dtx b/Master/texmf-dist/source/latex/caption/newfloat.dtx
index 00f04984a80..05198f0d5f4 100644
--- a/Master/texmf-dist/source/latex/caption/newfloat.dtx
+++ b/Master/texmf-dist/source/latex/caption/newfloat.dtx
@@ -2,7 +2,7 @@
%
% This is file `newfloat.dtx'.
%
-% Copyright (C) 2011 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
+% Copyright (C) 2011-2012 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
%
% --------------------------------------------------------------------------
%
@@ -25,13 +25,13 @@
% and the user manuals caption-deu.tex, caption-eng.tex, and caption-rus.tex.
%
% \fi
-% \CheckSum{1204}
+% \CheckSum{1291}
%
% \iffalse
%<*driver>
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
\ProvidesFile{newfloat.drv}%
- [2011/11/06 v1.0 This package offers a command for defining new floating environments]
+ [2012/05/18 v1.0 This package offers a command for defining new floating environments]
\hbadness=9999 \newcount\hbadness \hfuzz=48pt % Make TeX shut up.
%
\documentclass{ltxdoc}
@@ -117,7 +117,7 @@
% where \meta{options} are one or more of
% \begin{quote}\begin{tabular}{r@{\,}l}
% |within=| & \meta{``within'' counter} \emph{or} \texttt{none}\quad\\
-% |chapterlistsgap=| & \meta{value}
+% |chapterlistsgap=| & \meta{value}~\footnotemark[1]
% \end{tabular}\end{quote}
%
% The ``within'' counter specifies the counter which will be used to reset
@@ -167,8 +167,13 @@
% |name=| & \meta{prosa name}\\
% |placement=| & \meta{combination of \,\purett{htbp}}\\
% |within=| & \meta{``within'' counter} \emph{or} \texttt{none}\\
-% |chapterlistsgaps=| & \texttt{on} \emph{or} \texttt{off}
+% |chapterlistsgaps=| & \texttt{on} \emph{or} \texttt{off}~\footnotemark[1]
% \end{tabular}\end{quote}
+% \footnotetext[1]{Please note that although \thispackage\ tries hard to offer this
+% option it may not be available or is working incorrectly in cooperation with
+% your document class since there is no standard interface which we could use
+% for that purpose. Therefore we have to try to patch the \cs{chapter} command,
+% and if this fails, we try to patch \cs{addtocontents} (in an unusual way) instead.}
%
% If no \meta{options} are given,
% ``lo\meta{type}'' will be used as \meta{file extension} for the list,
@@ -447,16 +452,20 @@
%
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{newfloat}[2011/11/16 v1.0a Defining new floating environments (AR)]
+\ProvidesPackage{newfloat}[2012/05/19 v1.0b Defining new floating environments (AR)]
% \end{macrocode}
%
% \begin{macro}{\newfloat@Info}
+% \begin{macro}{\newfloat@InfoNoLine}
% |\newfloat@Info|\marg{message}
% \begin{macrocode}
\newcommand*\newfloat@Info[1]{%
\PackageInfo{newfloat}{#1}}
+\newcommand*\newfloat@InfoNoLine[1]{%
+ \newfloat@Info{#1\@gobble}}
% \end{macrocode}
% \end{macro}
+% \end{macro}
%
% \begin{macro}{\newfloat@Error}
% |\newfloat@Error|\marg{message}
@@ -947,6 +956,7 @@
% \end{macro}
%
% \begin{macro}{\newfloat@addtolist}
+% \changes{v1.0b}{2012/05/18}{Bugfix: Definition of \cs{@ifchapterlistsgap@}\meta{environment} added}
% |\newfloat@addtolist|\marg{environment}
% adds an environment to the list of floating environments.
% \begin{macrocode}
@@ -955,6 +965,8 @@
\ifcsname ext@#1\endcsname
\@cons\newfloat@list{{#1}}%
\@namedef{newfloat@ext@\@nameuse{ext@#1}}{#1}%
+ \@ifundefined{@ifchapterlistsgap@#1}{%
+ \expandafter\let\csname @ifchapterlistsgap@#1\endcsname\@iden}{}%
\else
\newfloat@Error{`#1' does not seem to be a floating environment}%
\fi}}
@@ -1015,7 +1027,7 @@
% \begin{macrocode}
\providecommand*\@@addchapterlistsgap[2]{%
\@ifundefined{@addchapterlistsgap@#2}{% only once per extension
- \@namedef{@addchapterlistsgap@#2}{}%
+ \@namedef{@addchapterlistsgap@#2}{#1}%
\@@@addchapterlistsgap{#2}}{}}
% \end{macrocode}
% \begin{macrocode}
@@ -1027,14 +1039,16 @@
% \end{macro}
%
% \begin{macro}{\@addchapterlistsgaps}
+% \changes{v1.0b}{2012/05/18}{Bugfix: Group added to make \cs{@addchapterlistsgap} work correctly}
% |\@addchapterlistsgaps|\par
% will add the chapter lists gaps for all floating environments in |\newfloat@list|.
% \begin{macrocode}
\providecommand*\@addchapterlistsgaps{%
- \def\@elt##1{%
- \@expandtwoargs\@addchapterlistsgap{##1}{\@nameuse{ext@##1}}}%
- \newfloat@list
- \let\@elt\relax}
+ \begingroup
+ \def\@elt##1{%
+ \@expandtwoargs\@addchapterlistsgap{##1}{\@nameuse{ext@##1}}}%
+ \newfloat@list
+ \endgroup}
% \end{macrocode}
% \end{macro}
%
@@ -1119,11 +1133,42 @@
% \end{macro}
% \end{macro}
%
+% \begin{macro}{planb=}
+% \changes{v1.0b}{2012/05/18}{This option added}
+% This option switches the `Plan B' on or off. (default$=$off)
+% \begin{macrocode}
+\define@key{newfloat}{planb}[true]{%
+ \def\@tempa{#1}%
+ \def\@tempb{false}%
+ \ifx\@tempa\@tempb
+ \let\newfloat@ifplanb\@gobble
+ \else
+ \def\@tempb{true}%
+ \ifx\@tempa\@tempb
+ \let\newfloat@ifplanb\@iden
+ \else
+ \newfloat@Error{Invalid value `#1' for option `planb'}%
+ \fi
+ \fi}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{planb-filext=}
+% \changes{v1.0b}{2012/05/19}{This option added}
+% This option sets the file extension used for `Plan B'.
+% (default$=$use the 1st one which seem to fit)
+% \begin{macrocode}
+\define@key{newfloat}{planb-fileext}{%
+ \newfloat@Info{Setting Plan B file extension to `#1'}
+ \xdef\newfloat@addtocontents@ext{#1}}
+% \end{macrocode}
+% \end{macro}
+
+%
% Process the package options:
% We use |\setkeys| here instead of |\ProcessOptions|.
% \begin{macrocode}
\let\@tempc\relax
-\@expandtwoargs\setkeys{newfloat}{\@ptionlist{\@currname.\@currext}}%
+\@expandtwoargs\setkeys{newfloat}{planb,\@ptionlist{\@currname.\@currext}}%
\AtEndOfPackage{\let\@unprocessedoptions\relax}
% \end{macrocode}
%
@@ -1473,14 +1518,45 @@
% \pagebreak[3]
% \subsubsection{Compatibility warning}
%
-% If we were not able to patch |\@chapter| a warning message is issued
-% since we are not able to support chapter lists gaps then.
% \begin{macrocode}
\ifx\newfloat@replace@chapter\@gobbletwo \else
- \PackageWarningNoLine{newfloat}{%
- Unsupported document class, or\MessageBreak
- \noexpand\@chapter was already redefined by another package}
- \newfloat@Info{\string\@chapter\space=\space\meaning\@chapter}
+% \end{macrocode}
+% If we were not able to patch |\@chapter| an info message is issued
+% since we may not be able to support chapter lists gaps then.
+% \begin{macrocode}
+ \newfloat@InfoNoLine{%
+ Unsupported document class, or \noexpand\@chapter\MessageBreak
+ was already redefined by another package}
+ \newfloat@InfoNoLine{\string\@chapter\space=\space\meaning\@chapter}
+ \newfloat@InfoNoLine{\string\Hy@org@chapter\space=\space\meaning\Hy@org@chapter}
+% \end{macrocode}
+% Plan B: We patch |\addtocontents| instead, and keep our fingers crossed in the hope
+% that this redefinition actually will fit.
+% \begin{macrocode}
+ \newfloat@ifplanb{%
+ \newfloat@InfoNoLine{Trying Plan B..}%
+ \let\newfloat@addtocontents@ORI\addtocontents
+ \long\def\addtocontents#1#2{%
+ \newfloat@addtocontents{#1}{#2}#2\addvspace\newfloat@nil}%
+ \long\def\newfloat@addtocontents#1#2#3\addvspace#4\newfloat@nil{%
+ \def\newfloat@tempa{#4}%
+ \ifx\newfloat@tempa\@empty
+ \newfloat@addtocontents@ORI{#1}{#2}%
+ \else
+ \ifx\newfloat@addtocontents@ext\@undefined
+ \newfloat@Info{Setting Plan B file extension to `#1'...}%
+ \xdef\newfloat@addtocontents@ext{#1}%
+ \fi
+ \edef\newfloat@tempa{#1}%
+ \ifx\newfloat@tempa\newfloat@addtocontents@ext
+ \begingroup
+ \let\addtocontents\newfloat@addtocontents@ORI
+ \@addchapterlistsgaps
+ \endgroup
+ \fi
+ \fi}}
+% \end{macrocode}
+% \begin{macrocode}
\fi
% \end{macrocode}
%
diff --git a/Master/texmf-dist/source/latex/caption/subcaption.dtx b/Master/texmf-dist/source/latex/caption/subcaption.dtx
index ae8350c876e..13d365884a8 100644
--- a/Master/texmf-dist/source/latex/caption/subcaption.dtx
+++ b/Master/texmf-dist/source/latex/caption/subcaption.dtx
@@ -25,12 +25,12 @@
% and the user manuals caption-deu.tex, caption-eng.tex, and caption-rus.tex.
%
% \fi
-% \CheckSum{143}
+% \CheckSum{133}
%
% \iffalse
%<*driver>
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesFile{subcaption.drv}[2011/08/29 v1.1 Adds a sub-caption feature to the caption package]
+\ProvidesFile{subcaption.drv}[2012/05/18 v1.1 Adds a sub-caption feature to the caption package]
\hbadness=9999 \newcount\hbadness \hfuzz=74pt % Make TeX shut up.
%\errorcontextlines=3
%
@@ -52,7 +52,7 @@
\fi
%
\usepackage[bottom]{footmisc}
-\usepackage{array,graphicx,overpic,pict2e,slashbox}
+\usepackage{array,graphicx,overpic,pict2e,diagbox}
\IfFileExists{test/tlc2/cat.eps}{\graphicspath{{test/tlc2/}}}{}%
%
\PassOptionsToPackage{breaklinks=true}{hyperref}
@@ -282,7 +282,18 @@
% \DescribeEnv{subtable}
% After loading \thispackage\ the new environments |sub|\-|figure| and
% |sub|\-|table| are available, which have the same (optional \& mandatory)
-% arguments as the |mini|\-|page| environment.
+% arguments as the |mini|\-|page| environment:
+% \begin{quote}
+% |\begin{subfigure}|\oarg{pos}\marg{width}\\
+% \ldots\\
+% |\end{subfigure}|
+% \end{quote}
+% and
+% \begin{quote}
+% |\begin{subtable}|\oarg{pos}\marg{width}\\
+% \ldots\\
+% |\end{subtable}|
+% \end{quote}
% Inside these environments you use the ordinary |\caption| command
% for typesetting captions. So this example is the same as the last one,
% but uses the |sub|\-|figure| environment:
@@ -305,13 +316,11 @@
% \item You can override the setttings for a specific subcaption
% with a |\caption|\-|setup| inside the |sub|\-|figure| or |sub|\-|table| environment, e.g.:
% \begin{quote}
-% \ldots\\
% |\begin{subfigure}[b]{.5\linewidth}|\\
% | \centering\large A|\\
% | |\textcolor{blue}{\cs{captionsetup}\csmarg{skip=3pt}}\\
% | \caption{A subfigure}\label{fig:1a}|\\
% |\end{subfigure}|\\
-% \ldots
% \end{quote}
% \item Hyperlinks targeted to this subfigure will jump to the beginning
% of the subfigure, and not to the caption of the subfigure
@@ -333,8 +342,11 @@
% \section{The \cs{subcaptionbox} command}
%
% \DescribeMacro\subcaptionbox
-% A more powerful (but less flexible) way of setting sub-figures is
-% offered by the |\sub|\-|caption|\-|box| command. Its syntax is:
+% A different way of setting sub-figures is
+% offered by the |\sub|\-|caption|\-|box| command, which automatically
+% aligns the sub-figures resp.~sub-tables by their very first caption line.
+%
+% Its syntax is:
% \begingroup
% \leftmargini=12pt
% \begin{quote}
@@ -882,14 +894,14 @@
% \subsection{Identification}
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{subcaption}[2012/01/12 v1.1d Sub-captions (AR)]
+\ProvidesPackage{subcaption}[2012/04/09 v1.1f Sub-captions (AR)]
% \end{macrocode}
%
% \subsection{Initial code}
%
% Since we base on the \package{caption} package we load it here.
% \begin{macrocode}
-\RequirePackage{caption}[2011/08/18] % needs v3.2b or newer
+\RequirePackage{caption}[2012/03/25] % needs v3.3 or newer
% \end{macrocode}
% \changes{v1.1b}{2011/09/01}{Compatibility error added}
% \begin{macrocode}
@@ -902,18 +914,20 @@
% Since we are incompatible to them an error message will be issued when
% the \package{subfigure} or \package{subfig} package is loaded.
% \begin{macrocode}
-\caption@ifundefined\subfigure{}{%
- \PackageError{subcaption}{%
- This package can't be used in cooperation\MessageBreak
- with the subfigure package}{RTFM}%
- \endinput}
+\@ifpackageloaded{subfigure}{%
+ \PackageError{subcaption}%
+ {This package can't be used in cooperation\MessageBreak
+ with the subfigure package}%
+ {RTFM}%
+ \endinput}{}%
% \end{macrocode}
% \begin{macrocode}
-\caption@ifundefined\subfloat{}{%
- \PackageError{subcaption}{%
- This package can't be used in cooperation\MessageBreak
- with the subfig package}{RTFM}%
- \endinput}
+\@ifpackageloaded{subfig}{%
+ \PackageError{subcaption}%
+ {This package can't be used in cooperation\MessageBreak
+ with the subfig package}%
+ {RTFM}%
+ \endinput}{}%
% \end{macrocode}
%
% \iffalse
@@ -945,12 +959,14 @@
% \subsubsection{The \cs{subcaption} command}
%
% \begin{macro}{\subcaption}
+% \changes{v1.1f}{2012/04/06}{\cs{newcommand} changed to \cs{def}
+% so it works with the \puresf{memoir} document class, too}
% Without a prefacing |\set|\-|caption|\-|sub|\-|type|, |\sub|\-|caption| is some kind
% of |\caption|\-|of{sub|\-|\@cap|\-|type}|.
% \Note{Like \cs{captionof}, this command is designed to be used inside an
% own group!}
% \begin{macrocode}
-\newcommand*\subcaption{%
+\def\subcaption{%
\caption@iftype
{\setcaptionsubtype*\caption}%
{\caption@Error{\noexpand\subcaption outside float}%
@@ -1015,11 +1031,11 @@
% \changes{v1.0b}{2008/08/31}{Definition and usage of \cs{subcaption@hrule} added}
% \changes{v1.0c}{2010/12/17}{Uses \cs{caption@box} now}
% \changes{v1.1}{2011/08/16}{Adapted to actual version of \cs{caption@box}}
+% \changes{v1.1f}{2012/04/09}{Adapted to actual version of \cs{caption@ibox}}
% A |\parbox| with contents and sub-caption, separated by an invisible |\hrule|.
% \begin{macrocode}
\newcommand*\subcaptionbox{%
- \let\captionbox@settype\setcaptionsubtype
- \caption@withoptargs\caption@box}
+ \caption@withoptargs{\caption@ibox\setcaptionsubtype}}
% \end{macrocode}
% \end{macro}
%
@@ -1060,21 +1076,20 @@
% \changes{v1.1}{2011/08/14}{Caption option \opt{subrefformat=} added}
% \changes{v1.1a}{2011/08/18}{Uses \cs{caption@setoptions*} now}
% \changes{v1.1d}{2012/01/12}{Usage of \cs{caption@setoptions*} replaced by \cs{caption@setoptions}}
+% \changes{v1.1f}{2012/04/09}{Revised}
% This one calls |\ref| with the second label. (see |\subcaption@label|)
% \begin{macrocode}
\DeclareRobustCommand*\subref{%
- \@ifstar{\subcaption@ref*}\@subref}
-\newcommand*\@subref{%
- \caption@withoptargs\@@subref}
-\newcommand*\@@subref[2]{%
+ \@ifstar
+ {\caption@withoptargs\subcaption@ref*}%
+ {\caption@withoptargs\@subref}}
+\newcommand*\@subref[2]{%
\caption@ifundefined\hyperref
- {\subcaption@ref#1{#2}}%
- {\hyperref[#2]{\subcaption@ref*#1{#2}}}}
+ {\subcaption@ref{#1}{#2}}%
+ {\hyperref[#2]{\subcaption@ref{*#1}{#2}}}}
% \end{macrocode}
% \begin{macrocode}
-\newcommand*\subcaption@ref{%
- \caption@withoptargs\subcaption@@ref}
-\newcommand*\subcaption@@ref[2]{%
+\newcommand*\subcaption@ref[2]{%
\begingroup
\caption@setoptions{sub}%
\subcaption@reffmt\p@subref{\ref#1{sub@#2}}%
diff --git a/Master/texmf-dist/tex/latex/caption/bicaption.sty b/Master/texmf-dist/tex/latex/caption/bicaption.sty
index 1f3e8f7841c..94b6fecdb8a 100644
--- a/Master/texmf-dist/tex/latex/caption/bicaption.sty
+++ b/Master/texmf-dist/tex/latex/caption/bicaption.sty
@@ -6,7 +6,7 @@
%%
%% bicaption.dtx (with options: `package')
%%
-%% Copyright (C) 1994-2012 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
+%% Copyright (C) 1994-2013 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
%%
%% --------------------------------------------------------------------------
%%
@@ -29,12 +29,16 @@
%% and the user manuals caption-deu.tex, caption-eng.tex, and caption-rus.tex.
%%
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{bicaption}[2011/10/30 v1.0a Bilingual Captions (AR)]
-\RequirePackage{caption}[2011/08/28] % needs v3.2c or newer
+\ProvidesPackage{bicaption}[2012/12/26 v1.1 Bilingual Captions (AR)]
+\RequirePackage{caption}[2012/12/26] % needs v3.3 or newer
\caption@AtBeginDocument{\caption@ifcompatibility{%
\caption@Error{%
The `bicaption' package does not work correctly\MessageBreak
in compatibility mode}}{}}
+\newcommand*\bicaption@Info[1]{%
+ \PackageInfo{bicaption}{#1}}
+\newcommand*\bicaption@InfoNoLine[1]{%
+ \PackageInfo{bicaption}{#1\@gobble}}
\newcommand*\bicaption@Warning[1]{%
\bicaption@WarningNoLine{#1\on@line}}
\newcommand*\bicaption@WarningNoLine[1]{%
@@ -65,34 +69,39 @@
\caption@set@bool\bicaption@ifswap{#1}}
\DeclareCaptionOption{lang}{\def\bicaption@language{#1}}
\let\KV@caption@language\KV@caption@lang
-\newcommand*\bicaption@selectlanguage{%
- \@ifstar
- {\bicaption@select@language\select@language}
- {\bicaption@select@language\selectlanguage}}
-\newcommand*\bicaption@select@language[1]{%
+\newcommand*\bicaption@selectlanguage[1]{%
\caption@ifundefined\bicaption@language{}{%
- \expandafter#1\expandafter{\bicaption@language}}}
+ \expandafter\selectcaptionlanguage\expandafter#1\expandafter{\bicaption@language}}}
\g@addto@macro\caption@applyfont{%
- \bicaption@selectlanguage*}
+ \bicaption@selectlanguage\@firstoftwo}
\g@addto@macro\caption@prepareslc{%
\let\bicaption@language\@undefined}
+\providecommand*\selectcaptionlanguage[1]{%
+ #1\select@language\selectlanguage}
\caption@ExecuteOptions{caption}{bi-lang=0,bi-slc=1,bi-swap=0}
-\ifcsname bbl@main@language\endcsname
- \edef\@tempa{\noexpand\captionsetup[bi-first]{lang=\bbl@main@language}}
- \@tempa
+\ifcsname captionmainlanguage\endcsname
+ \bicaption@InfoNoLine{main language is set to \captionmainlanguage}
+\else\ifcsname bbl@main@language\endcsname
+ \bicaption@InfoNoLine{babel found, main language is \bbl@main@language}
+ \let\captionmainlanguage\bbl@main@language
\else\ifcsname xpg@main@language\endcsname
- \edef\@tempa{\noexpand\captionsetup[bi-first]{lang=\xpg@main@language}}
- \@tempa
+ \bicaption@InfoNoLine{polyglossia found, main language is \xpg@main@language}
+ \let\captionmainlanguage\xpg@main@language
\else
- \bicaption@WarningNoLine{Please load this package after the babel package}
-\fi\fi
+ \bicaption@InfoNoLine{main language is not set}
+\fi\fi\fi
+\ifcsname captionmainlanguage\endcsname
+ \edef\@tempa{\noexpand\captionsetup[bi-first]{lang=\captionmainlanguage}}
+ \@tempa
+\fi
\caption@SetupOptions{bicaption}{\captionsetup[bi-second]{#2}}%
\caption@ProcessOptions*{bicaption}
-\let\caption@kernel@addcontentsline@ORI\caption@kernel@addcontentsline
-\renewcommand*\caption@kernel@addcontentsline[2]{%
+\let\bicaption@addcontentsline@ORI\caption@addcontentsline
+\renewcommand*\caption@addcontentsline[2]{%
\caption@ifundefined\bicaption@lentry
- {\caption@kernel@addcontentsline@ORI{#1}{#2}}%
- {\expandafter\bicaption@addcontentsline\expandafter{\bicaption@lentry}{#1}{#2}%
+ {\bicaption@addcontentsline@ORI{#1}{#2}}%
+ {\expandafter\bicaption@addcontentsline\expandafter
+ {\bicaption@lentry}{#1}{#2}%
\global\let\bicaption@lentry\@undefined}}
\newcommand\bicaption@addcontentsline[3]{%
\begingroup
@@ -112,22 +121,21 @@
\endgroup}
\newcommand*\bicaption@@addcontentsline[2]{%
\caption@ifcontentsline{#2}{%
- \bicaption@selectlanguage\relax
- \caption@kernel@addcontentsline@ORI{#1}{#2}}}
+ \bicaption@selectlanguage\@secondoftwo
+ \bicaption@addcontentsline@ORI{#1}{#2}}}
\let\caption@@make@ORI\caption@@make
\renewcommand\caption@@make[2]{%
\caption@ifundefined\bicaption@text
{\caption@@make@ORI{#1}{#2}}%
- {\expandafter\bicaption@@make\expandafter{\bicaption@text}{#1}{#2}%
+ {\expandafter\bicaption@@make\expandafter
+ {\bicaption@text}{#1}{#2}%
\global\let\bicaption@text\@undefined}}
\newcommand\bicaption@@make[3]{%
\caption@setoptions{bi}%
\ifnum\bicaption@lang=0\relax
\bicaption@ifslc
- {\caption@@slc{#2}{#3}{\captionwidth}{}%
- {\caption@set@bool\caption@ifslc0}%
- \caption@@slc{#2}{#1}{\captionwidth}{}%
- {\caption@set@bool\caption@ifslc0}}%
+ {\caption@slc{#2}{#3}{}{\KV@caption@singlelinecheck0}%
+ \caption@slc{#2}{#1}{}{\KV@caption@singlelinecheck0}}%
{}%
\fi
\ifnum\bicaption@lang=2\relax
diff --git a/Master/texmf-dist/tex/latex/caption/caption.sty b/Master/texmf-dist/tex/latex/caption/caption.sty
index 324e981af4f..bf396d89096 100644
--- a/Master/texmf-dist/tex/latex/caption/caption.sty
+++ b/Master/texmf-dist/tex/latex/caption/caption.sty
@@ -6,7 +6,7 @@
%%
%% caption.dtx (with options: `package')
%%
-%% Copyright (C) 1994-2012 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
+%% Copyright (C) 1994-2013 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
%%
%% --------------------------------------------------------------------------
%%
@@ -28,9 +28,10 @@
%% bicaption.sty, ltcaption.sty, subcaption.sty, and newfloat.sty,
%% and the user manuals caption-deu.tex, caption-eng.tex, and caption-rus.tex.
%%
+ % bicaption.sty, ltcaption.sty, subcaption.sty, and newfloat.sty,
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption}[2012/02/19 v3.2f Customizing captions (AR)]
-\RequirePackage{caption3}[2011/08/30] % needs v1.4 or newer
+\ProvidesPackage{caption}[2013/01/06 v3.3 Customizing captions (AR)]
+\RequirePackage{caption3}[2012/12/26] % needs v1.5 or newer
\caption@ifbool{documentclass}{}{%
\caption@WarningNoLine{%
Unsupported document class (or package) detected,\MessageBreak
@@ -65,7 +66,6 @@
\@onlypreamble@key{caption}{figurename}
\DeclareCaptionOption{tablename}{\caption@SetName{table}{#1}}
\@onlypreamble@key{caption}{tablename}
-\DeclareCaptionOption{name}{\caption@setname\@captype{#1}}
\DeclareCaptionOption{listfigurename}{\caption@SetName{listfigure}{#1}}
\@onlypreamble@key{caption}{listfigurename}
\DeclareCaptionOption{listtablename}{\caption@SetName{listtable}{#1}}
@@ -73,6 +73,7 @@
\newcommand*\caption@SetName[2]{%
\caption@NewFloat{\newfloat@setname{#1}{#2}}}
\@onlypreamble\caption@SetName
+\DeclareCaptionOption{name}{\caption@setname\@captype{#1}}
\newcommand*\caption@setname[2]{%
\@namedef{#1name}{#2}}
\newcommand*\caption@DeclareWithinOption[1]{%
@@ -97,6 +98,16 @@
\InputIfFileExists{#1.cfg}%
{\typeout{*** Local configuration file #1.cfg used ***}}%
{\caption@Warning{Configuration file #1.cfg not found}}}
+\newcommand*\caption@selectlistentry[1]{%
+ \caption@ifinlist{#1}{heading}{%
+ \let\caption@iflistheading\@firstoftwo
+ }{\caption@ifinlist{#1}{default,list-entry,entry}{%
+ \let\caption@iflistheading\@secondoftwo
+ }{%
+ \caption@Error{Undefined list-entry selection `#1'}%
+ }}}
+\DeclareCaptionOption{list-entry}{\caption@selectlistentry{#1}}
+\captionsetup{list-entry=default}
\newcommand*\caption@setparboxrestore[1]{%
\caption@ifinlist{#1}{full}{%
\caption@setfullparboxrestore
@@ -128,9 +139,6 @@
\DeclareCaptionOptionNoValue*{center}{%
\caption@setformat{plain}%
\caption@setjustification{centering}}
-\DeclareCaptionOptionNoValue*{anne}{%
- \caption@setformat{plain}%
- \caption@setjustification{centerlast}}
\DeclareCaptionOptionNoValue*{centerlast}{%
\caption@setformat{plain}%
\caption@setjustification{centerlast}}
@@ -263,12 +271,14 @@
}
\caption@SetupOptions{caption}{\caption@setkeys{#1}{#2}}
\caption@ProcessOptions*{caption}
+\newif\ifcaption@caption
+\newif\ifcaption@subcaption
+\newif\ifcaption@ContinuedFloat
\def\caption@caption{%
\caption@iftype
{\caption@checkgrouplevel\@empty\caption
\caption@star
- {\@nameuse{donemaincaptiontrue}%
- \caption@refstepcounter\@captype}%
+ {\caption@refstepcounter\@captype}%
{\caption@dblarg{\@caption\@captype}}}%
{\caption@Error{\noexpand\caption outside float}%
\caption@gobble}}
@@ -278,6 +288,7 @@
\ifcaption@star \else
\caption@prepareanchor{#1}{#2}%
\memcaptioninfo{#1}{\csname the#1\endcsname}{#2}{#3}%
+ \@nameuse{nag@hascaptiontrue}%
\fi
\par
\caption@beginex{#1}{#2}{#3}%
@@ -298,7 +309,7 @@
\providecommand\memcaptioninfo[4]{}
\newcommand*\caption@prepareanchor[2]{%
\caption@makecurrent{#1}{#2}%
- \caption@ifhypcap\caption@@start{}%
+ \caption@ifhypcap\caption@@start\relax
\M@gettitle{#2}}
\long\def\caption@makecaption#1#2{%
\caption@iftop
@@ -337,7 +348,7 @@
}}%
\caption@CheckCommand\caption{%
% float.sty [2001/11/08 v1.3d Float enhancements (AL)]
- \renewcommand\caption{%
+ \long\def\caption{%
\ifx\@captype\@undefined
\@latex@error{\noexpand\caption outside float}\@ehd
\expandafter\@gobble
@@ -391,7 +402,7 @@
\caption@CheckCommand\caption{%
% memhfixc.sty [2010/08/17 v1.15 nameref/hyperref package fixes for memoir class]
% \let\m@moldhypcaption\caption
- \renewcommand{\caption}{\donemaincaptiontrue\m@moldhypcaption}}%
+ \long\def\caption{\donemaincaptiontrue\m@moldhypcaption}}%
\caption@IfCheckCommand{}{%
\caption@InfoNoLine{%
Incompatible package detected (regarding \string\caption).\MessageBreak
@@ -423,6 +434,13 @@
\beamer@makecaption{#1}{\ignorespaces #3}\par\nobreak
\endgroup}}%
\caption@CheckCommand\@caption{%
+ % memhfixc.sty [2010/08/17 v1.15 nameref/hyperref package fixes for memoir class]
+ \long\def\@caption#1[#2]#3{%
+ \MNR@old@caption{#1}[{#2}]{#3}%
+ \def\@currentlabelname{#2}%
+ \M@gettitle{#2}%
+ }}%
+ \caption@CheckCommand\@caption{%
% magyar.ldf [2005/03/30 v1.4j Magyar support from the babel system]
\long\def\@caption#1[#2]#3{%
\csname par\endcsname
@@ -682,6 +700,11 @@
{\caption@@settype{sub}*{sub\@captype}}%
{\caption@@settype{sub}{sub\@captype}}}%
\newcommand*\caption@settype{%
+ \global\caption@captionfalse
+ \global\caption@subcaptionfalse
+ \global\caption@ContinuedFloatfalse
+ \caption@set@type}
+\newcommand*\caption@set@type{%
\caption@@settype{}}
\newcommand*\caption@@settype[1]{%
\caption@teststar{\caption@@@settype{#1}}\@firstoftwo\@secondoftwo}
@@ -704,7 +727,6 @@
The #1caption type was already set to
`\csname @#1captype\endcsname'\MessageBreak}}%
\fi
- \let\caption@ifrefstepcounter\@secondoftwo
#2{}{%
\let\@currentlabel\caption@undefinedlabel
\ifx\caption@x@label\@undefined
@@ -766,34 +788,33 @@
\caption@addcontentsline{#2}{#3}%
\@esphack}
\newcommand*\captionbox{%
- \let\captionbox@settype\@gobble
- \caption@withoptargs\caption@box}
-\newcommand\caption@box[2]{%
- \@testopt{\caption@ibox{#1}{#2}}{\wd\@tempboxa}}
-\long\def\caption@ibox#1#2[#3]{%
- \@testopt{\caption@iibox{#1}{#2}{#3}}\captionbox@hj@default}
-\long\def\caption@iibox#1#2#3[#4]#5{%
- \setbox\@tempboxa\hbox{#5}%
+ \caption@withoptargs{\caption@ibox\@gobble}}
+\newcommand\caption@ibox[3]{%
+ \@testopt{\caption@iibox{#1}{#2}{#3}}{\wd\@tempboxa}}
+\long\def\caption@iibox#1#2#3[#4]{%
+ \@testopt{\caption@iiibox{#1}{#2}{#3}{#4}}\captionbox@hj@default}
+\long\def\caption@iiibox#1#2#3#4[#5]#6{%
+ \setbox\@tempboxa\hbox{#6}%
\begingroup
- \captionbox@settype*% set \caption@position
+ #1*% set \caption@position
\caption@iftop{%
\endgroup
- \parbox[t]{#3}{%
- \captionbox@settype\relax
+ \parbox[t]{#4}{%
+ #1\relax
\caption@setposition t%
- \vbox{\caption#1{#2}}%
+ \vbox{\caption#2{#3}}%
\captionbox@hrule
- \csname caption@hj@#4\endcsname
+ \csname caption@hj@#5\endcsname
\unhbox\@tempboxa}%
}{%
\endgroup
- \parbox[b]{#3}{%
- \captionbox@settype\relax
+ \parbox[b]{#4}{%
+ #1\relax
\caption@setposition b%
- \csname caption@hj@#4\endcsname
+ \csname caption@hj@#5\endcsname
\unhbox\@tempboxa
\captionbox@hrule
- \vtop{\caption#1{#2}}}%
+ \vtop{\caption#2{#3}}}%
}}
\newcommand*\captionbox@hj@default{c}
\newcommand*\captionbox@hrule{\hrule\@height\z@\relax}
@@ -803,42 +824,38 @@
\providecommand*\caption@hj@s{}
\def\ContinuedFloat{%
\caption@iftype
- {\addtocounter\@captype\m@ne
- \caption@ContinuedFloat\@captype}%
+ {\caption@ContinuedFloat\@captype}%
{\caption@Error{\noexpand\ContinuedFloat outside float}}}
-\def\caption@ContinuedFloat#1{%
- \@ifstar{\caption@Continued@Float@{#1}}{\caption@Continued@Float{#1}}}
-\def\caption@Continued@Float@{%
- \addtocounter\@captype\@ne
- \@stpelt{ContinuedFloat}\stepcounter{ContinuedFloat}%
- \def\caption@resetContinuedFloat##1{\xdef\caption@CFtype{##1}}%
- \caption@@ContinuedFloat}
-\def\caption@Continued@Float#1{%
+\newcommand*\caption@ContinuedFloat[1]{%
+ \@ifstar
+ {\caption@@refstepcounter\@captype
+ \caption@@ContinuedFloat{#1}}%
+ {\caption@Continued@Float{#1}}}
+\newcommand*\caption@Continued@Float[1]{%
\edef\caption@tempa{#1}%
\ifx\caption@tempa\caption@CFtype
- \stepcounter{ContinuedFloat}%
- \let\caption@resetContinuedFloat\@gobble
\caption@@ContinuedFloat{#1}%
- \sf@ContinuedFloat{#1}%
\else
\caption@Error{Continued `#1' after `\caption@CFtype'}%
\fi}
-\def\caption@@ContinuedFloat#1{%
+\newcommand*\caption@@ContinuedFloat[1]{%
+ \global\caption@ContinuedFloattrue
+ \stepcounter{ContinuedFloat}%
+ \caption@@@ContinuedFloat{#1}}
+\newcommand*\caption@@@ContinuedFloat[1]{%
+ \caption@setoptions{ContinuedFloat}%
+ \caption@setoptions{continued#1}%
\expandafter\l@addto@macro\csname the#1\endcsname\theContinuedFloat
\@ifundefined{theH#1}{}{%
\expandafter\l@addto@macro\csname theH#1\endcsname{%
\@alph\c@ContinuedFloat}}%
- \caption@setoptions{ContinuedFloat}%
- \caption@setoptions{continued#1}}
-\providecommand*\sf@ContinuedFloat[1]{}
+ \let\caption@@@ContinuedFloat\@gobble}
\newcommand*\caption@CFtype{??}
\newcounter{ContinuedFloat}
\let\theContinuedFloat\@empty
\newcommand*\caption@resetContinuedFloat[1]{%
- \@stpelt{ContinuedFloat}%
\xdef\caption@CFtype{#1}%
- \def\ContinuedFloat{\caption@Error{%
- \noexpand\ContinuedFloat must be placed at the top of the environment}}}
+ \@stpelt{ContinuedFloat}}
\newcommand\phantomcaption{%
\caption@iftype
{\caption@refstepcounter\@captype}%
@@ -846,28 +863,63 @@
\newcommand*\caption@refstepcounter[1]{%
\@ifundefined{c@#1}%
{\caption@Error{No float type '#1' defined}}%
- {\caption@resetContinuedFloat{#1}%
- \caption@@refstepcounter{#1}%
- \let\caption@ifrefstepcounter\@firstoftwo}}
-\newcommand*\caption@@refstepcounter{\refstepcounter}
-\let\caption@ifrefstepcounter\@secondoftwo
-\caption@ifundefined\kernel@ifnextchar
- {\newcommand\caption@dblarg[1]{\@ifnextchar[{#1}{\caption@xdblarg{#1}}}}%
- {\newcommand\caption@dblarg[1]{\kernel@ifnextchar[{#1}{\caption@xdblarg{#1}}}}%
-\newcommand\caption@xdblarg[2]{#1[{#2\relax}]{#2}}%
+ {\caption@ref@stepcounter{#1}%
+ \caption@fixposition
+ \caption@iftop{\global\caption@captiontrue}{\global\caption@captionfalse}%
+ \global\caption@subcaptionfalse
+ \@nameuse{donemaincaptiontrue}}}
+\newcommand*\caption@ref@stepcounter{%
+ \ifcaption@ContinuedFloat
+ \let\caption@tempa\caption@@refcounter
+ \global\caption@ContinuedFloatfalse
+ \else
+ \let\caption@tempa\caption@@refstepcounter
+ \ifcaption@caption \else
+ \ifcaption@subcaption
+ \let\caption@tempa\caption@@refcounter
+ \fi
+ \fi
+ \fi
+ \caption@tempa}
+\newcommand*\caption@@refcounter[1]{%
+ \let\caption@stepcounter@ORI\stepcounter
+ \def\stepcounter##1{%
+ \def\caption@tempa{#1}%
+ \def\caption@tempb{##1}%
+ \ifx\caption@tempa\caption@tempb \else
+ \caption@stepcounter@ORI{##1}%
+ \fi}%
+ \caption@@@refstepcounter{#1}%
+ \let\stepcounter\caption@stepcounter@ORI}
+\newcommand*\caption@@refstepcounter[1]{%
+ \caption@prepare@stepcounter{#1}{ref}%
+ \caption@@@refstepcounter{#1}}
+\newcommand*\caption@@stepcounter[1]{%
+ \caption@prepare@stepcounter{#1}{}%
+ \caption@@@stepcounter{#1}}
+\newcommand*\caption@prepare@stepcounter[2]{%
+ \flushsubcaptionlistentries[#2stepcounter]%
+ \caption@resetContinuedFloat{#1}}
+\newcommand*\caption@@@refstepcounter{\refstepcounter}
+\newcommand*\caption@@@stepcounter{\stepcounter}
+\@ifundefined{kernel@ifnextchar}{\let\kernel@ifnextchar\@ifnextchar}{}
+\newcommand\caption@dblarg[1]{%
+ \kernel@ifnextchar[{\caption@ydblarg{#1}}{\caption@xdblarg{#1}}}
+\newcommand\caption@xdblarg[2]{%
+ #1[{#2\relax}]{#2}}
+\long\def\caption@ydblarg#1[#2]#3{%
+ \caption@iflistheading{#1[{#3}]{#3}}{#1[{#2}]{#3}}}
\newcommand*\caption@begin[1]{%
+ \caption@fixposition
\begingroup
- \caption@setfnum{#1}%
- \caption@fixposition
- \global\let\caption@fixedposition\caption@position}
+ \caption@setfnum{#1}}
\newcommand\caption@beginex[3]{%
\caption@begin{#1}%
\let\lst@@caption\relax
\caption@addcontentsline{#1}{#2}%
\caption@ifempty{#3}{}}
\newcommand*\caption@end{%
- \endgroup
- \let\caption@position\caption@fixedposition}
+ \endgroup}
\newcommand*\caption@setfnum[1]{%
\@ifundefined{fnum@#1}{\iftrue}{\ifx\caption@lfmt\caption@lfmt@default\else}%
\@namedef{fnum@#1}{\caption@fnum{#1}}%
@@ -904,7 +956,6 @@
{\NR@gettitle{#1}}}
\def\caption@DeclareSubType sub#1\@nil{%
\caption@Debug{Initializing subtype for `#1'\@gobble}%
- \@namedef{caption@c@#1}{0}%
\@namedef{caption@beginsub#1}{\caption@beginsubfloat{#1}}}
\@onlypreamble\caption@DeclareSubType
\caption@For*{subtypelist}{\caption@DeclareSubType sub#1\@nil}
@@ -915,21 +966,20 @@
\newcommand*\caption@subtypehook{%
\ifx\caption\caption@subcaption \else
\caption@warmup
- \caption@ifrefstepcounter{}{%
- % no \caption or \subcaption in this (floating) environment yet
- \caption@Debug{Increment \@captype\ counter =\the\value\@captype}%
- \caption@l@stepcounter\@captype
- \let\caption@@@addcontentsline\caption@addsubcontentsline}%
- \ifnum\csname caption@c@\@captype\endcsname=\value\@captype \else
- \caption@Debug{Reset sub\@captype\ counter}%
- \expandafter\xdef\csname caption@c@\@captype\endcsname{%
- \the\value\@captype}%
- \@stpelt\@subcaptype
+ \ifcaption@caption \else
+ \let\caption@add@contentsline\caption@addsubcontentsline
+ \ifcaption@subcaption \else
+ \ifcaption@ContinuedFloat
+ \global\caption@ContinuedFloatfalse
+ \else
+ \caption@@stepcounter\@captype
+ \fi
+ \global\caption@subcaptiontrue
+ \fi
\fi
\c@ContinuedFloat=0\relax
- \let\caption@resetContinuedFloat\@gobble
- \let\caption@addcontentsline\caption@kernel@addcontentsline
\let\caption@setfloatcapt\@firstofone
+ \caption@setbox{parbox}%
\caption@clearmargin
\caption@iflist{}{\let\caption@setlist\@gobble}%
\caption@setoptions{sub}%
@@ -954,25 +1004,20 @@
\newcommand*\caption@subcaption{%
\caption@checkgrouplevel{sub}\subcaption
\caption@star
- {\caption@refstepcounter\@subcaptype}%
+ {\caption@@@refstepcounter\@subcaptype}%
{\caption@dblarg{\@caption\@subcaptype}}}
\newcommand*\caption@subphantom{%
\caption@checkgrouplevel{sub}\phantomsubcaption
- \caption@refstepcounter\@subcaptype}
-\let\caption@kernel@addcontentsline\caption@addcontentsline
-\renewcommand\caption@addcontentsline[2]{%
- \sf@ifpositiontop{\@listsubcaptions{#1}}{}%
- \caption@kernel@addcontentsline{#1}{#2}%
- \sf@ifpositiontop{}{\@listsubcaptions{#1}}%
- \caption@addsubcontentslines{#1}}
-\newcommand*\caption@addsubcontentslines[1]{%
- \begingroup
- \caption@subcontentslines
- \endgroup
- \caption@clearsubcontentslines}%
+ \caption@@@refstepcounter\@subcaptype}
+\newcommand*\caption@clearsubcontentslines{%
+ \global\let\caption@subcontentslines\@empty}
+\caption@clearsubcontentslines
\newcommand*\caption@addsubcontentsline[4]{%
+ \caption@Debug{\string\caption@addsubcontentsline{#1}{#2}}%
\begingroup
- \let\label\caption@gobble \let\index\caption@gobble \let\glossary\caption@gobble
+ \let\label\caption@gobble
+ \let\index\caption@gobble
+ \let\glossary\caption@gobble
\protected@edef\@tempa{\endgroup
\noexpand\g@addto@macro\noexpand\caption@subcontentslines{%
\noexpand\@namedef{the#2}{\csname the#2\endcsname}%
@@ -981,20 +1026,22 @@
\fi
\protect\caption@@@addcontentsline{#1}{#2}{#3}{#4}}}%
\@tempa}
-\newcommand*\caption@checksubcontentslines{%
- \ifx\caption@subcontentslines\@empty \else
- \caption@Error{%
- Something's wrong--perhaps a missing \protect\caption\MessageBreak
- in the last figure or table}%
- \caption@clearsubcontentslines
- \fi}
-\newcommand*\caption@clearsubcontentslines{%
- \global\let\caption@subcontentslines\@empty}
-\caption@AtBeginDocument*{%
- \caption@ifundefined\sf@ifpositiontop{\let\sf@ifpositiontop\@gobbletwo}{}%
- \caption@clearsubcontentslines
- \g@addto@macro\caption@typehook{\caption@checksubcontentslines}%
- \AtEndDocument{\caption@checksubcontentslines}}%
+\newcommand*\flushsubcaptionlistentries[1][user]{%
+ \caption@Debug{\string\flushsubcaptionlistentries (#1)}%
+ \begingroup
+ \caption@subcontentslines
+ \endgroup
+ \caption@clearsubcontentslines}
+\AtBeginDocument{\caption@ifundefined\chapter{}{%
+ \let\caption@chapter@ORI\chapter
+ \def\chapter{%
+ \flushsubcaptionlistentries[chapter]\caption@chapter@ORI}}}
+\AtBeginDocument{\caption@ifundefined\appendix{}{%
+ \let\caption@appendix@ORI\appendix
+ \def\appendix{%
+ \flushsubcaptionlistentries[appendix]\caption@appendix@ORI}}}
+\AtEndDocument{%
+ \flushsubcaptionlistentries[AtEndDocument]}
\caption@ifundefined\smf@makecaption{}{\let\smf@makecaption\@makecaption}
\@ifclassloaded{beamer}{%
\caption@InfoNoLine{beamer document class}%
@@ -1085,19 +1132,13 @@
\caption@setbool{needfreeze}{0}
\caption@AtBeginDocument*{%
\caption@ifneedfreeze{%
- \newcommand*\caption@freeze{%
+ \newcommand*\caption@freeze[1]{%
+ \caption@settype*{#1}%
+ \captionsetup*[sub]{hypcap=true}% Note: This is just a (q&d) workaround!
\let\caption@frozen@ContinuedFloat\ContinuedFloat
\def\ContinuedFloat{%
- \caption@withoptargs\caption@SC@ContinuedFloat}%
- \def\caption@SC@ContinuedFloat##1{%
- \caption@@freeze{\ContinuedFloat##1}%
- \let\caption@frozen@setcounter\setcounter
- \let\caption@frozen@addtocounter\addtocounter
- \def\setcounter####1####2{\csname c@####1\endcsname####2\relax}%
- \def\addtocounter####1####2{\advance\csname c@####1\endcsname ####2\relax}%
- \caption@frozen@ContinuedFloat##1%
- \let\setcounter\caption@frozen@setcounter
- \let\addtocounter\caption@frozen@addtocounter}%
+ \caption@@freeze{\caption@@@ContinuedFloat\@captype}%
+ \caption@frozen@ContinuedFloat}%
\let\caption@frozen@setup\caption@setup
\def\caption@setup##1{%
\caption@@freeze{\caption@setup{##1}}%
@@ -1110,11 +1151,7 @@
\caption@gobble}%
\@ifstar
{\caption@SC@caption*}%
- {\let\caption@frozen@refstepcounter\caption@@refstepcounter
- \let\caption@@refstepcounter\caption@l@stepcounter
- \caption@refstepcounter\@captype
- \let\caption@@refstepcounter\caption@frozen@refstepcounter
- \let\@currentlabel\caption@SClabel
+ {\let\@currentlabel\caption@SClabel
\caption@withoptargs\caption@SC@caption}}%
\long\def\caption@SC@caption##1##2{%
\caption@@freeze{\caption##1{##2}}%
@@ -1141,6 +1178,8 @@
\let\caption@setup\caption@frozen@setup
\let\caption\caption@frozen@caption
\let\label\caption@frozen@label}}%
+ \newcommand*\caption@prepare@defrost{%
+ \let\caption@settype\caption@set@type}
\newcommand*\caption@defrost{%
\ifx\caption@frozen@caption\@undefined
\caption@frozen@content
@@ -1227,13 +1266,7 @@
\def\FP@captype{#1}%
\begin{lrbox}{\FP@floatCorpusBOX}%
\minipage\hsize % changes from LR mode to vertical mode
- \caption@settype*{#1}%
- \caption@freeze
- \global\let\FP@Label\@empty
- \caption@ifFPrefcap
- {}%
- {\def\caption@freeze@label##1##2{%
- \g@addto@macro\FP@Label{\FP@label##1{##2}}}}%
+ \caption@freeze{#1}%
\ignorespaces}%
\renewcommand*\FP@floatEnd{%
\endminipage
@@ -1241,33 +1274,16 @@
\stepcounter{FP@\FP@captype C}%
\caption@label\FP@positionLabel
\FP@helpNote\FP@captype\FP@positionLabel
- \edef\FP@RestoreCounter{%
- \noexpand\setcounter{\FP@captype}{\the\value\FP@captype}%
- \noexpand\setcounter{ContinuedFloat}{\the\value{ContinuedFloat}}}%
\FP@float
{\FP@positionLabel}% location label test
- {\begin\FP@captype[p!]%
+ {\caption@prepare@defrost
+ \begin\FP@captype[p!]%
\usebox\FP@floatCorpusBOX
- \let\caption@SClentry\@empty
- \def\caption{\caption@dblarg{\@caption\@captype}}%
- \long\def\@caption##1[##2]##3{\def\caption@SClentry{##2}}%
- \let\FP@label\label
- \let\label\caption@gobble
- \caption@defrost
- \caption@ifFPlistcap
- {\caption@refstepcounter\@captype
- \expandafter\caption@makecurrent\expandafter\@captype
- \expandafter{\caption@SClentry}}%
- {\ifx\caption@SClentry\@empty \else
- \expandafter\captionlistentry\expandafter{\caption@SClentry}%
- \fi}%
- \caption@makeanchor\relax
- \FP@Label
\end\FP@captype}%
- {\FP@RestoreCounter
- \@ifundefined{theH\FP@captype}{}{%
+ {\@ifundefined{theH\FP@captype}{}{%
\expandafter\l@addto@macro\csname theH\FP@captype\endcsname{.FP}}}%
- {\begin\FP@captype[b!]%
+ {\caption@prepare@defrost
+ \begin\FP@captype[b!]%
\let\FP@savedSetfnumCommand\caption@setfnum
\def\caption@setfnum##1{%
\FP@savedSetfnumCommand{##1}%
@@ -1278,7 +1294,6 @@
\setlength\belowcaptionskip{2pt plus 2pt minus 1pt}% length below caption
\caption@setoptions{FP\@captype}%
\FP@separatorCaption
- \caption@ifFPlistcap{}{\let\caption@addcontentsline\@gobbletwo}%
\caption@defrost
\end\FP@captype}%
}%
@@ -1305,7 +1320,7 @@
because hyperref has stopped early}%
}{%
\g@addto@macro\caption@prepareslc{\measuring@true}%
- \renewcommand*\caption@@refstepcounter{\H@refstepcounter}%
+ \renewcommand*\caption@@@refstepcounter{\H@refstepcounter}%
\renewcommand*\caption@makecurrent[2]{%
\caption@makecurrentHref{#1}%
\caption@Debug{hyperref current=\@currentHref}%
@@ -1383,6 +1398,12 @@
\caption@startanchor\caption@currentHref
\global\let\caption@currentHref\@undefined
\fi}%
+ \caption@ifundefined\HyNew@float@makebox{}{%
+ \caption@ifundefined\HyOrg@float@makebox{%
+ \caption@Debug{%
+ Correcting wrong load order hyperref-float\@gobble}%
+ \let\HyOrg@float@makebox\float@makebox
+ \let\float@makebox\HyNew@float@makebox}{}}%
\caption@ifundefined\HyOrg@float@makebox{}{%
\caption@Debug{%
Redefining \noexpand\float@makebox (again)\@gobble}%
@@ -1466,7 +1487,7 @@
\caption@setoptions{@longtable}%
\caption@setautoposition{\ifcase\LT@rows t\else b\fi}%
\caption@startrue#1\caption@starfalse
- \caption@resetContinuedFloat\LTcaptype
+ \caption@prepare@stepcounter\LTcaptype{LT}%
\caption@begin\LTcaptype
\caption@normalsize
\vskip-\ht\strutbox
@@ -1551,18 +1572,14 @@
\def\rotcaptionof{%
\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
- \caption@clearmargin
- \let\caption@parbox\@secondoftwo}%
- \caption@set@bool\caption@ifslc0% been there, done that
- \fi
- \rotatebox{90}{\caption@makerot{#1}{#2}}%
+ \rotatebox{90}{%
+ \ifdim\captionwidth=\z@
+ \setcaptionwidth{.8\vsize}%
+ \l@addto@macro\caption@singleline{\caption@setbox{none}}%
+ \fi
+ \let\caption@calcmargin\relax
+ \caption@@make{#1}{#2}}%
\nobreak\hspace{12pt}}%
- \newcommand\caption@makerot[2]{%
- \begin{minipage}\captionwidth\caption@@make{#1}{#2}\end{minipage}}%
}{}
\caption@IfPackageLoaded{sidecap}[2003/06/06 v1.6f]{%
\caption@setbool{needfreeze}{1}%
@@ -1570,20 +1587,12 @@
\def\SC@zfloat#1#2#3[#4]{%
\caption@ORI@SC@zfloat{#1}{#2}{#3}[#4]%
\SC@RestoreCommands
- \caption@settype*{#2}%
- \caption@freeze
+ \caption@freeze{#2}%
\let\SC@label\label}%
\providecommand*\SC@RestoreCommands{%
\let\caption=\SC@orig@caption \let\label=\SC@orig@label}%
\let\caption@ORI@endSC@FLOAT\endSC@FLOAT
\def\endSC@FLOAT{%
- \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
\ifx\SC@justify\@empty \else
@@ -1591,8 +1600,13 @@
\let\SC@justify\@empty
\fi}%
\let\caption\SC@orig@caption
- \def\SC@orig@caption[##1]##2{\caption@defrost}%
+ \def\SC@orig@caption[##1]##2{%
+ \caption@setSC@justify
+%%% \caption@setoptions{SC}%
+ \caption@setoptions{SC\@captype}%
+ \caption@defrost}%
\caption@setSC@justify % for compatibility mode
+ \caption@prepare@defrost
\caption@ORI@endSC@FLOAT}%
}{}
\caption@IfPackageLoaded{subfigure}[2002/01/23 v2.1]{%
@@ -1708,7 +1722,7 @@
\@ifundefined{fst@#1}{}{\@float@setevery{#1}}%
\caption@settype{#1}%
\caption@clearmargin
-%%% \caption@setoptions{wrapfloat}%
+%%% \caption@setoptions{wrap}%
\caption@setoptions{wrap#1}}%
}{}
\endinput
diff --git a/Master/texmf-dist/tex/latex/caption/caption2.sty b/Master/texmf-dist/tex/latex/caption/caption2.sty
index 0cf8f362070..415b7241b01 100644
--- a/Master/texmf-dist/tex/latex/caption/caption2.sty
+++ b/Master/texmf-dist/tex/latex/caption/caption2.sty
@@ -6,7 +6,7 @@
%%
%% caption2.dtx (with options: `package')
%%
-%% Copyright (C) 1994-2012 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
+%% Copyright (C) 1994-2013 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
%%
%% --------------------------------------------------------------------------
%%
diff --git a/Master/texmf-dist/tex/latex/caption/caption3.sty b/Master/texmf-dist/tex/latex/caption/caption3.sty
index 1187760af37..17eb5c5743c 100644
--- a/Master/texmf-dist/tex/latex/caption/caption3.sty
+++ b/Master/texmf-dist/tex/latex/caption/caption3.sty
@@ -6,7 +6,7 @@
%%
%% caption3.dtx (with options: `package')
%%
-%% Copyright (C) 1994-2012 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
+%% Copyright (C) 1994-2013 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
%%
%% --------------------------------------------------------------------------
%%
@@ -29,7 +29,7 @@
%% and the user manuals caption-deu.tex, caption-eng.tex, and caption-rus.tex.
%%
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption3}[2012/01/12 v1.4b caption3 kernel (AR)]
+\ProvidesPackage{caption3}[2013/01/06 v1.5 caption3 kernel (AR)]
\providecommand*\@nameundef[1]{%
\expandafter\let\csname #1\endcsname\@undefined}
\providecommand\l@addto@macro[2]{%
@@ -122,24 +122,25 @@
\AtBeginDocument{\let\caption@ifatletter\@secondoftwo}
\newcommand*\caption@withoptargs[1]{%
\@ifstar
- {\def\caption@tempa{*}\caption@@withoptargs#1}%
- {\def\caption@tempa{}\caption@@withoptargs#1}}
+ {\def\caption@tempa{*}\caption@@withoptargs{#1}}%
+ {\def\caption@tempa{}\caption@@withoptargs{#1}}}
\def\caption@@withoptargs#1{%
\@ifnextchar[%]
- {\caption@@@withoptargs#1}%
- {\caption@@@@withoptargs#1}}
+ {\caption@@@withoptargs{#1}}%
+ {\caption@@@@withoptargs{#1}}}
\def\caption@@@withoptargs#1[#2]{%
\l@addto@macro\caption@tempa{[{#2}]}%
- \caption@@withoptargs#1}
+ \caption@@withoptargs{#1}}
\def\caption@@@@withoptargs#1{%
- \expandafter#1\expandafter{\caption@tempa}}
+ \def\caption@tempb{#1}%
+ \expandafter\caption@tempb\expandafter{\caption@tempa}}
\DeclareRobustCommand*\caption@gobble{%
\caption@withoptargs\@gobbletwo}
\newcommand\caption@DoCheckCommand[2]{%
\begingroup
- \let\@tempa#1%
+ \let\caption@tempa#1%
#2%
- \ifx\@tempa#1%
+ \ifx\caption@tempa#1%
\endgroup
\let\caption@CheckCommand\@gobbletwo
\else
@@ -175,7 +176,7 @@
\newcommand*\caption@Info[1]{%
\PackageInfo{caption}{#1}}
\newcommand*\caption@InfoNoLine[1]{%
- \PackageInfo{caption}{#1\@gobble}}
+ \caption@Info{#1\@gobble}}
\newcommand*\caption@Warning[1]{%
\caption@WarningNoLine{#1\on@line}}
\newcommand*\caption@WarningNoLine[1]{%
@@ -205,8 +206,11 @@
\caption@teststar\caption@declareoption\AtEndOfPackage\@gobble}
\@onlypreamble\DeclareCaptionOption
\newcommand*\caption@declareoption[2]{%
- #1{\undefine@key{caption}{#2}}\define@key{caption}{#2}}
+ #1{\undefine@key{caption}{#2}}\caption@declare@option{#2}}
\@onlypreamble\caption@declareoption
+\newcommand*\caption@declare@option{%
+ \define@key{caption}}
+%% no \@onlypreamble\caption@declare@option, will be used by \captionsetup
\newcommand*\DeclareCaptionOptionNoValue{%
\caption@teststar\caption@declareoption@novalue\AtEndOfPackage\@gobble}
\@onlypreamble\DeclareCaptionOptionNoValue
@@ -228,7 +232,16 @@
\captionsetup@startrue#1\captionsetup@starfalse
\@ifnextchar[\caption@setup@options\caption@setup}
\newcommand*\caption@setup{\caption@setkeys{caption}}
-\def\caption@setup@options[#1]#2{%
+\def\caption@setup@options[#1]{%
+ \@ifnextchar[%
+ {\caption@stepthecounter
+ \caption@withoptargs{\@expandtwoargs
+ \caption@setup@options@i{#1}{@\caption@thecounter}}}%
+ {\caption@setup@options@{#1}}}
+\newcommand*\caption@setup@options@i[4]{%
+ \caption@setup@options@{#1}{#2}%
+ \caption@declare@option{#2}[]{\captionsetup#3{#4}}}
+\newcommand*\caption@setup@options@[2]{%
\@bsphack
\ifcaptionsetup@star\captionsetup@starfalse\else\caption@addtooptlist{#1}\fi
\expandafter\caption@l@addto@list\csname caption@opt@#1\endcsname{#2}%
@@ -388,6 +401,7 @@
\newdimen\captionmargin
\newdimen\captionmargin@
\newdimen\captionwidth
+\newdimen\caption@tempdima
\DeclareCaptionOption{margin}{\setcaptionmargin{#1}}
\DeclareCaptionOption{margin*}{\setcaptionmargin*{#1}}
\DeclareCaptionOption{width}{\setcaptionwidth{#1}}
@@ -433,7 +447,7 @@
\caption@teststar{\caption@@setcalcmargin\caption@setwidth}%
\@secondoftwo\@firstoftwo}
\newcommand*\caption@thecounter{0}
-\newcommand*\caption@stepcounter{%
+\newcommand*\caption@stepthecounter{%
\@tempcnta\caption@thecounter
\advance\@tempcnta\@ne
\xdef\caption@thecounter{\the\@tempcnta}}
@@ -508,8 +522,6 @@
\@onlypreamble\caption@declarestyle
\DeclareCaptionOption{style}{\caption@setstyle{#1}}
\DeclareCaptionOption{style*}{\caption@setstyle*{#1}}
-\DeclareCaptionOption{singlelinecheck}[1]{\caption@set@bool\caption@ifslc{#1}}
-\DeclareCaptionOption{slc}[1]{\KV@caption@singlelinecheck{#1}}
\newcommand*\caption@setstyle{%
\caption@teststar\caption@@setstyle\@gobble\@firstofone}
\newcommand*\caption@@setstyle[2]{%
@@ -529,6 +541,7 @@
\expandafter{\caption@sls}}}
\newcommand*\caption@resetstyle{%
\caption@setup{%
+ box=parbox,boxcolor=white,%
format=plain,labelformat=default,labelsep=colon,textformat=simple,%
justification=justified,font=,size=,labelfont=,textfont=,%
margin=0pt,minmargin=0,maxmargin=0,%
@@ -537,8 +550,26 @@
\caption@clearsetup{singleline}}
\DeclareCaptionStyle{base}[indent=0pt,justification=centering]{}
\DeclareCaptionStyle{default}[indent=0pt,justification=centering]{%
- format=default,labelsep=default,textformat=default,%
+ box=default,format=default,labelsep=default,textformat=default,%
justification=default,font=default,labelfont=default,textfont=default}
+\DeclareCaptionOption{singlelinecheck}[1]{\caption@set@bool\caption@ifslc{#1}}
+\DeclareCaptionOption{slc}[1]{\KV@caption@singlelinecheck{#1}}
+\newcommand*\DeclareCaptionBox[2]{%
+ \global\long\@namedef{caption@box@#1}##1##2{#2}}
+\@onlypreamble\DeclareCaptionBox
+\DeclareCaptionOption{box}{\caption@setbox{#1}}
+\newcommand*\caption@setbox[1]{%
+ \@ifundefined{caption@box@#1}%
+ {\caption@Error{Undefined box `#1'}}%
+ {\expandafter\let\expandafter\caption@box\csname caption@box@#1\endcsname}}
+\DeclareCaptionBox{empty}{}
+\DeclareCaptionBox{none}{#2}
+\DeclareCaptionBox{parbox}{\parbox[b]{#1}{#2}}
+\DeclareCaptionBox{colorbox}{\colorbox{\caption@boxcolor}{%
+ \addtolength\caption@tempdima{-2\fboxsep}%
+ \caption@box@parbox\caption@tempdima{#2}}}
+\DeclareCaptionOption{boxcolor}{\def\caption@boxcolor{#1}}
+\def\caption@box@default{\caption@box@parbox}
\newcommand*\DeclareCaptionFormat{%
\caption@teststar\caption@declareformat\@gobble\@firstofone}
\@onlypreamble\DeclareCaptionFormat
@@ -898,6 +929,24 @@
\hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
\fi
\vskip\belowcaptionskip}}
+\providecommand*\caption@ifelsarticleclass{%
+ \@ifclassloaded{elsarticle}\@firstofone\@gobble}
+\@onlypreamble\caption@ifelsarticleclass
+\caption@ifelsarticleclass{%
+ \caption@CheckCommand\@makecaption{%
+ % elsarticle.cls,v 1.20 2008-10-13 04:24:12 cvr Exp
+ \long\def\@makecaption#1#2{%
+ \vskip\abovecaptionskip\footnotesize
+ \sbox\@tempboxa{#1: #2}%
+ \ifdim \wd\@tempboxa >\hsize
+ #1: #2\par
+ \else
+ \global \@minipagefalse
+ \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
+ \fi
+ \vskip\belowcaptionskip}}
+ \DeclareCaptionDefaultFont{font}{\footnotesize}
+}
\providecommand*\caption@ifamsclass{%
\caption@ifundefined\@captionheadfont\@gobble\@firstofone}
\@onlypreamble\caption@ifamsclass
@@ -1220,16 +1269,18 @@
{\caption@Debug{addcontentsline: #1 => \caption@listtype}%
\@namedef{the\caption@listtype}{\@nameuse{the#1}}}%
\expandafter\caption@@addcontentsline\expandafter{\caption@listtype}{#2}%
- \endgroup}}
+ \endgroup}%
+ \caption@addsubcontentslines{#1}}
\newcommand\caption@@addcontentsline[2]{%
{\let\\\space
\@ifundefined{ext@#1}%
{\caption@Error{No float type '#1' defined}}%
- {\caption@@@addcontentsline
+ {\caption@add@contentsline
{\csname ext@#1\endcsname}%
{#1}%
{\caption@lstfmt{\@nameuse{p@#1}}{\@nameuse{the#1}}}%
{\ignorespaces #2}}}}
+\newcommand*\caption@add@contentsline{\caption@@@addcontentsline}
\newcommand*\caption@@@addcontentsline[4]{%
\addcontentsline{#1}{#2}{\protect\numberline{#3}{#4}}}
\newcommand\caption@ifcontentsline[1]{%
@@ -1241,24 +1292,15 @@
\else
\expandafter\@firstofone
\fi}
+\newcommand*\caption@addsubcontentslines[1]{}
\newif\ifcaption@star
\newcommand*\caption@fnum[1]{\caption@lfmt{\@nameuse{#1name}}{\@nameuse{the#1}}}
\newcommand\caption@make[2]{\caption@@make{\caption@lfmt{#1}{#2}}}
\newcommand\caption@@make[2]{%
\begingroup
- \caption@stepcounter
+ \caption@stepthecounter
\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@slc{#1}{#2}\captionwidth\relax}{}%
+ \caption@ifslc{\caption@slc{#1}{#2}\caption@singleline\relax}{}%
\caption@calcmargin
\@tempdima\captionmargin
\ifdim\captionmargin@=\z@ \else
@@ -1266,9 +1308,9 @@
\fi
\caption@ifh{\advance\@tempdima\caption@indent}%
\hspace\@tempdima
- \@tempdima\captionwidth
- \caption@ifh{\advance\@tempdima-\caption@indent}%
- \caption@parbox\@tempdima{%
+ \caption@tempdima\captionwidth
+ \caption@ifh{\advance\caption@tempdima-\caption@indent}%
+ \caption@parbox\caption@tempdima{%
\caption@ifh{%
\ifdim\caption@indent=\z@
\leavevmode
@@ -1286,6 +1328,16 @@
\global\caption@starfalse}
\newcommand*\caption@calcmargin{%
\caption@calcmargin@hook
+ \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
\ifdim\captionwidth=\z@
\captionwidth\linewidth
\advance\captionwidth by -2\captionmargin
@@ -1306,21 +1358,19 @@
\string\width=\the\captionwidth}%
}
\newcommand\caption@slc[4]{%
- \caption@@slc{#1}{#2}{#3}{\caption@singleline#4}{}}
-\newcommand\caption@@slc[5]{%
\caption@Debug{Begin SLC}%
\begingroup
\caption@singleline
\let\caption@hj\@empty
- \caption@calcmargin % calculate #3 if necessary
+ \caption@calcmargin % calculate \captionwidth
\caption@prepareslc
\sbox\@tempboxa{\caption@@@make{#1}{#2}}%
- \ifdim\wd\@tempboxa>#3%
+ \ifdim\wd\@tempboxa>\captionwidth
\endgroup
- #5%
+ #4%
\else
\endgroup
- #4%
+ #3%
\fi
\caption@Debug{End SLC}}
\newcommand*\caption@singleline{%
@@ -1344,7 +1394,7 @@
\endgroup}
\newcommand*\caption@l@stepcounter[1]{%
\advance\csname c@#1\endcsname\@ne\relax}
-\newcommand*\caption@parbox{\parbox[b]}
+\newcommand*\caption@parbox{\caption@box}
\newcommand*\caption@applyfont{%
\caption@hj\captionfont\captionsize}
\newcommand\caption@@@make[2]{%
@@ -1424,33 +1474,6 @@
\edef\@tempa{\def\noexpand\newfloat@hook####1{\the\toks@}}%
\@tempa}
\providecommand*\newfloat@hook[1]{}
-\newcommand*\caption@patch@stpelt{%
- \let\caption@stpelt\@stpelt
- \def\@stpelt##1{%
- \caption@stpelt{##1}%
- \begingroup
- \let\@elt\caption@stpelt
- \csname caption@cl@##1\endcsname
- \endgroup}%
- \let\caption@patch@stpelt\relax}
-\@onlypreamble\caption@patch@stpelt
-\newcommand*\caption@addtoreset[2]{%
- \caption@patch@stpelt
- \@ifundefined{caption@cl@#2}{\@namedef{caption@cl@#2}{}}{}%
- \expandafter\@cons\csname caption@cl@#2\endcsname{{#1}}}
-\@onlypreamble\caption@addtoreset
-\newcommand*\caption@removefromreset[2]{%
- \begingroup
- \expandafter\let\csname c@#1\endcsname\caption@removefromreset
- \def\@elt##1{%
- \expandafter\ifx\csname c@##1\endcsname\caption@removefromreset
- \else
- \noexpand\@elt{##1}%
- \fi}%
- \expandafter\xdef\csname caption@cl@#2\endcsname{%
- \csname caption@cl@#2\endcsname}%
- \endgroup}
-\@onlypreamble\caption@removefromreset
\newcommand*\DeclareCaptionSubType{%
\caption@teststar\caption@declaresubtype\@firstoftwo\@secondoftwo}
\@onlypreamble\DeclareCaptionSubType
@@ -1463,7 +1486,7 @@
{\@ifundefined{c@sub#3}%
{\caption@Debug{New subtype `sub#3'}%
\newcounter{sub#3}%
- \caption@addtoreset{sub#3}{#3}%
+ \@addtoreset{sub#3}{#3}%
\@namedef{ext@sub#3}{\csname ext@#3\endcsname}%
\caption@declaresublistentry{#3}%
\@cons\caption@subtypelist{{#3}}}%
@@ -1547,7 +1570,7 @@
\endgroup}
\def\sf@NEW@subfloat{%
\begingroup
- \@nameuse{caption@warmup}%
+ \@nameuse{caption@warmup}%
\caption@setfloattype\@captype
\sf@ifpositiontop{%
\maincaptiontoptrue
diff --git a/Master/texmf-dist/tex/latex/caption/ltcaption.sty b/Master/texmf-dist/tex/latex/caption/ltcaption.sty
index 20778a3fc41..58bf6ddc01d 100644
--- a/Master/texmf-dist/tex/latex/caption/ltcaption.sty
+++ b/Master/texmf-dist/tex/latex/caption/ltcaption.sty
@@ -6,7 +6,7 @@
%%
%% ltcaption.dtx (with options: `package')
%%
-%% Copyright (C) 1994-2012 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
+%% Copyright (C) 1994-2013 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
%%
%% --------------------------------------------------------------------------
%%
diff --git a/Master/texmf-dist/tex/latex/caption/newfloat.sty b/Master/texmf-dist/tex/latex/caption/newfloat.sty
index b4ccd4b4610..507be3322d4 100644
--- a/Master/texmf-dist/tex/latex/caption/newfloat.sty
+++ b/Master/texmf-dist/tex/latex/caption/newfloat.sty
@@ -6,7 +6,7 @@
%%
%% newfloat.dtx (with options: `package')
%%
-%% Copyright (C) 1994-2012 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
+%% Copyright (C) 1994-2013 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
%%
%% --------------------------------------------------------------------------
%%
@@ -29,9 +29,11 @@
%% and the user manuals caption-deu.tex, caption-eng.tex, and caption-rus.tex.
%%
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{newfloat}[2011/11/16 v1.0a Defining new floating environments (AR)]
+\ProvidesPackage{newfloat}[2012/05/19 v1.0b Defining new floating environments (AR)]
\newcommand*\newfloat@Info[1]{%
\PackageInfo{newfloat}{#1}}
+\newcommand*\newfloat@InfoNoLine[1]{%
+ \newfloat@Info{#1\@gobble}}
\newcommand*\newfloat@Error[1]{%
\PackageError{newfloat}{#1}\newfloat@eh}
\newcommand*\newfloat@eh{%
@@ -270,6 +272,8 @@
\ifcsname ext@#1\endcsname
\@cons\newfloat@list{{#1}}%
\@namedef{newfloat@ext@\@nameuse{ext@#1}}{#1}%
+ \@ifundefined{@ifchapterlistsgap@#1}{%
+ \expandafter\let\csname @ifchapterlistsgap@#1\endcsname\@iden}{}%
\else
\newfloat@Error{`#1' does not seem to be a floating environment}%
\fi}}
@@ -297,17 +301,18 @@
\@@addchapterlistsgap{#1}{#2}}}
\providecommand*\@@addchapterlistsgap[2]{%
\@ifundefined{@addchapterlistsgap@#2}{% only once per extension
- \@namedef{@addchapterlistsgap@#2}{}%
+ \@namedef{@addchapterlistsgap@#2}{#1}%
\@@@addchapterlistsgap{#2}}{}}
\providecommand*\@@@addchapterlistsgap[1]{%
\ifdim \@chapterlistsgap>\z@
\addtocontents{#1}{\protect\addvspace{\@chapterlistsgap}}%
\fi}
\providecommand*\@addchapterlistsgaps{%
- \def\@elt##1{%
- \@expandtwoargs\@addchapterlistsgap{##1}{\@nameuse{ext@##1}}}%
- \newfloat@list
- \let\@elt\relax}
+ \begingroup
+ \def\@elt##1{%
+ \@expandtwoargs\@addchapterlistsgap{##1}{\@nameuse{ext@##1}}}%
+ \newfloat@list
+ \endgroup}
\providecommand*\@chapterlistsgap@off[1]{%
\expandafter\let\csname @ifchapterlistsgap@#1\endcsname\@gobble
\ifcsname unsettoc\endcsname
@@ -340,8 +345,25 @@
}%
\newfloat@list
\let\@elt\relax
+\define@key{newfloat}{planb}[true]{%
+ \def\@tempa{#1}%
+ \def\@tempb{false}%
+ \ifx\@tempa\@tempb
+ \let\newfloat@ifplanb\@gobble
+ \else
+ \def\@tempb{true}%
+ \ifx\@tempa\@tempb
+ \let\newfloat@ifplanb\@iden
+ \else
+ \newfloat@Error{Invalid value `#1' for option `planb'}%
+ \fi
+ \fi}
+\define@key{newfloat}{planb-fileext}{%
+ \newfloat@Info{Setting Plan B file extension to `#1'}
+ \xdef\newfloat@addtocontents@ext{#1}}
+
\let\@tempc\relax
-\@expandtwoargs\setkeys{newfloat}{\@ptionlist{\@currname.\@currext}}%
+\@expandtwoargs\setkeys{newfloat}{planb,\@ptionlist{\@currname.\@currext}}%
\AtEndOfPackage{\let\@unprocessedoptions\relax}
\newcommand*\newfloatsetup{\setkeys{newfloat}}
\newcommand\newfloat@replace@chapter[2]{%
@@ -613,10 +635,33 @@
\@afterheading
\fi}
\ifx\newfloat@replace@chapter\@gobbletwo \else
- \PackageWarningNoLine{newfloat}{%
- Unsupported document class, or\MessageBreak
- \noexpand\@chapter was already redefined by another package}
- \newfloat@Info{\string\@chapter\space=\space\meaning\@chapter}
+ \newfloat@InfoNoLine{%
+ Unsupported document class, or \noexpand\@chapter\MessageBreak
+ was already redefined by another package}
+ \newfloat@InfoNoLine{\string\@chapter\space=\space\meaning\@chapter}
+ \newfloat@InfoNoLine{\string\Hy@org@chapter\space=\space\meaning\Hy@org@chapter}
+ \newfloat@ifplanb{%
+ \newfloat@InfoNoLine{Trying Plan B..}%
+ \let\newfloat@addtocontents@ORI\addtocontents
+ \long\def\addtocontents#1#2{%
+ \newfloat@addtocontents{#1}{#2}#2\addvspace\newfloat@nil}%
+ \long\def\newfloat@addtocontents#1#2#3\addvspace#4\newfloat@nil{%
+ \def\newfloat@tempa{#4}%
+ \ifx\newfloat@tempa\@empty
+ \newfloat@addtocontents@ORI{#1}{#2}%
+ \else
+ \ifx\newfloat@addtocontents@ext\@undefined
+ \newfloat@Info{Setting Plan B file extension to `#1'...}%
+ \xdef\newfloat@addtocontents@ext{#1}%
+ \fi
+ \edef\newfloat@tempa{#1}%
+ \ifx\newfloat@tempa\newfloat@addtocontents@ext
+ \begingroup
+ \let\addtocontents\newfloat@addtocontents@ORI
+ \@addchapterlistsgaps
+ \endgroup
+ \fi
+ \fi}}
\fi
\newcommand\newfloat@ForEachNew[2][newfloat@@list]{%
\AtBeginDocument{%
diff --git a/Master/texmf-dist/tex/latex/caption/subcaption.sty b/Master/texmf-dist/tex/latex/caption/subcaption.sty
index 13cfa8b6b71..56ba02f214a 100644
--- a/Master/texmf-dist/tex/latex/caption/subcaption.sty
+++ b/Master/texmf-dist/tex/latex/caption/subcaption.sty
@@ -6,7 +6,7 @@
%%
%% subcaption.dtx (with options: `package')
%%
-%% Copyright (C) 1994-2012 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
+%% Copyright (C) 1994-2013 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
%%
%% --------------------------------------------------------------------------
%%
@@ -29,28 +29,30 @@
%% and the user manuals caption-deu.tex, caption-eng.tex, and caption-rus.tex.
%%
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{subcaption}[2012/01/12 v1.1d Sub-captions (AR)]
-\RequirePackage{caption}[2011/08/18] % needs v3.2b or newer
+\ProvidesPackage{subcaption}[2012/04/09 v1.1f Sub-captions (AR)]
+\RequirePackage{caption}[2012/03/25] % needs v3.3 or newer
\caption@AtBeginDocument{\caption@ifcompatibility{%
\caption@Error{%
The `subcaption' package does not work correctly\MessageBreak
in compatibility mode}}{}}
-\caption@ifundefined\subfigure{}{%
- \PackageError{subcaption}{%
- This package can't be used in cooperation\MessageBreak
- with the subfigure package}{RTFM}%
- \endinput}
-\caption@ifundefined\subfloat{}{%
- \PackageError{subcaption}{%
- This package can't be used in cooperation\MessageBreak
- with the subfig package}{RTFM}%
- \endinput}
+\@ifpackageloaded{subfigure}{%
+ \PackageError{subcaption}%
+ {This package can't be used in cooperation\MessageBreak
+ with the subfigure package}%
+ {RTFM}%
+ \endinput}{}%
+\@ifpackageloaded{subfig}{%
+ \PackageError{subcaption}%
+ {This package can't be used in cooperation\MessageBreak
+ with the subfig package}%
+ {RTFM}%
+ \endinput}{}%
\caption@SetupOptions{subcaption}{\captionsetup[sub]{#2}}%
\caption@ExecuteOptions{subcaption}{%
font+=small,labelformat=parens,labelsep=space,skip=6pt,list=0,hypcap=0}
\caption@ProcessOptions*{subcaption}
\caption@ForEachType{\DeclareCaptionSubType{#1}}
-\newcommand*\subcaption{%
+\def\subcaption{%
\caption@iftype
{\setcaptionsubtype*\caption}%
{\caption@Error{\noexpand\subcaption outside float}%
@@ -71,8 +73,7 @@
\minipage#1{#2}%
\setcaptionsubtype\relax}
\newcommand*\subcaptionbox{%
- \let\captionbox@settype\setcaptionsubtype
- \caption@withoptargs\caption@box}
+ \caption@withoptargs{\caption@ibox\setcaptionsubtype}}
\g@addto@macro\caption@subtypehook{%
\ifx\label\subcaption@label \else
\let\subcaption@ORI@label\label
@@ -88,16 +89,14 @@
\subcaption@ORI@label#1{sub@#2}%
\endgroup\@esphack}
\DeclareRobustCommand*\subref{%
- \@ifstar{\subcaption@ref*}\@subref}
-\newcommand*\@subref{%
- \caption@withoptargs\@@subref}
-\newcommand*\@@subref[2]{%
+ \@ifstar
+ {\caption@withoptargs\subcaption@ref*}%
+ {\caption@withoptargs\@subref}}
+\newcommand*\@subref[2]{%
\caption@ifundefined\hyperref
- {\subcaption@ref#1{#2}}%
- {\hyperref[#2]{\subcaption@ref*#1{#2}}}}
-\newcommand*\subcaption@ref{%
- \caption@withoptargs\subcaption@@ref}
-\newcommand*\subcaption@@ref[2]{%
+ {\subcaption@ref{#1}{#2}}%
+ {\hyperref[#2]{\subcaption@ref{*#1}{#2}}}}
+\newcommand*\subcaption@ref[2]{%
\begingroup
\caption@setoptions{sub}%
\subcaption@reffmt\p@subref{\ref#1{sub@#2}}%
diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check
index d1492898903..395be88515c 100755
--- a/Master/tlpkg/bin/tlpkg-ctan-check
+++ b/Master/tlpkg/bin/tlpkg-ctan-check
@@ -124,7 +124,7 @@ my @TLP_working = qw(
coverpage covington
cprotect
crbox crop crossreference crossword crosswrd cryst
- cs csbulletin cslatex csquotes csquotes-de csvsimple csvtools csplain cstex
+ csbulletin csquotes csquotes-de csvsimple csvtools cstex
ctanify ctanupload ctable ctex ctex-faq
cursolatex cuisine
currfile currvita curve curve2e curves
@@ -484,6 +484,9 @@ my @TLP_no_check = (
"chktex", # binary
"cjkutils", # binary
"context", # binary+taco
+ "cs", # distributed as .tar.gz, too painful to unpack
+ "cslatex", # distributed as .tar.gz
+ "csplain", # distributed as .tar.gz
"ctib", # binary
"ctie", # binary
"cweb", # binary
@@ -514,6 +517,7 @@ my @TLP_no_check = (
"gsftopk", # binary
"hyperref-docsrc", # not on CTAN, awaiting hyperref doc volunteer
"ifluatex", # part of oberdiek
+ "jmn", # part of context
"kluwer", # not on CTAN, old LPPL, not worth pursuing or removing
"kpathsea", # binary
"lacheck", # binary
@@ -624,7 +628,7 @@ sub normal_tlps {
}
-# Return 1 if package needs updating, 0 if ok.
+# Return 1 if package TLPN needs updating, 0 if ok.
#
sub do_tlp {
my ($tlpn) = @_;
@@ -674,7 +678,7 @@ sub do_tlp {
next if $basefile eq "readme";
# Wrong README gets compared.
- next if $basefile eq "README" && $file =~ m,/pmx/,;
+ next if $basefile eq "README" && $file =~ m,/(pmx|cs)/,;
my $tl_file = "$Master/$file";
if (! -e $tl_file) {