2

I want to change LaTeX engine from PdfLaTeX to XeLaTeX. There are a lot of formulas and equations with Russian text inside. And it used without any commands.

MWE for pdflatex:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[russian]{babel}
\usepackage{mathtext} 
\usepackage[T2A]{fontenc} 

\begin{document}

    Формула: $F_{подпись} = Ф$

    Уравнение:
    \begin{equation}
    X_{первый} = Y_{второй}
    \end{equation}

\end{document}

I tried the same example with XeLaTeX. There is no errors, but Russian characters are displayed only with \textup command, like it was said in this answer:Cyrillic symbols in math equation xetex

\documentclass{article}
\usepackage{unicode-math}
\usepackage{polyglossia}  
\setdefaultlanguage{russian}  
\setmainfont{Liberation Serif} 
\setmathfont{Asana Math}

\begin{document}

    Формула: $F_{подпись} = Ф$

    Уравнение:
    \begin{equation}
    X_{первый} = Y_{\textup{второй}}
    \end{equation}

\end{document}

Are there any ways to do it without \textup?

Bernard
  • 271,350

0 Answers0