tags:

views:

8969

answers:

5

Absolute beginner LaTeX question here:

How do you change the font for the whole document to sans-serif (or anything else)?

+5  A: 

This article and this one might be helpful with changing fonts.

Vincent Ramdhanie
Could you, perhaps, give us the short-short version on this side of the links?
dmckee
+13  A: 

I found the solution thanks to the second link in Vincent's answer.

 \renewcommand{\familydefault}{\sfdefault}

This changes the default font family to sans-serif.

nickf
+2  A: 

When starting with Latex it is tempting to try and override several of the standard settings, including font, margin size etc. Note that in a majority of cases, there are very good reasons for the standard settings (serif fonts are much easier for the eye to read and should almost always be used for blocks of text / the margins are set to achieve a certain number of average words per line, again to ease reading etc.)

second
+4  A: 

As second says, most of the "design" decisions made for TeX documents are backed up by well researched usability studies, so changing them should be undertaken with care. It is, however, relatively common to replace Computer Modern with Times (also a serif face).

Try \usepackage{times}.

dmckee
+2  A: 

For a different approach, I would suggest using the XeTeX system. It allows you to access system fonts (TrueType, OpenType, etc) and set font features. In a typical LaTeX document, you include something like this in your headers:

\usepackage[xetex]{graphicx}
\usepackage{fontspec,xunicode}
\defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase}
\setmainfont[Scale=.95]{Times}
\setmonofont{Lucida Sans Typewriter}

It's the fontspec package that allows for \setmainfont and \setmonofont. The ability to choose a multitude of font features is beyond my expertise, but I would suggest looking up some examples and seeing if this would suit your needs.

fideli