groff
[Top][All Lists]
Advanced

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

Re: [Groff] explicit and implicit spacing in eqn


From: Ted Harding
Subject: Re: [Groff] explicit and implicit spacing in eqn
Date: Sun, 17 Apr 2016 18:19:36 +0100 (BST)

On 17-Apr-2016 16:30:53 Doug McIlroy wrote:
> I may have made this comment before. My apologies if
> it's already on someone's to-do list.
> 
> Groff eqn, unlike the original Unix program, attempts to
> vary spacing according to mathematical custom. Thus it
> automatically adds apace around the equal sign in
>         a=b
> while in the old days one had to put the space in
> manually
>         a~=~b
> Somewhat surprisingly, groff eqn, adds space around
> Unknown tilde escape.
> = even in the presence of ~, seemingly as if ~ were
> treated as a letter. This is relatively unnoticeable.
> But it is not unnoticeable in case of unary minus.
> Groff eqn treats
>       a~=~-b
> as if it were binary, and inserts extra space between
> the - and b.
> 
> I have a lot of eqn that this interpretation damages.
> If the problem is something as simple as treating ~
> as a letter, it should be easy to fix.
> 
> Doug

Well spotted, Doug! It's the first time I've noticed it
(though I must have done the like of "A~=~-B" thousands
of times)!

What I observe (which agrees with you) is:

$A=B$
 --> "A = B"
$A=-B$
 --> "A = -B$"
$A = - B$
 --> "A = -B"
$A~=~-B$
 --> "A = - B"

which clearly it should not! Now to try to track down
why it happens ... Interestingly, $A~=-B$ produces
the same result as $A = - B, namely "A = -B", while
$A~=~-B produces "A = - B". Perhaps there's a clue there...

Best wishes,
Ted.

-------------------------------------------------
E-Mail: (Ted Harding) <address@hidden>
Date: 17-Apr-2016  Time: 18:19:32
This message was sent by XFMail
-------------------------------------------------


reply via email to

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