File: mn28.html

package info (click to toggle)
tex4ht 19990804-1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 2,384 kB
  • ctags: 799
  • sloc: ansic: 7,653; makefile: 116; sh: 24
file content (136 lines) | stat: -rw-r--r-- 13,537 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
  
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> 
<html  
><head><!--mn28.html from mn.tex (TeX4ht, 1999-03-31 04:46:00)--> 
<title>Unix</title><link 
rel="stylesheet" type="text/css" href="mn.css"></head><body 
>   <a 
 href="mn.html#mn28.html" >exit Unix</a>
    <h3 class="SubSectionHead"><a 
   name="QQ1-28-23"></a>A Setup for Unix Environments</h3>
<!--4648--><p class="noindent">
<OL TYPE="a" >
<LI>Establish a directory `<code><SPAN CLASS="cmtt-10">~/tex4ht.dir</SPAN></code>'.
<!--4652--><p class="indent">    </LI>
<LI>Create a file named `<code><SPAN CLASS="cmtt-10">ht</SPAN></code>' in <code><SPAN CLASS="cmtt-10">tex4ht.dir</SPAN></code> with the following script, and change its access mode to executable (e.g.,
`<code><SPAN CLASS="cmtt-10">chmod 700 ht</SPAN></code>').
<pre class="Verbatim"><SPAN CLASS="cmtt-10"></SPAN><SPAN CLASS="cmtt-10"></SPAN><SPAN CLASS="cmtt-10"></SPAN><SPAN CLASS="cmtt-10"></SPAN><SPAN CLASS="cmtt-10"></SPAN><SPAN CLASS="cmtt-10"></SPAN><SPAN CLASS="cmtt-10"></SPAN><SPAN CLASS="cmtt-10">$1</SPAN><SPAN CLASS="cmtt-10">$2</SPAN><SPAN CLASS="cmtt-10"></SPAN>
<SPAN CLASS="cmtt-10"></SPAN><SPAN CLASS="cmtt-10"></SPAN><SPAN CLASS="cmtt-10"></SPAN><SPAN CLASS="cmtt-10"></SPAN><SPAN CLASS="cmtt-10"></SPAN><SPAN CLASS="cmtt-10"></SPAN><SPAN CLASS="cmtt-10"></SPAN><SPAN CLASS="cmtt-10">$1</SPAN><SPAN CLASS="cmtt-10">$2</SPAN><SPAN CLASS="cmtt-10"></SPAN>
<SPAN CLASS="cmtt-10"></SPAN><SPAN CLASS="cmtt-10"></SPAN><SPAN CLASS="cmtt-10"></SPAN><SPAN CLASS="cmtt-10"></SPAN><SPAN CLASS="cmtt-10"></SPAN><SPAN CLASS="cmtt-10"></SPAN><SPAN CLASS="cmtt-10"></SPAN><SPAN CLASS="cmtt-10">$1</SPAN><SPAN CLASS="cmtt-10">$2</SPAN><SPAN CLASS="cmtt-10"></SPAN>
<SPAN CLASS="cmtt-10"></SPAN><SPAN CLASS="cmtt-10"></SPAN><SPAN CLASS="cmtt-10"></SPAN><SPAN CLASS="cmtt-10"></SPAN><SPAN CLASS="cmtt-10"></SPAN><SPAN CLASS="cmtt-10"></SPAN><SPAN CLASS="cmtt-10"></SPAN><SPAN CLASS="cmtt-10">tex4ht</SPAN><SPAN CLASS="cmtt-10">$2</SPAN><SPAN CLASS="cmtt-10"></SPAN>
<SPAN CLASS="cmtt-10"></SPAN><SPAN CLASS="cmtt-10"></SPAN><SPAN CLASS="cmtt-10"></SPAN><SPAN CLASS="cmtt-10"></SPAN><SPAN CLASS="cmtt-10"></SPAN><SPAN CLASS="cmtt-10"></SPAN><SPAN CLASS="cmtt-10"></SPAN><SPAN CLASS="cmtt-10">t4ht</SPAN><SPAN CLASS="cmtt-10">$2</SPAN><SPAN CLASS="cmtt-10"></SPAN><SPAN CLASS="cmtt-10">$3</SPAN><SPAN CLASS="cmtt-10"></SPAN>
</pre>
<!--4667--><p class="indent">    </LI>
<LI>Download, and <a 
 href="http://www.cdrom.com/pub/infozip/" >unzip</a> when needed, the following files into directory <code><SPAN CLASS="cmtt-10">tex4ht.dir</SPAN></code>.
<!--4670--><p class="indent">
<OL TYPE="1" >
<LI><a 
 href="http://www.cis.ohio-state.edu/~gurari/TeX4ht/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="http://www.cis.ohio-state.edu/~gurari/TeX4ht/share/all4ht/" >*.4ht</a>) </LI>
<LI><a 
 href="http://www.cis.ohio-state.edu/~gurari/TeX4ht/share/tex4ht.env" >tex4ht.env</a></LI>
<LI><a 
 href="http://www.cis.ohio-state.edu/~gurari/TeX4ht/share/tex4ht.c" >tex4ht.c</a> </LI>
<LI><a 
 href="http://www.cis.ohio-state.edu/~gurari/TeX4ht/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="http://www.cis.ohio-state.edu/~gurari/TeX4ht/share/ht-fonts/" >ht-fonts</a>) </LI>
<LI><a 
 href="http://www.cis.ohio-state.edu/~gurari/TeX4ht/share/htfcss.env" >htfcss.env</a></LI>
<LI><a 
 href="http://www.cis.ohio-state.edu/~gurari/TeX4ht/share/test.tex"  name="test" >test.tex</a> </LI></OL>
    The above files are also available in a single <a 
 href="mn29.html"  name="mn29.html" >zipped file</a>.
<!--4779--><p class="indent">    </LI>
<LI>Replace in <code><SPAN CLASS="cmtt-10">tex4ht.env</SPAN></code> the line(s) starting with the character `<code><SPAN CLASS="cmtt-10">t</SPAN></code>', with alternative lines which state what directories
should be searched for tfm files of TeX and LaTeX. The directory names must be preceded with the character `<code><SPAN CLASS="cmtt-10">t</SPAN></code>' at
column 1 and, if their subdirectories are also to be searched, the names should be appended with the character
`<code><SPAN CLASS="cmtt-10">!</SPAN></code>'.
<!--4788--><p class="indent">    </LI>
<LI>Replace in <code><SPAN CLASS="cmtt-10">tex4ht.env</SPAN></code> the line(s) starting with the character `<code><SPAN CLASS="cmtt-10">i</SPAN></code>', with alternative lines which state what directories
should be searched for htf files of TeX4ht. The directory names must be preceded with the character `<code><SPAN CLASS="cmtt-10">i</SPAN></code>' at column
1. If the subdirectories are also to be searched, the names should be appended with the character
`<code><SPAN CLASS="cmtt-10">!</SPAN></code>'.
<!--4797--><p class="indent">    </LI>
<LI>The entry `<code><SPAN CLASS="cmtt-10">Hcandy/tex4ht.dir/</SPAN></code>' in <code><SPAN CLASS="cmtt-10">tex4ht.env</SPAN></code> indicates the absolute address of the directory where the file
<code><SPAN CLASS="cmtt-10">htfcss.env</SPAN></code> resides. Modify that entry to fit your platform. The character `<code><SPAN CLASS="cmtt-10">H</SPAN></code>' should preced the address, and be
placed at the first column.
<!--4803--><p class="indent">    </LI>
<LI>The entry `<code><SPAN CLASS="cmtt-10">dcandy/tex4ht.dir/</SPAN></code>' in <code><SPAN CLASS="cmtt-10">tex4ht.env</SPAN></code> indicates the directory where the file <a 
 href="mn30.html"  name="mn30.html" >tex4ht.fls</a> should reside. Modify that entry to fit your platform. The character `<code><SPAN CLASS="cmtt-10">d</SPAN></code>' should precede the address, and be
placed at the first column. If this entry is omitted, the work directory is assumed.
<!--4815--><p class="indent">    </LI>
<LI>The file <code><SPAN CLASS="cmtt-10">tex4ht.env</SPAN></code> 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><SPAN CLASS="cmtt-10">-mode</SPAN><SPAN CLASS="cmtt-10">ibmvga</SPAN><SPAN CLASS="cmtt-10">-D</SPAN><SPAN CLASS="cmtt-10">110</SPAN><SPAN CLASS="cmtt-10">-f</SPAN><SPAN CLASS="cmtt-10">%%1</SPAN><SPAN CLASS="cmtt-10">-pp</SPAN><SPAN CLASS="cmtt-10">%%2</SPAN><SPAN CLASS="cmtt-10"></SPAN><SPAN CLASS="cmtt-10">&gt;</SPAN><SPAN CLASS="cmtt-10">tex4ht.ps</SPAN><SPAN CLASS="cmtt-10"></SPAN>
<SPAN CLASS="cmtt-10">Gconvert</SPAN><SPAN CLASS="cmtt-10">-crop</SPAN><SPAN CLASS="cmtt-10">0x0</SPAN><SPAN CLASS="cmtt-10">-density</SPAN><SPAN CLASS="cmtt-10">110x110</SPAN><SPAN CLASS="cmtt-10">-transparency</SPAN><SPAN CLASS="cmtt-10">'#FFFFFF'</SPAN><SPAN CLASS="cmtt-10">tex4ht.ps</SPAN><SPAN CLASS="cmtt-10">%%3</SPAN><SPAN CLASS="cmtt-10"></SPAN>
</pre>
<!--4825--><p class="indent">    The <code><SPAN CLASS="cmtt-10">%%1</SPAN></code> is a parameter referring to a dvi file, the <code><SPAN CLASS="cmtt-10">%%2</SPAN></code> is a parameter indicating a page number, and the <code><SPAN CLASS="cmtt-10">%%3</SPAN></code> is a
parameter standing for an output file name.
<!--4829--><p class="indent">    You may need to 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 `<code><SPAN CLASS="cmtt-10">G</SPAN></code>'
at the first column.
<!--4852--><p class="indent">    The <a 
 href="http://www.radicaleye.com/dvips.html" >dvips</a> utility translates dvi files into postscript. The <code><SPAN CLASS="cmtt-10">convert</SPAN></code> utility, provided within the distribution of
