![修改考试类中的 \question \part \subparts 环境](https://linux22.com/image/427861/%E4%BF%AE%E6%94%B9%E8%80%83%E8%AF%95%E7%B1%BB%E4%B8%AD%E7%9A%84%20%5Cquestion%20%5Cpart%20%5Csubparts%20%E7%8E%AF%E5%A2%83.png)
我想修改\question
\part
和\subpart
环境以包含一个额外的可选参数。
例如当前考试类别有以下内容\question[1]
,显示该问题的分数。
我想添加一个新的可选参数,例如\question[1][4]
4 将调用命令\fillwithdottedlines{4}
平均能量损失
\documentclass{exam}
\begin{document}
\begin{questions}
\question[1]
Question number 1 has 4 lines
\fillwithdottedlines{2cm}
% Ideally i would like to write \question[1][2]
\question
\begin{parts}
\part[1]
This part has 4 lines.
\fillwithdottedlines{2cm}
% Ideally i would like to write \part[1][2]
\part[3]
This part does not not have lines.
% Leave as it is.
\end{parts}
\end{questions}
\end{document}