在align環境下,如何只對其中一行進行編號?

在align環境下,如何只對其中一行進行編號?

可能的重複:
使用align對方程式進行選擇性編號

我想知道,如何在對齊環境中僅對許多行中的一個特定行進行編號。

例如,我不想對方程式的所有步驟進行編號,而只想對最終結果進行編號。

答案1

你可以使用\notag指令

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align}
x=5\notag\\
y=2\notag\\
z=1
\end{align}
\end{document}

在此輸入影像描述

答案2

您可以使用\notag\nonumber來刪除數字。

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align}
ax^2+bx+c
        & = 0\nonumber\\
ax^2+bx
        & = -c\nonumber\\
ax^2+bx
        & = -c
\end{align}
\end{document}

相關內容