File: tth.1

package info (click to toggle)
tth 2.92-1
  • links: PTS
  • area: non-free
  • in suites: woody
  • size: 1,268 kB
  • ctags: 656
  • sloc: sh: 57; makefile: 42
file content (331 lines) | stat: -rw-r--r-- 10,372 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
.TH TTH 1
.SH NAME
tth, ps2gif \- TeX and LaTeX to HTML translator and its auxiliary program
.SH SYNOPSIS
.B tth
[
.I -a
] [
.I -c
] [
.IR -e?
] [
.IR -f?
] [
.IR -g
] [
.I -h
] [
.IR -i
] [
.IR -Lfile
] [
.IR -n
] [
.IR -pdirectory
] [
.I -r
] [
.I -t
] [
.I -v
] [
.I -x
]
.sp
.B ps2gif
.I postscript-file gif-file
.SH DESCRIPTION
.PP
.I tth
translates TeX source that uses the plain macro package or LaTeX,
including most mathematics,
into a near equivalent in HTML. The output conforms to HTML3.2 except
for the use of the <font face="symbol"> tag, which is a common
extension and part of the HTML4.0 draft.
The complete documentation is contained in tth_manual.html distributed
with the program. This man page is an incomplete summary.
.PP
The program is a filter, i.e. it reads from standard input and writes to standard
output.
In addition, diagnostic messages concerning its detection of unknown
or untranslated constructs are sent to standard error.
.PP
In handling embedded graphical files
.I tth
can make use of an auxiliary program,
.IR ps2gif ,
which in turn makes use of the ghostscript interpreter
.IR gs (1)
and the Portable Bitmap Graphics suite of commands, see
.IR pbm (1).
.PP
.I tth
is extremely fast in default mode on any reasonable hardware.
Conversion of even large TeX files should be a matter of a second or
two.  This makes it possible to use
.I tth
in a CGI script to output HTML
directly from TeX source if desired; (standard error may then need to be redirected.)
.PP
.I tth
handles TeX things like:
.nf
.in 1i
Almost all mathematics, including symbols, fractions, delimiters.
{} \\begingroup\\endgroup  grouping.   
\\it \\bf \\sl etc  styles.
\\beginsection.   
\\centerline{}.  
\\item{...} \\itemitem{...} {\\obeylines  ...}.  
Almost all accented latin characters written like \\"o, or \\"{e}.
\\hang \\hangindent \\narrower for entire paragraphs 
  (\\hangafter ignored).
\\headline is made into a title. 
% Comments. Simply removed. 
\\halign tables, checks template for the presence of \\vrule, 
  to decide if the table is to be border style.
\\settabs \\+ style tables.
\\input: But, of course, not from the implicit texinputs path.
\\newcount, \\number, \\advance and counter setting. 
\\def, \\edef, \\xdef but no delimited arguments. 
  All definitions are global.
\\matrix, \\pmatrix but not \\bordermatrix. \\cases.
.in
.fi
.PP
LaTeX support includes essentially all mathematics plus the following 
environments:
.in 1i
em, verbatim, center, flushright [one paragraph only], verse,
quotation, quote, itemize, enumerate, description, list [treated
as if description], figure, table, tabular[*,x], equation,
displaymath, eqnarray [only one equation number], math, array,
thebibliography, [raw]html, index [as description].
.in
.fi
and Latex commands:
.in 1i
[re]newcommand, newenvironment [optional arg not permitted], chapter,
section, subsection, subsubsection, caption, label, ref, pageref [no
number], emph, textit, texttt, textbf, centering, raggedleft,
includegraphics, [e]psfig, title, author, date [not automatic],
lefteqn, frac, tableofcontents, input, include [as input], textcolor,
color [8 standard colors], footnote [ignoring optional arg], cite,
bibitem, bibliography, tiny ... normalsize ... Huge, newcounter [no
``within'' support], setcounter, addtocounter, value [inside set or
addto counter], arabic, the, stepcounter, newline, verb[*], bfseries,
itshape, ttfamily, textsc, ensuremath, listoftables, listoffigures,
newtheorem [no optional arguments permitted], today, printindex,
boldmath, unboldmath, newfont, thanks, makeindex, index.
.in
.fi
.PP 
Hypertext cross-references within the document are automatically
generated by (e.g.) ref, and tableofcontents.
.PP
When
.I tth
encounters TeX constructs that it cannot handle either
because there is no HTML equivalent, or because it is not clever
enough, it tries to remove the mess they would otherwise cause in the
HTML code, generally giving a warning of the action if it is not sure
what it is doing.
Untranslatable TeX math tokens are inserted verbatim.
.SH "Use of LaTeX auxiliary files, the -L switch"
.PP
Forward references in LaTeX are handled by multiple passes that write
auxiliary files.
.I tth
does only a single pass through the source.  If
you want
.I tth
to use LaTeX constructs (e.g. tableofcontents) which
depend on auxiliary files, then you DO need to run LaTeX on the code
so that these files are generated. You must also tell
.IR tth ,
using the
switch -Lfilename, the base file name of these auxiliary files (which
is the name of the original file omitting the extension). If
.I tth
cannot find the relevant auxiliary file because you didn't run LaTeX
and generate the files or didn't include the switch, then it will
quietly omit the construct. Forward references via ref will not work
if the .aux file is unavailable, but backward references will.
.SH "Indexing"
.PP
.I tth
will construct an index based on the standard LaTeX commands
"\\makeindex" and "\\index{...}", and automatically process it and read it
in when "\\printindex" is encountered. The command line for calling the
makeindex program (not part of this distribution) may be changed using
the 
.I -x
switch. For a file without the "\\makeindex" command, tth will write no
index files, just read in an existing one "file.ind" if it exists.
.SH "epsfbox/includegraphics PostScript graphics inclusion"
.PP
The standard way in plain TeX to include a graphic is using the epsf
macros. The work is done by \\epsfbox{file.ps} which
.I tth
can parse. By
default
.I tth
produces a simple link to such a postscript file.
Optionally it can call a user-supplied (script or) program called
.I ps2gif
to convert the postscript file to a gif file, "file.gif" (unless
"file.gif" or "file.jpg" 
already exists in the same directory as "file.ps" in which
case it is simply referenced). The program must have permission to
write the outputfile (file.gif) in the directory in which the file.ps
resides. That gif is then automatically either linked or inlined in
the document.
 The Latex command \\includegraphics{...} does exactly the same
