# Framing an equation and equation array (boxed)

I want to nicely put equations and equations arrays inside a box or a frame. I also like to align objects in align environment like in the eqnarray environment [r|c|l], see example below.

Working example:

\documentclass{article}[A4]
\usepackage{amsmath,amssymb}

\newenvironment{bbox}
{\par\smallskip\centering\begin{lrbox}{0}%
\begin{minipage}[c]{0.99\textwidth}}
{\end{minipage}\end{lrbox}%
\framebox[0.99\textwidth]{\usebox{0}}%
\par\medskip
\ignorespacesafterend}

\begin{document}

\title{Box test}

I want to box equations. For a simple equation:
$$\label{1} \boxed{ 1 + 2 = \pi - 0.14 \quad \implies \quad \pi \in \mathbb{Q} }$$
Eqnarray:
\begin{eqnarray}
1 + 2 = \pi - 0.14  & \implies & \pi \in \mathbb{Q}
\end{eqnarray}
Align:
\begin{align}
1 + 2 = \pi - 0.14  & \implies & \pi \in \mathbb{Q}
\end{align}
I want the \texttt{align} to be aligned like \texttt{eqnarray}, how to do that?

For align and eqnarray the \texttt{boxed} won't work,
\begin{verbatim}
\begin{align}
\boxed{ 1 + 2 = \pi - 0.14  & \implies & \pi \in \mathbb{Q} }
\end{align}
\end{verbatim}
Using the environment bbox'' it seems to work but has some space in the top so it looks a little bit ugly:
\begin{bbox}
\begin{align}
1 + 2 = \pi - 0.14  & \implies & \pi \in \mathbb{Q}
\end{align}
\end{bbox}
I want it to look like equation \eqref{1}

How to do that?


The result:

Multiline:

• Unrelated: \documentclass{article}[A4] where do you have this syntax from? Because it is incorrect and where ever you have it from ought to be updated. Apr 4 at 12:21
• Do not use eqnarray , the spacing at the alignment point is not correct. To have a box around an equation in an align environment, you have the \Aboxed command defined by mathtools. Apr 4 at 12:44
• Off-topic: You've transferred the alignment syntax from eqnarray to align. That's a mistake. Don't write 1 + 2 = \pi - 0.14 & \implies & \pi \in \mathbb{Q}. Instead, write 1 + 2 = \pi - 0.14 & \implies \pi \in \mathbb{Q}. Can you spot the difference?
• Yes, the extra & which aligns [rcl]. Apr 5 at 6:43