groff
[Top][All Lists]
Advanced

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

Re: Count number of spaces at beginning of line?


From: G. Branden Robinson
Subject: Re: Count number of spaces at beginning of line?
Date: Sun, 30 Apr 2023 07:50:54 -0500

At 2023-04-29T21:22:00-0500, Dave Kemper wrote:
> On 4/29/23, Oliver Corff <oliver.corff@email.de> wrote:
> > Is there any possibility to count leading spaces in groff?
> 
> See the documentation for the \n[lsn] register.  I've never used it,
> but its description sounds like what you're looking for.

Indeed, a preprocessor seems like overkill for this application, but for
the fact that your original spec had the section title on the same line
as the leading spaces, which makes it hard to get that title into the
context of a leading space macro.  (Trap-called macros do not receive
arguments.)

Regards,
Branden

Attachment: signature.asc
Description: PGP signature


reply via email to

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