I am trying to use \Aboxed
around a function containing a pmatrix
, but anything other than a column vector seems to break \Aboxed
. I think it has something to do with the &
's in the matrix, but I am not sure. \boxed
seems to work fine when wrapped around a matrix, but that forces me out of the align
enviroment.
Here is an example of what I am trying to do, but the aboxed code is what is triggering the error if you try to compile it.
\documentclass{article}
\usepackage{color}
\usepackage{mathtools}
\usepackage{graphicx}
\usepackage{hyperref}
\usepackage{braket}
\usepackage{cancel}
\hypersetup{
colorlinks=true,
linkcolor=blue,
urlcolor=blue
}
\begin{document}
\begin{equation}
\boxed{ \rho^{(z)}
=
\begin{pmatrix}
1 & 0 \\
0 & 0
\end{pmatrix}}
\end{equation}
\begin{align}
\Aboxed{ \rho^{(z)}
&=
\begin{pmatrix}
1 & 0 \\
0 & 0
\end{pmatrix}}
\end{align}
\end{document}
pmatrix
in the\Aboxed
version in a pair of braces{ }
. The\Aboxed
macro works by scanning its argument for&
, the{ }
hide those from it.\@
char asking to convert it to an answer @Qrrbrbirlbel