这是我的乳胶代码:
\begin{equation}
\begin{aligned}
\text{Susceptibility Score (one location)} = \sum_{\substack{w \in \text{RF Importances} \\ \theta \in \text{Static Features}}}{w_f \theta_f} = \\
w_{\text{infra}}\theta_{\text{infra}} + w_{\text{slope}}\theta_{\text{slope}} + w_{\text{forest}}\theta_{\text{forest}} + w_{\text{litho}}\theta_{\text{litho}}
\end{aligned}
\label{eq:sus-formula}
\end{equation}
您可以看到等式的第二行挤在右侧。我怎样才能使其左对齐?
答案1
我会使用一个split
环境,提供&
对齐点,并创建一个额外的换行符。
\documentclass[journal]{IEEEtran}% or some other suitable document class
\usepackage{amsmath} % for 'split' environment
\usepackage{newtxtext,newtxmath} % optional
\newcommand\vn[1]{\mathrm{#1}} % "vn" is short for "variable name"
\begin{document}
\begin{equation}\label{eq:sus-formula}
\begin{split}
&\text{Susceptibility Score (one location)} \\
&\quad= \sum_{\substack{w \in \text{RF Importances} \\
\theta \in \text{Static Features}}}
w_{\!f} \theta_{\!f} \\
&\quad= w_{\vn{infra}}\theta_{\vn{infra}}
+ w_{\vn{slope}}\theta_{\vn{slope}}
+ w_{\vn{forest}}\theta_{\vn{forest}}
+ w_{\vn{litho}}\theta_{\vn{litho}}
\end{split}
\end{equation}
\end{document}