[texhax] Tex Capacity Exceeded

Bruce Thomson bruce at auswildlife.com
Fri Nov 23 10:31:50 CET 2007

Hi all,

I initially posted a question yesterday and received a response but it
didn't appear to circulate in the texhax group, so I have copied and pasted
it here to continue the discussion, this time fully subscribed in texhax! 


I have a problem which has already received some previous attention. However
I have looked at the various posts and tried a range of remedies, but none
appear to work. I was wondering if someone might be able to interpret some
of the finer detail in this message to suggest a fix. It occurs in MiKTeX
2.6 when compiling and never occurred when using previous versions! The
problem occurs when it reaches the tableofcontents. I have checked brackets
and variously edited out each package that I use, rewritten some files and
all to no avail. 

! TeX capacity exceeded, sorry [input stack size=5000].
\label #1->\@bsphack 
                     \begingroup \@onelevel at sanitize \@currentlabelname
l.1 \begin{tableofcontents}

I have also noticed in previous threads that a copy of the source code is of
use, so here it is. 

Any help would be gratefully appreciated. 

Bruce Thomson

\def\cleardoublepage{\clearpage\if at twoside \ifodd\c at page\else
    \if at twocolumn\hbox{}\newpage\fi\fi\fi}
\makeatother \clearpage{\pagestyle{plain}\cleardoublepage}
%next command: sections to be printed, list as required.
\frontmatter %order of chapters as required

More information about the texhax mailing list