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

  • LaTeX
  • Thread starter member 428835
  • Start date
  • Tags
    Latex
In summary, the user has a question about using braces in LaTeX and wants to be able to reference two equations as one number. They have tried using the array environment but are not getting the desired result. They also ask for assistance on posting code on the forum. The expert suggests using a math environment such as equation or align to get equation numbers.
  • #1
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
  • #2
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.
[tex]\left. \begin{array}{c} A\\ B\end{array}\right\}[/tex]

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.
 
  • #3
thanks hypersphere. you mean title mine as "CODE" next time with a description?
 
  • #4
also, i tried the code you proposed but there is no number on the side. it's what i already had
 
  • #5
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 1 person
  • #6
thanks!
 

1. How do I center multiple equations in Latex braces?

To center multiple equations in Latex braces, you can use the \begin{align*} and \end{align*} commands to create an alignment environment. Within this environment, you can use the & symbol to indicate where you want the equations to be aligned. For example, to center three equations, you can use the following code:
\begin{align*}& equation_1 \\& equation_2 \\& equation_3\end{align*}

2. How do I reference multiple equations in Latex braces?

To reference multiple equations in Latex braces, you can use the \label{} and \eqref{} commands. The \label{} command is used to assign a label to an equation, and the \eqref{} command is used to reference that equation. For example, to reference the first equation in a set of three, you can use the following code:
\begin{align*}& equation_1 \label{eq:1} \\& equation_2 \\& equation_3\end{align*}
Equation \eqref{eq:1} shows the first equation.

3. How do I add multiple lines within a single equation in Latex braces?

To add multiple lines within a single equation in Latex braces, you can use the \begin{split} and \end{split} commands. These commands allow you to break the equation into multiple lines and align them with the & symbol. For example, to add two lines within an equation, you can use the following code:
\begin{align*}equation &= line1 + line2\\&= line3 + line4\end{align*}
\begin{align*}equation = \begin{split}line1 + line2\\line3 + line4\end{split}\end{align*}

4. Can I use multiple alignment points in Latex braces?

Yes, you can use multiple alignment points in Latex braces. The \begin{align*} and \end{align*} commands allow you to specify multiple alignment points using the & symbol. For example, to align three equations at three different points, you can use the following code:
\begin{align*}& equation_1 & & line1 \\& equation_2 & & line2 \\& equation_3 & & line3\end{align*}

5. How do I align equations at equal signs in Latex braces?

To align equations at equal signs in Latex braces, you can use the \begin{align*} and \end{align*} commands and the & symbol. You can place the & symbol before and after the equal sign to align the equations at the equal sign. For example, to align two equations at their equal signs, you can use the following code:
\begin{align*}equation_1 &= line1 \\equation_2 &= line2\end{align*}

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
275
  • MATLAB, Maple, Mathematica, LaTeX
Replies
9
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
955
  • MATLAB, Maple, Mathematica, LaTeX
Replies
11
Views
5K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
8
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
7
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
10
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
6K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
3K
Back
Top