When I try to input:
\begin{eqnarray*}
w(t) &=& \frac{1}{2}Cv^2(t)\\
\boxed{w(t) &=& \frac{1}{2}C \frac{q(t)^2}{C^2}}\\
w(t) &=& \frac{1}{2}\frac{q(t)^2}{C}\\
w(t) &=& \frac{1}{2}Cv^2(t)\\
\end{eqnarray*}
I get an error. The following code works but the box is way of to the left… (I didn't use &=&
on the boxed equation this time.)
\begin{eqnarray*}
w(t) &=& \frac{1}{2}Cv^2(t)\\
\boxed{w(t) = \frac{1}{2}C \frac{q(t)^2}{C^2}}\\
w(t) &=& \frac{1}{2}\frac{q(t)^2}{C}\\
w(t) &=& \frac{1}{2}Cv^2(t)\\
\end{eqnarray*}
Are there any ways to fix this issue?
Best Answer
Why no use
\Aboxed
command of the packagemathtools
? inside of analign*
environment