diff options
author | Karl Berry <karl@freefriends.org> | 2012-03-15 22:55:09 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2012-03-15 22:55:09 +0000 |
commit | 9cb823777741267aa9b1dc0a77508da79eb86025 (patch) | |
tree | 241821ff3af9d5fc8eaaaefa2a54af2e01346b75 /Master/texmf-dist/source/latex/caption/caption3.dtx | |
parent | d1ad8fadf5a36d2b3eb1d25d8437eb6e8f1142f0 (diff) |
caption 3.2 (15mar12)
git-svn-id: svn://tug.org/texlive/trunk@25657 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/caption/caption3.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/caption/caption3.dtx | 152 |
1 files changed, 94 insertions, 58 deletions
diff --git a/Master/texmf-dist/source/latex/caption/caption3.dtx b/Master/texmf-dist/source/latex/caption/caption3.dtx index 51699c2e1df..4a084501a2a 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-2011 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) +% Copyright (C) 1994-2012 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) % % -------------------------------------------------------------------------- % @@ -25,7 +25,7 @@ % and the user manuals caption-deu.tex, caption-eng.tex, and caption-rus.tex. % % \fi -% \CheckSum{3390} +% \CheckSum{3410} % % \iffalse %<*driver> @@ -200,7 +200,7 @@ % % \begin{macrocode} \NeedsTeXFormat{LaTeX2e}[1994/12/01] -\ProvidesPackage{caption3}[2011/11/01 v1.4a caption3 kernel (AR)] +\ProvidesPackage{caption3}[2012/01/12 v1.4b caption3 kernel (AR)] % \end{macrocode} % % \subsection{Generic helpers} @@ -838,9 +838,9 @@ % % \changes{v1.1}{2007/07/02}{Option \opt{options=} added} % \changes{v1.3}{2010/09/05}{Option \opt{options*=} added} +% \changes{v1.4b}{2012/01/12}{Option \opt{options*=} removed} % \begin{macrocode} \DeclareCaptionOption{options}{\caption@setoptions{#1}} -\DeclareCaptionOption{options*}{\caption@setoptions*{#1}} % \end{macrocode} % % \begin{macro}{\caption@setoptions} @@ -851,22 +851,22 @@ % \changes{v1.1}{2007/05/09}{Renamed from \cs{caption@settype} to \cs{caption@setoptions}} % \changes{v1.2}{2007/12/03}{Definition of \cs{caption@iftypewarning} removed} % \changes{v1.3}{2010/09/05}{Starred variant added} -% |\caption@setoptions*|\marg{type or environment or\ldots}\par +% \changes{v1.4b}{2012/01/12}{Starred variant removed} +% |\caption@setoptions|\marg{type or environment or\ldots}\par % Caption options which have been saved with |\captionsetup|\oarg{type} can % be executed by using this command. % It simply executes the saved option list (and clears it afterwards), -% if there is any. (The starred variant do not clear the option list.) -% \begin{macrocode} -\newcommand*\caption@setoptions{% - \caption@teststar\caption@set@options\@gobble\@firstofone} -% \end{macrocode} +% if there is any. +% \iffalse +% (The starred variant do not clear the option list.) +% \fi % \begin{macrocode} -\newcommand*\caption@set@options[2]{% - \caption@Debug{options=#2}% - \expandafter\let\expandafter\caption@opt\csname caption@opt@#2\endcsname +\newcommand*\caption@setoptions[1]{% + \caption@Debug{options=#1}% + \expandafter\let\expandafter\caption@opt\csname caption@opt@#1\endcsname \ifx\caption@opt\relax \else \caption@xsetup\caption@opt - #1{\caption@clearsetup{#2}}% #1 = \@firstofone -or- \@gobble + \caption@clearsetup{#1}% \fi} % \end{macrocode} % \begin{macrocode} @@ -2029,49 +2029,73 @@ % \changes{v1.0o}{2007/04/11}{Bugfix: Usage of \cs{caption@Info} replaced % by \cs{caption@Debug}} % \changes{v1.1}{2007/04/16}{A different warning will be given on first \LaTeX\ run} -% |\caption@ragged| will be basically defined as -% \begin{quote} -% |\AtBeginDocument{\IfFileExists{ragged2e.sty}%|\\ -% | {\RequirePackage{ragged2e}\let\caption@ragged\@firstoftwo}%|\\ -% | {\let\caption@ragged\@secondoftwo}}| -% \end{quote} -% but with an additional warning if the ragged2e package is not loaded (yet). -% (This warning will be type out only one time per option, that's why -% we need the |caption\string#1| stuff.) -% Furthermore we load the \package{ragged2e} package, if needed and available. +% \changes{v1.4f}{2012/01/12}{Uses \cs{caption@IfPackageLoaded} now} +% |\caption@ragged|\marg{yes-code}\marg{no-code} +% executes the \meta{yes-code} if the \package{ragged2e} package is loaded +% and \meta{no-code} if not. Additionally it tries to load the \package{ragged2e} +% package. % \begin{macrocode} -\newcommand*\caption@ragged{% - \caption@Debug{We need ragged2e}% - \protected@write\@auxout{}{\string\caption@newlabel{ragged2e}{}}% - \global\let\caption@ragged\caption@@ragged - \caption@ragged} +\newcommand*\caption@ragged{\caption@ifpackageloaded{ragged2e}} % \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@ifpackageloaded} +% \changes{v1.4f}{2012/01/12}{This macro added} +% |\caption@ifpackageloaded|\marg{package}\marg{yes-code}\marg{no-code} +% executes the \meta{yes-code} if the given package is loaded +% and \meta{no-code} if not. Additionally it tries to load the package. % \begin{macrocode} -\caption@AtBeginDocument{% - \@ifundefined{caption@r@ragged2e}{% - \newcommand*\caption@@ragged{% - \caption@Warning{% - `ragged2e' support has been changed.\MessageBreak - Rerun to get captions right}% - \global\let\caption@ragged\@secondoftwo % suppress further warnings - \caption@ragged}% - }{% - \caption@Debug{We load ragged2e}% - \IfFileExists{ragged2e.sty}{% - \RequirePackage{ragged2e}% - \let\caption@@ragged\@firstoftwo - }{% - \newcommand*\caption@@ragged[2]{% - \@ifundefined{caption\string#1}{% - \caption@Warning{% - `ragged2e' package not loaded, therefore\MessageBreak - substituting \string#2 for \string#1\MessageBreak}% - \global\@namedef{caption\string#1}}{}% - #2}% - }% - }} +\newcommand*\caption@ifpackageloaded[1]{% + \@ifundefined{caption@ifpkg@#1}% + {\caption@RequirePackage{#1}% + \caption@pkg@true{#1}}% + {}% + \caption@ifpkg{#1}} +% \end{macrocode} +% \begin{macrocode} +\AtBeginDocument{\renewcommand*\caption@ifpackageloaded[1]{% + \@ifundefined{caption@ifpkg@#1}% + {\caption@addto@pkg@list{#1}% + \caption@pkg@false{#1}% + \caption@Warning{% + `#1' support has been changed.\MessageBreak + Rerun to get captions right}}% + {}% + \caption@ifpkg{#1}}} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@ifpkg[1]{% + \csname caption@ifpkg@#1\endcsname} +\newcommand*\caption@pkg@true[1]{% + \global\expandafter\let\csname caption@ifpkg@#1\endcsname\@firstoftwo} +\newcommand*\caption@pkg@false[1]{% + \global\expandafter\let\csname caption@ifpkg@#1\endcsname\@secondoftwo} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@pkg@list{} +\newcommand*\caption@addto@pkg@list[1]{% + \protected@write\@auxout{}{% + \string\@cons\string\caption@pkg@list{{#1}}}} +% \end{macrocode} +% \begin{macrocode} +\AtBeginDocument{% + \def\caption@tempa{\endgroup}% + \begingroup + \def\@elt#1{% + \g@addto@macro\caption@tempa{% + \caption@RequirePackage{#1}% + \@namedef{caption@ifpkg@#1}{% + \caption@addto@pkg@list{#1}% + \caption@pkg@true{#1}% + \caption@ifpkg{#1}}}}% + \caption@pkg@list + \caption@tempa} % \end{macrocode} % \begin{macrocode} +\newcommand*\caption@RequirePackage[1]{% + \caption@Info{We need package `#1'}% + \RequirePackage{#1}} +\@onlypreamble\caption@RequirePackage % \end{macrocode} % \end{macro} % @@ -2893,7 +2917,7 @@ \let\@tempa\@firstofone}% \@tempa {\caption@Debug{addcontentsline: #1 => \caption@listtype}% -% \caption@setoptions*\caption@listtype +% \caption@setoptions\caption@listtype \@namedef{the\caption@listtype}{\@nameuse{the#1}}}% \expandafter\caption@@addcontentsline\expandafter{\caption@listtype}{#2}% \endgroup}} @@ -3571,12 +3595,9 @@ % % \subsection{subfig package adaptions} % \changes{v1.0i}{2007/01/07}{Very small bugfix of \package{subfig} package added} -% \changes{v1.0j}{2007/01/31}{Bugfix of subfig package moved from package} +% \changes{v1.0j}{2007/01/31}{Bugfix of \package{subfig} package moved from package to kernel} % \changes{v1.1}{2007/07/07}{Several adaptions to the \package{subfig} package added} -% \changes{v1.2e}{2010/01/09}{Patch for better hyperref support added to \package{subfig} package adaptions} -% \changes{v1.2f}{2010/01/14}{Latest patch didn't worked without hyperref; fixed} -% \changes{v1.3}{2010/12/20}{subfig package bugfixes dropped} -% \changes{v1.4a}{2011/11/01}{Bugfix 11-11-01: Test for the subfig package revised} +% \changes{v1.4a}{2011/11/01}{Bugfix 11-11-01: Test for the \package{subfig} package revised} % % Since the \package{subfig} package is not maintained anymore, % we have to make several adaptions to \thispackage~\version{1.1} here. @@ -3599,6 +3620,9 @@ \let\sf@NEW@dottedxxxline\@undefined \let\sf@NEW@subfloat\@undefined} % \end{macrocode} +% +% \begin{macro}{\@dottedxxxline} +% New version of |\@dottedxxxline| % \begin{macrocode} \def\sf@NEW@dottedxxxline#1#2#3#4#5#6#7{% \begingroup @@ -3610,9 +3634,15 @@ \fi \endgroup} % \end{macrocode} +% \end{macro} +% +% \begin{macro}{\sf@subfloat} +% \changes{v1.4b}{2011/12/29}{Bugfix 11-12-23: Usage of \cs{caption@warmup} added} +% New version of |\sf@subfloat| % \begin{macrocode} \def\sf@NEW@subfloat{% \begingroup + \@nameuse{caption@warmup}% \caption@setfloattype\@captype \sf@ifpositiontop{% \maincaptiontoptrue @@ -3632,6 +3662,7 @@ {\sf@@subfloat}% {\sf@@subfloat[\@empty]}} % \end{macrocode} +% \end{macro} % % \iffalse %</package> @@ -3639,6 +3670,11 @@ % % \clearpage % \begin{thebibliography}{99} +% \bibitem{TLC2} +% Frank Mittelbach and Michel Goossens:\\ +% \newblock {\em The {\LaTeX} Companion (2nd.~Ed.)},\\ +% \newblock Addison-Wesley, 2004. +% % \bibitem{Anne} % Anne Br\"uggemann-Klein:\\ % \emph{Einf\"uhrung in die Dokumentverarbeitung},\\ |