[pdftex] Enhancements I would like to see to TeX

Paul Isambert zappathustra at free.fr
Tue Oct 26 02:47:55 CEST 2010


Le 26/10/2010 02:10, Jeffrey McArthur a écrit :
> The discussion about TeX as a composition engine have been 
> interesting. They
> remind me of some things I have mentioned before.
>
> I remember a discussion years ago at a TUG meeting I had about changes to
> the way TeX handles output. TeX was designed to minimize memory
> requirements. This means that TeX will eject a page as soon as it finds a
> reasonable break point. In the early days of TeX, there was at least one
> attempt to do a more elaborate approach to pagination. I would like to 
> see
> an implementation that would keep the entire job in memory and 
> paginate to
> minimize the total badness of all the page breaks. I admit this gets 
> complex
> when supporting multiple columns.

I've been thinking similar ideas (and, I believe, other people too). 
With LuaTeX, one could compute all feasible breakpoints (actually, one 
could retrieve them, to begin with), and apply a simplified version of 
the paragraph builder. I might try to flesh it out some day.
What troubles me, though, is that I'm not sure it's as useful as it 
seems, unless one is willing to change the entire layout of a document. 
There aren't so many possible pages, once a give vertical size is given. 
(Multiple columns don't change much, they're like pages, as far as TeX 
is concerned.)

> Expanding on that, I would like to see TeX keep multiple layouts of a
> paragraph and make the selection based on minimizing the total pages 
> break
> badness. For example, if you have a paragraph that will set as three 
> lines
> but putting it on the first page makes the page go long and putting it on
> the second page makes the first page run short. Breaking the three line
> paragraph means the page break has either a widow or orphan penalty. One
> solution is to set the paragraph loose so that it sets as four lines 
> instead
> of three. Then you can break the paragraph and not get widow or orphan
> penalties.

That is done (manually, I suppose) in some French publishing houses: 
shrink or stretch a paragraph, so to speak, to avoid widows and orphans. 
With LuaTeX again, since all nodes are available and (above all) can be 
manipulated, that might be done. Now the problem is the algorithm...

Overall, the question is: would it be worth it? Would an optimal page 
break on an entire document change much to an already well-designed 
layout? I've become quite convinced that manual adjustment can't be 
avoided.

Best,
Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/pdftex/attachments/20101026/fa111fea/attachment.html>


More information about the pdftex mailing list