Babel – Fixing Russian Language Bold Font Problem with Newtxtext

babelboldlanguagesnewtxrussian

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:

LaTeX Font Warning: Font shape `T2A/ntxtlf/m/n' undefined
(Font)              using `T2A/cmr/m/n' instead on input line 12.

LaTeX Font Warning: Font shape `T2A/ntxtlf/bx/n' undefined
(Font)              using `T2A/ntxtlf/m/n' instead on input line 12.

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 about ntxtlf in T2A encoding.

Solution: substitute with a font family using Times, but supporting Cyrillic.

\documentclass[12pt]{article}
\usepackage[T2A,T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[russian,english]{babel}
%\usepackage{newtxtext}
\usepackage{tempora} % this supports Cyrillic
\usepackage{newtxmath}


\begin{document}

English: hello \textbf{hello}

Russian: \foreignlanguage{russian}{привет \textbf{привет}}

\end{document}

Note that, in any case, newtxmath must be loaded after the font package for text, be it tempora or newtxtext.

enter image description here

You can use newtxtext, though, provided you set up Tempora for Cyrillic.

\documentclass[12pt]{article}
\usepackage[T2A,T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[russian,english]{babel}
\usepackage{newtxtext}
\usepackage{newtxmath}
\usepackage{substitutefont}

\substitutefont{T2A}{\rmdefault}{Tempora-TLF}


\begin{document}

English: hello \textbf{hello}

Russian: \foreignlanguage{russian}{привет \textbf{привет}}

\end{document}
Related Question