How can I insert two equations on separate lines in TeXShop?

  • Thread starter Thread starter Mantaray
  • Start date Start date
  • Tags Tags
    Line
Click For Summary
SUMMARY

To insert two equations on separate lines in TeXShop, utilize the align environment from the amsmath package. The correct syntax involves using ampersands (&) as alignment markers, ensuring each equation is properly aligned and displayed on its own line. An example implementation is provided: \begin{align} p_y &= s \cos \alpha \\ p_x &= s \sin \alpha \end{align}. For further information, refer to the resources available on Wikibooks.

PREREQUISITES
  • Familiarity with TeXShop
  • Basic understanding of LaTeX syntax
  • Knowledge of the amsmath package
  • Experience with mathematical environments in LaTeX
NEXT STEPS
  • Explore the amsmath package documentation
  • Learn about other multiline environments in LaTeX
  • Research alignment markers in LaTeX
  • Review advanced mathematical typesetting techniques in LaTeX
USEFUL FOR

TeXShop users, LaTeX beginners, mathematicians, and anyone looking to improve their mathematical typesetting skills in LaTeX.

Mantaray
Messages
17
Reaction score
0
I'm having the following problem in TeXShop - how can I put two equations in two separate lines?
Thus far I have something like:

Code:
\[
 p_y = s \cos \alpha \\ 
 p_x = s \sin \alpha
\]

But I still get the two on the same line..
Help would be very much appreciated
 
Physics news on Phys.org
You need to use one of the multiline environments.
The most basic of which is array (used inside \[\])
The best is probably (as long as you're using the amsmath package)
Code:
\begin{align}
 p_y &= s \cos \alpha \\ 
 p_x &= s \sin \alpha
\end{align}
where the ampersands (&) are alignment markers.
This produces
\begin{align}<br /> p_y &amp;= s \cos \alpha \\ <br /> p_x &amp;= s \sin \alpha<br /> \end{align}

For more details see
http://en.wikibooks.org/wiki/LaTeX/Mathematics
and
http://en.wikibooks.org/wiki/LaTeX/Advanced_Mathematics
 
Last edited:
Many thanks!
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
813
Replies
24
Views
2K
Replies
46
Views
5K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 9 ·
Replies
9
Views
958
  • · Replies 13 ·
Replies
13
Views
3K
  • · Replies 13 ·
Replies
13
Views
4K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K