blefloch / latex-unravel

Watching TeX digest tokens
24 stars 1 forks source link

Restrict expansion level #30

Open Krzmbrzl opened 5 years ago

Krzmbrzl commented 5 years ago

I'm not sure whether this is possible but if it was possible to specify a maximal expansion level one could get output that is more or less only about the relevant stages of the expansion instead of all sub-expansions going on inside.

Example:

\def\test{\pgfkeys{/a/b/.store in = \bla} bla}
\def\otherTest{\test}
\def\lastTest{\otherTest}

\unravel[max-expansion=2]{\lastTest}

Above example would then not expand \pgfkeys which would end in thousands of expansion steps when maybe one is only interested in how \lastTest expands to the level of \test.