[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] widow/orphan control
From: |
Werner LEMBERG |
Subject: |
Re: [Groff] widow/orphan control |
Date: |
Sun, 05 Jan 2003 14:01:36 +0100 (CET) |
> If you prefer to have paragraphs demarcated by
> blank lines, you can set the blank line macro
>
> .blm pp
>
> but then *all* blank lines would start a new paragraph.
Not necessarily. Just use the `.ns' request to disable further
spacing if there are multiple blank lines.
> The first one (the one that doesn't work) is to use an
> "active" margin character to increment a line counter.
> But it seems that the character is only evaluated at the
> .mc request, and not again when it is actually used, so the
> counter gets incremented only once, and not with every line.
> [Is it desirable to change this behaviour? Opinions?]
I won't change that. The right way is to introduce the already
discussed `beginning-of-line macro' in GNU troff.
> (The usual bottom-margin page traps can't prevent a line
> with excessive height or depth from intruding into the bottom
> margin, because the trap is sprung *after* the line is output,
> and then it's already too late. This seems to be a fundamental
> flaw in the design of troff. It would be much more useful if
> the trap were sprung *before* a line sweeping beyond the trap
> position were output. [Am I right in assuming this won't be
> changed in the near future?])
You are right, I won't change this. Instead, I'll probably activate
the widow protection support in gtroff (see the WIDOW_CONTROL macro in
the source files). The basic idea is to save the last (formatted)
output line(s) and defer its output if necessary -- a kind of built-in
diversion.
Unfortunately, it doesn't work yet in all cases; since the saved
output lines are never again processed, there is no interaction with
data emitted by traps. For example, the effect of `.ns' invoked in a
header macro is delayed until saved lines are already output; with
other words, `.ns' suppresses vertical spacing at the wrong place.
Werner
Re: [Groff] widow/orphan control, Ken Deen, 2003/01/04