
% \iffalse
%
% This file is part of the NFSS2 (New Font Selection Scheme) package.
% ------------------------------------------------------------------
%
% This file was contributed. In case of error please inform the
% original author.
%
% \fi

\documentstyle[array]{ltugboat}
\makeatletter
\def\BS{$\backslash$}
\def\@cite#1#2{#1\if@tempswa , #2\fi}
\makeatother
\newenvironment{QTabular}[1]%
     {\begin{flushleft}\begin{tabular}{#1}}%
     {\end{tabular}\end{flushleft}}
  
% from Phil Taylor
\catcode `\< = \active \catcode `\> = \active 
\let < = \csname 
\let >= \endcsname 
\def <#1>%
{\expandafter 
  \ifx \csname #1\endcsname \relax  {\it #1}% 
  \else \csname #1\endcsname \fi
        }
%------------------------------------
\def\filename{essnfss2.tex}
\def\fileversion{2}
\def\filedate{12.8.1993}
\addtolength{\textheight}{1pc}
\def\TUB{Tugboat}
\def\tensl{\fontfamily{cmr}\fontseries{m}\fontshape{sl}\fontsize{10}{12pt}\selectfont}
\def\tubfont{\shape{sl}\selectfont}
\def\tubissue#1#2{\TUB#1\##2}
%-------------------------------------------------------
\title{Implementing the extended \TeX\ layout using \PS\ fonts}
\author{Sebastian Rahtz}
\address{ArchaeoInformatica\\
12 Cygnet Street\\
York Y01 2JR}
\netaddress{spqr@minster.york.ac.uk}
\begin{document}

\title{Essential NFSS2, version \fileversion}
\date{\filedate}
\maketitle
\bibliographystyle{apalike}
\begin{abstract}
This article offers a user's view of the New Font Selection Scheme,
version 2. It describes the reasons for using the NFSS; the
differences a user will encounter between NFSS and old <LaTeX>; what
it will be like installing and using NFSS2; some special situations in
mathematics; and an overview of the advanced NFSS2 commands for
describing new fonts.
\end{abstract}

\section{Introduction}
<TeX> has a very general model of using different typefaces; all it
needs is to have a set of metric information for each font, and it
leaves the actual setting up to the dvi driver. Within the <TeX> input
file, the user associates a name with a given font at a particular
size, and uses that name when she wishes to set in the font. In 
Knuth's descriptive `plain' macros, this is easy to work with; in <LaTeX>,
however, the user works at a higher level of commands like \verb|\bf|
or \verb|\huge|, and the system is supposed to work out which
particular font is meant. In the early 1980s when <LaTeX> was being
developed, there was not much choice in typefaces (everyone used Computer
Modern Roman) or sizes, so Lamport simply `hard-wired' all the
allowed combinations of size and style, and assigned them to specific
external fonts.

Unfortunately, <LaTeX>'s font selection is not as general as it
sometimes seems. The commands do not add together to produce an
intuitive effect; thus the commands \verb|\it| and \verb|\bf| which
separately produce italic and bold, do {\em not} produce bold italic when
used together, but have the effect of whichever command comes last.
Similarly, a size change always reverts to a normal weight font, 
so that \verb|\bf\Large| does {\em not} produce large bold, whereas
\verb|\Large\bf| does. What is much worse is that if one wishes to use
a different typeface throughout a document wherever (say) sans-serif
is used, it requires major surgery to the innards of <LaTeX>;
the font assignments are made in the file {\tt lfonts.tex} which is
only read when one is building the format file for <LaTeX>, something
which most users never do.

The average user who simply uses the fonts which come with a typical
<TeX> installation is not usually aware of the underlying lack of
flexibility; however, now that many more fonts are available for use (a
greater choice of <Metafont> sources, and the ubiquitous <PS> fonts),
this area has been a bottleneck in the use of <LaTeX> in general
typesetting. The user who wanted Times Roman as the default typeface
in a document had three choices:
\begin{enumerate}
\item To load many new fonts with the {\tt newfont} command, and use
  them explicitly;
\item To heavily edit the file {\tt lfonts.tex} and build a new
  version of <LaTeX>; or
\item To take large chunks out of {\tt lfonts.tex} and replicate their
  effect in a style file.
\end{enumerate}
Other style files were written to specifically implement features like
bold sans-serif; but an altogether more general solution was needed,
and this was met in 1989 with the New Font Selection Scheme, which
was subsequently also used in AMS<LaTeX>. The NFSS is a complete
replacement for {\tt lfonts.tex} which contains a generic concept for
varying font attributes individually and integrating new font families
easily into <LaTeX>. 

Since the first NFSS, considerable progress has been made towards a
completely new version of <LaTeX> itself, and a new version of NFSS is
one of the first useable results; this is what we will now learn about.

\section{Overview of NFSS2}
The NFSS concept is based on five {\em attributes} of a font; 
the user changes any of the attributes, and it is the job of <LaTeX>
to identify the appropriate external font which fits the new
situation. The attributes are:
\begin{description}
\item[Encoding] The way the font is laid out; when only CM fonts are
  used, this does not vary, because all of Knuth's fonts have more or
  less the same layout. But users of PostScript fonts, or the recent
  256 character `DC' fonts (described in detail in
  \cite{Haralambous:1992}), will meet different layouts. This is
  discussed in more detail in Appendix 1.
\item[Family] The basic design of the typeface, eg Times Roman, Computer
  Modern, or Stone Informal.
\item[Shape] The main divisions of the typeface; most have at least two
  variants, `normal' and italic, and possibly something specialized
  like small-caps.
\item[Weight] Many typefaces come in a range of `weights' (light,
  normal, bold etc), determined by the thickness of the strokes of
  letters; they also vary in width, as we see in Computer Modern,
  which has a normal bold and an `extended' bold. The two attributes
  of width and weight are combined in the NFSS, and called `series'.
