groff
[Top][All Lists]
Advanced

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

Re: [Groff] OT: \} considered as macro argument regarding register .$


From: Carsten Kunze
Subject: Re: [Groff] OT: \} considered as macro argument regarding register .$
Date: Thu, 3 Jul 2014 21:45:47 +0200 (CEST)

Hi Ingo,

> I consider your question perfectly on topic.

It could unfortunately be off topic in case it is not a groff issue. Heriloom 
and Plan 9 have the same behavior. So it could even be possible that this has 
also been the case when these conditional blocks had been introduced (roff? 1st 
nroff?).

> > There are warnings for doing this for requests like e.g. .ds,
> 
> I failed to reproduce what you say in this sentence.

Ok, at least if there is a space between the string for .ds and the \}

But for .tm or .ab I don't know if it's a bug. groff and heirloom print the \}, 
Plan9 does not. Of course these other implementations are no references, it 
could an indication.

> > but that it also increases .$ is not expected.
> > Has this really been intended by the nroff author?
> 
> I have no idea, but it doesn't make sense to me.

I agree. But in my opinion it should not be "fixed" if it is the traditional 
nroff behavior.

> Minimal input file:
> .de count_args
> \\n(.$
> ..
> .if n \{.count_args\}
> .if n \{.count_args \}
> .if n \{.count_args foo\}
> .if n \{.count_args foo \}
> 
> Run this through:
> groff -Wall -Tascii
> 
> Output with groff-1.22.2 on OpenBSD:
> 0 1 1 2

Ok, depends on the space. Maybe that is a work around (to save an extra line 
for \}).

--Carsten



reply via email to

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