1TEX4HT(1)                   General Commands Manual                  TEX4HT(1)
2
3
4

NAME

6       TeX4ht - a system for authoring hypertext with TeX and friends
7

SYNOPSIS

9       mk4ht command file [ options1 ] [ options2 ] [ options3 ]
10
11       httex|htlatex|httexi file [ options1 ] [ options2 ] [ options3 ]
12
13       ht tex|latex file [ t4ht options ]
14
15       tex4ht  [  -fdir-char  ]  file[.dvi]  [  -ctag-name  ] [ -eenv-file ] [
16       -gbitmap-file-ext ] [ -h(e|f|F|g|s|v|V) ] [ -ihtf-font-dir ] [  -lbook‐
17       keeping-file ] [ -P(*|filter) ] [ -ttfm-font-dir ] [ -u10 ] [ -utf8 ] [
18       -xs ]
19
20       t4ht [ -fdir-char ] file[.lg] [ -ctag-name ] [ -dout-dir ] [ -eenv-file
21       ]  [  -i  ]  [  -mmode  ]  [  -Mmode ] [ -p ] [ -r ] [ -S(*|filter) ] [
22       -Xfield-content ] [ -.field-content ]
23

DESCRIPTION

25       (This manual page was written for  the  Debian  GNU/Linux  distribution
26       because  the original program does not have a manual page.  Instead, it
27       is documented in detail at the  author's  website;  see  below.  Please
28       refer  to  that  documentation  for more details or up to date informa‐
29       tion.)
30
31       This page documents briefly the portmanteau perl script mk4ht, the more
32       specific  shell  scripts  httex, htlatex, httexi, and others like them,
33       the lower level shell script interface ht, and the commands tex4ht  and
34       t4ht  that all these scripts invoke. Together these programs constitute
35       TeX4ht; a highly configurable TeX-based authoring system for  producing
36       hypertext.
37
38       TeX4ht  interacts  with  TeX-based  applications  through  a style file
39       tex4ht.sty and other files which are loaded by this style file, leaving
40       the processing of the source files to the native TeX compiler. The out‐
41       put of the TeX compiler is then  post-processed  by  tex4ht  and  t4ht.
42       Consequently,  TeX4ht  can handle most features of TeX-based systems in
43       general, and of LaTeX in particular.
44
45       The shell scripts  httex , htlatex and httexi convert TeX (respectively
46       LaTeX  and texinfo) into HTML. Typical user requirements should be sat‐
47       isfied by these scripts which can generally convert typical TeX  source
48       without requiring any modifications.
49
50       To  convert  from a one of the other dialects of TeX (like ConTeXt), or
51       to convert into one of the other variants of hypertext (MathML, XML, OO
52       and so on), it is recommended that you use the perl script mk4ht.  Most
53       common usage of the system can be covered by  the  appropriate  use  of
54       this command with its options.
55
56       The shell script  ht is a much more elementary script which is provided
57       for more complicated needs.  Its correct use depends on a better under‐
58       standing of the system.
59
60       All these scripts begin with suitable invocations of tex(1) or latex(1)
61       or other dialects of TeX as required. The post-processing of  the  .dvi
62       output  is  handled  by tex4ht.  Anything that cannot be rendered using
63       HTML (or its chosen hypertext variant), such as the creation of  bitmap
64       images  or  CSS (Cascade Style Sheet) files is handled by the auxiliary
65       program t4ht.  The method used for generating the images can be config‐
66       ured.
67

OPTIONS

