% This file is part of the NFSS (New Font Selection Scheme) package. % ------------------------------------------------------------------ %% %% This file contains more or less the original article. Look into the %% README.MZ3 file for information on how to process it successfully. %% % % tb27fontselect.latex \ifx\selectfont\undefined\else \let\ixpt\relax \let\viiipt\relax \fi \ifx\selectfont\undefined \documentstyle[array% ,ltugboat% Comment out this line and scroll errors if you % don't have the ltugboat option. ]{article} \else \documentstyle[array% % ,concrete% Uncomment this line if you have the euler fonts. ,ltugboat% Comment out this line and scroll errors if you ,newlfont% don't have the ltugboat option. ]{article} \fi \setcounter {page}{297} \addtolength{\textheight}{1pc} %%%% for ltugbot.sty: \ifx\selectfont\undefined\else \def\tensl{\fontfamily{cmr}\fontseries{m}\fontshape{sl}% \fontsize{10}{12pt}\selectfont} \def\tubfont{\shape{sl}\selectfont} \fi \def\tubissue#1#2{\TUB#1\##2} % specials for this article: % changes in Providence \makeatletter % to remove \leaders from entries of the TOC \def\@dotsep{-20} \def\@dottedtocline#1#2#3#4#5{\ifnum #1>\c@tocdepth \else \vskip \z@ plus .2pt {\leftskip #2\relax \rightskip \@tocrmarg \parfillskip -\rightskip \parindent #2\relax\@afterindenttrue \interlinepenalty\@M \leavevmode \@tempdima #3\relax \advance\leftskip \@tempdima \hbox{}\hskip -\leftskip #4\nobreak\leaders\hbox{$\m@th \mkern \@dotsep mu.\mkern \@dotsep mu$}\hfill \nobreak %\hbox to\@pnumwidth{\hfil\rm #5} \hbox{}\par}\fi} % to make section entries \raggedright in the toc \def\l@section#1#2{\addpenalty{\@secpenalty} \addvspace{1.0em plus 1pt} \@tempdima 1.5em \begingroup \parindent \z@ \rightskip 0pt plus 1000pt \parfillskip -\rightskip \nohyphens \bf \leavevmode \advance\leftskip\@tempdima \hskip -\leftskip #1\nobreak\hfil \nobreak\hbox to\@pnumwidth{\hss #2}\par \endgroup} \def\@makefnmark{\raise 1ex\hbox{\scriptsize\@thefnmark}} %FMi you found a bug in the new font selection %FMi I changed the leading below to overcome the problem %FMi for the moment. Your solution above doesn't work in all %FMi circumstances. \def\footnotesize{\@setsize\footnotesize{12pt}\xpt\@xpt \abovedisplayskip=3pt plus 3pt minus 1pt \belowdisplayskip=\abovedisplayskip \abovedisplayshortskip=\z@ plus3pt \belowdisplayshortskip=1pt plus3pt minus1pt} \makeatother % alphabets in this article: \ifx\selectfont\undefined \let\sfmath\sf \let\sfslmath\sf \def\mathversion#1{} \else \newmathalphabet\sfmath \newmathalphabet*\sfslmath{cmss}{m}{sl} \addtoversion{normal}\sfmath{cmss}{m}{n} \addtoversion{bold}\sfmath{cmss}{bx}{n} \fi % reset all mathcodes for the special examples in normal version: \def\resetmathcodes{% \mathcode`\0="7030 \mathcode`\1="7031 \mathcode`\2="7032 \mathcode`\3="7033 \mathcode`\4="7034 \mathcode`\5="7035 \mathcode`\6="7036 \mathcode`\7="7037 \mathcode`\8="7038 \mathcode`\9="7039 \mathchardef\sum="1350 } \ifx\selectfont\undefined\else % use bold medium series from cmss for headings: \def\bf{\fontfamily{cmss}\fontseries{bx}\selectfont} \fi \def\meta#1{$\langle${\it#1\/$\rangle$}} % just for the moment \def\Metafont{{\sf METAFONT}} \chardef\bslash=`\\ % missing text in quotations \def\missing{[\ldots]\ } \widowpenalty 1000 \clubpenalty 1000 % \pretitleremarks{\rm\noindent\EdNote We regret to say that a large piece % of Frank and Rainer's article below was inadvertently deleted from % the file used to publish the article in \tubissue {11}{1}. % Under the section-numbering presented here, the previously missing % portion extends from the end of section~1 to subsection~3.2. % We feel it is best to reprint the article entirely, and apologize for % any confusion or misunderstanding this has caused our readership.} \title{{\it Reprint {\rm(}with corrections\/{\rm):}}\\ The New Font Family Selection\Dash \\ User Interface to Standard \LaTeX} \author{Frank Mittelbach \and Rainer Sch\"opf}% \begin{document} % If you do have the concrete fonts comment out the next line % of code and remove the comment on the line following. \ifx\selectfont\undefined\else \fontfamily{cmss}\fontsize{10}{13pt}\selectfont % \fontfamily{ccr}\fontsize{10}{13pt}\selectfont \fi \maketitle \tableofcontents \begin{abstract} In this article we describe the use of the new font selection scheme in the standard \LaTeX{} environment. The main characteristics are: \begin{itemize} \item The possibility to change family, series, shape and sizes independently of one another. \item The existence of a style file to process older documents without any changes to their layout and their input files. \item A macro setup which is consistent with existing standard document styles.\footnote{However, small changes in the document styles would make font changes a bit faster.} \end{itemize} %FMi It is planned to incorporate this font selection scheme into \LaTeX{} version 2.10. \end{abstract} \section{General remarks} In \tubissue{10}{2} we presented a new scheme to select fonts in \TeX{} macro packages. This article describes the use of this new scheme in the \LaTeX{} environment. The technical parts of the interface (which are of some interest to readers who plan to use our scheme with other fonts or with other macro packages) will be published in a separate article. The necessary macros are distributed by the AMS together with the {\tt amstex.sty} option which was announced in \tubissue{10}{3}. %FMi %RmS The availability of the new font selection scheme at the usual servers will be announced separately in \TeX{}hax, etc. Please refrain from asking for personal distribution. To get a better understanding of this \LaTeX{} interface, some words on the organisation of font families are in order. Readers of our article about the basic macros will notice that our understanding of these matters increased while working on this interface and the {\tt amstex.sty} project; in some regards we have changed our point of view rather drastically. Surprisingly, only a few internal details within the basic macros needed adjustment; it seems that even without the real understanding, we instinctively got most of the things right when we designed them. (But probably we are still ignorant of the underlying concepts.) In his book about ``Methods of Book Design'' Hugh Williamson writes \cite{Williamson} \begin{quote} \missing To the printer, an alphabet is a set of twenty-six letters of a certain design and body, together with a few additional combinations of letters. A {\em fount\/} is usually made up of a set of alphabets of one size and based on one design. It may consist of one alphabet only, if no more alphabets exist in that design and size. Usually however a text fount will comprise five alphabets --- roman and italic upper and lower-case, and small capitals. \missing A {\em series\/} is a set of founts closely related to each other in design, and usually very similar to each other, but graded in size. If only one alphabet has been made in a certain design, that alphabet alone may be a series. A {\em family\/} is a group of series compatible for composition, but loosely related in design. A family may include excerpts from more than one series. \end{quote} Since \TeX{}'s physical fonts (which is the American word for fount) all contain exactly two alphabets, namely the upper and lower-case alphabets of a certain design, we will use the word font for physical \TeX{} fonts, and fount for bundles of \TeX{} fonts consisting for example of roman (upright or normal), italic and small capitals shapes. The above quotation gives a good clue how to organize fonts in our font selection scheme. Hence we use the \verb+\shape+ command from the basic macros to distinguish between normal (n), italic (it), small caps (sc), sloped or slanted (sl) and upright italic (u) typefaces within one fount. Founts of different sizes form a series, so we use \verb+\size+ to access these. We think that the weight and the width of a series are good candidates to distinguish between individual series, therefore we combine them in the \verb+\series+ command. Again we use one and two letter abbreviations as shown in table~\ref{tab:series}. One or more of these series form a family which is accessed via the \verb+\family+ command. \begin{table*} \begin{center} \begin{tabular}{ll} \multicolumn{2}{c}{Weight Class} \\[2pt] Ultralight & ul \\ Extralight & el \\ Light & l \\ Semilight & sl \\ Medium (normal)& m \\ Semibold & sb \\ Bold & b \\ Extrabold & eb \\ Ultrabold & ub \\ \end{tabular} \hfil \begin{tabular}{lll} \multicolumn{3}{c}{Width Class} \\[2pt] Ultracondensed & 50\% & uc \\ Extracondensed & 62.5\% & ec \\ Condensed & 75\% & c \\ Semicondensed & 87.5\% & sc \\ Medium & 100\% & m \\ Semiexpanded & 112.5\% & sx \\ Expanded & 125\% & x \\ Extraexpanded & 150\% & ex \\ Ultraexpanded & 200\% & ux \end{tabular} \end{center} \caption{Weight and width classification for fonts. The percent values are derived from \protect\cite{IBM}. To combine the abbreviations in the {\tt\bslash series} command, weight is used first and any instance of medium ({\tt m}) is dropped except when weight and width are both medium. In this case one single {\tt m} is used. So bold expanded would be {\tt bx} whereas medium expanded would be {\tt x}.} \label{tab:series} \end{table*} To give some practical example, we arranged the most important families of the Computer Modern fonts according to this classification in table~\ref{tab:fonts}. Please note that some families like `computer modern funny roman' ({\tt cmff}) or `computer modern sans serif quotation' ({\tt cmssq}) are unclassified. These special purpose fonts are not accessible in the standard distribution of the new font selection scheme, although they could be added easily in a style file. \begin{table*} \begin{center} \setlength\extrarowheight{3pt} \begin{tabular}{|l|l|l|>{\tt}l|} \multicolumn{4}{c}{\bf Computer Modern families } \\[15pt] \hline \multicolumn{1}{|c|}{\bf family} & \multicolumn{1}{c|}{\bf series} & \multicolumn{1}{c|}{\bf shape(s)} & \multicolumn{1}{c|}{\bf Example of external names}\\[1pt] \hline \noalign{\vskip 2pt} \hline \multicolumn{4}{|c|}{\it Computer modern roman} \\[1pt] \hline cmr & m & n, it, sl, sc, u & cmr10, cmti10, cmsl10, cmcsc10, cmu10 \\ cmr & bx & n, it, sl & cmbx10, cmbxti, cmbxsl \\ cmr & b & n & cmb10 \\[1pt] \hline \hline \multicolumn{4}{|c|}{\it Computer modern sans serif} \\[1pt] \hline cmss & m & n, sl & cmss10, cmssi10 \\ cmss & bx & n & cmssbx10 \\ cmss & sbc & n & cmssdc10 \\[1pt] \hline \hline \multicolumn{4}{|c|}{\it Computer modern typewriter} \\[1pt] \hline cmtt & m & n, it, sl, sc & cmtt10, cmitt10, cmsltt, cmtcsc10 \\[1pt] \hline \hline \multicolumn{4}{|c|}{\it Computer modern fibonacci} \\[1pt] \hline cmfi & m & n & cmfib8 \\ \hline \end{tabular} \end{center} \caption{Classification of the Computer modern fonts. You will notice that not all possible combinations of family, series and shape are available. E.g.\ there is no small capitals shape in the medium series of the computer modern sans serif. However, Philip Taylor announced recently that he has filled some of the holes. It might be a good idea to include such additional parameter files for \MF{} into the general distributions.} \label{tab:fonts} \end{table*} Given this overview about the classification of fonts it should be clear how to select a specific font with the primitive commands \verb+\family+, \verb+\series+, \verb+\shape+, \verb+\size+, and \verb+\selectfont+. As described in \cite{basic}, the {\tt\bslash size} macro takes two arguments: the size in printer's points as a numeral (i.e.~without the dimension) and the corresponding {\tt\bslash baselineskip} value (with a dimension). {\tt\bslash selectfont} finally selects the font using values of the surrounding environment if some of the commands are missing. For example statements like ``Concrete roman condensed slanted font at 9pt with 11pt leading''\footnote{This is pronounced ``ledding'' and measures the distance between the baselines of succeeding lines. To \TeX{} users it is known as {\tt\bslash baselineskip}.} will be translated into command sequences of the form: \begin{verbatim} \family{ccr}\series{c}\shape{sl}% \size{9}{11pt}\selectfont \end{verbatim} This will explicitly load the font mentioned above, provided the necessary font shapes are known to the system.\footnote{Among the AMS distribution an example style option `{\tt concrete.sty}' is provided which makes the Concrete roman as well as the Euler math fonts available. These fonts were used to typeset~\cite{ConcreteMath} %FMi and this article.} However, in the normal case, the \LaTeX{} user can safely rely on the standard \LaTeX{} font selection commands defined in terms of these primitive commands. These standard commands are discussed in the next sections. \section{Choosing a new text font} In standard \LaTeX{}, different fonts (of the same size) are selected by commands like \verb+\rm+, \verb+\bf+, \verb+\it+, etc. These commands, however, select a specific font regardless of surrounding conditions. E.g., if you write \verb+\sf\bf+ you don't get the `bold extended' {\em series\/} of the `sans serif' {\em family\/} (i.e.\ {\tt cmssbx}), instead you get the `bold extended' {\em series\/} of the `roman' {\em family\/} (i.e.\ {\tt cmbx}). In our implementation this will be different. Commands like \verb+\bf+ (or \verb+\sf+) are now implemented to switch to the wanted {\em series\/} (or {\em family}, respectively), but to leave the other font characteristics untouched. However, this concept has one drawback in the current \LaTeX{} version: commands like \verb+\footnote+ might switch to a smaller size but will inherit other characteristics for the font to use from the environment where they are used. E.g., a footnote appearing in the scope of a theorem environment will erroneously be typeset in italic shape. This problem will vanish in \LaTeX{} version 2.10. Until then all font characteristics in such special circumstances must be reset by hand using the commands given below. However, this is not necessary if one uses the `{\tt oldlfont}' style option described in sections~\ref{sec:oldlfont} and~\ref{sec:formats}. This option defines the font selection commands to behave in the same way as they do now in \LaTeX{} 2.09. \subsection{Choosing a new {\em family}} To switch to another {\em family\/} one may use \verb+\rm+, \verb+\sf+ or \verb+\tt+ denoting the `cmroman', `cmsansserif' or `cmtypewriter' {\em family}, respectively. The new font is selected without changing the current {\em series}, {\em shape}, and {\em size}. E.g., if the current font is {\tt cmbx10} (that is {\em family\/} `computer modern roman', {\em series\/} `bold extended', {\em shape\/} `normal', and {\em size\/} `10pt') then \verb+\sf+ will change to {\tt cmssbx10} (that is {\em family\/} `computer modern sansserif', {\em series\/} `bold extended', {\em shape\/} `normal', and {\em size\/} `10pt'). Using, e.g., \verb+\tt+ afterward will produce a warning and switch to {\tt cmtt10} because the `computer modern typewriter' {\em family\/} does not contain a `bold extended' {\em series}; therefore the default (`medium') {\em series\/} is tried. \subsection{Choosing a new {\em series}} To switch between `medium' and `bold extended' {\em series\/} the commands \verb+\mediumseries+ and \verb+\bf+ are provided. \subsection{Choosing a new {\em shape}} Analogously the commands \verb+\sl+, \verb+\it+, and \verb+\sc+ are used to switch to the {\em shapes\/} `sloped', `italic' and `smallcaps', this time leaving {\em family}, {\em series}, and {\em size\/} alone. In addition, we introduce the \verb+\normalshape+ command, in case one wants to switch back to the `normal' {\em shape}. If font changes are done only inside of groups this command is necessary only to reset a shape in a footnote or a similar context to avoid the problem mentioned above. \subsection{Choosing a new {\em size}} To change to another {\em size\/} the standard \LaTeX{} commands \begin{center} \begin{tabular}{lll} \verb+\tiny+ & \verb+\scriptsize+ & \verb+\footnotesize+ \\ \verb+\small+ & \verb+\normalsize+ & \verb+\large+ \\ \verb+\Large+ & \verb+\LARGE+ & \verb+\huge+ and \verb+\Huge+ \end{tabular} \end{center} may be used. These commands also set the parameter \verb+\baselineskip+ and the \verb+\strutbox+ as well as the script and scriptscript {\em sizes\/} for the new text {\em size}. But once again they will not change other font characteristics. So, for example, it doesn't matter whether one writes \verb+\large\tt+ or \verb+\tt\large+, the same font will be selected. \subsection{Doing it by hand} As mentioned before, primitive font selection commands like \verb+\family+, \verb+\series+, \verb+\shape+, \verb+\size+, and \verb+\selectfont+ are also available to carry out the change. E.g., \begin{verbatim} \shape{n}\family{cmss}\selectfont \end{verbatim} %FMi removed space before \end{verbatim} will switch to the `cmsansserif' family with `normal' shape.\footnote{For full details of the usage of these primitive commands see the article about the basic macros~\cite{basic}.} This article was set in concrete roman type by simply writing \verb+\family{ccr}+\verb+\selectfont+ % rfw removed word for less spacey break %immediately following the \verb+\begin{document}+ %FMi command.\footnote{Actually we also said {\tt\bslash size\string{10\string}\string{13pt\string}} to establish a larger {\tt\bslash baselineskip}.} Of course, the \verb+\documentstyle+ command also specifies a style option (`{\tt concrete}') which sets up the internal tables for these fonts. \subsection{Changing the meaning of {\tt \protect\bslash rm}, {\tt \protect\bslash sf} etc.} To make it easy to typeset documents with other font families (like Times Roman, Optima etc.) we maintain seven additional macros \begin{verbatim} \rmdefault \sfdefault \ttdefault \bfdefault \itdefault \scdefault \sldefault \end{verbatim} %FMi removed space before \end{verbatim} %FMi also removed space before first line(produced break) BUG! denoting the family chosen by \verb=\rm=, \verb=\sf=, \verb=\tt= or the series chosen by \verb=\bf= or the shape for \verb=\it=, \verb=\sc= and \verb=\sl=, respectively.\footnote{This was suggested by Sebastian Rahtz who was one of the first users of our prototype version.} If, for example, a document should be typeset in sans serif one could add in the preamble (between \verb=\documentstyle= and \verb=\begin{document}=) the following redefinitions: \begin{verbatim} \renewcommand{\rmdefault}{cmss} \renewcommand{\itdefault}{sl} \end{verbatim} The first line means that whenever \verb=\rm= is called the family {\tt cmss} (i.e.\ computer modern sans serif) is chosen and the second line redefines \verb=\it= to switch to the slanted shape since this family hasn't got an {\it italic} shape. Another possible use is to say \begin{verbatim} \renewcommand{\bfdefault}{b} \end{verbatim} This will redefine \verb=\bf= to select the bold instead of the bold extended series which is the current default. However these commands are probably ignored by document styles for journals which decide to use their own font families in the final print. \section{Fonts for Math} The selection of a specific typeface in a math formula should not depend on the surrounding environment. Characters in math normally denote special things which should stay fixed even if the surrounding text is set in another {\em shape\/} or {\em series}. Therefore the strategy for selecting math fonts is somewhat different. \subsection{Simple formulas} Normal letters and standard symbols are typeset simply by using the letters directly or using a command that denotes the wanted symbol. So \verb+$\sum A_{i}$+ will produce $\sum A_{i}$. The typeface chosen will depend on the current \meta{math version}. You can switch between \meta{math versions} outside of math mode,\footnote{This is done with the command\hfil\break {\tt\bslash mathversion\string{}\meta{version name}{\tt\string}}.} thereby changing the overall layout of the following formulas. % \LaTeX{} knows about two versions called `normal' and `bold'. As the % name indicates, \verb+\mathversion{normal}+ is the default. In contrast, % the bold version will produce bolder letters and symbols. This might % be suitable in certain situations, but recall that changing the % version means changing the appearance (and perhaps the meaning) % of the whole formula. % For historical reasons \LaTeX{} maintains two abbreviations to switch % to its math versions: \verb+\boldmath+ and \verb+\unboldmath+. % % Other versions could be provided in special style options. For % example the `{\tt concrete}' option mentioned before sets up % a version called `euler' to typeset formulas in the same way as it % was done in~\cite{ConcreteMath}. % \LaTeX{} knows about two versions called `normal' and `bold'. As the name indicates, \verb+\mathversion{normal}+ is the default. In contrast, the bold version will produce bolder letters and symbols. This might be suitable in certain situations like headings, but recall that changing the version means changing the appearance (and perhaps the meaning) of the whole formula. If you want to bolden only some symbols or characters within one formula you should not change the \verb=\mathversion=. Instead you should define a special math alphabet for characters (see below) and/or use the command \verb=\boldsymbol= which is provided by the document style option {\tt amsbsy}. For historical reasons \LaTeX{} maintains two abbrivations to switch to its math versions: \verb+\boldmath+ and \verb+\unboldmath+. Other versions could be provided in special style options. For example the `{\tt concrete}' option mentioned before sets up a version called `euler' to typeset formulas in the same way as it was done in~\cite{ConcreteMath}. \subsection{Special math alphabets} But simple formulas with one alphabet and a huge number of symbols are not sufficient for mathematicians to expose their thoughts properly. They tend to use every available typeface to denote special things. To cope with this need for special alphabets in formulas,' we introduce the concept of \meta{math alphabet identifiers}. These constructs are special commands which switch to a specific typeface. They might correspond to different typefaces in different math versions but within one version they always select the same typeface regardless of surrounding conditions. A \meta{math alphabet identifier} can be defined according to the users' needs but standard \LaTeX{} already has a few of them built in. They are described in table~\ref{tab:math-id}. \begin{table*} \leftskip25pt \rightskip\leftskip \LaTeX{} knows about three \meta{math alphabet identifier}s. \verb=\cal= will select calligraphic letters like $\cal A \cal B \cal C \cal D$, \verb=\mathrm= will select upright roman letters for use in functions like $\max_i$, and finally \verb=\mit= selects the default math italic alphabet. \caption{Predefined \meta{math alphabet identifiers} in \LaTeX} \label{tab:math-id} \end{table*} When using such an \meta{alphabet identifier} two syntax variants are available: one can understand a command like \verb+\cal+ as a switch to a different font, i.e.\ using a syntax \verb+{\cal ...}+ as the old \LaTeX{} does, but we prefer to view the \meta{math alphabet identifier} as a command with one argument, i.e.\ to use a syntax of the form \verb+..\cal{A}..+ To select the first alternative a style option `{\tt nomargid}' is provided. This option is automatically selected if the `{\tt oldlfont}' option is used since this option is supposed to produce identical results for older documents. New \meta{math alphabet identifiers} are defined in two steps. First the identifier is made known to the system with the \verb+\newmathalphabet+ command. Then specific typefaces in some or all \meta{math versions} are assigned by means of the \verb+\addtoversion+ command. Let us discuss this process in detail. Suppose that you want to make a sans serif typeface available as a math alphabet. First we choose a new command name (e.g.\ \verb+\sfmath+) and tell \LaTeX{} about it with the line \begin{verbatim} \newmathalphabet{\sfmath} \end{verbatim} %FMi braces added around arguments Then we consult table~\ref{tab:fonts} to find suitable fonts to assign to this alphabet identifier. As you find out, the computer modern sans serif family consists of three series, a medium, semi bold condensed and a bold extended one. The medium and the bold extended series both contain a normal shape typeface. So we add the line: \begin{verbatim} \addtoversion{normal}{\sfmath}{cmss}{m}{n} \addtoversion{bold}{\sfmath}{cmss}{bx}{n} \end{verbatim} %FMi braces added around arguments Now our alphabet identifier is ready for use in these two versions. We demonstrate this with the formula {\mathversion{normal} \resetmathcodes \[ \sum \sfmath{A}_{i} = \tan \alpha \]}% which was produced by \begin{verbatim} \mathversion{normal} \[ \sum \sfmath{A}_{i} = \tan \alpha \] \end{verbatim} Note that we first switched back to the normal version. This was necessary since this article is typeset with a third version (Euler) in force. If we had tried to use \verb+\sfmath+ in this version we would have gotten an error message stating that this \meta{math alphabet identifier} isn't defined for the Euler version.\footnote{Actually we cheated a bit more in this article: we had to reset the {\tt\bslash mathcode} of certain characters because they are in different places in the Euler version. A few more details can be found in Don Knuth's article~\protect\cite{art:euler}. However, this is not a real problem because such changes can be done in commands similar to {\tt\bslash boldmath} if such incompatible versions are to coexist in real applications.} If we are interested in a slanted shape we have to face a problem: there is no slanted shape in the bold extended series of the Computer Modern sans serif family. So, if we make the identifier known only in the normal version then it would produce an error message when encountered in the bold (or any other) version. Of course we can get by %FMi I don't know english but shouldn't it be this way around? using always the same typeface in all versions. To make this task a bit easier there is also a \verb+*+ variant of the \verb+\newmathalphabet+ command which takes three more arguments: the default values for family, series and shape for all math versions in which the alphabet identifier is not explicitly defined via an \verb+\addtoversion+ command. So our second example can be set up simply by stating \begin{verbatim} \newmathalphabet*{\sfslmath}{cmss}{m}{sl} \end{verbatim} This would have the additional advantage that this math alphabet identifier is also allowed in math versions which are defined in style files or document styles (like the Euler version mentioned earlier). Any explicit \verb+\addtoversion+ command overwrites the defaults given by \verb+\newmathalphabet*+; so, it might be a good idea always to specify default values. Here we show the same formula as above, but this time in the Euler version and with \verb+\sfslmath+ instead of \verb+\sfmath+: \[ \sum \sfslmath{A}_{i} = \tan \alpha \] \section{Processing older documents} \label{sec:oldlfont} To typeset documents which are written with the old \LaTeX{} (i.e.\ with a format using the old font selection scheme) only the source line containing the \verb+\documentstyle+ command has to be changed. More exactly the `oldlfont' option must be added to the list of document style options if the new font selection scheme is in force.\footnote{This means that it is the default (see next section).} \section{Setting up a new format} \label{sec:formats} This section is written for people called `local wizards' by the \LaTeX{} manual, which simply refers to the (poor) guys who are always being pestered if things do not work.\footnote{YOU might belong to this group!} If you are using \LaTeX{} on your own PC you might have to read this section, too, even if you don't feel like being a wizard. \subsection{Preparations} Before generating a new format it is necessary to rename a few files. This enables you to customize the format to the special needs of your site. \begin{description} \item [\tt lfonts.tex] First of all you should rename the file {\tt lfonts.tex} (supplied with the standard distribution of \LaTeX{}); otherwise you will always end up with an old format. Call it, say, {\tt lfonts.ori}. \item [\tt hyphen.tex] Another file which should probably be renamed is {\tt hyphen.tex} (the original American \verb+\pattern+$\,$s from Don Knuth) because this enables you to insert your favourite \verb+\pattern+ package when Ini\TeX{} is asking for this file. This might even be useful if you use \TeX{} version 3.0 which is multilingual (assuming that your computer has only a limited memory). \end{description} \subsubsection{Preloading Fonts} Now you have to decide which fonts to preload in your format. Unlike the old font selection scheme of \LaTeX{}, where only preloaded fonts could be used in math applications (like subscripts etc.), the new font selection scheme poses no restriction at all; documents will always come out the same.\TBremark{Not sure what this means.} So you have to take your pick by weighing the two conflicting principles: \begin{itemize} \item Preloading often used fonts might make your \TeX{} run a bit faster. \item Using more load-on-demand fonts will make your format much more flexible, because you can switch to different families far more easily. After all, there is an upper limit to the number of fonts \TeX{} can use in one run and every preloaded font will count even if it is never accessed. \end{itemize} On the PC at home we nowadays always use formats with only 5 fonts preloaded.\footnote{This is the absolute minimum. These fonts are accessed by {\tt lplain.tex} and {\tt latex.tex} when the format is generated.} We don't think that \TeX{} is actually running much more slowly than before. Together with the new font selection scheme two files {\tt preload.min} and {\tt preload.ori} are distributed. The first one will preload next to nothing while the second will preload the same fonts as the old {\tt lfonts.tex}. You can copy either of these files to {\tt preload.tex} and then change it if you want to preload some other fonts. But please make sure that you don't change one of the original files of the distribution. \subsubsection{Making more fonts available} Besides deciding which fonts to preload, you also have to tell the \TeX{} sytem which external fonts are available and how they are organized in families, series, shapes and sizes. In short you have to set up internal tables giving informations like ``family {\tt cmr}, series {\tt b}, shape {\tt n}, size {\tt 10} is associated with the external font {\tt cmb10} but there is no font with similar characteristics in size {\tt 9}''. This is done with the \verb+\new@fontshape+ command, either in a style file (see `{\tt concrete.sty}' as an example) or when dumping a format. Again two files {\tt fontdef.ori} and {\tt fontdef.max} are distributed. You can copy one of them to {\tt fontdef.tex}. The file {\tt fontdef.ori} defines all fonts which are necessary to run standard \LaTeX{} documents while {\tt fontdef.max} also defines certain fonts from the AMSFonts collection. To make other font families available you can either append appropriate \verb+\new@fontshape+ definitions to {\tt fontdef.tex} (again, leave the originals untouched!) or add them in a style file.\footnote{The latter alternative might be better if you use these fonts very rarely (e.g., at sites with many users) to avoid filling \TeX{}'s memory with unnecessary definitions.} For a detailed description of how to set up new families with the \verb+\new@fontshape+ command, see \cite{basic} about the basic macros or one of the example files. \subsection{Running Ini\TeX} %FMi changed to subsection (typo) When setting up a new format one has to start Ini\TeX{} with {\tt lplain.tex} as the input file. After displaying some progress report on the terminal, {\tt lplain.tex} will try to \verb+\input+ the files {\tt hyphen.tex} and {\tt lfonts.tex}. As we said above, it seems a good idea to rename these files because, when \TeX{} complains that it cannot find them and asks you to type in another file name, you get the chance to substitute your favourite hyphenation patterns without changing {\tt lplain.tex} or copying something to {\tt hyphen.tex}. The transcript file will show the name of the file used which is very useful to debug weird errors (later). When the point is reached where \TeX{} wants to read in {\tt lfonts.tex}, you now have to specify `{\tt lfonts.new}'. This file will \verb+\input+ some other files. After processing them (which will take some time), Ini\TeX{} stops once more since it cannot find the file {\tt xxxlfont.sty}. This is intentional; in this way you may now specify the desired default by entering one of the following file names: \begin{description} \item[{\tt oldlfont.sty}] If you choose this file, your format will be identical to the standard \LaTeX{} version 2.09 except that a few additional commands (like \verb+\normalshape+) are available. Of course, documents or style options which explicitly refer to things like \verb+\tentt+ will produce error messages since such internal commands are no longer defined.\footnote{By the way, such documents were at no time portable since Leslie Lamport stated that it was always permissible to customize {\tt lfonts.tex} according to the local needs. Therefore this is {\em not\/} an incompatible change.} Nevertheless it is easy to fix the problem in such a case: if we know that \verb+\tentt+ referred to {\tt cmtt10}, i.e.\ Computer modern typewriter normal at 10pt, we can define it as \begin{verbatim} \newcommand{\tentt}{\family{cmtt} \series{m}\shape{n}\size{10}{12pt} \selectfont} \end{verbatim} Since we assume the `{\tt oldlfont}' option as default, where \verb+\tt+ resets series and shape, the definition could be shortened to \begin{verbatim} \newcommand{\tentt}{\size{10}{12pt}\tt} \end{verbatim} To get the new way of font selection as described in the previous sections (e.g.\ where \verb+\tt+ simply means to switch to another family) you only have to add the `{\tt newlfont}' style option to the \verb+\documentstyle+ command in your document. \item[\tt newlfont.sty] This is just the counterpart to {\tt oldlfont.sty}: it will make the new mechanism the default and you have to add `{\tt oldlfont}' as a style option if you want to process older documents which depend on the old mechanism. \item[\tt basefnt.tex] This file is similar to {\tt newlfont.sty} but does not define the \LaTeX{} symbol fonts. These fonts contain only a few characters which are also included in the AMS symbol fonts. Therefore we provided the possibility of generating a format which doesn't unnecessarily occupy one of the (only) sixteen math groups within one math version. Using this file you can easily switch to the old scheme (adding `{\tt oldlfont}' as an option), to the new scheme with \LaTeX{} symbol fonts (using `{\tt newlfont}') or to the new scheme with additional AMS fonts by using either the style option `{\tt amsfonts}' (fonts only) or the style option `{\tt amstex}' (defining the whole set of \AmSTeX{} macros in a \LaTeX{} like syntax). \end{description} We suggest using the {\tt basefnt.tex} file since the new font selection scheme will be incorporated into \LaTeX{} version 2.10, but on installations with many users it might be better to switch smoothly to the new font selection scheme by first using `{\tt oldlfont}' as a default. Anyway, after reading the file chosen, \TeX{} will continue by processing {\tt latex.tex} and finally displaying the message ``Input any local modifications here''. If you don't dare to do so, use \verb+\dump+ to finish the run. This will leave you with a new {\tt .fmt} file (to be put into \TeX's format area) and the corresponding transcript file. It isn't a very good idea to delete this one because you might need it later to find out what you did when you dumped the format! \section{Remarks on the development of this interface} We started designing the new font selection scheme around April 1989. A first implementation was available after one month's work and thereafter the prototype version ran successfully for some months at a few sites in Germany and the UK\null. Frank's visit to Stanford as well as our work on the `{\tt amstex}' style option brought new aspects to our view. The result was a more or less complete redefinition of the \LaTeX{} interface for this font mechanism. It was a long way from the first sketch (which was about five pages in Frank's notebook) to the current implementation %FMi missing word? of the interface which now consists of nearly 2000 lines of code and about 4000 lines of internal documentation. The \AmSTeX{} project itself, which triggered this reimplemenation, has about the same dimensions. Surely in such a huge software package one will find typos and bugs. But we hope that most of the bugs in the code are found by now. It is planned that the new font selection scheme will replace the old one in \LaTeX{} version 2.10. We therefore hope that this pre-release which runs in version 2.09 will help to find all remaining problems so that the switch to version 2.10 will be without discomfort to the user. %FMi section added \section{Acknowledgements} %RmS comma added , typo and wording During this project we got help from many people. A big `thank you' to all of them, especially to Michael Downes from the AMS for his cooperation and help, to Stefan Lindner for his help with the Atari \TeX{} and to Sebastian Rahtz for playing a willing guinea-pig. Finally we also want to thank Ron Whitney who did a marvelous job on all our articles so far. This time we posed some extra problems because he had to first make a new format in order to read how to make a new format. \section{List of distributed files} \begin{description} \item[\tt lfonts.new] The new version of {\tt lfonts.tex}, to be copied to a file of this name after the old {\tt lfonts.tex} has been renamed. \item[\tt fontdef.ori] The font definitions for the computer modern fonts in the distribution by Donald~E. Knuth. To be copied to {\tt fontdef.tex} if this selection is to be used. \item[\tt fontdef.max] Complete font definitions for the computer modern fonts and the AMSFonts collections. To be copied to {\tt fontdef.tex} if this selection is to be used. \item[\tt preload.ori] Preloads the same fonts as the old {\tt lfonts.tex} does. To be copied to {\tt preload.tex} if this is desired. \item[\tt preload.min] Preloads only the absolute minimum of fonts. To be copied to {\tt preload.tex} if this is desired. \item[\tt fam.tex] The basic macros for the new font selection scheme. Automatically read by {\tt lfonts.new}. \item[\tt latint.tex] \LaTeX{} interface for the new font selection scheme. Automatically read by {\tt lfonts.new}. \item[\tt setsize.tex] Size definitions for the \LaTeX{} interface. Automatically read by {\tt lfonts.new}. \item[\tt newlfont.sty] Selects new version of font selection for \LaTeX. \item[\tt oldlfont.sty] Selects old version of font selection for \LaTeX. \item[\tt basefnt.tex] Like {\tt newlfont.sty}, but does not define the \LaTeX{} symbol fonts. \item[\tt margid.sty] Style file that defines all \meta{math alphabet identifiers} to have one argument. This is the default that is built in into the new font selection scheme. Therefore this style file is only necessary if the installation decided to load `{\tt nomargid.sty}' at dump time. \item[\tt nomargid.sty] In contrast to {\tt margid.sty}, defines all \meta{math alphabet identifiers} to switch to the alphabet. This style option is necessary if you want to be compatible to the old \LaTeX{} syntax {\em in math mode only}. \item[\tt tracefnt.sty] %FMi Style file that allows the tracing of font usage. Use \verb=\tracingfonts= with values 1 to 3 and watch what happens. \item[\tt syntonly.sty] Defines the \verb+\syntaxonly+ declaration. This can be used in the preamble of a document to suppress all output. \item[\tt amsfonts.sty] Defines the commands to select symbols from the AMSFonts collection. \item[\tt amsbsy.sty] Defines the \verb+\boldsymbol+ command. \item[\tt amssymb.sty] Defines additional \AmSTeX{} symbols. \item[\tt amstex.sty] Defines special \AmSTeX{} structures (like alignments in math mode) with \LaTeX{} syntax. \item[\tt amstext.sty] Defines the \AmSTeX{} \verb+\text+ command. \item[\tt euscript.sty] Contains the definitions to use the Euler script fonts. \end{description} %FMi either place the bibliography at the end or give it a number %FMi What do you think? \begin{thebibliography}{9} \raggedright \bibitem{Williamson} Hugh Williamson, %FMi {\sl Methods of Book Design},\newblock Yale University Press, New Haven, London,\newblock Third Edition, 1985. \bibitem{IBM} International Business Machines Corporation,\newblock Font Object Content Architecture Reference,\newblock First Edition, December 1988. \bibitem{art:euler} Donald~E. Knuth, ``Typesetting {\sl Concrete Mathematics},'' \tubissue{10}{1}, 1989, pp.~31--36. \bibitem{ConcreteMath} Ronald~L. Graham. Donald~E. Knuth, and Oren Patashnik, {\sl Concrete Mathematics}. \AW, 1989. \bibitem{basic} Frank Mittelbach and Rainer Sch\"opf, ``A New Font Selection Scheme for \TeX{} Macro Packages,'' \tubissue{10}{2}, 1989, pp.~222--238. \end{thebibliography} \authornumber=0 \author{Frank Mittelbach} \address{Electronic Data Systems \\ (Deutschland) GmbH\\ Eisenstra\ss e 56 (N15) \\ D-6090 R\"usselsheim \\ Federal Republic of Germany} \author{Rainer Sch\"opf} \address {Institut f\"ur Theoretische Physik der Universit\"at Heidelberg\\ Philosophenweg 16\\ D-6900 Heidelberg\\ Federal Republic of Germany} % \signaturewidth\hsize % SEEMS to be missing in the distributed ltugboat \signature{% \hbox to\hsize{\hskip1pc\vtop{\hsize=0.5\hsize \signaturemark \theauthor{1}\\ \theaddress{1}\\ \thenetaddress{1}\\}% \vtop{\hsize=0.5\hsize \signaturemark \theauthor{2}\\ \theaddress{2}\\ \thenetaddress{2}\\}\hss}} \makesignature \end{document}