From e678d3b58e25f99b6c7aa3e828add9502768371c Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 6 Nov 2011 23:24:43 +0000 Subject: caption (6nov11) git-svn-id: svn://tug.org/texlive/trunk@24525 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/caption/bicaption.sty | 28 +- Master/texmf-dist/tex/latex/caption/caption.sty | 140 ++--- Master/texmf-dist/tex/latex/caption/caption2.sty | 8 +- Master/texmf-dist/tex/latex/caption/caption3.sty | 469 +-------------- Master/texmf-dist/tex/latex/caption/ltcaption.sty | 8 +- Master/texmf-dist/tex/latex/caption/newfloat.sty | 654 +++++++++++++++++++++ Master/texmf-dist/tex/latex/caption/subcaption.sty | 14 +- 7 files changed, 749 insertions(+), 572 deletions(-) create mode 100644 Master/texmf-dist/tex/latex/caption/newfloat.sty (limited to 'Master/texmf-dist/tex/latex/caption') diff --git a/Master/texmf-dist/tex/latex/caption/bicaption.sty b/Master/texmf-dist/tex/latex/caption/bicaption.sty index 626974a46bc..b1a0c37f5e0 100644 --- a/Master/texmf-dist/tex/latex/caption/bicaption.sty +++ b/Master/texmf-dist/tex/latex/caption/bicaption.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{bicaption}[2011/09/03 v1.0 Bilingual Captions (AR)] +\ProvidesPackage{bicaption}[2011/10/30 v1.0a Bilingual Captions (AR)] \RequirePackage{caption}[2011/08/28] % needs v3.2c or newer \caption@AtBeginDocument{\caption@ifcompatibility{% \caption@Error{% @@ -77,12 +77,15 @@ \g@addto@macro\caption@prepareslc{% \let\bicaption@language\@undefined} \caption@ExecuteOptions{caption}{bi-lang=0,bi-slc=1,bi-swap=0} -\ifx\bbl@main@language\@undefined - \bicaption@WarningNoLine{Please load this package after the babel package} -\else +\ifcsname bbl@main@language\endcsname \edef\@tempa{\noexpand\captionsetup[bi-first]{lang=\bbl@main@language}} \@tempa -\fi +\else\ifcsname xpg@main@language\endcsname + \edef\@tempa{\noexpand\captionsetup[bi-first]{lang=\xpg@main@language}} + \@tempa +\else + \bicaption@WarningNoLine{Please load this package after the babel package} +\fi\fi \caption@SetupOptions{bicaption}{\captionsetup[bi-second]{#2}}% \caption@ProcessOptions*{bicaption} \let\caption@kernel@addcontentsline@ORI\caption@kernel@addcontentsline @@ -213,12 +216,11 @@ \l@addto@macro\caption@warmup{% \let\bicaption\caption@frozen@bicaption}}% \fi} -\def\bicaption@declarelist#1{\@namedef{listof#1}{\bicaption@listof#1}} +\newcommand*\bicaption@declarelist[1]{% + \@namedef{listof#1}{\bicaption@listof#1}} \@onlypreamble\bicaption@declarelist \def\bicaption@listof#1 {\@nameuse{listof#1}} -\caption@ifundefined\c@figure{}{\bicaption@declarelist{figure}} -\caption@ifundefined\c@table{}{\bicaption@declarelist{table}} -\caption@For{typelist}{\bicaption@declarelist{#1}} +\caption@ForEachType{\bicaption@declarelist{#1}} \endinput %% %% End of file `bicaption.sty'. diff --git a/Master/texmf-dist/tex/latex/caption/caption.sty b/Master/texmf-dist/tex/latex/caption/caption.sty index 182fff51a05..61d6435ff03 100644 --- a/Master/texmf-dist/tex/latex/caption/caption.sty +++ b/Master/texmf-dist/tex/latex/caption/caption.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{caption}[2011/09/30 v3.2c Customizing captions (AR)] +\ProvidesPackage{caption}[2011/11/02 v3.2d Customizing captions (AR)] \RequirePackage{caption3}[2011/08/30] % needs v1.4 or newer \caption@ifbool{documentclass}{}{% \caption@WarningNoLine{% @@ -66,28 +66,26 @@ \DeclareCaptionOption{name}{\caption@setname\@captype{#1}} \DeclareCaptionOption{listfigurename}{\caption@SetName{listfigure}{#1}} \DeclareCaptionOption{listtablename}{\caption@SetName{listtable}{#1}} -\newcommand*\caption@SetName[2]{% - \caption@setname{#1}{#2}% - \begingroup - \caption@ifundefined\languagename{}{% - \@ifundefined{captions\languagename}{}{% - \expandafter\g@addto@macro\csname captions\languagename\endcsname - {\caption@setname{#1}{#2}}}}% - \endgroup} +\newcommand*\caption@SetName{% + \RequirePackage{newfloat}% + \newfloat@setname} \newcommand*\caption@setname[2]{\@namedef{#1name}{#2}} \caption@AtBeginDocument{\let\caption@SetName\caption@setname} \newcommand*\caption@DeclareWithinOption[1]{% \DeclareCaptionOption{#1within}{\caption@Within{#1}{##1}}% \DeclareCaptionOptionNoValue{#1without}{\caption@Within{#1}{none}}} +\@onlypreamble\caption@DeclareWithinOption \caption@DeclareWithinOption{figure} \caption@DeclareWithinOption{table} \DeclareCaptionOption{within}{% - \caption@ifundefined\c@figure{}{\caption@Within{figure}{#1}}% - \caption@ifundefined\c@table{}{\caption@Within{table}{#1}}% - \caption@For{typelist}{\caption@Within{##1}{#1}}% - \def\caption@within@default{#1}} -\DeclareCaptionOptionNoValue{without}{\KV@caption@within{none}} -\newcommand*\caption@Within[1]{\def\caption@type{#1}\KV@caption@DCT@within} + \RequirePackage{newfloat}% + \newfloatsetup{within=#1}} +\DeclareCaptionOptionNoValue{without}{% + \RequirePackage{newfloat}% + \newfloatsetup{without}} +\newcommand*\caption@Within{% + \RequirePackage{newfloat}% + \newfloat@setwithin} \DeclareCaptionOption*{config}[caption]{% \InputIfFileExists{#1.cfg}% {\typeout{*** Local configuration file #1.cfg used ***}}% @@ -272,6 +270,8 @@ \long\def\caption@@caption#1[#2]#3{% \ifcaption@star \else \caption@prepareanchor{#1}{#2}% + \M@gettitle{#2}% + \memcaptioninfo{#1}{\csname the#1\endcsname}{#2}{#3}% \fi \par \caption@beginex{#1}{#2}{#3}% @@ -288,6 +288,8 @@ {\ignorespaces\caption@makeanchor{#3}}\par \caption@if@minipage\@minipagetrue\@minipagefalse}% \caption@end} +\providecommand\M@gettitle[1]{} +\providecommand\memcaptioninfo[4]{} \newcommand*\caption@prepareanchor[2]{% \caption@makecurrent{#1}{#2}% \caption@ifhypcap\caption@@start{}} @@ -1170,12 +1172,6 @@ \fi}% \g@addto@macro\fs@plaintop{\def\@fs@mid{\vspace\abovecaptionskip\relax}}% \g@addto@macro\fs@boxed{\def\@fs@mid{\kern\abovecaptionskip\relax}}% - \providecommand*\float@ifstyle[1]{% - \expandafter\ifx\csname fst@#1\endcsname\relax - \expandafter\@secondoftwo - \else - \expandafter\@firstoftwo - \fi}% \providecommand*\float@getstyle[2]{% \edef#1{% \noexpand\expandafter\noexpand\@gobblefour\noexpand\string @@ -1183,11 +1179,6 @@ \csname fst@#2\endcsname}% \edef#1{#1}% \caption@Debug{floatstyle{#2} = `#1'}}% - \providecommand*\float@setstyle[2]{% - \expandafter\edef\csname fst@#1\endcsname{% - \expandafter\noexpand\csname fs@#2\endcsname}}% - \providecommand*\float@dostyle[1]{% - \@nameuse{fst@#1}\@float@setevery{#1}}% \providecommand*\float@ifcaption[1]{% \expandafter\ifx\csname @float@c@#1\endcsname\float@caption \expandafter\@firstoftwo @@ -1195,7 +1186,6 @@ \expandafter\@secondoftwo \fi}% }}{% - \providecommand*\float@ifstyle[1]{\@secondoftwo}% \providecommand*\float@ifcaption[1]{\@secondoftwo}% } \captionsetup[boxed]{skip=2pt} % do not issue a warning when not used @@ -1286,9 +1276,6 @@ \caption@defrost \end\FP@captype}% }% - \caption@For{typelist}{% - \newcounter{FP@#1C}% - \newenvironment{FP#1}{\FP@floatBegin{#1}}{\FP@floatEnd}}% }{% \let\caption@ifFPlistcap\@undefined \let\caption@ifFPrefcap\@undefined @@ -1570,9 +1557,6 @@ \nobreak\hspace{12pt}}% \newcommand\caption@makerot[2]{% \begin{minipage}\captionwidth\caption@@make{#1}{#2}\end{minipage}}% - \caption@For{typelist}{% - \newenvironment{sideways#1}{\@rotfloat{#1}}{\end@rotfloat}% - \newenvironment{sideways#1*}{\@rotdblfloat{#1}}{\end@rotdblfloat}}% }{} \caption@IfPackageLoaded{sidecap}[2003/06/06 v1.6f]{% \caption@setbool{needfreeze}{1}% @@ -1604,15 +1588,6 @@ \def\SC@orig@caption[##1]##2{\caption@defrost}% \caption@setSC@justify % for compatibility mode \caption@ORI@endSC@FLOAT}% - \newcommand*\caption@For@SC[2]{% - \def#1{b}% = \sidecaptionvpos{#2}{b} (v1.6) - \newenvironment{SC#2}% - {\SC@float[#1]{#2}}{\endSC@float}% - \newenvironment{SC#2*}% - {\SC@dblfloat[#1]{#2}}{\endSC@dblfloat}}% - \@onlypreamble\caption@For@SC - \caption@For{typelist}{% - \expandafter\caption@For@SC\csname SC@#1@vpos\endcsname{#1}}% }{} \caption@IfPackageLoaded{subfigure}[2002/01/23 v2.1]{% \def\sf@ifpositiontop{% @@ -1707,69 +1682,28 @@ %\newcommand*\caption@TPT@eatvskip{\vskip-.2\baselineskip}% \def\caption@TPT@eatvskip#1\vskip{#1\@tempdima=}% }{} -\caption@IfPackageLoaded{wrapfig}{% ver 3.3 (Oct 12, 1999) - \providecommand*\float@ifstyle[1]{% - \expandafter\ifx\csname fst@#1\endcsname\relax - \expandafter\@secondoftwo - \else - \expandafter\@firstoftwo - \fi}% - \newcommand*\caption@restylewrapfloat[1]{% - \expandafter\ifx\csname caption@OUR@wrap#1\expandafter\endcsname - \csname wrap#1\endcsname - \caption@Error{% - For a successful cooperation of the `wrapfig' package\MessageBreak - with the `float' package you should load the `wrapfig'\MessageBreak - package *after* the `float' package}% - \else - \expandafter\let\csname caption@ORI@wrap#1\expandafter\endcsname - \csname wrap#1\endcsname - \@namedef{wrap#1}{\caption@wrapfloat{#1}}% - \expandafter\let\csname caption@OUR@wrap#1\expandafter\endcsname - \csname wrap#1\endcsname - \fi}% - \newcommand*\caption@wrapfloat[1]{% - \caption@settype*{#1}% - \float@ifstyle{#1}{% - \ifx\WF@floatstyhook\@undefined - \caption@Error{% - For a successful cooperation of the `wrapfig' package\MessageBreak - with the `float' package you should use at least\MessageBreak - `wrapfig' version 3.6}% - \else - \float@dostyle{#1}% - \fi}{}% - \caption@clearmargin -%%% \caption@setoptions{wrapfloat}% - \caption@setoptions{wrap#1}% - \@nameuse{caption@ORI@wrap#1}}% - \caption@restylewrapfloat{figure}% - \caption@restylewrapfloat{table}% - \caption@For{typelist}{% - \newenvironment{wrap#1}{\wrapfloat{#1}}{\endwrapfloat}% - \caption@restylewrapfloat{#1}}% - \ifx\WF@floatstyhook\@undefined \else % wrapfig v3.6 - \caption@ifundefined\float@restyle{}{% - \toks@=\expandafter{\float@restyle{#1}% (env may or may not be defined) - \caption@restylewrapfloat{#1}}% - \edef\@tempa{\def\noexpand\float@restyle##1{\the\toks@}}% - \@tempa}% perform redefinitions - \let\caption@ORI@wrapfloat\wrapfloat - \def\wrapfloat#1{% - \float@ifstyle{#1}{% - \caption@Error{% - For a successful cooperation of the `wrapfig' package\MessageBreak - with the `float' package you should load the `wrapfig'\MessageBreak - package *right after* the `float' package}}{}% - \caption@ORI@wrapfloat{#1}}% - \fi % wrapfig v3.6 +\caption@IfPackageLoaded{wrapfig}[2003/01/31 v3.6]{% + \renewcommand*\wrapfloat[1]{% + \def\@captype{#1}% + \@ifundefined{fst@#1}{}{% + \@nameuse{fst@#1}% + \def\WF@floatstyhook{\let\@currbox\WF@box + \global\setbox\WF@box\float@makebox{\wd\WF@box}}}% + \@ifnextchar[\WF@wr{\WF@wr[]}} \def\WF@rapt[#1]#2{% final two args: #1 = overhang, #2 = width, \gdef\WF@ovh{#1}% hold overhang for later, when \width is known \global\setbox\WF@box\vtop\bgroup \setlength\hsize{#2}% - \caption@start + \expandafter\WF@captionstyhook\expandafter{\@captype}% <= new \ifdim\hsize>\z@ \@parboxrestore \else \setbox\z@\hbox\bgroup \let\wf@@caption\caption \let\caption\wf@caption \ignorespaces \fi}% + \def\WF@captionstyhook#1{% + \let\@captype\@undefined + \caption@ifundefined\@float@setevery{}{\@float@setevery{#1}}% + \caption@settype{#1}% + \caption@clearmargin +%%% \caption@setoptions{wrapfloat}% + \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 53525f205fd..377f1c1f548 100644 --- a/Master/texmf-dist/tex/latex/caption/caption2.sty +++ b/Master/texmf-dist/tex/latex/caption/caption2.sty @@ -23,10 +23,10 @@ %% 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{caption2}[2011/08/12 v2.2d Customising captions (AR)] 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 diff --git a/Master/texmf-dist/tex/latex/caption/ltcaption.sty b/Master/texmf-dist/tex/latex/caption/ltcaption.sty index a93c38c07b0..3619423a779 100644 --- a/Master/texmf-dist/tex/latex/caption/ltcaption.sty +++ b/Master/texmf-dist/tex/latex/caption/ltcaption.sty @@ -23,10 +23,10 @@ %% 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{ltcaption}[2011/09/12 v1.3 longtable captions (AR)] diff --git a/Master/texmf-dist/tex/latex/caption/newfloat.sty b/Master/texmf-dist/tex/latex/caption/newfloat.sty new file mode 100644 index 00000000000..dcee36a3233 --- /dev/null +++ b/Master/texmf-dist/tex/latex/caption/newfloat.sty @@ -0,0 +1,654 @@ +%% +%% This is file `newfloat.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% newfloat.dtx (with options: `package') +%% +%% Copyright (C) 1994-2011 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) +%% +%% -------------------------------------------------------------------------- +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% 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". +%% +%% 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, 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{newfloat}[2011/10/30 v1.0 Defining new floating environments (AR)] +\newcommand*\newfloat@Info[1]{% + \PackageInfo{newfloat}{#1}} +\newcommand*\newfloat@Error[1]{% + \PackageError{newfloat}{#1}\newfloat@eh} +\newcommand*\newfloat@eh{% + If you do not understand this error, please take a closer look\MessageBreak + at the documentation of the `newfloat' package.\MessageBreak\@ehc} +\RequirePackage{keyval}[1997/11/10] +\newcommand*\DeclareFloatingEnvironment{% + \@testopt\@DeclareFloatingEnvironment{}} +\@onlypreamble\DeclareFloatingEnvironment +\def\@DeclareFloatingEnvironment[#1]#2{% + \newfloat@Info{New float `#2' with options `#1'}% + \edef\newfloat@Type{\def\noexpand\newfloat@Type{\@car#2\@nil}}% + \uppercase\expandafter{\newfloat@Type}% + \edef\@tempa{% + \noexpand\g@addto@macro\noexpand\newfloat@Type{\@cdr#2\@nil}}% + \@tempa + \newcounter{#2}% + \ifdefined\c@float@type % from float package + \expandafter\edef\csname ftype@#2\endcsname{\the\value{float@type}}% + \addtocounter{float@type}{\value{float@type}}% + \else\ifdefined\c@newflo@tctr % from memoir document class + \expandafter\edef\csname ftype@#2\endcsname{\the\c@newflo@tctr}% + \advance\c@newflo@tctr \c@newflo@tctr + \else + \ifdefined\newfloat@ftype \else + \newcount\newfloat@ftype + \newfloat@ftype=8\relax + \fi + \expandafter\xdef\csname ftype@#2\endcsname{\the\newfloat@ftype}% + \advance\newfloat@ftype\newfloat@ftype + \fi\fi + \newfloat@Info{float type `#2'=\@nameuse{ftype@#2}}% + \@namedef{fnum@#2}{\@nameuse{#2name}\nobreakspace\@nameuse{the#2}}% + \expandafter\newcommand\csname #2name\endcsname{}% + \expandafter\let\csname #2name\endcsname\newfloat@Type + \@namedef{fleg#2}{\@nameuse{#2name}}% legend naming (memoir) + \@namedef{flegtoc#2}##1{}% + \newenvironment{#2}{\@float{#2}}{\end@float}% + \newenvironment{#2*}{\@dblfloat{#2}}{\end@dblfloat}% + \expandafter\newcommand\csname listof#2s\endcsname{\newfloat@listof{#2}}% + \expandafter\newcommand\csname listof#2es\endcsname{\newfloat@listof{#2}}% + \ifdefined\l@figure + \expandafter\let\csname l@#2\endcsname\l@figure + \else + \@namedef{l@#2}{\@dottedtocline{1}{1.5em}{2.3em}}% + \fi + \expandafter\newcommand\csname list#2name\endcsname{}% + \expandafter\xdef\csname list#2name\endcsname{List of \newfloat@Type s}% + \newfloat@setplacement{#2}{tbp}% + \newfloat@setfileext{#2}{lo#2}% + \newfloat@setoptions*{#2}{#1}% + \@expandtwoargs\newfloat@announce{#2}{\@nameuse{ext@#2}}% + \@ifnextchar[\newfloat@DFE@setname\relax} +\@onlypreamble\@DeclareFloatingEnvironment +\def\newfloat@DFE@setname[#1]{% + \KV@@newfloat@name{#1}% + \@ifnextchar[\newfloat@DFE@setlistname\relax} +\@onlypreamble\newfloat@DFE@setname +\def\newfloat@DFE@setlistname[#1]{% + \KV@@newfloat@listname{#1}} +\@onlypreamble\newfloat@DFE@setlistname +\newcommand*\newfloat@listof[1]{% + \ifcsname listoftoc\endcsname + \expandafter\listoftoc\expandafter{\@nameuse{ext@#1}}% + \else + \begingroup + \expandafter\let\expandafter\listfigurename\csname list#1name\endcsname + \expandafter\let\expandafter\ext@figure\csname ext@#1\endcsname + \let\newfloat@ORI@starttoc\@starttoc + \renewcommand*\@starttoc[1]{% + \expandafter\newfloat@ORI@starttoc\expandafter{\ext@figure}}% + \listoffigures + \endgroup + \fi} +\newcommand*\newfloat@setoptions{% + \@ifstar + {\newfloat@@setoptions\@firstofone}% + {\newfloat@@setoptions\@gobble}} +\newcommand*\newfloat@@setoptions[3]{% + \let\newfloat@within@value\@undefined + \let\newfloat@chapterlistsgaps@value\@undefined + #1{\KV@@newfloat@within\newfloat@within@default}% set default value + \def\newfloat@type{#2}% + \setkeys{@newfloat}{#3}% + \ifx\newfloat@within@value\@undefined \else + \newfloat@setoption{within}\newfloat@within@value + \fi + \ifx\newfloat@chapterlistsgaps@value\@undefined \else + \newfloat@setoption{chapterlistsgaps}\newfloat@chapterlistsgaps@value + \fi} +\newcommand*\newfloat@within@default{% + \ifcsname c@chapter\endcsname chapter\else none\fi} +\@onlypreamble\newfloat@within@default +\newcommand*\newfloat@setoption[1]{% + \expandafter\@expandtwoargs\csname newfloat@set#1\endcsname\newfloat@type} +\newcommand*\newfloat@setfileext[2]{% + \@namedef{ext@#1}{#2}} +\define@key{@newfloat}{fileext}{% + \newfloat@setoption{fileext}{#1}} +\newcommand*\newfloat@setlistname[2]{% + \@namedef{list#1name}{#2}} +\define@key{@newfloat}{listname}{% + \newfloat@setoption{listname}{#1}} +\newcommand*\newfloat@setname[2]{% + \newfloat@@setname{#1}{#2}% + \begingroup + \ifcsname languagename\endcsname + \ifcsname captions\languagename\endcsname + \expandafter\g@addto@macro\csname captions\languagename\endcsname + {\newfloat@@setname{#1}{#2}}% + \fi + \fi + \endgroup} +\newcommand*\newfloat@@setname[2]{% + \@namedef{#1name}{#2}} +\define@key{@newfloat}{name}{% + \newfloat@setoption{name}{#1}} +\newcommand*\newfloat@setplacement[2]{% + \@namedef{fps@#1}{#2}} +\define@key{@newfloat}{placement}{% + \newfloat@setoption{placement}{#1}} +\newcommand*\newfloat@setwithin[2]{% + \ifcsname c@chapter\endcsname + \@removefromreset{#1}{chapter}% + \fi + \@removefromreset{#1}{section}% + \edef\@tempa{#2}% + \ifx\@tempa\@empty + \def\@tempa{none}% + \fi + \def\@tempb{none}% + \ifx\@tempa\@tempb + \ifcsname c@chapter\endcsname + \@chapterlistsgap@off{#1}% + \fi + \newfloat@@setwithin{#1}{}{}% + \else + \def\@tempb{chapter}% + \ifx\@tempa\@tempb + \@addtoreset{#1}{chapter}% + \@chapterlistsgap@on{#1}% + \newfloat@@setwithin{#1}{\ifnum\c@chapter>\z@ \thechapter.\fi}{\theHchapter.}% + \else + \def\@tempb{section}% + \ifx\@tempa\@tempb + \@addtoreset{#1}{section}% + \ifcsname c@chapter\endcsname + \@addtoreset{#1}{chapter}% + \@chapterlistsgap@on{#1}% + \newfloat@@setwithin{#1}{\thesection.}{\theHsection.}% + \else + \newfloat@@setwithin{#1}{\ifnum\c@section>\z@ \thesection.\fi}{\theHsection.}% + \fi + \else + \newfloat@Error{Invalid value `#2' for option `within'}% + \fi + \fi + \fi} +\newcommand*\newfloat@@setwithin[3]{% + \global\@namedef{the#1}{#2\arabic{#1}}% + \global\@namedef{theH#1}{#3\arabic{#1}}} +\define@key{@newfloat}{within}{% + \def\newfloat@within@value{#1}} +\newcommand*\newfloat@setwithout[1]{% + \newfloat@setwithin{#1}{none}} +\define@key{@newfloat}{without}[]{% + \def\newfloat@within@value{none}} +\newcommand*\newfloat@setchapterlistsgaps[2]{% + \edef\@tempa{#2}% + \def\@tempb{off}% + \ifx\@tempa\@tempb + \@chapterlistsgap@off{#1}% + \else + \def\@tempb{on}% + \ifx\@tempa\@tempb + \@chapterlistsgap@on{#1}% + \else + \newfloat@Error{Invalid value `#2' for option `chapterlistsgaps'}% + \fi + \fi} +\define@key{@newfloat}{chapterlistsgaps}{% + \def\newfloat@chapterlistsgaps@value{#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*\newfloat@announce[2]{% + \@cons\newfloat@list{{#1}}% + \@cons\newfloat@@list{{#1}}% + \@ifundefined{newfloat@ext@#2}{% + \@namedef{newfloat@ext@#2}{#1}% + \ifcsname c@lofdepth\endcsname + \@ifundefined{c@#2depth}{% + \newcounter{#2depth}% + \setcounter{#2depth}{1}% + }{}% + \fi + \ifcsname addtotoclist\endcsname + \addtotoclist[float]{#2}% + \@namedef{listof#2name}{\@nameuse{list#1name}}% + \fi + }{}% + \ifcsname contentsuse\endcsname + \contentsuse{#1}{#2}% + \fi + \newfloat@hook{#1}} +\@onlypreamble\newfloat@announce +\newcommand*\newfloat@@list{} +\newcommand*\SetupFloatingEnvironment[1]{% + \newfloat@addtolist{#1}% + \newfloat@setoptions{#1}} +\newcommand\ForEachFloatingEnvironment{% + \@ifstar + {\@ForEachFloatingEnvironment\@gobble}% + {\@ForEachFloatingEnvironment\@iden}} +\newcommand\@ForEachFloatingEnvironment[2]{% + \def\@elt##1{#2}% + \newfloat@list + \let\@elt\relax + #1{\newfloat@addtohook{#2}}} +\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*\newfloat@list{} +\newcommand*\newfloat@addtolist[1]{% + \newfloat@ifinlist{#1}{}{% + \ifcsname ext@#1\endcsname + \@cons\newfloat@list{{#1}}% + \@namedef{newfloat@ext@\@nameuse{ext@#1}}{#1}% + \else + \newfloat@Error{`#1' does not seem to be a floating environment}% + \fi}} +\newcommand*\newfloat@ifinlist[1]{% + \let\next\@secondoftwo + \begingroup + \expandafter\let\csname c@#1\endcsname\newfloat@ifinlist + \def\@elt##1{% + \expandafter\ifx\csname c@##1\endcsname\newfloat@ifinlist + \global\let\next\@firstoftwo + \fi}% + \newfloat@list + \endgroup + \next} +\ifcsname ext@figure\endcsname + \newfloat@addtolist{figure} +\fi +\ifcsname ext@table\endcsname + \newfloat@addtolist{table} +\fi +\ifcsname @chapter\endcsname + \providecommand*\@chapterlistsgap{10\p@}% + \providecommand*\@addchapterlistsgap[2]{% + \@nameuse{@ifchapterlistsgap@#1}{% if switched on + \@@addchapterlistsgap{#1}{#2}}} + \providecommand*\@@addchapterlistsgap[2]{% + \@ifundefined{@addchapterlistsgap@#2}{% only once per extension + \@namedef{@addchapterlistsgap@#2}{}% + \@@@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} + \providecommand*\@chapterlistsgap@off[1]{% + \expandafter\let\csname @ifchapterlistsgap@#1\endcsname\@gobble + \ifcsname unsettoc\endcsname + \@expandtwoargs\unsettoc{\@nameuse{ext@#1}}{chapteratlist}% + \fi} + \providecommand*\@chapterlistsgap@on[1]{% + \expandafter\let\csname @ifchapterlistsgap@#1\endcsname\@iden + \ifcsname setuptoc\endcsname + \@expandtwoargs\setuptoc{\@nameuse{ext@#1}}{chapteratlist}% + \fi} +\fi +\define@key{newfloat}{chapterlistsgap}{% + \renewcommand*\@chapterlistsgap{#1}} +\define@key{newfloat}{within}{% + \def\newfloat@within@default{#1}% set new default value + \def\@elt##1{\newfloat@setwithin{##1}{#1}}% + \newfloat@list + \let\@elt\relax} +\define@key{newfloat}{without}[]{% + \KV@newfloat@within{none}} +\def\@elt#1{% + \define@key{newfloat}{#1name}{% + \newfloat@setname{#1}{##1}}% + \define@key{newfloat}{list#1name}{% + \newfloat@setname{list#1}{##1}}% + \define@key{newfloat}{#1within}{% + \newfloat@setwithin{#1}{##1}}% + \define@key{newfloat}{#1without}[]{% + \newfloat@setwithout{#1}}% +}% +\newfloat@list +\let\@elt\relax +\let\@tempc\relax +\@expandtwoargs\setkeys{newfloat}{\@ptionlist{\@currname.\@currext}}% +\AtEndOfPackage{\let\@unprocessedoptions\relax} +\newcommand*\newfloatsetup{\setkeys{newfloat}} +\newcommand\newfloat@replace@chapter[2]{% + \begingroup + \let\if@twocolumn\iffalse + \let\if@mainmatter\iffalse + \let\if@thema\iffalse + \def\@tempa[##1]##2{#1}% + \ifx\@tempa\@chapter + \gdef\@chapter[##1]##2{#2}% + \global\let\newfloat@replace@chapter\@gobbletwo + \else\ifx\@tempa\Hy@org@chapter + \gdef\Hy@org@chapter[##1]##2{#2}% + \global\let\newfloat@replace@chapter\@gobbletwo + \fi\fi + \endgroup} +\ifcsname @chapter\endcsname \else + \let\newfloat@replace@chapter\@gobbletwo +\fi +\newfloat@replace@chapter{% + \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}% + \@addchapterlistsgaps + \if@twocolumn + \@topnewpage[\@makechapterhead{#2}]% + \else + \@makechapterhead{#2}% + \@afterheading + \fi} +\newfloat@replace@chapter{% + \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}% + \@addchapterlistsgaps + \if@twocolumn + \@topnewpage[\@makechapterhead{#2}]% + \else + \@makechapterhead{#2}% + \@afterheading + \fi} +\newfloat@replace@chapter{% + \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}% + \@addchapterlistsgaps + \@makechapterhead{#2}\@afterheading} +\@ifpackageloaded{tocbasic}{% + \let\newfloat@replace@chapter\@gobbletwo}{} +\ifcsname insertchapterspace\endcsname + \renewcommand*\insertchapterspace{\@addchapterlistsgaps} + \let\newfloat@replace@chapter\@gobbletwo +\fi +\newfloat@replace@chapter{% + \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}% + \@addchapterlistsgaps + \if@twocolumn + \@topnewpage[\@makechapterhead{#2}]% + \else + \@makechapterhead{#2}% + \@afterheading + \fi} + % boek(3).cls [2004/06/07 v2.1a NTG LaTeX document class] +\newfloat@replace@chapter{% + \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}% + \@addchapterlistsgaps + \if@twocolumn + \@topnewpage[\@makechapterhead{#2}]% + \else + \@makechapterhead{#2}% + \@afterheading + \fi} +\newfloat@replace@chapter{% + \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}% + \@addchapterlistsgaps + \if@twocolumn + \@topnewpage[\@makechapterhead{#2}]% + \else + \@makechapterhead{#2}% + \@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} +\fi +\newcommand\newfloat@ForEachNew[2][newfloat@@list]{% + \AtBeginDocument{% + \ifcsname#1\endcsname + \def\@elt##1{#2}% + \newfloat@@list + \let\@elt\relax + \fi}}% +\@onlypreamble\newfloat@ForEachNew +%% \begin{macrocode} +\newfloat@ForEachNew[float@exts]{% + \@nameuse{@ifchapterlistsgap@#1}{% if switched on + \let\float@do=\relax + \edef\@tempa{% + \noexpand\float@exts{\the\float@exts\float@do{\@nameuse{ext@#1}}}}% + \@tempa}} +\newfloat@ForEachNew[FPfigure]{% + \newcounter{FP@#1C}% + \newenvironment{FP#1}{\FP@floatBegin{#1}}{\FP@floatEnd}} +\providecommand*\ext@lstlisting{lol}% +\newfloat@ForEachNew[sidewaysfigure]{% + \newenvironment{sideways#1}{\@rotfloat{#1}}{\end@rotfloat}% + \newenvironment{sideways#1*}{\@rotdblfloat{#1}}{\end@rotdblfloat}} +\newcommand*\newfloat@For@SC[2]{% + \def#1{b}% = \sidecaptionvpos{#2}{b} (v1.6) + \newenvironment{SC#2}% + {\SC@float[#1]{#2}}{\endSC@float}% + \newenvironment{SC#2*}% + {\SC@dblfloat[#1]{#2}}{\endSC@dblfloat}} +\@onlypreamble\newfloat@For@SC +\newfloat@ForEachNew[SCfigure]{% + \expandafter\newfloat@For@SC\csname SC@#1@vpos\endcsname{#1}} +\newfloat@ForEachNew[wrapfigure]{% + \newenvironment{wrap#1}{\wrapfloat{#1}}{\endwrapfloat}} +\endinput +%% +%% End of file `newfloat.sty'. diff --git a/Master/texmf-dist/tex/latex/caption/subcaption.sty b/Master/texmf-dist/tex/latex/caption/subcaption.sty index 7f5627adeb3..66dae89eef4 100644 --- a/Master/texmf-dist/tex/latex/caption/subcaption.sty +++ b/Master/texmf-dist/tex/latex/caption/subcaption.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{subcaption}[2011/09/12 v1.1b Sub-captions (AR)] +\ProvidesPackage{subcaption}[2011/10/30 v1.1c Sub-captions (AR)] \RequirePackage{caption}[2011/08/18] % needs v3.2b or newer \caption@AtBeginDocument{\caption@ifcompatibility{% \caption@Error{% @@ -49,9 +49,7 @@ \caption@ExecuteOptions{subcaption}{% font+=small,labelformat=parens,labelsep=space,skip=6pt,list=0,hypcap=0} \caption@ProcessOptions*{subcaption} -\caption@ifundefined\c@figure{}{\DeclareCaptionSubType{figure}} -\caption@ifundefined\c@table{}{\DeclareCaptionSubType{table}} -\caption@For{typelist}{\DeclareCaptionSubType{#1}} +\caption@ForEachType{\DeclareCaptionSubType{#1}} \newcommand*\subcaption{% \caption@iftype {\setcaptionsubtype*\caption}% -- cgit v1.2.3