1 % Test file for nfss running the documentation
3 % this file will produce some errors in the tables because of the
4 % setting of tracingfonts=3. Those can be ignored. It will also
5 % produce errors whenever array etc. is updated.
12 \FORMAT{LaTeX Version 2e}
20 \documentclass[twocolumn]{article}
22 \usepackage[loading]{tracefnt}
31 \setlength{\textheight}{55pc}
32 \setlength{\textwidth}{39pc}
33 \setlength{\evensidemargin}{0pt}
34 \setlength{\oddsidemargin}{0pt}
38 \newcommand{\tubissue}[2]{TUGboat#1\##2}
39 \newfont{\manual}{logo10} % font used for the METAFONT logo, etc.
40 \newcommand{\MF}{{\manual META}\-{\manual FONT}}
41 \newcommand{\AmS}{{\the\textfont2 A}\kern-.1667em\lower.5ex\hbox
42 {\the\textfont2 M}\kern-.125em{\the\textfont2 S}}
43 \newcommand{\AmSTeX}{\AmS-\TeX}
45 % alphabets in this article:
47 \DeclareMathAlphabet{\sfmath}{OT1}{}{}{}
48 \DeclareMathAlphabet{\sfslmath}{OT1}{cmss}{m}{sl}
50 \SetMathAlphabet{\sfmath}{normal}{OT1}{cmss}{m}{n}
51 \SetMathAlphabet{\sfmath}{bold}{OT1}{cmss}{bx}{n}
54 % reset all mathcodes for the special examples in normal version:
55 \newcommand{\resetmathcodes}{%
66 \mathchardef\sum="1350
69 % use bold medium series from cmss for headings:
70 %\def\bf{\fontfamily{cmss}\fontseries{bx}\selectfont}
73 \newcommand{\meta}[1]{$\langle${\it#1\/$\rangle$}}
78 % missing text in quotations
79 \newcommand{\missing}{[\ldots]\ }
82 \title{\Large \bf The New Font Selection Scheme\nobreak\,--\nobreak \\
83 User Interface to Standard \LaTeX}
85 \author{Frank Mittelbach\\
87 W-6500 Mainz-Bretzenheim \\
88 Federal Republic of Germany \and
90 Konrad-Zuse-Zentrum \\
91 f\"ur Informationstechnik Berlin \\
92 Heilbronner Stra\ss e 10\\
94 Federal Republic of Germany}
96 \date{Written July 1990 -- last updated April 1992}
101 % If you do have the concrete fonts comment out the next line
102 % of code and remove the comment on the line following.
104 \ifx\selectfont\undefined\else
105 \fontfamily{cmss}\fontsize{10}{13pt}\selectfont
106 % \fontfamily{ccr}\fontsize{10}{13pt}\selectfont
117 In this article we describe the use of the new font selection scheme
118 in the standard \LaTeX{} environment.
119 The main characteristics are:
122 The possibility to change family, series, shape and sizes
123 independently of one another.
125 The existence of a style file to process older documents
126 without any changes to their layout and their input files.
128 A macro setup which is consistent with existing standard
129 document styles.\footnote{However, small changes in the document
130 styles would make font changes a bit
136 \section{General remarks}
138 In \tubissue{10}{2} we presented a new scheme to select fonts in \TeX{}
139 macro packages. This article describes the use of this new scheme in
140 the \LaTeX{} environment. The technical parts of the interface (which
141 are of some interest to readers who plan to use our scheme with
142 other fonts or with other macro packages) will be published in a
145 The necessary macros are distributed by the AMS together with the
146 {\tt amstex.sty} option which was announced in \tubissue{10}{3}.
147 The availability of the new font selection scheme at the usual
148 servers will be announced separately in \TeX{}hax, etc. Please
149 refrain from asking for personal distribution.
151 To get a better understanding of this \LaTeX{} interface, some words
152 on the organisation of font families are in order. Readers of our
153 article about the basic macros will notice that our understanding of
154 these matters increased while working on this interface and the
155 \AmS-\LaTeX{} project; in some regards we have changed our point of
156 view rather drastically. Surprisingly, only a few internal details
157 within the basic macros needed adjustment; it seems that even without
158 the real understanding, we instinctively got most of the things right
159 when we designed them. (But probably we are still ignorant of the
160 underlying concepts.)
162 In his book about ``Methods of Book Design'' Hugh Williamson writes
166 To the printer, an alphabet is a set of twenty-six letters of a
167 certain design and body, together with a few additional
168 combinations of letters. A {\em fount\/} is usually made up of a
169 set of alphabets of one size and based on one design. It may
170 consist of one alphabet only, if no more alphabets exist in that
171 design and size. Usually however a text fount will comprise five
172 alphabets --- roman and italic upper and lower-case, and small
175 A {\em series\/} is a set of founts closely related to each other
176 in design, and usually very similar to each other, but graded in
177 size. If only one alphabet has been made in a certain design, that
178 alphabet alone may be a series. A {\em family\/} is a group of
179 series compatible for composition, but loosely related in design. A
180 family may include excerpts from more than one series.
183 Since \TeX{}'s physical fonts (which is the American word for
184 fount) all contain exactly two alphabets, namely the upper and
185 lower-case alphabets of a certain design, we will use the word font
186 for physical \TeX{} fonts, and fount for bundles of \TeX{} fonts
187 consisting for example of roman (upright or normal), italic and small
190 The above quotation gives a good clue how to organize fonts in our
191 font selection scheme. Hence we use the \verb+\fontshape+ command
192 from the basic macros to distinguish between normal (n), italic (it),
193 small caps (sc), sloped or slanted (sl) and upright italic (u)
194 typefaces within one fount. Founts of different sizes form a series,
195 so we use \verb+\fontsize+ to access these. We think that the weight
196 and the width of a series are good candidates to distinguish between
197 individual series, therefore we combine them in the
198 \verb+\fontseries+ command. Again we use one and two letter
199 abbreviations as shown in table~\ref{tab:series}. One or more of
200 these series form a family which is accessed via the
201 \verb+\fontfamily+ command.
206 \multicolumn{2}{c}{Weight Class} \\[2pt]
211 Medium (normal)& m \\
219 \multicolumn{3}{c}{Width Class} \\[2pt]
220 Ultracondensed & 50\% & uc \\
221 Extracondensed & 62.5\% & ec \\
222 Condensed & 75\% & c \\
223 Semicondensed & 87.5\% & sc \\
224 Medium & 100\% & m \\
225 Semiexpanded & 112.5\% & sx \\
226 Expanded & 125\% & x \\
227 Extraexpanded & 150\% & ex \\
228 Ultraexpanded & 200\% & ux
231 \caption{Weight and width classification for fonts.
232 The percent values are derived from \protect\cite{IBM}.
233 To combine the abbreviations in the {\tt\bslash fontseries}
234 command, weight is used first and any instance of medium
235 ({\tt m}) is dropped except when weight and width are both
236 medium. In this case one single {\tt m} is used. So bold
237 expanded would be {\tt bx} whereas medium expanded would
245 To give some practical example, we arranged the most important
246 families of the Computer Modern fonts according to this
247 classification in table~\ref{tab:fonts}. Please note that some
248 families like `computer modern funny roman' ({\tt cmff}) or `computer
250 quotation' ({\tt cmssq}) are unclassified. These special
251 purpose fonts are not accessible in the standard distribution of the
252 new font selection scheme, although they could be added easily in a
257 \setlength\extrarowheight{3pt}
258 \begin{tabular}{|l|l|l|>{\tt}l|}
259 \multicolumn{4}{c}{\bf Computer Modern families } \\[15pt]
261 \multicolumn{1}{|c|}{\bf family}
262 & \multicolumn{1}{c|}{\bf series}
263 & \multicolumn{1}{c|}{\bf shape(s)}
264 & \multicolumn{1}{c|}{\bf Example of external names}\\[1pt]
268 \multicolumn{4}{|c|}{\it Computer modern roman} \\[1pt]
270 cmr & m & n, it, sl, sc,
272 cmsl10, cmcsc10, cmu10 \\
273 cmr & bx & n, it, sl & cmbx10, cmbxti, cmbxsl \\
274 cmr & b & n & cmb10 \\[1pt]
277 \multicolumn{4}{|c|}{\it Computer modern sans serif} \\[1pt]
279 cmss & m & n, sl & cmss10, cmssi10 \\
280 cmss & bx & n & cmssbx10 \\
281 cmss & sbc & n & cmssdc10 \\[1pt]
284 \multicolumn{4}{|c|}{\it Computer modern typewriter} \\[1pt]
286 cmtt & m & n, it, sl, sc & cmtt10, cmitt10, cmsltt,
290 \multicolumn{4}{|c|}{\it Computer modern fibonacci} \\[1pt]
292 cmfi & m & n & cmfib8 \\
296 \caption{Classification of the Computer modern fonts.
297 You will notice that not all possible combinations of
298 family, series and shape are available. E.g.\ there is
299 no small capitals shape in the medium series of the
300 computer modern sans serif. However, Philip Taylor
301 announced recently that he has filled some of the holes.
302 It might be a good idea to include such additional parameter
303 files for \MF{} into the general distributions.}
307 Given this overview about the classification of fonts it should be
308 clear how to select a specific font with the primitive commands
309 \verb+\fontfamily+, \verb+\fontseries+, \verb+\fontshape+,
310 \verb+\fontsize+, and
311 \verb+\selectfont+. As described in \cite{basic}, the
312 {\tt\bslash size} macro takes two arguments: the size
313 in printer's points as a numeral (i.e.~without the
314 dimension) and the corresponding {\tt\bslash
315 baselineskip} value (with a dimension). {\tt\bslash
316 selectfont} finally selects the font using values of
317 the surrounding environment if some of the commands
319 For example statements like ``Concrete roman condensed
320 slanted font at 9pt with 11pt leading''\footnote{This
321 is pronounced ``ledding'' and measures the distance
322 between the baselines of succeeding lines. To \TeX{}
323 users it is known as {\tt\bslash baselineskip}.} will
324 be translated into command sequences of the form:
326 \fontfamily{ccr}\fontseries{c}%
327 \fontshape{sl}\fontsize{9}{11pt}%
330 This will explicitly load the font mentioned above,
331 provided the necessary font shapes are known to the
332 system.\footnote{Among the AMS distribution an example
333 style option `{\tt concrete.sty}' is provided which
334 makes the Concrete roman as well as the Euler math
335 fonts available. These fonts were used to
336 typeset~\cite{ConcreteMath}
340 However, in the normal case, the \LaTeX{} user can safely rely on the
341 standard \LaTeX{} font selection commands defined in terms
342 of these primitive commands. These standard commands are discussed
343 in the next sections.
346 \section{Choosing a new text font}
348 In standard \LaTeX{}, different fonts (of the same size) are selected
349 by commands like \verb+\rm+, \verb+\bf+, \verb+\it+, etc. These
350 commands, however, select a specific font regardless of surrounding
351 conditions. E.g., if you write \verb+\sf\bf+ you don't get the `bold
352 extended' {\em series\/} of the `sans serif' {\em family\/} (i.e.\
353 {\tt cmssbx}), instead you get the `bold extended' {\em series\/} of
354 the `roman' {\em family\/} (i.e.\ {\tt cmbx}). In our
355 implementation this will be different.
358 Commands like \verb+\bf+ (or \verb+\sf+) are now implemented to
359 switch to the wanted {\em series\/} (or {\em family}, respectively),
361 the other font characteristics untouched. However, this concept has
362 one drawback in the current \LaTeX{} version: commands like
363 \verb+\footnote+ might switch to a smaller size but will inherit
364 other characteristics for the font to use from the environment where
365 they are used. E.g., a footnote appearing in the scope of a theorem
366 environment will erroneously be typeset in italic shape. This
367 problem has vanished with the \LaTeX{} release of December 1991.
369 characteristics in such special circumstances had to be reset by hand
370 using the commands given below. However, this is not necessary if
371 one uses the `{\tt oldlfont}' style option described in
372 sections~\ref{sec:oldlfont} and~\ref{sec:formats}.
373 This option defines the font selection
374 commands to behave in the same way as they do now in \LaTeX{} 2.09.
377 \subsection{Choosing a new {\em family}}
379 To switch to another {\em family\/} one may use \verb+\rm+,
380 \verb+\sf+ or \verb+\tt+ denoting the `cmroman', `cmsansserif' or
381 `cmtypewriter' {\em family}, respectively. The new font is selected
382 without changing the current {\em series}, {\em shape}, and {\em
383 size}. E.g., if the current font is {\tt cmbx10} (that is {\em
384 family\/} `computer modern roman', {\em series\/} `bold extended',
385 {\em shape\/} `normal', and {\em size\/} `10pt') then \verb+\sf+ will
386 change to {\tt cmssbx10} (that is {\em family\/} `computer modern
387 sansserif', {\em series\/} `bold extended', {\em shape\/} `normal', and
388 {\em size\/} `10pt'). Using, e.g., \verb+\tt+ afterward will
389 produce a warning and switch to {\tt cmtt10} because the `computer
390 modern typewriter' {\em family\/} does not contain a `bold extended'
391 {\em series}; therefore the default (`medium') {\em series\/} is tried.
393 \subsection{Choosing a new {\em series}}
395 To switch between `medium' and `bold extended' {\em series\/} the
396 commands \verb+\mediumseries+ and \verb+\bf+ are provided.
398 \subsection{Choosing a new {\em shape}}
400 Analogously the commands \verb+\sl+, \verb+\it+, and \verb+\sc+ are
401 used to switch to the {\em shapes\/} `sloped', `italic' and
402 `smallcaps', this time leaving {\em family}, {\em series}, and {\em
405 In addition, we introduce the \verb+\normalshape+ command, in case
406 one wants to switch back to the `normal' {\em shape}. If font changes
407 are done only inside of groups this command is necessary only to
408 reset a shape in a footnote or a similar context to avoid the
409 problem mentioned above.
412 \subsection{Choosing a new {\em size}}
414 To change to another {\em size\/} the standard \LaTeX{} commands
417 \verb+\tiny+ & \verb+\scriptsize+ & \verb+\footnotesize+ \\
418 \verb+\small+ & \verb+\normalsize+ & \verb+\large+ \\
419 \verb+\Large+ & \verb+\LARGE+ & \verb+\huge+
423 may be used. These commands also set the parameter
424 \verb+\baselineskip+ and the \verb+\strutbox+ as well as the
425 script and scriptscript {\em sizes\/} for
426 the new text {\em size}. But once again they will not change other
427 font characteristics. So, for example, it doesn't matter whether one
429 \verb+\large\tt+ or \verb+\tt\large+, the same font will be selected.
432 \subsection{Doing it by hand}
434 As mentioned before, primitive font selection commands like
435 \verb+\fontfamily+, \verb+\fontseries+, \verb+\fontshape+,
436 \verb+\fontsize+, and
437 \verb+\selectfont+ are also available to carry out the change.
440 \fontshape{n}\fontfamily{cmss}\selectfont
443 switch to the `cmsansserif' family with `normal' shape.\footnote{For
444 full details of the usage of these primitive commands see the article
445 about the basic macros~\cite{basic}.}
446 This article was set in concrete roman type
447 by simply writing \verb+\fontfamily{ccr}+\verb+\selectfont+
448 % rfw removed word for less spacey break %immediately
449 following the \verb+\begin{document}+
450 command.\footnote{Actually we also said
451 {\tt\bslash size\string{10\string}\string{13pt\string}} to
452 establish a larger {\tt\bslash baselineskip}.}
454 \verb+\documentstyle+ command also specifies a style option (`{\tt
455 concrete}') which sets up the internal tables for these fonts.
457 \subsection{Changing the meaning of {\tt \protect\bslash rm},
458 {\tt \protect\bslash sf} etc.}
460 To make it easy to typeset documents with other font
461 families (like Times Roman, Optima etc.) we maintain
462 seven additional macros
464 \rmdefault \sfdefault \ttdefault \bfdefault
465 \itdefault \scdefault \sldefault
467 denoting the family chosen by
468 \verb=\rm=, \verb=\sf=, \verb=\tt= or the series chosen
469 by \verb=\bf= or the shape for \verb=\it=,
470 \verb=\sc= and \verb=\sl=, respectively.\footnote{This
471 was suggested by Sebastian Rahtz who was one of the
472 first users of our prototype version.}
473 If, for example, a document should be typeset in sans serif
474 one could add in the preamble (between \verb=\documentstyle=
475 and \verb=\begin{document}=) the following redefinitions:
477 \renewcommand{\rmdefault}{cmss}
478 \renewcommand{\itdefault}{sl}
480 The first line means that whenever \verb=\rm= is called the
481 family {\tt cmss} (i.e.\ computer modern sans serif) is chosen
482 and the second line redefines \verb=\it= to switch to the slanted
483 shape since this family hasn't got an {\it italic} shape.
484 Another possible use is to say
486 \renewcommand{\bfdefault}{b}
488 This will redefine \verb=\bf= to select the bold instead of the
489 bold extended series which is the current default.
490 However these commands are
491 probably ignored by document styles for journals which decide to
492 use their own font families in the final print.
494 \section{Fonts for Math}
496 The selection of a specific typeface in a math formula should not
497 depend on the surrounding
498 environment. Characters in math normally denote special
499 things which should stay fixed even if the surrounding
500 text is set in another {\em shape\/} or {\em series}.
501 Therefore the strategy for selecting math fonts is somewhat
504 \subsection{Simple formulas}
506 Normal letters and standard symbols are typeset simply by using the
507 letters directly or using a command that denotes the wanted symbol.
508 So \verb+$\sum A_{i}$+ will produce $\sum A_{i}$. The typeface chosen
509 will depend on the current \meta{math version}. You can switch
510 between \meta{math versions} outside of math mode,\footnote{This is
511 done with the command\hfil\break {\tt\bslash
512 mathversion\string{}\meta{version name}{\tt\string}}.} thereby
513 changing the overall layout of the following formulas.
515 \LaTeX{} knows about two math versions called `normal' and `bold'. As
516 the name indicates, \verb+\mathversion{normal}+ is the default. In
517 contrast, the bold version will produce bolder letters and symbols.
518 This might be suitable in certain situations like headings, but
519 recall that changing the version means changing the appearance (and
520 perhaps the meaning) of the whole formula. If you want to bolden
521 only some symbols or characters within one formula you should not
522 change the \verb=\mathversion=. Instead you should define a special
523 math alphabet for characters (see below) and/or use the command
524 \verb=\boldsymbol= which is provided by the document style option
525 {\tt amsbsy}. For historical reasons \LaTeX{} maintains two
526 abbreviations to switch to its math versions: \verb+\boldmath+ and
529 Other versions could be provided in special style options. For
530 example the `{\tt concrete}' option mentioned before sets up
531 a version called `euler' to typeset formulas in the same way as it
532 was done in~\cite{ConcreteMath}.
535 \subsection{Special math alphabets}
537 But simple formulas with one alphabet and a huge number of symbols
538 are not sufficient for mathematicians to expose their thoughts
539 properly. They tend to use every available typeface to denote
542 To cope with this need for special alphabets in formulas,' we introduce
543 the concept of \meta{math alphabet identifiers}. These constructs are
544 special commands which switch to a specific typeface. They might
545 correspond to different typefaces in different math versions but
546 within one version they always select the same typeface regardless of
547 surrounding conditions.
549 A \meta{math alphabet identifier} can be defined according to
550 the users' needs but standard \LaTeX{} already has a few of them built
551 in. They are described in table~\ref{tab:math-id}.
553 \leftskip25pt \rightskip\leftskip
554 \LaTeX{} knows about three \meta{math alphabet
555 identifier}s. \verb=\cal= will select calligraphic
556 letters like $\mathcal A \mathcal B \mathcal C \mathcal D$,
557 \verb=\mathrm= will select upright roman letters for
558 use in functions like $\max_i$, and finally
559 \verb=\mit= selects the default math italic alphabet.
560 \caption{Predefined \meta{math alphabet identifiers} in \LaTeX}
564 When using such an \meta{alphabet identifier} two
565 syntax variants are available: one can understand a
566 command like \verb+\cal+ as a switch to a different
567 font, i.e.\ using a syntax \verb+{\cal ...}+ as the
568 old \LaTeX{} does, but we prefer to view the
569 \meta{math alphabet identifier} as a command with one
570 argument, i.e.\ to use a syntax of the form
571 \verb+..\cal{A}..+ To select the first alternative a
572 style option `{\tt nomargid}' is provided. This option
573 is automatically selected if the `{\tt oldlfont}' option
574 is used since this option is supposed to produce
575 identical results for older documents.
577 New \meta{math alphabet identifiers} are defined in
578 two steps. First the identifier is made known to the
579 system with the \verb+\newmathalphabet+ command. Then
580 specific typefaces in some or all \meta{math versions}
581 are assigned by means of the \verb+\addtoversion+
584 Let us discuss this process in detail. Suppose that
585 you want to make a sans serif typeface available as a
586 math alphabet. First we choose a new command name
587 (e.g.\ \verb+\sfmath+) and tell \LaTeX{} about it with
590 \newmathalphabet{\sfmath}
592 Then we consult table~\ref{tab:fonts} to find suitable
593 fonts to assign to this alphabet identifier. As you
594 find out, the computer modern sans serif family
595 consists of three series, a medium, semi bold
596 condensed and a bold extended one. The medium and the
597 bold extended series both contain a normal shape
598 typeface. So we add the line:
600 \addtoversion{normal}{\sfmath}{cmss}{m}{n}
601 \addtoversion{bold}{\sfmath}{cmss}{bx}{n}
603 Now our alphabet identifier is ready for use in these two versions.
604 We demonstrate this with the formula
605 {\mathversion{normal} \resetmathcodes
606 \[ \sum \sfmath{A}_{i} = \tan \alpha \]}%
607 which was produced by
610 \[ \sum \sfmath{A}_{i} = \tan \alpha \]
612 Note that we first switched back to the normal version. This was
613 necessary since this article is typeset with a third version (Euler)
614 in force. If we had tried to use \verb+\sfmath+ in this version
615 we would have gotten an error message stating that this
616 \meta{math alphabet identifier}
617 isn't defined for the Euler version.\footnote{Actually we cheated a
618 bit more in this article: we had to reset the {\tt\bslash mathcode}
619 of certain characters because they are in different places in the
620 Euler version. A few more details can be found in Don Knuth's
621 article~\protect\cite{art:euler}. However, this is not a real problem
622 because such changes can be done in commands similar to {\tt\bslash
623 boldmath} if such incompatible versions are to coexist in real
626 If we are interested in a slanted shape we have to face a
627 problem: there is no slanted shape in the bold extended series of the
628 Computer Modern sans serif family. So, if we make the identifier
629 known only in the normal version then it would produce an error message
630 when encountered in the bold (or any other) version. Of course we
633 the same typeface in all
634 versions. To make this task a bit easier there is also a \verb+*+
636 of the \verb+\newmathalphabet+ command which takes three more
637 arguments: the default values for family, series and shape for all
638 math versions in which the alphabet identifier is not explicitly
639 defined via an \verb+\addtoversion+ command. So our second example
640 can be set up simply by stating
642 \newmathalphabet*{\sfslmath}{cmss}{m}{sl}
644 This would have the additional advantage that this math alphabet
645 identifier is also allowed in math versions which are defined in style
646 files or document styles (like the Euler version mentioned earlier).
647 Any explicit \verb+\addtoversion+ command overwrites the defaults
648 given by \verb+\newmathalphabet*+; so, it might be a good idea always
649 to specify default values.
651 Here we show the same formula as above, but this time in the Euler
652 version and with \verb+\sfslmath+ instead of \verb+\sfmath+:
653 \[ \sum \sfslmath{A}_{i} = \tan \alpha \]
655 \section{Processing older documents}
658 To typeset documents which are written with the old \LaTeX{}
659 (i.e.\ with a format using the old font selection scheme)
660 only the source line containing the
661 \verb+\documentstyle+ command has to be changed.
662 More exactly the `oldlfont' option must be added to the list of
663 document style options if the new font selection scheme is in
664 force.\footnote{This means that it is the default
668 \section{Setting up a new format}
671 This section is written for people called `local wizards' by the
672 \LaTeX{} manual, which simply refers to the (poor) guys who
673 are always being pestered
674 if things do not work.\footnote{YOU might belong to this group!}
675 If you are using \LaTeX{} on your own PC you might have to read this
676 section, too, even if you don't feel like being a wizard.
678 \subsection{Preparations}
679 Before generating a new format it is necessary to rename a few files.
680 This enables you to customize the format to the special needs of your
684 \item [\tt lfonts.tex]
685 First of all you should rename the file {\tt lfonts.tex} (supplied
686 with the standard distribution of \LaTeX{}); otherwise you
687 will always end up with an old format. Call it, say,
689 \item [\tt hyphen.tex]
690 Another file which should probably be renamed is {\tt hyphen.tex}
691 (the original American \verb+\pattern+$\,$s from Don Knuth) because
692 this enables you to insert your favourite \verb+\pattern+ package
693 when Ini\TeX{} is asking for this file. This might even be useful
694 if you use \TeX{} version 3.0 which is multilingual (assuming that
695 your computer has only a limited memory).
699 \subsubsection{Preloading Fonts}
701 Now you have to decide which fonts to preload in your format. Unlike
702 the old font selection scheme of \LaTeX{}, where only preloaded fonts
703 could be used in math applications (like subscripts etc.), the new
704 font selection scheme poses no restriction at all; documents will
705 always come out the same.
706 So you have to take your pick by weighing
707 the two conflicting principles:
710 Preloading often used fonts might make your \TeX{} run a bit faster.
712 Using more load-on-demand fonts will make your format much
713 more flexible, because you can switch to different families far
714 more easily. After all, there is an upper limit to the number of
715 fonts \TeX{} can use in one run and every preloaded font will
716 count even if it is never accessed.
718 On the PC at home we nowadays always use formats with only 5 fonts
719 preloaded.\footnote{This is the absolute minimum. These fonts are
720 accessed by {\tt lplain.tex} and {\tt latex.tex} when the format is
721 generated.} We don't think that \TeX{} is actually running much
722 more slowly than before.
724 Together with the new font selection scheme two files {\tt
725 preload.min} and {\tt preload.ori} are distributed. The first one
726 will preload next to nothing while the second will preload the same
727 fonts as the old {\tt lfonts.tex}. You can copy either of these files
728 to {\tt preload.tex} and then change it if you want to preload some
729 other fonts. But please make sure that you don't change one of the
730 original files of the distribution.
733 \subsubsection{Making more fonts available}
735 Besides deciding which fonts to preload, you also have to tell the
736 \TeX{} sytem which external fonts are available and how they are
737 organized in families, series, shapes and sizes. In short you have to
738 set up internal tables giving informations like ``family {\tt cmr},
739 series {\tt b}, shape {\tt n}, size {\tt 10} is associated with the
740 external font {\tt cmb10} but there is no font with similar
741 characteristics in size {\tt 9}''. This is done with the
742 \verb+\new@fontshape+ command, either in a style file (see `{\tt
743 concrete.sty}' as an example) or when dumping a format.
745 Again two files {\tt fontdef.ori} and {\tt fontdef.max} are
746 distributed. You can copy one of them to {\tt fontdef.tex}. The
747 file {\tt fontdef.ori} defines all fonts which are necessary to run
748 standard \LaTeX{} documents while {\tt fontdef.max} also defines
749 certain fonts from the AMSFonts collection.
750 To make other font families available you can
751 either append appropriate \verb+\new@fontshape+ definitions to {\tt
752 fontdef.tex} (again, leave the originals untouched!) or add them in a
753 style file.\footnote{The latter alternative might be better if you
754 use these fonts very rarely (e.g., at sites with many users) to
755 avoid filling \TeX{}'s memory with unnecessary definitions.} For a
756 detailed description of how to set up new families with the
757 \verb+\new@fontshape+ command, see \cite{basic} about the basic
758 macros or one of the example files.
761 \subsection{Running Ini\TeX}
763 When setting up a new format one has to start Ini\TeX{} with
764 {\tt lplain.tex} as the input file. After displaying some progress
766 on the terminal, {\tt lplain.tex} will try to \verb+\input+ the files
767 {\tt hyphen.tex} and {\tt lfonts.tex}.
770 it seems a good idea to rename these files because, when \TeX{}
771 complains that it cannot find them and asks you to type in another
772 file name, you get the chance to substitute
773 your favourite hyphenation patterns without changing {\tt lplain.tex}
774 or copying something to {\tt hyphen.tex}.
776 will show the name of the file used which is very useful to debug
777 weird errors (later).
779 When the point is reached where \TeX{} wants to read in {\tt
780 lfonts.tex}, you now have to specify `{\tt lfonts.new}'. This file
781 will \verb+\input+ some other files. After processing them (which
782 will take some time), Ini\TeX{} stops once more since it cannot find
783 the file {\tt xxxlfont.sty}. This is intentional; in this way you
784 may now specify the desired default by entering one of the following
787 \item[{\tt oldlfont.sty}]
788 If you choose this file, your format will be identical to the
789 standard \LaTeX{} version 2.09 except that a few additional
790 commands (like \verb+\normalshape+) are available. Of course,
791 documents or style options which explicitly refer to things like
792 \verb+\tentt+ will produce error messages since such internal
793 commands are no longer defined.\footnote{By the way, such
794 documents were at no time portable since Leslie Lamport stated
795 that it was always permissible to customize {\tt lfonts.tex}
796 according to the local needs. Therefore this is {\em not\/} an
797 incompatible change.} Nevertheless it is easy to fix the
798 problem in such a case: if we know that \verb+\tentt+ referred to
799 {\tt cmtt10}, i.e.\ Computer modern typewriter normal at 10pt,
802 \newcommand{\tentt}{\family{cmtt}
803 \series{m}\shape{n}\size{10}{12pt}
806 Since we assume the `{\tt oldlfont}' option as default, where
807 \verb+\tt+ resets series and shape, the definition could be
810 \newcommand{\tentt}{\size{10}{12pt}\tt}
812 To get the new way of font selection as described in the previous
813 sections (e.g.\ where \verb+\tt+ simply means to switch to another
814 family) you only have to add the `{\tt newlfont}' style option to
815 the \verb+\documentstyle+ command in your document.
817 \item[\tt newlfont.sty]
818 This is just the counterpart to {\tt oldlfont.sty}: it will make
819 the new mechanism the default and you have to add `{\tt oldlfont}'
820 as a style option if you want to process older documents which
821 depend on the old mechanism.
823 \item[\tt basefnt.tex]
824 This file is similar to {\tt newlfont.sty} but does not define the
825 \LaTeX{} symbol fonts. These fonts contain only a few characters
826 which are also included in the AMS symbol fonts. Therefore we
827 provided the possibility of generating a format which doesn't
828 unnecessarily occupy one of the (only) sixteen math groups within
829 one math version. Using this file you can easily switch to the
830 old scheme (adding `{\tt oldlfont}' as an option), to the new
831 scheme with \LaTeX{} symbol fonts (using `{\tt newlfont}') or to
832 the new scheme with additional AMS fonts by using either the
833 style option `{\tt amsfonts}' (fonts only) or the style option
834 `{\tt amstex}' (defining the whole set of \AmSTeX{} macros in a
835 \LaTeX{} like syntax).
837 We suggest using the {\tt basefnt.tex} file since the new font
838 selection scheme will be incorporated into \LaTeX{} version 2.10, but
839 on installations with many users it might be better to switch
840 smoothly to the new font
841 selection scheme by first using `{\tt oldlfont}' as a default.
843 Anyway, after reading the file chosen, \TeX{} will continue by
844 processing {\tt latex.tex} and finally displaying the message ``Input
845 any local modifications here''. If you don't dare to do so, use
846 \verb+\dump+ to finish the run. This will leave you with a new {\tt
847 .fmt} file (to be put into \TeX's format area) and the corresponding
848 transcript file. It isn't a very good idea to delete this one
849 because you might need it later to find out what you did when you
853 \section{Remarks on the development of this interface}
855 We started designing the new font selection scheme
856 around April 1989. A first implementation was
857 available after one month's work and thereafter the
858 prototype version ran successfully for some months at a
859 few sites in Germany and the UK\null. Frank's visit to
860 Stanford as well as our work on the `{\tt amstex}' style
861 option brought new aspects to our view. The result was
862 a more or less complete redefinition of the \LaTeX{}
863 interface for this font mechanism. It was a long way
864 from the first sketch (which was about five pages in
865 Frank's notebook) to the current implementation
867 interface which now consists of nearly 2000 lines of code
868 and about 4000 lines of internal documentation. The
869 \AmSTeX{} project itself, which triggered this
870 reimplemenation, has about the same dimensions. Surely
871 in such a huge software package one will find typos
872 and bugs. But we hope that most of the bugs in the
873 code are found by now. It is planned that the new font selection
874 scheme will replace the old one in \LaTeX{} version 2.10.
875 We therefore hope that this release which runs in version
876 2.09 will help to find all remaining problems so that the switch
877 to the next version of \LaTeX{} will be without discomfort to the user.
879 \section{Acknowledgements}
880 During this project we got help from many people. A big `thank you'
881 to all of them, especially to Michael Downes from the AMS for his
882 cooperation and help, to Stefan Lindner for his help with the
883 Atari \TeX{} and to Sebastian Rahtz for playing a willing
884 guinea-pig. Finally we also want to thank Ron Whitney who did a
885 marvelous job on all our articles so far. This time we posed some
886 extra problems because he had to first make a new format in
887 order to read how to make a new format.
889 \section{List of distributed files}
892 \item[\tt lfonts.new]
893 The new version of {\tt lfonts.tex}, to be copied to a file of
894 this name after the old {\tt lfonts.tex} has been renamed.
895 \item[\tt fontdef.ori]
896 The font definitions for the computer modern fonts in the
898 Donald~E. Knuth. To be copied to {\tt fontdef.tex} if this
899 selection is to be used.
900 \item[\tt fontdef.max]
901 Complete font definitions for the computer modern fonts and the
902 AMSFonts collections. To be copied to {\tt fontdef.tex} if this
903 selection is to be used.
904 \item[\tt preload.ori]
905 Preloads the same fonts as the old {\tt
906 lfonts.tex} does. To be copied
907 to {\tt preload.tex} if this is desired.
908 \item[\tt preload.min]
909 Preloads only the absolute minimum of fonts. To be copied
910 to {\tt preload.tex} if this is desired.
911 \item[\tt newlfont.sty]
912 Selects new version of font selection for \LaTeX.
913 \item[\tt oldlfont.sty]
914 Selects old version of font selection for \LaTeX.
915 \item[\tt basefont.tex]
916 Like {\tt newlfont.sty}, but does not define the \LaTeX{} symbol
918 \item[\tt margid.sty]
920 defines all \meta{math alphabet identifiers} to have one argument.
921 This is the default that is built in into the new font selection
922 scheme. Therefore this style file is only necessary if the
923 installation decided to load `{\tt nomargid.sty}' at dump time.
924 \item[\tt nomargid.sty]
925 In contrast to {\tt margid.sty}, defines all
926 \meta{math alphabet identifiers} to switch to the
927 alphabet. This style option is necessary if you want to be
928 compatible to the old \LaTeX{} syntax {\em in math mode only}.
929 \item[\tt tracefnt.sty]
930 Style file that allows the tracing of font usage.
931 Use \verb=\tracingfonts= with values 1 to 3 and watch
933 \item[\tt syntonly.sty]
934 Defines the \verb+\syntaxonly+ declaration. This can be used
935 in the preamble of a document to suppress all output.
936 \item[\tt amsfonts.sty]
937 Defines the commands to select symbols from the AMSFonts
939 \item[\tt amsbsy.sty]
940 Defines the \verb+\boldsymbol+ command.
941 \item[\tt amssymb.sty]
942 Defines additional \AmSTeX{} symbols.
943 \item[\tt amstex.sty]
944 Defines special \AmSTeX{} structures (like alignments in math mode)
945 with \LaTeX{} syntax.
946 \item[\tt amstext.sty]
947 Defines the \AmSTeX{} \verb+\text+ command.
948 \item[\tt euscript.sty]
949 Contains the definitions to use the Euler script fonts.
952 \begin{thebibliography}{9}
954 \bibitem{Williamson} Hugh Williamson,
955 {\sl Methods of Book Design},\newblock
956 Yale University Press,
957 New Haven, London,\newblock
960 \bibitem{IBM} International Business Machines Corporation,\newblock
961 Font Object Content Architecture Reference,\newblock
962 First Edition, December 1988.
964 \bibitem{art:euler} Donald~E. Knuth, ``Typesetting {\sl Concrete
965 Mathematics},'' \tubissue{10}{1}, 1989, pp.~31--36.
967 \bibitem{ConcreteMath} Ronald~L. Graham. Donald~E. Knuth, and
968 Oren Patashnik, {\sl Concrete Mathematics}. Addison-Wesley, 1989.
970 \bibitem{basic} Frank Mittelbach and Rainer Sch\"opf,
971 ``A New Font Selection Scheme for \TeX{} Macro Packages,''
972 \tubissue{10}{2}, 1989, pp.~222--238.
974 \end{thebibliography}