一些尝试

一些尝试

我有类似的东西:

\begin{align}
 a &= b+c & d &=e+f & g &=h+i\\
 a &= b+c & d &=e+f & g &=h+i\\
 %%%%%
 a+h+q &= b+c+d+e+f+g+h+i+j+k+l+m+n+o+p+q+r+s+t\\
       &\quad +u+x+y+w+z
 %%%%%
 \\
 a &= b+c & d &=e+f & g &=h+i \\
 \end{align}

我试图将第三个方程在第一个“列”上彼此对齐,并像在环境中&一样将其连续跨越。\multicolumntabular

一些尝试

我已经尝试tabularmulticolumn

\begin{align}
\setlength{\tabcolsep}{0pt}
\begin{tabular}{>{$}l<{$} >{$}l<{$} >{$}l<{$} >{$}l<{$} >{$}l<{$} >{$}l<{$}}
    \phantom{a+h+q}a &\,= b+c &\qquad d &\,=e+f &\qquad g &\,=h+i\\
    \phantom{a+h+q}a &\,= b+c &\qquad d &\,=e+f &\qquad g &\,=h+i\\
    \multicolumn{6}{>{$}l<{$}}{\,\,a+h+q = b+c+d+e+f+g+h+i+j+k+l+m+n+o+p+q}\\
      & \multicolumn{5}{>{$}l<{$}}{\quad +r+s+t+u+x+y+w+z}\\
    \phantom{a+h+q}a &\,= b+c &\qquad d &\,=e+f &\qquad g &\,=h+i  
\end{tabular} \notag\\
\end{align}

图1

\begin{equation*}
\setlength{\tabcolsep}{0pt}
\begin{tabular}{>{$}l<{$} >{$}l<{$} >{$}l<{$} >{$}l<{$} >{$}l<{$} >{$}l<{$} >{$}r<{$}}
    \phantom{a+h+q}a &\,= b+c &\qquad d &\,=e+f &\qquad g &\,=h+i &\quad  (2)\\
    \phantom{a+h+q}a &\,= b+c &\qquad d &\,=e+f &\qquad g &\,=h+i &  \quad (3)\\
    \multicolumn{6}{>{$}l<{$}}{\,\,a+h+q = b+c+d+e+f+g+h+i+j+k+l+m+n+o+p+q}& \\
      & \multicolumn{5}{>{$}l<{$}}{\quad +r+s+t+u+x+y+w+z}  & \quad (4) \\
    \phantom{a+h+q}a &\,= b+c &\qquad d &\,=e+f &\qquad g &\,=h+i  & \quad (5)
\end{tabular}
\end{equation*}

图 2

我已经尝试过 TikZ 和 tikzlibraryfit并且matrix

\begin{equation*}
    \begin{tikzpicture}
    \matrix (table) [matrix of math nodes, nodes in empty cells, row sep=.25em, column sep=0em]{%
        \phantom{a+h+q}a  &=& b+c &\qquad d &=& e+f &\qquad g &=& h+1 &\node[xshift=8.5em]{(6)};\\
        \phantom{a+h+q}a  &=& b+c &\qquad d &=& e+f &\qquad g &=& h+1 & \node[xshift=8.5em]{(7)};\\
               \,\, a+h+q & &     &\qquad   & &     &\qquad   & &     & \\
                          & &     &\qquad   & &     &\qquad   & &     & \node[xshift=8.5em]{(8)};\\                
        \phantom{a+h+q}a  &=& b+c &\qquad d &=& e+f &\qquad g &=& h+1 & \node[xshift=8.5em]{(9)};\\
};
\node[yshift=0.95em,fit=(table-3-2)(table-3-3)(table-3-4)(table-3-5)(table-3-6)(table-3-7)(table-3-8)(table-3-9)]{$$=\,\,b+c+d+e+f+g+h+i+j+k+l+m+n+o+p+q$$};
\node[yshift=0.95em,xshift=-.9em,fit=(table-4-2)(table-4-3)(table-4-4)(table-4-5)(table-4-6)(table-4-7)(table-4-8)(table-4-9)]{$$+r+s+t+u+x+y+w+z$$};      
    \end{tikzpicture}
\end{equation*}

在此处输入图片描述


是否可以在数学模式下执行此操作,即是否有合适的环境来执行此操作?

平均能量损失

\documentclass{article}
\usepackage{amsmath}
\usepackage{array}

\usepackage{tikz}
\usetikzlibrary{fit,matrix}

