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'd like to use 3-4 different specific system fonts (e.g., Georgia, HelveticaNeui Light, and Lucida Sans) with certain font sizes for different sections of a page. How would I do this?

Edit: Thanks for the responses. I saw the fontspec package but the examples I found defined in the preamble \setmainfont{}, \setsansfont{}, etc. I couldn't figure out how to define a fontfamily and then reference it for a particular section. Here's an example:




\section{Georgia}%here define font

This text shows in Georgia.

\section{Lucida Sans}%

This text shows in Lucida Sans

\section{HelveticaNeue Light}%here define font

This text shows in Helvetica Neue Light

share|improve this question
Welcome to TeX.sx! – Peter Jansson Apr 14 '13 at 20:00
Have you looked into the \newfontfamily directive of the fontspec package? – Mico Apr 14 '13 at 20:15
Here's an example of pretty much exactly what you want to do: Change section fonts. – Alan Munn Apr 14 '13 at 20:32
Thanks, Alan. I saw that example which defines the formatting by section, subsection, etc. I'm looking to specify formatting for different sections - I'm used to styling in HTML/CSS where to do this you'd assign each paragraph to different classes and then for each of those classes define the font size, font family, color, margin, etc. – jack Apr 14 '13 at 21:01
@Jack The principle is the same. You can define various section-like headings using titlesec. I'll post an example shortly. But reading your question more carefully, I'm wondering, do you want the text within a section to be of a different font, or the section heading, or both? – Alan Munn Apr 14 '13 at 21:08
up vote 11 down vote accepted

If you just want chunks of text to be a different font you can simply set up environments for them using whatever semantics makes sense for your document. The main thing to remember is that you should use \newfontfamily to define a font switching command for each font rather than using the \fontspec command directly. For example:

% Compile with XeLaTeX or LuaLaTeX



This text is in Calibri
This text is in Cambria
This text is in Georgia

output of code

share|improve this answer
Perfect, thanks everyone for the help – jack Apr 14 '13 at 21:38
What happens if you use pdflatex? – Mario S. E. Sep 30 '13 at 16:14
@MarioS.E. You don't. fontspec requires either XeLaTeX or LuaLaTeX. – Alan Munn Sep 30 '13 at 19:06

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.