<a 
 href="http://www.wizards.dupont.com/cristy/www/archives.html" >ImageMagick</a>, translates postscript files into gif.
<!--4858--><p class="indent">    The script employs the Metafont mode `<code><SPAN CLASS="cmtt-10">ibmvga</SPAN></code>' of resolution `<code><SPAN CLASS="cmtt-10">110</SPAN></code>'; the available modes are listed in file
<code><SPAN CLASS="cmtt-10">modes.mf</SPAN></code> of Metafont.
<!--4862--><p class="indent">    </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.
<!--4878--><p class="indent">    </LI>
<LI><a 
 href="#mvscript"></a>If needed, replace the scripts `<code><SPAN CLASS="cmtt-10">Mmv %%1 %%2%%3</SPAN></code>' and `<code><SPAN CLASS="cmtt-10">Ccp %%1 %%2%%3</SPAN></code>' in <code><SPAN CLASS="cmtt-10">tex4ht.env</SPAN></code> with alternative scripts for
moving and copying files. The parameter <code><SPAN CLASS="cmtt-10">%%1</SPAN></code> stands for the source file(s), the parameter <code><SPAN CLASS="cmtt-10">%%2</SPAN></code> provides the target
directory name, and the parameter <code><SPAN CLASS="cmtt-10">%%3</SPAN></code> refers to the target file name(s).
<!--4901--><p class="indent">    </LI>
<LI><a 
 href="#accscript"></a>If needed, replace the script `<code><SPAN CLASS="cmtt-10">Achmod %%1 %%2%%3</SPAN></code>' in <code><SPAN CLASS="cmtt-10">tex4ht.env</SPAN></code> with an alternative script for changing access
mode of files. The parameter <code><SPAN CLASS="cmtt-10">%%1</SPAN></code> stands for access mode, the parameter <code><SPAN CLASS="cmtt-10">%%2</SPAN></code> refers to a directory name, and the
parameter <code><SPAN CLASS="cmtt-10">%%3</SPAN></code> refers to file(s).
<!--4910--><p class="indent">    </LI>
<LI>Copy the C program <code><SPAN CLASS="cmtt-10">tex4ht.c</SPAN></code> into a temporary directory, compile it into an executable <code><SPAN CLASS="cmtt-10">tex4ht</SPAN></code> file with a
command similar to the following one, and then move the outcome file <code><SPAN CLASS="cmtt-10">tex4ht</SPAN></code> to directory <code><SPAN CLASS="cmtt-10">tex4ht.dir</SPAN></code>. <code><SPAN CLASS="cmtt-10">XXX</SPAN></code> stands
for the absolute path to the home directory.
<!--4919--><p class="indent">    <code><SPAN CLASS="cmtt-10">cc -o tex4ht tex4ht.c -DENVFILE='&#34;XXX/tex4ht.dir/tex4ht.env&#34;' -DHTFDIR='&#34;XXX/tex4ht.dir&#34;'</SPAN>
<SPAN CLASS="cmtt-10">-DHAVE_DIRENT_H</SPAN></code>
<!--4927--><p class="indent">    </LI>
<LI>Copy the C program <code><SPAN CLASS="cmtt-10">t4ht.c</SPAN></code> into a temporary directory, compile it with a command similar to following one, and
move the outcome to directory <code><SPAN CLASS="cmtt-10">t4x4ht.dir</SPAN></code>.
<!--4931--><p class="indent">    <code><SPAN CLASS="cmtt-10">cc -o t4ht t4ht.c -DENVFILE='&#34;XXX/tex4ht.dir/tex4ht.env&#34;'</SPAN></code>
<!--4934--><p class="indent">    </LI>
<LI>Create a work directory, and set there soft links to the files of directory <code><SPAN CLASS="cmtt-10">tex4ht.dir</SPAN></code> (for instance, issue the
system command `<code><SPAN CLASS="cmtt-10">ln -s XXX/* .</SPAN></code>' in your work directory, where <code><SPAN CLASS="cmtt-10">XXX</SPAN></code> stands for the path to directory
<code><SPAN CLASS="cmtt-10">text4ht.dir</SPAN></code>).
<!--4939--><p class="indent">    A more general approach would be to make the files of <code><SPAN CLASS="cmtt-10">tex4ht.dir</SPAN></code> globally known, for instance, by including
lines similar to the following ones in the `<code><SPAN CLASS="cmtt-10">.login</SPAN></code>' file.
<pre class="Verbatim"><SPAN CLASS="cmtt-10">set</SPAN><SPAN CLASS="cmtt-10">path=(~/bin.$HOSTTYPE</SPAN><SPAN CLASS="cmtt-10">~/tex4ht.dir//)</SPAN><SPAN CLASS="cmtt-10"></SPAN>
<SPAN CLASS="cmtt-10">setenv</SPAN><SPAN CLASS="cmtt-10">TEXINPUTS</SPAN><SPAN CLASS="cmtt-10">.:~/tex4ht.dir//:candy/tex/texmf/tex//</SPAN><SPAN CLASS="cmtt-10"></SPAN>
</pre>
<!--4964--><p class="indent">    </LI>
<LI>Consider creating a web directory where the output files would be stored for viewing by browsers. The directory can
be made globally accessible by changing its access mode to 711.
<!--4969--><p class="indent">    </LI>
<LI>Move <code><SPAN CLASS="cmtt-10">test.tex</SPAN></code> to your work directory, and compile the file with the command `<code><SPAN CLASS="cmtt-10">ht tex test '-dXXX -m644'</SPAN></code>' or
`<code><SPAN CLASS="cmtt-10">ht latex test '-dXXX -m644'</SPAN></code>'.
<!--4975--><p class="indent">    If you use commands different than <code><SPAN CLASS="cmtt-10">tex</SPAN></code> or <code><SPAN CLASS="cmtt-10">latex</SPAN></code> for compiling source files, uncomment the first line `<code><SPAN CLASS="cmtt-10">%</SPAN>
<SPAN CLASS="cmtt-10">\def\CALL{{tex}{latex}}</SPAN></code>' within <code><SPAN CLASS="cmtt-10">test.tex</SPAN></code>, and place there the correct command names.

<!--5279--><p class="indent">    The <code><SPAN CLASS="cmtt-10">XXX</SPAN></code> stands for the path to the web directory. If the web directory is the same as the work
directory, the component <code><SPAN CLASS="cmtt-10">-dXXX</SPAN></code> can be omitted. Otherwise, the definition <code><SPAN CLASS="cmtt-10">\def\WWW{XXX}</SPAN></code> must be
inserted at the start of <code><SPAN CLASS="cmtt-10">test.tex</SPAN></code>. The component <code><SPAN CLASS="cmtt-10">-m644</SPAN></code> requests a change of access mode for public
view.
<!--5288--><p class="indent">    You might want to compare your output with the sample output provided in this document for <a 
 href="test.html" TARGET="test" >TeX</a> and
<a 
 href="testa.html" TARGET="test" >LaTeX</a>.
    </LI></OL>
     
</body> 
</html>