\expandonce
\expandonce
is defined as \expandafter\noexpand
. Thus,
\expandonce token
expands token once, instead of to
TeX primitives. This is most useful in an \edef
.
For example, the following defines \temp
to be \foo
, not
`abc'.
\def\foo{abc} \def\bar{\foo} \edef\temp{\expandonce\bar}