In the preamble of the main.tex file I've written \renewcommand{\exp}[1]{ \exp \left( {#1} \right) } so that the math function \exp automatically includes the round brackets. In the file I wrote simply $ \exp{qV/kT} $. When I compile with pdflatex I get an error that says: TeX capacity exceeded, sorry [input stack size=5000] $ \exp{}. What does that mean?

I'm on Win7, TEXLive2013, TexStudio 2.6.6.

From the log file:

 ! TeX capacity exceeded, sorry [input stack size=5000].
 \exp #1-> \exp \left 
                      ( {#1} \right ) 
 l.2 $ \exp{}
 If you really absolutely need more capacity,
 you can ask a wizard to enlarge me.
  • 1
    In the words of the old joke: to understand recursion, you must first understand recursion. In simple-structured cases like this, you can't usefully have the command you're trying to (re)define in the definition itself. – Ulrich Schwarz Jan 12 '14 at 12:41
  • 1
    Try to use a different name like \myexp. – user11232 Jan 12 '14 at 12:48

Browse other questions tagged or ask your own question.