多列对齐方程环境

多列对齐方程环境

我可以在不使用三个对齐环境的情况下在方程环境中获得这种三列排列吗?我遇到的问题是出现 amsmath 错误“方程式嵌套错误”,我想避免该错误/警告。我也不想将所有第一行写在一起,然后是所有第二行等等,因为这会在以后编辑方程式时造成混乱。以下 MWC 故意很复杂。它说明了如果我必须按照上面所述编写所有行,它会变得多么混乱。谢谢。

\documentclass[]{article}
\usepackage{amsmath}
\begin{document}

\begin{equation*}
\begin{align}
P_{S}   &= V_{S} \times I_{1} \times cos(\phi) \\
        &=  \times  \times cos(\phi) \\
\therefore     cos(\phi)_{1A}  &= \frac{}{ \times } \\
            &=  \\
I_{S}           &= I_{1} \sqrt{1+THD^{2}} \\
\therefore \ 
THD     &= \frac{I_{S}}{I_{1}} - 1\\    
        &= \frac{}{} - 1 \\
        &=  \\
df      &= cos(\phi) \times \frac{1}{\sqrt{1+THD^{2}}} \\               
        &=  \times \frac{1}{\sqrt{1+^{2}}} \\
        &=      
\end{align}
\begin{align}
P_{S}   &= V_{S} \times I_{1} \times cos(\phi) \\
    &=  \times  \times cos(\phi) \\
\therefore     cos(\phi)_{1A}  &= \frac{}{ \times } \\
            &=  \\
I_{S}           &= I_{1} \sqrt{1+THD^{2}} \\
\therefore \ 
THD     &= \frac{I_{S}}{I_{1}} - 1\\    
        &= \frac{}{} - 1 \\
        &=  \\
df      &= cos(\phi) \times \frac{1}{\sqrt{1+THD^{2}}} \\               
        &=  \times \frac{1}{\sqrt{1+^{2}}} \\
        &= \\
\end{align}
\begin{align}
P_{S}   &= V_{S} \times I_{1} \times cos(\phi) \\
    &=  \times  \times cos(\phi) \\
\therefore     cos(\phi)_{1A}  &= \frac{}{ \times } \\
            &=  \\
I_{S}           &= I_{1} \sqrt{1+THD^{2}} \\
\therefore \ 
THD     &= \frac{I_{S}}{I_{1}} - 1\\    
        &= \frac{}{} - 1 \\
        &=  \\
df      &= cos(\phi) \times \frac{1}{\sqrt{1+THD^{2}}} \\               
        &=  \times \frac{1}{\sqrt{1+^{2}}} \\
        &= \\
\end{align}
\begin{equation*}

\end{document}

答案1

您不能将一个align环境嵌套在另一个 display-math 环境中,例如equation*。请改用较低级别的aligned环境。

另外,\therefore在中定义amssymb;不要忘记加载该包。

注意:我选择横向是因为您的方程式无法放在具有默认边距的纵向 A4 页面上。

在此处输入图片描述

\documentclass{article}

\usepackage[landscape]{geometry}
\usepackage{amsmath,amssymb}

\begin{document}
\begin{equation*}
\begin{aligned}
P_{S}   &= V_{S} \times I_{1} \times cos(\phi) \\
        &=  \times  \times cos(\phi) \\
\therefore     cos(\phi)_{1A}  &= \frac{}{ \times } \\
            &=  \\
I_{S}           &= I_{1} \sqrt{1+THD^{2}} \\
\therefore \ 
THD     &= \frac{I_{S}}{I_{1}} - 1\\    
        &= \frac{}{} - 1 \\
        &=  \\
df      &= cos(\phi) \times \frac{1}{\sqrt{1+THD^{2}}} \\               
        &=  \times \frac{1}{\sqrt{1+^{2}}} \\
        &=      
\end{aligned}
\begin{aligned}
P_{S}   &= V_{S} \times I_{1} \times cos(\phi) \\
    &=  \times  \times cos(\phi) \\
\therefore     cos(\phi)_{1A}  &= \frac{}{ \times } \\
            &=  \\
I_{S}           &= I_{1} \sqrt{1+THD^{2}} \\
\therefore \ 
THD     &= \frac{I_{S}}{I_{1}} - 1\\    
        &= \frac{}{} - 1 \\
        &=  \\
df      &= cos(\phi) \times \frac{1}{\sqrt{1+THD^{2}}} \\               
        &=  \times \frac{1}{\sqrt{1+^{2}}} \\
        &= \\
\end{aligned}
\begin{aligned}
P_{S}   &= V_{S} \times I_{1} \times cos(\phi) \\
    &=  \times  \times cos(\phi) \\
\therefore     cos(\phi)_{1A}  &= \frac{}{ \times } \\
            &=  \\
I_{S}           &= I_{1} \sqrt{1+THD^{2}} \\
\therefore \ 
THD     &= \frac{I_{S}}{I_{1}} - 1\\    
        &= \frac{}{} - 1 \\
        &=  \\
df      &= cos(\phi) \times \frac{1}{\sqrt{1+THD^{2}}} \\               
        &=  \times \frac{1}{\sqrt{1+^{2}}} \\
        &= \\
\end{aligned}
\end{equation*}
\end{document}

答案2

我认为另一个答案是你想要的,但仅供参考,这里是你如何在一个大的align环境中做到这一点 - 有点代码整理看起来还不错

% arara: pdflatex
% !arara: indent: {overwrite: on}
\documentclass{article}
\usepackage[landscape]{geometry}
\usepackage{amsmath}
\usepackage{amssymb}

\begin{document}

\begin{align}
    P_{S}                        & = V_{S} \times I_{1} \times cos(\phi)         & P_{S}                     & = V_{S} \times I_{1} \times cos(\phi)         & P_{S}                       & = V_{S} \times I_{1} \times cos(\phi)         \\
                                 & =  \times  \times cos(\phi)                   &                           & =  \times  \times cos(\phi)                   &                             & =  \times  \times cos(\phi)                   \\
    \therefore \  cos(\phi)_{1A} & = \frac{}{ \times }                           & \therefore cos(\phi)_{1A} & = \frac{}{ \times }                           & \therefore \ cos(\phi)_{1A} & = \frac{}{ \times }                           \\
                                 & =                                             &                           & =                                             &                             & =                                             \\
    I_{S}                        & = I_{1} \sqrt{1+THD^{2}}                      & I_{S}                     & = I_{1} \sqrt{1+THD^{2}}                      & I_{S}                       & = I_{1} \sqrt{1+THD^{2}}                      \\
    \therefore \  THD            & = \frac{I_{S}}{I_{1}} - 1                     & \therefore  THD           & = \frac{I_{S}}{I_{1}} - 1                     & \therefore \ THD            & = \frac{I_{S}}{I_{1}} - 1                     \\    
                                 & = \frac{}{} - 1                               &                           & = \frac{}{} - 1                               &                             & = \frac{}{} - 1                               \\
                                 & =                                             &                           & =                                             &                             & =                                             \\
    df                           & = cos(\phi) \times \frac{1}{\sqrt{1+THD^{2}}} & df                        & = cos(\phi) \times \frac{1}{\sqrt{1+THD^{2}}} & df                          & = cos(\phi) \times \frac{1}{\sqrt{1+THD^{2}}} \\               
                                 & =  \times \frac{1}{\sqrt{1+^{2}}}             &                           & =  \times \frac{1}{\sqrt{1+^{2}}}             &                             & =  \times \frac{1}{\sqrt{1+^{2}}}             \\
                                 & =                                             &                           & =                                             &                             & =                                             \\
\end{align}
\end{document}

在此处输入图片描述

相关内容