\begin{document}


Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis.
\begin{align}
\setlength{\tabcolsep}{0pt}
\begin{tabular}{>{$}l<{$} >{$}l<{$} >{$}l<{$} >{$}l<{$} >{$}l<{$} >{$}l<{$}}
    \phantom{a+h+q}a &\,= b+c &\qquad d &\,=e+f &\qquad g &\,=h+i\\
    \phantom{a+h+q}a &\,= b+c &\qquad d &\,=e+f &\qquad g &\,=h+i\\
    \multicolumn{6}{>{$}l<{$}}{\,\,a+h+q = b+c+d+e+f+g+h+i+j+k+l+m+n+o+p+q}\\
      & \multicolumn{5}{>{$}l<{$}}{\quad +r+s+t+u+x+y+w+z}\\
    \phantom{a+h+q}a &\,= b+c &\qquad d &\,=e+f &\qquad g &\,=h+i  
\end{tabular} \notag\\
\end{align}

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis.
\begin{equation*}
\setlength{\tabcolsep}{0pt}
\begin{tabular}{>{$}l<{$} >{$}l<{$} >{$}l<{$} >{$}l<{$} >{$}l<{$} >{$}l<{$} >{$}r<{$}}
    \phantom{a+h+q}a &\,= b+c &\qquad d &\,=e+f &\qquad g &\,=h+i &\quad  (2)\\
    \phantom{a+h+q}a &\,= b+c &\qquad d &\,=e+f &\qquad g &\,=h+i &  \quad (3)\\
    \multicolumn{6}{>{$}l<{$}}{\,\,a+h+q = b+c+d+e+f+g+h+i+j+k+l+m+n+o+p+q}& \\
      & \multicolumn{5}{>{$}l<{$}}{\quad +r+s+t+u+x+y+w+z}  & \quad (4)\\
    \phantom{a+h+q}a &\,= b+c &\qquad d &\,=e+f &\qquad g &\,=h+i  & \quad (5)
\end{tabular}
\end{equation*}


Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis.
\begin{equation*}
\begin{tikzpicture}
\matrix (table) [matrix of math nodes, nodes in empty cells, row sep=.25em, column sep=0em]{%
    \phantom{a+h+q}a  &=& b+c &\qquad d &=& e+f &\qquad g &=& h+1 &\node[xshift=8.5em]{(6)};\\
    \phantom{a+h+q}a  &=& b+c &\qquad d &=& e+f &\qquad g &=& h+1 & \node[xshift=8.5em]{(7)};\\
           \,\, a+h+q & &     &\qquad   & &     &\qquad   & &     & \\
                      & &     &\qquad   & &     &\qquad   & &     & \node[xshift=8.5em]{(8)};\\                
    \phantom{a+h+q}a  &=& b+c &\qquad d &=& e+f &\qquad g &=& h+1 & \node[xshift=8.5em]{(9)};\\
    };
    \node[yshift=0.95em,fit=(table-3-2)(table-3-3)(table-3-4)(table-3-5)(table-3-6)(table-3-7)(table-3-8)(table-3-9)]{$$=\,\,b+c+d+e+f+g+h+i+j+k+l+m+n+o+p+q$$};
    \node[yshift=0.95em,xshift=-.9em,fit=(table-4-2)(table-4-3)(table-4-4)(table-4-5)(table-4-6)(table-4-7)(table-4-8)(table-4-9)]{$$+r+s+t+u+x+y+w+z$$};      
\end{tikzpicture}
\end{equation*}

\end{document}

答案1

有两个问题:首先,在对齐其他方程式时忽略长方程式。其次,将长方程式置于显示区域的中心。第一个问题通过\mathrlap(来自 mathtools} 实现,第二个问题通过使用flalign和实现\hspace

\documentclass{article}
\usepackage{showframe}
\usepackage{mathtools}

\newlength{\tempdima}
\begin{document}

\settowidth{\tempdima}{$\displaystyle a+h+q = b+c+d+e+f+g+h+i+j+k+l+m+n+o+p$}%
\setlength{\tempdima}{\dimexpr 0.5\textwidth - 0.5\tempdima}%

\begin{flalign}
 a &= b+c & d &=e+f & g &=h+i &\\
 a &= b+c & d &=e+f & g &=h+i \\
\hspace{\tempdima}
 a+h+q &= \mathrlap{b+c+d+e+f+g+h+i+j+k+l+m+n+o+p}\notag\\[-1ex]
       &\quad \mathrlap{{}+u+x+y+w+z}\\
 a &= b+c & d &=e+f & g &=h+i
 \end{flalign}

\end{document}

重叠方程

相关内容