如何获取\tmpA
和的 catcode \tmpB
?
\documentclass[margin=5mm,varwidth]{standalone}
\begin{document}
\let\tmpA=a
\def\tmpB{b}
\the\catcode`a % 11, FINE; BUT WHAT ABOUT \tmpA AND \tmpA?
\end{document}
答案1
至于你之前的问题,\meaning
你的朋友在这里吗?
\documentclass[margin=5mm,varwidth]{standalone}
\begin{document}
\let\tmpA=a
\def\tmpB{b}
1 \the\catcode`a % 11, FINE; BUT WHAT ABOUT \tmpA AND \tmpA?
\def\zzz#1 #2 #3\relax{#1 #2}
\edef\zz{\expandafter\zzz\meaning\tmpA. . \relax}
\let\tmpknownletter=z
\edef\zzletter{\expandafter\zzz\meaning\tmpknownletter. . \relax}
2 \ifx\zz\zzletter 11\else 0\fi % could test for other cases
3 \the\catcode\expandafter`\tmpB
\end{document}