为什么 \\ 或 \newline 不起作用?

为什么 \\ 或 \newline 不起作用?

我不明白为什么这两个命令(\\\newline)都不能为我的所有方程式开始新的一行。

\usepackage{amsmath}
\usepackage[utf8]{inputenc}


\begin{document}
\maketitle % showing both title and author, plus and automatic date
Consider the conic section
\begin{equation}

Ax^2+Bxy+Cy^2+Dx+Ey+F=0.

\end{equation}
If $B\neq0$, then to eliminate the xy term, we rotate the axes through an acute angle $\theta$ where 
\begin{equation}

\cot(2\theta)=\frac{A-C}{B}.

\end{equation}
In the equation
\begin{equation}
11x^2-24xy+4y^2+20=0,
\end{equation}
$A=11$, $B=-24$, $C=4$, $D=0$, $E=0$, and $F=20$. We will rotate the xy-axis     through an angle where
\begin{equation}
\cot(2\theta)=\frac{11-4}{-24}=\frac{-7}{24}.
\end{equation}
We will replace x and y with 
\begin{equation}
x=X\cos\theta-Y\sin\theta 
y=X\sin\theta+Y\cos\theta.
\end{equation}
We use the multiple angle formulas for sine and cosine that come from the   addition formulas for sine and cosine
\begin{equation}
\cos(2\theta)=\cos^2(\theta)-\sin^2(\theta) and 
\sin(2\theta)=2\sin(\theta)\cos(\theta).
\end{equation}

答案1

这就是你要找的

我们将 x 和 y 替换为

\begin{align*}
x=&X\cos\theta-Y\sin\theta \\
y=&X\sin\theta+Y\cos\theta.
\end{align*}

最好使用align环境。如果您希望对这些方程式进行编号:

我们将 x 和 y 替换为

\begin{align}
x=&X\cos\theta-Y\sin\theta \\
y=&X\sin\theta+Y\cos\theta.
\end{align}

(编辑)如果您只希望对其中一个方程进行编号:

我们将 x 和 y 替换为

\begin{align}
x=&X\cos\theta-Y\sin\theta \nonumber\\
y=&X\sin\theta+Y\cos\theta.
\end{align}

答案2

让我将我的评论转化为答案:

环境equation适用于单线方程。对于多线方程,您应该使用或(包的扩展版本)环境,如、、,amsmathmathtools其中amsmath˙一些进行gather编号。有关详细信息,请阅读或包的文档,或参阅alignmultlinesplitamsmathmathtoolsLaTeX/数学

下面的例子中纠正了您的 MWE,其中演示了使用splitalign环境(从整个 MWE 中仅显示了使用split和的部分align

在此处输入图片描述

当然,选择合适的amsmath环境取决于您。

相关内容