<<

164 TUGboat, Volume 32 (2011), No. 2

Math alphabets and the mathalfa package The line Michael Sharpe \usepackage[showoptions]{mathalfa} throws an error and shows all alphabet names un- Abstract derstood by the package. As an example, to load This is both a survey of existing math alphabets Zapf Chancery scaled up by 15% as the output of and a brief description of a unified method of calling \mathcal and Fourier Double-Struck scaled down them via the package mathalfa. by 4% as the output of \mathbb, you enter \usepackage[cal=zapfc,calscaled=1.15, 1 Introduction bb=fourier,bbscaled=.96] For the purposes of this article, a math alphabet is {mathalfa} one normally selected in math mode using the LAT X E after loading other math packages. You may also macros \mathcal, \mathscr, \mathbb, \mathfrak, as options or their bold counterparts \mathbcal, \mathbscr, \mathbbb and \mathbfrak. frak=...[,frakscaled=...], Regular and bold weights of a math calligraphic scr=...[,scrscaled=...], are built into , occupying the to enable the macros upper case slots in the cm[]sy family. The frak- \mathfrak tur and alphabets were (I believe) \mathbfrak % if there is a bold introduced with the AMS , and the mathrsfs \mathscr package introduced the term \mathscr in order to \mathbscr % if there is a bold script provide a script font with more elaborate shapes, as is The names available for the alphabets are listed customary in a of areas in math and physics, separately below by type. Any Mathematical Script in addition to an ordinary calligraphic alphabet. The name may serve as a target for both cal and scr. specification lists the fonts under Mathemati- In all cases, if a bold version is available, then the cal Alphanumeric Symbols (U1D400–U1D7FF), though corresponding bold variant is also defined. a number of special, commonly used fall under The mathalfa package does not provide the Post- the heading (U2100–U214F). The Script fonts required for activating all its options. Unicode names for the alphabets are: The metrics and virtual fonts are publicly available, MATHEMATICAL SCRIPT: but are useless without the .pfb files which you must a.k.a. script, , calligraphic. acquire. See the mathalfa documentation for detailed MATHEMATICAL DOUBLE-STRUCK: descriptions of sources. a.k.a. double-struck, blackboard bold, openface. MATHEMATICAL FRAKTUR: 2.1 BOONDOX a.k.a. fraktur, , gothic. The boondox package is a reworking of the STIX cal- ligraphic, fraktur and double-struck alphabets with 2 Mathalfa virtual fonts and metrics suitable for math mode. (In The mathalfa package in most cases bypasses the the USA, the boondocks and the sticks are essentially usual font-loading mechanisms for these math al- synonymous.) When the LATEX support files for the phabets and substitutes its own, allowing it to use STIX fonts are made public, the boondox package common terminology and, in all cases, allow arbitrary will most likely become obsolete except to those who scaling. (Many LATEX packages that load fonts have may prefer its metrics. not been modified since the days when was the predominant font format, and it was desirable to 2.2 ESSTIX restrict the set of sizes at which the bitmaps were gen- The other relatively unknown font package here is erated, thus limiting the possibility of fine scaling.) esstix, an unfinished math font collection produced In a number of cases, the original math alphabet by Elsevier, never officially released and subsequently fonts were never set up with the metrics appropriate donated to the STIX consortium, serving as a precur- for math mode, to awkward placement of sor to their STIX font family. The ESSTIX collection accents and subscripts, and inappropriate spacing. is now under the same license as the STIX collec- This package corrects such deficiencies by supplying tion — the liberal SIL Open Font License, version 1.1. virtual fonts with my preferences for those metrics Though STIX regards the ESSTIX collection as dep- following, by and large, the appearance of mtpro2 recated, the math alphabets it contains have some (MathTime Pro II). unique elements which, in my opinion, should not be

Michael Sharpe TUGboat, Volume 32 (2011), No. 2 165

