Previous Next Contents

7. Cyrillic wordprocessing

7.1 TeX-based environments

In this section I'll describe several ways to make TeX and LaTeX typeset Cyrillic texts. There are several ways, which differ in setup sophistication and usage convenience. For example, one possibility is to start without any preliminary setup and use the Washington AMSTeX Cyrillic fonts. On the other hand, you may install a LaTeX package, providing a very high degree of Cyrillic setup. I have an experience with two such 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 one 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, that 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. I describe a LaTeX 2e setup.

Also, both of these packages require the Cyrillic text to be typeset using the Alt codeset, not KOI8-R! 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 KOI8-R requires some effort and is being expected to be done soon. So far, use some utility to convert your russian text from KOI8-R to Alt. See section user-tools.

Using the Washington Cyrillic

This package was created for the American Mathematic Society to provide documents with Russian references. Therefore, the authors were not very careful and the fonts look quite clumsy. This package is usually referred to as a "really bad cyrillic package for TeX".

Nevertheless, we'll discuss it, because it is very easy to use and doesn't require any setup - this collection is supplied with most of TeX distributions.

Of course, you won't be able to use such luxury as automatic hyphenation, but anyway...

1. Prepend your document with the following directives:

\input cyracc.def
\font\tencyr=wncyr10
\def\cyr{\tencyr\cyracc}

2. Now to type a cyrillic letter, you enter

\cyr 

and use a corresponding latin letter or a TeX command. Thus, the lower case of the Russian alphabet is expressed by the following codes:

a b v g d e \"e zh z i {\u i} k l m n o p r s t u f kh c ch sh shch
{\cprime} y {\cdprime} \`e yu ya

It is extremely inconvenient to convert your Russian texts to such encoding, but you can automate the process. The translit program (section user-tools) supports a TeX output option.

KOI-8 package for teTeX

There is some new teTeX-rus package. It is reported to support KOI-8 character set and have all basic stuff required for TeX and LaTeX. I personally haven't tried it yes, although I heard about it's successfull usage.

NOTE: This package requires you to reconfigure and rebuild some parts of your teTeX package (for example the precompiled LaTeX macros). Unless you know what you are doing, you shouldn't try it without necessary care. Otherwise, you may be better off by borrowing the precompiled parts fron somebody on the net

Using the cmcyralt package for LaTeX

The cmcyralt package can be found on any CTAN (Comprehensive TeX Archive Network) site like ftp.dante.de. You should obtain two pieces: 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.

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 too much the previous one.

7.2 The StarOffice suite

Youri Kovalenko ( http://www.inp.nsk.su/~kovalenko) has compiled a concise summary on StarOffice russification. It is located at ftp://sky.inp.nsk.su/archives_src/linux/StarOffice/russification.txt. I never had a chance to try it, so I cannot say anything about it's correctness.

Another source of information on the subject is compiled by Eugene Demidov ( mailto:jack@gpi.ru) and is located at ftp://ftp.kapella.gpi.ru/pub/cyrillic/psfonts/README.


Previous Next Contents