[Tex/LaTex] How to combine LaTeX fonts with system fonts in XeLaTeX

fontsunicode-mathxetex

I am using URW Palladio L for my main text font. I have no math font of URW Palladio L on my system installed, but I like the math font of Bitstream Charter. Alternateively I could also use the URW Palladio font of LaTeX.

This is how I set my main font

\setmainfont{URW Palladio L}

What about the math font? Should I use \setmathfont, but to what value, it's
not a system font. If I simply add the package, it looks like I get the behavior I want, except that the font for the Bibliography heading, title etc. becomes a font I have not seen yet.

\usepackage[bitstream-charter]{mathdesign}

This seems really bogus, how I solve this properly?

Best Answer

There're many possible solutions, for example:

  • A modern solution, use TeX Gyre Pagella (a Palatino clone) together with TeX Gyre Pagella Math or Asana Math.

    \documentclass{article}
    
    \usepackage{fontspec}
    \setmainfont{TeX Gyre Pagella} % or URW Palladio L
    
    \usepackage{unicode-math}
    \setmathfont{TeX Gyre Pagella Math}
    
    
    \begin{document}
    
    Let $f$ be holomorphic on a closed disc $\overline{D}(z_0, R)$, $R>0$. Let $C_R$ be the circle bounding the disc. Then $f$ has a power series expansion
    \[
      f(z) = \sum_{n=0}^{\infty} \frac{(z-z_0)^n}{2\pi\mathrm{i}}
        \int_{C_R} \frac{f(\zeta)}{(\zeta-z_0)^{n+1}} \mathrm{d}\zeta.
    \]
    
    \end{document}
    

    enter image description here

    ......
    \setmainfont{TeX Gyre Pagella} % or URW Palladio L
    \setmathfont{Asana Math}
    ......
    

    enter image description here

  • A traditional solution, use pxfonts or newpxtext/newpxmath package. Why not? We don't always need fontspec to select the main font. Note that you may need to change the font encoding between T1/OT1 and EU1 manually sometimes.

    \documentclass{article}
    
    \usepackage{fontspec}
    \newfontfamily\inconsolata{Inconsolatazi4}
    
    \usepackage{pxfonts}
    \usepackage[T1]{fontenc}
    
    \begin{document}
    
    Let $f$ be holomorphic on a closed disc $\overline{D}(z_0, R)$, $R>0$. Let $C_R$ be the circle bounding the disc. Then $f$ has a power series expansion
    \[
      f(z) = \sum_{n=0}^{\infty} \frac{(z-z_0)^n}{2\piup\mathrm{i}}
        \int_{C_R} \frac{f(\zeta)}{(\zeta-z_0)^{n+1}} \mathrm{d}\zeta.
    \]
    
    {\inconsolata Something special. 01234}
    
    \end{document}
    

    enter image description here

  • What exactly you want — Palatino together with mathdesign. There is nothing magic:

    ......
    \usepackage[charter]{mathdesign} % Use it before fontspec
    \usepackage{fontspec}
    \setmainfont{TeX Gyre Pagella} % or URW Palladio L
    ......
    

    enter image description here