[Top][All Lists]

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

Re: [Groff] horizontal trap

From: Ralph Corderoy
Subject: Re: [Groff] horizontal trap
Date: Sun, 27 Dec 2015 10:59:33 +0000

Hi Dave,

> I don't want groff to handle these [long] lines; the exact way each
> such line should be handled depends on a number of factors and really
> requires manual intervention.  But I do want groff to alert me to such
> cases, so that I know where to find them without having to flip
> through a couple hundred pages of output.

Could you make use of \k to record the position of the end of each line?
There's also \n[hp] that, like \k, is the input position, and \n[.k]
that's the output.  The difference can be seen when \c is used to
continue the line in no-fill mode.  Also, you'll need to add on any page
offset or indent.

    $ cat
    .pl 6
    .de p
    .tm x=\\nx
    bar xyzzy\kx
    bar \c
    .po 4
    bar xyzzy\kx
    .in 4
    bar xyzzy\kx
    $ nroff
    bar xyzzy
    bar xyzzy
        bar xyzzy
            bar xyzzy


Could \k be used with a macro after each line to check for overflow?

Otherwise, if there's normally a clear right margin then I'd fall back
on scanning each page mechanically for anything that blots it, e.g. each
PostScript page to an image, cut that rectangle, expect it to be all
white pixels.

Cheers, Ralph.

reply via email to

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