Heiko, > On Fri, Mar 07, 2008 at 09:29:07PM +0100, Frank Mittelbach wrote: > > > David Kastrup writes: > > > > > Another possibilities are to remove the grouping from the end of > > > document action testing the labels. > > > > from briefly staring at the code I see no reason why this group is needed at > > all. Does anybody see one why it could make a difference? > > You mean the following group? > > \def\enddocument{% > ... > \begingroup > ... > \input\jobname.aux > ... > \endgroup > ... > } > > Then it isn't known what .aux files may contain (apart from \newlabel). > Many packages write definitions and other stuff in the .aux files. well it is known to me, but in which case would that make a difference at this point? The only thing that happens after the endgroup is \deadcycles\z@\@@end and that shouldn't even output another page unless the aux files are missued to the point that they contribute again to the page galley so what am I missing that you think can make a problem even if such definitions or stuff are not executed in a group? frank