正确对齐问题

正确对齐问题

我想将所有方程式写在一个对齐下。多个换行符使文章看起来非常不专业。请有人帮忙。这是我的代码。

\begin{align*}
i=1\qquad 
e(\underline{a})x_1&= \beta_1\prod_{\substack{j=2,\\j \not\in I}}^{n}q^{- 
a_j}\prod_{\substack{j=2,\\ j \in I}}^{n}q^{a_j}e(\underline{a})\\
i=1\qquad
e(\underline{a})y_1&=  \beta_1^{-1}\frac{\lambda_1}{(1-q^{-2})}\prod_{\substack{j=2,\\j 
\not\in I}}^{n}q^{-a_j} \prod_{\substack{j=2,\\ j \in I}}^{n}q^{a_j} \ \ e(\underline{a})
\end{align*}
For $i \not\in I$, 
\begin{align*}
e(\underline{a})x_i&=  \prod_{j=2}^{i-1}q^{a_j}e(\underline{a}+e_i).\\
e(\underline{a})y_i&=\begin{dcases}
 \prod_{j=2}^{i-1}q^{-a_j} \smashoperator{\prod_{\substack{j=i+1,\\j \not\in I}}^{n}}q^{-2a_j} 
\smashoperator{\prod_{\substack{j=i+1,\\ j \in I}}^{n}}q^{2a_j} \frac{\lambda_{i}- 
q^{-2a_{i}}\lambda_{i-1}}{1-q^{-2}}e(\underline{a}-e_i) & \text{when} \  a_i>0. \\
\alpha_i^{-1} \prod_{j=2}^{i-1}q^{-a_j}  \smashoperator{\prod_{\substack{j=i+1,\\j \not\in 
I}}^{n}}q^{-2a_j}\smashoperator{\prod_{\substack{j=i+1,\\ j \in 
I}}^{n}}q^{2a_j}\frac{\lambda_{i}-\lambda_{i-1}}{1-q^{-2}}e(\underline{a}-e_i) & \text{when}\ 
\  a_i=0. 
\end{dcases}
\end{align*}
For  $i \in I$,
\begin{align*}
\ e(\underline{a})x_{i}&=  \begin{dcases}
 \prod_{j=2}^{i-1}q^{a_j} \smashoperator{\prod_{\substack{j=i+1,\\j \not\in 
I}}^{n}}q^{-2a_j}\smashoperator{\prod_{\substack{j=i+1,\\ j \in I}}^{n}}q^{2a_j} \ \frac{1- 
q^{2a_{i}}}{q^{2}-1}\lambda_{(i-1)} \ e(\underline{a}-e_i)& \text{when}\ \ a_{i}\neq 0.\\
0 & \text{when} \ a_{i}=0.  
\end{dcases}\\
e(\underline{a})y_{i}& =\ \ \prod_{j=2}^{i-1}q^{-a_j}~e(\underline{a}+e_i).
\end{align*}  

答案1

我将使用单一align*环境和三个合理放置的\intertext指令。

在此处输入图片描述

\documentclass{article}
\usepackage{mathtools} % for \smashoperator macro

\begin{document}
\begin{align*}
\intertext{For $i=1$,}
e(\underline{a})x_1
&= \beta_1\prod_{\substack{j=2,\\j \not\in I}}^{n} q^{-a_j} 
   \prod_{\substack{j=2,\\ j \in I}}^{n} q^{a_j} e(\underline{a}) \\
e(\underline{a})y_1
&= \beta_1^{-1}\frac{\lambda_1}{(1-q^{-2})}
   \prod_{\substack{j=2,\\ j \not\in I}}^{n} q^{-a_j} 
   \prod_{\substack{j=2,\\ j \in I}}^{n} q^{a_j} e(\underline{a}) \\
\intertext{For $i \not\in I$,}
e(\underline{a})x_i
&= \prod_{j=2}^{i-1}q^{a_j}e(\underline{a}+e_i).\\
e(\underline{a})y_i
&=
\begin{dcases}
   \prod_{j=2}^{i-1}q^{-a_j} 
   \smashoperator{\prod_{\substack{j=i+1,\\ j \not\in I}}^{n}} q^{-2a_j} 
   \smashoperator{\prod_{\substack{j=i+1,\\ j \in I}}^{n}}
   q^{2a_j} \frac{\lambda_{i}- q^{-2a_{i}}\lambda_{i-1}}{1-q^{-2}}
   e(\underline{a}-e_i) 
   & \text{if $a_i>0$.} \\
   \alpha_i^{-1} \prod_{j=2}^{i-1}q^{-a_j}  
   \smashoperator{\prod_{\substack{j=i+1,\\j \not\in I}}^{n}}q^{-2a_j}
   \smashoperator{\prod_{\substack{j=i+1,\\ j \in I}}^{n}} 
   q^{2a_j}\frac{\lambda_{i}-\lambda_{i-1}}{1-q^{-2}}e(\underline{a}-e_i) 
   & \text{if $a_i=0$}. 
\end{dcases} \\
\intertext{For $i \in I$,}
e(\underline{a})x_{i}
&=  
\begin{dcases}
    \prod_{j=2}^{i-1}q^{a_j} 
    \smashoperator{\prod_{\substack{j=i+1,\\j \not\in I}}^{n}} q^{-2a_j}
    \smashoperator{\prod_{\substack{j=i+1,\\ j \in I}}^{n}}q^{2a_j} \ 
    \frac{1- q^{2a_{i}}}{q^{2}-1}\lambda_{(i-1)} \ e(\underline{a}-e_i)
    & \text{if $a_{i}\neq 0$.} \\
    0 & \text{if $a_{i}=0$.}  
\end{dcases}\\
e(\underline{a})y_{i} 
&= \prod_{j=2}^{i-1}q^{-a_j} e(\underline{a}+e_i).
\end{align*}  
\end{document}

相关内容