
아래 코드 \csname ... \endcsname
와 \cs_if_exist_use:c
내부는 \NewDocumentCommand
예상대로 작동하지 않습니다.
\documentclass{article}
\usepackage{xparse}
\expandafter\def\csname test 1\endcsname{a,$\alpha$,b}
\ExplSyntaxOn
\clist_new:N \l_test_clist
\NewDocumentCommand {\test} {}
{
\csname test 1\endcsname
\cs_if_exist_use:c {test 1}
}
\ExplSyntaxOff
\begin{document}
show: \test
use: \csname test 1\endcsname
\end{document}
답변1
이름을 사용하여 명령을 정의했지만 test 1
Expl3 코드 공간 문자는 무시되고 토큰을 만들지 않으므로 test와 1 사이에 공백 토큰을 test1
사용 하도록 테스트했습니다.test ~ 1