\def\fileversion{1.9c}    \def\filedate{1994/12/06}
%
% The above line define the file version, and must remain the first
% line with any `assignment' in the file, or things will blow up
% nastily
%
\ifnotreadCTAN
%
% lists of CTAN labels
%
% ... directories
  \input dirctan.tex
%
% ... files
  \input filectan.tex
%
% don't need to read them again, though
  \notreadCTANfalse
\fi

\section{Introduction}

%The newsgroup \Newsgroup|comp.text.tex| is a forum for the discussion
%of \TeX{}, \LaTeX{} and other related things. \TeX{} is a software
%system written by Donald Knuth to typeset text, especially text
%containing mathematics. \LaTeX{} is a set of macros written in \TeX{},
%designed to simplify the the typesetting of a document by allowing the
%user to concentrate on the content and structure of the document
%rather than the exact appearance of the finished product. \MF{}, also
%discussed here, is a program which allows the user to design their own
%fonts.  The American Mathematical Society has two macro
%packages which are also popular, called \AMSTeX{} and \AMSLaTeX{}.
%
%This article contains answers to some frequently asked questions on
%\Newsgroup|comp.text.tex|. Please don't ask these questions again, as
%they've been answered many times before. 
%
%This is version 1.45 for September, last changed 9/5/94. I apologize for the
%long hiatus in posting; I've been away and very busy the past few months.
%
%These are all legitimate questions, but they seem to appear too 
%frequently for long-time readers of the list. 
%
%Many of the answers below tell you that you can obtain something
%through anonymous ftp. ``Ftp'' stands for file transfer protocol, and
%is also the name of a program implementing the protocol. The program
%allows users to transfer files to and from remote sites, if the sites
%are connected via a network such as the Internet. ``Anonymous ftp'' 
%indicates a user may connect to a remote site as the user 
%``anonymous'' with a password consisting of their email address, and
%thus be able to retrieve files from that site. Remember, anonymous
%ftp is a privilege and the system administrators for these sites 
%have made these files available out of their own generosity. Therefore
%please restrict your ftp'ing to non-prime hours at the various sites.
%
%I would like to acknowledge Don Hosek, Ken Yap, Tomas Rokicki, Micah
%Beck, and David Carlisle, whose postings provided many of the answers.
%Joe Weening, Hal Perkins, Walter Carlip, Max Hailpern, Tad Guy,
%Raymond Chen, Henning Schulzrinne, Sebastian Rahtz, Mark James, Peter
%Galko, Mike Ernst, Rainer Sch\"opf, Oren Patashnik, Philippe Louarn,
%Rafal Zbikowski, Anita Marie Hoover, David Rhead, Darrell McCauley,
%Cameron Smith, Emma Pease, Patrick McPhee, Karl Berry, Robin
%Fairbairns, Joohee Jeong, and Sam Steingold provided additional
%material and criticisms. The format of this document is based on the
%Frequently Asked Questions written by Steve Hayman which formerly
%appeared in \Newsgroup|comp.unix.wizards|. Any mistakes are mine. Send
%corrections, suggestions, and additions to \Email|bobby@hot.caltech.edu|

This article was prepared by the Committee of the UK \TeX{} Users
Group (UK TUG)\begin{footnoteenv}
For 1993-94: Peter Abbott, Rosemary Bailey, Malcolm Clark, Robin
Fairbairns, Jonathan Fine, Carol Hewlett, Alan Jeffrey, Sebastian
Rahtz, and Chris Rowley; in addition, for 1994--95, David Carlisle
\end{footnoteenv}
as a development of a regular posting to the \emph{Usenet} newsgroup
\Newsgroup|comp.text.tex| that has been maintained for some time by
Bobby Bodenheimer (\Email|bobby@hot.caltech.edu|).

Usenet is a mechanism for exchanging articles between people who share
interests or needs\begin{footnoteenv}
Usenet, as its name implies, is a means of using some sort of network;
in the earliest days the network was made by stringing together a
series of telephone lines, but nowadays Usenet is most often carried
over the Internet
\end{footnoteenv};
a newsgroup is an area within Usenet carrying a particular
class of articles.  Since a common sort of article asks for help,
advice or information, and since certain of these questions are
regularly repeated (often with monotonous regularity), some
public-spirited souls took to writing articles which listed
``Frequently Asked Questions'' and answers to them.  Many members
of UK TUG do not have access to Usenet, but could be expected to value
the answers about \TeX{} that have accumulated over the years; so we
decided to update the list and publish it in \BV{}; we are
grateful to Bobby for his permission to use his article in this way.
As a \emph{quid pro quo}, we are making the source of the article
freely available, and it can be compiled by anyone who runs a
production
\htmlignore
\LaTeXe{} (\Qref{}{latex2e}),
\endhtmlignore
\begin{htmlversion}
  \Qref{\LaTeXe{}}{latex2e},
\end{htmlversion}
and has the required fonts.
It is the committee's hope that it will also be possible for the
content of this article to feed back to the world-wide \TeX{}
community via Bobby's regular posting.

\htmlignore
In addition, a translation of the article is available on the
World-Wide Web, via URL
\URL|http://www.cogs.susx.ac.uk/cgi-bin/texfaq2html?introduction=yes|%
\begin{footnoteenv}
This is a temporary URL; a final home for the document is to be
provided in due course
\end{footnoteenv}
\endhtmlignore

We have rearranged Bobby's article quite a lot, and have added new
questions and answers on the basis of our experience of answering
questions about \TeX{}, writing documents in \TeX{}, and developing
macros for \TeX{}, over the years.  We have also pruned it to take
account of the changes that have happened in the world of \TeX{} since
Bobby first started.

The committee is grateful for help and advice, from the following
outside its number:
Barbara Beeton,
Karl Berry,
Damian Cugley,
Michael Downes,
Berthold Horn,
Werner Icking,
Ted Nieland,
Pat Rau,
Joachim Schrod,
Philip Taylor,
Ulrik Vieth,
Rick Zaccone and
Reinhard Zierke.

\htmlignore
\subsection*{Finding the Files}

Unless otherwise specified, all files mentioned in this article are
available from a CTAN archive, or from one of their mirrors.
\Qref[Question]{}{Q-archives} % this one doesn't need anchor text
gives details of the CTAN archives, and how to retrieve files from
them.  If you don't have access to the internet,
\Qref[question]{}{Q-CD} tells you of sources of \CDROM{}s that offer
snapshots of the archives.

The reader should also note that the first directory name of the path
name of every file on CTAN has been elided from what follows, for the
simple reason that it's always the same (\path|tex-archive/|).

To avoid confusion, we've elided the full
stop\begin{footnoteenv}
`Full stop' (British English)==`period' (American English)
\end{footnoteenv}
from the end of any sentence whose last item is a path name (note that
such sentences only occur at the end of paragraphs).  Though the path
names are set in a different font from running text, it's not easy to
distinguish the font of a single dot!
\endhtmlignore

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{The Background}

\Question{What is \protect\TeX{}?}

\TeX{} is a typesetting system written by Donald E.~Knuth, who
says in the Preface to his book on \TeX{}
(see \Qref[question]{\TeX{}-related books}{Q-books})
that it is ``\emph{intended for the creation of beautiful books---and especially for books that contain a lot of mathematics}''.

Knuth developed a system of `literate programming' to write \TeX{},
and he provides the literate (WEB) source of \TeX{} free of charge,
together with tools for processing the |web| source into something
that can be compiled and something that can be printed; there's never
any mystery about what \TeX{} does.  Furthermore, the WEB system
provides mechanisms to port \TeX{} to new operating systems and
computers; in order that one may have some confidence in the ports,
Knuth supplied a test by means of which one may judge the fidelity of
a \TeX{} system.  \TeX{} and its documents are therefore highly
portable.

\TeX{} is a macro processor, and offers its users a powerful
programming capability.  For this reason, \TeX{} on its own is a
pretty difficult beast to deal with, so Knuth provided a package of
macros for use with \TeX{} called |plain| \TeX{}; |plain| \TeX{} is
effectively the minimum set of macros one can usefully employ with
\TeX{}, together with some demonstration versions of higher-level
commands (the latter are better regarded as models than used as-is).
When people say they're ``programming in \TeX{}'', they usually mean
they're programming in |plain| \TeX{}.

\Question[tex-pronounce]{How should I pronounce ``\protect\TeX{}''?}

The `X' stands for the Greek letter
\htmlignore
Chi ($\chi$),
\endhtmlignore
\begin{htmlversion}
Chi,
\end{htmlversion}
and is pronounced by English-speakers either a bit like the `ch' in
`loch' ([x] in the IPA) or like `k'.  It definitely is not pronounced
`ks'.

\Question[Q-MF]{What is \protect\MF{}?}

\MF{} was written by Knuth as a companion to \TeX{}; whereas \TeX{}
defines the layout of glyphs on a page, \MF{} defines the shapes of
the glyphs and the relations between them.  \MF{} details the sizes of
glyphs, for \TeX{}'s benefit, and details the rasters used to
represent the glyphs, for the benefit of programs that will produce
printed output as post processes after a run of \TeX{}.

\MF{}'s language for defining fonts permits the expression of several
classes of things: first (of course), the simple geometry of the
glyphs; second, the properties of the print engine for which the
output is intended; and third, `meta'-information which can
distinguish different design sizes of the same font, or the difference
between two fonts that belong to the same (or related) families.

Knuth (and others) have designed a fair range of fonts using \MF{},
but font design using \MF{} is much more of a minority skill than is
\TeX{} macro-writing.  The complete \TeX{}-user nevertheless needs to
be aware of \MF{}, and to be able to run \MF{} to generate personal
copies of new fonts.

\Question{What is \protect\LaTeX{}?}

\LaTeX{} is a \TeX{} macro package, written by Leslie Lamport, that
provides a document processing system.  \LaTeX{} allows markup to
describe the structure of a document, so that the user
need not think about presentation. By using document classes and
add-on packages, the same document can be produced in a variety of
different layouts.

Lamport says that \LaTeX{}
``\emph{represents a balance between functionality and ease of use}''.
This shows itself as a continual conflict that leads to
the need for such as the present article: \LaTeX{} \emph{can} 
meet most user requirements, but finding out \emph{how} is often
tricky.

\Question{How should I pronounce ``\protect\LaTeX{}''?  ``\protect\LaTeXe{}''?}

Lamport never recommended how one should pronounce \LaTeX{}, but a lot
of people pronounce it `Lay \TeX{}' or perhaps `Lah \TeX{}' (with
\TeX{} pronounced as the program itself; see
\Qref[question]{the rules for \TeX{}}{tex-pronounce}).

The `epsilon' in `\LaTeXe{}' is supposed to be suggestive of a small
improvement over the old \LaTeXo{}.  Nevertheless, most people
pronounce the name as `\LaTeX{}-two-ee'.
%... whereas Damian Cugley suggested (and we retain for the amusement
%... of those who read the source ;-)
%The `e' in `\LaTeXe{}' might look like a lowered one-stroke Greek
%lower case epsilon (when typeset) to mere mortals such as you or me, but
%it is in fact a lower case `e', and is pronounced like the name
%of the letter.  Some people pronounce `2e' as `twee'.

\Question{Should I use \protect\texttt{plain} \protect\TeX{} or \protect\LaTeX{}?}

There's no straightforward answer to this question.  Many people swear
by |plain| \TeX{}, and produce highly respectable documents using it
(Knuth is an example of this, of course).  But equally, many people
are happy to let someone else take the design decisions for them,
accepting a small loss of flexibility in exchange for a saving of
brain power.

The arguments around this topic can provoke huge amounts of noise and
heat, without offering much by way of light; your best bet is to find
out what those around you are using, and to go with the crowd.  Later
on, you can always switch your allegiance; don't bother about it.

If you are preparing a manuscript for a publisher or journal, ask them
what markup they want before you
develop your own; many big publishers have developed their own
\LaTeX{} styles for journals and books, and insist that authors stick
closely to their markup.

\Question{What are the AMS packages (\protect\AMSTeX{}, \protect\emph{etc}.)?}

\AMSTeX{} is a \TeX{} macro package, originally written by Michael Spivak for
the American Mathematical Society (AMS) during 1983--1985. It is described in
\emph{The Joy of \TeX{}} by Michael D.~Spivak (second edition, AMS, 1990, ISBN
0-821-82997-1).  It is based on |plain| \TeX{}, but provides many
features for producing more professional-looking maths formulas with
less burden on authors.  It pays attention to the finer details of
sizing and positioning that mathematical publishers care about. The
aspects covered include multi-line displayed equations, equation
numbering, ellipsis dots, matrices, double accents, multi-line
subscripts, syntax checking (faster processing on initial
error-checking \TeX{} runs), and other things.

As \LaTeX{} increased in popularity, authors asked to submit papers to
the AMS in \LaTeX{}, and so the AMS developed \AMSLaTeX{}, which is a
collection of \LaTeX{} packages and classes that offer authors most of
the functionality of \AMSTeX{}.
\checked{RAB}{1994/11/12} % edited by RF; input from Michael Downes, too

\Question{What is \protect\LAMSTeX{}?}

