TUGboat, Volume 31 (2010), No. 1 27
Mathematical typefaces in TEX documents \scriptscriptfont0=\fiverm \def\rm{\fam=0 \tenrm} Amit Raj Dhawan % % Family 1 (Math italic) Abstract \font\teni=mdbchri7m at10pt \font\seveni=mdbchri7m at7pt This paper discusses free math fonts that can \font\fivei=mdbchri7m at5pt be used by TEX to harmonize with desired text \textfont1=\teni typefaces. It has been written with a user of plain \scriptfont1=\seveni TEX in mind but the pivotal issues discussed are \scriptscriptfont1=\fivei common to other friends of TEX, e.g., LATEX. A \def\mit{\fam=1} technique for changing text and math fonts in TEX % is given. Then the paper discusses the lack of math % Family 2 (Math symbols) fonts compared to text fonts in TEX. It is followed \font\tensy=md-chr7y at10pt by some deliberation on some aspects of complete \font\sevensy=md-chr7y at7pt sets of math fonts. The term “math mode” includes \font\fivesy=md-chr7y at5pt both TEX’s in-line and display math modes, unless \textfont2=\tensy stated otherwise. \scriptfont2=\sevensy \scriptscriptfont2=\fivesy 1. Changing math fonts \def\cal{\fam=2} Changing the text font in TEX is quite simple. For % example, the command \font\myfont=cmss10 will % Family 3 (Math extension) assign the font cmss10 to the control word \myfont. \font\tenex=mdbchr7v at10pt However, this does not work when assigning fonts \font\sevenex=mdbchr7v at7pt to be used in math mode. TEX uses fonts from \font\fiveex=mdbchr7v at5pt one or more of the sixteen font families to typeset \textfont3=\tenex mathematical characters. Each font family consists \scriptfont3=\sevenex of three fonts — textfont, scriptfont, and scriptscriptfont. \scriptscriptfont3=\fiveex In plain TEX, by default, most of the math- % ematical characters come from family 0 (roman), % Family 4 (Italic text) family 1 (math italic), family 2 (math symbol), \font\tenit=mdbchri7t at10pt and family 3 (math extension); TEX expects these \font\sevenit=mdbchri7t at7pt families to be fixed. There are characters in math \font\fiveit=mdbchri7t at5pt mode that come from other font families, e.g., x in \textfont\itfam=\tenit f(x) is from family 6 (\bffam). In all, plain TEX \scriptfont\itfam=\sevenit uses 8 families (0–7). To thoroughly change the \scriptscriptfont\itfam=\fiveit typeface/type family of a document generated by \def\it{\fam=\itfam \tenit} plain TEX, it is required to change the fonts in 7 of % those font families; one of the eight families is for % Family 5 (Slanted text) the typewriter typeface. \font\tensl=mdbchro7t at10pt The following code changes the type family in \font\sevensl=mdbchro7t at7pt a TEX document from Computer Modern (default) \font\fivesl=mdbchro7t at5pt to Charter. The fonts used in the code are free and \textfont\slfam=\tensl included in most TEX distributions. This method \scriptfont\slfam=\sevensl works well with other formats based on plain TEX, \scriptscriptfont\slfam=\fivesl \def\sl{\fam=\slfam \tensl} e.g., AMS-TEX, X TE EX (not X LE ATEX), Eplain, etc. With LATEX, the given method does not work. % % Family 6 (Bold text) % Family 0 (Roman) \font\tenbf=mdbchb7t at10pt \font\tenrm=mdbchr7t at10pt \font\sevenbf=mdbchb7t at7pt \font\sevenrm=mdbchr7t at7pt \font\fivebf=mdbchb7t at5pt \font\fiverm=mdbchr7t at5pt \textfont\bffam=\tenbf \textfont0=\tenrm \scriptfont\bffam=\sevenbf \scriptfont0=\sevenrm \scriptscriptfont\bffam=\fivebf 28 TUGboat, Volume 31 (2010), No. 1 \def\bf{\fam=\bffam \tenbf} % % Family 7 (Typewriter) Utopia 3 \font\tentt=cmtt10 yx+2y f (x, y)=(x + y)(2x) \font\seventt=cmtt10 at7pt \font\fivett=cmtt10 at5pt 1 |j| \textfont\ttfam=\tentt σ −i j t − lim nk (t)e dt = lim 1 c j k→∞ 2π k→∞ nk + 1 \scriptfont\ttfam=\seventt ZT \scriptscriptfont\ttfam=\fivett \def\tt{\fam=\ttfam \tentt} % \rm % Sets normal roman font Century 3 yx+2y f (x, y) = (x + y)(2x) Another way to change the fonts is to use the control word \newfam [1]. The technique is similar 1 | j| σ −i jt to the one illustrated above. The macro \newfam lim nk (t)e dt = lim 1 − c j k→∞ 2π Z k→∞ nk + 1 allows the user to form new font families under new T assigned names.
2. Available math fonts Palatino
+ 3 TEX can change the math typefaces only if the fonts yx 2y f (x, y) = (x + y)(2x) to do that are available. Today’s TEX distributions include hundreds of fonts to change the typeface 1 |j| for text, but this is not the case with math. lim σ (t)e−ijtdt = lim 1 − c nk + j We can find hundreds of readily available free k→∞ 2π ZT k→∞ nk 1! fonts offering the roman, italic, slanted, and bold typeface variants, but the fonts for creating specific math typefaces are not even in tens. The problem is Times the lack of fonts that are included in font families 1, + 3 yx 2y 2, and 3 — math italic, math symbol, and math f (x, y) = (x + y)(2x) extension fonts. Given below is some math and text in different typefaces, typeset using free fonts 1 | j| lim σ (t)e−i jtdt = lim 1 − c available in major TEX distributions like TEX Live nk j k→∞ 2π ZT k→∞ nk + 1! 2009 and MiKTEX 2.8.
Computer Modern Bookman x+2y3 y +2 3 (2x) yx y f(x,y)=(x + y) f (x y) = (x + y)(2x)
1 −ijt |j| 1 |j| lim σn (t)e dt = lim 1 − cj −ijt →∞ k →∞ lim σn (t)e dt = lim 1 − cj k 2π ZT k nk + 1 →∞ k →∞ k 2π ZT k nk + 1
Charter 3 y x+2y (2x) f (x, y)=(x + y) Antykwa Toru´nska +2 3 (2 ) 1 |j| ( ) = ( + ) σ −i jt − | | lim nk (t)e dt = lim 1 − cj σ − k→∞ 2π k→∞ n + 1 ZT k →∞ π T →∞ 1 lim ( ) = lim 1 2 + 1 TUGboat, Volume 31 (2010), No. 1 29
Euler