[OS X TeX] Re: fonts

Bruno Voisin bvoisin at mac.com
Tue Jun 29 18:22:36 EDT 2004

Dear David,

> Thank you for your effort in "InstallingFontsInLaTeXOSX.htm."

Thanks for thinking of me as a source of advice --- it is especially 
nice to see that this tutorial that I once wrote is getting read and 
used, finally ---, but unfortunately I cannot help: I am getting less 
and less time available for all things TeX, and I am gradually retiring 
from all my TeX-related activities. (I am presently fighting with some 
heavy maths --- asymptotic evaluation of integrals involving special 
functions, by application and extension of Mellin-Barnes integration 
--- and need to get papers out of this quickly.)

I will just say some quick words:

> I have written books for many years in TeX and am only now shifting to 
> LaTeX. I wonder if I might call on you for some advice for fonts in 
> LaTeX. In my original TeX set up, I introduced many additional fonts 
> for math beyond those in Plain TeX using the (quite tedious) coding 
> illustrated in Knuth's TeX Book for the different families, the three 
> sizes TeX requires for math formulae, mathchardefs, etc., etc. Though 
> the set up was a pain, once I did it, the resulting fonts worked fine.

I used to do this before I switched to LaTeX due to the requests of 
scientific journals and books. I still prefer the elegance and 
informality of plain TeX compared with the verbose programming and lack 
of flexibility of LaTeX. Unfortunately plain TeX is showing its age, 
and every time I try to write something in plain TeX I am tempted after 
a couple of hours to go back to LaTeX because I need graphics inclusion 
(provided by the graphics package), hyper-referencing (provided by the 
hyperred package) or sophisticated math alignments (provided by the 
amsmath package) etc.

Below is an example of the preamble for a short document (4 pages) that 
I recently wrote in plain TeX, using (in XeTeX) Trebuchet as the text 
font and Lucida NewMath as the math fonts. You'll see that this is not 
far from what you have been doing. (It's appended at the end of this 
message because of its length.)

> Now that I am shifting to LaTeX I expect to use the NFSS and introduce 
> new fonts using the \newfont and \usefont commands.
> I immediately find \newfont and \usefont are restricted to cmmi fonts 
> in math mode. This means that even if one wants to use other fonts in 
> math mode (such as cmbxs which I prefer for vectors) and sets up such 
> a font (call it bfm) with
> \newcommand{\bfm}{\usefont{OT1}{cmr}{bx}{sl}}
> the command is ignored in math mode. Boxing it for text in math mode  
> using, for example,  \mbox{\bfm x}, secures bfm in math mode, but the 
> automatic switching to script and scriptscript sizes is not enabled.
> I warily see this means I must likely do the equivalent in LaTeX that 
> I did in my TeX set up in establishing the various sizes for math 
> formulae, chardefs. etc, for fonts other than cmmi. Or is there an 
> easier way?
> Have you installed new math fonts in LaTeX and does LaTeX offer any 
> streamlining of the tedious process I followed in TeX? What is your 
> advice?

I don't have any LaTeX manual at hand right now, but as far as I 
remember \newfont is a deprecated command that you shouldn't use in 
LaTeX any longer. You need to go all the way to the heavy artillery of 
\DeclareFontShape etc. for text fonts, and \DeclareMathAlphabet and 
\DeclareSymbolFont etc. for maths fonts, as described in 
/Library/teTeX/share/texmf.tetex/doc/latex/base/fntguide.dvi. For 
example, the LaTeX equivalent of the Trebuchet-related plain TeX 
definitions in the appended preamble is (for XeTeX):

   {<-> "Trebuchet\space MS"}{}
   {<-> "Trebuchet\space MS\space Italic"}{}
   {<-> "Trebuchet\space MS\space Bold"}{}
   {<-> ssub * trebuchet/bx/n}{}
   {<-> "Trebuchet\space MS\space Bold\space Italic"}{}
   {<-> ssub * trebuchet/bx/it}{}

I'm sorry but I cannot go into more detail due to lack of time. In my 
experience the best way to learn about LaTeX's handling of fonts is 
browse through the content of the various .fd files, and also of 
fontmath.ltx and fonttext/ltx, in 
/Library/teTeX/share/texmf.tetex/tex/latex/base, and try to understand 
how they work.

I'm forwarding this message to the OS X TeX list, in case somebody else 
could be more specific than me.

Bon courage !

Bruno Voisin

%%%%%%%%%%  Font-related definitions  %%%%%%%%%%

% Lucida fonts
% ------------

\input lcdplain


% text fonts

\font\sixit=lbi at 6.1pt

\font\sevenbi=lbdi at 6.9pt
\font\sixbi=lbdi at 6.1pt
\font\fivebi=lbdi at 5.2pt

