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

  • Thread starter Thread starter Butelle
  • Start date Start date
Click For Summary

Discussion Overview

The discussion revolves around formatting equations in LaTeX, specifically how to align multiple equations at the equals signs without creating multiple columns. Participants explore different methods to achieve this alignment.

Discussion Character

  • Homework-related, Technical explanation

Main Points Raised

  • One participant seeks guidance on aligning equations in LaTeX, expressing difficulty as a first-time user.
  • Another participant explains the use of the ampersand (&) in LaTeX for alignment in multi-line equations and suggests a simple centering method.
  • A later reply clarifies the intention to align multiple equations at the equals signs and provides examples using the eqnarray environment.
  • Further variations of alignment are proposed, showing different placements of the ampersand for alignment.

Areas of Agreement / Disagreement

Participants generally agree on the use of the ampersand for alignment, but there are different interpretations of how to achieve the desired formatting, leading to multiple proposed solutions.

Contextual Notes

Some assumptions about the user's familiarity with LaTeX environments and specific formatting needs are not fully articulated, which may affect the applicability of the proposed solutions.

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!
 

Similar threads

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