# Box aligned equation under (deep) itemization

\documentclass[11pt]{article}
\usepackage{amsmath}
\usepackage{empheq}
\newcommand*\widefbox[1]{\fbox{\hspace{2em}#1\hspace{2em}}}

\begin{itemize}
\item[1.] zz
\begin{itemize}
\item[1.1]

\begin{subequations}
\begin{empheq}[box=\widefbox]{align}
x \;&=\; x_1 = x_2 = x_3 = x_4 = x_5 = x_6 = 0 \\
y \;&=\; y_1 = y_2 = y_3 = y_4 = y_5 = y_6 = 0
\end{empheq}
\end{subequations}

\item[1.2]
\end{itemize}
\item[2.]
\end{itemize}
\end{document}


The box will be mis-sized, not boxing the entire equations body.

The equations are centred with respect to the left margin of the current itemize environment and the right margin of the page, not taking into account the equation number. A work around could be adding \hphantom{tag} to the right of the empheq environment. I also managed to get the item number vertically aligned with the first line of the align environment:

\documentclass[a4paper]{article}
\usepackage{empheq}
\usepackage{amssymb}
\newcommand*\widefbox[1]{\fbox{\hspace{2em}#1\hspace{2em}}}

\begin{document}

\begin{itemize}
\item[1.] zz
\begin{itemize}%[leftmargin = *]
\item[1.1]
\leavevmode\vspace{\dimexpr-\baselineskip-\abovedisplayshortskip}
\begin{subequations}
\begin{empheq}[box=\widefbox, right = \hphantom{2a}]{align}
x \;&=\; x_1 = x_2 = x_3 = x_4 = x_5 = x_6 = 0 \\
y \;&=\; y_1 = y_2 = y_3 = y_4 = y_5 = y_6 = 0
\end{empheq}
\end{subequations}
\noindent Text text text text text text text text text text text text text text text text text text text text text text text text text
\item[1.2]
\end{itemize}
\item[2.]
\end{itemize}

\end{document}


• doesn't compile -- you're missing a closing brace at the end of the definition of \widefbox. also, amssymb is needed either; you probably meant amsmath, but with empheq that's taken care of. – barbara beeton Apr 24 '15 at 13:51
• Oh yes! Bad copy-paste… Corrected now. Thanks for pointing it :o) – Bernard Apr 24 '15 at 13:58
• Thanks a lot! just curious, do you generate the image using the site? or do you have to take screen-shot and upload? – DarknessGuideMe Apr 24 '15 at 23:09
• I take a screenshot of my pdf viewer, after I've zoomed. – Bernard Apr 24 '15 at 23:20