Dmitri Pavlov's Plain TeX macros

Unicode Plain TeX with UTF-8 encoding

UTF-8 Plain 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 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

Russian Plain TeX
This file contains Russian modifications for Plain TeX. The following aspects are covered:
Russian codes for LH fonts
This file contains codes for all additional characters of LH fonts as compared to CM fonts. Please note that six nonalphabetic characters might not be present in your character set, therefore you might need to adjust them manually.

If you want to use the A4 paper size, add the following two lines to your TeX source:
\hsize=159.4241038mm
\vsize=243.9617787mm

How to install this package

  1. Download plain-ru.tex and lhcodes.mf and recode them into an appropriate encoding. Example for the KOI8-R encoding:
    curl http://dmitripavlov.org/tex/lhcodes.mf | 9 tr №¤§„«» ─│┌┐└┘ | iconv -t koi8-r >lhcodes.mf
    curl http://dmitripavlov.org/tex/plain-ru.tex | iconv -t koi8-r >plain-ru.tex
    We have to use tr from Plan 9, because the standard GNU tr does not support UTF-8.
  2. Use INITEX to load plain-ru.tex together with some set of Russian hyphenation patterns and then perform dump. Example:
    initex '\input plain-ru \input ruhyphal \dump'
    Here we used patterns from the ruhyphal.tex file.
  3. Place the resulting plain-ru.fmt file in the appropriate directory.
  4. Now use tex -fmt plain-ru to compile a file. Alternatively, in several distributions you can setup a symbolic link to the tex executable with the same name as the corresponding .fmt file.

Issues to resolve

To complete the adaptation of Plain TeX to Russian I need to find Russian math italic fonts that are compatible in style with the 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: Russian macros for CWEB. 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 source:
\pagewidth=159.4241038mm
\pageheight=243.4537787mm
\fullpageheight=244.2157787mm
\setpage

Encoding issues

All files on this page use the UTF-8 encoding. To use some other encoding, just recode them. If you are using standard 8-bit versions of TeX and METAFONT, you must recode plain-ru.tex and lhcodes.mf to a single-byte encoding. The file lhcodes.mf might require minor additional modifications, follow the instructions in this file.

Contact

Feedback welcome by email.

All files on this page are copyrighted by Dmitri Pavlov.

You may redistribute these files under the terms of GNU General Public License version 3.