因为enumerate
有这样的选择start
或者resume
或者类似的命令\setcounter{enumi}{4}
或者\addtocounter{enumi}{41}
正如在以下问题中讨论的那样我怎样才能使枚举列表从 1 以外的其他数字开始?或者恢复列表。
parts
文档类中的环境是否存在类似的可能性exam
?
\documentclass{exam}
\begin{document}
\begin{questions}
\question[10]
Some not indented text
\begin{parts}
\part this should be (a)
\part this should be (b)
\end{parts}
Some more not indented text interrupting the parts
\begin{parts}
\part this should be (c)
\part this should be (d)
\end{parts}
\end{questions}
\end{document}
答案1
\setcounter{partno}{3}
或\addtocounter{partno}{5}
可能性(灵感来自https://tex.stackexchange.com/a/81720/128042),但不如自动档优雅resume
选择权enumerate
。
https://tex.stackexchange.com/a/1702/128042硬代码会稍微少一些,但代码会多一些:
\documentclass{exam}
\newcounter{nameOfYourChoice}
\begin{document}
\begin{questions}
\question[10]
Some not indented text
\begin{parts}
\part this should be (a)
\part this should be (b)
\setcounter{nameOfYourChoice}{\value{partno}}
\end{parts}
Some more not indented text interrupting the parts
\begin{parts}\setcounter{partno}{\value{nameOfYourChoice}}
\part this should be (c)
\part this should be (d)
\end{parts}
\end{questions}
\end{document}