🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

3 total messages Started by Michael De Nil Mon, 29 Apr 2002 18:51
NewLine with Maths
#11598
Author: Michael De Nil
Date: Mon, 29 Apr 2002 18:51
14 lines
1524 bytes
Heyz

someone who knows how to add a newline after a math-expression ?
currently, I always \end{displaymath} and \begin{displaymath} to add a
newline...

anyone plz ?
	michael

-----------------------------------------------------------------------
                Michael De Nil -- michael@aerythmic.be
       Linux LiSa 2.4.18 #4 SMP ma apr 1 11:11:48 CEST 2002 i686
  20:46:01 up 2 days, 50 min,  6 users,  load average: 1.00, 0.78, 0.37
-----------------------------------------------------------------------
Re: NewLine with Maths
#11599
Author: W. Blaine Dowler
Date: Mon, 29 Apr 2002 20:25
48 lines
2803 bytes
Michael De Nil wrote:

> Heyz
> 
> someone who knows how to add a newline after a math-expression ?
> currently, I always \end{displaymath} and \begin{displaymath} to add a
> newline...
> 
> anyone plz ?
> michael

If I'm going to have multiple lines of math, I use the eqnarray or 
eqnarray* environments.  (The * version doesn't number the lines.  The 
unstarred version numbers all lines that don't have the \nonumber command 
in them.)  It's automatically formatted as three columns, assuming the 
relation (=, <, >, etc.) is the second column.  Columns are separated by &, 
and newlines are made with \\.  Here's an example of the derivation of the 
quadratic equation:

Given \[Ax^2+Bx+C=0\] what is $x$?

We begin by defining $b=\frac{B}{A}$ and $c=\frac{C}{A}$.  This allows
us to rewrite the expression as
\[
x^2 + bx+c = 0
\]

Now, we remember that $\left(p+q\right)^2=p^2+2pq+q^2$, and apply this
to the expression.
\begin{eqnarray}
x^2 + bx + \frac{b^2}{4} -\frac{b^2}{4} +c &=&0\nonumber\\
\left(x+\frac{b}{2}\right)^2 &=& \frac{b^2}{4} - c\nonumber\\
x+\frac{b}{2} &=& \pm \sqrt{\frac{b^2}{4}-c}\nonumber\\
x &=& -\frac{b}{2} \pm \sqrt{\frac{b^2}{4}-c}\nonumber\\
x &=& \frac{B}{2A} \pm
\sqrt{\frac{B^2}{4A^2}-\frac{C}{A}}\nonumber\\
x &=& \frac{-B\pm\sqrt{B^2-4AC}}{2A}
\end{eqnarray}

(This is the one I posted on http://planetmath.org a few months ago.)

-- 
- Blaine

http://www.bureau42.com
ICQ: 24893016
XFW # 299792458, WM, SW, WNS, NRMTPB, FPSSG
Koopa TROoPA #42
Re: NewLine with Maths
#11597
Author: Lars Madsen
Date: Tue, 30 Apr 2002 10:03
48 lines
2551 bytes
Michael De Nil wrote:

> Heyz
>
> someone who knows how to add a newline after a math-expression ?
> currently, I always \end{displaymath} and \begin{displaymath} to add a
> newline...
>
> anyone plz ?
>         michael
>
> -----------------------------------------------------------------------
>                 Michael De Nil -- michael@aerythmic.be
>        Linux LiSa 2.4.18 #4 SMP ma apr 1 11:11:48 CEST 2002 i686
>   20:46:01 up 2 days, 50 min,  6 users,  load average: 1.00, 0.78, 0.37
> -----------------------------------------------------------------------

when you're writing math always use the amsmath package.

And do not! use the eqnarray environment (it has a few bugs)

use instead align (or align*)

\begin{align*}
a&=b=c\\
&=n=m
\end{align*}
then the character just after the & will be aligns under each other.

Also have a look at

ftp://ftp.ams.org/pub/tex/doc/amsmath/short-math-guide.ps

(or the .pdf version)
it's a short introduction to some of the things that can be done with the
amsmath package

it's also a good idea to have a look at the 'news' version of chapter 8 of
The LaTeX Companion

http://www.ctan.org/tex-archive/info/companion-rev/ch8.ps


--

/daleif
F2.10 - Institut for Matematiske Fag, Matematisk Afdeling
�rhus Universitet
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads