groff
[Top][All Lists]
Advanced

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

Re: [Groff] Getting properly rendered single quotes in groff


From: Ralph Corderoy
Subject: Re: [Groff] Getting properly rendered single quotes in groff
Date: Wed, 11 Jun 2008 12:08:05 +0100

Hi Ted,

> One approach might be to have a Preamble (or perhaps an auxiliary
> macro package) in the groff source document which tests \*[.T] and
> then defines various things appropriately, e.g.
> 
>   .char \[lq] "
> 
> etc. if \*[T] is "ascii".

There's no need to do this particular .char because -Tascii uses " for
\(lq and \(rq.

    $ echo '\(lq,\(rq,\(ga,\(aa,",'\'',`' | groff -Tascii | cat -s
    ",",`,',",',`
    $ echo '\(lq,\(rq,\(ga,\(aa,",'\'',`' | groff -Tascii | cat -s | hexdump -C
    00000000  22 2c 22 2c 60 2c 27 2c  22 2c 27 2c 60 0a
    $ echo '\(lq,\(rq,\(ga,\(aa,",'\'',`' | groff -Tutf8 | cat -sA
    address@hidden,address@hidden,`,M-BM-4,",address@hidden,address@hidden
    $

With -Tascii they all get mapped onto ["'`].  It's the common
introduction of UTF-8 terminals now which gives problems with -Tutf8;
all map onto non-ASCII characters except \(ga -> ` and " -> ".

Cheers,


Ralph.





reply via email to

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