All of the major Linux distributions include packaged versions of teTeX, and each distribution has its own idiosyncrasies. The packaging methods of each distribution are, for the most part, incompatible. If you try to install teTeX from another distribution, you may succeed in installing the package, but you're certain to mess up the package-management database on your system. When installing teTeX, please consult the section below that corresponds to your Linux distribution.
Installing teTeX is surprisingly easy for a package of this magnitude. This document covers only the major free U.S. Linux distributions, because I haven't had time to obtain or install European Linux distributions like S.u.S.E.
However, the generic, teTeX distribution isn't any harder to install than the Linux packages. See section Generic CTAN distribution, below.
You should consider installing the generic teTeX distribution from the CTAN archives if:
/usr
file
system.A complete installation of the binary distribution requires 40-50 Mb
of disk space, and building the distribution from the source code takes
about 75 Mb, so you should make sure that the disk space is available
before you start. You don't need to have the gcc(1)
compiler
or the X Windows System installed (although X certainly helps because
it is much easier to preview documents on-screen). All you need is an
editor that is capable of producing plain ASCII, text (see section
2). What could be simpler?
Ghostscript V. 5.03 allows printing of PostScript documents on non-PostScript printers, and allows previewing of PostScript documents on VGA monitors and X Window System displays. If you already have a PostScript printer, you won't need Ghostscript simply to print PostScript documents. Ghostscript has many other capabilities, however, which are beyond the scope of this HOWTO.
APSFILTER can automate document post processing and printing, and make life with your printer a lot easier. See the section titled APSFILTER.
For information on how to install a printer daemon and generally configure printers for Linux, see the section titled The lpd(8) daemon, and consult the Printing-HOWTO.
You can retrieve the files from one of the CTAN archives listed in section Appendix A. In the examples below, the files were retrieved from the CTAN archive at ftp.tex.ac.uk.
First, FTP to
ftp.tex.ac.uk and cd
to the directory
ctan/tex-archive/systems/unix/teTeX/distrib/Retrieve the files
INSTALL.bin install.shand place them in the top-level directory where you want to install teTeX, for example,
/var/teTeX
if you plan to install teTeX
in the /var
file system.
Print out the INSTALL.bin
file. Keep this file handy,
because it describes how to install a minimal teTeX installation. The
minimal installation requires only 10-15 MB of disk space, but it is
recommended that you install the complete teTeX package if at all
possible. For a minimum installation, you'll need the files
ctan/tex-archive/systems/unix/teTeX/distrib/base/latex-base.tar.gz ctan/tex-archive/systems/unix/teTeX/distrib/base/tetex-base.tar.gzYou'll also need one of two archives which contain the executable teTeX programs. Retrieve the archive file
ctan/tex-archive/systems/unix/teTeX/distrib/binaries/i386-linux.tar.gzif your system uses the Linux ELF shared libraries,
ld.so(1)
of at least version 1.73, and clibs of at least version 5.09. If it
doesn't, retrieve the archive
ctan/tex-archive/systems/unix/teTeX/distrib/binaries/i386-linuxaout.tar.gzwhich is compiled for systems that use the older, a.out-format static libraries.
Then, following the instructions in the file INSTALL.bin
,
execute the command
sh ./install.shwhile in the top-level teTeX installation directory. (Make sure that the teTeX archives are located there, too.) After a few moments, the installation program will warn you that you are missing some of the teTeX packages. However, if you're planning only a minimal teTeX installation, you should ignore the warnings and proceed. To configure the basic teTeX system, see section Base system configuration, below.
To install the remaining packages, see the next section.
To perform a complete teTeX installation, retrieve the archive files listed in the previous section, as well as the following files:
ctan/tex-archive/systems/unix/teTeX/distrib/doc/ams-doc.tar.gz ctan/tex-archive/systems/unix/teTeX/distrib/doc/bibtex-doc.tar.gz ctan/tex-archive/systems/unix/teTeX/distrib/doc/eplain-doc.tar.gz ctan/tex-archive/systems/unix/teTeX/distrib/doc/fonts-doc.tar.gz ctan/tex-archive/systems/unix/teTeX/distrib/doc/general-doc.tar.gz ctan/tex-archive/systems/unix/teTeX/distrib/doc/generic-doc.tar.gz ctan/tex-archive/systems/unix/teTeX/distrib/doc/latex-doc.tar.gz ctan/tex-archive/systems/unix/teTeX/distrib/doc/makeindex-doc.tar.gz ctan/tex-archive/systems/unix/teTeX/distrib/doc/metapost-doc.tar.gz ctan/tex-archive/systems/unix/teTeX/distrib/doc/programs-doc.tar.gz ctan/tex-archive/systems/unix/teTeX/distrib/fonts/ams-fonts.tar.gz ctan/tex-archive/systems/unix/teTeX/distrib/fonts/dc-fonts.tar.gz ctan/tex-archive/systems/unix/teTeX/distrib/fonts/ec-fonts.tar.gz ctan/tex-archive/systems/unix/teTeX/distrib/fonts/misc-fonts.tar.gz ctan/tex-archive/systems/unix/teTeX/distrib/fonts/postscript-fonts.tar.gz ctan/tex-archive/systems/unix/teTeX/distrib/fonts/sauter-fonts.tar.gz ctan/tex-archive/systems/unix/teTeX/distrib/goodies/amstex.tar.gz ctan/tex-archive/systems/unix/teTeX/distrib/goodies/bibtex.tar.gz ctan/tex-archive/systems/unix/teTeX/distrib/goodies/eplain.tar.gz ctan/tex-archive/systems/unix/teTeX/distrib/goodies/latex-extra.tar.gz ctan/tex-archive/systems/unix/teTeX/distrib/goodies/metapost.tar.gz ctan/tex-archive/systems/unix/teTeX/distrib/goodies/pictex.tar.gz ctan/tex-archive/systems/unix/teTeX/distrib/goodies/pstricks.tar.gz ctan/tex-archive/systems/unix/teTeX/distrib/goodies/texdraw.tar.gz ctan/tex-archive/systems/unix/teTeX/distrib/goodies/xypic.tar.gzAll of these files should be placed in the top-level directory where you want teTeX to reside. As with the minimal installation, execute the command
sh ./install.sh
The install.sh
script, after determining which teTeX archive
series are present, will present you with a menu of options. The only
setting you need to make at this point is to set the top-level
directory where you want teTeX installed, by selecting the ``D'' option.
You must, of course, choose a directory in whose parent directory you
have write permissions. For example, if you are installing teTeX in
your home directory, you would specify the teTeX installation
directory as
/home/john.q.public/teTeXand, after returning to the main menu, select ``I'' to proceed with the installation. Note that the directory must not exist already: the
install.sh
script must be able to create it.
An option which you should consider enabling, is setting an alternative directory for generated fonts. Even if you plan to use only PostScript-format, Type 1 scalable fonts, occasionally you'll process a file that requires the Computer Modern fonts. Enabling this option requires that you enter the directory to use. You must have write permissions for the parent directory. Following the example above, you could specify
/home/john.q.public/texfontsor, if you want the generated fonts to be accessible by all users on the system, specify a directory like
/var/texfontsI would recommend that you not, however, use the default
/var/tmp/texfonts
directory for this option, because the
generated fonts could be deleted after the next reboot, and the fonts
will need to be generated again the next time they're needed.
After you've selected the option ``I'', and install.sh
has
installed the archives, set various permissions, and generated its
links and format files, the program will exit with a message telling
you to add the teTeX binary directory to your $PATH
environment variable, and the directories where the man pages and info
files reside to your $MANPATH
and
$INFOPATH
environment variables. For example, add the
statements
export PATH=$PATH:"/home/john.q.public/teTeX/bin" export MANPATH=$MANPATH":/home/john.q.public/teTeX/man" export INFOPATH$=INFOPATH":/home/john.q.public/teTeX/info"to your
~/.bash_profile
if you use bash(1)
as
your shell, or to your ~/.profile
if you use another
shell for logins.
Log out, and then log in again, so the environment variables are registered. Then, run the command
texconfig confallto insure that the installation is correct.
Next, you can configure teTeX for you specific hardware. See section Post-installation configuration details, below.
To install teTeX V. 0.4 from the source code, ftp
to a CTAN
site like
ftp://ftp.tex.ac.uk and retrieve the files
ctan/tex-archive/systems/unix/teTeX/distrib/INSTALL.src ctan/tex-archive/systems/unix/teTeX/distrib/sources/README.texmf-src ctan/tex-archive/systems/unix/teTeX/distrib/sources/teTeX-lib-0.4pl8.tar.gz ctan/tex-archive/systems/unix/teTeX/distrib/sources/teTeX-src-0.4pl7.tar.gz
Read over the instructions in INSTALL.src
, then su
to root and unpack the files in a directory for which you have
read-write-execute permissions.
Remember to use the p
argument to tar(1)
, and also
remember to unset the noclobber
option of bash(1)
.
You can do this with the counterintuitive command
set +o noclobberNote that the argument
+o
to set
unsets a
variable, just exactly backwards from what you might expect.
The file teTeX-lib-0.4pl8.tar.gz
will create the directory
./teTeX
. The file teTeX-src-0.4pl7.tar.gz
will
create the directory teTeX-src-0.4
Print out the file
INSTALL.src
and keep it nearby for the following
steps. cd
to the ./teTeX-src-0.4
directory, and, per
the instructions in the INSTALL.src
file, edit
./Makefile
. You need to set the TETEXDIR
variable
to the absolute path of the parent teTeX directory. This will be the
subdirectory teTeX
of the directory where you unpacked the
source and library archives. For example, if you unpacked the
archives in your home directory, you would set TETEXDIR
to
/home/john.q.public/teTeXThe rest of the
Makefile
options are pretty generic. With
gcc(1)
version 2.7.2 and later, you should not need to make
any further adjustments unless you have a non-standard compiler and
library setup, or want the compiler to perform some further
optimizations, or for some other reason. Check that the
USE_DIALOG
, USE_NCURSES
, and HAVE_NCURSES
variables are set correctly for your system, because the
dialog
program needs the ncurses library to be installed. A
ncurses(3x)
library is included in the source distribution,
so the default values in the Makefile
should work fine. If
you can't get ncurses(3x)
to compile or link,
texconfig(1)
can also be run from the command line.
If you've done everything correctly up to this point, you should be
able to type make world
in the top-level source directory,
and relax until the teTeX executables are built. This can take a few
hours.
After the build has completed, set the environment variables
$PATH, $MANPATH
, and $INFOPATH
to include the teTeX directories. The statements which would be added
to the file ~/.bash_profile
, in the example, above,
would be
export PATH=$PATH":/home/john.q.public/teTeX/bin/i386-linux" export MANPATH=$MANPATH":/home/john.q.public/teTeX/man" export INFOPATH=$INFOPATH":/home/john.q.public/teTeX/info"The
$PATH
variable is different in the source
distribution than in the binary distribution. Note that here the path
to the binaries is teTeX/bin/i386-linux
instead of simply
teTeX/bin
as in the binary distribution.
At this point you can run texconfig confall
to ensure that
the paths have been set correctly, and then proceed to configure teTeX
as in the binary distribution. See the
section
Post-installation configuration details, below.
First, ftp
to your nearest Linux archive site. Mine is
wuarchive.wustl.edu.
Then find the directory with the
Slackware distribution diskettes. On wuarchive.wustl.edu
,
this is
systems/linux/sunsite/distributions/Slackware/slakware/.Linux sites which mirror
sunsite.unc.edu
will store these
diskettes in the directory distributions/Slackware/slakware/.
teTeX, the full package, is contained on the Slackware disk series
t.
So, grab all nine disks' worth of the t
series,
disks t1 - t9.
Be sure to keep them in order, too. Either
store the files in separate subdirectories labeled t1 - t9
on
a hard drive partition, or on diskettes, and label the diskettes
t1
through t9.
We're going to install them by hand.
This isn't difficult. The Slackware installer creates the directories and unpacks the files. It also provides descriptions of each module in the distribution, which allows you to decide whether you want to install it or not. In the case of teTeX, however, you are simply going to install everything, because that's what you should do anyway.
Let's assume that you have all nine diskettes' worth of the Slackware
teTeX distribution ready at hand, organized as described above.
You'll have a lot of files which have the extension .tgz.
This is shorthand for a tar(1)
archive compressed with
gzip(1).
The names all fit the 8+3 filename limitations of
MS-DOG. Aren't you glad you decided to scrap your DOG partitions and
install Linux instead? You can use a MS-DOG hard disk partition or
DOG-format diskettes to store the files. The archives also begin with
the letters tb, td,
or tm,
and so on, which is the
implementors' shorthand for TeX binary, TeX documentation, TeX macro,
and so on. The difference to you is academic, because you'll be
installing everything anyway.
Simply fire up the Slackware install
utility. You needn't
concern yourself with reconfiguring the system, so select the option
to add new software. Select the appropriate source media (diskettes,
HD partition, or CD-ROM), specify that you want to install the
Slackware t
series, and that you do not want to be
prompted -- simply install all the archives on the Slackware
t
series diskettes. You'll be prompted to insert each
diskette in the floppy drive if you're installing from diskettes. If
you're installing from a hard drive or CD-ROM, no more intervention is
required by you.
This section is for people who, for one reason or another, would like to install teTeX manually from a Linux package.
Let's assume that you've assembled the Slackware teTeX distribution on
floppy diskettes labelled t1
thru t9.
Mount the
t1
diskette like this
mount /dev/fd0 /mntif your Linux configuration is a standard configuration. Actually, any mount point will do. You'll simply need to substitute the appropriate path spec in the next few steps.
The next thing you want to do is create the teTeX top-level directory. teTeX's internal paths are specified relative to its binary program files, but the Slackware distribution is archived relative to the root directory. So the top-level teTeX directory is:
/usr/lib/teTeXFor each of the
.tgz
archive files in the distribution, copy
the archive file to the /usr/lib/teTeX
directory and repeat
the following commands:
You should be logged in as root
and in the top-level
directory, /,
for these steps. I've used the
tb-xfig.tgz
archive for demonstration purposes. Of course,
you'll want to substitute the name of whichever archive you're
unpacking.
cp /mnt/tb-xfig.tgz /usr/lib/teTeX tar -zxvf /usr/lib/teTeX/tb-xfig.tar # v to see what's going on! rm /usr/lib/teTeX/tb-xfig.tgz
Most Slackware packages that I've seen also include an install script,
which the Slackware installer executes after unpacking the files.
Look in the directory /install
after you've unpacked the
files. If there's a script there called doinst.sh,
execute
that, as root,
by typing
sh < /install/doinst.shIt may be alarming to watch all those filenames scrolling of the top of the screen as the archives are unpacked. Relax! Take a break, and freshen up your coffee (or grab another JOLT from the refrigerator, or otherwise replenish whatever you're drinking). There's only a few more steps you need to perform to install teTeX. They're covered in Section 4.
Installing teTeX from Debian packages is truly trivial. ftp
the most recent stable versions of the teTeX archive files
from
ftp.debian.org. The
teTeX distribution is located in the directory
pub/debian/bo/binary-i386/texRetrieve the following Debian archive files via anonymous FTP (remembering to set binary mode for the transfers).
tetex-base_0.4pl6-5.deb tetex-bin_0.4pl6-8.deb tetex-dev_0.4pl6-8.deb tetex-doc_0.4pl6-1.deb tetex-extra_0.4pl6-4.debOnce the files are safely transferred to your local hard disk,
su
to root, and install them using the dpkg(1)
utility:
dpkg -i tetex-base_0.4pl6-5.deb dpkg -i tetex-bin_0.4pl6-8.deb dpkg -i tetex-dev_0.4pl6-8.deb dpkg -i tetex-doc_0.4pl6-1.deb dpkg -i tetex-extra_0.4pl6-4.debInstallation will take some time, because the Debian archives contain the shell scripts necessary to check for old TeX installations, build the TeX and LaTeX
.fmt
files, build the path-searching
database, and see to other configuration details. However, once they
are finished, you should have an operational teTeX installation
that needs only to be configured for the details of your local
system; see section
Post-installation configuration details.
Presumably, you could install only selected portions of the teTeX RedHat distribution, but consistent with the philosophy of the other sections, it is assumed that you will eventually need all of the facilities provided by teTeX, and so you should install the complete distribution.
To install teTeX from RedHat Linux RPM packages, under RedHat Linux
v. 4.2, ftp
to
sunsite.unc.edu and cd
to the directory
pub/Linux/distributions/redhat/current/i386/RedHat/RPMS/Set binary mode for the transfers and retrieve the following files:
tetex-0.4pl8-5.i386.rpm tetex-latex-0.4pl8-5.i386.rpm tetex-afm-0.4pl8-5.i38 6.rpm tetex-dvilj-0.4pl8-5.i386.rpm tetex-dvips-0.4pl8-5.i386.rpm tetex-xdvi-0.4pl8-5.i386.rpm tetex-texmf-src-0.4pl8-5.i386.rpmThis last file may not be strictly necessary. It contains the LaTeX sources, if you want to install LaTeX yourself. If you're thinking of upgrading LaTeX independently of the binaries in the future, this archive could be useful to have around:
Simply install the files above in the order given, using the rpm
-i
command, and proceed to the section,
Post-installation configuration details.
Ghostscript development is rapid, and the changes which are incorporated into every new version are significant. Therefore, it's worth the effort to install the version of Ghostscript that is available on its home page, http://www.cs.wisc.edu/~ghost.
At the time of this writing, the current version is 5.03. The Ghostscript archive for Linux is composed of the following files:
ghostscript-5.03gnu.tar.gz ghostscript-5.03jpeg.tar.gz ghostscript-5.03libpng.tar.gz ghostscript-5.03zlib.tar.gz ghostscript-fonts-std-5.03.tar.gz ghostscript-fonts-other-5.03.tar.gzWhat is Ghostscript, and why do you need it? Technically, Ghostscript is a Raster Image Processor. It translates PostScript code into many common, bit-mapped formats, like those understood by your printer or screen, whether or not they are equipped with PostScript. In practical terms, Ghostscript allows you to use Type 1 fonts, and mix text and graphics on any printer or video display that Ghostscript knows about.
The quality of the fonts which come with the program have improved
steadily in the last several versions as well. Or maybe it's that
more recent versions of Ghostscript have improved font rendering. In
either case, this is of real benefit for Linux users, who may not be
able to spend hundreds of dollars on commercial fonts. Because
Ghostscript is able to read the font requests made by
dvips(1)
, Ghostscript's font library provides the fonts, not
teTeX. But the font metrics files for Ghostscript's font library,
which have the extension .afm
, are already included in the
teTeX distribution.
For information about using Ghostscript, see the file use.txt
in the Ghostscript distribution, and the Linux Documentation Project's
Printing-HOWTO. There's also a Ghostscript manual available from the
Internet. See section
Resources for further information
Or, install APSFILTER and let that run Ghostscript automatically. (See section APSFILTER).
A final, significant note: I would recommend that you compile
Ghostscript for your own system, if possible. Combining different
versions of Ghostscript and svgalib can quickly become confusing. The
version of Ghostscript which is included in the Slackware AP
set is version 2.6.2 and does not have X support compiled in. You
might also have trouble finding the correct svgalib versions for it.
There is supposedly a version of Ghostscript with X11 support in the
Slackware XAP
distribution series, and presumably in the
other Linux distributions, though I haven't tried them. Compiling
Ghostscript for your own system is far easier, it seems to me.
It's also important to remember that there are two Ghostscript releases in distribution: the commercial, Aladdin Ghostscript, and GNU Ghostscript, which lags behind Aladdin Ghostscript by several years. This is due to Ghostscript's unique licensing arrangement. See the Printing-HOWTO for more information about Ghostscript licensing.
svgalib support for GNU Ghostscript 3.33 is included in a small archive which contains a .diff file. Ghostscript 3.33 for X is also configured for JPEG support, so you should include the JPEG library sources as well. The relevant archives can be found at any GNU distribution site, like ftp://prep.ai.mit.edu/pub/gnu.
There are software packages which will simplify your life, and
APSFILTER is one of them. Written by Andreas Klemm, APSFILTER works
with any BSD-compatible printer daemon (which means that you have the
lpd(8)
program and an /etc/printcap
file; see
below), and provides transparent printer support for ASCII, DVI, and
PostScript files, as well as files compressed by gzip(1)
,
compress(1)
, and other data compression software.
Once you have successfully installed APSFILTER, you can print a PostScript file to whatever printer you have, by typing
lpr file.psOr, to print an ASCII file without PostScript translation, you can type
lpr -Praw file.ascAmazing.
APSFILTER is surprisingly easy to install, considering that it works
with many disparate elements of your system. Installing the generic
APSFILTER distribution, however, does require that you have a current
gcc(1)
compiler on hand, because APSFILTER builds some of its
filters during installation. Some distributions of Linux, however,
provide a pre-built version, so check your specific distribution
first.
In any event, you will need a correctly installed Ghostscript and
lpd(8)
installation for APSFILTER to work. The most recent
APSFILTER is located in the Linux Archives at
ftp://sunsite.unc.edu/pub/Linux/system/printing/.
lpd(8)
daemon. There are wide variations in printers and configurations. Setting up a working printer daemon is no mean feat. If you're using teTeX on an individual system, you could simply dump the output to the printer device driver file, but this is less than desirable. You lose the filtering capabilities of the printer daemon. If you're printing on a network, having a working printer daemon is a must.
The basic UNIX program for printer management on BSD-style systems is
lpd(8)
. When you print a file with lpr(1)
you are
really sending the file to a print queue. lpd(8)
prints
files in the order they're queued. Other printer utilities include
lpq(1)
, which displays the contents of the print queue, and
lprm(1)
, which removes (dequeues) files from the print queue.
The printer daemon can perform other tasks, like transparently filtering output from various programs (using filter programs like APSFILTER, above), accept print jobs from other machines on a network, send print jobs to various printers if you have more than one connected, and hold print output until you've refilled the paper feed tray.
The Printing-HOWTO explains the process of setting up a working
printer daemon in detail. Many Linux distributions already have
configured lpd(8)
suites. Check there first, because it will
save you considerable work. They're usually archived, strangely
enough, using the name lpr
, so search for that program.
There is also a printer daemon suite available from the Linux
archives, at
ftp://sunsite.unc.edu/pub/Linux/system/printing.