[Tex/LaTex] How to correctly use the palatino font (in memoir)

fontsfontsizemathpazomemoir

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?

Best Answer

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}