summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/caption/newfloat.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/caption/newfloat.sty')
-rw-r--r--Master/texmf-dist/tex/latex/caption/newfloat.sty139
1 files changed, 97 insertions, 42 deletions
diff --git a/Master/texmf-dist/tex/latex/caption/newfloat.sty b/Master/texmf-dist/tex/latex/caption/newfloat.sty
index 8ba1c48f15c..259ad4f685c 100644
--- a/Master/texmf-dist/tex/latex/caption/newfloat.sty
+++ b/Master/texmf-dist/tex/latex/caption/newfloat.sty
@@ -6,7 +6,7 @@
%%
%% newfloat.dtx (with options: `package')
%%
-%% Copyright (C) 1994-2018 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
+%% Copyright (C) 1994-2019 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
%%
%% https://gitlab.com/axelsommerfeldt/caption
%%
@@ -37,7 +37,7 @@
%% caption-deu.tex, caption-eng.tex, and caption-rus.tex.
%%
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{newfloat}[2018/03/04 v1.1a Defining new floating environments (AR)]
+\ProvidesPackage{newfloat}[2019/08/28 v1.1g Defining new floating environments (AR)]
\newcommand*\newfloat@Info[1]{%
\PackageInfo{newfloat}{#1}}
\newcommand*\newfloat@InfoNoLine[1]{%
@@ -78,17 +78,18 @@
\addtocounter{float@type}{\value{float@type}}}%
\newfloat@Info{float type `#2'=\@nameuse{ftype@#2}}%
\newfloat@def{fnum@#2}%
- {\@nameuse{#2name}\nobreakspace\@nameuse{the#2}\@nameuse{autodot}}%
+ {\@nameuse{#2name}\nobreakspace\@nameuse{the#2}%
+ \ifdefined\autodot\expandafter\autodot\fi}%
\newfloat@capitalize\newfloat@Type{#2}%
\newfloat@let{#2name}{\newfloat@Type}%
\newfloat@def{fleg#2}{\@nameuse{#2name}}% legend naming (memoir)
\newfloat@ifundefined{flegtoc#2}{\@namedef{flegtoc#2}##1{}}%
\ifcsname @tufte@float\endcsname
\newenvironment{#2}[1][htbp]%
- {\begin{@tufte@float}[##1]{#2}{}}%
+ {\begin{@tufte@float}[{##1}]{#2}{}}%
{\end{@tufte@float}}%
\newenvironment{#2*}[1][htbp]%
- {\begin{@tufte@float}[##1]{#2}{star}}%
+ {\begin{@tufte@float}[{##1}]{#2}{star}}%
{\end{@tufte@float}}%
\else
\newenvironment{#2}{\@float{#2}}{\end@float}%
@@ -126,8 +127,12 @@
\noexpand\g@addto@macro\noexpand#1{\@cdr#2\@nil}}%
\newfloat@tempa}
\newcommand*\newfloat@listof[1]{%
- \@expandtwoargs\newfloat@list@of{#1}{\@nameuse{ext@#1}}}
-\newcommand*\newfloat@list@of[2]{%
+ \@ifstar
+ {\newfloat@list@of{#1}*}%
+ {\newfloat@list@of{#1}\relax}}
+\newcommand*\newfloat@list@of[1]{%
+ \@expandtwoargs\newfloat@list@of@{#1}{\@nameuse{ext@#1}}}
+\newcommand*\newfloat@list@of@[3]{%
\begingroup
\expandafter\let\expandafter\listfigurename\csname list#1name\endcsname
\def\ext@figure{#2}%
@@ -136,7 +141,7 @@
\let\newfloat@listoftoc\listoftoc
\def\listoftoc##1{\newfloat@listoftoc{#2}}%
\@nameuse{newfloat@listof#1@hook}%
- \listoffigures
+ \listoffigures#3%
\endgroup}
\newcommand*\newfloat@setoptions{%
\@ifstar
@@ -397,24 +402,27 @@
\@expandtwoargs\setkeys{newfloat}{planb,\@ptionlist{\@currname.\@currext}}%
\AtEndOfPackage{\let\@unprocessedoptions\relax}
\newcommand*\newfloatsetup{\setkeys{newfloat}}
-\newcommand\newfloat@replace@chapter[2]{%
+\newcommand\newfloat@replace@chapter[3]{%
\begingroup
\let\if@twocolumn\iffalse
\let\if@mainmatter\iffalse
\let\if@thema\iffalse
- \def\@tempa[##1]##2{#1}%
+ \def\@tempa[##1]##2{#2}%
\ifx\@tempa\@chapter
- \gdef\@chapter[##1]##2{#2}%
- \global\let\newfloat@replace@chapter\@gobbletwo
+ \newfloat@InfoNoLine{Document class `#1' detected}%
+ \gdef\@chapter[##1]##2{#3}%
+ \global\let\newfloat@replace@chapter\newfloat@dont@replace@chapter
\else\ifx\@tempa\Hy@org@chapter
- \gdef\Hy@org@chapter[##1]##2{#2}%
- \global\let\newfloat@replace@chapter\@gobbletwo
+ \newfloat@InfoNoLine{Document class `#1' detected (Hy)}%
+ \gdef\Hy@org@chapter[##1]##2{#3}%
+ \global\let\newfloat@replace@chapter\newfloat@dont@replace@chapter
\fi\fi
\endgroup}
+\newcommand\newfloat@dont@replace@chapter[3]{}
\ifcsname @chapter\endcsname \else
- \let\newfloat@replace@chapter\@gobbletwo
+ \let\newfloat@replace@chapter\newfloat@dont@replace@chapter
\fi
-\newfloat@replace@chapter{%
+\newfloat@replace@chapter{report}{%
\ifnum \c@secnumdepth >\m@ne
\refstepcounter{chapter}%
\typeout{\@chapapp\space\thechapter.}%
@@ -449,7 +457,7 @@
\@makechapterhead{#2}%
\@afterheading
\fi}
-\newfloat@replace@chapter{%
+\newfloat@replace@chapter{book}{%
\ifnum \c@secnumdepth >\m@ne
\if@mainmatter
\refstepcounter{chapter}%
@@ -492,7 +500,7 @@
\@makechapterhead{#2}%
\@afterheading
\fi}
-\newfloat@replace@chapter{%
+\newfloat@replace@chapter{amsbook}{%
\refstepcounter{chapter}%
\ifnum\c@secnumdepth<\z@ \let\@secnumber\@empty
\else \let\@secnumber\thechapter \fi
@@ -516,12 +524,12 @@
\@addchapterlistsgaps
\@makechapterhead{#2}\@afterheading}
\@ifpackageloaded{tocbasic}{%
- \let\newfloat@replace@chapter\@gobbletwo}{}
+ \let\newfloat@replace@chapter\newfloat@dont@replace@chapter}{}
\ifcsname insertchapterspace\endcsname
\renewcommand*\insertchapterspace{\@addchapterlistsgaps}
- \let\newfloat@replace@chapter\@gobbletwo
+ \let\newfloat@replace@chapter\newfloat@dont@replace@chapter
\fi
-\newfloat@replace@chapter{%
+\newfloat@replace@chapter{rapport}{%
\ifnum \c@secnumdepth >\m@ne
\refstepcounter{chapter}%
\typeout{\@chapapp\space\thechapter.}%
@@ -557,7 +565,7 @@
\@afterheading
\fi}
% boek(3).cls [2004/06/07 v2.1a NTG LaTeX document class]
-\newfloat@replace@chapter{%
+\newfloat@replace@chapter{boek}{%
\ifnum \c@secnumdepth >\m@ne
\if@mainmatter
\refstepcounter{chapter}%
@@ -600,7 +608,7 @@
\@makechapterhead{#2}%
\@afterheading
\fi}
-\newfloat@replace@chapter{%
+\newfloat@replace@chapter{thesis}{%
\ifnum \c@secnumdepth >\m@ne
\if@mainmatter
\refstepcounter{chapter}%
@@ -665,13 +673,55 @@
\@makechapterhead{#2}%
\@afterheading
\fi}
-\ifx\newfloat@replace@chapter\@gobbletwo \else
+\newfloat@replace@chapter{svmono}{%
+ \if@chapnum % war mal \ifnum \c@secnumdepth >\m@ne
+ \refstepcounter{chapter}%
+ \if@mainmatter
+ \typeout{\@chapapp\space\thechapter.}%
+ \addcontentsline{toc}{chapter}{\protect
+ \numberline{\thechapter\thechapterend}#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}{%
+ \if@chapnum % war mal \ifnum \c@secnumdepth >\m@ne
+ \refstepcounter{chapter}%
+ \if@mainmatter
+ \typeout{\@chapapp\space\thechapter.}%
+ \addcontentsline{toc}{chapter}{\protect
+ \numberline{\thechapter\thechapterend}#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}
+\ifx\newfloat@replace@chapter\newfloat@dont@replace@chapter \else
\newfloat@InfoNoLine{%
- Unsupported document class, or \noexpand\@chapter\MessageBreak
- was already redefined by another package}
+ Unsupported document class, or \noexpand\@chapter\MessageBreak
+ was already redefined by another package}
\newfloat@InfoNoLine{\string\@chapter\space=\space\meaning\@chapter}
\newfloat@InfoNoLine{\string\Hy@org@chapter\space=\space\meaning\Hy@org@chapter}
- \newfloat@ifplanb{%
+ \newfloat@ifplanb{\AtBeginDocument{%
\newfloat@InfoNoLine{Trying Plan B..}%
\let\newfloat@addtocontents@ORI\addtocontents
\long\def\addtocontents#1#2{%
@@ -692,41 +742,46 @@
\@addchapterlistsgaps
\endgroup
\fi
- \fi}}
+ \fi}}}
\fi
-\newcommand\newfloat@ForEachNew[2][newfloat@@list]{%
- \AtBeginDocument{%
- \ifcsname#1\endcsname
- \def\@elt##1{#2}%
- \newfloat@@list
- \let\@elt\relax
- \fi}}%
+\newcommand\newfloat@ForEachNew[2]{%
+ \ifcsname#1\endcsname
+ \ForEachFloatingEnvironment{#2}%
+ \else
+ \AtBeginDocument{%
+ \ifcsname#1\endcsname
+ \ForEachFloatingEnvironment{#2}%
+ \fi}%
+ \fi}%
\@onlypreamble\newfloat@ForEachNew
%% \begin{macrocode}
-\newfloat@ForEachNew[float@exts]{%
+\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[FP@floatBegin]{%
+\newfloat@ForEachNew{FP@floatBegin}{%
\newcounter{FP@#1C}%
\newenvironment{FP#1}{\FP@floatBegin{#1}}{\FP@floatEnd}}
\providecommand*\ext@lstlisting{lol}%
-\newfloat@ForEachNew[@rotfloat]{%
+\newfloat@ForEachNew{@rotfloat}{%
\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}%
+ {\SC@float[{#1}]{#2}}{\endSC@float}%
\newenvironment{SC#2*}%
- {\SC@dblfloat[#1]{#2}}{\endSC@dblfloat}}
+ {\SC@dblfloat[{#1}]{#2}}{\endSC@dblfloat}}
\@onlypreamble\newfloat@For@SC
-\newfloat@ForEachNew[SC@float]{%
+\newfloat@ForEachNew{SC@float}{%
\expandafter\newfloat@For@SC\csname SC@#1@vpos\endcsname{#1}}
-\newfloat@ForEachNew[wrapfloat]{%
+\newfloat@ForEachNew{wrapfloat}{%
\newenvironment{wrap#1}{\wrapfloat{#1}}{\endwrapfloat}}
+\newfloat@ForEachNew{plist@figure}{%
+ \expandafter\newcommand\csname plist@#1\endcsname{%
+ \@nameuse{#1name}\space}}
\endinput
%%
%% End of file `newfloat.sty'.