groff
[Top][All Lists]
Advanced

[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: Fri, 26 Aug 2022 07:18:09 +0100

Hi Alejandro,

> >      $ true | (! grep '^.\{80\}.' 81); echo $?
> >      
> > .................................................................................
> >      1
> >      $
>
> May I tell groff(1) (grotty(1)) that the terminal width is 80, no
> matter what it actually is?

grotty(1) doesn't decide where to split the line, it happens earlier
than that, so you want to affect groff(1).

> Otherwise, I can only run the above in <=80-col terminals.

I don't have the command you're running.

- If it's man(1) then see if it supports $MANWIDTH or $COLUMNS.
- If it's groff, then use ā€˜-rLL=80nā€™; see groff_man(7).

      $ (echo .TH a b c d; seq 314) |
      > groff -ww -Tutf8 -man -rLL=80n |
      > awk '{print length}' |
      > uniq -c
            1 80
            3 0
           14 80
            1 23
            3 0
            1 80
      $

-- 
Cheers, Ralph.



reply via email to

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