groff
[Top][All Lists]
Advanced

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

Re: [Groff] Macro packages


From: Ralph Corderoy
Subject: Re: [Groff] Macro packages
Date: Mon, 24 Sep 2012 15:33:40 +0100

Hi trebol,

> Yes, I had not realize!.  I've been playing with groff in mutt using
> nvi: "groff -k -p -e -t -ms -Tutf8 -P -cobu"; and you are right, its
> changing the `-'.
>
> I can use -Tascii, but as you may have noticed, I'm not a English
> speaker, so I need send utf8 mail, and formating with groff makes the
> work easy.  Any advice?

man pages work around it:

    $ sed -n '/conservative/,/}/p' /usr/share/groff/1.20.1/tmac/an-old.tmac
    .\" For UTF-8, map some characters conservatively for the sake
    .\" of easy cut and paste.
    .
    .if '\*[.T]'utf8' \{\
    .  rchar \- - ' `
    .
    .  char \- \N'45'
    .  char  - \N'45'
    .  char  ' \N'39'
    .  char  ` \N'96'
    .\}
    $
    $ echo 'A-B\-C\N"45"D' | groff -Tutf8 | grep . | iconv -t ucs-2be | hd
    00000000  00 41 20 10 00 42 22 12  00 43 00 2d 00 44 00 0a  |.A 
..B"..C.-.D..|
    00000010
    $

In short, if you really want U+2D then AIUI you have to use \N'45'
somehow.

Cheers, Ralph.



reply via email to

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