[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Groff] Widow control: simple cases at least are working
From: |
Larry Kollar |
Subject: |
[Groff] Widow control: simple cases at least are working |
Date: |
Tue, 30 Mar 2004 16:41:47 -0500 |
I compiled last night's CVS with -DWIDOW_CONTROL and after studying the
source (and making one patch to get it to compile) it works with my
test document. Here's a brief description of the commands enabled:
.wdc [n]
Set widow control. No argument, or a non-zero
argument, enables widow control; zero disables it.
No corresponding number register that I could find.
.fpl
Flush pending lines if widow control is enabled.
(see below for usage)
Enabling widow control has a side effect that appears to disable the
.ne request, allowing orphans to creep in. The .fpl request flushes
pending lines, allowing .ne to do its job. In an -mm document, you
could put the following at the beginning of your document (or in your
locale file):
.rn P P-orig
.de P
. fpl
. P-orig
. ne 2
..
.wdc
Note how the .fpl and .ne requests bracket the paragraph macro. This is
the only ordering that achieves the desired results. The test file was
an incomplete novel I've been working on; groff generated 47 pages of
10-point type without a single widow or orphan (vs. several with widow
control turned off). It didn't have any footers or footnotes, so I
don't know whether that would interfere or not yet.
Definitely worth more testing....
--
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/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Groff] Widow control: simple cases at least are working,
Larry Kollar <=