I am writing an article in English, with some pages in Russian.
\documentclass[12pt]{article}
\usepackage[T1,T2A]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[russian,english]{babel}
\usepackage{newtxmath}
\usepackage{newtxtext}
\begin{document}
hello \textbf{hello}
\selectlanguage{russian} привет \textbf{привет}
\end{document}
Output:
hello hello привет привет
I am using \selectlanguage{}
to switch between languages when needed.
However, I noticed that when I try to use \textbf{}
when in Russian language mode, it does not work because of newtxtext, which I am using for math formulas.
Does anyone know how to solve this problem?
Thank you.
Best Answer
You get two warnings:
because
newtxtext
doesn't support Cyrillic. Thus the standard font family is substituted (first warning), but the second substitution points back to the same font, because LaTeX knows nothing aboutntxtlf
in T2A encoding.Solution: substitute with a font family using Times, but supporting Cyrillic.
Note that, in any case,
newtxmath
must be loaded after the font package for text, be ittempora
ornewtxtext
.You can use
newtxtext
, though, provided you set up Tempora for Cyrillic.