Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

widow handling?

10 views
Skip to first unread message

ivo...@gmail.com

unread,
May 22, 2006, 4:29:17 PM5/22/06
to

dear tex wizards:

in experimenting with raggedbottom, widowpenalty, and clubpenalty, I
think I have not found a solution that strikes me as particularly
desirable. I think what I would really like is that widows (i.e.,
left-over single lines that begin on the following page) are resolved
not by pushing one extra line from the same paragraph also onto the
next page, but by stretching the \textheight to allow this one extra
line at the bottom of the same page. I am of course particularly
miffed by the standard solution if this is the last paragraph before a
new section starts (or if the next piece on the page is not just
another text paragraph), but I would be ok if this were the default
widow handling algorithm everywhere. Possible?

Reading the definition "The \raggedbottom declaration makes all pages
the height of the text on that page. No extra vertical space is added"
this does not seem to be what I want, anyway. I read the FAQ
"Preventing page breaks between lines", which seems to have some
solution, but catered to individual situations. I would like it to be
the default throughout my document.

regards,

/iaw

jo...@wexfordpress.com

unread,
May 22, 2006, 6:33:31 PM5/22/06
to
Consider two solutions:
1. With aligned bottoms, alllow extra space in \baselineskip e.g.,
\baselineskip 10.5pt. plus .25pt. This is a global solution.

2. where needed use the \looseness command in a long paragraph to
generate an additional line. this is an individual instance solution.

HTH

John Culleton

Scott Pakin

unread,
May 22, 2006, 7:34:50 PM5/22/06
to

Another individual-instance solution is to use \enlargethispage{###}
to enlarge the current page by size ### (e.g., 2\baselineskip).

-- Scott

ivo...@gmail.com

unread,
May 22, 2006, 9:09:24 PM5/22/06
to

hi john: I definitely am looking for a global solution, not a local
one. (I know a number of these tricks. don arseneau's \needspc{}
macro is a lifesaver for me, and it is at least semi-automatic.)

my optimal solution would be a typesetting algorithm in latex that
knows not only the current paragraph, but also the next item in the
vertical list. if this next item is not another paragraph, and
especially if it is a heading, then I would be particularly unhappy
about the standard widow control (of moving an additional line from the
current page to the next one) and prefer an automatic
\enlargethispage{\baselineskip}. I presume this is not possible. so
my next-best would be to just try the enlargethispage-upon-widow, no
matter what. not sure how the result will look like---better or worse
than the current widow handling?!

alas, looking at your suggestion, how would a \baselineskip of 10.75pt
solve my problem? I understand that this is a linespacing argument
that is scaled by baselinestretch---and I do not want my line spacing
to change.

regards,

/ivo

Donald Arseneau

unread,
May 23, 2006, 2:33:42 AM5/23/06
to
"ivo...@gmail.com" <ivo...@gmail.com> writes:

> in experimenting with raggedbottom, widowpenalty, and clubpenalty, I
> think I have not found a solution that strikes me as particularly
> desirable. I think what I would really like is that widows (i.e.,
> left-over single lines that begin on the following page) are resolved
> not by pushing one extra line from the same paragraph also onto the
> next page, but by stretching the \textheight to allow this one extra
> line at the bottom of the same page.

\def\sloppybottom{%
\def\@textbottom{\vskip \z@ \@plus.0001fil \@minus 15\p@}%
\topskip=1\topskip \@plus10\p@\@minus15\p@%
\def\@texttop{\vskip \z@ \@plus-10\p@\@minus-15\p@}% negate \topskip
}

--
Donald Arseneau as...@triumf.ca

ivo...@gmail.com

unread,
May 23, 2006, 10:41:06 AM5/23/06
to

the great ones make it look easy ;-).

don, could this be part of the TeX Faqs of how to deal with widows?

regards,

/iaw

ivo...@gmail.com

unread,
May 23, 2006, 3:58:42 PM5/23/06
to

ahem...I spoke too soon. when \sloppybottom is invoked at the
beginning of my book documentclass, it inserts blank double pages at
places I do not understand:

\documentclass[titlepage]{book}

\makeatletter


\def\sloppybottom{%
\def\@textbottom{\vskip \z@ \@plus.0001fil \@minus 15\p@}%
\topskip=1\topskip \@plus10\p@\@minus15\p@%
\def\@texttop{\vskip \z@ \@plus-10\p@\@minus-15\p@}% negate \topskip
}

\sloppybottom
\makeatother

\begin{document}
\begin{titlepage}
this is page 1
\end{titlepage}
\end{document}

don, could I beg you for an explanation thereof? this way, I may be
able to start with sloppybottom later where it will not inadvertently
do something I do not want it to do.

regards,

/iaw

Donald Arseneau

unread,
May 24, 2006, 10:02:30 AM5/24/06
to
"ivo...@gmail.com" <ivo...@gmail.com> writes:

> ahem...I spoke too soon. when \sloppybottom is invoked at the
> beginning of my book documentclass, it inserts blank double pages at
> places I do not understand:
>

> \def\sloppybottom{%
> \def\@textbottom{\vskip \z@ \@plus.0001fil \@minus 15\p@}%
> \topskip=1\topskip \@plus10\p@\@minus15\p@%
> \def\@texttop{\vskip \z@ \@plus-10\p@\@minus-15\p@}% negate \topskip
> }

The problem is in \@doclearpage, which starts by splitting off zero-height.
This fails miserably if some page contents can shrink to zero size, as
this \topskip can.

The shrink on \topskip here is the amount that the page may grow at the
bottom, so less than 10 pt (default \topskip) is certainly not useful
for widow handling. You will have to increase the natural size of
\topskip to marginally larger than its "minus" component.


--
Donald Arseneau as...@triumf.ca

bu...@brandeis.edu

unread,
May 24, 2006, 10:14:26 AM5/24/06
to
If your output is going to be a published book I would recommend
against raggedbottom for solving the widow problem. Books should have
text blocks with flush bottoms. I also would recommend against fiddling
with the vertical spacing, since it might interfere with the uniform
grayness of the page, and the text lines on both sides of a spread
should line up with each other. This leaves you with a very limited
number of solutions. I think the best thing to do is either to enlarge
the page by one baseslineskip on both sides of an earlier spread, or to
shrink the page by one baselineskip on both sides of an earlier spread.


The fine tuning of the final stages of preparing a published book is
going to involve a certain amount of visual formatting, no matter how
many things TeX does automatically. My book had about 900 pages, and I
fine tuned in this way about 30 of them. But even The LaTeX Companion
had to be fine tuned in just this way.

These are useful commands:

\newcommand{\longpage}{\enlargethispage{\baselineskip}}
\newcommand{\shortpage}{\enlargethispage{-\baselineskip}}

Remember that you have to apply them to both sides of a spread (to the
verso of one page and the recto of the following page), so that the
page will appear symmetrical.

John Burt

ivo...@gmail.com

unread,
May 24, 2006, 10:48:00 AM5/24/06
to

thank you, don. setting \setlength\topskip{16pt} does seem to do the
trick for me. your fix seems so useful that I wonder whether it should
either be part of the standard latex (like \raggedbottom), or at least
be part of the faq. alas, can I recommend that \sloppybottom should
also set the global topskip automatically, so that it does not cause
the issue I first ran into?

regards,

/iaw

0 new messages