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 wish to use the font tgpagella without it being used throughout the entire document. How do I import this font into my document without causing it to be used by default?

share|improve this question
add comment

1 Answer

up vote 11 down vote accepted

If you look into tgpagella.sty, you find there (after some complex code setting the scaling which you probably do not need) the line \renewcommand{\rmdefault}{qpl}. This means that tgpagella font is encoded by fontname scheme as qpl. Then the solution is to call this family directly:

\documentclass{article}
\pagestyle{empty}
\begin{document}
This is typeset in default font.  {\fontfamily{qpl}\selectfont This
  is typeset in tgpagella.}  And default font again.
\end{document}

enter image description here

share|improve this answer
2  
You might add how one is supposed to find the correct string. –  egreg Mar 10 '12 at 18:29
    
@egreg Thanks - added –  Boris Mar 10 '12 at 18:31
    
What do you mean by "the correct string"? –  Josh Mar 10 '12 at 18:33
    
I think @egreg meant qpl –  Boris Mar 10 '12 at 18:34
    
OK. I understand, thanks for updating the answer. –  Josh Mar 10 '12 at 18:35
show 1 more 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.