[Top][All Lists]

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

Re: eqn anomaly

From: G. Branden Robinson
Subject: Re: eqn anomaly
Date: Tue, 3 Mar 2020 11:37:59 +1100
User-agent: NeoMutt/20180716

At 2020-03-01T23:07:07-0500, Doug McIlroy wrote:
> .EQ
> define f % $1 %
> f("a,b")
> .EN
> draws a diagnostic from Gnu eqn: "newline before end of quoted text".
> Remove the comma and all is well. Apparently the comma delimits
> the first argument.
> The program isn't totally naive about parsing arguments. It
> does think that there's only one argument in the macro call
> f((a,b))
> Surely this is a bug, not a feature.

Hi Doug,

As far as I can tell from Kernighan and Cherry[1], eqn's "define"s
aren't parameterized at all.  The groff eqn(1) man page claims to
document (only) extensions to classical eqn, but I don't see this
extension described there.  Even if eqn defines _were_ parameterized,
you'd need to have "f" surrounded by whitespace on both sides for it to
undergo expansion (ibid., ยง20).

As I understand K&C, your output line should render as:


...and my copy of Heirloom eqn/nroff does actually do this.

This feels like an incomplete/undocumented GNU extension, and maybe not
a prudent one.

But my experience with eqn is limited to minimal examples.

Anyone else?



Attachment: signature.asc
Description: PGP signature

reply via email to

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