~ubuntu-branches/debian/sid/tex4ht/sid

« back to all changes in this revision

Viewing changes to src/tex4ht-mkht.tex

  • Committer: Bazaar Package Importer
  • Author(s): Kapil Hari Paranjape
  • Date: 2005-04-05 14:14:41 UTC
  • mfrom: (1.2.1 upstream) (2.1.2 hoary)
  • Revision ID: james.westby@ubuntu.com-20050405141441-x4dojdgz3frkfyet
Tags: 20050402.1817-1
* New upstream release (2005-04-02-18:17). Closes: #299934.
* See README.src, README.validate, README.Debian and copyright
  for information on minor changes.
* This upload fixes a some .htf files. Closes: #295109.
* Updated the description to reflect recent changes.
* Fixed some typos in src/tex4ht-mkht.tex and consequently
  in the mk4ht script.
* Updated the man page to include mk4ht. 
* Updated the description of options for the scripts in the man page.
  Put more information in the man page about the way the system works.
  Closes: #219348, #219347.
* Added debian/watch file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
% (1)  latex tex4ht-mkht      
 
2
% (2)  latex mkht-scripts.4ht
 
3
%
 
4
% or
 
5
%
 
6
% (1) xhlatex tex4ht-mkht "html,3" 
 
7
% (2) xhlatex mkht-scripts.4ht "html,3"
 
8
 
 
9
 
 
10
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
11
% tex4ht-mkht.tex                                        %
 
12
% Copyright (C) 1997--           Eitan M. Gurari         %
 
13
%                                                        %
 
14
% This work may be distributed and/or modified under the %
 
15
% conditions of the LaTeX Project Public License, either %
 
16
% version 1.3 of this license or (at your option) any    %
 
17
% later version. The latest version of this license is   %
 
18
% in                                                     %
 
19
%   http://www.latex-project.org/lppl.txt                %
 
20
% and version 1.3 or later is part of all distributions  %
 
21
% of LaTeX version 2003/12/01 or later.                  %
 
22
%                                                        %
 
23
% This work has the LPPL maintenance status "maintained".%
 
24
%                                                        %
 
25
% This Current Maintainer of this work                   %
 
26
% is Eitan M. Gurari.                                    %
 
27
%                                                        %
 
28
%                             gurari@cse.ohio-state.edu  %
 
29
%                 http://www.cse.ohio-state.edu/~gurari  %
 
30
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
31
 
 
32
 
 
33
\documentclass{article}
 
34
 
 
35
\def\CodeDel{{<<<-}{->>>}}
 
36
\ifx \HCode\UnDef
 
37
   \input tex4ht.sty
 
38
   \Preamble{xhtml}
 
39
   \input ProTex.sty     
 
40
   \AlProTex{4ht,<<<>>>,?,title,list}
 
41
\else
 
42
   \Configure{ProTex}{4ht,<<<>>>,?,title,list,[[]]}
 
43
\fi
 
44
 
 
45
\begin{document}
 
46
 
 
47
%%%%%%%%%%%%%%%%%%%%% definitions %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
48
 
 
49
\newcount\tmpcnt  \tmpcnt\time  \divide\tmpcnt  60
 
50
\edef\temp{\the\tmpcnt}
 
51
\multiply\tmpcnt  -60 \advance\tmpcnt  \time
 
52
 
 
53
\edef\version{\the\year-\ifnum \month<10 0\fi
 
54
  \the\month-\ifnum \day<10 0\fi\the\day
 
55
   -\ifnum \temp<10 0\fi \temp
 
56
   :\ifnum \tmpcnt<10 0\fi\the\tmpcnt}
 
57
 
 
58
\def\CopyYear.#1.{%
 
59
   \ifnum #1=\year #1\space\space\space\space\space\space
 
60
    \else          #1--\the\year\fi
 
61
}
 
62
 
 
63
\def\mkhtNote{
 
64
 
 
65
}
 
66
\newtoks\toks
 
67
\expandafter\toks\expandafter{\mkhtNote}
 
68
 
 
69
%%%%%%%%%%%%%%%%%%%%% end definitions %%%%%%%%%%%%%%%%%%%%%%%%%
 
70
 
 
71
 
 
72
 
 
73
%%%%%%%%%%%%%%%%%%
 
74
\section{TeX Dialects}
 
75
%%%%%%%%%%%%%%%%%%
 
76
 
 
77
 
 
78
 
 
79
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
80
\subsection{\LaTeX}
 
81
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
82
 
 
83
 
 
84
 
 
85
\<def script\><<<-
 
86
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
87
\section{LaTeX}
 
88
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
89
 
 
90
 
 
91
\<htlatex ...\><<<
 
92
        |<unix line|>|<latex|>
 
93
        |<latex|>
 
94
        |<latex|>
 
95
        |<base|>tex4ht |<dir ch|>|<@|>1  |<III|>
 
96
        |<base|>t4ht |<dir ch|>|<@|>1 |<IV|>
 
97
 
 
98
>>>
 
99
 
 
100
 
 
101
\<latex\><<<
 
102
latex |<@|>5 |<'|>|<definitions|>|<get parameters|>|empty>>>
 
103
 
 
104
\<get parameters\><<<
 
105
\HCode |<'|>|<@|>2|<'|>.a.b.c.\input |<'|> |<@|>1>>>
 
106
 
 
107
 
 
108
\<definitions\><<<
 
109
\makeatletter|<get 2nd arg|>|<2e + 209|>\makeatother>>>
 
110
 
 
111
\<get 2nd arg\><<<
 
112
\def\HCode{\futurelet\HCode\HChar}\def\HChar{|<double quotes??|>}>>>
 
113
 
 
114
\<double quotes??\><<<
 
115
\ifx"\HCode|<remove qts|>\expandafter\HCode\else\expandafter\Link\fi>>>
 
116
 
 
117
\<remove qts\><<<
 
