梅威瑟:
\documentclass[12pt]{article}
\usepackage[margin=2cm]{geometry}
\usepackage{amsmath, amssymb}
\usepackage [english]{babel}
\usepackage [autostyle, english = american]{csquotes}
\setlength{\parindent}{0pt}
%%exam stuff
\usepackage[load-headings]{exsheets} %need to have exsheets.cfg in the same folder
\SetupExSheets{
headings = runin-nr ,
headings-format = \normalsize ,
%solution/print = true %get solutions printed after questions
counter-format = 2-qu. %\penumber-question number. is the counter format.
}
\usepackage[inline]{enumitem}
\newlist{choices}{enumerate*}{1}
\setlist[choices]{itemjoin = \hspace{0.65in},before=\hspace{0.125in},label=(\Alph*)}
%%exam stuff
\newcommand{\itemamount}{0.5in}
\begin{document}
\setlength\itemindent{\itemamount}
\begin{question}[type = exam]
\hspace{0.125in}Question........\par
\end{question}
\begin{choices}
\item Yah
\item Yah2
\item Yah3
\end{choices}\par
\begin{choices}
\setcounter{enumii}{4}
\item Yah4
\item Yah5
\end{choices}
\end{document}
有什么方法可以让 的第二行choices
与 的第一行对齐choices
(例如,A 和 B 应该对齐)并让 的第二行choices
继续为 (D) 和 (E) 而不是 (A) 和 (B)?我尝试研究计数器,但无济于事。
答案1
您应该使用默认加载的包exsheets
的功能。只需通过以下方式定义一个新任务:tasks
exsheets
\NewTasks[counter-format=(tsk[A]),label-width=4ex,before-skip=0.125in,
item-indent = 4em]{choices}[\choice](3)
完整代码:
\documentclass[12pt]{article}
\usepackage[margin=2cm]{geometry}
\usepackage{amsmath, amssymb}
\usepackage [english]{babel}
\usepackage [autostyle, english = american]{csquotes}
\setlength{\parindent}{0pt}
%%exam stuff
\usepackage[load-headings]{exsheets} %need to have exsheets.cfg in the same folder
\SetupExSheets{
headings = runin-nr ,
headings-format = \normalsize ,
%solution/print = true %get solutions printed after questions
counter-format = 2-qu. %\penumber-question number. is the counter format.
}
\NewTasks[counter-format=(tsk[A]),label-width=4ex,before-skip=0.125in,
item-indent = 4em]{choices}[\choice](3)
\begin{document}
\begin{question}[type = exam]
\hspace{0.125in}Question........\par
\end{question}
\begin{choices}
\choice Yah
\choice Yah2
\choice Yah3
\choice Yah4
\choice Yah5
\end{choices}
\end{document}
有关自定义列表的更多详细信息,请参阅tasks
文档。