69       The following is only a very brief summary of the main program options.
70       For more details of the command-line and configuration options, see the
71       HTML documentation (see below).
72
73   Options for httex, htlatex and httexi
74       httex, htlatex and httexi are shell scripts that can be used to convert
75       a file in the TeX/LaTeX/texinfo format into HTML. This TeX source  file
76       should  be  like  any  other TeX source file normally used to produce a
77       .dvi file by processing with TeX and friends. The name of such  a  file
78       is  the mandatory file argument for each script. This is followed by up
79       to three optional arguments (delimited  with  quotation  marks).  These
80       arguments, which are not required for typical usage, are as follows:
81
82       1.     The first argument is a list of options for the tex4ht.sty style
83              file (used with tex or latex), separated with commas.   See  the
84              HTML  documentation  for the list of options available. The .log
85              file generated by tex/latex also includes summaries of  some  of
86              the  options  available.  If not empty, this argument must start
87              with html or xhtml.  Additional options could be mathml or  doc‐
88              book to indicate appropriate style of output.
89
90       2.     This  argument  is  used to select tagged sections of tex4ht.env
91              that specifies the font files (*.htf) to use.  This  corresponds
92              to  the  -c  option  for  the command tex4ht as explained below.
93              Examples include unicode or mozilla.
94
95       3.     This argument lists options for the t4ht  program  as  explained
96              below.
97
98       See the HTML documentation for more details and examples.
99
100       Similar  scripts  are  available within the directory /usr/share/tex4ht
101       for generating other kinds of hypertext output. It is also possible  to
102       use the perl script mk4ht as explained below.
103
104   Options for mk4ht
105       mk4ht  is  a  perl  script that can be used to convert TeX source files
106       from numerous dialects of TeX into different hypertext  variants.  This
107       script  takes  two  mandatory arguments: the name of the command to run
108       and the file to run it on. Each possible command is of the form "<vari‐
109       ant><dialect>":  so  for  example  xhmlatex denotes a LaTeX source that
110       needs to be converted to XHTML with  MathML  extensions.  The  possible
111       names   for   commands   can   be   found   by  listing  the  directory
112       /usr/share/tex4ht.  The three optional arguments to mk4ht are identical
113       to  those  outlined  above for httex, htlatex and httexi.  In fact, the
114       command htlatex foo is identical to mk4ht htlatex foo except  that  the
115       former  is shorter to type! However, mk4ht can be configured to shorten
116       the command line as follows.
117
118       Each user can create the configuration file mk4ht.cfg or .mk4ht in  the
119       home or working directory to configure commonly used options for mk4ht;
120       in addition options to clean up temporary files can also  be  added  to
121       this  configuration  file.  Running the command mk4ht without any argu‐
122       ments will summarise the use of this user configuration file.
123
124   Options for ht
125       ht is a small shell script that is used to run the tex4ht programs.  It
126       has two compulsory arguments, as follows:
127
128       1.     The TeX command name to run, usually either tex or latex.
129
130       2.     The input file name (with or without extension).
131
132       It may take any additional options, which will be passed on to the call
133       to t4ht.
134
135   General directory/file search options
136       Several of the options detailed below relate to setting directory paths
137       to  find particular kinds of files.  Note the following when specifying
138       directories for the programs:
139
140       1.     There must be no space between the option letter  (eg,  -t)  and
141              the directory/file name.
142
143       2.     The  directory  name must end with a trailing slash (/, or /!  -
144              see below).
145
146       3.     You can add an exclamation mark (!)  to the end of the directory
147              name, to enable sub-directory searching.
148
149       4.     Only one directory can be specified at a time.  To search multi‐
150              ple directories, either use the sub-directory searching facility
151              or  repeat  the  option.   (The  directory search options can be
152              repeated as often as required.)
153
154       5.     When compiled with kpathsea (as  in  the  Debian  package),  the
155              path-searching  is  in part taken over by kpathsea.  On a Debian
156              system see /usr/share/doc/tex4ht/README.kpathsea for more infor‐
157              mation on path-searching in a kpathsea-enabled tex4ht.
158
159       As  well  as  command-line options, most of these options can (and nor‐
160       mally should) be set in the configuration file tex4ht.env.  The  format
161       within  this  file  is  similar,  but without using a hyphen before the
162       option letter. See the HTML documentation for more details on the  con‐
163       figuration  options available. The file tex4ht.env can be superseded on
164       a per-directory and/or a per-user basis as explained in the HTML  docu‐
165       mentation.  On  a Debian system see /usr/share/doc/tex4ht/README.Debian
166       as well.
167
168   Options for tex4ht
169       -ctag-name
170              Certain lines within the tex4ht.env configuration  file  can  be
171              marked  with  tags.   These lines (typically htf-font-dir search
172              lines) will be omitted unless specifically requested by specify‐
173              ing  the  tag  name  on the tex4ht command line.  If not used, a
174              command-line option of -cdefault is assumed.  (See the  supplied
175              tex4ht.env file for examples of tagged sections.)
176
177       -eenv-file
178              Specify address of the tex4ht configuration file tex4ht.env.
179
180       -gbitmap-file-ext
181              Set the extension of bitmap images to bitmap-file-ext instead of
182              the default .png.  Note that the extension should begin  with  a
183              dot  (.).  Note also that this option only affects images gener‐
184              ated automatically for symbol fonts, and  not  images  generated
185              with the \Picture macro of tex4ht.
186
187       -he    Trace errors and warnings (produces verbose output).
188
189       -hg    Trace groups
190
191       -hs    Trace \specials.
192
193       -hV    Trace search path for tex4ht.env configuration file
194
195       -hF    Trace search path for .htf font files
196
197       -hv    Dump  contents  of found tex4ht.env configuration file to stderr
198              (for debugging)
199
200       -hf    Dump contents of each .htf font file found to stderr (for debug‐
201              ging)
202
203       -ihtf-font-dir
204              Set  directory  for HTF font files (used by tex4ht) to htf-font-
205              dir.
206
207       -lbookkeeping-file
208              Specify name of the file listing cache used to speed up filename
209              lookups (ignored if compiled with kpathsea support)
210
211       -Pfilter
212              Restrict  system  calls requested in the source (La)TeX files to
213              utilities whose names have filter as a  prefix.   Use  a  single
214              asterisk as filter to allow any system calls.
215
216       -ttfm-font-dir
217              Set  directory  for  TFM  font files to tfm-font-dir (ignored if
218              compiled with kpathsea support).
219
220       -u10   Use base 10 encoding for unicode characters.
221
222       -utf8  Use utf-8 encoding for unicode characters.
223
224       -xs    Use 8.3 (MSDOS style) file names for the generated PNG files.
225
226   Options for t4ht
227       -ctag-name
228              Certain lines within the tex4ht.env configuration  file  can  be
229              marked  with tags.  These lines (typically scripts for post-pro‐
230              cessing files) will be omitted unless specifically requested  by
231              specifying  the  tag  name  on  the tex4ht command line.  If not
232              used, a command-line option of -cdefault is assumed.   (See  the
233              supplied tex4ht.env file for examples of tagged sections.)
234
235       -dout-dir
236              Output  files  to  directory  out-dir, instead of to the current
237              directory.
238
239       -eenv-file
240              Specify address of the tex4ht configuration file tex4ht.env.
241
242       -i     Generate verbose debugging output.
243
244       -mmode Create any new output files with access  mode  as  indicated  by
245              mode.   The  mode  should  be  a  numeric  mode,  as used by the
246              chmod(1) command.
247
248       -Mmode As -m but change all mode of all output files (including  reused
249              bitmaps).
250
251       -p     Do  not  convert pictures (ie, images generated with macros like
252              \Picture, not characters in symbol fonts that will be  automati‐
253              cally converted into a graphic file).
254
255       -r     Do not resuse existing bitmaps of glyphs (for characters in sym‐
256              bol fonts etc), but instead generate all bitmaps anew.
257
258       -Sfilter
259              Restrict system calls requested in the source (La)TeX  files  to
260              utilities  whose  names  have  filter as a prefix.  Use a single
261              asterisk as filter to allow any system calls.
262
263       -Xfield-content
264              Scripts  for  post-processing  of  files  can  be  specified  in
265              tex4ht.env.   If these scripts refer to a field %%3, content for
266              that field can be set with this command-line option.
267
268       -.field-content
269              Scripts for post-processing of groups of files with a particular
270              extension  can  be  specified  in  tex4ht.env.  If these scripts
271              refer to a field %%2, content for that field  can  be  set  with
272              this command-line option.
273

FILES

275       /usr/share/texmf/tex4ht/base/unix/tex4ht.env
276              Configuration  file  for  tex4ht.  This file is commented within
277              the    file,    and    some    additional    notes    are     in
278              /usr/share/doc/tex4ht/README.kpathsea  on a Debian system.  Fur‐
279              ther explanation is available in the HTML documentation.
280
281       /usr/share/texmf/web2c/texmf.cnf
282              Global configuration file for all TeX-related programs using the
283              kpathsea  path  searching  library.  The variables TEX4HTINPUTS,
284              T4HTINPUTS and TEX4HTFONTSET within this  file  relate  to  file
285              searching  within  tex4ht and t4ht.  These variables may also be
286              set         in         the         environment,          outwith
287              /usr/share/texmf/web2c/texmf.cnf.
288
289       /usr/share/texmf/tex4ht/ht-fonts/*.htf
290              Hypertext font files used by tex4ht.
291
292       /usr/share/texmf/tex/generic/tex4ht/tex4ht.sty                      and
293       /usr/share/texmf/tex/generic/tex4ht/*.4ht
294              Macro files used by tex or latex when using tex4ht  to  generate
295              HTML output.
296
297       /usr/share/tex4ht/*
298              Shell scripts for generating different kinds of hypertext output
299              from tex or latex sources.
300

SEE ALSO

302       The use of the tex4ht macros is documented in the HTML documentation at
303       the web site given below.
304
305       tex(1),   latex(1),   amstex(1),   kpsewhich(1),   http://www.cse.ohio-
306       state.edu/~gurari/TeX4ht/mn.html
307

BUGS

309       This manual page is not complete.  Users should refer to the HTML docu‐
310       mentation  for  fuller  details  of  the  configuration options and for
311       details of the use of the tex4ht style files.  tex4ht is still  a  work
312       in  progress,  so  bug  reports and requests are very welcome:  contact
313       Eitan Gurari <gurari@cis.ohio-state.edu>.
314

AUTHOR

316       This   manual   page   was   originally   written   by   Andrew    Gray
317       <ajpg@debian.org>  (and  then  modified  by  Kapil  Paranjape), for the
318       Debian GNU/Linux system (but it may be used by others).
319
320       The tex4ht programs and  macro  files  were  written  by  Eitan  Gurari
321       <gurari@cis.ohio-state.edu>.  The  author  maintains  a  home  page  at
322       http://www.cse.ohio-state.edu/~gurari/TeX4ht/
323
324
325
326
327                                  5 Apr 2005                         TEX4HT(1)
Impressum