[Top][All Lists]

[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: Sun, 28 Aug 2022 12:59:54 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.1.2

Hi Ralph,

On 8/28/22 10:58, Ralph Corderoy wrote:
Hi Alejandro,

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

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

There's probably a better way; see grotty(1)'s -c option or GROFF_NO_SGR
environment variable.  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. Also, I added the variable for the output device, and set it to ascii, since utf8 produces multibyte sequences for boxed tables. Now it only uses normal ASCII chars.



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

      troff -ma4

Ahh, it makes sense: normally documents are designed to be rendered in
a specific device and characteristics.

Well, relative to the page, yes, but many documents needn't assume much
about the output device or page size.  If you look at a4.tmac, for
example, you'll see it just sets the page length to the paper size and
the line length to the paper width less an inch margin both sides.

     .pl 29.7c
     .ll 21c-2i

Boundaries of the text, like the header and footer position, are set
relative to the edge of the paper: the header a distance from the top;
the footer up from the bottom, not the top.  Thus the page length isn't
of immediate concern.

Alejandro Colomar

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

reply via email to

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