groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Groff] koi8-r hyphenation revisited


From: Werner LEMBERG
Subject: Re: [Groff] koi8-r hyphenation revisited
Date: Wed, 26 Jul 2006 10:35:03 +0200 (CEST)

> I want groff to be able to hyphenate documents written in
> koi8-r (in Russian, actually :)). I only aim for Postscript
> output. I use ruhyphal.tex as hyphenation patterns
> (.hpfa ruhyphal.tex).

  1. Call afmtodit like this to generate the groff metric file.

       afmtodit sform10.afm textmap SFOR

     There are some additional Cyrillic glyphs in the font, but it
     shouldn't be necessary to handle them for Russian.

     No need for an -e switch.  Additionally, using groff's `textmap'
     file is fully sufficient since the groff glyph names which can't
     be derived algorithmically are frozen.

  2. Move SFOR to your local groff font directory
     (.../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

  5. Move the file `ruhyphal.tex' to groff's local macro directory
     (.../site-tmac/).

  6. groff needs a valid encoding for hyphenation.  `valid' means that
     only characters in the range 0xA0-0xFF are used additionally.
     Since all the Cyrillic characters from koi8-r are located in this
     range, no special .hpfcode values are necessary.

     Nevertheless, you have to set up proper .hcode values (in the
     same encoding as the hyphenation patterns; this is koi8-r) to get
     correct hyphenation for uppercase letters also.  See attached
     file `ru.tmac'.

     Please note that I don't know the proper value for the `.hy' and
     `.ss' requests -- you should add this to `ru.tmac'.

     This file should be placed in groff's local macro directory.

  7. You also need a file which maps the input characters (in koi8-r
     encoding) to groff character entities.  See attached file
     `koi8-r.tmac', which is included by `ru.tmac'.

     This file should be placed in groff's local macro directory.

That's it.  Call a test document with

  groff -mru test > test.ps


     Werner
.trin \[char163]\[u0451]
.trin \[char179]\[u0401]
.trin \[char192]\[u044E]
.trin \[char193]\[u0430]
.trin \[char194]\[u0431]
.trin \[char195]\[u0446]
.trin \[char196]\[u0434]
.trin \[char197]\[u0435]
.trin \[char198]\[u0444]
.trin \[char199]\[u0433]
.trin \[char200]\[u0445]
.trin \[char201]\[u0438]
.trin \[char202]\[u0439]
.trin \[char203]\[u043A]
.trin \[char204]\[u043B]
.trin \[char205]\[u043C]
.trin \[char206]\[u043D]
.trin \[char207]\[u043E]
.trin \[char208]\[u043F]
.trin \[char209]\[u044F]
.trin \[char210]\[u0440]
.trin \[char211]\[u0441]
.trin \[char212]\[u0442]
.trin \[char213]\[u0443]
.trin \[char214]\[u0436]
.trin \[char215]\[u0432]
.trin \[char216]\[u044C]
.trin \[char217]\[u044B]
.trin \[char218]\[u0437]
.trin \[char219]\[u0448]
.trin \[char220]\[u044D]
.trin \[char221]\[u0449]
.trin \[char222]\[u0447]
.trin \[char223]\[u044A]
.trin \[char224]\[u042E]
.trin \[char225]\[u0410]
.trin \[char226]\[u0411]
.trin \[char227]\[u0426]
.trin \[char228]\[u0414]
.trin \[char229]\[u0415]
.trin \[char230]\[u0424]
.trin \[char231]\[u0413]
.trin \[char232]\[u0425]
.trin \[char233]\[u0418]
.trin \[char234]\[u0419]
.trin \[char235]\[u041A]
.trin \[char236]\[u041B]
.trin \[char237]\[u041C]
.trin \[char238]\[u041D]
.trin \[char239]\[u041E]
.trin \[char240]\[u041F]
.trin \[char241]\[u042F]
.trin \[char242]\[u0420]
.trin \[char243]\[u0421]
.trin \[char244]\[u0422]
.trin \[char245]\[u0423]
.trin \[char246]\[u0416]
.trin \[char247]\[u0412]
.trin \[char248]\[u042C]
.trin \[char249]\[u042B]
.trin \[char250]\[u0417]
.trin \[char251]\[u0428]
.trin \[char252]\[u042D]
.trin \[char253]\[u0429]
.trin \[char254]\[u0427]
.trin \[char255]\[u042A]

Attachment: ru.tmac
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]