![\[ \] 環境で方程式番号を割り当てる](https://rvso.com/image/370626/%5C%5B%20%5C%5D%20%E7%92%B0%E5%A2%83%E3%81%A7%E6%96%B9%E7%A8%8B%E5%BC%8F%E7%95%AA%E5%8F%B7%E3%82%92%E5%89%B2%E3%82%8A%E5%BD%93%E3%81%A6%E3%82%8B.png)
私はLaTeX初心者なので、馬鹿げた質問であればお許しください。私は方程式に番号を割り当てたいのですが、次のような方程式を定義しました。
\[
I^e(x,y) = \left\{\begin{array}{rl}
1 & \text{if edge is detected at pixel I(x,y)}\\
0 & \text{otherwise}\\
\end{array}\right.
\]
答え1
equation
環境 を使用し、さらに簡単には環境 を使用します cases*
(mathtools
の拡張である をロードしますamsmath
)。コードは次のとおりです。
\begin{equation}
I^e(x,y) = \begin{cases*}
1 & if edge is detected at pixel $I(x,y)$\\
0 & otherwise
\end{cases*}
\end{equation}