将考试题目或题目部分及其答案保存在同一页

将考试题目或题目部分及其答案保存在同一页

我希望有类似的东西,\filbreak 通过在每个问题和选择\filbreak前面加上一个\question,就像描述的一样这里 低于

防止考试中问题和答案之间出现分页符,显然\filbreak行不通。有什么想法吗?

\documentclass[answers, 10pt]{exam}
\usepackage[margin=0.75in]{geometry}
\usepackage{lipsum}
\usepackage{indentfirst}
\usepackage{enumerate}
 
\linespread{1}
 
\renewcommand{\rmdefault}{phv}
\renewcommand{\sfdefault}{phv}
 
 
\begin{document}\pagestyle{empty}\raggedright
 
\lipsum[1] \lipsum[1] \lipsum[1] \lipsum[1] \lipsum[1] \lipsum[2] 
 
 
 
\begin{questions}
 
\filbreak
\question Which of the following is an example of the correct answer?
 
 \filbreak 
\begin{choices}
\CorrectChoice first answer
\choice second answer
\choice third answer
\choice fourth answer
\choice fifth answer
\end{choices}

\filbreak
\question I am looking for getting question and  question parts not breaking
\begin{solution}
\lipsum[1]
\end{solution}


\filbreak 
\question Which of the following is an example of the correct answer?
\begin{choices}
\CorrectChoice first answer
\choice second answer
\choice third answer
\choice fourth answer
\choice fifth answer
\end{choices}


 

\filbreak 
\question Which of the following is an example of the correct answer?
\begin{choices}
\CorrectChoice first answer
\choice second answer
\choice third answer % This should be kept together with the first two choices
\choice fourth answer
\choice fifth answer
\end{choices}
 
 
\end{questions}
 
\end{document}

相关内容