我试图将两个方程对齐在同一行上,并且它们共享相同的标签:
\begin{falign*}
\begin{equation}
\rho(\mathbf {r'}) = -\nabla \cdot \mathbf M(\mathbf {r'}) \qquad \text{and} \qquad \sigma(\mathbf {r'}) = \mathbf M(\mathbf {r'}) \cdot \Hat{\mathbf{n}}
\end{equation}
\end{falign*}
它按我想要的方式显示,但我收到以下错误消息:环境 falign* 未定义如果我使用“align*”而不是“falign*”,我会收到另一个错误:“方程式在 align 内”,如果我更改环境的顺序,我会得到“方程式内对齐”。两者都给我同样的问题。此外,如果我只使用对齐方程式居中,我需要它们在左侧。
答案1
您有falign*
,没有flalign*
。无论如何,equation
既不能进去flalign
也不能进去align
(有或没有*
)。
如果你想向左平齐方程式,你想将fleqn
选项传递给文档类,并且
\setlength{\mathindent}{0pt}
例子。
\documentclass[a4paper,fleqn]{article}
\usepackage{amsmath}
\setlength{\mathindent}{0pt}
\begin{document}
Some nonsense text just to see what really happens to equations;
some nonsense text just to see what really happens to equations
\begin{equation}
a=b
\end{equation}
some nonsense text just to see what really happens to equations;
some nonsense text just to see what really happens to equations
\begin{align}
a&=b+c \\
x&=u+v+w
\end{align}
some nonsense text just to see what really happens to equations;
some nonsense text just to see what really happens to equations.
\end{document}
在fl
flalign
全长,不向左齐平。
您可能希望方程式编号位于左侧。为此,请传递选项leqno
,不要设置\mathindent
。
\documentclass[a4paper,fleqn,leqno]{article}
\usepackage{amsmath}
\begin{document}
Some nonsense text just to see what really happens to equations;
some nonsense text just to see what really happens to equations
\begin{equation}
a=b
\end{equation}
some nonsense text just to see what really happens to equations;
some nonsense text just to see what really happens to equations
\begin{align}
a&=b+c \\
x&=u+v+w
\end{align}
some nonsense text just to see what really happens to equations;
some nonsense text just to see what really happens to equations.
\end{document}