為什麼這些多線方程式沒有渲染?

為什麼這些多線方程式沒有渲染?

這裡:

$$\begin{alignat}{2}
x(t) & = X+v\cos \theta t \\
y(t)& =Y+c\sin \theta t-\dfrac{1}{2}gt^2 \\
\end{alignat}$$

MathJax 不會渲染它,ShareLatex.com 也是如此。有什麼特別的原因嗎?

答案1

是的,有一個特殊的原因:您必須$$刪除alignat.

雖然該結構適用於 MathJax,但這並不是它應該適用於 LaTeX 的原因,而應該$$適用於 LaTeX絕不使用。

對於單一編號方程,請使用\begin{equation}...\end{equation};對於你的對齊方程式有align,這比alignat在這種情況下更好。每個環境*的名稱最後都有版本號,表示沒有編號。

另請注意最後一行不可以被終止\\

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{alignat}{2}
x(t) & = X+v\cos \theta t \\
y(t)& =Y+c\sin \theta t-\dfrac{1}{2}gt^2
\end{alignat}

\begin{align}
x(t) & = X+v\cos \theta t \\
y(t)& =Y+c\sin \theta t-\dfrac{1}{2}gt^2
\end{align}

\end{document}

在此輸入影像描述

相關內容