使用这些包创建一个2列、枚举数学工作表:amsmath
和multicol
。item
在问题 #9 和 #10 中,我需要将 3 个项目左对齐在不同的行上,如下所示:
我尝试了该\align*
命令,但&
没有效果。
非常感谢您的帮助。
母语:
\documentclass[12pt]{exam}
\printanswers
% un-comment to print solutions.
\renewcommand{\solutiontitle}{}
\usepackage{amsmath}
\usepackage{cancel}
\usepackage{framed}
\usepackage{bm}
\usepackage{multicol}
\usepackage[nice]{nicefrac}
\usepackage{tasks}
\usepackage[a4paper,margin=0.5in,include head]{geometry}
\usepackage{color}
\usepackage{soul}
\usepackage{bm}
\pagestyle{head}
\header{Math 111: Review}
{}
{}
\newcommand{\pagetop}{%
}
\newlength{\lwidth}% added <<<<<
\settowidth{\lwidth}{(99)\enspace} % added
\settasks{after-item-skip=1em,
after-skip=2cm,
label-width=\lwidth, % changed <<<<<<<<<
item-indent=0pt,
label=(\arabic*), %
label-offset = -\lwidth,
item-format = \hspace{\lwidth}, column-sep=2em,
}
\makeatletter
\renewcommand{\fullwidth}[1]{%
\vbox{%
\leftskip=-\lwidth \rightskip=0pt
\advance\linewidth\@totalleftmargin%
\@totalleftmargin=0pt%
#1}%
\nobreak
}
\makeatother
\newlength{\SolutionSpace}
\ifthenelse{\boolean{printanswers}}
{\setlength{\SolutionSpace}{5cm}
\colorsolutionboxes
\definecolor{SolutionBoxColor}{gray}{0.8}}% solutions are printed
{\setlength{\SolutionSpace}{0cm}
\colorsolutionboxes
\definecolor{SolutionBoxColor}{gray}{1}}% solutions are not being printed
\begin{document}
\def\bigskip{\vskip\bigskipamount}
\begin{tasks}
[style=enumerate](2)
\task![]\fullwidth{\textbf{Solve each equation.}}
\bigskip
\task![]\fullwidth{\textbf{Perform the indicated operation.}}%
%%% Prob #9
\task
$f(t)=3t-1$ \\
$g(t)=t^3+t^2$\\
Find $(f-g)(t)$\bigskip
\begin{solutionorbox}[\SolutionSpace]
$(f-g)(t)=f(t)-g(t)$\bigskip
$(3t-1)-(t^3+t^2)=$
\colorbox{yellow}{$-t^3-t^2+3t-1$}
\end{solutionorbox}
%%% Prob #10
\task
$f(x)=-2x^3-3x^2$ \\
$g(x)=x+1$ \\
Find $(f \cdot g)(x)$\bigskip
\begin{solutionorbox}[\SolutionSpace]
$(-2x^3-3x^2)(x+1)$\bigskip
\colorbox{yellow}{$=-2x^4-5x^3-3x^2$}
\end{solutionorbox}
\end{tasks}
\end{document}