# How to correctly set up Palatino font with math (related to pxfonts)

I've read many times here in TeX.SE that pxfonts has a lot of spacing inconsistencies, and that it's better to use mathpazo. The problem is that mathpazo doesn't load all the math symbols to match the font style. But pxfonts does, and, also adds a bold version of every symbol. Moreover, there exists the tgpagella package, which only loads the text font.

So here appears my first question: which is the best way of loading palatino (or a clone) fonts (I use LaTeX, not XeLaTeX)?

I suppose that the answer is mathpazo because of the problems of pxfonts. But I don't know what tgpagella offers that mathpazo doesn't.

And, my second problem. Once set up the palatino fonts (normal, italic, bold, … ), I want the math symbols (and math alphabets, like blackboard) of pxfonts. How can I do that? Do they suffer from spacing problems or not? If so, how can I solve it?

In short, which is the best way of setting up palatino (or a palatino clone) fonts and pxfonts symbols?

-
I think that now there is a tgpagella math font. –  Guido Jan 6 '13 at 16:00
@Guido the package is qpxmath but it doesn't load all the symbols. –  Manuel Jan 6 '13 at 16:14
Indeed, the new font is texgyrepagellamath.otf, but there is no support for LaTeX. –  Guido Jan 6 '13 at 16:45
there are no free math palatino fonts in Type 1! you have to buy one or use xelatex or using some substitution like kpfonts. –  Herbert Jan 7 '13 at 14:18
mathpazo is palatino with math symbols from different fonts. Load kpfonts first and then package palatino or first pxfonts and then tgpagella –  Herbert Jan 7 '13 at 14:31

There is a new font, called New PX, which seems to resolve most issues.

This package is meant to be a replacement for Young Ryu’s pxfonts—a complete text and math package with roman text font provided by a Palatino clone, sans serif based on a Helvetica clone, typewriter faces, plus math symbol fonts whose math italic letters are from a Palatino Italic clone. As with the related txfonts (though not as severe) the math metrics in pxfonts are overly tight. The goal of this new project is use those existing glyphs along with a few additions and with completely reworked metrics which are generally looser, but not as loose as Computer Modern math. The following small examples (double normal size) provide some idea of the extent of the changes.

This pack­age, based on px­fonts, pro­vides many fixes and en­hance­ments to that pack­age, split­ting it in two parts —new­px­text and new­px­math— which may be run in­de­pen­dently of one an­other. It pro­vides scal­ing, im­proved met­rics, and other op­tions. For proper op­er­a­tion, the pack­ages re­quire that the pack­ages newtx­math and px­fonts be in­stalled and their map files en­abled.

-

Edit: this answer works for XeLaTeX or LuaLaTeX, but Manuel explicitly stated he wanted to use plain 'LaTeX' (i.e. the TeX or pdfTeX engine?). My mistake. I know nothing about T1 fonts, alas.

TeX Gyre Pagella has a math font nowadays. I can't speak to matters of spacing, but I very much trust the GUST e-foundry to do such things properly. After all, TeX Gyre and Latin Modern (which the GUST e-foundry is also responsible for) are pretty important projects.

Below is the skeleton of the TeX Gyre Pagella Math test file. I'm mostly use ConTeXt these days, but I think these three lines are the essential ones:

\usepackage{fontspec}
\usepackage{unicode-math}
\setmathfont[math-style=ISO,bold-style=ISO,vargreek-shape=TeX]{TeX Gyre Pagella Math}


Here is the entire skeleton and a picture of its output. For the math code, see math-test.tex in the font's zip file. (TeX Gyre Math page, click through to the download page.)

%% This is a test file for LaTeX/Unicode-Math for both LuaLaTeX and XeLaTeX

\documentclass[12pt,a4paper]{article}

\usepackage{amsmath}[2000/07/18] %% Displayed equations

\usepackage{fontspec}
\setromanfont[Ligatures=TeX]{TeX Gyre Pagella}
\usepackage{unicode-math}

\setmathfont[math-style=ISO,bold-style=ISO,vargreek-shape=TeX]{TeX Gyre Pagella Math}

\begin{document}

% math math math

\end{document}


-
The problem is that I wanted (I've already set up my fonts) to do in LaTeX, not in XeLaTeX. Finally, I decided to go for \usepackage{mathpazo,mathabx} (with a few glyphs taken from other fonts). But, of course I like Asana Math and TG Pagella Math for XeLaTeX. –  Manuel Feb 6 '13 at 13:55
Gah, my eyes totally missed that. Sorry! –  Esteis Feb 6 '13 at 14:00