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. > > Yet another is to perform the > > \@ifdefined test within a group of its own, namely as > > > > \begingroup \@ifdefined{xxx}{\endgroup...}{\endgroup...} > > > > This will also not have the side effect of changing the label internal > > to \relax and will avoid save stack buildup. So it keeps the changed > > side effect to a very small area and does not depend on eTeX. One could > > also implement both (which would help with non-eTeX as well), but I > > don't think that supporting large documents on non-eTeX that previously > > did not work is much of a priority. > > > > What is your take? I find it clearly unsatisfactory to have LaTeX eat > > up save stack for newly defined labels like that at the end of the > > document. > > well, you seem to be the first person getting into trouble with this, but that > doesn't mean one shouldn't fix it. > > I don't really mind either of the three solutions (provided none of the kills > the regression tests for 2e) but personally I would simply drop the group > unless somebody can give me a good reason why it could be needed in a certain > situation. See above, The group is necessary. Yours sincerely Heiko <[log in to unmask]>