I describe complex protocols with lots of variables in different files. The problem is that I might change the variable names later. My idea was to define variable names as Latex commands like
\lengthtree (instead of writing e.g.
$\ell_t$). Later I can easily change
$L_t$ by just redefine the latex command.
Now I want to create a list of symbols and I am searching for a possibility to create it automatically. I give the glossaries package a try, but I get Latex errors if I use the symbols in math environments.
What would be the "state-of-the-art" solution to define my variables (which can be used also in math mode) at one global point? A list of symbols should be created automatically.