diff options
author | Karl Berry <karl@freefriends.org> | 2011-11-06 23:24:43 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2011-11-06 23:24:43 +0000 |
commit | e678d3b58e25f99b6c7aa3e828add9502768371c (patch) | |
tree | 5ce7df892e6657936807337df43e08ea66cba374 /Master/texmf-dist/tex/latex/caption/caption3.sty | |
parent | 91348b19948d3b43f8e39cdd834970482dd5f062 (diff) |
caption (6nov11)
git-svn-id: svn://tug.org/texlive/trunk@24525 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/caption/caption3.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/caption/caption3.sty | 469 |
1 files changed, 29 insertions, 440 deletions
diff --git a/Master/texmf-dist/tex/latex/caption/caption3.sty b/Master/texmf-dist/tex/latex/caption/caption3.sty index 6945a8c6ac4..6bfa4f541a9 100644 --- a/Master/texmf-dist/tex/latex/caption/caption3.sty +++ b/Master/texmf-dist/tex/latex/caption/caption3.sty @@ -23,13 +23,13 @@ %% This Current Maintainer of this work is Axel Sommerfeldt. %% %% This work consists of the files caption.ins, caption.dtx, caption2.dtx, -%% caption3.dtx, bicaption.dtx, ltcaption.dtx, and subcaption.dtx, -%% the derived files caption.sty, caption2.sty, caption3.sty, bicaption.sty, -%% ltcaption.sty, and subcaption.sty, and the user manuals caption-deu.tex, -%% caption-eng.tex, and caption-rus.tex. +%% 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, +%% and the user manuals caption-deu.tex, caption-eng.tex, and caption-rus.tex. %% \NeedsTeXFormat{LaTeX2e}[1994/12/01] -\ProvidesPackage{caption3}[2011/10/09 v1.4 caption3 kernel (AR)] +\ProvidesPackage{caption3}[2011/11/01 v1.4a caption3 kernel (AR)] \providecommand*\@nameundef[1]{% \expandafter\let\csname #1\endcsname\@undefined} \providecommand\l@addto@macro[2]{% @@ -1317,17 +1317,15 @@ \let\caption@fmt\caption@slfmt} \newcommand*\caption@prepareslc{% \let\label\caption@gobble - \let\caption@footnote@ORI\footnote - \def\footnote{\caption@withoptargs\caption@footnote}% \let\caption@footnotemark@ORI\footnotemark + \def\footnote{\caption@withoptargs\caption@footnote}% \def\footnotemark{\caption@withoptargs\caption@footnotemark}% - \let\@footnotetext\@gobble - \let\@endnotetext\@gobble} + \let\@footnotetext\caption@gobble + \let\@endnotetext\caption@gobble + \let\pagenote\caption@gobble +} \newcommand\caption@footnote[2]{% - \begingroup - \let\stepcounter\caption@l@stepcounter - \caption@footnote@ORI#1{#2}% - \endgroup} + \caption@footnotemark{#1}} \newcommand\caption@footnotemark[1]{% \begingroup \let\stepcounter\caption@l@stepcounter @@ -1399,431 +1397,22 @@ \newcommand*\caption@@par{% \parindent\caption@parindent\hangindent\caption@hangindent}% \newcommand*\DeclareCaptionType{% - \@testopt\@DeclareCaptionType{}} + \RequirePackage{newfloat}% + \DeclareFloatingEnvironment} \@onlypreamble\DeclareCaptionType -\def\@DeclareCaptionType[#1]#2{% - \def\caption@type{#2}% - \caption@Debug{New type `#2'}% - \newcounter{#2}\@namedef{theH#2}{}% - \KV@caption@DCT@within\caption@within@default - \caption@DeclareWithinOption{#2}% - \KV@caption@DCT@placement{tbp}% - \caption@ifundefined\c@float@type - {\newcounter{float@type}% - \setcounter{float@type}{\caption@ifundefined\c@figure14}}% - {}% - \caption@Debug{float type `#2'=\the\value{float@type}}% - \expandafter\xdef\csname ftype@#2\endcsname{\the\value{float@type}}% - \addtocounter{float@type}{\value{float@type}}% - \KV@caption@DCT@fileext{lo#2}% - \@namedef{fnum@#2}{\@nameuse{#2name}\nobreakspace\@nameuse{the#2}}% - \newenvironment{#2}{\@float{#2}}{\end@float}% - \newenvironment{#2*}{\@dblfloat{#2}}{\end@dblfloat}% - \expandafter\newcommand\csname listof#2s\endcsname{\caption@listof{#2}}% - \expandafter\newcommand\csname listof#2es\endcsname{\caption@listof{#2}}% - \caption@ifundefined\l@figure - {\@namedef{l@#2}{\@dottedtocline{1}{1.5em}{2.3em}}}% - {\expandafter\let\csname l@#2\endcsname\l@figure}% - \expandafter\newcommand\csname #2name\endcsname{}% - \edef\@tempa{\def\noexpand\@tempa{\@car#2\@nil}}% - \uppercase\expandafter{\@tempa}% - \edef\@tempb{\noexpand\g@addto@macro\noexpand\@tempa{\@cdr#2\@nil}}% - \@tempb - \expandafter\let\csname #2name\endcsname\@tempa - \expandafter\newcommand\csname list#2name\endcsname{}% - \expandafter\xdef\csname list#2name\endcsname{List of \@tempa s}% - \@cons\caption@typelist{{#2}}% - \caption@setkeys[caption]{caption@DCT}{#1}% - \expandafter\caption@DeclareTypeExt\expandafter{\@nameuse{ext@#2}}{#2}% - \@ifnextchar[\@@DeclareCaptionType\relax} -\@onlypreamble\@DeclareCaptionType -\def\@@DeclareCaptionType[#1]{% - \KV@caption@DCT@name{#1}% - \@ifnextchar[\@@@DeclareCaptionType\relax} -\@onlypreamble\@@DeclareCaptionType -\def\@@@DeclareCaptionType[#1]{% - \KV@caption@DCT@listname{#1}} -\@onlypreamble\@@@DeclareCaptionType -\let\DeclareFloatingEnvironment\DeclareCaptionType % alternative command name -\@onlypreamble\DeclareFloatingEnvironment -\newcommand*\caption@DeclareTypeExt[2]{% - \caption@ifundefined\@chapter\relax\caption@PatchChapter - \let\caption@PatchChapter\relax - \@ifundefined{caption@ext@#1}{% - \@namedef{caption@ext@#1}{#2}% - \caption@ifundefined\float@exts{\newtoks\float@exts}{}% - \let\float@do=\relax - \edef\@tempa{\noexpand\float@exts{\the\float@exts\float@do{#1}}}% - \@tempa - \caption@ifundefined\caption@addtolists{% - \newcommand\caption@addtolists[1]{% - \def\float@do####1{\addtocontents{####1}{##1}}\the\float@exts}}{}% - \caption@ifundefined\addtotoclist{}{% - \addtotoclist[float]{#1}% - \setuptoc{#1}{chapteratlist}% - \@namedef{listof#1name}{\list#2name}}% - }{}% - \caption@ifundefined\contentsuse{}{% - \contentsuse{#2}{#1}}% -} -\@onlypreamble\caption@DeclareTypeExt -\newcommand*\caption@within@default{% - \caption@ifundefined\c@chapter{none}{chapter}} -\@onlypreamble\caption@within@default -\caption@ifundefined\listoftoc{% - \newcommand*\caption@listof[1]{% - \begingroup - \expandafter\let\expandafter\listfigurename\csname list#1name\endcsname - \expandafter\let\expandafter\ext@figure\csname ext@#1\endcsname - \let\caption@ORI@starttoc\@starttoc - \renewcommand*\@starttoc[1]{% - \expandafter\caption@ORI@starttoc\expandafter{\ext@figure}}% - \listoffigures - \endgroup}% -}{% - \newcommand*\caption@listof[1]{% - \expandafter\listoftoc\expandafter{\@nameuse{ext@#1}}}% -} -\newcommand*\caption@typelist{} -\define@key{caption@DCT}{fileext}{\@namedef{ext@\caption@type}{#1}} -\@onlypreamble@key{caption@DCT}{fileext} -\define@key{caption@DCT}{listname}{\@namedef{list\caption@type name}{#1}} -\@onlypreamble@key{caption@DCT}{listname} -\define@key{caption@DCT}{name}{\@namedef{\caption@type name}{#1}} -\@onlypreamble@key{caption@DCT}{name} -\define@key{caption@DCT}{placement}{\@namedef{fps@\caption@type}{#1}} -\@onlypreamble@key{caption@DCT}{placement} -\define@key{caption@DCT}{within}{% - \caption@ifundefined\c@chapter{}{\@removefromreset\caption@type{chapter}}% - \@removefromreset\caption@type{section}% - \begingroup - \caption@setkeys[caption]{caption@within}{#1}% - \endgroup} -\define@key{caption@DCT}{without}{\KV@caption@DCT@within{none}} -\define@key{caption@within}{none}[]{% - \caption@within{}{}} -\define@key{caption@within}{section}[]{% - \@addtoreset\caption@type{section}% - \caption@within{\ifnum\c@section>\z@ \thesection.\fi}{\theHsection.}} -\caption@ifundefined\c@chapter{}{% - \define@key{caption@within}{chapter}[]{% - \@addtoreset\caption@type{chapter}% - \caption@within{\ifnum\c@chapter>\z@ \thechapter.\fi}{\theHchapter.}} -}% \@onlypreamble@key{caption@within}{chapter}} -\newcommand*\caption@within{% - \expandafter\caption@within@\expandafter{\caption@type}} -\newcommand*\caption@within@[3]{% - \global\@namedef{the#1}{#2\arabic{#1}}% - \@ifundefined{theH#1}\caption@AtBeginDocument\@firstofone - {\global\@namedef{theH#1}{#3\arabic{#1}}}} -\providecommand*\@removefromreset[2]{{% - \expandafter\let\csname c@#1\endcsname\@removefromreset - \def\@elt##1{% - \expandafter\ifx\csname c@##1\endcsname\@removefromreset - \else - \noexpand\@elt{##1}% - \fi}% - \expandafter\xdef\csname cl@#2\endcsname{% - \csname cl@#2\endcsname}}} -\newcommand*\caption@PatchChapter{% - \providecommand*\@chapterlistsgap{10\p@}% - % report.cls [2005/09/16 v1.4f Standard LaTeX document class] - \caption@patch@chapter{report}{% - \ifnum \c@secnumdepth >\m@ne - \refstepcounter{chapter}% - \typeout{\@chapapp\space\thechapter.}% - \addcontentsline{toc}{chapter}% - {\protect\numberline{\thechapter}##1}% - \else - \addcontentsline{toc}{chapter}{##1}% - \fi - \chaptermark{##1}% - \addtocontents{lof}{\protect\addvspace{10\p@}}% - \addtocontents{lot}{\protect\addvspace{10\p@}}% - \if@twocolumn - \@topnewpage[\@makechapterhead{##2}]% - \else - \@makechapterhead{##2}% - \@afterheading - \fi - }{% - \ifnum \c@secnumdepth >\m@ne - \refstepcounter{chapter}% - \typeout{\@chapapp\space\thechapter.}% - \addcontentsline{toc}{chapter}% - {\protect\numberline{\thechapter}##1}% - \else - \addcontentsline{toc}{chapter}{##1}% - \fi - \chaptermark{##1}% - \ifdim \@chapterlistsgap>\z@ - \addtocontents{lof}{\protect\addvspace{\@chapterlistsgap}}% - \addtocontents{lot}{\protect\addvspace{\@chapterlistsgap}}% - \caption@addtolists{\protect\addvspace{\@chapterlistsgap}}% - \fi - \if@twocolumn - \@topnewpage[\@makechapterhead{##2}]% - \else - \@makechapterhead{##2}% - \@afterheading - \fi}% - % book.cls [2005/09/16 v1.4f Standard LaTeX document class] - \caption@patch@chapter{book}{% - \ifnum \c@secnumdepth >\m@ne - \if@mainmatter - \refstepcounter{chapter}% - \typeout{\@chapapp\space\thechapter.}% - \addcontentsline{toc}{chapter}% - {\protect\numberline{\thechapter}##1}% - \else - \addcontentsline{toc}{chapter}{##1}% - \fi - \else - \addcontentsline{toc}{chapter}{##1}% - \fi - \chaptermark{##1}% - \addtocontents{lof}{\protect\addvspace{10\p@}}% - \addtocontents{lot}{\protect\addvspace{10\p@}}% - \if@twocolumn - \@topnewpage[\@makechapterhead{##2}]% - \else - \@makechapterhead{##2}% - \@afterheading - \fi - }{% - \ifnum \c@secnumdepth >\m@ne - \if@mainmatter - \refstepcounter{chapter}% - \typeout{\@chapapp\space\thechapter.}% - \addcontentsline{toc}{chapter}% - {\protect\numberline{\thechapter}##1}% - \else - \addcontentsline{toc}{chapter}{##1}% - \fi - \else - \addcontentsline{toc}{chapter}{##1}% - \fi - \chaptermark{##1}% - \ifdim \@chapterlistsgap>\z@ - \addtocontents{lof}{\protect\addvspace{\@chapterlistsgap}}% - \addtocontents{lot}{\protect\addvspace{\@chapterlistsgap}}% - \caption@addtolists{\protect\addvspace{\@chapterlistsgap}}% - \fi - \if@twocolumn - \@topnewpage[\@makechapterhead{##2}]% - \else - \@makechapterhead{##2}% - \@afterheading - \fi}% - % amsbook.cls [2004/08/06 v2.20] - % smfbook.cls [1999/11/15 v1.2f Classe LaTeX pour les monographies editees par la SMF] - \caption@patch@chapter{ams/smfbook}{% - \refstepcounter{chapter}% - \ifnum\c@secnumdepth<\z@ \let\@secnumber\@empty - \else \let\@secnumber\thechapter \fi - \typeout{\chaptername\space\@secnumber}% - \def\@toclevel{0}% - \ifx\chaptername\appendixname \@tocwriteb\tocappendix{chapter}{##2}% - \else \@tocwriteb\tocchapter{chapter}{##2}\fi - \chaptermark{##1}% - \addtocontents{lof}{\protect\addvspace{10\p@}}% - \addtocontents{lot}{\protect\addvspace{10\p@}}% - \@makechapterhead{##2}\@afterheading - }{% - \refstepcounter{chapter}% - \ifnum\c@secnumdepth<\z@ \let\@secnumber\@empty - \else \let\@secnumber\thechapter \fi - \typeout{\chaptername\space\@secnumber}% - \def\@toclevel{0}% - \ifx\chaptername\appendixname \@tocwriteb\tocappendix{chapter}{##2}% - \else \@tocwriteb\tocchapter{chapter}{##2}\fi - \chaptermark{##1}% - \ifdim \@chapterlistsgap>\z@ - \addtocontents{lof}{\protect\addvspace{\@chapterlistsgap}}% - \addtocontents{lot}{\protect\addvspace{\@chapterlistsgap}}% - \caption@addtolists{\protect\addvspace{\@chapterlistsgap}}% - \fi - \@makechapterhead{##2}\@afterheading}% - % scrreprt/scrbook.cls - \caption@ifundefined\KOMAClassName{}{% - \caption@Debug{document class `\KOMAClassName' detected}% - \let\caption@patch@chapter\@gobblethree}% - % rapport1/3.cls [2004/06/07 v2.1a NTG LaTeX document class] - \caption@patch@chapter{rapport}{% - \ifnum \c@secnumdepth >\m@ne - \refstepcounter{chapter}% - \typeout{\@chapapp\space\thechapter.}% - \addcontentsline{toc}{chapter}% - {\protect\numberline{\thechapter}\toc@font0 ##1}% - \else - \addcontentsline{toc}{chapter}{\toc@font0 ##1}% - \fi - \chaptermark{##1}% - \addtocontents{lof}{\protect\addvspace{10\p@}}% - \addtocontents{lot}{\protect\addvspace{10\p@}}% - \if@twocolumn - \@topnewpage[\@makechapterhead{##2}]% - \else - \@makechapterhead{##2}% - \@afterheading - \fi - }{% - \ifnum \c@secnumdepth >\m@ne - \refstepcounter{chapter}% - \typeout{\@chapapp\space\thechapter.}% - \addcontentsline{toc}{chapter}% - {\protect\numberline{\thechapter}\toc@font0 ##1}% - \else - \addcontentsline{toc}{chapter}{\toc@font0 ##1}% - \fi - \chaptermark{##1}% - \ifdim \@chapterlistsgap>\z@ - \addtocontents{lof}{\protect\addvspace{\@chapterlistsgap}}% - \addtocontents{lot}{\protect\addvspace{\@chapterlistsgap}}% - \caption@addtolists{\protect\addvspace{\@chapterlistsgap}}% - \fi - \if@twocolumn - \@topnewpage[\@makechapterhead{##2}]% - \else - \@makechapterhead{##2}% - \@afterheading - \fi}% - % boek(3).cls [2004/06/07 v2.1a NTG LaTeX document class] - \caption@patch@chapter{boek}{% - \ifnum \c@secnumdepth >\m@ne - \if@mainmatter - \refstepcounter{chapter}% - \typeout{\@chapapp\space\thechapter.}% - \addcontentsline{toc}{chapter}% - {\protect\numberline{\thechapter}\toc@font0 ##1}% - \else - \addcontentsline{toc}{chapter}{\toc@font0 ##1}% - \fi - \else - \addcontentsline{toc}{chapter}{\toc@font0 ##1}% - \fi - \chaptermark{##1}% - \addtocontents{lof}{\protect\addvspace{10\p@}}% - \addtocontents{lot}{\protect\addvspace{10\p@}}% - \if@twocolumn - \@topnewpage[\@makechapterhead{##2}]% - \else - \@makechapterhead{##2}% - \@afterheading - \fi - }{% - \ifnum \c@secnumdepth >\m@ne - \if@mainmatter - \refstepcounter{chapter}% - \typeout{\@chapapp\space\thechapter.}% - \addcontentsline{toc}{chapter}% - {\protect\numberline{\thechapter}\toc@font0 ##1}% - \else - \addcontentsline{toc}{chapter}{\toc@font0 ##1}% - \fi - \else - \addcontentsline{toc}{chapter}{\toc@font0 ##1}% - \fi - \chaptermark{##1}% - \ifdim \@chapterlistsgap>\z@ - \addtocontents{lof}{\protect\addvspace{\@chapterlistsgap}}% - \addtocontents{lot}{\protect\addvspace{\@chapterlistsgap}}% - \caption@addtolists{\protect\addvspace{\@chapterlistsgap}}% - \fi - \if@twocolumn - \@topnewpage[\@makechapterhead{##2}]% - \else - \@makechapterhead{##2}% - \@afterheading - \fi}% - % thesis.cls [1996/25/01 1.0g LaTeX document class (wm).] - \caption@patch@chapter{thesis}{% - \ifnum \c@secnumdepth >\m@ne - \if@mainmatter - \refstepcounter{chapter}% - \typeout{\chaptername\space\thechapter.} - \if@thema - \ifx\@shortauthor\@empty - \addcontentsline{toc}{chapter}{% - \protect\numberline{\thechapter.}##1}% - \else - \addcontentsline{toc}{chapter}{% - \protect\numberline{\thechapter.}% - \@shortauthor\hfill\mbox{}\vskip\normallineskip ##1}% - \fi - \else - \addcontentsline{toc}{chapter}{% - \protect\numberline{\thechapter.}##1}% - \fi - \else - \addcontentsline{toc}{chapter}{##1} - \fi - \else - \addcontentsline{toc}{chapter}{##1} - \fi - \chaptermark{##1} - \addtocontents{lof}{\protect\addvspace{10pt}} - \addtocontents{lot}{\protect\addvspace{10pt}} - \if@twocolumn - \@topnewpage[\@makechapterhead{##2}] - \else - \@makechapterhead{##2} - \@afterheading - \fi - }{% - \ifnum \c@secnumdepth >\m@ne - \if@mainmatter - \refstepcounter{chapter}% - \typeout{\chaptername\space\thechapter.}% - \if@thema - \ifx\@shortauthor\@empty - \addcontentsline{toc}{chapter}{% - \protect\numberline{\thechapter.}##1}% - \else - \addcontentsline{toc}{chapter}{% - \protect\numberline{\thechapter.}% - \@shortauthor\hfill\mbox{}\vskip\normallineskip ##1}% - \fi - \else - \addcontentsline{toc}{chapter}{% - \protect\numberline{\thechapter.}##1}% - \fi - \else - \addcontentsline{toc}{chapter}{##1}% - \fi - \else - \addcontentsline{toc}{chapter}{##1}% - \fi - \chaptermark{##1}% - \ifdim \@chapterlistsgap>\z@ - \addtocontents{lof}{\protect\addvspace{\@chapterlistsgap}}% - \addtocontents{lot}{\protect\addvspace{\@chapterlistsgap}}% - \caption@addtolists{\protect\addvspace{\@chapterlistsgap}}% - \fi - \if@twocolumn - \@topnewpage[\@makechapterhead{##2}]% - \else - \@makechapterhead{##2}% - \@afterheading - \fi}% - \ifx\caption@patch@chapter\@gobblethree \else - \caption@Debug{% - Unsupported document class detected,\MessageBreak - or \noexpand\@chapter was redefined by another package}% - \fi - \let\caption@PatchChapter\@undefined} -\newcommand\caption@patch@chapter[3]{% - \begingroup - \let\if@mainmatter\iffalse - \let\if@thema\iffalse - \def\@tempa[##1]##2{#2}% - \ifx\@tempa\@chapter - \caption@Debug{document class `#1' detected}% - \gdef\@chapter[##1]##2{#3}% - \global\let\caption@patch@chapter\@gobblethree - \fi - \endgroup} -\long\def \@gobblethree #1#2#3{} +\newcommand\caption@ForEachType[1]{% + \caption@ifundefined\ForEachFloatingEnvironment + {\def\@elt##1{#1}% + \caption@ifundefined\c@figure\@gobble\@elt{figure}% + \caption@ifundefined\c@table\@gobble\@elt{table}% + \let\@elt\relax + \newfloat@addtohook{#1}}% + {\ForEachFloatingEnvironment{#1}}} +\providecommand\newfloat@addtohook[1]{% + \toks@=\expandafter{\newfloat@hook{##1}#1}% + \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{% @@ -1927,9 +1516,9 @@ \@nameuse{caption@#2}% \let\@elt\relax}}% \caption@AtBeginDocument{% - \def\@tempa{\@ifstar\sf@@subref\sf@subref}% - \ifx\subref\@tempa - \caption@InfoNoLine{subfig package 1.2 or 1.3 is loaded}% + \def\@tempa{2005/06/28 ver: 1.3 subfig package}% + \expandafter\ifx\csname ver@subfig.sty\endcsname\@tempa + \caption@InfoNoLine{subfig package v1.3 is loaded}% \let\caption@setfloattype\@gobble \let\@dottedxxxline\sf@NEW@dottedxxxline \let\sf@subfloat\sf@NEW@subfloat |