texlive[68434] Master/texmf-dist: newfloat (2oct23)

commits+karl at tug.org commits+karl at tug.org
Mon Oct 2 21:45:00 CEST 2023


Revision: 68434
          https://tug.org/svn/texlive?view=revision&revision=68434
Author:   karl
Date:     2023-10-02 21:45:00 +0200 (Mon, 02 Oct 2023)
Log Message:
-----------
newfloat (2oct23)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/newfloat/CHANGELOG
    trunk/Master/texmf-dist/doc/latex/newfloat/README
    trunk/Master/texmf-dist/doc/latex/newfloat/newfloat.pdf
    trunk/Master/texmf-dist/source/latex/newfloat/newfloat.dtx
    trunk/Master/texmf-dist/source/latex/newfloat/newfloat.ins
    trunk/Master/texmf-dist/tex/latex/newfloat/newfloat.sty

Added Paths:
-----------
    trunk/Master/texmf-dist/source/latex/newfloat/fallback/
    trunk/Master/texmf-dist/source/latex/newfloat/fallback/v1.0/
    trunk/Master/texmf-dist/source/latex/newfloat/fallback/v1.0/newfloat.dtx
    trunk/Master/texmf-dist/source/latex/newfloat/fallback/v1.1/
    trunk/Master/texmf-dist/source/latex/newfloat/fallback/v1.1/newfloat.dtx
    trunk/Master/texmf-dist/tex/latex/newfloat/newfloat_v1.0.sty
    trunk/Master/texmf-dist/tex/latex/newfloat/newfloat_v1.1.sty

Modified: trunk/Master/texmf-dist/doc/latex/newfloat/CHANGELOG
===================================================================
--- trunk/Master/texmf-dist/doc/latex/newfloat/CHANGELOG	2023-10-02 19:44:41 UTC (rev 68433)
+++ trunk/Master/texmf-dist/doc/latex/newfloat/CHANGELOG	2023-10-02 19:45:00 UTC (rev 68434)
@@ -11,3 +11,8 @@
 v1.1 (2013/04/27)
 - New command \PrepareListOf
 
+v1.2 (2023/10/01)
+- \DeclareFloatingEnvironment now defines a name for \autoref, too
+- New options "autorefname=" (for hyperref) and "legendname=" (for memoir)
+- New command \newfloat at dont@patch at chapter for LaTeX document class maintainers
+

