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

  • Thread starter Thread starter Butelle
  • Start date Start date
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
4 replies · 2K views
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