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.sty152
1 files changed, 128 insertions, 24 deletions
diff --git a/Master/texmf-dist/tex/latex/caption/newfloat.sty b/Master/texmf-dist/tex/latex/caption/newfloat.sty
index 259ad4f685c..a561c956c48 100644
--- a/Master/texmf-dist/tex/latex/caption/newfloat.sty
+++ b/Master/texmf-dist/tex/latex/caption/newfloat.sty
@@ -37,11 +37,15 @@
%% caption-deu.tex, caption-eng.tex, and caption-rus.tex.
%%
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{newfloat}[2019/08/28 v1.1g Defining new floating environments (AR)]
+\ProvidesPackage{newfloat}[2019/09/01 v1.1k Defining new floating environments (AR)]
\newcommand*\newfloat@Info[1]{%
\PackageInfo{newfloat}{#1}}
\newcommand*\newfloat@InfoNoLine[1]{%
\newfloat@Info{#1\@gobble}}
+\newcommand*\newfloat@Warning[1]{%
+ \PackageWarning{newfloat}{#1}}
+\newcommand*\newfloat@WarningNoLine[1]{%
+ \newfloat@Warning{#1\@gobble}}
\newcommand*\newfloat@Error[1]{%
\PackageError{newfloat}{#1}\newfloat@eh}
\newcommand*\newfloat@eh{%
@@ -92,8 +96,12 @@
{\begin{@tufte@float}[{##1}]{#2}{star}}%
{\end{@tufte@float}}%
\else
- \newenvironment{#2}{\@float{#2}}{\end@float}%
- \newenvironment{#2*}{\@dblfloat{#2}}{\end@dblfloat}%
+ \@ifclassloaded{beamer}{%
+ \newenvironment{#2}[1][]{\beamer@float{#2}}{\end@beamer@float}%
+ }{%
+ \newenvironment{#2}{\@float{#2}}{\end@float}%
+ \newenvironment{#2*}{\@dblfloat{#2}}{\end@dblfloat}%
+ }%
\fi
\newfloat@def{listof#2}{\newfloat@listof{#2}}%
\newfloat@def{listof#2s}{\@nameuse{listof#2}}%
@@ -332,6 +340,7 @@
\fi
\ifcsname @chapter\endcsname
\providecommand*\@chapterlistsgap{10\p@}%
+ \@ifpackageloaded{dgruyter}{\renewcommand*\@chapterlistsgap{13\p@}}{}%
\providecommand*\@addchapterlistsgap[2]{%
\@nameuse{@ifchapterlistsgap@#1}{% if switched on
\@@addchapterlistsgap{#1}{#2}}}
@@ -397,7 +406,6 @@
\define@key{newfloat}{planb-fileext}{%
\newfloat@Info{Setting Plan B file extension to `#1'}
\xdef\newfloat@addtocontents@ext{#1}}
-
\let\@tempc\relax
\@expandtwoargs\setkeys{newfloat}{planb,\@ptionlist{\@currname.\@currext}}%
\AtEndOfPackage{\let\@unprocessedoptions\relax}
@@ -407,6 +415,7 @@
\let\if@twocolumn\iffalse
\let\if@mainmatter\iffalse
\let\if@thema\iffalse
+ \let\if@chapnum\iffalse
\def\@tempa[##1]##2{#2}%
\ifx\@tempa\@chapter
\newfloat@InfoNoLine{Document class `#1' detected}%
@@ -564,7 +573,6 @@
\@makechapterhead{#2}%
\@afterheading
\fi}
- % boek(3).cls [2004/06/07 v2.1a NTG LaTeX document class]
\newfloat@replace@chapter{boek}{%
\ifnum \c@secnumdepth >\m@ne
\if@mainmatter
@@ -694,7 +702,8 @@
\else
\@makechapterhead{#2}%
\@afterheading
- \fi}{%
+ \fi
+}{%
\if@chapnum % war mal \ifnum \c@secnumdepth >\m@ne
\refstepcounter{chapter}%
\if@mainmatter
@@ -715,6 +724,73 @@
\@makechapterhead{#2}%
\@afterheading
\fi}
+\newfloat@replace@chapter{dgruyter}{%
+ \let\thesection\theinchapsection
+ \let\theequation\theinchapequation
+ \let\thefigure\theinchapfigure
+ \let\thetable\theinchaptable
+ \ifx\bookDOI\@undefined
+ \else
+ \@tempcnta\numexpr\componentd@i+\@ne\relax
+ \xdef\componentd@i{\the\@tempcnta}%
+ \xdef\@DOI{%
+ https://doi.org/\bookDOI
+ -\ifx\thepage\thefrontmatterpage2\else\ifnum\@tempcnta<100 0\fi\fi
+ \ifnum\@tempcnta<10 0\fi\componentd@i}%
+ \fi
+ \ifnum \c@secnumdepth >\m@ne
+ \if@mainmatter
+ \refstepcounter{chapter}%
+ \typeout{\@chapapp\space\thechapter.}%
+ \addcontentsline{toc}{chapter}{\protect\numberline{\thechapter}#1}%
+ \else
+ \addcontentsline{toc}{schapter}{#1}%
+ \fi
+ \else
+ \addcontentsline{toc}{schapter}{#1}%
+ \fi
+ \chaptermark{#1}%
+ \addtocontents{lof}{\protect\addvspace{13\p@}}%
+ \addtocontents{lot}{\protect\addvspace{13\p@}}%
+ \if@twocolumn
+ \@topnewpage[\@makechapterhead{#2}]%
+ \else
+ \@makechapterhead{#2}%
+ \@afterheading
+ \fi
+}{%
+ \let\thesection\theinchapsection
+ \let\theequation\theinchapequation
+ \let\thefigure\theinchapfigure
+ \let\thetable\theinchaptable
+ \ifx\bookDOI\@undefined
+ \else
+ \@tempcnta\numexpr\componentd@i+\@ne\relax
+ \xdef\componentd@i{\the\@tempcnta}%
+ \xdef\@DOI{%
+ https://doi.org/\bookDOI
+ -\ifx\thepage\thefrontmatterpage2\else\ifnum\@tempcnta<100 0\fi\fi
+ \ifnum\@tempcnta<10 0\fi\componentd@i}%
+ \fi
+ \ifnum \c@secnumdepth >\m@ne
+ \if@mainmatter
+ \refstepcounter{chapter}%
+ \typeout{\@chapapp\space\thechapter.}%
+ \addcontentsline{toc}{chapter}{\protect\numberline{\thechapter}#1}%
+ \else
+ \addcontentsline{toc}{schapter}{#1}%
+ \fi
+ \else
+ \addcontentsline{toc}{schapter}{#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
@@ -744,28 +820,59 @@
\fi
\fi}}}
\fi
-\newcommand\newfloat@ForEachNew[2]{%
- \ifcsname#1\endcsname
- \ForEachFloatingEnvironment{#2}%
- \else
+\ifcsname beamer@float\endcsname \else
+ \def\beamer@float#1{%
+ \ifcsname caption@settype\endcsname
+ \caption@settype{#1}%
+ \else
+ \def\@captype{#1}%
+ \fi
+ \par\nobreak\begin{center}\nobreak}
+ \def\end@beamer@float{%
+ \par\nobreak\end{center}}
+\fi
+\newcommand\newfloat@IfPackageLoaded[3]{%
+ \@ifpackageloaded{#1}{%
+ \newfloat@@IfPackageLoaded{#1}{#2}{#3}%
+ }{%
\AtBeginDocument{%
- \ifcsname#1\endcsname
- \ForEachFloatingEnvironment{#2}%
- \fi}%
- \fi}%
-\@onlypreamble\newfloat@ForEachNew
-%% \begin{macrocode}
-\newfloat@ForEachNew{float@exts}{%
+ \@ifpackageloaded{#1}{%
+ \newfloat@@IfPackageLoaded{#1}{#2}{#3}%
+ }{}}%
+ }}
+\@onlypreamble\newfloat@IfPackageLoaded
+\newcommand\newfloat@@IfPackageLoaded[3]{%
+ \newfloat@InfoNoLine{`#1' package detected}%
+ % Execute code for every previous \DeclareFloatingEnvironment
+ \def\@elt##1{\newfloat@@@IfPackageLoaded{#1}{#2}{#3}}%
+ \newfloat@@list
+ \let\@elt\relax
+ % Execute code for every future \DeclareFloatingEnvironment
+ \newfloat@addtohook{\newfloat@@@IfPackageLoaded{#1}{#2}{#3}}}
+\@onlypreamble\newfloat@@IfPackageLoaded
+\newcommand\newfloat@@@IfPackageLoaded[3]{%
+ \ifcsname#2\endcsname
+ \newfloat@WarningNoLine{%
+ Command \@backslashchar#2 already defined.\MessageBreak
+ (`#1' package support)}%
+ \else
+ #3%
+ \fi}
+\@onlypreamble\newfloat@@@IfPackageLoaded
+\newfloat@IfPackageLoaded{dgruyter}{plist@#1}{%
+ \expandafter\newcommand\csname plist@#1\endcsname{%
+ \@nameuse{#1name}\space}}
+\newfloat@IfPackageLoaded{float}{newfloat@undefined}{%
\@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@IfPackageLoaded{fltpage}{FP#1}{%
\newcounter{FP@#1C}%
\newenvironment{FP#1}{\FP@floatBegin{#1}}{\FP@floatEnd}}
\providecommand*\ext@lstlisting{lol}%
-\newfloat@ForEachNew{@rotfloat}{%
+\newfloat@IfPackageLoaded{rotating}{sideways#1}{%
\newenvironment{sideways#1}{\@rotfloat{#1}}{\end@rotfloat}%
\newenvironment{sideways#1*}{\@rotdblfloat{#1}}{\end@rotdblfloat}}
\newcommand*\newfloat@For@SC[2]{%
@@ -775,13 +882,10 @@
\newenvironment{SC#2*}%
{\SC@dblfloat[{#1}]{#2}}{\endSC@dblfloat}}
\@onlypreamble\newfloat@For@SC
-\newfloat@ForEachNew{SC@float}{%
+\newfloat@IfPackageLoaded{sidecap}{SC#1}{%
\expandafter\newfloat@For@SC\csname SC@#1@vpos\endcsname{#1}}
-\newfloat@ForEachNew{wrapfloat}{%
+\newfloat@IfPackageLoaded{wrapfig}{wrap#1}{%
\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'.