groff
[Top][All Lists]
Advanced

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

Re: [Groff] man problem under non-latin1 locale


From: Ruslan Ermilov
Subject: Re: [Groff] man problem under non-latin1 locale
Date: Thu, 21 Feb 2002 11:44:55 +0200
User-agent: Mutt/1.3.27i

On Wed, Feb 20, 2002 at 04:43:10PM +0100, Werner LEMBERG wrote:
> 
> > 1. There are several special characters used in formatting. I can
> > name at least:
> > 
> > - soft hyphenation
> > - bullets used in list
> > - right accent (in quotations like `someword')
> > 
> > All these are mapped to characters from upper part of iso-8859-1;
> > when you are using any KOI8-R they are displayed as pseudo graphic
> > with really ugly results.
> 
> groff doesn't work well without patches for non-latin1 character
> sets.  This is quite unfortunate, I know.
> 
> > Note that nroff (used in man) is already shell script here so I am
> > thinking about checking current locale and adding -m parameter that
> > would override these definitions. I know how to redefine shc - how
> > can I redefine \(bu and right accent?
> 
> Simply use the `char' request to redefine a character resp. glyph.
> 
> > 2. Russian manual pages badly need hyphenation, because average word
> > length in Russian is even larger than in English.  I tried to grab
> > TeX pattern file and format it with example of hyphen.us but it does
> > not work.  I have tried both
> > 
> > - literal text (in KOI8-R)
> > - translated into \[charXXX] (thinking groff may be confused by upper
> > characters).
> > 
> > Is it possible at all?
> 
> Yes, it is.  Please contact Ruslan Ermilov (address@hidden) who has
> completely Russified groff AFAIK (I've CCed him).
> 
Not completely.  FreeBSD runs latest groff with ascii mode KOI8-R support.

> > Another problem is _when_ to use Russian hyphenation (assuming it is
> > possible).  It must depend on man page contents not on any locale
> > set.  Is it possible to set extra parameters in man.conf depending
> > on man directory?  In this case we could call nroff for
> > /usr/share/man/ru/* with explicit -m... that loads Russian table.
> 
> The character set of the hyphenation patterns is identical to the
> input character set.  This will change if Unicode is supported (using
> iconv for all the character set conversion routines).
> 
> IIRC, the proper place for Russifying man pages is man.local and
> mdoc.local, respectively (Ruslan, please correct me if I'm wrong).
> 
We have a koi8-r device, and load the necessary bits in troffrc:

.ie "\*[.T]"koi8-r" \{\
.do hla us-ru
.do hpf hyphen.us-ru

FreeBSD's man(1) checks the user's locale settings in environment,
picks up the correct (localized) manpages (if they exist), and
passes -Tkoi8-r to groff(1) for ru_RU.KOI8-R locale manpages, etc.

For system English manpages (/usr/share/man/man*), man(1) passes
-Tlatin1 if the user's locale is en_*.ISO8859-1[5] manpages, and
-Tascii otherwise.  man(1) then caches the results in different
cat? directories:

$ ls -l /usr/share/man/en.ISO8859-1
total 11
drwxr-xr-x  2 man   wheel  512 Jan 11 12:11 cat1
drwxr-xr-x  2 man   wheel  512 Jan 11 12:11 cat1aout
drwxr-xr-x  2 man   wheel  512 Jan 11 12:11 cat2
drwxr-xr-x  2 man   wheel  512 Jan 11 12:11 cat3
drwxr-xr-x  4 man   wheel  512 Jan 11 12:11 cat4
drwxr-xr-x  2 man   wheel  512 Jan 11 12:11 cat5
drwxr-xr-x  2 man   wheel  512 Jan 11 12:11 cat6
drwxr-xr-x  2 man   wheel  512 Jan 11 12:11 cat7
drwxr-xr-x  4 man   wheel  512 Jan 11 12:11 cat8
drwxr-xr-x  3 man   wheel  512 Jan 11 12:11 cat9
drwxr-xr-x  2 man   wheel  512 Jan 11 12:11 catn
lrwxr-xr-x  1 root  wheel    7 Feb 18 16:08 man1 -> ../man1
lrwxr-xr-x  1 root  wheel   11 Feb 18 16:08 man1aout -> ../man1aout
lrwxr-xr-x  1 root  wheel    7 Feb 18 16:08 man2 -> ../man2
lrwxr-xr-x  1 root  wheel    7 Feb 18 16:08 man3 -> ../man3
lrwxr-xr-x  1 root  wheel    7 Feb 18 16:08 man4 -> ../man4
lrwxr-xr-x  1 root  wheel    7 Feb 18 16:08 man5 -> ../man5
lrwxr-xr-x  1 root  wheel    7 Feb 18 16:08 man6 -> ../man6
lrwxr-xr-x  1 root  wheel    7 Feb 18 16:08 man7 -> ../man7
lrwxr-xr-x  1 root  wheel    7 Feb 18 16:08 man8 -> ../man8
lrwxr-xr-x  1 root  wheel    7 Feb 18 16:08 man9 -> ../man9
lrwxr-xr-x  1 root  wheel    7 Feb 18 16:08 mann -> ../mann


Cheers,
-- 
Ruslan Ermilov          Sysadmin and DBA,
address@hidden          Sunbay Software AG,
address@hidden          FreeBSD committer,
+380.652.512.251        Simferopol, Ukraine

http://www.FreeBSD.org  The Power To Serve
http://www.oracle.com   Enabling The Information Age

reply via email to

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