1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2
% scrreprt.4ht 2001-12-14-17:07 %
3
% Copyright (C) 1999--2001 Eitan M. Gurari %
5
% This program can redistributed and/or modified under %
6
% the terms of the LaTeX Project Public License %
7
% Distributed from CTAN archives in directory %
8
% macros/latex/base/lppl.txt; either version 1 of the %
9
% License, or (at your option) any later version. %
11
% However, you are allowed to modify this program %
12
% without changing its name, if you modify its %
13
% signature. Changes to the signature can be introduced %
14
% with a directive of the form %
15
% \message{signature} %
17
% gurari@cis.ohio-state.edu %
18
% http://www.cis.ohio-state.edu/~gurari %
19
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
20
\immediate\write-1{version 2001-12-14-17:07}
22
\Configure{UndefinedSec}{likepart}
23
\Configure{UndefinedSec}{likechapter}
24
\Configure{UndefinedSec}{likesection}
25
\Configure{UndefinedSec}{likesubsection}
26
\def\tableofcontents{%
27
\ifx\contentsname\empty \else
29
\chapter*{\contentsname}%
37
\Def:Section\chapter{\thechapter}{#1}
40
\def\@makechapterhead#1{}
41
\let\no@chapter\@chapter
43
{\SkipRefstepAnchor \let\addcontentsline\:gobbleIII\no@chapter[#1]{}}%
44
\HtmlEnv \Toc:Title{#1}\:chapter{#2}}
45
\Def:Section\likechapter{}{#1}
46
\let\:likechapter\likechapter
47
\let\likechapter\:UnDef
48
\let\no@schapter\@schapter
50
{\let\addcontentsline\:gobbleIII\no@schapter{}}%
51
\HtmlEnv \:likechapter{#1}}
52
\let\no@appendix\appendix
53
\Def:Section\appendix{\thechapter}{#1}
54
\let\:appendix\appendix
56
\def\@chapter[##1]##2{%
57
{\def\addcontentsline####1####2####3{}\no@chapter[##1]{}}%
58
\HtmlEnv \Toc:Title{##1}\:appendix{##2}}%
61
\NewConfigure{caption}[4]{\c:def\cptA:{#1}\c:def\cptB:{#2}%
62
\c:def\cptC:{#3}\c:def\cptD:{#4}}
63
\long\def\@makecaption#1#2{%
65
\cptB:}{\cptC:{#2}\cptD:}}
68
\pend:def\caption{\SkipRefstepAnchor}
69
\append:def\quote{\par\@totalleftmargin\z@}
70
\long\def\c:theindex:#1#2#3#4#5#6#7#8#9{%
72
\ifx \idx:item\:UnDef \ifx \LNK\:UnDef \ifx \LNKno\:UnDef
73
\:warning{Process with
74
^^J\space\space tex '\string\def\string\filename
75
{{\jobname}{ind}{idx}{in}{out}} \noexpand\input\space idxmake.4ht'
76
^^J\space\space makeindex -o \jobname .out \jobname .in
78
^^J\space\space makeindex -o \jobname .ind \jobname .idx
79
^^JOn some platforms, the quotation marks ' should be
80
^^J replaced by double quotation marks " or eliminated
83
\def\idx:item{\SaveEverypar\ht:everypar{}#1}%
84
\def\endtheindex{\idx:item#2\RecallEverypar}%
85
\def\item{\idx:item\let\index\@gobble #3\def\idx:item{#4}}%
86
\def\subitem{\idx:item\let\index\@gobble #5\def\idx:item{#6}}%
87
\def\subsubitem{\idx:item\let\index\@gobble #7\def\idx:item{#8}}}%
88
\def\indexspace{\idx:item#9\let\idx:item\empty}}
89
\let\o:maketitle:\maketitle
90
\def\maketitle{\bgroup
91
\ifx \EndPicture\:UnDef
93
\Configure{HtmlPar}{}{}{}{}%
94
\ConfigureEnv{center}{\empty}{}{\empty}{\empty}
95
\Configure{tabular}{}{}{}{\e:mktl}{}{}%
96
\ConfigureEnv{tabular}{\empty}{}{}{}%
98
\pend:def\@title{\a:ttl}\append:def\@title{\b:ttl}%
99
\pend:def\@date{\a:dat}\append:def\@date{\b:dat}%
100
\pend:def\@author{\a:aut}\append:def\@author{\b:aut}%
104
\pic:gobble\a:mktl \o:maketitle: \pic:gobble\b:mktl
105
\egroup \let\maketitle\empty}
106
\NewConfigure{maketitle}[4]{\c:def\a:mktl{#1}\c:def\b:mktl{#2}%
107
\c:def\a:ttl{#3}\c:def\b:ttl{#4}}
108
\NewConfigure{thanks author date and}[8]{%
109
\c:def\a:thanks{#1}\c:def\b:thanks{#2}\c:def\a:aut{#3}\c:def\b:aut{#4}%
110
\c:def\a:dat{#5}\c:def\b:dat{#6}\c:def\a:and{#7}\c:def\e:mktl{#8}}
113
\append:def\quotation{\a:quotation\par\@totalleftmargin\z@}
114
\NewConfigure{quotation}{1}
115
\NewConfigure{listof}{6}
118
\noexpand\ifx [\noexpand\:temp
119
\noexpand\expandafter\noexpand\:TableOfContents
121
\noexpand\Auto:ent{\ifnum \c@tocdepth >-2 part,\fi
122
\ifnum \c@tocdepth >\m@ne chapter,appendix,addchap,\fi
123
\ifnum \z@>\c@tocdepth\else section,\fi
124
\ifnum 1>\c@tocdepth \else subsection,\fi
125
\ifnum 2>\c@tocdepth \else subsection,\fi
126
\ifnum 3>\c@tocdepth \else subsubsection,\fi
127
\ifnum 4>\c@tocdepth \else paragraph,\fi
128
\ifnum 5>\c@tocdepth \else subparagraph,\fi
131
\def\:tableofcontents{\futurelet\:temp\:TOC}
133
\edef\auto:toc{\noexpand\:TableOfContents[\ifx \auto:toc\:UnDef
134
#1\else \auto:toc \fi]} \auto:toc
135
\global\let\auto:toc\:UnDef }
136
\def\:tocs{\noexpand\:tableofcontents}
137
\pend:defIII\addcontentsline{%
138
\def\:temp{##1}\def\:tempa{toc}\ifx \:temp\:tempa
139
\gHAdvance\TitleCount 1 \fi }
140
\def\@dottedtocline#1#2#3#4#5{\hbox{\def\numberline##1{\e:listof
141
##1\f:listof}\c:listof#4\d:listof}\ignorespaces}
144
\makeatletter \Configure{cite}{}{}{}{}%
145
\def\:temp{#1}\def\:tempa{toc}%
147
\@input{\jobname.\ifx \:temp\:tempa 4ct\else #1\fi}%
150
\expandafter\expandafter\csname
151
newwrite\endcsname\csname tf@#1\endcsname
152
\immediate\openout \csname tf@#1\endcsname \jobname.#1\relax
154
\global\@nobreakfalse
156
\NewConfigure{tableofcontents*}[1]{%
157
\def\:tempa{#1}\ifx\empty\:tempa
158
\ifx \au:StartSec\:UnDef \else \gdef\:StartSec{\au:StartSec}\fi
161
\ifx \au:StartSec\:UnDef
162
\let\au:StartSec\:StartSec
163
\def\:StartSec{\:tableofcontents
164
\global\let\auto:toc\:UnDef \:StartSec}%
165
\pend:def\:tableofcontents{\gdef\:StartSec{\au:StartSec}}%
170
\ifx \@openbib@code\:UnDef \else
171
\pend:def\@openbib@code{\labelsep\z@}
173
\def\:temp#1#2!*?: {\def\:temp{#1}}
174
\expandafter\:temp\usepackage!*?:
175
\def\:tempa{\@latex@e@error}
176
\ifx \:temp\:tempa \else
177
\def\:tempa#1#2#3#4{\tmp:toks{#1{#2}}%
178
\long\expandafter\edef\csname #4 \endcsname{\the\tmp:toks
179
{\expandafter\noexpand
180
\csname o:\expandafter\:gobble\string #3:\endcsname}}}
182
\expandafter\expandafter\expandafter\:tempa\csname #1 \endcsname{#1}}
190
\let\:tempc\listoffigures
191
\pend:def\:tempc{\begingroup \a:listoffigures
192
\def\@starttoc{\:tableofcontents[lof]\:gobble}}
193
\append:def\:tempc{\b:listoffigures \endgroup}
194
\HLet\listoffigures\:tempc
195
\let\:tempc\listoftables
196
\pend:def\:tempc{\begingroup \a:listoftables
197
\def\@starttoc{\:tableofcontents[lot]\:gobble}}
198
\append:def\:tempc{\b:listoftables \endgroup}
199
\HLet\listoftables\:tempc
201
\NewConfigure{listoffigures}{2}
202
\NewConfigure{listoftables}{2}
204
\ifx \part\:UnDef\else
206
\ifnum \c@secnumdepth >-2\relax
207
\SkipRefstepAnchor \refstepcounter{part}%
208
\addcontentsline{toc}{part}{\thepart\hspace{1em}#1}%
210
\addcontentsline{toc}{part}{#1}%
212
\csname @endpart\endcsname}
214
\Def:Section\part{\thepart}{#1}
219
{\let\addcontentsline\:gobbleIII\no@part[#1]{}}%
220
\HtmlEnv \Toc:Title{#1}\:part{#2}}
221
\Def:Section\likepart{}{#1}
222
\let\:likepart\likepart
226
{\let\addcontentsline\:gobbleIII\no@spart{}}%
227
\HtmlEnv \:likepart{#1}}
230
\ifx \section\:UnDef\else
231
\let\no@section\section
232
\Def:Section\section{\ifnum \c:secnumdepth>\c@secnumdepth \else
234
\let\no:section\section
235
\def\section{\rdef:sec{section}}
236
\Def:Section\likesection{}{#1}
237
\let\:likesection\likesection
238
\let\likesection\:UnDef
240
\let\no@subsection\subsection
241
\Def:Section\subsection{\ifnum \c:secnumdepth>\c@secnumdepth \else
242
\thesubsection \fi}{#1}
243
\let\no:subsection\subsection
244
\def\subsection{\rdef:sec{subsection}}
245
\Def:Section\likesubsection{}{#1}
246
\let\:likesubsection\likesubsection
247
\let\likesubsection\:UnDef
248
\let\no@subsubsection\subsubsection
249
\Def:Section\subsubsection{\ifnum \c:secnumdepth>\c@secnumdepth \else
250
\thesubsubsection \fi}{#1}
251
\let\no:subsubsection\subsubsection
252
\def\subsubsection{\rdef:sec{subsubsection}}
253
\Def:Section\likesubsubsection{}{#1}
254
\let\:likesubsubsection\likesubsubsection
255
\let\likesubsubsection\:UnDef
256
\let\no@paragraph\paragraph
257
\Def:Section\paragraph{\ifnum \c:secnumdepth>\c@secnumdepth \else
258
\theparagraph \fi}{#1}
259
\let\no:paragraph\paragraph
260
\def\paragraph{\rdef:sec{paragraph}}
261
\Def:Section\likeparagraph{}{#1}
262
\let\:likeparagraph\likeparagraph
263
\let\likeparagraph\:UnDef
264
\let\no@subparagraph\subparagraph
265
\Def:Section\subparagraph{\ifnum \c:secnumdepth>\c@secnumdepth \else
266
\thesubparagraph \fi}{#1}
267
\let\no:subparagraph\subparagraph
268
\def\subparagraph{\rdef:sec{subparagraph}}
269
\Def:Section\likesubparagraph{}{#1}
270
\let\:likesubparagraph\likesubparagraph
271
\let\likesubparagraph\:UnDef
272
\ConfigureToc{likeparagraph} {}{\empty}{}{\newline}
273
\ConfigureToc{likepart} {}{\empty}{}{\newline}
274
\ConfigureToc{likesection} {}{\empty}{}{\newline}
275
\ConfigureToc{likesubparagraph} {}{\empty}{}{\newline}
276
\ConfigureToc{likesubsection} {}{\empty}{}{\newline}
277
\ConfigureToc{likesubsubsection} {}{\empty}{}{\newline}
278
\ConfigureToc{paragraph} {\empty}{\ }{}{\newline}
279
\ConfigureToc{part} {\empty}{\ }{}{\newline}
280
\ConfigureToc{section} {\empty}{\ }{}{\newline}
281
\ConfigureToc{subparagraph} {\empty}{\ }{}{\newline}
282
\ConfigureToc{subsection} {\empty}{\ }{}{\newline}
283
\ConfigureToc{subsubsection} {\empty}{\ }{}{\newline}
284
\ConfigureToc{appendix} {\empty}{\ }{}{\newline}
285
\ConfigureToc{chapter} {\empty}{\ }{}{\newline}
286
\ConfigureToc{likechapter} {}{\empty}{}{\newline}
288
\ifx \@@maybeautodot\:UnDef
289
\let\add:chap=\@addchap
291
\let\chap:addcontentsline=\addcontentsline
292
\def\addcontentsline{\let\addcontentsline\chap:addcontentsline
297
\let\no@addchap\@addchap
298
\def\@addchap[#1]#2{%
299
\HtmlEnv \Toc:Title{#1}\:addchap{#2}}
302
\let\:makeschapterhead=\@makeschapterhead
303
\def\::makeschapterhead#1{\:makeschapterhead{\normalfont\normalsize
305
\pend:def\addchap{\let\@makeschapterhead\::makeschapterhead}
306
\pend:def\chapter{\let\@makeschapterhead\:makeschapterhead}
308
\Def:Section\addchap{}{#1}
309
\let\:addchap=\addchap
311
\ConfigureToc{addchap} {\empty}{\ }{}{\newline}