groff
[Top][All Lists]
Advanced

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

Re: [Groff] Short Orphan Lines


From: kollar
Subject: Re: [Groff] Short Orphan Lines
Date: Fri, 26 Mar 2004 12:06:15 -0500

Andrew Piziali wrote:

   I implemented your suggestion as follows:

[macros]

and it almost works as expected.  The third-to-last and second-to-last
lines of a paragraph that will not fit on a page are spilled to the top
of the next page.  The last line is never printed! 

I'm amazed it worked that well, seeing as I'm no expert on diversions
and I didn't even try the code. :-)

It sounds like the diversion's not getting completely flushed out. Try
adding a ".br" request at the beginning of ParEnd:

.de ParEnd\"                        End paragraph diversion.
.  br\"                              Flush out the last line.   If all but
.  di\"                               two lines of the paragraph will
.  if (\\n[.t] < (\\n[dn]-2v))\#      not fit on this page, set a trap
.    dt \\n[.h]u+\\n[dn]u-2v ParBP\"  for two lines from the bottom of
.\"                                   the paragraph.
.  ParDIV\"                         Print the paragraph.
..

If that doesn't work, I must defer to someone who knows diversions
better. Here's a pointer to Thomas Baruchel's attempts as well, maybe
you'll find some inspiration:

        http://ffii.org/archive/mails/groff/2001/Mar/0035.html
        http://ffii.org/archive/mails/groff/2001/Mar/0036.html

I probably should try studying the widow&orphan code & see if I
can get it to work... just one more thing I don't have the time for. :-)
--
Larry Kollar     k  o  l  l  a  r  @  a  l  l  t  e  l  .  n  e  t
Unix Text Processing: "UTP Revival"
http://home.alltel.net/kollar/utp/



reply via email to

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