# What are all the font styles I can use in math mode?

As can be seen in above picture, there are lots of fonts or font styles that can be used in math mode.

What are all the fonts or font styles I can use in math mode, and which packages are required in order to use them?

Let's assume I'm using standard Computer Modern or Latin Modern (lmodern) fonts.

Edit: It'd be great to see examples of what the different styles look like, probably via images.

I'm not interested in a reproduction of the picture, which can be found at What type of font is this?; the picture is for illustration purposes only. Furthermore, this is supposed to become a one-catches-all question for questions like the beforementioned. If I actually were looking for these fonts, I wouldn't just lazily ask here but look e.g. at The Not So Short Introduction to LaTeX2e, tables 3.14 and 6.4 first.)

-
see e.g. tug.dk/FontCatalogue –  daleif Jun 1 '12 at 10:16
@daleif I'm actually not looking for more font families, but for what I called styles within Computer Modern or Latin Modern, e.g. \mathcal. –  doncherry Jun 1 '12 at 10:23

In texdoc symbols (the Comprehensive LaTeX Symbol List) you can find Table 213:

The footnotes are explained in the document. Table 327 will additionally explain bold math.

Oh and needless to say but if you were asking this question because you need more mathematical symbols, the Comprehensive List is just your document. Greek variants, Hebrew, Tables 139 to 147 are letter-like symbols ... you'll probably never run out of symbols again.

Edit: After reading this answer http://tex.stackexchange.com/a/60018/13450 I feel the need to also point to the mathalfa package that is referenced there, providing even more alternatives than shown above.

Edit 2: This answer seems so popular that I decided to include the mathalfa table as an image as well. This is taken from the mathalfa documentation and some of the fonts are commercial or need to be installed from external sources. See the documentation for more information if you consider using any of these fonts. Warning, very long table ahead (stitched together from a multi-page table):

-
You saved me from making a table. :) –  egreg Jun 1 '12 at 14:55
@egreg Heh, it's always good when other people already did some work for you :) –  Christian Jun 1 '12 at 14:58
You guys are actually making it really hard for me to choose an accepted answer, each of the three answers so far provides great insights. –  doncherry Jun 1 '12 at 15:36
Although it might've been the least work to put together, I decided to accept this answer because it shows the output directly on here. Nonetheless, I'd advise everybody to read the other answers as well since they contain valuable information! –  doncherry Jun 3 '12 at 10:12
Wow, I just noticed the additional tables .. I think I have to take the “least work” part back :). Great answer! –  doncherry Mar 26 at 15:25

## LaTeX kernel

The LaTeX kernel defines several math alphabets in fontmath.ltx

\DeclareSymbolFontAlphabet{\mathrm}    {operators}
\DeclareSymbolFontAlphabet{\mathnormal}{letters}
\DeclareSymbolFontAlphabet{\mathcal}   {symbols}
\DeclareMathAlphabet      {\mathbf}{OT1}{cmr}{bx}{n}
\DeclareMathAlphabet      {\mathsf}{OT1}{cmss}{m}{n}
\DeclareMathAlphabet      {\mathit}{OT1}{cmr}{m}{it}
\DeclareMathAlphabet      {\mathtt}{OT1}{cmtt}{m}{n}


This must be completed by the previous declarations

\DeclareSymbolFont{operators}   {OT1}{cmr} {m}{n}
\DeclareSymbolFont{letters}     {OML}{cmm} {m}{it}
\DeclareSymbolFont{symbols}     {OMS}{cmsy}{m}{n}


so that we know precisely to which font correspond each math command:

1. \mathrm is the normal upright Roman font

2. \mathnormal is the normal math italic font: $\mathnormal{a}$ and $a$ give the same result

3. \mathcal is the special calligraphic font for uppercase letters only

4. \mathbf gives upright Roman boldface letters

5. \mathsf gives upright sans serif letters

6. \mathit gives text italic letters: $different\ne\mathit{different}$

7. \mathtt gives upright letters from the typewriter type font

One should notice that the argument to each of those commands is typeset in math mode, so spaces are ignored and hyphens become minus signs. Using those commands with arguments not consisting only of normal letters can give unexpected (and sometimes bizarre) results.

No package has to be loaded for being able to use those alphabets.

## AMSfonts

With the amsfonts package, which is loaded automatically by amssymb one has access also to

1. \mathfrak for Fraktur (aka Gothic) letters, upper and lower case

2. \mathbb for "blackboard bold" uppercase letters

## RSFS

The package mathrsfs makes available the "Ralph Smith's Formal Script" font as a math alphabet, with the command \mathrsfs, while calrsfs will do the same but also turning \mathcal to choose the RSFS font (only uppercase letters).

## Zapf's Euler Script

The package euscript will load a different calligraphic alphabet, Euler Script, designed by Hermann Zapf. Depending on the options, it will provide \mathscr (to go along with the original \mathcal) or change \mathcal to use Zapf's font:

\usepackage{eucal}
\usepackage[mathcal]{eucal}
\usepackage[mathscr]{eucal}


The first two calls are equivalent and \mathcal will use Euler Script; the last call will provide \mathscr for Euler Script and leave \mathcal as is.