Modified: trunk/Master/texmf-dist/doc/latex/newfloat/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/newfloat/README	2023-10-02 19:44:41 UTC (rev 68433)
+++ trunk/Master/texmf-dist/doc/latex/newfloat/README	2023-10-02 19:45:00 UTC (rev 68434)
@@ -1,10 +1,10 @@
 ==========================================================================
 
 The `newfloat' package
-Copyright (C) 2011-2019 Axel Sommerfeldt (axel.sommerfeldt at f-m.fm)
+Copyright (C) 2011-2023 Axel Sommerfeldt (axel.sommerfeldt at f-m.fm)
 
 License: LPPL = LaTeX Project Public Licence
-Maintenance Status: maintained (by Axel Sommerfeldt)
+Maintenance Status: unmaintained
 
 Home page:
   https://gitlab.com/axelsommerfeldt/newfloat
@@ -20,15 +20,9 @@
   https://golatex.de/               (German)
   https://texwelt.de/               (German)
 
-If you think you may have found a bug in these packages,
-or want to report a suggestion for improvement, please either visit
-  https://gitlab.com/axelsommerfeldt/newfloat/issues (preferred)
-or send an e-mail to
-  axel.sommerfeldt at f-m.fm
-
 --------------------------------------------------------------------------
 
-The `newfloat' package v1.1 offers the command \DeclareFloatingEnvironment
+The `newfloat' package v1.2 offers the command \DeclareFloatingEnvironment
 for defining new floating environments which behave like the existing
 floating environments "figure" and "table".
 

Modified: trunk/Master/texmf-dist/doc/latex/newfloat/newfloat.pdf
===================================================================
(Binary files differ)

Added: trunk/Master/texmf-dist/source/latex/newfloat/fallback/v1.0/newfloat.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/newfloat/fallback/v1.0/newfloat.dtx	                        (rev 0)
+++ trunk/Master/texmf-dist/source/latex/newfloat/fallback/v1.0/newfloat.dtx	2023-10-02 19:45:00 UTC (rev 68434)
@@ -0,0 +1,1667 @@
+% \iffalse meta-comment
+% 
+% This is file `newfloat.dtx'.
+% 
+% Copyright (C) 2011-2012 Axel Sommerfeldt (axel.sommerfeldt at 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 "unmaintained".
+% 
+% 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.
+% 
+% \fi
+% \CheckSum{1291}
+%
+% \iffalse
+%<*driver>
+\NeedsTeXFormat{LaTeX2e}[1994/12/01]
+\ProvidesFile{newfloat.drv}%
+  [2012/05/18 v1.0 This package offers a command for defining new floating environments]
+\hbadness=9999 \newcount\hbadness \hfuzz=48pt % Make TeX shut up.
+%
+\documentclass{ltxdoc}
+\setlength\parindent{0pt}
+\setlength\parskip{\smallskipamount}
+%
+\usepackage{ifpdf}
+\ifpdf
+  \usepackage{mathptmx,courier}
+  \usepackage[scaled=0.90]{helvet}
+% \addtolength\marginparwidth{15pt}
+\fi
+%
+\usepackage[bottom]{footmisc}
+%
+\usepackage{hypdoc}
+\ifpdf\usepackage{hypdestopt}\fi
+\hypersetup{pdfkeywords={LaTeX, package, newfloat},pdfstartpage={},pdfstartview={}}
+%
+\usepackage{newfloat}
+%
+\DeclareRobustCommand*\eTeX{\texorpdfstring
+  {\leavevmode\hbox{$\varepsilon$}-\TeX}%
+  {e-TeX}}
+\DeclareRobustCommand*\AmS{\texorpdfstring
+  {{\protect\usefont{OMS}{cmsy}{m}{n}A\kern-.1667em\lower.5ex\hbox{M}\kern-.125emS}}%
+  {AMS}}
+\DeclareRobustCommand*\KOMAScript{\texorpdfstring
+  {\textsf{K\kern.05em O\kern.05em M\kern.05em A\kern.1em-\kern.1em Script}}%
+  {KOMA-Script}}
+\DeclareRobustCommand*\NTG{NTG}
+\DeclareRobustCommand*\SmF{SMF}
+%
+\begin{document}
+  \DocInput{newfloat.dtx}
+\end{document}
+%</driver>
+% \fi
+%
+% \newcommand*\purerm[1]{{\upshape\mdseries\rmfamily #1}}
+% \newcommand*\puresf[1]{{\upshape\mdseries\sffamily #1}}
+% \newcommand*\purett[1]{{\upshape\mdseries\ttfamily #1}}
+% \let\package\puresf
+% \let\env\purett \let\opt\purett
+%
+% \def\thispackage{the \package{newfloat} package}
+% \def\Thispackage{The \package{newfloat} package}
+% 
+% \newcommand*\csmarg[1]{\texttt{\char`\{#1\char`\}}}
+% \newcommand*\csoarg[1]{\texttt{\char`\[#1\char`\]}}
+% \newcommand*\version[2][]{\textit{v#2}}
+%
+% \setlength\leftmargini{1.5em}
+%
+% \GetFileInfo{newfloat.drv}
+% \let\docdate\filedate
+% \GetFileInfo{newfloat.sty}
+%
+% \title{\texorpdfstring{\Thispackage\thanks{%^^A
+%          This package has version number \fileversion, last revised \filedate.}}%^^A
+%        {The newfloat package}}
+% \author{Axel Sommerfeldt\\
+%         \href{mailto:axel.sommerfeldt at f-m.fm}{\texttt{axel.sommerfeldt at f-m.fm}}}
+% \date{\docdate}
+% \maketitle
+% 
+% \begin{abstract}
+% \centering
+% This package offers the command
+% |\Declare|\-|Floating|\-|Environment| for defining new floating environments
+% which behave like |figure| and |table|.
+% \end{abstract}
+% 
+% \tableofcontents
+%
+% \clearpage
+% \section{Loading the package}
+%
+% First of all you need to include this package into your document with
+% \begin{quote}
+%   |\usepackage|\oarg{options}|{newfloat}|
+% \end{quote}
+% where \meta{options} are one or more of
+% \begin{quote}\begin{tabular}{r@{\,}l}
+%   |within=| & \meta{``within'' counter} \emph{or} \texttt{none}\quad\\
+%   |chapterlistsgap=| & \meta{value}~\footnotemark[1]
+% \end{tabular}\end{quote}
+%
+% The ``within'' counter specifies the counter which will be used to reset
+% the counter of the floating environments |figure| and |table| .
+% (Furthermore this setting will be used as default setting for
+% |\Declare|\-|Floating|\-|Environment|.)
+%
+% So for example |within=chapter| will give you a numbering scheme
+% \meta{chapter}.\meta{x} for floating environments,
+% while |within=section| will give you a numbering scheme
+% \meta{chapter}.\meta{section}.\meta{x}, or \meta{section}.\meta{x}
+% if the document class does not offer |\chapter|.
+% |within=none| will result in a continuous numbering throughout the document,
+% i.e.~the numbering scheme will be simply \meta{x}.
+%
+% The option |chapterlistsgap=|\meta{value} sets the amount of the
+% vertical gap inserted into the ``List of Figure'', ``List of Tables'',
+% and all lists created with |\Declare|\-|Floating|\-|Environment|
+% when a new chapter will be started.
+% The default value is |10pt|.
+% (This option will only be available if the document class used offer
+% the usage of chapters, e.g.~the |book| or |report| document class.)
+%
+% \pagebreak[3]
+% Both options can be changed later on, too, by using the command
+% \begin{quote}
+% |\newfloatsetup|\meta{options}\quad,
+% \end{quote}
+%
+% \pagebreak[3]
+% \section{\cs{DeclareFloatingEnvironment}}
+%
+% After loading \thispackage\ you can define your own floating environments with
+% \begin{quote}
+% \iffalse
+% \setlength{\leftmargin}{6cm}
+% \fi
+%  |\DeclareFloatingEnvironment|\oarg{options}\marg{type}%
+% \iffalse
+%   \oarg{name}\oarg{list name}
+% \fi
+% \end{quote}
+% where \meta{options} are one or more of
+% \begin{quote}\begin{tabular}{r@{\,}l}
+%   |fileext=| & \meta{file extension}\\
+%   |listname=| & \meta{list name}\\
+%   |name=| & \meta{prosa name}\\
+%   |placement=| & \meta{combination of \,\purett{htbp}}\\
+%   |within=| & \meta{``within'' counter} \emph{or} \texttt{none}\\
+%   |chapterlistsgaps=| & \texttt{on} \emph{or} \texttt{off}~\footnotemark[1]
+% \end{tabular}\end{quote}
+% \footnotetext[1]{Please note that although \thispackage\ tries hard to offer this
+% option it may not be available or is working incorrectly in cooperation with
+% your document class since there is no standard interface which we could use
+% for that purpose. Therefore we have to try to patch the \cs{chapter} command,
+% and if this fails, we try to patch \cs{addtocontents} (in an unusual way) instead.}
+%
+% If no \meta{options} are given,
+% ``lo\meta{type}'' will be used as \meta{file extension} for the list,
+% ``List of \meta{name}s'' as \meta{list name}.
+% ``\meta{name}'' as \meta{name} (but with the first letter capitalized),
+% ``|tbp|'' as \meta{placement} specifier,
+% and ``|chapter|'' resp. ``|none|'' as \meta{``within'' counter},
+% i.e., the counter which resets the numbering.
+%
+% The default value of the |chapterlistsgaps=| option depends on the
+% ``within'' setting, it is set to |on| if |chapter| or |section| is selected,
+% otherwise it is set to |off|.
+% (This option will only be available if the document class used offer
+% the usage of chapters, e.g.~the |book| or |report| document class.)
+%
+% The list will be typeset using the command |\list|\-|of|\meta{type}|s|
+% resp.~|\list|\-|of|\meta{type}|es|,
+% analogous to |\list|\-|of|\-|figures| and |\list|\-|of|\-|tables|.
+%
+% If the \package{fltpage} package is loaded, an environment called
+% |FP|\meta{type} will be defined additionally, same for |sideways|\meta{type}
+% (\package{rotating} package), |SC|\meta{type} (\package{sidecap} package),
+% and |wrap|\meta{type} (\package{wrapfig} package).
+% 
+% \bigskip
+% 
+% \pagebreak[3]
+% So for example
+% \begin{quote}
+%   |\DeclareFloatingEnvironment{diagram}|
+% \end{quote}
+% will define a new floating environment called |diagram|,
+% the list will be stored in a file with the extension |lodiagram|, the name
+% (used for the caption) will be ``Diagram'' and the list name
+% ``List of Diagrams''.
+% The list could be typeset with |\list|\-|of|\-|diagrams|.
+% Dependent on which packages are loaded, the environments |FP|\-|diagram|,
+% |sideways|\-|diagram|, |SC|\-|diagram|, and |wrap|\-|diagram| will be defined additionally.
+%
+% \pagebreak[3]
+% Another example:
+% \begin{quote}
+%   |\DeclareFloatingEnvironment[|\\
+%   |  fileext=lox,|\\
+%   |  listname={List of Matrixes},|\\
+%   |  name=Matrix,|\\
+%   |  placement=p,|\\
+%   |  within=section,|\\
+%   |  chapterlistsgaps=off,|\\
+%   |  ]{matrix}|
+% \end{quote}
+% will define a new floating environment called |matrix| with the given settings.
+% Please note that names which contain spaces needs to be enclosed in curly braces.
+%
+% \pagebreak[3]
+% \section{\cs{SetupFloatingEnvironment}}
+%
+% While |\DeclareFloatingEnvironment| will create new floating environments,
+% \begin{quote}
+% |\SetupFloatingEnvironment|\marg{floating environment}\marg{options}
+% \end{quote}
+% will change the settings of existing ones, i.e. either |figure| or |table|,
+% or a one created with |\Declare|\-|Floating|\-|Environment|,
+% or a one created with |\new|\-|float| offered by the \package{float} package,
+% or a one created with |\new|\-|float| offered by the \package{memoir} document class,
+% or a one created with |\Declare|\-|New|\-|Float|\-|Type| offered by the \package{floatrow} package,
+% or \ldots
+%
+% The \meta{options} are the same as the options for
+% |\Declare|\-|Floating|\-|Environment|,
+% but one should avoid changing the file extension
+% of existing floating environments,
+% i.e.~using the |fileext=| option within |\Setup|\-|Floating|\-|Environment|
+% is usually a very bad idea.
+%
+% \bigskip
+%
+% \pagebreak[3]
+% An example:
+% \begin{quote}
+%   |\SetupFloatingEnvironment{lstlisting}{chapterlistsgaps=off}|
+% \end{quote}
+% will switch off the chapter lists gaps for |lstlisting| environments
+% offered by the \package{listings} package.
+%
+% \pagebreak[3]
+% \section{\cs{ForEachFloatingEnvironment}}
+%
+% \begin{quote}
+%  |\ForEachFloatingEnvironment|\meta{code with \#1}
+% \end{quote}
+% will execute the given \meta{code} for all known floating environments,
+% and for ones defined with |\Declare|\-|Floating|\-|Environment| later on.
+%
+% \pagebreak[3]
+% So for example the \package{subcaption} packages uses
+% \begin{quote}
+%  |\ForEachFloatingEnvironment{\DeclareCaptionSubType{#1}}|
+% \end{quote}
+% for initializing itself for all floating environments which are
+% known to \thispackage.
+%
+% \medskip
+%
+% There is also a starred variant |\For|\-|Each|\-|Floating|\-|Environment*|
+% which will execute the given code for already existing floating environments
+% only, i.e.~no hook will be placed inside |\Declare|\-|Floating|\-|Environment|.
+%
+% \pagebreak[3]
+% An example:
+% \begin{quote}
+%  |\ForEachFloatingEnvironment*{\typeout{#1}}|
+% \end{quote}
+% will typeout the names of all already known floating environments to the terminal
+% and log file.
+%
+% \iffalse
+% \pagebreak[3]
+% \section{For \LaTeX{} package authors}
+%
+% |\For|\-|Each|\-|Floating|\-|Environment| without \package{newfloat} package:
+% \begin{quote}
+%   |\newcommand\mypackage at foreachfloat[1]{%|\\
+%   |  \@ifundefined{ForEachFloatingEnvironment}%|\\
+%   |    {\def\@elt##1{#1}%|\\
+%   |      \@ifundefined{c at figure}\@gobble\@elt{figure}%|\\
+%   |      \@ifundefined{c at table}\@gobble\@elt{table}%|\\
+%   |      \let\@elt\relax|\\
+%   |      \newfloat at addtohook{#1}}%|\\
+%   |    {\ForEachFloatingEnvironment{#1}}}|\\
+%   |\providecommand\newfloat at addtohook[1]{%|\\
+%   |  \toks@=\expandafter{\newfloat at hook{##1}#1}%|\\
+%   |  \edef\@tempa{\def\noexpand\newfloat at hook####1{\the\toks@}}%|\\
+%   |  \@tempa}|\\
+%   |\providecommand*\newfloat at hook[1]{}|
+% \end{quote}
+%
+% \pagebreak[3]
+% Adding environment to list of floating environments:
+% \begin{quote}
+%   |\SetupFloatingEnvironment|\marg{environment}|{}|
+% \end{quote}
+% or (without \package{newfloat} package loaded):
+% \begin{quote}
+%   |\providecommand\newfloat at list{}|\\
+%   |\@cons\newfloat at list{|\marg{environment}|}|
+% \end{quote}
+% (Please note the doubled curly braces around the environment name.)
+% \fi
+%
+% \iffalse
+% --------------------------------------------------------------------------- %
+% \fi
+%
+% \StopEventually{%^^A
+% \pagebreak[3]
+% \begin{thebibliography}{9}
+%
+%   \bibitem{memoir}
+%   Peter Wilson:\\
+%   \href{http://www.ctan.org/pkg/memoir}%
+%        {\emph{The Memoir Class for Configurable Typesetting}},\\
+%   2011/03/06
+%
+%   \bibitem{NTGclasses}
+%   Victor Eijkhout:\\
+%   \href{http://www.ctan.org/pkg/ntgclass}%
+%        {\emph{An introduction to the Dutch \LaTeX\ document classes}},\\
+%   \mbox{3~September~1989}
+%
+%   \bibitem{KOMAScript}
+%   Markus Kohm \& Jens-Uwe-Morawski:\\
+%   \href{http://www.ctan.org/pkg/koma-script}%
+%        {\emph{KOMA-Script -- a versatile \LaTeXe\ bundle}},\\
+%   2007-01-09
+%
+%   \bibitem{float}
+%   Anselm Lingnau:\\
+%   \href{http://www.ctan.org/pkg/float}%
+%        {\emph{An Improved Environment for Floats}},\\
+%   2001/11/08
+%
+%   \bibitem{fltpage}
+%   Sebastian Gross:\\
+%   \href{http://www.ctan.org/pkg/fltpage}%
+%        {\emph{Welcome to the beta test of fltpage package!}},\\
+%   1998/11/13
+%
+%   \bibitem{rotating}
+%   Sebastian Rahtz and Leonor Barroca:\\
+%   \href{http://www.ctan.org/pkg/rotating}%
+%        {\emph{A style option for rotated objects in \LaTeX}},\\
+%   1997/09/26
+%
+%   \bibitem{sidecap}
+%   Rolf Niepraschk \& Hubert G\"a\ss lein:\\
+%   \href{http://www.ctan.org/pkg/sidecap}%
+%        {\emph{The sidecap package}},\\
+%   2003/06/06
+%
+%   \bibitem{wrapfig}
+%   Donald Arseneau:\\
+%   \href{http://www.ctan.org/pkg/wrapfig}%
+%        {\emph{WRAPFIG.STY ver 3.6}},\\
+%   2003/01/31
+%
+% \end{thebibliography}
+% }
+%
+% \iffalse
+% --------------------------------------------------------------------------- %
+% \fi
+%
+% \DoNotIndex{\\,\_,\ ,\@@par}
+% \DoNotIndex{\@bsphack}
+% \DoNotIndex{\@car,\@cdr,\@classoptionslist,\@cons,\@currext,\@currname}
+% \DoNotIndex{\@ehc,\@ehd,\@empty,\@esphack,\@expandtwoargs}
+% \DoNotIndex{\@for,\@firstofone,\@firstoftwo}
+% \DoNotIndex{\@gobble,\@gobblefour,\@gobbletwo,\@hangfrom}
+% \DoNotIndex{\@ifnextchar,\@ifpackagelater,\@ifpackageloaded}
+% \DoNotIndex{\@ifstar,\@ifundefined,\@latex at error,\@namedef,\@nameuse}
+% \DoNotIndex{\@onlypreamble,\@parboxrestore,\@plus,\@ptionlist}
+% \DoNotIndex{\@removeelement,\@restorepar,\@secondoftwo,\@setpar}
+% \DoNotIndex{\@tempa,\@tempboxa,\@tempdima,\@tempdimb,\@tempdimc,\@tempb,\@tempc}
+% \DoNotIndex{\@testopt}
+% \DoNotIndex{\@undefined,\@unprocessedoptions,\@unusedoptionlist}
+% \DoNotIndex{\p@,\z@}
+% \DoNotIndex{\active,\addtocounter,\addtolength,\advance,\aftergroup}
+% \DoNotIndex{\baselineskip,\begin,\begingroup,\bfseries,\box}
+% \DoNotIndex{\catcode,\centering,\changes,\csname,\def,\divide,\do,\downarrow}
+% \DoNotIndex{\edef,\else,\empty,\end,\endcsname,\endgraf,\endgroup,\expandafter}
+% \DoNotIndex{\fi,\footnotesize,\global}
+% \DoNotIndex{\hangindent,\hbox,\hfil,\hsize,\hskip,\hspace,\hss}
+% \DoNotIndex{\ifcase,\ifdim,\ifnum,\ifodd,\ifvoid,\ifvmode}
+% \DoNotIndex{\ifx,\ignorespaces,\itshape}
+% \DoNotIndex{\Large,\large,\leavevmode,\leftmargini,\leftskip,\let,\linewidth}
+% \DoNotIndex{\llap,\long,\m at ne,\margin,\mdseries,\message}
+% \DoNotIndex{\newcommand,\newdimen,\newlength,\newline,\newif,\newsavebox}
+% \DoNotIndex{\next,\nobreak,\nobreakspace,\noexpand,\noindent,\numberline}
+% \DoNotIndex{\normalcolor,\normalfont,\normalsize,\or,\par,\parbox,\parfillskip}
+% \DoNotIndex{\parindent,\parskip,\prevdepth,\protect,\protected at edef,\protected at write}
+% \DoNotIndex{\providecommand,\quad}
+% \DoNotIndex{\raggedleft,\raggedright,\relax,\renewcommand,\RequirePackage}
+% \DoNotIndex{\rightskip,\rmfamily}
+% \DoNotIndex{\sbox,\scriptsize,\scshape,\setbox,\setlength,\sffamily,\slshape}
+% \DoNotIndex{\small,\string,\space,\strut}
+% \DoNotIndex{\textheight,\the,\toks@,\typeout,\ttfamily}
+% \DoNotIndex{\unvbox,\uparrow,\upshape,\usebox,\usepackage}
+% \DoNotIndex{\value,\vbox,\vsize,\vskip,\wd,\width,\z at skip}
+% \DoNotIndex{\AtBeginDocument,\AtEndOfPackage,\CurrentOption,\DeclareOption}
+% \DoNotIndex{\ExecuteOptions,\GenericWarning,\IfFileExists,\InputIfFileExists}
+% \DoNotIndex{\NeedsTeXFormat,\MessageBreak}
+% \DoNotIndex{\PackageError,\PackageInfo,\PackageWarning,\PackageWarningNoLine}
+% \DoNotIndex{\PassOptionsToPackage,\ProcessOptions,\ProvidesPackage}
+%
+% \iffalse
+% --------------------------------------------------------------------------- %
+% \fi
+%
+% \setlength{\parskip}{0pt plus 1pt}
+% \changes{v1.0}{2011/10/30}{First release as \package{newfloat} package,
+%       outsourced from the \package{caption3} package and revised}
+%
+% \iffalse
+% --------------------------------------------------------------------------- %
+% \fi
+%
+% \clearpage
+% \section{The Implementation}
+% \iffalse
+%<*package>
+% \fi
+%
+% \pagebreak[3]
+% \subsection{Identification}
+%
+%    \begin{macrocode}
+\NeedsTeXFormat{LaTeX2e}[1994/12/01]
+\ProvidesPackage{newfloat}[2012/05/19 v1.0b Defining new floating environments (AR)]
+%    \end{macrocode}
+%
+% \begin{macro}{\newfloat at Info}
+% \begin{macro}{\newfloat at InfoNoLine}
+%  |\newfloat at Info|\marg{message}
+%    \begin{macrocode}
+\newcommand*\newfloat at Info[1]{%
+  \PackageInfo{newfloat}{#1}}
+\newcommand*\newfloat at InfoNoLine[1]{%
+  \newfloat at Info{#1\@gobble}}
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\newfloat at Error}
+%  |\newfloat at Error|\marg{message}
+%    \begin{macrocode}
+\newcommand*\newfloat at Error[1]{%
+  \PackageError{newfloat}{#1}\newfloat at eh}
+%    \end{macrocode}
+%    \begin{macrocode}
+\newcommand*\newfloat at eh{%
+  If you do not understand this error, please take a closer look\MessageBreak
+  at the documentation of the `newfloat' package.\MessageBreak\@ehc}
+%    \end{macrocode}
+% \end{macro}
+%
+% \pagebreak[3]
+% \subsection{Using the keyval package}
+%
+% We need the \package{keyval} package for option handling, so we load it here.
+%    \begin{macrocode}
+\RequirePackage{keyval}[1997/11/10]
+%    \end{macrocode}
+%
+% \pagebreak[3]
+% \subsection{\cs{DeclareFloatingEnvironment}}
+%
+% \begin{macro}{\DeclareFloatingEnvironment}
+% \changes{v1.0a}{2011/11/16}{Bugfix: Undefines \cs{fst@}\meta{environment} now}
+%  |\DeclareFloatingEnvironment|\oarg{options}\marg{environment}\oarg{name}\oarg{list name}
+%    \begin{macrocode}
+\newcommand*\DeclareFloatingEnvironment{%
+  \@testopt\@DeclareFloatingEnvironment{}}
+\@onlypreamble\DeclareFloatingEnvironment
+%    \end{macrocode}
+%    \begin{macrocode}
+\def\@DeclareFloatingEnvironment[#1]#2{%
+%    \end{macrocode}
+% First of all, we set |\newfloat at Type| to the  type name\par
+%    \begin{macrocode}
+  \newfloat at Info{New float `#2' with options `#1'}%
+  \edef\newfloat at Type{\def\noexpand\newfloat at Type{\@car#2\@nil}}%
+  \uppercase\expandafter{\newfloat at Type}%
+  \edef\@tempa{%
+    \noexpand\g at addto@macro\noexpand\newfloat at Type{\@cdr#2\@nil}}%
+  \@tempa
+%    \end{macrocode}
+% Define a counter with the same name as the floating environment
+%    \begin{macrocode}
+  \newcounter{#2}%
+%    \end{macrocode}
+% Set |\ftype@|\meta{type} which contains the type number for floats of type \meta{type}\par
+% (See also \url{http://tex.stackexchange.com/q/32359/2574})
+%    \begin{macrocode}
+  \ifdefined\c at float@type % from float package
+    \expandafter\edef\csname ftype@#2\endcsname{\the\value{float at type}}%
+    \addtocounter{float at type}{\value{float at type}}%
+  \else\ifdefined\c at newflo@tctr % from memoir document class
+    \expandafter\edef\csname ftype@#2\endcsname{\the\c at newflo@tctr}%
+    \advance\c at newflo@tctr \c at newflo@tctr
+  \else
+    \ifdefined\newfloat at ftype \else
+      \newcount\newfloat at ftype
+      \newfloat at ftype=8\relax
+    \fi
+    \expandafter\xdef\csname ftype@#2\endcsname{\the\newfloat at ftype}%
+    \advance\newfloat at ftype\newfloat at ftype
+  \fi\fi
+  \newfloat at Info{float type `#2'=\@nameuse{ftype@#2}}%
+%    \end{macrocode}
+% Define |\fnum@|\meta{type}, a macro to generate the figure number for a caption
+%    \begin{macrocode}
+  \@namedef{fnum@#2}{\@nameuse{#2name}\nobreakspace\@nameuse{the#2}}%
+%    \end{macrocode}
+% Define |\|\meta{type}|name| used by |\fnum@|\meta{type} as \meta{type},
+% but with first letter capitalized
+%    \begin{macrocode}
+  \expandafter\newcommand\csname #2name\endcsname{}%
+  \expandafter\let\csname #2name\endcsname\newfloat at Type
+  \@namedef{fleg#2}{\@nameuse{#2name}}% legend naming (memoir)
+%    \end{macrocode}
+% Legend name in ToC (memoir document class)
+%    \begin{macrocode}
+  \@namedef{flegtoc#2}##1{}%
+%    \end{macrocode}
+% Define the floating environment
+%    \begin{macrocode}
+  \newenvironment{#2}{\@float{#2}}{\end at float}%
+  \newenvironment{#2*}{\@dblfloat{#2}}{\end at dblfloat}%
+%    \end{macrocode}
+% Define the listing command |\listof|\meta{type}(|e|)|s|
+%    \begin{macrocode}
+  \expandafter\newcommand\csname listof#2s\endcsname{\newfloat at listof{#2}}%
+  \expandafter\newcommand\csname listof#2es\endcsname{\newfloat at listof{#2}}%
+  \ifdefined\l at figure
+    \expandafter\let\csname l@#2\endcsname\l at 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 at Type s}%
+%    \end{macrocode}
+% We undefine |\fst@|\meta{environment} so the new environment
+% will not be recognized as defined by the \package{float} package.
+% (|\fst@|\meta{type} use to hold the float style, see \package{float} package
+% implementation for details.)
+%    \begin{macrocode}
+  \expandafter\let\csname fst@#2\endcsname\@undefined
+%    \end{macrocode}
+% Set default parameters
+%    \begin{macrocode}
+  \newfloat at setplacement{#2}{tbp}%
+  \newfloat at setfileext{#2}{lo#2}%
+%    \end{macrocode}
+% Apply given options
+%    \begin{macrocode}
+  \newfloat at setoptions*{#2}{#1}%
+%    \end{macrocode}
+% Announce the new floating environment to other packages
+%    \begin{macrocode}
+  \@expandtwoargs\newfloat at announce{#2}{\@nameuse{ext@#2}}%
+%    \end{macrocode}
+% Apply the last two optional arguments for setting names
+%    \begin{macrocode}
+  \@ifnextchar[\newfloat at DFE@setname\relax}
+\@onlypreamble\@DeclareFloatingEnvironment
+%    \end{macrocode}
+%    \begin{macrocode}
+\def\newfloat at DFE@setname[#1]{%
+  \KV@@newfloat at name{#1}%
+  \@ifnextchar[\newfloat at DFE@setlistname\relax}
+\@onlypreamble\newfloat at DFE@setname
+%    \end{macrocode}
+%    \begin{macrocode}
+\def\newfloat at DFE@setlistname[#1]{%
+  \KV@@newfloat at listname{#1}}
+\@onlypreamble\newfloat at DFE@setlistname
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\newfloat at listof}
+% |\newfloat at listof|\marg{float type} typesets the list
+%    \begin{macrocode}
+\newcommand*\newfloat at 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 at figure\csname ext@#1\endcsname
+      \let\newfloat at ORI@starttoc\@starttoc
+      \renewcommand*\@starttoc[1]{%
+        \expandafter\newfloat at ORI@starttoc\expandafter{\ext at figure}}%
+      \listoffigures
+    \endgroup
+  \fi}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\newfloat at setoptions}
+% |\newfloat at setoptions*|\marg{environment}\marg{options}
+%    \begin{macrocode}
+\newcommand*\newfloat at setoptions{%
+  \@ifstar
+    {\newfloat@@setoptions\@firstofone}%
+    {\newfloat@@setoptions\@gobble}}
+%    \end{macrocode}
+%    \begin{macrocode}
+\newcommand*\newfloat@@setoptions[3]{%
+  \let\newfloat at within@value\@undefined
+  \let\newfloat at chapterlistsgaps@value\@undefined
+  #1{\KV@@newfloat at within\newfloat at within@default}% set default value for new floats
+  \def\newfloat at type{#2}%
+  \setkeys{@newfloat}{#3}%
+  \ifx\newfloat at within@value\@undefined \else
+    \newfloat at setoption{within}\newfloat at within@value
+  \fi
+  \ifx\newfloat at chapterlistsgaps@value\@undefined \else
+    \newfloat at setoption{chapterlistsgaps}\newfloat at chapterlistsgaps@value
+  \fi}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\newfloat at within@default}
+%  The default `within' value.
+%  This one will be used if no option |within=|\meta{counter} is given.
+%    \begin{macrocode}
+\newcommand*\newfloat at within@default{%
+  \ifcsname c at chapter\endcsname chapter\else none\fi}
+\@onlypreamble\newfloat at within@default
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\newfloat at setoption}
+% |\newfloat at setoption|\marg{option name}{options}
+%    \begin{macrocode}
+\newcommand*\newfloat at setoption[1]{%
+  \expandafter\@expandtwoargs\csname newfloat at set#1\endcsname\newfloat at type}
+%    \end{macrocode}
+% \end{macro}
+%
+% The available \meta{options} are:
+% |fileext=|\meta{file extension},
+% |listname=|\meta{list name},
+% |name=|\meta{prosa name},
+% |placement=|\meta{htbp},
+% |within=|\meta{none,chapter,section}, and
+% |without|.
+%
+% \begin{macro}{\newfloat at setfileext}
+% |\newfloat at setfileext|\marg{environment}\marg{file extension}
+%    \begin{macrocode}
+\newcommand*\newfloat at setfileext[2]{%
+  \@namedef{ext@#1}{#2}}
+%    \end{macrocode}
+%    \begin{macrocode}
+\define at key{@newfloat}{fileext}{%
+  \newfloat at setoption{fileext}{#1}}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\newfloat at setlistname}
+% |\newfloat at setlistname|\marg{environment}\marg{list name}
+%    \begin{macrocode}
+\newcommand*\newfloat at setlistname[2]{%
+  \@namedef{list#1name}{#2}}
+%    \end{macrocode}
+%    \begin{macrocode}
+\define at key{@newfloat}{listname}{%
+  \newfloat at setoption{listname}{#1}}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\newfloat at setname}
+% |\newfloat at setname|\marg{environment}\marg{name}
+%    \begin{macrocode}
+\newcommand*\newfloat at setname[2]{%
+  \newfloat@@setname{#1}{#2}%
+  \begingroup
+    \ifcsname languagename\endcsname
+      \ifcsname captions\languagename\endcsname
+        \expandafter\g at addto@macro\csname captions\languagename\endcsname
+          {\newfloat@@setname{#1}{#2}}%
+      \fi
+    \fi
+  \endgroup}
+%%\AtBeginDocument{\let\newfloat at setname\newfloat@@setname}
+%    \end{macrocode}
+%    \begin{macrocode}
+\newcommand*\newfloat@@setname[2]{%
+  \@namedef{#1name}{#2}}
+%    \end{macrocode}
+%    \begin{macrocode}
+\define at key{@newfloat}{name}{%
+  \newfloat at setoption{name}{#1}}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\newfloat at setplacement}
+% |\newfloat at setplacement|\marg{environment}\marg{float placement}
+%    \begin{macrocode}
+\newcommand*\newfloat at setplacement[2]{%
+  \@namedef{fps@#1}{#2}}
+%    \end{macrocode}
+%    \begin{macrocode}
+\define at key{@newfloat}{placement}{%
+  \newfloat at setoption{placement}{#1}}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\newfloat at setwithin}
+% |\newfloat at setwithin|\marg{environment}\marg{counter}\par
+% setup the counter for working ``within'' a given counter.
+% Furthermore the chapters lists gap will be switched on
+% (if counter $=$ |chapter|) or off (otherwise).
+%    \begin{macrocode}
+\newcommand*\newfloat at setwithin[2]{%
+  \ifcsname c at chapter\endcsname
+    \@removefromreset{#1}{chapter}%
+  \fi
+  \@removefromreset{#1}{section}%
+%    \end{macrocode}
+%    \begin{macrocode}
+  \edef\@tempa{#2}%
+  \ifx\@tempa\@empty
+    \def\@tempa{none}%
+  \fi
+  \def\@tempb{none}%
+  \ifx\@tempa\@tempb
+    \ifcsname c at chapter\endcsname
+      \@chapterlistsgap at off{#1}%
+    \fi
+    \newfloat@@setwithin{#1}{}{}%
+  \else
+    \def\@tempb{chapter}%
+    \ifx\@tempa\@tempb
+      \@addtoreset{#1}{chapter}%
+      \@chapterlistsgap at on{#1}%
+      \newfloat@@setwithin{#1}{\ifnum\c at chapter>\z@ \thechapter.\fi}{\theHchapter.}%
+    \else
+      \def\@tempb{section}%
+      \ifx\@tempa\@tempb
+        \@addtoreset{#1}{section}%
+        \ifcsname c at chapter\endcsname
+          \@addtoreset{#1}{chapter}%
+          \@chapterlistsgap at on{#1}%
+          \newfloat@@setwithin{#1}{\thesection.}{\theHsection.}%
+        \else
+          \newfloat@@setwithin{#1}{\ifnum\c at section>\z@ \thesection.\fi}{\theHsection.}%
+        \fi
+      \else
+        \newfloat at Error{Invalid value `#2' for option `within'}%
+      \fi
+    \fi
+  \fi}
+%    \end{macrocode}
+% Note: Since the \package{hyperref} package with version $<$ 6.82k defines
+% |\the|\-|H|\-|figure| and |\the|\-|H|\-|table| with |\new|\-|command|,
+% |\newfloat@@setwithin| will yield to an error message when using with an
+% old version of \package{hyperref},
+% e.g. ``\texttt{LaTeX Error: Command \cs{theHfigure} already defined}''.
+%    \begin{macrocode}
+\newcommand*\newfloat@@setwithin[3]{%
+  \global\@namedef{the#1}{#2\arabic{#1}}%
+  \global\@namedef{theH#1}{#3\arabic{#1}}}
+%    \end{macrocode}
+%    \begin{macrocode}
+\define at key{@newfloat}{within}{%
+  \def\newfloat at within@value{#1}}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\newfloat at setwithout}
+% |\newfloat at setwithout|\marg{environment}
+%    \begin{macrocode}
+\newcommand*\newfloat at setwithout[1]{%
+  \newfloat at setwithin{#1}{none}}
+%    \end{macrocode}
+%    \begin{macrocode}
+\define at key{@newfloat}{without}[]{%
+  \def\newfloat at within@value{none}}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\newfloat at setchapterlistsgaps}
+% |\newfloat at setchapterlistsgaps|\marg{environment}\marg{on/off}
+%    \begin{macrocode}
+\newcommand*\newfloat at setchapterlistsgaps[2]{%
+  \edef\@tempa{#2}%
+  \def\@tempb{off}%
+  \ifx\@tempa\@tempb
+    \@chapterlistsgap at off{#1}%
+  \else
+    \def\@tempb{on}%
+    \ifx\@tempa\@tempb
+      \@chapterlistsgap at on{#1}%
+    \else
+      \newfloat at Error{Invalid value `#2' for option `chapterlistsgaps'}%
+    \fi
+  \fi}
+%    \end{macrocode}
+%    \begin{macrocode}
+\define at key{@newfloat}{chapterlistsgaps}{%
+  \def\newfloat at chapterlistsgaps@value{#1}}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@removefromreset}
+% This code was taken from the \package{remreset} package
+% which is part of the `carlisle' package bundle.
+% (Copyright 1997 David Carlisle)
+%    \begin{macrocode}
+\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}}}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\newfloat at announce}
+% |\newfloat at announce|\marg{environment name}\marg{list file extension}
+%    \begin{macrocode}
+\newcommand*\newfloat at announce[2]{%
+%    \end{macrocode}
+%    \begin{macrocode}
+  \@cons\newfloat at list{{#1}}%
+  \@cons\newfloat@@list{{#1}}%
+%    \end{macrocode}
+%    \begin{macrocode}
+  \@ifundefined{newfloat at ext@#2}{%
+    \@namedef{newfloat at ext@#2}{#1}%
+%    \end{macrocode}
+% Support of \package{memoir} document class
+%    \begin{macrocode}
+    \ifcsname c at lofdepth\endcsname
+      \@ifundefined{c@#2depth}{%
+        \newcounter{#2depth}%
+        \setcounter{#2depth}{1}%
+      }{}%
+    \fi
+%    \end{macrocode}
+% Support of \package{tocbasic} package
+%    \begin{macrocode}
+    \ifcsname addtotoclist\endcsname
+      \addtotoclist[float]{#2}%
+      \@namedef{listof#2name}{\@nameuse{list#1name}}%
+    \fi
+%    \end{macrocode}
+%    \begin{macrocode}
+  }{}%
+%    \end{macrocode}
+% Support of \package{titletoc} package
+%    \begin{macrocode}
+  \ifcsname contentsuse\endcsname
+    \contentsuse{#1}{#2}%
+  \fi
+%    \end{macrocode}
+%    \begin{macrocode}
+  \newfloat at hook{#1}}
+\@onlypreamble\newfloat at announce
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\newfloat@@list}
+% |\newfloat@@list| is an \cs{@elt}-list containing the floating environments defined
+% with |\Declare|\-|Floating|\-|Environment| only.
+%    \begin{macrocode}
+\newcommand*\newfloat@@list{}
+%    \end{macrocode}
+% \end{macro}
+%
+% \pagebreak[3]
+% \subsection{\cs{SetupFloatingEnvironment}}
+%
+% \begin{macro}{\SetupFloatingEnvironment}
+% |\SetupFloatingEnvironment|\marg{environment}\marg{options}
+%    \begin{macrocode}
+\newcommand*\SetupFloatingEnvironment[1]{%
+  \newfloat at addtolist{#1}%
+  \newfloat at setoptions{#1}}
+%    \end{macrocode}
+% \end{macro}
+%
+% \pagebreak[3]
+% \subsection{\cs{ForEachFloatingEnvironment}}
+%
+% \begin{macro}{\ForEachFloatingEnvironment}
+% |\ForEachFloatingEnvironment|\marg{code}
+% will execute the given code for each floating environment.
+% The starred variant will only work for already existing environment,
+% i.e.~no hook will be placed inside |\Declare|\-|Floating|\-|Environment|.
+%    \begin{macrocode}
+\newcommand\ForEachFloatingEnvironment{%
+  \@ifstar
+    {\@ForEachFloatingEnvironment\@gobble}%
+    {\@ForEachFloatingEnvironment\@iden}}
+%    \end{macrocode}
+%    \begin{macrocode}
+\newcommand\@ForEachFloatingEnvironment[2]{%
+  \def\@elt##1{#2}%
+  \newfloat at list
+  \let\@elt\relax
+  #1{\newfloat at addtohook{#2}}}
+%    \end{macrocode}
+%    \begin{macrocode}
+\providecommand\newfloat at addtohook[1]{%
+  \toks@=\expandafter{\newfloat at hook{##1}#1}%
+  \edef\@tempa{\def\noexpand\newfloat at hook####1{\the\toks@}}%
+  \@tempa}
+%    \end{macrocode}
+%    \begin{macrocode}
+\providecommand*\newfloat at hook[1]{}
+%    \end{macrocode}
+% \end{macro}
+%
+% \pagebreak[3]
+% \subsection{The list of floating environments}
+%
+% \begin{macro}{\newfloat at list}
+% |\newfloat at list| is an \cs{@elt}-list containing the already existising floating
+% environments as well the ones defined with |\Declare|\-|Floating|\-|Environment|.
+%    \begin{macrocode}
+\newcommand*\newfloat at list{}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\newfloat at addtolist}
+% \changes{v1.0b}{2012/05/18}{Bugfix: Definition of \cs{@ifchapterlistsgap@}\meta{environment} added}
+% |\newfloat at addtolist|\marg{environment}
+% adds an environment to the list of floating environments.
+%    \begin{macrocode}
+\newcommand*\newfloat at addtolist[1]{%
+  \newfloat at ifinlist{#1}{}{%
+    \ifcsname ext@#1\endcsname
+      \@cons\newfloat at list{{#1}}%
+      \@namedef{newfloat at ext@\@nameuse{ext@#1}}{#1}%
+      \@ifundefined{@ifchapterlistsgap@#1}{%
+        \expandafter\let\csname @ifchapterlistsgap@#1\endcsname\@iden}{}%
+    \else
+      \newfloat at Error{`#1' does not seem to be a floating environment}%
+    \fi}}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\newfloat at ifinlist}
+% |\newfloat at ifinlist|\marg{environment}\marg{yes code}\marg{no code}
+% tests if an environment is an element of the list of floating environments.
+%    \begin{macrocode}
+\newcommand*\newfloat at ifinlist[1]{%
+  \let\next\@secondoftwo
+  \begingroup
+    \expandafter\let\csname c@#1\endcsname\newfloat at ifinlist
+    \def\@elt##1{%
+      \expandafter\ifx\csname c@##1\endcsname\newfloat at ifinlist
+        \global\let\next\@firstoftwo
+      \fi}%
+    \newfloat at list
+  \endgroup
+  \next}
+%    \end{macrocode}
+% \end{macro}
+%
+% Add |figure| and |table| to the list of floating environments.
+%    \begin{macrocode}
+\ifcsname ext at figure\endcsname
+  \newfloat at addtolist{figure}
+\fi
+\ifcsname ext at table\endcsname
+  \newfloat at addtolist{table}
+\fi
+%    \end{macrocode}
+%
+% \pagebreak[3]
+% \subsection{Chapter lists gaps}
+%
+%    \begin{macrocode}
+\ifcsname @chapter\endcsname
+%    \end{macrocode}
+%
+% \begin{macro}{\@chapterlistsgap}
+% The amount of the chapter lists gap, the default one is |10pt|.
+% (This command is already defined in \KOMAScript.)
+%    \begin{macrocode}
+  \providecommand*\@chapterlistsgap{10\p@}%
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@addchapterlistsgap}
+% |\@addchapterlistsgap|\marg{float type}\marg{file extension}\par
+% will add the chapter lists gap for the given float type.
+%    \begin{macrocode}
+  \providecommand*\@addchapterlistsgap[2]{%
+    \@nameuse{@ifchapterlistsgap@#1}{% if switched on
+      \@@addchapterlistsgap{#1}{#2}}}
+%    \end{macrocode}
+%    \begin{macrocode}
+  \providecommand*\@@addchapterlistsgap[2]{%
+    \@ifundefined{@addchapterlistsgap@#2}{% only once per extension
+      \@namedef{@addchapterlistsgap@#2}{#1}%
+      \@@@addchapterlistsgap{#2}}{}}
+%    \end{macrocode}
+%    \begin{macrocode}
+  \providecommand*\@@@addchapterlistsgap[1]{%
+    \ifdim \@chapterlistsgap>\z@
+      \addtocontents{#1}{\protect\addvspace{\@chapterlistsgap}}%
+    \fi}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@addchapterlistsgaps}
+% \changes{v1.0b}{2012/05/18}{Bugfix: Group added to make \cs{@addchapterlistsgap} work correctly}
+% |\@addchapterlistsgaps|\par
+% will add the chapter lists gaps for all floating environments in |\newfloat at list|.
+%    \begin{macrocode}
+  \providecommand*\@addchapterlistsgaps{%
+    \begingroup
+      \def\@elt##1{%
+        \@expandtwoargs\@addchapterlistsgap{##1}{\@nameuse{ext@##1}}}%
+      \newfloat at list
+    \endgroup}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@chapterlistsgap at off}
+% |\@chapterlistsgap at off|\marg{float type}\par
+% switches the chapter lists gap off for the given float type.
+% Since \KOMAScript{} (still) supports |\float at exts| we need to handle
+% this locally, too, even if |\unsettoc| is offered by the \package{tocbasic} package.
+% (Otherwise our handling could be moved into the |\else| branch.)
+%    \begin{macrocode}
+  \providecommand*\@chapterlistsgap at off[1]{%
+    \expandafter\let\csname @ifchapterlistsgap@#1\endcsname\@gobble
+    \ifcsname unsettoc\endcsname
+      \@expandtwoargs\unsettoc{\@nameuse{ext@#1}}{chapteratlist}%
+    \fi}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@chapterlistsgap at on}
+% |\@chapterlistsgap at off|\marg{float type}\par
+% switches the chapter lists gap on for the given float type.
+%    \begin{macrocode}
+  \providecommand*\@chapterlistsgap at on[1]{%
+    \expandafter\let\csname @ifchapterlistsgap@#1\endcsname\@iden
+    \ifcsname setuptoc\endcsname
+      \@expandtwoargs\setuptoc{\@nameuse{ext@#1}}{chapteratlist}%
+    \fi}
+%    \end{macrocode}
+% \end{macro}
+%
+%    \begin{macrocode}
+\fi
+%    \end{macrocode}
+%
+% \pagebreak[3]
+% \subsection{Global options}
+%
+% \begin{macro}{chapterlistsgap=}
+% The |chapterlistsgap=| option sets the vertical skip added to each list when
+% starting a new chapter.
+%    \begin{macrocode}
+\define at key{newfloat}{chapterlistsgap}{%
+  \renewcommand*\@chapterlistsgap{#1}}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{within=}
+% The |within=| option redefines the default value and modifies all
+% existing floating environments.
+%    \begin{macrocode}
+\define at key{newfloat}{within}{%
+  \def\newfloat at within@default{#1}% set new default value
+  \def\@elt##1{\newfloat at setwithin{##1}{#1}}%
+  \newfloat at list
+  \let\@elt\relax}
+%    \end{macrocode}
+%    \begin{macrocode}
+\define at key{newfloat}{without}[]{%
+  \KV at newfloat@within{none}}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{figurename=}
+% \begin{macro}{listfigurename=}
+% \begin{macro}{figurewithin=}
+% We define these options not only for |figure| but for all existing floating environments.
+%    \begin{macrocode}
+\def\@elt#1{%
+  \define at key{newfloat}{#1name}{%
+    \newfloat at setname{#1}{##1}}%
+  \define at key{newfloat}{list#1name}{%
+    \newfloat at setname{list#1}{##1}}%
+  \define at key{newfloat}{#1within}{%
+    \newfloat at setwithin{#1}{##1}}%
+  \define at key{newfloat}{#1without}[]{%
+    \newfloat at setwithout{#1}}%
+}%
+\newfloat at list
+\let\@elt\relax
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{planb=}
+% \changes{v1.0b}{2012/05/18}{This option added}
+% This option switches the `Plan B' on or off. (default$=$off)
+%    \begin{macrocode}
+\define at key{newfloat}{planb}[true]{%
+  \def\@tempa{#1}%
+  \def\@tempb{false}%
+  \ifx\@tempa\@tempb
+    \let\newfloat at ifplanb\@gobble
+  \else
+    \def\@tempb{true}%
+    \ifx\@tempa\@tempb
+      \let\newfloat at ifplanb\@iden
+    \else
+      \newfloat at Error{Invalid value `#1' for option `planb'}%
+    \fi
+  \fi}
+%    \end{macrocode}
+% \end{macro}
+% \begin{macro}{planb-filext=}
+% \changes{v1.0b}{2012/05/19}{This option added}
+% This option sets the file extension used for `Plan B'.
+% (default$=$use the 1st one which seem to fit)
+%    \begin{macrocode}
+\define at key{newfloat}{planb-fileext}{%
+  \newfloat at Info{Setting Plan B file extension to `#1'}
+  \xdef\newfloat at addtocontents@ext{#1}}
+%    \end{macrocode}
+% \end{macro}
+
+%
+% Process the package options:
+% We use |\setkeys| here instead of |\ProcessOptions|.
+%    \begin{macrocode}
+\let\@tempc\relax
+\@expandtwoargs\setkeys{newfloat}{planb,\@ptionlist{\@currname.\@currext}}%
+\AtEndOfPackage{\let\@unprocessedoptions\relax}
+%    \end{macrocode}
+%
+% \begin{macro}{\newfloatsetup}
+% |\newfloatsetup|\marg{options}
+% sets global options after loading the package.
+%    \begin{macrocode}
+\newcommand*\newfloatsetup{\setkeys{newfloat}}
+%    \end{macrocode}
+% \end{macro}
+%
+% \pagebreak[3]
+% \subsection{Patching \cs{chapter}}
+%
+% \begin{macro}{\newfloat at replace@chapter}
+%   |\newfloat at replace@chapter|\marg{original code}\marg{replacement code}\par
+%   tries to patch |\@chapter| so |\@add|\-|chapter|\-|lists|\-|gaps| will be supported.
+%   It checks for |\Hy at org@chapter|, too, since the original code will be stored here
+%   if the \package{hyperref} package was loaded.
+%    \begin{macrocode}
+\newcommand\newfloat at replace@chapter[2]{%
+  \begingroup
+    \let\if at twocolumn\iffalse
+    \let\if at mainmatter\iffalse
+    \let\if at thema\iffalse
+    \def\@tempa[##1]##2{#1}%
+    \ifx\@tempa\@chapter
+      \gdef\@chapter[##1]##2{#2}%
+      \global\let\newfloat at replace@chapter\@gobbletwo
+    \else\ifx\@tempa\Hy at org@chapter
+      \gdef\Hy at org@chapter[##1]##2{#2}%
+      \global\let\newfloat at replace@chapter\@gobbletwo
+    \fi\fi
+  \endgroup}
+%    \end{macrocode}
+%    \begin{macrocode}
+\ifcsname @chapter\endcsname \else
+  \let\newfloat at replace@chapter\@gobbletwo
+\fi
+%    \end{macrocode}
+% \end{macro}
+%
+% \pagebreak[3]
+% \subsubsection{Standard \LaTeX{} document classes}
+%
+%    \begin{macrocode}
+% report.cls [2005/09/16 v1.4f Standard LaTeX document class]
+\newfloat at replace@chapter{%
+  \ifnum \c at secnumdepth >\m at 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 at twocolumn
+    \@topnewpage[\@makechapterhead{#2}]%
+  \else
+    \@makechapterhead{#2}%
+    \@afterheading
+  \fi
+}{%
+  \ifnum \c at secnumdepth >\m at ne
+    \refstepcounter{chapter}%
+    \typeout{\@chapapp\space\thechapter.}%
+    \addcontentsline{toc}{chapter}%
+      {\protect\numberline{\thechapter}#1}%
+  \else
+    \addcontentsline{toc}{chapter}{#1}%
+  \fi
+  \chaptermark{#1}%
+  \@addchapterlistsgaps
+  \if at twocolumn
+    \@topnewpage[\@makechapterhead{#2}]%
+  \else
+    \@makechapterhead{#2}%
+    \@afterheading
+  \fi}
+%    \end{macrocode}
+%
+%    \begin{macrocode}
+% book.cls [2005/09/16 v1.4f Standard LaTeX document class]
+\newfloat at replace@chapter{%
+  \ifnum \c at secnumdepth >\m at ne
+    \if at 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 at twocolumn
+    \@topnewpage[\@makechapterhead{#2}]%
+  \else
+    \@makechapterhead{#2}%
+    \@afterheading
+  \fi
+}{%
+  \ifnum \c at secnumdepth >\m at ne
+    \if at 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 at twocolumn
+    \@topnewpage[\@makechapterhead{#2}]%
+  \else
+    \@makechapterhead{#2}%
+    \@afterheading
+  \fi}
+%    \end{macrocode}
+%
+% \pagebreak[3]
+% \subsubsection{\AmS{} \& \SmF{} document classes}
+%
+%    \begin{macrocode}
+% amsbook.cls [2004/08/06 v2.20]
+% smfbook.cls [1999/11/15 v1.2f Classe LaTeX pour les monographies editees par la SMF]
+\newfloat at replace@chapter{%
+  \refstepcounter{chapter}%
+  \ifnum\c at 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 at 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}
+%    \end{macrocode}
+%
+% \pagebreak[3]
+% \subsubsection{\KOMAScript{} document classes}
+%
+% If a \KOMAScript{} document class or the \package{tocbasic} package is used
+% we don't need to patch anything.
+% Instead we use |\setup|\-|toc| and |\un|\-|set|\-|toc| to setup the
+% chapters gap in |\@chapter|\-|lists|\-|gap at on| and |\@chapter|\-|lists|\-|gap at off|.
+%    \begin{macrocode}
+\@ifpackageloaded{tocbasic}{%
+  \let\newfloat at replace@chapter\@gobbletwo}{}
+%    \end{macrocode}
+%
+% \pagebreak[3]
+% \subsubsection{memoir document classes}
+%
+% If the \package{memoir} document class is used,
+% replacing |\insert|\-|chapter|\-|space| by |\@add|\-|chapter|\-|lists|\-|gaps| is sufficient.
+%    \begin{macrocode}
+\ifcsname insertchapterspace\endcsname
+  \renewcommand*\insertchapterspace{\@addchapterlistsgaps}
+  \let\newfloat at replace@chapter\@gobbletwo
+\fi
+%    \end{macrocode}
+%
+% \pagebreak[3]
+% \subsubsection{NTG document classes}
+%
+%    \begin{macrocode}
+% rapport1/3.cls [2004/06/07 v2.1a NTG LaTeX document class]
+\newfloat at replace@chapter{%
+  \ifnum \c at secnumdepth >\m at ne
+    \refstepcounter{chapter}%
+    \typeout{\@chapapp\space\thechapter.}%
+    \addcontentsline{toc}{chapter}%
+      {\protect\numberline{\thechapter}\toc at font0 #1}%
+  \else
+    \addcontentsline{toc}{chapter}{\toc at font0 #1}%
+  \fi
+  \chaptermark{#1}%
+  \addtocontents{lof}{\protect\addvspace{10\p@}}%
+  \addtocontents{lot}{\protect\addvspace{10\p@}}%
+  \if at twocolumn
+    \@topnewpage[\@makechapterhead{#2}]%
+  \else
+    \@makechapterhead{#2}%
+    \@afterheading
+  \fi
+}{%
+  \ifnum \c at secnumdepth >\m at ne
+    \refstepcounter{chapter}%
+    \typeout{\@chapapp\space\thechapter.}%
+    \addcontentsline{toc}{chapter}%
+      {\protect\numberline{\thechapter}\toc at font0 #1}%
+  \else
+    \addcontentsline{toc}{chapter}{\toc at font0 #1}%
+  \fi
+  \chaptermark{#1}%
+  \@addchapterlistsgaps
+  \if at twocolumn
+    \@topnewpage[\@makechapterhead{#2}]%
+  \else
+    \@makechapterhead{#2}%
+    \@afterheading
+  \fi}
+%    \end{macrocode}
+%    \begin{macrocode}
+  % boek(3).cls [2004/06/07 v2.1a NTG LaTeX document class]
+\newfloat at replace@chapter{%
+  \ifnum \c at secnumdepth >\m at ne
+    \if at mainmatter
+      \refstepcounter{chapter}%
+      \typeout{\@chapapp\space\thechapter.}%
+      \addcontentsline{toc}{chapter}%
+        {\protect\numberline{\thechapter}\toc at font0 #1}%
+    \else
+      \addcontentsline{toc}{chapter}{\toc at font0 #1}%
+    \fi
+  \else
+    \addcontentsline{toc}{chapter}{\toc at font0 #1}%
+  \fi
+  \chaptermark{#1}%
+  \addtocontents{lof}{\protect\addvspace{10\p@}}%
+  \addtocontents{lot}{\protect\addvspace{10\p@}}%
+  \if at twocolumn
+    \@topnewpage[\@makechapterhead{#2}]%
+  \else
+    \@makechapterhead{#2}%
+    \@afterheading
+  \fi
+}{%
+  \ifnum \c at secnumdepth >\m at ne
+    \if at mainmatter
+      \refstepcounter{chapter}%
+      \typeout{\@chapapp\space\thechapter.}%
+      \addcontentsline{toc}{chapter}%
+        {\protect\numberline{\thechapter}\toc at font0 #1}%
+    \else
+      \addcontentsline{toc}{chapter}{\toc at font0 #1}%
+    \fi
+  \else
+    \addcontentsline{toc}{chapter}{\toc at font0 #1}%
+  \fi
+  \chaptermark{#1}%
+  \@addchapterlistsgaps
+  \if at twocolumn
+    \@topnewpage[\@makechapterhead{#2}]%
+  \else
+    \@makechapterhead{#2}%
+    \@afterheading
+  \fi}
+%    \end{macrocode}
+%
+% \pagebreak[3]
+% \subsubsection{The thesis document class}
+%
+%    \begin{macrocode}
+% thesis.cls [1996/25/01 1.0g LaTeX document class (wm).]
+\newfloat at replace@chapter{%
+  \ifnum \c at secnumdepth >\m at ne
+    \if at mainmatter
+      \refstepcounter{chapter}%
+      \typeout{\chaptername\space\thechapter.}
+      \if at 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 at twocolumn
+    \@topnewpage[\@makechapterhead{#2}]
+  \else
+    \@makechapterhead{#2}
+    \@afterheading
+  \fi
+}{%
+  \ifnum \c at secnumdepth >\m at ne
+    \if at mainmatter
+      \refstepcounter{chapter}%
+      \typeout{\chaptername\space\thechapter.}%
+      \if at 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 at twocolumn
+    \@topnewpage[\@makechapterhead{#2}]%
+  \else
+    \@makechapterhead{#2}%
+    \@afterheading
+  \fi}
+%    \end{macrocode}
+%
+% \pagebreak[3]
+% \subsubsection{Compatibility warning}
+%
+%    \begin{macrocode}
+\ifx\newfloat at replace@chapter\@gobbletwo \else
+%    \end{macrocode}
+% If we were not able to patch |\@chapter| an info message is issued
+% since we may not be able to support chapter lists gaps then.
+%    \begin{macrocode}
+  \newfloat at InfoNoLine{%
+   Unsupported document class, or \noexpand\@chapter\MessageBreak
+   was already redefined by another package}
+  \newfloat at InfoNoLine{\string\@chapter\space=\space\meaning\@chapter}
+  \newfloat at InfoNoLine{\string\Hy at org@chapter\space=\space\meaning\Hy at org@chapter}
+%    \end{macrocode}
+% Plan B: We patch |\addtocontents| instead, and keep our fingers crossed in the hope
+% that this redefinition actually will fit.
+%    \begin{macrocode}
+  \newfloat at ifplanb{%
+    \newfloat at InfoNoLine{Trying Plan B..}%
+    \let\newfloat at addtocontents@ORI\addtocontents
+    \long\def\addtocontents#1#2{%
+      \newfloat at addtocontents{#1}{#2}#2\addvspace\newfloat at nil}%
+    \long\def\newfloat at addtocontents#1#2#3\addvspace#4\newfloat at nil{%
+      \def\newfloat at tempa{#4}%
+      \ifx\newfloat at tempa\@empty
+        \newfloat at addtocontents@ORI{#1}{#2}%
+      \else
+        \ifx\newfloat at addtocontents@ext\@undefined
+          \newfloat at Info{Setting Plan B file extension to `#1'...}%
+          \xdef\newfloat at addtocontents@ext{#1}%
+        \fi
+        \edef\newfloat at tempa{#1}%
+        \ifx\newfloat at tempa\newfloat at addtocontents@ext
+          \begingroup
+            \let\addtocontents\newfloat at addtocontents@ORI
+            \@addchapterlistsgaps
+          \endgroup
+        \fi
+      \fi}}
+%    \end{macrocode}
+%    \begin{macrocode}
+\fi
+%    \end{macrocode}
+%
+% \pagebreak[3]
+% \subsection{Support of other packages}
+%
+% \begin{macro}{\newfloat at ForEachNew}
+% |\newfloat at ForEachNew|\oarg{command}\marg{code}
+% will execute the given code for every floating environment defined with
+% |\Declare|\-|Floating|\-|Environment|.
+% This will be done |\At|\-|Begin|\-|Document| so the affected package could be loaded
+% after \thispackage.
+% (If a \meta{command} is given this will only be done if \meta{command} is
+%  defined.)
+%    \begin{macrocode}
+\newcommand\newfloat at ForEachNew[2][newfloat@@list]{%
+  \AtBeginDocument{%
+    \ifcsname#1\endcsname
+      \def\@elt##1{#2}%
+      \newfloat@@list
+      \let\@elt\relax
+    \fi}}%
+\@onlypreamble\newfloat at ForEachNew
+%    \end{macrocode}
+% \end{macro}
+%
+% \pagebreak[3]
+% \subsubsection{\package{float}}
+%
+% If the \package{float} package is used we fill up |\float at exts| with our file
+% extensions, too. Since this list will be used for inserting chapters gaps
+% we only add the ones which are configured for chapters gaps on.
+%%    \begin{macrocode}
+\newfloat at ForEachNew[float at exts]{%
+  \@nameuse{@ifchapterlistsgap@#1}{% if switched on
+    \let\float at do=\relax
+    \edef\@tempa{%
+      \noexpand\float at exts{\the\float at exts\float at do{\@nameuse{ext@#1}}}}%
+    \@tempa}}
+%    \end{macrocode}
+%
+% \pagebreak[3]
+% \subsubsection{\package{fltpage}}
+%
+% We define a FP-variant of new floating environments here.
+%    \begin{macrocode}
+\newfloat at ForEachNew[FP at floatBegin]{%
+  \newcounter{FP@#1C}%
+  \newenvironment{FP#1}{\FP at floatBegin{#1}}{\FP at floatEnd}}
+%    \end{macrocode}
+%
+% \pagebreak[3]
+% \subsubsection{\package{listings}}
+%
+% \begin{macro}{\ext at lstlisting}
+% Since the \package{listings} package do not define |\ext at lst|\-|listing|
+% but we needed it when |Setup|\-|Floating|\-|Environment{lst|\-|listing}{|\ldots|}|
+% will be done by the end user, we define it here.
+%    \begin{macrocode}
+\providecommand*\ext at lstlisting{lol}%
+%    \end{macrocode}
+% \end{macro}
+%
+% \pagebreak[3]
+% \subsubsection{\package{rotating}}
+%
+% We define a sideways-variant of new floating environments here.
+%    \begin{macrocode}
+\newfloat at ForEachNew[@rotfloat]{%
+  \newenvironment{sideways#1}{\@rotfloat{#1}}{\end at rotfloat}%
+  \newenvironment{sideways#1*}{\@rotdblfloat{#1}}{\end at rotdblfloat}}
+%    \end{macrocode}
+%
+% \pagebreak[3]
+% \subsubsection{\package{sidecap}}
+%
+% We define a SC-variant of new floating environments here.
+%    \begin{macrocode}
+\newcommand*\newfloat at For@SC[2]{%
+  \def#1{b}% = \sidecaptionvpos{#2}{b} (v1.6)
+  \newenvironment{SC#2}%
+    {\SC at float[#1]{#2}}{\endSC at float}%
+  \newenvironment{SC#2*}%
+    {\SC at dblfloat[#1]{#2}}{\endSC at dblfloat}}
+\@onlypreamble\newfloat at For@SC
+%    \end{macrocode}
+%    \begin{macrocode}
+\newfloat at ForEachNew[SC at float]{%
+  \expandafter\newfloat at For@SC\csname SC@#1 at vpos\endcsname{#1}}
+%    \end{macrocode}
+%
+% \pagebreak[3]
+% \subsubsection{\package{wrapfig}}
+%
+% We define a wrap-variant of new floating environments here.
+%    \begin{macrocode}
+\newfloat at ForEachNew[wrapfloat]{%
+  \newenvironment{wrap#1}{\wrapfloat{#1}}{\endwrapfloat}}
+%    \end{macrocode}
+% \iffalse
+%</package>
+% \fi
+%
+% \iffalse
+% --------------------------------------------------------------------------- %
+% \fi
+%
+% \Finale
+%
+\endinput


Property changes on: trunk/Master/texmf-dist/source/latex/newfloat/fallback/v1.0/newfloat.dtx
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/source/latex/newfloat/fallback/v1.1/newfloat.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/newfloat/fallback/v1.1/newfloat.dtx	                        (rev 0)
+++ trunk/Master/texmf-dist/source/latex/newfloat/fallback/v1.1/newfloat.dtx	2023-10-02 19:45:00 UTC (rev 68434)
@@ -0,0 +1,2135 @@
+% \iffalse meta-comment
+% 
+% This is file `newfloat.dtx'.
+% 
+% Copyright (C) 2011-2021 Axel Sommerfeldt (axel.sommerfeldt at 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 "unmaintained".
+% 
+% This work consists of the files newfloat.ins, newfloat.dtx,
+% and the derived file newfloat.sty.
+% 
+% \fi
+% \CheckSum{1634}
+%
+% \iffalse
+%<*driver>
+\NeedsTeXFormat{LaTeX2e}[1994/12/01]
+\ProvidesFile{newfloat.drv}[2021/02/27 v1.1 This package offers a command for defining new floating environments]
+\hbadness=9999 \newcount\hbadness \hfuzz=48pt % Make TeX shut up.
+%
+\documentclass{ltxdoc}
+\setlength\parindent{0pt}
+\setlength\parskip{\smallskipamount}
+%
+\usepackage{ifpdf}
+\ifpdf
+  \usepackage{mathptmx,courier}
+  \usepackage[scaled=0.90]{helvet}
+% \addtolength\marginparwidth{15pt}
+\fi
+%
+\usepackage[bottom]{footmisc}
+%
+\usepackage{hypdoc}
+\ifpdf\usepackage{hypdestopt}\fi
+\hypersetup{pdfkeywords={LaTeX, package, newfloat},pdfstartpage={},pdfstartview={}}
+%
+\usepackage{newfloat}
+%
+\DeclareRobustCommand*\eTeX{\texorpdfstring
+  {\leavevmode\hbox{$\varepsilon$}-\TeX}%
+  {e-TeX}}
+\DeclareRobustCommand*\AmS{\texorpdfstring
+  {{\protect\usefont{OMS}{cmsy}{m}{n}A\kern-.1667em\lower.5ex\hbox{M}\kern-.125emS}}%
+  {AMS}}
+\DeclareRobustCommand*\KOMAScript{\texorpdfstring
+  {\textsf{K\kern.05em O\kern.05em M\kern.05em A\kern.1em-\kern.1em Script}}%
+  {KOMA-Script}}
+\DeclareRobustCommand*\NTG{NTG}
+\DeclareRobustCommand*\SmF{SMF}
+%
+\begin{document}
+  \DocInput{newfloat.dtx}
+\end{document}
+%</driver>
+% \fi
+%
+% \newcommand*\purerm[1]{{\upshape\mdseries\rmfamily #1}}
+% \newcommand*\puresf[1]{{\upshape\mdseries\sffamily #1}}
+% \newcommand*\purett[1]{{\upshape\mdseries\ttfamily #1}}
+% \let\class\puresf \let\package\puresf
+% \let\env\purett \let\opt\purett
+%
+% \def\thispackage{the \package{newfloat} package}
+% \def\Thispackage{The \package{newfloat} package}
+% 
+% \newcommand*\csmarg[1]{\texttt{\char`\{#1\char`\}}}
+% \newcommand*\csoarg[1]{\texttt{\char`\[#1\char`\]}}
+% \newcommand*\version[2][]{\textit{v#2}}
+%
+% \setlength\leftmargini{1.5em}
+%
+% \GetFileInfo{newfloat.drv}
+% \let\docdate\filedate
+% \let\docversion\fileversion
+% \GetFileInfo{newfloat.sty}
+%
+% \title{\texorpdfstring{\Thispackage\thanks{%^^A
+%          This package has version number \docversion.}}%^^A
+%        {The newfloat package}}
+% \author{Axel Sommerfeldt\\
+%         \url{https://gitlab.com/axelsommerfeldt/newfloat}}
+% \date{\docdate}
+% \maketitle
+% 
+% \begin{abstract}
+% \centering
+% This package offers the command
+% |\Declare|\-|Floating|\-|Environment| for defining new floating environments
+% which behave like |figure| and |table|.
+% \end{abstract}
+% 
+% \tableofcontents
+%
+% \clearpage
+% \section{Loading the package}
+%
+% First of all you need to include this package into your document with
+% \begin{quote}
+%   |\usepackage|\oarg{options}|{newfloat}|
+% \end{quote}
+% where \meta{options} are one or more of
+% \begin{quote}\begin{tabular}{r@{\,}l}
+%   |within=| & \meta{``within'' counter} \emph{or} \texttt{none}\quad\\
+%   |chapterlistsgap=| & \meta{value}~\footnotemark[1]
+% \end{tabular}\end{quote}
+%
+% The ``within'' counter specifies the counter which will be used to reset
+% the counter of the floating environments |figure| and |table| .
+% (Furthermore this setting will be used as default setting for
+% |\Declare|\-|Floating|\-|Environment|.)
+%
+% So for example |within=chapter| will give you a numbering scheme
+% \meta{chapter}.\meta{x} for floating environments,
+% while |within=section| will give you a numbering scheme
+% \meta{chapter}.\meta{section}.\meta{x}, or \meta{section}.\meta{x}
+% if the document class does not offer |\chapter|.
+% |within=none| will result in a continuous numbering throughout the document,
+% i.e.~the numbering scheme will be simply \meta{x}.
+%
+% The option |chapterlistsgap=|\meta{value} sets the amount of the
+% vertical gap inserted into the ``List of Figure'', ``List of Tables'',
+% and all lists created with |\Declare|\-|Floating|\-|Environment|
+% when a new chapter will be started.
+% The default value is |10pt|.
+% (This option will only be available if the document class used offer
+% the usage of chapters, e.g.~the |book| or |report| document class.)
+%
+% \pagebreak[3]
+% Both options can be changed later on, too, by using the command
+% \begin{quote}
+% |\newfloatsetup|\meta{options}\quad,
+% \end{quote}
+%
+% \pagebreak[3]
+% \section{\cs{DeclareFloatingEnvironment}}
+%
+% After loading \thispackage\ you can define your own floating environments with
+% \begin{quote}
+% \iffalse
+% \setlength{\leftmargin}{6cm}
+% \fi
+%  |\DeclareFloatingEnvironment|\oarg{options}\marg{type}%
+% \iffalse
+%   \oarg{name}\oarg{list name}
+% \fi
+% \end{quote}
+% where \meta{options} are one or more of
+% \begin{quote}\begin{tabular}{r@{\,}l}
+%   |fileext=| & \meta{file extension}\\
+%   |listname=| & \meta{list name}\\
+%   |name=| & \meta{prosa name}\\
+%   |placement=| & \meta{combination of \,\purett{htbp}}\\
+%   |within=| & \meta{``within'' counter} \emph{or} \texttt{none}\\
+%   |chapterlistsgaps=| & \texttt{on} \emph{or} \texttt{off}~\footnotemark[1]
+% \end{tabular}\end{quote}
+% \footnotetext[1]{Please note that although \thispackage\ tries hard to offer this
+% option it may not be available or is working incorrectly in cooperation with
+% your document class since there is no standard interface which we could use
+% for that purpose. Therefore we have to try to patch the \cs{chapter} command,
+% and if this fails, we try to patch \cs{addtocontents} (in an unusual way) instead.}
+%
+% If no \meta{options} are given,
+% ``lo\meta{type}'' will be used as \meta{file extension} for the list,
+% ``List of \meta{name}s'' as \meta{list name}.
+% ``\meta{name}'' as \meta{name} (but with the first letter capitalized),
+% ``|tbp|'' as \meta{placement} specifier,
+% and ``|chapter|'' resp. ``|none|'' as \meta{``within'' counter},
+% i.e., the counter which resets the numbering.
+%
+% The default value of the |chapterlistsgaps=| option depends on the
+% ``within'' setting, it is set to |on| if |chapter| or |section| is selected,
+% otherwise it is set to |off|.
+% (This option will only be available if the document class used offer
+% the usage of chapters, e.g.~the |book| or |report| document class.)
+%
+% The list will be typeset using the command |\list|\-|of|\meta{type}|s|
+% resp.~|\list|\-|of|\meta{type}|es|,
+% analogous to |\list|\-|of|\-|figures| and |\list|\-|of|\-|tables|.
+%
+% If the \package{fltpage} package is loaded, an environment called
+% |FP|\meta{type} will be defined additionally, same for |sideways|\meta{type}
+% (\package{rotating} package), |SC|\meta{type} (\package{sidecap} package),
+% and |wrap|\meta{type} (\package{wrapfig} package).
+% 
+% \bigskip
+% 
+% \pagebreak[3]
+% So for example
+% \begin{quote}
+%   |\DeclareFloatingEnvironment{diagram}|
+% \end{quote}
+% will define a new floating environment called |diagram|,
+% the list will be stored in a file with the extension |lodiagram|, the name
+% (used for the caption) will be ``Diagram'' and the list name
+% ``List of Diagrams''.
+% The list could be typeset with |\list|\-|of|\-|diagrams|.
+% Dependent on which packages are loaded, the environments |FP|\-|diagram|,
+% |sideways|\-|diagram|, |SC|\-|diagram|, and |wrap|\-|diagram| will be defined additionally.
+%
+% \pagebreak[3]
+% Another example:
+% \begin{quote}
+%   |\DeclareFloatingEnvironment[|\\
+%   |  fileext=lox,|\\
+%   |  listname={List of Matrixes},|\\
+%   |  name=Matrix,|\\
+%   |  placement=p,|\\
+%   |  within=section,|\\
+%   |  chapterlistsgaps=off|\\
+%   |  ]{matrixx}|
+% \end{quote}
+% will define a new floating environment called |matrixx| with the given settings.
+% Please note that names which contain spaces needs to be enclosed in curly braces.
+%
+% \pagebreak[3]
+% \section{\cs{SetupFloatingEnvironment}}
+%
+% While |\DeclareFloatingEnvironment| will create new floating environments,
+% \begin{quote}
+% |\SetupFloatingEnvironment|\marg{floating environment}\marg{options}
+% \end{quote}
+% will change the settings of existing ones, i.e. either |figure| or |table|,
+% or a one created with |\Declare|\-|Floating|\-|Environment|,
+% or a one created with |\new|\-|float| offered by the \package{float} package,
+% or a one created with |\new|\-|float| offered by the \package{memoir} document class,
+% or a one created with |\Declare|\-|New|\-|Float|\-|Type| offered by the \package{floatrow} package,
+% or \ldots
+%
+% The \meta{options} are the same as the options for
+% |\Declare|\-|Floating|\-|Environment|,
+% but one should avoid changing the file extension
+% of existing floating environments,
+% i.e.~using the |fileext=| option within |\Setup|\-|Floating|\-|Environment|
+% is usually a very bad idea.
+%
+% \bigskip
+%
+% \pagebreak[3]
+% An example:
+% \begin{quote}
+%   |\SetupFloatingEnvironment{lstlisting}{chapterlistsgaps=off}|
+% \end{quote}
+% will switch off the chapter lists gaps for |lstlisting| environments
+% offered by the \package{listings} package.
+%
+% \pagebreak[3]
+% \section{\cs{ForEachFloatingEnvironment}}
+%
+% \begin{quote}
+%  |\ForEachFloatingEnvironment|\marg{code with \#1}
+% \end{quote}
+% will execute the given \meta{code} for all known floating environments,
+% and for ones defined with |\Declare|\-|Floating|\-|Environment| later on.
+%
+% \pagebreak[3]
+% So for example the \package{subcaption} packages uses
+% \begin{quote}
+%  |\ForEachFloatingEnvironment{\DeclareCaptionSubType{#1}}|
+% \end{quote}
+% for initializing itself for all floating environments which are
+% known to \thispackage.
+%
+% \medskip
+%
+% There is also a starred variant |\For|\-|Each|\-|Floating|\-|Environment*|
+% which will execute the given code for already existing floating environments
+% only, i.e.~no hook will be placed inside |\Declare|\-|Floating|\-|Environment|.
+%
+% \pagebreak[3]
+% An example:
+% \begin{quote}
+%  |\ForEachFloatingEnvironment*{\typeout{#1}}|
+% \end{quote}
+% will typeout the names of all already known floating environments to the terminal
+% and log file.
+%
+% \pagebreak[3]
+% \section{\cs{PrepareListOf}}
+%
+% Unfortunately there is no standardized way of typesetting and customizing
+% lists of floating environments, i.e.~every document class offers it's own stuff here,
+% and there are plenty of \LaTeXe\ packages for this purpose.
+%
+% \pagebreak[3]
+% For that reason the \thispackage\ simply typesets the lists of newly
+% defined floating environments as ``List of Figure'' internally (using |\list|\-|of|\-|figure|)
+% but using a different list (the right one, of course) and using a different list name,
+% the one you have specified with either |\Declare|\-|Floating|\-|Environment| or
+% |\Setup|\-|Floating|\-|Environment|.\footnote{Please note that this is not the
+% fact when using a \KOMAScript\ document class, not \cs{listoffigure} but \cs{listoftoc}
+% will be used here, and therefore no problems should occur.}
+%
+% \pagebreak[3]
+% While this usually results in the same layout as the ``List of Figure'' and
+% is sufficient for most cases, there are some cases where this might
+% lead to an unwanted side effect.
+%
+% \pagebreak[3]
+% Therefore the \thispackage\ offers
+% \begin{quote}
+%  |\PrepareListOf|\marg{floating environment}\marg{code}
+% \end{quote}
+% which will execute the given \meta{code} right before actually typesetting the list
+% with |\list|\-|of|\-|figures| internally.
+%
+% \pagebreak[3]
+% One example:
+% \begin{quote}
+%   |\PrepareListOf{diagram}{%|\\
+%   |  \renewcommand{\cftfigpresnum}{Diagram~}}|
+% \end{quote}
+% will change the part typeset in front of the diagram number within the
+% ``List of Diagrams'' when using the \package{tocloft} package~\cite{tocloft}.
+% Without the code above you will get the part defined for figures instead.
+%
+% \pagebreak[3]
+% However, when dealing with the \package{tocloft} package it's a better
+% idea not to use |\Prepare|\-|List|\-|Of| but the customization facilities of that package
+% instead, e.g.:
+% \begin{quote}
+%   |\documentclass{book}|\\
+%   \ldots\\
+%   |\usepackage{newfloat,tocloft}|\\
+%   |\newlistof{diagram}{lod}{List of Diagrams}|\\
+%   |\DeclareFloatingEnvironment[name=Diagram,fileext=lod]{diagram}|\\
+%   |      % Note: Due of a bug in tocloft the file extension|\\
+%   |      % must be repeated at \DeclareFloatingEnvironment,|\\
+%   |      % otherwise you will get an empty list.|\\
+%   ||\\
+%   |% Customize `List of Figures'|\\
+%   |\renewcommand{\cftfigpresnum}{Figure~}|\\
+%   |\setlength{\cftfignumwidth}{2cm}|\\
+%   ||\\
+%   |% Customize `List of Diagrams'|\\
+%   |\renewcommand{\cftdiagrampresnum}{Diagram~}|\\
+%   |\setlength{\cftdiagramnumwidth}{2cm}|\\
+%   ||\\
+%   \ldots\\
+%   ||\\
+%   |\begin{document}|\\
+%   \ldots\\
+%   |\listoffigures|\\
+%   |\listofdiagrams|\\
+%   \ldots\\
+%   |\end{document}|
+% \end{quote}
+%
+% \iffalse
+% \pagebreak[3]
+% \section{For \LaTeX{} package authors}
+%
+% |\For|\-|Each|\-|Floating|\-|Environment| without \package{newfloat} package:
+% \begin{quote}
+%   |\newcommand\mypackage at foreachfloat[1]{%|\\
+%   |  \@ifundefined{ForEachFloatingEnvironment}%|\\
+%   |    {\def\@elt##1{#1}%|\\
+%   |      \@ifundefined{c at figure}\@gobble\@elt{figure}%|\\
+%   |      \@ifundefined{c at table}\@gobble\@elt{table}%|\\
+%   |      \let\@elt\relax|\\
+%   |      \newfloat at addtohook{#1}}%|\\
+%   |    {\ForEachFloatingEnvironment{#1}}}|\\
+%   |\providecommand\newfloat at addtohook[1]{%|\\
+%   |  \toks@=\expandafter{\newfloat at hook{##1}#1}%|\\
+%   |  \edef\@tempa{\def\noexpand\newfloat at hook####1{\the\toks@}}%|\\
+%   |  \@tempa}|\\
+%   |\providecommand*\newfloat at hook[1]{}|
+% \end{quote}
+%
+% \pagebreak[3]
+% Adding environment to list of floating environments:
+% \begin{quote}
+%   |\SetupFloatingEnvironment|\marg{environment}|{}|
+% \end{quote}
+% or (without \package{newfloat} package loaded):
+% \begin{quote}
+%   |\providecommand\newfloat at list{}|\\
+%   |\@cons\newfloat at list{|\marg{environment}|}|
+% \end{quote}
+% (Please note the doubled curly braces around the environment name.)
+% \fi
+%
+% \iffalse
+% --------------------------------------------------------------------------- %
+% \fi
+%
+% \StopEventually{%^^A
+% \pagebreak[4]
+% \begin{thebibliography}{9}
+%
+%   \bibitem{memoir}
+%   Peter Wilson:\\
+%   \href{http://www.ctan.org/pkg/memoir}%
+%        {\emph{The Memoir Class for Configurable Typesetting}},\\
+%   2011/03/06
+%
+%   \bibitem{NTGclasses}
+%   Victor Eijkhout:\\
+%   \href{http://www.ctan.org/pkg/ntgclass}%
+%        {\emph{An introduction to the Dutch \LaTeX\ document classes}},\\
+%   \mbox{3~September~1989}
+%
+%   \bibitem{KOMAScript}
+%   Markus Kohm \& Jens-Uwe-Morawski:\\
+%   \href{http://www.ctan.org/pkg/koma-script}%
+%        {\emph{KOMA-Script -- a versatile \LaTeXe\ bundle}},\\
+%   2012-07-22
+%
+%   \bibitem{float}
+%   Anselm Lingnau:\\
+%   \href{http://www.ctan.org/pkg/float}%
+%        {\emph{An Improved Environment for Floats}},\\
+%   2001/11/08
+%
+%   \bibitem{fltpage}
+%   Sebastian Gross:\\
+%   \href{http://www.ctan.org/pkg/fltpage}%
+%        {\emph{Welcome to the beta test of fltpage package!}},\\
+%   1998/11/13
+%
+%   \bibitem{rotating}
+%   Sebastian Rahtz and Leonor Barroca:\\
+%   \href{http://www.ctan.org/pkg/rotating}%
+%        {\emph{A style option for rotated objects in \LaTeX}},\\
+%   1997/09/26
+%
+%   \bibitem{sidecap}
+%   Rolf Niepraschk \& Hubert G\"a\ss lein:\\
+%   \href{http://www.ctan.org/pkg/sidecap}%
+%        {\emph{The sidecap package}},\\
+%   2003/06/06
+%
+%   \bibitem{tocloft}
+%   Peter Wilson, Herries Press, Will Robertson:\\
+%   \href{http://www.ctan.org/pkg/tocloft}%
+%        {\emph{The tocloft package}},\\
+%   2010/10/13
+%
+%   \bibitem{wrapfig}
+%   Donald Arseneau:\\
+%   \href{http://www.ctan.org/pkg/wrapfig}%
+%        {\emph{WRAPFIG.STY ver 3.6}},\\
+%   2003/01/31
+%
+% \end{thebibliography}
+% }
+%
+% \iffalse
+% --------------------------------------------------------------------------- %
+% \fi
+%
+% \DoNotIndex{\\,\_,\ ,\@@par}
+% \DoNotIndex{\@bsphack}
+% \DoNotIndex{\@car,\@cdr,\@classoptionslist,\@cons,\@currext,\@currname}
+% \DoNotIndex{\@ehc,\@ehd,\@empty,\@esphack,\@expandtwoargs}
+% \DoNotIndex{\@for,\@firstofone,\@firstoftwo}
+% \DoNotIndex{\@gobble,\@gobbletwo,\@gobblethree,\@gobblefour,\@hangfrom}
+% \DoNotIndex{\@ifnextchar,\@ifpackagelater,\@ifpackageloaded}
+% \DoNotIndex{\@ifstar,\@ifundefined,\@latex at error,\@namedef,\@nameuse}
+% \DoNotIndex{\@onlypreamble,\@parboxrestore,\@plus,\@ptionlist}
+% \DoNotIndex{\@removeelement,\@restorepar,\@secondoftwo,\@setpar}
+% \DoNotIndex{\@tempa,\@tempboxa,\@tempdima,\@tempdimb,\@tempdimc,\@tempb,\@tempc}
+% \DoNotIndex{\@testopt}
+% \DoNotIndex{\@undefined,\@unprocessedoptions,\@unusedoptionlist}
+% \DoNotIndex{\p@,\z@}
+% \DoNotIndex{\active,\addtocounter,\addtolength,\advance,\aftergroup}
+% \DoNotIndex{\baselineskip,\begin,\begingroup,\bfseries,\box}
+% \DoNotIndex{\catcode,\centering,\changes,\csname,\def,\divide,\do,\downarrow}
+% \DoNotIndex{\edef,\else,\empty,\end,\endcsname,\endgraf,\endgroup,\expandafter}
+% \DoNotIndex{\fi,\footnotesize,\global}
+% \DoNotIndex{\hangindent,\hbox,\hfil,\hsize,\hskip,\hspace,\hss}
+% \DoNotIndex{\ifcase,\ifdim,\ifnum,\ifodd,\ifvoid,\ifvmode}
+% \DoNotIndex{\ifx,\ignorespaces,\itshape}
+% \DoNotIndex{\Large,\large,\leavevmode,\leftmargini,\leftskip,\let,\linewidth}
+% \DoNotIndex{\llap,\long,\m at ne,\margin,\mdseries,\message}
+% \DoNotIndex{\newcommand,\newdimen,\newlength,\newline,\newif,\newsavebox}
+% \DoNotIndex{\next,\nobreak,\nobreakspace,\noexpand,\noindent,\numberline}
+% \DoNotIndex{\normalcolor,\normalfont,\normalsize,\or,\par,\parbox,\parfillskip}
+% \DoNotIndex{\parindent,\parskip,\prevdepth,\protect,\protected at edef,\protected at write}
+% \DoNotIndex{\providecommand,\quad}
+% \DoNotIndex{\raggedleft,\raggedright,\relax,\renewcommand,\RequirePackage}
+% \DoNotIndex{\rightskip,\rmfamily}
+% \DoNotIndex{\sbox,\scriptsize,\scshape,\setbox,\setlength,\sffamily,\slshape}
+% \DoNotIndex{\small,\string,\space,\strut}
+% \DoNotIndex{\textheight,\the,\toks@,\typeout,\ttfamily}
+% \DoNotIndex{\unvbox,\uparrow,\upshape,\usebox,\usepackage}
+% \DoNotIndex{\value,\vbox,\vsize,\vskip,\wd,\width,\z at skip}
+% \DoNotIndex{\AtBeginDocument,\AtEndOfPackage,\CurrentOption,\DeclareOption}
+% \DoNotIndex{\ExecuteOptions,\GenericWarning,\IfFileExists,\InputIfFileExists}
+% \DoNotIndex{\NeedsTeXFormat,\MessageBreak}
+% \DoNotIndex{\PackageError,\PackageInfo,\PackageWarning,\PackageWarningNoLine}
+% \DoNotIndex{\PassOptionsToPackage,\ProcessOptions,\ProvidesPackage}
+%
+% \iffalse
+% --------------------------------------------------------------------------- %
+% \fi
+%
+% \setlength{\parskip}{0pt plus 1pt}
+% \changes{v1.0}{2011/10/30}{First release as \package{newfloat} package,
+%       outsourced from the \package{caption3} package and revised}
+% \changes{v1.1}{2013/04/27}{Adapted to the \package{tocloft} package}
+% \changes{v1.1}{2013/04/27}{New command \cs{PrepareListOf} added}
+% \changes{v1.1d}{2019/03/16}{Adapted to the \package{dgruyter} package}
+%
+% \iffalse
+% --------------------------------------------------------------------------- %
+% \fi
+%
+% \clearpage
+% \section{The Implementation}
+% \iffalse
+%<*package>
+% \fi
+%
+% \pagebreak[3]
+% \subsection{Identification}
+%
+% We need at least \LaTeX2e\ version 1994/12/01.
+%    \begin{macrocode}
+\NeedsTeXFormat{LaTeX2e}[1994/12/01]
+%    \end{macrocode}
+%
+% Bypass the release declarations in case the \LaTeX\ kernel doesn’t know how to deal with them
+% (as suggested by \url{https://www.latex-project.org/publications/2018-FMi-TUB-tb122mitt-version-rollback.pdf}).
+%    \begin{macrocode}
+\providecommand\DeclareRelease[3]{}
+\providecommand\DeclareCurrentRelease[2]{}
+%    \end{macrocode}
+%
+% Declare all supported releases.
+%    \begin{macrocode}
+\DeclareRelease{v1.0}{2011-10-30}{newfloat_v1.0.sty}
+\DeclareCurrentRelease{v1.1}{2013-05-12} % 1st CTAN release of v1.1
+%    \end{macrocode}
+%
+% Identify the current version of the package.
+%    \begin{macrocode}
+\ProvidesPackage{newfloat}[2021/02/27 v1.1p Defining new floating environments (AR)]
+%    \end{macrocode}
+%
+% \begin{macro}{\newfloat at Info}
+% \begin{macro}{\newfloat at InfoNoLine}
+%  |\newfloat at Info|\marg{message}
+%    \begin{macrocode}
+\newcommand*\newfloat at Info[1]{%
+  \PackageInfo{newfloat}{#1}}
+\newcommand*\newfloat at InfoNoLine[1]{%
+  \newfloat at Info{#1\@gobble}}
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\newfloat at Warning}
+% \begin{macro}{\newfloat at WarningNoLine}
+%  |\newfloat at Warning|\marg{message}
+%    \begin{macrocode}
+\newcommand*\newfloat at Warning[1]{%
+  \PackageWarning{newfloat}{#1}}
+\newcommand*\newfloat at WarningNoLine[1]{%
+  \newfloat at Warning{#1\@gobble}}
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\newfloat at Error}
+%  |\newfloat at Error|\marg{message}
+%    \begin{macrocode}
+\newcommand*\newfloat at Error[1]{%
+  \PackageError{newfloat}{#1}\newfloat at eh}
+%    \end{macrocode}
+%    \begin{macrocode}
+\newcommand*\newfloat at eh{%
+  If you do not understand this error, please take a closer look\MessageBreak
+  at the documentation of the `newfloat' package.\MessageBreak\@ehc}
+%    \end{macrocode}
+% \end{macro}
+%
+% \pagebreak[3]
+% \subsection{Using the keyval package}
+%
+% We need the \package{keyval} package for option handling, so we load it here.
+%    \begin{macrocode}
+\RequirePackage{keyval}[1997/11/10]
+%    \end{macrocode}
+%
+% \pagebreak[3]
+% \subsection{Helper macros}
+%
+% \begin{macro}{\newfloat at def}
+% \changes{v1.1}{2013/04/27}{This macro added}
+% |\newfloat at def|\marg{macro name}\marg{definition}
+%    \begin{macrocode}
+\newcommand*\newfloat at def[2]{%
+  \newfloat at ifundefined{#1}{%
+    \@namedef{#1}{#2}}}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\newfloat at let}
+% \changes{v1.1}{2013/04/27}{This macro added}
+% |\newfloat at let|\marg{macro name}\marg{macro}
+%    \begin{macrocode}
+\newcommand*\newfloat at let[2]{%
+  \newfloat at ifundefined{#1}{%
+    \expandafter\let\csname #1\endcsname#2}}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\newfloat at ifundefined}
+% \changes{v1.1}{2013/04/27}{This macro added}
+% |\newfloat at ifundefined|\marg{macro name}\marg{code}
+%    \begin{macrocode}
+\newcommand*\newfloat at ifundefined[2]{%
+  \@ifundefined{#1}{#2}{%
+    \newfloat at Info{%
+      \expandafter\string\csname#1\endcsname\space is already defined}}}
+%    \end{macrocode}
+% \end{macro}
+%
+% \pagebreak[3]
+% \subsection{\cs{DeclareFloatingEnvironment}}
+%
+% \begin{macro}{\DeclareFloatingEnvironment}
+% \changes{v1.0a}{2011/11/16}{Bugfix: Undefines \cs{fst@}\meta{environment} now}
+% \changes{v1.1}{2013/04/27}{Revised, only defines stuff yet undefined now}
+% \changes{v1.1}{2013/11/03}{Uses \cs{newfloat at capitalize} now}
+% \changes{v1.1}{2015/09/16}{Support of \cs{autodot} (offered by the \KOMAScript\ classes) added}
+% \changes{v1.1}{2018/03/04}{Usage of \cs{ifdefined} replaced by \cs{@ifundefined} to improve compatibility with the \package{listings} package}
+% \changes{v1.1b}{2018/12/26}{Bugfix: Missing curly braces added}
+% \changes{v1.1c}{2019/01/10}{Bugfix: Support of \cs{autodot} fixed}
+% \changes{v1.1k}{2019/09/01}{Adapted to the \class{beamer} document class}
+%  |\DeclareFloatingEnvironment|\oarg{options}\marg{environment}\oarg{name}\oarg{list name}
+%    \begin{macrocode}
+\newcommand*\DeclareFloatingEnvironment{%
+  \@testopt\@DeclareFloatingEnvironment{}}
+\@onlypreamble\DeclareFloatingEnvironment
+%    \end{macrocode}
+%    \begin{macrocode}
+\def\@DeclareFloatingEnvironment[#1]#2{%
+  \newfloat at Info{New float `#2' with options `#1'}%
+%    \end{macrocode}
+% Define a counter with the same name as the floating environment
+%    \begin{macrocode}
+  \newfloat at ifundefined{c@#2}{\newcounter{#2}}%
+%    \end{macrocode}
+% Set |\ftype@|\meta{type} which contains the type number for floats of type \meta{type}\par
+% (See also \url{http://tex.stackexchange.com/q/32359/2574})
+%    \begin{macrocode}
+  \@ifundefined{c at float@type}%     from float package
+    {\@ifundefined{c at newflo@tctr}% from memoir document class
+       {\ifdefined\newfloat at ftype \else
+          \newcount\newfloat at ftype
+          \newfloat at ftype=8\relax
+        \fi
+        \expandafter\xdef\csname ftype@#2\endcsname{\the\newfloat at ftype}%
+        \advance\newfloat at ftype\newfloat at ftype}%
+       {\expandafter\edef\csname ftype@#2\endcsname{\the\c at newflo@tctr}%
+        \advance\c at newflo@tctr \c at newflo@tctr}}%
+    {\expandafter\edef\csname ftype@#2\endcsname{\the\value{float at type}}%
+     \addtocounter{float at type}{\value{float at type}}}%
+%    \end{macrocode}
+%    \begin{macrocode}
+  \newfloat at Info{float type `#2'=\@nameuse{ftype@#2}}%
+%    \end{macrocode}
+% Define |\fnum@|\meta{type}, a macro to generate the figure number for a caption
+%    \begin{macrocode}
+  \newfloat at def{fnum@#2}%
+   {\@nameuse{#2name}\nobreakspace\@nameuse{the#2}%
+    \ifdefined\autodot\expandafter\autodot\fi}%
+%    \end{macrocode}
+% Define |\|\meta{type}|name| used by |\fnum@|\meta{type} as \meta{type},
+% but with first letter capitalized
+%    \begin{macrocode}
+  \newfloat at capitalize\newfloat at Type{#2}%
+  \newfloat at let{#2name}{\newfloat at Type}%
+  \newfloat at def{fleg#2}{\@nameuse{#2name}}% legend naming (memoir)
+%    \end{macrocode}
+% Legend name in ToC (memoir document class)
+%    \begin{macrocode}
+  \newfloat at ifundefined{flegtoc#2}{\@namedef{flegtoc#2}##1{}}%
+%    \end{macrocode}
+% Define the floating environment\par
+% If the \class{tufte} document class is loaded,
+% |\@tufte at float| and |\end at tufte@float| will be used instead of
+% |\@float|, |\end at float|, |\@dblfloat|, and |\end at dblfloat|.\par
+% If the \class{beamer} document class is loaded,
+% |\beamer at float| and |\end at beamer@float| will be used.
+%    \begin{macrocode}
+  \ifcsname @tufte at float\endcsname
+    \newenvironment{#2}[1][htbp]%
+      {\begin{@tufte at float}[{##1}]{#2}{}}%
+      {\end{@tufte at float}}%
+    \newenvironment{#2*}[1][htbp]%
+      {\begin{@tufte at float}[{##1}]{#2}{star}}%
+      {\end{@tufte at float}}%
+  \else
+    \@ifclassloaded{beamer}{%
+      \newenvironment{#2}[1][]{\beamer at float{#2}}{\end at beamer@float}%
+    }{%
+      \newenvironment{#2}{\@float{#2}}{\end at float}%
+      \newenvironment{#2*}{\@dblfloat{#2}}{\end at dblfloat}%
+    }%
+  \fi
+%    \end{macrocode}
+% Define the listing command |\listof|\meta{type}(|e|)|s|
+% \changes{v1.1}{2013/04/27}{Definition of list hook added}
+%    \begin{macrocode}
+  \newfloat at def{listof#2}{\newfloat at listof{#2}}%
+  \newfloat at def{listof#2s}{\@nameuse{listof#2}}%
+  \newfloat at def{listof#2es}{\@nameuse{listof#2s}}%
+  \newfloat at def{newfloat at listof#2 at hook}{}%
+  \ifdefined\l at figure
+    \newfloat at let{l@#2}{\l at figure}%
+  \else
+    \newfloat at def{l@#2}{\@dottedtocline{1}{1.5em}{2.3em}}%
+  \fi
+  \edef\newfloat at tempa{List of \newfloat at Type s}%
+  \newfloat at let{list#2name}{\newfloat at tempa}%
+%    \end{macrocode}
+% We undefine |\fst@|\meta{environment} so the new environment
+% will not be recognized as defined by the \package{float} package.
+% (|\fst@|\meta{type} use to hold the float style, see \package{float} package
+% implementation for details.)
+%    \begin{macrocode}
+  \expandafter\let\csname fst@#2\endcsname\@undefined
+%    \end{macrocode}
+% Set default parameters
+%    \begin{macrocode}
+  \newfloat at ifundefined{fps@#2}{\newfloat at setplacement{#2}{tbp}}%
+  \newfloat at ifundefined{ext@#2}{\newfloat at setfileext{#2}{lo#2}}%
+%    \end{macrocode}
+% Apply given options
+%    \begin{macrocode}
+  \newfloat at setoptions*{#2}{#1}%
+%    \end{macrocode}
+% Announce the new floating environment to other packages
+%    \begin{macrocode}
+  \@expandtwoargs\newfloat at announce{#2}{\@nameuse{ext@#2}}%
+%    \end{macrocode}
+% Apply the last two optional arguments for setting names
+%    \begin{macrocode}
+  \@ifnextchar[\newfloat at DFE@setname\relax}
+\@onlypreamble\@DeclareFloatingEnvironment
+%    \end{macrocode}
+%    \begin{macrocode}
+\def\newfloat at DFE@setname[#1]{%
+  \KV@@newfloat at name{#1}%
+  \@ifnextchar[\newfloat at DFE@setlistname\relax}
+\@onlypreamble\newfloat at DFE@setname
+%    \end{macrocode}
+%    \begin{macrocode}
+\def\newfloat at DFE@setlistname[#1]{%
+  \KV@@newfloat at listname{#1}}
+\@onlypreamble\newfloat at DFE@setlistname
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\newfloat at capitalize}
+% \changes{v1.1}{2013/11/03}{Code extracted from \cs{DeclareFloatingEnvironment}}
+% \changes{v1.1}{2013/11/03}{Uses \cs{newfloat at tempa} instead of \cs{@tempa} now}
+% |\newfloat at capitalize|\marg{command}\marg{name}\\
+% Defines \meta{command} to \meta{name}, but with first letter capitalized.
+%    \begin{macrocode}
+\newcommand*\newfloat at capitalize[2]{%
+  \edef\newfloat at tempa{\gdef\noexpand#1{\@car#2\@nil}}%
+  \uppercase\expandafter{\newfloat at tempa}%
+  \edef\newfloat at tempa{%
+    \noexpand\g at addto@macro\noexpand#1{\@cdr#2\@nil}}%
+  \newfloat at tempa}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\newfloat at listof}
+% \changes{v1.1}{2013/04/27}{Revised}
+% \changes{v1.1g}{2019/08/28}{Starred variant added}
+% \changes{v1.1n}{2021/02/27}{Uses \cs{newfloat at ext} now instead of \cs{ext at xxx}}
+% |\newfloat at listof|\marg{float type}\\
+% typesets the list, using |\listoffigure| with patched list name and file extension.
+%    \begin{macrocode}
+\newcommand*\newfloat at listof[1]{%
+  \@ifstar
+    {\newfloat at list@of{#1}*}%
+    {\newfloat at list@of{#1}\relax}}
+%    \end{macrocode}
+%    \begin{macrocode}
+\newcommand*\newfloat at list@of[1]{%
+  \@expandtwoargs\newfloat at list@of@{#1}{\newfloat at ext{#1}}}
+%    \end{macrocode}
+%    \begin{macrocode}
+\newcommand*\newfloat at list@of@[3]{%
+  \begingroup
+    \expandafter\let\expandafter\listfigurename\csname list#1name\endcsname
+    \def\ext at figure{#2}%
+    \let\newfloat at starttoc\@starttoc
+    \def\@starttoc##1{\newfloat at starttoc{#2}}%
+    \let\newfloat at listoftoc\listoftoc
+    \def\listoftoc##1{\newfloat at listoftoc{#2}}%
+    \@nameuse{newfloat at listof#1 at hook}%
+    \listoffigures#3%
+  \endgroup}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\newfloat at setoptions}
+% |\newfloat at setoptions*|\marg{environment}\marg{options}
+%    \begin{macrocode}
+\newcommand*\newfloat at setoptions{%
+  \@ifstar
+    {\newfloat@@setoptions\@firstofone}%
+    {\newfloat@@setoptions\@gobble}}
+%    \end{macrocode}
+%    \begin{macrocode}
+\newcommand*\newfloat@@setoptions[3]{%
+  \let\newfloat at within@value\@undefined
+  \let\newfloat at chapterlistsgaps@value\@undefined
+  #1{\KV@@newfloat at within\newfloat at within@default}% set default value for new floats
+  \def\newfloat at type{#2}%
+  \setkeys{@newfloat}{#3}%
+  \ifx\newfloat at within@value\@undefined \else
+    \newfloat at setoption{within}\newfloat at within@value
+  \fi
+  \ifx\newfloat at chapterlistsgaps@value\@undefined \else
+    \newfloat at setoption{chapterlistsgaps}\newfloat at chapterlistsgaps@value
+  \fi}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\newfloat at within@default}
+%  The default `within' value.
+%  This one will be used if no option |within=|\meta{counter} is given.
+%    \begin{macrocode}
+\newcommand*\newfloat at within@default{%
+  \ifcsname c at chapter\endcsname chapter\else none\fi}
+\@onlypreamble\newfloat at within@default
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\newfloat at setoption}
+% \changes{v1.1}{2015/09/15}{\cs{@expandtwoargs} replaced by own expansion so the option value do not get expanded anymore}
+% \changes{v1.1m}{2020/10/11}{Usage of \cs{caption at tempa} replaced by \cs{newfloat at tempa}}
+% |\newfloat at setoption|\marg{option name}{options}
+%    \begin{macrocode}
+\newcommand*\newfloat at setoption[1]{%
+  \edef\newfloat at tempa{\noexpand\@nameuse{newfloat at set#1}{\newfloat at type}}%
+  \newfloat at tempa}
+%    \end{macrocode}
+% \end{macro}
+%
+% The available \meta{options} are:
+% |fileext=|\meta{file extension},
+% |listname=|\meta{list name},
+% |name=|\meta{prosa name},
+% |placement=|\meta{htbp},
+% |within=|\meta{none,chapter,section}, and
+% |without|.
+%
+% \begin{macro}{\newfloat at setfileext}
+% |\newfloat at setfileext|\marg{environment}\marg{file extension}
+%    \begin{macrocode}
+\newcommand*\newfloat at setfileext[2]{%
+  \@namedef{ext@#1}{#2}}
+%    \end{macrocode}
+%    \begin{macrocode}
+\define at key{@newfloat}{fileext}{%
+  \newfloat at setoption{fileext}{#1}}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\newfloat at setlistname}
+% |\newfloat at setlistname|\marg{environment}\marg{list name}
+%    \begin{macrocode}
+\newcommand*\newfloat at setlistname[2]{%
+  \@namedef{list#1name}{#2}}
+%    \end{macrocode}
+%    \begin{macrocode}
+\define at key{@newfloat}{listname}{%
+  \newfloat at setoption{listname}{#1}}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\newfloat at setname}
+% |\newfloat at setname|\marg{environment}\marg{name}
+%    \begin{macrocode}
+\newcommand*\newfloat at setname[2]{%
+  \newfloat@@setname{#1}{#2}%
+  \begingroup
+    \ifcsname languagename\endcsname
+      \ifcsname captions\languagename\endcsname
+        \expandafter\g at addto@macro\csname captions\languagename\endcsname
+          {\newfloat@@setname{#1}{#2}}%
+      \fi
+    \fi
+  \endgroup}
+%%\AtBeginDocument{\let\newfloat at setname\newfloat@@setname}
+%    \end{macrocode}
+%    \begin{macrocode}
+\newcommand*\newfloat@@setname[2]{%
+  \@namedef{#1name}{#2}}
+%    \end{macrocode}
+%    \begin{macrocode}
+\define at key{@newfloat}{name}{%
+  \newfloat at setoption{name}{#1}}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\newfloat at setplacement}
+% |\newfloat at setplacement|\marg{environment}\marg{float placement}
+%    \begin{macrocode}
+\newcommand*\newfloat at setplacement[2]{%
+  \@namedef{fps@#1}{#2}}
+%    \end{macrocode}
+%    \begin{macrocode}
+\define at key{@newfloat}{placement}{%
+  \newfloat at setoption{placement}{#1}}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\newfloat at setwithin}
+% |\newfloat at setwithin|\marg{environment}\marg{counter}\par
+% setup the counter for working ``within'' a given counter.
+% Furthermore the chapters lists gap will be switched on
+% (if counter $=$ |chapter|) or off (otherwise).
+%    \begin{macrocode}
+\newcommand*\newfloat at setwithin[2]{%
+  \ifcsname c at chapter\endcsname
+    \@removefromreset{#1}{chapter}%
+  \fi
+  \@removefromreset{#1}{section}%
+%    \end{macrocode}
+%    \begin{macrocode}
+  \edef\@tempa{#2}%
+  \ifx\@tempa\@empty
+    \def\@tempa{none}%
+  \fi
+  \def\@tempb{none}%
+  \ifx\@tempa\@tempb
+    \ifcsname c at chapter\endcsname
+      \@chapterlistsgap at off{#1}%
+    \fi
+    \newfloat@@setwithin{#1}{}{}%
+  \else
+    \def\@tempb{chapter}%
+    \ifx\@tempa\@tempb
+      \@addtoreset{#1}{chapter}%
+      \@chapterlistsgap at on{#1}%
+      \newfloat@@setwithin{#1}{\ifnum\c at chapter>\z@ \thechapter.\fi}{\theHchapter.}%
+    \else
+      \def\@tempb{section}%
+      \ifx\@tempa\@tempb
+        \@addtoreset{#1}{section}%
+        \ifcsname c at chapter\endcsname
+          \@addtoreset{#1}{chapter}%
+          \@chapterlistsgap at on{#1}%
+          \newfloat@@setwithin{#1}{\thesection.}{\theHsection.}%
+        \else
+          \newfloat@@setwithin{#1}{\ifnum\c at section>\z@ \thesection.\fi}{\theHsection.}%
+        \fi
+      \else
+        \newfloat at Error{Invalid value `#2' for option `within'}%
+      \fi
+    \fi
+  \fi}
+%    \end{macrocode}
+% Note: Since the \package{hyperref} package with version $<$ 6.82k defines
+% |\the|\-|H|\-|figure| and |\the|\-|H|\-|table| with |\new|\-|command|,
+% |\newfloat@@setwithin| will yield to an error message when using with an
+% old version of \package{hyperref},
+% e.g. ``\texttt{LaTeX Error: Command \cs{theHfigure} already defined}''.
+%    \begin{macrocode}
+\newcommand*\newfloat@@setwithin[3]{%
+  \global\@namedef{the#1}{#2\arabic{#1}}%
+  \global\@namedef{theH#1}{#3\arabic{#1}}}
+%    \end{macrocode}
+%    \begin{macrocode}
+\define at key{@newfloat}{within}{%
+  \def\newfloat at within@value{#1}}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\newfloat at setwithout}
+% |\newfloat at setwithout|\marg{environment}
+%    \begin{macrocode}
+\newcommand*\newfloat at setwithout[1]{%
+  \newfloat at setwithin{#1}{none}}
+%    \end{macrocode}
+%    \begin{macrocode}
+\define at key{@newfloat}{without}[]{%
+  \def\newfloat at within@value{none}}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\newfloat at setchapterlistsgaps}
+% |\newfloat at setchapterlistsgaps|\marg{environment}\marg{on/off}
+%    \begin{macrocode}
+\newcommand*\newfloat at setchapterlistsgaps[2]{%
+  \edef\@tempa{#2}%
+  \newfloat at setchapterlistsgaps@{off}{off}{#1}%
+  \newfloat at setchapterlistsgaps@{false}{off}{#1}%
+  \newfloat at setchapterlistsgaps@{on}{on}{#1}%
+  \newfloat at setchapterlistsgaps@{true}{on}{#1}%
+  \ifx\@tempa\newfloat at setchapterlistsgaps@ \else
+    \newfloat at Error{Invalid value `#2' for option `chapterlistsgaps'}%
+  \fi}
+%    \end{macrocode}
+%    \begin{macrocode}
+\newcommand*\newfloat at setchapterlistsgaps@[3]{%
+  \def\@tempb{#1}%
+  \ifx\@tempa\@tempb
+    \newfloat at chapterlistsgap@{#2}{#3}%
+    \let\@tempa\newfloat at setchapterlistsgaps@
+  \fi}
+%    \end{macrocode}
+%    \begin{macrocode}
+\newcommand*\newfloat at chapterlistsgap@[1]{%
+  \@ifundefined{@chapterlistsgap@#1}%
+    {\@gobble}%
+    {\@nameuse{@chapterlistsgap@#1}}}
+%    \end{macrocode}
+%    \begin{macrocode}
+\define at key{@newfloat}{chapterlistsgaps}{%
+  \def\newfloat at chapterlistsgaps@value{#1}}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@removefromreset}
+% This code was taken from the \package{remreset} package
+% which is part of the `carlisle' package bundle.
+% (Copyright 1997 David Carlisle)
+%    \begin{macrocode}
+\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}}}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\newfloat at announce}
+% \changes{v1.1n}{2021/02/27}{Defines \cs{newfloat at env@xxx} now instead of \cs{newfloat at ext@xxx}}
+% |\newfloat at announce|\marg{environment name}\marg{list file extension}
+%    \begin{macrocode}
+\newcommand*\newfloat at announce[2]{%
+%    \end{macrocode}
+%    \begin{macrocode}
+  \@cons\newfloat at list{{#1}}%
+  \@cons\newfloat@@list{{#1}}%
+%    \end{macrocode}
+%    \begin{macrocode}
+  \newfloat at ifundefined{newfloat at env@#2}{%
+    \@namedef{newfloat at env@#2}{#1}%
+%    \end{macrocode}
+% Support of \package{memoir} document class
+%    \begin{macrocode}
+    \ifcsname c at lofdepth\endcsname
+      \newfloat at ifundefined{c@#2depth}{%
+        \newcounter{#2depth}%
+        \setcounter{#2depth}{1}}%
+    \fi
+%    \end{macrocode}
+% Support of \package{tocbasic} package
+%    \begin{macrocode}
+    \ifcsname addtotoclist\endcsname
+      \addtotoclist[float]{#2}%
+      \newfloat at def{listof#2name}{\@nameuse{list#1name}}%
+    \fi
+%    \end{macrocode}
+%    \begin{macrocode}
+  }%
+%    \end{macrocode}
+% Support of \package{titletoc} package
+%    \begin{macrocode}
+  \ifcsname contentsuse\endcsname
+    \contentsuse{#1}{#2}%
+  \fi
+%    \end{macrocode}
+%    \begin{macrocode}
+  \newfloat at hook{#1}}
+\@onlypreamble\newfloat at announce
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\newfloat at ext}
+% \changes{v1.1n}{2021/02/27}{This macro added}
+% |\newfloat at ext|\marg{environment}
+% expands to the file extension used for the given \meta{environment}.
+%    \begin{macrocode}
+\newcommand*\newfloat at ext[1]{\@nameuse{ext@#1}}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\newfloat@@list}
+% |\newfloat@@list| is an \cs{@elt}-list containing the floating environments defined
+% with |\Declare|\-|Floating|\-|Environment| only.
+%    \begin{macrocode}
+\newcommand*\newfloat@@list{}
+%    \end{macrocode}
+% \end{macro}
+%
+% \pagebreak[3]
+% \subsection{\cs{SetupFloatingEnvironment}}
+%
+% \begin{macro}{\SetupFloatingEnvironment}
+% |\SetupFloatingEnvironment|\marg{environment}\marg{options}
+%    \begin{macrocode}
+\newcommand*\SetupFloatingEnvironment[1]{%
+  \newfloat at addtolist{#1}%
+  \newfloat at setoptions{#1}}
+%    \end{macrocode}
+% \end{macro}
+%
+% \pagebreak[3]
+% \subsection{\cs{ForEachFloatingEnvironment}}
+%
+% \begin{macro}{\ForEachFloatingEnvironment}
+% |\ForEachFloatingEnvironment|\marg{code with \#1}\par
+% will execute the given code for each (known) floating environment.
+% The starred variant will only work for already existing environments,
+% i.e.~no hook will be placed inside |\Declare|\-|Floating|\-|Environment|.
+%    \begin{macrocode}
+\newcommand*\ForEachFloatingEnvironment{%
+  \@ifstar
+    {\newfloat at foreach\@gobble}%
+    {\newfloat at foreach\@iden}}
+%    \end{macrocode}
+%    \begin{macrocode}
+\newcommand\newfloat at foreach[2]{%
+  \def\@elt##1{#2}%
+  \newfloat at list
+  \let\@elt\relax
+  #1{\newfloat at addtohook{#2}}}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\newfloat at addtohook}
+% |\newfloat at addtohook|\marg{code with \#1}\par
+% adds code to the hook called in |\Declare|\-|Floating|\-|Environment|.\par
+% Note: We use |\provide|\-|command| instead of |\new|\-|command| here since the
+% exact same code is defined for |\For|\-|Each|\-|Caption|\-|Type| offered by
+% the \package{caption3} package.
+%    \begin{macrocode}
+\providecommand\newfloat at addtohook[1]{%
+  \toks@=\expandafter{\newfloat at hook{##1}#1}%
+  \edef\@tempa{\def\noexpand\newfloat at hook####1{\the\toks@}}%
+  \@tempa}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\newfloat at hook}
+% Hook used in |\Declare|\-|Floating|\-|Environment|.
+%    \begin{macrocode}
+\providecommand*\newfloat at hook[1]{}
+%    \end{macrocode}
+% \end{macro}
+%
+% \pagebreak[3]
+% \subsection{\cs{PrepareListOf}}
+%
+% \begin{macro}{\PrepareListOf}
+% \changes{v1.1}{2013/04/27}{This macro added}
+% |\PrepareListOf|\marg{float type}\marg{code}\\
+% adds \meta{code} to the one which prepares typesetting the list,
+% just before |\listoffigures|.
+%    \begin{macrocode}
+\newcommand\PrepareListOf[1]{%
+  \expandafter\g at addto@macro\csname newfloat at listof#1 at hook\endcsname}
+\@onlypreamble\PrepareListOf
+%    \end{macrocode}
+% \end{macro}
+%
+% \pagebreak[3]
+% \subsection{The list of floating environments}
+%
+% \begin{macro}{\newfloat at list}
+% |\newfloat at list| is an \cs{@elt}-list containing the already existising floating
+% environments as well the ones defined with |\Declare|\-|Floating|\-|Environment|.
+%    \begin{macrocode}
+\newcommand*\newfloat at list{}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\newfloat at addtolist}
+% \changes{v1.0b}{2012/05/18}{Bugfix: Definition of \cs{@ifchapterlistsgap@}\meta{environment} added}
+% \changes{v1.1n}{2021/02/27}{Defines \cs{newfloat at env@xxx} now instead of \cs{newfloat at ext@xxx}}
+% |\newfloat at addtolist|\marg{environment}
+% adds an environment to the list of floating environments.
+%    \begin{macrocode}
+\newcommand*\newfloat at addtolist[1]{%
+  \newfloat at ifinlist{#1}{}{%
+    \ifcsname ext@#1\endcsname
+      \@cons\newfloat at list{{#1}}%
+      \@namedef{newfloat at env@\@nameuse{ext@#1}}{#1}%
+      \newfloat at let{@ifchapterlistsgap@#1}{\@iden}%
+    \else
+      \newfloat at Error{`#1' does not seem to be a floating environment}%
+    \fi}}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\newfloat at ifinlist}
+% |\newfloat at ifinlist|\marg{environment}\marg{yes code}\marg{no code}
+% tests if an environment is an element of the list of floating environments.
+%    \begin{macrocode}
+\newcommand*\newfloat at ifinlist[1]{%
+  \let\next\@secondoftwo
+  \begingroup
+    \expandafter\let\csname c@#1\endcsname\newfloat at ifinlist
+    \def\@elt##1{%
+      \expandafter\ifx\csname c@##1\endcsname\newfloat at ifinlist
+        \global\let\next\@firstoftwo
+      \fi}%
+    \newfloat at list
+  \endgroup
+  \next}
+%    \end{macrocode}
+% \end{macro}
+%
+% Add |figure| and |table| to the list of floating environments.
+%    \begin{macrocode}
+\ifcsname ext at figure\endcsname
+  \newfloat at addtolist{figure}
+\fi
+\ifcsname ext at table\endcsname
+  \newfloat at addtolist{table}
+\fi
+%    \end{macrocode}
+%
+% \pagebreak[3]
+% \subsection{Chapter lists gaps}
+%
+%    \begin{macrocode}
+\ifcsname @chapter\endcsname
+%    \end{macrocode}
+%
+% \begin{macro}{\@chapterlistsgap}
+% The amount of the chapter lists gap, the default one is |10pt|.
+% (This command is already defined in \KOMAScript.)
+%    \begin{macrocode}
+  \providecommand*\@chapterlistsgap{10\p@}%
+%    \end{macrocode}
+% If the \package{dgruyter} package is loaded, the default gap is |13pt|.
+%    \begin{macrocode}
+  \@ifpackageloaded{dgruyter}{\renewcommand*\@chapterlistsgap{13\p@}}{}%
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@addchapterlistsgap}
+% |\@addchapterlistsgap|\marg{float type}\marg{file extension}\par
+% will add the chapter lists gap for the given float type.
+%    \begin{macrocode}
+  \providecommand*\@addchapterlistsgap[2]{%
+    \@nameuse{@ifchapterlistsgap@#1}{% if switched on
+      \@@addchapterlistsgap{#1}{#2}}}
+%    \end{macrocode}
+%    \begin{macrocode}
+  \providecommand*\@@addchapterlistsgap[2]{%
+    \@ifundefined{@addchapterlistsgap@#2}{% only once per extension
+      \@namedef{@addchapterlistsgap@#2}{#1}%
+      \@@@addchapterlistsgap{#2}}{}}
+%    \end{macrocode}
+%    \begin{macrocode}
+  \providecommand*\@@@addchapterlistsgap[1]{%
+    \ifdim \@chapterlistsgap>\z@
+      \addtocontents{#1}{\protect\addvspace{\@chapterlistsgap}}%
+    \fi}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@addchapterlistsgaps}
+% \changes{v1.0b}{2012/05/18}{Bugfix: Group added to make \cs{@addchapterlistsgap} work correctly}
+% \changes{v1.1n}{2021/02/27}{Uses \cs{newfloat at ext} now instead of \cs{ext at xxx}}
+% |\@addchapterlistsgaps|\par
+% will add the chapter lists gaps for all floating environments in |\newfloat at list|.
+%    \begin{macrocode}
+  \providecommand*\@addchapterlistsgaps{%
+    \begingroup
+      \def\@elt##1{%
+        \@expandtwoargs\@addchapterlistsgap{##1}{\newfloat at ext{##1}}}%
+      \newfloat at list
+    \endgroup}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@chapterlistsgap at off}
+% \changes{v1.1n}{2021/02/27}{Uses \cs{newfloat at ext} now instead of \cs{ext at xxx}}
+% |\@chapterlistsgap at off|\marg{float type}\par
+% switches the chapter lists gap off for the given float type.
+% Since \KOMAScript{} (still) supports |\float at exts| we need to handle
+% this locally, too, even if |\unsettoc| is offered by the \package{tocbasic} package.
+% (Otherwise our handling could be moved into the |\else| branch.)
+%    \begin{macrocode}
+  \providecommand*\@chapterlistsgap at off[1]{%
+    \expandafter\let\csname @ifchapterlistsgap@#1\endcsname\@gobble
+    \ifcsname unsettoc\endcsname
+      \@expandtwoargs\unsettoc{\newfloat at ext{#1}}{chapteratlist}%
+    \fi}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@chapterlistsgap at on}
+% \changes{v1.1n}{2021/02/27}{Uses \cs{newfloat at ext} now instead of \cs{ext at xxx}}
+% |\@chapterlistsgap at off|\marg{float type}\par
+% switches the chapter lists gap on for the given float type.
+%    \begin{macrocode}
+  \providecommand*\@chapterlistsgap at on[1]{%
+    \expandafter\let\csname @ifchapterlistsgap@#1\endcsname\@iden
+    \ifcsname setuptoc\endcsname
+      \@expandtwoargs\setuptoc{\newfloat at ext{#1}}{chapteratlist}%
+    \fi}
+%    \end{macrocode}
+% \end{macro}
+%
+%    \begin{macrocode}
+\fi
+%    \end{macrocode}
+%
+% \pagebreak[3]
+% \subsection{Global options}
+%
+% \begin{macro}{chapterlistsgap=}
+% The |chapterlistsgap=| option sets the vertical skip added to each list when
+% starting a new chapter.
+%    \begin{macrocode}
+\define at key{newfloat}{chapterlistsgap}{%
+  \renewcommand*\@chapterlistsgap{#1}}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{within=}
+% The |within=| option redefines the default value and modifies all
+% existing floating environments.
+%    \begin{macrocode}
+\define at key{newfloat}{within}{%
+  \def\newfloat at within@default{#1}% set new default value
+  \def\@elt##1{\newfloat at setwithin{##1}{#1}}%
+  \newfloat at list
+  \let\@elt\relax}
+%    \end{macrocode}
+%    \begin{macrocode}
+\define at key{newfloat}{without}[]{%
+  \KV at newfloat@within{none}}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{figurename=}
+% \begin{macro}{listfigurename=}
+% \begin{macro}{figurewithin=}
+% We define these options not only for |figure| but for all existing floating environments.
+%    \begin{macrocode}
+\def\@elt#1{%
+  \define at key{newfloat}{#1name}{%
+    \newfloat at setname{#1}{##1}}%
+  \define at key{newfloat}{list#1name}{%
+    \newfloat at setname{list#1}{##1}}%
+  \define at key{newfloat}{#1within}{%
+    \newfloat at setwithin{#1}{##1}}%
+  \define at key{newfloat}{#1without}[]{%
+    \newfloat at setwithout{#1}}%
+}%
+\newfloat at list
+\let\@elt\relax
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{planb=}
+% \changes{v1.0b}{2012/05/18}{This option added}
+% This option switches the `Plan B' on or off. (default$=$true)
+%    \begin{macrocode}
+\define at key{newfloat}{planb}[true]{%
+  \def\@tempa{#1}%
+  \def\@tempb{false}%
+  \ifx\@tempa\@tempb
+    \let\newfloat at ifplanb\@gobble
+  \else
+    \def\@tempb{true}%
+    \ifx\@tempa\@tempb
+      \let\newfloat at ifplanb\@iden
+    \else
+      \newfloat at Error{Invalid value `#1' for option `planb'}%
+    \fi
+  \fi}
+%    \end{macrocode}
+% \end{macro}
+% \begin{macro}{planb-filext=}
+% \changes{v1.0b}{2012/05/19}{This option added}
+% This option sets the file extension used for `Plan B'.
+% (default$=$use the 1st one which seem to fit)
+%    \begin{macrocode}
+\define at key{newfloat}{planb-fileext}{%
+  \newfloat at Info{Setting Plan B file extension to `#1'}
+  \xdef\newfloat at addtocontents@ext{#1}}
+%    \end{macrocode}
+% \end{macro}
+%
+% Process the package options:
+% We use |\set|\-|keys| here instead of |\Process|\-|Options|.
+%    \begin{macrocode}
+\let\@tempc\relax
+\@expandtwoargs\setkeys{newfloat}{planb,\@ptionlist{\@currname.\@currext}}%
+\AtEndOfPackage{\let\@unprocessedoptions\relax}
+%    \end{macrocode}
+%
+% \begin{macro}{\newfloatsetup}
+% |\newfloatsetup|\marg{options}
+% sets global options after loading the package.
+%    \begin{macrocode}
+\newcommand*\newfloatsetup{\setkeys{newfloat}}
+%    \end{macrocode}
+% \end{macro}
+%
+% \pagebreak[3]
+% \subsection{Patching \cs{chapter}}
+%
+% \begin{macro}{\newfloat at replace@chapter}
+% \changes{v1.1f}{2019/08/25}{Parameter \meta{class name} added to macro}
+% \changes{v1.1i}{2019/08/31}{Local definition of \cs{if at chapnum} added}
+% \changes{v1.1o}{2021/02/27}{Support of the \package{algorithm2e} package added}
+%   |\newfloat at replace@chapter|\marg{class name}\marg{original code}\marg{replacement code}\par
+%   tries to patch |\@chapter| so |\@add|\-|chapter|\-|lists|\-|gaps| will be supported.
+%   It checks for |\Hy at org@chapter|, too, since the original code will be stored here
+%   if the \package{hyperref} package was loaded.
+%    \begin{macrocode}
+\newcommand\newfloat at replace@chapter[3]{%
+  \begingroup
+    \let\if at twocolumn\iffalse
+    \let\if at mainmatter\iffalse
+    \let\if at thema\iffalse
+    \let\if at chapnum\iffalse
+    \def\@tempa[##1]##2{#2}%
+    \newfloat at replace@chapter@\@chapter{original}{#1}{#3}%
+    \newfloat at replace@chapter@\Hy at org@chapter{hyperref}{#1}{#3}%
+    \newfloat at replace@chapter@\algocf at original@chapter{algorithm2e}{#1}{#3}%
+  \endgroup}
+%    \end{macrocode}
+%    \begin{macrocode}
+\newcommand\newfloat at replace@chapter@[4]{%
+  \ifx\@tempa#1%
+    \newfloat at InfoNoLine{Document class `#3' detected (#2)}%
+    \global\def#1[##1]##2{#4}%
+    \global\let\newfloat at replace@chapter\newfloat at dont@replace at chapter
+    \global\let\newfloat at replace@chapter@\@gobblefour
+  \fi}
+%    \end{macrocode}
+%    \begin{macrocode}
+\newcommand\newfloat at dont@replace at chapter[3]{}
+%    \end{macrocode}
+%    \begin{macrocode}
+\ifcsname @chapter\endcsname \else
+  \let\newfloat at replace@chapter\newfloat at dont@replace at chapter
+\fi
+%    \end{macrocode}
+% \end{macro}
+%
+% \pagebreak[3]
+% \subsubsection{Standard \LaTeX{} document classes}
+%
+%    \begin{macrocode}
+% report.cls [2005/09/16 v1.4f Standard LaTeX document class]
+\newfloat at replace@chapter{report}{%
+  \ifnum \c at secnumdepth >\m at 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 at twocolumn
+    \@topnewpage[\@makechapterhead{#2}]%
+  \else
+    \@makechapterhead{#2}%
+    \@afterheading
+  \fi
+}{%
+  \ifnum \c at secnumdepth >\m at ne
+    \refstepcounter{chapter}%
+    \typeout{\@chapapp\space\thechapter.}%
+    \addcontentsline{toc}{chapter}%
+      {\protect\numberline{\thechapter}#1}%
+  \else
+    \addcontentsline{toc}{chapter}{#1}%
+  \fi
+  \chaptermark{#1}%
+  \@addchapterlistsgaps
+  \if at twocolumn
+    \@topnewpage[\@makechapterhead{#2}]%
+  \else
+    \@makechapterhead{#2}%
+    \@afterheading
+  \fi}
+%    \end{macrocode}
+%
+%    \begin{macrocode}
+% book.cls [2005/09/16 v1.4f Standard LaTeX document class]
+\newfloat at replace@chapter{book}{%
+  \ifnum \c at secnumdepth >\m at ne
+    \if at 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 at twocolumn
+    \@topnewpage[\@makechapterhead{#2}]%
+  \else
+    \@makechapterhead{#2}%
+    \@afterheading
+  \fi
+}{%
+  \ifnum \c at secnumdepth >\m at ne
+    \if at 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 at twocolumn
+    \@topnewpage[\@makechapterhead{#2}]%
+  \else
+    \@makechapterhead{#2}%
+    \@afterheading
+  \fi}
+%    \end{macrocode}
+%
+% \pagebreak[3]
+% \subsubsection{\AmS{} \& \SmF{} document classes}
+%
+%    \begin{macrocode}
+% amsbook.cls [2004/08/06 v2.20]
+% smfbook.cls [1999/11/15 v1.2f Classe LaTeX pour les monographies editees par la SMF]
+\newfloat at replace@chapter{amsbook}{%
+  \refstepcounter{chapter}%
+  \ifnum\c at 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 at 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}
+%    \end{macrocode}
+%
+% \pagebreak[3]
+% \subsubsection{\KOMAScript{} document classes}
+%
+% If a \KOMAScript{} document class or the \package{tocbasic} package is used
+% we don't need to patch anything.
+% Instead we use |\setup|\-|toc| and |\un|\-|set|\-|toc| to setup the
+% chapters gap in |\@chapter|\-|lists|\-|gap at on| and |\@chapter|\-|lists|\-|gap at off|.
+%    \begin{macrocode}
+\@ifpackageloaded{tocbasic}{%
+  \let\newfloat at replace@chapter\newfloat at dont@replace at chapter}{}
+%    \end{macrocode}
+%
+% \pagebreak[3]
+% \subsubsection{memoir document classes}
+%
+% If the \package{memoir} document class is used,
+% replacing |\insert|\-|chapter|\-|space| by |\@add|\-|chapter|\-|lists|\-|gaps| is sufficient.
+%    \begin{macrocode}
+\ifcsname insertchapterspace\endcsname
+  \renewcommand*\insertchapterspace{\@addchapterlistsgaps}
+  \let\newfloat at replace@chapter\newfloat at dont@replace at chapter
+\fi
+%    \end{macrocode}
+%
+% \pagebreak[3]
+% \subsubsection{NTG document classes}
+%
+%    \begin{macrocode}
+% rapport1/3.cls [2004/06/07 v2.1a NTG LaTeX document class]
+\newfloat at replace@chapter{rapport}{%
+  \ifnum \c at secnumdepth >\m at ne
+    \refstepcounter{chapter}%
+    \typeout{\@chapapp\space\thechapter.}%
+    \addcontentsline{toc}{chapter}%
+      {\protect\numberline{\thechapter}\toc at font0 #1}%
+  \else
+    \addcontentsline{toc}{chapter}{\toc at font0 #1}%
+  \fi
+  \chaptermark{#1}%
+  \addtocontents{lof}{\protect\addvspace{10\p@}}%
+  \addtocontents{lot}{\protect\addvspace{10\p@}}%
+  \if at twocolumn
+    \@topnewpage[\@makechapterhead{#2}]%
+  \else
+    \@makechapterhead{#2}%
+    \@afterheading
+  \fi
+}{%
+  \ifnum \c at secnumdepth >\m at ne
+    \refstepcounter{chapter}%
+    \typeout{\@chapapp\space\thechapter.}%
+    \addcontentsline{toc}{chapter}%
+      {\protect\numberline{\thechapter}\toc at font0 #1}%
+  \else
+    \addcontentsline{toc}{chapter}{\toc at font0 #1}%
+  \fi
+  \chaptermark{#1}%
+  \@addchapterlistsgaps
+  \if at twocolumn
+    \@topnewpage[\@makechapterhead{#2}]%
+  \else
+    \@makechapterhead{#2}%
+    \@afterheading
+  \fi}
+%    \end{macrocode}
+%    \begin{macrocode}
+% boek(3).cls [2004/06/07 v2.1a NTG LaTeX document class]
+\newfloat at replace@chapter{boek}{%
+  \ifnum \c at secnumdepth >\m at ne
+    \if at mainmatter
+      \refstepcounter{chapter}%
+      \typeout{\@chapapp\space\thechapter.}%
+      \addcontentsline{toc}{chapter}%
+        {\protect\numberline{\thechapter}\toc at font0 #1}%
+    \else
+      \addcontentsline{toc}{chapter}{\toc at font0 #1}%
+    \fi
+  \else
+    \addcontentsline{toc}{chapter}{\toc at font0 #1}%
+  \fi
+  \chaptermark{#1}%
+  \addtocontents{lof}{\protect\addvspace{10\p@}}%
+  \addtocontents{lot}{\protect\addvspace{10\p@}}%
+  \if at twocolumn
+    \@topnewpage[\@makechapterhead{#2}]%
+  \else
+    \@makechapterhead{#2}%
+    \@afterheading
+  \fi
+}{%
+  \ifnum \c at secnumdepth >\m at ne
+    \if at mainmatter
+      \refstepcounter{chapter}%
+      \typeout{\@chapapp\space\thechapter.}%
+      \addcontentsline{toc}{chapter}%
+        {\protect\numberline{\thechapter}\toc at font0 #1}%
+    \else
+      \addcontentsline{toc}{chapter}{\toc at font0 #1}%
+    \fi
+  \else
+    \addcontentsline{toc}{chapter}{\toc at font0 #1}%
+  \fi
+  \chaptermark{#1}%
+  \@addchapterlistsgaps
+  \if at twocolumn
+    \@topnewpage[\@makechapterhead{#2}]%
+  \else
+    \@makechapterhead{#2}%
+    \@afterheading
+  \fi}
+%    \end{macrocode}
+%
+% \pagebreak[3]
+% \subsubsection{The thesis document class}
+%
+%    \begin{macrocode}
+% thesis.cls [1996/25/01 1.0g LaTeX document class (wm).]
+\newfloat at replace@chapter{thesis}{%
+  \ifnum \c at secnumdepth >\m at ne
+    \if at mainmatter
+      \refstepcounter{chapter}%
+      \typeout{\chaptername\space\thechapter.}
+      \if at 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 at twocolumn
+    \@topnewpage[\@makechapterhead{#2}]
+  \else
+    \@makechapterhead{#2}
+    \@afterheading
+  \fi
+}{%
+  \ifnum \c at secnumdepth >\m at ne
+    \if at mainmatter
+      \refstepcounter{chapter}%
+      \typeout{\chaptername\space\thechapter.}%
+      \if at 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 at twocolumn
+    \@topnewpage[\@makechapterhead{#2}]%
+  \else
+    \@makechapterhead{#2}%
+    \@afterheading
+  \fi}
+%    \end{macrocode}
+%
+% \pagebreak[3]
+% \subsubsection{The Springer Verlag document classes}
+% \changes{v1.1f}{2019/08/25}{Support of \package{svmono} and \package{svmult} document classes added}
+%
+%    \begin{macrocode}
+% svmono.cls [2018/06/25 v5.6 Springer Verlag global LaTeX document class for monographs]
+% svmult.cls [2018/01/11 v5.5 Springer Verlag global LaTeX document class for multi authored books]
+\newfloat at replace@chapter{svmono}{%
+  \if at chapnum  % war mal \ifnum \c at secnumdepth >\m at ne
+    \refstepcounter{chapter}%
+    \if at 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 at twocolumn
+    \@topnewpage[\@makechapterhead{#2}]%
+  \else
+    \@makechapterhead{#2}%
+    \@afterheading
+  \fi
+}{%
+  \if at chapnum  % war mal \ifnum \c at secnumdepth >\m at ne
+    \refstepcounter{chapter}%
+    \if at 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 at twocolumn
+    \@topnewpage[\@makechapterhead{#2}]%
+  \else
+    \@makechapterhead{#2}%
+    \@afterheading
+  \fi}
+%    \end{macrocode}
+%
+% \pagebreak[3]
+% \subsubsection{The dgruyter package}
+% \changes{v1.1j}{2019/08/31}{Extended support of \package{dgruyter} package added}
+%
+%    \begin{macrocode}
+% dgruyter.sty [2017/09/19 v2.00 De Gruyter layout]
+\newfloat at replace@chapter{dgruyter}{%
+  \let\thesection\theinchapsection
+  \let\theequation\theinchapequation
+  \let\thefigure\theinchapfigure
+  \let\thetable\theinchaptable
+  \ifx\bookDOI\@undefined
+  \else
+    \@tempcnta\numexpr\componentd at i+\@ne\relax
+    \xdef\componentd at 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 at i}%
+  \fi
+  \ifnum \c at secnumdepth >\m at ne
+    \if at 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 at 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 at i+\@ne\relax
+    \xdef\componentd at 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 at i}%
+  \fi
+  \ifnum \c at secnumdepth >\m at ne
+    \if at 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 at twocolumn
+    \@topnewpage[\@makechapterhead{#2}]%
+  \else
+    \@makechapterhead{#2}%
+    \@afterheading
+  \fi}
+%    \end{macrocode}
+%
+% \pagebreak[3]
+% \subsubsection{Compatibility warning}
+%
+%    \begin{macrocode}
+\ifx\newfloat at replace@chapter\newfloat at dont@replace at chapter \else
+%    \end{macrocode}
+% If we were not able to patch |\@chapter| an info message is issued
+% since we may not be able to support chapter lists gaps then.
+%    \begin{macrocode}
+  \newfloat at InfoNoLine{%
+    Unsupported document class, or \noexpand\@chapter\MessageBreak
+    was already redefined by another package}
+  \newfloat at InfoNoLine{\string\@chapter\space=\space\meaning\@chapter}
+  \newfloat at InfoNoLine{\string\Hy at org@chapter\space=\space\meaning\Hy at org@chapter}
+  \newfloat at InfoNoLine{\string\algocf at original@chapter\space=\space\meaning\algocf at original@chapter}
+%    \end{macrocode}
+% Plan B: We patch |\add|\-|to|\-|contents| instead, and keep our fingers crossed
+% in the hope that this redefinition actually will fit.
+% (Note: Since \package{biblatex} patches |\add|\-|to|\-|contents| as well we do
+% this using |\At||Begin||Document|.)
+% \changes{v1.1f}{2019/08/25}{Plan B will now be done using \cs{AtBeginDocument}}
+%    \begin{macrocode}
+  \newfloat at ifplanb{\AtBeginDocument{%
+    \newfloat at InfoNoLine{Trying Plan B..}%
+    \let\newfloat at addtocontents@ORI\addtocontents
+    \long\def\addtocontents#1#2{%
+      \newfloat at addtocontents{#1}{#2}#2\addvspace\newfloat at nil}%
+    \long\def\newfloat at addtocontents#1#2#3\addvspace#4\newfloat at nil{%
+      \def\newfloat at tempa{#4}%
+      \ifx\newfloat at tempa\@empty
+        \newfloat at addtocontents@ORI{#1}{#2}%
+      \else
+        \ifx\newfloat at addtocontents@ext\@undefined
+          \newfloat at Info{Setting Plan B file extension to `#1'...}%
+          \xdef\newfloat at addtocontents@ext{#1}%
+        \fi
+        \edef\newfloat at tempa{#1}%
+        \ifx\newfloat at tempa\newfloat at addtocontents@ext
+          \begingroup
+            \let\addtocontents\newfloat at addtocontents@ORI
+            \@addchapterlistsgaps
+          \endgroup
+        \fi
+      \fi}}}
+%    \end{macrocode}
+%    \begin{macrocode}
+\fi
+%    \end{macrocode}
+%
+% \pagebreak[3]
+% \subsection{Support of document classes}
+%
+% \subsubsection{The beamer document class}
+%
+% \begin{macro}{\beamer at float}
+% \changes{v1.1k}{2019/09/01}{This macro added}
+% Unfortunately the \class{beamer} document class does not offer
+% |\beamer at float| and |\end at beamer@float| (yet), so we have to define them
+% for ourself.
+% (This code was taken from beamerbaselocalstructure.sty [2019/07/23 v3.56] and adapted.)
+%    \begin{macrocode}
+\ifcsname beamer at float\endcsname \else
+%    \end{macrocode}
+%    \begin{macrocode}
+  \def\beamer at float#1{%
+    \ifcsname caption at settype\endcsname
+      \caption at settype{#1}%
+    \else
+      \def\@captype{#1}%
+    \fi
+    \par\nobreak\begin{center}\nobreak}
+%    \end{macrocode}
+%    \begin{macrocode}
+  \def\end at beamer@float{%
+    \par\nobreak\end{center}}
+%    \end{macrocode}
+%    \begin{macrocode}
+\fi
+%    \end{macrocode}
+% \end{macro}
+%
+% \pagebreak[3]
+% \subsection{Support of other packages}
+%
+% \begin{macro}{\newfloat at IfPackageLoaded}
+% \changes{v1.1e}{2019/03/17}{This macro revised}
+% \changes{v1.1h}{2019/08/31}{This macro revised again and renamed from \cs{newfloat at ForEachNew} to \cs{newfloat at IfPackageLoaded}}
+% |\newfloat at IfPackageLoaded|\marg{package name}\marg{command}\marg{code}
+% will execute the given code for every floating environment defined with
+% |\Declare|\-|Floating|\-|Environment| if \meta{command} is not defined yet.
+% (If \meta{command} is already defined a warning will be issued.)
+% This will be tried |\At|\-|Begin|\-|Document| additionally so the affected package could
+% be loaded after \thispackage.
+%    \begin{macrocode}
+\newcommand\newfloat at IfPackageLoaded[3]{%
+  \@ifpackageloaded{#1}{%
+    \newfloat@@IfPackageLoaded{#1}{#2}{#3}%
+  }{%
+    \AtBeginDocument{%
+      \@ifpackageloaded{#1}{%
+        \newfloat@@IfPackageLoaded{#1}{#2}{#3}%
+      }{}}%
+  }}
+\@onlypreamble\newfloat at IfPackageLoaded
+%    \end{macrocode}
+%    \begin{macrocode}
+\newcommand\newfloat@@IfPackageLoaded[3]{%
+  \newfloat at 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 at addtohook{\newfloat@@@IfPackageLoaded{#1}{#2}{#3}}}
+\@onlypreamble\newfloat@@IfPackageLoaded
+%    \end{macrocode}
+%    \begin{macrocode}
+\newcommand\newfloat@@@IfPackageLoaded[3]{%
+  \ifcsname#2\endcsname
+    \newfloat at WarningNoLine{%
+      Command \@backslashchar#2 already defined.\MessageBreak
+      (`#1' package support)}%
+  \else
+    #3%
+  \fi}
+\@onlypreamble\newfloat@@@IfPackageLoaded
+%    \end{macrocode}
+% \end{macro}
+%
+% \pagebreak[3]
+% \subsubsection{\package{dgruyter}}
+%
+% The De Gruyter layout package (for preparing books for Walter de Gruyter GmbH)
+% is defining |\plist at figure| and |\plist at table|, and expects this to be
+% defined for other floating environments as well.
+% (This will be used as prefix for the ``List of''.)
+%    \begin{macrocode}
+\newfloat at IfPackageLoaded{dgruyter}{plist@#1}{%
+  \expandafter\newcommand\csname plist@#1\endcsname{%
+    \@nameuse{#1name}\space}}
+%    \end{macrocode}
+%
+% \pagebreak[3]
+% \subsubsection{\package{float}}
+%
+% If the \package{float} package is used we fill up |\float at exts| with our file
+% extensions, too. Since this list will be used for inserting chapters gaps
+% we only add the ones which are configured for chapters gaps on.\par
+% Note: This has to be done |\At|\-|Begin|\-|Document| so the settings for
+% chapter gaps could be changed by the user within the preamble of the document.
+%    \begin{macrocode}
+\AtBeginDocument{%
+  \ifcsname float at exts\endcsname
+    \newfloat@@IfPackageLoaded{float}{newfloat at undefined}{%
+      \@nameuse{@ifchapterlistsgap@#1}{% if switched on
+        \let\float at do=\relax
+        \edef\@tempa{%
+          \noexpand\float at exts{\the\float at exts\float at do{\@nameuse{ext@#1}}}}%
+        \@tempa}}%
+  \fi}
+%    \end{macrocode}
+%
+% \pagebreak[3]
+% \subsubsection{\package{fltpage}}
+%
+% We define a FP-variant of new floating environments here.
+%    \begin{macrocode}
+\newfloat at IfPackageLoaded{fltpage}{FP#1}{%
+  \newcounter{FP@#1C}%
+  \newenvironment{FP#1}{\FP at floatBegin{#1}}{\FP at floatEnd}}
+%    \end{macrocode}
+%
+% \pagebreak[3]
+% \subsubsection{\package{listings}}
+%
+% \begin{macro}{\ext at lstlisting}
+% Since the \package{listings} package do not define |\ext at lst|\-|listing|
+% but we needed it when |Setup|\-|Floating|\-|Environment{lst|\-|listing}{|\ldots|}|
+% will be done by the end user, we define it here.
+%    \begin{macrocode}
+\providecommand*\ext at lstlisting{lol}%
+%    \end{macrocode}
+% \end{macro}
+%
+% \pagebreak[3]
+% \subsubsection{\package{rotating}}
+%
+% We define a sideways-variant of new floating environments here.
+%    \begin{macrocode}
+\newfloat at IfPackageLoaded{rotating}{sideways#1}{%
+  \newenvironment{sideways#1}{\@rotfloat{#1}}{\end at rotfloat}%
+  \newenvironment{sideways#1*}{\@rotdblfloat{#1}}{\end at rotdblfloat}}
+%    \end{macrocode}
+%
+% \pagebreak[3]
+% \subsubsection{\package{sidecap}}
+%
+% We define a SC-variant of new floating environments here.
+% \begin{macro}{\SC at float}
+% \changes{v1.1b}{2018/12/26}{Bugfix: Missing curly braces added}
+%    \begin{macrocode}
+\newcommand*\newfloat at For@SC[2]{%
+  \def#1{b}% = \sidecaptionvpos{#2}{b} (v1.6)
+  \newenvironment{SC#2}%
+    {\SC at float[{#1}]{#2}}{\endSC at float}%
+  \newenvironment{SC#2*}%
+    {\SC at dblfloat[{#1}]{#2}}{\endSC at dblfloat}}
+\@onlypreamble\newfloat at For@SC
+%    \end{macrocode}
+%    \begin{macrocode}
+\newfloat at IfPackageLoaded{sidecap}{SC#1}{%
+  \expandafter\newfloat at For@SC\csname SC@#1 at vpos\endcsname{#1}}
+%    \end{macrocode}
+% \end{macro}
+%
+% \pagebreak[3]
+% \subsubsection{\package{wrapfig}}
+%
+% We define a wrap-variant of new floating environments here.
+%    \begin{macrocode}
+\newfloat at IfPackageLoaded{wrapfig}{wrap#1}{%
+  \newenvironment{wrap#1}{\wrapfloat{#1}}{\endwrapfloat}}
+%    \end{macrocode}
+%
+% \iffalse
+%</package>
+% \fi
+%
+% \iffalse
+% --------------------------------------------------------------------------- %
+% \fi
+%
+% \Finale
+%
+\endinput
+


Property changes on: trunk/Master/texmf-dist/source/latex/newfloat/fallback/v1.1/newfloat.dtx
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/source/latex/newfloat/newfloat.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/newfloat/newfloat.dtx	2023-10-02 19:44:41 UTC (rev 68433)
+++ trunk/Master/texmf-dist/source/latex/newfloat/newfloat.dtx	2023-10-02 19:45:00 UTC (rev 68434)
@@ -2,7 +2,7 @@
 % 
 % This is file `newfloat.dtx'.
 % 
-% Copyright (C) 2011-2019 Axel Sommerfeldt (axel.sommerfeldt at f-m.fm)
+% Copyright (C) 2011-2023 Axel Sommerfeldt (axel.sommerfeldt at f-m.fm)
 % 
 % --------------------------------------------------------------------------
 % 
@@ -14,21 +14,18 @@
 % 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 work has the LPPL maintenance status "unmaintained".
 % 
-% This Current Maintainer of this work is Axel Sommerfeldt.
-% 
 % This work consists of the files newfloat.ins, newfloat.dtx,
 % and the derived file newfloat.sty.
 % 
 % \fi
-% \CheckSum{1609}
+% \CheckSum{1665}
 %
 % \iffalse
 %<*driver>
 \NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesFile{newfloat.drv}%
-  [2013/04/27 v1.1 This package offers a command for defining new floating environments]
+\ProvidesFile{newfloat.drv}[2023/10/01 v1.2 This package offers a command for defining new floating environments]
 \hbadness=9999 \newcount\hbadness \hfuzz=48pt % Make TeX shut up.
 %
 \documentclass{ltxdoc}
@@ -71,11 +68,11 @@
 % \newcommand*\purerm[1]{{\upshape\mdseries\rmfamily #1}}
 % \newcommand*\puresf[1]{{\upshape\mdseries\sffamily #1}}
 % \newcommand*\purett[1]{{\upshape\mdseries\ttfamily #1}}
-% \let\class\puresf \let\package\puresf
+% \let\cls\puresf \let\pkg\puresf
 % \let\env\purett \let\opt\purett
 %
-% \def\thispackage{the \package{newfloat} package}
-% \def\Thispackage{The \package{newfloat} package}
+% \def\thispackage{the \pkg{newfloat} package}
+% \def\Thispackage{The \pkg{newfloat} package}
 % 
 % \newcommand*\csmarg[1]{\texttt{\char`\{#1\char`\}}}
 % \newcommand*\csoarg[1]{\texttt{\char`\[#1\char`\]}}
@@ -163,6 +160,8 @@
 %   |fileext=| & \meta{file extension}\\
 %   |listname=| & \meta{list name}\\
 %   |name=| & \meta{prosa name}\\
+%   |autorefname=| & \meta{name used in \cs{autoref} offered by \pkg{hyperref}}\\
+%   |legendname=| & \meta{name used in \cs{legend} offered by \cls{memoir}}\\
 %   |placement=| & \meta{combination of \,\purett{htbp}}\\
 %   |within=| & \meta{``within'' counter} \emph{or} \texttt{none}\\
 %   |chapterlistsgaps=| & \texttt{on} \emph{or} \texttt{off}~\footnotemark[1]
@@ -176,7 +175,7 @@
 % If no \meta{options} are given,
 % ``lo\meta{type}'' will be used as \meta{file extension} for the list,
 % ``List of \meta{name}s'' as \meta{list name}.
-% ``\meta{name}'' as \meta{name} (but with the first letter capitalized),
+% ``\meta{name}'' as \meta{name}, \meta{autoref name}, and \meta{legend name} (but with the first letter capitalized),
 % ``|tbp|'' as \meta{placement} specifier,
 % and ``|chapter|'' resp. ``|none|'' as \meta{``within'' counter},
 % i.e., the counter which resets the numbering.
@@ -191,10 +190,10 @@
 % resp.~|\list|\-|of|\meta{type}|es|,
 % analogous to |\list|\-|of|\-|figures| and |\list|\-|of|\-|tables|.
 %
-% If the \package{fltpage} package is loaded, an environment called
+% If the \pkg{fltpage} package is loaded, an environment called
 % |FP|\meta{type} will be defined additionally, same for |sideways|\meta{type}
-% (\package{rotating} package), |SC|\meta{type} (\package{sidecap} package),
-% and |wrap|\meta{type} (\package{wrapfig} package).
+% (\pkg{rotating} package), |SC|\meta{type} (\pkg{sidecap} package),
+% and |wrap|\meta{type} (\pkg{wrapfig} package).
 % 
 % \bigskip
 % 
@@ -220,10 +219,10 @@
 %   |  name=Matrix,|\\
 %   |  placement=p,|\\
 %   |  within=section,|\\
-%   |  chapterlistsgaps=off,|\\
-%   |  ]{matrix}|
+%   |  chapterlistsgaps=off|\\
+%   |  ]{matrixx}|
 % \end{quote}
-% will define a new floating environment called |matrix| with the given settings.
+% will define a new floating environment called |matrixx| with the given settings.
 % Please note that names which contain spaces needs to be enclosed in curly braces.
 %
 % \pagebreak[3]
@@ -235,10 +234,10 @@
 % \end{quote}
 % will change the settings of existing ones, i.e. either |figure| or |table|,
 % or a one created with |\Declare|\-|Floating|\-|Environment|,
-% or a one created with |\new|\-|float| offered by the \package{float} package,
-% or a one created with |\new|\-|float| offered by the \package{memoir} document class,
-% or a one created with |\Declare|\-|New|\-|Float|\-|Type| offered by the \package{floatrow} package,
-% or \ldots
+% or a one created with |\new|\-|float| offered by the \pkg{float} package,
+% or a one created with |\new|\-|float| offered by the \pkg{memoir} document class,
+% or a one created with |\Declare|\-|New|\-|Float|\-|Type| offered by the \pkg{floatrow} package,
+% or a one created by a document class or any other package.
 %
 % The \meta{options} are the same as the options for
 % |\Declare|\-|Floating|\-|Environment|,
@@ -255,7 +254,7 @@
 %   |\SetupFloatingEnvironment{lstlisting}{chapterlistsgaps=off}|
 % \end{quote}
 % will switch off the chapter lists gaps for |lstlisting| environments
-% offered by the \package{listings} package.
+% offered by the \pkg{listings} package.
 %
 % \pagebreak[3]
 % \section{\cs{ForEachFloatingEnvironment}}
@@ -267,7 +266,7 @@
 % and for ones defined with |\Declare|\-|Floating|\-|Environment| later on.
 %
 % \pagebreak[3]
-% So for example the \package{subcaption} packages uses
+% So for example the \pkg{subcaption} packages uses
 % \begin{quote}
 %  |\ForEachFloatingEnvironment{\DeclareCaptionSubType{#1}}|
 % \end{quote}
@@ -324,11 +323,11 @@
 %   |  \renewcommand{\cftfigpresnum}{Diagram~}}|
 % \end{quote}
 % will change the part typeset in front of the diagram number within the
-% ``List of Diagrams'' when using the \package{tocloft} package~\cite{tocloft}.
+% ``List of Diagrams'' when using the \pkg{tocloft} package~\cite{tocloft}.
 % Without the code above you will get the part defined for figures instead.
 %
 % \pagebreak[3]
-% However, when dealing with the \package{tocloft} package it's a better
+% However, when dealing with the \pkg{tocloft} package it's a better
 % idea not to use |\Prepare|\-|List|\-|Of| but the customization facilities of that package
 % instead, e.g.:
 % \begin{quote}
@@ -359,11 +358,110 @@
 %   |\end{document}|
 % \end{quote}
 %
+% \pagebreak[3]
+% \section{Multi-language support}
+%
+% The options \opt{name=} etc.~will set names for the current language only.
+% If support for multiple languages is needed, the command |\addto\captions|\meta{language}
+% offered by the \pkg{babel} package needs to be used to set names for all the different languages.
+%
+% These are the corresponding command names:
+%
+% \nobreak\medskip\nobreak\noindent
+% \begin{minipage}{\linewidth}
+%   \centering
+%   \begin{tabular}{lll}
+%     Option             & Command                      & Description \\
+%   \hline
+%     \opt{listname=}    & |\list|\meta{float}|name|    & Heading of the list \\
+%     \opt{name=}        & |\|\meta{float}|name|        & Name used in |\caption| \\
+%     \opt{autorefname=} & |\|\meta{float}|autorefname| & Name used in |\autoref| \\
+%     \opt{legendname=}  & |\fleg|\meta{float}          & Name used in |\legend| \\
+%   \end{tabular}
+% \end{minipage}
+%
+% \medskip
+%
+% \pagebreak[3]
+% Example code:
+% \nobreak\begin{quote}
+%   |\documentclass{book}|\\
+%   \ldots\\
+%   |\usepackage[T1]{fontenc}|\\
+%   |\usepackage[english,french,german]{babel}|\\
+%   \ldots\\
+%   |\usepackage{newfloat}|\\
+%   |\DeclareFloatingEnvironment{diagram}|\\
+%   |% Set names for the English language|\\
+%   |\addto\captionsenglish{%|\\
+%   |  \renewcommand\diagramname{Diagram}%|\\
+%   |  \renewcommand\listdiagramname{List of Diagrams}%|\\
+%   |}|\\
+%   |% Set names for the French language|\\
+%   |\addto\captionsfrench{%|\\
+%   |  \renewcommand\diagramname{Diagramme}%|\\
+%   |  \renewcommand\listdiagramname{Liste des diagrammes}%|\\
+%   |}|\\
+%   |% Set names for the German language|\\
+%   |\addto\captionsgerman{%|\\
+%   |  \renewcommand\diagramname{Diagramm}%|\\
+%   |  \renewcommand\listdiagramname{Liste der Diagramme}%|\\
+%   |}|\\
+%   \ldots
+% \end{quote}
+%
+% \pagebreak[3]
+% \emph{Note:}
+% As default the names for |\autoref| and |\legend| point to the one used for captions,
+% so these names only need to be set if they should differ from it.
+%
+% \pagebreak[3]
+% \section{Important notes for \LaTeX\ document class maintainers}
+%
+% If you are a maintainer of a \LaTeX\ document class and want to support this package
+% you could tell this package to keep its fingers from your definition of |\chapter| by defining
+% |\new|\-|float at dont@patch at chapter| to anything. (The content of the definition does not matter
+% since the \pkg{newfloat} package only checks if this macro is defined or not.)
+%
+% If |\new|\-|float at dont@patch at chapter| is defined, the \pkg{newfloat} package does not try to patch
+% |\chapter| but assumes that |\@add|\-|chapter|\-|lists|\-|gaps| is already used by the document class inside
+% its definition of |\chapter|, so it only needs to re-define |\@add|\-|chapter|\-|lists|\-|gaps|
+% to use the settings configured by |\De|\-|clare|\-|Float|\-|ing|\-|En|\-|vi|\-|ron|\-|ment|
+% or |\Setup|\-|Float|\-|ing|\-|En|\-|vi|\-|ron|\-|ment|.
+%
+% \medskip
+%
+% \pagebreak[3]
+% Example code:
+% \nobreak\begin{quote}
+%   |\newcommand\@chapterlistsgap{10\p@}|\\
+%   ||\\
+%   |\newcommand\@addchapterlistsgaps{%|\\
+%   |  % Add a gap to List of Figures and List of Tables|\\
+%   |  % (This macro will be re-defined if the newfloat package|\\
+%   |  %  is loaded by the user later on.)|\\
+%   |  \addtocontents{lof}{\protect\addvspace{\@chapterlistsgap}}%|\\
+%   |  \addtocontents{lot}{\protect\addvspace{\@chapterlistsgap}}%|\\
+%   |}|\\
+%   ||\\
+%   |\newcommand\chapter{%|\\
+%   |  |\ldots\\
+%   |  \secdef\@chapter\@schapter}|\\
+%   |\def\@chapter[#1]#2{%|\\
+%   |  |\ldots\\
+%   |  \@addchapterlistsgaps|\\
+%   |  |\ldots\\
+%   |}|\\
+%   ||\\
+%   |% Hey newfloat package, don't patch my \chapter!|\\
+%   |\def\newfloat at dont@patch at chapter{}|
+% \end{quote}
+%
 % \iffalse
 % \pagebreak[3]
-% \section{For \LaTeX{} package authors}
+% \section{Notes for \LaTeX{} package authors}
 %
-% |\For|\-|Each|\-|Floating|\-|Environment| without \package{newfloat} package:
+% |\For|\-|Each|\-|Floating|\-|Environment| without \pkg{newfloat} package:
 % \begin{quote}
 %   |\newcommand\mypackage at foreachfloat[1]{%|\\
 %   |  \@ifundefined{ForEachFloatingEnvironment}%|\\
@@ -385,7 +483,7 @@
 % \begin{quote}
 %   |\SetupFloatingEnvironment|\marg{environment}|{}|
 % \end{quote}
-% or (without \package{newfloat} package loaded):
+% or (without \pkg{newfloat} package loaded):
 % \begin{quote}
 %   |\providecommand\newfloat at list{}|\\
 %   |\@cons\newfloat at list{|\marg{environment}|}|
@@ -509,11 +607,11 @@
 % \fi
 %
 % \setlength{\parskip}{0pt plus 1pt}
-% \changes{v1.0}{2011/10/30}{First release as \package{newfloat} package,
-%       outsourced from the \package{caption3} package and revised}
-% \changes{v1.1}{2013/04/27}{Adapted to the \package{tocloft} package}
+% \changes{v1.0}{2011/10/30}{First release as \pkg{newfloat} package,
+%       outsourced from the \pkg{caption3} package and revised}
+% \changes{v1.1}{2013/04/27}{Adapted to the \pkg{tocloft} package}
 % \changes{v1.1}{2013/04/27}{New command \cs{PrepareListOf} added}
-% \changes{v1.1d}{2019/03/16}{Adapted to the \package{dgruyter} package}
+% \changes{v1.1d}{2019/03/16}{Adapted to the \pkg{dgruyter} package}
 %
 % \iffalse
 % --------------------------------------------------------------------------- %
@@ -528,11 +626,30 @@
 % \pagebreak[3]
 % \subsection{Identification}
 %
+% We need at least \LaTeX2e\ version 1994/12/01.
 %    \begin{macrocode}
 \NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{newfloat}[2019/09/02 v1.1l Defining new floating environments (AR)]
 %    \end{macrocode}
 %
+% Bypass the release declarations in case the \LaTeX\ kernel doesn’t know how to deal with them
+% (as suggested by \url{https://www.latex-project.org/publications/2018-FMi-TUB-tb122mitt-version-rollback.pdf}).
+%    \begin{macrocode}
+\providecommand\DeclareRelease[3]{}
+\providecommand\DeclareCurrentRelease[2]{}
+%    \end{macrocode}
+%
+% Declare all supported releases.
+%    \begin{macrocode}
+\DeclareRelease{v1.0}{2011-10-30}{newfloat_v1.0.sty}
+\DeclareRelease{v1.1}{2013-05-12}{newfloat_v1.1.sty}
+\DeclareCurrentRelease{v1.2}{2023-10-01}
+%    \end{macrocode}
+%
+% Identify the current version of the package.
+%    \begin{macrocode}
+\ProvidesPackage{newfloat}[2023/10/01 v1.2 Defining new floating environments (AR)]
+%    \end{macrocode}
+%
 % \begin{macro}{\newfloat at Info}
 % \begin{macro}{\newfloat at InfoNoLine}
 %  |\newfloat at Info|\marg{message}
@@ -573,7 +690,7 @@
 % \pagebreak[3]
 % \subsection{Using the keyval package}
 %
-% We need the \package{keyval} package for option handling, so we load it here.
+% We need the \pkg{keyval} package for option handling, so we load it here.
 %    \begin{macrocode}
 \RequirePackage{keyval}[1997/11/10]
 %    \end{macrocode}
@@ -620,10 +737,11 @@
 % \changes{v1.1}{2013/04/27}{Revised, only defines stuff yet undefined now}
 % \changes{v1.1}{2013/11/03}{Uses \cs{newfloat at capitalize} now}
 % \changes{v1.1}{2015/09/16}{Support of \cs{autodot} (offered by the \KOMAScript\ classes) added}
-% \changes{v1.1}{2018/03/04}{Usage of \cs{ifdefined} replaced by \cs{@ifundefined} to improve compatibility with the \package{listings} package}
+% \changes{v1.1}{2018/03/04}{Usage of \cs{ifdefined} replaced by \cs{@ifundefined} to improve compatibility with the \pkg{listings} package}
 % \changes{v1.1b}{2018/12/26}{Bugfix: Missing curly braces added}
 % \changes{v1.1c}{2019/01/10}{Bugfix: Support of \cs{autodot} fixed}
-% \changes{v1.1k}{2019/09/01}{Adapted to the \class{beamer} document class}
+% \changes{v1.1k}{2019/09/01}{Adapted to the \cls{beamer} document class}
+% \changes{v1.2}{2021/02/28}{Definition of \cs{xxxautorefname} added}
 %  |\DeclareFloatingEnvironment|\oarg{options}\marg{environment}\oarg{name}\oarg{list name}
 %    \begin{macrocode}
 \newcommand*\DeclareFloatingEnvironment{%
@@ -667,8 +785,9 @@
 % but with first letter capitalized
 %    \begin{macrocode}
   \newfloat at capitalize\newfloat at Type{#2}%
-  \newfloat at let{#2name}{\newfloat at Type}%
-  \newfloat at def{fleg#2}{\@nameuse{#2name}}% legend naming (memoir)
+  \newfloat at let{#2name}{\newfloat at Type}%            \caption naming
+  \newfloat at def{#2autorefname}{\@nameuse{#2name}}%  \autoref naming (hyperref)
+  \newfloat at def{fleg#2}{\@nameuse{#2name}}%         \legend naming (memoir)
 %    \end{macrocode}
 % Legend name in ToC (memoir document class)
 %    \begin{macrocode}
@@ -675,10 +794,10 @@
   \newfloat at ifundefined{flegtoc#2}{\@namedef{flegtoc#2}##1{}}%
 %    \end{macrocode}
 % Define the floating environment\par
-% If the \class{tufte} document class is loaded,
+% If the \cls{tufte} document class is loaded,
 % |\@tufte at float| and |\end at tufte@float| will be used instead of
 % |\@float|, |\end at float|, |\@dblfloat|, and |\end at dblfloat|.\par
-% If the \class{beamer} document class is loaded,
+% If the \cls{beamer} document class is loaded,
 % |\beamer at float| and |\end at beamer@float| will be used.
 %    \begin{macrocode}
   \ifcsname @tufte at float\endcsname
@@ -713,8 +832,8 @@
   \newfloat at let{list#2name}{\newfloat at tempa}%
 %    \end{macrocode}
 % We undefine |\fst@|\meta{environment} so the new environment
-% will not be recognized as defined by the \package{float} package.
-% (|\fst@|\meta{type} use to hold the float style, see \package{float} package
+% will not be recognized as defined by the \pkg{float} package.
+% (|\fst@|\meta{type} use to hold the float style, see \pkg{float} package
 % implementation for details.)
 %    \begin{macrocode}
   \expandafter\let\csname fst@#2\endcsname\@undefined
@@ -768,6 +887,7 @@
 % \begin{macro}{\newfloat at listof}
 % \changes{v1.1}{2013/04/27}{Revised}
 % \changes{v1.1g}{2019/08/28}{Starred variant added}
+% \changes{v1.1n}{2021/02/27}{Uses \cs{newfloat at ext} now instead of \cs{ext at xxx}}
 % |\newfloat at listof|\marg{float type}\\
 % typesets the list, using |\listoffigure| with patched list name and file extension.
 %    \begin{macrocode}
@@ -778,7 +898,7 @@
 %    \end{macrocode}
 %    \begin{macrocode}
 \newcommand*\newfloat at list@of[1]{%
-  \@expandtwoargs\newfloat at list@of@{#1}{\@nameuse{ext@#1}}}
+  \@expandtwoargs\newfloat at list@of@{#1}{\newfloat at ext{#1}}}
 %    \end{macrocode}
 %    \begin{macrocode}
 \newcommand*\newfloat at list@of@[3]{%
@@ -830,12 +950,13 @@
 % \end{macro}
 %
 % \begin{macro}{\newfloat at setoption}
-% \changes{v1.1}{2015/09/15}{Bugfix: \cs{@expandtwoargs} replaced by own expansion so the option value do not get expanded anymore}
+% \changes{v1.1}{2015/09/15}{\cs{@expandtwoargs} replaced by own expansion so the option value do not get expanded anymore}
+% \changes{v1.1m}{2020/10/11}{Usage of \cs{caption at tempa} replaced by \cs{newfloat at tempa}}
 % |\newfloat at setoption|\marg{option name}{options}
 %    \begin{macrocode}
 \newcommand*\newfloat at setoption[1]{%
-  \edef\caption at tempa{\noexpand\@nameuse{newfloat at set#1}{\newfloat at type}}%
-  \caption at tempa}
+  \edef\newfloat at tempa{\noexpand\@nameuse{newfloat at set#1}{\newfloat at type}}%
+  \newfloat at tempa}
 %    \end{macrocode}
 % \end{macro}
 %
@@ -896,6 +1017,34 @@
 %    \end{macrocode}
 % \end{macro}
 %
+% \begin{macro}{\newfloat at setautorefname}
+% \changes{v1.2}{2023/10/01}{This macro and corresponding option \opt{autorefname=} added}
+% |\newfloat at setautorefname|\marg{environment}\marg{autoref name}\par
+% This name is used in |\autoref| offered by the \pkg{hyperref} package.
+%    \begin{macrocode}
+\newcommand*\newfloat at setautorefname[2]{%
+  \@namedef{#1autorefname}{#2}}
+%    \end{macrocode}
+%    \begin{macrocode}
+\define at key{@newfloat}{autorefname}{%
+  \newfloat at setoption{autorefname}{#1}}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\newfloat at setlegendname}
+% \changes{v1.2}{2023/10/01}{This macro and corresponding option \opt{legendname=} added}
+% |\newfloat at setlegendname|\marg{environment}\marg{legend name}
+% This name is used in |\legend| offered by the \cls{memoir} document class.
+%    \begin{macrocode}
+\newcommand*\newfloat at setlegendname[2]{%
+  \@namedef{fleg#1}{#2}}
+%    \end{macrocode}
+%    \begin{macrocode}
+\define at key{@newfloat}{legendname}{%
+  \newfloat at setoption{legendname}{#1}}
+%    \end{macrocode}
+% \end{macro}
+%
 % \begin{macro}{\newfloat at setplacement}
 % |\newfloat at setplacement|\marg{environment}\marg{float placement}
 %    \begin{macrocode}
@@ -954,10 +1103,10 @@
     \fi
   \fi}
 %    \end{macrocode}
-% Note: Since the \package{hyperref} package with version $<$ 6.82k defines
+% Note: Since the \pkg{hyperref} package with version $<$ 6.82k defines
 % |\the|\-|H|\-|figure| and |\the|\-|H|\-|table| with |\new|\-|command|,
 % |\newfloat@@setwithin| will yield to an error message when using with an
-% old version of \package{hyperref},
+% old version of \pkg{hyperref},
 % e.g. ``\texttt{LaTeX Error: Command \cs{theHfigure} already defined}''.
 %    \begin{macrocode}
 \newcommand*\newfloat@@setwithin[3]{%
@@ -987,19 +1136,29 @@
 %    \begin{macrocode}
 \newcommand*\newfloat at setchapterlistsgaps[2]{%
   \edef\@tempa{#2}%
-  \def\@tempb{off}%
+  \newfloat at setchapterlistsgaps@{off}{off}{#1}%
+  \newfloat at setchapterlistsgaps@{false}{off}{#1}%
+  \newfloat at setchapterlistsgaps@{on}{on}{#1}%
+  \newfloat at setchapterlistsgaps@{true}{on}{#1}%
+  \ifx\@tempa\newfloat at setchapterlistsgaps@ \else
+    \newfloat at Error{Invalid value `#2' for option `chapterlistsgaps'}%
+  \fi}
+%    \end{macrocode}
+%    \begin{macrocode}
+\newcommand*\newfloat at setchapterlistsgaps@[3]{%
+  \def\@tempb{#1}%
   \ifx\@tempa\@tempb
-    \@chapterlistsgap at off{#1}%
-  \else
-    \def\@tempb{on}%
-    \ifx\@tempa\@tempb
-      \@chapterlistsgap at on{#1}%
-    \else
-      \newfloat at Error{Invalid value `#2' for option `chapterlistsgaps'}%
-    \fi
+    \newfloat at chapterlistsgap@{#2}{#3}%
+    \let\@tempa\newfloat at setchapterlistsgaps@
   \fi}
 %    \end{macrocode}
 %    \begin{macrocode}
+\newcommand*\newfloat at chapterlistsgap@[1]{%
+  \@ifundefined{@chapterlistsgap@#1}%
+    {\@gobble}%
+    {\@nameuse{@chapterlistsgap@#1}}}
+%    \end{macrocode}
+%    \begin{macrocode}
 \define at key{@newfloat}{chapterlistsgaps}{%
   \def\newfloat at chapterlistsgaps@value{#1}}
 %    \end{macrocode}
@@ -1006,7 +1165,7 @@
 % \end{macro}
 %
 % \begin{macro}{\@removefromreset}
-% This code was taken from the \package{remreset} package
+% This code was taken from the \pkg{remreset} package
 % which is part of the `carlisle' package bundle.
 % (Copyright 1997 David Carlisle)
 %    \begin{macrocode}
@@ -1023,6 +1182,7 @@
 % \end{macro}
 %
 % \begin{macro}{\newfloat at announce}
+% \changes{v1.1n}{2021/02/27}{Defines \cs{newfloat at env@xxx} now instead of \cs{newfloat at ext@xxx}}
 % |\newfloat at announce|\marg{environment name}\marg{list file extension}
 %    \begin{macrocode}
 \newcommand*\newfloat at announce[2]{%
@@ -1032,10 +1192,10 @@
   \@cons\newfloat@@list{{#1}}%
 %    \end{macrocode}
 %    \begin{macrocode}
-  \newfloat at ifundefined{newfloat at ext@#2}{%
-    \@namedef{newfloat at ext@#2}{#1}%
+  \newfloat at ifundefined{newfloat at env@#2}{%
+    \@namedef{newfloat at env@#2}{#1}%
 %    \end{macrocode}
-% Support of \package{memoir} document class
+% Support of \pkg{memoir} document class
 %    \begin{macrocode}
     \ifcsname c at lofdepth\endcsname
       \newfloat at ifundefined{c@#2depth}{%
@@ -1043,7 +1203,7 @@
         \setcounter{#2depth}{1}}%
     \fi
 %    \end{macrocode}
-% Support of \package{tocbasic} package
+% Support of \pkg{tocbasic} package
 %    \begin{macrocode}
     \ifcsname addtotoclist\endcsname
       \addtotoclist[float]{#2}%
@@ -1053,7 +1213,7 @@
 %    \begin{macrocode}
   }%
 %    \end{macrocode}
-% Support of \package{titletoc} package
+% Support of \pkg{titletoc} package
 %    \begin{macrocode}
   \ifcsname contentsuse\endcsname
     \contentsuse{#1}{#2}%
@@ -1065,6 +1225,15 @@
 %    \end{macrocode}
 % \end{macro}
 %
+% \begin{macro}{\newfloat at ext}
+% \changes{v1.1n}{2021/02/27}{This macro added}
+% |\newfloat at ext|\marg{environment}
+% expands to the file extension used for the given \meta{environment}.
+%    \begin{macrocode}
+\newcommand*\newfloat at ext[1]{\@nameuse{ext@#1}}
+%    \end{macrocode}
+% \end{macro}
+%
 % \begin{macro}{\newfloat@@list}
 % |\newfloat@@list| is an \cs{@elt}-list containing the floating environments defined
 % with |\Declare|\-|Floating|\-|Environment| only.
@@ -1089,23 +1258,31 @@
 % \subsection{\cs{ForEachFloatingEnvironment}}
 %
 % \begin{macro}{\ForEachFloatingEnvironment}
-% |\ForEachFloatingEnvironment|\marg{code}
-% will execute the given code for each floating environment.
+% |\ForEachFloatingEnvironment|\marg{code with \#1}\par
+% will execute the given code for each (known) floating environment.
 % The starred variant will only work for already existing environments,
 % i.e.~no hook will be placed inside |\Declare|\-|Floating|\-|Environment|.
 %    \begin{macrocode}
-\newcommand\ForEachFloatingEnvironment{%
+\newcommand*\ForEachFloatingEnvironment{%
   \@ifstar
-    {\@ForEachFloatingEnvironment\@gobble}%
-    {\@ForEachFloatingEnvironment\@iden}}
+    {\newfloat at foreach\@gobble}%
+    {\newfloat at foreach\@iden}}
 %    \end{macrocode}
 %    \begin{macrocode}
-\newcommand\@ForEachFloatingEnvironment[2]{%
+\newcommand\newfloat at foreach[2]{%
   \def\@elt##1{#2}%
   \newfloat at list
   \let\@elt\relax
   #1{\newfloat at addtohook{#2}}}
 %    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\newfloat at addtohook}
+% |\newfloat at addtohook|\marg{code with \#1}\par
+% adds code to the hook called in |\Declare|\-|Floating|\-|Environment|.\par
+% Note: We use |\provide|\-|command| instead of |\new|\-|command| here since the
+% exact same code is defined for |\For|\-|Each|\-|Caption|\-|Type| offered by
+% the \pkg{caption3} package.
 %    \begin{macrocode}
 \providecommand\newfloat at addtohook[1]{%
   \toks@=\expandafter{\newfloat at hook{##1}#1}%
@@ -1112,6 +1289,10 @@
   \edef\@tempa{\def\noexpand\newfloat at hook####1{\the\toks@}}%
   \@tempa}
 %    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\newfloat at hook}
+% Hook used in |\Declare|\-|Floating|\-|Environment|.
 %    \begin{macrocode}
 \providecommand*\newfloat at hook[1]{}
 %    \end{macrocode}
@@ -1145,6 +1326,7 @@
 %
 % \begin{macro}{\newfloat at addtolist}
 % \changes{v1.0b}{2012/05/18}{Bugfix: Definition of \cs{@ifchapterlistsgap@}\meta{environment} added}
+% \changes{v1.1n}{2021/02/27}{Defines \cs{newfloat at env@xxx} now instead of \cs{newfloat at ext@xxx}}
 % |\newfloat at addtolist|\marg{environment}
 % adds an environment to the list of floating environments.
 %    \begin{macrocode}
@@ -1152,7 +1334,7 @@
   \newfloat at ifinlist{#1}{}{%
     \ifcsname ext@#1\endcsname
       \@cons\newfloat at list{{#1}}%
-      \@namedef{newfloat at ext@\@nameuse{ext@#1}}{#1}%
+      \@namedef{newfloat at env@\@nameuse{ext@#1}}{#1}%
       \newfloat at let{@ifchapterlistsgap@#1}{\@iden}%
     \else
       \newfloat at Error{`#1' does not seem to be a floating environment}%
@@ -1201,7 +1383,7 @@
 %    \begin{macrocode}
   \providecommand*\@chapterlistsgap{10\p@}%
 %    \end{macrocode}
-% If the \package{dgruyter} package is loaded, the default gap is |13pt|.
+% If the \pkg{dgruyter} package is loaded, the default gap is |13pt|.
 %    \begin{macrocode}
   \@ifpackageloaded{dgruyter}{\renewcommand*\@chapterlistsgap{13\p@}}{}%
 %    \end{macrocode}
@@ -1231,13 +1413,20 @@
 %
 % \begin{macro}{\@addchapterlistsgaps}
 % \changes{v1.0b}{2012/05/18}{Bugfix: Group added to make \cs{@addchapterlistsgap} work correctly}
+% \changes{v1.1n}{2021/02/27}{Uses \cs{newfloat at ext} now instead of \cs{ext at xxx}}
+% \changes{v1.2}{2023/10/01}{A previous definition of this macro will be overwritten if \cs{newfloat at dont@patch at chapter} is defined}
 % |\@addchapterlistsgaps|\par
 % will add the chapter lists gaps for all floating environments in |\newfloat at list|.
 %    \begin{macrocode}
+  \ifcsname newfloat at dont@patch at chapter\endcsname
+    \let\@addchapterlistsgaps\@undefined % force a re-definition
+  \fi
+%    \end{macrocode}
+%    \begin{macrocode}
   \providecommand*\@addchapterlistsgaps{%
     \begingroup
       \def\@elt##1{%
-        \@expandtwoargs\@addchapterlistsgap{##1}{\@nameuse{ext@##1}}}%
+        \@expandtwoargs\@addchapterlistsgap{##1}{\newfloat at ext{##1}}}%
       \newfloat at list
     \endgroup}
 %    \end{macrocode}
@@ -1244,21 +1433,23 @@
 % \end{macro}
 %
 % \begin{macro}{\@chapterlistsgap at off}
+% \changes{v1.1n}{2021/02/27}{Uses \cs{newfloat at ext} now instead of \cs{ext at xxx}}
 % |\@chapterlistsgap at off|\marg{float type}\par
 % switches the chapter lists gap off for the given float type.
 % Since \KOMAScript{} (still) supports |\float at exts| we need to handle
-% this locally, too, even if |\unsettoc| is offered by the \package{tocbasic} package.
+% this locally, too, even if |\unsettoc| is offered by the \pkg{tocbasic} package.
 % (Otherwise our handling could be moved into the |\else| branch.)
 %    \begin{macrocode}
   \providecommand*\@chapterlistsgap at off[1]{%
     \expandafter\let\csname @ifchapterlistsgap@#1\endcsname\@gobble
     \ifcsname unsettoc\endcsname
-      \@expandtwoargs\unsettoc{\@nameuse{ext@#1}}{chapteratlist}%
+      \@expandtwoargs\unsettoc{\newfloat at ext{#1}}{chapteratlist}%
     \fi}
 %    \end{macrocode}
 % \end{macro}
 %
 % \begin{macro}{\@chapterlistsgap at on}
+% \changes{v1.1n}{2021/02/27}{Uses \cs{newfloat at ext} now instead of \cs{ext at xxx}}
 % |\@chapterlistsgap at off|\marg{float type}\par
 % switches the chapter lists gap on for the given float type.
 %    \begin{macrocode}
@@ -1265,7 +1456,7 @@
   \providecommand*\@chapterlistsgap at on[1]{%
     \expandafter\let\csname @ifchapterlistsgap@#1\endcsname\@iden
     \ifcsname setuptoc\endcsname
-      \@expandtwoargs\setuptoc{\@nameuse{ext@#1}}{chapteratlist}%
+      \@expandtwoargs\setuptoc{\newfloat at ext{#1}}{chapteratlist}%
     \fi}
 %    \end{macrocode}
 % \end{macro}
@@ -1355,7 +1546,7 @@
 % \end{macro}
 %
 % Process the package options:
-% We use |\setkeys| here instead of |\ProcessOptions|.
+% We use |\set|\-|keys| here instead of |\Process|\-|Options|.
 %    \begin{macrocode}
 \let\@tempc\relax
 \@expandtwoargs\setkeys{newfloat}{planb,\@ptionlist{\@currname.\@currext}}%
@@ -1373,13 +1564,22 @@
 % \pagebreak[3]
 % \subsection{Patching \cs{chapter}}
 %
+% Since the \LaTeX\ team has refused to replace the hard coded |10pt| skip inside |\chapter|
+% (for lists of floating environments like |figure| or |table|)
+% with a proper interface~\footnote{I have asked David Carlisle in 2018, Frank Mittelbach in 2020, and Frank again at a later date.},
+% we need to patch |\chapter|. (Sigh!)
+%
+% And since most document class authors takes \cls{article}, \cls{report}, or \cls{book} as template for own classes,
+% they inherit the same problem: Hard coded skips we need to replace with an interface for ourself. (Sigh!)
+%
 % \begin{macro}{\newfloat at replace@chapter}
 % \changes{v1.1f}{2019/08/25}{Parameter \meta{class name} added to macro}
 % \changes{v1.1i}{2019/08/31}{Local definition of \cs{if at chapnum} added}
+% \changes{v1.1o}{2021/02/27}{Support of the \pkg{algorithm2e} package added}
 %   |\newfloat at replace@chapter|\marg{class name}\marg{original code}\marg{replacement code}\par
 %   tries to patch |\@chapter| so |\@add|\-|chapter|\-|lists|\-|gaps| will be supported.
 %   It checks for |\Hy at org@chapter|, too, since the original code will be stored here
-%   if the \package{hyperref} package was loaded.
+%   if the \pkg{hyperref} package was loaded.
 %    \begin{macrocode}
 \newcommand\newfloat at replace@chapter[3]{%
   \begingroup
@@ -1388,18 +1588,21 @@
     \let\if at thema\iffalse
     \let\if at chapnum\iffalse
     \def\@tempa[##1]##2{#2}%
-    \ifx\@tempa\@chapter
-      \newfloat at InfoNoLine{Document class `#1' detected}%
-      \gdef\@chapter[##1]##2{#3}%
-      \global\let\newfloat at replace@chapter\newfloat at dont@replace at chapter
-    \else\ifx\@tempa\Hy at org@chapter
-      \newfloat at InfoNoLine{Document class `#1' detected (Hy)}%
-      \gdef\Hy at org@chapter[##1]##2{#3}%
-      \global\let\newfloat at replace@chapter\newfloat at dont@replace at chapter
-    \fi\fi
+    \newfloat at replace@chapter@\@chapter{original}{#1}{#3}%
+    \newfloat at replace@chapter@\Hy at org@chapter{hyperref}{#1}{#3}%
+    \newfloat at replace@chapter@\algocf at original@chapter{algorithm2e}{#1}{#3}%
   \endgroup}
 %    \end{macrocode}
 %    \begin{macrocode}
+\newcommand\newfloat at replace@chapter@[4]{%
+  \ifx\@tempa#1%
+    \newfloat at InfoNoLine{Document class `#3' detected (#2)}%
+    \global\def#1[##1]##2{#4}%
+    \global\let\newfloat at replace@chapter\newfloat at dont@replace at chapter
+    \global\let\newfloat at replace@chapter@\@gobblefour
+  \fi}
+%    \end{macrocode}
+%    \begin{macrocode}
 \newcommand\newfloat at dont@replace at chapter[3]{}
 %    \end{macrocode}
 %    \begin{macrocode}
@@ -1409,6 +1612,19 @@
 %    \end{macrocode}
 % \end{macro}
 %
+% \begin{macro}{\newfloat at dont@patch at chapter}
+% \changes{v1.2}{2023/10/01}{Detection of this macro added}
+% If |\newfloat at dont@patch at chapter| is defined, we don't try to patch |\chapter|
+% but assume that the document class is already using |\@add|\-|chapter|\-|lists|\-|gaps|
+% inside its definition of |\chapter|.
+%    \begin{macrocode}
+\ifcsname newfloat at dont@patch at chapter\endcsname
+  \newfloat at InfoNoLine{\noexpand\newfloat at dont@patch at chapter is set}
+  \let\newfloat at replace@chapter\newfloat at dont@replace at chapter
+\fi
+%    \end{macrocode}
+% \end{macro}
+%
 % \pagebreak[3]
 % \subsubsection{Standard \LaTeX{} document classes}
 %
@@ -1532,7 +1748,7 @@
 % \pagebreak[3]
 % \subsubsection{\KOMAScript{} document classes}
 %
-% If a \KOMAScript{} document class or the \package{tocbasic} package is used
+% If a \KOMAScript{} document class or the \pkg{tocbasic} package is used
 % we don't need to patch anything.
 % Instead we use |\setup|\-|toc| and |\un|\-|set|\-|toc| to setup the
 % chapters gap in |\@chapter|\-|lists|\-|gap at on| and |\@chapter|\-|lists|\-|gap at off|.
@@ -1544,7 +1760,7 @@
 % \pagebreak[3]
 % \subsubsection{memoir document classes}
 %
-% If the \package{memoir} document class is used,
+% If the \pkg{memoir} document class is used,
 % replacing |\insert|\-|chapter|\-|space| by |\@add|\-|chapter|\-|lists|\-|gaps| is sufficient.
 %    \begin{macrocode}
 \ifcsname insertchapterspace\endcsname
@@ -1715,7 +1931,7 @@
 %
 % \pagebreak[3]
 % \subsubsection{The Springer Verlag document classes}
-% \changes{v1.1f}{2019/08/25}{Support of \package{svmono} and \package{svmult} document classes added}
+% \changes{v1.1f}{2019/08/25}{Support of \pkg{svmono} and \pkg{svmult} document classes added}
 %
 %    \begin{macrocode}
 % svmono.cls [2018/06/25 v5.6 Springer Verlag global LaTeX document class for monographs]
@@ -1767,7 +1983,7 @@
 %
 % \pagebreak[3]
 % \subsubsection{The dgruyter package}
-% \changes{v1.1j}{2019/08/31}{Extended support of \package{dgruyter} package added}
+% \changes{v1.1j}{2019/08/31}{Extended support of \pkg{dgruyter} package added}
 %
 %    \begin{macrocode}
 % dgruyter.sty [2017/09/19 v2.00 De Gruyter layout]
@@ -1854,10 +2070,11 @@
     was already redefined by another package}
   \newfloat at InfoNoLine{\string\@chapter\space=\space\meaning\@chapter}
   \newfloat at InfoNoLine{\string\Hy at org@chapter\space=\space\meaning\Hy at org@chapter}
+  \newfloat at InfoNoLine{\string\algocf at original@chapter\space=\space\meaning\algocf at original@chapter}
 %    \end{macrocode}
 % Plan B: We patch |\add|\-|to|\-|contents| instead, and keep our fingers crossed
 % in the hope that this redefinition actually will fit.
-% (Note: Since \package{biblatex} patches |\add|\-|to|\-|contents| as well we do
+% (Note: Since \pkg{biblatex} patches |\add|\-|to|\-|contents| as well we do
 % this using |\At||Begin||Document|.)
 % \changes{v1.1f}{2019/08/25}{Plan B will now be done using \cs{AtBeginDocument}}
 %    \begin{macrocode}
@@ -1895,7 +2112,7 @@
 %
 % \begin{macro}{\beamer at float}
 % \changes{v1.1k}{2019/09/01}{This macro added}
-% Unfortunately the \class{beamer} document class does not offer
+% Unfortunately the \cls{beamer} document class does not offer
 % |\beamer at float| and |\end at beamer@float| (yet), so we have to define them
 % for ourself.
 % (This code was taken from beamerbaselocalstructure.sty [2019/07/23 v3.56] and adapted.)
@@ -1969,7 +2186,7 @@
 % \end{macro}
 %
 % \pagebreak[3]
-% \subsubsection{\package{dgruyter}}
+% \subsubsection{\pkg{dgruyter}}
 %
 % The De Gruyter layout package (for preparing books for Walter de Gruyter GmbH)
 % is defining |\plist at figure| and |\plist at table|, and expects this to be
@@ -1982,9 +2199,9 @@
 %    \end{macrocode}
 %
 % \pagebreak[3]
-% \subsubsection{\package{float}}
+% \subsubsection{\pkg{float}}
 %
-% If the \package{float} package is used we fill up |\float at exts| with our file
+% If the \pkg{float} package is used we fill up |\float at exts| with our file
 % extensions, too. Since this list will be used for inserting chapters gaps
 % we only add the ones which are configured for chapters gaps on.\par
 % Note: This has to be done |\At|\-|Begin|\-|Document| so the settings for
@@ -2002,7 +2219,7 @@
 %    \end{macrocode}
 %
 % \pagebreak[3]
-% \subsubsection{\package{fltpage}}
+% \subsubsection{\pkg{fltpage}}
 %
 % We define a FP-variant of new floating environments here.
 %    \begin{macrocode}
@@ -2012,10 +2229,10 @@
 %    \end{macrocode}
 %
 % \pagebreak[3]
-% \subsubsection{\package{listings}}
+% \subsubsection{\pkg{listings}}
 %
 % \begin{macro}{\ext at lstlisting}
-% Since the \package{listings} package do not define |\ext at lst|\-|listing|
+% Since the \pkg{listings} package do not define |\ext at lst|\-|listing|
 % but we needed it when |Setup|\-|Floating|\-|Environment{lst|\-|listing}{|\ldots|}|
 % will be done by the end user, we define it here.
 %    \begin{macrocode}
@@ -2024,7 +2241,7 @@
 % \end{macro}
 %
 % \pagebreak[3]
-% \subsubsection{\package{rotating}}
+% \subsubsection{\pkg{rotating}}
 %
 % We define a sideways-variant of new floating environments here.
 %    \begin{macrocode}
@@ -2034,7 +2251,7 @@
 %    \end{macrocode}
 %
 % \pagebreak[3]
-% \subsubsection{\package{sidecap}}
+% \subsubsection{\pkg{sidecap}}
 %
 % We define a SC-variant of new floating environments here.
 % \begin{macro}{\SC at float}
@@ -2055,7 +2272,7 @@
 % \end{macro}
 %
 % \pagebreak[3]
-% \subsubsection{\package{wrapfig}}
+% \subsubsection{\pkg{wrapfig}}
 %
 % We define a wrap-variant of new floating environments here.
 %    \begin{macrocode}
@@ -2074,3 +2291,4 @@
 % \Finale
 %
 \endinput
+

Modified: trunk/Master/texmf-dist/source/latex/newfloat/newfloat.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/newfloat/newfloat.ins	2023-10-02 19:44:41 UTC (rev 68433)
+++ trunk/Master/texmf-dist/source/latex/newfloat/newfloat.ins	2023-10-02 19:45:00 UTC (rev 68434)
@@ -6,7 +6,7 @@
 
 \preamble
 
-Copyright (C) 2011-2019 Axel Sommerfeldt (axel.sommerfeldt at f-m.fm)
+Copyright (C) 2011-2023 Axel Sommerfeldt (axel.sommerfeldt at f-m.fm)
 
 https://gitlab.com/axelsommerfeldt/newfloat
 
@@ -20,10 +20,8 @@
 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 work has the LPPL maintenance status "unmaintained".
 
-This Current Maintainer of this work is Axel Sommerfeldt.
-
 This work consists of the files newfloat.ins, newfloat.dtx,
 and the derived file newfloat.sty.
 
@@ -31,10 +29,13 @@
 
 \generate{\file{newfloat.sty}{\from{newfloat.dtx}{package}}}
 
+\generate{\file{newfloat_v1.0.sty}{\from{fallback/v1.0/newfloat.dtx}{package}}}
+\generate{\file{newfloat_v1.1.sty}{\from{fallback/v1.1/newfloat.dtx}{package}}}
+
 \Msg{***********************************************************}
 \Msg{*}
-\Msg{* To finish the installation you have to move the file}
-\Msg{* `newfloat.sty' into a directory searched by TeX.}
+\Msg{* To finish the installation you have to move the files}
+\Msg{* `*.sty' into a directory searched by TeX.}
 \Msg{*}
 \Msg{* To produce the documentation run the file}
 \Msg{* `newfloat.dtx' through LaTeX.}

Modified: trunk/Master/texmf-dist/tex/latex/newfloat/newfloat.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/newfloat/newfloat.sty	2023-10-02 19:44:41 UTC (rev 68433)
+++ trunk/Master/texmf-dist/tex/latex/newfloat/newfloat.sty	2023-10-02 19:45:00 UTC (rev 68434)
@@ -6,7 +6,7 @@
 %%
 %% newfloat.dtx  (with options: `package')
 %% 
-%% Copyright (C) 2011-2019 Axel Sommerfeldt (axel.sommerfeldt at f-m.fm)
+%% Copyright (C) 2011-2023 Axel Sommerfeldt (axel.sommerfeldt at f-m.fm)
 %% 
 %% https://gitlab.com/axelsommerfeldt/newfloat
 %% 
@@ -20,15 +20,18 @@
 %% 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 work has the LPPL maintenance status "unmaintained".
 %% 
-%% This Current Maintainer of this work is Axel Sommerfeldt.
-%% 
 %% This work consists of the files newfloat.ins, newfloat.dtx,
 %% and the derived file newfloat.sty.
 %% 
 \NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{newfloat}[2019/09/02 v1.1l Defining new floating environments (AR)]
+\providecommand\DeclareRelease[3]{}
+\providecommand\DeclareCurrentRelease[2]{}
+\DeclareRelease{v1.0}{2011-10-30}{newfloat_v1.0.sty}
+\DeclareRelease{v1.1}{2013-05-12}{newfloat_v1.1.sty}
+\DeclareCurrentRelease{v1.2}{2023-10-01}
+\ProvidesPackage{newfloat}[2023/10/01 v1.2 Defining new floating environments (AR)]
 \newcommand*\newfloat at Info[1]{%
   \PackageInfo{newfloat}{#1}}
 \newcommand*\newfloat at InfoNoLine[1]{%
@@ -76,8 +79,9 @@
    {\@nameuse{#2name}\nobreakspace\@nameuse{the#2}%
     \ifdefined\autodot\expandafter\autodot\fi}%
   \newfloat at capitalize\newfloat at Type{#2}%
-  \newfloat at let{#2name}{\newfloat at Type}%
-  \newfloat at def{fleg#2}{\@nameuse{#2name}}% legend naming (memoir)
+  \newfloat at let{#2name}{\newfloat at Type}%            \caption naming
+  \newfloat at def{#2autorefname}{\@nameuse{#2name}}%  \autoref naming (hyperref)
+  \newfloat at def{fleg#2}{\@nameuse{#2name}}%         \legend naming (memoir)
   \newfloat at ifundefined{flegtoc#2}{\@namedef{flegtoc#2}##1{}}%
   \ifcsname @tufte at float\endcsname
     \newenvironment{#2}[1][htbp]%
@@ -130,7 +134,7 @@
     {\newfloat at list@of{#1}*}%
     {\newfloat at list@of{#1}\relax}}
 \newcommand*\newfloat at list@of[1]{%
-  \@expandtwoargs\newfloat at list@of@{#1}{\@nameuse{ext@#1}}}
+  \@expandtwoargs\newfloat at list@of@{#1}{\newfloat at ext{#1}}}
 \newcommand*\newfloat at list@of@[3]{%
   \begingroup
     \expandafter\let\expandafter\listfigurename\csname list#1name\endcsname
@@ -162,8 +166,8 @@
   \ifcsname c at chapter\endcsname chapter\else none\fi}
 \@onlypreamble\newfloat at within@default
 \newcommand*\newfloat at setoption[1]{%
-  \edef\caption at tempa{\noexpand\@nameuse{newfloat at set#1}{\newfloat at type}}%
-  \caption at tempa}
+  \edef\newfloat at tempa{\noexpand\@nameuse{newfloat at set#1}{\newfloat at type}}%
+  \newfloat at tempa}
 \newcommand*\newfloat at setfileext[2]{%
   \@namedef{ext@#1}{#2}}
 \define at key{@newfloat}{fileext}{%
@@ -187,6 +191,14 @@
   \@namedef{#1name}{#2}}
 \define at key{@newfloat}{name}{%
   \newfloat at setoption{name}{#1}}
+\newcommand*\newfloat at setautorefname[2]{%
+  \@namedef{#1autorefname}{#2}}
+\define at key{@newfloat}{autorefname}{%
+  \newfloat at setoption{autorefname}{#1}}
+\newcommand*\newfloat at setlegendname[2]{%
+  \@namedef{fleg#1}{#2}}
+\define at key{@newfloat}{legendname}{%
+  \newfloat at setoption{legendname}{#1}}
 \newcommand*\newfloat at setplacement[2]{%
   \@namedef{fps@#1}{#2}}
 \define at key{@newfloat}{placement}{%
@@ -239,17 +251,23 @@
   \def\newfloat at within@value{none}}
 \newcommand*\newfloat at setchapterlistsgaps[2]{%
   \edef\@tempa{#2}%
-  \def\@tempb{off}%
+  \newfloat at setchapterlistsgaps@{off}{off}{#1}%
+  \newfloat at setchapterlistsgaps@{false}{off}{#1}%
+  \newfloat at setchapterlistsgaps@{on}{on}{#1}%
+  \newfloat at setchapterlistsgaps@{true}{on}{#1}%
+  \ifx\@tempa\newfloat at setchapterlistsgaps@ \else
+    \newfloat at Error{Invalid value `#2' for option `chapterlistsgaps'}%
+  \fi}
+\newcommand*\newfloat at setchapterlistsgaps@[3]{%
+  \def\@tempb{#1}%
   \ifx\@tempa\@tempb
-    \@chapterlistsgap at off{#1}%
-  \else
-    \def\@tempb{on}%
-    \ifx\@tempa\@tempb
-      \@chapterlistsgap at on{#1}%
-    \else
-      \newfloat at Error{Invalid value `#2' for option `chapterlistsgaps'}%
-    \fi
+    \newfloat at chapterlistsgap@{#2}{#3}%
+    \let\@tempa\newfloat at setchapterlistsgaps@
   \fi}
+\newcommand*\newfloat at chapterlistsgap@[1]{%
+  \@ifundefined{@chapterlistsgap@#1}%
+    {\@gobble}%
+    {\@nameuse{@chapterlistsgap@#1}}}
 \define at key{@newfloat}{chapterlistsgaps}{%
   \def\newfloat at chapterlistsgaps@value{#1}}
 \providecommand*\@removefromreset[2]{{%
@@ -264,8 +282,8 @@
 \newcommand*\newfloat at announce[2]{%
   \@cons\newfloat at list{{#1}}%
   \@cons\newfloat@@list{{#1}}%
-  \newfloat at ifundefined{newfloat at ext@#2}{%
-    \@namedef{newfloat at ext@#2}{#1}%
+  \newfloat at ifundefined{newfloat at env@#2}{%
+    \@namedef{newfloat at env@#2}{#1}%
     \ifcsname c at lofdepth\endcsname
       \newfloat at ifundefined{c@#2depth}{%
         \newcounter{#2depth}%
@@ -281,15 +299,16 @@
   \fi
   \newfloat at hook{#1}}
 \@onlypreamble\newfloat at announce
+\newcommand*\newfloat at ext[1]{\@nameuse{ext@#1}}
 \newcommand*\newfloat@@list{}
 \newcommand*\SetupFloatingEnvironment[1]{%
   \newfloat at addtolist{#1}%
   \newfloat at setoptions{#1}}
-\newcommand\ForEachFloatingEnvironment{%
+\newcommand*\ForEachFloatingEnvironment{%
   \@ifstar
-    {\@ForEachFloatingEnvironment\@gobble}%
-    {\@ForEachFloatingEnvironment\@iden}}
-\newcommand\@ForEachFloatingEnvironment[2]{%
+    {\newfloat at foreach\@gobble}%
+    {\newfloat at foreach\@iden}}
+\newcommand\newfloat at foreach[2]{%
   \def\@elt##1{#2}%
   \newfloat at list
   \let\@elt\relax
@@ -307,7 +326,7 @@
   \newfloat at ifinlist{#1}{}{%
     \ifcsname ext@#1\endcsname
       \@cons\newfloat at list{{#1}}%
-      \@namedef{newfloat at ext@\@nameuse{ext@#1}}{#1}%
+      \@namedef{newfloat at env@\@nameuse{ext@#1}}{#1}%
       \newfloat at let{@ifchapterlistsgap@#1}{\@iden}%
     \else
       \newfloat at Error{`#1' does not seem to be a floating environment}%
@@ -343,21 +362,24 @@
     \ifdim \@chapterlistsgap>\z@
       \addtocontents{#1}{\protect\addvspace{\@chapterlistsgap}}%
     \fi}
+  \ifcsname newfloat at dont@patch at chapter\endcsname
+    \let\@addchapterlistsgaps\@undefined % force a re-definition
+  \fi
   \providecommand*\@addchapterlistsgaps{%
     \begingroup
       \def\@elt##1{%
-        \@expandtwoargs\@addchapterlistsgap{##1}{\@nameuse{ext@##1}}}%
+        \@expandtwoargs\@addchapterlistsgap{##1}{\newfloat at ext{##1}}}%
       \newfloat at list
     \endgroup}
   \providecommand*\@chapterlistsgap at off[1]{%
     \expandafter\let\csname @ifchapterlistsgap@#1\endcsname\@gobble
     \ifcsname unsettoc\endcsname
-      \@expandtwoargs\unsettoc{\@nameuse{ext@#1}}{chapteratlist}%
+      \@expandtwoargs\unsettoc{\newfloat at ext{#1}}{chapteratlist}%
     \fi}
   \providecommand*\@chapterlistsgap at on[1]{%
     \expandafter\let\csname @ifchapterlistsgap@#1\endcsname\@iden
     \ifcsname setuptoc\endcsname
-      \@expandtwoargs\setuptoc{\@nameuse{ext@#1}}{chapteratlist}%
+      \@expandtwoargs\setuptoc{\newfloat at ext{#1}}{chapteratlist}%
     \fi}
 \fi
 \define at key{newfloat}{chapterlistsgap}{%
@@ -408,20 +430,25 @@
     \let\if at thema\iffalse
     \let\if at chapnum\iffalse
     \def\@tempa[##1]##2{#2}%
-    \ifx\@tempa\@chapter
-      \newfloat at InfoNoLine{Document class `#1' detected}%
-      \gdef\@chapter[##1]##2{#3}%
-      \global\let\newfloat at replace@chapter\newfloat at dont@replace at chapter
-    \else\ifx\@tempa\Hy at org@chapter
-      \newfloat at InfoNoLine{Document class `#1' detected (Hy)}%
-      \gdef\Hy at org@chapter[##1]##2{#3}%
-      \global\let\newfloat at replace@chapter\newfloat at dont@replace at chapter
-    \fi\fi
+    \newfloat at replace@chapter@\@chapter{original}{#1}{#3}%
+    \newfloat at replace@chapter@\Hy at org@chapter{hyperref}{#1}{#3}%
+    \newfloat at replace@chapter@\algocf at original@chapter{algorithm2e}{#1}{#3}%
   \endgroup}
+\newcommand\newfloat at replace@chapter@[4]{%
+  \ifx\@tempa#1%
+    \newfloat at InfoNoLine{Document class `#3' detected (#2)}%
+    \global\def#1[##1]##2{#4}%
+    \global\let\newfloat at replace@chapter\newfloat at dont@replace at chapter
+    \global\let\newfloat at replace@chapter@\@gobblefour
+  \fi}
 \newcommand\newfloat at dont@replace at chapter[3]{}
 \ifcsname @chapter\endcsname \else
   \let\newfloat at replace@chapter\newfloat at dont@replace at chapter
 \fi
+\ifcsname newfloat at dont@patch at chapter\endcsname
+  \newfloat at InfoNoLine{\noexpand\newfloat at dont@patch at chapter is set}
+  \let\newfloat at replace@chapter\newfloat at dont@replace at chapter
+\fi
 \newfloat at replace@chapter{report}{%
   \ifnum \c at secnumdepth >\m at ne
     \refstepcounter{chapter}%
@@ -788,6 +815,7 @@
     was already redefined by another package}
   \newfloat at InfoNoLine{\string\@chapter\space=\space\meaning\@chapter}
   \newfloat at InfoNoLine{\string\Hy at org@chapter\space=\space\meaning\Hy at org@chapter}
+  \newfloat at InfoNoLine{\string\algocf at original@chapter\space=\space\meaning\algocf at original@chapter}
   \newfloat at ifplanb{\AtBeginDocument{%
     \newfloat at InfoNoLine{Trying Plan B..}%
     \let\newfloat at addtocontents@ORI\addtocontents

Added: trunk/Master/texmf-dist/tex/latex/newfloat/newfloat_v1.0.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/newfloat/newfloat_v1.0.sty	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/newfloat/newfloat_v1.0.sty	2023-10-02 19:45:00 UTC (rev 68434)
@@ -0,0 +1,698 @@
+%%
+%% This is file `newfloat_v1.0.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% fallback/v1.0/newfloat.dtx  (with options: `package')
+%% 
+%% Copyright (C) 2011-2021 Axel Sommerfeldt (axel.sommerfeldt at f-m.fm)
+%% 
+%% https://gitlab.com/axelsommerfeldt/newfloat
+%% 
+%% --------------------------------------------------------------------------
+%% 
+%% 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 "unmaintained".
+%% 
+%% This work consists of the files newfloat.ins, newfloat.dtx,
+%% and the derived file newfloat.sty.
+%% 
+\NeedsTeXFormat{LaTeX2e}[1994/12/01]
+\ProvidesPackage{newfloat}[2012/05/19 v1.0b Defining new floating environments (AR)]
+\newcommand*\newfloat at Info[1]{%
+  \PackageInfo{newfloat}{#1}}
+\newcommand*\newfloat at InfoNoLine[1]{%
+  \newfloat at Info{#1\@gobble}}
+\newcommand*\newfloat at Error[1]{%
+  \PackageError{newfloat}{#1}\newfloat at eh}
+\newcommand*\newfloat at 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 at Info{New float `#2' with options `#1'}%
+  \edef\newfloat at Type{\def\noexpand\newfloat at Type{\@car#2\@nil}}%
+  \uppercase\expandafter{\newfloat at Type}%
+  \edef\@tempa{%
+    \noexpand\g at addto@macro\noexpand\newfloat at Type{\@cdr#2\@nil}}%
+  \@tempa
+  \newcounter{#2}%
+  \ifdefined\c at float@type % from float package
+    \expandafter\edef\csname ftype@#2\endcsname{\the\value{float at type}}%
+    \addtocounter{float at type}{\value{float at type}}%
+  \else\ifdefined\c at newflo@tctr % from memoir document class
+    \expandafter\edef\csname ftype@#2\endcsname{\the\c at newflo@tctr}%
+    \advance\c at newflo@tctr \c at newflo@tctr
+  \else
+    \ifdefined\newfloat at ftype \else
+      \newcount\newfloat at ftype
+      \newfloat at ftype=8\relax
+    \fi
+    \expandafter\xdef\csname ftype@#2\endcsname{\the\newfloat at ftype}%
+    \advance\newfloat at ftype\newfloat at ftype
+  \fi\fi
+  \newfloat at 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 at Type
+  \@namedef{fleg#2}{\@nameuse{#2name}}% legend naming (memoir)
+  \@namedef{flegtoc#2}##1{}%
+  \newenvironment{#2}{\@float{#2}}{\end at float}%
+  \newenvironment{#2*}{\@dblfloat{#2}}{\end at dblfloat}%
+  \expandafter\newcommand\csname listof#2s\endcsname{\newfloat at listof{#2}}%
+  \expandafter\newcommand\csname listof#2es\endcsname{\newfloat at listof{#2}}%
+  \ifdefined\l at figure
+    \expandafter\let\csname l@#2\endcsname\l at 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 at Type s}%
+  \expandafter\let\csname fst@#2\endcsname\@undefined
+  \newfloat at setplacement{#2}{tbp}%
+  \newfloat at setfileext{#2}{lo#2}%
+  \newfloat at setoptions*{#2}{#1}%
+  \@expandtwoargs\newfloat at announce{#2}{\@nameuse{ext@#2}}%
+  \@ifnextchar[\newfloat at DFE@setname\relax}
+\@onlypreamble\@DeclareFloatingEnvironment
+\def\newfloat at DFE@setname[#1]{%
+  \KV@@newfloat at name{#1}%
+  \@ifnextchar[\newfloat at DFE@setlistname\relax}
+\@onlypreamble\newfloat at DFE@setname
+\def\newfloat at DFE@setlistname[#1]{%
+  \KV@@newfloat at listname{#1}}
+\@onlypreamble\newfloat at DFE@setlistname
+\newcommand*\newfloat at 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 at figure\csname ext@#1\endcsname
+      \let\newfloat at ORI@starttoc\@starttoc
+      \renewcommand*\@starttoc[1]{%
+        \expandafter\newfloat at ORI@starttoc\expandafter{\ext at figure}}%
+      \listoffigures
+    \endgroup
+  \fi}
+\newcommand*\newfloat at setoptions{%
+  \@ifstar
+    {\newfloat@@setoptions\@firstofone}%
+    {\newfloat@@setoptions\@gobble}}
+\newcommand*\newfloat@@setoptions[3]{%
+  \let\newfloat at within@value\@undefined
+  \let\newfloat at chapterlistsgaps@value\@undefined
+  #1{\KV@@newfloat at within\newfloat at within@default}% set default value for new floats
+  \def\newfloat at type{#2}%
+  \setkeys{@newfloat}{#3}%
+  \ifx\newfloat at within@value\@undefined \else
+    \newfloat at setoption{within}\newfloat at within@value
+  \fi
+  \ifx\newfloat at chapterlistsgaps@value\@undefined \else
+    \newfloat at setoption{chapterlistsgaps}\newfloat at chapterlistsgaps@value
+  \fi}
+\newcommand*\newfloat at within@default{%
+  \ifcsname c at chapter\endcsname chapter\else none\fi}
+\@onlypreamble\newfloat at within@default
+\newcommand*\newfloat at setoption[1]{%
+  \expandafter\@expandtwoargs\csname newfloat at set#1\endcsname\newfloat at type}
+\newcommand*\newfloat at setfileext[2]{%
+  \@namedef{ext@#1}{#2}}
+\define at key{@newfloat}{fileext}{%
+  \newfloat at setoption{fileext}{#1}}
+\newcommand*\newfloat at setlistname[2]{%
+  \@namedef{list#1name}{#2}}
+\define at key{@newfloat}{listname}{%
+  \newfloat at setoption{listname}{#1}}
+\newcommand*\newfloat at setname[2]{%
+  \newfloat@@setname{#1}{#2}%
+  \begingroup
+    \ifcsname languagename\endcsname
+      \ifcsname captions\languagename\endcsname
+        \expandafter\g at addto@macro\csname captions\languagename\endcsname
+          {\newfloat@@setname{#1}{#2}}%
+      \fi
+    \fi
+  \endgroup}
+%%\AtBeginDocument{\let\newfloat at setname\newfloat@@setname}
+\newcommand*\newfloat@@setname[2]{%
+  \@namedef{#1name}{#2}}
+\define at key{@newfloat}{name}{%
+  \newfloat at setoption{name}{#1}}
+\newcommand*\newfloat at setplacement[2]{%
+  \@namedef{fps@#1}{#2}}
+\define at key{@newfloat}{placement}{%
+  \newfloat at setoption{placement}{#1}}
+\newcommand*\newfloat at setwithin[2]{%
+  \ifcsname c at 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 at chapter\endcsname
+      \@chapterlistsgap at off{#1}%
+    \fi
+    \newfloat@@setwithin{#1}{}{}%
+  \else
+    \def\@tempb{chapter}%
+    \ifx\@tempa\@tempb
+      \@addtoreset{#1}{chapter}%
+      \@chapterlistsgap at on{#1}%
+      \newfloat@@setwithin{#1}{\ifnum\c at chapter>\z@ \thechapter.\fi}{\theHchapter.}%
+    \else
+      \def\@tempb{section}%
+      \ifx\@tempa\@tempb
+        \@addtoreset{#1}{section}%
+        \ifcsname c at chapter\endcsname
+          \@addtoreset{#1}{chapter}%
+          \@chapterlistsgap at on{#1}%
+          \newfloat@@setwithin{#1}{\thesection.}{\theHsection.}%
+        \else
+          \newfloat@@setwithin{#1}{\ifnum\c at section>\z@ \thesection.\fi}{\theHsection.}%
+        \fi
+      \else
+        \newfloat at 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 at key{@newfloat}{within}{%
+  \def\newfloat at within@value{#1}}
+\newcommand*\newfloat at setwithout[1]{%
+  \newfloat at setwithin{#1}{none}}
+\define at key{@newfloat}{without}[]{%
+  \def\newfloat at within@value{none}}
+\newcommand*\newfloat at setchapterlistsgaps[2]{%
+  \edef\@tempa{#2}%
+  \def\@tempb{off}%
+  \ifx\@tempa\@tempb
+    \@chapterlistsgap at off{#1}%
+  \else
+    \def\@tempb{on}%
+    \ifx\@tempa\@tempb
+      \@chapterlistsgap at on{#1}%
+    \else
+      \newfloat at Error{Invalid value `#2' for option `chapterlistsgaps'}%
+    \fi
+  \fi}
+\define at key{@newfloat}{chapterlistsgaps}{%
+  \def\newfloat at 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 at announce[2]{%
+  \@cons\newfloat at list{{#1}}%
+  \@cons\newfloat@@list{{#1}}%
+  \@ifundefined{newfloat at ext@#2}{%
+    \@namedef{newfloat at ext@#2}{#1}%
+    \ifcsname c at 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 at hook{#1}}
+\@onlypreamble\newfloat at announce
+\newcommand*\newfloat@@list{}
+\newcommand*\SetupFloatingEnvironment[1]{%
+  \newfloat at addtolist{#1}%
+  \newfloat at setoptions{#1}}
+\newcommand\ForEachFloatingEnvironment{%
+  \@ifstar
+    {\@ForEachFloatingEnvironment\@gobble}%
+    {\@ForEachFloatingEnvironment\@iden}}
+\newcommand\@ForEachFloatingEnvironment[2]{%
+  \def\@elt##1{#2}%
+  \newfloat at list
+  \let\@elt\relax
+  #1{\newfloat at addtohook{#2}}}
+\providecommand\newfloat at addtohook[1]{%
+  \toks@=\expandafter{\newfloat at hook{##1}#1}%
+  \edef\@tempa{\def\noexpand\newfloat at hook####1{\the\toks@}}%
+  \@tempa}
+\providecommand*\newfloat at hook[1]{}
+\newcommand*\newfloat at list{}
+\newcommand*\newfloat at addtolist[1]{%
+  \newfloat at ifinlist{#1}{}{%
+    \ifcsname ext@#1\endcsname
+      \@cons\newfloat at list{{#1}}%
+      \@namedef{newfloat at ext@\@nameuse{ext@#1}}{#1}%
+      \@ifundefined{@ifchapterlistsgap@#1}{%
+        \expandafter\let\csname @ifchapterlistsgap@#1\endcsname\@iden}{}%
+    \else
+      \newfloat at Error{`#1' does not seem to be a floating environment}%
+    \fi}}
+\newcommand*\newfloat at ifinlist[1]{%
+  \let\next\@secondoftwo
+  \begingroup
+    \expandafter\let\csname c@#1\endcsname\newfloat at ifinlist
+    \def\@elt##1{%
+      \expandafter\ifx\csname c@##1\endcsname\newfloat at ifinlist
+        \global\let\next\@firstoftwo
+      \fi}%
+    \newfloat at list
+  \endgroup
+  \next}
+\ifcsname ext at figure\endcsname
+  \newfloat at addtolist{figure}
+\fi
+\ifcsname ext at table\endcsname
+  \newfloat at 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}{#1}%
+      \@@@addchapterlistsgap{#2}}{}}
+  \providecommand*\@@@addchapterlistsgap[1]{%
+    \ifdim \@chapterlistsgap>\z@
+      \addtocontents{#1}{\protect\addvspace{\@chapterlistsgap}}%
+    \fi}
+  \providecommand*\@addchapterlistsgaps{%
+    \begingroup
+      \def\@elt##1{%
+        \@expandtwoargs\@addchapterlistsgap{##1}{\@nameuse{ext@##1}}}%
+      \newfloat at list
+    \endgroup}
+  \providecommand*\@chapterlistsgap at off[1]{%
+    \expandafter\let\csname @ifchapterlistsgap@#1\endcsname\@gobble
+    \ifcsname unsettoc\endcsname
+      \@expandtwoargs\unsettoc{\@nameuse{ext@#1}}{chapteratlist}%
+    \fi}
+  \providecommand*\@chapterlistsgap at on[1]{%
+    \expandafter\let\csname @ifchapterlistsgap@#1\endcsname\@iden
+    \ifcsname setuptoc\endcsname
+      \@expandtwoargs\setuptoc{\@nameuse{ext@#1}}{chapteratlist}%
+    \fi}
+\fi
+\define at key{newfloat}{chapterlistsgap}{%
+  \renewcommand*\@chapterlistsgap{#1}}
+\define at key{newfloat}{within}{%
+  \def\newfloat at within@default{#1}% set new default value
+  \def\@elt##1{\newfloat at setwithin{##1}{#1}}%
+  \newfloat at list
+  \let\@elt\relax}
+\define at key{newfloat}{without}[]{%
+  \KV at newfloat@within{none}}
+\def\@elt#1{%
+  \define at key{newfloat}{#1name}{%
+    \newfloat at setname{#1}{##1}}%
+  \define at key{newfloat}{list#1name}{%
+    \newfloat at setname{list#1}{##1}}%
+  \define at key{newfloat}{#1within}{%
+    \newfloat at setwithin{#1}{##1}}%
+  \define at key{newfloat}{#1without}[]{%
+    \newfloat at setwithout{#1}}%
+}%
+\newfloat at list
+\let\@elt\relax
+\define at key{newfloat}{planb}[true]{%
+  \def\@tempa{#1}%
+  \def\@tempb{false}%
+  \ifx\@tempa\@tempb
+    \let\newfloat at ifplanb\@gobble
+  \else
+    \def\@tempb{true}%
+    \ifx\@tempa\@tempb
+      \let\newfloat at ifplanb\@iden
+    \else
+      \newfloat at Error{Invalid value `#1' for option `planb'}%
+    \fi
+  \fi}
+\define at key{newfloat}{planb-fileext}{%
+  \newfloat at Info{Setting Plan B file extension to `#1'}
+  \xdef\newfloat at addtocontents@ext{#1}}
+
+\let\@tempc\relax
+\@expandtwoargs\setkeys{newfloat}{planb,\@ptionlist{\@currname.\@currext}}%
+\AtEndOfPackage{\let\@unprocessedoptions\relax}
+\newcommand*\newfloatsetup{\setkeys{newfloat}}
+\newcommand\newfloat at replace@chapter[2]{%
+  \begingroup
+    \let\if at twocolumn\iffalse
+    \let\if at mainmatter\iffalse
+    \let\if at thema\iffalse
+    \def\@tempa[##1]##2{#1}%
+    \ifx\@tempa\@chapter
+      \gdef\@chapter[##1]##2{#2}%
+      \global\let\newfloat at replace@chapter\@gobbletwo
+    \else\ifx\@tempa\Hy at org@chapter
+      \gdef\Hy at org@chapter[##1]##2{#2}%
+      \global\let\newfloat at replace@chapter\@gobbletwo
+    \fi\fi
+  \endgroup}
+\ifcsname @chapter\endcsname \else
+  \let\newfloat at replace@chapter\@gobbletwo
+\fi
+\newfloat at replace@chapter{%
+  \ifnum \c at secnumdepth >\m at 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 at twocolumn
+    \@topnewpage[\@makechapterhead{#2}]%
+  \else
+    \@makechapterhead{#2}%
+    \@afterheading
+  \fi
+}{%
+  \ifnum \c at secnumdepth >\m at ne
+    \refstepcounter{chapter}%
+    \typeout{\@chapapp\space\thechapter.}%
+    \addcontentsline{toc}{chapter}%
+      {\protect\numberline{\thechapter}#1}%
+  \else
+    \addcontentsline{toc}{chapter}{#1}%
+  \fi
+  \chaptermark{#1}%
+  \@addchapterlistsgaps
+  \if at twocolumn
+    \@topnewpage[\@makechapterhead{#2}]%
+  \else
+    \@makechapterhead{#2}%
+    \@afterheading
+  \fi}
+\newfloat at replace@chapter{%
+  \ifnum \c at secnumdepth >\m at ne
+    \if at 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 at twocolumn
+    \@topnewpage[\@makechapterhead{#2}]%
+  \else
+    \@makechapterhead{#2}%
+    \@afterheading
+  \fi
+}{%
+  \ifnum \c at secnumdepth >\m at ne
+    \if at 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 at twocolumn
+    \@topnewpage[\@makechapterhead{#2}]%
+  \else
+    \@makechapterhead{#2}%
+    \@afterheading
+  \fi}
+\newfloat at replace@chapter{%
+  \refstepcounter{chapter}%
+  \ifnum\c at 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 at 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 at replace@chapter\@gobbletwo}{}
+\ifcsname insertchapterspace\endcsname
+  \renewcommand*\insertchapterspace{\@addchapterlistsgaps}
+  \let\newfloat at replace@chapter\@gobbletwo
+\fi
+\newfloat at replace@chapter{%
+  \ifnum \c at secnumdepth >\m at ne
+    \refstepcounter{chapter}%
+    \typeout{\@chapapp\space\thechapter.}%
+    \addcontentsline{toc}{chapter}%
+      {\protect\numberline{\thechapter}\toc at font0 #1}%
+  \else
+    \addcontentsline{toc}{chapter}{\toc at font0 #1}%
+  \fi
+  \chaptermark{#1}%
+  \addtocontents{lof}{\protect\addvspace{10\p@}}%
+  \addtocontents{lot}{\protect\addvspace{10\p@}}%
+  \if at twocolumn
+    \@topnewpage[\@makechapterhead{#2}]%
+  \else
+    \@makechapterhead{#2}%
+    \@afterheading
+  \fi
+}{%
+  \ifnum \c at secnumdepth >\m at ne
+    \refstepcounter{chapter}%
+    \typeout{\@chapapp\space\thechapter.}%
+    \addcontentsline{toc}{chapter}%
+      {\protect\numberline{\thechapter}\toc at font0 #1}%
+  \else
+    \addcontentsline{toc}{chapter}{\toc at font0 #1}%
+  \fi
+  \chaptermark{#1}%
+  \@addchapterlistsgaps
+  \if at twocolumn
+    \@topnewpage[\@makechapterhead{#2}]%
+  \else
+    \@makechapterhead{#2}%
+    \@afterheading
+  \fi}
+  % boek(3).cls [2004/06/07 v2.1a NTG LaTeX document class]
+\newfloat at replace@chapter{%
+  \ifnum \c at secnumdepth >\m at ne
+    \if at mainmatter
+      \refstepcounter{chapter}%
+      \typeout{\@chapapp\space\thechapter.}%
+      \addcontentsline{toc}{chapter}%
+        {\protect\numberline{\thechapter}\toc at font0 #1}%
+    \else
+      \addcontentsline{toc}{chapter}{\toc at font0 #1}%
+    \fi
+  \else
+    \addcontentsline{toc}{chapter}{\toc at font0 #1}%
+  \fi
+  \chaptermark{#1}%
+  \addtocontents{lof}{\protect\addvspace{10\p@}}%
+  \addtocontents{lot}{\protect\addvspace{10\p@}}%
+  \if at twocolumn
+    \@topnewpage[\@makechapterhead{#2}]%
+  \else
+    \@makechapterhead{#2}%
+    \@afterheading
+  \fi
+}{%
+  \ifnum \c at secnumdepth >\m at ne
+    \if at mainmatter
+      \refstepcounter{chapter}%
+      \typeout{\@chapapp\space\thechapter.}%
+      \addcontentsline{toc}{chapter}%
+        {\protect\numberline{\thechapter}\toc at font0 #1}%
+    \else
+      \addcontentsline{toc}{chapter}{\toc at font0 #1}%
+    \fi
+  \else
+    \addcontentsline{toc}{chapter}{\toc at font0 #1}%
+  \fi
+  \chaptermark{#1}%
+  \@addchapterlistsgaps
+  \if at twocolumn
+    \@topnewpage[\@makechapterhead{#2}]%
+  \else
+    \@makechapterhead{#2}%
+    \@afterheading
+  \fi}
+\newfloat at replace@chapter{%
+  \ifnum \c at secnumdepth >\m at ne
+    \if at mainmatter
+      \refstepcounter{chapter}%
+      \typeout{\chaptername\space\thechapter.}
+      \if at 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 at twocolumn
+    \@topnewpage[\@makechapterhead{#2}]
+  \else
+    \@makechapterhead{#2}
+    \@afterheading
+  \fi
+}{%
+  \ifnum \c at secnumdepth >\m at ne
+    \if at mainmatter
+      \refstepcounter{chapter}%
+      \typeout{\chaptername\space\thechapter.}%
+      \if at 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 at twocolumn
+    \@topnewpage[\@makechapterhead{#2}]%
+  \else
+    \@makechapterhead{#2}%
+    \@afterheading
+  \fi}
+\ifx\newfloat at replace@chapter\@gobbletwo \else
+  \newfloat at InfoNoLine{%
+   Unsupported document class, or \noexpand\@chapter\MessageBreak
+   was already redefined by another package}
+  \newfloat at InfoNoLine{\string\@chapter\space=\space\meaning\@chapter}
+  \newfloat at InfoNoLine{\string\Hy at org@chapter\space=\space\meaning\Hy at org@chapter}
+  \newfloat at ifplanb{%
+    \newfloat at InfoNoLine{Trying Plan B..}%
+    \let\newfloat at addtocontents@ORI\addtocontents
+    \long\def\addtocontents#1#2{%
+      \newfloat at addtocontents{#1}{#2}#2\addvspace\newfloat at nil}%
+    \long\def\newfloat at addtocontents#1#2#3\addvspace#4\newfloat at nil{%
+      \def\newfloat at tempa{#4}%
+      \ifx\newfloat at tempa\@empty
+        \newfloat at addtocontents@ORI{#1}{#2}%
+      \else
+        \ifx\newfloat at addtocontents@ext\@undefined
+          \newfloat at Info{Setting Plan B file extension to `#1'...}%
+          \xdef\newfloat at addtocontents@ext{#1}%
+        \fi
+        \edef\newfloat at tempa{#1}%
+        \ifx\newfloat at tempa\newfloat at addtocontents@ext
+          \begingroup
+            \let\addtocontents\newfloat at addtocontents@ORI
+            \@addchapterlistsgaps
+          \endgroup
+        \fi
+      \fi}}
+\fi
+\newcommand\newfloat at ForEachNew[2][newfloat@@list]{%
+  \AtBeginDocument{%
+    \ifcsname#1\endcsname
+      \def\@elt##1{#2}%
+      \newfloat@@list
+      \let\@elt\relax
+    \fi}}%
+\@onlypreamble\newfloat at ForEachNew
+%%    \begin{macrocode}
+\newfloat at ForEachNew[float at exts]{%
+  \@nameuse{@ifchapterlistsgap@#1}{% if switched on
+    \let\float at do=\relax
+    \edef\@tempa{%
+      \noexpand\float at exts{\the\float at exts\float at do{\@nameuse{ext@#1}}}}%
+    \@tempa}}
+\newfloat at ForEachNew[FP at floatBegin]{%
+  \newcounter{FP@#1C}%
+  \newenvironment{FP#1}{\FP at floatBegin{#1}}{\FP at floatEnd}}
+\providecommand*\ext at lstlisting{lol}%
+\newfloat at ForEachNew[@rotfloat]{%
+  \newenvironment{sideways#1}{\@rotfloat{#1}}{\end at rotfloat}%
+  \newenvironment{sideways#1*}{\@rotdblfloat{#1}}{\end at rotdblfloat}}
+\newcommand*\newfloat at For@SC[2]{%
+  \def#1{b}% = \sidecaptionvpos{#2}{b} (v1.6)
+  \newenvironment{SC#2}%
+    {\SC at float[#1]{#2}}{\endSC at float}%
+  \newenvironment{SC#2*}%
+    {\SC at dblfloat[#1]{#2}}{\endSC at dblfloat}}
+\@onlypreamble\newfloat at For@SC
+\newfloat at ForEachNew[SC at float]{%
+  \expandafter\newfloat at For@SC\csname SC@#1 at vpos\endcsname{#1}}
+\newfloat at ForEachNew[wrapfloat]{%
+  \newenvironment{wrap#1}{\wrapfloat{#1}}{\endwrapfloat}}
+\endinput
+%%
+%% End of file `newfloat_v1.0.sty'.


Property changes on: trunk/Master/texmf-dist/tex/latex/newfloat/newfloat_v1.0.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/newfloat/newfloat_v1.1.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/newfloat/newfloat_v1.1.sty	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/newfloat/newfloat_v1.1.sty	2023-10-02 19:45:00 UTC (rev 68434)
@@ -0,0 +1,896 @@
+%%
+%% This is file `newfloat_v1.1.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% fallback/v1.1/newfloat.dtx  (with options: `package')
+%% 
+%% Copyright (C) 2011-2021 Axel Sommerfeldt (axel.sommerfeldt at f-m.fm)
+%% 
+%% https://gitlab.com/axelsommerfeldt/newfloat
+%% 
+%% --------------------------------------------------------------------------
+%% 
+%% 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 "unmaintained".
+%% 
+%% This work consists of the files newfloat.ins, newfloat.dtx,
+%% and the derived file newfloat.sty.
+%% 
+\NeedsTeXFormat{LaTeX2e}[1994/12/01]
+\providecommand\DeclareRelease[3]{}
+\providecommand\DeclareCurrentRelease[2]{}
+\DeclareRelease{v1.0}{2011-10-30}{newfloat_v1.0.sty}
+\DeclareCurrentRelease{v1.1}{2013-05-12} % 1st CTAN release of v1.1
+\ProvidesPackage{newfloat}[2021/02/27 v1.1p Defining new floating environments (AR)]
+\newcommand*\newfloat at Info[1]{%
+  \PackageInfo{newfloat}{#1}}
+\newcommand*\newfloat at InfoNoLine[1]{%
+  \newfloat at Info{#1\@gobble}}
+\newcommand*\newfloat at Warning[1]{%
+  \PackageWarning{newfloat}{#1}}
+\newcommand*\newfloat at WarningNoLine[1]{%
+  \newfloat at Warning{#1\@gobble}}
+\newcommand*\newfloat at Error[1]{%
+  \PackageError{newfloat}{#1}\newfloat at eh}
+\newcommand*\newfloat at 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*\newfloat at def[2]{%
+  \newfloat at ifundefined{#1}{%
+    \@namedef{#1}{#2}}}
+\newcommand*\newfloat at let[2]{%
+  \newfloat at ifundefined{#1}{%
+    \expandafter\let\csname #1\endcsname#2}}
+\newcommand*\newfloat at ifundefined[2]{%
+  \@ifundefined{#1}{#2}{%
+    \newfloat at Info{%
+      \expandafter\string\csname#1\endcsname\space is already defined}}}
+\newcommand*\DeclareFloatingEnvironment{%
+  \@testopt\@DeclareFloatingEnvironment{}}
+\@onlypreamble\DeclareFloatingEnvironment
+\def\@DeclareFloatingEnvironment[#1]#2{%
+  \newfloat at Info{New float `#2' with options `#1'}%
+  \newfloat at ifundefined{c@#2}{\newcounter{#2}}%
+  \@ifundefined{c at float@type}%     from float package
+    {\@ifundefined{c at newflo@tctr}% from memoir document class
+       {\ifdefined\newfloat at ftype \else
+          \newcount\newfloat at ftype
+          \newfloat at ftype=8\relax
+        \fi
+        \expandafter\xdef\csname ftype@#2\endcsname{\the\newfloat at ftype}%
+        \advance\newfloat at ftype\newfloat at ftype}%
+       {\expandafter\edef\csname ftype@#2\endcsname{\the\c at newflo@tctr}%
+        \advance\c at newflo@tctr \c at newflo@tctr}}%
+    {\expandafter\edef\csname ftype@#2\endcsname{\the\value{float at type}}%
+     \addtocounter{float at type}{\value{float at type}}}%
+  \newfloat at Info{float type `#2'=\@nameuse{ftype@#2}}%
+  \newfloat at def{fnum@#2}%
+   {\@nameuse{#2name}\nobreakspace\@nameuse{the#2}%
+    \ifdefined\autodot\expandafter\autodot\fi}%
+  \newfloat at capitalize\newfloat at Type{#2}%
+  \newfloat at let{#2name}{\newfloat at Type}%
+  \newfloat at def{fleg#2}{\@nameuse{#2name}}% legend naming (memoir)
+  \newfloat at ifundefined{flegtoc#2}{\@namedef{flegtoc#2}##1{}}%
+  \ifcsname @tufte at float\endcsname
+    \newenvironment{#2}[1][htbp]%
+      {\begin{@tufte at float}[{##1}]{#2}{}}%
+      {\end{@tufte at float}}%
+    \newenvironment{#2*}[1][htbp]%
+      {\begin{@tufte at float}[{##1}]{#2}{star}}%
+      {\end{@tufte at float}}%
+  \else
+    \@ifclassloaded{beamer}{%
+      \newenvironment{#2}[1][]{\beamer at float{#2}}{\end at beamer@float}%
+    }{%
+      \newenvironment{#2}{\@float{#2}}{\end at float}%
+      \newenvironment{#2*}{\@dblfloat{#2}}{\end at dblfloat}%
+    }%
+  \fi
+  \newfloat at def{listof#2}{\newfloat at listof{#2}}%
+  \newfloat at def{listof#2s}{\@nameuse{listof#2}}%
+  \newfloat at def{listof#2es}{\@nameuse{listof#2s}}%
+  \newfloat at def{newfloat at listof#2 at hook}{}%
+  \ifdefined\l at figure
+    \newfloat at let{l@#2}{\l at figure}%
+  \else
+    \newfloat at def{l@#2}{\@dottedtocline{1}{1.5em}{2.3em}}%
+  \fi
+  \edef\newfloat at tempa{List of \newfloat at Type s}%
+  \newfloat at let{list#2name}{\newfloat at tempa}%
+  \expandafter\let\csname fst@#2\endcsname\@undefined
+  \newfloat at ifundefined{fps@#2}{\newfloat at setplacement{#2}{tbp}}%
+  \newfloat at ifundefined{ext@#2}{\newfloat at setfileext{#2}{lo#2}}%
+  \newfloat at setoptions*{#2}{#1}%
+  \@expandtwoargs\newfloat at announce{#2}{\@nameuse{ext@#2}}%
+  \@ifnextchar[\newfloat at DFE@setname\relax}
+\@onlypreamble\@DeclareFloatingEnvironment
+\def\newfloat at DFE@setname[#1]{%
+  \KV@@newfloat at name{#1}%
+  \@ifnextchar[\newfloat at DFE@setlistname\relax}
+\@onlypreamble\newfloat at DFE@setname
+\def\newfloat at DFE@setlistname[#1]{%
+  \KV@@newfloat at listname{#1}}
+\@onlypreamble\newfloat at DFE@setlistname
+\newcommand*\newfloat at capitalize[2]{%
+  \edef\newfloat at tempa{\gdef\noexpand#1{\@car#2\@nil}}%
+  \uppercase\expandafter{\newfloat at tempa}%
+  \edef\newfloat at tempa{%
+    \noexpand\g at addto@macro\noexpand#1{\@cdr#2\@nil}}%
+  \newfloat at tempa}
+\newcommand*\newfloat at listof[1]{%
+  \@ifstar
+    {\newfloat at list@of{#1}*}%
+    {\newfloat at list@of{#1}\relax}}
+\newcommand*\newfloat at list@of[1]{%
+  \@expandtwoargs\newfloat at list@of@{#1}{\newfloat at ext{#1}}}
+\newcommand*\newfloat at list@of@[3]{%
+  \begingroup
+    \expandafter\let\expandafter\listfigurename\csname list#1name\endcsname
+    \def\ext at figure{#2}%
+    \let\newfloat at starttoc\@starttoc
+    \def\@starttoc##1{\newfloat at starttoc{#2}}%
+    \let\newfloat at listoftoc\listoftoc
+    \def\listoftoc##1{\newfloat at listoftoc{#2}}%
+    \@nameuse{newfloat at listof#1 at hook}%
+    \listoffigures#3%
+  \endgroup}
+\newcommand*\newfloat at setoptions{%
+  \@ifstar
+    {\newfloat@@setoptions\@firstofone}%
+    {\newfloat@@setoptions\@gobble}}
+\newcommand*\newfloat@@setoptions[3]{%
+  \let\newfloat at within@value\@undefined
+  \let\newfloat at chapterlistsgaps@value\@undefined
+  #1{\KV@@newfloat at within\newfloat at within@default}% set default value for new floats
+  \def\newfloat at type{#2}%
+  \setkeys{@newfloat}{#3}%
+  \ifx\newfloat at within@value\@undefined \else
+    \newfloat at setoption{within}\newfloat at within@value
+  \fi
+  \ifx\newfloat at chapterlistsgaps@value\@undefined \else
+    \newfloat at setoption{chapterlistsgaps}\newfloat at chapterlistsgaps@value
+  \fi}
+\newcommand*\newfloat at within@default{%
+  \ifcsname c at chapter\endcsname chapter\else none\fi}
+\@onlypreamble\newfloat at within@default
+\newcommand*\newfloat at setoption[1]{%
+  \edef\newfloat at tempa{\noexpand\@nameuse{newfloat at set#1}{\newfloat at type}}%
+  \newfloat at tempa}
+\newcommand*\newfloat at setfileext[2]{%
+  \@namedef{ext@#1}{#2}}
+\define at key{@newfloat}{fileext}{%
+  \newfloat at setoption{fileext}{#1}}
+\newcommand*\newfloat at setlistname[2]{%
+  \@namedef{list#1name}{#2}}
+\define at key{@newfloat}{listname}{%
+  \newfloat at setoption{listname}{#1}}
+\newcommand*\newfloat at setname[2]{%
+  \newfloat@@setname{#1}{#2}%
+  \begingroup
+    \ifcsname languagename\endcsname
+      \ifcsname captions\languagename\endcsname
+        \expandafter\g at addto@macro\csname captions\languagename\endcsname
+          {\newfloat@@setname{#1}{#2}}%
+      \fi
+    \fi
+  \endgroup}
+%%\AtBeginDocument{\let\newfloat at setname\newfloat@@setname}
+\newcommand*\newfloat@@setname[2]{%
+  \@namedef{#1name}{#2}}
+\define at key{@newfloat}{name}{%
+  \newfloat at setoption{name}{#1}}
+\newcommand*\newfloat at setplacement[2]{%
+  \@namedef{fps@#1}{#2}}
+\define at key{@newfloat}{placement}{%
+  \newfloat at setoption{placement}{#1}}
+\newcommand*\newfloat at setwithin[2]{%
+  \ifcsname c at 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 at chapter\endcsname
+      \@chapterlistsgap at off{#1}%
+    \fi
+    \newfloat@@setwithin{#1}{}{}%
+  \else
+    \def\@tempb{chapter}%
+    \ifx\@tempa\@tempb
+      \@addtoreset{#1}{chapter}%
+      \@chapterlistsgap at on{#1}%
+      \newfloat@@setwithin{#1}{\ifnum\c at chapter>\z@ \thechapter.\fi}{\theHchapter.}%
+    \else
+      \def\@tempb{section}%
+      \ifx\@tempa\@tempb
+        \@addtoreset{#1}{section}%
+        \ifcsname c at chapter\endcsname
+          \@addtoreset{#1}{chapter}%
+          \@chapterlistsgap at on{#1}%
+          \newfloat@@setwithin{#1}{\thesection.}{\theHsection.}%
+        \else
+          \newfloat@@setwithin{#1}{\ifnum\c at section>\z@ \thesection.\fi}{\theHsection.}%
+        \fi
+      \else
+        \newfloat at 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 at key{@newfloat}{within}{%
+  \def\newfloat at within@value{#1}}
+\newcommand*\newfloat at setwithout[1]{%
+  \newfloat at setwithin{#1}{none}}
+\define at key{@newfloat}{without}[]{%
+  \def\newfloat at within@value{none}}
+\newcommand*\newfloat at setchapterlistsgaps[2]{%
+  \edef\@tempa{#2}%
+  \newfloat at setchapterlistsgaps@{off}{off}{#1}%
+  \newfloat at setchapterlistsgaps@{false}{off}{#1}%
+  \newfloat at setchapterlistsgaps@{on}{on}{#1}%
+  \newfloat at setchapterlistsgaps@{true}{on}{#1}%
+  \ifx\@tempa\newfloat at setchapterlistsgaps@ \else
+    \newfloat at Error{Invalid value `#2' for option `chapterlistsgaps'}%
+  \fi}
+\newcommand*\newfloat at setchapterlistsgaps@[3]{%
+  \def\@tempb{#1}%
+  \ifx\@tempa\@tempb
+    \newfloat at chapterlistsgap@{#2}{#3}%
+    \let\@tempa\newfloat at setchapterlistsgaps@
+  \fi}
+\newcommand*\newfloat at chapterlistsgap@[1]{%
+  \@ifundefined{@chapterlistsgap@#1}%
+    {\@gobble}%
+    {\@nameuse{@chapterlistsgap@#1}}}
+\define at key{@newfloat}{chapterlistsgaps}{%
+  \def\newfloat at 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 at announce[2]{%
+  \@cons\newfloat at list{{#1}}%
+  \@cons\newfloat@@list{{#1}}%
+  \newfloat at ifundefined{newfloat at env@#2}{%
+    \@namedef{newfloat at env@#2}{#1}%
+    \ifcsname c at lofdepth\endcsname
+      \newfloat at ifundefined{c@#2depth}{%
+        \newcounter{#2depth}%
+        \setcounter{#2depth}{1}}%
+    \fi
+    \ifcsname addtotoclist\endcsname
+      \addtotoclist[float]{#2}%
+      \newfloat at def{listof#2name}{\@nameuse{list#1name}}%
+    \fi
+  }%
+  \ifcsname contentsuse\endcsname
+    \contentsuse{#1}{#2}%
+  \fi
+  \newfloat at hook{#1}}
+\@onlypreamble\newfloat at announce
+\newcommand*\newfloat at ext[1]{\@nameuse{ext@#1}}
+\newcommand*\newfloat@@list{}
+\newcommand*\SetupFloatingEnvironment[1]{%
+  \newfloat at addtolist{#1}%
+  \newfloat at setoptions{#1}}
+\newcommand*\ForEachFloatingEnvironment{%
+  \@ifstar
+    {\newfloat at foreach\@gobble}%
+    {\newfloat at foreach\@iden}}
+\newcommand\newfloat at foreach[2]{%
+  \def\@elt##1{#2}%
+  \newfloat at list
+  \let\@elt\relax
+  #1{\newfloat at addtohook{#2}}}
+\providecommand\newfloat at addtohook[1]{%
+  \toks@=\expandafter{\newfloat at hook{##1}#1}%
+  \edef\@tempa{\def\noexpand\newfloat at hook####1{\the\toks@}}%
+  \@tempa}
+\providecommand*\newfloat at hook[1]{}
+\newcommand\PrepareListOf[1]{%
+  \expandafter\g at addto@macro\csname newfloat at listof#1 at hook\endcsname}
+\@onlypreamble\PrepareListOf
+\newcommand*\newfloat at list{}
+\newcommand*\newfloat at addtolist[1]{%
+  \newfloat at ifinlist{#1}{}{%
+    \ifcsname ext@#1\endcsname
+      \@cons\newfloat at list{{#1}}%
+      \@namedef{newfloat at env@\@nameuse{ext@#1}}{#1}%
+      \newfloat at let{@ifchapterlistsgap@#1}{\@iden}%
+    \else
+      \newfloat at Error{`#1' does not seem to be a floating environment}%
+    \fi}}
+\newcommand*\newfloat at ifinlist[1]{%
+  \let\next\@secondoftwo
+  \begingroup
+    \expandafter\let\csname c@#1\endcsname\newfloat at ifinlist
+    \def\@elt##1{%
+      \expandafter\ifx\csname c@##1\endcsname\newfloat at ifinlist
+        \global\let\next\@firstoftwo
+      \fi}%
+    \newfloat at list
+  \endgroup
+  \next}
+\ifcsname ext at figure\endcsname
+  \newfloat at addtolist{figure}
+\fi
+\ifcsname ext at table\endcsname
+  \newfloat at addtolist{table}
+\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}}}
+  \providecommand*\@@addchapterlistsgap[2]{%
+    \@ifundefined{@addchapterlistsgap@#2}{% only once per extension
+      \@namedef{@addchapterlistsgap@#2}{#1}%
+      \@@@addchapterlistsgap{#2}}{}}
+  \providecommand*\@@@addchapterlistsgap[1]{%
+    \ifdim \@chapterlistsgap>\z@
+      \addtocontents{#1}{\protect\addvspace{\@chapterlistsgap}}%
+    \fi}
+  \providecommand*\@addchapterlistsgaps{%
+    \begingroup
+      \def\@elt##1{%
+        \@expandtwoargs\@addchapterlistsgap{##1}{\newfloat at ext{##1}}}%
+      \newfloat at list
+    \endgroup}
+  \providecommand*\@chapterlistsgap at off[1]{%
+    \expandafter\let\csname @ifchapterlistsgap@#1\endcsname\@gobble
+    \ifcsname unsettoc\endcsname
+      \@expandtwoargs\unsettoc{\newfloat at ext{#1}}{chapteratlist}%
+    \fi}
+  \providecommand*\@chapterlistsgap at on[1]{%
+    \expandafter\let\csname @ifchapterlistsgap@#1\endcsname\@iden
+    \ifcsname setuptoc\endcsname
+      \@expandtwoargs\setuptoc{\newfloat at ext{#1}}{chapteratlist}%
+    \fi}
+\fi
+\define at key{newfloat}{chapterlistsgap}{%
+  \renewcommand*\@chapterlistsgap{#1}}
+\define at key{newfloat}{within}{%
+  \def\newfloat at within@default{#1}% set new default value
+  \def\@elt##1{\newfloat at setwithin{##1}{#1}}%
+  \newfloat at list
+  \let\@elt\relax}
+\define at key{newfloat}{without}[]{%
+  \KV at newfloat@within{none}}
+\def\@elt#1{%
+  \define at key{newfloat}{#1name}{%
+    \newfloat at setname{#1}{##1}}%
+  \define at key{newfloat}{list#1name}{%
+    \newfloat at setname{list#1}{##1}}%
+  \define at key{newfloat}{#1within}{%
+    \newfloat at setwithin{#1}{##1}}%
+  \define at key{newfloat}{#1without}[]{%
+    \newfloat at setwithout{#1}}%
+}%
+\newfloat at list
+\let\@elt\relax
+\define at key{newfloat}{planb}[true]{%
+  \def\@tempa{#1}%
+  \def\@tempb{false}%
+  \ifx\@tempa\@tempb
+    \let\newfloat at ifplanb\@gobble
+  \else
+    \def\@tempb{true}%
+    \ifx\@tempa\@tempb
+      \let\newfloat at ifplanb\@iden
+    \else
+      \newfloat at Error{Invalid value `#1' for option `planb'}%
+    \fi
+  \fi}
+\define at key{newfloat}{planb-fileext}{%
+  \newfloat at Info{Setting Plan B file extension to `#1'}
+  \xdef\newfloat at addtocontents@ext{#1}}
+\let\@tempc\relax
+\@expandtwoargs\setkeys{newfloat}{planb,\@ptionlist{\@currname.\@currext}}%
+\AtEndOfPackage{\let\@unprocessedoptions\relax}
+\newcommand*\newfloatsetup{\setkeys{newfloat}}
+\newcommand\newfloat at replace@chapter[3]{%
+  \begingroup
+    \let\if at twocolumn\iffalse
+    \let\if at mainmatter\iffalse
+    \let\if at thema\iffalse
+    \let\if at chapnum\iffalse
+    \def\@tempa[##1]##2{#2}%
+    \newfloat at replace@chapter@\@chapter{original}{#1}{#3}%
+    \newfloat at replace@chapter@\Hy at org@chapter{hyperref}{#1}{#3}%
+    \newfloat at replace@chapter@\algocf at original@chapter{algorithm2e}{#1}{#3}%
+  \endgroup}
+\newcommand\newfloat at replace@chapter@[4]{%
+  \ifx\@tempa#1%
+    \newfloat at InfoNoLine{Document class `#3' detected (#2)}%
+    \global\def#1[##1]##2{#4}%
+    \global\let\newfloat at replace@chapter\newfloat at dont@replace at chapter
+    \global\let\newfloat at replace@chapter@\@gobblefour
+  \fi}
+\newcommand\newfloat at dont@replace at chapter[3]{}
+\ifcsname @chapter\endcsname \else
+  \let\newfloat at replace@chapter\newfloat at dont@replace at chapter
+\fi
+\newfloat at replace@chapter{report}{%
+  \ifnum \c at secnumdepth >\m at 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 at twocolumn
+    \@topnewpage[\@makechapterhead{#2}]%
+  \else
+    \@makechapterhead{#2}%
+    \@afterheading
+  \fi
+}{%
+  \ifnum \c at secnumdepth >\m at ne
+    \refstepcounter{chapter}%
+    \typeout{\@chapapp\space\thechapter.}%
+    \addcontentsline{toc}{chapter}%
+      {\protect\numberline{\thechapter}#1}%
+  \else
+    \addcontentsline{toc}{chapter}{#1}%
+  \fi
+  \chaptermark{#1}%
+  \@addchapterlistsgaps
+  \if at twocolumn
+    \@topnewpage[\@makechapterhead{#2}]%
+  \else
+    \@makechapterhead{#2}%
+    \@afterheading
+  \fi}
+\newfloat at replace@chapter{book}{%
+  \ifnum \c at secnumdepth >\m at ne
+    \if at 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 at twocolumn
+    \@topnewpage[\@makechapterhead{#2}]%
+  \else
+    \@makechapterhead{#2}%
+    \@afterheading
+  \fi
+}{%
+  \ifnum \c at secnumdepth >\m at ne
+    \if at 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 at twocolumn
+    \@topnewpage[\@makechapterhead{#2}]%
+  \else
+    \@makechapterhead{#2}%
+    \@afterheading
+  \fi}
+\newfloat at replace@chapter{amsbook}{%
+  \refstepcounter{chapter}%
+  \ifnum\c at 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 at 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 at replace@chapter\newfloat at dont@replace at chapter}{}
+\ifcsname insertchapterspace\endcsname
+  \renewcommand*\insertchapterspace{\@addchapterlistsgaps}
+  \let\newfloat at replace@chapter\newfloat at dont@replace at chapter
+\fi
+\newfloat at replace@chapter{rapport}{%
+  \ifnum \c at secnumdepth >\m at ne
+    \refstepcounter{chapter}%
+    \typeout{\@chapapp\space\thechapter.}%
+    \addcontentsline{toc}{chapter}%
+      {\protect\numberline{\thechapter}\toc at font0 #1}%
+  \else
+    \addcontentsline{toc}{chapter}{\toc at font0 #1}%
+  \fi
+  \chaptermark{#1}%
+  \addtocontents{lof}{\protect\addvspace{10\p@}}%
+  \addtocontents{lot}{\protect\addvspace{10\p@}}%
+  \if at twocolumn
+    \@topnewpage[\@makechapterhead{#2}]%
+  \else
+    \@makechapterhead{#2}%
+    \@afterheading
+  \fi
+}{%
+  \ifnum \c at secnumdepth >\m at ne
+    \refstepcounter{chapter}%
+    \typeout{\@chapapp\space\thechapter.}%
+    \addcontentsline{toc}{chapter}%
+      {\protect\numberline{\thechapter}\toc at font0 #1}%
+  \else
+    \addcontentsline{toc}{chapter}{\toc at font0 #1}%
+  \fi
+  \chaptermark{#1}%
+  \@addchapterlistsgaps
+  \if at twocolumn
+    \@topnewpage[\@makechapterhead{#2}]%
+  \else
+    \@makechapterhead{#2}%
+    \@afterheading
+  \fi}
+\newfloat at replace@chapter{boek}{%
+  \ifnum \c at secnumdepth >\m at ne
+    \if at mainmatter
+      \refstepcounter{chapter}%
+      \typeout{\@chapapp\space\thechapter.}%
+      \addcontentsline{toc}{chapter}%
+        {\protect\numberline{\thechapter}\toc at font0 #1}%
+    \else
+      \addcontentsline{toc}{chapter}{\toc at font0 #1}%
+    \fi
+  \else
+    \addcontentsline{toc}{chapter}{\toc at font0 #1}%
+  \fi
+  \chaptermark{#1}%
+  \addtocontents{lof}{\protect\addvspace{10\p@}}%
+  \addtocontents{lot}{\protect\addvspace{10\p@}}%
+  \if at twocolumn
+    \@topnewpage[\@makechapterhead{#2}]%
+  \else
+    \@makechapterhead{#2}%
+    \@afterheading
+  \fi
+}{%
+  \ifnum \c at secnumdepth >\m at ne
+    \if at mainmatter
+      \refstepcounter{chapter}%
+      \typeout{\@chapapp\space\thechapter.}%
+      \addcontentsline{toc}{chapter}%
+        {\protect\numberline{\thechapter}\toc at font0 #1}%
+    \else
+      \addcontentsline{toc}{chapter}{\toc at font0 #1}%
+    \fi
+  \else
+    \addcontentsline{toc}{chapter}{\toc at font0 #1}%
+  \fi
+  \chaptermark{#1}%
+  \@addchapterlistsgaps
+  \if at twocolumn
+    \@topnewpage[\@makechapterhead{#2}]%
+  \else
+    \@makechapterhead{#2}%
+    \@afterheading
+  \fi}
+\newfloat at replace@chapter{thesis}{%
+  \ifnum \c at secnumdepth >\m at ne
+    \if at mainmatter
+      \refstepcounter{chapter}%
+      \typeout{\chaptername\space\thechapter.}
+      \if at 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 at twocolumn
+    \@topnewpage[\@makechapterhead{#2}]
+  \else
+    \@makechapterhead{#2}
+    \@afterheading
+  \fi
+}{%
+  \ifnum \c at secnumdepth >\m at ne
+    \if at mainmatter
+      \refstepcounter{chapter}%
+      \typeout{\chaptername\space\thechapter.}%
+      \if at 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 at twocolumn
+    \@topnewpage[\@makechapterhead{#2}]%
+  \else
+    \@makechapterhead{#2}%
+    \@afterheading
+  \fi}
+\newfloat at replace@chapter{svmono}{%
+  \if at chapnum  % war mal \ifnum \c at secnumdepth >\m at ne
+    \refstepcounter{chapter}%
+    \if at 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 at twocolumn
+    \@topnewpage[\@makechapterhead{#2}]%
+  \else
+    \@makechapterhead{#2}%
+    \@afterheading
+  \fi
+}{%
+  \if at chapnum  % war mal \ifnum \c at secnumdepth >\m at ne
+    \refstepcounter{chapter}%
+    \if at 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 at twocolumn
+    \@topnewpage[\@makechapterhead{#2}]%
+  \else
+    \@makechapterhead{#2}%
+    \@afterheading
+  \fi}
+\newfloat at replace@chapter{dgruyter}{%
+  \let\thesection\theinchapsection
+  \let\theequation\theinchapequation
+  \let\thefigure\theinchapfigure
+  \let\thetable\theinchaptable
+  \ifx\bookDOI\@undefined
+  \else
+    \@tempcnta\numexpr\componentd at i+\@ne\relax
+    \xdef\componentd at 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 at i}%
+  \fi
+  \ifnum \c at secnumdepth >\m at ne
+    \if at 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 at 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 at i+\@ne\relax
+    \xdef\componentd at 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 at i}%
+  \fi
+  \ifnum \c at secnumdepth >\m at ne
+    \if at 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 at twocolumn
+    \@topnewpage[\@makechapterhead{#2}]%
+  \else
+    \@makechapterhead{#2}%
+    \@afterheading
+  \fi}
+\ifx\newfloat at replace@chapter\newfloat at dont@replace at chapter \else
+  \newfloat at InfoNoLine{%
+    Unsupported document class, or \noexpand\@chapter\MessageBreak
+    was already redefined by another package}
+  \newfloat at InfoNoLine{\string\@chapter\space=\space\meaning\@chapter}
+  \newfloat at InfoNoLine{\string\Hy at org@chapter\space=\space\meaning\Hy at org@chapter}
+  \newfloat at InfoNoLine{\string\algocf at original@chapter\space=\space\meaning\algocf at original@chapter}
+  \newfloat at ifplanb{\AtBeginDocument{%
+    \newfloat at InfoNoLine{Trying Plan B..}%
+    \let\newfloat at addtocontents@ORI\addtocontents
+    \long\def\addtocontents#1#2{%
+      \newfloat at addtocontents{#1}{#2}#2\addvspace\newfloat at nil}%
+    \long\def\newfloat at addtocontents#1#2#3\addvspace#4\newfloat at nil{%
+      \def\newfloat at tempa{#4}%
+      \ifx\newfloat at tempa\@empty
+        \newfloat at addtocontents@ORI{#1}{#2}%
+      \else
+        \ifx\newfloat at addtocontents@ext\@undefined
+          \newfloat at Info{Setting Plan B file extension to `#1'...}%
+          \xdef\newfloat at addtocontents@ext{#1}%
+        \fi
+        \edef\newfloat at tempa{#1}%
+        \ifx\newfloat at tempa\newfloat at addtocontents@ext
+          \begingroup
+            \let\addtocontents\newfloat at addtocontents@ORI
+            \@addchapterlistsgaps
+          \endgroup
+        \fi
+      \fi}}}
+\fi
+\ifcsname beamer at float\endcsname \else
+  \def\beamer at float#1{%
+    \ifcsname caption at settype\endcsname
+      \caption at settype{#1}%
+    \else
+      \def\@captype{#1}%
+    \fi
+    \par\nobreak\begin{center}\nobreak}
+  \def\end at beamer@float{%
+    \par\nobreak\end{center}}
+\fi
+\newcommand\newfloat at IfPackageLoaded[3]{%
+  \@ifpackageloaded{#1}{%
+    \newfloat@@IfPackageLoaded{#1}{#2}{#3}%
+  }{%
+    \AtBeginDocument{%
+      \@ifpackageloaded{#1}{%
+        \newfloat@@IfPackageLoaded{#1}{#2}{#3}%
+      }{}}%
+  }}
+\@onlypreamble\newfloat at IfPackageLoaded
+\newcommand\newfloat@@IfPackageLoaded[3]{%
+  \newfloat at 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 at addtohook{\newfloat@@@IfPackageLoaded{#1}{#2}{#3}}}
+\@onlypreamble\newfloat@@IfPackageLoaded
+\newcommand\newfloat@@@IfPackageLoaded[3]{%
+  \ifcsname#2\endcsname
+    \newfloat at WarningNoLine{%
+      Command \@backslashchar#2 already defined.\MessageBreak
+      (`#1' package support)}%
+  \else
+    #3%
+  \fi}
+\@onlypreamble\newfloat@@@IfPackageLoaded
+\newfloat at IfPackageLoaded{dgruyter}{plist@#1}{%
+  \expandafter\newcommand\csname plist@#1\endcsname{%
+    \@nameuse{#1name}\space}}
+\AtBeginDocument{%
+  \ifcsname float at exts\endcsname
+    \newfloat@@IfPackageLoaded{float}{newfloat at undefined}{%
+      \@nameuse{@ifchapterlistsgap@#1}{% if switched on
+        \let\float at do=\relax
+        \edef\@tempa{%
+          \noexpand\float at exts{\the\float at exts\float at do{\@nameuse{ext@#1}}}}%
+        \@tempa}}%
+  \fi}
+\newfloat at IfPackageLoaded{fltpage}{FP#1}{%
+  \newcounter{FP@#1C}%
+  \newenvironment{FP#1}{\FP at floatBegin{#1}}{\FP at floatEnd}}
+\providecommand*\ext at lstlisting{lol}%
+\newfloat at IfPackageLoaded{rotating}{sideways#1}{%
+  \newenvironment{sideways#1}{\@rotfloat{#1}}{\end at rotfloat}%
+  \newenvironment{sideways#1*}{\@rotdblfloat{#1}}{\end at rotdblfloat}}
+\newcommand*\newfloat at For@SC[2]{%
+  \def#1{b}% = \sidecaptionvpos{#2}{b} (v1.6)
+  \newenvironment{SC#2}%
+    {\SC at float[{#1}]{#2}}{\endSC at float}%
+  \newenvironment{SC#2*}%
+    {\SC at dblfloat[{#1}]{#2}}{\endSC at dblfloat}}
+\@onlypreamble\newfloat at For@SC
+\newfloat at IfPackageLoaded{sidecap}{SC#1}{%
+  \expandafter\newfloat at For@SC\csname SC@#1 at vpos\endcsname{#1}}
+\newfloat at IfPackageLoaded{wrapfig}{wrap#1}{%
+  \newenvironment{wrap#1}{\wrapfloat{#1}}{\endwrapfloat}}
+\endinput
+%%
+%% End of file `newfloat_v1.1.sty'.


Property changes on: trunk/Master/texmf-dist/tex/latex/newfloat/newfloat_v1.1.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property


More information about the tex-live-commits mailing list.