I just came across a new problem that I didn't had before, for my usual documents. I now need to show a calculation on several lines (using the align environment), then emphasize the end result on the last line with a large box around it. How to achieve this ?
Here's a MWE code to work with :
Code: Select all
\documentclass[12pt,letterpaper]{article}
\usepackage{amsmath}
\usepackage{empheq}
\begin{document}
Test :
\begin{align}
3d + 7 y - 3 x &= aba \nonumber \\[12pt]
&= 32g hy - \frac{1}{2} \, x y
\end{align}
\end{document}
In my usual documents, I simply put the whole equation inside a box using the following code in the preamble :
Code: Select all
\newenvironment{important}[2][]{
\setkeys{EmphEqEnv}{#2}
\setkeys{EmphEqOpt}{box={\setlength{\fboxsep}{10pt}\fcolorbox{black}{gray}},#1}
\EmphEqMainEnv}
{\endEmphEqMainEnv}
However, this would not work for a part of an align display. How could I enclose the last part (after the equal sign) inside a large box ?