Debian Codegraph @

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

raw
1 %%
2 %% This is file `newfloat_v1.0.sty',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% fallback/v1.0/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 \ProvidesPackage{newfloat}[2012/05/19 v1.0b Defining new floating environments (AR)]
30 \newcommand*\newfloat@Info[1]{%
31 \PackageInfo{newfloat}{#1}}
32 \newcommand*\newfloat@InfoNoLine[1]{%
33 \newfloat@Info{#1\@gobble}}
34 \newcommand*\newfloat@Error[1]{%
35 \PackageError{newfloat}{#1}\newfloat@eh}
36 \newcommand*\newfloat@eh{%
37 If you do not understand this error, please take a closer look\MessageBreak
38 at the documentation of the `newfloat' package.\MessageBreak\@ehc}
39 \RequirePackage{keyval}[1997/11/10]
40 \newcommand*\DeclareFloatingEnvironment{%
41 \@testopt\@DeclareFloatingEnvironment{}}
42 \@onlypreamble\DeclareFloatingEnvironment
43 \def\@DeclareFloatingEnvironment[#1]#2{%
44 \newfloat@Info{New float `#2' with options `#1'}%
45 \edef\newfloat@Type{\def\noexpand\newfloat@Type{\@car#2\@nil}}%
46 \uppercase\expandafter{\newfloat@Type}%
47 \edef\@tempa{%
48 \noexpand\g@addto@macro\noexpand\newfloat@Type{\@cdr#2\@nil}}%
49 \@tempa
50 \newcounter{#2}%
51 \ifdefined\c@float@type % from float package
52 \expandafter\edef\csname ftype@#2\endcsname{\the\value{float@type}}%
53 \addtocounter{float@type}{\value{float@type}}%
54 \else\ifdefined\c@newflo@tctr % from memoir document class
55 \expandafter\edef\csname ftype@#2\endcsname{\the\c@newflo@tctr}%
56 \advance\c@newflo@tctr \c@newflo@tctr
57 \else
58 \ifdefined\newfloat@ftype \else
59 \newcount\newfloat@ftype
60 \newfloat@ftype=8\relax
61 \fi
62 \expandafter\xdef\csname ftype@#2\endcsname{\the\newfloat@ftype}%
63 \advance\newfloat@ftype\newfloat@ftype
64 \fi\fi
65 \newfloat@Info{float type `#2'=\@nameuse{ftype@#2}}%
66 \@namedef{fnum@#2}{\@nameuse{#2name}\nobreakspace\@nameuse{the#2}}%
67 \expandafter\newcommand\csname #2name\endcsname{}%
68 \expandafter\let\csname #2name\endcsname\newfloat@Type
69 \@namedef{fleg#2}{\@nameuse{#2name}}% legend naming (memoir)
70 \@namedef{flegtoc#2}##1{}%
71 \newenvironment{#2}{\@float{#2}}{\end@float}%
72 \newenvironment{#2*}{\@dblfloat{#2}}{\end@dblfloat}%
73 \expandafter\newcommand\csname listof#2s\endcsname{\newfloat@listof{#2}}%
74 \expandafter\newcommand\csname listof#2es\endcsname{\newfloat@listof{#2}}%
75 \ifdefined\l@figure
76 \expandafter\let\csname l@#2\endcsname\l@figure
77 \else
78 \@namedef{l@#2}{\@dottedtocline{1}{1.5em}{2.3em}}%
79 \fi
80 \expandafter\newcommand\csname list#2name\endcsname{}%
81 \expandafter\xdef\csname list#2name\endcsname{List of \newfloat@Type s}%
82 \expandafter\let\csname fst@#2\endcsname\@undefined
83 \newfloat@setplacement{#2}{tbp}%
84 \newfloat@setfileext{#2}{lo#2}%
85 \newfloat@setoptions*{#2}{#1}%
86 \@expandtwoargs\newfloat@announce{#2}{\@nameuse{ext@#2}}%
87 \@ifnextchar[\newfloat@DFE@setname\relax}
88 \@onlypreamble\@DeclareFloatingEnvironment
89 \def\newfloat@DFE@setname[#1]{%
90 \KV@@newfloat@name{#1}%
91 \@ifnextchar[\newfloat@DFE@setlistname\relax}
92 \@onlypreamble\newfloat@DFE@setname
93 \def\newfloat@DFE@setlistname[#1]{%
94 \KV@@newfloat@listname{#1}}
95 \@onlypreamble\newfloat@DFE@setlistname
96 \newcommand*\newfloat@listof[1]{%
97 \ifcsname listoftoc\endcsname
98 \expandafter\listoftoc\expandafter{\@nameuse{ext@#1}}%
99 \else
100 \begingroup
101 \expandafter\let\expandafter\listfigurename\csname list#1name\endcsname
102 \expandafter\let\expandafter\ext@figure\csname ext@#1\endcsname
103 \let\newfloat@ORI@starttoc\@starttoc
104 \renewcommand*\@starttoc[1]{%
105 \expandafter\newfloat@ORI@starttoc\expandafter{\ext@figure}}%
106 \listoffigures
107 \endgroup
108 \fi}
109 \newcommand*\newfloat@setoptions{%
110 \@ifstar
111 {\newfloat@@setoptions\@firstofone}%
112 {\newfloat@@setoptions\@gobble}}
113 \newcommand*\newfloat@@setoptions[3]{%
114 \let\newfloat@within@value\@undefined
115 \let\newfloat@chapterlistsgaps@value\@undefined
116 #1{\KV@@newfloat@within\newfloat@within@default}% set default value for new floats
117 \def\newfloat@type{#2}%
118 \setkeys{@newfloat}{#3}%
119 \ifx\newfloat@within@value\@undefined \else
120 \newfloat@setoption{within}\newfloat@within@value
121 \fi
122 \ifx\newfloat@chapterlistsgaps@value\@undefined \else
123 \newfloat@setoption{chapterlistsgaps}\newfloat@chapterlistsgaps@value
124 \fi}
125 \newcommand*\newfloat@within@default{%
126 \ifcsname c@chapter\endcsname chapter\else none\fi}
127 \@onlypreamble\newfloat@within@default
128 \newcommand*\newfloat@setoption[1]{%
129 \expandafter\@expandtwoargs\csname newfloat@set#1\endcsname\newfloat@type}
130 \newcommand*\newfloat@setfileext[2]{%
131 \@namedef{ext@#1}{#2}}
132 \define@key{@newfloat}{fileext}{%
133 \newfloat@setoption{fileext}{#1}}
134 \newcommand*\newfloat@setlistname[2]{%
135 \@namedef{list#1name}{#2}}
136 \define@key{@newfloat}{listname}{%
137 \newfloat@setoption{listname}{#1}}
138 \newcommand*\newfloat@setname[2]{%
139 \newfloat@@setname{#1}{#2}%
140 \begingroup
141 \ifcsname languagename\endcsname
142 \ifcsname captions\languagename\endcsname
143 \expandafter\g@addto@macro\csname captions\languagename\endcsname
144 {\newfloat@@setname{#1}{#2}}%
145 \fi
146 \fi
147 \endgroup}
148 %%\AtBeginDocument{\let\newfloat@setname\newfloat@@setname}
149 \newcommand*\newfloat@@setname[2]{%
150 \@namedef{#1name}{#2}}
151 \define@key{@newfloat}{name}{%
152 \newfloat@setoption{name}{#1}}
153 \newcommand*\newfloat@setplacement[2]{%
154 \@namedef{fps@#1}{#2}}
155 \define@key{@newfloat}{placement}{%
156 \newfloat@setoption{placement}{#1}}
157 \newcommand*\newfloat@setwithin[2]{%
158 \ifcsname c@chapter\endcsname
159 \@removefromreset{#1}{chapter}%
160 \fi
161 \@removefromreset{#1}{section}%
162 \edef\@tempa{#2}%
163 \ifx\@tempa\@empty
164 \def\@tempa{none}%
165 \fi
166 \def\@tempb{none}%
167 \ifx\@tempa\@tempb
168 \ifcsname c@chapter\endcsname
169 \@chapterlistsgap@off{#1}%
170 \fi
171 \newfloat@@setwithin{#1}{}{}%
172 \else
173 \def\@tempb{chapter}%
174 \ifx\@tempa\@tempb
175 \@addtoreset{#1}{chapter}%
176 \@chapterlistsgap@on{#1}%
177 \newfloat@@setwithin{#1}{\ifnum\c@chapter>\z@ \thechapter.\fi}{\theHchapter.}%
178 \else
179 \def\@tempb{section}%
180 \ifx\@tempa\@tempb
181 \@addtoreset{#1}{section}%
182 \ifcsname c@chapter\endcsname
183 \@addtoreset{#1}{chapter}%
184 \@chapterlistsgap@on{#1}%
185 \newfloat@@setwithin{#1}{\thesection.}{\theHsection.}%
186 \else
187 \newfloat@@setwithin{#1}{\ifnum\c@section>\z@ \thesection.\fi}{\theHsection.}%
188 \fi
189 \else
190 \newfloat@Error{Invalid value `#2' for option `within'}%
191 \fi
192 \fi
193 \fi}
194 \newcommand*\newfloat@@setwithin[3]{%
195 \global\@namedef{the#1}{#2\arabic{#1}}%
196 \global\@namedef{theH#1}{#3\arabic{#1}}}
197 \define@key{@newfloat}{within}{%
198 \def\newfloat@within@value{#1}}
199 \newcommand*\newfloat@setwithout[1]{%
200 \newfloat@setwithin{#1}{none}}
201 \define@key{@newfloat}{without}[]{%
202 \def\newfloat@within@value{none}}
203 \newcommand*\newfloat@setchapterlistsgaps[2]{%
204 \edef\@tempa{#2}%
205 \def\@tempb{off}%
206 \ifx\@tempa\@tempb
207 \@chapterlistsgap@off{#1}%
208 \else
209 \def\@tempb{on}%
210 \ifx\@tempa\@tempb
211 \@chapterlistsgap@on{#1}%
212 \else
213 \newfloat@Error{Invalid value `#2' for option `chapterlistsgaps'}%
214 \fi
215 \fi}
216 \define@key{@newfloat}{chapterlistsgaps}{%
217 \def\newfloat@chapterlistsgaps@value{#1}}
218 \providecommand*\@removefromreset[2]{{%
219 \expandafter\let\csname c@#1\endcsname\@removefromreset
220 \def\@elt##1{%
221 \expandafter\ifx\csname c@##1\endcsname\@removefromreset
222 \else
223 \noexpand\@elt{##1}%
224 \fi}%
225 \expandafter\xdef\csname cl@#2\endcsname{%
226 \csname cl@#2\endcsname}}}
227 \newcommand*\newfloat@announce[2]{%
228 \@cons\newfloat@list{{#1}}%
229 \@cons\newfloat@@list{{#1}}%
230 \@ifundefined{newfloat@ext@#2}{%
231 \@namedef{newfloat@ext@#2}{#1}%
232 \ifcsname c@lofdepth\endcsname
233 \@ifundefined{c@#2depth}{%
234 \newcounter{#2depth}%
235 \setcounter{#2depth}{1}%
236 }{}%
237 \fi
238 \ifcsname addtotoclist\endcsname
239 \addtotoclist[float]{#2}%
240 \@namedef{listof#2name}{\@nameuse{list#1name}}%
241 \fi
242 }{}%
243 \ifcsname contentsuse\endcsname
244 \contentsuse{#1}{#2}%
245 \fi
246 \newfloat@hook{#1}}
247 \@onlypreamble\newfloat@announce
248 \newcommand*\newfloat@@list{}
249 \newcommand*\SetupFloatingEnvironment[1]{%
250 \newfloat@addtolist{#1}%
251 \newfloat@setoptions{#1}}
252 \newcommand\ForEachFloatingEnvironment{%
253 \@ifstar
254 {\@ForEachFloatingEnvironment\@gobble}%
255 {\@ForEachFloatingEnvironment\@iden}}
256 \newcommand\@ForEachFloatingEnvironment[2]{%
257 \def\@elt##1{#2}%
258 \newfloat@list
259 \let\@elt\relax
260 #1{\newfloat@addtohook{#2}}}
261 \providecommand\newfloat@addtohook[1]{%
262 \toks@=\expandafter{\newfloat@hook{##1}#1}%
263 \edef\@tempa{\def\noexpand\newfloat@hook####1{\the\toks@}}%
264 \@tempa}
265 \providecommand*\newfloat@hook[1]{}
266 \newcommand*\newfloat@list{}
267 \newcommand*\newfloat@addtolist[1]{%
268 \newfloat@ifinlist{#1}{}{%
269 \ifcsname ext@#1\endcsname
270 \@cons\newfloat@list{{#1}}%
271 \@namedef{newfloat@ext@\@nameuse{ext@#1}}{#1}%
272 \@ifundefined{@ifchapterlistsgap@#1}{%
273 \expandafter\let\csname @ifchapterlistsgap@#1\endcsname\@iden}{}%
274 \else
275 \newfloat@Error{`#1' does not seem to be a floating environment}%
276 \fi}}
277 \newcommand*\newfloat@ifinlist[1]{%
278 \let\next\@secondoftwo
279 \begingroup
280 \expandafter\let\csname c@#1\endcsname\newfloat@ifinlist
281 \def\@elt##1{%
282 \expandafter\ifx\csname c@##1\endcsname\newfloat@ifinlist
283 \global\let\next\@firstoftwo
284 \fi}%
285 \newfloat@list
286 \endgroup
287 \next}
288 \ifcsname ext@figure\endcsname
289 \newfloat@addtolist{figure}
290 \fi
291 \ifcsname ext@table\endcsname
292 \newfloat@addtolist{table}
293 \fi
294 \ifcsname @chapter\endcsname
295 \providecommand*\@chapterlistsgap{10\p@}%
296 \providecommand*\@addchapterlistsgap[2]{%
297 \@nameuse{@ifchapterlistsgap@#1}{% if switched on
298 \@@addchapterlistsgap{#1}{#2}}}
299 \providecommand*\@@addchapterlistsgap[2]{%
300 \@ifundefined{@addchapterlistsgap@#2}{% only once per extension
301 \@namedef{@addchapterlistsgap@#2}{#1}%
302 \@@@addchapterlistsgap{#2}}{}}
303 \providecommand*\@@@addchapterlistsgap[1]{%
304 \ifdim \@chapterlistsgap>\z@
305 \addtocontents{#1}{\protect\addvspace{\@chapterlistsgap}}%
306 \fi}
307 \providecommand*\@addchapterlistsgaps{%
308 \begingroup
309 \def\@elt##1{%
310 \@expandtwoargs\@addchapterlistsgap{##1}{\@nameuse{ext@##1}}}%
311 \newfloat@list
312 \endgroup}
313 \providecommand*\@chapterlistsgap@off[1]{%
314 \expandafter\let\csname @ifchapterlistsgap@#1\endcsname\@gobble
315 \ifcsname unsettoc\endcsname
316 \@expandtwoargs\unsettoc{\@nameuse{ext@#1}}{chapteratlist}%
317 \fi}
318 \providecommand*\@chapterlistsgap@on[1]{%
319 \expandafter\let\csname @ifchapterlistsgap@#1\endcsname\@iden
320 \ifcsname setuptoc\endcsname
321 \@expandtwoargs\setuptoc{\@nameuse{ext@#1}}{chapteratlist}%
322 \fi}
323 \fi
324 \define@key{newfloat}{chapterlistsgap}{%
325 \renewcommand*\@chapterlistsgap{#1}}
326 \define@key{newfloat}{within}{%
327 \def\newfloat@within@default{#1}% set new default value
328 \def\@elt##1{\newfloat@setwithin{##1}{#1}}%
329 \newfloat@list
330 \let\@elt\relax}
331 \define@key{newfloat}{without}[]{%
332 \KV@newfloat@within{none}}
333 \def\@elt#1{%
334 \define@key{newfloat}{#1name}{%
335 \newfloat@setname{#1}{##1}}%
336 \define@key{newfloat}{list#1name}{%
337 \newfloat@setname{list#1}{##1}}%
338 \define@key{newfloat}{#1within}{%
339 \newfloat@setwithin{#1}{##1}}%
340 \define@key{newfloat}{#1without}[]{%
341 \newfloat@setwithout{#1}}%
342 }%
343 \newfloat@list
344 \let\@elt\relax
345 \define@key{newfloat}{planb}[true]{%
346 \def\@tempa{#1}%
347 \def\@tempb{false}%
348 \ifx\@tempa\@tempb
349 \let\newfloat@ifplanb\@gobble
350 \else
351 \def\@tempb{true}%
352 \ifx\@tempa\@tempb
353 \let\newfloat@ifplanb\@iden
354 \else
355 \newfloat@Error{Invalid value `#1' for option `planb'}%
356 \fi
357 \fi}
358 \define@key{newfloat}{planb-fileext}{%
359 \newfloat@Info{Setting Plan B file extension to `#1'}
360 \xdef\newfloat@addtocontents@ext{#1}}
361
362 \let\@tempc\relax
363 \@expandtwoargs\setkeys{newfloat}{planb,\@ptionlist{\@currname.\@currext}}%
364 \AtEndOfPackage{\let\@unprocessedoptions\relax}
365 \newcommand*\newfloatsetup{\setkeys{newfloat}}
366 \newcommand\newfloat@replace@chapter[2]{%
367 \begingroup
368 \let\if@twocolumn\iffalse
369 \let\if@mainmatter\iffalse
370 \let\if@thema\iffalse
371 \def\@tempa[##1]##2{#1}%
372 \ifx\@tempa\@chapter
373 \gdef\@chapter[##1]##2{#2}%
374 \global\let\newfloat@replace@chapter\@gobbletwo
375 \else\ifx\@tempa\Hy@org@chapter
376 \gdef\Hy@org@chapter[##1]##2{#2}%
377 \global\let\newfloat@replace@chapter\@gobbletwo
378 \fi\fi
379 \endgroup}
380 \ifcsname @chapter\endcsname \else
381 \let\newfloat@replace@chapter\@gobbletwo
382 \fi
383 \newfloat@replace@chapter{%
384 \ifnum \c@secnumdepth >\m@ne
385 \refstepcounter{chapter}%
386 \typeout{\@chapapp\space\thechapter.}%
387 \addcontentsline{toc}{chapter}%
388 {\protect\numberline{\thechapter}#1}%
389 \else
390 \addcontentsline{toc}{chapter}{#1}%
391 \fi
392 \chaptermark{#1}%
393 \addtocontents{lof}{\protect\addvspace{10\p@}}%
394 \addtocontents{lot}{\protect\addvspace{10\p@}}%
395 \if@twocolumn
396 \@topnewpage[\@makechapterhead{#2}]%
397 \else
398 \@makechapterhead{#2}%
399 \@afterheading
400 \fi
401 }{%
402 \ifnum \c@secnumdepth >\m@ne
403 \refstepcounter{chapter}%
404 \typeout{\@chapapp\space\thechapter.}%
405 \addcontentsline{toc}{chapter}%
406 {\protect\numberline{\thechapter}#1}%
407 \else
408 \addcontentsline{toc}{chapter}{#1}%
409 \fi
410 \chaptermark{#1}%
411 \@addchapterlistsgaps
412 \if@twocolumn
413 \@topnewpage[\@makechapterhead{#2}]%
414 \else
415 \@makechapterhead{#2}%
416 \@afterheading
417 \fi}
418 \newfloat@replace@chapter{%
419 \ifnum \c@secnumdepth >\m@ne
420 \if@mainmatter
421 \refstepcounter{chapter}%
422 \typeout{\@chapapp\space\thechapter.}%
423 \addcontentsline{toc}{chapter}%
424 {\protect\numberline{\thechapter}#1}%
425 \else
426 \addcontentsline{toc}{chapter}{#1}%
427 \fi
428 \else
429 \addcontentsline{toc}{chapter}{#1}%
430 \fi
431 \chaptermark{#1}%
432 \addtocontents{lof}{\protect\addvspace{10\p@}}%
433 \addtocontents{lot}{\protect\addvspace{10\p@}}%
434 \if@twocolumn
435 \@topnewpage[\@makechapterhead{#2}]%
436 \else
437 \@makechapterhead{#2}%
438 \@afterheading
439 \fi
440 }{%
441 \ifnum \c@secnumdepth >\m@ne
442 \if@mainmatter
443 \refstepcounter{chapter}%
444 \typeout{\@chapapp\space\thechapter.}%
445 \addcontentsline{toc}{chapter}%
446 {\protect\numberline{\thechapter}#1}%
447 \else
448 \addcontentsline{toc}{chapter}{#1}%
449 \fi
450 \else
451 \addcontentsline{toc}{chapter}{#1}%
452 \fi
453 \chaptermark{#1}%
454 \@addchapterlistsgaps
455 \if@twocolumn
456 \@topnewpage[\@makechapterhead{#2}]%
457 \else
458 \@makechapterhead{#2}%
459 \@afterheading
460 \fi}
461 \newfloat@replace@chapter{%
462 \refstepcounter{chapter}%
463 \ifnum\c@secnumdepth<\z@ \let\@secnumber\@empty
464 \else \let\@secnumber\thechapter \fi
465 \typeout{\chaptername\space\@secnumber}%
466 \def\@toclevel{0}%
467 \ifx\chaptername\appendixname \@tocwriteb\tocappendix{chapter}{#2}%
468 \else \@tocwriteb\tocchapter{chapter}{#2}\fi
469 \chaptermark{#1}%
470 \addtocontents{lof}{\protect\addvspace{10\p@}}%
471 \addtocontents{lot}{\protect\addvspace{10\p@}}%
472 \@makechapterhead{#2}\@afterheading
473 }{%
474 \refstepcounter{chapter}%
475 \ifnum\c@secnumdepth<\z@ \let\@secnumber\@empty
476 \else \let\@secnumber\thechapter \fi
477 \typeout{\chaptername\space\@secnumber}%
478 \def\@toclevel{0}%
479 \ifx\chaptername\appendixname \@tocwriteb\tocappendix{chapter}{#2}%
480 \else \@tocwriteb\tocchapter{chapter}{#2}\fi
481 \chaptermark{#1}%
482 \@addchapterlistsgaps
483 \@makechapterhead{#2}\@afterheading}
484 \@ifpackageloaded{tocbasic}{%
485 \let\newfloat@replace@chapter\@gobbletwo}{}
486 \ifcsname insertchapterspace\endcsname
487 \renewcommand*\insertchapterspace{\@addchapterlistsgaps}
488 \let\newfloat@replace@chapter\@gobbletwo
489 \fi
490 \newfloat@replace@chapter{%
491 \ifnum \c@secnumdepth >\m@ne
492 \refstepcounter{chapter}%
493 \typeout{\@chapapp\space\thechapter.}%
494 \addcontentsline{toc}{chapter}%
495 {\protect\numberline{\thechapter}\toc@font0 #1}%
496 \else
497 \addcontentsline{toc}{chapter}{\toc@font0 #1}%
498 \fi
499 \chaptermark{#1}%
500 \addtocontents{lof}{\protect\addvspace{10\p@}}%
501 \addtocontents{lot}{\protect\addvspace{10\p@}}%
502 \if@twocolumn
503 \@topnewpage[\@makechapterhead{#2}]%
504 \else
505 \@makechapterhead{#2}%
506 \@afterheading
507 \fi
508 }{%
509 \ifnum \c@secnumdepth >\m@ne
510 \refstepcounter{chapter}%
511 \typeout{\@chapapp\space\thechapter.}%
512 \addcontentsline{toc}{chapter}%
513 {\protect\numberline{\thechapter}\toc@font0 #1}%
514 \else
515 \addcontentsline{toc}{chapter}{\toc@font0 #1}%
516 \fi
517 \chaptermark{#1}%
518 \@addchapterlistsgaps
519 \if@twocolumn
520 \@topnewpage[\@makechapterhead{#2}]%
521 \else
522 \@makechapterhead{#2}%
523 \@afterheading
524 \fi}
525 % boek(3).cls [2004/06/07 v2.1a NTG LaTeX document class]
526 \newfloat@replace@chapter{%
527 \ifnum \c@secnumdepth >\m@ne
528 \if@mainmatter
529 \refstepcounter{chapter}%
530 \typeout{\@chapapp\space\thechapter.}%
531 \addcontentsline{toc}{chapter}%
532 {\protect\numberline{\thechapter}\toc@font0 #1}%
533 \else
534 \addcontentsline{toc}{chapter}{\toc@font0 #1}%
535 \fi
536 \else
537 \addcontentsline{toc}{chapter}{\toc@font0 #1}%
538 \fi
539 \chaptermark{#1}%
540 \addtocontents{lof}{\protect\addvspace{10\p@}}%
541 \addtocontents{lot}{\protect\addvspace{10\p@}}%
542 \if@twocolumn
543 \@topnewpage[\@makechapterhead{#2}]%
544 \else
545 \@makechapterhead{#2}%
546 \@afterheading
547 \fi
548 }{%
549 \ifnum \c@secnumdepth >\m@ne
550 \if@mainmatter
551 \refstepcounter{chapter}%
552 \typeout{\@chapapp\space\thechapter.}%
553 \addcontentsline{toc}{chapter}%
554 {\protect\numberline{\thechapter}\toc@font0 #1}%
555 \else
556 \addcontentsline{toc}{chapter}{\toc@font0 #1}%
557 \fi
558 \else
559 \addcontentsline{toc}{chapter}{\toc@font0 #1}%
560 \fi
561 \chaptermark{#1}%
562 \@addchapterlistsgaps
563 \if@twocolumn
564 \@topnewpage[\@makechapterhead{#2}]%
565 \else
566 \@makechapterhead{#2}%
567 \@afterheading
568 \fi}
569 \newfloat@replace@chapter{%
570 \ifnum \c@secnumdepth >\m@ne
571 \if@mainmatter
572 \refstepcounter{chapter}%
573 \typeout{\chaptername\space\thechapter.}
574 \if@thema
575 \ifx\@shortauthor\@empty
576 \addcontentsline{toc}{chapter}{%
577 \protect\numberline{\thechapter.}#1}%
578 \else
579 \addcontentsline{toc}{chapter}{%
580 \protect\numberline{\thechapter.}%
581 \@shortauthor\hfill\mbox{}\vskip\normallineskip #1}%
582 \fi
583 \else
584 \addcontentsline{toc}{chapter}{%
585 \protect\numberline{\thechapter.}#1}%
586 \fi
587 \else
588 \addcontentsline{toc}{chapter}{#1}
589 \fi
590 \else
591 \addcontentsline{toc}{chapter}{#1}
592 \fi
593 \chaptermark{#1}
594 \addtocontents{lof}{\protect\addvspace{10pt}}
595 \addtocontents{lot}{\protect\addvspace{10pt}}
596 \if@twocolumn
597 \@topnewpage[\@makechapterhead{#2}]
598 \else
599 \@makechapterhead{#2}
600 \@afterheading
601 \fi
602 }{%
603 \ifnum \c@secnumdepth >\m@ne
604 \if@mainmatter
605 \refstepcounter{chapter}%
606 \typeout{\chaptername\space\thechapter.}%
607 \if@thema
608 \ifx\@shortauthor\@empty
609 \addcontentsline{toc}{chapter}{%
610 \protect\numberline{\thechapter.}#1}%
611 \else
612 \addcontentsline{toc}{chapter}{%
613 \protect\numberline{\thechapter.}%
614 \@shortauthor\hfill\mbox{}\vskip\normallineskip #1}%
615 \fi
616 \else
617 \addcontentsline{toc}{chapter}{%
618 \protect\numberline{\thechapter.}#1}%
619 \fi
620 \else
621 \addcontentsline{toc}{chapter}{#1}%
622 \fi
623 \else
624 \addcontentsline{toc}{chapter}{#1}%
625 \fi
626 \chaptermark{#1}%
627 \@addchapterlistsgaps
628 \if@twocolumn
629 \@topnewpage[\@makechapterhead{#2}]%
630 \else
631 \@makechapterhead{#2}%
632 \@afterheading
633 \fi}
634 \ifx\newfloat@replace@chapter\@gobbletwo \else
635 \newfloat@InfoNoLine{%
636 Unsupported document class, or \noexpand\@chapter\MessageBreak
637 was already redefined by another package}
638 \newfloat@InfoNoLine{\string\@chapter\space=\space\meaning\@chapter}
639 \newfloat@InfoNoLine{\string\Hy@org@chapter\space=\space\meaning\Hy@org@chapter}
640 \newfloat@ifplanb{%
641 \newfloat@InfoNoLine{Trying Plan B..}%
642 \let\newfloat@addtocontents@ORI\addtocontents
643 \long\def\addtocontents#1#2{%
644 \newfloat@addtocontents{#1}{#2}#2\addvspace\newfloat@nil}%
645 \long\def\newfloat@addtocontents#1#2#3\addvspace#4\newfloat@nil{%
646 \def\newfloat@tempa{#4}%
647 \ifx\newfloat@tempa\@empty
648 \newfloat@addtocontents@ORI{#1}{#2}%
649 \else
650 \ifx\newfloat@addtocontents@ext\@undefined
651 \newfloat@Info{Setting Plan B file extension to `#1'...}%
652 \xdef\newfloat@addtocontents@ext{#1}%
653 \fi
654 \edef\newfloat@tempa{#1}%
655 \ifx\newfloat@tempa\newfloat@addtocontents@ext
656 \begingroup
657 \let\addtocontents\newfloat@addtocontents@ORI
658 \@addchapterlistsgaps
659 \endgroup
660 \fi
661 \fi}}
662 \fi
663 \newcommand\newfloat@ForEachNew[2][newfloat@@list]{%
664 \AtBeginDocument{%
665 \ifcsname#1\endcsname
666 \def\@elt##1{#2}%
667 \newfloat@@list
668 \let\@elt\relax
669 \fi}}%
670 \@onlypreamble\newfloat@ForEachNew
671 %% \begin{macrocode}
672 \newfloat@ForEachNew[float@exts]{%
673 \@nameuse{@ifchapterlistsgap@#1}{% if switched on
674 \let\float@do=\relax
675 \edef\@tempa{%
676 \noexpand\float@exts{\the\float@exts\float@do{\@nameuse{ext@#1}}}}%
677 \@tempa}}
678 \newfloat@ForEachNew[FP@floatBegin]{%
679 \newcounter{FP@#1C}%
680 \newenvironment{FP#1}{\FP@floatBegin{#1}}{\FP@floatEnd}}
681 \providecommand*\ext@lstlisting{lol}%
682 \newfloat@ForEachNew[@rotfloat]{%
683 \newenvironment{sideways#1}{\@rotfloat{#1}}{\end@rotfloat}%
684 \newenvironment{sideways#1*}{\@rotdblfloat{#1}}{\end@rotdblfloat}}
685 \newcommand*\newfloat@For@SC[2]{%
686 \def#1{b}% = \sidecaptionvpos{#2}{b} (v1.6)
687 \newenvironment{SC#2}%
688 {\SC@float[#1]{#2}}{\endSC@float}%
689 \newenvironment{SC#2*}%
690 {\SC@dblfloat[#1]{#2}}{\endSC@dblfloat}}
691 \@onlypreamble\newfloat@For@SC
692 \newfloat@ForEachNew[SC@float]{%
693 \expandafter\newfloat@For@SC\csname SC@#1@vpos\endcsname{#1}}
694 \newfloat@ForEachNew[wrapfloat]{%
695 \newenvironment{wrap#1}{\wrapfloat{#1}}{\endwrapfloat}}
696 \endinput
697 %%
698 %% End of file `newfloat_v1.0.sty'.