groff
[Top][All Lists]
Advanced

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

Re: [Groff] digits in eqn


From: Ralph Corderoy
Subject: Re: [Groff] digits in eqn
Date: Wed, 01 Aug 2007 23:35:29 +0100

Hi Ted,

> What I'm referring to can be seen if you set the following in Times,
> using a fairly large point size (say 15) (I'm using ms macros here):
> 
> .nr DD 0
> .EQ I
> 21 ~~=~~ 3 times 7
> .EN
> .EQ I
> 22 ~~=~~ 2 times 11
> .EN
> 
> You wil see that the "=" signs do not line up.

I can re-create this here.

> It seems that eqn uses the glyph-width of the digits in computing the
> layout, as opposed to the normal metrics. In TR, digits have fixed
> width, so, while one would expect the "=" signs in the above to line
> up, they don't -- since the "1" glyph is narrower than the "2" glyph,
> and eqn therefore packs it closer to the "2".

Hmm, don't know about that.  I did however have a look at eqn's output
and I think it's the \, that's causing the effect.

    $ cat ted.tr
    .nr DD 0
    .EQ I
    21 ~~=~~ 3 times 7
    .EN
    .br
    .EQ I
    22 ~~=~~ 2 times 11
    .EN
    $ groff -e -ms ted.tr >ted.ps     # Has fault.
    $ eqn ted.tr | sed 's/\\,//g' | groff -ms >ted2.ps

ted2.ps looks OK.  It may be that the \/ that's also in eqn's output can
cause problems too sometimes, I don't know and haven't the time to
investigate further.

groff_diff(7) describes these escapes;  hopefully this email gives a
clue.

Cheers.


Ralph.





reply via email to

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