Dmitri Pavlov's Plain TeX page
Unicode Plain TeX with UTF-8 encoding
- plain-utf8.tex
- This file provides mapping from a part
of Unicode's code space encoded in UTF-8 into TeX commands.
Most of TeX's \chardef/\mathchardef definitions are covered.
See the comments in the file for exceptions.
Current experimental version only has support for math symbols
and a few letters and punctuation signs.
So far there is no support for accented letters.
Russian Plain TeX
Contents of the package
- plain-ru.tex
- This file contains Russian modifications
for Plain TeX. The following aspects are covered:
- Computer Modern fonts are replaced by LH fonts, which coincide with CM fonts in ASCII
range and add Russian letters and a few other characters (« » „ ¤ § №). Unfortunately, for some strange reason LH fonts do not have math italic Russian letters,
therefore you should substitute italic fonts for math italic in this case.
For example, to typeset д=ж+ц you have to type $\it д=ж+ц$.
You can find LH fonts on CTAN website.
- Russian hyphenation. By default, Russian hyphenation is used.
To switch to English hyphenation, use \language0. To return to Russian hyphenation,
use \language1.
You have to supply a file named hyphen-ru.tex with Russian hyphenation patterns.
You can find several Russian hyphenation patterns on CTAN website.
Personally, I use ruhyphas.tex, but you can use any other pattern set.
- Russian letter codes are set properly. This includes:
- Category codes: You can now use Russian letters in command names.
- Upper and lower case codes: \uppercase and \lowercase work with Russian letters.
- Space factor codes: Russian letters now enjoy proper spacing.
- Math codes: You can now use Russian letters in math in the same way as English letters,
provided that you do not use math italic with Russian letters (see above).
- lhcodes.mf
- This file contains codes for all additional
characters of LH fonts with respect to CM fonts. Please note that six non-letter
character codes use explicit numeric values, therefore you have to change them
manually if you change the encoding of this file.
If you want to use the standard European A4 paper size,
add the following two lines to your TeX source:
\hsize=159.4241038mm
\vsize=243.9617787mm
How to install this package
- Save plain-ru.tex and lhcodes.mf into the same directory.
- Run tex -ini plain-ru.tex and type \dump when TeX finishes its job.
- Place the resulting plain-ru.fmt file in the format file directory (usually texmf-var/web2c).
- Now use tex -fmt plain-ru filename to compile filename.
- Alternatively, in several distributions you may setup a symbolic link to tex with the same
name as the corresponding .fmt file.
Issues to resolve
- Since English and Russian use non-intersecting character
sets, there is no need to use TeX language mechanism.
- To complete the adaptation of Plain TeX
to Russian I need to find Russian math italic fonts
that are compatible in style with CM and LH fonts.
Can anyone recommend any fonts?
Russian CWEB
I was unsatisfied with the poor quality of the existing adaptations of CWEB
to the Russian language and decided to make my own translation.
Here is the result: cwebmac-ru.tex.
All built-in English phrases are translated. LH fonts are used.
If you want to use the A4 paper size with CWEB,
add the following four lines to your TeX source:
\pagewidth=159.4241038mm
\pageheight=243.4537787mm
\fullpageheight=244.2157787mm
\setpage
Encoding issues
All the three files use the standard Russian encoding KOI8-R.
If you want to use some other one-byte encoding, just recode them.
Also the file lhcodes.mf requires minor manual modifications.
Follow the instructions in this file.
Contact
Feedback welcome: pavlov at math.
All files on this page are copyright © 2008 by Dmitri Pavlov.
You may redistribute these files under the terms of GNU General Public License version 3.