1
% \def\HTML{...} \def\CONFIG{...} \def\MAKETITLE{...} \def\EXIST{...}
2
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4
% Compile this file with the command `xhlatex mktex4ht.4ht', %
5
% and read the instructions at mktex4ht.html => index %
8
% The compilation needs the files ProTex.sty & AlProTex.sty %
10
% http://www.cis.ohio-state.edu/~gurari/systems.html %
12
% This file is designed for machines--not human beings! You %
13
% are strognly advised not to look at the code which follows %
14
% the copyright notice. %
16
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
17
% mktex4ht.4ht 2001-12-14-17:07 %
18
% Copyright (C) 1999--2001 Eitan M. Gurari %
20
% This program can redistributed and/or modified under %
21
% the terms of the LaTeX Project Public License %
22
% Distributed from CTAN archives in directory %
23
% macros/latex/base/lppl.txt; either version 1 of the %
24
% License, or (at your option) any later version. %
26
% However, you are allowed to modify this program %
27
% without changing its name, if you modify its %
28
% signature. Changes to the signature can be introduced %
29
% with a directive of the form %
30
% \message{signature} %
32
% gurari@cis.ohio-state.edu %
33
% http://www.cis.ohio-state.edu/~gurari %
34
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
35
\immediate\write-1{version 2001-12-14-17:07}
38
\def\infofiles{infoht4,infomml}
39
\def\infosources{html4,mathml}
42
\openin15=ProTex.sty \ifeof15
43
\immediate\write16{--- Needs ProTex.sty \& AlProTex.sty
44
from http://www.cis.ohio-state.edu/\string
45
~gurari/systems.html --}
50
\edef\RecallCats{\catcode`\noexpand\^=\the\catcode`\^} \catcode`\^=7
51
\catcode`\%=12 \catcode`\!=14 \catcode`\^^M=13 \catcode`\:=11
53
\expandafter\ifx\csname !
54
cw:)\clearcode:id P:configure \HTML\space #1\endcsname\relax !
55
! % no code for <configure \HTML\space #1> !
57
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
58
\space\space\space\space\space\space\space\space!
59
\space\space\space\space\space\space\space\space!
60
\string\ConfigureHinput\string{#1\string}
61
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
62
\space\space\space\space \<configure \HTML\space #1\>
63
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
65
\string\endinput\string\empty\string\empty\string\empty\string\empty !
66
\string\empty\string\empty
67
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
70
\catcode`\%=14 \catcode`\!=12
72
\def\GetLit#1,{\def\HTML{#1}\ifx \HTML\empty
73
\def\GetLit##1!*?: {}\else%
74
\section{Container of \HTML.4ht}
75
\expandafter\ifx\csname YES\HTML\endcsname\relax\else
77
\string\exit:ifnot{\csname YES\HTML\endcsname}
81
\lit{Preamble}\lit{tex4ht}
84
\lit{report}\lit{article}\lit{tcilatex}\lit{fontmath}
87
\lit{graphics}\lit{inputenc}
88
\lit{latex209}\lit{babel}\lit{plain}\lit{amsmath}\lit{amsfonts}\lit{amstext}\lit{amstex1}
89
\lit{amsart}\lit{amsbook}\lit{amsproc}\lit{amsldoc}
90
\lit{amsthm}\lit{amsbsy}\lit{amstex}\lit{amsppt}\lit{amsopn}
93
\lit{seslideb}\lit{ifthen}\lit{epsf}\lit{psfig}\lit{epsfig}
95
\lit{amscd}\lit{array}\lit{minitoc}\lit{index}\lit{multind}
96
\lit{german}\lit{natbib}\lit{ntheorem}\lit{longtable}\lit{moreverb}\lit{fancyvrb}\lit{fancybox}\lit{color}\lit{colortbl}
97
\lit{alltt}\lit{latin1}
99
\lit{url}\lit{hyperref}\lit{table}
100
\lit{CJK}\lit{vanilla}
102
\lit{fleqn}\lit{frenchb}\lit{alatex}\lit{rlbabel}
103
\lit{hebtex}\lit{abidir}\lit{hewrite}\lit{aoutput}
106
\lit{apacite}\lit{emulateapj}\lit{aa}\lit{pictex}\lit{diagrams}
107
\lit{pstricks}\lit{endfloat}\lit{subfigure}\lit{pb-diagram}\lit{dratex}\lit{booktabs}
109
\lit{ltugproc}\lit{bibtopic}\lit{mls}\lit{manju}
110
\lit{rotating}\lit{boxedminipage}\lit{ulem}\lit{go}
111
\lit{paralist}\lit{listings}\lit{alphanum}\lit{jurabib}
113
\lit{verbatim}\lit{float}
114
\lit{floatflt}\lit{doc}\lit{scrbook}\lit{scrartcl}
115
\lit{scrreprt}\lit{elsart}\lit{lb}\lit{JHEP}\lit{acm-proc-article-sp}\lit{sig-alternate}
116
\lit{endnotes}\lit{seminar}\lit{slides}
117
\lit{latex2man}\lit{texinfo}\lit{slidesec}\lit{web}\lit{exerquiz}\lit{nicefrac}\lit{foils}
118
\lit{multicol}\lit{th4}\lit{th4-frames}\lit{gloss}
119
\lit{amsdtx}\lit{lineno}
120
\lit{errata}\lit{epigraph}\lit{osudeG}\lit{llncs}
121
\lit{llncs-a}\lit{cp850}\lit{cp852}\lit{cp862}\lit{cp1250}
122
\lit{cp1252}\lit{cp437}\lit{cp437de}\lit{cp865}
123
\lit{norsk}\lit{polish}\lit{portuges}\lit{romanian}
124
\lit{russianb}\lit{scottish}\lit{slovak}\lit{slovene}
125
\lit{spanish}\lit{swedish}\lit{turkish}\lit{ukraineb}
126
\lit{usorbian}\lit{welsh}\lit{hebrew}\lit{austrian}
127
\lit{catalan}\lit{croatian}\lit{czech}\lit{danish}
128
\lit{dutch}\lit{english}\lit{esperant}\lit{estonian}
129
\lit{finnish}\lit{francais}\lit{galician}\lit{germanb}
130
\lit{greek}\lit{ngermanb}\lit{exam}\lit{mktex4ht}
132
\ifx \EXIST\UnDef\else \expandafter\moreLit\EXIST,,//\fi
134
>>> \LitFile \fi \GetLit}
135
\catcode`\^^M=5 \RecallCats
137
\def\moreLit#1,{\if !#1!\expandafter\SofLit\else
138
\lit{#1}\expandafter\moreLit\fi}
139
\def\moreLitRow#1,{\if !#1!\expandafter\SofLit\else
140
\LitRow{#1}\expandafter\moreLitRow\fi}
143
\def\LitFile{\OutputCode[4ht]\<\HTML\>}
145
\def\cleancom#1,#2(){#1}
147
\let\next=\LitCols \def\RowTp{#1}%
148
\HCode{<tr align="center"><td align="left">}\ifx \RowTp\empty \else
149
\edef\temp{\noexpand\Link[\noexpand\cleancom
150
\RefFile{f-#1}}\temp,()]{}{b-#1}#1\EndLink \fi \HCode{</td>}%
153
\expandafter\LitCols\infosources,,!*?:
154
\else \expandafter\LitCols\HTML,,!*?: \fi
157
\def\LitCols#1,{\def\temp{#1}\ifx \temp\empty
158
\def\next##1!*?: {}\else%
159
\ifx \RowTp\empty \HCode{<th>}\Vth#1:\HCode{</th>}\else
160
\HCode{<td>}\expandafter\ifx\csname
161
cw:)\clearcode:id P:configure #1 \RowTp\endcsname\relax
162
\HAdvance\curf by 1\relax
163
\expandafter\ifx \csname cw:f\curf-\RowTp(L \endcsname\relax
164
-\else\Link[\csname cw:f\curf-\RowTp(L \endcsname]{}{}*\EndLink
166
\else \LinkPort\<configure #1 \RowTp\>*\EndLink
167
\expandafter\edef\csname YES#1\endcsname{%
168
\expandafter\ifx \csname YES#1\endcsname\relax\else
169
\csname YES#1\endcsname,\%\Hnewline\fi \RowTp}%
175
\def\Vth#1{\if #1:\else #1\expandafter\VTH\fi}
176
\def\VTH#1{\if #1:\else \HCode{<br />}#1\expandafter\VTH\fi}
178
\expandafter\def\csname html4hook\endcsname{%
179
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
180
% for bootstrapping, when html4.4ht is not available %
181
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
188
\expandafter\def\csname html4hook\endcsname{%
189
\csname newcount\endcsname\pageno
190
\Configure{HtmlPar}{}{}{}{}
192
\Configure{CssFile}{}{}
194
\Configure{TITLE}{}{}
198
\Configure{HPageTITLE+}{}
199
} \csname html4hook\endcsname
208
\def\temp{\usepackage[html]{tex4ht}}
213
\TocAt{chapter,section}
215
\Configure{section}{}{}
216
{\IgnorePar \EndP\Tg<h2>\thesection\space}
217
{\space\infolink\Tg</h2>\IgnoreIndent \par}
219
\AlProTex{4ht,<<<>>>,|,title,list}
220
\Css{th { line-height: 0.8; vertical-align:top;
221
padding-left:0.3em; padding-right:0.3em;} }
224
\title{TeX4ht: \ifx\HTML\UnDef Seeded Hooks\else Configuration Files\fi}
225
\ifx \MAKETITLE\UnDef \else \expandafter\MAKETITLE\fi
233
\HCode{<table>}\LitRow{}\LitRow{CJK}\LitRow{JHEP}\LitRow{Preamble}\LitRow{aa}
234
\LitRow{abidir}\LitRow{acm-proc-article-sp}\LitRow{alatex}\LitRow{alltt}
235
\LitRow{alphanum}\LitRow{amsart}\LitRow{amsbook}\LitRow{amsbsy}
236
\LitRow{amscd}\LitRow{amsdtx}\LitRow{amsfonts}\LitRow{amsldoc}
237
\LitRow{amsmath}\LitRow{amsopn}\LitRow{amsppt}\LitRow{amsproc}
238
\LitRow{amstex}\LitRow{amstex1}\LitRow{amstext}\LitRow{amsthm}
239
\LitRow{aoutput}\LitRow{apacite}\LitRow{array}\LitRow{article}
240
\LitRow{austrian}\LitRow{babel}\LitRow{bibtopic}\LitRow{book}
241
\LitRow{booktabs}\LitRow{boxedminipage}\LitRow{catalan}\LitRow{color}
242
\LitRow{colortbl}\LitRow{cp1250}\LitRow{cp1252}\LitRow{cp437}
243
\LitRow{cp437de}\LitRow{cp850}\LitRow{cp852}\LitRow{cp862}
244
\LitRow{cp865}\LitRow{croatian}\LitRow{czech}\LitRow{danish}
245
\LitRow{diagrams}\LitRow{doc}\LitRow{dratex}\LitRow{dutch}
246
\LitRow{elsart}\LitRow{emulateapj}\LitRow{endfloat}\LitRow{endnotes}
247
\LitRow{english}\LitRow{epigraph}\LitRow{epsf}\LitRow{epsfig}
248
\LitRow{errata}\LitRow{esperant}\LitRow{estonian}\LitRow{exam}
249
\LitRow{exerquiz}\LitRow{fancybox}\LitRow{fancyvrb}\LitRow{finnish}
250
\LitRow{fleqn}\LitRow{float}\LitRow{floatflt}\LitRow{foils}
251
\LitRow{fontmath}\LitRow{francais}\LitRow{french}\LitRow{frenchb}
252
\LitRow{galician}\LitRow{german}\LitRow{germanb}\LitRow{gloss}
253
\LitRow{go}\LitRow{graphics}\LitRow{greek}\LitRow{hebrew}
254
\LitRow{hebtex}\LitRow{hewrite}\LitRow{hyperref}\LitRow{ifthen}
255
\LitRow{index}\LitRow{inputenc}\LitRow{jurabib}\LitRow{latex}
256
\LitRow{latex209}\LitRow{latex2man}\LitRow{latin1}\LitRow{lb}
257
\LitRow{lineno}\LitRow{listings}\LitRow{llncs}\LitRow{llncs-a}
258
\LitRow{longtable}\LitRow{ltugboat}\LitRow{ltugproc}\LitRow{manju}
259
\LitRow{minitoc}\LitRow{mktex4ht}\LitRow{mls}\LitRow{moreverb}
260
\LitRow{multicol}\LitRow{multind}\LitRow{natbib}\LitRow{ngermanb}
261
\LitRow{nicefrac}\LitRow{norsk}\LitRow{ntheorem}\LitRow{osudeG}
262
\LitRow{paralist}\LitRow{pb-diagram}\LitRow{pictex}\LitRow{plain}
263
\LitRow{polish}\LitRow{portuges}\LitRow{psfig}\LitRow{pstricks}
264
\LitRow{report}\LitRow{rlbabel}\LitRow{romanian}\LitRow{rotating}
265
\LitRow{russianb}\LitRow{scottish}\LitRow{scrartcl}\LitRow{scrbook}
266
\LitRow{scrreprt}\LitRow{seminar}\LitRow{seslideb}\LitRow{sig-alternate}
267
\LitRow{slides}\LitRow{slidesec}\LitRow{slovak}\LitRow{slovene}
268
\LitRow{spanish}\LitRow{subfigure}\LitRow{swedish}\LitRow{table}
269
\LitRow{tcilatex}\LitRow{tex4ht}\LitRow{texinfo}\LitRow{th4}
270
\LitRow{th4-frames}\LitRow{titlesec}\LitRow{turkish}\LitRow{ukraineb}
271
\LitRow{ulem}\LitRow{url}\LitRow{usorbian}\LitRow{vanilla}
272
\LitRow{varioref}\LitRow{verbatim}\LitRow{verbatim}\LitRow{web}
273
\LitRow{welsh}\LitRow{xr}\LitRow{xy}
274
\ifx \EXIST\UnDef\else \expandafter\moreLitRow\EXIST,,//\fi
275
\ifvmode \IgnorePar\fi\EndP \HCode{</table>}
276
\IgnoreIndent\par\rightline{[\ExitHPage{}]} \EndHPage{}]
280
\def\HTML{replace-with-file-name}
281
\immediate\write16{-- Missing definition for \noexpand\HTML --}
282
See {\tt index => mktex4ht} for directions on how to create
283
configuration files with `mktex4t.4ht'.\par
284
WARNING: Missing definition for {\tt \string\HTML }
286
[\HPage{the 4ht files}
287
\def\Comma{\def\Comma{, }}
288
\def\LitFiles#1,{\def\temp{#1}\ifx \temp\empty
289
\def\LitFiles##1!*?: {}\else
290
\Comma\Link[#1.4ht]{}{}#1.4ht\EndLink \fi
292
\expandafter\LitFiles\HTML,,!*?:
293
\par\ShowPar[\ExitHPage{}] \EndHPage{}]
299
WARNING: Missing definition for {\tt \string\CONFIG }
308
\immediate\write16{-- Missing definition for \noexpand\CONFIG --}
310
\def\temp{\input \CONFIG}\expandafter\temp
315
\tableofcontents \relax
320
\<Hinclude plain\><<<
321
\Hinclude{\input #1.4ht}{plain}
324
\<Hinclude latex\><<<
325
\Hinclude{\input #1.4ht}{latex}
328
\<Hinclude plain lib\><<<
332
\<Hinclude latex lib\><<<
336
\<Hinclude plain + latex lib\><<<
344
Style files, like xy, may be loaded in latex with \verb'\usepackage' or
345
\verb'\input'. The latter case don't leave footprints, hence we need for
346
it an explicitly check. On the other hand, we should avoid duplications.
349
\expandafter\let\csname tex4ht:4ht\endcsname\empty
351
\expandafter\ifx \csname #1:4ht\endcsname\relax
352
\expandafter\let \csname #1:4ht\endcsname\empty
361
\<Hinclude plain lib\><<<
362
\Hinclude{\def\:temp{\ht:everypar={\setbox0=\lastbox\ht:everypar={}}}%
363
\ifx \NoindentAfter\:temp
364
\no:dupl{#1}{\expand:after{\input #1.4ht}}\fi}
366
\Hinclude{\ifx\amstexloaded@\relax
368
\ifx \Space@\:UnDef \expand:after{\input #1.4ht} %
369
\else \input vanilla.4ht \fi}%
372
\Hinclude{\expandafter\ifx \csname amsppt.sty\endcsname\relax
374
\no:dupl{#1}{\expand:after{\input #1.4ht}}\fi}
376
\Hinclude{\ifx \texinfoversion\:UnDef\else
377
\no:dupl{#1}{\expand:after{\input texinfo.4ht}}\fi}
381
\<if not amsppt.sty\><<<
382
\expandafter\ifx \csname amsppt.sty\endcsname\relax
389
\<Hinclude latex lib\><<<
390
\Hinclude{\input #1.4ht}{fontmath}
391
\Hinclude{\@ifpackageloaded{colortbl}{%
392
\no:dupl{array}{\input array.4ht}%
393
\no:dupl{color}{\input color.4ht}%
394
\no:dupl{colortbl}{\input colortbl.4ht}%
397
\def\h:input#1.#2.#3!*?: {%
398
\:CheckOption{no_#1}\if:Option
405
\:CheckOption{debug}\if:Option
406
\:warning{No configuration file for
407
#1.\if .#2.tex\else #2\fi}%
411
\def\:temp{\input #1.4ht }%
415
\edef\:temp{\noexpand\Hinclude
416
{\noexpand\h:input ##1..!*?: }{\@filelist}}
422
\<Hinclude plain + latex lib\><<<
423
\Hinclude{\ifx \PsfigVersion\:UnDef \else
424
\no:dupl{#1}{\expand:after{\input psfig.4ht}}\fi}
426
\Hinclude{\:CheckOption{#1}
427
\if:Option \no:dupl{#1}{\expand:after{\input #1.4ht}}\fi}
430
\expandafter\ifx \csname PSTricksLoaded\endcsname\relax\else
431
\no:dupl{#1}{\expand:after{\input #1.4ht}}\fi}
434
\ifx \:DraCatCodes\:UnDef \else
435
\no:dupl{#1}{\expand:after{\input #1.4ht}}\fi}
438
\ifx \xyloaded\:UnDef \else
439
\no:dupl{#1}{\expand:after{\input #1.4ht}}\fi}
443
\ifx \epsfsetgraph\:UnDef \else
444
\no:dupl{#1}{\expand:after{\input #1.4ht}}\fi}
448
\ifx \diagram@help@messages\:UnDef \else
449
\no:dupl{#1}{\expand:after{\input #1.4ht}}\fi}
455
\:CheckOption{xhtml}\if:Option \fi}
457
\Hinclude{\:CheckOption{#1}
458
\if:Option\else \:CheckOption{ShowFont}\fi
459
\if:Option\else \:CheckOption{frames-}\fi
460
\if:Option\else \:CheckOption{frames}\fi
461
\if:Option\else \:CheckOption{image-maps}\fi
462
\if:Option\else \:CheckOption{java}\fi
463
\if:Option\else \:CheckOption{javascript}\fi
464
\if:Option \no:dupl{#1}{\expand:after{\input #1.4ht}}\fi}
466
\Hinclude{\ifx \sethebrew\:UnDef\else \ifx \ArabTeX\:UnDef\else
467
\no:dupl{#1}{\expand:after{\input hebtex.4ht}}\fi \fi}
473
\<pctex table 4ht\><<<
474
\ifx \BeginTable\:UnDef \else\ifx \EndTable\:UnDef \else
475
\expandafter\ifx \csname !ttBeginTable\endcsname\relax\else
476
\no:dupl{#1}{\input #1.4ht}%
485
\chapter{Containers for the Configurations}
489
\expandafter\GetLit\HTML,,,!*?: \relax
493
\catcode`\:=11 \catcode`\@=0 \catcode`\\=11 @relax
495
@def@infoIVht[#1]#2//{@bgroup
496
@no:catcodes0{255}{11}%
497
@no:catcodes{47}{47}{12}% /
498
@def@infoIVht##1\ConfigureHinput{@egroup
499
@let@ConfigureHinput=@ConfigureHINPUT @ConfigureHinput}%
502
@def@ConfigureHINPUT#1{@bgroup
503
@no:catcodes0{255}{11}%
504
@no:catcodes{47}{47}{12}% /
505
@no:catcodes{13}{13}{13}% ^^M
506
@no:catcodes{32}{32}{13}% ^^M
507
@def@ConfigureHinput##1//##2//##3\ifx\infoIVht##4\endinput{@egroup
508
@HPage[f@curf-#1]{#1}%
509
@rightline{@Link{b-#1}{}up@EndLink}@ShowPar@par@textbf{#1}@par
510
@verbshow{##3}@rightline{@Link{b-#1}{}up@EndLink}%
511
@EndHPage{}@par@ShowPar}@ConfigureHinput}
514
@catcode `[= 1 @catcode`]=2 @catcode `@{=12 @catcode `@}=12
516
@long@gdef@verbshow#1[@begin[verbatim]#1\end{verbatim}]
519
@catcode`@\=0 \catcode`\:=12 \catcode`\@=12 \relax
522
\def\curf{} \input info4ht.4ht
525
\def\nextinfo#1,{\if !#1!\def\nextinfo##1//{}
526
\else \HAdvance\curf by 1
527
\input #1.4ht \expandafter\nextinfo
530
\expandafter\nextinfo\infofiles,,//%