Possible Duplicate:
How do I format this equation in LaTeX?
\begin{equation}
p_{GL}=
\lbrace
\begin{array}{@{} l c @{}}
0.59p_R+0.3p_G+0.11p_B & \text{p es un pixel del fuego} \\
0 & \text{p no es pixel del fuego}
\end{array}
\label{eq4}
\end{equation}
That's the code of an equation but the \lbrace
doesn't cover the two lines of equations.
Best Answer
Use it in the following way:
If the
p
contained within the descriptions (or conditions) on the right refers to the samep
as in the equation, then use$p$
instead similar things should be formatted similarly.amsmath
also provides thecases
environment which using a very similar layout by default:In essence, it also typesets an
array
, but with a@{}l@{\quad}l@{}
column alignment. This adds a little more space between the two columns (\quad
), and typesets bothl
eft-aligned.