我怎样才能使这个等式一致?
\begin{equation}
\begin{aligned}
\frac{\partial \mathbf{M}}{\partial t}= & \underbrace{-\gamma \mathbf{M} \times \mathbf{B}_{\text {eff }}}_{\text {precesion }}+\underbrace{\frac{\alpha}{M} \mathbf{M} \times \frac{\partial \mathbf{M}}{\partial t}}_{\text {damping }}\\
-\underbrace{b_i^j \mathbf{M} \times \mathbf{M} \times \frac{\partial \mathbf{M}}{\partial x}-\beta b_i^j \mathbf{M} \times \frac{\partial \mathbf{M}}{\partial x}}_{\text {STT }} \\
& +\underbrace{\theta_i^{S H} c_i^j \mathbf{M} \times \mathbf{M} \times \hat{y}}_{\text {SHE STT }}
\end{aligned}
\end{equation}
我希望 (1) LHS 移到最左边的位置,(2) 第二行和第三行位于第一个术语下方对齐
答案1
这适合你吗?
\documentclass{book}
\usepackage{mathtools}
\begin{document}
\begin{equation}
\begin{split}
\frac{\partial \mathbf{M}}{\partial t}&= \underbrace{-\gamma \mathbf{M} \times \mathbf{B}_{\text {eff }}}_{\text {precesion }}+\underbrace{\frac{\alpha}{M} \mathbf{M} \times \frac{\partial \mathbf{M}}{\partial t}}_{\text {damping }}\\
&\quad-\underbrace{b_i^j \mathbf{M} \times \mathbf{M} \times \frac{\partial \mathbf{M}}{\partial x}-\beta b_i^j \mathbf{M} \times \frac{\partial \mathbf{M}}{\partial x}}_{\text {STT }} \\
&\quad +\underbrace{\theta_i^{S H} c_i^j \mathbf{M} \times \mathbf{M} \times \hat{y}}_{\text {SHE STT }}
\end{split}
\end{equation}
\end{document}
答案2
flalign
我将与(例如)进行对齐。
\documentclass[a4paper,12pt]{article}
\usepackage{mathtools}
\usepackage{amssymb}
\begin{document}
\begin{flalign}
\frac{\partial \mathbf{M}}{\partial t}={}& \underbrace{-\gamma \mathbf{M} \times \mathbf{B}_{\mathrm{eff}}}_{\text {precesion }}+\underbrace{\frac{\alpha}{M} \mathbf{M} \times \frac{\partial \mathbf{M}}{\partial t}}_{\mathrm{damping }}&&\\\nonumber
{}&-\underbrace{b_i^j \mathbf{M} \times \mathbf{M} \times \frac{\partial \mathbf{M}}{\partial x}-\beta b_i^j \mathbf{M} \times \frac{\partial \mathbf{M}}{\partial x}}_{\mathrm{STT }} +\underbrace{\ \theta_i^{S H} c_i^j \mathbf{M} \times \mathbf{M} \times \hat{y}}_{\textup{SHE STT}}
\end{flalign}
\end{document}
或这个:
\documentclass[a4paper,12pt]{article}
\usepackage{mathtools}
\usepackage{amssymb}
\begin{document}
\begin{flalign}
\frac{\partial \mathbf{M}}{\partial t}={}& \underbrace{-\gamma \mathbf{M} \times \mathbf{B}_{\mathrm{eff}}}_{\text {precesion }}+\underbrace{\frac{\alpha}{M} \mathbf{M} \times \frac{\partial \mathbf{M}}{\partial t}}_{\mathrm{damping }}&&\\\nonumber
{}&-\underbrace{b_i^j \mathbf{M} \times \mathbf{M} \times \frac{\partial \mathbf{M}}{\partial x}-\beta b_i^j \mathbf{M} \times \frac{\partial \mathbf{M}}{\partial x}}_{\mathrm{STT }}\\\nonumber
{}&+\underbrace{\ \theta_i^{S H} c_i^j \mathbf{M} \times \mathbf{M} \times \hat{y}}_{\textup{SHE STT}}
\end{flalign}
\end{document}
答案3
将对齐点添加到第一条线后的线。
我建议使用\ubrace
按定义的方式,以克服 的细微间距问题\underbrace
。另外,我发现第二行的下括号含糊不清:STT 是第一个项目吗?减第二?
因此,我决定将符号放在带下支撑的方程式中,但需要一个技巧来获得正确的间距。
我还建议\pder
节省打字时间。
\documentclass{article}
\usepackage{amsmath}
\newcommand{\pder}[2]{\frac{\partial#1}{\partial#2}}
\newcommand{\ubrace}[2]{{\underbrace{#1}_{#2}}}
\begin{document}
\begin{equation}
\newcommand{\0}[1]{{\mspace{#1\medmuskip}}}
\begin{aligned}
\pder{\mathbf{M}}{t} ={}
& \0{+}\ubrace{\0{-}-\gamma \mathbf{M} \times \mathbf{B}_{\textup{eff}}\vphantom{\frac{a}{M}}}
{\textup{precession}}
\0{+}\ubrace{\0{-}+\frac{\alpha}{M} \mathbf{M} \times \pder{\mathbf{M}}{t}}
{\textup{damping}}
\\
& \0{+}\ubrace{\0{-}-b_i^j \mathbf{M} \times \mathbf{M} \times \pder{\mathbf{M}}{x}
-\beta b_i^j \mathbf{M} \times \pder{\mathbf{M}}{x}}
{\textup{STT}}
\\
& \0{+}\ubrace{\0{-}+\theta_i^{S H} c_i^j \mathbf{M} \times \mathbf{M} \times \hat{y}}
{\textup{SHE STT}}
\end{aligned}
\end{equation}
\end{document}
另一个小修复是第一行中的幻影,因此括号排版在同一级别。