Donald Arseneau <[log in to unmask]> writes: > Uwe Lück <[log in to unmask]> writes: > >> This is due to a mistake in revtex's way of changing the output >> routine. > > I agree. > >> After a \newtoks\output, > > And, for the output routine, I think that itself is the mistake! I > opine that for \output one should "bite the bullet" and do > \output=\expandafter{\expandafter\mymacro\the\output} > > Hoping to silently hook in, without knowledge of what else has > modified the output routine, and without making your own > modification obvious, is insane. The problem is that you sometimes need to call the old behavior, and sometimes not. In particular, if you have inserted a special penalty yourself, then you will deal with it yourself, not passing anything on and not actually calling the original output routine. There really is no sane reason to expose all this to completely unrelated packages and formats and hope that they will not break in the process. Using a clean separation between changed and called hook makes it possible to give strictly coherent results which make changes strictly confined to the package in question. As you can see from the previous example I posted in the list, it does not even seem that latex.ltx and amsmath.sty which are released together get it right, as amsmath.sty fiddles inconsistently with both \frozen@everymath and \frozen@everydisplay as well as \everymath and \everydisplay. So this clearly is already a mistake when just two packages in the same code base are involved, and the complexity explodes exponentially when more packages get pulled into the play. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum