View Full Version : Cut of euations in Latex
ladil123
May24-09, 08:03 AM
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
Use eqnarray (http://www-h.eng.cam.ac.uk/help/tpl/textprocessing/teTeX/latex/latex2e-html/ltx-223.html).
las3rjock
May25-09, 06:46 PM
AMS-LaTeX (http://www.ams.org/tex/amslatex.html) 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 (ftp://ftp.ams.org/pub/tex/doc/amsmath/short-math-guide.pdf) for more information.
Like lars, I prefer to use the split environment. Using it, it looks something like this
\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.
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
ladil123
Jun8-09, 07:07 AM
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?
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
ladil123
Jun8-09, 08:48 AM
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 ?
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:
\begin{equation}
\label
\begin{split}
x =& \left[ the start of the equation \right. \\
\left. &second half of the equation \right]
\end{split}
\end{equation}
vBulletin® v3.7.6, Copyright ©2000-2009, Jelsoft Enterprises Ltd.