diff options
Diffstat (limited to 'support/TeX4ht/doc/mn-upgrade.html')
-rw-r--r-- | support/TeX4ht/doc/mn-upgrade.html | 185 |
1 files changed, 185 insertions, 0 deletions
diff --git a/support/TeX4ht/doc/mn-upgrade.html b/support/TeX4ht/doc/mn-upgrade.html new file mode 100644 index 0000000000..be9b792be6 --- /dev/null +++ b/support/TeX4ht/doc/mn-upgrade.html @@ -0,0 +1,185 @@ +<?xml version="1.0" encoding="iso-8859-1" ?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<!--http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd--> +<html xmlns="http://www.w3.org/1999/xhtml" +> +<head><title>upgrade</title> +<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> +<meta name="generator" content="TeX4ht (https://tug.org/tex4ht/)" /> +<meta name="originator" content="TeX4ht (https://tug.org/tex4ht/)" /> +<!-- xhtml,th4,index --> +<meta name="src" content="mn.tex" /> +<link rel="stylesheet" type="text/css" href="mn.css" /> +<meta name="viewport" content="width=device-width, initial-scale=1" /> +</head><body +> + <a + href="mn.html#mn26.html" >exit upgrade</a> + <h3 class="SubSectionHead"><a + name="QQ1-26-68"></a>TeX4ht Upgrading</h3> + At present, the only practical way to update TeX4ht is via a distribution. Runtime files continue to be updated +in ¡a href=”/texlive/”¿TeX Live¡/a¿, so if you’re using TL, you can get those with ¡tt¿tlmgr update¡/tt¿. We don’t +know if MiKTeX picks up the same updates. +<!--l. 6970--><p class="indent" > There has been no new full release since Eitan’s death; still a work in progress. +</p><!--l. 6973--><p class="indent" > For the upstream tex4ht source repository where the work is being done, see the <a + href="/tex4ht/" >tex4ht home +page</a>. +</p> + <h3 class="SubSectionHead"><a + name="QQ1-26-69"></a>A Setup for Unix Environments</h3> +<ol type="a" > +<li>Establish a directory, say, ‘<span class="cmtt-10">~/tex4ht.dir</span>’. +<!--l. 6982--><p class="noindent" ></p></li> +<li> <a + name="index26-69001"></a>Download the file <a + href="tex4ht.zip" >tex4ht.zip</a> into the directory <span class="cmtt-10">tex4ht.dir </span>and unzip it. + <p class="rightline"><span class="cmbx-10">Compile the Postprocessors</span></p> +<!--l. 7008--><p class="noindent" ></p></li> +<li> <a + name="index26-69002"></a> <a + name="index26-69003"></a>Compile <span class="cmtt-10">~/tex4ht.dir/src/tex4ht.c </span>into an executable <span class="cmtt-10">tex4ht </span>file with a command similar to the following +one. +<!--l. 7016--><p class="indent" > <span class="cmtt-10">gcc -o tex4ht tex4ht.c -DENVFILE=’"~/tex4ht.dir/texmf/tex4ht/base/unix/tex4ht.env"’</span> +<span class="cmtt-10">-DHAVE_DIRENT_H</span> +</p><!--l. 7021--><p class="indent" > The switch ‘<span class="cmtt-10">-DENVFILE=’"~/tex4ht.dir/texmf/tex4ht/base/unix/tex4ht.env"’</span>’ may be omitted, if the +program can reach the environment file in an <a + href="mn32.html#envloc">alternative</a> manner. +</p><!--l. 7031--><p class="noindent" ></p></li> +<li>Compile <span class="cmtt-10">~/tex4ht.dir/src/t4ht.c </span>with a command similar to following one. +<!--l. 7036--><p class="indent" > <span class="cmtt-10">gcc -o t4ht t4ht.c -DENVFILE=’"~/tex4ht.dir/texmf/tex4ht/base/unix/tex4ht.env"’</span> +</p><!--l. 7039--><p class="indent" > Again, the switch ‘<span class="cmtt-10">-DENVFILE=’"~/tex4ht.dir/texmf/tex4ht/base/unix/tex4ht.env"’</span>’ may be omitted, if +the program can reach the environment file in an <a + href="mn32.html#envloc">alternative</a> manner. +</p><!--l. 7047--><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/bin/unix/</span>. +<p class="rightline"><span class="cmbx-10">Update the Pointers in the Environment File</span></p> </li> +<li> <a + name="index26-69004"></a> <a + name="index26-69005"></a>Replace in <a + href="tex4ht-env-unix.txt" ><span class="cmtt-10">~/tex4ht.dir/texmf/tex4ht/base/unix/tex4ht.env</span></a> the line(s) starting with the character ‘<span class="cmtt-10">t</span>’, 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 ‘<span class="cmtt-10">t</span>’ at column 1 and, if their subdirectories are also to be searched, the +names should be appended with the character ‘<span class="cmtt-10">!</span>’ (<a + href="mn36.html#alt-tfm">insight</a>). +<!--l. 7066--><p class="noindent" ></p></li> + +<li> <a + name="index26-69006"></a>If needed, adjust the paths in the ‘<span class="cmtt-10">i</span>’ records of <span class="cmtt-10">tex4ht.env</span>. These records are used for searching htf fonts, and +they are similar to the ‘<span class="cmtt-10">t</span>’ (<a + href="mn40.html#alt-htf">insight</a>). +<!--l. 7075--><p class="noindent" ></p></li> +<li> <a + name="index26-69007"></a>The entry ‘<span class="cmtt-10">l~/tex4ht.dir/filename</span>’ in <span class="cmtt-10">tex4ht.env </span>points to the address where the <a + href="mn35.html#TEX4HTWR">bookkeeping file</a> +should reside. Modify the path to fit your platform. The character ‘<span class="cmtt-10">l</span>’ should precede the address, +and be placed at the first column. Make sure the access mode of the directory permits writing into +files. + <p class="rightline"><span class="cmbx-10">Update the Bitmap Generating Scripts in the Environment File</span></p> +<!--l. 7089--><p class="noindent" ></p></li> +<li> <a + name="index26-69008"></a> <a + name="index26-69009"></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 bitmaps.<a + name="dv2png"></a> +<div class="Verbatim"><span class="cmtt-10">Gdvips</span><span class="cmtt-10"> -Ppdf</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"> ></span><span class="cmtt-10"> zz%%4.ps</span><span class="cmtt-10"> </span> +<br /><span class="cmtt-10">Gconvert</span><span class="cmtt-10"> zz%%4.ps</span><span class="cmtt-10"> -trim</span><span class="cmtt-10"> +repage</span><span class="cmtt-10"> -density</span><span class="cmtt-10"> 110x110</span><span class="cmtt-10"> -transparent</span><span class="cmtt-10"> ’#FFFFFF’</span><span class="cmtt-10"> %%3</span><span class="cmtt-10"> </span> +<br /><span class="cmtt-10">Grm</span><span class="cmtt-10"> zz%%4.ps</span><span class="cmtt-10"> </span> +<br /></div> +<!--l. 7102--><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. 7107--><p class="indent" > You may replace this script with an alternative sequence of system calls. In such a case, place one command per +line, and mark each of these lines with the character ‘<span class="cmtt-10">G</span>’ at the first column. The literate version tex4ht-env.tex of +tex4ht.env offers a few suggestions. +</p><!--l. 7113--><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 png. +</p><!--l. 7119--><p class="indent" > The script employs the Metafont mode ‘<span class="cmtt-10">ibmvga</span>’ of resolution ‘<span class="cmtt-10">110</span>’; the available modes are listed in file +<span class="cmtt-10">modes.mf </span>of Metafont. +</p><!--l. 7124--><p class="indent" > Use the option ‘<span class="cmtt-10">-crop 0x0 +page</span>’ or ‘<span class="cmtt-10">-crop 0x0 +repage</span>’ instead of ‘<span class="cmtt-10">-trim</span>’ for old convert utilities that do +not recognize the latter argument. +</p><!--l. 7129--><p class="noindent" ></p></li> +<li>Instead of employing the G scripts, glyphs can rely on specialized <a + href="mn27.html" name="mn27.html" >F scripts</a> of similar nature for creating bitmaps. +<!--l. 7145--><p class="noindent" ></p></li> +<li> <a + name="index26-69010"></a> <a + name="index26-69011"></a> <a + name="index26-69012"></a> <a + name="index26-69013"></a>The bitmap formats can be controlled by a ‘g’ record of tex4ht.env, a ‘-g’ switch of <span class="cmtt-10">tex4ht.c</span>, and a -LGTYP +switch in the compilation of tex4ht.c. The default setting assumes the ‘png’ format. + <p class="rightline"><span class="cmbx-10">Update the Other Scripts in the Environment File</span></p> +<!--l. 7160--><p class="noindent" ></p></li> +<li><a + name="mvscript"></a>If needed, replace the scripts ‘<span class="cmtt-10">Mmv %%1 %%2%%3</span>’ and ‘<span class="cmtt-10">Ccp %%1 %%2%%3</span>’ 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. 7183--><p class="noindent" ></p></li> +<li><a + name="accscript"></a>If needed, replace the script ‘<span class="cmtt-10">Achmod %%1 %%2%%3</span>’ 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. 7190--><p class="noindent" ></p></li> +<li> <a + name="index26-69014"></a> <a + name="index26-69015"></a>Postprocessing of files can be requested with ‘<span class="cmtt-10">.</span>’ scripts. The files are selected by their extension +names, as listed following the period symbols. The parameter ‘<span class="cmtt-10">%%1</span>’ provides the file names, and the +parameter ‘<span class="cmtt-10">%%0</span>’ provides the jobnames. Under kpathsea, the substring ‘to indirectly obtain the value of +<span class="cmtt-10">${SELFAUTOPARENT}</span>. +<!--l. 7203--><p class="indent" > The environment file <a + href="tex4ht-env-unix.txt" >tex4ht.env</a> offers the following inactive dot script for <span class="cmbx-10">validating </span>output of +compilations. +</p><div class="Verbatim"><span class="cmtt-10"><validatehtml></span><span class="cmtt-10"> </span> +<br /><span class="cmtt-10"> .html</span><span class="cmtt-10"> xmllint</span><span class="cmtt-10"> --noout</span><span class="cmtt-10"> --valid</span><span class="cmtt-10"> --html</span><span class="cmtt-10"> %%1.html</span><span class="cmtt-10"> </span> +<br /><span class="cmtt-10"></validatehtml></span><span class="cmtt-10"> </span> +<br /><span class="cmtt-10"><validate></span><span class="cmtt-10"> </span> +<br /><span class="cmtt-10"> .xml</span><span class="cmtt-10"> xmllint</span><span class="cmtt-10"> --noout</span><span class="cmtt-10"> --valid</span><span class="cmtt-10"> %%1.xml</span><span class="cmtt-10"> </span> +<br /><span class="cmtt-10"> .html</span><span class="cmtt-10"> xmllint</span><span class="cmtt-10"> --noout</span><span class="cmtt-10"> --valid</span><span class="cmtt-10"> %%1.html</span><span class="cmtt-10"> </span> +<br /><span class="cmtt-10"> .css</span><span class="cmtt-10"> mycssparser</span><span class="cmtt-10"> %%1.css</span><span class="cmtt-10"> </span> +<br /><span class="cmtt-10"></validate></span><span class="cmtt-10"> </span> +<br /></div> +<!--l. 7221--><p class="indent" > The dot script may be activated in the following manner. +</p><!--l. 7223--><p class="indent" > +</p><ol type="1" > +<li>Bind a CSS validator to the .css record. (<a + href="http://jigsaw.w3.org/css-validator/DOWNLOAD.html" ><span class="cmtt-10">http://jigsaw.w3.org/css-validator/DOWNLOAD.html</span></a>) +<!--l. 7231--><p class="noindent" ></p></li> +<li>Remove the leading space characters from the above record. + </li></ol> +<!--l. 7243--><p class="noindent" ></p></li> +<li>Postprocessing of files can also be requested with ‘<span class="cmtt-10">X</span>’ scripts. The file names are accessed through the parameter +‘<span class="cmtt-10">%%1</span>’, and their extensions through the parameter ‘<span class="cmtt-10">%%2</span>’. + <p class="rightline"><span class="cmbx-10">Set the Script Files</span></p> </li> +<li>Ensure proper paths within the htlatex-like scripts in ‘<span class="cmtt-10">~/tex4ht.dir/bin/unix/</span>’. If you use a command different +than <span class="cmtt-10">latex </span>for compiling LaTeX source files, fix also the references to <span class="cmtt-10">latex </span>in the scripts. Check also the +appropriateness of the commands for compiling TeX and TeXi files. +<!--l. 7261--><p class="indent" > <a + name="index26-69016"></a> <a + name="index26-69017"></a>The default scripts provide for three calls to LaTeX. The file <span class="cmtt-10">tex4ht-auto-script.tex </span>in <a + href="tex4ht-lit.zip" >tex4ht-lit.zip</a> offers +examples of bash scripts that automatically determine the number of compilations needed from LaTeX (contributed +by Kai-Mikael Jää-Aro). </p><p 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 ‘<span class="cmtt-10">~/tex4ht.dir/bin/unix/</span>’ into +the <span class="cmtt-10">path </span>variable within the <span class="cmtt-10">.login </span>file. For instance, +<!--l. 7277--><p class="indent" > <span class="cmtt-10">set path=($path ~/tex4ht.dir/bin/unix/)</span> +</p><!--l. 7280--><p class="noindent" ></p></li> +<li>Let LaTeX and TeX know where the new style files reside, say, by adding the directory + +‘<span class="cmtt-10">~/tex4ht.dir/texmf/tex/generic/tex4ht/</span>’ to the environment variable <span class="cmtt-10">TEXINPUTS</span>. For instance, +<!--l. 7284--><p class="indent" > <span class="cmtt-10">setenv TEXINPUTS .:~/tex4ht.dir/texmf/tex//:/usr/local/share/texmf/tex//</span> +</p><!--l. 7286--><p class="noindent" ></p></li> +<li>If your TeX system uses a registry database to locate files, make sure to refresh it (e.g., run <span class="cmtt-10">texhash </span>for kpathsea, +or <span class="cmtt-10">mktexlsr </span>or ‘<span class="cmtt-10">initexmf -u</span>’ for some Linux systems). +<!--l. 7313--><p class="noindent" ></p></li> +<li>Some output modes assume <a + href="http://www.sun.com/" >Java</a> is also available in the computer in use. <p 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>from <span class="cmtt-10">~/tex4ht.dir/temp/ </span>to your work directory </li> +<li>Compile ‘<span class="cmtt-10">testa.tex</span>’ with the command ‘<span class="cmtt-10">ht latex testa</span>’ </li> +<li>Compile ‘<span class="cmtt-10">testb.tex</span>’ with the command ‘<span class="cmtt-10">htlatex testb</span>’ + </li></ol> + + <hr /> +<!--l. 7670--><p class="indent" > <small>Generated August 24, 2020 - <a href="/tex4ht/">tex4ht home page</a></small></p> +</body></html> |