[Tex/LaTex] How to set Palatino as a font in Memoir

fontsmemoir

First of all, I don't think this is a duplicate of How to correctly use the palatino font (in memoir)?, because it appears to be a very specific use case.

In memoir, I'd like to use the Palatino font family. It's documented as

The fontfamily name is ppl.

And setting the fontfamily in memoir appears to be very complicated. In section 1.2.1 of the memman.pdf it is shown like this:

\newcommand*{\memfontfamily}{<fontfamily>}

So I provide it like this:

\newcommand*{\memfontfamily}{ppl}
\documentclass[a4paper,11pt,draft]{memoir}

But it doesn't work and the default font family is still produced in the pdf.

What am I doing wrong?

Best Answer

The default (old) Palatino package:

\documentclass[a4paper,11pt,draft]{memoir}
\usepackage[T1]{fontenc}
\usepackage{mathpazo}
\begin{document}

foo \textbf{bar} \textsf{baz} $y=\sqrt{x}$

\end{document}

Or with the new TeX Gyre Pagella (the better choice), which uses by default TeX Gyre Heros for the sans serif text:

\documentclass[a4paper,11pt,draft]{memoir}
\usepackage[T1]{fontenc}
\usepackage{newpxtext,newpxmath}
\begin{document}

foo \textbf{bar} \textsf{baz} $y=\sqrt{x}$

\end{document}