我有两个代码用于同一个显示 - 多项选择题测试中的一个问题。第一个代码在环境中enumerate
;第二个代码是环境。我想从环境中获取我从环境中获取的tabbing
显示。具体来说,我希望问题编号为“ ”,并且我希望第一级和第二级环境之间的行间距与模式的行间距相同。enumerate
tabbing
4.)
text
enumerate
\documentclass{amsart}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{multicol}
\usepackage{enumitem}
\setlist[enumerate,1]{% (
leftmargin=*, label={\textbf{\arabic*.)}}}
\setlist[enumerate,2]{% (
label={\textbf{\roman*.)}}}
\begin{document}
\begin{center}\Large{\textbf{Review of High School Algebra}}\end{center}\vskip0.3in
\begin{enumerate}[itemsep=\baselineskip]
\item Express the following decimals as fractions.
\begin{multicols}{4}
\begin{enumerate}[leftmargin=1.5cm, topsep=\baselineskip]
\item 1
\item 0.25
\item 0.025
\item 0.0025
\item 0.125
\item 0.0125
\item 1.25
\item 0.0625
\end{enumerate}
\end{multicols}
\end{enumerate}
\noindent \textbf{4.) }Express the following decimals as fractions.
\begin{tabbing}
\hspace*{2em} \= \hspace{1.25in} \= \hspace{1.25in} \= \hspace{1.25in} \= \hspace{1.25in} \= \kill
\> \textbf{i.) }1 \> \textbf{ii.) }0.25 \> \textbf{iii.) }0.025 \> \textbf{iv.) }0.0025 \\
\> \textbf{v.) }0.125 \> \textbf{vi.) }0.0125 \> \textbf{vii.) }1.25 \> \textbf{viii.) }0.0625
\end{tabbing}
\end{document}
答案1
解决方案,同样使用tasks
包。前面的文本与环境之间的垂直距离由键设置before-skip
,任务环境的行间距离由after-item-skip
键设置。在下面的代码中,前两个环境使用与 a 环境相同的间距,后两个环境分别使用 a和 atabbing
的值。\medskip
\bigskip
\documentclass{amsart}
\usepackage{amsmath, nccmath}
\usepackage{amsfonts}
\newlength\labelwd
\settowidth\labelwd{\bfseries viii.)}
\usepackage{tasks}
\settasks{counter-format =tsk[r].), label-format=\bfseries, label-offset=1em, label-align=right, label-width
=\labelwd, before-skip =\smallskipamount, after-item-skip=0pt}
\usepackage{enumitem}
\setlist[enumerate,1]{% (
leftmargin=*, itemsep=12pt, label={\textbf{\arabic*.)}}}
\begin{document}
\begin{center}\Large{\textbf{Review of High School Algebra}}\end{center}\vskip0.3in
\begin{enumerate}[itemsep=\baselineskip, topsep=\baselineskip]
\item Express the following decimals as fractions.
\begin{tasks}(4)
\task 1
\task 0.25
\task 0.025
\task 0.0025
\task 0.125
\task 0.0125
\task 1.25
\task 0.0625
\end{tasks}
\end{enumerate}
%
\begin{enumerate}[start =9]
\item The sum of the (interior) angles of which of the following figures is not a multiple of $360^{\circ}$?
\begin{tasks}(3)
\task triangle
\task trapezoid
\task isosceles trapezoid
\task hexagon
\task octogon
\end{tasks}
\end{enumerate}
\begin{enumerate}[topsep=\baselineskip, start=16]
\item Simplify the following expressions. (Except for the first expression, the following expressions are equal to integers.)
\begin{tasks}[before-skip =\medskipamount, after-item-skip=1.5pt](3)
\task $\sqrt{0.25}$
\task $\sqrt{0}$
\task $\sqrt{36}$
\task $\sqrt[\uproot{1} \leftroot{-1} 3]{-1}$
\task $\sqrt[\uproot{1} \leftroot{-1} 3]{-8}$
\task $\sqrt[\uproot{1} \leftroot{-1} 3]{(18)(12)}$
\end{tasks}
\end{enumerate}
\begin{enumerate}[topsep=1.2\baselineskip, start=25]
\item $a$ and $b$ are positive real numbers, and $a^{2}b = 1000$. Which of the following expressions is an integer?
\begin{tasks}[before-skip =\bigskipamount, after-item-skip=1.5pt](3)
\task $\log(a)$
\task $\log(b)$
\task $\log(ab)$
\task $\log\bigl(\sqrt[\uproot{1} \leftroot{-1} 3]{a^{2}b}\bigr)$
\task $\mfrac{1}{2} \log(a^{2}b)$
\end{tasks}
\end{enumerate}
\end{document}