# Smaller \lbrace than expected [duplicate]

Possible Duplicate:
How do I format this equation in LaTeX?

$$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}$$


That's the code of an equation but the \lbrace doesn't cover the two lines of equations.

-

## marked as duplicate by Marco Daniel, qubyte, lockstep, Peter Grill, Paulo CeredaJan 1 '12 at 9:13

\left\lbrace before the array, and \right. after it. That's how I've written in the previous answer to a question of yours. Please, consider deleting this question. Inside \text, write $p$, not simply p, as it's a math variable. –  egreg Dec 31 '11 at 16:37
The linked document is the same –  Marco Daniel Dec 31 '11 at 17:24
I'm in Japan, and post new year celebrations, the question @MarcoDaniel links to still badly hurts my brain. I had to alter the title. Perhaps it's just new year cheer that powers me, but I'm going to mark this one down. –  qubyte Dec 31 '11 at 18:54
@MarkS.Everitt: I voted to close ;) and I am in 2011 ;-) –  Marco Daniel Dec 31 '11 at 19:00
@MarcoDaniel: I voted to close, from the future! –  qubyte Dec 31 '11 at 19:29

Use it in the following way:

\documentclass{article}
\usepackage{amsmath}% http://ctan.org/pkg/amsmath
\begin{document}
$$p_{GL}=\left\{ \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}\right. \label{eq4}$$
\end{document}


If the p contained within the descriptions (or conditions) on the right refers to the same p as in the equation, then use $p$ instead similar things should be formatted similarly.

amsmath also provides the cases environment which using a very similar layout by default:

$$p_{GL}=\begin{cases} 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{cases} \label{eq4}$$


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 both left-aligned.

-
Thanks for the advice –  Jorge Vega Sánchez Dec 31 '11 at 16:43
@Werner: Why not use {cases} which is exactly for this kind of thing? –  Philippe Goutet Dec 31 '11 at 17:17
Thanks @PhilippeGoutet. I've added it, and mentioned the differences in alignment from what the OP used. –  Werner Dec 31 '11 at 17:23

this can also be done in the following way:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
$$p_{GL}= \begin{cases} 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{cases} \label{eq4}$$
\end{document}


-
+1, but because I'm picky, could you please add an image of the output of this code? –  qubyte Dec 31 '11 at 19:01
@CounterTerrorist -- thanks. there's no faq for how to do this; i've been looking for half an hour for directions, and the only ones i've found say post from a url, but i don't have access to an outgoing url (behind a rather well regulated firewall). someday i'll figure it out. –  barbara beeton Dec 31 '11 at 19:51
Are you having trouble uploading an image that you have, or creating the image that you want to upload? Perhaps How do you crop an attached pdf? is of interest. –  Werner Jan 3 '12 at 18:41
@Werner -- the problem is in finding instructions for uploading the image. i've just posted a question to the meta list asking that this information be put in the faq. –  barbara beeton Jan 3 '12 at 20:24