\font\sixtt=lstr at 6.1pt

\font\sixsl=lbsl at 6.1pt

\font\eighteensc=lbrsc at 16.4pt
\font\fourteensc=lbrsc at 12.9pt
\font\twelvesc=lbrsc at 11.2pt
\font\elevensc=lbrsc at 10.4pt
\font\tensc=lbrsc at 9.5pt
\font\ninesc=lbrsc at 8.6pt
\font\eightsc=lbrsc at 7.8pt

% math fonts

\font\nineex=lbme at 8.6pt
\font\eightex=lbme at 7.8pt
\font\sixex=lbme at 6.1pt

\font\ninear=lbma at 8.6pt
\font\eightar=lbma at 7.8pt
\font\sixar=lbma at 6.1pt

\font\eighteenmac=lbr at 16.4pt
\font\fourteenmac=lbr at 12.9pt
\font\twelvemac=lbr at 11.2pt
\font\elevenmac=lbr at 10.4pt
\font\tenmac=lbr at 9.5pt
\font\ninemac=lbr at 8.6pt
\font\eightmac=lbr at 7.8pt
\font\sevenmac=lbr at 6.9pt
\font\sixmac=lbr at 6.1pt
\font\fivemac=lbr at 5.2pt

\font\eighteenmup=lbmr at 16.4pt
\font\fourteenmup=lbmr at 12.9pt
\font\twelvemup=lbmr at 11.2pt
\font\elevenmup=lbmr at 10.4pt
\font\tenmup=lbmr at 9.5pt
\font\ninemup=lbmr at 8.6pt
\font\eightmup=lbmr at 7.8pt
\font\sevenmup=lbmr at 6.9pt
\font\sixmup=lbmr at 6.1pt
\font\fivemup=lbmr at 5.2pt

\font\eighteenmbi=lbmdo at 16.4pt
\font\fourteenmbi=lbmdo at 12.9pt
\font\twelvembi=lbmdo at 11.2pt
\font\elevenmbi=lbmdo at 10.4pt
\font\tenmbi=lbmdo at 9.5pt
\font\ninembi=lbmdo at 8.6pt
\font\eightmbi=lbmdo at 7.8pt
\font\sevenmbi=lbmdo at 6.9pt
\font\sixmbi=lbmdo at 6.1pt
\font\fivembi=lbmdo at 5.2pt

\font\eighteenbsy=lbmsd at 16.4pt
\font\fourteenbsy=lbmsd at 12.9pt
\font\twelvebsy=lbmsd at 11.2pt
\font\elevenbsy=lbmsd at 10.4pt
\font\tenbsy=lbmsd at 9.5pt
\font\ninebsy=lbmsd at 8.6pt
\font\eightbsy=lbmsd at 7.8pt
\font\sevenbsy=lbmsd at 6.9pt
\font\sixbsy=lbmsd at 6.1pt
\font\fivebsy=lbmsd at 5.2pt

\skewchar\eighteenmac=127 \skewchar\fourteenmac=127 
\skewchar\elevenmac=127 \skewchar\tenmac=127 \skewchar\ninemac=127
\skewchar\eightmac=127 \skewchar\sevenmac=127 \skewchar\sixmac=127

\skewchar\eighteenmup=127 \skewchar\fourteenmup=127 
\skewchar\elevenmup=127 \skewchar\tenmup=127 \skewchar\ninemup=127
\skewchar\eightmup=127 \skewchar\sevenmup=127 \skewchar\sixmup=127

\skewchar\eighteenmbi=127 \skewchar\fourteenmbi=127 
\skewchar\elevenmbi=127 \skewchar\tenmbi=127 \skewchar\ninembi=127
\skewchar\eightmbi=127 \skewchar\sevenmbi=127 \skewchar\sixmbi=127

\skewchar\eighteenbsy=48 \skewchar\fourteenbsy=48 \skewchar\twelvebsy=48
\skewchar\elevenbsy=48 \skewchar\tenbsy=48 \skewchar\ninebsy=48
\skewchar\eightbsy=48 \skewchar\sevenbsy=48 \skewchar\sixbsy=48

% families



   \textfont0=\tenrm \scriptfont0=\sevenrm \scriptscriptfont0=\fiverm
   \textfont1=\teni \scriptfont1=\seveni \scriptscriptfont1=\fivei
   \textfont2=\tensy \scriptfont2=\sevensy \scriptscriptfont2=\fivesy
   \textfont3=\tenex \scriptfont3=\sevenex \scriptscriptfont3=\fiveex
   \textfont\arfam=\tenar \scriptfont\arfam=\sevenar
   \textfont\macfam=\tenmac \scriptfont\macfam=\sevenmac
   \textfont\mupfam=\tenmup \scriptfont\mupfam=\sevenmup
   \textfont\mbifam=\tenmbi \scriptfont\mbifam=\sevenmbi
   \textfont\bsyfam=\tenbsy \scriptfont\bsyfam=\sevenbsy
   \textfont\bffam=\tenbf \scriptfont\bffam=\sevenbf
   \tt \ttglue=.5em plus.25em minus.15em
   \setbox\strutbox=\hbox{\vrule height8.5pt depth3.5pt width0pt}%
   \textfont0=\ninerm \scriptfont0=\sixrm \scriptscriptfont0=\fiverm
   \textfont1=\ninei \scriptfont1=\sixi \scriptscriptfont1=\fivei
   \textfont2=\ninesy \scriptfont2=\sixsy \scriptscriptfont2=\fivesy
   \textfont3=\nineex \scriptfont3=\sixex \scriptscriptfont3=\fiveex
   \textfont\arfam=\ninear \scriptfont\arfam=\sixar
   \textfont\mupfam=\ninemup \scriptfont\mupfam=\sixmup
   \textfont\mbifam=\ninembi \scriptfont\mbifam=\sixmbi
   \textfont\bsyfam=\ninebsy \scriptfont\bsyfam=\sixbsy
   \textfont\bffam=\ninebf \scriptfont\bffam=\sixbf
   \tt \ttglue=.5em plus.25em minus.15em
   \setbox\strutbox=\hbox{\vrule height8pt depth3pt width0pt}%
   \textfont0=\eightrm \scriptfont0=\sixrm \scriptscriptfont0=\fiverm
   \textfont1=\eighti \scriptfont1=\sixi \scriptscriptfont1=\fivei
   \textfont2=\eightsy \scriptfont2=\sixsy \scriptscriptfont2=\fivesy
   \textfont3=\eightex \scriptfont3=\sixex \scriptscriptfont3=\fiveex
   \textfont\arfam=\eightar \scriptfont\arfam=\sixar
   \textfont\mupfam=\eightmup \scriptfont\mupfam=\sixmup
   \textfont\mbifam=\eightmbi \scriptfont\mbifam=\sixmbi
   \textfont\bsyfam=\eightbsy \scriptfont\bsyfam=\sixbsy
   \textfont\bffam=\eightbf \scriptfont\bffam=\sixbf
   \tt \ttglue=.5em plus.25em minus.15em
   \setbox\strutbox=\hbox{\vrule height7pt depth2pt width0pt}%
\def\tenbig#1{{\hbox{$\left#1\vbox to8.5pt{}\right.\n at space$}}}
   \left#1\vbox to7.25pt{}\right.\n at space$}}}
   \left#1\vbox to6.5pt{}\right.\n at space$}}}

% text characters


% math characters


\def\hat{\mathaccent"7\themacfam AA }
\def\tilde{\mathaccent"7\themacfam AB }


\mathchardef\upalpha="0\themupfam 0B
\mathchardef\upbeta="0\themupfam 0C
\mathchardef\upgamma="0\themupfam 0D
\mathchardef\updelta="0\themupfam 0E
\mathchardef\upepsilon="0\themupfam 0F
\mathchardef\upzeta="0\themupfam 10
\mathchardef\upeta="0\themupfam 11
\mathchardef\uptheta="0\themupfam 12
\mathchardef\upiota="0\themupfam 13
\mathchardef\upkappa="0\themupfam 14
\mathchardef\uplambda="0\themupfam 15
\mathchardef\upmu="0\themupfam 16
\mathchardef\upnu="0\themupfam 17
\mathchardef\upxi="0\themupfam 18
\mathchardef\uppi="0\themupfam 19
\mathchardef\uprho="0\themupfam 1A
\mathchardef\upsigma="0\themupfam 1B
\mathchardef\uptau="0\themupfam 1C
\mathchardef\upupsilon="0\themupfam 1D
\mathchardef\upphi="0\themupfam 1E
\mathchardef\upchi="0\themupfam 1F
\mathchardef\uppsi="0\themupfam 20
\mathchardef\upomega="0\themupfam 21
\mathchardef\upvarepsilon="0\themupfam 22
\mathchardef\upvartheta="0\themupfam 23
\mathchardef\upvarpi="0\themupfam 24
\mathchardef\upvarrho="0\themupfam 25
\mathchardef\upvarsigma="0\themupfam 26
\mathchardef\upvarphi="0\themupfam 27

\mathchardef\upimath="0\themupfam 7B
\mathchardef\upjmath="0\themupfam 7C
\mathchardef\uppartial="0\themupfam 40


\mathchardef\bnabla="0\thebsyfam 72
\mathchardef\bcdot="2\thebsyfam 01

% ATSUI fonts
% -----------

%\font\tenrm="Hoefler Text" at 10pt
%\font\tenit="Hoefler Text Italic" at 10pt
%\font\tenbf="Hoefler Text Black" at 10pt
%\font\tenbi="Hoefler Text Black Italic" at 10pt

%\font\ninerm="Hoefler Text" at 9pt
%\font\nineit="Hoefler Text Italic" at 9pt
%\font\ninebf="Hoefler Text Black" at 9pt
%\font\ninebi="Hoefler Text Black Italic" at 9pt

%\font\eightrm="Hoefler Text" at 8pt
%\font\eightit="Hoefler Text Italic" at 8pt
%\font\eightbf="Hoefler Text Black" at 8pt
%\font\eightbi="Hoefler Text Black Italic" at 8pt

%\font\sevenrm="Hoefler Text" at 7pt
%\font\sevenit="Hoefler Text Italic" at 7pt
%\font\sevenbf="Hoefler Text Black" at 7pt
%\font\sevenbi="Hoefler Text Black Italic" at 7pt

%\font\sixrm="Hoefler Text" at 6pt
%\font\sixit="Hoefler Text Italic" at 6pt
%\font\sixbf="Hoefler Text Black" at 6pt
%\font\sixbi="Hoefler Text Black Italic" at 6pt

%\font\fiverm="Hoefler Text" at 5pt
%\font\fiveit="Hoefler Text Italic" at 5pt
%\font\fivebf="Hoefler Text Black" at 5pt
%\font\fivebi="Hoefler Text Black Italic" at 5pt

%\font\tenrm="Optima Regular" at 10pt
%\font\tenit="Optima Italic" at 10pt
%\font\tenbf="Optima Bold" at 10pt
%\font\tenbi="Optima Bold Italic" at 10pt

%\font\ninerm="Optima Regular" at 9pt
%\font\nineit="Optima Italic" at 9pt
%\font\ninebf="Optima Bold" at 9pt
%\font\ninebi="Optima Bold Italic" at 9pt

%\font\eightrm="Optima Regular" at 8pt
%\font\eightit="Optima Italic" at 8pt
%\font\eightbf="Optima Bold" at 8pt
%\font\eightbi="Optima Bold Italic" at 8pt

%\font\sevenrm="Optima Regular" at 7pt
%\font\sevenit="Optima Italic" at 7pt
%\font\sevenbf="Optima Bold" at 7pt
%\font\sevenbi="Optima Bold Italic" at 7pt

%\font\sixrm="Optima Regular" at 6pt
%\font\sixit="Optima Italic" at 6pt
%\font\sixbf="Optima Bold" at 6pt
%\font\sixbi="Optima Bold Italic" at 6pt

%\font\fiverm="Optima Regular" at 5pt
%\font\fiveit="Optima Italic" at 5pt
%\font\fivebf="Optima Bold" at 5pt
%\font\fivebi="Optima Bold Italic" at 5pt

\font\tenrm="Trebuchet MS" at 10pt
\font\tenit="Trebuchet MS Italic" at 10pt
\font\tenbf="Trebuchet MS Bold" at 10pt
\font\tenbi="Trebuchet MS Bold Italic" at 10pt

\font\ninerm="Trebuchet MS" at 9pt
\font\nineit="Trebuchet MS Italic" at 9pt
\font\ninebf="Trebuchet MS Bold" at 9pt
\font\ninebi="Trebuchet MS Bold Italic" at 9pt

\font\eightrm="Trebuchet MS" at 8pt
\font\eightit="Trebuchet MS Italic" at 8pt
\font\eightbf="Trebuchet MS Bold" at 8pt
\font\eightbi="Trebuchet MS Bold Italic" at 8pt

\font\sevenrm="Trebuchet MS" at 7pt
\font\sevenit="Trebuchet MS Italic" at 7pt
\font\sevenbf="Trebuchet MS Bold" at 7pt
\font\sevenbi="Trebuchet MS Bold Italic" at 7pt

\font\sixrm="Trebuchet MS" at 6pt
\font\sixit="Trebuchet MS Italic" at 6pt
\font\sixbf="Trebuchet MS Bold" at 6pt
\font\sixbi="Trebuchet MS Bold Italic" at 6pt

\font\fiverm="Trebuchet MS" at 5pt
\font\fiveit="Trebuchet MS Italic" at 5pt
\font\fivebf="Trebuchet MS Bold" at 5pt
\font\fivebi="Trebuchet MS Bold Italic" at 5pt

% Initialization
% --------------


Post: <mailto:MacOSX-TeX at email.esm.psu.edu>
Please see <http://www.esm.psu.edu/mac-tex/> for list
guidelines, information, and LaTeX/TeX resources.

More information about the MacOSX-TeX mailing list