# TeX capacity exceeded, sorry [input stack size=5000] error [closed]

There aren't any other errors except this. My document only compiles up to the second page and anything else is not compiled in the dvi file.

Can anyone explain this error and how should I go about fixing this? Thanks.

## closed as unclear what you're asking by AlexG, user36296, Phelype Oleinik, Bobyandbob, Stefan PinnowApr 19 '18 at 14:00

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

• Welcome to TeX.SX! Sorry to disappoint you, but anything in your document may be causing this. The only way for us to find out is if you show us a minimal working example (MWE) that causes the same error. – Phelype Oleinik Apr 18 '18 at 17:59
• Remove everything from the first page. Find out what it is in the second page that is causing this. – Teepeemm Apr 18 '18 at 18:30

• A forgotten \end{document} does not result in the reported error with any document. So I think this answer is of little value, and the question is too broad. A lot of other errors and reasons may lead to an input stack overflow. – AlexG Apr 19 '18 at 13:03