![将考试题目或题目部分及其答案保存在同一页](https://linux22.com/image/443299/%E5%B0%86%E8%80%83%E8%AF%95%E9%A2%98%E7%9B%AE%E6%88%96%E9%A2%98%E7%9B%AE%E9%83%A8%E5%88%86%E5%8F%8A%E5%85%B6%E7%AD%94%E6%A1%88%E4%BF%9D%E5%AD%98%E5%9C%A8%E5%90%8C%E4%B8%80%E9%A1%B5.png)
我希望有类似的东西,\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}