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:
\begin{equation} \label{1}
\boxed{ 1 + 2 = \pi - 0.14 \quad \implies \quad \pi \in \mathbb{Q} }
\end{equation}
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?
Edit: What about multiline equations?
Multiline:
\begin{align}
\Aboxed{ 1 + 2 = \pi - 0.14 \implies & \pi \in \mathbb{Q} \\
3 \ne \pi \implies & \pi \in \mathbb{R} }
\end{align}

\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. – daleif Apr 04 '21 at 12:21eqnarray, the spacing at the alignment point is not correct. To have a box around an equation in analignenvironment, you have the\Aboxedcommand defined bymathtools. – Bernard Apr 04 '21 at 12:44eqnarraytoalign. That's a mistake. Don't write1 + 2 = \pi - 0.14 & \implies & \pi \in \mathbb{Q}. Instead, write1 + 2 = \pi - 0.14 & \implies \pi \in \mathbb{Q}. Can you spot the difference? – Mico Apr 04 '21 at 13:16&which aligns [rcl]. – Triceratops Apr 05 '21 at 06:43