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: Oliver Corff
Subject: Re: Count number of spaces at beginning of line?
Date: Sat, 29 Apr 2023 22:41:32 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0

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.  chem and dformat are both awk scripts:
https://troff.org/prog.html#chem

Whilst it's interesting to wonder how it can be done in troff, longer
term you'll probably write preprocessors for this kind of thing.  :-)
It's common to create ‘little languages’ particular to you using Unix
programs.

I appreciate your answer, for all practical purposes. Consider my
question a thought experiment.

Thank you,

Oliver.


--
Dr. Oliver Corff
Mail: oliver.corff@email.de




reply via email to

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