# Brace in latex question

Tags:
1. Dec 4, 2013

### joshmccraney

hey pf!

i have a question on latex, specifically on braces. i have:

\left.\begin{aligned} A \\ B \end{aligned} \right\}

but i am wanting one number far to the right and centered at the point of the brace so i can reference these two equations as one number.

also, the number should be able to fit directly into the number sequence it is written (what i mean is, i have equations before this and it would be nice if this brace simply adopted the next natural number, so if the equation before was (4) this would automatically be (5) so the next equation would be (6) automatically).

i'm sorry, but i dont know how to enter the command without it showing in latex (yes, im a rookie). i tried googling it, but no luck. perhaps if you help you can QUOTE me and it should pop up.

thanks!!

2. Dec 4, 2013

### Hypersphere

The array environment should do the trick.
$$\left. \begin{array}{c} A\\ B\end{array}\right\}$$

Code (Text):
$\left. \begin{array}{c} A\\ B\end{array}\right\}$
or something like that. The "\left." means that there is an invisible thing to the left of whatever you try to enclose with the brackets.

The CODE tags are useful for posting stuff like this on the forum.

3. Dec 4, 2013

### joshmccraney

thanks hypersphere. you mean title mine as "CODE" next time with a description?

4. Dec 5, 2013

### joshmccraney

also, i tried the code you proposed but there is no number on the side. it's what i already had

5. Dec 5, 2013

### Hypersphere

I meant that if you want to post LaTeX code giving you trouble and display the actual code instead of its result, you can write it like
Code (Text):
code you don't want the forum to process goes here[\code]
but with the backslash replaced by a slash.

[quote="joshmccraney, post: 4593009"]also, i tried the code you proposed but there is no number on the side. it's what i already had[/QUOTE]

Sorry about that. Yeah, LaTeX distinguishes between a few math modes, and the (single) dollar signs toggle "inline math mode", which is meant to be part of a paragraph without breaking the lines. Naturally then, there is no equation number. The double dollar signs is deprecated,by the way. To get equation numbers you want a math environment that's part of the "display math mode", such as equation or align (a few other ones don't use equation numbers though). E.g.
[code]

\left. \begin{array}{c} A\\ B\end{array}\right\}

6. Dec 6, 2013

thanks!