3

I was using template and I tried to quote that were written in cyrillic. In my template there is a part that define language:

\usepackage{lmodern}   
\usepackage[ngerman]{babel}  
\usepackage[babel,german=quotes]{csquotes}  
\usepackage[utf8]{inputenc}  
\usepackage[T1]{fontenc}  
\newcommand{\changefont}[3]{\fontfamily{#1} \fontseries{#2} \fontshape{#3} 
\selectfont}   
\changefont{ptm}{m}{n}

How can I add cyrillic alphabet to that?

4
  • Do you want to use Times across the whole document?
    – egreg
    Dec 4, 2019 at 21:37
  • 3
    Welcome to TeX.SX! The easiest way would be to use either XeLaTeX or LuaLaTeX and a font that offers support for both alphabets. Other than that, change the options you call babel with to include both languages (with the main language of the document being the last passed language): \usepackage[russian,ngerman]{babel}. Then you can change to the other language for passages of your document with \begin{otherlanguage}{russian} ... \end{otherlanguage}. You can also define another font to be used for the russian parts with babel.
    – Skillmon
    Dec 4, 2019 at 21:37
  • 1
    @Skillmon This appears to be an answer to be. You could post it as such. ;) Dec 4, 2019 at 21:42
  • @OlegLobachev I will vote surely the Skillimon's answer.
    – Sebastiano
    Dec 4, 2019 at 21:55

1 Answer 1

5

The easiest way would be to use XeLaTeX or LuaLaTeX and use a font that supports both languages.

Also you should load the babel package with support for each language you're using in your document, with the main language being loaded last. So if your document is in German with small parts in Russian, you'd use

\usepackage[russian,ngerman]{babel}

Then you can switch to the other language for parts of the document with the babel macros \foreignlanguage or \begin{otherlanguage}.

If you don't have a font that supports all the languages (or the main font you want to use for the one language simply doesn't) you can also set up a different font for specific languages. For this you can use \babelfont to define the used fonts:

\babelfont{rm}{TeX Gyre Pagella}
\babelfont[russian]{rm}{Liberation Serif}

would set up the TeX Gyre Pagella font for the rm-family by default, but use Liberation Serif in the Russian parts.

Note that if you decide to use either XeLaTeX or LuaLaTeX you don't need to use fontenc nor inputenc.

A (really) small example document setting up the three font families rm, sf and tt:

\documentclass[]{article}

\usepackage[russian,ngerman]{babel}
\babelfont{rm}{TeX Gyre Pagella}
\babelfont{sf}{TeX Gyre Heros}
\babelfont{tt}{TeX Gyre Cursor}
\babelfont[russian]{rm}{Liberation Serif}
\babelfont[russian]{sf}{Liberation Sans}
\babelfont[russian]{tt}{Liberation Mono}

\begin{document}
Das ist Deutsch.
\foreignlanguage{russian}{Это русский.}
Das ist Deutsch.

\begin{otherlanguage}{russian}
  Это русский.
  Это русский.
  Это русский.
\end{otherlanguage}

Das ist Deutsch.
Das ist Deutsch.
Das ist Deutsch.
\end{document}
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .