![在 \[ \] 环境中指定方程编号](https://linux22.com/image/370626/%E5%9C%A8%20%5C%5B%20%5C%5D%20%E7%8E%AF%E5%A2%83%E4%B8%AD%E6%8C%87%E5%AE%9A%E6%96%B9%E7%A8%8B%E7%BC%96%E5%8F%B7.png)
我是乳胶新手,所以如果这是一个愚蠢的问题,请原谅我。我想为方程式分配一个数字,并且我已经定义了一个像这样的方程式-
\[
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}