Debian Codegraph @

texmf-dist/tex/latex/newfloat/newfloat_v1.1.sty

raw
1 %%
2 %% This is file `newfloat_v1.1.sty',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% fallback/v1.1/newfloat.dtx (with options: `package')
8 %%
9 %% Copyright (C) 2011-2021 Axel Sommerfeldt ([email protected])
10 %%
11 %% https://gitlab.com/axelsommerfeldt/newfloat
12 %%
13 %% --------------------------------------------------------------------------
14 %%
15 %% This work may be distributed and/or modified under the
16 %% conditions of the LaTeX Project Public License, either version 1.3
17 %% of this license or (at your option) any later version.
18 %% The latest version of this license is in
19 %% http://www.latex-project.org/lppl.txt
20 %% and version 1.3 or later is part of all distributions of LaTeX
21 %% version 2003/12/01 or later.
22 %%
23 %% This work has the LPPL maintenance status "unmaintained".
24 %%
25 %% This work consists of the files newfloat.ins, newfloat.dtx,
26 %% and the derived file newfloat.sty.
27 %%
28 \NeedsTeXFormat{LaTeX2e}[1994/12/01]
29 \providecommand\DeclareRelease[3]{}
30 \providecommand\DeclareCurrentRelease[2]{}
31 \DeclareRelease{v1.0}{2011-10-30}{newfloat_v1.0.sty}
32 \DeclareCurrentRelease{v1.1}{2013-05-12} % 1st CTAN release of v1.1
33 \ProvidesPackage{newfloat}[2021/02/27 v1.1p Defining new floating environments (AR)]
34 \newcommand*\newfloat@Info[1]{%
35 \PackageInfo{newfloat}{#1}}
36 \newcommand*\newfloat@InfoNoLine[1]{%
37 \newfloat@Info{#1\@gobble}}
38 \newcommand*\newfloat@Warning[1]{%
39 \PackageWarning{newfloat}{#1}}
40 \newcommand*\newfloat@WarningNoLine[1]{%
41 \newfloat@Warning{#1\@gobble}}
42 \newcommand*\newfloat@Error[1]{%
43 \PackageError{newfloat}{#1}\newfloat@eh}
44 \newcommand*\newfloat@eh{%
45 If you do not understand this error, please take a closer look\MessageBreak
46 at the documentation of the `newfloat' package.\MessageBreak\@ehc}
47 \RequirePackage{keyval}[1997/11/10]
48 \newcommand*\newfloat@def[2]{%
49 \newfloat@ifundefined{#1}{%
50 \@namedef{#1}{#2}}}
51 \newcommand*\newfloat@let[2]{%
52 \newfloat@ifundefined{#1}{%
53 \expandafter\let\csname #1\endcsname#2}}
54 \newcommand*\newfloat@ifundefined[2]{%
55 \@ifundefined{#1}{#2}{%
56 \newfloat@Info{%
57 \expandafter\string\csname#1\endcsname\space is already defined}}}
58 \newcommand*\DeclareFloatingEnvironment{%
59 \@testopt\@DeclareFloatingEnvironment{}}
60 \@onlypreamble\DeclareFloatingEnvironment
61 \def\@DeclareFloatingEnvironment[#1]#2{%
62 \newfloat@Info{New float `#2' with options `#1'}%
63 \newfloat@ifundefined{c@#2}{\newcounter{#2}}%
64 \@ifundefined{c@float@type}% from float package
65 {\@ifundefined{c@newflo@tctr}% from memoir document class
66 {\ifdefined\newfloat@ftype \else
67 \newcount\newfloat@ftype
68 \newfloat@ftype=8\relax
69 \fi
70 \expandafter\xdef\csname ftype@#2\endcsname{\the\newfloat@ftype}%
71 \advance\newfloat@ftype\newfloat@ftype}%
72 {\expandafter\edef\csname ftype@#2\endcsname{\the\c@newflo@tctr}%
73 \advance\c@newflo@tctr \c@newflo@tctr}}%
74 {\expandafter\edef\csname ftype@#2\endcsname{\the\value{float@type}}%
75 \addtocounter{float@type}{\value{float@type}}}%
76 \newfloat@Info{float type `#2'=\@nameuse{ftype@#2}}%
77 \newfloat@def{fnum@#2}%
78 {\@nameuse{#2name}\nobreakspace\@nameuse{the#2}%
79 \ifdefined\autodot\expandafter\autodot\fi}%
80 \newfloat@capitalize\newfloat@Type{#2}%
81 \newfloat@let{#2name}{\newfloat@Type}%
82 \newfloat@def{fleg#2}{\@nameuse{#2name}}% legend naming (memoir)
83 \newfloat@ifundefined{flegtoc#2}{\@namedef{flegtoc#2}##1{}}%
84 \ifcsname @tufte@float\endcsname
85 \newenvironment{#2}[1][htbp]%
86 {\begin{@tufte@float}[{##1}]{#2}{}}%
87 {\end{@tufte@float}}%
88 \newenvironment{#2*}[1][htbp]%
89 {\begin{@tufte@float}[{##1}]{#2}{star}}%
90 {\end{@tufte@float}}%
91 \else
92 \@ifclassloaded{beamer}{%
93 \newenvironment{#2}[1][]{\beamer@float{#2}}{\end@beamer@float}%
94 }{%
95 \newenvironment{#2}{\@float{#2}}{\end@float}%
96 \newenvironment{#2*}{\@dblfloat{#2}}{\end@dblfloat}%
97 }%
98 \fi
99 \newfloat@def{listof#2}{\newfloat@listof{#2}}%
100 \newfloat@def{listof#2s}{\@nameuse{listof#2}}%
101 \newfloat@def{listof#2es}{\@nameuse{listof#2s}}%
102 \newfloat@def{newfloat@listof#2@hook}{}%
103 \ifdefined\l@figure
104 \newfloat@let{l@#2}{\l@figure}%
105 \else
106 \newfloat@def{l@#2}{\@dottedtocline{1}{1.5em}{2.3em}}%
107 \fi
108 \edef\newfloat@tempa{List of \newfloat@Type s}%
109 \newfloat@let{list#2name}{\newfloat@tempa}%
110 \expandafter\let\csname fst@#2\endcsname\@undefined
111 \newfloat@ifundefined{fps@#2}{\newfloat@setplacement{#2}{tbp}}%
112 \newfloat@ifundefined{ext@#2}{\newfloat@setfileext{#2}{lo#2}}%
113 \newfloat@setoptions*{#2}{#1}%
114 \@expandtwoargs\newfloat@announce{#2}{\@nameuse{ext@#2}}%
115 \@ifnextchar[\newfloat@DFE@setname\relax}
116 \@onlypreamble\@DeclareFloatingEnvironment
117 \def\newfloat@DFE@setname[#1]{%
118 \KV@@newfloat@name{#1}%
119 \@ifnextchar[\newfloat@DFE@setlistname\relax}
120 \@onlypreamble\newfloat@DFE@setname
121 \def\newfloat@DFE@setlistname[#1]{%
122 \KV@@newfloat@listname{#1}}
123 \@onlypreamble\newfloat@DFE@setlistname
124 \newcommand*\newfloat@capitalize[2]{%
125 \edef\newfloat@tempa{\gdef\noexpand#1{\@car#2\@nil}}%
126 \uppercase\expandafter{\newfloat@tempa}%
127 \edef\newfloat@tempa{%
128 \noexpand\g@addto@macro\noexpand#1{\@cdr#2\@nil}}%
129 \newfloat@tempa}
130 \newcommand*\newfloat@listof[1]{%
131 \@ifstar
132 {\newfloat@list@of{#1}*}%
133 {\newfloat@list@of{#1}\relax}}
134 \newcommand*\newfloat@list@of[1]{%
135 \@expandtwoargs\newfloat@list@of@{#1}{\newfloat@ext{#1}}}
136 \newcommand*\newfloat@list@of@[3]{%
137 \begingroup
138 \expandafter\let\expandafter\listfigurename\csname list#1name\endcsname
139 \def\ext@figure{#2}%
140 \let\newfloat@starttoc\@starttoc
141 \def\@starttoc##1{\newfloat@starttoc{#2}}%
142 \let\newfloat@listoftoc\listoftoc
143 \def\listoftoc##1{\newfloat@listoftoc{#2}}%
144 \@nameuse{newfloat@listof#1@hook}%
145 \listoffigures#3%
146 \endgroup}
147 \newcommand*\newfloat@setoptions{%
148 \@ifstar
149 {\newfloat@@setoptions\@firstofone}%
150 {\newfloat@@setoptions\@gobble}}
151 \newcommand*\newfloat@@setoptions[3]{%
152 \let\newfloat@within@value\@undefined
153 \let\newfloat@chapterlistsgaps@value\@undefined
154 #1{\KV@@newfloat@within\newfloat@within@default}% set default value for new floats
155 \def\newfloat@type{#2}%
156 \setkeys{@newfloat}{#3}%
157 \ifx\newfloat@within@value\@undefined \else
158 \newfloat@setoption{within}\newfloat@within@value
159 \fi
160 \ifx\newfloat@chapterlistsgaps@value\@undefined \else
161 \newfloat@setoption{chapterlistsgaps}\newfloat@chapterlistsgaps@value
162 \fi}
163 \newcommand*\newfloat@within@default{%
164 \ifcsname c@chapter\endcsname chapter\else none\fi}
165 \@onlypreamble\newfloat@within@default
166 \newcommand*\newfloat@setoption[1]{%
167 \edef\newfloat@tempa{\noexpand\@nameuse{newfloat@set#1}{\newfloat@type}}%
168 \newfloat@tempa}
169 \newcommand*\newfloat@setfileext[2]{%
170 \@namedef{ext@#1}{#2}}
171 \define@key{@newfloat}{fileext}{%
172 \newfloat@setoption{fileext}{#1}}
173 \newcommand*\newfloat@setlistname[2]{%
174 \@namedef{list#1name}{#2}}
175 \define@key{@newfloat}{listname}{%
176 \newfloat@setoption{listname}{#1}}
177 \newcommand*\newfloat@setname[2]{%
178 \newfloat@@setname{#1}{#2}%
179 \begingroup
180 \ifcsname languagename\endcsname
181 \ifcsname captions\languagename\endcsname
182 \expandafter\g@addto@macro\csname captions\languagename\endcsname
183 {\newfloat@@setname{#1}{#2}}%
184 \fi
185 \fi
186 \endgroup}
187 %%\AtBeginDocument{\let\newfloat@setname\newfloat@@setname}
188 \newcommand*\newfloat@@setname[2]{%
189 \@namedef{#1name}{#2}}
190 \define@key{@newfloat}{name}{%
191 \newfloat@setoption{name}{#1}}
192 \newcommand*\newfloat@setplacement[2]{%
193 \@namedef{fps@#1}{#2}}
194 \define@key{@newfloat}{placement}{%
195 \newfloat@setoption{placement}{#1}}
196 \newcommand*\newfloat@setwithin[2]{%
197 \ifcsname c@chapter\endcsname
198 \@removefromreset{#1}{chapter}%
199 \fi
200 \@removefromreset{#1}{section}%
201 \edef\@tempa{#2}%
202 \ifx\@tempa\@empty
203 \def\@tempa{none}%
204 \fi
205 \def\@tempb{none}%
206 \ifx\@tempa\@tempb
207 \ifcsname c@chapter\endcsname
208 \@chapterlistsgap@off{#1}%
209 \fi
210 \newfloat@@setwithin{#1}{}{}%
211 \else
212 \def\@tempb{chapter}%
213 \ifx\@tempa\@tempb
214 \@addtoreset{#1}{chapter}%
215 \@chapterlistsgap@on{#1}%
216 \newfloat@@setwithin{#1}{\ifnum\c@chapter>\z@ \thechapter.\fi}{\theHchapter.}%
217 \else
218 \def\@tempb{section}%
219 \ifx\@tempa\@tempb
220 \@addtoreset{#1}{section}%
221 \ifcsname c@chapter\endcsname
222 \@addtoreset{#1}{chapter}%
223 \@chapterlistsgap@on{#1}%
224 \newfloat@@setwithin{#1}{\thesection.}{\theHsection.}%
225 \else
226 \newfloat@@setwithin{#1}{\ifnum\c@section>\z@ \thesection.\fi}{\theHsection.}%
227 \fi
228 \else
229 \newfloat@Error{Invalid value `#2' for option `within'}%
230 \fi
231 \fi
232 \fi}
233 \newcommand*\newfloat@@setwithin[3]{%
234 \global\@namedef{the#1}{#2\arabic{#1}}%
235 \global\@namedef{theH#1}{#3\arabic{#1}}}
236 \define@key{@newfloat}{within}{%
237 \def\newfloat@within@value{#1}}
238 \newcommand*\newfloat@setwithout[1]{%
239 \newfloat@setwithin{#1}{none}}
240 \define@key{@newfloat}{without}[]{%
241 \def\newfloat@within@value{none}}
242 \newcommand*\newfloat@setchapterlistsgaps[2]{%
243 \edef\@tempa{#2}%
244 \newfloat@setchapterlistsgaps@{off}{off}{#1}%
245 \newfloat@setchapterlistsgaps@{false}{off}{#1}%
246 \newfloat@setchapterlistsgaps@{on}{on}{#1}%
247 \newfloat@setchapterlistsgaps@{true}{on}{#1}%
248 \ifx\@tempa\newfloat@setchapterlistsgaps@ \else
249 \newfloat@Error{Invalid value `#2' for option `chapterlistsgaps'}%
250 \fi}
251 \newcommand*\newfloat@setchapterlistsgaps@[3]{%
252 \def\@tempb{#1}%
253 \ifx\@tempa\@tempb
254 \newfloat@chapterlistsgap@{#2}{#3}%
255 \let\@tempa\newfloat@setchapterlistsgaps@
256 \fi}
257 \newcommand*\newfloat@chapterlistsgap@[1]{%
258 \@ifundefined{@chapterlistsgap@#1}%
259 {\@gobble}%
260 {\@nameuse{@chapterlistsgap@#1}}}
261 \define@key{@newfloat}{chapterlistsgaps}{%
262 \def\newfloat@chapterlistsgaps@value{#1}}
263 \providecommand*\@removefromreset[2]{{%
264 \expandafter\let\csname c@#1\endcsname\@removefromreset
265 \def\@elt##1{%
266 \expandafter\ifx\csname c@##1\endcsname\@removefromreset
267 \else
268 \noexpand\@elt{##1}%
269 \fi}%
270 \expandafter\xdef\csname cl@#2\endcsname{%
271 \csname cl@#2\endcsname}}}
272 \newcommand*\newfloat@announce[2]{%
273 \@cons\newfloat@list{{#1}}%
274 \@cons\newfloat@@list{{#1}}%
275 \newfloat@ifundefined{newfloat@env@#2}{%
276 \@namedef{newfloat@env@#2}{#1}%
277 \ifcsname c@lofdepth\endcsname
278 \newfloat@ifundefined{c@#2depth}{%
279 \newcounter{#2depth}%
280 \setcounter{#2depth}{1}}%
281 \fi
282 \ifcsname addtotoclist\endcsname
283 \addtotoclist[float]{#2}%
284 \newfloat@def{listof#2name}{\@nameuse{list#1name}}%
285 \fi
286 }%
287 \ifcsname contentsuse\endcsname
288 \contentsuse{#1}{#2}%
289 \fi
290 \newfloat@hook{#1}}
291 \@onlypreamble\newfloat@announce
292 \newcommand*\newfloat@ext[1]{\@nameuse{ext@#1}}
293 \newcommand*\newfloat@@list{}
294 \newcommand*\SetupFloatingEnvironment[1]{%
295 \newfloat@addtolist{#1}%
296 \newfloat@setoptions{#1}}
297 \newcommand*\ForEachFloatingEnvironment{%
298 \@ifstar
299 {\newfloat@foreach\@gobble}%
300 {\newfloat@foreach\@iden}}
301 \newcommand\newfloat@foreach[2]{%
302 \def\@elt##1{#2}%
303 \newfloat@list
304 \let\@elt\relax
305 #1{\newfloat@addtohook{#2}}}
306 \providecommand\newfloat@addtohook[1]{%
307 \toks@=\expandafter{\newfloat@hook{##1}#1}%
308 \edef\@tempa{\def\noexpand\newfloat@hook####1{\the\toks@}}%
309 \@tempa}
310 \providecommand*\newfloat@hook[1]{}
311 \newcommand\PrepareListOf[1]{%
312 \expandafter\g@addto@macro\csname newfloat@listof#1@hook\endcsname}
313 \@onlypreamble\PrepareListOf
314 \newcommand*\newfloat@list{}
315 \newcommand*\newfloat@addtolist[1]{%
316 \newfloat@ifinlist{#1}{}{%
317 \ifcsname ext@#1\endcsname
318 \@cons\newfloat@list{{#1}}%
319 \@namedef{newfloat@env@\@nameuse{ext@#1}}{#1}%
320 \newfloat@let{@ifchapterlistsgap@#1}{\@iden}%
321 \else
322 \newfloat@Error{`#1' does not seem to be a floating environment}%
323 \fi}}
324 \newcommand*\newfloat@ifinlist[1]{%
325 \let\next\@secondoftwo
326 \begingroup
327 \expandafter\let\csname c@#1\endcsname\newfloat@ifinlist
328 \def\@elt##1{%
329 \expandafter\ifx\csname c@##1\endcsname\newfloat@ifinlist
330 \global\let\next\@firstoftwo
331 \fi}%
332 \newfloat@list
333 \endgroup
334 \next}
335 \ifcsname ext@figure\endcsname
336 \newfloat@addtolist{figure}
337 \fi
338 \ifcsname ext@table\endcsname
339 \newfloat@addtolist{table}
340 \fi
341 \ifcsname @chapter\endcsname
342 \providecommand*\@chapterlistsgap{10\p@}%
343 \@ifpackageloaded{dgruyter}{\renewcommand*\@chapterlistsgap{13\p@}}{}%
344 \providecommand*\@addchapterlistsgap[2]{%
345 \@nameuse{@ifchapterlistsgap@#1}{% if switched on
346 \@@addchapterlistsgap{#1}{#2}}}
347 \providecommand*\@@addchapterlistsgap[2]{%
348 \@ifundefined{@addchapterlistsgap@#2}{% only once per extension
349 \@namedef{@addchapterlistsgap@#2}{#1}%
350 \@@@addchapterlistsgap{#2}}{}}
351 \providecommand*\@@@addchapterlistsgap[1]{%
352 \ifdim \@chapterlistsgap>\z@
353 \addtocontents{#1}{\protect\addvspace{\@chapterlistsgap}}%
354 \fi}
355 \providecommand*\@addchapterlistsgaps{%
356 \begingroup
357 \def\@elt##1{%
358 \@expandtwoargs\@addchapterlistsgap{##1}{\newfloat@ext{##1}}}%
359 \newfloat@list
360 \endgroup}
361 \providecommand*\@chapterlistsgap@off[1]{%
362 \expandafter\let\csname @ifchapterlistsgap@#1\endcsname\@gobble
363 \ifcsname unsettoc\endcsname
364 \@expandtwoargs\unsettoc{\newfloat@ext{#1}}{chapteratlist}%
365 \fi}
366 \providecommand*\@chapterlistsgap@on[1]{%
367 \expandafter\let\csname @ifchapterlistsgap@#1\endcsname\@iden
368 \ifcsname setuptoc\endcsname
369 \@expandtwoargs\setuptoc{\newfloat@ext{#1}}{chapteratlist}%
370 \fi}
371 \fi
372 \define@key{newfloat}{chapterlistsgap}{%
373 \renewcommand*\@chapterlistsgap{#1}}
374 \define@key{newfloat}{within}{%
375 \def\newfloat@within@default{#1}% set new default value
376 \def\@elt##1{\newfloat@setwithin{##1}{#1}}%
377 \newfloat@list
378 \let\@elt\relax}
379 \define@key{newfloat}{without}[]{%
380 \KV@newfloat@within{none}}
381 \def\@elt#1{%
382 \define@key{newfloat}{#1name}{%
383 \newfloat@setname{#1}{##1}}%
384 \define@key{newfloat}{list#1name}{%
385 \newfloat@setname{list#1}{##1}}%
386 \define@key{newfloat}{#1within}{%
387 \newfloat@setwithin{#1}{##1}}%
388 \define@key{newfloat}{#1without}[]{%
389 \newfloat@setwithout{#1}}%
390 }%
391 \newfloat@list
392 \let\@elt\relax
393 \define@key{newfloat}{planb}[true]{%
394 \def\@tempa{#1}%
395 \def\@tempb{false}%
396 \ifx\@tempa\@tempb
397 \let\newfloat@ifplanb\@gobble
398 \else
399 \def\@tempb{true}%
400 \ifx\@tempa\@tempb
401 \let\newfloat@ifplanb\@iden
402 \else
403 \newfloat@Error{Invalid value `#1' for option `planb'}%
404 \fi
405 \fi}
406 \define@key{newfloat}{planb-fileext}{%
407 \newfloat@Info{Setting Plan B file extension to `#1'}
408 \xdef\newfloat@addtocontents@ext{#1}}
409 \let\@tempc\relax
410 \@expandtwoargs\setkeys{newfloat}{planb,\@ptionlist{\@currname.\@currext}}%
411 \AtEndOfPackage{\let\@unprocessedoptions\relax}
412 \newcommand*\newfloatsetup{\setkeys{newfloat}}
413 \newcommand\newfloat@replace@chapter[3]{%
414 \begingroup
415 \let\if@twocolumn\iffalse
416 \let\if@mainmatter\iffalse
417 \let\if@thema\iffalse
418 \let\if@chapnum\iffalse
419 \def\@tempa[##1]##2{#2}%
420 \newfloat@replace@chapter@\@chapter{original}{#1}{#3}%
421 \newfloat@replace@chapter@\Hy@org@chapter{hyperref}{#1}{#3}%
422 \newfloat@replace@chapter@\algocf@original@chapter{algorithm2e}{#1}{#3}%
423 \endgroup}
424 \newcommand\newfloat@replace@chapter@[4]{%
425 \ifx\@tempa#1%
426 \newfloat@InfoNoLine{Document class `#3' detected (#2)}%
427 \global\def#1[##1]##2{#4}%
428 \global\let\newfloat@replace@chapter\newfloat@dont@replace@chapter
429 \global\let\newfloat@replace@chapter@\@gobblefour
430 \fi}
431 \newcommand\newfloat@dont@replace@chapter[3]{}
432 \ifcsname @chapter\endcsname \else
433 \let\newfloat@replace@chapter\newfloat@dont@replace@chapter
434 \fi
435 \newfloat@replace@chapter{report}{%
436 \ifnum \c@secnumdepth >\m@ne
437 \refstepcounter{chapter}%
438 \typeout{\@chapapp\space\thechapter.}%
439 \addcontentsline{toc}{chapter}%
440 {\protect\numberline{\thechapter}#1}%
441 \else
442 \addcontentsline{toc}{chapter}{#1}%
443 \fi
444 \chaptermark{#1}%
445 \addtocontents{lof}{\protect\addvspace{10\p@}}%
446 \addtocontents{lot}{\protect\addvspace{10\p@}}%
447 \if@twocolumn
448 \@topnewpage[\@makechapterhead{#2}]%
449 \else
450 \@makechapterhead{#2}%
451 \@afterheading
452 \fi
453 }{%
454 \ifnum \c@secnumdepth >\m@ne
455 \refstepcounter{chapter}%
456 \typeout{\@chapapp\space\thechapter.}%
457 \addcontentsline{toc}{chapter}%
458 {\protect\numberline{\thechapter}#1}%
459 \else
460 \addcontentsline{toc}{chapter}{#1}%
461 \fi
462 \chaptermark{#1}%
463 \@addchapterlistsgaps
464 \if@twocolumn
465 \@topnewpage[\@makechapterhead{#2}]%
466 \else
467 \@makechapterhead{#2}%
468 \@afterheading
469 \fi}
470 \newfloat@replace@chapter{book}{%
471 \ifnum \c@secnumdepth >\m@ne
472 \if@mainmatter
473 \refstepcounter{chapter}%
474 \typeout{\@chapapp\space\thechapter.}%
475 \addcontentsline{toc}{chapter}%
476 {\protect\numberline{\thechapter}#1}%
477 \else
478 \addcontentsline{toc}{chapter}{#1}%
479 \fi
480 \else
481 \addcontentsline{toc}{chapter}{#1}%
482 \fi
483 \chaptermark{#1}%
484 \addtocontents{lof}{\protect\addvspace{10\p@}}%
485 \addtocontents{lot}{\protect\addvspace{10\p@}}%
486 \if@twocolumn
487 \@topnewpage[\@makechapterhead{#2}]%
488 \else
489 \@makechapterhead{#2}%
490 \@afterheading
491 \fi
492 }{%
493 \ifnum \c@secnumdepth >\m@ne
494 \if@mainmatter
495 \refstepcounter{chapter}%
496 \typeout{\@chapapp\space\thechapter.}%
497 \addcontentsline{toc}{chapter}%
498 {\protect\numberline{\thechapter}#1}%
499 \else
500 \addcontentsline{toc}{chapter}{#1}%
501 \fi
502 \else
503 \addcontentsline{toc}{chapter}{#1}%
504 \fi
505 \chaptermark{#1}%
506 \@addchapterlistsgaps
507 \if@twocolumn
508 \@topnewpage[\@makechapterhead{#2}]%
509 \else
510 \@makechapterhead{#2}%
511 \@afterheading
512 \fi}
513 \newfloat@replace@chapter{amsbook}{%
514 \refstepcounter{chapter}%
515 \ifnum\c@secnumdepth<\z@ \let\@secnumber\@empty
516 \else \let\@secnumber\thechapter \fi
517 \typeout{\chaptername\space\@secnumber}%
518 \def\@toclevel{0}%
519 \ifx\chaptername\appendixname \@tocwriteb\tocappendix{chapter}{#2}%
520 \else \@tocwriteb\tocchapter{chapter}{#2}\fi
521 \chaptermark{#1}%
522 \addtocontents{lof}{\protect\addvspace{10\p@}}%
523 \addtocontents{lot}{\protect\addvspace{10\p@}}%
524 \@makechapterhead{#2}\@afterheading
525 }{%
526 \refstepcounter{chapter}%
527 \ifnum\c@secnumdepth<\z@ \let\@secnumber\@empty
528 \else \let\@secnumber\thechapter \fi
529 \typeout{\chaptername\space\@secnumber}%
530 \def\@toclevel{0}%
531 \ifx\chaptername\appendixname \@tocwriteb\tocappendix{chapter}{#2}%
532 \else \@tocwriteb\tocchapter{chapter}{#2}\fi
533 \chaptermark{#1}%
534 \@addchapterlistsgaps
535 \@makechapterhead{#2}\@afterheading}
536 \@ifpackageloaded{tocbasic}{%
537 \let\newfloat@replace@chapter\newfloat@dont@replace@chapter}{}
538 \ifcsname insertchapterspace\endcsname
539 \renewcommand*\insertchapterspace{\@addchapterlistsgaps}
540 \let\newfloat@replace@chapter\newfloat@dont@replace@chapter
541 \fi
542 \newfloat@replace@chapter{rapport}{%
543 \ifnum \c@secnumdepth >\m@ne
544 \refstepcounter{chapter}%
545 \typeout{\@chapapp\space\thechapter.}%
546 \addcontentsline{toc}{chapter}%
547 {\protect\numberline{\thechapter}\toc@font0 #1}%
548 \else
549 \addcontentsline{toc}{chapter}{\toc@font0 #1}%
550 \fi
551 \chaptermark{#1}%
552 \addtocontents{lof}{\protect\addvspace{10\p@}}%
553 \addtocontents{lot}{\protect\addvspace{10\p@}}%
554 \if@twocolumn
555 \@topnewpage[\@makechapterhead{#2}]%
556 \else
557 \@makechapterhead{#2}%
558 \@afterheading
559 \fi
560 }{%
561 \ifnum \c@secnumdepth >\m@ne
562 \refstepcounter{chapter}%
563 \typeout{\@chapapp\space\thechapter.}%
564 \addcontentsline{toc}{chapter}%
565 {\protect\numberline{\thechapter}\toc@font0 #1}%
566 \else
567 \addcontentsline{toc}{chapter}{\toc@font0 #1}%
568 \fi
569 \chaptermark{#1}%
570 \@addchapterlistsgaps
571 \if@twocolumn
572 \@topnewpage[\@makechapterhead{#2}]%
573 \else
574 \@makechapterhead{#2}%
575 \@afterheading
576 \fi}
577 \newfloat@replace@chapter{boek}{%
578 \ifnum \c@secnumdepth >\m@ne
579 \if@mainmatter
580 \refstepcounter{chapter}%
581 \typeout{\@chapapp\space\thechapter.}%
582 \addcontentsline{toc}{chapter}%
583 {\protect\numberline{\thechapter}\toc@font0 #1}%
584 \else
585 \addcontentsline{toc}{chapter}{\toc@font0 #1}%
586 \fi
587 \else
588 \addcontentsline{toc}{chapter}{\toc@font0 #1}%
589 \fi
590 \chaptermark{#1}%
591 \addtocontents{lof}{\protect\addvspace{10\p@}}%
592 \addtocontents{lot}{\protect\addvspace{10\p@}}%
593 \if@twocolumn
594 \@topnewpage[\@makechapterhead{#2}]%
595 \else
596 \@makechapterhead{#2}%
597 \@afterheading
598 \fi
599 }{%
600 \ifnum \c@secnumdepth >\m@ne
601 \if@mainmatter
602 \refstepcounter{chapter}%
603 \typeout{\@chapapp\space\thechapter.}%
604 \addcontentsline{toc}{chapter}%
605 {\protect\numberline{\thechapter}\toc@font0 #1}%
606 \else
607 \addcontentsline{toc}{chapter}{\toc@font0 #1}%
608 \fi
609 \else
610 \addcontentsline{toc}{chapter}{\toc@font0 #1}%
611 \fi
612 \chaptermark{#1}%
613 \@addchapterlistsgaps
614 \if@twocolumn
615 \@topnewpage[\@makechapterhead{#2}]%
616 \else
617 \@makechapterhead{#2}%
618 \@afterheading
619 \fi}
620 \newfloat@replace@chapter{thesis}{%
621 \ifnum \c@secnumdepth >\m@ne
622 \if@mainmatter
623 \refstepcounter{chapter}%
624 \typeout{\chaptername\space\thechapter.}
625 \if@thema
626 \ifx\@shortauthor\@empty
627 \addcontentsline{toc}{chapter}{%
628 \protect\numberline{\thechapter.}#1}%
629 \else
630 \addcontentsline{toc}{chapter}{%
631 \protect\numberline{\thechapter.}%
632 \@shortauthor\hfill\mbox{}\vskip\normallineskip #1}%
633 \fi
634 \else
635 \addcontentsline{toc}{chapter}{%
636 \protect\numberline{\thechapter.}#1}%
637 \fi
638 \else
639 \addcontentsline{toc}{chapter}{#1}
640 \fi
641 \else
642 \addcontentsline{toc}{chapter}{#1}
643 \fi
644 \chaptermark{#1}
645 \addtocontents{lof}{\protect\addvspace{10pt}}
646 \addtocontents{lot}{\protect\addvspace{10pt}}
647 \if@twocolumn
648 \@topnewpage[\@makechapterhead{#2}]
649 \else
650 \@makechapterhead{#2}
651 \@afterheading
652 \fi
653 }{%
654 \ifnum \c@secnumdepth >\m@ne
655 \if@mainmatter
656 \refstepcounter{chapter}%
657 \typeout{\chaptername\space\thechapter.}%
658 \if@thema
659 \ifx\@shortauthor\@empty
660 \addcontentsline{toc}{chapter}{%
661 \protect\numberline{\thechapter.}#1}%
662 \else
663 \addcontentsline{toc}{chapter}{%
664 \protect\numberline{\thechapter.}%
665 \@shortauthor\hfill\mbox{}\vskip\normallineskip #1}%
666 \fi
667 \else
668 \addcontentsline{toc}{chapter}{%
669 \protect\numberline{\thechapter.}#1}%
670 \fi
671 \else
672 \addcontentsline{toc}{chapter}{#1}%
673 \fi
674 \else
675 \addcontentsline{toc}{chapter}{#1}%
676 \fi
677 \chaptermark{#1}%
678 \@addchapterlistsgaps
679 \if@twocolumn
680 \@topnewpage[\@makechapterhead{#2}]%
681 \else
682 \@makechapterhead{#2}%
683 \@afterheading
684 \fi}
685 \newfloat@replace@chapter{svmono}{%
686 \if@chapnum % war mal \ifnum \c@secnumdepth >\m@ne
687 \refstepcounter{chapter}%
688 \if@mainmatter
689 \typeout{\@chapapp\space\thechapter.}%
690 \addcontentsline{toc}{chapter}{\protect
691 \numberline{\thechapter\thechapterend}#1}%
692 \else
693 \addcontentsline{toc}{chapter}{#1}%
694 \fi
695 \else
696 \addcontentsline{toc}{chapter}{#1}%
697 \fi
698 \chaptermark{#1}%
699 \addtocontents{lof}{\protect\addvspace{10\p@}}%
700 \addtocontents{lot}{\protect\addvspace{10\p@}}%
701 \if@twocolumn
702 \@topnewpage[\@makechapterhead{#2}]%
703 \else
704 \@makechapterhead{#2}%
705 \@afterheading
706 \fi
707 }{%
708 \if@chapnum % war mal \ifnum \c@secnumdepth >\m@ne
709 \refstepcounter{chapter}%
710 \if@mainmatter
711 \typeout{\@chapapp\space\thechapter.}%
712 \addcontentsline{toc}{chapter}{\protect
713 \numberline{\thechapter\thechapterend}#1}%
714 \else
715 \addcontentsline{toc}{chapter}{#1}%
716 \fi
717 \else
718 \addcontentsline{toc}{chapter}{#1}%
719 \fi
720 \chaptermark{#1}%
721 \@addchapterlistsgaps
722 \if@twocolumn
723 \@topnewpage[\@makechapterhead{#2}]%
724 \else
725 \@makechapterhead{#2}%
726 \@afterheading
727 \fi}
728 \newfloat@replace@chapter{dgruyter}{%
729 \let\thesection\theinchapsection
730 \let\theequation\theinchapequation
731 \let\thefigure\theinchapfigure
732 \let\thetable\theinchaptable
733 \ifx\bookDOI\@undefined
734 \else
735 \@tempcnta\numexpr\componentd@i+\@ne\relax
736 \xdef\componentd@i{\the\@tempcnta}%
737 \xdef\@DOI{%
738 https://doi.org/\bookDOI
739 -\ifx\thepage\thefrontmatterpage2\else\ifnum\@tempcnta<100 0\fi\fi
740 \ifnum\@tempcnta<10 0\fi\componentd@i}%
741 \fi
742 \ifnum \c@secnumdepth >\m@ne
743 \if@mainmatter
744 \refstepcounter{chapter}%
745 \typeout{\@chapapp\space\thechapter.}%
746 \addcontentsline{toc}{chapter}{\protect\numberline{\thechapter}#1}%
747 \else
748 \addcontentsline{toc}{schapter}{#1}%
749 \fi
750 \else
751 \addcontentsline{toc}{schapter}{#1}%
752 \fi
753 \chaptermark{#1}%
754 \addtocontents{lof}{\protect\addvspace{13\p@}}%
755 \addtocontents{lot}{\protect\addvspace{13\p@}}%
756 \if@twocolumn
757 \@topnewpage[\@makechapterhead{#2}]%
758 \else
759 \@makechapterhead{#2}%
760 \@afterheading
761 \fi
762 }{%
763 \let\thesection\theinchapsection
764 \let\theequation\theinchapequation
765 \let\thefigure\theinchapfigure
766 \let\thetable\theinchaptable
767 \ifx\bookDOI\@undefined
768 \else
769 \@tempcnta\numexpr\componentd@i+\@ne\relax
770 \xdef\componentd@i{\the\@tempcnta}%
771 \xdef\@DOI{%
772 https://doi.org/\bookDOI
773 -\ifx\thepage\thefrontmatterpage2\else\ifnum\@tempcnta<100 0\fi\fi
774 \ifnum\@tempcnta<10 0\fi\componentd@i}%
775 \fi
776 \ifnum \c@secnumdepth >\m@ne
777 \if@mainmatter
778 \refstepcounter{chapter}%
779 \typeout{\@chapapp\space\thechapter.}%
780 \addcontentsline{toc}{chapter}{\protect\numberline{\thechapter}#1}%
781 \else
782 \addcontentsline{toc}{schapter}{#1}%
783 \fi
784 \else
785 \addcontentsline{toc}{schapter}{#1}%
786 \fi
787 \chaptermark{#1}%
788 \@addchapterlistsgaps
789 \if@twocolumn
790 \@topnewpage[\@makechapterhead{#2}]%
791 \else
792 \@makechapterhead{#2}%
793 \@afterheading
794 \fi}
795 \ifx\newfloat@replace@chapter\newfloat@dont@replace@chapter \else
796 \newfloat@InfoNoLine{%
797 Unsupported document class, or \noexpand\@chapter\MessageBreak
798 was already redefined by another package}
799 \newfloat@InfoNoLine{\string\@chapter\space=\space\meaning\@chapter}
800 \newfloat@InfoNoLine{\string\Hy@org@chapter\space=\space\meaning\Hy@org@chapter}
801 \newfloat@InfoNoLine{\string\algocf@original@chapter\space=\space\meaning\algocf@original@chapter}
802 \newfloat@ifplanb{\AtBeginDocument{%
803 \newfloat@InfoNoLine{Trying Plan B..}%
804 \let\newfloat@addtocontents@ORI\addtocontents
805 \long\def\addtocontents#1#2{%
806 \newfloat@addtocontents{#1}{#2}#2\addvspace\newfloat@nil}%
807 \long\def\newfloat@addtocontents#1#2#3\addvspace#4\newfloat@nil{%
808 \def\newfloat@tempa{#4}%
809 \ifx\newfloat@tempa\@empty
810 \newfloat@addtocontents@ORI{#1}{#2}%
811 \else
812 \ifx\newfloat@addtocontents@ext\@undefined
813 \newfloat@Info{Setting Plan B file extension to `#1'...}%
814 \xdef\newfloat@addtocontents@ext{#1}%
815 \fi
816 \edef\newfloat@tempa{#1}%
817 \ifx\newfloat@tempa\newfloat@addtocontents@ext
818 \begingroup
819 \let\addtocontents\newfloat@addtocontents@ORI
820 \@addchapterlistsgaps
821 \endgroup
822 \fi
823 \fi}}}
824 \fi
825 \ifcsname beamer@float\endcsname \else
826 \def\beamer@float#1{%
827 \ifcsname caption@settype\endcsname
828 \caption@settype{#1}%
829 \else
830 \def\@captype{#1}%
831 \fi
832 \par\nobreak\begin{center}\nobreak}
833 \def\end@beamer@float{%
834 \par\nobreak\end{center}}
835 \fi
836 \newcommand\newfloat@IfPackageLoaded[3]{%
837 \@ifpackageloaded{#1}{%
838 \newfloat@@IfPackageLoaded{#1}{#2}{#3}%
839 }{%
840 \AtBeginDocument{%
841 \@ifpackageloaded{#1}{%
842 \newfloat@@IfPackageLoaded{#1}{#2}{#3}%
843 }{}}%
844 }}
845 \@onlypreamble\newfloat@IfPackageLoaded
846 \newcommand\newfloat@@IfPackageLoaded[3]{%
847 \newfloat@InfoNoLine{`#1' package detected}%
848 % Execute code for every previous \DeclareFloatingEnvironment
849 \def\@elt##1{\newfloat@@@IfPackageLoaded{#1}{#2}{#3}}%
850 \newfloat@@list
851 \let\@elt\relax
852 % Execute code for every future \DeclareFloatingEnvironment
853 \newfloat@addtohook{\newfloat@@@IfPackageLoaded{#1}{#2}{#3}}}
854 \@onlypreamble\newfloat@@IfPackageLoaded
855 \newcommand\newfloat@@@IfPackageLoaded[3]{%
856 \ifcsname#2\endcsname
857 \newfloat@WarningNoLine{%
858 Command \@backslashchar#2 already defined.\MessageBreak
859 (`#1' package support)}%
860 \else
861 #3%
862 \fi}
863 \@onlypreamble\newfloat@@@IfPackageLoaded
864 \newfloat@IfPackageLoaded{dgruyter}{plist@#1}{%
865 \expandafter\newcommand\csname plist@#1\endcsname{%
866 \@nameuse{#1name}\space}}
867 \AtBeginDocument{%
868 \ifcsname float@exts\endcsname
869 \newfloat@@IfPackageLoaded{float}{newfloat@undefined}{%
870 \@nameuse{@ifchapterlistsgap@#1}{% if switched on
871 \let\float@do=\relax
872 \edef\@tempa{%
873 \noexpand\float@exts{\the\float@exts\float@do{\@nameuse{ext@#1}}}}%
874 \@tempa}}%
875 \fi}
876 \newfloat@IfPackageLoaded{fltpage}{FP#1}{%
877 \newcounter{FP@#1C}%
878 \newenvironment{FP#1}{\FP@floatBegin{#1}}{\FP@floatEnd}}
879 \providecommand*\ext@lstlisting{lol}%
880 \newfloat@IfPackageLoaded{rotating}{sideways#1}{%
881 \newenvironment{sideways#1}{\@rotfloat{#1}}{\end@rotfloat}%
882 \newenvironment{sideways#1*}{\@rotdblfloat{#1}}{\end@rotdblfloat}}
883 \newcommand*\newfloat@For@SC[2]{%
884 \def#1{b}% = \sidecaptionvpos{#2}{b} (v1.6)
885 \newenvironment{SC#2}%
886 {\SC@float[{#1}]{#2}}{\endSC@float}%
887 \newenvironment{SC#2*}%
888 {\SC@dblfloat[{#1}]{#2}}{\endSC@dblfloat}}
889 \@onlypreamble\newfloat@For@SC
890 \newfloat@IfPackageLoaded{sidecap}{SC#1}{%
891 \expandafter\newfloat@For@SC\csname SC@#1@vpos\endcsname{#1}}
892 \newfloat@IfPackageLoaded{wrapfig}{wrap#1}{%
893 \newenvironment{wrap#1}{\wrapfloat{#1}}{\endwrapfloat}}
894 \endinput
895 %%
896 %% End of file `newfloat_v1.1.sty'.