【发布时间】:2020-05-31 10:32:56
【问题描述】:
我正在尝试用 LaTeX 准备一些考试,并希望能够有多部分的问题,其中一些部分有自己的序言,我遇到了困难。
作为我希望它出现的示例(点仅用于缩进):
1) 这里有一些可用于贯穿始终的问题。
...a) 这是问题的第一部分。
...这是适用于 b 部分和 c 部分的进一步序言。
...b) 这是问题的第二部分。
...c) 这是问题的第三部分。
...这是问题最后一部分的最后序言。
...d) 这是问题的最后一部分。
我正在努力寻找一种插入序言的方法。目前我不得不接受将序言插入以下相关部分,但这并不理想:
\documentclass{exam}
\begin{document}
\begin{questions}
\question
Here is some preamble for the question that will apply throughout.
\begin{parts}
\part
Here is the first part of the question.
\part
Here is some further preamble that will apply for part b and c. Here is the second part of the question.
\part
Here is the third part of the question.
\part
Here us some final preamble for the last part of the question. Here is the final part of the question.
\end{parts}
\end{questions}
\end{document}
我希望有一种方法可以有效地“暂停”部分环境并仅返回问题环境 - 有吗?
我确实知道我可以结束部分并重新启动,手动覆盖开始部分,但这感觉就像一个完全的障碍,我认为必须有更好的方法。
非常感谢!
【问题讨论】:
-
请不要只发布不可编译的代码片段,而是要创建一个minimal reproducible example
-
感谢提醒 - 我忘记了文档类和开始/结束文档,现在添加了。
标签: latex typesetting