我在 Latex 文档中定义了新命令。尽管 pdf 渲染正确,但编译器会引发“未定义的控制序列”错误。您能帮我找出问题所在吗?
\documentclass{article}
\usepackage{amssymb}
\usepackage[utf8]{inputenc}
\usepackage{xparse}
\NewDocumentCommand{\textKeyCommitGeneral}{ O{x} O{p} }{c^{#1}_{#2}} % Key commit representation general
\NewDocumentCommand{\expKeyCommitGeneral}{ O{x} O{p} }{$c^{#1}_{#2}$\xspace} % Key commit representation general
\NewDocumentCommand{\textCoSCKGeneral}{ O{x} O{p} }{K(\textKeyCommitGeneral[#1][#2])} % DCoS-C Analysis K general
\NewDocumentCommand{\expCoSCKGeneral}{ O{x} O{p} }{$\textCoSCKGeneral[#1][#2]$\xspace} % DCoS-C Analysis K general
\begin{document}
\expCoSCKGeneral
\end{document}