【发布时间】:2009-01-30 03:55:39
【问题描述】:
根据这个问题:
Redefining Commands in a New Environment
如何重新定义(或使用\def 定义)使用参数的宏?我不断收到illegal parameter definition in \foo 错误。因为我需要自定义分隔符,所以我不能使用\newcommand 或\renewcommand。
我的代码的一般形式如下所示:
\newenvironment{foo}{%
...spacing stuff and counter defs...
\def\fooitem#1. #2\endfooitem{%
...stuff...
}
\def\endfooitem{endfoo}
}
{...after material (spacing)...}
这一定是可能的。现在我使用的是纯 TeX 定义(正如我在上面的问题中提到的),但我真的很想与 LaTeX 系统保持一致。
【问题讨论】: