# Using PTSerif-TLF for Cyrillic with TeX Gyre Pagella

I want to include some Cyrillic with a TeX Gyre Pagella text and math font document. I'm using TeXLive 2019.

As indicated in Using cyrillic with Tex Gyre Pagella and pdflatex?, running pdflatex on the following source works just fine:

\documentclass{article}

\usepackage[T1,T2A]{fontenc}
\usepackage[russian,main=english]{babel}
\usepackage{paratype}
\usepackage{tgpagella}
\usepackage{substitutefont}
\substitutefont{T2A}{\rmdefault}{PTSerif-TLF}

\usepackage{amsmath}

\usepackage[math]{blindtext}

\begin{document}

The topologist is {\Russian Алекс\'{а}ндров}.

\blindmathpaper

\end{document}


However, running xelatex on the following surce produces output from which the indicated Cyrillic just disappears:

\documentclass{article}

\usepackage[T2A,T1]{fontenc}
\usepackage[russian,main=english]{babel}
\usepackage{amsmath} % load here to avoid \dddot clash
\usepackage{fontspec}
\usepackage{paratype}
\setmainfont[Ligatures=TeX]{TeX Gyre Pagella}
\usepackage{substitutefont}%
\substitutefont{T2A}{\rmdefault}{PTSerif-TLF}%
\usepackage{unicode-math}
\setmathfont{TeX Gyre Pagella Math}

\usepackage[math]{blindtext}

\begin{document}

The topologist is {\Russian Алекс\'{а}ндров}.

\blindmathpaper

\end{document}


Question: How should this second source be fixed so as to allow the Cyrillic to appear, too?

(I did put Map paratype-truetype.map into my local updmap.cfg file and did run updmap-user.)

• do not use legacy 8-bit encodings such as T2A and T1 with xetex – David Carlisle Jun 30 '19 at 21:07
• @DavidCarlisle: So if I use pdflatex instead, and therefore omit \usepackage{fontspec}, what do I do instead of the \setmainfont and \setmathfont commands? – murray Jun 30 '19 at 21:28
• Or, in the alternative, if I do want to use xelatex, what do I do about encodings with babel and PTSerif-TLF? – murray Jun 30 '19 at 21:40
• You would load the tgpagella package and not load fontspec. However, I recommend using modern Unicode fonts if you can. (Pagella is a clone of Palatino, and the real deal has Cyrillic letters.) – Davislor Jul 1 '19 at 3:40

If you are using XeTeX or LuaTex you should use other ways of switching fonts. One nice way is offered by babel with its \babelfont command:

\documentclass{article}

\usepackage[russian,main=english]{babel}
\usepackage{amsmath} % load here to avoid \dddot clash
\babelfont{rm}[Ligatures=TeX]{TeX Gyre Pagella}
\babelfont[russian]{rm}[Ligatures=TeX]{PT Serif}
\usepackage{unicode-math}
\setmathfont{TeX Gyre Pagella Math}

\usepackage[math]{blindtext}

\begin{document}

The topologist is {\Russian Алекс\'{а}ндров}.

\blindmathpaper

\end{document}


Result:

• Also note that TeX Gyre Pagella is a clone of Palatino, and the authentic Palatino Linotype has Cyrillic letters. – Davislor Jul 1 '19 at 3:33

XeLaTeX and LuaLaTeX use a completely different paradigm for fonts, because everything is available in a single output encoding, namely TU. Thus substitutefont does nothing sensible here.

You could use \babelfont as suggested in the other answer, but you will get several spurious warnings: support for fonts in babel is still in development.

With polyglossia:

\documentclass{article}

\usepackage{polyglossia}
\usepackage{amsmath}
\usepackage{unicode-math}

\setmainlanguage{english}
\setotherlanguage{russian}

\setmainfont{TeX Gyre Pagella}
\newfontfamily{\cyrillicfont}{PT Serif}
\setmathfont{TeX Gyre Pagella Math}

\usepackage[math]{blindtext}

\begin{document}

The topologist is \foreignlanguage{russian}{Алекс\'{а}ндров}.

\blindmathpaper

\end{document}


• My sincere compliments also for \blindmathpaper :-) that I not knew. – Sebastiano Jun 30 '19 at 21:53
• @Sebastiano \blindmathpaper comes from blindtext. It was in the code from the OP. – egreg Jun 30 '19 at 21:54
• State exams blurred my eyesight :-). Congratulations the same. :-) – Sebastiano Jun 30 '19 at 21:56
• This works just fine, too. (I prefer the answer using babel instead of polyglossia simply because, if I make different font family choices for my project, things are already set up for pdfLaTeX rather than for XeLaTeX. I may change my mind!) – murray Jul 1 '19 at 14:08