thing. Its optional arguments are ignored. \\[e]psfig{file=...} is
also treated the same.
.SH OPTIONS
.TP
.B -a
attempt automatic conversion of picture environments. Default omit.
.TP
.B -c 
prefix header "Content-type: text/HTML" (for direct web serving).
.TP
.B -d 
disable definitions with delimited arguments. Default enable.
.TP
.BR -e ?
epsfbox handling:
.B -e1
convert figure to gif using user-supplied ps2gif.
.B -e2
convert and include inline.
.B -e0
(default) no conversion, just ref.
.TP
.BR -f ?
sets the depth of grouping to which fractions are constructed built-up
.B f3
(default) allows three levels built-up,
.B f0
none,
.B f9
lots.
.TP
.B -g 
remove, don't guess intent of, \\font commands. Default guess font/size.
.TP
.B -h
print some help.
.TP
.BR -i 
use italic font for equations (like TeX). Default roman.
.TP
.BR -L file
tells
.I tth
the base file (no extension) for LaTeX auxiliary input.
.TP
.B -n 
number eqnarray environments just once (default number each line).
.TP
.B   -pdirectory  
designate an additional directory to search for input files.
.TP
.B -r
output raw HTML (no preamble or postlude) for inclusion in other HTML.
.TP
.B -t
permit built-up items in textstyle equations. Default in-line items only.
.TP
.B -v
give verbose commentary. 
.TP
.B -xmakindx
specify a non-standard makeindex command line.
.TP
.B
-V
even more verbose, and border equations for debugging

.SH "SEE ALSO"
The tth manual which is more likely to be up-to-date.
.BR http://venus.pfc.mit.edu/tth/manual.cgi 
(or preferably your local copy),
.IR latex (1),
.IR latex2html (1),
.IR tex (1),
.IR makeindex (1)
.SH BUGS
.SH "Apple Macintosh browser font problems"
.PP
For reasons described in the 
.I tth 
manual, correct viewing of 
.I tth
documents requires Mac Netscape to be set to View Encoding MacRoman, and Edit
Preferences Fonts Use-document-fonts (NS 4.0).
.SH "X font problems"
.PP
Symbol fonts are not normally enabled for Netscape running under X,
because of the way Netscape groups its fonts. A fix for this is to
install some aliases in the fonts directories. See
.BR http://venus.pfc.mit.edu/tth/Xfonts.html .
You might want to put these
notes on your site for people viewing your documents.
.SH "Other browser bugs"
.PP
Under Windows, both Netscape (3.0) and Internet Explorer (3.02)
incorrectly size or space vertically the symbol glyphs so that small
gaps appear between the parts of large symbols and delimiters. This
occurs only at certain font sizes (different between the two
browsers!) but causes a slightly annoying degradation of the
visual quality.
.PP
Both Netscape and IE fail (although somewhat differently) to carry font
changing commands from cell to cell of HTML3.2 tables. This means that 
for example boldface in equations will be lost after the first fraction
or built-up construct. The tth
.B -i 
switch mostly circumvents this problem but the browsers ought to fix it.
.PP
IE can become confused about its vertical alignment in tables, with
the result that symbols float above or below the horizontal line in
built-up equations. This sometimes fixes itself if you simply refresh
the page!
.SH tth bugs
.PP
See the manual for TtH limitations.
.PP
The code has been compiled and run on Linux 2.0, MSDOS, and Open VMS.
.SH AUTHOR
.PP
.I tth
is copyright (c) 1997-8 Ian Hutchinson (hutch@psfc.mit.edu).
.SH LICENSE
.PP
You may freely use this software for non-commercial purposes.
It may not be used for commercial purposes without an additional
license.
If you distribute any copies, you must include this file and these
conditions must apply to the recipient. 
No warranty of fitness for any purpose whatever is given, intended, or
implied.
You use this software entirely at your own risk.  If you choose to use
tth, by your actions you acknowledge that any direct or consequential damage
whatever is your responsibility, not mine.

 For details see http://hutchinson.belmont.ma.us/tth/.
.SH ACKNOWLEDGEMENTS
.PP

Many thanks for useful discussions and input to
Robert Curtis, Ken Yap, Paul Gomme, Bruce Lipschultz, Mike Fridberg, 
Michael Sanders, Michael Patra, Bryan Anderson, Wolfram Gloger,
Ray Mines, John Murdie, David Johnson, Jonathan Barron, Michael
Hirsch, Jon Nimmo, Alan Flavell, Ron Kumon.