Dear all,
the weekend is there, and drives me to try silly things (which is a good
way to learn a language).
Is there any possibility to count leading spaces in groff? I use [] to
express spaces in the following mock-up of an outline:
.\" Start of example text
Learning Language X \"should retu
Hi Oliver,
> .\" Start of example text
>
> Learning Language X \"should return 0
>
> [] Prerequisites \" should return 1
>
> [][] Tools \" should return 2
...
> \n[Text_of_my_line] would contain the level of indentation, like
> \n[Tools] and \n[Documentation] whould both return 2 which could be
>
Hi Ralph,
You nailed the provenance of my way of thinking:
Unlike TeX, where everything is written in TeX, troff favours using a
preprocessor which produces troff, e.g. pic(1) and tbl(1). These can be
quite simple, say an awk script which processes what it recognises and
passes through the rest
On 4/29/23, Oliver Corff 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.
Hi Oliver,
Dave wrote:
> > Is there any possibility to count leading spaces in groff?
>
> See the documentation for the \n[lsn] register.
Which can be seen with
info groff 'Leading Spaces Traps' | cat
I'd been playing with an input trap, ‘.it’, so you might be interested
to learn about thos
At 2023-04-29T21:22:00-0500, Dave Kemper wrote:
> On 4/29/23, Oliver Corff 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 preproces
Hi Branden,
On 30/04/2023 14:50, G. Branden Robinson wrote:
At 2023-04-29T21:22:00-0500, Dave Kemper wrote:
On 4/29/23, Oliver Corff 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 sou
Hi Dave,
On 30/04/2023 04:22, Dave Kemper wrote:
On 4/29/23, Oliver Corff 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.
I'll have a look at that.