groff
[Top][All Lists]
Advanced

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

Re: [Groff] holistic widow elimination


From: Dave Kemper
Subject: Re: [Groff] holistic widow elimination
Date: Mon, 9 Jan 2012 13:41:26 -0600

On Sat, Jan 7, 2012 at 4:59 PM, Ted Harding <address@hidden> wrote:
> I've been hesitating about joining in, because (as is
> already beginning to emerge) it is potentially a complex
> question; and also the kind of solution which should be
> preferred is a question of taste, convention, or context,
> as well as convenience of use.

You're right; let me provide a little more context.

I agree that manipulating track kerning, or the wording of the text,
are the most elegant ways to solve the problem.  But these are, as Peter
points out, manual and time-consuming processes.

The published novels I surveyed were largely mass-market fiction,
published by major publishers.  They may not have taken the time to
use typesetting best practices, but what they used were "pretty good
practices" -- ones that, by and large, looked like they could have
been automated.

In particular, it was quite common in these books for the occasional
pair of pages to have one fewer lines than the norm; in other words, if
a standard page had 40 lines, sometimes pairs of facing pages would each
have 39 lines to prevent what would have otherwise been a widow on either
the second of the two facing pages, or the next page after the turn.
So the bottom margins on these two pages would align with each other,
but not with those of other pages.  This was common enough that it seems
to be a fairly accepted practice.

This is the kind of solution I am looking for: one that provides "pretty
good" results on par with what a major publisher would use, but without
requiring the level of time and care required to really fine-tune.

Regarding the ideas put forth on this topic:

The overview of an algorithm that Pierre-Jean posted is similar to what
I was thinking could be one way to do this: run groff one time with
macros that print to stdout information about where each paragraph is
placed on the page, then feed this output into something that figures
out where adjustments have to be made to eliminate widows, and ideally
generates groff code to make those adjustments.

Right now, the "something" above is the "here magic happens" part of
my idea.  I can code this myself if I need to, but an existing solution
is of course preferable.

There may be one in the -mpm macro package (thanks, Sverre and Ralph),
but I haven't been able to get it working so far.  I'm not sure if it's
compatible with groff at all: its tmac file depends on something called
tmac.srefs which doesn't exist in groff.  I also get a slew of errors
trying to compile the C++ code of the post-processor, which could indicate
anything from a missing command-line switch to a fundamental environmental
incompatibility (the code was developed on a Plan 9 platform).  I'm not
sure how much energy to devote to trying to figure all this out, since
it's unclear to me from -mpm's documentation whether it even does what
I want.



reply via email to

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