undefined control sequence. #1382
-
Why I get an undefined control sequence für the macro \Test outside of the \foreach loop?
|
Beta Was this translation helpful? Give feedback.
Answered by
hmenke
Feb 3, 2025
Replies: 1 comment 1 reply
-
The body of a \newcommand*\hash[3]{%
\expandafter\xdef\csname #1_#2\endcsname{#3}%
\expandafter\gdef\csname #1\endcsname##1{\csname #1_##1\endcsname}%
} |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
hmenke
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The body of a
\foreach
loop forms a TeX group, which means that definition inside the body will be local to that group. The simplest workaround is to just make your definitions global.