Setting up Russian in LaTeX

I had been looking on the internet for an easy way to set up LaTeX in Russian quickly and painlessly without having to type the 'transliteration' of the Russian sounds in the latin alphabet, that is, being able to type in Cyrillic from the get-go. For some reason (perhaps my incompetence in searching) I did not find anything. Eventualy I wrote to someone in Moscow and have received some simple guidelines to set this up from Victor Shuvalov from the MCCME publishing company, from whom I will paraphrase.

The package you want to use is the babel package, which is the main tool when working with multiple languages in LaTeX. I believe most LaTeX installations already come with this.

First, you will need to add the hyphenation table for Russian to your LaTeX format file. This can be done in several ways, but you can always do it in the following two steps:

1) Edit language.dat and uncomment the following line: russian ruhyph.tex
There may be a program in your TeX distribution which already does this for you, so check that first.

2) Rebuild the LaTeX format file. For Unix systems, type mktexlsr (you have to be root!).
Again, there may be some program in your TeX distribution which may help you out with this.

Apparently, even if you don't uncomment the Russian hyphenation tables you will still be able to write, but apparently it will not look right. I have not personaly verified this.

Next, add the following lines to the preamble of your document:

\usepackage[koi8-r]{inputenc} % your input encoding
\usepackage[T2A]{fontenc} % optional
\usepackage[russian]{babel}

Your input encoding will probably be koi8-r for Linux and cp1251 if you are using Windows. The second line is optional and there is no need to change it in most cases.

And..... VOILA! You are set up to begin TeXing in Russian. These instructions worked for me using Linux. Regardless of the operating system, you should first figure out how to set up your keyboard in the Russian layout, and I recommend test driving a few text editors when typing Russian because sometimes they will save the tex files correctly in the koi8-r way, but when you open the files you may not be able to read anything at all.

Finaly, it is possible to set up babel to work with any number of languages you want:

\usepackage[russian,french,english]{babel}

The last language (english in this case) is loaded as the default language. Switching to another language is done like this:

\begin{otherlanguage}{russian}
...................
\end{otherlanguage}

or

\foreignlanguage{russian}{............}

Once again, thanks to Victor for his help.

If you have questions or comments, feel free to email me.

Note

Back.