Please take this question for a moot point:
I'd like to know about edge cases where different tokens which TeX might encounter during expansion without delivering error-messages have the same meaning and the same \string
-representation.
By "have the same meaning" I mean that
\ifx⟨token 1⟩⟨token 2⟩\expandafter\firstoftwo\else\expandafter\secondoftwo\fi
yields \firstoftwo
.
By "same \string
-representation" I mean that \string⟨token 1⟩
yields the same set of tokens as \string⟨token 2⟩
.
Edge cases I came up with so far:
- frozen-
\relax
and\relax
-primitive. - the nameless control-sequence (producible via
\csname\endcsname
or via an escape-character (backslash) at the end of a line of .tex-input while\endlinechar
has a negative value) and the control-sequence whose name iscsname⟨escapechar⟩endcsname
(producible via\csname csname\string\endcsname\endcsname
) while those control-sequences have the same meaning. - active-character-token let equal to a non-active pendant.
- one-letter-control-sequence let equal to an explicit character token where the character-code corresponds to the character which forms the name of the control-sequence while
\escapechar
has a negative value.
Are there more edge cases?
E.g., what about things like \inaccessible
or tokens that TeX might insert while processing an alignment? You can define \inaccessible
. Can you let it equal to TeX's \inaccessible
?
Best Answer
Another such case are frozen font control sequences obtained by applying
\the
to a font command and the original font command itself. They fulfill all your criteria: