1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
|
\documentclass[11pt]{amsart}
\usepackage[margin=1in]{geometry}
\usepackage[parfill]{parskip}\usepackage{url}
\usepackage{graphicx}
\DeclareFontEncoding{LMR}{}{}
\DeclareFontSubstitution{LMR}{hlcm}{m}{n}
\DeclareFontFamily{U}{futm}{}
\DeclareFontShape{U}{futm}{m}{n}{
<-> fourier-bb
}{}
\DeclareSymbolFont{Ufutm}{U}{futm}{m}{n}
\usepackage[T1,OT1]{fontenc}
\usepackage{amssymb}
\usepackage{hyperref}
\title{The \textsf{mathalfa} package}
\author{Michael Sharpe}
\email{msharpe at ucsd dot edu}
\date{}
\begin{document}
\maketitle
%\section{Introduction}
The math alphabets normally addressed via the macros \verb|\mathcal|, \verb|\mathbb|, \verb|\mathfrak| and \verb|\mathscr| are in a number of cases not well-adapted to the \LaTeX\ math font structure. Some suffer from one or more of the following defects:
\begin{itemize}
\item
font sizes are locked into a sequence that was appropriate for \textsf{metafont}--generated rather than scalable fonts;
\item there is no option in the loading package to enable scaling;
\item the font metrics are designed for text rather than math mode, leading to awkward spacing, subscript placement and accent placement when used for the latter;
\item the means of selecting a set of math alphabets varies from package to package.
\end{itemize}
The goal of this package is to provide remedies for the above, where possible. This means, in effect, providing virtual fonts with my personal effort at correcting the metric issues, rewriting the font-loading macros usually found in a \textsf{.sty} and/or \textsf{.fd} files to admit a scale factor in all cases, and providing a \textsf{.sty} file which is extensible and from which any such math alphabet may be specified using a standard recipe.
For example, the following fonts are potentially suitable as targets for \verb|\mathcal| or \verb|\mathscr| and are either included as part of \TeX Live 2010, as free downloads from CTAN or other free sources, or from commercial sites.
\begin{verbatim}
cm % Computer Modern Math Italic (cmsy)
euler % euscript
rsfs % Ralph Smith Formal Script---heavily sloped
rsfso % based on rsfs, much less sloped
lucida % From Lucida New Math (commercial)
mathpi % Adobe Mathematical Pi or clones thereof (commercial)
mma % Mathematica fonts
mt % Mathtime (commercial)
mtc % Mathtime Curly (commercial)
zapfc % Adobe Zapf Chancery (URW clone is part of TeXLive)
esstix % ESSTIX-thirteen
boondox % calligraphic alphabet derived from stix fonts
boondoxo % based on boondox, but less oblique
dutchcal % regular and bold weights derived from ESSTIX13
\end{verbatim}
Once you have installed the support packages for these fonts and the \textsf{mathalfa} package, you may select a particular calligraphic font for \verb|\mathcal| using something like
\begin{verbatim}
\usepackage[cal=rsfso,calscaled=.96]{mathalfa}
\end{verbatim}
which loads \textsf{rsfso} at 96\% of natural size as the math calligraphic alphabet. You may at the same time select the output for \verb|\mathbb|, \verb|\mathfrak|, \verb|\mathbfrak| (since the Mathematica fonts have a bold version of bb) and \verb|\mathscr| with
\begin{verbatim}
\usepackage[cal=mathpi,
calscaled=.94,
bb=ams,
frak=mma,
frakscaled=.97,
scr=rsfs]{mathalfa}
\end{verbatim}
As initially configured, \textsf{mathalfa} makes available the following options:
\begin{description}
\item[cal=] Select the calligraphic alphabet from the list above.
\item[calscaled=] Select a scale factor for \textsf{cal}.
\item[scr=] Select the script alphabet from \textsf{rsfs, rsfso, euler, lucida, mathpi, mma, mtc, zapfc, esstix, boondox, boondoxo. dutchcal}.
\item[scrscaled=] Select a scale factor for \textsf{scr}.
\item[frak=] Select the fraktur alphabet from \textsf{euler, lucida, mathpi, mma, mt, esstix, boondox}.
\item[frakscaled=] Select a scale factor for \textsf{frak}.
\item[bb=] Select the Blackboard bold alphabet from \textsf{ams, lucida, mathpi, mma, mt, mth, pazo, fourier, esstix, boondox}.
\item[bbscaled=] Select a scale factor for \textsf{bb}.
\item[scaled=] Select a scale for all alphabets chosen within mathalfa.
\item[showoptions] This option throws an error and shows a list of all installed option values for \textsf{bb}, \textsf{cal}, \textsf{frak} and \textsf{scr} on the console.
\end{description}
\textsc{Notes}
\begin{itemize}
\item If bold versions exist, they are loaded and may be used with the macros \verb|\mathbcal|, \verb|\mathbbb|, \verb|\mathbfrak| and \verb|\mathbscr|.
\item If you prefer that the bold weight be the default target from \verb|\mathcal|, enter
\begin{verbatim}
\let\mathcal\mathbcal
\end{verbatim}
after loading the {\tt mathalfa} package. (You may find this a useful option if you specified {\tt cal=dutchcal}, as that font is quite light.)
\item
Use of \textsf{zapfc} as a value for either \textsf{cal} or \textsf{scr} requires that you install the \textsf{urwchancal} package from\\
\url{http://ctan.tug.org/tex-archive/fonts/urwchancal}.\\
(It is distributed as part of \TeX\ Live as of March 2011.)
\item Use of the \textsf{rsfso} as a value for either \textsf{cal} or \textsf{scr} requires that you install the \textsf{rsfso} package from\\
\url{http://ctan.tug.org/tex-archive/fonts/rsfso}.\\
(It is distributed as part of \TeX\ Live as of March 2011.)
\item Use of \textsf{mma} as a value requires that you download and install the fonts from\\
\url{http://support.wolfram.com/technotes/latestfonts.en.html}.\\
The support files may be downloaded from\\
\url{http://phong.informatik.uni-leipzig.de/~kuska/}.\\
In particular, {\tt wolfram.map} must be enabled. Virtual fonts with metrics that are suitable for math mode are also required. A TDS with the required files (including virtual fonts with tuned metrics) is available at\\ \url{http://public.me.com/mjsharpe/mmaTDS.zip}.
\item Use of \textsf{mathpi} requires that you purchase and install the Adobe Mathematical Pi fonts (\#2 and \#6) or clones thereof. If you choose to buy them, you may download support files, including virtual fonts with tuned metrics, from \\
\url{http://public.me.com/mjsharpe/mathpiTDS.zip}.
\item The ESSTIX collection is a creation of Elsevier Publishing in 2000, though never officially released by them. Before development was complete, the collection was donated to the STIX math font project, to which it seems to have been a precursor. Distribution has since been deprecated, but in my opinion, math alphabet fonts, especially math script fonts, are so rare that none should be allowed to become extinct. The BlackBoard Bold ESSTIX font (\textsf{ESSTIX14}) is close to both the mathpi and Fourier Blackboard Bold fonts, and the fraktur ESSTIX font (\textsf{ESSTIX15}) is similar to mathpi fraktur. However, the ESSTIX script font (\textsf{ESSTIX13}) seems to be a distinct and interesting face. The PostScript versions of these fonts have been hard to find, but the TrueType versions may be found embedded within the \textsf{Amaya} project, available at\\
\url{http://www.w3.org/Amaya/}.\\
The ESSTIX PostScript fonts, virtual math fonts and \LaTeX\ support files may be downloaded now from\\
\url{http://mirror.ctan.org/fonts/esstix}.\\
This provides virtual fonts with tfm names \textsf{esstixcal}, \textsf{esstixbb} and \textsf{esstixfrak}. As of May 2011, the \textsf{esstix} package is distributed as a part of \TeX\ Live.
\item The STIX fonts are currently (May 2011) distributed only in OpenType format. The PostScript BOONDOX fonts (in the USA, \emph{the boondocks} and \emph{the sticks} are essentially synonymous) containing their calligraphic, fraktur and double-struck (blackboard bold) alphabets in regular and bold weights were manufactured from STIX {\tt.otf} fonts using \textsf{FontForge}. Virtual fonts were then created using \textsf{fontinst} to customize the metrics for positioning accents and subscripts. A TDS package with the fonts and support files may be downloaded from\\
\url{http://mirror.ctan.org/fonts/boondox}.\\
\end{itemize}
The following are my opinions. No objective judgment should be inferred.
\begin{itemize}
\item
If your interest in math fonts goes beyond the basic level, you should look into the commercial products \textsf{Lucida} from \url{http://www.tug.org/store/lucida/order.html} and \textsf{Mathtime Pro 2} from \url{http://pctex.com}. Both are high quality products, and are excellent values for the prices. Even if you only use small pieces of the collections, these are much better buys than most commercial text fonts.
\item
The Mathematica fonts are not of very high quality as a collection, but they have some good parts. In particular, the calligraphic math font may be turned into a useful target for \verb|\mathcal| after its metrics have been fine-tuned.
You are missing out on some good stuff if you don't install this free collection.
\item
The \textsf{rsfs} package is not suitable for \verb|\mathcal|, being much too slanted. The best options for \verb|\mathcal| are \textsf{rsfso}, \textsf{esstix}, \textsf{boondoxo} and \textsf{mt}, the latter requiring the (non-free) \textsf{mtpro2} collection.
\item
If you own the \textsf{mtpro2} collection, look into the `curly' script font, which seems useful, though a bit heavy.
\item It is questionable whether there is value in the \textsf{Mathpi} fonts given that there are free close approximants to each of them.
\item The STIX (BOONDOX) calligraphic font is quite handsome. I prefer it to be less sloped, along the lines of rsfso. This is provided by the option {\tt boondoxo}, which provides virtual fonts sloped approximately like {\tt rsfso}.
\end{itemize}
\textsc{Height Comparisons:}
The CapHeight of a font is supposed to represent the height of capital letters in the font in units where 1000 is equal to 1{\tt em}, the size of \verb|\quad| which, for a font of nominal size 10{\tt pt} is in most cases equal to 10{\tt pt}. Script fonts often have irregularly sized capital letters, and the CapHeight should perhaps represent the median height of capitals. This is not always so. For example, \textsf{pzc} (Adobe Zapf Chancery) and \textsf{uzc} (its URW clone) have the same glyph metrics, but their CapHeights are listed respectively as 708 and 573. These numbers, taken from their AFM files, represent in the first case the second greatest height of capital letters and the second case the second smallest. If the CapHeight is to provide useful information about scaling the font, a more central value is 595, indicating that in most cases, Zapf Chancery usually needs to be scaled up by about 15\%.
For the purpose of making scale factors to mediate between these disparate fonts, the following chart may be helpful.
\begin{tabular}{l r}
Computer Modern Roman (cmr10)&683\\
Zapf Chancery (pzcmi/uzcmi)&595\\
Euler fraktur(eufm10)&690\\
Euler script(eusm10)&695\\
rsfs/rsfso&710\\
%AMS fraktur (msbm10)&685\\
Computer Modern calligraphic (cmsy10)&703\\
Mathpi calligraphic (mh2scr)&720\\
Mathpi fraktur (mh2)&762\\
Mathpi Blackboard bold (mh6)&720\\
Lucida calligraphic (lbms)&723\\
Lucida Blackboard bold (lbma)&723\\
Lucida fraktur (lbl)&741\\
mtpro2 calligraphic (mt2mst)&702\\
mtpro2 curly (mt2mct)&702\\
mtpro2 Blackboard bold (mt2bbt)&690\\
mtpro2 Holey Roman (mt2hrbt)&690\\
Mathematica calligraphic (Mathematica5)&685\\
Mathematica fraktur (Mathematica6)&690\\
Mathematica Blackboard bold (Mathematica7)&662\\
Mathpazo Blackboard bold (fplmbb)&692\\
Fourier Blackboard bold (fourier-bb)&693\\
ESSTIX Calligraphic (ESSTIX13)&692\\
ESSTIX Blackboard bold (ESSTIX14)&696\\
ESSTIX fraktur (ESSTIX15)&700\\
BOONDOX Calligraphic &687\\
BOONDOX Blackboard bold &662\\
BOONDOX fraktur &695
\end{tabular}
\newpage
Here are some samples from the fonts mentioned above:
\def\alf{A B C D E F G H I J K L M N O P Q R S T U V W X Y Z}
\newdimen\pbw \setlength{\pbw}{\textwidth}
\addtolength{\pbw}{-20pt}
\newdimen\cw \setlength{\cw}{\pbw}\divide\cw 26\relax
\newcommand{\al}{\hbox to\columnwidth{\hfil\parbox{\the\pbw}{%
\hbox{\hbox to \cw{\hfil A\hfil}%
\hbox to \cw{\hfil B\hfil}%
\hbox to \cw{\hfil C\hfil}%
\hbox to \cw{\hfil D\hfil}%
\hbox to \cw{\hfil E\hfil}%
\hbox to \cw{\hfil F\hfil}%
\hbox to \cw{\hfil G\hfil}%
\hbox to \cw{\hfil H\hfil}%
\hbox to \cw{\hfil I\hfil}%
\hbox to \cw{\hfil J\hfil}%
\hbox to \cw{\hfil K\hfil}%
\hbox to \cw{\hfil L\hfil}%
\hbox to \cw{\hfil M\hfil}%
\hbox to \cw{\hfil N\hfil}%
\hbox to \cw{\hfil O\hfil}%
\hbox to \cw{\hfil P\hfil}%
\hbox to \cw{\hfil Q\hfil}%
\hbox to \cw{\hfil R\hfil}%
\hbox to \cw{\hfil S\hfil}%
\hbox to \cw{\hfil T\hfil}%
\hbox to \cw{\hfil U\hfil}%
\hbox to \cw{\hfil V\hfil}%
\hbox to \cw{\hfil W\hfil}%
\hbox to \cw{\hfil X\hfil}%
\hbox to \cw{\hfil Y\hfil}%
\hbox to \cw{\hfil Z\hfil}}}}}
\long\def\sample#1#2{%#1=name, #2=font cmd
\vspace{1.5pt plus 1pt minus .5pt}\parbox{\textwidth}{#1\\[2pt plus .5pt minus .5pt]{#2}}}
\textsf{\textbf{Fraktur:}}
{\parindent=0pt
\sample{{\tt\small esstix} (ESSTIX fraktur):} {\usefont{U}{esstixfrak}{m}{n}\al}
\sample{{\tt\small mathpi} (Mathpi fraktur):} {\usefont{U}{mathpifrak}{m}{n}\al}
\sample{{\tt\small mt} (Mathtime Pro 2 fraktur):} {\usefont{U}{mt2mf}{m}{n}\al}
\sample{{\tt\small euler} (Euler fraktur):} {\usefont{U}{euf}{m}{n}\al}
\sample{{\tt\small lucida} (Lucida fraktur):} {\usefont{T1}{hlcf}{m}{n}\al}
\sample{{\tt\small mma} (Mathematica fraktur):} {\usefont{U}{mmamfrak}{m}{n}\al}
\sample{{\tt\small boondox} (BOONDOX fraktur):} {\usefont{U}{BOONDOX-frak}{m}{n}\al}
\sample{{\tt\small euler} (Euler fraktur-bold):} {\usefont{U}{euf}{b}{n}\al}
\sample{{\tt\small mma} (Mathematica fraktur-bold):} {\usefont{U}{mmamfrak}{b}{n}\al}
\sample{{\tt\small mt} (Mathtime Pro 2 fraktur-bold):} {\usefont{U}{mt2mf}{b}{n}\al}
\sample{{\tt\small boondox} (BOONDOX fraktur-bold):} {\usefont{U}{BOONDOX-frak}{b}{n}\al}
}
\def\spc{\hspace*{7pt}}
\textsf{\textbf{Calligraphic:}}
{\parindent=0pt
\textsc{Upright:}\\[3pt]
\sample{{\small\tt \spc euler} (Euler script):}{\usefont{U}{eus}{m}{n}\al}
\sample{{\small\tt \spc euler} (Euler script-bold):} {\usefont{U}{eus}{b}{n}\al}
\sample{{\small\tt\spc mtc} (Mathtime Pro 2 Curly script):} {\usefont{U}{mt2ms}{m}{n}\al}
\vspace{4pt}\textsc{Restrained:}\\[3pt]
\sample{{\small\tt \spc cm} (CM calligraphic, cmsy):} {\usefont{OMS}{cmsy}{m}{n}\al}
\sample{{\small\tt \spc cm} (CM calligraphic-bold, cmbsy):} {\usefont{OMS}{cmsy}{b}{n}\al}
\font\zapf=pzcmi at 13pt
\sample{{\small\tt\spc zapfc} (Zapf Chancery):} {\zapf \al}%{\usefont{T1}{pzc}{m}{it}\al}
\sample{{\small\tt\spc lucida} (Lucida calligraphic):} {\usefont{OMS}{hlcy}{m}{n}\al}
\sample{{\small\tt\spc lucida} (Lucida calligraphic-bold):} {\usefont{OMS}{hlcy}{b}{n}\al}
\sample{{\small\tt\spc mma} (Mathematica script):} {\usefont{U}{mmamcal}{m}{n}\al}
\sample{{\small\tt\spc mma} (Mathematica script-bold):} {\usefont{U}{mmamcal}{b}{n}\al}
\vspace{4pt}\textsc{Embellished:}\\[3pt]
\sample{{\small\tt\spc mt} (Mathtime Pro 2 script):} {\usefont{U}{mt2ms}{m}{it}\al}
\sample{{\small\tt\spc mt} (Mathtime Pro 2 script-bold):} {\usefont{U}{mt2ms}{b}{it}\al}
\sample{{\small\tt\spc mathpi} (Mathpi script):} {\usefont{U}{mathpical}{m}{n}\al}
\sample{{\small\tt\spc esstix} (ESSTIX calligraphic):} {\usefont{U}{esstixcal}{m}{n}\al}
\sample{{\small\tt\spc dutchcal} (dutchcal calligraphic):} {\usefont{U}{dutchcal}{m}{n}\al}
\sample{{\small\tt\spc dutchcal} (dutchcal calligraphic-bold):} {\usefont{U}{dutchcal}{b}{n}\al}
\sample{{\small\tt\spc rsfso}:} {\usefont{U}{rsfso}{m}{n}\al}
\font\calo=zxxrow7z at 11pt
\sample{{\small\tt\spc boondoxo} (BOONDOX Calligraphic Oblique):} {\calo \al}
\font\calo=zxxbow7z at 11pt
\sample{{\small\tt\spc boondoxo} (BOONDOX Calligraphic Oblique-bold):} {\calo \al}
\vspace{4pt}\textsc{Heavily Sloped:}\\[3pt]
\sample{{\small\tt\spc boondox} (BOONDOX Calligraphic):} {\usefont{U}{BOONDOX-cal}{m}{n}\al}
\sample{{\small\tt\spc boondox} (BOONDOX Calligraphic-bold):} {\usefont{U}{BOONDOX-cal}{b}{n}\al}
\font\calo=rsfs10 at 11pt
\sample{{\small\tt\spc rsfs}:} {\calo\al}
}
\textsf{\textbf{Double-Struck (Blackboard Bold):}}
{\parindent=0pt
\textsc{Hollowed-out Shapes:}\\[3pt]
\font\amsbb=msbm10 at 11pt
\sample{{\tt\small\spc ams} (AMS bb):} {\amsbb \al}
\sample{{\tt\small\spc mth} (Mathtime Pro 2 Holey Roman):} {\usefont{U}{mt2hrb}{m}{n}\al}
\vspace{4pt}\textsc{Geometric Shapes:}\\[3pt]
\sample{{\tt\small\spc lucida} (Lucida bb):} {\usefont{LMR}{hlcm}{m}{n}\al}
\sample{{\tt\small\spc mathpi} (Mathpi bb):} {\usefont{U}{mathpibb}{m}{n}\al}
\sample{{\tt\small\spc mt} (Mathtime Pro 2 bb):} {\usefont{U}{mt2bb}{m}{n}\al}
\sample{{\tt\small\spc mma} (Mathematica bb):} {\usefont{U}{mmambb}{m}{n}\al}
\sample{{\tt\small\spc pazo} (Mathpazo bb):} {\usefont{U}{fplmbb}{m}{n}\al}
\sample{{\tt\small\spc fourier} (Fourier bb):} {\usefont{U}{futm}{m}{n}\al}
\sample{{\tt\small\spc esstix} (ESSTIX bb):} {\usefont{U}{esstixbb}{m}{n}\al}
\sample{{\tt\small\spc boondox} (BOONDOX bb):} {\usefont{U}{BOONDOX-ds}{m}{n}\al}
{\tt\small\spc boondox} (BOONDOX bb-bold):\\[2pt] \hbox to \textwidth{\hspace*{.22in}{\def\spc{\hspace{9pt}}\usefont{U}{BOONDOX-ds}{b}{n}\spc C\spc D\spc H\spc N\spc P\spc Q\spc R\spc Z} (few glyphs available.)\hfil}
\sample{{\tt\small\spc mt} (Mathtime Pro 2 bb-bold):} {\usefont{U}{mt2bb}{b}{n}\al}
\sample{{\tt\small\spc mth} (Mathtime Pro 2 Holey Roman-bold):} {\usefont{U}{mt2hrb}{b}{n}\al}
\sample{{\tt\small\spc mma} (Mathematica bb-bold):} {\usefont{U}{mmambb}{b}{n}\al}
}
\textsc{Notes:}
\begin{itemize}
\item
Lucida fonts generally need to be reduced in scale to match other math and text fonts.
\item Zapf Chancery need to be scaled up by 15\% or so. This font is not really suited for use as a math alphabet due to the disparate heights and depths and the long tails on some glyphs. Use with care.
\item Mathematica fraktur is quite readable, but not very attractive, seeming to have random variations in baseline and height. It's also a bit too heavy to be a good match to most other fonts. Similar comments could apply to Lucida fraktur, which has a very distinctive appearance with some features more similar to \textsf{Duc de Berry} than to other fraktur fonts.
\item The calligraphic fonts break down into four natural groups---(i) the upright styled Euler and Curly; (ii) the less-embellished CM, Lucida, Zapf Chancery, ESSTIX, dutchcal and Mathematica; (iii) the moderately sloped but more embellished Mathpi, Mathtime, rsfso and boondoxo; (iv) the heavily sloped rsfs and the slightly less sloped boondox. My preference, if not using \textsf{mathtime} or \textsf{lucida}, is to set \verb|\mathcal| to one from group (ii) and \verb|\mathscr| to one from group (iii).
\item Blackboard bold can look poor in some cases. In my opinion, AMS bb and some of the others show up as ghostly (gray and indistinct) especially on the screen and may not appear to match the weights of other math glyphs. (Both AMS bb and Mathtime Pro 2 Holey Roman appear to be formed by removing the interiors of solid glyphs from a bold, seriffed font. Mathtime Pro 2 Holey Roman Bold is a much better fit to most math fonts of weight heavier than Computer Modern.) Fourier, Mathpi, ESSTIX and boondox bb appear to be very close in style, with mathpi bb a bit less sharp. Mathpazo bb and Mathematica bb have a heavier appearance and should work better with fonts other than Computer Modern.
\end{itemize}
\end{document}
|