allowed to become extinct. The ESSTIX fonts and 3.2 Restrained support files are now available from CTAN and have cmcm ((CMCM calligraphic, calligraphic,cmsy cmsy):): become part of TEX Live. The ESSTIX fonts in their original forms may be ABCDEFGHIJKLM mathalfa esstix NOPQRSTUVWXYZ loaded via using the option , but there cmcm ((CMCM calligraphic-bold, calligraphic-bold,cmbsy cmbsy):): is now an updated version of the ESSTIX calligraphic font. The metrics are identical to the original fonts, ABCDEFGHIJKLM but the font has been modified in several respects NOPQRSTUVWXYZ (using FontForge) so that it now validates properly zapfc (Zapf Chancery): following modifications to repair font outline points ABCDEFGHI JKLM and the font BlueScale parameter. NOPQRSTUVWXYZ In addition, a bold version has been created, (Lucida calligraphic): following modifications to a small number of glyphs ABCDEFGHI JKLM to prevent outline self-intersections. (The original NOPQRSTUVWXYZ was quite light, rather of book weight, and the bold is more correctly a demi-bold.) ESSTIX calligraphic lucida (Lucida calligraphic-bold): and its update, dubbed DutchCal, are visually almost ABCDEFGHI JKLM identical at regular weight, though the latter is hinted NOPQRSTUVWXYZ better and is the only one shown in the samples below. mma (Mathematica script): ABCDEFGHIJKLM 3 Mathematical script NOPQRSTUVWXYZ The following choices are available for cal and scr, mma (Mathematica script-bold): listed according to general appearance. ABCDEFGHIJKLM NOPQRSTUVWXYZ UPRIGHT: euler % euscript mtc % MathTime Curly (commercial) 3.3Embellished: Embellished RESTRAINED: mt cm % Computer Modern Math Italic (cmmi) mt (MathTime(Mathtime Pro Pro 2 2 script): script): lucida % From Lucida New Math (commercial) ABCDEFGHIJKLM zapfc % Adobe Zapf Chancery (or URW clone) NOPQRSTUVWXYZ mma % Mathematica fonts mtmt (MathTime(Mathtime Pro Pro 2 2 script-bold): script-bold): EMBELLISHED: ABCDEFGHIJKLM mt % MathTime (commercial) NOPQRS TUVWXYZ rsfso % based on rsfs, much less sloped mathpi % Adobe Mathematical Pi (commercial) mathpi (Mathpi script): esstix % ESSTIX-thirteen ᏭᏮᏯᏰᏱᏲᏳᏴᏵ᏶᏷ᏸᏹ dutchcal % modification of ESSTIX13 ᏺᏻᏼᏽ᏾᏿᐀ᐁᐂᐃᐄᐅᐆ boondoxo % based on boondox, less sloped dutchcal (DutchCal): HEAVILY SLOPED: ABCDEFGHIJKLM rsfs % Ralph Smith Formal Script boondox % SCRIPT alphabet from stix fonts NOPQRSTUVWXYZ Script font samples follow in the above order. dutchcaldutchcal (DutchCal-bold):(DutchCal-Bold): ABCDEFGHIJKLM 3.1 Upright NOPQRSTUVWXYZ euler (Euler script): rsfsorsfso ((RSFS-Oblique):RSFS oblique): ABCDEFGHIJKLM ABCDE FGHIJKLM NOPQRSTUVWXYZ NOPQRSTUVWXYZ euler (Euler script-bold): boondoxoboondoxo ((BOONDOXBOONDOX Calligraphiccalligraphic Oblique): oblique): ABCDEFGHI JKLM ABCDEFGHIJKLM NOPQRSTUVWXYZ NOPQRSTUVWXYZ mtcmtc (MathTime(Mathtime Pro Pro 2 2 Curly Curly script): script): boondoxoboondoxo ((BOONDOXBOONDOX Calligraphiccalligraphic Oblique-bold): oblique-bold): ABCDEFGHIJKLM ABCDEFGHIJKLM NOPQRS TUVWXYZ NOPQRSTUVWXYZ

Math alphabets and the mathalfa package 166 TUGboat, Volume 32 (2011), No. 2

3.4 Heavily sloped mathpi (Mathpi bb): ށނރބޅކއވމ ފދތލ boondoxboondox ((BOONDOXBOONDOX Calligraphic):calligraphic): ގޏސޑޒޓޔޕޖޗޘޙޚ ABCDEFGHIJKLM NOPQRSTUVWXYZ mtmt (MathTime(Mathtime Pro Pro 2 2 bb): bb): ABCDEFGHIJKLM boondoxboondox ((BOONDOXBOONDOX Calligraphic-bold):calligraphic-bold): NOPQRSTUVWXYZ ABCDEFGHIJKLM mma (Mathematica bb): NOPQRSTUVWXYZ ABCDEFGHI JKLM rsfsrsfs ((RSFSRSFS standard): standard): NOPQRSTUVWXYZ ABCDEFGHIJKLM fourier (Fourier bb): NOPQRSTUVWXYZ ABCDEFGHI JKLM 3.5 Notes NOPQRSTUVWXYZ Lucida fonts generally need to be reduced in esstixesstix ((ESSTIXESSTIX bb):bb): ABCDEFGHI JKLM • scale to match other math and text fonts. NOPQRSTUVWXYZ Zapf Chancery needs to be scaled up by 15% or • so. This font is not ideally suited for use as a boondoxboondox ((BOONDOXBOONBOX bb):bb): math alphabet due to the disparate heights and ABCDEFGHIJKLM depths and the long tails on some glyphs. Use NOPQRSTUVWXYZ with care. 4.2 Bold weight The calligraphic fonts break down into four nat- • ural groups: Blackboard bold (with serifs): (i) the upright styled Euler and Curly; mthmth (MathTime(Mathtime Pro Pro 2 2 Holey Holey Roman-bold): Roman-bold): (ii) the rather restrained CM, Lucida, Zapf ABCDEFGHI JKLM Chancery, ESSTIX and mma; NOPQRSTUVWXYZ (iii) the moderately sloped but more embel- Blackboard bold (sans ): lished Mathpi, MathTime (borderline case), mtmt (MathTime(Mathtime Pro Pro 2 2-bold): bb-bold): rsfso and boondoxo; ABCDEFGHIJKLM (iv) the heavily sloped rsfs and the slightly less NOPQRSTUVWXYZ sloped boondox. mma (Mathematica bb-bold): My preference, if not using euler or lucida for ABCDEFGHI JKLM math, would be to set \mathcal to one from NOPQRSTUVWXYZ (ii) and \mathscr to one from group (iii). boondox (BOONDOX bb-bold): 4 Mathematical double-struck CDHNPQRZ (few glyphs available)

Double-struck font samples follow. 4.3 Notes 4.1 Normal weight Blackboard bold can look poor on the screen • Blackboard bold (with serifs): in many cases. Perhaps the thin parallel lines in the figures are a challenge to anti-aliasing amsams ((AMSAMS bb): bb): mechanisms, at some resolutions. For example, ABCDEFGHIJKLM here is the result of a screenshot from my 94 dpi NOPQRSTUVWXYZ LCD screen of a fragment containing ams double- mthmth (MathTime(Mathtime Pro Pro 2 2 Holey Holey Roman): Roman): struck E at 153%, magnified by a factor of 4. ABCDEFGHI JKLM NOPQRSTUVWXYZ pazo (Mathpazo bb): ABCDEFGHIJKLM The displays unevenly, and appears to be NOPQRSTUVWXYZ of a weight different to its neighbors. In my expe- rience, blackboard bold is the most problematic Blackboard bold (sans serif): alphabet for screen rendering, and AMS bb and lucida (Lucida bb): Holey Roman bb are the most likely to show ABCDEFGHI JKLM up as a bit ghostly (gray and indistinct) on the NOPQRSTUVWXYZ screen compared to other math glyphs. Both

Michael Sharpe TUGboat, Volume 32 (2011), No. 2 167

seem to be formed by removing the interiors boondoxboondox ((BOONDOXBOONDOX fraktur):fraktur): of glyphs from a bold serifed font. MathTime ABCDEFGHIJKLM Pro 2 Holey Roman-bold is a much better fit to NOPQRSTUVWXYZ most math fonts of weight heavier than Com- euler (Euler fraktur-bold): puter Modern. Other such hollowed-out fonts ABCDEFGHIJKLM which are occasionally used as a double-struck NOPQRSTUVWXYZ font, such as Caslon OpenFace and Goudy Hand- mma (Mathematica fraktur-bold): Tooled, have to my eye either a similar problem, ABCDEFGHI JKLM or have insufficient hollowing-out to distinguish NOPQRSTUVWXYZ them from an ordinary bold font. mt (Mathtime Pro 2 fraktur-bold): Fourier, Mathpi, esstix and boondox bb appear ABCDEFGHI JKLM • to be very close in style, with Mathpi bb a bit NOPQRSTUVWXYZ less sharp. These are , and boondoxboondox ((BOONDOXBOONDOX fraktur-bold):fraktur-bold): because of screen-rendering issues, you may find ABCDEFGHIJKLM that the font rendered there appears asymmetric NOPQRSTUVWXYZ even though there is no problem on paper, at least for resolutions over 300 dpi. 5.1 Notes Mathpazo bb and Mathematica bb have a heav- While mma is easy to read, I find it less attrac- • ier appearance and should work well with fonts • tive than other fraktur faces as it seems to have other than Computer Modern, but the uneven random variations in heights and depths, and weights of their strokes can lead to unsightly seems overly dark. Some of these comments screen artifacts. might also apply to lucida. In my opinion, for best appearance on screen • lucida fraktur is one of the most idiosyncratic and on paper, the best-looking blackboard bold • of the fraktur fonts, seeming to be considerably glyphs (matching the weights of fonts heavier more influenced by Duc de Berry than by tradi- than Computer Modern) are (i) BOONDOX bb- tional fraktur sources. bold; (ii) MathTime Pro 2 Holey Roman-bold. boondox fraktur is very attractive, but a bit In both cases, there is no ghostly appearance, • heavy for all but the blackest text fonts (Times, but in case (i), the glyph selection is limited. Arno Pro, Lucida), while esstix is a bit too light 5 Mathematical fraktur for all but fonts like Computer Modern and Goudy Old Style. Fraktur font samples follow, arranged in order of blackness. 6 A tool for making virtual fonts esstixesstix ((ESSTIXESSTIX fraktur):fraktur): TEX does not make it easy to take a text font (e.g., ABCDEFGHIJKLM a script font) and construct from it a virtual font NOPQRSTUVWXYZ suitable for use in math mode, with accents properly positioned, width adjusted to match other math mathpi (Mathpi fraktur): glyphs, and subscripts properly placed. The tool ᑛᑜᑝᑞᑟᑠᑡᑢᑣᑤᑥᑦᑧ I used to do this in several cases is TeXFontUtility, ᑨᑩᑪᑫᑬᑭᑮᑯᑰᑱᑲᑳᑴ available for Mac OS X as TeXFontUtility.dmg from mtmt (MathTime(Mathtime Pro Pro 2 2 fraktur): fraktur): http://math.ucsd.edu/~msharpe. The program is ABCDEFGHI JKLM specific to Mac OS X, but the output may be used in NOPQRSTUVWXYZ any LATEX installation. euler (Euler fraktur): With this tool, the math metrics can be adjusted ABCDEFGHIJKLM visually. For example, adjusting the left and right NOPQRSTUVWXYZ side-bearings, subscript position and accent position for the glyph A of boondox script is simply a matter lucida (Lucida fraktur): of selecting and dragging the line segments (the hat ABCDEFGHI JKLM for the accent) to your personal tastes. See figure1. NOPQRSTUVWXYZ This tool has many other uses, most importantly, mma (Mathematica fraktur): serving as a graphical interface to fontinst for pur- ABCDEFGHI JKLM poses such as substituting an italic alphabet for the NOPQRSTUVWXYZ math italic glyphs in a virtual font based on mtpro2

