File: mn30.html

package info (click to toggle)
tex4ht 20011214-2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 8,272 kB
  • ctags: 992
  • sloc: xml: 17,548; ansic: 9,389; makefile: 129; sh: 43; sed: 8
file content (200 lines) | stat: -rw-r--r-- 16,560 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
<?xml version="1.0"?> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
<html xmlns="http://www.w3.org/TR/xhtml1/transitional"  
> 
<head><title>Unix</title> 
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> 
<meta name="generator" content="TeX4ht (http://www.cis.ohio-state.edu/~gurari/TeX4ht/mn.html)" /> 
<!--xhtml,th4,index--> 
<meta name="src" content="mn.tex" /> 
<meta name="date" content="2001-02-28 17:02:00" /> 
<link rel="stylesheet" type="text/css" href="mn.css" /> 
</head><body 
>
    <a 
 href="mn.html#mn30.html" >exit Unix</a>
    <h3 class="SubSectionHead"><a 
   name="QQ1-30-31"></a>A Setup for Unix Environments</h3>
    <p align="right" 
class="rightline"><span class="cmbx-10">Download the Files</span></p>
<ol type="a" >
<li>Establish a directory &#8216;<span class="cmti-10">path</span><span class="cmtt-10">/tex4ht.dir</span>&#8217;.
<!--l. 4528--><p class="noindent"></p></li>
<li> <a 
   name="index30-31001"></a>Download, and <a 
 href="ftp://ftp.freesoftware.com/pub/infozip/zip.html" >unzip</a> when needed, the following files into the directory <span class="cmtt-10">tex4ht.dir</span>.
<!--l. 4533--><p class="indent">
</p><ol type="1" >
<li><a 
 href="share/tex4ht.sty" >tex4ht.sty</a></li>
<li><a 
 href="http://www.cis.ohio-state.edu/~gurari/TeX4ht/share/all4ht.zip" >all4ht.zip</a> (<a 
 href="share/all4ht/" >*.4ht</a>) </li>
<li> <a 
 href="share/tex4ht.env" >tex4ht.env</a></li>
<li><a 
 href="share/tex4ht.c" >tex4ht.c</a> </li>
<li><a 
 href="share/t4ht.c" >t4ht.c</a> </li>
<li><a 
 href="http://www.cis.ohio-state.edu/~gurari/TeX4ht/share/ht-fonts.zip" >ht-fonts.zip</a> (<a 
 href="share/ht-fonts/" >ht-fonts</a>) </li>
<li> <a 
 href="share/htlatex" >htlatex</a></li>
<li> <a 
 href="share/httex" >httex</a></li>
<li> <a 
 href="share/httexi" >httexi</a></li>
<li> <a 
 href="share/ht" >ht</a></li>
<li><a 
 href="share/testa.tex"  name="testa" >testa.tex</a>, <a 
 href="share/testb.tex"  name="testb" >testb.tex</a> </li></ol>The above files are also available zipped together into a single file named <span class="cmtt-10">ufiles.zip </span>(<a 
 href="http://www.cis.ohio-state.edu/~gurari/TeX4ht/ufiles.zip" >osu</a>,
<a 
 href="http://www.tug.org/applications/tex4ht/ufiles.zip" >tug</a>).<sup>[<a 
 href="ftp://ftp.freesoftware.com/pub/infozip/zip.html" >unzip</a>]</sup>

    <p align="right" 
class="rightline"><span class="cmbx-10">Compile the Postprocessors</span></p>
<!--l. 4674--><p class="noindent"></p></li>
<li>Copy <span class="cmtt-10">tex4ht.c </span>and <span class="cmtt-10">t4ht.c </span>into a temporary directory </li>
<li> <a 
   name="index30-31002"></a> <a 
   name="index30-31003"></a>Compile <span class="cmtt-10">tex4ht.c </span>into an executable <span class="cmtt-10">tex4ht </span>file with a command similar to the following one, where &#8216;<span class="cmtt-10">path</span>&#8217;
