The LaTeX3 sources, released 2021-07-12, says in section "23.7 Description of all possible tokens" of "Chapter 23: The l3token package /Token manipulation":
- Expanding
\noexpand ⟨token⟩
(when the⟨token⟩
is expandable) results in an internal token, displayed (temporarily) as\notexpanded: ⟨token⟩
, whose shape coincides with the⟨token⟩
and whose meaning differs from\relax
.
Question 1: Why the statement that the meaning differs from \relax
?
If I do
\expandafter\show\noexpand\TeX
, then I get:
> \TeX=\relax.
<recently read> \notexpanded: \TeX
, which seems to imply that right after expanding \noexpand
the meaning equals the meaning of the \relax
-primitive.
If I do
\expandafter\let\expandafter\test\expandafter=\noexpand\TeX \show\test
, then I get:
> \test=\relax
, which seems to imply that right after expanding \noexpand
the meaning equals the meaning of the \relax
-primitive.
Besides this, TeXbook, "Chapter 20: Definitions (also called Macros)" says:
\noexpand ⟨token⟩
. The expansion is the⟨token⟩
itself; but that⟨token⟩
is interpreted as if its meaning were\relax
if it is a control sequence that would ordinarily be expanded by TeX's expansion rules.
Btw: This brings up more questions:
On the one hand (source3.pdf) there is the statement of the expansion of \noexpand ⟨token⟩
yielding an internal token, displayed (temporarily) as \notexpanded: ⟨token⟩
whose shape coincides with the ⟨token⟩
.
On the other hand (TeXbook) there is the statement of the expansion of \noexpand ⟨token⟩
yielding the ⟨token⟩
itself.
These are two different statements.
Question 2: Are both statements correct?
Question 3: Which of these two statements is more precise?
\ifx
)