<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<div class="moz-text-flowed" style="font-family: -moz-fixed;
font-size: 14px;" lang="x-western">Le 26/10/2010 02:10, Jeffrey
McArthur a écrit :
<br>
<blockquote type="cite" style="color: rgb(0, 0, 0);">The
discussion about TeX as a composition engine have been
interesting. They
<br>
remind me of some things I have mentioned before.
<br>
<br>
I remember a discussion years ago at a TUG meeting I had about
changes to
<br>
the way TeX handles output. TeX was designed to minimize memory
<br>
requirements. This means that TeX will eject a page as soon as
it finds a
<br>
reasonable break point. In the early days of TeX, there was at
least one
<br>
attempt to do a more elaborate approach to pagination. I would
like to see
<br>
an implementation that would keep the entire job in memory and
paginate to
<br>
minimize the total badness of all the page breaks. I admit this
gets complex
<br>
when supporting multiple columns.
<br>
</blockquote>
<br>
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.
<br>
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.)
<br>
<br>
<blockquote type="cite" style="color: rgb(0, 0, 0);">Expanding on
that, I would like to see TeX keep multiple layouts of a
<br>
paragraph and make the selection based on minimizing the total
pages break
<br>
badness. For example, if you have a paragraph that will set as
three lines
<br>
but putting it on the first page makes the page go long and
putting it on
<br>
the second page makes the first page run short. Breaking the
three line
<br>
paragraph means the page break has either a widow or orphan
penalty. One
<br>
solution is to set the paragraph loose so that it sets as four
lines instead
<br>
of three. Then you can break the paragraph and not get widow or
orphan
<br>
penalties.
<br>
</blockquote>
<br>
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...
<br>
<br>
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.
<br>
<br>
Best,
<br>
Paul
<br>
</div>
</body>
</html>