我的 MWE:
\documentclass{report}
\usepackage{amsmath}
\begin{document}
\begin{align}
&u = \frac{1}{\theta_{2,3}} \left [ -z_1 - \left ( c_2 + \frac{\epsilon}{2} \right )z_2 - \theta_{2,1}\sin(x_1) - \hat{\theta}_{2,2}x_2 + \dot{\alpha}_1 \right ] \\
&\dot{\xi}_{2,2} = - \frac{\partial \beta_2}{\partial x_2}\left [ \theta_{2,1}\sin(x_1)+\left ( \xi_{2,2} + \beta_2(x_2) \right ) x_2 + \theta_{2,3}u \right ] \\
&\hat{\theta}_{2,2} = \xi_{2,2} + \beta_2(x_2) \\
&\beta_2 = \frac{\gamma}{2}x_2^2
\end{align}
\end{document}
结果:
我想要的是:
也就是说,除了左对齐之外,我想将等式(2)至(4)的等号对齐。
答案1
如果想要two
最后三个方程的对齐点,可以使用amsmath` 中定义的alignat
环境与\mathrlap
命令相结合mathtools (which loads
:
\documentclass{report}
\usepackage{mathtools}
\begin{document}
\begin{alignat}{2}
&u \mathrlap{{}=\frac{1}{\theta_{2,3}} \left [ -z_1 - \left ( c_2 + \frac{\epsilon}{2} \right )z_2 - \theta_{2,1}\sin(x_1) - \hat{\theta}_{2,2}x_2 + \dot{\alpha}_1 \right ]} \\
&\dot{\xi}_{2,2} &&= - \frac{\partial \beta_2}{\partial x_2}\left [ \theta_{2,1}\sin(x_1)+\left ( \xi_{2,2} + \beta_2(x_2) \right ) x_2 + \theta_{2,3}u \right ] \\
& \hat{\theta}_{2,2} & &= \xi_{2,2} + \beta_2(x_2) \\
&\beta_2 &&= \frac{\gamma}{2}x_2^2
\end{alignat}
\end{document}