stands for the absolute path to directory <span class="cmtt-10">tex4ht.dir</span>.
<!--l. 4686--><p class="indent">    <span class="cmtt-10">cc -o tex4ht tex4ht.c -DENVFILE='&#34;path/tex4ht.dir/tex4ht.env&#34;' -DHAVE_DIRENT_H</span>
</p><!--l. 4690--><p class="indent">    The switch &#8216;<span class="cmtt-10">-DENVFILE='&#34;path/tex4ht.dir/tex4ht.env&#34;'</span>&#8217; may be omitted, if the program can reach the
environment file in an <a 
 href="mn39.html#envloc">alternative</a> manner.
</p><!--l. 4699--><p class="noindent"></p></li>
<li>Compile <span class="cmtt-10">t4ht.c </span>with a command similar to following one, where &#8216;<span class="cmtt-10">path</span>&#8217; stands for the absolute path to directory
<span class="cmtt-10">tex4ht.dir</span>.
<!--l. 4705--><p class="indent">    <span class="cmtt-10">cc -o t4ht t4ht.c -DENVFILE='&#34;path/tex4ht.dir/tex4ht.env&#34;'</span>
</p><!--l. 4707--><p class="indent">    Again, the switch &#8216;<span class="cmtt-10">-DENVFILE='&#34;path/tex4ht.dir/tex4ht.env&#34;'</span>&#8217; may be omitted, if the program can reach
the environment file in an <a 
 href="mn39.html#envloc">alternative</a> manner.
</p><!--l. 4713--><p class="noindent"></p></li>
<li>Move the executable files <span class="cmtt-10">tex4ht </span>and <span class="cmtt-10">t4ht </span>to directory <span class="cmtt-10">tex4ht.dir</span>. <p align="right" 
class="rightline"><span class="cmbx-10">Update the Pointers in the Environment File</span></p>
</li>
<li> <a 
   name="index30-31004"></a> <a 
   name="index30-31005"></a>Replace in <span class="cmtt-10">tex4ht.env </span>the line(s) starting with the character &#8216;<span class="cmtt-10">t</span>&#8217;, with alternative lines which state what
directories should be searched for the tfm files of TeX and LaTeX. The directory names must be preceded with the
character &#8216;<span class="cmtt-10">t</span>&#8217; at column 1 and, if their subdirectories are also to be searched, the names should be appended with the
character &#8216;<span class="cmtt-10">!</span>&#8217;.
<!--l. 4730--><p class="indent">    Under <a 
 href="mn43.html#alt-tfm">some settings</a>, the &#8216;<span class="cmtt-10">t</span>&#8217; records may use relative addresses or be omitted.
</p><!--l. 4733--><p class="noindent"></p></li>
<li>Replace in <span class="cmtt-10">tex4ht.env </span>the line(s) starting with the character &#8216;<span class="cmtt-10">i</span>&#8217;, with alternative lines which state what directories
should be searched for the htf files of TeX4ht. The directory names must be preceded with the character &#8216;<span class="cmtt-10">i</span>&#8217; at
column 1. If the subdirectories are also to be searched, the names should be appended with the character
&#8216;<span class="cmtt-10">!</span>&#8217;.

<!--l. 4742--><p class="indent">    Under <a 
 href="mn45.html#alt-htf">some settings</a>, the &#8216;<span class="cmtt-10">i</span>&#8217; records may use relative addresses or be omitted.
</p><!--l. 4746--><p class="noindent"></p></li>
<li> <a 
   name="index30-31006"></a>The entry &#8216;<span class="cmtt-10">lpath/tex4ht.dir/filename</span>&#8217; in <span class="cmtt-10">tex4ht.env </span>points to the address where the <a 
 href="mn42.html#TEX4HTWR">bookkeeping file</a> should
