Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm sure this is a newbie question, but I can't figure this out. I have tried to follow the advice here: http://en.wikibooks.org/wiki/LaTeX/Fonts and here: http://www.cl.cam.ac.uk/~rf10/pstex/latexcommands.htm

But I can not seem to be able to generate any font change. I either get no change or error messages.

Here is the output of one failed attempt to change the font to Times using this command:

\rmfamily
\renewcommand{\rmdefault}{ptm}

http://pastebin.com/LJ62uC12

Apparently I either don't have a correct package installed or...

The output says " Metric (TFM) file not found." but I am not sure where to go from there.

share|improve this question
2  
If you want to use Times you can load one of the several packages, for example mathptmx, newtx (using \usepackage{newtxtext} for text and \usepackage{newtxmath} for math). Your example should work (to see the effect use \rmfamily after the other instruction`. The problem could be a broken installation (and by the way you have an old one: 2009, you might consider to upgrade to a more recent one). –  Guido Dec 26 '12 at 4:22
1  
In my TeXLive installation the tfm file is found at texlive/2011/texmf-dist/fonts/tfm/adobe/times/ptmr7t.tfm. That you should have the fd without the tfm seems like a broken install to me. I suggest to make a fresh install of a current TeXLive distribution. –  Stephan Lehmke Dec 26 '12 at 5:19
add comment

1 Answer

Most of the time, it's advised to load the fonts you want beforehand by loading packages. A list of packages available in most TeX distributions can be found online in The LaTeX Font Catalogue.

Packages will define \rmdefault (roman), \sfdefault (sans-serif) or \ttdefault (monospaced). For example:

\usepackage{tgheros,tgtermes,tgcursor}

Will set TeX Gyre Termes as the roman font, TeX Gyre Heros as the sans-serif font and TeX Gyre Cursor as the monospaced font.

XeTeX/LuaTeX users can also change the font families using the fontspec package: using \setmainfont, \setsansfont or \setmonofont respectively.

\setmainfont{TeX Gyre Termes}\setsansfont{TeX Gyre Heros}\setmonofont{TeX Gyre Cursor}

One can change the default font family with:

\renewcommand*\familydefault{\sfdefault}

However, sometimes one wishes to specify a font directly, with fontspec this is also quite easy:

\fontspec{TeX Gyre Heros}

For Type 1 fonts this is a bit more difficult:

\fontfamily{qhv}\selectfont

More information about font names can be found in this question.

share|improve this answer
    
sorry about http://www.cl.cam.ac.uk/~rf10/pstex/latexcommands.htm it’s ~=14 years old, put there for some now-forgotten discussion. i shall add a heading saying that it is unreliable in current tex distros. –  wasteofspace Jan 18 at 14:21
add comment

Your Answer

 
discard

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.