I want to generate a list of technical abbreviations and acronyms that I use. Currently, I'm defining all acronyms with a macro I have designed. Now, I want the macro to call another macro, called \addtototaa
, each time it is called, which adds the abbreviation to a table. This other macro is defined as
\newrobustcmd{\addtototaa}[2]{\let\OldContent\TableoftaaBody%
\renewrobustcmd{\TableoftaaBody}{\OldContent #1 & #2 \\}}
And then I have the two additional macros
\newrobustcmd{\TableoftaaBody}{}
\newrobustcmd{\tableoftaa}[0]{\begin{longtabu}{l X}\TableoftaaBody\end{longtabu}}
where \TableoftaaBody
acts as a storage container for the table contents and \tableoftaa
prints the table. But when I try to compile the document I get
TeX capacity exceeded, sorry [input stack size=5000] \tableoftaa
if I call \tableoftaa
(but not otherwise). Why do I get this error? I read on this blog post that this message can appear if you have an infinite recursive loop (I guess the function calls are put on the stack and that's why it's eaten up). Have I defined a recursive function here somewhere? By the way, \addtototaa
is called 31 times before \tableoftaa
is called, because that's how many acronyoms and abbreviations I have defined, and the two arguments I send to \addtototaa
are always just literals, and no additional macros.
.glo
file that was generated was empty, which is strange, since I had used both\makeglossaries
,\newglossaryentry
and\printglossaries
and I also have a normal, working index for which I callmakeindex
. Also, I dislike the fact that one have to recompile several times just to see the changes you've made, and then all abbreviations where already defined in alphabetic order.