# [texhax] ! TeX capacity exceeded, sorry [input stack size=5000].

Hefferon, James S. jhefferon at smcvt.edu
Sat Aug 12 21:13:00 CEST 2017

Is there some way to see the contents of the stack?

Just for a brief description of why I want to do that: I'm having a lot of trouble developing a document class.  It is telling me this.

! TeX capacity exceeded, sorry [input stack size=5000].

If I look in the log I see this.

Here is how much of TeX's memory you used:
36435 strings out of 493029
635171 string characters out of 6136234
1080452 words of memory out of 5000000
38236 multiletter control sequences out of 15000+600000
248887 words of font info for 486 fonts, out of 8000000 for 9000
1141 hyphenation exceptions out of 8191
5000i,19n,6867p,10383b,1882s stack positions out of 5000i,500n,10000p,200000b,80000s
!  ==> Fatal error occurred, no output PDF file produced!

I seem to be getting the error a lot when I say \begin{answer} ... \end{answer}. I am using the answers package, but the code I'm using seems right to me.

% Name of file holding answers