\LAMSTeX{} was Michael Spivak's fusion of \AMSTeX{} and \LaTeX{}.  Its
strong points are:
\begin{itemize}
\item a commutative diagram package that produces very pleasing
output;
\item a separate program \ProgName|dvipaste| for producing complex
tables separately from the main document (thus avoiding problems from
exceeding \TeX{}'s main memory capacity); and
\item extensive control at the user level over the formatting of
automatically-generated numbers.
\end{itemize}

However, \AMSLaTeX{} had come out by the time \LAMSTeX{} was released,
so that \LAMSTeX{} never really caught on.
\checked{RAB}{1994/11/12} % edited by RF; input from Michael Downes, too

\Question[Q-eplain]{What is \protect\Eplain{}?}

The \Eplain{} macro package expands on and extends the
definitions in |plain| \TeX{}.  \Eplain{} is not intended to provide
``generic typesetting capabilities'', as do \LaTeX{} or
\htmlignore
Texinfo (\Qref{}{Q-texinfo}).
\endhtmlignore
\begin{htmlversion}
\Qref{Texinfo}{Q-texinfo}.
\end{htmlversion}
Instead, it provides definitions that are intended to be useful
regardless of the high-level commands that you use when you actually
prepare your manuscript.

For example, \Eplain{} does not have a command \cs|section|,
which would format section headings in an ``appropriate'' way, as
\LaTeX{}'s \cs|section|.  The philosophy of \Eplain{} is that
some people will always need or want to go beyond the macro designer's
idea of ``appropriate''.  Such canned macros are fine~--- as long as you
are willing to accept the resulting output.  If you don't like the
results, or if you are trying to match a different format, you are out
of luck.

On the other hand, almost everyone would like capabilities such as
cross-referencing by labels, so that you don't have to put actual page
numbers in the manuscript.  Karl Berry, the author of \Eplain{}, says
he is not aware of any generally available macro packages that do
not force their typographic style on an author, and yet provide
such capabilities.

\Question{What is Lollipop?}

Lollipop is a macro package written by Victor Eijkhout; it was used in
the production of his book ``\emph{\TeX{} by Topic}'' (see
\Qref[question]{\Tex{}-related books}{Q-books}).  The manual says of
it:
\begin{quote}
  Lollipop is `\TeX{} made easy'. Lollipop is a macro package that
  functions as a toolbox for writing \TeX{} macros.  It was my
  intention to make macro writing so easy that implementing a fully
  new layout in \TeX{} would become a matter of less than an hour for
  an average document, and that it would be a task that could be
  accomplished by someone with only a very basic training in \TeX{}
  programming.

  Lollipop is an attempt to make structured text formatting available
  for environments where previously only \WYSIWYG{} packages could be
  used because adapting the layout is so much more easy with them than
  with traditional \TeX{} macro packages.
\end{quote}

The manual goes on to talk of ambitions to ``capture some of the
\LaTeX{} market share''; it's a very witty package, but little sign of
\htmlignore
it taking over from \LaTeX{} is detectable\dots\@
\endhtmlignore
\begin{htmlversion}
it taking over from \LaTeX{} is detectable\dots{}
\end{htmlversion}
An article about Lollipop appeared in TUGboat 13(3), 1992.

\Question[Q-texinfo]{What is Texinfo?}

Texinfo is a documentation system that uses one source file to
produce both on-line information and printed output.  So
instead of writing two different documents, one for the on-line help
and the other for a typeset manual, you need write only one
document source file.  When the work
is revised, you need only revise one document.  You can read the
on-line information, known as an ``Info file'', with an Info
documentation-reading program.  By convention, Texinfo source file
names end with a |.texi| or |.texinfo| extension.
You can write and format Texinfo files into Info files within GNU
\ProgName|emacs|, and read them using the \ProgName|emacs| Info
reader.  If you do not have \ProgName|emacs|, you can format Texinfo
files into Info files using \ProgName|makeinfo| and read them using
\ProgName|info|.

A set of \TeX{} macros for formatting Texinfo files are available in
\CTANref{texinfo-macros}

\Question{If \protect\TeX{} is so good, how come it's free?}

It's free because Knuth chose to make it so.  He is nevertheless
apparently happy
that others should earn money by selling \TeX{}-based services and
products. While several valuable \TeX{}-related tools and packages are
offered subject to restrictions imposed by the GNU General Public
Licence (`Copyleft'), \TeX{} itself is not subject to Copyleft.

There are commercial versions of \TeX{} available; for some users,
it's reassuring to have paid support.  What is more, some of the
commercial implementations
have features that are not available in free versions.  (The
reverse is also true: some free implementations have features
not available commercially).

Usually, this article does not describe commercial
\htmlignore
versions.  \Qref[Question]{}{Q-commercial} lists the major vendors.
\endhtmlignore
\begin{htmlversion}
versions; see \Qref{major vendors} for some details.
\end{htmlversion}

\Question[tex-future]{What is the future of \protect\TeX{}?}

Knuth has declared that he will do no further development of \TeX{};
he will continue to fix any bugs that are reported to him (though
bugs are rare).  This decision was made soon after
\TeX{} version~3.0 was released; at each bug-fix release
the version number acquires one more digit, so that it tends to the
limit~$\pi$.  Knuth wants \TeX{} to be frozen at version~$\pi$ when he
dies; thereafter, no further changes may be made to Knuth's source.
(A similar rule is applied to \MF{}; its version number tends to the
limit~$e$.)

There are projects (some of them long-term
projects: see, for example,
\Qref[questions]{the \LaTeX{}3 project}{LaTeX3}
\Qref[and]{and the SGML work}{Q-SGML}) to build substantial
new macro packages based on \TeX{}.  For the even longer term, there
are various projects to build a \emph{successor} to \TeX{}; see
\Qref[questions]{the Omega project}{Q-omega} and \Qref[]{NTS}{Q-NTS}.

%\Question{Why isn't \protect\TeX{} \protect\WYSIWYG{}?}
%
% hmmm; had a request for this, but can't think what to write

\Question[Q-TUG]{What are TUG and TUGboat?}

TUG is the \TeX{} Users Group. TUGboat is TUG's main journal,
containing useful articles about \TeX{} and \MF{}. TUG also produces a
newsletter for members (\TeX{} and TUG News), organises a yearly
conference, runs training courses, sells almost all \TeX{}-related
books, and distributes \TeX{}-related microcomputer software on disk. 
TUG has a Technical Council to  coordinate \TeX{}-related developments
(see \Qref{TUG Technical Working Groups}{Q-TUGTC}).
Enquiries should be directed to:
\begin{quote}
  \TeX{} Users Group\\
  P. O. Box 869\\
  Santa Barbara, CA 93102-0869\\
  USA\\[.25\baselineskip]
  Tel: (+1) 805-963-1338\\
  Fax: (+1) 805-963-8358\\
  Email: \Email|tug@tug.org|\\
  CTAN details: \CTANref{tug}
\end{quote}

\Question[Q-othergroups]{Are there nationally-based user groups, too?}

The following groups publish their membership (\emph{etc}.) information
electronically on CTAN archives:

\begin{quote}
  \htmlignore
  DANTE, Deutschsprachige Anwendervereinigung\\
  \leavevmode\hskip1em\TeX{} e.V.\\
  \endhtmlignore
\begin{htmlversion}
  DANTE, Deutschsprachige Anwendervereinigung \TeX{} e.V.\\
\end{htmlversion}
  Postfach 10\,18\,40\\
  D-69008 Heidelberg\\
  Germany\\[.25\baselineskip]
  Tel: (+49) 06221/2\,97\,66\\
  Fax: (+49) 06221/16\,79\,06\\
  Email: \Email|dante@dante.de|\\
  CTAN details: \CTANref{dante}
\end{quote}

\begin{quote}
  GUTenberg,\\
  BP 10,\\
  93220 Gagny principal,\\
  France\\[.25\baselineskip]
  CTAN details: \CTANref{gut}
\end{quote}

\begin{quote}
  NTG \\
  Postbus 394, 1740AJ  Schagen,\\
  The Netherlands\\[.25\baselineskip]
  Email: \Email|ntg@nic.surfnet.nl|\\
  CTAN details: \CTANref{ntg}
\end{quote}

\begin{quote}
  UK \TeX{} Users' Group,\\
  c/o Peter Abbott,\\
  1 Eymore Close,\\
  Selly Oak,\\
  Birmingham B29 4LB\\
  UK\\[.25\baselineskip]
  Tel: (+44) 0121 476 2159\\
  Email: \Email|UKTuG-Enquiries@tex.ac.uk|\\
  CTAN details: \CTANref{uktug}
\end{quote}

A listing of all known groups is available as \CTANref{usergrps-list}

\Question[Q-TUGTC]{TUG Technical Working Groups}

\htmlignore
TUG (\Qref{}{Q-TUG})
\endhtmlignore
\begin{htmlversion}
  \Qref{TUG}{Q-TUG}
\end{htmlversion}
has an autonomous Technical Council which oversees a number of working
groups on areas of common interest to the \TeX{} community. The
Council has three members (current chair is Michael Ferguson, assisted
by Yannis Haralambous and Sebastian Rahtz), who liaise with chair
people of each working group. Each group establishes its own working
methods and membership, and anyone interested in taking part should
contact the chair. Suggestions for new groups should be addressed to
Michael Ferguson (\Email|mike@inrs-telecom.uquebec.ca|).

A brief list of the active groups follows:

\begin{description}
\item[WG-92-00 (IRP-TWG)]--- \emph{Independent Research Project TWG.}\\
To recognise and report to the \TeX{} Board and the \TeX{}
Community on important projects which are independent of TUG but are
of concern to the entire \TeX{} Community. 

Contact: Alan Hoenig (\Email|ajhjj@cunyvm.cuny.edu|)

\item[WG-92-01]--- \emph{\TeX{} Extended Mathematic Font Encoding.}\\
To create font encoding standards for Mathematical fonts
used in \TeX{} systems.

Contact: Barbara Beeton (\Email|bnb@math.ams.org|)

\item[WG-92-03]--- \emph{Multiple Language Coordination.}\\
The primary purpose of this working group is to obtain, for \TeX{}
systems, a consistent means for implementing, accessing, and describing, the
fonts, ligature rules, hyphenation patterns and other special requirements
for a given linguistic group. 

Contact: Yannis Haralambous (\Email|Yannis.Haralambous@univ-lille1.fr|)

\item[WG-92-04]--- \emph{\TeX{} for the Disabled.}\\
  The primary purpose of this working group is as a forum for those
  people interested in using and/or enhancing \TeX{} to serve the
  needs of those with visual and other disabilities.

Contact: T.V. Raman (\Email|raman@crl.dec.com|)


\item[WG-92-05]--- \emph{\TeX{} Archive Guidelines.}\\
The purpose of this Technical Working Group is to develop
guidelines for the effective management and utilisation of major \TeX{}
archives, and to initiate communication among the maintainers of the
existing archives for the purpose of coordination and synchronisation.

Contact: George Greenwade  (\Email|bed_gdg@shsu.edu|)

\item[WG-94-07]--- \emph{\TeX{} Directory Structures.}\\
The primary purpose of this TWG is to identify a universal directory
structure for macros, fonts and other related \TeX{} software so that
recommendations can be made to all suppliers of \TeX{} software.

Contact: Norm Walsh (\Email|norm@ora.com|)

\item[WG-94-08]--- \emph{DVI Driver Implementation and Standardisation Issues.}\\
The major objective shall be to study the issues in
the requirements of DVI Drivers imposed by changing needs and
technologies, and to make recommendations for implementation and
standardisation of such drivers to enhance the uniformity of their use.
Work will include, but not be limited to, the examination of the use,
syntax, and semantics of \cs|special{..}| commands.

Contact: Michael Sofka (\Email|sofkam@rpi.edu|)

\item[WG-94-09]--- \emph{\TeX{} and SGML.}\\
The major objective is to investigate the
requirements and  difficulties in developing an interface technology
for \TeX{} and SGML.

Contact: Ken Dreyhaupt (\Email|kend@springer-ny.com|)


\item[WG-94-10]--- \emph{\TeX{} and Linguistics.}\\
The main goal is to study and discuss the
requirements for typesetting linguistics in \TeX{} and as a means of
identifying, examining, testing, and comparing macros, fonts, style files
and other aids for typesetting linguistics.

Contact: Christina Thiele (\Email|cthiele@ccs.carleton.ca|)
\end{description}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{Documentation and Help}

\Question[Q-books]{Books on \protect\TeX{} and its relations}

While Knuth's book is the definitive reference for \TeX{}, there are
other books covering \TeX{}:
\begin{booklist}
\item[The \TeX{}book]by Donald Knuth (Addison-Wesley, 1984,
  \ISBN{0-201-13447-0}, paperback \ISBN{0-201-13448-9})
\item[A Beginner's Book of \TeX{}]by Raymond Seroul and Silvio Levy,
  (Springer Verlag, 1992, \ISBN{0-387-97562-4})
\item[Introduction to \TeX{}]by Norbert Schwarz (Addison-Wesley,
  1989, \ISBN{0-201-51141-X})
\item[A Plain \TeX{} Primer]by Malcolm Clark (Oxford University
  Press, 1993, ISBNs~0-198-53724-7 (hardback) and~0-198-53784-0
  (paperback))
\item[\TeX{} by Topic]by Victor Eijkhout (Addison-Wesley, 1992,
  \ISBN{0-201-56882-9})
\item[\TeX{} for the Beginner]by Wynter Snow (Addison-Wesley, 1992,
  \ISBN{0-201-54799-6})
\item[\TeX{} for the Impatient]by Paul W.~Abrahams, Karl Berry and
  Kathryn A.~Hargreaves (Addison-Wesley, 1990, \ISBN{0-201-51375-7})
\item[\TeX{} in Practice]by Stephan von Bechtolsheim (Springer
  Verlag, 1993, 4 volumes, \ISBN{3-540-97296-X} for the set, or
% nos in brackets are for German distribution (Springer Verlag, Berlin)
  Vol.~1: 0-387-97595-0, % (3-540-97595-0)
  Vol.~2: 0-387-97596-9, % (3-540-97596-9)
  Vol.~3: 0-387-97597-7, and % (3-540-97597-7)
  Vol.~4: 0-387-97598-5)% (3-540-97598-5)
\htmlignore
\item[\TeX{}: Starting from \sqfbox{1}\thinspace\footnotemark]%
\footnotetext{That's `Starting from Square One'}%
\endhtmlignore
\begin{htmlversion}
\item[\TeX{}: Starting from Square One]
\end{htmlversion}
  by Michael Doob (Springer
  Verlag, 1993, \ISBN{3-540-56441-1})
\end{booklist}
For \LaTeX{}, see:
\begin{booklist}
\item[\LaTeX{}, a Document Preparation System]by Leslie Lamport
  (second edition, Addison Wesley, 1994, \ISBN{0-201-15790-X})
\item[A guide to \LaTeX{}]Helmut Kopka and Patrick W.~Daly (Addison-Wesley,
  \ISBN{0-201-56889-6})
\item[The \LaTeX{} Companion]by Michel Goossens, Frank Mittelbach,
  and Alexander Samarin (Addison-Wesley, 1993, \ISBN{0-201-54199-8})
\item[\LaTeX{} Notes: Practical Tips for Preparing Technical Documents]by
  J.~Kenneth Shultis (Prentice Hall, 1994, \ISBN{0-131-20973-6})
\item[\LaTeX{} Line by Line]by Antoni Diller (John Wiley \& Sons,
  1993, \ISBN{0-471-93471-2})
\item[\LaTeX{} for Scientists and Engineers]by David J.~Buerger
  (McGraw-Hill, 1990, \ISBN{0-070-08845-4})
\item[Math into \TeX{}: A Simplified Introduction using \AMSLaTeX{}]by
  George Gr\"atzer (Birkh\"auser, 1993, \ISBN{0-817-63637-4}, or, in
  Germany, \ISBN{3-764-33637-4})
\end{booklist}
Of that list, only Lamport, and Goossens, Mittelbach and Samarin cover
\LaTeXe{}, though at least some new editions are reported to be in
preparation.

The list for \MF{} is rather short:
\begin{booklist}
\item[The \MF{}book]by Donald Knuth (Addison Wesley, 1986,
  \ISBN{0-201-13445-4})
\end{booklist}
A book covering a wide range of topics (including installation and
maintenance) is:
\begin{booklist}
\item[Making \TeX{} Work]by Norman Walsh (O'Reilly and Associates,
  Inc, 1994, \ISBN{1-56592-051-1})
\end{booklist}


\Question{Where to find this article}

The article, on which the present one is based, is posted monthly to newsgroup
\Newsgroup|comp.text.tex| and cross-posted to newsgroups
\Newsgroup|news.answers| and \Newsgroup|comp.answers|. The most
recently posted copy of the article is at CTAN in \CTANref{TeX-FAQ}; it is
also archived at any site that archives \Newsgroup|news.answers|, such
as \FTP|rtfm.mit.edu| (18.181.0.24), and this article is available there
  \checked{RF}{1994/11/24}%
via anonymous |ftp| (in the directory
\File|pub/usenet/news.answers/tex-faq|). If you have access to email,
but not to |ftp|, send an e-mail message containing the lines
``|SENDME FAQ|'' to \Email|fileserv@shsu.edu|.
% Another way to retrieve it via email is through the mailserver at
% |rtfm|: send a message containing the lines ``|help|'' and
% ``|index|'' to \Email|mail-server@rtfm.mit.edu| for information on
% how to obtain it.

\htmlignore
A version of the article may be browsed via the World-Wide Web, at URL
\URL|http://www.cogs.susx.ac.uk/cgi-bin/texfaq2html?introduction=yes|%
\begin{footnoteenv}
This is a temporary URL; a final home for the document is to be
provided in due course
\end{footnoteenv}
\endhtmlignore


%Other \Newsgroup|news.answers|/FAQ archives are: \FTP|cnam.cnam.fr|
%(163.173.128.6) in the anonymous ftp directory \path|/pub/FAQ|;
%\FTP|ftp.uu.net| (192.48.96.2) in the anonymous ftp directory
%\path|/pub/usenet| (also available via mail server requests to
%\path|netlib@uunet.uu.net|, or via uunet's 1-900 anonymous UUCP phone
%number); and \FTP|ftp.cs.ruu.nl| (131.211.80.17) in the anonymous ftp
%directory \path|./pub/NEWS.ANSWERS| (also accessible via mail server
%requests to mail-server@cs.ruu.nl). Many of the archives mentioned
%below (\Qref{Q-archives}) also maintain current versions of this document.

\Question[Q-maillists]{Mailing lists about \protect\TeX{} and its friends}

There are (still) people who can use networks but can't read Usenet
news; for them, not all is lost if they can send and receive email.

The UK\TeX{} digest and the \TeX{}hax digest are both operated as
mailing lists.  Send a message `|subscribe uktex|' to
\Email|uktex@tex.ac.uk|, or `|subscribe texhax|' to
\Email|texhax@tex.ac.uk| to join them.

The (rather high volume) Usenet group \Newsgroup|comp.text.tex| is
gatewayed to the |info-tex| mailing list; subscribe by sending a
message `|subscribe info-tex <your name>|' to
\Email|listserv@shsu.edu|.  The group is also
available in digest form through the |ctt-digest| list; subscribe by
sending a message `|subscribe ctt-Digest <your name>|' to
\Email|listserv@shsu.edu|; |ctt-Digest| is approximately the same size
as |info-tex|, but it comes in fewer messages, which is an advantage
on some systems.

Several \TeX{}-related lists may be accessed via
\Email|listserv@vm.urz.uni-heidelberg.de|.  Send a message containing
the line ``|help|'' to this address.\checked{RF}{1994/11/18}
% \Q{This is going some time soon; when?}%

The 
\htmlignore
literate programming newsgroup (\Qref{}{Q-lit})
\endhtmlignore
\begin{htmlversion}
  \Qref{literate programming}{Q-lit} newsgroup
\end{htmlversion}
\Newsgroup|comp.programming.literate| is gatewayed to the |litprog|
mailing list; subscribe by sending a message
`|subscribe litprog <your name>|' to \Email|listserv@shsu.edu|.

\Question[BibTeXing]{\protect\BibTeX{} Documentation}

\BibTeX{}, a program originally designed to produce bibliographies in
conjunction with \LaTeX{}, is explained in Section 4.3 and Appendix B
of Leslie Lamport's \LaTeX{} manual
(see \Qref[question]{\TeX{}-related books}{Q-books}).
The document ``\BibTeX{}ing'', contained in the file |btxdoc.tex|,
gives a more complete description.  \emph{The \LaTeX{} Companion}
(see \Qref[question]{\TeX{}-related books}{Q-books}) also
has information on \BibTeX{} and writing \BibTeX{} style files.

The document ``Designing \BibTeX{} Styles'', contained in the file
|btxhak.tex|, explains the postfix stack-based language used to write
\BibTeX{} styles (|.bst| files). The file |btxbst.doc| is the template
for the four standard styles (|plain|, |abbrv|, |alpha|, |unsrt|). It
also contains their documentation.
The complete \BibTeX{} documentation set (including the files above)
is in \CTANref{bibtex-doc}

There is a Unix \BibTeX{} man page in the \ProgName|web2c| package
(see \Qref[question]{\TeX{} systems}{TeX-systems}).  Throw away any
copy you may find of an obsolete man page written in 1985 before
``\BibTeX{}ing'' and ``Designing \BibTeX{} Styles'' appeared.

\Question{The \protect\PiCTeX{} manual}

\PiCTeX{} is a set of macros for drawing diagrams and pictures. The
macros are freely available in \CTANref{pictex}; however, the
\PiCTeX{} manual itself is not free. It is available for \$30 (\$35
with the disk) from the \TeX{} Users Group (see \Qref[question]{TUG}{Q-TUG}).
The proceeds from the sales go to Michael Wichura, the author of \PiCTeX{},
and to TUG.

%\Question{In \protect\LaTeX{}, how do I do Y?}

%If you can't figure out how to do something in \LaTeX{} after you
%have read the manual very carefully, asked your local \LaTeX{}
%guru, and thought about it, there is a \LaTeX{} help service 
%available. Please note that the way to accomplish something 
%in \LaTeX{} is often by using an appropriate style file, so please
%check this also (\Qref{index}). If none of this works, send mail 
%in English describing your problem to \Email|latex-help@cs.stanford.edu|. 
%If you haven't gotten a reply to your problem within about a week, 
%send mail to \Email|latex-help-coordinator@cs.stanford.edu|.

\Question[index]{Finding \protect\TeX{}/\protect\LaTeX{} macro packages}

Before you ask for a \TeX{} macro or \LaTeX{} class or package file to do
something, try searching the \TeX{} macro index written by David M.
Jones (\Email|dmjones@theory.lcs.mit.edu|) and available in
\CTANref{TeX-index}

The index is an excellent reference document with plenty of
cross-references, but it is somewhat out of date.  Until the present
work to bring the index up to date is complete, you are best advised
to ignore any file location information in it; having learnt of a file
that seems interesting, search a CTAN archive for it (see below for
the simplest method).

% Also, many archive sites 
% \htmlignore
% (\Qref{}{Q-archives})
% \endhtmlignore
% maintain extensive \LaTeX{} style collections, which you can look
% through if you need something not in the index.

To use the searching features of the CTAN
\htmlignore
archives (\Qref{}{Q-archives}),
\endhtmlignore
\begin{htmlversion}
  archives,
\end{htmlversion}
establish an anonymous |ftp| connection to a CTAN
site, and type the command `|quote site index <term>|'. The archive
will provide a list of files with the string |<term>| in their
\htmlignore
names\begin{footnoteenv}
In fact, \texttt{<term>} is an Unix regular expression; the command is
searching an index file using the command \ProgName|grep|
\end{footnoteenv}.
\endhtmlignore
\begin{htmlversion}
names.
\end{htmlversion}
(Some |ftp| clients don't implement the command `|quote|', in most
such cases, you need simply to type `|site index <term>|'.)

\Question[compan-files]{Finding \protect\LaTeXe{}-related packages}

A common confusion that can arise is that no |.sty| or |.cls| file
exists on the CTAN archives for the package or class you've been
recommended to acquire.  For example, there are many packages listed
in 
\htmlignore
\emph{The \LaTeX{} Companion} (%
\endhtmlignore
\Qref{\emph{The \LaTeX{} Companion}}{Q-books}%
\htmlignore%
)
\endhtmlignore
without details of their location on CTAN.\@ The file
\CTANref{compan-ctan} may be of help in finding such files, but it's
not a general solution.

The canonical way of distributing \LaTeXe{} packages and classes is as
|.dtx| files 
(see \Qref[question]{documented \LaTeX{} sources}{Q-dtx}).
Of course, if your |site index| command was for
`|package.sty|', you won't find anything~--- you should simply ask for
`|package|' (the search can find things on the basis of substrings of
their name).

In the case that what you're seeking is indeed distributed this way,
you should retrieve the whole directory that the |.dtx| file is in,
which will get you all the related files, including one or more |.ins|
(installation) files.  Process the `appropriate' |.ins| file using
\LaTeXe{}, and you will generate the file (or files) that you want.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{Bits and pieces of \protect\TeX{}}

%\Question[realfonts]{\protect\TeX{} font representations}

%\TeX{} itself can in principle deal with fonts presented in any format
%whatsoever; all \TeX{} needs to know is the content of a metric
%(|.tfm|) file, which tells it about placement of the characters of the
%font relative to others on the page.  Most often, the |.tfm| file is
%made either by
%\htmlignore
%\MF{} (\Qref{}{Q-MF})
%\endhtmlignore
%\begin{htmlversion}
%  \Qref{\MF{}}{Q-MF}
%\end{htmlversion}
%processing a font definition,
%or by processing a PostScript metric file in some way (see
%\Qref[question]{PostScript metrics}{Q-metrics}).

%When you come to view or print your typeset output, the previewer or
%printer driver needs to know how to set glyphs corresponding to the
%characters in your document.  In the case of PostScript (or other
%printer-resident) fonts, all that's needed is to know how to specify
%setting from the built-in fonts.  In the case of \MF{}-defined fonts,
%the font rasters are needed.  \MF{} itself produces `generic font'
%(|gf|) files, but almost no system now available uses them; the
%raster representations need to be processed into another format.  In
%the early days of \TeX{}, the form most often used was `pixel'
%(|pxl|); it was pretty inefficient, and is now almost never seen.
%Nowadays, the font raster format of choice is `packed' (|pk|), and
%almost all systems use them as their default storage format for font
%rasters.

\Question[virtualfonts]{Virtual fonts}

Virtual fonts for \TeX{} were first implemented by David Fuchs in the
early days of \TeX{}, but for most people they started when Knuth
redefined the format, and wrote some support software, in 1989.
Virtual fonts provide a way of telling \TeX{} about something more
complicated than just a one-to-one character mapping. The entities you
define in a virtual font look like characters to \TeX{} (they appear
with their sizes in a font metric file), but the |dvi| processor may
expand them to something quite different. You can use this facility
just to remap characters, to make a composite font with glyphs drawn
from several sources, or to build up an effect in arbitrarily
complicated ways~--- a virtual font may contain anything which is
legal in a |dvi| file.
In practice, the most common use of virtual fonts is to remap
PostScript fonts (see \Qref[question]{font metrics}{Q-metrics}) or to
build `fake' maths fonts.

It is important to realise that \TeX{} itself does \emph{not} see
virtual fonts; for every virtual font read by the |dvi| driver there
is a corresponding |tfm| file read by \TeX{}. Virtual fonts are normally
created in a single ASCII |vpl| (Virtual Property List) file, which
includes both sets of information. The \ProgName|vptovf| program is
then used to the create the binary |tfm| and |vf| files.  The
commonest way (nowadays) of generating |vpl| files is to use the
\ProgName|fontinst| package, which is described in detail
\htmlignore
\Qref[in question]{}{Q-metrics}.
\endhtmlignore
\begin{htmlversion}
together with the discussion of
\Qref{PostScript font metrics}{Q-metrics}.
\end{htmlversion}
\CTANref{qdtexvpl} is another utility for creating ad-hoc virtual
fonts.

\Question[Q-specials]{`special' commands}

\TeX{} provides the means to express things that device drivers can
do, but about which \TeX{} itself knows nothing.  For example, \TeX{}
itself knows nothing about how to include PostScript figures into
documents, or how to set the colour of printed text; but some device
drivers do.

Such things are introduced to your document by means of |\special|
commands; all that \TeX{} does with these commands is to expand their
arguments and then pass the command to the |dvi| file.  In most
cases, there are macro packages provided (often with the driver) that
provide a comprehensible interface to the |\special|; for example,
there's little point including a figure if you leave no gap for it in
your text, and changing colour proves to be a particularly fraught
operation that requires real wizardry. \LaTeXe{}
has standard graphics and colour packages that make file inclusion,
rotation, scaling and colour via |\special|s all easy.

The allowable arguments of |\special| depend on the device driver
you're using.  Apart from the examples above, there are |\special|
commands in the em\TeX{} drivers (e.g., \ProgName|dvihplj|, \ProgName|dviscr|,
\emph{etc}.)~that will draw lines at arbitrary orientations, and
commands in \ProgName|dvitoln03| that permit the page to be set in
landscape orientation.

\Question[Q-dtx]{Documented \protect\LaTeX{} sources (\protect\texttt{.dtx} files)}

\LaTeXe{}, and many support macro packages, are now written in a
\htmlignore
literate programming style (\Qref{}{Q-lit}),
\endhtmlignore
\begin{htmlversion}
  \Qref{literate programming}{Q-lit} style,
\end{htmlversion}
with source and documentation in the
same file.  This format, known as `doc', was originated by Frank
Mittelbach. The documented sources conventionally have the suffix
\texttt{.dtx}, and should normally be stripped of documentation
before use with \LaTeX{}.  Alternatively you can run \LaTeX{} on a
\texttt{.dtx} file to produce a nicely formatted version of the
documented code. An installation script (with suffix
\texttt{.ins}) is usually provided, which needs the standard \LaTeXe{}
\ProgName|docstrip| package (among other things, the installation
process strips all the comments that make up the documentation for
speed when loading the file into a running \LaTeX{} system).  Several
packages can be included in one \texttt{.dtx} file, with conditional
sections, and there facilities for indices of macros etc.  Anyone can
write \texttt{.dtx} files; the format is explained in
\emph{The \LaTeX{} Companion}
(see \Qref[question]{books on \TeX{}}{Q-books}). There are
no programs yet to assist in composition.

\texttt{.dtx} files are not used by \LaTeX{} after they have been
processed to produce \texttt{.sty} or \texttt{.cls} (or whatever)
files.  They need not be kept with the working system; however, for
many packages the \texttt{.dtx} file is the primary source of
documentation, so you may want to keep \texttt{.dtx} files elsewhere.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{Acquiring the Software}

\Question[Q-archives]{Repositories of \protect\TeX{} material}

To aid the archiving and retrieval of of \TeX{}-related files, a TUG
working group developed the Comprehensive \TeX{} Archive Network
(CTAN). Each CTAN site has identical material, and maintains
authoritative versions of its material. These collections are
extensive; in particular, almost everything mentioned in this article
is archived at the CTAN sites, even if its location isn't explicitly
stated.

The CTAN sites are currently \FTP|ftp.dante.de| (129.206.100.192),
\FTP|ftp.tex.ac.uk| (128.232.1.87), and \FTP|ftp.shsu.edu| (192.92.115.10). 
The organisation of \TeX{} files on all these sites is identical and
starts at \path|tex-archive/|. To reduce network load, please use the
CTAN site or mirror closest to you. A complete and current list
of CTAN sites and mirrors can be obtained by using the \ProgName|finger|
utility on `user' \Email|ctan_us@ftp.SHSU.edu|; it is also available
as file \CTANref{CTAN-sites}

To find software at a CTAN site, use anonymous |ftp| to the host,
and then execute the command `|quote site index <term>|' (see
\Qref[question]{finding files}{index} for details).

Email servers \Email|ftpmail@ftp.shsu.edu| and
\Email|ftpmail@ftp.dante.de| provide an |ftp|-like interface through
mail.  Send a message containing just the line `|help|' to your
nearest server for details of use.

% \item \FTP|ftp.cs.ruu.nl| (131.211.80.17) also contains a substantial
%   \TeX{} archive with |ftp| access. To use it via email, send a message
%   containing the line ``|help|'' to \Email|mail-server@cs.ruu.nl|. This mail
%   server can send binary files in a variety of different formats.
%\item % this one actually still exists
Users on BITNET may access anonymous |ftp| for some files can be had
indirectly by sending mail to \Email|BITFTP@PUCC.BITNET|.\@  Send a
message containing the line ``|help|'' to this address for more
information.%
  \checked{RF}{1994/10/28}

There is also the DECUS \TeX{} collection of
material for VMS, Unix, \MSDOS{}, and the Macintosh.  The material for
VMS has not been kept up-to-date, but continues to run on OpenVMS on
the VAX.  It is available via anonymous |ftp| from
\FTP|wuarchive.wustl.edu| (128.252.135.4) in
\path|decus/tex/|.  It can also be obtained from the DECUS Library
(reference number VS0058) in the US, or through your DECUS office
outside of the US. To contact the DECUS Library, send mail or telephone:
\begin{quote}
  DECUS\\
  LIBRARY ORDER PROCESSING\\
  334 South Street, SHR3-1/T25\\
  Shrewsbury, MA 01545-4195\\
  USA\\[0.25\baselineskip]
  Tel: 800-DECUS55 (within the USA, for information)\\
  Fax: (+1) 508-841-3373 (for inquiries)
\end{quote}
or send electronic mail for information to the DECUS \TeX{} Collection
Editor, Ted Nieland (\Email|nieland@ted.hcst.com|).
\checked{RF}{1994/11/17}

Finally, of course, the \TeX{} user who has no access to any sort of
network may buy a copy of the archive on \CDROM{} (see
\Qref[question]{\TeX{} \CDROM{}s}{Q-CD}).

\Question{Contributing a file to the archives}

Use anonymous |ftp| to any CTAN archive
(see \Qref[question]{sources of software}{Q-archives}) and retrieve
the file \CTANref{CTAN-uploads} in the root directory. It contains
instructions for uploading files and notifying the appropriate people
for that site.

If you cannot use |ftp|, mail your contribution to
\Email|sty-mgr@shsu.edu| and it will be passed along. You will make
everyone's life easier if you choose a descriptive and unique name for
your submission, so it's probably a good idea to check that your style
file's name is not already in use by means of the `|site index|' command
(\Qref{archive commands}{Q-archives}).

\Question{Finding new fonts}

A comprehensive list of \MF{} fonts is posted to
\Newsgroup|comp.fonts| and to \Newsgroup|comp.text.tex|, roughly
every six weeks, by Lee Quin (\Email|lee@sq.sq.com|); it is available
as \CTANref{mf-list}

The list contains details both of commercial fonts and of fonts
available via anonymous |ftp|. Most of the fonts are available via
anonymous |ftp| from the CTAN archives
(see \Qref[question]{sources of software}{Q-archives}).
% An article on
% fonts by Dominik Wujastyk, available from CTAN in
% \CTANref{wujastyk-txh}, contains information on \MF{} fonts as well.
% (Dominik's article is corrupt on the archive; let's forget it for
% now)

\Question[Q-CD]{\protect\TeX{} \protect\CDROM{}s}

If you don't have access to the Internet, you can get the CTAN
collections on a \CDROM{}. Even those who do will
find it very convenient to have 600Mb of \TeX{}-related files to hand.
Prime Time Freeware produced \emph{\TeX{}cetera} 1.1 in July 1994,
which is a snapshot of CTAN taken in June 1994. Regular updates are planned.
The material is all compressed in ZIP format to fit it all on one CD,
and to avoid the limitations of the ISO~9660 file system directory.
You can buy the CD from:
\begin{quote}
  Prime Time Freeware\\
  370 Altair Way, Suite 150\\
  Sunnyvale CA 94086  \\
  USA\\
  Tel: (+1) 408 433 9662\\
  Fax: (+1) 408 433 0727\\
  Email: \Email|ptf@cfcl.com|
\end{quote}
or from many \CDROM{} resellers, or the
\htmlignore
TUG office (\Qref{}{Q-TUG}).
\endhtmlignore
\begin{htmlversion}
  \Qref{TUG}{Q-TUG} office.
\end{htmlversion}
Price will be around \$60. Please note that PTF is not a big
commercial firm, and is a good friend of the \TeX{} community.

If you want a ready-to-run \TeX{} system on \CDROM{}, one is available for DOS
only (so far). The Dutch \TeX{} Users Group (NTG) publish the whole
4All\TeX{} workbench on a \CDROM{} packed with all the \MSDOS{} \TeX{}
software, 
macros and fonts you can want. It is available from NTG direct (see
\Qref[question]{user groups}{Q-othergroups}), from TUG for 
\$40 and from UKTUG for \pounds30 (a manual is included). It is a useful
resource for anyone to browse, not just for DOS users.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{\protect\TeX{} Systems}

\Question[TeX-systems]{\protect\TeX{}/\protect\LaTeX{} for different machines}
We list here the free or shareware packages; see 
\Qref{vendors}{Q-commercial} for commercial packages.
\begin{description}
\item[Unix] Instructions for retrieving the Unix \TeX{} distribution
  via anonymous |ftp| are available in the document \CTANref{unixtexftp}

\item[AIX] \TeX{} for the IBM RS6000 running AIX is available in
  \CTANref{aix3.2}

\item[386/ix] Executables for 386/ix are available in
  \CTANref{386ix}

\item[Linux] There are at least two fairly complete implementations of
  \TeX{} to run on Linux.  The Slackware distribution includes N\TeX{}
  (available as \CTANref{ntex}), which probably contains more
  \TeX{}-related material than you would ever want.  The more recent
  te\TeX{} (available as \CTANref{tetex}) is based on Karl Berry's
  path-searching mechanisms, and is more compact than N\TeX{} while
  still being pretty comprehensive.

\item[PC] The em\TeX{} package for PCs running \MSDOS{} or OS/2
  includes \LaTeX{}, \BibTeX{}, previewers, and drivers, and is
  available in \CTANref{emtex} as a series of disk images.  The
  package was written by Eberhard Mattes, and documentation is
  available in both German and English.  Windows users, or those
  wishing to run current \LaTeX{} on machines with a 386 or better
  processor, should get the beta-test release of em\TeX{}
  (\CTANref{emtex-betatest}), and the RSX memory extender
  (\CTANref{dpmigcc})

  A second package, g\TeX{}, runs under \MSDOS{} or Windows (and its
  users speak well of it).  It is available from \CTANref{gtex}

  TUG (and some of the other user groups) offer all freely-available
  \TeX{} software for the PC.  A catalogue is available free from
\htmlignore
  TUG (\Qref{}{Q-TUG}).
\endhtmlignore
\begin{htmlversion}
  \Qref{TUG}{Q-TUG}.
\end{htmlversion}

\item[Mac] Oz\TeX{} is a shareware version of \TeX{} for the Macintosh. A
  |dvi| previewer and PostScript driver are also included. It should run
  on any Macintosh Plus, SE, II, or newer model, but will not work on
  a 128K or 512K Mac. It was written by Andrew Trevorrow, and is
  available in \CTANref{oztex}, or on floppy disks from
\htmlignore
  TUG (\Qref{with details of TUG}{Q-TUG}).
\endhtmlignore
\begin{htmlversion}
  \Qref{TUG}{Q-TUG}.
\end{htmlversion}
  UK~TUG prepays the shareware fee, so that members of UK~TUG may
  acquire the software without further payment.  Questions about
  Oz\TeX{} may be directed to \Email|oztex@midway.uchicago.edu|

  Another partly shareware program is CMac\TeX{} (available as
  \CTANref{cmactex}), put together by Tom Kiffe. This is much closer
  to the Unix \TeX{} setup (it uses \ProgName|dvips|, for instance).

%\item[Mac] Oz\TeX{} (\Qref{Q-oztex}) is a shareware version. Another
%  version is CMacTeX, which has \TeX{} 3.14, \MF{} 2.7, a screen
%  previewer, dvips, a PostScript printing utility for the LaserWriter,
%  and some font managing utilities. It is available from the CTAN
%  archives (\Qref{Q-archives}).

\item[VMS] \TeX{} for VMS is available as \CTANref{AXPVMSTeX} (for
  Alpha-based machines) or \CTANref{VAXVMSTeX} (for VAX machines).
  Standard tape distribution is through DECUS
  (see \Qref[question]{sources of software}{Q-archives}).
  \checked{RF}{1994/10/11}

\item[Atari] \TeX{} is available for the Atari ST in \CTANref{atari}

  If anonymous |ftp| is not available to you, send a message
  containing the line ``help'' to
  \Email|atari@atari.archive.umich.edu|

\item[Amiga] Full implementations of \TeX{} 3.1 (Pas\TeX{}) and \MF{}
  2.7 are available in \CTANref{amiga}

  You can also order a \CDROM{} containing this and other Amiga software
  from Walnut Creek CDROM, telephone (+1) 510-947-5997.
  \checked{RF}{1994/10/11}

\item[TOPS-20] \TeX{} was originally written on a DEC-10 under WAITS,
  and so was easily ported to TOPS-20. A distribution that runs on
  TOPS-20 is available via anonymous |ftp| from \FTP|ftp.math.utah.edu|
  (128.110.198.34) in \path|pub/tex/pub/web|
  \checked{RF}{1994/10/17}
\end{description}

\Question[Q-editors]{\protect\TeX{}-friendly editors and shells}
There are good \TeX{}-writing environments and editors for most
operating systems; some are described below, but this is only a
personal selection:
\begin{description}
\item[Unix] Try GNU~\ProgName|emacs|, and the AUC\TeX{} mode
  (\CTANref{auctex}).  This provides menu items and control sequences
  for common constructs, checks syntax, lays out markup nicely, lets
  you call \TeX{} and drivers from within the editor, and everything
  else like this that you can think of.  Complex, but very powerful.
\item[VMS] An \ProgName|lsedit| mode for editing \TeX{} source is
  available from
  \htmlignore
  TUG (\Qref{}{Q-TUG})
  \endhtmlignore
\begin{htmlversion}
  \Qref{TUG}{Q-TUG}
\end{htmlversion}
  as \TeX{}niques 1, VAX Language-Sensitive Editor, by Kent MacPherson
  (1985).
\item[\MSDOS{}] There are several choices:
  \begin{itemize}
  \item The 4All\TeX{} workbench (\CTANref{4alltex}) provides a very
    comprehensive environment written in 4DOS (you need to pay a
    shareware fee for this) which lets you access most \TeX{}-related
    software in a friendly way. You can choose your own editor;
    something such as \ProgName|QEdit| or \ProgName|Brief| is
    suitable. This whole package is available in easy-to-use form on
    \CDROM{} from \TeX{} user groups.
  \item \TeX{}shell (\CTANref{texshell}) is a simpler,
    easily-customisable environment, which can be used with the editor
    of your choice.
  \item Eddi4\TeX{} (\CTANref{e4t}) is a specially-written \TeX{}
    editor which features intelligent colouring, bracket matching,
    syntax checking, online help and the ability to call \TeX{}
    programs from within the editor. It is highly customisable, and
    features a powerful macro language.
  \end{itemize}
  You can also use GNU~\ProgName|emacs| and AUC\TeX{} under DOS.
\item[Windows] Your best public domain bet is probably to use
  MicroEmacs as an editor and control centre for \TeX{} programs. The
  g\TeX{} package (\CTANref{gtex}) comes with MicroEmacs ready to go,
  integrated with \TeX{}, previewer, \ProgName|dvips| and
  \ProgName|GhostScript|.

  On a PC with large enough memory, a version of GNU~\ProgName|emacs|,
  that will run under Windows, is available; thus you can also use
  AUC\TeX{} under Windows.

  Y\&Y's commercial (and high-quality) Windows previewer, \ProgName|dviwindo|,
  can be used as a good \TeX{} shell, calling programs such as \TeX{},
  drivers, and editors (Y\&Y supply the public domain PE, and
  recommend the commercial Epsilon) from customisable menus
  (see \Qref[question]{commercial vendors}{Q-commercial} for details of Y\&Y).

  Scientific Word is a \WYSIWYG{} editing program, strong on maths, which
  uses \LaTeX{} for output (see \Qref[question]{vendors}{Q-commercial}
  for contact address).
\item[OS/2] Eddi4\TeX{} works under OS/2; look also at
  \CTANref{epmtex} for a specific OS/2 shell.
\item[Macintosh] The commercial Textures provides an excellent integrated
  Macintosh environment with its own editor.  More powerful still (as an
  editor) is the shareware \ProgName|Alpha| (\CTANref{alpha}) which is
  extensible enough to let you perform almost any \TeX{}-related job. It
  works well with Oz\TeX{}.
\end{description}
Atari, Amiga and NeXT users also have nice environments. \LaTeX{}
users who like `make' can find help in, \emph{e.g}., \CTANref{latexmk}

There is another set of shell programs to help you manipulate
\BibTeX{} databases.

\Question[Q-commercial]{Commercial \protect\TeX{} implementations}

There are many commercial implementations of \TeX{}. The first
appeared not long after \TeX{} itself appeared. Of the vendors,
ArborText (formerly Textset) and Personal \TeX{} are those who have
survived longest (since the mid or early 80s).

What follows is probably an incomplete list.  Naturally, no warranty or
fitness for purpose is implied by the inclusion of any vendor in this
list.  The source of the information is given to provide some clues to
its currency.

In general, a commercial implementation will come `complete', that is,
with suitable previewers and printer drivers.  They normally also have
extensive documentation (\emph{i.e}., not just the \TeX{}book!) and some
sort of support service.  In some cases this is a toll free number
(probably applicable only within the USA and or Canada), but others
also have email, and normal telephone and fax support.
\begin{description}
\item[Unix; \TeX{}] Silicon Graphics Iris/Indigo, Solaris 2.1, IBM RS/6000,
  DEC/RISC-Ultrix, HP 9000. ``Complete \TeX{} packages. Ready to use,
  fully documented and supported.''
  \begin{quote}
    ArborText Inc\\
    1000 Victors Way\\
    Suite 400\\
    Ann Arbor MI 48108\\
    USA\\[.25\baselineskip]
    Tel: (+1) 313-996-3566\\
    Fax: (+1) 313-996-3573
  \end{quote}
  Source: TUGboat, 1994, 15(1)
\item[VAX/VMS; Convergent \TeX{}] Complete system for VAX/VMS machines
  (a version for Alphas is in preparation); includes \LaTeX{},
  multinational typesetting support, \MF{} and Web.
  \begin{quote}
    Northlake Software, Inc.\\
    812 SW Washington, Ste 1100\\
    Portland, OR  97201\\
    USA\\[.25\baselineskip]
    Tel: (+1) 503-228-3383\\
    Fax: (+1) 503-228-5662\\
    Email: \Email|rau@nls.com|
  \end{quote}
  Source: Email from Pat Rau, November 1994
\item[PC; Turbo\TeX{}] Runs on Windows, \MSDOS{}, OS/2, Unix and
  VAX/VMS; also True\TeX{} for Windows~3.1, Window~NT and Windows~95.
  \begin{quote}
    The Kinch Computer Co.\\
    611 Mitchell Street\\
    Ithaca, New York 14850\\
    USA\\[.25\baselineskip]
    Tel: (+1) 607-273-0222\\
    Fax: (+1) 607-273-0484\\
    Email: \Email|kinch@netcom.com|
  \end{quote}
  Source: AMS listing, November 1994
\item[PC; \TeX{}] ``Bitmap free \TeX{} for Windows.''
  \begin{quote}
    Y\&Y, Inc.\\
    45 Walden Street\\
    Concord MA 01742\\
    USA\\[.25\baselineskip]
    Tel: 800-742-4059 (within the USA)\\
    Tel: (+1) 508-371-3286\\
    Fax: (+1) 508-371-2004
  \end{quote}
  Source: AMS listing, November 1994
\item[pc\TeX{}] Long-established: now has a Windows implementation.
  \begin{quote}
    Personal \TeX{} Inc\\
    12 Madrona Street\\
    Mill Valley, CA 94941\\
    USA\\[.25\baselineskip]
    Fax: (+1) 415-388-8865\\
    Email: \Email|pti@crl.com|
  \end{quote}
  Source: TUGboat, 1992, 13(2)
\item[PC; V\TeX{}] Also ``Bitmap-free''.
  \begin{quote}
    MicroPress Inc\\
    68-30 Harrow Street\\
    Forest Hills, NY 11375\\
    USA\\[.25\baselineskip]
    Tel: (+1) 718-575-1816\\
    Fax: (+1) 718-575-8038
  \end{quote}
  Source: Resource Directory supplement to TUGboat 1991, 12(12)
\item[PC; micro\TeX{}] Micro\TeX{} and \TeX{}~tools.
  \begin{quote}
    Micro Programs, Inc.\\
    251 Jackson Ave.\\
    Syosset, NY 11791\\
    USA\\[.25\baselineskip]
    Tel: (+1) 516-921-1351\\
    Email: \Email|sales@microprograms.com|
  \end{quote}
  Source: AMS listing, November 1994
\item[PC; Scientific Word] Scientific Word and Scientific Workplace
  offer a mechanism for near-\WYSIWYG{} input of \LaTeX{} documents; they
  ship with True\TeX{} from Kinch (see above).  Queries within the UK
  should be addressed to Scientific Word Ltd., others should be
  addressed directly to the publisher, TCI.
  \begin{quote}
    Dr Christopher Mabb\\
    Scientific Word Ltd.\\
    98 Pont Adam\\
    Ruabon\\
    Wrexham\\
    Clwyd, LL14 6EF\\
    UK\\[0.25\baselineskip]
    Tel: 01978 823088 (within the UK) \\
    Fax: 01978 823066 (within the UK) \\
    Email: \Email|christopher@sciword.demon.co.uk|
  \end{quote}
  \begin{quote}
    TCI Software Research Inc.\\
    1190 Foster Road\\
    Las Cruces\\
    New Mexico, 88001\\
    USA\\[0.25\baselineskip]
    Tel: (+1) 505-522-4600\\
    Fax: (+1) 505-522-0116\\
    Email: \Email|info@tcisoft.com|
  \end{quote}
  Source: Mail from Christopher Mabb, November 1994
\item[Macintosh; Textures] ``A \TeX{} system `for the rest of
  us'\thinspace''; also gives away a \MF{} implementation and some
  font manipulation tools.
  \begin{quote}
    Blue Sky Research\\
    534 SW Third Avenue\\
    Portland, Oregon 97204\\
    USA\\[.25\baselineskip]
    Tel: 800-622-8398 (within the USA)\\
    Tel: (+1) 503-222-9571\\
    Fax: (+1) 503-222-1643\\
    Email: \Email|sales@bluesky.com|
  \end{quote}
  Source: TUGboat, 1994, 15(1)
\item[Amiga\TeX{}] A full implementation for the Commodore Amiga,
  including full, on-screen and printing support for all PostScript
  graphics and fonts, IFF raster graphics, automatic font generation,
  and all of the standard macros and utilities.
  \begin{quote}
    Radical Eye Software\\
    PO Box 2081\\
    Stanford, CA 94309\\
    USA
  \end{quote}
  Source: Mail from Tom Rokicki, November 1994
\end{description}
\checked{mc}{1994/11/09}%
\checked{RF}{1994/11/24}%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{DVI Drivers and Previewers}

\Question[Q-dvips]{DVI to PostScript conversion programs}

The best public domain |dvi| to PostScript conversion program which
runs under many operating systems is Tom Rokicki's \ProgName|dvips|.
\ProgName|dvips| is written in C and ports easily to other operating
systems; it is available as \CTANref{dvips}

VMS versions are available through the DECUS library
(see \Qref[question]{sources of software}{Q-archives}), 
and also from CTAN: \CTANref{AXPVMSdvips} (for Alpha-based machines),
\CTANref{VAXVMSdvips} (for VAX machines); support files are available
in \CTANref{VMSdvips-support}, and a set of fonts for use with
\LaTeXe{} are available in \CTANref{VMSdvips-fonts}

A precompiled version for \MSDOS{} is available from \CTANref{dvips-pc}

Karl Berry's version of \ProgName|dvips| (called \ProgName|dvipsk|)
has a configure script and path searching code similar to that in his
other programs (\emph{e.g.}, \ProgName|web2c|); it is available from
\CTANref{dvipsk}

Another good portable program is \ProgName|dvitops| by James Clark,
which is also written in C and will compile under Unix, \MSDOS{}, VMS,
and Primos; however, it does not support virtual fonts.  It is
available from
\CTANref{dvitops}

Macintosh users can use either the excellent drivers built into Oz\TeX{}
or Textures, or a port of \ProgName|dvips| in the CMac\TeX{} package.

\Question{DVI drivers for HP LaserJet}

The em\TeX{} package (see \Qref[question]{\TeX{} systems}{TeX-systems})
contains a driver for the LaserJet, \ProgName|dvihplj|.

Version 2.10 of the Beebe drivers supports the LaserJet. These drivers
will compile under Unix, VMS, and on the Atari ST and DEC-20's, and
are available from \CTANref{beebe}

Karl Berry's \ProgName|dviljk|, which has the same path-searching code
as his \ProgName|dvipsk| (see
\Qref[question]{DVI to PostScript programs}{Q-dvips}), is available in
\CTANref{dviljk}

\Question{DVI previewers}

Em\TeX{} and g\TeX{} for the PC, and Oz\TeX{} for the Macintosh, all
come with previewers that can be used on those platforms. There is a
good OS/2 Presentation Manager previewer in em\TeX{}, and a public
domain Windows previewer (\CTANref{dviwin}).  Commercial PC \TeX{}
packages  (see \Qref[question]{commercial vendors}{Q-commercial})
have good DOS and Windows previewers.

Previewers available for other operating systems include:
\begin{proglist}
\item[xdvi] The most widely used previewer for the X Window System
  (and hence almost any Unix or modern VMS workstation); available in
  \CTANref{xdvi}

  Karl Berry's version of \ProgName|xdvi|, called \ProgName|xdvik|,
  has features analogous to his \ProgName|dvipsk|
  (see \Qref[question]{DVI to PostScript programs}{Q-dvips});
  it is available in \CTANref{xdvik}
\item[dvipage] For SunView on (old enough) Sun workstations. This was
  published in volume 15 of \Newsgroup|comp.sources.unix| and is
  archived in \CTANref{dvipage}
\item[xtex] An older previewer for the X Window System; available in
  \CTANref{seetex}
\item[dviapollo] For Apollo Domain workstations; available in
  \CTANref{dviapollo}
\item[dvidis] For (old enough, VMS) VAXstations running VWS; available
  in \CTANref{dvidis}
\item[dvitovdu] for Tektronix 4010-compatible and other terminals
  under Unix and VMS; available as \CTANref{dvitovdu}
\item[dvi2tty] A |dvi| to ASCII conversion program, for normal
  terminals; available as \CTANref{dvi2tty}
\item[texsgi] For SGI under Irix; both a binary and source are
  available, but be sure to get the fonts as well.  Available as
  \CTANref{texsgi}
\end{proglist}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{Support Packages for \protect\TeX{}}

\Question{Fig, a \protect\TeX{}-friendly drawing package}

(\ProgName|X|)\ProgName|Fig| is a menu driven tool that allows you to
draw objects on the screen of an X workstation.  \ProgName|transfig|
is a set of tools which translate the code \ProgName|fig| produces to
other graphics languages including PostScript and the \LaTeX{} picture
environment. They are available in \CTANref{xfig} and
\CTANref{transfig}

\ProgName|Fig| is supported by Micah Beck (\Email|beck@cs.cornell.edu|) and
\ProgName|transfig| is maintained by Brian Smith (\Email|bvsmith@lbl.gov|). 
Another tool for \ProgName|fig| conversion is \ProgName|fig2mf| which
generates \MF{} code from \ProgName|fig| input. It is available in
\CTANref{fig2mf}

\Question{\protect\TeX{}CAD, a drawing package for \protect\LaTeX{}}

\TeX{}CAD is a program for the PC which enables the user to draw diagrams
on screen using a mouse or arrow keys, with an on-screen menu of available 
picture-elements. Its output is code for the \LaTeX{} picture environment.
Optionally, it can be set to include lines at all angles using 
the em\TeX{} driver-family
\htmlignore
|\special|s (\Qref{}{Q-specials}).
\endhtmlignore
\begin{htmlversion}
\Qref{\cs|special|s}{Q-specials}.
\end{htmlversion}
\TeX{}CAD is part of the em\TeX{} distribution.

A Linux port of the program, \CTANref{xtexcad}, is reported also to
run on other Unix operating systems.

\Question{Spelling checkers for work with \protect\TeX{}}

For Unix, \ProgName|ispell| is probably the program of choice. It is
available in \CTANref{ispell}; beware of any version with a number
|4.x| --- such versions represent a divergent version of the source
which lacks many useful facilities of the |3.x| series.

For \MSDOS{}, there are several programs. \ProgName|amspell| can be called from within an editor (available as
\CTANref{amspell}).  \ProgName|jspell| is an extended version of
\ProgName|ispell| (available as \CTANref{jspell}).

For the Macintosh, \ProgName|Excalibur| is the program of choice.  It
will run in native mode on both sorts of Macintosh, and is available as
\CTANref{Excalibur-sea} (there are other dictionaries in the same
directory).

For VMS, a spell checker can be found in \CTANref{vmspell}

\Question[Q-vortex]{The \protect\VorTeX{} package}

\VorTeX{} (available in \CTANref{vortex}) is a package of programs
written at the University of
California at Berkeley, and was described by Michael A.~Harrison in
``\emph{News from the \VorTeX{} project}'' in TUGboat 10(1),
pp.~11--14, 1989.  It includes several nice previewers and some
\ProgName|emacs| modes for \TeX{} and \BibTeX{}.
The \VorTeX{} distribution is not maintained, and now looks distinctly
long in the tooth (it was never upgraded to \TeX{} version 3).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{Literate programming}

\Question[Q-lit]{What is Literate Programming?}

Literate programming is the combination of documentation and source
together in a fashion suited for reading by human beings. 
In general, literate programs combine source
and documentation in a single file.  Literate programming tools then
parse the file to produce either readable documentation or compilable
source.  The WEB style of literate programming was created by D.~E.~Knuth
during the development of his \TeX{} typesetting software.

Discussion of literate programming is conducted in the newsgroup
\Newsgroup|comp.programming.literate|, which is gatewayed to the
mailing list \Email|litprog@shsu.edu| (see
\Qref[question]{subscribing to mailing lists}{Q-maillists} for
details).  The literate programming FAQ is stored as
\CTANref{LitProg-FAQ}

\Question{WEB for C, FORTRAN, and other languages}

\TeX{} is written in the programming language WEB; WEB is a tool to
implement the concept of ``literate programming''.  

\ProgName|CWEB|, a WEB for C programs, written by Silvio
Levy, is available as \CTANref{cweb}

Spidery WEB supports many 
languages including Ada, awk, and C. It was written by Norman Ramsey 
and, while not in the public domain, is usable free. It is available 
in \CTANref{spiderweb}

\ProgName|FWEB| is a version for Fortran, Ratfor, and C written by John
Krommes.  % (\Email|krommes@lyman.pppl.gov|).
It is available in \CTANref{fweb}

\ProgName|SchemeWEB| is a Unix filter that translates SchemeWEB into \LaTeX{}
source or Scheme source. It was written by John Ramsdell and is
available in \CTANref{schemeweb}

\ProgName|APLWEB| is a version of WEB for APL and is available in
\CTANref{aplweb}

\ProgName|FunnelWeb| is a version of WEB that is language independent. It is
available in \CTANref{funnelweb}
% It also appeared in \Newsgroup|comp.sources.unix| volume 26 issue
% 121, posted 11 April 1993.

Other language independent versions of WEB are \ProgName|nuweb| (which
is written in ANSI C), available in \CTANref{nuweb}, and
\ProgName|noweb|, available in \CTANref{noweb}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{Format conversions}

\Question{Conversion between \protect\TeX{}/\protect\LaTeX{} and others}

% There are various programs which can convert between \TeX{} or
% \LaTeX{} and other word-processor or similar formats (such as
% \ProgName|troff|).
\begin{description}
\item[troff] \ProgName|troff-to-latex| (available as
  \CTANref{troff-to-latex}), written by Kamal Al-Yahya at Stanford
  University (California, USA), assists in the translation of a
  \ProgName|troff| document into \LaTeX{} format.  It recognises most
  |-ms| and |-man| macros, plus most \ProgName|eqn| and some
  \ProgName|tbl| preprocessor commands.  Anything fancier needs to be
  done by hand. Two style files are provided. There is also a man page
  (which converts very well to \LaTeX{}\dots{}).  The program is
  copyrighted but free. An enhanced version of this program,
  \ProgName|tr2latex|, is available in \CTANref{tr2latex}

  The DECUS \TeX{} distribution (see
  \Qref[question]{sources of software}{Q-archives})
  also contains a program which converts \ProgName|troff| to \TeX{}.

\item[Scribe] Mark James (\Email|jamesm@dialogic.com|) has a copy of
  \ProgName|scribe2latex| he has been unable to test but which he will
  let anyone interested have. The program was written by Van Jacobson
  of Lawrence Berkeley Laboratory.%
  \checked{RF}{1994/11/18}

\item[WordPerfect] \ProgName|wp2latex| (available as
  \CTANref{wp2latex}) is a PC program
  written in Turbo Pascal by R.~C.~Houtepen at the Eindhoven
  University in the Netherlands. It converts \ProgName|WordPerfect|
  5.0 documents to \LaTeX{}. Pascal source is included.  Users find it
  ``helpful'' and ``decent'' in spite of some limitations. It gets
  high marks for handling font changes, but cannot make
  indices, tables of contents, margins or graphics, and can't
  handle features new in \ProgName|WordPerfect| version~5.1, in particular
  the equation formatter. The program is copyrighted but free.

  Glenn Geers of the University of Sydney, Australia
  (\Email|glenn@qed.physics.su.oz.au|) is translating
  \ProgName|wp2latex| into C and adding some \ProgName|WordPerfect|
  5.1 features, in particular its equation handling. His work is in
  the \File|glenn| subdirectory of \CTANref{wp2latex}

\item[PC-Write] |pcwritex.arc| is available in \CTANref{pcwritex}

  This is a print driver for PC-Write that ``prints'' a PC-Write V2.71
  document to a \TeX{}-compatible disk file.  It was written by Peter
  Flynn at University College, Cork, Republic of Ireland.

\item[runoff] Peter Vanroose's (\Email|vanroose@esat.kuleuven.ac.be|)
  conversion program is written in VMS Pascal.
  The sources and a VAX executable are available from
  \CTANref{rnototex}

\item[refer/tib] There are a few programs for converting bibliographic
  data between \BibTeX{} and \ProgName|refer|/\ProgName|tib| formats.
  They are in \CTANref{refer-tools}

  In spite of the directory name, it also contains a shell script to
  convert \BibTeX{} to \ProgName|refer| as well. The collection
  is not maintained.

\item[RTF] A program for converting Microsoft's Rich Text Format to
  \TeX{} is available in \CTANref{rtf2tex}, which was written and is
  maintained by Robert Lupton (\Email|rhl@astro.princeton.edu|).
  There is also a convertor to \LaTeX{} by Erwin Wechtl, in
  \CTANref{rtf2latex}

\item[Microsoft Word] A rudimentary program for converting MS-Word to
  \LaTeX{} is wd2latex, for \MSDOS{} (\CTANref{wd2latex}); a better
  idea, however, is to convert the document to RTF format and use one
  of the RTF converters mentioned above.
\end{description}

A group at Ohio State University (USA) is working on
a common document format based on SGML, with the ambition that any format could be
translated to or from this one.  \ProgName|Framemaker| provides
``import filters'' to aid translation from alien formats
(presumably including \TeX{}) to \ProgName|Framemaker|'s own.

\Question{Conversion from \protect\TeX{}/\protect\LaTeX{} to plain ASCII}

The aim here is to emulate the Unix \ProgName|nroff|, which formats
text as best it can for the screen, from the same
input as the Unix typesetting program \ProgName|troff|.

Ralph Droms (\Email|droms@bucknell.edu|) has a style file and a
program that provide the \LaTeX{} equivalent of \ProgName|nroff|,
though it doesn't do a good job with tables and mathematics. The
software is available in \CTANref{txtdist};the original
\ProgName|dvi2tty| often does an acceptable job and is available in
\CTANref{dvi2tty}

Another possibility is to use \File|screen.sty| (available as
\CTANref{screensty}). Use a \ProgName|dvi2tty| program of some kind;
you might try \CTANref{crudetype} as well.  Another possibility is to
use the \LaTeX{}-to-ASCII conversion program, \ProgName|l2a|
(\CTANref{l2a}), although this is really more of a de-\TeX{}ing
program.

The canonical de-\TeX{}ing program is \ProgName|detex|
(\CTANref{detex}), which removes all comments and control sequences
from its input before writing it to its output.  Its original purpose
was to prepare input for a dumb spelling checker.

\Question[Q-SGML2TeX]{Conversion from HTML or SGML to \protect\TeX{}}

Nathan Torkington (\Email|Nathan.Torkington@vuw.ac.nz|) developed
\ProgName|html2latex| from the HTML parser in NCSA's Xmosaic package.
The program takes an HTML file and generates a \LaTeX{} file from it.
The conversion code is subject NCSA restrictions, but the whole source
is available as \CTANref{html2latex}

Peter Flynn has developed a \ProgName|pcl| program \ProgName|sgml2tex|
(for PCs).  It is controlled by a configuration file, and an example
configuration for translating HTML files is given.  The program is
available in \CTANref{sgml2tex}

\Question[Q-LaTeX2HTML]{Conversion to HTML}

\LaTeX{}2HTML (\CTANref{latex2html}) is a package (mostly of
\ProgName|perl| scripts) that breaks up a \LaTeX{} document into one
or more components, and links them together so that they can be read
over the World-Wide Web as an hypertext document.

\LaTeX{}2HTML defines a mapping between \LaTeX{} intra-document
references and hyperlinks, and extends the \LaTeX{} referencing
mechanisms to permit reference to other (possibly remote) documents
and other internet resources.  It translates \LaTeX{} accented and
other characters (as best it can) to things that World-Wide Web
browsers can display, and provides a mechanism whereby mathematics
(and other things that browsers can't deal with) may be translated to
images that can be loaded in-line into the hypertext document.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{\protect\MF{}}

\Question{Getting \protect\MF{} to do what you want}

\MF{} allows you to create your own fonts, and most \TeX{} users
will never need to use it. \MF{}, unlike \TeX{}, requires some
customisation: each output device for which you will be generating
fonts needs a mode associated with it. Modes are defined using the
|mode_def| convention described on page~94 of \emph{The \MF{}book}
(see \Qref[question]{\TeX{}-related books}{Q-books}). You will need
a file, which conventionally called \File|local.mf|, containing all the
|mode_def|s you will be using. If \File|local.mf| doesn't already
exist, Karl Berry's collection of modes,
available as \CTANref{modes-file}, is a good starting point 
(it can be used as a `\File|local.mf|' without modification in a `big
enough' implementation of \MF{}). Lists of
settings for various output devices are also published periodically in
TUGboat (see \Qref[question]{TUG}{Q-TUG}). Now create a |plain| base
file using \ProgName|inimf|, |plain.mf|, and |local.mf|:
\begin{htmlversion}
\begin{verbatim}
   % inimf
   This is METAFONT....
   **plain # you type plain
   (output)
   *input local # you type this
   (output)
   *dump # you type this
   Beginning to dump on file plain....
   (output)
\end{verbatim}
\end{htmlversion}
\htmlignore
%\begin{quote}
%\begin{tabular}{ll}
%|% inimf|\\
%This is METAFONT\dots{}\\{}
%**|plain|& you type `|plain|'\\{}
%(output)\\{}
%*|input local|& you type this\\{}
%(output)\\{}
%*|dump|& you type this\\{}
%Beginning to dump on file plain\dots{}\\{}
%(output)\\{}
%\end{tabular}\unskip
%\end{quote}
\par\vspace{\topsep}
\begin{tabular}{ll}
|% inimf|\\
This is METAFONT\dots{}\\{}
**|plain|& you type `|plain|'\\{}
(output)\\{}
*|input local|& you type this\\{}
(output)\\{}
*|dump|& you type this\\{}
Beginning to dump on file plain\dots{}\\{}
(output)\\{}
\end{tabular}\par
\endhtmlignore
This will create a base file named \File|plain.base| (or something
similar; for example, it will be \File|PLAIN.BAS| on \MSDOS{} systems)
which should be moved to the directory containing the base files on
your system (note that some systems have two or more such directories,
one for each `size' of \MF{} used).

Now you need to make sure \MF{} loads this new base when it starts up. If
\MF{} loads the |plain| base by default on your system, then you're
ready to go. Under Unix (using the default \ProgName|web2c|
distribution\begin{footnoteenv}
The \ProgName|command|\_\ProgName|name| is symbolically linked to
\ProgName|virmf|, and \ProgName|virmf| loads \File|command_name.base|
\end{footnoteenv})
this does indeed happen, but we could for instance define a command
\ProgName|mf| which executes |virmf &plain| loading the |plain| base
file.

The usual way to create a font with |plain| \MF{} is to start 
it with the line
\htmlignore
\bgroup
\par\vskip\topsep
\hangindent3em\hangafter1\raggedright\parindent10pt\relax
|\mode=<mode name>;| |mag=<magnification>;| |input <font file name>|%
\par\vskip\topsep
\egroup
\noindent in
\endhtmlignore
\begin{htmlversion}
\begin{verbatim}
\mode=<mode name>; mag=<magnification>; input <font file name>
\end{verbatim}
in
\end{htmlversion}
response to the `**' prompt or on the \MF{} command line. (If
|<mode name>| is unknown or omitted, the mode defaults to `proof' and
\MF{} will produce an output file called \File|<font file
name>.2602gf|)  The |<magnification>| is a floating point number or
`magstep' (magsteps are defined in \emph{The \MF{}book} and \emph{The
\TeX{}book}).  If |mag=<magnification>| is omitted, then the default
is 1 (magstep 0).  For example, to generate cmr10 at 12pt for an epson
printer you would type
\begin{verbatim}
   mf \mode=epson; mag=magstep 1; input cmr10
\end{verbatim}
Note that under Unix the |\| and |;| characters must usually be quoted or
escaped, so this would typically look something like
\begin{verbatim}
   mf '\mode=epson; mag=magstep 1; input cmr10'
\end{verbatim}

If you don't have \ProgName|inimf| or need a special mode that isn't
in the base, you can put its commands in a file (\emph{e.g.},
\File|ln03.mf|) and invoke it on the fly with the |\smode| command.
For example, to create \File|cmr10.300gf| for an LN03 printer, using
the file
\begin{verbatim}
   % This is ln03.mf as of 2/27/90
   % mode_def courtesy of John Sauter
   proofing:=0;
   fontmaking:=1;
   tracingtitles:=0;
   pixels_per_inch:=300;
   blacker:=0.65;
   fillin:=-0.1;
   o_correction:=.5;
\end{verbatim}
(note the absence of the |mode_def| and |enddef| commands), you would
type
\begin{verbatim}
   mf \smode="ln03"; input cmr10
\end{verbatim}
This technique isn't one you should regularly use, but it may
prove useful if you acquire a new printer and want to experiment with
parameters, or for some other reason are regularly editing the
parameters you're using.  Once you've settled on an appropriate set of
parameters, you should use them to rebuild the base file that you use.

A summary of the above written by Geoffrey Tobin, and tips about
common pitfalls in using \MF{}, is available as \CTANref{mf-beginners}

\Question{Which font files should be kept}

\MF{} produces from its run three files, a metrics (|tfm|) file, a
generic font (|gf|) file, and a log file; all of these files have the
same base name as does the input (\emph{e.g.}, if the input file was
\File|cmr10.mf|, the outputs will be \File|cmr10.tfm|,
\File|cmr10.nnngf|\begin{footnoteenv}
                    Note that the file name may be transmuted by such
                    operating systems as \MSDOS{}, which don't permit
                    long file names
                  \end{footnoteenv}
and \File|cmr10.log|).

To operate \TeX{} using the font, you need a |tfm| file, so you need
to keep that.  However, you are likely to want generate the same font
at more than one magnification, and each time you do so you'll
(incidentally) generate another |tfm| file; these files are
all the same, and you only therefore need to retain one of them.

To produce preview or printed output, the |dvi| processor will need a
font raster file; this is what the |gf| file provides.  However, while
there used (once upon a time) to be |dvi| processors that could use
|gf| files, modern processors use packed raster (|pk|) files.
Therefore, you need to generate a |pk| file from the |gf| file; the
program \ProgName|gftopk| does this for you, and once you've done that you
may throw the |gf| file away.

The log file should never need to be used, unless there was some sort
of problem in the \MF{} run, and need not be ordinarily kept.

\Question{Getting bitmaps from the archives}

Most people these days start using \TeX{} with a 300 dots-per-inch (dpi)
laser printer, and Computer Modern bitmap fonts for this resolution
are supplied with most \TeX{} packages.   There are also two such sets
available on CTAN: \CTANref{pk300} (for write-black printer engines)
and \CTANref{pk300w} (for write-white engines).
However, some users want to
send their work to high quality typesetting machines (typically with a
resolution of 1270~dpi or greater); it is also becoming more common to
use a 600~dpi laser printer. Why don't the archives or suppliers
provide bitmap fonts at these sizes? There are two reasons:
\begin{enumerate}
\item When a bitmap font is created with \MF{}, it needs to know the
  characteristics of the device; who knows what 600 or 1270~dpi device
  you have?  (Of course, this objection applies equally well to
  300~dpi printers.)
\item Bitmap fonts get \emph{big} at high resolutions. Who knows what
  fonts at what sizes you need?
\end{enumerate}
It would be possible to provide some set of 1270~dpi bitmap fonts in
the archives, but it would take a lot of space, and might not be right
for you. 

So what to do?  You can build the fonts you need yourself with \MF{}:
this isn't at all hard, and some drivers help you (\ProgName|dvips|, and the
em\TeX{} drivers) construct the \MF{} commands. You might need to look
at Karl Berry's collection of \MF{} modes (\CTANref{modes-file}). 
Alternatively, if it is a PostScript device you have, consider using
the fonts in Type~1 font format. You can buy all the Computer Modern
fonts in
PostScript form from Blue Sky Research or Y\&Y 
\htmlignore
(\Qref{}{Q-commercial} for addresses),
\endhtmlignore
\begin{htmlversion}
  (see \Qref{commercial vendors}{Q-commercial} for addresses),
\end{htmlversion}
or you can use Basil
Malyshev's public domain versions in \CTANref{ps-type1} (the Paradissa
collection is complete, but is gradually being replaced by the better
BaKoMa collection).%
%\Q{Isn't it a bit over the top to refer to whole directory?}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{PostScript and \protect\TeX{}}

\Question[Q-usepsfont]{Using PostScript fonts with \protect\TeX{}}

Before you start: in order to use PostScript fonts, \TeX{} needs
\emph{metric} (called |tfm|) files. Several sets of metrics are
available from the archives; for mechanisms for generating new ones,
see \Qref[question]{metrics for PostScript fonts}{Q-metrics}.  You
also need the fonts themselves; PostScript printers come with a set of
fonts built in, but to extend your repertoire you almost invariably
need to buy from one of the many commercial font vendors (see, for
example, \Qref[question]{choice of fonts}{Q-psfchoice}).

If you use \LaTeXe{}, the best way to get PostScript fonts into your
document is to use the PSNFSS package maintained by Sebastian Rahtz
and Alan Jeffrey (available in \CTANref{psnfss}); it's supported by
the \LaTeX{}3 project team, so bug reports can and should be submitted. 
PSNFSS gives you a set of packages for changing the default
roman, sans-serif and typewriter fonts; \emph{e.g}., \File|times.sty| will set
up Times Roman, Helvetica and Courier in place of Computer Modern,
while \File|avant.sty| just changes the sans-serif family to
AvantGarde. To go with these packages, you will need the font metric
files (watch out for encoding problems! see
\Qref[question]{metrics for PostScript fonts}{Q-metrics})
and font description (\texttt{.fd}) files for each font family you
want to use. These can be obtained from \CTANref{metrics}, arranged by
vendor (\emph{e.g}., Adobe, Monotype, \emph{etc}.). For convenience,
metrics for the common `35' PostScript fonts found in most printers
are provided with PSNFSS, packaged as \CTANref{lw35nfss-zip}

For older versions of \LaTeX{} there are various schemes, of which the
simplest to use is probably the PS\LaTeX{} macros distributed with
\ProgName|dvips|.

For |plain| \TeX{}, you load whatever fonts you like; if the encoding of
the fonts is not the same as Computer Modern it will be up to you to
redefine various macros and accents, or you can use the font
re-encoding mechanisms available in many drivers and in
\ProgName|ps2pk| and \ProgName|afm2tfm|.

Victor Eijkhout's sophisticated Lollipop package (\CTANref{lollipop})
supports declaration of font families and styles in a similar way to
\LaTeX{}'s NFSS, and so is easy to use with PostScript fonts.

Some common problems encountered are discussed elsewhere
(see \Qref[question]{problems with PS fonts}{psfonts-problems}).

\Question[ps-preview]{Previewing files using PostScript fonts}

Most \TeX{} previewers only display bitmap |pk| fonts. If you want to
preview documents using PostScript fonts, you have three choices:
\begin{enumerate}
\item Convert the \texttt{.dvi} file to PostScript and use a
  PostScript previewer. Some modern Unix X implementations have this
  built in (as does NeXT-step); (X11) Unix, Windows, OS/2, and \MSDOS{}
  users can use the free GhostScript (\CTANref{ghostscript}), a
  complete level 2 implementation.
\item Under Windows on a PC, or on a Macintosh, let Adobe Type Manager
  display the fonts. Textures (Macintosh) works like this, and under
  Windows you can use Y\&Y's \ProgName|dviwindo| for bitmap-free
  previewing.
\htmlignore
  (See \Qref[question]{}{Q-commercial} for details of these
  suppliers.)
\endhtmlignore
\begin{htmlversion}
    (See \Qref{commercial suppliers}{Q-commercial} for details.)
\end{htmlversion}
\item If you have the PostScript fonts in Type~1 format,
  use \ProgName|ps2pk| (\CTANref{ps2pk}) or \ProgName|gsftopk|
  (designed for use with the \ProgName|ghostscript| fonts;
  \CTANref{gsftopk}) to make |pk| bitmap fonts which your previewer
  will understand. This can produce excellent results, also suitable
  for printing with on non-PostScript devices. Check the legalities of
  this if you have purchased the fonts. The very commonest PostScript
  fonts such as Times and Courier come in Type~1 format on disk with
  Adobe Type Manager (often bundled with Windows, and part of OS/2).
\end{enumerate}

\Question[Q-metrics]{\protect\TeX{} font metric files for PostScript fonts}

Font vendors such as Adobe supply metric files for each font, in |afm|
(Adobe Font Metric) form; these can be converted to \texttt{tfm}
(\TeX{} Font Metric) form. The CTAN archives have prebuilt metrics
which will be more than enough for many people (\CTANref{metrics};
beware~--- this directory is at the root of a huge tree), but you may
need to do the conversion yourself if you have special needs or
acquire a new font. One important question is the \emph{encoding} of
(Latin character) fonts; while we all more or less agree about the
position of about 96 characters in fonts (the basic ASCII set), the
rest of the (typically) 256 vary. The most obvious problems are with
floating accents and special characters such as the `pounds sterling'
sign. There are three ways of dealing with this: either you change the
\TeX{} macros which reference the characters (not much fun, and
error-prone); or you change the encoding of the font (easier than you
might think); or you use
\htmlignore
virtual fonts (\Qref{}{virtualfonts})
\endhtmlignore
\begin{htmlversion}
\Qref{virtual fonts}{virtualfonts}
\end{htmlversion}
to \emph{pretend} to
\TeX{} that the encoding is the same as it is used to. If you use
\LaTeXe{}, it allows for changing the encoding in \TeX{}; read the
\emph{\LaTeX{} Companion}
(see \Qref[question]{\TeX{}-related books}{Q-books}) for more details. 
In practice, if you do much non-English (but Latin script)
typesetting, you are strongly recommended to use the \texttt{fontenc}
package with option `\texttt{T1}' to select T1 (also known as `Cork'
or `DC') encoding. The
\htmlignore
PSNFSS package (\Qref{}{Q-usepsfont})
\endhtmlignore
\begin{htmlversion}
\Qref{PSNFSS}{Q-usepsfont} package
\end{htmlversion}
provides support for PostScript (using virtual fonts) in this encoding.

Alan Jeffrey's \ProgName|fontinst| package (\CTANref{fontinst}) is an
|afm| to |tfm| converter written in \TeX{}; it is used to generate the
files used by \LaTeXe{}'s PSNFSS package 
to support use of PostScript fonts. It is a sophisticated package, not
for the faint-hearted, but is powerful enough to cope with most needs.
Much of its power relies on the use of
\htmlignore
virtual fonts (\Qref{virtual fonts}{virtualfonts}).
\endhtmlignore
\begin{htmlversion}
\Qref{virtual fonts}{virtualfonts}.
\end{htmlversion}

For slightly simpler problems, Rokicki's \ProgName|afm2tfm|,
distributed with \ProgName|dvips| (\CTANref{dvips}), is fast and
efficient; note that the metrics and styles that come with
\ProgName|dvips| are \emph{not} currently \LaTeXe{} compatible.

For the Macintosh, there is a program called \ProgName|EdMetrics| which does
the job (and more).  It comes with the Textures distribution, but is
in fact free software, available as \CTANref{edmetrics}

\MSDOS{} users can buy
(see \Qref[question]{commercial implementations}{Q-commercial})
Y\&Y's Font Manipulation Tools package which includes a powerful
\ProgName|afmtotfm| program among many other goodies.

\Question[psfonts-problems]{Problems using PostScript fonts}

For the typical \LaTeX{} user trying to use the
\htmlignore
PSNFSS (\Qref{}{Q-usepsfont})
\endhtmlignore
\begin{htmlversion}
\Qref{PSNFSS}{Q-usepsfont}
\end{htmlversion}
package, three questions often arise.
First, you have to declare to the |dvi| driver that you are using
PostScript fonts; in the case of \ProgName|dvips|, this means adding
lines to the |psfonts.map| file. Otherwise, \ProgName|dvips| will try
to find |pk| 
files. If the font isn't built into the printer, you have to acquire
it (in many cases this means buying it from a commercial supplier!).
You then have to instruct the driver to download it with each job (the
mechanism depends on your driver). So it's no
good just installing the \emph{metrics} for Optima and expecting it to
work. You have to pay hard cash for the font itself, which will come
(for Unix and \MSDOS{} users) in |pfb| (Printer Font Binary) form.

Second, you cannot expect your previewer to suddenly start
displaying PostScript fonts; most of them only know about PK bitmap
fonts such as Computer Modern. You can create these from PostScript fonts
if you have bought the |pfb| file by using \ProgName|ps2pk|
(\CTANref{ps2pk}); this would also let you use the fonts with
non-PostScript device drivers such as the em\TeX{} ones. It is your
responsibility to make sure you are not breaking the licence restrictions
on your font if you bought it.

Third, the stretch and shrink between words is a function of the
font metric; it is not specified in |afm| files, so different converters
choose different values. The PostScript metrics that come with PSNFSS do quite
tight setting, which may produce a lot of
hyphenation or overfull boxes if you are not careful. If you are
having trouble, Alan Jeffrey recommends the following settings in a
package file:
\begin{verbatim}
   \tolerance800
   \emergencystretch2em
   \doublehyphendemerits5000
   \hfuzz0pt
   \leftskip0pt minus 1pt
   \rightskip0pt minus 1pt
\end{verbatim}
A future release of these fonts will implement looser typesetting by
default, so these settings should become unnecessary.

\Question[Q-psfchoice]{Choice of scalable outline fonts}

If you are interested in text alone, you can use any of over 20,000
fonts(!) in Adobe Type~1 format (called `PostScript fonts' in the
\TeX{} world and `ATM fonts' in the DTP world), or any of several
hundred fonts in TrueType format.  That is, provided of course, that
your previewer and printer driver support scalable outline fonts.

\TeX{} itself \emph{only} cares about metrics, not the actual
character programs.  You just need to create a \TeX{} metric file
|.tfm| using some tool such as \ProgName|afm2tfm|, \ProgName|afmtotfm|
(from Y\&Y, see \Qref[question]{commercial implementations}{Q-commercial})
or \ProgName|fontinst|.  For the previewer or printer driver you need the
actual outline font files themselves (|pfa| for Display PostScript, |pfb|
for ATM on IBM PC, Mac outline font files on Macintosh).

If you also need mathematics, then you are severely limited by the
demands that \TeX{} makes of maths fonts (for details, see the paper by B.K.P. 
Horn in the Proceedings of the 1993 TUG conference at Aston University,
published in TUGboat, 1994, 14(3)).
For maths, then, there are relatively few choices:
\begin{booklist}
\item[Computer Modern] (75 fonts --- optical scaling) Donald E. Knuth\\
    Note that CM \emph{is} available in scalable outline form.
    There are commercial as well as public domain versions, and
    there are both Adobe Type~1 and TrueType versions.
    Some of these are `commercial grade,' with full hand-tuned hinting,
    some render very poorly, while others are merely incompatible with 
    Adobe Type Manager (ATM).
\item[Lucida Bright with Lucida New Math] (25 fonts) Chuck Bigelow and
  Kris Holmes\\
    Lucida is a family of related fonts including seriffed, sans serif,
    sans serif fixed width, calligraphic, blackletter, fax,
    Kris Holmes' connected handwriting font, \emph{etc}; they're
    not as `spindly' as Computer Modern, with a large x-height, and
    include a larger set of maths symbols, operators, relations and
    delimiters than CM (over 800 instead of 384: among others, it also
    includes the AMS |msam| and |msbm| symbol sets).
    The planned `Lucida Bright Expert' (14 fonts)
    adds seriffed fixed width, another handwriting font,
    smallcaps, bold maths, upright `maths italic', \emph{etc}., to the set
    The distribution includes support for use with |plain| \TeX{} and
    \LaTeXo{}.  Support under \LaTeXe{} is provided in
\htmlignore
    PSNFSS (\Qref{}{Q-usepsfont})
\endhtmlignore
\begin{htmlversion}
    \Qref{PSNFSS}{Q-usepsfont}
\end{htmlversion}
    thanks to Sebastian Rahtz.
\item[MathTime 1.1] (3 fonts) \TeX{}plorators (Michael Spivak)\\
    The set contains maths italic, symbol, and extension
    fonts, designed to work well with Times-Roman.  These are
    typically used with Times, Helvetica and Courier (which are
    resident on many printers, and which are supplied with
    some PC versions).  In addition you may want to complement this
    basic set with Adobe's Times Smallcap, and perhaps the set of
    Adobe `Math Pi' fonts, which include blackboard bold, blackletter,
    and script faces.  The distribution includes support for use with
    |plain| \TeX{} and \LaTeXo{} (including code to link in Adobe Math
    Pi~2 and Math Pi~6).
    Support under \LaTeXe{} is provided in
\htmlignore
    PSNFSS (\Qref{}{Q-usepsfont})
\endhtmlignore
\begin{htmlversion}
    \Qref{PSNFSS}{Q-usepsfont}
\end{htmlversion}
    thanks to Sebastian Rahtz.
\item[Adobe Lucida, LucidaSans and LucidaMath] (12 fonts)\\
    Lucida and LucidaMath are generally considered to be a bit heavy.
    The three maths fonts contain only the glyphs in the CM
    maths italic, symbol, and extension fonts.
    Support for using LucidaMath with \TeX{} is not very good;
    you will need to do some work reencoding fonts \emph{etc}.
    (In some sense this set is the ancestor of the LucidaBright
    plus LucidaNewMath font set.)
\item[Concrete, the AMS maths fonts \emph{etc}.]Donald E. Knuth and
  the AMS.\\
    These are sometimes mentioned as alternatives to CM, but they are
    really adjuncts, in that you need to use at least the basic CM
    maths fonts with them.
\item[Proprietary fonts] Various sources.\\
    Since having a high quality font set in scalable outline form that
    works with \TeX{} can give a publisher a real competitive advantage, there
    are some publishers that have paid (a lot) to have such font sets made
    for them.  Unfortunately, these sets are not available on the open
    market, despite the likelihood that they're more complete than
    those that are.
\item[Mathptm] (4 fonts) Alan Jeffrey.\\
   This set contains maths italic, symbol, extension, and roman 
   virtual fonts, built from Adobe Times, Symbol, Zapf Chancery, and
   the Computer Modern fonts.  The Mathptm fonts are free, and
   the resulting PostScript files can be freely exchanged.
   Contains most of the CM math symbols. 
   Support under \LaTeXe{} in
\htmlignore
    PSNFSS (\Qref{}{Q-usepsfont})
\endhtmlignore
\begin{htmlversion}
    \Qref{PSNFSS}{Q-usepsfont}
\end{htmlversion}
    thanks to Alan Jeffrey and Sebastian Rahtz.  
\end{booklist}

All of the first three font sets are available in formats suitable for
IBM PC/Windows, Macintosh and Unix/NeXT from Y\&Y and from Blue Sky
Research (see \Qref[question]{commercial suppliers}{Q-commercial} for
details).  The MathTime fonts are also available from:
\begin{quote}
  \TeX{}plorators\\
  1572 West Gray \#377\\
  Houston TX 77019\\
  USA
\end{quote}
The very limited selection of maths font sets is a direct result of
the fact that a maths font has to be explicitly designed for use with
\TeX{} and as a result it is likely to lose some of its appeal in
other markets. Furthermore, the \TeX{} market for commercial fonts is
minute (in comparison, for example, to Microsoft TrueType font pack
\#1, which sold something like 10 million copies in a few weeks after
release of Windows 3.1!).

Text fonts in Type~1 format are available from many vendors including
Adobe, Monotype, Bitstream.  Avoid cheap rip-offs: not only are you
rewarding unethical behaviour, destroying the cottage industry of
innovative type design, but you are \emph{also} very likely to get junk.
The fonts may not render well (or at all under ATM), may not have the
`standard' complement of 228 glyphs, or may not include metric files
(needed to make TFM files). Also, avoid TrueType fonts from all but
the major vendors.  TrueType fonts are an order of magnitude harder to
`hint' properly than Type~1 fonts and hence TrueType fonts from places
other than Microsoft and Apple may be suspect.  In any case you may
find other problems with TrueType fonts such as service bureaux not
accepting jobs calling for them.

\begin{comment}
Incidentally, some people have been disappointed in the quality of scalable
fonts. Of course, quality is in the eye of the beholder and people disagree
sometimes on what is `better' --- but in many cases there is no question!
There are several factors that come into play.  One is the quality of
the font itself (you get what you pay for), and the other is the quality of
the rasteriser.  

Rendering under ATM of commercial grade fonts is outstanding.  Rendering in
Display PostScript is not quite as good (which may change if DPS systems
adopt the ATM rasteriser).  PostScript rasterisers in printers are not as
good as ATM either (except for a few printers that use the ATM rasteriser)
--- but then at 300 dpi you are dealing with a much more forgiving
environment than at 96 dpi (Windows) or 72 dpi (Mac).  Clone PS interpreters
tend to not be as good as true Adobe RIPs.  In some cases the difference is
not huge (HP), in other cases it is (public domain).  Utilities for
converting from PS to PK format typically do not produce results comparable
to ATM (of course, at high enough resolution --- where grid-fitting is less
important --- it hardly matters).  
\end{comment}

\Question[postscript-pics]{Including a PostScript figure in \protect\LaTeX{}}

\htmlignore
\LaTeXe{} (\Qref{}{latex2e})
\endhtmlignore
\begin{htmlversion}
\Qref{\LaTeXe{}}{latex2e}
\end{htmlversion}
has a standard package
for graphics inclusion, rotation, colour, and other driver-related
features. The package is documented in the second edition of the
Lamport's \LaTeX{} book
(see \Qref[question]{\TeX{}-related books}{Q-books}), and is available
in \CTANref{graphics}

If you don't use \LaTeXe{}, perhaps the best method is to use
the |psfig| macros written by Trevor Darrell, available in
\CTANref{psfig}

You will also need a |dvi| to PostScript conversion program that
supports the |\special|s. The drivers mentioned in
\Qref[question]{DVI to PostScript programs}{Q-dvips} do, and come
with a version of |psfig| ready to use with them. The |psfig| macros
work best with Encapsulated PostScript Files (EPS). In particular,
|psfig| will need the file to have a BoundingBox (see Appendix H of
the
\emph{PostScript Language Reference Manual}). If you don't have an EPS
file, life can be difficult.

One point to note about including PostScript figures is that they
are not part of the |dvi| file, but are only included when you use a |dvi|
to PostScript conversion program. As a result, most |dvi| previewers
will simply show the blank space \TeX{} has reserved for your figure,
not the figure itself. 

Anil K. Goel has written a long document describing in detail how to
include figures, pictures, and images in \LaTeX{} documents, which is
available as \CTANref{figsinlatex}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{Special sorts of typesetting}

\Question[Q-linespace]{Double-spaced documents in \protect\LaTeX{}}

Are you producing a thesis, and trying to obey regulations that were
drafted in the typewriter era?  Or are you producing copy for a
journal that insists on double spacing for the submitted articles?

\LaTeX{} is a typesetting system, so the appropriate design
conventions are for ``real books''.  If your requirement is from
thesis regulations, find whoever is responsible for the regulations,
and try to get the wording changed to cater for typeset theses
(\emph{e.g.}, to say ``if using a typesetting system, aim to make your
thesis look like a well-designed book'').  (If your requirement is
from a journal, you're probably even less likely to be able to get the
rules changed, of course.)

If you fail to convince your officials, or want some inter-line 
space for copy-editing:
\begin{itemize}
\item Try changing \cs|baselinestretch|:
  \htmlignore
  |\renewcommand|\linebreak[4]|{\baselinestretch}{1.2}|
  may be enough to give
  \endhtmlignore
\begin{htmlversion}
  |\renewcommand{\baselinestretch}{1.2}| may be enough to give
\end{htmlversion}
  officials the impression you've kept to their regulations. Don't try
  changing |\baselineskip|: its value is reset at any size-changing
  command.
\item Alternatively, use a line-spacing package.  Options available
  are:
  \begin{itemize}
  \item for simple double spacing, \CTANref{doublespace}, and
  \item for greater flexibility, \CTANref{setspace}, which has been
    upgraded for \LaTeXe{}.
  \end{itemize}
\end{itemize}

\Question{Formatting a thesis in \protect\LaTeX{}}

Thesis styles are usually very specific to your University, so it's
usually not profitable to ask around for a package outside your own
University.  Since many Universities (in their eccentric way) still
require double-spacing, you may care to refer to
\htmlignore
\Qref[question]{}{Q-linespace}.
\endhtmlignore
\begin{htmlversion}
the question on \Qref[question]{double-spacing}{Q-linespace}.
\end{htmlversion}
If you want to write
your own, a good place to start is the University of California style
(available as \CTANref{ucthesis}), but
it's not worth going to a lot of trouble. (If officials won't allow
standard typographic conventions, you won't be able to produce an
\htmlignore
\ae{}sthetically pleasing document anyway!)
\endhtmlignore
\begin{htmlversion}
  aesthetically pleasing document anyway!)
\end{htmlversion}

\Question{Including a file in verbatim in \protect\LaTeX{}}

A good way is to use Rainer Sch\"opf's \File|verbatim.sty|,
which provides the command |\verbatiminput| that takes a file name
as argument. This package is available as part of \CTANref{2etools}

Another way is to use the |alltt| environment, which
requires the package available in \CTANref{alltt}

\Question{Generating an index in \protect\TeX{}/\protect\LaTeX{}}

Making an index is not trivial; what to index, and how index it, is
difficult to decide, and uniform implementation is difficult to
achieve.  You will need to mark all items to be indexed in your text
(typically with |\index| commands).

It is not practical to sort
a large index within \TeX{}, so a post-processing program is used to sort
the output of one \TeX{} run, to be included into the document at the
next run.

The following programs are available:
\begin{description}
\item[makeindex] for \LaTeX{} under Unix (but runs under other OSs
  without changes).  Available in \CTANref{makeindex}; a version for
  the Macintosh is available as \CTANref{macmakeindex}, and ones for
  \MSDOS{} are part of the em\TeX{} and g\TeX{} distributions (the
  em\TeX{} version also runs under OS/2).

  The Makeindex documentation is a good source of information on how
  to create your own index. Makeindex can be used with some \TeX{}
  macro packages other than \LaTeX{}, such as \Eplain{}.
\item[idxtex] for \LaTeX{} under VMS.  Available (together with a
  glossary-maker called |glotex|) in \CTANref{glo+idxtex}
%\item[texix] for \TeX{} on CMS and Macintosh machines.
\item[texindex] A witty little shell/\ProgName|sed|-script-based
  utility for \LaTeX{} under Unix.  Available from \CTANref{texindex}

  There are other programs called \ProgName|texindex|, notably
  one that comes with the
\htmlignore
  Texinfo distribution (\Qref{}{Q-texinfo}).
\endhtmlignore
\begin{htmlversion}
  \Qref{Texinfo}{Q-texinfo} distribution.
\end{htmlversion}
\end{description}

\Question{Using \protect\BibTeX{} with \protect\texttt{plain} \protect\TeX{}}

The file \CTANref{btxmactex} contains macros and documentation
for using \BibTeX{} with |plain| \TeX{}, either directly or with
\htmlignore
\Eplain{} (\Qref{}{Q-eplain}).
\endhtmlignore
\begin{htmlversion}
\Qref{\Eplain{}}{Q-eplain}.
\end{htmlversion}
See \Qref[question]{the use of \BibTeX{}}{BibTeXing} for more
information about \BibTeX{} itself.

\Question{Typesetting music in \protect\TeX{}}

A powerful package which allows the typesetting of orchestral
and polyphonic music is Music\TeX{}, written by Daniel Taupin 
(\Email|taupin@rsovax.lps.u-psud.fr|). It is available 
in \CTANref{musictex}

Digital music fans can typeset notation for their efforts by using
\ProgName|midi2tex|, which translates MIDI data files into Music\TeX{}
source code.  It is available from \CTANref{midi2tex}

A rather simpler notation than Music\TeX{} is supported by \ProgName|abc2mtex|;
this is a package designed to notate tunes stored in an ASCII format
(|abc| notation). It was designed primarily for folk and traditional
tunes of Western European origin (such as Irish, English and Scottish)
which can be written on one stave in standard classical notation.
However, it should be extendable to many other types of music.  It is
available from \CTANref{abc2mtex}

There is a mailing list for discussion of typesetting music in \TeX{}.
To subscribe, send mail to \Email|mutex-request@stolaf.edu| containing
the word `|subscribe|' in the body.

\Question{Drawing Feynman diagrams in \protect\LaTeX{}}

Michael Levine's macro package for drawing Feynman diagrams in \LaTeX{}
is available in \CTANref{feynman} (see also \CTANref{feynmf}).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{How do I do \protect\textsl{X} in \protect\TeX{} or \protect\LaTeX{}}

\Question{Proof environment}

It is not possible to make a |proof| environment which automatically
includes an `end-of-proof' symbol. Some proofs end in displayed maths;
others do not. If the input file contains |...\] \end{proof}| then
\LaTeX{} finishes off the displayed maths and gets ready for a new
line before it reads any instructions connected with ending the proof.
But traditionally the end-of-proof sign goes in the display, not on a
new line. So you just have to put it in by hand in every proof.

\Question{Symbols for the number sets}

It is a good idea to have commands such as \cs|R| for the real numbers and
other standard number sets. Traditionally these were typeset in bold.
Because mathematicians usually do not have access to bold chalk, they
invented the special symbols that are now often used for \cs|R|, \cs|C|,
\emph{etc}.  These symbols are known as ``blackboard bold''. Before
insisting on using them, consider whether going back to the old system
of ordinary bold might not be acceptable (it is certainly simpler).

A set of blackboard bold capitals is available in the AMS fonts
``msam'' (\emph{e.g.}, ``msam10'' for 10pt) and ``msbm''. The fonts
have a large number of mathematical symbols to supplement the ones in
the standard \TeX{} distribution. The fonts are available in
\CTANref{amsfonts-symbols}

Two files which load the fonts and define the symbols are provided,
and both work with either \TeX{} or \LaTeX{}.  Questions or
suggestions regarding these fonts should be directed to
\Email|tech-support@math.ams.org|.

Another complete set of blackboard bold fonts, the bbold family, is
available in \MF{} (in \CTANref{bbold}).  This set has the interesting
property of offering blackboard bold forms of lower-case letters,
something rather rarely seen on actual blackboards.

The ``lazy person's'' blackboard bold macros:
\begin{verbatim}
  \newcommand{\R}{{\sf R\hspace*{-0.9ex}%
    \rule{0.15ex}{1.5ex}\hspace*{0.9ex}}}
  \newcommand{\N}{{\sf N\hspace*{-1.0ex}%
    \rule{0.15ex}{1.3ex}\hspace*{1.0ex}}}
  \newcommand{\Q}{{\sf Q\hspace*{-1.1ex}%
    \rule{0.15ex}{1.5ex}\hspace*{1.1ex}}}
  \newcommand{\C}{{\sf C\hspace*{-0.9ex}%
    \rule{0.15ex}{1.3ex}\hspace*{0.9ex}}}
\end{verbatim}
work well at normal size if the surrounding text is |cmr10|. However, 
they are not part of a proper maths font, and so do not work in sub- and 
superscripts. Moreover, the size and position of the vertical bar is 
affected by the font of the surrounding text.
\checked{RAB}{1994/11/12}%

\Question{Roman theorems}

If you want to take advantage of the powerful |\newtheorem| command
without the constraint that the contents of the theorem is in a sloped
font (for example, to use it to create remarks, examples, proofs,
\dots{}) then you can use the style file \File|theorem.sty| (part of
\CTANref{2etools}). Alternatively, the following sets up an
environment |remark| whose content is in roman.
\begin{verbatim}
  \newtheorem{preremark}{Remark}
  \newenvironment{remark}%
    {\begin{preremark}\rm}{\end{preremark}}
\end{verbatim}
This will not work if you are using
\htmlignore
NFSS (\Qref{}{NFSS}) outside of \LaTeXe{} (\Qref{}{latex2e}),
\endhtmlignore
\begin{htmlversion}
\Qref{NFSS}{NFSS} outside of \Qref{\LaTeXe{}}{latex2e},
\end{htmlversion}
because the command \cs|rm| behaves differently there.


\Question{Labels on lists}

If you want your top-level |enumerate|s to be labelled `I/', `II/',
\dots{}, then give these commands:
\begin{verbatim}
   \renewcommand{\theenumi}{\Roman{enumi}}
   \renewcommand{\labelenumi}{\theenumi/}
\end{verbatim}
The possible styles of numbering are given in Section~6.3 of Lamport's
book (see \Qref[question]{\TeX{}-related books}{Q-books}).  If you are lazy and
just change \cs|labelenumi| in one go then your cross-references will be
wrong.

For lower level |enumerate|s, replace |enumi| by |enumii|, |enumiii|
or |enumiv|, according to the level.  If your label is much larger
than the default, you should also change \cs|leftmargini|,
\cs|leftmarginii|, \emph{etc}.

If you're running \LaTeXe{}, the package \File|enumerate.sty| (part of
\CTANref{2etools}) offers similar facilities.  With
\File|enumerate.sty|, the example above would
be achieved simply by starting the enumeration
\cs|begin{enumerate}[I/]|.

