TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am a new latexer, I found some example renew these three font at the preamble part like this


Can anyone tell me how this command effect, When we need to do that?

I also found a tricky example.

\SetSymbolFont{operators}   {normal}{OT1}{cmr} {m}{n}
\SetSymbolFont{letters}     {normal}{OML}{cmm} {m}{it}
\SetSymbolFont{symbols}     {normal}{OMS}{cmsy}{m}{n}
\SetSymbolFont{operators}   {bold}  {OT1}{cmr} {bx}{n}
\SetSymbolFont{letters}     {bold}  {OML}{cmm} {b}{it}
\SetSymbolFont{symbols}     {bold}  {OMS}{cmsy}{b}{n}
\SetSymbolFont{largesymbols}{bold}  {OMX}{cmex}{m}{n}
\SetMathAlphabet{\mathbf}{bold}  {OT1}{cmr}{bx}{n}
\SetMathAlphabet{\mathsf}{bold}  {OT1}{cmss}{bx}{n}
\SetMathAlphabet{\mathit}{bold}  {OT1}{cmr}{bx}{it}
\SetMathAlphabet{\mathtt}{bold}  {OT1}{cmtt}{m}{n}

Should I define all this font if I want to get high quality typesetting. Is there some other fonts(rm,ss,tt,symbol,alphabet) I don't list here.

share|improve this question
Note, the example you found is only for symbols and math fonts, not for text mode, so they don't have effect on normal roman, italic or typewriter text, meant by your question title. If you have questions regarding math fonts, you could post a separate new question. – Stefan Kottwitz Oct 1 '11 at 9:15
up vote 13 down vote accepted

\rmdefault is the name of the default roman font. If you would like to change that, you could redefine it. You may need to load a package for the font support. For example from here:


You will get high quality typesetting even if you use LaTeX's defaults. For changing to another font, I recommend using a package rather than doing definitions such as above by yourself, only if you really know what specifically you would like to achieve.

For example, simply by


you can use New Century Schoolbook text font together with Fourier maths fonts. Packages can do some or many things for you, such as

  • loading the basic text font for you
  • providing several families (roman, sans serif, typewriter), weight (bold, medium) and shapes (upright, italic, small caps)
  • providing a well matching math font
  • supporting options for scaling to match other fonts
  • set symbol fonts and math alphabets like in your question.

For the document writer there are author commands, such as \textrm, \textsf etc. \rmdefault and related commands are like parameters for the author commands. They are usually set by classes or packages. Some authors decide to customize these parameters in their preamble, that's often not necessary.

Such parameters are

  • \rmdefault for the name of the default roman font
  • \sfdefault for the name of the default sans serif font
  • \ttdefault for the name of the default typewriter aka monospaced font

There are even more such default macros, the name usually says what's meant:

  • \encodingdefault
  • \familydefault
  • \seriesdefault
  • \shapedefault
  • \bfdefault
  • \mddefault
  • \itdefault
  • \sldefault
  • \scdefault
  • \updefault

Perhaps have a look at the LaTeX2e font guide for further explanations.

The macros exist for making font customizing easier. The general approach for an author may be

  1. Choose the best document class for your purpose. The class already prepares font support and cares for font sizes and matching spacing regarding text lines, lists and displayed math.

  2. If you have chosen the class, but you would like to use a different font, load the respective font package. If you need a certain text font and another certain math font, this can mean loading two packages.

  3. For customizing the font first check out the font package documentation for options and commands.

  4. If classes and packages cannot give the finally desired result for you, then you may consider changing parameters yourself as well as using low level font commands. Do it in a consistent way, possibly in your own style file or in your preamble.

LaTeX is not a WYSIWYG text processor where one clicks around in the text choosing arbitrary fonts. It's more about style definitions and consistent use in the document.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.