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 preparing a PhD thesis (using memoir and pdfLaTeX), and I find the palatino font a nice body font.

Reading the font related questions and answers on this awesome site, I think I have pieced together the correct combination of commands and packages but it feels like a lot of hacking. So I want to ask if there is a better way than my current solution.

I've added comments in the below example.

\RequirePackage[sc]{mathpazo} % use mathpazo to get the math fonts working correctly, why can't we scale them?
\RequirePackage[scale=0.95]{tgpagella}\normalfont % but use tgpagella as main font (it's newer than mathpazo?}
\newcommand*{\memfontfamily}{qpl} % tgpagella as main memoir font
\newcommand*{\memfontenc}{T1}
\newcommand*{\memfontpack}{tgpagella}
\documentclass[a4paper, oneside, 10pt, extrafontsizes, showtrims, draft]{memoir}
\RequirePackage[scaled=0.75]{luximono}  % we can load the correct tt font after the document class
% tgpagella contains no slanted shapes, so lets borrow them from mathpazo 
\DeclareFontShape{T1}{qpl}{m}{sl} { <-> ssub * pplj/m/sl }{}
\DeclareFontShape{T1}{qpl}{b}{sl} { <-> ssub * pplj/b/sl }{}

%just some stuff for the demo page
\setlrmarginsandblock  {30mm}{*}{*}
\setlxvchars \setxlvchars[\small\sffamily]
\checkandfixthelayout
\fixpdflayout


\usepackage[final, babel=true]{microtype}
\usepackage[english]{babel}
\usepackage{amsmath} % amsmath which also loads fonts?

\nouppercaseheads
\pagestyle{headings}

\usepackage{lipsum}

\begin{document}
\mainmatter

\chapter{Regular font families}

\textrm{roman text: (ffi --- --) \\ \lipsum[4] }

\textit{italic text: (ffi --- --) \\ \lipsum[4]}

\textbf{boldface text: (ffi --- --) \\ \lipsum[4] }

\textsl{slanted text: (ffi --- --) \\ \lipsum[4] }

\texttt{typewriter text: (ffi --- --) \\ \lipsum[4] }

\chapter{Lesser used types}
\textit{\textbf{italic bold  text: (ffi --- --) \\ \lipsum[4]}}

\textsl{\textbf{slanted bold  text: (ffi --- --) \\ \lipsum[4]}}

\textsc{smallcaps: (ffi --- --) \\ \lipsum[4] }

\textsc{\textbf{smallcaps bold  text: (ffi --- --) \\ \lipsum[4]}}

\chapter{Other test cases}

\textrm{Regular text (\texttt{http://tttext}) and \textbf{bold text} and \textit{italic text} and \textsl{slanted text}}


 \textrm{\LARGE Regular text (\texttt{http://tttext}) and \textbf{bold text} and \textit{italic text} and \textsl{slanted text}}

\textrm{ }
\textrm{ffi --- }

\begin{equation}
d=Xh+S\phi+\varepsilon \label{eq:fMRIAnalysisChapter3}
\end{equation}                  


\begin{equation}
h=\left( X^TP_sX\right)^{-1} X^T P_s d  \label{eq:Eq2Chapter3}
\end{equation}

\end{document}

So I want to use the newest tgpagella font, but it does not offer a math font, so we first load mathpazo to later only overwrite the body font with the tgpagella fonts. But we have to use luximono as a nice companion typewriter font. Then to solve all the warnings we borrow the slanted shapes from the mathpazo font.

At the moment, I think it looks fairly good, although I'm not entirely happy about the spacing/sizes in the math example and the fact that the mathpazo shapes are slightly larger then tgpagella.

So the question, is this really the best way? And what would you do to improve this?

share|improve this question
    
Why exactly are you trying to use Pagella and Pazo at the same time? When it comes to fonts "newer" does not always translate to "better". –  Sharpie Feb 8 '12 at 21:03
    
well, Pagella does nothing for the math of a document. and I like Pagella a bit more since it allows me to slightly scale it down. –  Davy Landman Feb 8 '12 at 21:08
    
Your "slanted roman" font does not seem to be set up correctly: When I run your code, on p. 3 of the output file I definitely get italics and not slanted-roman. Separately: If you're going to use pdflatex, you might as well stick with the mathpazo package for both text and math, unless you need lots of accented characters (for which tgpagella will be useful). If you wish to use xelatex instead of pdflatex, you could use the Asana Math package and together with Hermann Zapf's fully-updated (2005) Palatino nova text font (from Linotype, in otf format); not free, though. –  Mico Feb 8 '12 at 22:26
    
@Mico I agree, that was wrong, it just looked differenlty, but that was off course because mathpazo also doesn't define a slanted roman font. Could you clarify why you feel tgpagella provides no advantage? –  Davy Landman Feb 9 '12 at 13:19
1  
Davy, I'm sorry if I implied that the tgpagella font package provides no advantages (relative to mathpazo). If you have lots of words with accented characters, you're certainly better off loading tgpagella as the (text) font. Conversely, if you have no need to typeset accented characters, I don't see what advantages that the non-opentype version of tgpagella may have for you -- better to keep your setup as simple as possible. Moreover, I like the "small caps" font shape of mathpazo more than tgpagella's version. –  Mico Feb 9 '12 at 13:55
add comment

1 Answer

up vote 5 down vote accepted

The pplj family has no slanted font: indeed the relevant line in t1pplj.fd reads

\DeclareFontShape{T1}{pplj}{m}{sl}{<->ssub * pplj/m/it}{}

If you want to avoid the messages, you can write

\DeclareFontShape{T1}{qpl}{m}{sl} { <-> ssub * qpl/m/it }{}
\DeclareFontShape{T1}{qpl}{b}{sl} { <-> ssub * qpl/b/it }{}

so getting Pagella Italic. The most convenient way is just not using slanted, because it doesn't exist.

If I remove the scale=0.95 option from the call to tgpagella, I get characters that are the same width as the normal Palatino provided by mathpazo. If you want smaller fonts, just use 9pt as the main size.

I see bad spacing in the second math formula only because you say \left(...\right), which in this case is wrong.

There is no need to do \RequirePackage before \documentclass:

\documentclass[a4paper, oneside, 9pt, extrafontsizes, showtrims, draft]{memoir}
\usepackage[T1]{fontenc} % choose the default encoding
\usepackage[english]{babel} % choose the language

\usepackage[sc]{mathpazo} % use mathpazo for math fonts
\usepackage{tgpagella} % but use tgpagella as main font
\usepackage[scaled=0.75]{luximono}

% Are the following really necessary? I don't think so
%\renewcommand*{\memfontfamily}{qpl} % tgpagella as main memoir font
%\renewcommand*{\memfontenc}{T1}
%\renewcommand*{\memfontpack}{tgpagella}

\normalfont % we want to avoid annoying warnings
\DeclareFontShape{T1}{qpl}{m}{sl} { <-> ssub * qpl/m/it }{}
\DeclareFontShape{T1}{qpl}{b}{sl} { <-> ssub * qpl/b/it }{}

\linespread{1.05} % add something to the interline skip
\setlrmarginsandblock  {30mm}{*}{*}
\setlxvchars \setxlvchars[\small\sffamily]
\checkandfixthelayout
\fixpdflayout


\usepackage[final, babel=true]{microtype}
\usepackage{amsmath} % amsmath which also loads fonts?

\nouppercaseheads
\pagestyle{headings}
share|improve this answer
    
hi egreg, thank you for your answer, I thought I read in the memoir manual (p15) that for extrafontsizes and other calculations to work you would have to load the fonts before the \documentclass. Why is using \left(...\right) wrong here? I thought you always had to do that? –  Davy Landman Feb 9 '12 at 8:49
    
I get the same results with or without mathpazo; extrafontsizes is needed only if you need to pass an option such as 25pt; it is evident that \left and \right choose too large a parenthesis, in that case. –  egreg Feb 9 '12 at 9:03
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.