How to write a = b = c = d all aligned

  • Thread starter Thread starter Butelle
  • Start date Start date
AI Thread Summary
To align multiple equations in LaTeX at the equals signs, the ampersand (&) is used within the math environment. For example, using the eqnarray* environment allows for alignment at specific points, such as the equals signs. A suggested format is \begin{eqnarray*} a = b &=& c = d \\ e = f &=& g = h \end{eqnarray*}, which aligns the equations accordingly. Variations can be made to align at different positions by adjusting the placement of the ampersands. This method effectively organizes equations in a visually appealing manner.
Butelle
Messages
12
Reaction score
0

Homework Statement



Hi, I was just wondering how to write a = b = c = d all aligned - like not in 2 columns

I have been messing around with & a lot and I still can't get it. I know its simple I just am a first time user of Latex so any help would be aprreciated!
 
Physics news on Phys.org


Hi there,

The ampersand (&) in LaTeX is used in the math environment to align different lines of the equation. Meaning that, with multiple lines equations, the characters between the ampersand will be align.

For your question, I don't think I completely understand what is your intention. What do you want to align in this equation? If you just want to center the equation, you can simply use the $$a = b = c = d$$.

Cheers
 


Thanks for you reply. I intended to have lots of equations like:
a = b = c = d
f = g = h = i and like for them all to be aligned at the equals signs. Is that possible?
 


Sure thing,

You might want to try something like:

Code:
\begin{eqnarray*}
a = b &=& c = d \\
e = f &=& g = h
\end{eqnarray*}

which would align the two lines at the &=&. You can vary to have it align somewhere else, like:

Code:
\begin{eqnarray*}
a = b = &c& = d \\
e &=& f = g = h
\end{eqnarray*}

Hope this helps.

Cheers
 


thank you!
 
Back
Top