...Change the default font?

The page on emphasizing text mentioned san serif, roman, and teletype; those sound suspiciously like fonts so you might want to know the default font how do can you change it. The default font for a $latex \LaTeX$ document is Computer Modern and the different choices are dependent upon it. So, for example, applying the san serif emphasis Computer Modern font gives you Computer Modern San Serif.

And how do you change the default font? There are, as always, multiple answers and it depends (in part) on your particular tex distribution.  There's a way to do it by specifying a font encoding, family, series, shape, and size will do it but that's beyond the basics. Moreover, if you plan to use $latex \LaTeX$ for typesetting math then you'll also have to consider whether the fonts you choose have support for mathematics. The best place to inspect the various font options is at The LaTeX Font Catalogue. Go there and browse the various fonts. If you're looking for  a specific font then you'll be happy to know there is a link to display the fonts in alphabetical order. Be aware, however, that not every font you see is part of your version of $latex \LaTeX$. In some cases you'd have to learn how to install the fonts on your system. This is beyond the scope of learning the basics.

The quick and easy way to give you some control over the fonts is through the use of packages. Packages are add on features and lots (but not all) come with your tex distribution. When you see a font you like from The LaTeX Font Catalogue, click on it. As an example, click on the Bookman font. That will take you to a page that gives you more detail. We need the package information listed under Usage. It says


Copy those lines and paste them into the preamble of your tex file. The first line is giving you access to the bookman font. The second line specifies the correct encoding scheme that tex requires. Here's the output from this file: ChangeDefaultFont2

If your document contains math formulas then they are typed with font that has support for math. Choosing a font without math support and then using math mode can result in differences between the fonts that make your document look bad.  Every system should include the type fonts Times, Helvetica, Palatino and Charter and supports math fonts that complement Times and Palatino. The fonts which support math are listed here.

Handwriting Font

There are times when using two fonts in the same document might be useful; questions can be asked in one font and answers in another font. Teachers might find a font which mimics handwriting especially useful for the task. TeX StackExchange has a post which will help implement it. I've got a template you can download to experiment with. Here's the output:

StudentWritingAfter setting up the handwriting font as the default the second font of computer modern is defined using the method posted on TeX StackExchange. You can switch from one to the the other as illustrated in the template: StudentWriting  (tex)  StudentWriting StudentWriting (PDF). Notice that handwriting font does not apply to math mode.

Leave a Reply

Your email address will not be published. Required fields are marked *

AlphaOmega Captcha Classica  –  Enter Security Code