Math alphabets and the mathalfa package 168 TUGboat, Volume 32 (2011), No. 2

http://www.tug.org/lucida and MathTime Pro 2 from 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. The Mathematica fonts are not of very high • quality as a collection (i.e., not suitable for pro- fessional use as they stand), but they have some excellent components. In particular, the calli- graphic font may be turned into a good target for \mathcal after its metrics have been fine- tuned. You are missing out on some good stuff if you don’t install this free collection. Sadly, Jens-Peer Kuska, the theoretical physicist who devised the LATEX support files for these fonts, died before his time in 2009, and it seems un- Figure 1: Adjusting a glyph in TeXFontUtility. likely that they will be revised in the near future. The rsfs package is not well-suited to \mathcal, • being much too slanted. The best options for (and making the appropriate visual adjustments to \mathcal are, in my opinion, rsfso, dutchcal, the metrics for math mode), and diagnosing com- boondoxo and mt, the latter requiring the (non- mon errors made in adding packages to TEX Live. free) mtpro2 collection. All the “frankenfonts” in the file mathsamples.pdf If you own the mtpro2 collection, look into the mentioned below were created using this program. • ‘curly’ script font, which seems useful, though a 7 In conclusion bit heavy. It is questionable whether there is value in the Several of the packages described above are ad- • • vertised as suitable companions for Times, a Mathpi fonts given that each of its constituents rather heavy font that is not generally consid- may be approximated closely by free alterna- ered the best choice for book text. (It was tives, and the fonts can be tricky to install. designed for newspaper use, where it would re- The boondox calligraphic font is quite handsome. main legible even after the ink soaked unevenly • I prefer it to be less sloped, along the lines of into cheap newsprint paper, and was compact rsfso. This is provided by the option boondoxo, enough for the narrow columns.) Nonetheless, which uses virtual fonts sloped much like rsfso. there is a high variance in the weights of those It is possible to produce a candidate for a math companions. For example, both boondox frak- • script font starting from any script text font, tur and mt fraktur were designed for Times, but it is very difficult to locate suitable text and there is a great difference between their script fonts. The most frequent problem is long weights. In my opinion, this means that the tails on some glyphs. Another is that the glyphs issue of matching math alphabet weight to text can be over-elaborate, more suited to a wedding font weight is not critical, and there are many invitation than a scientific publication. examples of successful use of the mtpro2 fonts with text fonts having a multiplicity of weights. For examples, see the file mathsamples.pdf at  Michael Sharpe http://math.ucsd.edu/~msharpe/. Math Dept, UCSD If your interest in math fonts goes beyond the • La Jolla, CA 92093-0112 basic level (e.g., you are a book or lecture USA notes with mathematical content), you should msharpe (at) ucsd edu look into the commercial products Lucida from http://math.ucsd.edu/~msharpe/

Michael Sharpe