[Top][All Lists]

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

Re: Warn about long lines

From: Ralph Corderoy
Subject: Re: Warn about long lines
Date: Sat, 27 Aug 2022 17:05:55 +0100

Hi Alejandro,

>       | sed 's/\x1b\[[^@-~]*[@-~]//g' \

Out of interest, what's the sed(1) attempting to do?
(I know what it's doing.)

> > grotty(1) doesn't decide where to split the line, it happens earlier
> > than that, so you want to affect groff(1).
> > - If it's groff, then use ‘-rLL=80n’; see groff_man(7).
> Ahh, this is what I needed.  I sometimes struggle to understand how
> groff divides the implementation.

That's part of the problem with groff(1) existing instead of users
learning the pipeline of constituent parts, what they do, and how they
communicate, e.g.

    pic | tbl | eqn -Tutf8 | troff -man -Tutf8 | grotty

The data between troff(1) and grotty(1), or any other post-processor,
is in groff_out(5) format and what marks to put where has already been
decided, fixing the line length.

The man macros realise the man command might be on a terminal of varying
width or producing ‘cat’ man pages for storage.  To allow the man
command to specify the line-length required, the man macro allows the LL
number register to override what length it would normally use for the
‘.ll’ command.  When the man command runs troff, it uses the -r option
to set the number register.

> It doesn't seem like a man(7)-specific thing

It is.

> I mean, when searching for an option that controls the line length,
> I expect it to be a generic option that will be applicable to groff as
> a whole

No, the page dimensions, etc., are set within the troff source and it's
up to that source to allow for external specification if required.  If a
document is written without specifying them then the defaults apply and
the user can override these by using one of the paper-size macro sets,
e.g. ‘-ma4’ for A4 paper from groff's a4.tmac.

    troff -ma4

> I searched for /column /length /width in groff(1) and found nothing. :/

groff(1) is a confusing front-end program for the normal troff-based
pipeline so some more interesting options would be in troff(1), for
example.  But in this case, it's not a command-line option.  :-)

Cheers, Ralph.

reply via email to

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