reside. The entry should include the full path to the address of the bookkeeping file. Modify that entry to fit your
platform. The character &#8216;<span class="cmtt-10">l</span>&#8217; should precede the address, and be placed at the first column. Make sure the access
mode of the directory permits writing into files.
    <p align="right" 
class="rightline"><span class="cmbx-10">Update the Bitmap Generating Scripts in the Environment File</span></p>
<!--l. 4761--><p class="noindent"></p></li>
<li> <a 
   name="index30-31007"></a> <a 
   name="index30-31008"></a>The file <span class="cmtt-10">tex4ht.env </span>contains the following default script, of calls to system utilities for translating dvi pictures
into gif.<a 
   name="dv2gif"></a>
<pre class="Verbatim"><span class="cmtt-10">Gdvips</span>&nbsp;<span class="cmtt-10">-Pcmz</span>&nbsp;<span class="cmtt-10">-Pamz</span>&nbsp;<span class="cmtt-10">-mode</span>&nbsp;<span class="cmtt-10">ibmvga</span>&nbsp;<span class="cmtt-10">-D</span>&nbsp;<span class="cmtt-10">110</span>&nbsp;<span class="cmtt-10">-f</span>&nbsp;<span class="cmtt-10">%%1</span>&nbsp;<span class="cmtt-10">-pp</span>&nbsp;<span class="cmtt-10">%%2</span>&nbsp;&nbsp;<span class="cmtt-10">&gt;</span>&nbsp;<span class="cmtt-10">zz%%4.ps</span>&nbsp;
<span class="cmtt-10">Ggs</span>&nbsp;<span class="cmtt-10">-sDEVICE=ppm</span>&nbsp;<span class="cmtt-10">-sOutputFile=zz%%4.ppm</span>&nbsp;<span class="cmtt-10">-q</span>&nbsp;<span class="cmtt-10">-dbatch</span>&nbsp;<span class="cmtt-10">-dNOPAUSE</span>&nbsp;<span class="cmtt-10">zz%%4.ps</span>&nbsp;<span class="cmtt-10">-c</span>&nbsp;<span class="cmtt-10">quit</span>&nbsp;
<span class="cmtt-10">Gconvert</span>&nbsp;<span class="cmtt-10">-crop</span>&nbsp;<span class="cmtt-10">0x0</span>&nbsp;<span class="cmtt-10">-density</span>&nbsp;<span class="cmtt-10">110x110</span>&nbsp;<span class="cmtt-10">-transparency</span>&nbsp;<span class="cmtt-10">'#FFFFFF'</span>&nbsp;<span class="cmtt-10">zz%%4.ppm</span>&nbsp;<span class="cmtt-10">%%3</span>&nbsp;
<span class="cmtt-10">Grm</span>&nbsp;<span class="cmtt-10">zz%%4.ps</span>&nbsp;
<span class="cmtt-10">Grm</span>&nbsp;<span class="cmtt-10">zz%%4.ppm</span>&nbsp;
</pre>
<!--l. 4776--><p class="indent">    The entry <span class="cmtt-10">%%1 </span>is a parameter refering to a dvi file, the <span class="cmtt-10">%%2 </span>is a parameter indicating a page number, the <span class="cmtt-10">%%3 </span>is
a parameter standing for an output file name, and <span class="cmtt-10">%%4 </span>is a parameter providing the jobname.
</p><!--l. 4781--><p class="indent">    The command line options &#8216;<span class="cmtt-10">-Pcmz -Pamz</span>&#8217; of dvips requests type 1 postscript format for the standard Computer
Modern fonts of TeX. Such a format improves the bitmap quality of the glyphs.
</p><!--l. 4785--><p class="indent">    You may replace this script with an <a 
 href="mn31.html"  name="mn31.html" >alternative sequence</a> of system calls. In such a case, place one command per line, and mark each of these lines with the character &#8216;<span class="cmtt-10">G</span>&#8217;
