% Document describing how to use TeX in the CS department.
\documentstyle[12pt,a4]{report}

\input dmbmacs.tex
\pagenumbering{arabic}
\pagestyle{headings}

\begin{document}

\begin{titlepage}
\vspace*{35 true mm}
\begin{center}
\twtyrm{
Using {\TeX} in the CS Department. \\[1ex]
Duncan Baillie \\[2ex]
}
\today
\end{center}
\end{titlepage}

\tableofcontents
\listoftables

\chapter{Introduction}
This document is so spectacularly out of date it is not worth printing it,
let alone reading it. Its prolonged existence is due to the dubious 
distinction of being an {\it example} file. Almost all the information in
this document is wrong. Before you start using \LaTeX\ I strongly
recommend that you read the \LaTeX\ manual thoroughly.

This document should help you to produce
beautiful documents in the Computer Science department. More specifically,
it describes how to set up and use the {\TeX} typesetting system and all
its related software. It does not describe how to produce a source for {\TeX}
(or whatever) nor all the sordid details of how to log on to the relevant
machine, run the editor etc.---it is assumed that the reader can do all that.

The system is spread over several machines and there are separate chapters
to describe the software on each host. These hosts are currently the {\vax}-780
(\ecsvax{}) running VMS, {\vax}-750 ({\tt cstvax}) running UNIX,
the SUN workstations (also running UNIX)
and finally the departmental {\apm}s. Typically, {\TeX} is run
on one of the VAXs and the output sent to the {\apm}s for previewing and
printing.

{\TeX} itself operates at a low level and is designed to be used with macro
packages which present a friendlier interface to the user. {\LaTeX} is an
example of a set of macro packages for {\TeX}. In addition to the macro
packages there are a number of programs to help install and debug {\TeX}---they
are also described here but the majority of users will not be concerned with
them.

