[Tex/LaTex] How to use Palatino-like math fonts in XeLaTeX

fontsmath-modemathpazoxetex

After some fighting with Asana Math, I thought that I could give a Palatino-like math font a chance. So the questions are: (1) what exactly is the difference between pxfonts and mathpazo and (2) how to enable these in XeLaTeX (\usepackage{mathpazo} seemed to break text font, which is Linux Libertine using fontspec; in case this is relevant, I can provide a MWE)?

Best Answer

If you want to load 'traditional' font packages and fontspec, load the latter first as it automatically loads either Latin Modern or Computers Modern, depending on the package options given.

\usepackage{fontspec}
\usepackage{mathpazo}

However, I would favour loading mathpazo purely for the math bits-and-pieces, and load TeX Gyre Pagella (their Palatino clone) as an OTF

\documentclass{article}
\usepackage{fontspec}
\usepackage{mathpazo}
\setmainfont
     [ BoldFont       = texgyrepagella-bold.otf ,
       ItalicFont     = texgyrepagella-italic.otf ,
       BoldItalicFont = texgyrepagella-bolditalic.otf ]
     {texgyrepagella-regular.otf}
\begin{document}
The quick brown fox jumps over the lazy dog.
\[ y = mx + c \]
\end{document}

(I've taken a 'defensive' position with the font, and loaded using the file names as installed by TeX Live in the texmf tree. If you have the font installed for general use in your system font folder, it should load fine by name.)