\item[Size] The base height of the letter shapes (10pt, 14pt etc). 
  These different sizes may be  achieved in two ways --- by having a
  separate font design for each size, or by scaling of a single 10pt
  design. Typical Computer Modern and PostScript setups use  a
  combination of methods, but we do need to worry about this for the NFSS.
\end{description}
At the start of a <LaTeX> job, each of the five attributes has a
default value, typically as follows:
\begin{QTabular}{>{\em}l>{\tt}ll}
\hline
  encoding & OT1  & Normal <TeX> encoding\\
  family   & cmr  & Computer Modern Roman\\
  shape    & n    & Normal (upright roman)\\
  series   & m    & Medium weight\\
  size     & 10pt & \\
\hline
\end{QTabular}
Inside <LaTeX>, this combination is looked up in  a table to see which
external font this situation corresponds to, and the result will be
the familiar {\tt cmr10}. Suppose we now wish to move into italics; we
simply change the `shape' attribute to `italic', and <LaTeX>
reconsults its table to find that this means it should load and use the
font {\tt cmti10}. A subsequent request to change the `series' to
`bold' will {\em not} change the italic {\em shape}, but search the
table for a new combination of `bold series' and `italic shape',
coming up with {\tt cmbxti10}. Similarly, a request to change the font
size at this point to 24pt will leave all other characteristics
unchanged, and simply load {\tt cmbxti10} at a larger size (since that
particular font is only available in a 10pt design). 

In practice, all this selection is hidden for the user behind the
familiar command like \verb|\em| and \verb|\Large|, but it is
important to realize that the scheme is completely general. If, for
instance, we had the full Univers family available, which has a great
range of weights, we could select any of them by changing the `series'
characteristic, and leaving <LaTeX> to find the right font metric
file.

How does <LaTeX> know how to match a combination of {\tt
OT1+cmr+m+n+10pt} to {\tt cmr10}? By means of special {\tt fd} ({\em
font description}) files (with a suffix of {\tt .fd} in most operating
systems). There is one of these for every combination of {\em
fontencoding} and {\em family}, which defines the possibilities of the
other three attributes. Thus {\tt OT1cmr.fd} classifies all the normal
Computer Modern fonts by means of the font attributes, and says which
external font they correspond to. When <LaTeX> starts, it does not
have {\em any} fonts loaded\footnote{Not quite true; it needs some
fallback defaults if all else fails.}, but waits until some font
selection is needed, and the loads the appropriate {\tt fd} file; as
new combinations of font attributes occur, {\tt fd} files are loaded.
We will see what the format of these fonts is like later.

Perhaps the most dramatic effect of attribute changing is when a different
{\em family} is selected, and with a single command the whole
documents changes from, e.g., Computer Modern to Lucida Bright.


\section{Normal usage}
The vast majority of your existing <LaTeX> documents will run through
the new system with no further change. The commonest area for
incompatibilities is in maths (see below, section \ref{math}), but you may
also be `tripped' by the new orthogonality in shape and weight
selection. If your document contains:
\begin{verbatim}
 See {\bf bold and then \tt typewriter}