\Question[secnumdep]{Unnumbered sections in the Table of Contents}

The easiest way to get headings of funny `sections' such as
prefaces in  the table of contents is to use the
counter |secnumdepth| described in Appendix~C of the \LaTeX{} 
manual. For example:
\begin{verbatim}
    \setcounter{secnumdepth}{-1}
    \chapter{Preface}
\end{verbatim}
Of course, you have to set |secnumdepth| back to its usual value
(which is~2 in the standard styles) before you do
any `section' which you want to be numbered.

%Robin, could omit the explanation, Ro
This is why it works. 
\cs|chapter| without the star does
\begin{enumerate}
\item put something in the |.toc| file;
\htmlignore
\item if $\mbox{\texttt{secnumdepth}} \geq 0$,
\endhtmlignore
\begin{htmlversion}
\item if the |secnumdepth| counter is greater than or equal to zero,
\end{htmlversion}
      increase the counter for the chapter and write it out.
\item write the chapter title.
\end{enumerate}
Other sectioning commands are similar, but with other values 
used in the test.

\Question{Style of section headings}

Suppose that the editor of your favourite journal has specified that section
headings must be centred, in small capitals, and subsection headings ragged 
right in italic, but that you don't want to get involved in the sort of
programming described in \emph{The \LaTeX{} Companion}
\htmlignore
(\Qref{}{Q-books}; the programming itself is discussed in
\Qref[question]{}{atsigns}).
\endhtmlignore
\begin{htmlversion}
  (see \Qref{\TeX{}-related books}{Q-books}; the
  \Qref{programming}{atsigns} itself is discussed under `@').
\end{htmlversion}
The following hack will 
probably satisfy your editor. Define yourself new commands
\begin{verbatim}
  \newcommand{\ssection}[1]{%
     \section[#1]{\protect\centering\sc #1}}
  \newcommand{\ssubsection}[1]{%
     \subsection[#1]{\protect\raggedright\it #1}}
\end{verbatim}
and then use |\ssection| and |\ssubsection| in place of 
|\section| and |\subsection|. This isn't perfect: section numbers 
remain in bold, and starred forms need a separate redefinition. Also, 
this will not work if you are using 
\htmlignore
NFSS (\Qref{}{NFSS}) outside of \LaTeXe{} (\Qref{}{latex2e}),
\endhtmlignore
\begin{htmlversion}
\Qref{NFSS}{NFSS} outside of \Qref{\LaTeXe{}}{latex2e},
\end{htmlversion}
because the font-changing commands behave differently there.

\Question{Indent after section headings}

\LaTeX{} implements a style that doesn't indent the first paragraph
after a section heading.  There are coherent reasons for this, but not
everyone likes it.
The package \File|indentfirst.sty| (part of \CTANref{2etools})
suppresses the mechanism, so that the first paragraph is
indented.

\Question[premargin]{Changing the margins in \protect\LaTeX{}}

Don't do it. Learn some \LaTeX{}, produce some 
documents, and then ask again. 
     
You can never change the  \emph{margins} of a document by software, 
because these depend on the actual size of the paper, which may be 
different from what your software thinks. (For example, standard 
US paper is a different width from A4 paper.) What you can change 
are the distances from the apparent top and left edges of the paper, 
and the width and height of the text. Changing the last two requires 
more skill than you might expect. The height should bear a certain 
relationship to \cs|baselineskip|. And the width should not be more 
than 75~characters. Lamport's warning in his section on 
`Customizing the Style' really must be taken seriously. One-inch 
margins on A4 paper are fine for 10- or 12-pitch typewriters, but not 
for 10pt type (or even 11pt or 12pt) because so many 
characters per line will irritate the reader.
\checked{RAB}{1994/11/12}%

\Question{Insisting on changing the margins in \protect\LaTeX{}}

This answer first helps you change the margins throughout a
document, then tells you how to change the margins in a portion
of the document.

Perhaps the easiest way to get more out of a page in \LaTeX{} is to
get \CTANref{fullpage}, which sets the margins of the page identical
to those of |plain| \TeX{}, \emph{i.e.}, 1-inch margins at all four sides of the
paper. It also contains an adjustment for A4 paper.

Somewhat more flexible is \CTANref{vmargin}, which has a canned set of
paper sizes (a superset of that provided in \LaTeXe{}), provision for
custom paper, margin adjustments and provision for two-sided printing.

Here is a brief explanation of \LaTeX{}'s page
parameters. For details, see section~C.5.3 of the
\LaTeX{} manual (pp.~181--182).
% The margin parameters represent measurements
% made to the |dvi| file.
The origin in |dvi| coordinates is one inch
from the top of the paper and one inch from the left side. This
explains the ``one inch less than'' terminology used in the \LaTeX{}
manual. In |dvi| coordinates, positive horizontal measurements extend
right across the page, and positive vertical measurements extend down
the page. Thus, for margins closer to the left and top edges of the
page than 1 inch, the corresponding parameters, \emph{i.e}.,
\cs|evensidemargin|, \cs|oddsidemargin|, \cs|topmargin|, can be set to
negative values.

To change the margins of a document within the document,
modifying the parameters shown in Figure~C.3 will not work. They
can only be changed in the preamble of the document, \emph{i.e}., before
the \cs|begin{document}| statement. To adjust the margins within a
document we define an environment:
\begin{verbatim}
\newenvironment{changemargin}[2]{%
 \begin{list}{}{%
  \setlength{\topsep}{0pt}%
  \setlength{\leftmargin}{#1}%
  \setlength{\rightmargin}{#2}%
  \setlength{\listparindent}{\parindent}%
  \setlength{\itemindent}{\parindent}%
  \setlength{\parsep}{0pt plus 1pt}%
 }%
\item[]}{\end{list}}
\end{verbatim}
This environment takes two arguments, and will indent the left
and right margins by their values, respectively. Negative values
will cause the margins to be narrowed, so
|\begin{changemargin}{-1cm}{-1cm}| narrows the left and right margins
by 1cm.  (Note that the value given for |\parsep| is the default for
\LaTeX{}; what should be there is ``the value in the surrounding
text''.)

\Question{Finding the width of a letter, word, or phrase}

Put the word in a box, and measure the width of the box. For example,
\begin{verbatim}
  \newdimen\stringwidth
  \setbox0=\hbox{hi}
  \stringwidth=\wd0
\end{verbatim}
Note that if the quantity in the \cs|hbox| is a phrase, the actual
measurement only approximates the width that the phrase will occupy in
running text, since the inter-word glue can be adjusted in paragraph
mode.

The same sort of thing is expressed in \LaTeX{} by:
\begin{verbatim}
  \newlength{\gnat}
  \settowidth{\gnat}{\textbf{small}}
\end{verbatim}
This sets the value of the length command |\gnat| to the width of ``small''
in emboldened text.

\Question[Q-comment]{Excluding blocks of text from the \protect\texttt{.dvi} file}

Rainer Sch\"opf's \File|verbatim.sty| provides a comment environment which
excludes everything between |\begin{comment}| and |\end{comment}|. 
This package is available as part of \CTANref{2etools}

A more general environment for doing the job is Victor Eijkhout's
\File|comment.sty|, which lets you define environments for inclusion
or exclusion in a document, thus offering a primitive configuration
structure.  It is available from the CTAN sites in \CTANref{comment}

%\htmlignore
%% we don't use \Question here, since that has a different
%% interpretation of the optional argument;  AAAAUUUGGGGHHH
%\subsection[Defining a new log-like function in \LaTeX{}]{Defining a new
%  log-like function in \LaTeX{}\footnotemark}
%\footnotetext{It should be noted that ``log-like'' was reportedly a
%  \emph{joke} on Lamport's part; it is of course clear what was meant}
%\endhtmlignore
%\begin{htmlversion}
  \Question{Defining a new log-like function in \protect\LaTeX{}}
%\end{htmlversion}

Use the \cs|mathop| command, as in:
\begin{verbatim}
  \newcommand{\diag}{\mathop{\rm diag}}
\end{verbatim}

Subscripts and superscripts on \cs|diag| will be placed exactly as they
are on \cs|lim|.  If you want your subscripts and superscripts always
placed to the right, do:
\begin{verbatim}
  \newcommand{\diag}{\mathop{\rm diag}\nolimits}
\end{verbatim}

This works in \LaTeXo{} and in \LaTeXe{}, but not under NFSS alone
(see \Qref[question]{problems with \cs|rm|, etc.}{rmnonsense}). There
is an improved method for doing this in \LaTeXe{} in the works; in the
interim, one can use the the \cs|operatorname| command of |amstex.sty|
(which is part of the \AMSLaTeX{} package: \CTANref{amslatex}).

(It should be noted that ``log-like'' was reportedly a \emph{joke} on
Lamport's part; it is of course clear what was meant.)

\Question{Typesetting all those \protect\TeX{}-related logos}

Knuth was making a particular point about the capabilities of \TeX{}
when he defined the logo.  Unfortunately, many
believe, he thereby opened floodgates to
give the world logos such as \AMSTeX{}, \PiCTeX{}, \BibTeX{}, and so on.
Lamport invented \LaTeX{}, and marketing input led to
the current logo \LaTeXe{}.

The common people don't have to follow this stuff wherever it goes,
but, for those who insist, a large collection of logos is defined in
\CTANref{texnames}; the \MF{} logo can be set in fonts that \LaTeXe{}
knows about (so that it scales with the surrounding text) using the
package \CTANref{mflogo}

For those who don't wish to acquire the `proper' logos, the canonical
thing to do is to say |AMS-\TeX{}| (AMS-\TeX{}) for \AMSTeX{},
|Pic\TeX{}| (Pic\TeX{}) for \PiCTeX{}, |Bib\TeX{}| (Bib\TeX{}) for
\BibTeX{}, and so on.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{Things are Going Wrong\dots{}}

\Question{Weird hyphenation of words}

You may have a version mismatch problem. The hyphenation system changed
between version~2.9 and~3.0.  If you are using (|plain|) \TeX{}
version~3.0 or later, make sure your \File|plain.tex| file has a
version number which is at least~3.0; if you are using \LaTeXo{} (the
last version of which was released on 25 March 1992), you need to
upgrade to \LaTeXe{}, since the sources of \LaTeXo{} are no longer
publicly available.

If you're using \LaTeXe{}, the problem probably arises from your
|lthyphen.cfg| file, which has to be created if you're using a
multi-lingual version.

For the curious, here's what happened:
before \TeX{} 3.0 the hyphenation algorithm would not
break a word if the part before the break was not at least two
characters long, and the part after the break at least three 
characters long. Starting with version 3.0 the parameters
|\lefthyphenmin| and |\righthyphenmin| control the length of these
fragments. These are set to 2 and 3, respectively, in the new
|plain| and |lplain| formats. They can be set to any value, of course,
but if |\lefthyphenmin| + |\righthyphenmin| is greater than 62, all
hyphenation is suppressed.

\Question{(Merely) peculiar hyphenation}

You may have found that \TeX{}'s famed automatic word-division does
not produce the break-points recommended by your dictionary. This may be
because \TeX{} is set up for American English, whose rules for word
division (as specified, for example, in Webster's Dictionary) are
completely different from the British ones (as specified, for example,
in the Oxford Dictionaries). This problem is being addressed by the UK
\TeX{} User community (see \BV{}, issue~4.4) but an entirely
satisfactory solution will take time.  An interim hyphenation file is
available in \CTANref{ukhyph}

\Question{Enlarging \protect\TeX{}}

People sometimes get messages saying `memory capacity exceeded'.
Most of the time this error can be fixed
\emph{without} enlarging \TeX{}. The most common causes are unmatched braces,
extra-long lines, and poorly-written macros. Extra-long lines are
often introduced when files are transferred incorrectly between
operating systems, and line-endings are not preserved properly (the
tell-tale sign of an extra-long line error is when the complaint is
that the `|buf_size|' has overflowed).

If you really need to extend your \TeX{}'s capacity, the proper method
depends on your installation. In the purest form, you
change the parameters in module 11 of the WEB source.
% (``The following parameters can be changed\dots{}'').
In less pure forms, you might need to modify a
change file, or perhaps change some environment variables; em\TeX{}
allows you to adjust the memory allocation criteria on the command
line.  Consult the documentation that came with your implementation.

\Question{Moving tables and figures in \protect\LaTeX{}}

Tables and figures have a tendency to surprise, by \emph{floating}
away from where they were specified to appear.  This is in fact
perfectly ordinary document design; any professional typesetting
package will float figures and tables to where they'll fit without
violating the certain typographic rules.  Even if you use the
placement specifier~|h| for `here', the figure or table will not be
printed `here' if doing so would break the rules; the rules themselves
are pretty simple, and are given on page~198, section~C.9 of the
\LaTeX{} manual.  In the worst case, \LaTeX{}'s rules can cause the
floating items to pile up to the extent that you get an error message
saying ``Too many unprocessed floats''; this means that the limited
set of registers in which \LaTeX{} stores floating items is full.
What follows is a simple checklist of things to do to solve these
problems (the checklist talks throughout about figures, but applies
equally well to tables).
\begin{itemize}
\item Are the placement parameters on your figures right?  The
  default (|tbp|) is reasonable; you should never simply say `|h|',
  for example, since that says ``if it can't go here, it can't go
  anywhere'', and as a result all subsequent floats pile up behind it.
\item Can you perhaps prevent your figures from floating by adjusting
  \LaTeX{}'s placement parameters?  Again, the defaults are
  reasonable, but can be overridden in case of problems.  The
  parameters are described on pages~199--200, section~C.9 of the
  \LaTeX{} manual.
\item Are there places in your document where you could `naturally'
  put a \cs|clearpage| command?  If so, do: the backlog of floats is
  cleared after a \cs|clearpage| command.  (Note that the \cs|chapter|
  command implicitly executes \cs|clearpage|, so you can't float past
  the end of a chapter.)
\item Have a look at the \LaTeXe{} |afterpage| package (part of
  \CTANref{2etools}).  Its documentation gives as an example the idea
  of putting \cs|clearpage| \emph{after} the current page (where it
  will clear the backlog, but not cause an ugly gap in your text), but
  also admits that the package is somewhat fragile.
\item As a last resort, try the package \CTANref{morefloats}; this
  `simply' increases the number of floating inserts that \LaTeX{} can
  handle at one time (from~18 to~36), but that may suit your needs.
\item If you actually \emph{wanted} all your figures to float to the
  end (\emph{e.g}., for submitting a draft copy of a paper), don't
  rely on \LaTeX{} to do it for you: get the |endfloat| package to do
  the job for you (\CTANref{endfloat}).
\end{itemize}

%If you did not read the manual carefully, you may be surprised that
%your figures and tables in a \LaTeX{} document do not come out where
%you intended.  As you will find in any professional-quality
%typesetting package, figures and tables \emph{float} to a place where
%there is room for them without violating certain typographic rules.
%Even if you use the placement specifier~|h| for `here', the figure or
%table will not be printed `here' if there is not room for it or if
%printing it there would break the rules.

%On the whole, the rules are pretty sensible. It is a fact of life that
%putting each table or figure exactly `here' in the text is not
%consistent with fixed pre-specified page-size. It's good to get in the
%habit of writing `|...in Table~\ref{mytable}...|' rather than assuming
%that your table will come exactly where you put it relative to your
%words of wisdom.

%The rules, and the parameters on which they depend, are described in 
%Section~C.9.1 of the \LaTeX{} manual\checked{RAB}{1994/10/22}
%(see \Qref[question]{\TeX{}-related books}{Q-books}). Unless
%you have a document with very small pages or an unusually high density
%of floats, it is not worth fighting with the default parameter values.

%\Question{Disappearing tables and figures}

%If you have several tables one after the other (for example at the end
%of a document, as many journal editors request) you may find that
%\LaTeX{} runs out of memory without printing a single one of these
%tables. The problem is that \LaTeX{} is saving up the tables in its
%memory while it searches for some text to put on the page first. You
%can cure this by making sure that every table has~`|p|' in its
%placement specifier, and by issuing a \cs|clearpage| command every so
%often, at a `natural break'.

%If, on the other hand, you actually \emph{need} the figures and tables
%all in one place at the end, the \File|endfloat| package
%(\CTANref{endfloat}) offers useful facilities, including the means to
%leave indications for the editor where the figure really \emph{ought}
%to go.

\Question{\cs|pagestyle{empty}| on first page in \protect\LaTeX{}}

If you use \cs|pagestyle{empty}|, but the first page is numbered anyway,
you are probably using the \cs|maketitle| command too. This is not a bug
but a feature! The standard \LaTeX{} styles are written so that
initial pages (pages containing a \cs|maketitle|, \cs|part|, or
\cs|chapter|) have a different page style from the rest of the document. 
Hence, the commands internally issue \cs|thispagestyle{plain}|. This is
usually not acceptable behaviour if the surrounding page style is
`empty'.

Possible workarounds include: 
\begin{itemize}
\item Put \cs|thispagestyle{empty}| immediately after the \cs|maketitle|
  command, with no blank line between them.
\item Use \File|fancyheadings.sty|, which allows you to customise the
  style for initial pages independently of that for body pages.  It is
  available in \CTANref{fancyheadings}
\end{itemize}

\Question[rmnonsense]{Odd behaviour of \cs|rm|, \cs|bf|, \protect\emph{etc}.}

If commands such as \cs|rm| and \cs|bf| have suddenly stopped working in 
\LaTeX{} in the way that you expect, it is likely that your system
administrator has installed a version of \LaTeX{}~2.09 with
\htmlignore
NFSS (\Qref{}{NFSS}).
\endhtmlignore
\begin{htmlversion}
\Qref{NFSS}{NFSS}.
\end{htmlversion}
Complain loudly; ask 
your system administrator to replace this version with
\htmlignore
\LaTeXe{} (\Qref{}{latex2e}),
\endhtmlignore
\begin{htmlversion}
\Qref{\LaTeXe{}}{latex2e},
\end{htmlversion}
in which commands such as \cs|rm| and \cs|bf| work just as before if you
are using one of the standard classes---|article|, |report| and |book|
(among others).  In the meantime, use the option
\File|oldlfont.sty|, which should have been installed at the same time
as NFSS.

\Question{Old \protect\LaTeX{} font references such as \cs|tenrm|}

\LaTeX{}~2.09 defined a large set of commands for access to the fonts
that it had built in to itself.  For example, various flavours of
|cmr| could be found as \cs|fivrm|, \cs|sixrm|, \cs|sevrm|,
\cs|egtrm|, \cs|ninrm|, \cs|tenrm|, \cs|elvrm|, \cs|twlrm|,
\cs|frtnrm|, \cs|svtnrm|, \cs|twtyrm| and \cs|twfvrm|.

These commands were never documented, but certain packages
nevertheless used them to achieve effects they needed.

Since the commands weren't public, they weren't included in \LaTeXe{};
to use the unconverted \LaTeX{}~2.09 packages under \LaTeXe{}, you need
also to include the package \File|rawfonts.sty| (which is part of the
\LaTeXe{} distribution).

\Question{Missing symbols}

If some symbols, such as \cs|Box| and \cs|lhd|, no longer appear to 
exist, then your system administrator has probably upgraded your
version of \LaTeX{} to either
\htmlignore
NFSS (\Qref{on the scheme}{NFSS}) or \LaTeXe{}
(\Qref{describing LaTeX2e}{latex2e}).
\endhtmlignore
\begin{htmlversion}
\Qref{NFSS}{NFSS} or \Qref{\LaTeXe{}}{latex2e}.
\end{htmlversion}
In the former case, use
\htmlignore
\File|oldlfont.sty|, \Qref[as in the question]{}{rmnonsense}.
\endhtmlignore
\begin{htmlversion}
\File|oldlfont.sty| (see \Qref{problems with \cs|rm|, etc.}{rmnonsense}).
\end{htmlversion}
In the latter, use the package \File|latexsym|, which is part of the
standard \LaTeXe{} distribution, or the package \File|amsfonts|, if
it is available.

\Question{\protect\LaTeX{} gets cross-references wrong}
Sometimes, however many times you run \LaTeX{}, the cross-references
are just wrong. Remember that
the |\label| command must come \emph{after} the |\caption| command, or
be part of it. For example,
\htmlignore
\par\noindent
\begin{tabular}{@{}lll}
|\begin{figure}|     &    & |\begin{figure}|\\
|\caption{A Figure}| & or & |\caption{A Figure%| \\
|\label{fig}|        &    & |      \label{fig}}| \\
|\end{figure}|       &    & |\end{figure}| \\
\end{tabular}
\endhtmlignore
\begin{htmlversion}
\begin{verbatim}
\begin{figure}          \begin{figure}
\caption{A Figure}  or  \caption{A Figure%
\label{fig}                   \label{fig}}
\end{figure}            \end{figure}
\end{verbatim}
\end{htmlversion}

\Question[atsigns]{\cs|@| and \protect\texttt{@} in macro names}

A common source of problems in a \LaTeX{} document is the diagnostic
about the appearance of the command \cs|@|, or about other commands
containing the character |@|.  The most common complaint is ``You
can't use `\cs|spacefactor|' in vertical mode'', but other similar
ones occur.

Such problems are usually caused by including a \LaTeXe{} class or
package file into a \LaTeX{} document by some means other than
\cs|documentclass| or \cs|usepackage|.  \LaTeX{} defines internal
commands whose names contain the character |@|; this enables it to
avoid clashes between its internal names and names that we would
normally use in our documents.  In order that these commands may work
at all, \cs|documentclass| and \cs|usepackage| play around with the
meaning of |@|.  Solve this problem by using the correct command to
include the file.

But, you will say, ``\emph{The \LaTeX{} Companion} tells me to use
commands containing \texttt{@}!''

Indeed; for example, there's a lengthy section about
\cs|@startsection| and how to use it to control the appearance of
section titles.  Page~15 of \emph{The Companion} explains this; and
suggests that you make such changes in the document preamble, between
\cs|makeatletter| and \cs|makeatother|.  So the definition of
\cs|subsection| on page~26 could be:

\begin{verbatim}
  \makeatletter
  \renewcommand{\subsection}{\@startsection
    {subsection}%                    % name
    ...
    {\normalfont\normalsize\itshape}}% style
  \makeatother
\end{verbatim}

\Question{Where are the \protect\texttt{msx} and \protect\texttt{msy} fonts?}

The |msx| and |msy| fonts were designed by the American Mathematical
Society in the very early days of \TeX{}, for use in typesetting
papers for mathematical journals.  They were designed using the `old'
\MF{}, which wasn't portable and is no longer available; for a long
time they were only available in 300dpi versions which only
imperfectly matched modern printers.  The AMS has now redesigned the
fonts, using the current version of \MF{}, and the new versions are
called the |msa| and |msb| families; they are available from
\CTANref{amsfonts-symbols}

Nevertheless, |msx| and |msy| continue to turn up to plague us.  There
are, of course, still sites that haven't got around to upgrading; but,
even if everyone upgraded, there would still be the problem of old
documents that specify them.

If you have a |.tex| source that requests |msx| and |msy|, the best
technique is to edit it so that it requests |msa| and |msb| (you only
need to change the single letter in the font names).

If you have a |dvi| file that requests the fonts, there is a package
of
\htmlignore
virtual fonts (\Qref{}{virtualfonts})
\endhtmlignore
\begin{htmlversion}
\Qref{virtual fonts}{virtualfonts}
\end{htmlversion}
to map the old to the new series; it's available in \CTANref{msx2msa}

\Question{Where are the \protect\texttt{am} fonts?}

One \emph{still} occasionally comes across a request for the |am|
series of fonts.  The initials stood for `Almost [Computer] Modern',
and they were the predecessors of the Computer Modern fonts that we
all know and love (or hate)\begin{footnoteenv}
The fonts acquired their label `Almost' following the realisation
that their first implementation in \MF{}79 still wasn't quite right;
Knuth's original intention had been that they were the final answer
\end{footnoteenv}.
There's not a lot one can do with these
fonts; they are (as their name implies) almost (but not quite) the
same as the |cm| series; if you're faced with a document that requests
them, all you can reasonably do is to edit the document.  The
appearance of |dvi| files that request them is sufficiently rare that
no-one has undertaken the mammoth task of creating a translation of
them by means of virtual fonts; however, most drivers let you have a
configuration file in which you can specify font substitutions. If you
specify that every |am| font should be replaced by its corresponding
|cm| font, the output should be almost correct.

\Question{`String too long' in \protect\BibTeX{}}

The \BibTeX{}  diagnostic ``Warning--you've exceeded 1000, the
|global-string-size|, for entry |foo|'' is not one that you can hope
to avoid by altering the \BibTeX{} style in a simple way~--- \BibTeX{}
itself needs recompiling to increase its limit on string sizes (which is
often not practical, and is never desirable).  You must therefore 
address the problem by changing your bibliography database.

The problem usually arises from a very large abstract or annotation
included in the database.  The only way forward is to take the entry
out of the database, so that you don't encounter \BibTeX{}'s limit,
but you may need to retain the entry because it will be included in
the typeset.  In such cases, put the body of the entry in a separate
file:
\begin{verbatim}
  @article{long.boring,
    author =    "Fred Verbose",
    ...
    abstract =  "{\input{abstracts/long.tex}}"
  }
\end{verbatim}
In this way, you arrange that all \BibTeX{} has to deal with is the
file name, though it will tell \TeX{} (when appropriate) to include
all the long text.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{Why does it \emph{do} that?}

\Question{Why does it ignore paragraph parameters?}

When \TeX{} is laying out text, it doesn't work from word to word, or
from line to line; the smallest complete unit it formats is the
paragraph.  The paragraph is laid down in a buffer, as it appears, and
isn't touched further until the end-paragraph marker is processed.
It's at this point that the paragraph parameters have effect; and it's
because of this sequence that one often makes mistakes that lead to
the paragraph parameters not doing what one would have hoped (or
expected).

Consider the following sequence of \LaTeX{}:
\begin{verbatim}
  {\raggedright % declaration for ragged text
  Here's text to be ranged left in our output,
  but it's the only such paragraph, so we now
  end the group.}

  Here's more that needn't be ragged...
\end{verbatim}
\TeX{} will open a group, and set the ragged-setting parameters within
that group; it will then save a couple of sentences of text and
close the group (thus restoring the previous value of the
ragged-setting parameters).  Then it encounters a blank line, which it
knows to treat as a \cs|par| token, so it typesets the two sentences;
but because the enclosing group has now been closed, the parameter
settings have been lost, and the paragraph will be typeset normally.

The solution is simple: close the paragraph inside the group, so that
the setting parameters remain in place.  An appropriate way of doing
that is to replace the last three lines above with:
\begin{verbatim}
  end the group.\par}
  Here's more that needn't be ragged...
\end{verbatim}
In this way, the paragraph is completed while the setting parameters
are still in force within the enclosing group.

\Question[Q-protect]{What's the reason for `protection'?}

Sometimes \LaTeX{} saves data it will reread later. These data are
often the argument of some command; they are the so-called moving
arguments.  (`Moving' because data are moved around.)  Places to look for
are all arguments that may go into table of contents, list of figures,
\emph{etc}.; namely, data that are written to an auxiliary file and
read in later.  Other places are those data that might appear in head-
or footlines.  Section headers and figure captions are the most
prominent examples; there's a complete list in Lamport's book
(see \Qref[question]{\TeX{}-related books}{Q-books}).

%You don't want to care about this stuff?  Simply |\protect| all
%\LaTeX{} commands within these moving arguments.

What's going on really, behind the scenes? The commands in the moving
arguments are already expanded to their internal structure during the
process of saving. Sometimes this expansion results in invalid \TeX{}
code when processed again. ``|\protect\cmd|'' tells \LaTeX{} to save
|\cmd| as |\cmd|, without expansion.

What is a `fragile command'?  It's a command that expands into illegal
\TeX{} code during the save process.

What is a `robust command'?  It's a command that expands into legal
\TeX{} code during the save process.

No-one (of course) likes this situation; the \LaTeX{}3 team have
removed the need for protection of some things in the production of
\LaTeXe{}, but the techniques available to them within current
\LaTeX{} mean that this is an expensive exercise.  It remains a
long-term aim of the team to remove all need for these things.

\Question{Why doesn't \cs|verb| work within\protect\dots{}?}

The \LaTeX{} verbatim commands work by changing category codes.  Knuth
says of this sort of thing ``Some care is needed to get the timing
right\dots{}'', since once the category code has been assigned to a
character, it doesn't change.  So \cs|verb| has to assume that it is
getting the first look at its parameter text; if it isn't, \TeX{} has
already assigned category codes so that \cs|verb| doesn't have a
chance.  For example:
\begin{verbatim}
    \verb+\error+
\end{verbatim}
will work (typesetting `\cs|error|'), but
\begin{verbatim}
    \newcommand{\unbrace}[1]{#1}
    \unbrace{\verb+\error+}
\end{verbatim}
will not (it will attempt to execute \cs|error|).

This is why the \LaTeX{} book insists that verbatim
commands must not appear in the argument of any other command; they
aren't just fragile, they're quite unusable in any command parameter,
regardless of
\htmlignore
\cs|protect|ion (\Qref{}{Q-protect}).
\endhtmlignore
\begin{htmlversion}
\Qref{\cs|protect|ion}{Q-protect}.
\end{htmlversion}

\Question{Case-changing oddities}

\TeX{} provides two primitive commands \cs|uppercase| and
\cs|lowercase| to change the case of text; they're not much used, but
are capable creating confusion.

The two commands do not expand the text that is their parameter~---
the result of \cs|uppercase{abc}| is `|ABC|', but |\uppercase{\abc}|
is always `|\abc|', whatever the meaning of \cs|abc|.  The commands
are simply interpreting a table of equivalences between upper- and
lowercase characters.
They have (for example) no mathematical sense, and
\begin{verbatim}
  \uppercase{About $y=f(x)$}
\end{verbatim}
will produce
\begin{verbatim}
  ABOUT $Y=F(X)$
\end{verbatim}
which is probably not what is wanted.

The same sort of problem can arise with \LaTeX{} environment names,
on occasions when \LaTeX{} employs
\cs|uppercase| implicitly.  For example, the standard classes use
\cs|uppercase| to set the marks according to the arguments of
\cs|chapter| and \cs|section| commands, so that a chapter whose title
contains a small table expressed in terms of \cs|begin{tabular}|
\dots{} \cs|end{tabular}|, will set a mark containing
\cs|begin{TABULAR}|, \emph{etc}., which is an environment that
doesn't exist.

\Question{Why are \protect\texttt{\protect\#} signs doubled in macros?}

The way to think of this is that |##| gets replaced by |#| in just the
same way that |#1| gets replaced by `whatever is the first argument'.

So if you define a macro and use it as:
\begin{verbatim}
  \def\a#1{...#1...#1...#1...}  \a{b}
\end{verbatim}
the macro expansion produces `\dots{}b\dots{}b\dots{}b\dots{}',
which people find normal.  However, if we now fill in the `\dots{}':
\begin{verbatim}
  \def\a#1{----#1---\def\x #1{xxx#1}}
\end{verbatim}
\cs|a{b}| will expand to `-{}-{}-b-{}-{}-|\def\x b{xxxb}|'.  This
defines \cs|x| to be a macro \emph{delimited} by |b|, and taking no
arguments, which people may find strange, even though it is just a
specialisation of the example above.  If you want \cs|a| to
define \cs|x| to be a macro with one argument, you need to write:
\begin{verbatim}
  \def\a#1{---#1---\def\x ##1{xxx##1}}
\end{verbatim}
and \cs|a{b}| will expand to 
`-{}-{}-b-{}-{}-|\def\x #1{xxx#1}|', because |#1| gets replaced by `b'
and |##| gets replaced by |#|.

To nest a definition inside a definition inside a definition then
you need |####1|, as at each stage |##| is replaced by
|#|.  At the next level you need 8~|#|s each time, and so on.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{Recent Developments}

\Question[NFSS]{The New Font Selection Scheme (NFSS)}

NFSS was an extension to \LaTeX{} written by Frank Mittelbach and
Rainer Sch\"opf. It is described in TUGboat, 1989 10(2).  In
traditional typesetting, fonts are described by four parameters: the
\emph{family} (\emph{e.g}., computer modern), the \emph{series}
(\emph{i.e}., the weight and width of the font, such as light or bold),
the \emph{shape} (\emph{e.g}., italic), and the \emph{size}. NFSS is a
mechanism allowing the user to change any of these independently. NFSS
makes it relatively easy to use nonstandard fonts such as the
PostScript ones with \LaTeX{}, and easy to change maths fonts.  It
also allows dynamic loading of fonts at runtime (\emph{i.e}., not when
the format file is created).

%NFSS is no longer supported for \LaTeX{} version 2.09, but is standard
%with \LaTeXe{} (see question 41).
%
%There is one caveat that applies to \LaTeX{} documents written for
%the OLD scheme: some of them use special styles for special fonts
%which will not work under the NFSS.

With the demise of \LaTeX{}~2.09 as supported software, the label
`NFSS' has become somewhat misleading, as there's no `old' scheme with
which to contrast it~--- \LaTeX{} has incorporated the NFSS.

\Question[latex2e]{\protect\LaTeXe{} (the new standard \protect\LaTeX{})}

\LaTeXe{} is a new version of the \LaTeX{} package, prepared and
supported by the \LaTeX{}3 project team. It moved out of its test
phase in June 1994, and is now the standard \LaTeX{}; \LaTeX{}~2.09 is
no longer supported.

\LaTeXe{} is upwardly compatible with \LaTeX{}~2.09, but has new
features, including:
\begin{itemize}
\htmlignore
\item NFSS (\Qref{}{NFSS})
\endhtmlignore
\begin{htmlversion}
\item \Qref{NFSS}{NFSS}
\end{htmlversion}
  is now standard.
\item \SliTeX{} is consolidated into it, so that there is no longer a
  need for a separate format.
\item Better control of floating environments, such as figures.
\item There is a documented interface for package and class writers
  (though not yet for designers).
\item Enhanced box commands, \emph{e.g.}, options to specify the height of a
  minipage.  
\item |\ref| can be used in |\caption| without being protected.
\item |\newcommand| can define commands with one optional argument.
\item A standard package for colour and graphics inclusion.
\end{itemize}

Since \LaTeXe{} is supported, you can report bugs or problems with it by
typing `|latex latexbug|' and sending the report thus generated to 
\Email|latex-bugs@uni-mainz.de|.

\Question[LaTeX3]{The \protect\LaTeX{}3 project}

The \LaTeX{}3 project team is a small group of volunteers whose aim is
to produce a major new document processing system based on the
principles pioneered by Leslie Lamport in the current \LaTeX{}.  It
will remain freely available and it will be fully documented at
all levels.

The \LaTeX{}3 team has already delivered its first product,
\htmlignore
\LaTeXe{} (\Qref{}{latex2e}),
\endhtmlignore
\begin{htmlversion}
\Qref{\LaTeXe{}}{latex2e},
\end{htmlversion}
a macro package based
on Lamport's original code, but modified to be
more readily supportable than was Lamport's.

\Question[Q-SGML]{Using \protect\TeX{} to typeset from SGML files}

Jonathan Fine (\Email|J.Fine@pmms.cam.ac.uk|) is developing software
which will allow \TeX{} to typeset directly from SGML files.  The work
is producing a macro package that directly interprets an SGML source
file, as opposed to the conversion programs outlined earlier
(\Qref{}{Q-SGML2TeX}).

The work is beginning to show fruits of success, and an announcement
will be made early in 1995.

\Question[Q-omega]{The Omega project}

Omega
\htmlignore
($\Omega$)
\endhtmlignore
is a program built on top of \TeX{} which works internally with 16-bit
characters (Unicode); this allows it to work with most scripts in the
world without any complications of coding schemes.  Omega also has a
powerful concept of input and output filters to allow the user to work
with existing transliteration schemes, \emph{etc}.  Omega is an
ongoing project by John Plaice (\Email|plaice@ift.ulaval.ca|) and
Yannis Haralambous (\Email|Yannis.Haralambous@univ-lille1.fr|). Contact
Yannis to get on the discussion list.

\Question[Q-NTS]{The \protect\NTS{} project}

The \NTS{} project first saw the light of day at the Hamburg meeting
of \DANTE{} during 1992, as a response to an aspiration to
produce something even better than \TeX{}.  The project is not simply
enhancing \TeX{}, for two reasons: first, that \TeX{} itself has been
frozen by Knuth
(see \Qref[question]{the future of \TeX{}}{tex-future}), and second,
even if they \emph{were} allowed to develop the program, some members
of the \NTS{} team feel that \TeX{} in its present form is simply
unsuited to further development.  While all those involved in the
project are involved with, and committed to, \TeX{}, they recognise
that the end product may very well have little in common with \TeX{}
other than its philosophy.

% However, complete compatibility is a very important criterion in
% the minds of the team, and any decision to violate this will only be
% taken after very careful introspection and after open discussions
% with existing \TeX{} users world-wide.

% The project is proceeding in several phases.
%The first is to re-write
%\TeX{} in a language of the project's choice, and using more modern
%programming techniques than were available to Knuth.  Once this
%version is complete (in the sense that it satisfies the stringent
%requirements that people have of Knuth's implementation), it will be
%made available to the world at large, and will become the basis of
%experiments in the design of advanced typesetting facilities; this new
%version will be known as \eTeX{}.
Initially, and despite the reservations expressed at the inaugural meeting,
the group is concentrating on extending \TeX{} \emph{per se}: members are
implementing extensions and enhancements to \TeX{} through the standard
medium of a change-file.  These extensions and enhancements, together
with \TeX{} proper, will form a system called \eTeX{}, which will be 100\%
compatible with \TeX{}; furthermore, it will be possible during format
creation to construct a format that \emph{is} \TeX{}: no extensions or
enhancements will be present.
% If, on the other hand, it is desired to
% create an extended format, then all existing user documents will still
% be processable using that format to produce a |dvi| file that is
% \emph{identical} to the |dvi| file which would be produced by \TeX{}; only
% if 
% a further decision is taken, to use \eTeX{} in \emph{enhanced} mode,
% will the semantics of existing \TeX{} documents be compromised.  Thus
% at the user's discretion \eTeX{} can be used (a)~as pure \TeX, with no
% differences whatsoever, or (b)~in extended mode, wherein exist new
% features and new facilities but which will still process existing \TeX{}
% documents in such a way as to produce results identical to \TeX{}, or (c)~in
% enhanced mode, in which case some fundamental changes are made to the
% semantics of existing \TeX{} documents such that complete compatibility
% can no longer be assured (at the time of writing, only \TeXXeT{} requires
% this enhanced-mode behaviour, but \MLTeX{}, which the group have been
% given permission to incorporate, may also require such modified semantics).

The final aim of the project will be to produce an entirely new
typesetting system, building on the experience gained in the earlier
phases.  This system is intended to provide a stable basis
for typesetting in the future, in the way that \TeX{} has since it was
first offered to the world.

%The second phase of the project will be to produce an entirely new
%typesetting system, building on the experience gained in the first
%phase.  This system, to be known as \NTS{}, is to provide a stable basis
%for typesetting in the future, in the way that \TeX{} has since it was
%first offered to the world.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%
% This is the last section, and is to remain the last section...
\section{Perhaps There \emph{isn't} an Answer}

% ... and it contains only one question:
\Question{What to do if you find a bug}
%
% This here isn't a reference to a question...
\label{lastquestion}

For a start, make entirely sure you \emph{have} found a bug.
Double-check with books about \TeX{}, \LaTeX{}, or whatever you're using;
compare what you're seeing against the other answers above; ask every
possible person you know who has any \TeX{}-related expertise.
The reasons for all this caution are various.

If you've found a bug in \TeX{} itself, you're a rare animal indeed.
Don Knuth is so sure of the quality of his code that he offers real
money prizes to finders of bugs; the cheques he writes are
such rare items that they are seldom cashed. If \emph{you}
think you have found a genuine fault in \TeX{} itself (or \MF{}, or the
CM fonts, or the \TeX{}book), don't immediately write to Knuth,
however. He only looks at bugs once or twice a year, and even then
only after they are agreed as bugs by a small vetting team. In the
first instance, contact Barbara Beeton at the AMS
(\Email|bnb@math.ams.org|), or contact TUG.

If you've found a bug in \LaTeXe{}, you should submit its details to the
\LaTeX{}3 team.  To do this, you should use \LaTeX{} to process the file
\File|latexbug.tex|, which is part of the \LaTeXe{} distribution.
The process will give you instructions about what to do with your bug
report.  Please be sparing of the team's time; they're doing work for
the good of the whole \LaTeX{} community, and any time they spend
tracking down non-bugs is time not available to write or debug new
code.

If you've found a bug in \LaTeX{}2.09, or some other such unsupported
software, there's not a lot you can do about it.  You may find help or
\emph{de facto} support on a newsgroup such as
\Newsgroup|comp.tex.tex| or on a mailing list such as
\Email|uktex@tex.ac.uk|, but posting non-bugs to any of these forums
can lay you open to ridicule!  Otherwise you need to go out and find
yourself a willing
\htmlignore
\TeX{}-consultant\begin{footnoteenv}
TUG maintains a register of \TeX{} consultants; UKTUG is developing one
\end{footnoteenv}.
\endhtmlignore
\begin{htmlversion}
\TeX{}-consultant.
\end{htmlversion}

