1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2
% article.4ht 2001-12-14-17:07 %
3
% Copyright (C) 1997--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}
23
\Configure{UndefinedSec}{likepart}
24
\Configure{UndefinedSec}{likechapter}
25
\Configure{UndefinedSec}{likesection}
26
\Configure{UndefinedSec}{likesubsection}
29
\NewConfigure{caption}[4]{\c:def\cptA:{#1}\c:def\cptB:{#2}%
30
\c:def\cptC:{#3}\c:def\cptD:{#4}}
31
\long\def\@makecaption#1#2{%
33
\cptB:}{\cptC:{#2}\cptD:}}
36
\pend:def\caption{\SkipRefstepAnchor}
37
\append:def\quote{\par\@totalleftmargin\z@}
38
\long\def\c:theindex:#1#2#3#4#5#6#7#8#9{%
40
\ifx \idx:item\:UnDef \ifx \LNK\:UnDef \ifx \LNKno\:UnDef
41
\:warning{Process with
42
^^J\space\space tex '\string\def\string\filename
43
{{\jobname}{ind}{idx}{in}{out}} \noexpand\input\space idxmake.4ht'
44
^^J\space\space makeindex -o \jobname .out \jobname .in
46
^^J\space\space makeindex -o \jobname .ind \jobname .idx
47
^^JOn some platforms, the quotation marks ' should be
48
^^J replaced by double quotation marks " or eliminated
51
\def\idx:item{\SaveEverypar\ht:everypar{}#1}%
52
\def\endtheindex{\idx:item#2\RecallEverypar}%
53
\def\item{\idx:item\let\index\@gobble #3\def\idx:item{#4}}%
54
\def\subitem{\idx:item\let\index\@gobble #5\def\idx:item{#6}}%
55
\def\subsubitem{\idx:item\let\index\@gobble #7\def\idx:item{#8}}}%
56
\def\indexspace{\idx:item#9\let\idx:item\empty}}
57
\let\o:maketitle:\maketitle
58
\def\maketitle{\bgroup
59
\ifx \EndPicture\:UnDef
61
\Configure{HtmlPar}{}{}{}{}%
62
\ConfigureEnv{center}{\empty}{}{\empty}{\empty}
63
\Configure{tabular}{}{}{}{\e:mktl}{}{}%
64
\ConfigureEnv{tabular}{\empty}{}{}{}%
66
\pend:def\@title{\a:ttl}\append:def\@title{\b:ttl}%
67
\pend:def\@date{\a:dat}\append:def\@date{\b:dat}%
68
\pend:def\@author{\a:aut}\append:def\@author{\b:aut}%
72
\pic:gobble\a:mktl \o:maketitle: \pic:gobble\b:mktl
73
\egroup \let\maketitle\empty}
74
\NewConfigure{maketitle}[4]{\c:def\a:mktl{#1}\c:def\b:mktl{#2}%
75
\c:def\a:ttl{#3}\c:def\b:ttl{#4}}
76
\NewConfigure{thanks author date and}[8]{%
77
\c:def\a:thanks{#1}\c:def\b:thanks{#2}\c:def\a:aut{#3}\c:def\b:aut{#4}%
78
\c:def\a:dat{#5}\c:def\b:dat{#6}\c:def\a:and{#7}\c:def\e:mktl{#8}}
81
\append:def\quotation{\a:quotation\par\@totalleftmargin\z@}
82
\NewConfigure{quotation}{1}
83
\NewConfigure{listof}{6}
88
\noexpand\ifx [\noexpand\:temp
89
\noexpand\expandafter\noexpand\:TableOfContents
91
\noexpand\Auto:ent{\ifnum \c@tocdepth >-2 part,\fi
92
\expandafter\ifx \csname @chapter\endcsname\relax
93
\ifnum \c@tocdepth >\z@ section,\fi
95
\ifnum \c@tocdepth >\m@ne chapter,appendix,\fi
96
\ifnum \z@>\c@tocdepth\else section,\fi
97
\ifnum 1>\c@tocdepth \else subsection,\fi
99
\ifnum 2>\c@tocdepth \else subsection,\fi
100
\ifnum 3>\c@tocdepth \else subsubsection,\fi
101
\ifnum 4>\c@tocdepth \else paragraph,\fi
102
\ifnum 5>\c@tocdepth \else subparagraph,\fi
105
\def\:tableofcontents{\futurelet\:temp\:TOC}
107
\edef\auto:toc{\noexpand\:TableOfContents[\ifx \auto:toc\:UnDef
108
#1\else \auto:toc \fi]} \auto:toc
109
\global\let\auto:toc\:UnDef }
111
\def\:tocs{\noexpand\:tableofcontents}
112
\pend:defIII\addcontentsline{%
113
\def\:temp{##1}\def\:tempa{toc}\ifx \:temp\:tempa
114
\gHAdvance\TitleCount 1 \fi }
115
\def\@dottedtocline#1#2#3#4#5{\hbox{\def\numberline##1{\e:listof
116
##1\f:listof}\c:listof#4\d:listof}\ignorespaces}
119
\makeatletter \Configure{cite}{}{}{}{}%
120
\def\:temp{#1}\def\:tempa{toc}%
122
\@input{\jobname.\ifx \:temp\:tempa 4ct\else #1\fi}%
125
\expandafter\expandafter\csname
126
newwrite\endcsname\csname tf@#1\endcsname
127
\immediate\openout \csname tf@#1\endcsname \jobname.#1\relax
129
\global\@nobreakfalse
134
\NewConfigure{tableofcontents*}[1]{%
135
\def\:tempa{#1}\ifx\empty\:tempa
136
\ifx \au:StartSec\:UnDef \else \gdef\:StartSec{\au:StartSec}\fi
139
\ifx \au:StartSec\:UnDef
140
\let\au:StartSec\:StartSec
141
\def\:StartSec{\:tableofcontents
142
\global\let\auto:toc\:UnDef \:StartSec}%
143
\pend:def\:tableofcontents{\gdef\:StartSec{\au:StartSec}}%
147
\ifx \@openbib@code\:UnDef \else
148
\pend:def\@openbib@code{\labelsep\z@}
150
\def\:temp#1#2!*?: {\def\:temp{#1}}
151
\expandafter\:temp\usepackage!*?:
152
\def\:tempa{\@latex@e@error}
153
\ifx \:temp\:tempa \else
154
\def\:tempa#1#2#3#4{\tmp:toks{#1{#2}}%
155
\long\expandafter\edef\csname #4 \endcsname{\the\tmp:toks
156
{\expandafter\noexpand
157
\csname o:\expandafter\:gobble\string #3:\endcsname}}}
159
\expandafter\expandafter\expandafter\:tempa\csname #1 \endcsname{#1}}
168
\let\:tempc\listoffigures
169
\pend:def\:tempc{\begingroup \a:listoffigures
170
\def\@starttoc{\:tableofcontents[lof]\:gobble}}
171
\append:def\:tempc{\b:listoffigures \endgroup}
172
\HLet\listoffigures\:tempc
173
\let\:tempc\listoftables
174
\pend:def\:tempc{\begingroup \a:listoftables
175
\def\@starttoc{\:tableofcontents[lot]\:gobble}}
176
\append:def\:tempc{\b:listoftables \endgroup}
177
\HLet\listoftables\:tempc
179
\NewConfigure{listoffigures}{2}
180
\NewConfigure{listoftables}{2}
182
\ifx \part\:UnDef\else
184
\ifnum \c@secnumdepth >-2\relax
185
\SkipRefstepAnchor \refstepcounter{part}%
186
\addcontentsline{toc}{part}{\thepart\hspace{1em}#1}%
188
\addcontentsline{toc}{part}{#1}%
190
\csname @endpart\endcsname}
192
\Def:Section\part{\thepart}{#1}
197
{\let\addcontentsline\:gobbleIII\no@part[#1]{}}%
198
\HtmlEnv \Toc:Title{#1}\:part{#2}}
199
\Def:Section\likepart{}{#1}
200
\let\:likepart\likepart
204
{\let\addcontentsline\:gobbleIII\no@spart{}}%
205
\HtmlEnv \:likepart{#1}}
208
\ifx \section\:UnDef\else
209
\let\no@section\section
210
\Def:Section\section{\ifnum \c:secnumdepth>\c@secnumdepth \else
212
\let\no:section\section
213
\def\section{\rdef:sec{section}}
214
\Def:Section\likesection{}{#1}
215
\let\:likesection\likesection
216
\let\likesection\:UnDef
219
\let\no@subsection\subsection
220
\Def:Section\subsection{\ifnum \c:secnumdepth>\c@secnumdepth \else
221
\thesubsection \fi}{#1}
222
\let\no:subsection\subsection
223
\def\subsection{\rdef:sec{subsection}}
224
\Def:Section\likesubsection{}{#1}
225
\let\:likesubsection\likesubsection
226
\let\likesubsection\:UnDef
228
\let\no@subsubsection\subsubsection
229
\Def:Section\subsubsection{\ifnum \c:secnumdepth>\c@secnumdepth \else
230
\thesubsubsection \fi}{#1}
231
\let\no:subsubsection\subsubsection
232
\def\subsubsection{\rdef:sec{subsubsection}}
233
\Def:Section\likesubsubsection{}{#1}
234
\let\:likesubsubsection\likesubsubsection
235
\let\likesubsubsection\:UnDef
237
\let\no@paragraph\paragraph
238
\Def:Section\paragraph{\ifnum \c:secnumdepth>\c@secnumdepth \else
239
\theparagraph \fi}{#1}
240
\let\no:paragraph\paragraph
241
\def\paragraph{\rdef:sec{paragraph}}
242
\Def:Section\likeparagraph{}{#1}
243
\let\:likeparagraph\likeparagraph
244
\let\likeparagraph\:UnDef
245
\let\no@subparagraph\subparagraph
246
\Def:Section\subparagraph{\ifnum \c:secnumdepth>\c@secnumdepth \else
247
\thesubparagraph \fi}{#1}
248
\let\no:subparagraph\subparagraph
249
\def\subparagraph{\rdef:sec{subparagraph}}
250
\Def:Section\likesubparagraph{}{#1}
251
\let\:likesubparagraph\likesubparagraph
252
\let\likesubparagraph\:UnDef
258
\def\tableofcontents{%
259
\ifx\contentsname\empty \else
260
\ifx\contentsname\:UnDef \else
262
\section*{\contentsname}%
269
\ConfigureToc{likeparagraph} {}{\empty}{}{\newline}
270
\ConfigureToc{likepart} {}{\empty}{}{\newline}
271
\ConfigureToc{likesection} {}{\empty}{}{\newline}
272
\ConfigureToc{likesubparagraph} {}{\empty}{}{\newline}
273
\ConfigureToc{likesubsection} {}{\empty}{}{\newline}
274
\ConfigureToc{likesubsubsection} {}{\empty}{}{\newline}
275
\ConfigureToc{paragraph} {\empty}{\ }{}{\newline}
276
\ConfigureToc{part} {\empty}{\ }{}{\newline}
277
\ConfigureToc{section} {\empty}{\ }{}{\newline}
278
\ConfigureToc{subparagraph} {\empty}{\ }{}{\newline}
279
\ConfigureToc{subsection} {\empty}{\ }{}{\newline}
280
\ConfigureToc{subsubsection} {\empty}{\ }{}{\newline}