\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}
盒子的尺寸不正确,无法包裹整个方程式主体。
答案1
方程式以当前 itemize 环境的左边缘和页面的右边缘为中心,不考虑方程式编号。一种解决方法是将其添加\hphantom{tag}
到环境的右侧empheq
。我还设法使项目编号与环境的第一行垂直对齐align
:
\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}