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

  • Thread starter Mantaray
  • Start date
  • Tags
    Line
In summary, when faced with the problem of putting two equations on separate lines in TeXShop, one must use a multiline environment such as array or the align environment from the amsmath package. This can be done by using alignment markers, as demonstrated in the conversation. More information can be found on LaTeX mathematics in online resources.
  • #1
Mantaray
17
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
  • #2
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
[tex]\begin{align}
p_y &= s \cos \alpha \\
p_x &= s \sin \alpha
\end{align}[/tex]

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

What is TeXShop?

TeXShop is a typesetting program for creating documents with the TeX typesetting language.

How do I insert a new line in TeXShop?

To insert a new line in TeXShop, simply press the "Return" or "Enter" key on your keyboard.

Can I insert a blank line in TeXShop?

Yes, you can insert a blank line in TeXShop by pressing "Return" or "Enter" twice.

Is there a shortcut for inserting a new line in TeXShop?

Yes, you can use the shortcut "command + return" to insert a new line in TeXShop.

Will inserting a new line affect the formatting of my document in TeXShop?

No, inserting a new line will not affect the formatting of your document in TeXShop. The program is designed to automatically adjust the formatting to accommodate new lines.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
1K
  • Introductory Physics Homework Help
Replies
8
Views
702
  • Linear and Abstract Algebra
Replies
13
Views
509
  • MATLAB, Maple, Mathematica, LaTeX
Replies
13
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • Introductory Physics Homework Help
Replies
2
Views
255
  • MATLAB, Maple, Mathematica, LaTeX
Replies
6
Views
5K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
946
Replies
4
Views
693
  • Introductory Physics Homework Help
Replies
3
Views
1K
Back
Top