groff
[Top][All Lists]
Advanced

[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: Tue, 29 Dec 2015 12:43:56 +0000

Hi,

> It works as expected, complaining about the 3.5i line that, together
> with the 1i indent, exceeds 4i, as do the last two lines of
> description.  (Line 39 being the ".in".)

I wonder if the OP's problem could also be tackled using the `.n' number
register?

    The ‘\n[.n]’ register contains the length of the previous output
    line in the current environment.

A trap set just below the current output position could record the
maximum .n seen on this page, moving the trap down each time.  At the
bottom of the page, if the maximum is too long, flag this page as a
problem;  for example, .tm output, or add something to the page itself
for searching.

    $ cat max.tr
    .de t
    .tm =\\n(.n
    ..
    .pl 5
    .na
    .t
    foo
    .t
    bar bar bar bar bar bar bar bar bar bar bar bar bar bar bar bar bar bar
    bar bar
    .t
    .br
    .t
    $ 
    $ nroff max.tr
    =0
    =0
    =1512
    =456
    foo bar bar bar bar bar bar bar bar bar bar bar bar bar bar bar
    bar bar bar bar bar



    $ 

Cheers, Ralph.



reply via email to

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