KoiToPS


This section describes how to setup groff to handle KOI8-R input and hyphenation. Font metric generation and font installation for Postscript output are also covered (but see AddingFonts for more detailed instructions).

Note that the described procedure does not work with groff version 1.19.2. You need at least version 1.19.3 (which was only available from CVS as of writing).

1) Call afmtodit like this to generate the groff metric file:

 afmtodit sform10.afm textmap SFOR

where sform10.afm is the Adobe Metric File for your font and SFOR is the desired groff font name.

2) Move SFOR to your local groff font directory (usually /usr/share/groff/site-font/devps).

3) Say

 pfb2pfa sform10.pfb

and move sform10.pfa to your local groff font directory.

4) Copy the file `download' from groff's default devps directory to your local font directory and append this line:

 SFORM10 sform10.pfa

where SFORM10 is the `internalname' as it appears in SFOR.

5) Get hold of a Russian hyphenation patterns file (I recommend ruhyphal.tex which comes with most TeX? distributions--also available as http://geolsoft.freeshell.org/groff-koi8r/ruhyphal.tex) and move it to groff's local macro directory (usually /usr/share/groff/site-tmac). Note that these instructions assume that the patterns file is in KOI8-R encoding by default, which is the case for ruhyphal.tex.

6) Download http://geolsoft.freeshell.org/groff-koi8r/koi8-r.tmac and http://geolsoft.freeshell.org/groff-koi8r/ru.tmac and place them in groff's local macro directory. (If your hyphenation patterns file is not called ruhyphal.tex you will need to edit ru.tmac accordingly).

That's it. To use the hyphenation patterns, call groff like this:

 groff -mru test > test.ps

Thanks to Werner Lemberg for explaining this on the groff mailing list.


Edit KoiToPS FrontPage PageList RecentChanges PageHistory