groff
[Top][All Lists]
Advanced

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

Re: Warn about long lines


From: Ingo Schwarze
Subject: Re: Warn about long lines
Date: Sat, 27 Aug 2022 13:35:15 +0200

Hi Alejandro,

Alejandro Colomar wrote on Fri, Aug 26, 2022 at 08:51:15PM +0200:
> On 8/26/22 08:18, Ralph Corderoy wrote:

>> - 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.  Why is LL only documented in 
> (implemented for?) groff_man(7)?

Because it is a groff_man(7) feature only -
that is, groff(1) only *and* man(7) only.

> I wouldn't have expected it there.

Your expectation is indeed resonable.

As an aside, mandoc(1) syntax was designed to satisfy exactly that
expectation, see the mandoc -O width= argument here:
https://man.openbsd.org/mandoc.1#ASCII_Output

The reason i took the liberty to use the mandoc-specific -O option
for this purpose is that i failed to find a command line option in
groff doing what a reasoable user would expect and might indeed need.

> It doesn't seem like a man(7)-specific thing (it may be implemented for 
> -man only, but that seems non-obvious to me).  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, and not to a 
> specific macro set.  I fail to find documentation about these things for 
> that reason.

The generic feature to control the line length is the roff(7) .ll request.

   $ cat tmp.roff         
  some words on a single input line
   $ (echo .ll 12; cat tmp.roff) | groff -T ascii | head -n 3
  some   words
  on a  single
  input line
   $ echo .ll 12 | groff -T ascii - tmp.roff | head -n 3
  some   words
  on a  single
  input line

I'm not aware of a groff option to merge parts of the command line 
into the groff input stream - well, -r is a bit like that, but only
for registers, not for requests.

Yours,
  Ingo



reply via email to

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