[pdftex] Forbidding hyphenation at end of page.
Thanh Han The
hanthethanh at gmail.com
Tue Aug 28 20:41:52 CEST 2007
On Sat, Aug 25, 2007 at 09:38:04AM +0200, Maarten Sneep wrote:
> On Aug 24, 2007, at 20:39, John R. Culleton wrote:
>
> > TeX and LaTeX have no effective mechanism for forbidding hyphenation
> > at the end of a page. Presumably this applies to pdftex, Context etc.
> > as well. The base TeX program is frozen forever, but pdftex is not.
> > It conintues to evolve with addons. This could be such an addon, but
> > it would require surgery to the pagemaking code and possibly the
> > hyphenation code. It could be in the nature of an increased penalty
> > or a binary switch.
>
> As a first step, one would have to detect the fact that a hyphenated
> word ended up
> on a page (or spread) break. Reporting this as a warning (pretty much
> like a badness)
> would be a start, at least for manual intervention.
>
> As far as I can see, one would need to consider page
> breaks at the level of the justification and hyphenation
> algorithm, for blocks that span a chapter, or more if
> your chapters do not start at a new page. This means major
> surgery for the J&H code, and a first step would be to
> have ideas for this (because you still want to typeset on
> a grid, and have completely filled pages). That's hard.
yes it is. I am having the same problem and what I do is:
- use microtype + tweaking the parameters of line-breaking
to reduce hyphenation as much as possible;
- post-processing: convert pdf to text using pdftotext,
then use some scripting to detect such a case and report;
- then disable hyphenation for that word and repeat the
process again, until there are no hyphenation at page
breaks.
It's far from perfect, but at least saves me from detecting
such cases by staring at the pdf.
Thanh
More information about the pdftex
mailing list