2

我已将环境定义为

\newenvironment{question}[1]
{Question (#1 points):}{}

我用它作为

\begin{question}[10]
...
\end{question}

我收到以下错误:

Missing number, treated as zero
\begin{question}[
                 10]
4

1 回答 1

7

正确的语法是使用花括号,而不是方括号:

\begin{question}{10}
What is the airspeed velocity of an unladen swallow?
\end{question}
于 2009-09-06T07:52:33.380 回答