Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

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