exit Unix

A Setup for Unix Environments

  1. Establish a directory `~/tex4ht.dir'.

  2. Download the following files to `~/tex4ht.dir'.

    1. TeX4ht.sty
    2. tex4ht.env
    3. ht
    4. cmcsc.htf
    5. cmex.htf
    6. cmmi.htf
    7. cmr.htf
    8. cmsy.htf
    9. cmti.htf
    10. cmtt.htf
    11. lasy.htf
    12. lcircle.htf
    13. line.htf
    14. manfnt.htf
    15. logo.htf

  3. Change the access mode of file `ht' to be executable (e.g., `chmod 700 ht').

  4. Check that your system includes the `dvips' utility of Tomas Rokicki for converting dvi files into postscript. If this is not the case, you'll need to modify the line `dvips -mode $mf -D $density -f $_[0] -pp $_[1] > tmp.ps' in `tex4ht.env' to reflect on the tools used in your environment to handle dvi code.

  5. Download the file tex4ht.c into a temporary directory.

  6. Compile `tex4ht.c' into an executable tex4ht file with the following command, where `XXX' should be replaced with the full path to the home directory.

    cc -o tex4ht tex4ht.c -DENVFILE='"XXX/tex4ht.dir/tex4ht.env"' -DHTFDIR='"XXX/tex4ht.dir"'

  7. Move the file tex4ht to directory `tex4ht.dir', and delete the remaining files from your temporary directory.

  8. Download convert to a temporary directory, compile it into an executable file named `convert', move the executable file to the directory `tex4ht.dir', and delete the remaining files from your temporary directory.

  9. Create a work directory and create a soft link to the files of directory `tex4ht.dir' (e.g., issue the system command `ln -s XXX/* .' in your work directory, where `XXX' stands for the relative path from your work directory to `text4ht.dir').

    A more general approach would be to make the files of `tex4ht.dir' globally known, e.g., by including lines similar to the following ones in the `.login' file.

              set path=(~/bin.$HOSTTYPE ~/tex4ht.dir
              setenv TEXINPUTS .:~/tex4ht.dir//:/n/candy/0/tex/teTeX/texmf/tex//

  10. Find out the Metafont modes available in your system (e.g., in `..../tex/teTeX/texmf/metafont/misc/modes.mf'). If mode `ibmvga' in resolution `110' is not available, or you rather use another setting, replace the fields `110' and `ibmvga' with other values at the end of `tex4ht.env'.

  11. Download test.tex to your work directory.

  12. Compile `test.tex' with the command `ht tex test' or `ht latex test'. You might want to compare your output with the sample output provided here for TeX and LaTeX.

[an alternative setup]