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: Sun, 28 Aug 2022 09:58:44 +0100

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.

> > 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 letter.tr
>
> 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.

-- 
Cheers, Ralph.



reply via email to

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