有没有更好、更流畅的方法来对齐评论列?
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{enumerate}
\item[{\bf a.}] $\begin{aligned}[t] \dfrac{z^{\color{blue}{8}\color{black}
{}}}{z^{\color{blue}{4}\color{black}{}}}=z^{\color{blue}{8-4}\color{black}
{}}=z^{\color{blue}{4}\color{black}{}} &\hspace{3cm}& && \color{blue}
{\text{Use the quotient rule.}} \end{aligned}$
\item[{\bf b.}] $\begin{aligned}[t] \dfrac{(-5)^{\color{blue}
{5}\color{black}{}}}{(-5)^{\color{blue}{3}\color{black}{}}}=
(-5)^{\color{blue}{5-3}\color{black}{}}=(-5)^{\color{blue}{2}\color{black}
{}}=25 &\hspace{.5cm}& && \color{blue}{\text{Use the quotient rule.}}
\end{aligned}$
\item[{\bf c.}] $\begin{aligned}[t] \dfrac{8^{\color{blue}{8}\color{black}
{}}}{8^{\color{blue}{6}\color{black}{}}}=8^{\color{blue}{2}\color{black}
{}}=64 &\hspace{3.3cm}& && \color{blue}{\text{Use the quotient rule.}}
\end{aligned}$
\item[{\bf d.}] $\begin{aligned}[t] \dfrac{q^{5}}{t^{2}}&\phantom{=}
&\hspace{4.7cm} && \color{blue}{\text{Cannot be simplified because $q$ and
$t$ are different bases}} \end{aligned}$
\item[{\bf e.}] Begin by grouping common bases
\begin{align*} \dfrac{6x^{3}y^{7}}{xy^{5}}&=6\cdot\dfrac{x^{\color{blue}
{3}}}{x^{\color{blue}{1}\color{black}{}}}\cdot\dfrac{y^{\color{red}{7}}}
{y^{\color{red}{5}}} && \\
&=6\cdot (x^{\color{blue}{3-1}}) \cdot (y^{\color{red}{7-5}})
&&\color{blue}{\text{Use the quotient rule.}} \\
&=6x^{2}y^{2} &&\color{blue}{\text{}}
\end{align*}
\end{enumerate}
\end{document}
答案1
我建议创建一个宏\addshortcomment
来添加简短的注释。我还修改了你的原始代码,使其更具可读性。
\documentclass{article}
\usepackage{xcolor}
\usepackage{mathtools}% loads `amsmath'
\usepackage{enumitem}% customizing lists
\setlist[enumerate,1]{label=\textbf{\alph*.}, ref=\textbf{\alph*.}}
% add short comment
\newcommand\addshortcomment[1]{%
\strut\hfill\makebox[0.45\textwidth][l]{\color{blue}#1}%
}
\begin{document}
\begin{enumerate}
\item $\dfrac{z^{\color{blue}8}}{z^{\color{blue}4}}
=z^{\color{blue}8-4}=z^{\color{blue}4}$
\addshortcomment{Use the quotient rule.}
\item $\dfrac{(-5)^{\color{blue}5}}{(-5)^{\color{blue}3}}
=(-5)^{\color{blue}5-3}=(-5)^{\color{blue}2}=25$
\addshortcomment{Use the quotient rule.}
\item $\dfrac{8^{\color{blue}8}}{8^{\color{blue}6}}
=8^{\color{blue}2}=64$
\addshortcomment{Use the quotient rule.}
\item $\dfrac{q^5}{t^2}$
\addshortcomment{Cannot be simplified because $q$ and $t$ are different bases.}
\item Begin by grouping common bases
\begin{align*}
\frac{6 x^3 y^7}{x y^5} & = 6 \cdot \frac{x^{\color{blue}3}}{x^{\color{blue}1}} \cdot \frac{y^{\color{red}7}}{y^{\color{red}5}} \\
\shortintertext{\color{blue}Then the quotient rule:}
& = 6 \cdot (x^{\color{blue}3-1}) \cdot (y^{\color{red}7-5}) \\
& = 6 x^2 y^2.
\end{align*}
\end{enumerate}
\end{document}