Questions environments
questions environments and \question commands
In the questions environment, use the \question command to input a question.
\begin{questions}[Optional parameters]
\question[score] question stem
\end{questions}
| Optional Parameter | Description |
|---|---|
| r | Starts the question number from 1 |
| s | Displays the score |
| t | Reserves space for the answer after the question |
| p | Adds right-aligned parentheses after the question (for multiple choice questions) |
\key command
The \key command can be used to display the answer when the document class option answers is enabled. Otherwise, it will display a horizontal line. The length of the line will automatically adjust based on the length of the answer.
Option command
Supports 3 to 6 options, and will automatically display in multiple columns based on the option length.
\threechoices{opt1}{opt2}{opt3}
\fourchoices{opt1}{opt2}{opt3}{opt4}
\fivechoices{opt1}{opt2}{opt3}{opt4}{opt5}
\sixchoices{opt1}{opt2}{opt3}{opt4}{opt5}{opt6}
sub-question environment
In the subquestions environment, use the \subquestion command to insert a sub-question, which supports nesting.
\begin{subquestions}
\subquestion[score] sub-question stem
\subquestion[score] sub-question stem
\subquestion[score] sub-question stem
\end{subquestions}
Example
已复制
Created: Oct 4, 2025, 9:37 AM
Last Updated: Oct 4, 2025, 9:37 AM