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

Hefferon, James S. jhefferon at smcvt.edu
Thu Aug 17 01:13:07 CEST 2017


Thank you, David.  By looking at the tracings in the log file I was able to figure out where the trouble lies.  Just in case someone googles this, I was getting into trouble writing


    \Numberstring{chapter}


to the answer file.  (The \Numberstring{..} command is from the fmtcount package and for example if the counter is 3 then it returns "Three".)  I appreciate the help.


Jim

----------------
https://archive.org/details/DontBeaS1947


________________________________
From: David Carlisle <d.p.carlisle at gmail.com>
Sent: Saturday, August 12, 2017 16:16
To: Hefferon, James S.
Cc: texhax at tug.org
Subject: Re: [texhax] ! TeX capacity exceeded, sorry [input stack size=5000].

not really the stack directly but if you stick `\tracingall` at the
last point before the error, you should see macros expanding and
almost certainly getting in a loop somewere

On 12 August 2017 at 20:13, Hefferon, James S. <jhefferon at smcvt.edu> wrote:
> 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
> \newcommand{\answerbodyfilename}{answerbody}
>
> \usepackage{answers}
> \Opensolutionfile{\answerbodyfilename}
> \Newassociation{answer}{ans}{\answerbodyfilename}
>
> The file "answerbody.tex" contains lots of prior answers surrounded by the "ans" environments, so I think it is working OK up until that point.  Moving to the spot that gives the error and putting an \endinput and \end{document} immediately before the \begin{answer} shows instead a "59i" used on the stack, so I think there is something wrong in that particular answer.  But that answer has no recursion, just text.
>
> So I'm stumped.  I hoped that looking  at the stack would give me a clue, but I couldn't find in Chap 27 of the TeXbook if there was a way to do that.  Any other suggestion would be gratefully received.
>
> Thanks,
> Jim
>
>
> _______________________________________________
> TeX FAQ: http://www.tex.ac.uk/faq
> Mailing list archives: http://tug.org/pipermail/texhax/
> More links: http://tug.org/begin.html
>
> Automated subscription management: http://tug.org/mailman/listinfo/texhax
> Human mailing list managers: postmaster at tug.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/texhax/attachments/20170816/ff854af5/attachment.html>


More information about the texhax mailing list