Install TeX

  1. Install teTeX-texmf

    Change into /usr/share and create three TeX directories: mkdir texmf texmf.local texmf-var. Change into the new texmf subdirectory and extract the teTeX archive: tar -xzf /path/to/teTeX-texmf-1.0.2.tar.gz. Extracting those 33 MB may take a while.

  2. (Re)install Cygwin TeX

    This may sound weird but has a simple explanation: Installing the teTeX archive overwrites some tweaked files in the Cygwin tetex package. So even if you had installed TeX before, you have to do this again right now.

    Start the Cygwin setup.exe program. If you install Cygwin TeX for the first time, choose "Install from internet", otherwise you may use "Install from local directory" and thus avoid downloading the package again. In the package list, select "tetex" and finish the installation.

  3. Extract the JadeTeX archive

    Copy the Jadetex archive to /usr/share/texmf.local/tex (most likely you will have to create this directory structure manually). Extract the archive with the command tar -xzf jadetex-3.10.tar.gz. This will create a new subdirectory /usr/share/texmf.local/tex/jadetex.

  4. Extract the xmltex and PassiveTeX archives

    Create a new directory called xmltex in your local texmf folder: /usr/share/texmf.local/tex/xmltex. Extract the contents of the xmltex archive (which is called base.zip in order to confuse you) into this directory. This will create a subdirectory base.

    Now create a new subdirectory called passivetex in your new xmltex folder: /usr/share/texmf.local/tex/xmltex/passivetex. Extract the contents of the PassiveTeX archive into this directory.

  5. Configure teTeX

    Change into /usr/share/texmf/web2c. Patch the configuration files with the following command: patch < /path/to/cygtetex.diff. This patch applies both the Cygwin-specific changes (as supplied by the Cygwin teTeX maintainer) as well as the changes we'll need for JadeTeX and PassiveTeX to work.

    Then run the following commands:

         ~# mktexlsr
          ~# texconfig confall
          ~# texconfig rehash
          ~# texconfig init
       
    

    These commands will initialize the filename databases for all directories, configure all applications, refresh the filename database, and create all format files, respectively.

  6. Create jadetex.exe, pdfjadetex.exe, and pdfxmltex.exe

    Finally you should create symlinks to conveniently invoke the SGML and XML-related format files:

         ~# ln -s /usr/bin/tex.exe /usr/local/bin/jadetex.exe
          ~# ln -s /usr/bin/pdftex.exe /usr/local/bin/pdfjadetex.exe
          ~# ln -s /usr/bin/pdftex.exe /usr/local/bin/pdfxmltex.exe
       
    
  7. Configure dvips

    You'll probably have to change some settings for dvips for your local site. The settings are stored in the file config.ps in the /usr/share/texmf/dvips/config directory. The following options might need a change:

    • The line starting with M should be modified according to the make and model of the printer that you use. The file /usr/share/texmf/metafont/misc/modes.mf contains a list of possible values. Remember that a printer which is not in the list may be happy with the mode of a related printer, e.g. most recent HP LaserJet printers work just fine with the ljet4 setting, and many other cheap non-HP laser printers work with the ljet2 setting.

    • The line starting with D specifies the resolution of your printer. This always means the physical resolution, not what some resolution enhancement technology claims to make of the latter.

    • The line starting with O (the capital letter, not zero) specifies the horizontal and vertical printer offsets. These are printer-specific values which can be used to adjust the printout on the paper. The easiest way to determine these values is to use the file testpage.tex, which you will find in the /usr/share/texmf/tex/latex/base directory. Open a command-line window and change into this directory. Type latex testpage.tex and answer the questions that appear on your screen. A testpage.dvi will be created. Use dvips -o testpage.ps testpage.dvi to convert this to the PostScript file testpage.ps. Now print this file on your printer using GhostView. You will see a box which should be evenly spaced with a 1 inch margin on all sides. The rulers help you to calculate which offsets (if at all) have to be specified in config.ps to adjust the printout correctly. The offsets can be specified as cm, as in, or as pt. In addition, these rulers show you the printer-specific unprintable area on the edges.