我正在使用埃萨米包来做简答题考试。根据文档,我可以在变体文件中使用以下代码:
这是eachtest.tex
文件。
\begin{problem}
This is the question.
\begin{solution}
This is the answer.
\end{solution}
\end{problem}
这是problemtestfile.tex
我用来运行它的。
\documentclass[a4paper,UKenglish]{article}
\usepackage[shufflerandom,autopston,xyz,twocolumns,solutions,fillb]{esami}
\usepackage{pstricks}
\usepackage{pstricks-add}
\usepackage{pst-plot}
% +=============================+
% | DEFINITIONS |
% +=============================+
\def\examname{The name of the exam}
\def\numcompiti{1}%%% The number of the versions
\date{2013/3/22}%%% THE DATE IN THE FORMAT YYYY/MM/DD
\def\Data{\longdate}%%% or \shortdate: the date in the heading
\begin{document}
\testversioni
\pagestyle{esame}
\whiledo{\thevers<\numcompiti}{\stepvers
% +=============================+
% | THE SEED |
% +=============================+
\FPeval\seme{round((\thenomefile+(3*\thevers)):0)}
\randomi=\seme
\permuta
\section*{Practice Final Exam}
\begin{test}
\begin{questions}
\esercizi{eachtest}
\end{questions}
\end{test}
\closevers
}
\end{document}
错误如下:
eachtest.tex
6
LaTeX Error: Something's wrong--perhaps a missing \item.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.6 \end{problem}
esami.sty
534
Overfull \hbox (5.79999pt too wide) in paragraph at lines 534--534
[][]
我不明白是什么原因导致的 - 也许是我遗漏了某个软件包选项?我尝试用软件包来标记这个问题esami
,但没有成功。
答案1
造成这一问题的原因有两点:
在 eachtest.tex 文件中,环境
problem
必须包含在命令中\newproblem
,如下所示\newproblem{ \begin{problem} This is the question. \begin{solution} This is the answer. \end{solution} \end{problem}}
在 problemtestfile.tex 中,
problem
必须使用环境内的练习外部和test
环境question
:\section*{Practice Final Exam} \esercizi{eachtest}