Article View: net.text
Article #856Re: Orphans & Widows Fix for Troff Wanted
From: rcd
Date: Fri, 09 May 1986 05:24
Date: Fri, 09 May 1986 05:24
25 lines
1846 bytes
1846 bytes
> > I'm interested in any hacks or purchaseable software that fixes
> > the problems of Orphans and Widows in Troff.
>... We fixed widow lines by imbedding a ".ne 3" request in the
> paragraph macro (I think -me has this by default).
This only helps sometimes. If you have a footnote in the first line of the
paragraph, that can push the end-of-page trap up enough that you still end
up with a widow. It's hard to do much better with troff, or any formatter
where you've got a "single pass" sort of approach.
> Orphan lines are harder to deal with; I could see a scheme whereby
> you divert output in the start-paragraph macro, and have an end-paragraph
> macro that sees how long the paragraph is, and how much is left on the page
> and inserts a .bp at the right place. Yuck!
And the same sort of scheme would work for the footnote-induced widow
problem that I mentioned, if you could stomach writing the macros and
ensuring that nothing gets screwed up when the diversion is re-read, etc.
The use of diversions gives you a second "pass" of limited range. The
really painful part (ref. "Yuck!" above) is having to process all the text
twice just to get the page breaks right.
--
Dick Dunn {hao,ucbvax,allegra}!nbires!rcd (303)444-5710 x3086
...Cerebus for dictator!
Technical Details
Message-ID:
<753@nbires.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!linus!philabs!cmcl2!harvard!husc6!panda!genrad!decvax!decwrl!glacier!hplabs!hao!nbires!rcdReferences:
<312@garth.UUCP> <2331@phri.UUCP>Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!linus!philabs!cmcl2!harvard!husc6!panda!genrad!decvax!decwrl!glacier!hplabs!hao!nbires!rcd From: rcd@nbires.UUCP Newsgroups: net.text Subject: Re: Orphans & Widows Fix for Troff Wanted Message-ID: <753@nbires.UUCP> Date: Fri, 9-May-86 01:24:51 EDT Article-I.D.: nbires.753 Posted: Fri May 9 01:24:51 1986 Date-Received: Wed, 14-May-86 01:06:55 EDT References: <312@garth.UUCP> <2331@phri.UUCP> Distribution: net Organization: NBI,Inc, Boulder CO Lines: 25