LATEX-L Archives

Mailing list for the LaTeX3 project

LATEX-L@LISTSERV.UNI-HEIDELBERG.DE

Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Uwe Lück <[log in to unmask]>
Reply To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Date:
Fri, 1 Apr 2005 16:14:05 +0200
Content-Type:
text/plain
Parts/Attachments:
text/plain (155 lines)
A discussion of which penalty to put into the main vertical list
to trigger \output again after lowering \holdinginserts to < 1
(within a modified LaTeX \output):

At 01:47 30.03.05, you [Donald Arseneau] wrote:
>Uwe Lück <[log in to unmask]> writes:
> > And what about
> >      \ifnum\outputpenalty=10000 \else % [replaced \@M]
> >        \penalty\outputpenalty
> >      \fi
>
>I see no reason to reproduce the exact output penalty, since you
>are looking to get the same page break, so I would probably put a
>negative penalty there.

1. Some obvious requirements are:

R1. -10001 for \clearpage must be reproduced.

R2. \@specialoutput refers to -20000 to decide about \deadcycles.
To keep this feature exactly, (of course) a \penalty < -20000 must
be turned into a \penalty < -20000, and a \penalty \geq -20000 must
be turned into a \penalty \geq -20000 (or may be dropped if
 > -10000). -- I wonder what this feature is good for, I cannot see
from the LaTeX code how using genuine LaTeX commands only
(so no explicit \penalty, but what about \addpenalty?) can produce
an \outputpenalty < -10004. (I cannot find a "supereject" feature --
\penalty-20000 as in Plain TeX -- in LaTeX.) Perhaps it is support
for some class or package, or it was ...

R3. To avoid a wrong call of \@specialoutput, a \penalty > -10001
must not be turned into a \penalty < -10000.

Not so clear:

R4. There may be a reason for reproducing -10000, but I don't
see any.

2. Of course, reproducing the exact output penalty is a simple
way to meet requirements R1, R2, R3 (and R4). With "simple"
I especially think of the length of the code (and of the
documentation). -- I consider this a "reason" for reproducing
... as Donald Arseneau wondered about. (The wider context
of the above quotation is reproduced below.)

3. On the other hand (see "wider context" below), Donald
Arseneau (seems to have) thought of replacing an output
penalty -9999, ..., 10000 by, say, -10000 -- to get the same
break as before. However, for the simplicity mentioned in 2.
above, it would be nice if, say, the proposal at the top of
this message (i.e., reproduce unless 10000, maybe
replacing \penalty\outputpenalty line in the proposal in
latex/3719) would yield the same break anyway. This nice
thing would be the case if (after the \output which was met
with \holdinginserts>0) the vertical list were the same as
before, or if the difference were a \penalty10000 (TeXbook
p. 125) neighbouring the \penalty that we are inserting only
-- and if dimensions like \pagegoal were not changed (or
only in some appropriate way). And is such a nice thing the
case? I guess David Kastrup has addressed such questions,
maybe sometimes tending towards "yes", sometimes
qualifying. I am attaching below his contributions which I
have in mind here, together with some context. (Of course,
unequivocality cannot be expected in e-mails, unless one
spends hours on one e-mail like I do.)

[End of discussion. Quotations:]

At 01:47 30.03.05, you [Donald Arseneau] wrote:
[wider context for 2. and 3. above, not complete,
  the subject was "\@reinserts"]
>Uwe Lück <[log in to unmask]> writes:
>
> > >Donald Arseneau <[log in to unmask]> writes:
> > > > The problem with \penalty\outputpenalty is that \outputpenalty=10000
> > > > and prevents the same page break instead of forcing the same break.
>
>\pagediscards is an etex primitive (built-in) command.  David is
>probably right (since he has been looking at that stuff) but I
>don't see the benefit, since we want to get the same page break
>again.
>
> > And what about
> >      \ifnum\outputpenalty=\@M \else
> >        \penalty\outputpenalty
> >      \fi
>
>I think that would work.
>The point is that if TeX breaks the page *not* at a penalty (effective
>penalty=0) it flags that by setting \outputpenalty=10000 (which could
>never happen naturally).
>
>I see no reason to reproduce the exact output penalty, since you
>are looking to get the same page break, so I would probably put a
>negative penalty there.
>
>You do not want to hold inserts when performing "supereject"
>(-20000), so you do need to release the inserts then.

At 10:46 30.03.05, you [David Kastrup] wrote:
[for 3. above, not complete, subject was "\@reinserts"]
>Donald Arseneau <[log in to unmask]> writes:
> > Uwe Lück <[log in to unmask]> writes:
> >> At 13:30 26.03.05, you [David Kastrup] wrote:
> >> >Donald Arseneau <[log in to unmask]> writes:
> >> >
> >> > > The problem with \penalty\outputpenalty is that \outputpenalty=10000
> >> > > and prevents the same page break instead of forcing the same break.
> >> >
> >> >Well, when rebreaking, I find that using \pagediscards seems like the
> >> >best thing to do.  Then you get the same vertical list again, unless
> >> >\outputpenalty is less than 10000, in which case you need to reinsert
> >> >it in front of the discards (it will be replaced with \nobreak in the
> >> >\pagediscards in this case).
>
>[...]
>
>If we are aiming for the same break, indeed the pagediscards are not
>interesting.  Indeed, as opposed to splitdiscards, the page discards
>are what has been removed at the _start_ of the current output page,
>not after it.  So the pagediscards are only interesting if the
>_previous_ break might need reversal.
>
>[...]
>
> > I see no reason to reproduce the exact output penalty, since you are
> > looking to get the same page break, so I would probably put a
> > negative penalty there.
>
>As the sort of a note aside: a forced penalty will lead to different
>values of \pagetotal, \pageshrink and so on (more useful values,
>actually), so if you have some subordinate output routine looking at
>those values, it might make different decisions.
>
> > There are references to \footins in \@specialoutput that have to be
> > rewritten for the case when \holdinginserts is holding the
> > inserts. (The whole point of holding them is that they do *not* come
> > out when cycling through \@specialoutput.)
> >
> > I'm not sure that it is even possible to maintain the \@pageht
> > methods when using \holdinginserts.
>
>The page break decisions including splits of insertions and limiting
>of insertion material to the respective dimen remain the same.  It is
>just that the material does not make it into the boxes, but stays in
>insertion items in box255.

[U. L.: Yes, but D. A. addressed a different matter, I think.
He indicated something like -- I'm generalizing a little -- that
LaTeX's float placement mechanism does not cooperate with
TeX's algorithm of choosing among past insertions for the
next page as nicely as intended. The simple uses of
\holdinginserts discussed so far just replace one problem
with another one.]

ATOM RSS1 RSS2