Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Brace in latex question

  1. Dec 4, 2013 #1


    User Avatar
    Gold Member

    hey pf!

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

    A \\
    B \end{aligned}

    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.

  2. jcsd
  3. Dec 4, 2013 #2
    The array environment should do the trick.
    [tex]\left. \begin{array}{c} A\\ B\end{array}\right\}[/tex]

    Code (Text):
    $\left. \begin{array}{c} A\\
    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.
  4. Dec 4, 2013 #3


    User Avatar
    Gold Member

    thanks hypersphere. you mean title mine as "CODE" next time with a description?
  5. Dec 5, 2013 #4


    User Avatar
    Gold Member

    also, i tried the code you proposed but there is no number on the side. it's what i already had
  6. Dec 5, 2013 #5
    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.
        \left. \begin{array}{c} A\\ B\end{array}\right\}
  7. Dec 6, 2013 #6


    User Avatar
    Gold Member

Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Similar Discussions: Brace in latex question
  1. LaTeX question (Replies: 1)

  2. Question: on LaTeX (Replies: 1)

  3. LaTeX Questions (Replies: 7)

  4. A Latex question (Replies: 2)

  5. Latex Question (Replies: 1)