[tex-live] Possibility to enhance registers
zdenek.wagner at gmail.com
Tue Sep 25 11:07:22 CEST 2012
2012/9/25 Robin Fairbairns <Robin.Fairbairns at cl.cam.ac.uk>:
> Sigitas Tolusis <sigitas at vtex.lt> wrote:
>> On Sep 24, 2012, at 10:13 PM, Zdenek Wagner wrote:
>> > 2012/9/24 Robin Fairbairns <Robin.Fairbairns at cl.cam.ac.uk>:
>> >> Zdenek Wagner <zdenek.wagner at gmail.com> wrote:
>> >>> 2012/9/24 Robin Fairbairns <Robin.Fairbairns at cl.cam.ac.uk>:
>> >>>> position on page, perhaps? we're operating in the dark, here: you're
>> >>>> letting out snippets of information, none of which is likely to be
>> >>>> diagnostic, so far.
>> >>> It may be even more complex because page breaking is an asynchronous
>> >>> operation.
>> >> which would explain the apparently random nature of the problem.
>> >> i wonder if "simply" redefining \mtc at BBR without that \unpenalty would
>> >> solve the problem ... at least in this case.
>> > Yes, it will solve the problem but the question is why \unpenalty was
>> > used. LaTeX contains its own internal structures and switches so that
>> > the macros could know whether \penalty is needed. \addpenalty is often
>> > used instead of the \penalty primitive. I do not know the internals of
>> > the minitoc package. I do not know when I used this package the last
>> > time, maybe 15 years ago...
>> What about to change \unpenalty
>> with \ifvmode\else\expandafter\unpenalty\fi
>> in \mtc at BBR definition?
> either would deal with the present case; it would be good to know if
> there were adverse consequences, for future reference.
> we need an analysis of what the author actually thought he was doing by
> saying \unpenalty before adding a penalty of 10000 using \linebreak
I see \nopagebreak there
Anyway, \ifvmode will not help, it would be the same as deleting
\unpenalty because it always appear in the vertical mode. If there are
several consecutive penalties, the one with the lowest value wins.
Imagine that the main vertical list contains:
\penalty 10000 % result of \nopagebreak
If the material after \nopagebreak cannot fit to the current page, the
vertical list will be split at \penalty 5 and the following \penalty
150 and \penalty 10000 will disappear because they are discardable
items. Thus I could understand why the author wishes to remove
optional preceding penalty. However, simple \unpenalty does not solve
the problem. Imagine that just preceding it the file contains in the
\goodbreak \vskip 0pt plus 1fil
Now \unpenalty will see glue and do nothing, it will not see the
penalty resulting from \goodbreak, thus the page break could occur
In principle TeX does not allow you to go backwads. Even the \lastXXX
type primitives are not allowed if the main vertical list is empty.
The logic of the definition is wrong. If the page break should be
inhibited, it should be specified as "not allowed after" some
material. The current definition says: "Huh, there was already a page
break? No, please, ask the printer to send the printed page back,
convert the ink molecules back to the vertical list because I want to
produce a different page." The logic of the page breaking in these
macros has to be changed.
The error message in the original post means that something in the
main vertical list triggered a page break immediatelly above
\unpenalty \penalty 10000 which demonstrates that this definition is
> fwiw, looking for drucbert on google, the most recent reference i can
> find is 2008 when he wasn't replying to email.
> i'll have another prod later, unless someone authoritative cares to
More information about the tex-live