{\TeX} and {\LaTeX} are available as an alternative to the SCRIBE document
production system. Documentation for {\TeX} is found in ``The {\TeX}book'' by
Donald E. Knuth (the author of {\TeX} itself); the
department owns several copies. Most users will probably wish to make use of
{\LaTeX}, which is a version of {\TeX} that is designed to be easier to use than
standard {\TeX}. {\LaTeX} is modelled on SCRIBE and therefore contains more
high-level commands for the preparation of articles and dissertations. Quite
a few printed copies of the {\LaTeX} manual are drifting about; there is a
reference copy (do not steal) in the level 1 Terminal Room (Room 1413)\footnote{
WARNING: The {\LaTeX} manual distributed with the
software describes version 2.0, with several pages of `update' at the end
describing the changes between version 2.0 and subsequent versions. Most of
the {\LaTeX} manuals in the department have marginal notes pencilled in to refer
the reader to the back of the manual when the text is no longer accurate.
Don't ignore these!}.

There are several advantages to {\TeX}/{\LaTeX} rather than SCRIBE. Most people
agree that the output looks better. {\TeX} was specifically designed for
typesetting mathematical texts (although this doesn't mean that it's only for
formula freaks). {\TeX} runs faster then SCRIBE and therefore causes less
strain on the system.

A {\TeX} mailing list exists to notify users of changes and additions to the
system. Contact DMB to have your name added to the list.

% \chapter{Using {\TeX} on \vmsvax}
% Before {\TeX} can be used on {\vms} the command:
%   \begin{instn}
%     {\$~setup~tex}
%   \end{instn}
% must be given. This gives access to the following {\TeX} facilities:
%   \begin{itemize}
%     {\tt
%     \item latex, latexm
%     \item tex
%     \item toapm
%     \item tangle, weave, dvitype, pooltype, initex, pltotf, tftopl}
%   \end{itemize}
% For those who are interested, the file 
% {\tt \hbox{ECS\_ROOT:[CONFIG]TEX.STP}} contains the
% setup commands. Most people will only be using the commands {\tt latex}
% and {\tt tex}
% to produce various documents---the rest of the commands are for advanced
% {\TeX} uses.{\tt\ setup~tex\ }also defines several logical names, the most
% important of which is {\tt TEX\$}. All files used by {\TeX} will be in the
% {\tt TEX\$} directory somewhere, so if you want to find out (say) what fonts
% are available this is the place to start looking.
% 
% There is a file \hbox{\tt SYS\$SYSDEVICE:[ALERT]TEXNEWS.TXT} which contains
% alert information about {\TeX} on \ecsvax{}. Users will be notified when new
% items are contributed to this file.
% \section{{\LaTeX} and {\LaTeX}-M}
% If you don't already have an input file for {\LaTeX} take a copy of an example
% file from {\tt \hbox{TEX\$SAMPLES:texhelp.tex}} (which is this document). 
% To produce a {\dvi} file
% capable
% of being printed simply type:
%   \begin{instn}
%     {\$~latex~texhelp}
%   \end{instn}
% {\LaTeX} will respond with the something like the following:
% \begin{footnotesize}
% \begin{verbatim}
%     This is TeX, Vax/VMS Version 1.1 (no format preloaded)
%     (U1:[PG.DMB.TEX]TEXHELP.TEX;1
%     Latex Version 2.07 - Release 14 November 1984
%     (ECS_TEXT:[TEX.INPUTS]REPORT.STY;2
%     Document Style 'report'. Version 0.91 - released 9 November 1984
% etc ...
% \end{verbatim}
% \end{footnotesize}
% While running on this example, {\LaTeX} will produce warnings 
% on the screen about unavailable typefaces, undefined references and lots
% of information about overfull and underfull hboxes and vboxes.
% 
% The unavailable typeface warning appears because the document was designed
% to be used with the {\tt latexm} command, described below. The undefined
% references are due to the fact that this is the first time that you have
% processed this document with {\LaTeX}; these warnings will disappear 
% on second and
% subsequent runs. The messages about hboxes and vboxes indicate formatting
% problems that should be fixed by the user. They occur when various {\TeX}
% parameters are exceeded (for more information see the TeXbook) and can
% be removed by altering the value of the parameters or rearranging the text
% of the document.
% 
% The command {\tt latexm} is available, which is a version of LaTeX that
% uses a selection of slightly magnified fonts that look better on the 
% laserprinter and are suitable for reduction.
% The file {\tt \hbox{TEX\$LATEX:LATEXM.HLP}} contains details
% of the differences between {\LaTeX} and {\LaTeX}-M.
% 
% When {\LaTeX} has finished you will see that it has created the following files:
% \begin{center}
%   \begin{tabular}{llr}
%       texhelp.dvi &output file for printing\\
%       texhelp.lis &listing file contains information on run\\
%       texhelp.toc &table of contents file\\
%       texhelp.lot &list of tables file\\
%       texhelp.aux 
%   \end{tabular}
% \end{center}
% In order to preview the output produced by {\LaTeX}, the {\dvi} file must
% be moved to
% the {\apm} filestore.
% It is recommended that you preview the document before actually trying to print
% it to save paper and time if the output is incorrect.
% If you do not have an account on the filestore then
% you will have to use the command {\tt toapm} described below, otherwise you
% can use the {\tt tofs} command on \ecsvax{} or {\tt eftp} on the \apm{}.
% 
% Once you are certain that your document is in a printable state you can use
% the command {\tt laser} (see section~2.4) to print it out. 
% Note that if your file
% is already on the filestore it is easier to print from there as the
% laserprinter is connected to an {\apm}.
% 
% \subsection{Additional Document Styles}
% Users here have developed several additional document styles. \LaTeX{}, being
% colonial in origin, does not default to A4 page margins. An additional option,
% `a4', has been added to the {\tt \bs documentstyle} command
% (described on page~6 of
% the update). For example, those wanting an article with the 12pt fonts and
% A4 paper should type:
%   \begin{instn}
%     {\bs documentstyle[12pt,a4]\{article\}}
%   \end{instn}
% 
% Those users writing dissertations (or similarly structured documents) may want
% to make use of a special additional document style `euthesis', which sets the
% proper page format for this university. This is only set up for 12pt fonts at
% the moment. To make use of this style, issue the command:
%   \begin{instn}
%     {\bs documentstyle\{euthesis\}}.
%   \end{instn}
% Note that the `a4' option is not necessary. If you specify the `draft' option
% here, the word `draft' with the date is printed on the bottom of each page.
% 
% The document style `euthesis' has two new options for page styles. If you issue
% the command
%   \begin{instn}
%     {\bs pagestyle\{NGThead\}}
%   \end{instn}
% you'll get {\Scribe}-like running headers,
% i.e. lower case, italics, flushed left, with the page number flushed right at
% the top of the page. If you issue the command:
%   \begin{instn}
%     {\bs pagestyle\{OShead\}}
%   \end{instn}
% you'll
% get lower case, centered, slanted running headers with the page number at the
% bottom. If either of these two (or the normal pagestyle) doesn't meet your
% approval, {\tt \hbox{TEX\$LATEX:EUTHES12.DOC}} contains a list of
% definitions you can look at and
% then design your own.
% 
% The file {\tt \hbox{TEX\$LATEX:USEFUL.TEX}} contains commands that may be
% useful to many users. Included are: several simple commands to change the
% line-spacing (which {\LaTeX} doesn't provide); a {\Scribe}-like `comment'
% command and a way of getting the captions of figures to come out in a bold
% font. This file also contains the definitions of the two new page styles
% provided in `euthesis' (but you won't need to define these unless you're
% using some other document style). Other commands will probably be added here
% as more users develop useful things of general interest. Another file has been
% set up that modifies some font stuff in order to make your output that little
% bit more perfect. Oliver Schoett has corrected some careless work in {\LaTeX}'s
% definitions, and most people should take advantage of this by putting the
% command
%   \begin{instn}
%     {\bs input\{lmacs\}}
%   \end{instn}
% in the {\LaTeX} file. (The file is
% {\tt \hbox{TEX\$INPUTS:LMACS.TEX}} if you're interested).
% 
% \section{{\TeX}}
% \subsection{Plain {\TeX}}
% If you have read the TeXbook you will be familiar with the story example
% given in chapter~6. If you have not already created the file {\tt story.tex} for
% yourself, a copy can be found in the file 
% {\tt \hbox{TEX\$SAMPLES:STORY.TEX}}. In order to produce a
% {\tt story.dvi} file
% capable of being printed simply type:
%   \begin{instn}
%     {\$~tex~story}
%   \end{instn}
% {\TeX} will respond with the following:
% \begin{footnotesize}
% \begin{verbatim}
%     This is TeX, Vax/VMS Version 1.1 (no format preloaded)
%     (U1:[PG.DMB.TEX]STORY.TEX;2 [1])
%     *\bye
%     Output written on U1:[PG.DMB.TEX]STORY.DVI;2 (1 page, 672 bytes).
%     Transcript written on U1:[PG.DMB.TEX]STORY.LIS;2.
% \end{verbatim}
% \end{footnotesize}
% and you notice that it has produced the following files:
%   \begin{instn}
%     {
%     STORY.DVI \\
%     STORY.LIS}
%   \end{instn}
% To view the {\dvi} file that {\TeX} has produced it is necessary
% to move the file be the {\apm} filestore---{\tt toapm}
% is probably the next command you will want to use.
% 
% If you are confident that your document is ready for printing however you
% can use the {\ecsvax} {\tt laser} command (see section~2.4).
% 
% \subsection{\amstex}
% The American Mathematical Society, which was partly responsible for
% commissioning {\TeX} and has established the {\TeX} Users Group TUGboat,
% produced a set of macros to be used with plain format {\TeX}. They reside
% in {\tt \hbox{TEX\$INPUTS:AMSTEX.TEX}} and so can be used by including the
% command:
%   \begin{instn}
%     \bs input~amstex
%   \end{instn}
% at the start of the manuscript. These macros are not in use in the
% department (because they're not very useful)
% so you will be trailblazing if you want to try them out. The manual
% for {\amstex} can be found in the directory {\tt \hbox{TEX\$AMSTEX}} along with
% most of the other {\amstex} stuff. 
% 
% \subsection{HP macros}
% As with the {\amstex} macros, the HP macros are not in use in the department.
% If you do want to experiment with them though, the relevant directory is
% {\tt \hbox{TEX\$HP}}.
% 
% \section{Running long {\TeX} jobs}
% People using {\TeX} may soon find that their documents are taking a fairly
% long time to be processed and running {\TeX} and {\LaTeX} as a batch job
% is more appropriate. If you are running {\TeX} as a batch job
% the only thing to remember is to give {\TeX}
% the command:
%   \begin{instn}
%      \bs batchmode
%   \end{instn}
% at the start of your source to prevent {\TeX}
% from attempting to read input from the terminal should an error occur.
% 
% The same effect can be achieved interactively by typing {\tt latex} on
% a line by itself. At the {\tt *} prompt you can type:
%   \begin{instn}
%      *\bs batchmode\bs input filename
%   \end{instn}
% 
% \section{toapm and laser}
% To send the file {\tt texhelp.dvi} to the public account on the {\apm} filestore
% type:
%   \begin{instn}
%     \$~toapm~texhelp.dvi
%   \end{instn}
% {\ecsvax} will respond with the following:
% \begin{footnotesize}
% \begin{verbatim}
%    ::B:PUB's pass:
%    Sending U1:[PG.DMB.TEX]texhelp.dvi;1 to ::B:PUB:texhelp.dvi
%    Disconnecting....
% \end{verbatim}
% \end{footnotesize}
% type {\tt return} in reply to the password prompt. To print the file on the 
% laserprinter type:
%   \begin{instn}
%     \$~laser~texhelp.dvi
%   \end{instn}
% to which {\ecsvax} will respond:
% \begin{footnotesize}
% \begin{verbatim}
%     Print U1:[PG.DMB.TEX]TEXHELP.DVI;20 (104 Blocks)
% \end{verbatim}
% \end{footnotesize}
% Note that to use this command you have to be accredited to a list of users.
% See AJS or GLC if you want to be added to this list.
% 
% \section{TeXware}
% This section describes some of the more esoteric pieces of {\TeX} software
% on the vax. Do not read this if you are only concerned with writing and
% printing beautiful documents.
% 
% \subsection{The {\web} System}
% The \web{} system of structured documentation is a combination of the \pascal{}
% programming language and the \TeX{} typesetting language, with a macro facility
% (cf. {\tt C}'s pre-processor) thrown in.   \TeX{} itself, together with the
% \TeX{}ware described below and the \web{} software (\tangle{} and
% \weave{}) are all written in \web{}.
% 
% The \web{} user manual lives in the file
% {\tt \hbox{TEX\$DOC:WEBMAN.TEX}}
% for ``experienced system programmers'' who wish to learn how to use this
% system.  The two programs required by this package, \tangle{} and \weave{},
% can be invoked thus:
%   \begin{instn}
%     {\$~tangle~mywebfile}
%   \end{instn}
% where the source file is `{\tt mywebfile.web}' (and similarly for \weave{}),
% assuming that a{\tt\ setup~tex\ }command has 
% been issued.
% 
% A very useful feature of the \web{} system is the concept of a {\it change\/}
% file (its extension is usually `{\tt .CH}').  This contains a list of
% changes to be made to the {\tt .WEB} file.   It provides a very clean way
% of `fixing' software to the local compiler and run-time system, without
% having to hack the main source.   This should mean that once one change file
% has been created, up-grades will require just minor changes to the change file,
% rather than having to start from scratch again, trying to work out the
% alteration made last time.
% 
% \subsubsection{\tangle{}ing the program \dots{} }
% Applying \tangle{} to a \web{} file will produce a {\tt .PAS} file which
% contains the a \pascal{} program, to be compiled, linked and executed.
% The code generated is `sterilised', and is very difficult for humans to read,
% but easily digestible by a compiler.
% 
% \subsubsection{\dots{} \weave{}ing the documentation}
% The same \web{} file can also be fed through a program called \weave{}, which
% generates a {\tt .TEX} file.   {\tt Plain} \TeX{} will convert this to a
% beautifully typeset listing of the \pascal{} program, complete with contents
% page, index and cross-references.
% 
% \subsection{DVItype}
% To help decide whether an incorrect output is due to the version of \TeX{}
% that produced the {\dvi} file, or to the output driver that interpreted
% it, \dvitype{} will convert a \dvi{} file into a form readable by humans,
% reporting any obvious faults in it.
% 
% The program listing contains a full description of the format of \TeX{}'s
% \dvi{} files.
% 
% \subsection{\pltotf{} and \tftopl{}}
% \pltotf{} converts property-list files ({\tt PL}s) into their 
% corresponding \TeX{}
% font metric files ({\tt TFM}s).   Any mistakes in the {\tt PL} file 
% which could give
% \TeX{} a problem should be spotted.   A detailed description of the format of
% a {\tt PL} file is included as comments in the program listing.
% 
% The \tftopl{} utility converts \TeX{}
% font metric files ({\tt TFM}s) into their equivalent
% property-list files ({\tt PL}s), pointing out any faults in the {\tt TFM} 
% file.   The
% program listing contains a detailed description of the format of a {\tt TFM}
% file.
% 
% \subsection{\pooltype{}}
% \pooltype{} is a fairly simple program which takes the string pool files
% produced by \tangle{} and prints them in a prettier format.   It is
% provided mainly as first stage stepping stone for people trying to port
% more complex stuff (the whole \TeX{} package).   On the off-chance someone
% is unable to work out the format of a {\tt .POO} file by looking at an
% example, this program contains a description of the format.
% 
\chapter{Using {\TeX} Facilites on the {\apm}'s}
Let's assume that you are sitting in front of a {\it graphics} {\apm} ready
to preview your document. If you used the {\tt toapm} command on {\ecsvax} you
will first have to log on to the public account on the `B' filestore. To do
this type:
  \begin{instn}
    \} l b::pub
  \end{instn}
typing {\tt return} in response to the {\tt Pass:} prompt. The system will then
print a log in message and possibly some {\TeX} alert information\footnote{
Check that your file is present by typing {\tt f} and remember to delete it
when you have finished with it.}.
Note that
if you are logging on to your own account you will have to issue the 
command{\tt\ setup~tex\ }(this is done automatically on the public account).

\section{Previewing a Document---tpre}
To run the preview program type:
  \begin{instn}
    \}~tpre~texhelp
  \end{instn}
The left half of the screen shows a blue box indicating the margins for the
laser printer, the text of the current page in red and a white box which can be
moved around the page by the mouse or function keys.

The user may move the window over the page, zoom in and out, then draw the
contents of the window expanded to fill the screen; any movement of the mouse,
or pressing of the mouse or terminal keys will cause the display to
revert to the original form.

When finished viewing a particular page, the user may move to either the
previous page, the next page or pick his own page. In the latter case, the
terminal will prompt for the next page to be viewed.

\begin{table}
  {\huge
             \makebox[19.99mm]{\framebox[20mm][c]{\rule[-7mm]{0ex}{20mm}7}}
             \makebox[19.99mm]{\framebox[20mm][c]{\rule[-7mm]{0ex}{20mm}8}}
             \makebox[19.99mm]{\framebox[20mm][c]{\rule[-7mm]{0ex}{20mm}9}}
       \hfill\makebox[19.99mm]{\framebox[20mm][c]{\rule[-7mm]{0ex}{20mm}$\nwarrow$}}
             \makebox[19.99mm]{\framebox[20mm][c]{\rule[-7mm]{0ex}{20mm}$\uparrow$}}
             \makebox[19.99mm]{\framebox[20mm][c]{\rule[-7mm]{0ex}{20mm}$\nearrow$}}
   \linebreak
             \makebox[19.99mm]{\framebox[20mm][c]{\rule[-7mm]{0ex}{20mm}4}}
             \makebox[19.99mm]{\framebox[20mm][c]{\rule[-7mm]{0ex}{20mm}5}}
             \makebox[19.99mm]{\framebox[20mm][c]{\rule[-7mm]{0ex}{20mm}6}}
       \hfill\makebox[19.99mm]{\framebox[20mm][c]{\rule[-7mm]{0ex}{20mm}$\leftarrow$}}
             \makebox[19.99mm]{\framebox[20mm][c]{\rule[-7mm]{0ex}{20mm}{\large Draw}}}
             \makebox[19.99mm]{\framebox[20mm][c]{\rule[-7mm]{0ex}{20mm}$\rightarrow$}}
   \linebreak
             \makebox[19.99mm]{\framebox[20mm][c]{\rule[-7mm]{0ex}{20mm}1}}
             \makebox[19.99mm]{\framebox[20mm][c]{\rule[-7mm]{0ex}{20mm}2}}
             \makebox[19.99mm]{\framebox[20mm][c]{\rule[-7mm]{0ex}{20mm}3}}
       \hfill\makebox[19.99mm]{\framebox[20mm][c]{\rule[-7mm]{0ex}{20mm}$\swarrow$}}
             \makebox[19.99mm]{\framebox[20mm][c]{\rule[-7mm]{0ex}{20mm}$\downarrow$}}
             \makebox[19.99mm]{\framebox[20mm][c]{\rule[-7mm]{0ex}{20mm}$\searrow$}}
   \linebreak
             \makebox[19.99mm]{\framebox[20mm][c]{\rule[-7mm]{0ex}{20mm}0}}
             \makebox[19.99mm]{\framebox[20mm][c]{\rule[-7mm]{0ex}{20mm},}}
             \makebox[19.99mm]{\framebox[20mm][c]{\rule[-7mm]{0ex}{20mm}.}}
       \hfill\makebox[19.99mm]{\framebox[20mm][c]{\rule[-7mm]{0ex}{20mm}{\large Prev.}}}
             \makebox[19.99mm]{\framebox[20mm][c]{\rule[-7mm]{0ex}{20mm}{\large Pick}}}
             \makebox[19.99mm]{\framebox[20mm][c]{\rule[-7mm]{0ex}{20mm}{\large Next}}}
   \linebreak
             \makebox[29.99mm]{\framebox[30mm][c]{\rule[-7mm]{0ex}{20mm}---}}
             \phantom{\makebox[0mm]{\framebox[0mm][c]{}}}
             \makebox[29.99mm]{\framebox[30mm][c]{\rule[-7mm]{0ex}{20mm}{\large ENTER}}}
       \hfill\makebox[29.99mm]{\framebox[30mm][c]{\rule[-7mm]{0ex}{20mm}{\large Zoom Out}}}
             \phantom{\makebox[0mm]{\framebox[0mm][c]{}}}
             \makebox[29.99mm]{\framebox[30mm][c]{\rule[-7mm]{0ex}{20mm}{\large Zoom In}}}
   \linebreak}
   \vspace{0.1in}
   \hfill\linebreak
       \parbox{5mm}{\phantom{a}}
             \parbox{7mm}{(a)}\parbox[t]{43mm}{\it Keypad inscriptions}
       \hfill\parbox{7mm}{(b)}\parbox[t]{43mm}{{\it Function in\/} Preview}
       \parbox{5mm}{\phantom{a}}\linebreak
 \caption{Visual 200 keypad functions within Preview}
 \label{keypad}
\end{table}

\subsubsection{Keyboard Controls}
All operations (except {\tt Ctrl-Y} to end the program) can be carried out
using the numeric keypad on the{\tt\ Visual 200\ }terminal; table~\ref{keypad}
shows the function of each key. The keys can also be used while holding
down the 
{\tt convert function} key which 
gives a fast-move in the direction specified and
allows the first or last page to be chosen immediately. All these functions
are shown on the right hand of the screen when previewing a document.

\begin{table}
 \begin{center}
  \begin{tabular}{||ccc|l||}
    \hline
    \multicolumn{3}{||c|}{Buttons pressed}&Function\\
    \hline
     &*& &Draw window\\
{}  *& & &Zoom out\\
     & &*&Zoom in\\
{}  *&*& &Previous page\\
     &*&*&Next page\\
{}  *& &*&Pick a page\\
{}  *&*&*&Quit program\\
    \hline
    \multicolumn{4}{c}{}\\
    \multicolumn{4}{c}{*: Button pressed}\\
  \end{tabular}
 \end{center}
 \caption{Mouse button functions within Preview}
 \label{mouse}
\end{table}

\subsubsection{Mouse Controls}
If a mouse is fitted to the {\apm} (which is normal for {\apm}s with graphics
screens) all operations can be carried out by the mouse (except specifying
page numbers). The window is moved around by moving the mouse in the
appropriate direction---other functions are called by using the buttons on the
mouse, either singly or in combination, as detailed in table~\ref{mouse}.

\subsubsection{Specifying a Page Number}
When picking the next page to view, the user is asked to enter a page number.
The syntax is quite flexible, to allow two different methods of refering to
pages.

The first method is to call them as {\TeX} does. This is done by typing as
many numbers as required (for count0 \dots count9) seperated by full stops.
If a {\dvi} file contains two or more pages with the same page number, the
$n^{th}$ occurence of a page may be requested by adding either {\tt `\%n'} or
{\tt `,n'} to the end of the specification.

The alternative method is to specify the page by its position in the
{\dvi} file: the first page would be called either {\tt `\%1'} or
{\tt `,1'}, etc.

\subsection{Parameters and Qualifiers}
When the preview and laser (see below) programs are called, the name of a
\dvi{} file
has to be specified as the parameter.   If no filename is explicitly
given, then {\tt TEXPUT.DVI} is assumed; if a filename without any
extension is given, the extension {\tt .DVI} is supplied automatically.
The programs search for a file of this name firstly in the current default
directory, and, if this fails, in directory {\tt T\_TEK:}.

\begin{table}
 \begin{center}
  \begin{tabular}{||l|l|c|l||}
    \hline
    Option       &Type   &Default      &Meaning\\
    \hline
    &&&\\[-1.9ex]
    \hline
    DO           &String &``''         &\dag Range of pages
\\[0.9ex]
    COPIES       &Integer&1            &\dag Copies to be printed\\
    SYMBOLS      &       &10000        &Most characters+rulers per page\\
    MAGnification&       &0            &Non-zero value over-rides file\\
    LEFT         &       &0            &Move left margin (unit: $\frac{1}{300}$'')\\
    TOP          &       &0            &Move top  margin (unit: $\frac{1}{300}$'')
\\[0.9ex]
    DEBUG        &Boolean&off          &Print debugging info\\
    ERRORS       &       &on           &Print error messages\\
    PHASE        &       &on           &Print what the machine is doing\\
    FONTS        &       &off          &Print information on fonts loaded\\
    PAGES        &       &off          &Prints a list of page numbers\\
    INFO         &       &on           &Print ``useful'' information\\
    PAUSE        &       &off          &\dag Pause after each page\\
    QUIET        &       &off          &Suppress all messages\\
    BACK         &       &off          &\dag Print pages back to back\\
    VCENTre      &       &off          &Center page vertically\\
    HCENTre      &       &off          &Center page horizontally\\
    DYNamic      &       &off          &Forces dynamic pixel loading\\
    \hline
    \multicolumn{4}{l}{}\\
    \multicolumn{4}{c}{\dag \it Laser Driver only}\\
  \end{tabular}
 \end{center}
 \caption{Preview and Laser Qualifiers}
 \label{quals}
\end{table}
Both the \dvi{} preview and laser printer driver programs can also be given a
number of qualifiers to alter the printed result and the amount of information
printed on the terminal during use.   The complete list is given in
table~\ref{quals}; note that some affect just the handling of paper in the
printer, and therefore do not affect the preview program --- these are marked
``\dag'' in the table.

The qualifiers may be given either before or after the parameter (the \dvi{}
file name), and may appear in any order.   Case is not considered significant,
and is used here to indicate the minimum abbreviation allowed --- only
those letters in capitals have to be given, the lower case ones are optional.

\subsubsection{Page positioning qualifiers}
By default, the top and left margins are set to 1{\tt "}, as specified in the
\TeX{}book.   The qualifiers {\tt VCENTre} and {\tt HCENTre} will set the
top margin about equal to the bottom margin, and the left margin equal to the
right, respectively.   Alternatively, or additionally, the top and left margins
may be increased (moved down or right) by using the qualifiers {\tt TOP} and
{\tt LEFT}; if the `increase' is negative, then, as expected, the margins will
be decreased (moved up or left).

\subsubsection{Printing qualifiers}
If no qualifiers are given, then a single copy of each page is printed.
These are printed in reverse of their order in the \dvi{} file, to
minimise (or eliminate) collation after printing.   More copies can be
requested by using the {\tt COPIES} qualifier.

One very useful parameter is {\tt DO}. It allows a range of pages to be
printed and different numbers of each page. The easiest way to describe this
qualifier is by example:
\begin{center}
  \begin{tabular}{llr}
     \} \tt{tlsr texhelp-do="3:5"}   &print pages 3,4 and 5 \\
     \} \tt{tlsr texhelp-do="2 5 7:9"}  &print pages 2,5 7,8 and 9 \\
     \} \tt{tlsr texhelp-do="2*2"}   &print page 2 twice \\
     \} \tt{tlsr texhelp-do="1 3,8:11 13,15 19*2"}  &print pages
                                                     1,3,8,9,10,11,\\
                                               &13,15, and 2 copies of 19 \\
     \} \tt{tlsr texhelp-do="2:5*2"} &print 2 copies of pages 2, \\
                                               &3,4 and 5 \\

  \end{tabular}
\end{center}
(Note that a space {\it or} a comma can be used to seperate pages numbers).

To make printing of double-sided documents easier, there is a {\tt BACK}
qualifier.   This causes `even' pages to be printed, followed by a pause to
allow the sheets to be re-loaded into the feeder tray, then prints `odd'
pages on the back\footnote{
When reloading, the paper should be turned through $180^\circ$
and replaced face
up in the paper tray.}.
Finally, `single' pages are printed.   The current
version of the laser driver defines two consecutive pages in the \dvi{}
file to be `odd' and `even' iff their page numbers (what \TeX{} calls
{\tt \verb"\"count0}) are the same or increasing by one; all other pages
are `singles'.

If one is attempting some fancy back-to-back printing, or printing on a
medium that requires special handling, the {\tt PAUSE} qualifier will cause
the program to wait after it has printed the requested number of copies of
each page.

\subsubsection{Terminal information qualifiers}
The amount of information displayed on the terminal can be altered by the
use of various qualifiers.   All information can be inhibited by the
qualifier {\tt QUIET}.  To aid testing, the {\tt DEBUG} option is a short
way to specify {\tt ERROR}, {\tt PHASE}, {\tt FONTS}, {\tt PAGES} and
{\tt INFO}.

The {\tt ERROR} option would normally be on, unless the program were being
used remotely or as a batch job.   Some errors are fatal, but inconsistencies
between the \dvi{} file's postamble and preamble are reported as warnings.

If a list of the page numbers within a \dvi{} files is required, the {\tt
PAGES} option should be specified.    The pages are listed out as absolute
number within file, followed by their \TeX{} page number ({\tt count0} \dots{
\tt count9}).

A list of which fonts are to read in, their sizes and magnifications,
will be shown on the terminal if the {\tt FONTS} option is switched on.

As the programs will take a while to initialise, and may pause between pages,
the {\tt PHASE} option has been provided to show what stage the program has
reached.

Use of the {\tt INFO} qualifier will result in some information about the
\dvi{} file being displayed --- file name, date and time of creation and the
page number currently being viewed or printed.

\subsubsection{Other qualifiers}
The value of the \TeX{} parameter {\tt \verb"\"magnification} can be
over-ridden by use of the {\tt MAGnification} qualifier.

The maximum number of characters plus rulers on a single page must be
specified, so as enough space can be reserved.   The {\tt SYMBOL} qualifier
need only be used if the default value of $10 000$ is insufficient.   To
date, this has not occured.

Pixel patterns can be loaded either statically or dynamically;
if the {\tt DYNamic} qualifier is given, then program is forced to use
the dynamic loading scheme.   This facility has been included
as can save a lot of unnecessary work if only a small part of a document is
to be output.

\section{Printing a Document---tlsr and laser}
There are two ways to send a document to the laserprinter. The simplest way
is to type:
  \begin{instn}
     \}~laser~texhelp
  \end{instn}
which sends the file to the laserprinter spooler. As yet however, none of the
above mentioned qualifiers can be used with this command so if special
qualifiers are needed, the spooler program  has to be stopped and the
texlaser program run\footnote{See also Chapter~5}.

\subsubsection{Running {\tt tlsr} and Starting the Spooler}
To stop the spooler type{\tt\ Ctrl-Y\ }(check that it's not in the middle
of printing something first!) and log on (see above).
Suppose that 
you wanted to print your document double-sided, magnification~2000, with
dynamic font loading and font information displayed on the terminal.
The command to type would be:
  \begin{instn}
   \}~tlsr~texhelp-back-mag=2000-dyn-fonts
  \end{instn}
for the file {\tt texhelp.dvi}.
With the default options, the program starts with a message such as:
\begin{footnotesize}
\begin{verbatim}
This is RGS/DMB canon driver, version 1.86

Database update suppressed
File: TEXHELP.DVI --- ' TeX output 1985.09.12:1120'
magnification= 1000;                 0.00006334 pixels per DVI unit
(statically loading fonts).
Pre-reading page numbers
Defining fonts
Fonts defined

 42: beginning of page  0. 0. 0. 0. 0. 0. 0. 0. 0. 0
 69 characters/rulers stored.
\end{verbatim}
\end{footnotesize}

To restart the spooler once your document has finished printing, log off and
type:
  \begin{instn}
    \}~@text:spooler
  \end{instn}
If all is well, the following should appear:
\begin{footnotesize}
\begin{verbatim}
Setup for Laserprinter Spooler
DMB:ECANON installed
Canon Laserprinter Driver version 2.3...
Line fonts:31  Bytes:138478
Raster fonts:2  Bytes:20416
Opening DOC:TFONTS.DEF
Times fonts:5  Bytes:69556
\end{verbatim}
\end{footnotesize}

% \chapter{{\TeX} on {\unixvax} and the \sun}
% \section{\unixvax}
% No setup is required to run {\TeX} on {\cstvax}; the commands
% ({\tt tex, latex and latexm}) have all been installed as system commands.
% The main disadvantage with running {\TeX} on {\cstvax} is the fact that
% the output has to be transferred to the {\apm} filestore, which at the time
% of writing means the {\dvi} files have to be moved to {\ecsvax} and then
% to the filestore\footnote{Though there will hopefully be a direct connection
% soon---check this.}.
% 
% An attempt has been made to make
% {\TeX} on {\vmsvax} and {\cstvax} identical so any input
% file run through {\TeX} on one machine should produce exactly the same output
% if run on the other.
% 
% \subsection{{\LaTeX} and {\LaTeX}-M}
% An example file can be found in \hbox{\tt \~{}dmb/texhelp.tex}. 
% If you take a copy of this file and
% type:
% \begin{instn}
%   \%~latex~texhelp
% \end{instn}
% {\cstvax} will respond something like:
% \begin{footnotesize}
% \begin{verbatim}
%     This is TeX, Version 1.2 for Berkeley UNIX (preloaded format=lplain 85.3.27)
%     (texhelp.tex
%     LaTeX Version 2.07 - Release 14 November 1984
%     (/usr/lib/macros/report.sty
%     Document Style 'report'. Version 0.91 - released 9 November 1984
%     (/usr/lib/tex/macros/rep12.sty)
% etc...
% \end{verbatim}
% \end{footnotesize}
% Similarly the command {\tt latexm} can be used. For information about
% additional document styles and the differences between {\LaTeX} and
% {\LaTeX}-M, see section~2.1 above.
% 
% \subsection{\TeX}
% To run {\TeX} simply type{\tt\ tex~story}.
% The story.tex file example for plain {\TeX} can be found in the file 
% \hbox{\tt /vol/pgs/TeX/tex82/=doc/story.dvi}.
% 
% \subsection{{\TeX}ware}
% The directory \hbox{\tt /vol/pgs/TeX/tex82} contains all the files that are 
% on the {\TeX} distribution
% tape. Some of the utilities from this directory have already been 
% compiled by Oliver Schoett
% and can be found in his filespace (\~{}os/tex82). Note that this is an
% `unofficial' place for them to be and they may be moved. If you cannot find
% the utility you need then it should be 
% a simple matter to copy the sources from the above mentioned directory and 
% compile the programs yourself.
% 
% \section{\sun}
% The {\sun} workstation is the ideal machine on which to use {\TeX}. It is the
% only machine in the department on which you can both run {\TeX} {\it and}
% preview the output. However the two {\sun}s are not public machines so this
% section is only for people who a)~have an account on the {\sun} and
% b)~are in the business of producing beautiful documents.
% 
% \subsection{{\TeX}, {\LaTeX} et al}
% The procedure for running {\TeX} is exactly the same as for {\cstvax} mentioned
% above. Any input file should run through {\TeX} in exactly the same way as
% on {\cstvax} or {\ecsvax}. Once you have produced an output file the command
% you will probably want to use to transfer the file for printing is
% {\tt rcp}.
% 
% \subsubsection{dvisun}
% {\tt dvisun} is a program which allows you to preview {\TeX} output on the
% {\bf SUN2} display. The program writes directly to the bitmap so will
% not work while the {\tt suntools} window manager is running. To run the
% program type{\tt\ dvisun~filename;\ }there is also a manual page entry
% accessible by typing{\tt\ man~dvisun}.
% 
% \chapter{Using the Laserprinter}
% 
% \section{Collecting Output}
% The laserprinter is situated in the photocopier room,
% (room~2419).
% Once you have sent your file using the {\tt laser} command (see above) it will
% be placed in a queue and printed in turn. The laserprinter only prints about
% 3 pages a minute so you may have some time to wait. The message:
% \begin{verbatim}
% Opening LP1:TEXHELP.DVI
% \end{verbatim}
% will appear just before the document starts being printed and the message
% \begin{verbatim}
% .Deleting LP1:TEXHELP.DVI
% \end{verbatim}
% will appear when it has finished.
% 
% If for any reason the output is incorrect or an error occurs check that your
% file is okay by running the preview program on the {\apm}s. If the spooler
% program crashes or some other equally drastic event occurs contact DMB.
% 
% \subsubsection{Indicator lights}
% There are three lights along the top of the laserprinter. If the green light
% is on then the laser printer is ready for printing---wait. If the orange light
% is on the the paper tray is empty---this can be removed and refilled by the
% user, it is situated underneath the output hopper. If the red light is on
% this is bad and the user should contact an expert. Do not attempt
% to fix the problem yourself.
% Periodically the print cartridge also needs replacing, another `expert'
% task.
% 
% \section{Don'ts of the laserprinter}
% 
% Don't \dots
%   \begin{itemize}
%     \item Lean or place heavy objects on top of the laserprinter.
%     \item Attempt to `fix' or open the laserprinter.
%     \item Send large documents unless you are sure that they are correct.
%     \item Try to use anything but the proper paper in the machine.
%   \end{itemize}
% 
% \appendix
% \chapter{Acknowledgements}

Thanks to Robert Struthers and Tom Horton who actually wrote most of the
text in this document and to Oliver Schoett for his suggestions.

\end{document}
