[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [Groff] Short Orphan Lines
From: |
Andrew Piziali |
Subject: |
RE: [Groff] Short Orphan Lines |
Date: |
Thu, 25 Mar 2004 21:16:00 -0600 |
Larry,
I implemented your suggestion as follows:
.de ParBeg\" Divert paragraph so we can prevent
. di ParDIV\" orphan lines on the top of the
. PP\" next page.
..
.de ParEnd\" End paragraph diversion. 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.
..
.de ParBP\" Break page called by trap set in
. bp\" ParEnd.
..
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 eliminated the
macros as the source of the problem by inlining the .di, .if, .dt and
.ParDIV requests and it behaves the same: two of the last three lines of
the paragraph print at the top of the next page.
What am I missing?
Thanks!
--
Andrew Piziali, <address@hidden>