Latex Braces: How to Center and Reference Multiple Equations | PF Question

  • Context: LaTeX 
  • Thread starter Thread starter member 428835
  • Start date Start date
  • Tags Tags
    Latex
Click For Summary

Discussion Overview

The discussion revolves around formatting equations in LaTeX, specifically focusing on how to use braces to group multiple equations and how to reference them with a single number. Participants explore methods to achieve this while ensuring the numbering fits into a sequence of equations.

Discussion Character

  • Technical explanation
  • Homework-related

Main Points Raised

  • One participant seeks help with centering a number next to a brace that groups two equations, wanting the number to automatically fit into the sequence of previously numbered equations.
  • Another participant suggests using the array environment in LaTeX to achieve the desired formatting.
  • A participant explains the use of the "\left." command to create an invisible element for proper alignment of the brace.
  • There is mention of the importance of using the correct math mode in LaTeX to display equation numbers, with a warning that single dollar signs denote inline math mode, which does not support numbering.
  • Participants discuss how to properly format LaTeX code for posting on the forum without it being processed as LaTeX.

Areas of Agreement / Disagreement

Participants generally agree on the need for proper formatting in LaTeX to achieve the desired output, but there is no consensus on the best method to center the number next to the brace or how to ensure it adopts the correct sequence number.

Contextual Notes

Some participants note that the double dollar signs for display math mode are deprecated, suggesting that users should consider using environments like equation or align for proper numbering.

member 428835
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 don't know how to enter the command without it showing in latex (yes, I am a rookie). i tried googling it, but no luck. perhaps if you help you can QUOTE me and it should pop up.

thanks!
 
Physics news on Phys.org
joshmccraney said:
hey pf!

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

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

Code:
\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 don't know how to enter the command without it showing in latex (yes, I am a rookie). i tried googling it, but no luck. perhaps if you help you can QUOTE me and it should pop up.

thanks!

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

Code:
$\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.
 
thanks hypersphere. you mean title mine as "CODE" next time with a description?
 
also, i tried the code you proposed but there is no number on the side. it's what i already had
 
joshmccraney said:
thanks hypersphere. you mean title mine as "CODE" next time with a description?
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:
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]
\begin{equation}
    \left. \begin{array}{c} A\\ B\end{array}\right\}
\end{equation}
 
  • Like
Likes   Reactions: 1 person
thanks!
 

Similar threads

  • · Replies 11 ·
Replies
11
Views
9K
  • · Replies 9 ·
Replies
9
Views
6K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 7 ·
Replies
7
Views
3K