\end{verbatim}
under the old <LaTeX>, the \verb|\tt| completely overrides the effect
of \verb|\bf|, but in the new system, they are different attributes,
so the command \verb|\tt| changes the {\em family} to (perhaps) {\tt
cmtt}, but the bold series attribute is unchanged, so the system
will load a bold typewriter font (which you may or may not have).
A rather more worrying situation occurs when you have defined a new
command without thinking through the ramifications. Thus if in a style
file or document preamble, we have said
\renewcommand{\PS}{{\sc PostScript}}
\begin{verbatim}
 \newcommand{\PS}{{\sc PostScript}}
\end{verbatim}
so that \verb|\PS| produces \PS, and the later we write
\begin{verbatim}
  \section{How \PS\ changed my life}
\end{verbatim}
we may have a problem, if the \verb|\section| command is defined to
set its argument in a bold sans-serif typeface. The definition of
\verb|\PS| says that the word is in small caps. This is a
change in {\em shape}, so the {\em family} (a sans-serif font) stays
unchanged, as does the {\em series} (bold). So the system tries to
load a small caps bold sans-serif font, which you may not have (you
don't in Computer Modern, for instance). Here a very important feature
of NFSS2 comes into action, {\em font substitution}; it follows a set
of rules (which the user can change) and finds the closest possible
match. This may not be at all what the user intended, and it will
probably produce a different effect from the old <LaTeX>. However,
NFSS2 always puts out clear warnings on the terminal and log file when
it is substituting, and the problem is usually obvious when you see
your printout. Some more careful discipline is required when writing
new documents, and emending old ones. Bear in mind that the strange
effects are not {\em mistakes} by <LaTeX>, but simply a stricter
interpretation of the input than the old <LaTeX>.

How do we persuade <LaTeX> to choose the attributes we want? The same
commands which we already have work as expected, with two new ones
available; these are listed in Table \ref{attr}.

\begin{table*}
\centering
\small
\begin{tabular}{>{$\backslash$\tt}lll}
\multicolumn{1}{l}{\em Command}&\em Meaning&\em Effect\\
\hline
rm & normal family & usually a serif font \\
sf & sans family   & {\sf a sans font} \\
tt & typewriter family & {\tt a monospaced typewriter font}\\
bf & bold series & {\bf bold typeface}\\
it & italic shape & {\it italic typeface}\\
sl & slanted shape & {\sl slanted typeface}\\
sc & small-caps shape & {\sc small-caps typeface}\\
\hline
normalshape & normal shape & back to normal \\
mediumseries & normal series & normal weight \\
\hline
\end{tabular}
\caption{User commands to change attributes}\label{attr}
\end{table*}


The size changing commands have an important difference
compared to old <LaTeX>: they {\em only} change the font {\em size}
attribute (in the old <LaTeX> they changed the series and shape back
to `normal roman').  

The font changing in <LaTeX> declarations have always been rather
anomalous, in that they affect the text within the \verb|{| and
\verb|}| group where they used, instead of having an argument like
most other commands.  <LaTeX> beginners often mistakenly type
\verb|\em{hello}| when trying to typeset {\em hello}. It is therefore
a very good idea to start using a different set of commands, which are
provided by the style option {\tt fontcmds}, listed in Table
\ref{fontcmds}.
\begin{table*}
  \leavevmode
  \begin{center}
    \begin{tabular}{|>{$\backslash$\tt}l>{$\backslash$\tt}ll|}
\hline
\multicolumn{1}{|l}{\em Command} & 
\multicolumn{1}{l}{\em Example} & 
\em Effect \\
\hline
\multicolumn{3}{|l|}{Changing {\em family}}\\
textrm & textrm\{Whales\} & {\rm Whales}\\
textsf& textsf\{Whales\} & {\sf Whales}\\
texttt& texttt\{Whales\} & {\tt Whales}\\
\multicolumn{3}{|l|}{Changing {\em series}}\\
textbf& textbf\{Whales\} & {\bf Whales}\\
textmedium& textmedium\{Whales\} & {\rm Whales}\\
\multicolumn{3}{|l|}{Changing {\em shape}}\\
textit& textit\{Whales\} & {\it Whales}\\
textsl& textsl\{Whales\} & {\sl Whales}\\
textsc& textsc\{Whales\} & {\sc Whales}\\
textnormal& textnormal\{Whales\} & {\rm Whales}\\
emph& emph\{Whales\} & {\em Whales}\\
\hline
    \end{tabular}
    \caption{New font commands with arguments}
    \label{fontcmds}
  \end{center}
\end{table*}


If you want to change the {\em default} action associated with any of
the above commands, you can do so with the \verb|\renewcommand| macro;
each of the declarations above has a corresponding command with a
suffix of {\tt default}. Thus you could change the effect produced by
\verb|\tt| by saying (in the document preamble or a style file):
\begin{verbatim}
 \renewcommand{\ttdefault}{courier}
\end{verbatim}
if you had a font family called `courier'.  There may be problems with
the encoding, if this is a PostScript font, but we will discuss that
in appendix 1.

`How', the suspicious reader will ask, `do I know what values are
allowed for the font attributes? How do I know that boldness is
indicated by a series of ``bx''?' In fact, more or less {\em any}
value for the attributes is permitted, but if you want your document
to be useable by others, it would be as well to stick to a
conventional set. If you ask for a {\em shape} of `grotesque', you
will get the right font {\em if} the {\tt fd} contains an entry for
that combination of attributes. Conventional values are as follows
(for the Computer Modern family):
\begin{description}
\item[Family] cmr, cmss, cmtt
\item[Shape] n, it, sl, sc
\item [Series] m, b, bx (differentiating between normal bold and
  extended bold)
\end{description}
Most users will not worry about this, but simply use the high-level
commands and get the effect they intended. Different font {\em
families} will commonly be loaded via a style file which changes the
default families looked for by \verb|\rm|, \verb|\sf| and
\verb|\tt|. A {\tt palatino.sty}, for instance, will
set things up so that the roman font is Palatino-Roman, the sans
font is Helvetica and the typewriter font is Courier. A
set of suitable {\tt fd} files and style files for common PostScript
fonts is distributed with NFSS2. The only problem here is agreeing on
{\em family} names for fonts, and having suitable {\tt fd} files, but
this is done for a great many typefaces in the standard NFSS2
distribution, with the family names listed in Table \ref{families}.
\begin{table*}
\small
  \leavevmode
  \begin{center}
    \begin{tabular}{|ll|ll|}
\hline
\multicolumn{4}{|l|}{\em Computer Modern}\\
\hline
cmr & Computer Modern Roman &cmss &Computer Modern Sans\\
cmtt &Computer Modern Typewriter &cmm & Computer Modern Math\\
cmex &Computer Modern maths extension &cmsy & Computer Modern maths symbols\\
cmdh &Computer Modern Dunhill & cmfib &Computer Modern Fibonacci\\
cmfr &Computer Modern Funny & &\\
\hline
\multicolumn{4}{|l|}{\em <LaTeX>}\\
\hline
lasy &<LaTeX> symbols&&\\
\hline
\multicolumn{4}{|l|}{\em AMS}\\
\hline
msa &AMS symbol font 1 & msb &AMS symbol font 2\\
\hline
\multicolumn{4}{|l|}{\em Concrete}\\
\hline
ccm &Concrete Maths & ccr &Concrete Roman\\
\hline
\multicolumn{4}{|l|}{\em Euler}\\
\hline
euex &Euler maths extension &euf &Euler Fraktur\\
eur & Euler Roman & eus & Euler Script\\
\hline
\multicolumn{4}{|l|}{\em PostScript}\\
\hline
pag &Avant Garde & pbk &Bookman\\
pcr &Courier &phv &Helvetica\\
ppl &Palatino &psy &Symbol\\
ptm &Times & pzc &Zapf Chancery\\
pzd &Zapf Dingbats&&\\
\hline
    \end{tabular}
    \caption{Common font family names}
    \label{families}
  \end{center}
\end{table*}

\section{Mathematical work}\label{math}
Mathematical typesetting with NFSS2 works in a very different way to
text, as the fonts do {\em not} vary according to the current font
attributes in the main body of the document.
There are some incompatibilities with old <LaTeX>, and some new
facilities. The principal difference is that that font {\em
declarations} like \verb|\bf| no longer work, but we must rely on two
different concepts, {\em maths versions} and {\em maths alphabets}. The
{\em mathversion} changes the appearance of the whole formula (all the
fonts change), while the {\em alphabet} is used to set a particular
set of of characters in a chosen font. The normal text commands like
\verb|\em|, \verb|\sf| or \verb|\bf| are now completely illegal in
maths, and a new set of commands is provided:
\begin{QTabular}{>{$\backslash$\tt}ll}
\multicolumn{1}{l}{\em Example} & \em Effect\\
\hline
mathcal & calligraphic style\\
mathrm  & upright text \\
mathbf  & bold text\\
mathsf  & sans-serif \\
mathit  & italic text \\
\hline
\end{QTabular}
These are {\em commands} with an argument, not declarations. So to get
a calligraphic ABC, we say \verb|$\mathcal{ABC}$|, and {\em not}
\verb|$\mathcal ABC$|. The effect of the latter will be to set just
the A in calligraphic, since just the first token after
\verb|\mathcal| is taken as the argument.

You can define {\em new} math alphabets for yourself easily, with the
\verb|\DeclareMathAlphabet| command, which associates a particular font
family, encoding, shape, and series with the command you want to use.
So if we want to declare a typewriter math alphabet, we could say (in
the document preamble):
\begin{verbatim}
  \DeclareMathAlphabet{\mathtt}{OT1}{cmtt}{m}{n}
\end{verbatim}
(OT1 is the name of the original <TeX> font layout).

What about new math symbol fonts? To illustrate some of the commands
available here, let us look at how a style file looks which sets
up the AMS symbol fonts. Assuming that the relevant {\tt fd} files
exist on our system for the fonts (named {\em msa} and {\em msb} in
Table \ref{families} above), we can declare the existence of them as
symbol fonts:
\begin{verbatim}
\DeclareSymbolFont{AMSa}{U}{msa}{m}{n}
\DeclareSymbolFont{AMSb}{U}{msb}{m}{n}
\end{verbatim}
where we define the names ({\tt AMSa} and {\tt AMSb}) by which we are
going refer to them in future, the {\em encoding} (U is for
`undefined', where there is no standard layout), {\em family} (msa and
msb), {\em series} (m) and {\em shape} (n). We can use the new fonts
in two ways:
\begin{enumerate}
\item By declaring named math symbols. E.g.\
\verb|DeclareMathSymbol\lozenge{\mathord}{AMSa}{"06}|
which looks more fearsome than it really is. We are defining a new
maths macro \verb|\lozenge|, and saying it comes from the {\tt AMSa}
font we have defined earlier, at position {\tt "06} (this hexademical
numbering notation is described in \cite[p. 116]{Lamport:1986}). The
tricky bit is \verb|\mathord|, which says what {\em type} of symbol it
is. The possibilities are listed in Table \ref{mathtypes}, but the
serious user is advised to consult 
\cite[p.~158]{Knuth:1984}.\footnote{Note that $\backslash${\tt
mathalpha} is an NFSS2 addition to the list of possible types.}
\item By saying that we want to use a symbol font also as
a {\em math alphabet}:
\begin{verbatim}
\DeclareSymbolFontAlphabet{\bbold}{AMSb}
\end{verbatim}
This defines a new {\em math alphabet} command \verb|\bbold|, which
picks up characters from the {\tt AMSb} fonts (where the AMS has
placed `blackboard bold' letters).
\end{enumerate}

The use of the three math alphabet and symbol commands here is used
to construct most of the standard maths interface; the supplied style
file {\tt euler.sty}, which redefines  maths to use the Euler fonts,
is a good example of its use.

I have not dealt much here with {\em maths versions}; suffice it to
say that each of the commands described above has a corresponding
command which allows the user select a specific symbol or alphabet 
font for each different maths version.
\begin{table*}
\leavevmode
\begin{center}
\begin{tabular}{|>{$\backslash$\tt}ll|>{$\backslash$\tt}ll|}
\hline
\multicolumn{1}{|l}{\em Type} & \em Meaning &
\multicolumn{1}{l}{\em Type} & \em Meaning\\
\hline
mathord &ordinary & mathop & large operator\\
mathbin & binary operator & mathrel &relation\\
mathopen & opening & mathclose & closing \\
mathpunct & punctuation & mathalpha & alphabetic\\
\hline
    \end{tabular}
    \caption{Maths symbol types}
    \label{mathtypes}
  \end{center}
\end{table*}

\section{Going further, and towards <LaTeX>3}
This article has not described all the features of NFSS2, or the style
files which are distributed with it. For a detailed description of the
whole system (and a great many other useful topics in <LaTeX>), the
reader is referred to \cite{Companion}.

I advise all <LaTeX> users to switch to the new NFSS2 standard for
<LaTeX> as soon as possible; the work done in NFSS2 is central to the
development of the next version of <LaTeX>, written by the official
maintainers of <LaTeX>, and if you get used to the NFSS way of
thinking now, you will be in a good position to take advantage of
<LaTeX>3 when it appears. The few remaining common style files which
rely on the old behaviour of <LaTeX> are rapidly being converted, and
many new font-related styles are being written now that it so much
easier to do so.

\begin{thebibliography}{}

\bibitem{Companion}
Goossens, M., Mittelbach, F., and Samarin, A. (1993).
\newblock {\em The {\LaTeX} Companion}.
\newblock Addison-Wesley, Reading, Massachusetts.

\bibitem{Haralambous:1992}
Haralambous, Y. (1992).
\newblock {\TeX} conventions concerning languages.
\newblock {\em \TeX\ and TUG News}, 1(4):3--10.

\bibitem{Knuth:1984}
Knuth, D.~E. (1984).
\newblock {\em The {\TeX} Book}.
\newblock Addison-Wesley, Reading, Massachusetts.

\bibitem{Lamport:1986}
Lamport, L. (1986).
\newblock {\em The {\LaTeX} Book}.
\newblock Addison-Wesley, Reading, Massachusetts.

\end{thebibliography}
\section*{Appendix 1: Encoding, and PostScript fonts}
It is an unfortunate fact of life that we do not have a completely
accepted standard for layout of fonts; everyone agrees on a certain
number of characters, and where they are to be found (the ASCII 
character set), but this is not adequate for any serious typesetting.
Whenever we type character 234 or a <TeX> macro like
\verb|\c{c}|, we want the effect to be \c{c}, and <TeX> has to know
where to find this in a font. We are likely to meet at least three
situations, or five if we use PostScript fonts:
\begin{enumerate}
\item The layout of Knuth's original Computer Modern fonts
  (\cite[Appendix F]{Knuth:1984}). 
\item The `Cork' layout, discussed by \cite{Haralambous:1992}.
\item An extended ASCII layout, as used (for instance) in many DOS or
  Macintosh applications (not necessarily the same!).
\item `Raw' PostScript layout, the default defined by Adobe.
\item A re-coded PostScript layout; an example is in the font metric
  files supplied with Tom Rokicki's {\em dvips}, which is basically
  the same as Knuth's layout, but has some small differences.
\end{enumerate}
This means that the definition of the \verb|\c| macro is going to vary
according to the font we are using; hence the font attribute of {\em
encoding}.\footnote{This is an addition to the NFSS since version 1.}
NFSS2 provides {\em hooks}, so that we can supply <TeX> code which
will be activated when the encoding changes. Alternatively, if we know
we are going to use a different encoding throughout a document, we can
just make changes in a style file.

The normal user will have to make one (important) choice: is she
going to use the current Computer Modern Roman layout, or the new Cork
layout? If she chooses the latter (and this means the `dc' fonts must
be available), then the style file {\tt dclfont.sty} is supplied to
set up all the necessary macros.\footnote{This will become the {\em
default} in <LaTeX>3.} If use of PostScript fonts is proposed, 
slight complications ensue. In the first case (original <TeX> layout),
then the PostScript fonts must be exactly in the right layout; users
of Rokicki's metric files and {\em dvips} will need to use the style
file {\tt psnfss2.sty}, and use the command \verb|\RokickiExtras| in
the document preamble to fix some macros. In the case of using Cork
encoding, it will be necessary to get metrics for the PostScript fonts
which remap the layout correctly, and to ensure that the PostScript
interpreter in the printer knows about it too. This is discussed in
detail in the {\em PSNFSS2} sub-package supplied with NFSS2.

Assuming the encoding question has been sorted out, 
setting up a document to use (say) PostScript Times Roman throughout is
trivial; we simply write:
\begin{verbatim}
\renewcommand{\rmdefault}{ptm}
\renewcommand{\sfdefault}{phv}
\renewcommand{\ttdefault}{pcr}
\end{verbatim}
in a style file or in the document preamble, and we will have changed
the standard for normal, sans-serif and typewriter setting.

Some users will not be working with anything like the ASCII layout at
all, but will be typesetting in something like Cyrillic, Devanagari or
Elvish. The {\em encoding} attribute for fonts makes it easy to swap
between different systems in the same document, and call up whatever
macros are needed for a particular situation. New encodings can be
defined, and old ones redefined. The detailed commands for declaring
new encodings, and for declaring new font families, is described in
the  NFSS2 documentation.

\section*{Appendix 2: Installation}
{\em This section is only relevant to the reader if  NFSS2 has not already
been installed on her computer.}

One of the characteristics of the new work being undertaken on <LaTeX>
is that Knuth's principles of literate programming are being applied,
which means that a single documented source is supplied from which the
user can either generate printed documentation, or produce useable files for
<TeX> input. The NFSS2 distribution cannot therefore be used until it
has been unpacked and installed; this is all done using <TeX> itself,
and the only additional package needed by the first time user are the
{\em docstrip} macros, which should always be supplied with NFSS2. The
installation is in two parts:
\begin{enumerate}
\item We must first get a set of {\tt fd} (and some <LaTeX> {\tt
    .sty}) files ready for use; this is done by running plain <TeX> or
  <LaTeX> on the file {\tt main.ins} which generates all the files we
  need. It will probably ask some questions as it runs about what
  fonts you have, but it won't matter much if you get the answers
  wrong (it may create {\tt fd} files for strange fonts you don't
  have, but if you never try to use them, that does not matter).
\item Now we need to create a new <LaTeX> {\em format file} (usually
  with a suffix of {\tt .fmt}); this can seem a slightly forbidding
  procedure, but should be explained in the documentation with your
  <TeX>; what happens is that a special version of <TeX> is run,
  called ini<TeX>, which reads the basic <LaTeX> macros, and
  hyphenation patterns, and dumps a fast loading version which you
  place where normal <TeX> can find it. On some systems there is
  actually an {\tt initex} command, but on others it is an option to
  normal <TeX>. Thus, if you use em<TeX> package, you type {\tt tex
    -i} to use the right portion of the program. You {\em must} use
  this special <TeX>, or you cannot use the hyphenation system.

  Creating the NFSS2 format is straightforward --- just run ini<TeX>
  on the file {\tt nfssltx}, and type \verb|\dump| in response to the
  \verb|*| prompt when it finishes loading files.\footnote{Unless you
  are a rather advanced guru, and commonly add extra features to your
  format files.}
\end{enumerate}
If you want to test your new <LaTeX> format now, work in the directory
where you placed in the NFSS2 files; otherwise move {\tt nfssltx.fmt}
to the directory where your <TeX> looks for format files, and copy all
the {\tt fd} files to a directory which <TeX> searches for inputs
(along with any {\tt .sty} files created in stage 1 above. Depending
on how your <TeX> system works, you may have to do some more work to
access the format file; thus we might edit the {\tt latex.bat}
file\footnote{It is strongly advised that you do {\em not} make your
new <LaTeX> an option, by making a new command, but that you use it
for all your work from now on.} under DOS, or make a new symbolic link
to {\tt virtex} if we run the {\em web2c} Unix <TeX>.

If you wish to find out more about NFSS2, and maybe print the
documentation of its internal workings (not for the faint of heart!),
read the file {\tt readme.mz8} for details of how to proceed.

\end{document}

