groff
[Top][All Lists]
Advanced

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

Re: Warn about long lines


From: Alejandro Colomar
Subject: Re: Warn about long lines
Date: Mon, 5 Sep 2022 01:18:14 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.0

Hi Ralph,

On 8/29/22 12:24, Ralph Corderoy wrote:
Hi Alejandro,

Piping grotty's output into ‘col -pbx’ may also be useful.

Changed; thanks!  BTW, I didn't add -p, since I don't think it's
necessary.

I added it so if you've thought wrong the unrecognised control sequences
will show up rather than be silenced.  That might quickly show it should
be omitted, but I thought it interesting to find out.

Hmm, yeah, that would help.


Now it only uses normal ASCII chars.

Be aware you're now testing something different from what most of your
users will experience.


I know; I'm not entirely happy with it. If you know a (hopefully trivial) filter that transforms any multi-byte sequences in exactly the number of bytes that will be visible (and hopefully those bytes should be similar to the original UTF-8 content), that would greatly help.

Something that can be used as

... | toplaintext | ...

As in:


tbl man1/memusage.1 \
| eqn -Tutf8 \
| troff -man -t -M ./etc/groff/tmac -m checkstyle -rCHECKSTYLE=3 \
        -ww -Tutf8 -rLL=78n \
| grotty -c \
| col -b -x \
| toplaintext \
| (! grep -n '.\{80\}.' >&2)


For the moment, I'll keep the -Tascii.

I'll investigate if anything like this exists, and otherwise I'll consider doing it myself.

Cheers,

Alex

--
Alejandro Colomar
<http://www.alejandro-colomar.es/>

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


reply via email to

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