I want to use the TeX Gyre fonts (especially the Pagella and Pagella Math) with LaTeX+dvips+ps2pdf. In the future I want to use this for PSTricks but first I've to solve my font problems.
I use this code for LaTeX+dvips+ps2pdf
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{tgpagella}
\begin{document}
Test in Pagella
\[\sum_{k=1}^n k=\frac{n(n+1)}{2}\]
\end{document}
It produces a PDF file with the text in TeX Gyre Pagella but the mathematics in Computer Modern (see screenshot)
When changing the code to the following
\documentclass{article}
\usepackage{fontenc,unicode-math}
\setmainfont[Ligatures=TeX]{TeX Gyre Pagella}
\setmathfont[Ligatures=TeX]{TeX Gyre Pagella Math}
\begin{document}
Test in Pagella
\[\sum_{k=1}^n k=\frac{n(n+1)}{2}\]
\end{document}
and processing it with LuaLaTeX in DVI-mode works well. But running dvips
afterwards produces the following errors
This is dvips(k) 5.992 Copyright 2012 Radical Eye Software (www.radicaleye.com)
' LuaTeX output 2013.04.01:1811' -> template-pstricks.ps
kpathsea: Invalid fontname `name:TeXGyrePagella:mode=node;script=latn;language=DFLT;+tlig;+trep;', contains ':'
dvips: Font name:TeXGyrePagella:mode=node;script=latn;language=DFLT;+tlig;+trep; not found; using cmr10
</usr/local/texlive/2012/texmf-dist/fonts/pk/ljfour/public/cm/dpi600/cmr10.pk>kpathsea: Invalid fontname `name:TeXGyrePagellaMath:mode=base;script=math;language=DFLT;+tlig;+trep;+ssty=1;', contains ':'
dvips: Font name:TeXGyrePagellaMath:mode=base;script=math;language=DFLT;+tlig;+trep;+ssty=1; not found; using cmr10
</usr/local/texlive/2012/texmf-dist/fonts/pk/ljfour/public/cm/dpi600/cmr10.pk>
dvips: ! invalid char 119899 from font name:TeXGyrePagellaMath:mode=base;script=math;language=DFLT;+tlig;+trep;+ssty=1;
I understand that dvips can't handle OpenType fonts, but how can I use the TeX Gyre Pagella and especially TeX Gyre Pagella Math together with PSTricks? Either LaTeX or LuaLaTeX solutions would be a great help.
Best Answer
I've now solved the problem with adding
auto-pst-pdf
to the codeAnd compiling it with
lualatex -shell-escape file.tex
produces the following out put containing just TeX Gyre Pagella and TeX Gyre Pagella Math.Great thanks to @egreg for providing this hint.
There is obiously no way to solve the problem as I wanted, so I edited my code once again
Processing it with
xelatex file.tex
produces the wanted PDF-file, containing the TeX Gyre Pagella and Pagella MathThanks to @egreg and @Ulrike Fischer for their hints. More improvement is welcome, I think there's a lot to learn for me.