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