在下面的例子中,我想在环境中提出方程式align*
,这样它们就会与包的编号标签位于同一行Tasks
。我该怎么做?
\documentclass[12pt,fleqn]{exam}
\usepackage[a4paper, total={180mm,247mm},left=15mm,top=20mm]{geometry}
\usepackage{amsmath,tasks}
\newcommand\dotfillin[1][4cm]{\makebox[#1]{\dotfill}}
\settasks{label=(\alph*),label-width=18pt,label-align=right,item-indent=23pt,label-offset=7pt}
\begin{document}
\begin{tasks}(2)
\task
\begin{align*}
307 \times 8 & =\dotfillin[3cm]\\
& =\dotfillin[3cm]\\
& =\dotfillin[3cm]\\
& =\dotfillin[3cm]\\
\end{align*}
\task
\begin{align*}
208 \times 99 & =\dotfillin[3cm]\\
& =\dotfillin[3cm]\\
& =\dotfillin[3cm]\\
& =\dotfillin[3cm]\\
\end{align*}
\end{tasks}
\end{document}
答案1
{align*}
您可以通过用环境替换环境来实现格式化目标{aligned}[t]
。只需确保将aligned
环境置于内联数学模式即可。
\documentclass[12pt,fleqn]{exam}
\usepackage[a4paper, total={180mm,247mm},left=15mm,top=20mm]{geometry}
\usepackage{amsmath,tasks}
\newcommand\dotfillin[1][3cm]{\makebox[#1]{\dotfill}}
\settasks{label=(\alph*), label-width=18pt, label-align=right,
item-indent=23pt, label-offset=7pt}
\begin{document}
\begin{tasks}(2)
\task
\quad$\begin{aligned}[t]
307 \times 8 &= \dotfillin \\
&= \dotfillin \\
&= \dotfillin \\
&= \dotfillin
\end{aligned}$
\task
\quad$\begin{aligned}[t]
208 \times 99 &= \dotfillin \\
&= \dotfillin \\
&= \dotfillin \\
&= \dotfillin
\end{aligned}$
\end{tasks}
\end{document}