[tex-live] Possibility to enhance registers

Dan Luecking dluecking at sbcglobal.net
Thu Sep 27 00:21:11 CEST 2012

On Tue Sep 25 2012 at 08:55:05 CEST, Robin Fairbairns
(<Robin.Fairbairns at cl.cam.ac.uk>) wrote:

> > What about to change \unpenalty
> > with \ifvmode\else\expandafter\unpenalty\fi
> > in \<http://tug.org/mailman/listinfo/tex-live>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 don't know what he actuall intended, but what the code
_does_ is:

1. When \centering is not in effect:

\unpenalty removes the negative penalty placed by \\,
cancelling the line break. Then, \nopagebreak[4] is
essentially \vadjust{\nobreak}. This prevents a break
between a previously placed rule across the page an
anything that might follow.

Oddly enough this makes the \\ more-or-less unnecessary
as well as all the other elements on this code:

(*) \nopagebreak[4]\null\leavevmode\mtc at zrule\\\mtc at BBR

2. In the presence of \centering:

Then \\ issues a \par and \mtc at BBR happens in vertical mode,
leading to the error.

The entire line of code (*) above doesn't place any penalties
except \\. It is quite silly to place this penalty and then
remove it. It is also silly to place a column-wide rule, than
add a bunch of zero-width invisible stuff after it.

I would replace all of (*) with \par\nobreak. This line of code
and slight variants of it, occurs 9 times in minitoc.sty. What
are macros for?


Daniel H. Luecking
Department of Mathematical Sciences
Fayetteville, Arkansas

More information about the tex-live mailing list