I've just had a problem on using babel with lualatex (or xelatex as well) and fontspec in the context of latin and cyrillic alphabets. Here is a minimal example:
\documentclass[11pt]{article}
\usepackage{fontspec}
\setmainfont{Heuristica}%
\usepackage[english,russian]{babel}
\newcommand*\English{\selectlanguage{english}}
\begin{document}
\textup{\Russian Мороз и солнце, день чудесный}
\English\textit{The sea is calm to-night.}
\end{document}
And here's the resulting .pdf:
As one can see, the font used for the English part of the text is Computer Modern
, not Heuristica
, and there's not even italic where it's supposed to be italic.
However, if I change the order of the languages ([russian, english]
, everything is fine:
If I compile with pdflatex
, modifying accordingly the preamble and using the type 1 versions of the fonts instead of the opentype, everything is fine whatever the order of the languages. I tried with some other fonts, same problem. Is this a bug or do I miss something?
poetrytex
is irrelevant.fontspec
afterbabel
. But note that thefontspec
manual says thatbabel
'is not really supported' and recommendspolyglossia
(page 4). Nonetheless, it works if you change the order of loading.