(深度)逐項下的框對齊方程

(深度)逐項下的框對齊方程
\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} 

在此輸入影像描述

相關內容