at the first column.
</p><!--l. 4811--><p class="indent">    The <a 
 href="http://www.radicaleye.com/dvips.html" >dvips</a> utility translates dvi files into postscript. The <span class="cmtt-10">convert </span>utility, provided within the distribution of
<a 
 href="http://www.imagemagick.org/" >ImageMagick</a>, translates postscript files into gif.
</p><!--l. 4817--><p class="indent">    The script employs the Metafont mode &#8216;<span class="cmtt-10">ibmvga</span>&#8217; of resolution &#8216;<span class="cmtt-10">110</span>&#8217;; the available modes are listed in file
<span class="cmtt-10">modes.mf </span>of Metafont.
</p><!--l. 4821--><p class="noindent"></p></li>
<li>Instead of employing the G scripts, glyphs can rely on specialized <a 
 href="mn32.html"  name="mn32.html" >F scripts</a> of similar nature for creating gifs.
    <p align="right" 
class="rightline"><span class="cmbx-10">Update the Other Scripts in the Environment File</span></p>
<!--l. 4845--><p class="noindent"></p></li>
<li><a 
 href="#mvscript"></a>If needed, replace the scripts &#8216;<span class="cmtt-10">Mmv %%1 %%2%%3</span>&#8217; and &#8216;<span class="cmtt-10">Ccp %%1 %%2%%3</span>&#8217; in <span class="cmtt-10">tex4ht.env </span>with alternative scripts for
moving and copying files. The parameter <span class="cmtt-10">%%1 </span>stands for the source file(s), the parameter <span class="cmtt-10">%%2 </span>provides the target
directory name, and the parameter <span class="cmtt-10">%%3 </span>refers to the target file name(s).
<!--l. 4868--><p class="noindent"></p></li>
<li><a 
 href="#accscript"></a>If needed, replace the script &#8216;<span class="cmtt-10">Achmod %%1 %%2%%3</span>&#8217; in <span class="cmtt-10">tex4ht.env </span>with an alternative script for changing access
mode of files. The parameter <span class="cmtt-10">%%1 </span>stands for access mode, the parameter <span class="cmtt-10">%%2 </span>refers to a directory name, and the
parameter <span class="cmtt-10">%%3 </span>refers to file(s).
<!--l. 4875--><p class="noindent"></p></li>
<li> <a 
   name="index30-31009"></a>Postprocessing of files can be requested with &#8216;<span class="cmtt-10">X</span>&#8217; scripts. The file names are accessed through the
parameter &#8216;<span class="cmtt-10">%%1</span>&#8217;, and their extensions through the parameter &#8216;<span class="cmtt-10">%%2</span>&#8217;. Consider setting a &#8216;<span class="cmtt-10">X</span>&#8217; script for
<a 
 href="mn33.html"  name="mn33.html" >validation</a> and other applications.
    <p align="right" 
class="rightline"><span class="cmbx-10">Set the Script Files</span></p> </li>
<li> <a 
   name="index30-31010"></a>  <a 
   name="index30-31011"></a> Replace the 3 occurences of <span class="cmtt-10">path </span>in <span class="cmtt-10">htlatex</span>, <span class="cmtt-10">httex</span>, and <span class="cmtt-10">httexi </span>with the absolute path name to where
