निरंजन
I am using LaTeX3 syntax extensively for a project of mine. I want to check all the names I have declared for consistency and uniformity. Is there a way I list down all of them on terminal or in a separate file or something like that? Is there a provision for that? Note that I want the details of `l3keys` also. For my current need, only a list of variable suffices, but I don't mind getting their meanings printed too.
Top Answer
Skillmon
There is nothing built into L3 that could do that. No bookkeeping of macro names or defined keys is done. You could enrich your file with custom markup that keeps track of it (as for a glossary, or as in `l3doc` using `macro` and `function` environments).
Alternatively you could change internals of L3 to add book keeping to them, but that's probably a bad idea.
Maybe the simplest method would be to use `\tracingassigns` and parsing the log file for all the definitions that are part of your project (assuming they match a specific naming pattern).
For instance
```
\ExplSyntaxOn
\tracingassigns=1
\tl_new:N \l_my_thingy_tl
\tl_new:N \l_my_other_tl
\int_new:N \l_my_super_int
\ExplSyntaxOff
```
produces
```log
{into \tracingassigns=1}
{globally changing \l_my_thingy_tl=undefined}
{into \l_my_thingy_tl=macro:->}
{globally changing \l_my_other_tl=undefined}
{into \l_my_other_tl=macro:->}
{globally changing \count10=283}
{into \count10=284}
{changing \count21=283}
{into \count21=284}
{globally changing \l_my_super_int=undefined}
{into \l_my_super_int=\relax}
{globally changing \l_my_super_int=\relax}
{into \l_my_super_int=\count284}
\l_my_super_int=\count284
{changing \catcode9=9}
{into \catcode9=10}
{changing \catcode32=9}
{into \catcode32=10}
{reassigning \catcode34=12}
{changing \catcode58=11}
{into \catcode58=12}
{reassigning \catcode94=7}
{changing \catcode95=11}
{into \catcode95=8}
{reassigning \catcode124=12}
{changing \catcode126=10}
{into \catcode126=13}
{changing \endlinechar=32}
{into \endlinechar=13}
{changing \l__kernel_expl_bool=\char"1}
{into \l__kernel_expl_bool=\char"0}
{changing \ExplSyntaxOff=\protected\long macro:->\char_set_catcode:nn {9}{10}\c
har_set_catcode:nn \ETC.}
{into \ExplSyntaxOff=\protected\long macro:->}
{into \tracingassigns=1}
{globally changing \l_my_thingy_tl=undefined}
{into \l_my_thingy_tl=macro:->}
{globally changing \l_my_other_tl=undefined}
{into \l_my_other_tl=macro:->}
{globally changing \count10=283}
{into \count10=284}
{changing \count21=283}
{into \count21=284}
{globally changing \l_my_super_int=undefined}
{into \l_my_super_int=\relax}
{globally changing \l_my_super_int=\relax}
{into \l_my_super_int=\count284}
\l_my_super_int=\count284
{changing \catcode9=9}
{into \catcode9=10}
{changing \catcode32=9}
{into \catcode32=10}
{reassigning \catcode34=12}
{changing \catcode58=11}
{into \catcode58=12}
{reassigning \catcode94=7}
{changing \catcode95=11}
{into \catcode95=8}
{reassigning \catcode124=12}
{changing \catcode126=10}
{into \catcode126=13}
{changing \endlinechar=32}
{into \endlinechar=13}
{changing \l__kernel_expl_bool=\char"1}
{into \l__kernel_expl_bool=\char"0}
{changing \ExplSyntaxOff=\protected\long macro:->\char_set_catcode:nn {9}{10}\c
har_set_catcode:nn \ETC.}
{into \ExplSyntaxOff=\protected\long macro:->}
```
And a simple `grep` (or similar) could filter out every macro containing `_my_`:
```sh
grep "_my_" texput.log
```
yields
```
{globally changing \l_my_thingy_tl=undefined}
{into \l_my_thingy_tl=macro:->}
{globally changing \l_my_other_tl=undefined}
{into \l_my_other_tl=macro:->}
{globally changing \l_my_super_int=undefined}
{into \l_my_super_int=\relax}
{globally changing \l_my_super_int=\relax}
{into \l_my_super_int=\count284}
\l_my_super_int=\count284
```