考虑以下最小示例:
\documentclass{minimal}
\newcommand{\CMDI}[1]{}
\newcommand{\CMDII}[2][]{}
\begin{document}
\begin{equation}
3.14
\end{equation}
\CMDII[optional]{main}
A sentence which is so long that it does not fit on one line and continues on another line and which would be even longer if I was more creative.
\begin{equation}
3.14
\end{equation}
\CMDI{main}
A sentence which is so long that it does not fit on one line and continues on another line and which would be even longer if I was more creative.
\end{document}
它给出了以下pdf:
为什么第一个“A”之前有多余的空格?我该如何通过修改 的定义来删除它\CMDII
?谢谢!
我的动机:我使用带有可选参数的自定义命令在草稿中插入注释,并且不想在最终版本中显示它们,同时将它们保留在源代码中。