<span class="cmtt-10">tex4ht.dir </span>resides. </li>
<li>If you use a command different than <span class="cmtt-10">latex </span>for compiling LaTeX source files, replace the 3 occurences of <span class="cmtt-10">latex </span>in
<span class="cmtt-10">htlatex </span>with the appropriate command name. Similarly, if you use a command different than <span class="cmtt-10">tex </span>for compiling
TeX source files, replace the 3 occurences of <span class="cmtt-10">tex </span>in <span class="cmtt-10">httex </span>and in <span class="cmtt-10">httexi </span>with the appropriate command name.
</li>
<li> <a 
   name="index30-31012"></a>Change the access modes of <span class="cmtt-10">htlatex</span>, <span class="cmtt-10">httex</span>, <span class="cmtt-10">httexi</span>, and <span class="cmtt-10">ht </span>to executable (e.g., &#8216;<span class="cmtt-10">chmod 700 htlatex</span>&#8217;).
</li>
<li>Consider creating a web directory where the output files would be stored for viewing by the browsers. The directory
can be made world wide accessible by changing its access mode to 711. If you create such a directory, add the
switches <span class="cmtt-10">-d</span><span class="cmti-10">dir </span><span class="cmtt-10">-m644 </span>to the command line <span class="cmtt-10">t4ht </span>within the scripts <span class="cmtt-10">htlatex</span>, <span class="cmtt-10">httex </span>, <span class="cmtt-10">httexi</span>, and <span class="cmtt-10">ht</span>, where <span class="cmti-10">dir </span>is
the address of the web directory. </li>
<li>Add <a 
 href="mn68.html#scripts">htlatex-like</a> of your liking to to your environment. <p align="right" 
class="rightline"><span class="cmbx-10">Make the System Globally Known</span></p> </li>
<li>Inform the operating system where the scripts reside, say, by adding the directory &#8216;<span class="cmti-10">path</span><span class="cmtt-10">/tex4ht.dir</span>&#8217; into the <span class="cmtt-10">path</span>
variable within the <span class="cmtt-10">.login </span>file. For instance,
<!--l. 4970--><p class="indent">    <span class="cmtt-10">set path=($path ~/tex4ht.dir)</span>
</p><!--l. 4972--><p class="indent">    Alternatively, make soft links from your work directory to the script files <span class="cmtt-10">htlatex</span>, <span class="cmtt-10">ht</span>, and so forth.
</p></li>
<li>Let LaTeX and TeX know where the new style files reside, by adding the directory &#8216;<span class="cmti-10">path</span><span class="cmtt-10">/tex4ht.dir</span>&#8217; to the
environment variable <span class="cmtt-10">TEXINPUT</span>. For instance,
<!--l. 4979--><p class="indent">    <span class="cmtt-10">setenv TEXINPUTS .:~/tex4ht.dir//:/usr/local/share/texmf/tex//</span>
</p><!--l. 4981--><p class="indent">    Alternatively, make soft links from your work directory to the files <span class="cmtt-10">*.4ht </span>and <span class="cmtt-10">tex4ht.sty</span>.
</p><!--l. 4986--><p class="noindent"></p></li>
<li>If your TeX system uses a database to locate files, make sure to refresh it (e.g., run texhash for kpathsea).
    <p align="right" 
class="rightline"><span class="cmbx-10">Test the Installation</span></p> </li>
<li>Move <span class="cmtt-10">testa.tex </span>and <span class="cmtt-10">testb.tex </span>to your work directory </li>
<li>Compile &#8216;<span class="cmtt-10">testa.tex</span>&#8217; with the command &#8216;<span class="cmtt-10">ht latex testa</span>&#8217; </li>
<li>Compile &#8216;<span class="cmtt-10">testb.tex</span>&#8217; with the command &#8216;<span class="cmtt-10">htlatex testb</span>&#8217; </li>
<li> <a 
   name="index30-31013"></a>If you care about MathML output, download the files <a 
 href="http://www.tex.ac.uk/tex-archive/macros/latex/required/amslatex/math/testmath.tex" >testmath.tex</a> and <a 
 href="http://www.cis.ohio-state.edu/~gurari/TeX4ht/mathml/testmath.cfg" >testmath.cfg</a>, issue the command &#8216;<a 
 href="mn68.html#scripts"><span class="cmtt-10">mzlatex</span>
<span class="cmtt-10">testmath &#34;testmath&#34;</span></a>&#8217;, and compare the outcome with <a 
 href="http://www.cis.ohio-state.edu/~gurari/TeX4ht/mathml/testmath.xml" >testmath.xml</a>.

    </li></ol>

     
</body></html>