118
\def\HCode"##1"{\Link##1}>>>
 
119
 
 
120
 
 
121
\<2e + 209\><<<
 
122
\def\Link#1.a.b.c.{|<2e|>|<209|>}>>>
 
123
 
 
124
\<2e\><<<
 
125
\g@addto@macro\@documentclasshook{|<require package|>}>>>
 
126
 
 
127
\<209\><<<
 
128
|<save|>\def\documentstyle{|<recall|>|<options|>|<209+tex4ht|>}>>>
 
129
 
 
130
\<require package\><<<
 
131
\RequirePackage[#1|<II|>|<,html|>]{tex4ht}>>>
 
132
 
 
133
 
 
134
\<options\><<<
 
135
|<def tex4ht|>{#1|<II|>|<,html|>}>>>
 
136
 
 
137
 
 
138
\<209+tex4ht\><<<
 
139
|<209+tex4ht+...|>\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}>>>
 
140
 
 
141
\<209+tex4ht+...\><<<
 
142
\def\HCode####1{\documentstyle[tex4ht,}>>>
 
143
 
 
144
 
 
145
\<save\><<<
 
146
\let\HCode\documentstyle>>>
 
147
 
 
148
\<recall\><<<
 
149
\let\documentstyle\HCode>>>
 
150
 
 
151
 
 
152
 
 
153
\<htlatex 2e...\><<<
 
154
        |<unix line|>|<latex2e|>
 
155
        |<latex2e|>
 
156
        |<latex2e|>
 
157
        |<base|>tex4ht |<dir ch|>|<@|>1  |<III|>
 
158
        |<base|>t4ht |<dir ch|>|<@|>1 |<IV|>
 
159
 
 
160
>>>
 
161
 
 
162
 
 
163
 
 
164
 
 
165
\<latex2e\><<<
 
166
latex |<@|>5 |<'|>|<definitions2e|>|<get parameters|>|empty>>>
 
167
 
 
168
\<definitions2e\><<<
 
169
\makeatletter|<get 2nd arg|>|<2e only|>\makeatother>>>
 
170
 
 
171
 
 
172
\<2e only\><<<
 
173
\def\Link#1.a.b.c.{|<2e|>}>>>
 
174
 
 
175
 
 
176
 
 
177
 
 
178
 
 
179
\<htlatex 209...\><<<
 
180
        |<unix line|>|<latex209|>
 
181
        |<latex209|>
 
182
        |<latex209|>
 
183
        |<base|>tex4ht |<dir ch|>|<@|>1  |<III|>
 
184
        |<base|>t4ht |<dir ch|>|<@|>1 |<IV|>
 
185
 
 
186
>>>
 
187
 
 
188
 
 
189
 
 
190
 
 
191
\<latex209\><<<
 
192
latex  |<@|>5 |<'|>|<definitions209|>|<get parameters|>|empty>>>
 
193
 
 
194
\<definitions209\><<<
 
195
\makeatletter|<get 2nd arg|>|<209 only|>\makeatother>>>
 
196
 
 
197
 
 
198
\<209 only\><<<
 
199
\def\Link#1.a.b.c.{|<209|>}>>>
 
200
 
 
201
->>>
 
202
 
 
203
 
 
204
\<add script\><<<-
 
205
\OutputCodE\<\pref latex\latex.\ext\>   \script{\pref latex}{\ext}  %
 
206
\expandafter\let\csname\pref latex\latex\endcsname=\UnDef
 
207
%
 
208
->>>
 
209
 
 
210
 
 
211
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
212
\subsection{\TeX}
 
213
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
214
 
 
215
 
 
216
 
 
217
\<def script\><<<-
 
218
 
 
219
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
220
\section{TeX}
 
221
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
222
 
 
223
 
 
224
\<httex...\><<<
 
225
        |<unix line|>|<tex|>
 
226
        |<tex|>
 
227
        |<tex|>
 
228
        |<base|>tex4ht |<dir ch|>|<@|>1 |<III|>
 
229
        |<base|>t4ht |<dir ch|>|<@|>1 |<IV|>
 
230
 
 
231
>>>
 
232
 
 
233
\<tex\><<<
 
234
tex  |<@|>5 |<'|>|<tex definitions|>|<get parameters|>|empty>>>
 
235
 
 
236
 
 
237
\<tex definitions\><<<
 
238
|<set hook|>|<get 2nd arg|>|empty>>>
 
239
 
 
240
\<set hook\><<<
 
241
\def\Link#1.a.b.c.{|<def tex4ht|>{|<options|>\input tex4ht.sty }}>>>
 
242
 
 
243
 
 
244
\<def tex4ht\><<<
 
245
\expandafter\def\csname tex4ht\endcsname>>>
 
246
 
 
247
->>>
 
248
 
 
249
 
 
250
\<add script\><<<-
 
251
\<\pref tex.\ext\><<<
 
252
\<httex...\>
 
253
>>> %
 
254
%
 
255
\OutputCodE\<\pref tex.\ext\>    \script{\pref tex}{\ext}  %
 
256
%
 
257
->>>
 
258
 
 
259
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
260
\subsection{Texinfo}
 
261
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
262
 
 
263
 
 
264
\<def script\><<<-
 
265
%%%%%%%%%%%%%%%%%%%%
 
266
\section{TeXinfo}
 
267
%%%%%%%%%%%%%%%%%%%%
 
268
 
 
269
The loading of tex4ht takes place at the @rm command at the end of the
 
270
texinfo.tex file.
 
271
 
 
272
\<httexi...\><<<
 
273
        |<unix line|>|<texinfo|>
 
274
        |<texinfo|>
 
275
        |<texinfo|>
 
276
        |<base|>tex4ht |<dir ch|>|<@|>1 |<III|>
 
277
        |<base|>t4ht |<dir ch|>|<@|>1 |<IV|>
 
278
|<Rem|>        texindex ??
 
279
 
 
280
>>>
 
281
 
 
282
\<texinfo\><<<
 
283
tex  |<@|>5 |<'|>|<texinfo definitions|>|<get parameters|>|empty>>>
 
284
 
 
285
 
 
286
\<texinfo definitions\><<<
 
287
|<tex definitions|>\let\svrm=\rm\def\rm{\svrm|<tex4ht into texinfo|>}>>>
 
288
 
 
289
\<tex4ht into texinfo\><<<
 
290
\ifx\c\comment\def\rm{\let\rm=\svrm|<load into texinfo|>}\expandafter\rm\fi>>>
 
291
 
 
292
\<load into texinfo\><<<
 
293
|<change cats|>\csname tex4ht\endcsname|<restore cats|>|empty>>>
 
294
 
 
295
\<change cats\><<<
 
296
\catcode`\@=12\catcode`\\=0 >>>
 
297
 
 
298
\<restore cats\><<<
 
299
\catcode`\@=0\catcode`\\=13 >>>
 
300
->>>
 
301
 
 
302
 
 
303
\<add script\><<<-
 
304
\<\pref texi.\ext\><<<
 
305
\<httexi...\>
 
306
>>> %
 
307
%
 
308
\OutputCodE\<\pref texi.\ext\>   \script{\pref texi}{\ext}  %
 
309
%
 
310
->>>
 
311
 
 
312
 
 
313
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
314
\subsection{Context}
 
315
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
316
 
 
317
 
 
318
\<def script\><<<-
 
319
%%%%%%%%%%%%%%%
 
320
\section{ConTeXt}
 
321
%%%%%%%%%%%%%%%
 
322
 
 
323
 
 
324
\<context...\><<<
 
325
        |<unix line|>|<texexec|>
 
326
        |<base|>tex4ht |<dir ch|>|<@|>1 |<III|>
 
327
        |<base|>t4ht |<dir ch|>|<@|>1 |<IV|>
 
328
 
 
329
>>>
 
330
 
 
331
\<texexec\><<<
 
332
texexec --arg="opt-arg=|<@|>2" --use=tex4ht |<@|>5 |<@|>1 >>>
 
333
 
 
334
\immediate\write16{...............................fix......}
 
335
\immediate\write16{%
 
336
perl /home/4//gurari/main.dir/try.dir/context.dir/context/perltk/texexec.pl%
 
337
}
 
338
\immediate\write16{........................................}
 
339
->>>
 
340
 
 
341
\<add script\><<<-
 
342
\<\pref context.\ext\><<<
 
343
\<context...\>
 
344
>>> %
 
345
%
 
346
\OutputCodE\<\pref context.\ext\>   \script{\pref texexec}{\ext}  %
 
347
%
 
348
->>>
 
349
 
 
350
 
 
351
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
352
\subsection{Mex}
 
353
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
354
 
 
355
 
 
356
\<def script\><<<-
 
357
 
 
358
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
359
\section{MeX}
 
360
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
361
 
 
362
\<htmex...\><<<
 
363
        |<unix line|>|<mex|>
 
364
        |<mex|>
 
365
        |<mex|>
 
366
        |<base|>tex4ht |<dir ch|>|<@|>1 |<III|>
 
367
        |<base|>t4ht |<dir ch|>|<@|>1 |<IV|>
 
368
 
 
369
>>>
 
370
 
 
371
\<mex\><<<
 
372
mex |<@|>5 |<'|>|<tex definitions|>|<get parameters|>|empty>>>
 
373
 
 
374
->>>
 
375
 
 
376
 
 
377
\<add script\><<<-
 
378
\<\pref mex.\ext\><<<
 
379
\<htmex...\>
 
380
>>> %
 
381
%
 
382
\OutputCodE\<\pref mex.\ext\>    \script{\pref mex}{\ext}  %
 
383
%
 
384
->>>
 
385
 
 
386
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
387
% \subsection{Mex}
 
388
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
389
 
390
 
391
% \<def script\><<<-
 
392
 
393
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
394
% \subsection{MeX il2-pl}
 
395
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
396
 
397
% \<htmex-pl...\><<<
 
398
%         |<unix line|>|<mex-pl|>
 
399
%         |<mex-pl|>
 
400
%         |<mex-pl|>
 
401
%         |<base|>tex4ht |<dir ch|>|<@|>1 |<III|>
 
402
%         |<base|>t4ht |<dir ch|>|<@|>1 |<IV|>
 
403
 
404
% >>>
 
405
 
406
% \<mex-pl\><<<
 
407
% mex-pl -translate-file=il2-pl |<'|>|<tex definitions|>|<get parameters|>|empty>>>
 
408
 
409
% ->>>
 
410
 
411
 
412
% \<add script\><<<-
 
413
% \<\pref mex-pl.\ext\><<<
 
414
% \<htmex-pl...\>
 
415
% >>> %
 
416
% %
 
417
% \OutputCodE\<\pref mex-pl.\ext\>    \script{\pref mex-pl}{\ext}  %
 
418
% %
 
419
% ->>>
 
420
 
 
421
 
 
422
 
 
423
%%%%%%%%%%%%%%%%%%
 
424
\section{Markup Dialects}
 
425
%%%%%%%%%%%%%%%%%%
 
426
 
 
427
%%%%%%%%%%%%%
 
428
\subsection{HTML: ht}
 
429
%%%%%%%%%%%%%
 
430
 
 
431
\<unix scripts\><<<-
 
432
\Ii{,html}
 
433
\Iii{-i~/tex4ht.dir/texmf/tex4ht/ht-fonts/#1}
 
434
\Iv{#1 -cvalidatehtml  ## -d~/WWW/temp/ -m644  }
 
435
 
 
436
\make{ht}
 
437
->>>
 
438
 
 
439
\<ms scripts\><<<-
 
440
\Ii{,html}
 
441
\Iii{-ic:\tex4ht\texmf\tex4ht\ht-fonts\#1 
 
442
     -ec:\tex4ht\texmf\tex4ht\base\win32\tex4ht.env}
 
443
\Iv{#1 -ec:\tex4ht\texmf\tex4ht\base\win32\tex4ht.env -cvalidatehtml }
 
444
 
 
445
\make{ht}
 
446
->>>
 
447
 
 
448
The first line is for `ht ...  ...' scripts.
 
449
 
 
450
\<perl options\><<<-
 
451
 "",     "ht",        "",         "", "", "-cvalidatehtml",
 
452
 "ht",   "htlatex",   "latex",    "", "", "-cvalidatehtml",
 
453
 "ht",   "httex",     "tex",      "", "", "-cvalidatehtml",
 
454
 "ht",   "httexi",    "texi",     "", "", "-cvalidatehtml",
 
455
 "ht",   "httexexec", "texexec",  "", "", "-cvalidatehtml",
 
456
->>>
 
457
 
 
458
 
 
459
%%%%%%%%%%%%%
 
460
\subsection{XHTML: xh}
 
461
%%%%%%%%%%%%%
 
462
 
 
463
\<unix scripts\><<<-
 
464
\Ii{,xhtml}
 
465
\Iii{-i~/tex4ht.dir/texmf/tex4ht/ht-fonts/#1}
 
466
\Iv{#1  -cvalidate   ## -d~/WWW/temp/ -m644 }
 
467
\make{xh}
 
468
->>>
 
469
 
 
470
\<ms scripts\><<<-
 
471
\Ii{,xhtml}
 
472
\Iii{-ic:\tex4ht\texmf\tex4ht\ht-fonts\#1 
 
473
     -ec:\tex4ht\texmf\tex4ht\base\win32\tex4ht.env}
 
474
\Iv{#1 -ec:\tex4ht\texmf\tex4ht\base\win32\tex4ht.env -cvalidate }
 
475
\make{xh}
 
476
->>>
 
477
 
 
478
 
 
479
 
 
480
 
 
481
 
 
482
%%%%%%%%%%%%%
 
483
\subsection{Unicode XHTML: uxh}
 
484
%%%%%%%%%%%%%
 
485
 
 
486
\<unix scripts\><<<-
 
487
\Ii{,xhtml,uni-html4}
 
488
\Iii{-i~/tex4ht.dir/texmf/tex4ht/ht-fonts/#1 -cunihtf}
 
489
\Iv{#1 -cvalidate  ## -d~/WWW/temp/ -m644 }
 
490
\make{uxh}
 
491
->>>
 
492
 
 
493
\<ms scripts\><<<-
 
494
\Ii{,xhtml,uni-html4}
 
495
\Iii{-ic:\tex4ht\texmf\tex4ht\ht-fonts\#1 
 
496
     -ec:\tex4ht\texmf\tex4ht\base\win32\tex4ht.env
 
497
      -cunihtf}
 
498
\Iv{#1 -ec:\tex4ht\texmf\tex4ht\base\win32\tex4ht.env -cvalidate }
 
499
\make{uxh}
 
500
->>>
 
501
 
 
502
\<perl options\><<<-
 
503
 "uxh", "uxhlatex",  "latex",   "xhtml,uni-html4", " -cunihtf", "-cvalidate",
 
504
 "uxh", "uxhtex",    "tex",     "xhtml,uni-html4", " -cunihtf", "-cvalidate",
 
505
 "uxh", "uxhtexi",   "texi",    "xhtml,uni-html4", " -cunihtf", "-cvalidate",
 
506
 "uxh", "uxhtexexec","texexec",  "xhtml,uni-html4", " -cunihtf", "-cvalidate",
 
507
->>>
 
508
 
 
509
%%%%%%%%%%%%%
 
510
\subsection{XHTML+MathML: xhm}
 
511
%%%%%%%%%%%%%
 
512
 
 
513
\<unix scripts\><<<-
 
514
\Ii{,xhtml,mathml}
 
515
\Iii{-i~/tex4ht.dir/texmf/tex4ht/ht-fonts/#1 -cunihtf}
 
516
\Iv{#1 -cvalidate   ## -d~/WWW/temp/ -m644 }
 
517
\make{xhm}
 
518
->>>
 
519
 
 
520
\<ms scripts\><<<-
 
521
\Ii{,xhtml,mathml}
 
522
\Iii{-ic:\tex4ht\texmf\tex4ht\ht-fonts\#1
 
523
     -ec:\tex4ht\texmf\tex4ht\base\win32\tex4ht.env -cunihtf}
 
524
\Iv{#1 -ec:\tex4ht\texmf\tex4ht\base\win32\tex4ht.env -cvalidate }
 
525
\make{xhm}
 
526
->>>
 
527
 
 
528
 
 
529
\<perl options\><<<-
 
530
 "xhm", "xhmlatex", "latex",  "xhtml,mathml", " -cunihtf", "-cvalidate",
 
531
 "xhm", "xhmtex",   "tex",    "xhtml,mathml", " -cunihtf", "-cvalidate",
 
532
 "xhm", "xhmtexi",  "texi",   "xhtml,mathml", " -cunihtf", "-cvalidate",
 
533
 "xhm", "xhmtexexec","texexec", "xhtml,mathml", " -cunihtf", "-cvalidate",
 
534
->>>
 
535
 
 
536
 
 
537
%%%%%%%%%%%%%
 
538
\subsection{Mozilla XHTML+MathML: mz}
 
539
%%%%%%%%%%%%%
 
540
 
 
541
\<unix scripts\><<<-
 
542
\Ii{,xhtml,mozilla}
 
543
\Iii{-i~/tex4ht.dir/texmf/tex4ht/ht-fonts/#1 -cmozhtf}
 
544
\Iv{#1 -cvalidate   ## -d~/WWW/temp/ -m644 }
 
545
\make{mz}
 
546
->>>
 
547
 
 
548
\<ms scripts\><<<-
 
549
\Ii{,xhtml,mozilla}
 
550
\Iii{-ic:\tex4ht\texmf\tex4ht\ht-fonts\#1
 
551
     -ec:\tex4ht\texmf\tex4ht\base\win32\tex4ht.env  -cmozhtf}
 
552
\Iv{#1 -ec:\tex4ht\texmf\tex4ht\base\win32\tex4ht.env -cvalidate }
 
553
\make{mz}
 
554
->>>
 
555
 
 
556
 
 
557
\<perl options\><<<-
 
558
 "mz", "mzlatex",   "latex",   "xhtml,mozilla", " -cmozhtf",  "-cvalidate",
 
559
 "mz", "mztex",     "tex",     "xhtml,mozilla", " -cmozhtf",  "-cvalidate",
 
560
 "mz", "mztexi",    "texi",    "xhtml,mozilla", " -cmozhtf",  "-cvalidate",
 
561
 "mz", "mztexexec", "texexec", "xhtml,mozilla", " -cmozhtf",  "-cvalidate",
 
562
->>>
 
563
 
 
564
 
 
565
%%%%%%%%%%%%%
 
566
\subsection{OpenOffice: oo}
 
567
%%%%%%%%%%%%%
 
568
 
 
569
\<unix scripts\><<<-
 
570
\Ii{,xhtml,ooffice}
 
571
\Iii{-i~/tex4ht.dir/texmf/tex4ht/ht-fonts/#1 -cmozhtf}
 
572
\Iv{#1 -coo }
 
573
\make{oo}
 
574
->>>
 
575
 
 
576
\<ms scripts\><<<-
 
577
\Ii{,xhtml,ooffice}
 
578
\Iii{-ic:\tex4ht\texmf\tex4ht\ht-fonts\#1
 
579
     -ec:\tex4ht\texmf\tex4ht\base\win32\tex4ht.env -cmozhtf}
 
580
\Iv{#1 -coo -ec:\tex4ht\texmf\tex4ht\base\win32\tex4ht.env -cvalidate }
 
581
\make{oo}
 
582
->>>
 
583
 
 
584
 
 
585
\<perl options\><<<-
 
586
 "oo", "oolatex",   "latex",   "xhtml,ooffice", "ooffice/\! -cmozhtf",  "-coo -cvalidate",
 
587
 "oo", "ootex",     "tex",     "xhtml,ooffice", "ooffice/\! -cmozhtf",  "-coo -cvalidate",
 
588
 "oo", "ootexi",    "texi",    "xhtml,ooffice", "ooffice/\! -cmozhtf",  "-coo -cvalidate",
 
589
 "oo", "ootexexec", "texexec", "xhtml,ooffice", "ooffice/\! -cmozhtf",  "-coo -cvalidate",
 
590
->>>
 
591
 
 
592
%%%%%%%%%%%%%
 
593
\subsection{TEI: tei, teim}
 
594
%%%%%%%%%%%%%
 
595
 
 
596
\<unix scripts\><<<-
 
597
\Ii{,xhtml,tei}
 
598
\Iii{-i~/tex4ht.dir/texmf/tex4ht/ht-fonts/#1 -cunihtf}
 
599
\Iv{#1 -cvalidate   ## -d~/WWW/temp/ -m644 }
 
600
\make{tei}
 
601
 
 
602
\Ii{,xhtml,tei-mml}
 
603
\Iii{-i~/tex4ht.dir/texmf/tex4ht/ht-fonts/#1 -cunihtf}
 
604
\Iv{#1 -cvalidate   ## -d~/WWW/temp/ -m644 }
 
605
\make{teim}
 
606
->>>
 
607
 
 
608
\<ms scripts\><<<-
 
609
\Ii{,xhtml,tei}
 
610
\Iii{-ic:\tex4ht\texmf\tex4ht\ht-fonts\#1
 
611
     -ec:\tex4ht\texmf\tex4ht\base\win32\tex4ht.env -cunihtf}
 
612
\Iv{#1 -ec:\tex4ht\texmf\tex4ht\base\win32\tex4ht.env -cvalidate }
 
613
\make{tei}
 
614
 
 
615
\Ii{,xhtml,tei-mml}
 
616
\Iii{-ic:\tex4ht\texmf\tex4ht\ht-fonts\#1 
 
617
     -ec:\tex4ht\texmf\tex4ht\base\win32\tex4ht.env -cunihtf}
 
618
\Iv{#1 -ec:\tex4ht\texmf\tex4ht\base\win32\tex4ht.env -cvalidate }
 
619
\make{teim}
 
620
->>>
 
621
 
 
622
 
 
623
\<perl options\><<<-
 
624
 "tei",  "teilatex",  "latex",   "xhtml,tei",    " -cunihtf",  "-cvalidate",
 
625
 "tei",  "teitex",    "tex",     "xhtml,tei",    " -cunihtf",  "-cvalidate",
 
626
 "tei",  "teitexi",   "texi",    "xhtml,tei",    " -cunihtf",  "-cvalidate",
 
627
 "tei",  "teitexexec","texexec", "xhtml,tei",    " -cunihtf",  "-cvalidate",
 
628
 "teim", "teimlatex", "latex",   "xhtml,tei-mml"," -cunihtf",  "-cvalidate",
 
629
 "teim", "teimtex",   "tex",     "xhtml,tei-mml"," -cunihtf",  "-cvalidate",
 
630
 "teim", "teimtexi",  "texi",    "xhtml,tei-mml"," -cunihtf",  "-cvalidate",
 
631
 "teim", "teimtexexec","texexec","xhtml,tei-mml"," -cunihtf",  "-cvalidate",
 
632
->>>
 
633
 
 
634
 
 
635
%%%%%%%%%%%%%
 
636
\subsection{DocBook: db, dbm}
 
637
%%%%%%%%%%%%%
 
638
 
 
639
\<unix scripts\><<<-
 
640
\Ii{,xhtml,docbook}
 
641
\Iii{-i~/tex4ht.dir/texmf/tex4ht/ht-fonts/#1 -cunihtf}
 
642
\Iv{#1    -cvalidate ## -d~/WWW/temp/ -m644  }
 
643
\make{db}
 
644
 
 
645
\Ii{,xhtml,docbook-mml}
 
646
\Iii{-i~/tex4ht.dir/texmf/tex4ht/ht-fonts/#1 -cunihtf}
 
647
\Iv{#1    -cvalidate ## -d~/WWW/temp/ -m644  }
 
648
\make{dbm}
 
649
->>>
 
650
 
 
651
\<ms scripts\><<<-
 
652
\Ii{,xhtml,docbook}
 
653
\Iii{-ic:\tex4ht\texmf\tex4ht\ht-fonts\#1
 
654
     -ec:\tex4ht\texmf\tex4ht\base\win32\tex4ht.env -cunihtf}
 
655
\Iv{#1 -ec:\tex4ht\texmf\tex4ht\base\win32\tex4ht.env -cvalidate }
 
656
\make{db}
 
657
 
 
658
\Ii{,xhtml,docbook-mml}
 
659
\Iii{-ic:\tex4ht\texmf\tex4ht\ht-fonts\#1
 
660
     -ec:\tex4ht\texmf\tex4ht\base\win32\tex4ht.env -cunihtf}
 
661
\Iv{#1 -ec:\tex4ht\texmf\tex4ht\base\win32\tex4ht.env -cvalidate }
 
662
\make{dbm}
 
663
->>>
 
664
 
 
665
 
 
666
 
 
667
\<perl options\><<<-
 
668
 "db",  "dblatex",   "latex",   "xhtml,docbook",     " -cunihtf",  "-cvalidate",
 
669
 "db",  "dbtex",     "tex",     "xhtml,docbook",     " -cunihtf",  "-cvalidate",
 
670
 "db",  "dbtexi",    "texi",    "xhtml,docbook",     " -cunihtf",  "-cvalidate",
 
671
 "db",  "dbtexexec", "texexec", "xhtml,docbook",     " -cunihtf",  "-cvalidate",
 
672
 "dbm", "dbmlatex",  "latex",   "xhtml,docbook-mml", " -cunihtf",  "-cvalidate",
 
673
 "dbm", "dbmtex",    "tex",     "xhtml,docbook-mml", " -cunihtf",  "-cvalidate",
 
674
 "dbm", "dbmtexi",   "texi",    "xhtml,docbook-mml", " -cunihtf",  "-cvalidate",
 
675
 "dbm", "dbmtexexec","texexec", "xhtml,docbook-mml", " -cunihtf",  "-cvalidate",
 
676
->>>
 
677
 
 
678
 
 
679
 
 
680
%%%%%%%%%%%%%
 
681
\subsection{MS Word HTML: w}
 
682
%%%%%%%%%%%%%
 
683
 
 
684
 
 
685
\<unix scripts\><<<-
 
686
\Ii{,xhtml,word}
 
687
\Iii{-i~/tex4ht.dir/texmf/tex4ht/ht-fonts/#1  -csymhtf}
 
688
\Iv{#1    -cvalidate ## -d~/WWW/temp/ -m644 }
 
689
\make{w}
 
690
->>>
 
691
 
 
692
\<ms scripts\><<<-
 
693
\Ii{,xhtml,word}
 
694
\Iii{-ic:\tex4ht\texmf\tex4ht\ht-fonts\#1 
 
695
     -ec:\tex4ht\texmf\tex4ht\base\win32\tex4ht.env  -csymhtf}
 
696
\Iv{#1 -ec:\tex4ht\texmf\tex4ht\base\win32\tex4ht.env -cvalidate }
 
697
\make{w}
 
698
->>>
 
699
 
 
700
 
 
701
 
 
702
 
 
703
\<perl options\><<<-
 
704
 "w", "wlatex",   "latex",   "xhtml,word", " -csymhtf", "",
 
705
 "w", "wtex",     "tex",     "xhtml,word", " -csymhtf", "",
 
706
 "w", "wtexi",    "texi",    "xhtml,word", " -csymhtf", "",
 
707
 "w", "wtexexec", "texexec", "xhtml,word", " -csymhtf", "",
 
708
->>>
 
709
 
 
710
 
 
711
 
 
712
 
 
713
%%%%%%%%%%%%%
 
714
\subsection{JavaHelp: jh}
 
715
%%%%%%%%%%%%%
 
716
 
 
717
\<unix scripts\><<<-
 
718
\Ii{,html,javahelp,3.2,unicode}
 
719
\Iii{-i~/tex4ht.dir/texmf/tex4ht/ht-fonts/#1 -cmozhtf -u10}
 
720
\Iv{#1 -d$1-doc/ -m644  -cjavahelp -cvalidate }
 
721
\make{jh}
 
722
->>>
 
723
 
 
724
\<ms scripts\><<<-
 
725
\Ii{,html,javahelp,3.2,unicode}
 
726
\Iii{-ic:\tex4ht\texmf\tex4ht\ht-fonts\#1 
 
727
     -ec:\tex4ht\texmf\tex4ht\base\win32\tex4ht.env
 
728
      -cmozhtf -u10}
 
729
\Iv{#1 -ec:\tex4ht\texmf\tex4ht\base\win32\tex4ht.env -d%1-doc\ -cjavahelp }
 
730
\make{jh}
 
731
->>>
 
732
 
 
733
 
 
734
\<unix scripts\><<<-
 
735
\Ii{,html,javahelp,3.2,unicode,jh1.0}
 
736
\Iii{-i~/tex4ht.dir/texmf/tex4ht/ht-fonts/#1 -cmozhtf -u10}
 
737
\Iv{#1 -d$1-doc/ -m644 ## -cvalidate }
 
738
\make{jh1}
 
739
->>>
 
740
 
 
741
\<ms scripts\><<<-
 
742
\Ii{,html,javahelp,3.2,unicode,jh1.0}
 
743
\Iii{-ic:\tex4ht\texmf\tex4ht\ht-fonts\#1 
 
744
     -ec:\tex4ht\texmf\tex4ht\base\win32\tex4ht.env
 
745
      -cmozhtf -u10}
 
746
\Iv{#1 -ec:\tex4ht\texmf\tex4ht\base\win32\tex4ht.env -d%1-doc\ -cjavahelp1 }
 
747
\make{jh1}
 
748
->>>
 
749
 
 
750
\<perl options\><<<-
 
751
 "jh", "jhlatex",  "latex",  "html,javahelp,3.2,unicode,jh1.0", " -cmozhtf -u10", " -d%1-doc/ -cjavahelp -cvalidate",
 
752
 "jh", "jhtex",    "tex",    "html,javahelp,3.2,unicode,jh1.0", " -cmozhtf -u10", " -d%1-doc/ -cjavahelp -cvalidate",
 
753
 "jh", "jhtexi",   "texi",   "html,javahelp,3.2,unicode,jh1.0", " -cmozhtf -u10", " -d%1-doc/ -cjavahelp -cvalidate",
 
754
 "jh", "jhtexexec","texexec", "html,javahelp,3.2,unicode,jh1.0", " -cmozhtf -u10", " -d%1-doc/ -cjavahelp -cvalidate",
 
755
->>>
 
756
 
 
757
 
 
758
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
759
\section{mkht.4ht}
 
760
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
761
 
 
762
 
 
763
 
 
764
\<mkht\><<<-
 
765
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
766
% mkht.4ht                              ?version %
 
767
% Copyright (C) ?CopyYear.1997.       Eitan M. Gurari         %
 
768
?<TeX4ht copyright?>
 
769
 
 
770
\def\exit{\documentclass{article}\begin{document}\end{document}\endinput}
 
771
\bgroup
 
772
  \def\missing#1{\aftergroup\exit
 
773
     \immediate\write16{---------------------------- error 
 
774
        ---------------------------- 
 
775
        ^^JRequires #1ProTex.sty from 
 
776
        http://www.cse.ohio-state.edu/\string
 
777
       ~gurari/systems.html^^J%
 
778
       ---------------------------------------------------------------}}
 
779
  \openin15=ProTex.sty \ifeof15 \missing{}\else \closein15 \fi
 
780
  \openin15=AlProTex.sty \ifeof15 \missing{Al}\else \closein15 \fi
 
781
\egroup
 
782
 
 
783
\documentclass{article}
 
784
 
 
785
\ifx \HCode\UnDef
 
786
  \input tex4ht.sty
 
787
  \Preamble{xhtml}
 
788
  \input ProTex.sty
 
789
  \AlProTex{foo,<<<>>>,|,title,list}
 
790
  \begin{document}
 
791
  \EndPreamble
 
792
\else
 
793
  \Configure{ProTex}{foo,<<<>>>,|,title,list,[[]]}
 
794
  \begin{document}
 
795
\fi
 
796
 
 
797
\tableofcontents
 
798
 
 
799
?<def script?>
 
800
 
 
801
%%%%%%%%%%%%%%%%%%%%%%
 
802
\section{Script Components}
 
803
%%%%%%%%%%%%%%%%%%%%%%
 
804
 
 
805
\def\setcats{\catcode`\\=12 \catcode`\%=12 \catcode`\~=12
 
806
 \catcode`\_=12
 
807
}
 
808
 
 
809
\def\Remark{\bgroup \catcode`\#=12 \setcats \Rema}  \def\Rema#1{\egroup\def\Rem{#1}}
 
810
\def\Ii{\def\II}
 
811
\def\Iii{\bgroup \setcats \Iiicont}  \def\Iiicont#1{\egroup\def\III.##1.{#1}}
 
812
\def\Iv{\bgroup \setcats \Ivcont}    \def\Ivcont#1{\egroup\def\IV.##1.{#1}}
 
813
\def\Quote{\bgroup \setcats \Qcont}  \def\Qcont#1{\egroup\def\quote{#1}}
 
814
\def\Argchar{\bgroup \setcats \Acont}\def\Acont#1{\egroup\def\argchar{#1}}
 
815
\def\Dirchar{\bgroup \setcats \Dcont}\def\Dcont#1{\egroup\def\dirchar{#1}}
 
816
\def\Ext{\bgroup \setcats \Econt}    \def\Econt#1{\egroup\def\ext{#1}%
 
817
  ?<unix shebang line?>}
 
818
\def\Base{\bgroup \setcats \Bcont}   \def\Bcont#1{\egroup\def\base{#1}}
 
819
\def\Script{\def\script##1##2}  % #1 -- file    #2 -- extension   
 
820
\def\Options#1{\ifx \OPTIONS\UnDef \def\OPTIONS{#1}\fi}
 
821
\def\Latex#1{\ifx \latex\UnDef \def\latex{#1}\fi}
 
822
 
 
823
\let\Rem=\relax       
 
824
\let\II=\relax       
 
825
\let\III=\relax
 
826
\let\IV=\relax
 
827
\let\quote=\relax
 
828
\let\argchar=\relax
 
829
\let\dirchar=\relax
 
830
\let\ext=\relax
 
831
\ifx \script\UnDef \let\script=\relax \fi
 
832
\let\base=\relax
 
833
\let\firstln=\relax
 
834
       
 
835
 
 
836
\<Rem\><<<
 
837
|Rem>>>
 
838
 
 
839
\<II\><<<
 
840
|II>>>
 
841
 
 
842
\<III\><<<
 
843
|III.|<@|>3.>>>
 
844
 
 
845
\<IV\><<<
 
846
|IV.|<@|>4.>>>
 
847
 
 
848
\<'\><<<
 
849
|quote>>>
 
850
 
 
851
\<@\><<<
 
852
|argchar>>>
 
853
 
 
854
\<dir ch\><<<
 
855
|dirchar>>>
 
856
 
 
857
\<base\><<<
 
858
|base>>>
 
859
 
 
860
\<unix line\><<<
 
861
|firstln
 
862
        endfirstln>>>
 
863
 
 
864
\def\IfExt#1,#2//{\def\next{#1}%
 
865
   \ifx \next\ext \def\next{\csname iftrue\endcsname}%
 
866
   \else \ifx \next\empty \def\next{\csname iffalse\endcsname}%
 
867
   \else \def\next{\IfExt#2,,//}\fi\fi \next}
 
868
 
 
869
\begingroup
 
870
\catcode`\:=11 \catcode`\^=7    \catcode`\^^M=13%
 
871
%
 
872
\gdef\make#1{%
 
873
  \expandafter\IfExt\OPTIONS,,//%
 
874
  %
 
875
   \subsection{#1}%
 
876
   \def\temp##1{\par{\tt\string##1: \meaning##1}}%
 
877
   \temp\quote
 
878
   \temp\argchar
 
879
   \temp\dirchar
 
880
   \temp\ext
 
881
   \temp\script
 
882
   \temp\base
 
883
   \temp\firstln
 
884
   \temp\latex
 
885
   \temp\Rem
 
886
   \temp\II
 
887
   \temp\III
 
888
   \temp\IV
 
889
   \def\pref{#1} %
 
890
   \<\pref latex\latex.\ext\><<<
 
891
   \<htlatex \latex...\>
 
892
   >>> %
 
893
   ?<add script?>%
 
894
  \fi
 
895
}                                      %
 
896
\endgroup
 
897
 
 
898
 
 
899
\input \JOBNAME
 
900
 
 
901
\end{document}
 
902
\endinput
 
903
->>>
 
904
 
 
905
 
 
906
The script should have an explicit shebang (\#!) line.  A command on
 
907
the first line implies a call for [t]csh interpretation.  To avoid
 
908
shebang at the first line, leave the first line blank.
 
909
 
 
910
 
 
911
\<unix shebang line\><<<-
 
912
  \def\firstln{unix}\ifx \firstln\ext
 
913
           \def\firstln##1endfirstln{##1}%
 
914
  \else    \def\firstln##1endfirstln{}\fi
 
915
->>>
 
916
 
 
917
 
 
918
 
 
919
 
 
920
 
 
921
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
922
\section{mkht-scripts.4ht}
 
923
%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
924
 
 
925
 
 
926
 
 
927
 
 
928
\<mkht-scripts\><<<-
 
929
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
930
% mkht-scripts.4ht                      ?version %
 
931
% Copyright (C) ?CopyYear.2000.       Eitan M. Gurari         %
 
932
?<TeX4ht copyright?>
 
933
 
 
934
\ifx \JOBNAME\UnDef
 
935
   \def\JOBNAME{mkht-scripts.4ht}
 
936
   \def\next{\input mkht.4ht  \endinput}
 
937
   \expandafter\next
 
938
\fi
 
939
 
 
940
\Options{unix,bat}   % {unix,bat}, {unix}, {bat}
 
941
\Latex{}             % {}, {2e}, {209}
 
942
 
 
943
%%%%%%%%%%%%%%%%%%
 
944
\section{Unix Scripts}
 
945
%%%%%%%%%%%%%%%%%%
 
946
 
 
947
%%%%%%%%%%
 
948
\Ext{unix}
 
949
%%%%%%%%%%
 
950
\ifOption{Needs}{%
 
951
\Script{%                        #1 -- file    #2 -- extension
 
952
   \Needs{"sed -e 's/\#\# -d/ -d/g' < #1.#2 >  /home/4/gurari/tex4ht.dir/bin/solaris/#1"}%
 
953
   \Needs{"chmod 700 /home/4/gurari/tex4ht.dir/bin/solaris/#1"}%
 
954
   \Needs{"mkdir  mn.dir/ht-unix"}%
 
955
   \Needs{"cp #1.#2  mn.dir/ht-unix/#1"}%
 
956
}}{}
 
957
\Base{}
 
958
\Quote{'}
 
959
\Argchar{$}
 
960
\Dirchar{-f/}
 
961
\Remark{#}
 
962
 
 
963
?<unix scripts?>
 
964
 
 
965
%%%%%%%%%%%%%%%%%%
 
966
\section{MS Window Scripts}
 
967
%%%%%%%%%%%%%%%%%%
 
968
 
 
969
%%%%%%%%%%%%%%%%%%
 
970
\Options{bat}
 
971
%%%%%%%%%%%%%%%%%%
 
972
 
 
973
%%%%%%%%%
 
974
\Ext{bat}
 
975
%%%%%%%%%
 
976
\ifOption{Needs}{\Script{%
 
977
   \Needs{"mkdir  mn.dir/ht-win32"}%
 
978
   \Needs{"cp #1.#2  mn.dir/ht-win32/."}%
 
979
}}{}
 
980
\Quote{}
 
981
\Argchar{%}
 
982
\Dirchar{}
 
983
\Remark{Rem }
 
984
 
 
985
?<ms scripts?>
 
986
?<mkht note?>
 
987
 
 
988
\end{document}
 
989
->>>
 
990
 
 
991
 
 
992
 
 
993
 
 
994
 
 
995
The htlatex-oriented scripts have the following outline.
 
996
 
 
997
\begin{verbatim}
 
998
        latex  $5 $1
 
999
        latex  $5 $1
 
1000
        latex  $5 $1   
 
1001
        tex4ht -f/$1  -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3  
 
1002
        t4ht -f/$1 $4 
 
1003
\end{verbatim}
 
1004
 
 
1005
The latex command may be introduced with a filename residing out of
 
1006
the work directory. However, it produces the dvi code in the work
 
1007
directory. Consequently, when activated by htlatex-oriented scripts,
 
1008
the tex4ht.c and t4ht.c utilities need to look for the dvi code in the
 
1009
work directory.  The -f prefix asks these utilities to ignore the
 
1010
paths possibly appearing in \verb!$1!. A path is recognized by
 
1011
determining whether the character immediately after \verb'-f' is a
 
1012
directory indicator character `\verb+\+' or `\verb+/+'.
 
1013
 
 
1014
 
 
1015
 
 
1016
 
 
1017
 
 
1018
 
 
1019
%%%%%%%%%%%%%%%%%%
 
1020
\section{Perl Script}
 
1021
%%%%%%%%%%%%%%%%%%
 
1022
 
 
1023
 
 
1024
 
 
1025
 
 
1026
\<mk4ht.perl\><<<-
 
1027
#!/usr/bin/env perl
 
1028
?<perl copyright notice?>
 
1029
use strict;
 
1030
$^W=1; # turn warning on
 
1031
?<available options?>
 
1032
?<help info?>
 
1033
print "mk4ht (?version)\n";
 
1034
if(  !@ARGV  ){
 
1035
  print "improper command\n";
 
1036
  showInstrucions(); exit(1);
 
1037
}
 
1038
my @command=("","","","","");
 
1039
my $i=0;
 
1040
my $j=0;
 
1041
my $param;
 
1042
foreach $param (@ARGV) {
 
1043
  if( $i == 0 ){
 
1044
    for( $j=1; $j<$#options; $j+=6 ){
 
1045
      if( $param eq $options[$j] ){
 
1046
         if( $options[$j-1] eq "" ){
 
1047
           $command[0] = $options[$j];
 
1048
         } else {
 
1049
           $command[0] = "ht".$options[$j+1];
 
1050
         }
 
1051
         $command[2] = $options[$j+2];
 
1052
         $command[3] = $options[$j+3];
 
1053
         $command[4] = $options[$j+4];
 
1054
         last;
 
1055
    } }
 
1056
    if( $j>$#options ){ print "improper command: $param \n";
 
1057
                        showInstrucions(); exit(1); }
 
1058
  } elsif ( $i== 1 ) {
 
1059
    $command[1] = $param;
 
1060
  } elsif ( $i== 2 ) {
 
1061
    if( $command[2] eq "" ){
 
1062
      $command[2] = $param;
 
1063
    } else {
 
1064
      $command[2] = $param. "," . $command[2];
 
1065
    }
 
1066
  } elsif ( $i== 3 ) {
 
1067
    $command[3] = $param . $command[3];
 
1068
  } else {
 
1069
    $command[4] = $param. " " .$command[4];
 
1070
  }
 
1071
  $i++;
 
1072
}
 
1073
my $commando = $command[0] . " "    . $command[1] . " \"".
 
1074
            $command[2] . "\" \"". $command[3] . "\" \"" .
 
1075
            $command[4] . "\"";
 
1076
print "$commando\n";
 
1077
my $rtrn;
 
1078
if( $rtrn = system($commando) ){
 
1079
   print "--- error --- failed to execute command\n";
 
1080
} else { exit( !$rtrn ); }
 
1081
 
 
1082
->>>
 
1083
 
 
1084
 
 
1085
 
 
1086
\<available options\><<<-
 
1087
my @options = (
 
1088
?<perl options?>
 
1089
);
 
1090
->>>
 
1091
 
 
1092
\<help info\><<<-
 
1093
sub showInstrucions(){
 
1094
  print " option1:  mk4ht #1 \"#2\" \"#3\" \"#4\" \"#5\"\n";
 
1095
  print " \n";
 
1096
  print "    #1: htlatex, mzlatex, oolatex, dblatex, dbmlatex,\n";
 
1097
  print "        teilatex, teimlatex, uxhlatex, wlatex, xhlatex,\n";
 
1098
  print "        xhmlatex\n";
 
1099
  print " \n";
 
1100
  print "        also 'tex', 'texi', and 'texexec' instead of 'latex'\n";
 
1101
  print " \n";
 
1102
  print "    #2: file name\n";
 
1103
  print "    #3: optional arguments for latex/tex/texi/texexec \n";
 
1104
  print "    #4: optional arguments for tex4ht.c\n";
 
1105
  print "    #5: optional arguments for t4ht.c\n";
 
1106
  print " \n";
 
1107
  print " option2:  mk4ht ht #2 #3 \"#4\" \"#5\"\n";
 
1108
  print " \n";
 
1109
  print "    #1: ht\n";
 
1110
  print "    #2: latex, tex\n";
 
1111
  print "    #3: file name\n";
 
1112
  print "    #4: optional arguments for tex4ht.c\n";
 
1113
  print "    #5: optional arguments for t4ht.c\n";
 
1114
  print " \n";
 
1115
  print " Within the program, in column three of the options\n";
 
1116
  print " variable, the  requests for the commands \"latex\",\n";
 
1117
  print " \"tex\", etc. can be replaced with other equivalent\n";
 
1118
  print " commands (e.g., \"tex -fmt=latex\").\n";
 
1119
}
 
1120
->>>
 
1121
 
 
1122
 
 
1123
 
 
1124
 
 
1125
 
 
1126
Safety guards:
 
1127
 
 
1128
\begin{itemize}
 
1129
\item The `use strict'  should be employed when not
 
1130
   dynamically exporting variables. 
 
1131
\item Put `my' on local declarations.
 
1132
\item The `W'  (?)
 
1133
 
 
1134
\end{itemize}
 
1135
 
 
1136
 
 
1137
 
 
1138
%%%%%%%%%%%%%%%%%%
 
1139
\section{Info}
 
1140
%%%%%%%%%%%%%%%%%%
 
1141
 
 
1142
 
 
1143
 
 
1144
\<mkht note\><<<-
 
1145
\immediate\write16{--------------------------------------------------------}
 
1146
\immediate\write16{* Compile mkht-scripts.4ht with latex to get the 
 
1147
                                                              full scripts.}
 
1148
\immediate\write16{* For shorter latex2e scripts, compile a file whose 
 
1149
                                                                content is:}
 
1150
\immediate\write16{\space\space\space\space\def\string\latex{2e}
 
1151
                                      \string\input\space mkht-scripts.4ht }
 
1152
\immediate\write16{* For shorter latex209 scripts, compile a file whose 
 
1153
                                                                content is:}
 
1154
\immediate\write16{\space\space\space\space\def\string\latex{209}
 
1155
                                      \string\input\space mkht-scripts.4ht }
 
1156
\immediate\write16{* Remove the extension .unix from the file names        }
 
1157
\immediate\write16{--------------------------------------------------------}
 
1158
->>>
 
1159
 
 
1160
\<TeX4ht copyright\><<<-
 
1161
%                                                        %
 
1162
% This work may be distributed and/or modified under the %
 
1163
% conditions of the LaTeX Project Public License, either %
 
1164
% version 1.3 of this license or (at your option) any    %
 
1165
% later version. The latest version of this license is   %
 
1166
% in                                                     %
 
1167
%   http://www.latex-project.org/lppl.txt                %
 
1168
% and version 1.3 or later is part of all distributions  %
 
1169
% of LaTeX version 2003/12/01 or later.                  %
 
1170
%                                                        %
 
1171
% This work has the LPPL maintenance status "maintained".%
 
1172
%                                                        %
 
1173
% This Current Maintainer of this work                   %
 
1174
% is Eitan M. Gurari.                                    %
 
1175
%                                                        %
 
1176
% If you modify this program your changing its signature %
 
1177
% with a directive of the following form will be         %
 
1178
% appreciated.                                           %
 
1179
%            \message{signature}                         %
 
1180
%                                                        %
 
1181
%                             gurari@cse.ohio-state.edu  %
 
1182
%                 http://www.cse.ohio-state.edu/~gurari  %
 
1183
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
1184
\immediate\write-1{version |version}
 
1185
->>>
 
1186
 
 
1187
\<perl copyright notice\><<<-
 
1188
# mk4ht                                ?version
 
1189
# Copyright (C) ?CopyYear.2003.              Eitan M. Gurari             
 
1190
#                                                      
 
1191
#                                                        %
 
1192
# This work may be distributed and/or modified under the %
 
1193
# conditions of the LaTeX Project Public License, either %
 
1194
# version 1.3 of this license or (at your option) any    %
 
1195
# later version. The latest version of this license is   %
 
1196
# in                                                     %
 
1197
#   http://www.latex-project.org/lppl.txt                %
 
1198
# and version 1.3 or later is part of all distributions  %
 
1199
# of LaTeX version 2003/12/01 or later.                  %
 
1200
#                                                        %
 
1201
# This work has the LPPL maintenance status "maintained".%
 
1202
#                                                        %
 
1203
# This Current Maintainer of this work                   %
 
1204
# is Eitan M. Gurari.                                    %
 
1205
#                                                        %
 
1206
#                             gurari@cse.ohio-state.edu  %
 
1207
#                 http://www.cse.ohio-state.edu/~gurari  %
 
1208
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
1209
->>>
 
1210
 
 
1211
 
 
1212
 
 
1213
 
 
1214
 
 
1215
 
 
1216
 
 
1217
 
 
1218
 
 
1219
 
 
1220
 
 
1221
 
 
1222
 
 
1223
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
1224
 
 
1225
\OutputCode\<mkht\>
 
1226
\OutputCode\<mkht-scripts\>
 
1227
 
 
1228
\OutputCodE\<mk4ht.perl\>
 
1229
%"mv mk4ht.perl mk4ht"
 
1230
 
 
1231
 
 
1232
 
 
1233
\immediate\write16{--------------------------------------------------------}
 
1234
\immediate\write16{Compile mkht-scripts.4ht with latex to get the 
 
1235
                                                              full scripts.}
 
1236
\immediate\write16{Use the option `Needs' to automatically move the
 
1237
    files to private directories.}
 
1238
\immediate\write16{--------------------------------------------------------}
 
1239
 
 
1240
\end{document}
 
1241
\endinput
 
1242
 
 
1243
 
 
1244
 
 
1245
 
 
1246
 
 
1247
 
 
1248
 
 
1249
 
 
1250
 
 
1251