image
Physics Forums Logo
image
image
* Register * Upgrade Blogs Library Staff Rules Mark Forums Read
image
image   image
image

image Cut of euations in Latex Share It Thread Tools Search this Thread image
Old May24-09, 08:03 AM                  #1
ladil123

ladil123 is Offline:
Posts: 45
Cut of euations in Latex

Hello!

I got a very long equation that I´m writing in Latex, it is so long that the equation reference can´t fit on the same line.

How do I write to cut the equation so it continues on the next line?

Thanks
  Reply With Quote
Old May24-09, 08:05 AM                  #2
cristo

PF Mentor

cristo is Offline:
Posts: 7,240
Re: Cut of euations in Latex

Use eqnarray.
  Reply With Quote
Old May25-09, 06:46 PM                  #3
las3rjock

las3rjock is Offline:
Posts: 223
Re: Cut of euations in Latex

AMS-LaTeX provides a number of nice multi-line equation environments that are preferrable to eqnarray. I generally use the split environment for long single equations and the align environment for multiple equations. See the Short Math Guide for LaTeX for more information.
  Reply With Quote
Old May26-09, 09:16 AM                  #4
minger

minger is Offline:
Posts: 980
Recognitions:
Science Advisor Science Advisor
Re: Cut of euations in Latex

Like lars, I prefer to use the split environment. Using it, it looks something like this
Code:
\begin{equation}
\label{whateverequation}
\begin{split}
x &= start of long equation \\
& second half of long equation
\end{split}
\end{equation}
The two backslashes indicate the end of the line, and the ampersands on each line are aligned underneath each other.
  Reply With Quote
Old Jun7-09, 11:10 AM                  #5
statdad

statdad is Offline:
Posts: 703
Recognitions:
Homework Helper Homework Helper
Re: Cut of euations in Latex

The use of eqnarray is no longer suggested, since the spacing leaves much to be desired. as las3rjock noted, there are much better options available.

One more note: this link is a little dated, but the advice found there is good.

http://www.math.uiuc.edu/~hildebr/tex/displays.html
  Reply With Quote
Old Jun8-09, 07:07 AM                  #6
ladil123

ladil123 is Offline:
Posts: 45
Re: Cut of euations in Latex

Thanks for the help!

I got a follow up question..

If I have "\left(" command on the first line of the equation and the closing "\right)" command on the second line it wont work!

Any tips on how to make it work?
  Reply With Quote
Old Jun8-09, 07:35 AM                  #7
fatra2

fatra2 is Offline:
Posts: 318
Re: Cut of euations in Latex

Originally Posted by ladil123 View Post
If I have "\left(" command on the first line of the equation and the closing "\right)" command on the second line it wont work!
Could you be more precise in what wont work???

If you have a one line equation that you break at some point, why do you use \left( instead of just (???

I only use the \left( when I have multi line math environment, like a matrix.

Cheers
  Reply With Quote
Old Jun8-09, 08:48 AM                  #8
ladil123

ladil123 is Offline:
Posts: 45
Re: Cut of euations in Latex

Ok,
My equation has one breaking point. At the first line i got the "\left[" command
and then that line is cut off with \\
Then on the second line I got "\right]".

Then when I should quick build my pdf file I get an error message:
"Missing \right inserted"

below is my input

\begin{align}

w_{h}^{''}(x) & =2 \lambda^{2} \left[ cosh \lambda x (E cos \\
\lambda x - D sin \lambda x ) + sinh \lambda x (B cos \lambda x - A sin \lambda x )\right] \label{winkler_homo8910} \\

\end{align}


I hope I made it more clear ?
  Reply With Quote
Old Jun8-09, 08:52 AM                  #9
minger

minger is Offline:
Posts: 980
Recognitions:
Science Advisor Science Advisor
Re: Cut of euations in Latex

There was JUST a post that addressed this. Basically each individual line in latex needs both a left and a right. In order to resolve this with multi-line equations, you use the dummy \left. and \right. constructs. Basically these act as ghost braces to end the current one.
Example:
Code:
\begin{equation}
\label
\begin{split}
x =& \left[ the start of the equation \right. \\
\left. &second half of the equation \right]
\end{split}
\end{equation}
  Reply With Quote
image image
Reply
Thread Tools


Similar Threads for: Cut of euations in Latex
Thread Thread Starter Forum Replies Last Post
LaTeX Kreizhn Programming & Comp Sci 3 Apr17-08 12:32 AM
LaTeX for the Mac cepheid Computing & Technology 3 Sep5-07 06:30 AM
LaTeX dx Forum Feedback & Announcements 8 Nov14-05 12:50 AM
LaTeX dekoi Forum Feedback & Announcements 1 Nov13-05 09:01 AM
LaTex uraknai Computing & Technology 4 Jan22-05 03:59 PM

Powered by vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd. © 2009 Physics Forums
Sciam | physorgPhysorg.com Science News Partner
image
image   image