Possible Duplicate:
How do I use a particular font for a small section of text in my document?

I am looking for changing the font just of a little part of my text, not a section title or anything, just some text in my document. If I use \usepackage{font} in the doc heading, then I change the whole document's font, but I only want to change the font of certain text.

How can I achieve this?

  • 1
    There is now a canonical answer to this kind of question: How do I use a particular font for a small section of text in my document? – Alan Munn Apr 18 '12 at 12:40
  • @AlanMunn: I'd suggest we close this one as a duplicate then? – doncherry Jun 19 '12 at 8:51
  • As suggested, I've closed as a duplicate 'backward'. – Joseph Wright Jul 24 '12 at 15:58
  • I think this is not a duplicate because its scope is if one uses something like \usepackage{gfsartemisia-euler} to load a font. The problem is that I cannot do \usepackage{gfsartemisia-euler} just locally inside the document but it must be done in the preamble. However how can I achieve that only a small section of my text is written in gfsartemisia-euler and the rest of the document including math including theorems and fancy headers just in standard font? – student Oct 30 '12 at 10:37

You can set the fontfamily using \fontfamily{<family>}\selectfont:


Text in Palatino

Text in Times%

| improve this answer | |
  • ok, I've done it that way, but the problem I have now is: using chancery font (which I can select for the whole document with no problems) throws me this message: Font shape T1/chancery/m/sc' undefined, using T1/cmr/m/n' instead on input line ## ... But as I said, I am able to select chancery font at the heading of the document for the whole of it with no problems... Any ideas? For the rest of the document I'm using the Iwona font, which also lies in the T1 fontenc package... (or so I guess...) – Javier Novoa C. Aug 19 '10 at 19:11
  • sc means small caps: Chancery does not provide this shape. – Stefan Kottwitz Aug 19 '10 at 19:49
  • you are right... I've changed to pzc fontfamily, and all worked as expected! this things of fonts is quite confusing... Thank you very much – Javier Novoa C. Aug 19 '10 at 20:23
  • Why did you put the % after "Text in Times"? – Zimano Jul 12 '19 at 13:17

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