# [luatex] Getting all symbols

Arno Trautmann Arno.Trautmann at gmx.de
Thu Jun 7 17:20:48 CEST 2012

Hi,

Sensei wrote:
> I'm trying to find *at runtime* all the symbols allowed in a latex
> environment. So, given a tex file, I'd like to access
> - the complete predefined commands/symbols/definitions;
> - the complete list of commands/symbols/definitions defined in packages.

This may not really help, but maybe give a hint: I think I had asked a
similar question some time ago, Tako answered that he wanted to
Unfortunately I cannot find the corresponding mails, sorry.

Cheers
Arno

> So, the predefined language list would include \LaTeX, \def,
> \newcommand, ~, \usepackage, and so on. I've been informed that this is
> a naive view, since there are lots of other commands such as \@ and
> similars, and a simple match with a \ would be unrealistic (e.g.,
> anything beginning with a \ is a command).
>
> When including a package, for example graphicx, I expect to find a way
> to have \includegraphics and its siblings. Again, packages may mess up a
> little bit.
>
> The best would be having commands along with their options, but I don't
> know if this is possible.
>
> One thing I'd like to avoid: creating my own parser. Why on earth should
> I create a parser when latex knows more than me (or everyone else) what
> symbols and commands it knows?
>
> The suggestions from the newsgroup is that *maybe* LuaTeX gives a way to
> access all TeX's macro hash table. If so, I'd be really happy.
>
>
> Am I looking in the wrong place?
>
>
> Thanks & Cheers!
>