From 4c1269d4c5953786fff1af6ed5c07fc595e91fa3 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sat, 27 Oct 2007 17:51:15 +0000 Subject: caption 3.1d (26oct07) git-svn-id: svn://tug.org/texlive/trunk@5284 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/source/latex/caption/caption.dtx | 78 +++++++++++++--------- 1 file changed, 45 insertions(+), 33 deletions(-) (limited to 'Master/texmf-dist/source/latex/caption') diff --git a/Master/texmf-dist/source/latex/caption/caption.dtx b/Master/texmf-dist/source/latex/caption/caption.dtx index 173f3fea4e8..07520a637bb 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{5489} +% \CheckSum{5491} % % \iffalse %<*driver> \NeedsTeXFormat{LaTeX2e}[1994/12/01] -\ProvidesFile{caption.drv}[2007/10/17 v3.1c Implementation of the caption package] +\ProvidesFile{caption.drv}[2007/10/25 v3.1d 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/09/25] +\usepackage[debug]{caption}[2007/10/25] % \DeclareRobustCommand*\eTeX{\texorpdfstring {\leavevmode\hbox{$\varepsilon$}-\TeX}% @@ -224,7 +224,7 @@ % % \begin{macrocode} \NeedsTeXFormat{LaTeX2e}[1994/12/01] -\ProvidesPackage{caption3}[2007/10/17 v3.1c caption3 kernel (AR)] +\ProvidesPackage{caption3}[2007/10/25 v3.1d caption3 kernel (AR)] % \end{macrocode} % % \subsection{Generic helpers} @@ -549,9 +549,12 @@ % \changes{v3.1b}{2007/09/18}{This macro added} % |\caption@Error|\marg{message} % \begin{macrocode} -\newcommand*\caption@Warning[1]{\caption@WarningNoLine{#1\on@line}} -\newcommand*\caption@WarningNoLine[1]{\PackageWarning{caption}{#1.^^J\caption@wh\@gobbletwo}} -\newcommand*\caption@Error[1]{\PackageError{caption}{#1}\caption@eh} +\newcommand*\caption@Warning[1]{% + \caption@WarningNoLine{#1\on@line}} +\newcommand*\caption@WarningNoLine[1]{% + \PackageWarning{caption}{#1.^^J\caption@wh\@gobbletwo}} +\newcommand*\caption@Error[1]{% + \PackageError{caption}{#1}\caption@eh} \let\caption@KV@err\caption@Error % \end{macrocode} % \end{macro} @@ -954,7 +957,7 @@ % \changes{v3.1}{2007/08/11}{Starred variant added} % \changes{v3.1}{2007/08/12}{\cs{setlength}\cs{captionmargin} \& % \cs{setlength}\cs{captionmargin@} swapped so -% `\texttt{margin*=}\cs{captionmargin}' works in SingleLine options} +% `\texttt{margin*=}\cs{captionmargin}' works in singleline options} % |\setcaptionmargin|\marg{amount}\\ % |\setcaptionmargin*|\marg{amount}\par % Please never use this in user documents, it's just there to @@ -1191,6 +1194,7 @@ % \begin{macro}{\caption@setstyle} % \changes{v3.0f}{2005/06/01}{Starred variant added} % \changes{v3.1}{2007/07/29}{Recursive style definitions should work now} +% \changes{v3.1d}{2007/10/23}{`SingleLine' renamed to `singleline' for consistency} % |\caption@setstyle|\marg{name}\\ % |\caption@setstyle*|\marg{name}\par % Selecting a caption style means saving the additional @@ -1219,7 +1223,7 @@ \expandafter\caption@setup\expandafter{\caption@sty}% \fi \expandafter\let\expandafter\caption@sls\csname caption@sls@#2\endcsname - \expandafter\caption@l@addto@list\expandafter\caption@opt@SingleLine + \expandafter\caption@l@addto@list\expandafter\caption@opt@singleline \expandafter{\caption@sls}}} % \end{macrocode} % \end{macro} @@ -1227,6 +1231,7 @@ % \begin{macro}{\caption@resetstyle} % \changes{v3.1}{2007/02/04}{% % This macro renamed from \cs{caption@setdefault} to \cs{caption@resetstyle}} +% \changes{v3.1d}{2007/10/23}{`SingleLine' renamed to `singleline' for consistency} % This resets (nearly) all caption options to the base ones. % \emph{Note that this does not touch the skips and the positioning!} % \begin{macrocode} @@ -1237,7 +1242,7 @@ margin=0pt,minmargin=0,maxmargin=0,% indent=0pt,parindent=0pt,hangindent=0pt,% singlelinecheck=1,strut=1}% - \caption@clearsetup{SingleLine}} + \caption@clearsetup{singleline}} % \end{macrocode} % \end{macro} % @@ -1329,7 +1334,7 @@ \caption@@par#3\par}} % \end{macrocode} % -% \changes{v3.0a}{2004/01/23}{Caption format \opt{default} linked to \opt{normal}} +% \changes{v3.0a}{2004/01/23}{Caption format \opt{default} linked to \opt{plain}} % \changes{v3.0e}{2005/04/28}{Bugfix 05-04-28: Missing \cs{caption@ifh@default} added} % `default' usually maps to `plain'. % \begin{macrocode} @@ -2421,7 +2426,7 @@ % \changes{v3.0d}{2005/02/09}{Improvement: \cs{caption@ifh} added} % \changes{v3.0d}{2005/02/09}{Bugfix: \cs{leavevmode} added} % \changes{v3.0h}{2005/08/24}{Uses \cs{sbox} instead of \cs{setbox} in single-line-check} -% \changes{v3.0i}{2005/12/04}{Uses \cs{caption@slc}} +% \changes{v3.0i}{2005/12/04}{Uses \cs{caption@slc} now} % \changes{v3.0i}{2006/01/11}{Bugfix: \cs{caption@calcmargin} inside % single-line-check replaced by \cs{relax}} % \changes{v3.0i}{2006/01/11}{Bugfix: \cs{caption@startbox} will always be @@ -2555,13 +2560,14 @@ % \changes{v3.1}{2007/07/29}{\cs{caption@setup}\cs{caption@sls} added after \cs{begingroup}} % \changes{v3.1}{2007/07/29}{\cs{caption@calcmargin} added} % \changes{v3.1c}{2007/10/14}{Support of \cs{caption@slfmt} added} +% \changes{v3.1d}{2007/10/23}{`SingleLine' renamed to `singleline' for consistency} % |\caption@slc|\marg{label}\marg{text}\marg{width}\marg{extra code}\par % This one does the single-line-check. % \begin{macrocode} \newcommand\caption@slc[4]{% \caption@Debug{Begin SLC}% \begingroup - \caption@SingleLine + \caption@singleline \let\caption@hj\@empty \caption@calcmargin % calculate #3 if necessary \caption@prepareslc @@ -2570,14 +2576,14 @@ \endgroup \else \endgroup - \caption@SingleLine + \caption@singleline #4% \fi \caption@Debug{End SLC}} % \end{macrocode} % \begin{macrocode} -\newcommand*\caption@SingleLine{% - \expandafter\caption@setup\expandafter{\caption@opt@SingleLine}% +\newcommand*\caption@singleline{% + \expandafter\caption@setup\expandafter{\caption@opt@singleline}% \let\caption@fmt\caption@slfmt} % \end{macrocode} % \end{macro} @@ -2893,7 +2899,8 @@ % % \begin{macrocode} \NeedsTeXFormat{LaTeX2e}[1994/12/01] -\ProvidesPackage{caption}[2007/10/17 v3.1c Customising captions (AR)] +\ProvidesPackage{caption}[2007/10/25 v3.1d Customising captions (AR)] +%\@ifundefined{PackageRedefines}{}{\PackageRedefines{caption}{caption}} % \end{macrocode} % % \begin{macro}{\caption@Info} @@ -2909,7 +2916,7 @@ % \subsection{Loading the kernel} % % \begin{macrocode} -\RequirePackage{caption3}[2007/10/17] % needs v3.1c or newer +\RequirePackage{caption3}[2007/10/25] % needs v3.1d or newer % \end{macrocode} % % \subsection{Check against incompatible packages} @@ -3212,17 +3219,18 @@ % \end{macro} % % \subsection{caption v1.x compatibility options} +% \changes{v3.1}{2007/07/21}{Option `compatibility' added} +% \changes{v3.1}{2007/09/01}{caption v1.x compatibility options revised} +% \changes{v3.1d}{2007/10/24}{Bugfix 07-10-24 in caption v1.x$ compatibility options} % -% \changes{v3.1}{2005/07/21}{Option `compatibility' added} % \begin{macrocode} \DeclareCaptionOption{compatibility}[1]{\caption@setbool{compatibility}{#1}} \@onlypreamble@key{caption}{compatibility} % \end{macrocode} % -% \changes{v3.1}{2007/09/01}{caption v1.x compatibility options revised} % \begin{macrocode} \DeclareCaptionOptionNoValue*{normal}{% - \caption@setformat{normal}% + \caption@setformat{plain}% \caption@setjustification{justified}} \DeclareCaptionOptionNoValue*{isu}{% \caption@setformat{hang}% @@ -3231,13 +3239,13 @@ \caption@setformat{hang}% \caption@setjustification{justified}} \DeclareCaptionOptionNoValue*{center}{% - \caption@setformat{normal}% + \caption@setformat{plain}% \caption@setjustification{centering}} \DeclareCaptionOptionNoValue*{anne}{% - \caption@setformat{normal}% + \caption@setformat{plain}% \caption@setjustification{centerlast}} \DeclareCaptionOptionNoValue*{centerlast}{% - \caption@setformat{normal}% + \caption@setformat{plain}% \caption@setjustification{centerlast}} % \end{macrocode} % @@ -3273,14 +3281,15 @@ % % \subsection{caption2 v2.x compatibility options} % \changes{v3.0h}{2005/07/08}{caption2 \version{2.x} compatibility options added} -% % \changes{v3.1}{2007/09/01}{caption2 v2.x compatibility options revised} +% \changes{v3.1d}{2007/10/24}{Bugfix 07-10-24 in caption v2.x$ compatibility options} +% % \begin{macrocode} \DeclareCaptionOptionNoValue*{flushleft}{% - \caption@setformat{normal}% + \caption@setformat{plain}% \caption@setjustification{raggedright}} \DeclareCaptionOptionNoValue*{flushright}{% - \caption@setformat{normal}% + \caption@setformat{plain}% \caption@setjustification{raggedleft}} % \end{macrocode} % \begin{macrocode} @@ -3369,6 +3378,7 @@ % \begin{macro}{\caption@settype} % \changes{v3.1}{2007/05/09}{This macro added} % \changes{v3.1b}{2007/09/22}{Usage of \cs{caption@xlabel} added} +% \changes{v3.1d}{2007/10/23}{Error message for \cs{caption@checkgrouplevel} revised} % |\caption@settype*|\marg{type}\par % sets |\@captype| and executes the options associated with it % (using |\caption@setoptions|). @@ -3385,15 +3395,16 @@ % \end{macrocode} % \begin{macrocode} \newcommand*\caption@@settype[1]{% - \caption@teststar{\caption@@@settype{#1}}\@gobble\@firstofone} + \caption@teststar{\caption@@@settype{#1}}\@firstoftwo\@secondoftwo} % \end{macrocode} % \begin{macrocode} \newcommand*\caption@@@settype[3]{% % #1 = "" or "sub" -% #2 = \@gobble in star form, \@firstofone otherwise +% #2 = \@firstoftwo in star form, \@secondoftwo otherwise % #3 = , e.g. "figure" or "table" \caption@Debug{type=#3}% - \caption@checkgrouplevel{#1}{\captionsetup{#1type#2\@gobble*=#3}}% + \caption@checkgrouplevel{#1}{% + \captionsetup{#1type#2*\@empty=...}#2{ or \@backslashchar#1captionof}{}}% % \end{macrocode} % \begin{macrocode} \@ifundefined{@#1captype}{}{% @@ -3411,7 +3422,7 @@ % \end{macrocode} % \begin{macrocode} \let\caption@ifrefstepcounter\@secondoftwo - #2{% \@gobble or \@firstofone + #2{}{% \let\@currentlabel\caption@undefinedlabel % \let\@currentHlabel\@undefined \ifx\caption@ORI@label\@undefined @@ -3466,7 +3477,7 @@ \expandafter\edef\csname #1caption@grouplevel\endcsname{% \the\currentgrouplevel}% \else - \caption@Error{\string#2 outside group or environment}% + \caption@Error{\string#2\MessageBreak outside box or environment}% \fi }{}} \fi @@ -5649,6 +5660,7 @@ % \end{macro} % % \begin{macro}{\caption@wincaption} +% \changes{v3.1d}{2007/10/25}{Missing \% added} % This one finally typesets the caption using |\caption|. % \begin{macrocode} \newcommand\caption@wincaption[1]{% @@ -5670,7 +5682,7 @@ % support a starred variant -- as in |\caption*| -- so we test for~|*|, too. % \begin{macrocode} \edef\@tempa{\expandafter\noexpand\@car#1\@nil}% - \if\@tempa* + \if\@tempa*% \let\@tempa\@firstofone \else\if\@tempa[%] \let\@tempa\@firstofone -- cgit v1.2.3