diff options
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/doc/latex/caption/caption-deu.pdf | bin | 319765 -> 319741 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/caption/caption-deu.tex | 10 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/caption/caption-eng.pdf | bin | 329731 -> 333306 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/caption/caption-eng.tex | 126 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/caption/caption.pdf | bin | 354669 -> 356408 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/latex/caption/caption.dtx | 181 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/caption/caption.sty | 47 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/caption/caption3.sty | 52 |
8 files changed, 272 insertions, 144 deletions
diff --git a/Master/texmf-dist/doc/latex/caption/caption-deu.pdf b/Master/texmf-dist/doc/latex/caption/caption-deu.pdf Binary files differindex 1404a393428..9a48e17cebe 100644 --- a/Master/texmf-dist/doc/latex/caption/caption-deu.pdf +++ b/Master/texmf-dist/doc/latex/caption/caption-deu.pdf diff --git a/Master/texmf-dist/doc/latex/caption/caption-deu.tex b/Master/texmf-dist/doc/latex/caption/caption-deu.tex index c8a0d893541..3fdede6fb56 100644 --- a/Master/texmf-dist/doc/latex/caption/caption-deu.tex +++ b/Master/texmf-dist/doc/latex/caption/caption-deu.tex @@ -1087,12 +1087,11 @@ Ein Beispiel: \end{quote} ergibt als Ergebnis: \begin{Example} - \makeatletter\def\@captype{table}\makeatother - \caption[]{Eine Tabelle.} + \captionsetup{type=table,position=b,skip=0pt} + \caption{Eine Tabelle.} \centerline{\ldots} \ContinuedFloat - \captionsetup{aboveskip=0pt} - \caption[]{Eine Tabelle. (fortgef"uhrt)} + \caption{Eine Tabelle. (fortgef"uhrt)} \end{Example} % --------------------------------------------------------------------------- % @@ -2244,8 +2243,7 @@ Option & Kurzbeschreibung & Abschnitt \\ |\caption will not be redefined since it's already|\\ |redefined by a document class or package which is|\\ |unknown to the caption package.|\\ - |As a result some new features of the caption|\\ - |package will not work as expected.| + |As a result some features will not work as expected.| \Description Wenn \thispackage\ eine vorhandene (und unbekannte) Erweiterung des Befehls |\caption| erkannt hat, definiert es |\caption| nicht erneut um, da dies diff --git a/Master/texmf-dist/doc/latex/caption/caption-eng.pdf b/Master/texmf-dist/doc/latex/caption/caption-eng.pdf Binary files differindex 30f567a3c19..f15a0c73908 100644 --- a/Master/texmf-dist/doc/latex/caption/caption-eng.pdf +++ b/Master/texmf-dist/doc/latex/caption/caption-eng.pdf diff --git a/Master/texmf-dist/doc/latex/caption/caption-eng.tex b/Master/texmf-dist/doc/latex/caption/caption-eng.tex index 28ca85babf9..e17786049cf 100644 --- a/Master/texmf-dist/doc/latex/caption/caption-eng.tex +++ b/Master/texmf-dist/doc/latex/caption/caption-eng.tex @@ -23,7 +23,7 @@ % caption-eng.tex, and caption-rus.tex. % \NeedsTeXFormat{LaTeX2e}[1994/12/01] -\ProvidesFile{caption-eng.tex}[2007/10/23 v3.1d The caption package] +\ProvidesFile{caption-eng.tex}[2007/11/04 v3.1e The caption package] \hbadness=9999 \newcount\hbadness \hfuzz=20pt % Make TeX shut up. %\errorcontextlines=3 @@ -186,7 +186,7 @@ caption formatting options, but you are free to define your very own stuff, too. % --------------------------------------------------------------------------- % -\section*{Preliminary documentation} +\section*{PRELIMINARY DOCUMENTATION}%Preliminary documentation} Please note that this document is inconsistent and not finished yet. It'll try to update it within the next months; the actual version can always be found @@ -993,50 +993,130 @@ forces captions within a |figure| environment to use the given \meta{options}. Here comes an example to illustrate this: \begin{quote} |\captionsetup{font=small}|\\ - |\captionsetup[figure]{labelfont=bf}| + |\captionsetup[figure]{labelfont=bf,textfont=it}| \end{quote} gives captions like this: \begin{Example} \captionsetup{font=small} - \captionsetup[figure]{labelfont=bf} + \captionsetup[figure]{labelfont=bf,textfont=it} \begingroup \captionof{figure}{A figure} \endgroup - \captionsetup{belowskip=\abovecaptionskip} + \captionsetup{position=top} \begingroup \captionof{table}{A table} \endgroup \end{Example} -As you see the command |\captionsetup[figure]{labelfont=bf}| only changed -the font of the figure caption labels, not touching all other ones. +As you see the command |\captionsetup[figure]{|\ldots|}| only changed +the look of the |figure| caption labels, not touching the other ones. +{\small As \meta{float type} you can usually give one of these two only: +|figure| or |table|. +But as we will see later some \LaTeX\ packages (like the +\package{float}, \package{longtable}, and \package{sidecap} package +for example) offer additional floating environments and these two +commands can also be used with them. \See{\Ref{packages}}} + +{\small\NEWfeature{v3.1} +There is also a starred variant of |\captionsetup|: +\begin{quote} + |\captionsetup*|\oarg{float type}\marg{options} +\end{quote} +While the non-starred variant gives you a warning if the \meta{options} are +actually not used throughout the document (e.g.~a |\captionsetup[table]{font=sf}| +without a |table|), the starred variant will not. +This is quite useful when setting generic options which are independant of a +specific document.} + +\pagebreak[4] \DescribeMacro{\clearcaptionsetup} If you want to get rid of these parameters marked for an automatic use within a particular environment you can use the command \begin{quote} - |\clearcaptionsetup|\marg{float type}\quad. + |\clearcaptionsetup|\oarg{option}\marg{float type}\quad. \end{quote} -For example |\clearcaptionsetup{figure}| would clear the extra handling in the -example above: +For example |\clearcaptionsetup{figure}| would clear all the extra handling +for |figure|s in the example above: +\begin{quote} + |\captionsetup{font=small}|\\ + |\captionsetup[figure]{labelfont=bf,textfont=it}|\\ + \ldots\\ + | \caption{A figure}|\\ + \ldots\\ + |\clearcaptionsetup{figure}|\\ + \ldots\\ + | \caption{A figure}|\\ + \ldots\\ +\end{quote} \begin{Example} \captionsetup{font=small} + \captionsetup[figure]{labelfont=bf,textfont=it} \begingroup \captionof{figure}{A figure} \endgroup - \captionsetup{belowskip=\abovecaptionskip} + \captionsetup{position=top} + \clearcaptionsetup{figure} \begingroup - \captionof{table}{A table} + \captionof{figure}{A figure} \endgroup \end{Example} -As \meta{float type} you can usually give one of these two only: -|figure| or |table|. -But as we will see later some \LaTeX\ packages (like the -\package{float}, \package{longtable}, and \package{sidecap} package -for example) offer additional floating environments and these two -commands can also be used with them. +\NEWfeature{v3.1} +If an optional argument \meta{option} is given, only the settings regarding +this particular \meta{option} are cleared.\footnote{You can only specify +\emph{one} option here, not a list of options. +If you want to clean more than one option, you need to use more than one +\cs{clearcaptionsetup}s.} +While the example above not only clears the options |labelfont=bf,textfont=it| +for |figure|s (but all options for |figure|s instead), +this one would only clear the |labelfont=bf| setting, leaving all other +settings for |figure|s intact: +\begin{quote} + |\captionsetup{font=small}|\\ + |\captionsetup[figure]{labelfont=bf,textfont=it}|\\ + \ldots\\ + | \caption{A figure}|\\ + \ldots\\ + |\clearcaptionsetup[labelfont]{figure}|\\ + \ldots\\ + | \caption{A figure}|\\ + \ldots\\ +\end{quote} +\begin{Example} + \captionsetup{font=small} + \captionsetup[figure]{labelfont=bf,textfont=it} + \begingroup + \captionof{figure}{A figure} + \endgroup + \captionsetup{position=top} + \clearcaptionsetup[labelfont]{figure} + \begingroup + \captionof{figure}{A figure} + \endgroup +\end{Example} +{\small Analogous to |\captionsetup*| there is also a starred form +|\clearcaptionsetup*| which suppresses warnings if the given \meta{option} +was not setup for the specified \meta{float type}.} + +\pagebreak[4] +\DescribeMacro{\showcaptionsetup} +For debugging purposes the command +\begin{quote} + |\showcaptionsetup|\marg{float type} +\end{quote} +is offered. It generates a logfile entry, showing the given options +for the specified \meta{float type}. For example +\begin{quote} + |\captionsetup[figure]{labelfont=bf,textfont=it}|\\ + |\showcaptionsetup{figure}| +\end{quote} +gives the info: +\begin{quote} + |Caption Info: Option list on `figure'|\\ + |Caption Data: {labelfont=bf,textfont=it} on input line 5.| +\end{quote} \subsection{Continued floats} \label{ContinuedFloat} @@ -1066,11 +1146,10 @@ An example: \end{quote} gives the following result: \begin{Example} - \captionsetup{type=table} + \captionsetup{type=table,position=b,skip=0pt} \caption{A table} \centerline{\ldots} \ContinuedFloat - \captionsetup{aboveskip=0pt} \caption{A table (cont.)} \end{Example} @@ -1862,7 +1941,9 @@ If you want to setup special options for the |parpic| environment you can use |\captionsetup[parpic]|\marg{options}\quad. \end{quote} These options will be executed additionally to the regular ones for -|figure| or |table|. +|figure| or |table|.\par +Furthermore |\piccaption[]{|\ldots|}| produce no entry in the List of Figures, +and |\piccaption*{|\ldots|}| gives an unlabeled \& unnumbered caption. \Note The |margin| resp.~|width| setting will not be used for these figures \& tables @@ -2409,8 +2490,7 @@ Option & Short description & Section \\ |\caption will not be redefined since it's already|\\ |redefined by a document class or package which is|\\ |unknown to the caption package.|\\ - |As a result some new features of the caption|\\ - |package will not work as expected.| + |As a result some features will not work as expected.| \Description If \thispackage\ detects that some (unknown) documentclass or package has enhanced |\caption|, it will not redefine diff --git a/Master/texmf-dist/doc/latex/caption/caption.pdf b/Master/texmf-dist/doc/latex/caption/caption.pdf Binary files differindex f1655cfea71..4faf48fb283 100644 --- a/Master/texmf-dist/doc/latex/caption/caption.pdf +++ b/Master/texmf-dist/doc/latex/caption/caption.pdf diff --git a/Master/texmf-dist/source/latex/caption/caption.dtx b/Master/texmf-dist/source/latex/caption/caption.dtx index 07520a637bb..83d19829927 100644 --- a/Master/texmf-dist/source/latex/caption/caption.dtx +++ b/Master/texmf-dist/source/latex/caption/caption.dtx @@ -24,12 +24,12 @@ % caption-eng.tex, and caption-rus.tex. % % \fi -% \CheckSum{5491} +% \CheckSum{5516} % % \iffalse %<*driver> \NeedsTeXFormat{LaTeX2e}[1994/12/01] -\ProvidesFile{caption.drv}[2007/10/25 v3.1d Implementation of the caption package] +\ProvidesFile{caption.drv}[2007/11/04 v3.1e Implementation of the caption package] \hbadness=9999 \newcount\hbadness \hfuzz=100pt % Make TeX shut up. %\errorcontextlines=3 % @@ -52,7 +52,7 @@ \usepackage{hypdoc} \hypersetup{pdfkeywords={LaTeX, package, caption},pdfstartview={}} % -\usepackage[debug]{caption}[2007/10/25] +\usepackage[debug]{caption}[2007/11/04] % \DeclareRobustCommand*\eTeX{\texorpdfstring {\leavevmode\hbox{$\varepsilon$}-\TeX}% @@ -104,14 +104,15 @@ % % The kernel provides all the user commands and internal macros which are % necessary for typesetting captions and setting parameters regarding these. -% While the standard \LaTeX\ document classes provides an internal command +% While the standard \LaTeX\ document classes provide an internal command % called |\@makecaption| and no options to control its behavior (except the % vertical skips above and below the caption itself), we provide similar % commands called |\caption@make| and |\caption@@make|, but with a lot of % options which can be selected with |\captionsetup|. % Loading the kernel part do not change the output of a \LaTeX\ document % -- it just provides functionality which can be used by \LaTeXe\ packages -% which typesets captions, like \thispackage\ and the \package{subfig} package. +% which typesets captions, for example the \package{caption} and +% \package{subfig} packages. % % \Thispackage\ itself redefines the \LaTeX\ commands % |\caption|, |\@caption|, and |\@makecaption| and maps the latter one to @@ -123,7 +124,7 @@ % |\ST@caption|) to the ones offered by the \package{caption3} kernel. % So you can think of \thispackage\ as a layer package, it % simply provides adaptation layers between the caption stuff coming from -% \LaTeXe\ itself or \LaTeXe\ packages, and the caption stuff offered by the +% \LaTeXe\ or packages, and the caption stuff offered by the % \package{caption3} kernel. % \end{abstract} % @@ -224,7 +225,7 @@ % % \begin{macrocode} \NeedsTeXFormat{LaTeX2e}[1994/12/01] -\ProvidesPackage{caption3}[2007/10/25 v3.1d caption3 kernel (AR)] +\ProvidesPackage{caption3}[2007/11/04 v3.1e caption3 kernel (AR)] % \end{macrocode} % % \subsection{Generic helpers} @@ -277,7 +278,7 @@ % \end{macro} % % \begin{macro}{\caption@ifinlist} -% \changes{2007/07/29}{Rewritten} +% \changes{v3.1}{2007/07/29}{Rewritten} % This helper macro checks if the first argument is in the comma separated % list which is offered as second argument. So for example % \begin{quote} @@ -381,6 +382,7 @@ % \end{macrocode} % \end{macro} % +% \pagebreak[3] % \begin{macro}{\caption@setbool} % \begin{macro}{\caption@set@bool} % \changes{v3.1}{2007/04/05}{\cs{caption@set@bool}\marg{cmd}\marg{value} added} @@ -420,10 +422,24 @@ % % \begin{macro}{\caption@teststar} % \changes{v3.1}{2007/05/08}{This macro and its usage added} -% |\caption@teststar|\marg{cmd}\marg{star arg}\marg{non-star arg} +% \changes{v3.1e}{2007/10/28}{\cs{caption@teststar@} added} +% |\caption@teststar|\marg{cmd}\marg{star arg}\marg{non-star arg}\\ +% |\caption@teststar@|\marg{cmd}\marg{star arg/token}\marg{non-star arg/token} % \begin{macrocode} \newcommand*\caption@teststar[3]{\@ifstar{#1{#2}}{#1{#3}}} % \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@teststar@[3]{% + \@ifstar{#1{#2}}{\caption@ifatletter{#1{#2}}{#1{#3}}}} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@ifatletter{% + \ifnum\the\catcode`\@=11 + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi} +% \end{macrocode} % \end{macro} % % \begin{macro}{\caption@withoptargs} @@ -595,12 +611,23 @@ % % \begin{macro}{\@onlypreamble@key} % \changes{v3.1}{2007/07/22}{This macro added} +% \changes{v3.1e}{2007/11/01}{\cs{KV@err} will be used now instead of \cs{@notprerr}} % |\onlypreamble@key|\marg{family}\marg{key}\par % Analogous to |\@onlypreamble| from \LaTeXe. % \begin{macrocode} -\providecommand*\@onlypreamble@key[2]{% - \expandafter\@onlypreamble\csname KV@#1@#2\endcsname} +\providecommand*\@preamble@keys{} +\providecommand*\@onlypreamble@key[2]{\@cons\@preamble@keys{{#1}{#2}}} \@onlypreamble\@onlypreamble@key +\@onlypreamble\@preamble@keys +% \end{macrocode} +% \begin{macrocode} +\providecommand*\@notprerr@key[1]{\KV@err{Can be used only in preamble}} +% \end{macrocode} +% \begin{macrocode} +\caption@AtBeginDocument*{% + \def\@elt#1#2{\expandafter\let\csname KV@#1@#2\endcsname\@notprerr@key}% + \@preamble@keys + \let\@elt\relax} % \end{macrocode} % \end{macro} % @@ -653,13 +680,18 @@ % % \begin{macro}{\captionsetup} % \changes{v3.0a}{2004/01/17}{Bugfix: Missing \% added} -% \changes{v3.1}{2007/07/22}{Star-variant added} -% |\captionsetup|\oarg{type}\marg{keyval-list of options}\par +% \changes{v3.1}{2007/07/22}{Starred-variant added} +% \changes{v3.1e}{2007/07/27}{Inside packages the starred variant will be used automatically} +% |\captionsetup|\oarg{type}\marg{keyval-list of options}\\ +% |\captionsetup*|\oarg{type}\marg{keyval-list of options}\par % If the optional argument `type' is specified, we simply save or append % the option list, otherwise we `execute' it with |\setkeys|. +% (The non-starred variant issues a warning if \meta{keyval-list of options} +% is not used later on.) +% \Note{The starred variant will be used inside packages automatically.} % \begin{macrocode} \newcommand*\captionsetup{% - \caption@teststar\@captionsetup\@gobble\@firstofone} + \caption@teststar@\@captionsetup\@gobble\@firstofone} % \end{macrocode} % \begin{macrocode} \newcommand*\@captionsetup[1]{% @@ -679,14 +711,16 @@ % \begin{macro}{\clearcaptionsetup} % \changes{v3.1}{2007/07/29}{Optional argument added} % \changes{v3.1}{2007/08/17}{Starred variant added} +% \changes{v3.1e}{2007/07/27}{Inside packages the starred variant will be used automatically} % |\clearcaptionsetup|\oarg{option}\marg{type}\\ % |\clearcaptionsetup*|\oarg{option}\marg{type}\par % This removes the saved option list associated with \meta{type}. % If \meta{option} is given, only this option will be removed from the list. -% The starred variant does not issue a warning. +% (The starred variant does not issue warnings.) +% \Note{The starred variant will be used inside packages automatically.} % \begin{macrocode} \newcommand*\clearcaptionsetup{% - \caption@teststar\@clearcaptionsetup\@gobble\@firstofone} + \caption@teststar@\@clearcaptionsetup\@gobble\@firstofone} % \end{macrocode} % \begin{macrocode} \newcommand*\@clearcaptionsetup[1]{% @@ -744,7 +778,7 @@ % \begin{macrocode} \newcommand*\showcaptionsetup[2][\@firstofone]{% \GenericWarning{}{% - #1 Caption Info: KV list on `#2'\MessageBreak + #1 Caption Info: Option list on `#2'\MessageBreak #1 Caption Data: \@ifundefined{caption@opt@#2}{% -none-% }{% @@ -843,7 +877,7 @@ {\let\KV@err\ORI@KV@err\let\KV@errx\ORI@KV@errx}% {\expandafter\let\expandafter\KV@err\csname #1@KV@err\endcsname \let\KV@errx\KV@err}% - \l@addto@macro\caption@keydepth i% + \edef\caption@keydepth{\caption@keydepth i}% % \end{macrocode} % \begin{macrocode} \caption@Debug{\protect\setkeys{#2}{#3}}% @@ -992,12 +1026,19 @@ % \end{macrocode} % \end{macro} % -% \begin{macro}{\caption@count} +% \begin{macro}{\caption@counter} % \changes{v3.0p}{2007/04/03}{This counter added} +% \changes{v3.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 % |\caption@ifoddpage| only. % \begin{macrocode} -\newcommand*\caption@count{0} +\newcommand*\caption@thecounter{0} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@stepcounter{% + \@tempcnta\caption@thecounter + \advance\@tempcnta\@ne + \xdef\caption@thecounter{\the\@tempcnta}} % \end{macrocode} % \end{macro} % @@ -1049,6 +1090,7 @@ % % \begin{macro}{\caption@ifoddpage} % \changes{v3.0p}{2007/04/03}{This macro added} +% \changes{v3.1e}{2007/10/28}{Incrementation of counter moved to \cs{caption@@make}} % At the moment this macro uses an own label\ldots ref mechanism, % but an alternative implementation method would be using the % \package{refcount} package\cite{refcount} and |\ifodd\getpagerefnumber{|\ldots|}|. @@ -1057,13 +1099,8 @@ % \begin{macrocode} \newcommand*\caption@ifoddpage{% \caption@iftwoside{% - \begingroup - \@tempcnta\caption@count - \advance\@tempcnta\@ne - \xdef\caption@count{\the\@tempcnta}% - \endgroup - \caption@label\caption@count - \caption@pageref\caption@count + \caption@label\caption@thecounter + \caption@pageref\caption@thecounter \ifodd\caption@thepage \let\caption@ifoddpage\@firstoftwo \else @@ -1108,8 +1145,8 @@ % \changes{v3.0h}{2005/08/22}{Undocumented defaults for \opt{parindent=}, % \opt{hangindent=}, and \opt{parskip=} removed} % \begin{macrocode} -\DeclareCaptionOption{indent}[\leftmargini]{% - \setlength\caption@indent{#1}}% obsolete! +\DeclareCaptionOption{indent}[\leftmargini]{% obsolete! + \setlength\caption@indent{#1}} \DeclareCaptionOption{indention}[\leftmargini]{% \setlength\caption@indent{#1}} \DeclareCaptionOption{parindent}{% @@ -1694,7 +1731,7 @@ % \begin{macro}{\centerfirst} % \changes{v3.0l}{2007/01/21}{Bugfix: Usage of \cs{@centercr} added (Thanks to Olga!)} % \changes{v3.0l}{2007/01/21}{This macro renamed from \cs{caption@centerfirst} to \cs{centerfirst}} -% Please blame Frank Mittelbach for the code of |\caption@centerfirst| |:-)| +% Please blame Frank Mittelbach for the code of |\centerfirst| |:-)| % \begin{macrocode} \providecommand\centerfirst{% \let\\\@centercr @@ -2124,8 +2161,8 @@ \DeclareDefaultCaptionFont{font}{\@captionfont} \DeclareDefaultCaptionFont{labelfont}{\@captionheadfont} \DeclareDefaultCaptionFont{textfont}{\@captionfont\upshape} - \captionsetup*[figure]{position=b} - \captionsetup*[table]{position=t} + \captionsetup[figure]{position=b} + \captionsetup[table]{position=t} % \end{macrocode} % \begin{macrocode} } @@ -2365,7 +2402,7 @@ } % \end{macrocode} % -% \subsection{Typesetting the caption} +% \subsection{Making an `List of' entry} % % \begin{macro}{\caption@addcontentsline} % \changes{v3.1}{2007/07/01}{This macro added} @@ -2388,6 +2425,8 @@ % \end{macrocode} % \end{macro} % +% \subsection{Typesetting the caption} +% % \begin{macro}{\ifcaption@star} % If the starred form of |\caption| is used, this will be set to |true|. % (It will be reset to |false| at the end of |\caption@@make|.) @@ -2435,10 +2474,12 @@ % \changes{v3.0l}{2007/01/04}{Oops, bugfix 04-05-05 got lost in v3.0j, re-added} % \changes{v3.0p}{2007/04/03}{Usage of \cs{caption@ifoddpage} added} % \changes{v3.1}{2007/07/29}{\cs{caption@calcmargin} moved below single-line-check} +% \changes{v3.1e}{2007/10/28}{\cs{caption@stepcounter} added} % |\caption@@make|\marg{caption label}\marg{caption text} % \begin{macrocode} \newcommand\caption@@make[2]{% \begingroup + \caption@stepcounter \caption@beginhook % \end{macrocode} % @@ -2899,7 +2940,7 @@ % % \begin{macrocode} \NeedsTeXFormat{LaTeX2e}[1994/12/01] -\ProvidesPackage{caption}[2007/10/25 v3.1d Customising captions (AR)] +\ProvidesPackage{caption}[2007/11/04 v3.1e Customising captions (AR)] %\@ifundefined{PackageRedefines}{}{\PackageRedefines{caption}{caption}} % \end{macrocode} % @@ -2916,7 +2957,7 @@ % \subsection{Loading the kernel} % % \begin{macrocode} -\RequirePackage{caption3}[2007/10/25] % needs v3.1d or newer +\RequirePackage{caption3}[2007/11/04] % needs v3.1e or newer % \end{macrocode} % % \subsection{Check against incompatible packages} @@ -2940,9 +2981,9 @@ \caption@IncompatiblePackage{ftcap}{}% }{}% \@ifpackageloaded{nonfloat}{% - \caption@IncompatiblePackage{nonfloat}{. % - Furthermore you could use \string\captionof\MessageBreak - instead of \noexpand\figcaption or \string\tabcaption}% + \caption@IncompatiblePackage{nonfloat}{.\MessageBreak + Furthermore you could use \noexpand\captionof instead of\MessageBreak + \noexpand\figcaption or \string\tabcaption}% }{}% \@ifpackageloaded{topcapt}{% \caption@IncompatiblePackage{topcapt}{}% @@ -2959,8 +3000,7 @@ caption package is strongly *not* recommended.\MessageBreak Instead of loading the #1 package you should\MessageBreak use the caption package option\MessageBreak - \space\space`tableposition=top'\MessageBreak - #2}} + \space\space`tableposition=top'#2}} % \end{macrocode} % \begin{macrocode} \@onlypreamble\caption@IncompatiblePackage @@ -3297,7 +3337,7 @@ % \end{macrocode} % \begin{macrocode} \DeclareCaptionOptionNoValue*{ignoreLTcapwidth}{% - \caption@Warning{Obsolete option `ignoreLTcapwidth' ignored}} + \caption@WarningNoLine{Obsolete option `ignoreLTcapwidth' ignored}} % \end{macrocode} % % \subsection{Obsolete caption v3.0 options} @@ -3489,13 +3529,17 @@ % \changes{v3.1b}{2007/09/22}{Contents changed to \texttt{??}} % This label will be used for |\currentlabel| inside (floating) environments % as default. (see above) -% \Note{All commands used have to be robust here.} +% \iffalse\Note{All commands used have to be robust here.}\fi % \begin{macrocode} \newcommand*\caption@undefinedlabel{??} % \end{macrocode} % \end{macro} % \begin{macro}{\caption@xlabel} % \changes{v3.1b}{2007/09/22}{This macro and its usage added} +% The new code of |\label| inside floating environments. +% |\label| will be redefined using |\caption@withoptargs|, so +% |#1| are the optional arguments (if any), and +% |#2| is the mandatory argument here. % \begin{macrocode} \newcommand*\caption@xlabel[2]{% \ifx\@currentlabel\caption@undefinedlabel @@ -3509,10 +3553,15 @@ % \begin{macro}{\captionof} % \changes{v3.1}{2007/05/09}{Uses \cs{caption@settype} instead of \cs{def}\cs{@captype}} % \changes{v3.1c}{2007/09/22}{Bugfix: Redefinition of \cs{caption@setfloatcapt} removed} +% \changes{v3.1e}{2007/10/30}{Better compatibility: Will be defined with \cs{AtBeginDocument} now} % |\captionof|\marg{type}\oarg{lst\_entry}\marg{heading}\\ -% |\captionof*|\oarg{lst\_entry}\marg{heading} +% |\captionof*|\oarg{lst\_entry}\marg{heading}\par +% \Note{This will be defined with \cs{AtBeginDocument} so +% \cs{usepackage}\csmarg{caption,capt-of} will still work. +% (Compatibility to \version{1.x})} % \begin{macrocode} -\def\captionof{\caption@teststar\caption@of{\caption*}\caption} +\caption@AtBeginDocument{% + \def\captionof{\caption@teststar\caption@of{\caption*}\caption}} % \end{macrocode} % \begin{macrocode} \newcommand*\caption@of[2]{\caption@settype*{#2}#1} @@ -3665,8 +3714,8 @@ % |\caption@beginex|\marg{type}\marg{list entry}\marg{heading}\par % performs the same tasks as |\caption@begin| and additionally: % \begin{enumerate} -% \item[5.] Make an entry in the list-of-whatever. -% \item[6.] Set |\caption@ifempty| according argument \meta{heading}. +% \item[4.] Make an entry in the list-of-whatever. +% \item[5.] Set |\caption@ifempty| according argument \meta{heading}. % \end{enumerate} % \begin{macrocode} \newcommand\caption@beginex[3]{% @@ -4106,8 +4155,7 @@ \noexpand\caption will not be redefined since it's already\MessageBreak redefined by a document class or package which is\MessageBreak unknown to the caption package.\MessageBreak - As a result some new features of the caption\MessageBreak - package will not work as expected}% + As a result some features will not work as expected}% }% % \end{macrocode} % @@ -4123,14 +4171,12 @@ \let\caption@start\relax \@ifundefined{caption@ORI@capstart}{}{% \caption@Debug{% - Undo redefinition of \string\capstart\@gobble}% - \let\capstart\caption@ORI@capstart - \let\caption@ORI@capstart\@undefined}% - \@ifundefined{Hy@float@makebox}{}{% + Restore hypcap definition of \string\capstart\@gobble}% + \let\capstart\caption@ORI@capstart}% + \@ifundefined{caption@ORI@float@makebox}{}{% \caption@Debug{% Restore hyperref redefinition of \string\float@makebox\@gobble}% - \let\float@makebox\Hy@float@makebox - \let\Hy@float@makebox\@undefined}% + \let\float@makebox\caption@ORI@float@makebox}% }% % \end{macrocode} % @@ -4226,6 +4272,11 @@ % \begin{macrocode} }% % \end{macrocode} +% \begin{macrocode} + \caption@AtBeginDocument*{% + \let\caption@ORI@capstart\@undefined + \let\caption@ORI@float@makebox\@undefined}% +% \end{macrocode} % % \begin{macro}{\@xfloat} % \changes{v3.1}{2007/05/09}{This re-definition added} @@ -4776,7 +4827,7 @@ % The skip between `boxed' floats and their caption defaults to |2pt|. % % \begin{macrocode} -\captionsetup*[boxed]{skip=2pt} % do not issue a warning when not used +\captionsetup[boxed]{skip=2pt} % do not issue a warning when not used % \end{macrocode} % % \changes{v3.0f}{2005/05/26}{\opt{strut=0} added to caption style \opt{ruled}} @@ -5303,7 +5354,7 @@ \@ifundefined{HyOrg@float@makebox}{}{% \caption@Debug{% Redefining \noexpand\float@makebox (again)\@gobble}% - \let\Hy@float@makebox\float@makebox + \let\caption@ORI@float@makebox\float@makebox % save for compatibility mode \renewcommand\float@makebox[1]{% \HyOrg@float@makebox{#1\relax \caption@defrostHref}}% }% @@ -5316,7 +5367,8 @@ % % \subsubsection{The hypcap package} % \changes{v3.0f}{2005/06/22}{Support of the \package{hypcap} package added} -% \changes{v3.0l}{2007/02/20}{Adapted to \package{hypcap} v1.6} +% \changes{v3.0l}{2007/02/20}{Adapted to \package{hypcap} \version{1.6}} +% \changes{v3.1e}{2007/11/04}{\package{hypcap} support adapted to \package{hyperref} \version{6.77}} % % \begin{macrocode} \caption@IfPackageLoaded{hypcap}{% v1.0 @@ -5334,7 +5386,7 @@ % only but our version affects \emph{all} |\caption|s in the same % environment, at least unless a new |\capstart| will be placed. % \begin{macrocode} - \let\caption@ORI@capstart\capstart + \let\caption@ORI@capstart\capstart % save for compatibility mode \let\capstart\caption@start \let\caption@start\relax \let\caption@@start\relax @@ -5345,22 +5397,11 @@ % Furthermore we map our |\caption@hypcapspace| to |\hypcapspace| % offered by the \package{hypcap} package. % \begin{macrocode} - \caption@@setbool\caption@ifhypcap1% + \caption@set@bool\caption@ifhypcap1% \renewcommand*\caption@hypcapspace{\hypcapspace}% % \end{macrocode} % \end{macro} % -% \begin{macro}{\float@makebox} -% Redo the redefinition of |\float@makebox|, if necessary. -% \begin{macrocode} - \@ifundefined{Hy@float@makebox}{}{% - \caption@Debug{% - Restore hyperref redefinition of \string\float@makebox\@gobble}% - \let\float@makebox\Hy@float@makebox - \let\Hy@float@makebox\@undefined}% -% \end{macrocode} -% \end{macro} -% % \begin{macrocode} \fi}{} % \end{macrocode} diff --git a/Master/texmf-dist/tex/latex/caption/caption.sty b/Master/texmf-dist/tex/latex/caption/caption.sty index 6b9a5319ccb..bcc8bc5ca2e 100644 --- a/Master/texmf-dist/tex/latex/caption/caption.sty +++ b/Master/texmf-dist/tex/latex/caption/caption.sty @@ -28,10 +28,10 @@ %% caption-eng.tex, and caption-rus.tex. %% \NeedsTeXFormat{LaTeX2e}[1994/12/01] -\ProvidesPackage{caption}[2007/10/25 v3.1d Customising captions (AR)] +\ProvidesPackage{caption}[2007/11/04 v3.1e Customising captions (AR)] \newcommand*\caption@Info[1]{\PackageInfo{caption}{#1\@gobble}} \@onlypreamble\caption@Info -\RequirePackage{caption3}[2007/10/25] % needs v3.1d or newer +\RequirePackage{caption3}[2007/11/04] % needs v3.1e or newer \@ifpackageloaded{caption2}{% \caption@Error{% You can't use both, the (obsolete) caption2 *and*\MessageBreak @@ -43,9 +43,9 @@ \caption@IncompatiblePackage{ftcap}{}% }{}% \@ifpackageloaded{nonfloat}{% - \caption@IncompatiblePackage{nonfloat}{. % - Furthermore you could use \string\captionof\MessageBreak - instead of \noexpand\figcaption or \string\tabcaption}% + \caption@IncompatiblePackage{nonfloat}{.\MessageBreak + Furthermore you could use \noexpand\captionof instead of\MessageBreak + \noexpand\figcaption or \string\tabcaption}% }{}% \@ifpackageloaded{topcapt}{% \caption@IncompatiblePackage{topcapt}{}% @@ -57,8 +57,7 @@ caption package is strongly *not* recommended.\MessageBreak Instead of loading the #1 package you should\MessageBreak use the caption package option\MessageBreak - \space\space`tableposition=top'\MessageBreak - #2}} + \space\space`tableposition=top'#2}} \@onlypreamble\caption@IncompatiblePackage \caption@ifbool{documentclass}{}{% \PackageWarningNoLine{caption}{% @@ -228,7 +227,7 @@ \caption@setjustification{raggedleft}} \DeclareCaptionOptionNoValue*{oneline}{\caption@setbool{slc}{1}} \DeclareCaptionOptionNoValue*{ignoreLTcapwidth}{% - \caption@Warning{Obsolete option `ignoreLTcapwidth' ignored}} + \caption@WarningNoLine{Obsolete option `ignoreLTcapwidth' ignored}} \DeclareCaptionOption*{caption}{% \caption@setbool{temp}{#1}% \caption@ifbool{temp}{}{% @@ -305,7 +304,8 @@ \else \caption@ORI@label#1{#2}% \fi} -\def\captionof{\caption@teststar\caption@of{\caption*}\caption} +\caption@AtBeginDocument{% + \def\captionof{\caption@teststar\caption@of{\caption*}\caption}} \newcommand*\caption@of[2]{\caption@settype*{#2}#1} \newcommand*\captionlistentry{% \@testopt\caption@listentry\@captype} @@ -597,8 +597,7 @@ \noexpand\caption will not be redefined since it's already\MessageBreak redefined by a document class or package which is\MessageBreak unknown to the caption package.\MessageBreak - As a result some new features of the caption\MessageBreak - package will not work as expected}% + As a result some features will not work as expected}% }% \renewcommand*\caption@ContinuedFloat[1]{% \caption@Error{Not available in compatibility mode}}% @@ -606,14 +605,12 @@ \let\caption@start\relax \@ifundefined{caption@ORI@capstart}{}{% \caption@Debug{% - Undo redefinition of \string\capstart\@gobble}% - \let\capstart\caption@ORI@capstart - \let\caption@ORI@capstart\@undefined}% - \@ifundefined{Hy@float@makebox}{}{% + Restore hypcap definition of \string\capstart\@gobble}% + \let\capstart\caption@ORI@capstart}% + \@ifundefined{caption@ORI@float@makebox}{}{% \caption@Debug{% Restore hyperref redefinition of \string\float@makebox\@gobble}% - \let\float@makebox\Hy@float@makebox - \let\Hy@float@makebox\@undefined}% + \let\float@makebox\caption@ORI@float@makebox}% }% \newcommand*\caption@star[2]{#1#2}% }{% @@ -650,6 +647,9 @@ {\ignorespaces\caption@@anchor{#3}}\par}% \caption@end}% }% + \caption@AtBeginDocument*{% + \let\caption@ORI@capstart\@undefined + \let\caption@ORI@float@makebox\@undefined}% \let\caption@ORI@xfloat\@xfloat \def\@xfloat#1[#2]{% \caption@ORI@xfloat{#1}[#2]% @@ -840,7 +840,7 @@ \providecommand*\float@ifstyle[1]{\@secondoftwo}% \providecommand*\float@ifcaption[1]{\@secondoftwo}% } -\captionsetup*[boxed]{skip=2pt} % do not issue a warning when not used +\captionsetup[boxed]{skip=2pt} % do not issue a warning when not used \caption@ifbool{ruled}{% \captionsetup[ruled]{margin=0pt,minmargin=0,singlelinecheck=0}% }{% @@ -1014,24 +1014,19 @@ \@ifundefined{HyOrg@float@makebox}{}{% \caption@Debug{% Redefining \noexpand\float@makebox (again)\@gobble}% - \let\Hy@float@makebox\float@makebox + \let\caption@ORI@float@makebox\float@makebox % save for compatibility mode \renewcommand\float@makebox[1]{% \HyOrg@float@makebox{#1\relax \caption@defrostHref}}% }% }}{} \caption@IfPackageLoaded{hypcap}{% v1.0 \ifx\caption@start\relax \else % hyperref hasn't stopped early - \let\caption@ORI@capstart\capstart + \let\caption@ORI@capstart\capstart % save for compatibility mode \let\capstart\caption@start \let\caption@start\relax \let\caption@@start\relax - \caption@@setbool\caption@ifhypcap1% + \caption@set@bool\caption@ifhypcap1% \renewcommand*\caption@hypcapspace{\hypcapspace}% - \@ifundefined{Hy@float@makebox}{}{% - \caption@Debug{% - Restore hyperref redefinition of \string\float@makebox\@gobble}% - \let\float@makebox\Hy@float@makebox - \let\Hy@float@makebox\@undefined}% \fi}{} \caption@IfPackageLoaded{listings}[2004/02/13 v1.2]{% \let\caption@ORI@lst@MakeCaption\lst@MakeCaption diff --git a/Master/texmf-dist/tex/latex/caption/caption3.sty b/Master/texmf-dist/tex/latex/caption/caption3.sty index 5b0beadfba3..0459e0cd472 100644 --- a/Master/texmf-dist/tex/latex/caption/caption3.sty +++ b/Master/texmf-dist/tex/latex/caption/caption3.sty @@ -28,7 +28,7 @@ %% caption-eng.tex, and caption-rus.tex. %% \NeedsTeXFormat{LaTeX2e}[1994/12/01] -\ProvidesPackage{caption3}[2007/10/25 v3.1d caption3 kernel (AR)] +\ProvidesPackage{caption3}[2007/11/04 v3.1e caption3 kernel (AR)] \providecommand*\@nameundef[1]{% \expandafter\let\csname #1\endcsname\@undefined} \providecommand\l@addto@macro[2]{% @@ -101,6 +101,14 @@ \newcommand*\caption@ifbool[1]{\@nameuse{caption@if#1}} \newcommand*\caption@undefbool[1]{\@nameundef{caption@if#1}} \newcommand*\caption@teststar[3]{\@ifstar{#1{#2}}{#1{#3}}} +\newcommand*\caption@teststar@[3]{% + \@ifstar{#1{#2}}{\caption@ifatletter{#1{#2}}{#1{#3}}}} +\newcommand*\caption@ifatletter{% + \ifnum\the\catcode`\@=11 + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi} \newcommand*\caption@withoptargs[1]{% \@ifstar {\def\caption@tempa{*}\caption@@withoptargs#1}% @@ -169,9 +177,15 @@ \RequirePackage{keyval}[1997/11/10] \providecommand*\undefine@key[2]{% \@nameundef{KV@#1@#2}\@nameundef{KV@#1@#2@default}} -\providecommand*\@onlypreamble@key[2]{% - \expandafter\@onlypreamble\csname KV@#1@#2\endcsname} +\providecommand*\@preamble@keys{} +\providecommand*\@onlypreamble@key[2]{\@cons\@preamble@keys{{#1}{#2}}} \@onlypreamble\@onlypreamble@key +\@onlypreamble\@preamble@keys +\providecommand*\@notprerr@key[1]{\KV@err{Can be used only in preamble}} +\caption@AtBeginDocument*{% + \def\@elt#1#2{\expandafter\let\csname KV@#1@#2\endcsname\@notprerr@key}% + \@preamble@keys + \let\@elt\relax} \newcommand*\DeclareCaptionOption{% \caption@teststar\caption@declareoption\AtEndOfPackage\@gobble} \@onlypreamble\DeclareCaptionOption @@ -193,7 +207,7 @@ \expandafter\@gobble \fi} \newcommand*\captionsetup{% - \caption@teststar\@captionsetup\@gobble\@firstofone} + \caption@teststar@\@captionsetup\@gobble\@firstofone} \newcommand*\@captionsetup[1]{% \@ifnextchar[{\caption@setup@options#1}\caption@setup} \newcommand*\caption@setup{\caption@setkeys{caption}} @@ -202,7 +216,7 @@ #1{\caption@addtooptlist{#2}}% \expandafter\caption@l@addto@list\csname caption@opt@#2\endcsname} \newcommand*\clearcaptionsetup{% - \caption@teststar\@clearcaptionsetup\@gobble\@firstofone} + \caption@teststar@\@clearcaptionsetup\@gobble\@firstofone} \newcommand*\@clearcaptionsetup[1]{% \let\caption@tempa#1% \@testopt\@@clearcaptionsetup{}} @@ -240,7 +254,7 @@ Option `#1' was not in list `#2'\MessageBreak}}} \newcommand*\showcaptionsetup[2][\@firstofone]{% \GenericWarning{}{% - #1 Caption Info: KV list on `#2'\MessageBreak + #1 Caption Info: Option list on `#2'\MessageBreak #1 Caption Data: \@ifundefined{caption@opt@#2}{% -none-% }{% @@ -282,7 +296,7 @@ {\let\KV@err\ORI@KV@err\let\KV@errx\ORI@KV@errx}% {\expandafter\let\expandafter\KV@err\csname #1@KV@err\endcsname \let\KV@errx\KV@err}% - \l@addto@macro\caption@keydepth i% + \edef\caption@keydepth{\caption@keydepth i}% \caption@Debug{\protect\setkeys{#2}{#3}}% \setkeys{#2}{#3}% \edef\caption@keydepth{\expandafter\@cdr\caption@keydepth\@nil}% @@ -338,7 +352,11 @@ \captionmargin\z@ \captionmargin@\z@ \setlength\captionwidth} -\newcommand*\caption@count{0} +\newcommand*\caption@thecounter{0} +\newcommand*\caption@stepcounter{% + \@tempcnta\caption@thecounter + \advance\@tempcnta\@ne + \xdef\caption@thecounter{\the\@tempcnta}} \newcommand*\caption@newlabel{\@newl@bel{caption@r}} \newcommand*\caption@thepage{\the\c@page} \newcommand*\caption@label[1]{% @@ -353,13 +371,8 @@ \fi} \newcommand*\caption@ifoddpage{% \caption@iftwoside{% - \begingroup - \@tempcnta\caption@count - \advance\@tempcnta\@ne - \xdef\caption@count{\the\@tempcnta}% - \endgroup - \caption@label\caption@count - \caption@pageref\caption@count + \caption@label\caption@thecounter + \caption@pageref\caption@thecounter \ifodd\caption@thepage \let\caption@ifoddpage\@firstoftwo \else @@ -372,8 +385,8 @@ \newdimen\caption@indent \newdimen\caption@parindent \newdimen\caption@hangindent -\DeclareCaptionOption{indent}[\leftmargini]{% - \setlength\caption@indent{#1}}% obsolete! +\DeclareCaptionOption{indent}[\leftmargini]{% obsolete! + \setlength\caption@indent{#1}} \DeclareCaptionOption{indention}[\leftmargini]{% \setlength\caption@indent{#1}} \DeclareCaptionOption{parindent}{% @@ -807,8 +820,8 @@ \DeclareDefaultCaptionFont{font}{\@captionfont} \DeclareDefaultCaptionFont{labelfont}{\@captionheadfont} \DeclareDefaultCaptionFont{textfont}{\@captionfont\upshape} - \captionsetup*[figure]{position=b} - \captionsetup*[table]{position=t} + \captionsetup[figure]{position=b} + \captionsetup[table]{position=t} } \@ifclassloaded{beamer}{% \caption@CheckCommand\beamer@makecaption{% @@ -981,6 +994,7 @@ \caption@@make{\caption@lfmt{#1}{#2}{\theContinuedFloat}}} \newcommand\caption@@make[2]{% \begingroup + \caption@stepcounter \caption@beginhook \ifx\caption@maxmargin\@undefined \else \ifdim\captionmargin>\caption@maxmargin\relax |