Previous Next Contents

5. Cyrillic support in LaTeX

In this section I'll describe the procedure of making LaTeX typeset Russian. LaTeX is a macro package for TeX offering the user many useful styles, templates, and commands. If you are making your mind on what package to use, I personally suggest LaTeX. Moreover, there are two versions of LaTeX available - 2.09 is the old one, while 2e is a new pre-3.0 release. If you are using LaTeX 2.09, then switch quickly to the 2e. The latter retains compatibility with the old one, but has much more features. Hopefully, version 3 will be released soon. So far I describe the LaTeX 2e setup.

I have an experience with two packages. One is the cmcyralt package by Vadim V. Zhytnikov (vvzhy@phy.ncu.edu.tw) and Alexander Harin (harin@lourie.und.ac.za), and the other is the LH package by the CyrTUG group with styles and hyphenation for LaTeX2e by Sergei O. Naoumov (serge@astro.unc.edu). I'll describe both.

Note: Both of these packages require the Cyrillic text to be typeset using the Alt codeset, not KOI-8! This is caused by historical reasons, since the creators of these packages used to work with EmTeX - the MS-DOG version of TeX (they didn't know about Linux yet :-). Switching to the KOI-8 requires some effort and is being expected to be done soon. So far, use some utility to convert your russian text from KOI-8 to Alt. See section User's tools.

5.1 Using the cmcyralt package

The cmcyralt package can be found on any CTAN (Comprehensive TeX Archive Network) site like ftp.dante.de. You should get two collections: the fonts collection from fonts/cmcyralt and the styles and hyphenation rules from macros/latex/contrib/others/cmcyralt.

Note: Make sure you have the Sauter package installed, since cmcyralt requires some fonts from it. You can get this package from CTAN site as well.

Now you should do the following:

  1. Put the new fonts to the TeX fonts tree. On my system (Slackware 2.2) I created a cmcyralt directory in the /usr/lib/texmf/fonts/cm/. Create the src, tfm, and vf subdirectories in it. Put there .mf, .tfm, and vf files respectively.
  2. Put the font driver files (*.fd) from the styles archive to the appropriate place (in my case it was /usr/lib/texmf/tex/latex/fd).
  3. Put the style files (*.sty) to the appropriate LaTeX styles directory (in my case /usr/lib/texmf/tex/latex/sty).

Now the hyphenation setup. This requires to remake the LaTeX base file.

  1. The file hyphen.cfg contains the directives for both English and Russian hyphenation. Extract the one for Russian and place it to the LaTeX hyphenation config file lthyphen.ltx. In my case, that file was in /usr/lib/texmf/tex/latex/latex-base.
  2. Put the rhyphen.tex to the same directory. It is needed for making the new base file. Later, you can remove it.
  3. Do 'make' in that directory. Don't for get to make a link from Makefile to Makefile.unx. During the make process check the output. There should be a message:
    Loading hyphenation patterns for Russian.
    
    If everything goes OK, you will get the new latex.fmt in that directory. Put it to the appropriate place, where the previous one was (like /usr/lib/texmf/ini/). Don't forget to save the previous one!.

This is it. The installation is complete. Try processing the examples found in the styles archive. If you are to create the PostScript files without any problems, then everything is OK. Now, to use Cyrillic in LaTeX, prepend your document with the following directive:

\usepackage{cmcyralt}

For more details, see the README file in the cmcyralt styles archive.

Note: if you do have problems with the examples, provided you have installed the things right, then probably your TeX system hasn't been installed correctly. For example, during my first try, every attempt to create the .pk files for the russian fonts failed (MakeTeXPK stage). A substantial investigation discovered some implicit conflict between the localfont and ljfour METAFONT configurations. It used to work before, but kept crashing after the cmcyralt installation. Contact your local TeX guru - TeX is very (sometimes too much) complicated to reconfigure it without any prior knowledge.

5.2 Using the CyrTUG package

You can obtain the CyrTUG package from the SunSite archive. Get the files CyrTUGfonts.tar.gz, CyrTUGmacro.tar.gz, and hyphen.tar.Z.

The process of installation doesn't differ from the previous one.


Previous Next Contents