I want to put a box around one of my equations in aligned environment. I am looking to do something similar to Attractive Boxed Equations, but the code only caters for individual equations.
Here is MWE. I want to add box around last equation:
\documentclass{beamer}
\usepackage{amsmath}
\begin{document}
\begin{frame}
\frametitle {MWE: Align two set of equations}
\begin{align*}
\sigma^2&=(a+b)^2-(a+c)^2 \\
&=(a^2+b^2-2ab)-(a^2+c^2-2ac)\\
\intertext{Cancel out common terms, then}
\sigma^2&= b^2-c^2+2(ac-ab)
\end{align*}
\end{frame}
\end{document}
Best Answer
You can used the
\Aboxed
command, fromempheq
, which can bow a single equation.I adapted the code to define a
\Ashaded
and aAcolorboxed
command, which useshadecolour, bgcolour
andrulecolour
parameters, to be defined with\colorlet
.