In my opinion only one type of calligraphic letters should be used, be it Knuth's, RSFS or Euler Script.

-

I believe your question is of a (deliberately) introductory or basic nature. Apologies if this is not your intention. A preliminary remark: Most of the text snippet you show is actually set in text mode (italics and bold-upright, resp.), and I won't have anything to say about text-mode alphabets.

• Math italics: In many math texts since (at least?!) the middle or late 18th century (Euler's influence?), variables and letter-like symbols are typeset by convention in a slanted or, rather, italicized style. In TeX's math mode, letters are automatically set in math italics unless one explicitly chooses a different style. A very importance difference between math italics and ordinary italics is that the latter obey kerning and ligature rules that are of no relevance (and are, in fact, undesirable) for math. This is especially noticeable when using letters such as f which have (in italics mode) both ascenders and descenders.

• In TeX's Computer Modern font family, lowercase greek symbols are also set in slanted mode in math -- I suppose in order to harmonize nicely with any nearby italicized latin letters.

• When using LaTeX, \mathit{} instructs TeX to typeset the argument in text-mode italics. (In contrast, in Plain TeX the instruction \mit serves to set its argument in math italics.) In the argument of \mathit{}, spaces are ignored. To generate a snippet of text that contains spaces in math mode, use the command \textit{} instead.

• Math roman: In math mode, again by convention, abbreviations of operators such as sin, cos, tan, ln, and many others, are set in upright or "roman" style to distinguish them from ordinary symbols and letters (which are set in italics, see above). Matth roman and text roman generally look very similar but can differ when ligatures and kerning rules are involved. When in math mode, \mathrm{} instructs TeX to typeset the argument in math roman; as with \mathit, \mathrm ignores spaces. (Use \textrm to generate upright text with spaces.)

• Bold versions of mathrm and mathit: To further help the visual definition of symbols, it's possible to embolden letters. This is often (but not always!) done for vectors. In the Computer Modern math font world, bold letters generated via \mathbf are available only in upright or "Roman" style; other math font families, though, also offer bold-italics for math.

• Math sans-serif and Math typewriter: Use of sans-serif fonts in math settings isn't commonly done, but it can be used to set off visually certain entities that have special meanings. In your example, gen, enc, and dec are typeset with \mathsf{}, while Combine and Reveal are typeset with \mathtt.

• Special math alphabets: In addition to the preceding four math alphabets, there are also special alphabets -- such as "Math Blackboard Bold" (invoked with \mathbb{}, "Math Caligraphic" (invoked with \mathcal{}), and "Math Fraktur" (invoked with mathfrak). They are frequently used for sets (e.g., \mathbb{R} and \mathbb{C} for the sets of real and complex numbers) and other entities the author wants to distinguish visually from the surrounding material. In the basic TeX distributions with the Computer Modern fonts, there are only uppercase letters for the math blackboard-bold, caligraphic, and Fraktur alphabets; however, there are packages that provide lowercase letters for these math alphabets as well.

• In LaTeX when using the Computer Modern fonts, it's usually necessary to load one or more specialized packages, such as amsfonts, in order to access some of the special math alphabets.
• Unlike what can be done with text-mode alphabets (to be precise, since the advent of LaTeX2e in 1994 and its "new font selection system"), math-mode alphabets can't be combined, at least not in "basic" LaTeX when using CM fonts. E.g., the commands \mathcal{\mathbb{}} and \mathbf{\mathsf{}} won't work as one might expect (or wish?).

OK, this is admittedly a very basic introduction to math alphabets in TeX.

-
sadly, the meaning of "math italic" is not the same in latex and plain tex. in plain tex, \mit does use the math italic font (texbook, p.164, bottom of page), but latex defines \mathit to use the text italic font (lamport, p.51, example with "different") so that "words" can be included as italic in math expressions. (by default, any latin letters in math mode are italic, so there's no need to specify italic for variables. the situation is muddled for uppercase greek.) i guess lamport chose \mathit to mean it could be used only in math. –  barbara beeton Jun 1 '12 at 12:36
@barbarabeeton - you're absolutely correct! I'll fix the statement right away. –  Mico Jun 1 '12 at 12:57
another comment on the math italic: as i understand it, the reason lowercase greek is sloped is that that's the only lowercase greek font that was available when math books started to be set in type. (i haven't found a reference yet, but will keep looking.) –  barbara beeton Jun 1 '12 at 13:02
yet another comment ... instead of using \mathrm directly for things like "lim", "sin", etc., it's better to use the defined \lim, \sin, etc., which are defined as "operator names" with preset behavior for how to treat limits. and if you need an operator name that isn't already defined, amsmath (via amsopn) provides a mechanism for creating a robust definition, e.g. \DeclareMathOperator{lcd}. –  barbara beeton Jun 3 '12 at 13:40

I am brewing a package, lazyeqn which is supposed to offer some useful macros for all the different symbols. It uses prefix macros, for example \BA means a bold A. And that is only one, among the cool stuff it offers, like operators, vector typesetting macros and macros for most used fractions.

It is still work in progress, but I am putting here just in case it will be of use to somebody. It will change over the course of a year for sure.

Read the doc for all information (compile lazyeqn.tex). Here is a table from that file:

-