DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: T i

⟦00e2ff5bf⟧ TextFile

    Length: 30649 (0x77b9)
    Types: TextFile
    Names: »installation.tex«

Derivation

└─⟦52210d11f⟧ Bits:30007239 EUUGD2: TeX 3 1992-12
    └─⟦af5ba6c8e⟧ »unix3.0/DVIWARE.tar.Z« 
        └─⟦ca79c7339⟧ 
            └─⟦this⟧ »DVIware/laser-setters/mctex/doc/installation.tex« 

TextFile

\subsection{File Scanning}
There are several subsystems that read configuration files.
These share the reading routines,
so that the files are scanned in the same manner
and you need only learn a single set of rules.
The rules are intended to be very similar to those in the Bourne shell.

Comments are marked by the pound-sign character {\tt \#}
and may appear either at the beginning of a line,
or after a word.
Comments terminate at the end of the line.
Words are separated by white space (one or more blank or tab characters).
In addition to white space,
the backslash character \verb|\| is also special.
The sequence \verb|\b| expands to a backspace,
\verb|\f| to a formfeed,
\verb|\n| to a linefeed (newline),
\verb|\r| to a carriage return,
and \verb|\t| to a tab;
a backslash followed by up to three octal digits
expands to the equivalent ASCII character.
Any other character preceded by a backslash is simply quoted
(so that \verb|\\| becomes one backslash,
and a space or tab preceded by a backslash is taken literally).

Special characters can be quoted.
The single quote or apostrophe character {\tt '}
quotes everything up to another single quote
or the end of the line.
Double quotes {\tt "} quote up to another double quote,
but do not protect against backslash interpolation.

There are no continuation lines.
(This is likely to change in the future.)

\subsection{Installation}
There are several variables in the main Makefile that need to
be set for each system:
\begin{itemize}
\item
{\tt FONTDESC} is the name of the configuration file
that the \dvi\ library
uses to locate \TeX\ fonts.
This file is usually stored in {\tt /usr/local/lib/tex/fontdesc}, but
your local conventions may differ.
For testing purposes, the environment variable {\tt TEXFONTDESC}
can be set to the path name of a different file.
A sample fontdesc file can be found in {\tt misc/fontdesc}.

\item {\tt BINDIR} is the directory for the final binaries,
normally {\tt /usr/local/bin}.

\item {\tt LIBDIR} is the directory for \TeX\ library files,
normally {\tt /usr/local/lib/tex}.
Note that this includes the {\tt tex} suffix.
Collections of device-specific files
will be installed in subdirectories within {\tt LIBDIR};
these subdirectories will be made automatically as necessary,
but {\tt LIBDIR} itself must already exist.

\item {\tt TEXDIR} is the directory for \TeX\ input files
(macro packages),
normally \verb|${LIBDIR}/inputs| or \verb|${LIBDIR}/macros|.

\item {\tt LATEXDIR} is the directory for \LaTeX\ input files,
normally \verb|${LIBDIR}/latex| or just \verb|${TEXDIR}|.

\item {\tt MANDIR} is the directory for the the manual pages for
the utilities.
If possible, you should use a local manual tree ({\tt /usr/local/man}).
This may require some changes to the {\tt man} command.
People with System~V style manual trees
will need to do something different.\footnote
{Most \Unix\ systems name the manuals with a numeric suffix;
some versions of System~V use letter suffixes,
and have a different manual directory tree.
If your system does not include {\tt nroff},
you will not even be able to format the manuals.
If nothing else,
you can always comment out the installation of each manual
in each Makefile.}
%
\item {\tt INSTALL} is the name of a Berkeley-style `install' command.
System~V sites can use the `bsdinstall' shell script
found in {\tt misc/bsdinstall.sh}.
(You can run it directly, or preferably,
install it in {\tt /usr/local/bin}.
See also \S\ref{sec:berk}, p.~\pageref{sec:berk}.)
\end{itemize}
%
These variables also appear in Makefiles in each subdirectory;
however, as long as you run {\tt make} from the top-level directory,
its values will override the others.
You may wish to make the same change everywhere anyway.

You must also edit the file {\tt h/types.h}.
Read the comments in the file for directions.
If you are running Berkeley~\Unix, you may not need to change anything.
If you are running System~III
or older versions of System~V \Unix,
you may have to add {\tt bcopy} and {\tt bzero} to the library.
Versions that will probably work,
but are almost certainly not optimal,
are provided in the {\tt lib} directory;
adding them to {\tt MISCC} and {\tt MISCO}
in {\tt lib/Makefile} may get you going.

If you do not intend
to build all of the \dvi\ to device conversion programs,
you can remove the unwanted targets from the top-level Makefile
(they are on the {\tt DRIVERS} definition line).
In particular, if you do not have X11,
you cannot build \texx\ and must delete this target,
and if you are not on a Sun with SunView,
you cannot build \texsun\ and must delete this one.

When you have made these changes,
run {\tt make} in the top-level directory
to build the library and the various binaries.
If all goes well, run {\tt make install} to install them.
(The library does not get installed anywhere.)
If you need to change {\tt FONTDESC}, run {\tt make clean},
then {\tt make} and {\tt make install}.

\subsection{The Font Description File}\label{sec:fontdesc}
The font description file provides a sequence of directories to
search for fonts.
A short fontdesc is shown in Table~\ref{table:fontdesc}
(although you should probably start with the longer one
in {\tt misc/fontdesc}).
Normally, all fonts are stored in a directory hierarchy.
The top-level directory contains the {\tt .tfm} files for all fonts
and a subdirectory for each font
containing all the magsteps for that font.
The fontdesc file also determines which font storage formats are used.
The library is capable of reading all three standard \TeX\ font formats
(\pk, \gf, and \pxl).
The \pk\ format is the best of the three.
\gf\ files are the slowest to read,
and take an intermediate amount of disk space.
\pk\ files are the smallest,
and intermediate in speed.
\pxl\ files are the fastest to read,
but consume about six times as much storage
as \pk\ fonts.
For a reasonable set of fonts,
this makes the difference between 10 megabytes
and 60 megabytes:
the space difference is great, and
the speed difference is only marginal.
In addition,
\pxl\ formats are now considered obsolete
and support for them may be dropped in the future
without warning.
%
\begin{table*}[bp]
%\centering
\input{fontdesc}
\caption{A Sample {\tt fontdesc}}
\label{table:fontdesc}
\end{table*}
%

In addition to the three standard font formats,
the library supports several `special' font formats.
They all work by reading a \tfm\ (\TeX\ font metrics) file.
The {\tt tfm} font format
(also known as {\tt invis})
carries only width information.
It is intended to be used for printer-resident fonts,
such as those that can be used by the \ps\ driver.
Since it has no rasters,
it prints out as blank space,
and so it can also be used
in its {\tt invis} guise
in place of S{\small LI}\TeX\ `invisible' fonts,
to save disk space.
Printouts that use the invisible font format
may have placement errors
(of up to {\em maxdrift\/} pixels;
see \S\ref{sec:drift}, p.~\pageref{sec:drift}),
so using a real font is preferable.
The {\tt blank} font format also prints out as blank space,
but carries with it a warning that the desired font magnification
was not found.
The {\tt box} format prints out as little rectangular boxes,
rather like those in Chapter~11 of {\em The \TeX book},
showing where \TeX\ thinks each character went.
Like blank fonts, it carries a warning.
The blank and box formats
are intended as `last resorts';
they exist
only so that a \dvi\ file that uses fonts in unavailable magnifications
can still be printed (with the offending glyphs missing).
If neither box nor blank fonts appear in the font description file,
such files cannot be printed at all.

\tfm\ fonts will always match at any size.
They must therefore appear late in the fontdesc file,
to keep them from `taking over' other fonts
whenever that is not desired.
Of course, when it {\em is\/} desired,
such as for built-in \ps\ fonts,
it should appear before other fonts so that it will indeed `take over'.
If nothing else,
this will improve performance
(since the conversion programs
will not have to hunt for nonexistent font files).

There are two kinds of font definition lines,
beginning with the words {\tt font} and {\tt fontenv}.
(Lines that start with any other word are ignored;
all other words are reserved for future expansion.)
The {\tt fontenv} form differs only slightly from that of {\tt font},
and its use will be described in a moment.
For a {\tt font},
there should be four more words following the word {\tt font}.
They are interpreted as follows:
\begin{description}
\item[type]
This is one of the seven font types
({\tt blank}, {\tt box}, {\tt gf},
{\tt invis}, {\tt pk}, {\tt pxl}, {\tt tfm}).

\item[spec]
This is a {\em print engine specifier}.
\TeX\ fonts come in several varieties.
The major kinds are `write black' and `write white'.
Each \dvi\ driver has a print engine specifier
(some have several);
only if the program's specifier matches that in the font description
will that font be used.
Thus, if you have both a Canon-based (write-black) printer
and a Ricoh-based (write-white) printer,
you can put the write-black and write-white fonts
in different subdirectories
and make sure that each driver
gets only the kind of fonts it uses.
An asterisk `{\tt *}' in the font description file
will match any print engine specifier;
this will suffice for many installations.

\item[slop]
The slop factor is used to make up for
the sins of finite-precision arithmetic.
Fonts come in various magnifications,
normally denoted as {\em magsteps}.
Each magstep corresponds to a power of 1.2.
For instance, \verb|\magstep4| is $1.2^4$, or $2.0736$.
These numbers are rounded to the nearest $.001$,
so that this becomes $2.074$.
Font files are named according to this magnification
multiplied by the number of dots per inch for that font.\footnote
{For \pxl\ files, the number is then multiplied by 5,
for reason which are neither good nor worth explaining.}
For instance, the \gf\ file for Computer Modern Roman, ten point, at
\verb|\magstep4| on a 300 dpi printer,
when both the \dvi\ file and user magnifications are 1000,
is called \verb|cmr10.622gf|.
The $622$ comes from the formula
$300 \cdot 2.074 \cdot 1000/1000 \cdot 1000/1000 = 622.2$.
In the course of all this arithmetic,
the computer has a tendency to get the last digit wrong.
The slop factor is used to correct for this.
The font library will look for magnifications
of up to $\pm\hbox{\rm slop}$ away from the number it computed.
Thus, a slop of 1 will allow an off-by-one error to slip by.
A slop of 0 requires an exact match.
Since fake fonts---blank, box, and invis---have no inherent magnification,
they should be given no slop;
others should have as little slop as possible
(the more there is, the slower things get).

\item[path]
The library builds the path based on a {\em format\/} specifier.
Characters other than the percent sign `{\tt \%}' are copied literally.
The percent sign introduces a {\em conversion},
similar to those in the C library `printf' routines.
A single percent sign can be obtained by doubling it, {\tt \%\%}.
The other conversions are as follows (the examples in
parentheses are for a font like \verb|cmr10 scaled \magstep4|
on a 300 dpi printer):
{\tt \%f}, which gets the name of the font ({\tt cmr10});
{\tt \%m}, which gets the magnification ({\tt 622});
and {\tt \%b}, which gets the {\em base name\/} of the font,
like {\tt \%f}, but omitting any numeric suffix ({\tt cmr}).
These three suffice to express most font organisations.
More formats may be added, if necessary, by changing {\tt lib/font.c}
(see the routine {\tt pave()}\footnote
{So named because it takes an abstract path (with percent escapes)
and makes it concrete, `paving it over' (as it were).
Well, I have been told never to explain a pun\ldots.}).
\end{description}

A {\tt fontenv} is almost exactly the same as a {\tt font},
except that the fifth word is the name of an environment variable
rather than an actual path format,
and that a sixth word (the {\em name part\/}) is required.
If the named variable is present in the environment
when the fontdesc file is being read,
it is split up like any other \Unix\ path
(i.e., at colons)
and each sub-pathname has the name part appended.
Each result is used as if it were the path portion
of a regular {\tt font}.
For instance, given the example fontdesc above,
if {\tt \$TEXFONTS} were set to {\tt /here:/there},
the line
\begin{quote}
\begin{verbatim}
fontenv pk      *       2       TEXFONTS        %f.%mpk
\end{verbatim}
\end{quote}
would make \mctex\ programs act as if the pair of lines
\begin{quote}
\begin{verbatim}
font    pk      *       2       /here/%f.%mpk
font    pk      *       2       /there/%f.%mpk
\end{verbatim}
\end{quote}
were included instead.
Typically,
the name part of each {\tt fontenv} will simply be {\tt\%f.\%m\it type}.
All \tfm-based fonts, however,
must have {\tt\%f.tfm} appended instead,
so that, e.g., a {\tt fontenv invis} for {\tt iamsss8} looks for 
{\tt iamsss8.tfm} rather than {\tt iamsss8.0invis}.

\subsection{Performance}
The startup time of \mctex\ drivers
is heavily influenced by the amount of directory searching done.
A long fontdesc file,
or a fontdesc file that uses long environment paths,
can slow these programs severely.
A {\tt fontenv} whose variable is not present in the environment
is ignored,
at essentially zero cost in speed,
so one way to reduce startup time
is to use a different environment variable for each kind of font.
For instance,
by looking for \pk\ fonts in {\tt\$PKFONTS}
and for \gf\ fonts in {\tt\$GFFONTS},
users with only \gf\ fonts can avoid one of the searches entirely.
In all cases,
the total amount of searching
can also be reduced by using a minimal `slop' value.

Searching stops as soon as a usable font is found,
so putting likely candidates first is also a good idea.
User directories tend to be less likely places to find font files,
so moving the main system directory to the first line will help.
Unfortunately,
this also makes it hard
for users to override the standard font files---they
will have to use different names for the fonts,
or set {\tt\$TEXFONTDESC} to name a different fontdesc file.\footnote
{The natural consequence of the latter is that,
some years later,
the fonts will be moved to some other directory,
and the system fontdesc updated,
and then several irate users will complain that the software is broken,
having forgotten that they copied and altered
the---now out of date---fontdesc file.
The administrator will demonstrate that the software works;
but the users will insist it does not.
After several hours of probing about,
someone will finally recall this footnote,
and the mystery will at last be explained.
In another few years, the cycle will then repeat.}
A reasonable compromise can be had
by using a {\tt fontenv} line
to refer to an unlikely environment variable name.
Those users who {\it want\/} to override the standard font files
can then set this variable,
and everyone else will enjoy faster font lookups.

\subsection{As Good as Berkeley}\label{sec:berk}
\mctex\ makes use of various features and extensions
found in the latest releases of Berkeley~\Unix.
The code is intended to be portable,
but its `home base' has always been 4{\sc bsd}
and in other environments \mctex\ may appear somewhat anemic.
This section describes some of the things you might do
if you are running other versions of \Unix,
or older versions of Berkeley~\Unix.

None of the various Makefiles list dependencies
from programs to header files.
Instead, these are kept in the file {\tt .depend}
in each subdirectory.
Current versions of Berkeley~\Unix\ (4.3{\sc bsd}-Tahoe and later)
know how to read these files automatically,
and running {\tt make depend} will update them
by invoking {\tt mkdep} with the proper options and files.
This has proven to be a much better way
to maintain correct dependency lists
than the traditional approach
of putting them directly in each Makefile
and updating them by hand or by machine.\footnote
{In particular, it works well with source code control systems.
One does not control object files, for instance,
and like the object code,
the dependencies are implicit in the sources.
But makefiles {\em are\/} sources,
and {\em should\/} be controlled,
so the dependencies must reside elsewhere.}
You can establish this (new) tradition on your system
without changing the existing {\tt make} program
or any Makefiles.
The Bourne shell script {\tt misc/make.sh}
runs {\tt /bin/make} such that it will read a {\tt .depend} file
if it exists and if no {\tt -f} argument is given.\footnote
{This is how the Berkeley {\tt make} operates.}
If you install this script as {\tt /usr/local/bin/make},
and put {\tt /usr/local/bin} on your path before {\tt /bin},
everything should work automatically.
Making {\tt make depend} work is somewhat more tricky.
A variant of the Berkeley {\tt mkdep} program appears in
{\tt misc/mkdep.sh};
this one runs {\tt /usr/local/lib/getdep}
rather than Berkeley's {\tt cc -M}
to get a proper list of dependencies.
This {\tt getdep} appears in {\tt misc/getdep.sh}.
It depends on certain features common to most \Unix\ C Preprocessors,
and is not guaranteed to work.
If it does work, however,
installing {\tt mkdep} in {\tt /usr/local/bin}
and {\tt getdep} in {\tt /usr/local/lib} should suffice.

You may have to muck with the shell scripts as well.
Some vendors have `enhanced' their versions of \Unix\
by tossing in the C shell
and making a few changes to the Bourne shell
without considering some \Unix\ history.
The Berkeley system allows executable scripts
that start with the letters \verb|#!|;
such scripts can be run directly by the kernel
by reading the first line
and using it as a path name for an {\em interpreter},
such as the Bourne shell.\footnote
{Dennis Ritchie relayed this idea to Berkeley
after trying it a post-Version~7 \Unix\ system
used internally at Bell Labs.
Steve Bourne suggested {\tt\#!}
as a generalised method of making interpreted files executable.
It works quite well in practise,
although the current Berkeley implementation
could be improved somewhat.}
Thus, the shell scripts in this distribution
all begin with the line \verb|#! /bin/sh|.
Unfortunately, on many of these `enhanced' systems,
the kernel cannot run such scripts directly,
and the rules used in the two shells
cause this to backfire.
Many years ago,
the Bourne shell did not understand comments,
and instead one used a `colon command'
(which did nothing, but did accept arguments)
to put commentary text into a script.
The C shell, however, understood comments from the beginning.
Someone decided that the way to choose which shell would run a script
would be to read the first character of that script.
If the character were `{\tt\#}', the script would be given to the C shell,
while if it were `{\tt:}', the script would be passed to the Bourne shell.
(Exactly what happens if the character is neither
is not quite as well defined.
Most systems give such scripts to {\tt /bin/sh},
but a few have been known to use {\tt \$SHELL}.)
All of this boils down to the fact that if you have such a system,
you will have to add a line containing a single colon `{\tt:}'
to each script before installing it.
The command
\begin{quote}
\begin{verbatim}
find . -name '*.sh' -print
\end{verbatim}
\end{quote}
will, when run from the top-level directory,
produce a list of all such shell scripts in this distribution.

\subsection{Setting up {\tt pstex}}\label{sec:installation:pstex}
\subsubsection{{\tt Pstex} and \ps\ fonts}
To get \pstex---or rather, \dvips---to use \ps\ fonts,
you must build versions of \TeX\ and \LaTeX\
(and any other commonly-used \TeX s)
that use special \tfm\ files,
and tell \dvips\ that these files are special.

The first step is to obtain Adobe Font Metrics (`AFM files')
for your printer-resident fonts.
The only completely reliable way to do this
is to read the Adobe metrics out of your printer.
This is printer-dependent; see the printer's user's manual.
Your vendor may have done this step for you already,
or you can obtain AFM files from a friend or neighbour
in much the same was as you obtained \mctex.
There is no guarantee that any two printers use the same metrics,
so do not be too surprised
if files ferried from friends fall flat.\footnote
{Awful alliteration, perhaps,
but what else can you expect when I write at 2 {\sc A.M.}?}

Once you have the font metrics,
you must convert them into \TeX\ font metrics.
A program that does this is supplied with the \Unix\ \TeX\ distribution.
This step, too, may have already been done for you.
The directory {\tt psfonts/tfm}
contains a set of metric files that may work,
along with a Makefile that can install them.
Your system must support long file names,
and the correctness of these metrics is uncertain.\footnote
{I have only the Times series of \ps\ fonts in my LaserWriter,
so I cannot test the others.
The Times files do, however, work on my machine.}

Next, you must tell \dvips\ about the special fonts.
This is done by listing their names in a {\em map file}.
This file maps\footnote
{Big surprise, eh?}
from an arbitrary name
(such as {\tt t-rom} or {\tt TmsRmn} or {\tt PS-Times-Roman})
to a `true \ps' name
(such as {\tt Times-Roman}).
The arbitrary name can be anything you like,\footnote
{Another big surprise.}
though it is intended to be a `short' form;
but the \ps\ name must be one that will be recognised by the printer.
There is an exception to the latter rule:
The \ps\ name can be the name of a font created `on the fly'.
This is used to make up mathematics and `caps and small caps' fonts.
Both the short (arbitrary) and \ps\ names will be recognised
and interpreted as requests to use \ps\ fonts.
The short name is not necessary
unless your system cannot handle long file names,
so it can be omitted if desired;
the default short names in this distribution
do not conflict with any standard \TeX\ fonts,
so you need not change or omit them
even if you will not use them.
The same \ps\ name may also be the target of several short names.
The only real requirement is that each \ps\ name appear at least once.

The map file is called {\tt TeXPSfonts.map}.
The source for this file is in the \dvips\ directory,
and the file will be installed in
\verb|${LIBDIR}/ps/TeXPSfonts.map|,
where \dvips\ looks by default.
To get \dvips\ to read some other file,
set the environment variable {\tt PSFONTMAP}
to the path name of that file.
Each non-blank line in the map file
should have either two or three words.
The first word is the arbitrary (short) font name,
or a period `{\tt .}' if no short name is to be omitted;\footnote
{Anything that begins with a period will do.
All such font names are illegal as far as \TeX\ itself is concerned,
and thus these will never conflict with a real \TeX\ font.}
the second is the \ps\ name for that font;
and the third word, if present,
is an {\em initialisation string\/}
that is used to create the \ps\ name on the fly,
setting up the font the way \TeX\ expects to find it.
(Since this string always contains whitespace, it must be quoted.)
What goes in the string itself
is determined by the prologue file
combined with the method by which the font is made
and the use to which it is put.\footnote
{What this really means is that I have no idea
how you make these up.
Mine are all cribbed from elsewhere.}

While the \dvips\ program will recognise the \ps\ fonts as `special',
it still needs the \TeX\ font metrics for each of these fonts,
just as \TeX\ itself does.
You must therefore install the (possibly renamed) \tfm\ files
in the regular \TeX\ \tfm\ directory,
so that \TeX\ can find them,
and then add a line of the form
\begin{quote}
\begin{verbatim}
font tfm PostScript 0 /usr/local/lib/tex/fonts/%f.tfm
\end{verbatim}
\end{quote}
to your fontdesc file,
so that \dvips\ can also get at them.\footnote
{Note that the print engine specifier here is {\tt PostScript},
with uppercase P and S,
and does not include the name of the actual print engine,
on the assumption that Adobe fonts are the same
on all print engines in use at your site.
This assumption will no doubt be false somewhere
and the scheme described here might change in a future release.
Of course, \TeX\ itself needs correct metrics,
and right now the only way to deal with that
is to have different name mappings for each differing printer,
with which \dvips\ will have no trouble.
It is, however, an ugly solution.}
Use whatever pathname you gave to \TeX\ for its \tfm\ files.
Be sure that this line is early in the fontdesc file.
If it comes after any {\tt blank} or {\tt box} font lines,
you will get spurious warning messages.
If it comes after regular font definitions,
\dvips\ will try to read the corresponding \gf\ or \pk\ file
just for its \TeX\ metrics;
this will be excessively slow.

Once you have done all of these things,
you can make special versions of Plain \TeX\ and \LaTeX\
(and/or special style files for \LaTeX)
that use these fonts in place of the standard Computer Modern fonts.
For instance,
if you use the standard mapping,
which includes mapping the names
{\tt t-rom}, {\tt t-ita}, and {\tt t-bol}
to {\tt Times-Roman}, {\tt Times-Italic}, and {\tt Times-Bold},
the sequence
\begin{quote}
\begin{verbatim}
\font\tenrm=t-rom
\font\tenit=t-ita
\font\tenbf=t-bol
\end{verbatim}
\end{quote}
would suffice to convince \TeX\ to use Times
for 10 point Roman, italic, and bold fonts.
The \ps\ names are preferable,
since it will be more obvious
to any others who may read your \TeX\ source
that they refer to \ps\ fonts:
\begin{quote}
\begin{verbatim}
\font\tenrm=Times-Roman
\font\tenit=Times-Italic
\font\tenbf=Times-Bold
\end{verbatim}
\end{quote}
Aside from the change of font names,
you build the special \TeX s
the same way as the regular versions.
Be sure to note the names and functions
of the modified \TeX s in your local guide.
If you choose not to build special \TeX s---e.g.,
if you use special style files,
which is slower but more convenient---note that
in your local guide instead.
The directory {\tt psfonts/sty} contains a set of style files
that should work (provided your system handles long file names),
along with a Makefile that can install them.

(Note that, as pointed out in {\em The \TeX book},
the result of scaling a five-point font
does not look right at ten point.
Similarly,
\begin{quote}
\begin{verbatim}
\font\halfinch=Times-Roman at 36pt
\end{verbatim}
\end{quote}
yeilds a `fat' 36 point Roman font.
The convenience of the \ps\ fonts
has its price.)

\subsubsection{Taming {\tt pstex}}
The mode-setting options
listed in Table~\ref{tab:pstex:opts}~(p.~\pageref{tab:pstex:opts})
invoke the printer's {\tt letter}, {\tt legal}, and {\tt note}
mode-changing commands,
which should not normally be done directly by \ps\ jobs.
(It goofs up the inclusion of \ps\ within other \ps,
for instance.
There are other reasons as well, on some larger \ps\ printers.)
If you only have Apple or Sun LaserWriters,
you can usually ignore this,
but a better way to handle printer modes
is through the print manager (`spooler').
To do this,
you will have to edit the {\tt pstex} shell script source
in {\tt postscript/pstex.sh}.
It contains code to scan {\tt -o} options for mode-setting options
and extract them into {\tt \$mode},
but does nothing with the extracted option,
and that code itself is commented out,
primarily because there is no standard way to handle the mode option
once it has been extracted.

The \ps\ prologue file {\tt postscript/postscript.pro}
can be told to ignore the mode-changing part of mode-changing options,
so that only the size declaration will have any effect.
If you change {\tt pstex.sh}, you need not change this,
but for those who want to be thorough,
all you need do is edit {\tt postscript.pro}
and change the line
\begin{quote}
\tt/canclobber true def \% allow paper-mode commands
\end{quote}
to
\begin{quote}
\tt/canclobber false def \% disable paper-mode commands
\end{quote}
(then, of course, reinstall).

Adding new paper mode and size changing commands is trivial.
Simply add the appropriate commands to {\tt postscript.pro}
and add the option names to the table in {\tt postscript.c}.
For instance,
if you wanted to add `blueprint' and `blueprintsize' options
(always assuming the printer had such an option),
you might add the commands
\begin{quote}
\begin{verbatim}
/@blueprint { /blueprint @setmode @blueprintsize } def
/@blueprintsize { 48 30 set@wh @setup } def
\end{verbatim}
\end{quote}
The arguments to {\tt set@wh} are the width and height,
respectively, of the page, in inches.
The {\tt @setup} function needs these
to compute the offset from \ps's $(0,0)$ coordinate
to \TeX's $(0,0)$ coordinate.\footnote
{It really needs only the paper height,
but both are required by {\tt set@wh}
in case that turns out to be necessary someday.
Incidentally, the size above is almost certainly not the standard size
of a blueprint;
I simply guessed.
It has been too many years since I last used one.}
You would then have to add the names
{\tt blueprint} and {\tt blueprintsize}
to the {\tt documentoptions} table in {\tt postscript.c}.
If you are making {\tt pstex} catch mode-changing options,
you would have to change that too.

\subsubsection{Psfig}
A version of Trevor Darrel's psfig
is included in this distribution,
in the {\tt psfig} directory.
It has been altered to fit into the \mctex\ system,
and installation should be trivial.
The Psfig User's Guide (edited somewhat by Torek)
appears in the same directory.

% \subsection{Porting \& Customization}
% \iptex\ and the \dvi\ library have been ported to the AT\&T 3B,
% the DEC VAX, Sun 3, and IBM PC/RT series of computers.
% \texx\ is known to work on the IBM PC/RT and Sun workstations.
% 
% Font shrinking for \texx\ is done in byte-order independent manner,
% but it depends on a type (usually {\tt short}) being 16 bits long.
% If you have troubles installing \texx, look at the file
% {\tt previewers/dvistuff.c} to see if you need to change anything.
% 
% You may also want to change {\tt previewers/dvistuff.h} to change
% the default values for margins and the device resolution of your
% font family.
% 
% \iptex\ currently understands a set of \dvi\ {\tt special} commands
% which allow it to draw lines using Imagen primitives.
% At the Univ. of Illinois, we have a program called {\tt texpic},
% a version of PIC for \TeX, which uses these specials to draw pictures.
% A subset of these specials are implemented by \texx.
% In the future, it is hoped that PostScript specials will be provided,
% but don't hold your breath.