首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >试题课中课文在试题部分之间的放置

试题课中课文在试题部分之间的放置
EN

Stack Overflow用户
提问于 2020-05-31 10:32:56
回答 1查看 492关注 0票数 1

我正试图准备一些LaTeX考试,并希望能够有多部分的问题,其中一些部分有他们自己的序言,这是我有困难。

作为我希望它出现的一个例子(点只是用来缩进的):

( 1)以下是适用于整个问题的一些可预见性问题。

...a)这里是问题的第一部分。

...Here是将适用于b部分和c部分的另一些序言。

...b)这里是问题的第二部分。

...c)这里是问题的第三部分。

...Here是问题最后一部分的最后序言。

...d)这是问题的最后一部分。

我在努力想办法把序言插进去。目前,我不得不将序言插入到相关的以下部分,但这并不理想:

代码语言:javascript
复制
\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}

我希望有一种方法可以有效地“暂停”部件环境,只返回问题环境--有吗?

我知道我可以结束部分并重新启动,手动覆盖开始部分,但这感觉像是一个完全的机器人,我认为一定有一个更好的方法。

非常感谢!

EN

回答 1

Stack Overflow用户

发布于 2020-05-31 22:04:11

您可以使用\uplevel宏或EnvUplevel环境在问题的各个部分之间放置说明:

代码语言:javascript
复制
\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.

\uplevel{test}

\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.

\begin{EnvUplevel}
test
\end{EnvUplevel}
\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}

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/62114870

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档