
Quiero usar las fuentes TeX Gyre (especialmente Pagella y Pagella Math) con LaTeX+dvips+ps2pdf. En el futuro quiero usar esto para PSTricks pero primero tengo que resolver mis problemas de fuentes.
Yo uso este código para 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}
Produce un archivo PDF con el texto en TeX Gyre Pagellaperolas matemáticas en Computer Modern (ver captura de pantalla)
Al cambiar el código al siguiente
\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}
y procesarlo con LuaLaTeX en modo DVI funciona bien. Pero ejecutar dvips
después produce los siguientes errores
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;
Entiendo que dvips no puede manejar fuentes OpenType, pero ¿cómo puedo usar TeX Gyre Pagella y especialmente TeX Gyre Pagella Math junto con PSTricks? Las soluciones LaTeX o LuaLaTeX serían de gran ayuda.
Respuesta1
Ahora he resuelto el problema al agregar auto-pst-pdf
al código.
\documentclass{article}
\usepackage{auto-pst-pdf}
\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}
Y al compilarlo lualatex -shell-escape file.tex
se produce el siguiente resultado que contiene solo TeX Gyre Pagella y TeX Gyre Pagella Math.
Muchas gracias a @egreg por brindar esta pista.
Mejorado gracias al comentario de @Ulrike Fischer
Obviamente no hay manera de resolver el problema como quería, así que edité mi código una vez más.
\documentclass{article}
\usepackage{pstricks}
\usepackage{xltxtra}
\usepackage{xunicode}
\usepackage{fontenc}
\usepackage{unicode-math}
\setromanfont[Ligatures=TeX]{texgyrepagella-regular.otf}
\setmathfont[Ligatures=TeX]{texgyrepagella-math.otf}
\begin{document}
Test in Pagella
\[\sum_{k=1}^n k=\frac{n(n+1)}{2}\]
\begin{pspicture}(3,3)
\psline{->}(1,1)(3,2)
\psline{->}(1,1)(3,1)
\rput(2,2){$x$}
\end{pspicture}
\end{document}
Procesarlo xelatex file.tex
produce el archivo PDF deseado, que contiene TeX Gyre Pagella y Pagella Math
Gracias a @egreg y @Ulrike Fischer por sus sugerencias. Se agradecen más mejoras, creo que hay mucho que aprender para mí.