[Tugindia] Aligning equations
E. Krishnan
ekmath at asianetindia.com
Wed Nov 30 02:31:41 CET 2005
On Mon, 28 Nov 2005, Sreejith Pulloor wrote:
> TUG,
>
> I would like to align 4 equations nicely. the problem is first
> equation is very long and run over 2 lines and other equations are
> short.
> So i used the split option to split the first equation and but am
> unable to align them properly.
>
>
> \begin{equation*}
> \begin{split}
> A(u,v) & = \sum\limits_E\int_\Omega (\nabla u) \cdot (\nabla v) -
> \sum\limits_{\Gamma_{\text{int}}} \int_\Gamma \langle \nabla u \rangle
> n \cdot [v] + \epsilon \sum \int_\Gamma \langle \nabla v \rangle n
> \cdot [u]\\
> & - \sum \int_{{\Gamma}_{D}} \nabla u~n \cdot v + \epsilon \sum
> \int_{\Gamma_{D}} \nabla v~n \cdot u\\
> \end{split}
> \end{equation*}
> \begin{align*}
> B(u,q) & = - \sum \int_\Omega q \nabla \cdot u + \sum \int_\Gamma
> \langle q \rangle [u] \cdot n\\
> B(v,p) & = - \sum \int_\Omega p \nabla \cdot v + \sum \int_\Omega
> \langle p \rangle [v] \cdot n\\
> J(u,v) & = \sum \frac{\sigma_e}{|{e}|}\int_\Gamma [u] \cdot [v]
> \end{align*}
>
>
> what I would like to have the equations to align something like below:
>
> A(u,v) = ........................
> .........................
> .........................
> B(u,q) = .........................
> B(v,p) = .........................
> J(u,v) = .........................
Please try this:
\begin{equation*}
\begin{split}
A(u,v)
& = \sum\limits_E\int_\Omega(\nabla u)\cdot(\nabla v)
-\sum\limits_{\Gamma_{\text{int}}}\int_\Gamma
\langle\nabla u\rangle n\cdot [v]
+\epsilon\sum\int_\Gamma\langle\nabla v\rangle n\cdot [u]\\
&\quad-\sum\int_{{\Gamma}_{D}}\nabla u~n\cdot v
+\epsilon\sum\int_{\Gamma_{D}}\nabla v~n\cdot u\\
B(u,q)
& = -\sum\int_\Omega q\nabla \cdot u
+\sum\int_\Gamma\langle q\rangle [u]\cdot n\\
B(v,p)
& = - \sum\int_\Omega p\nabla\cdot v
+ \sum\int_\Omega\langle p\rangle[v]\cdot n\\
J(u,v)
& = \sum\frac{\sigma_e}{|{e}|}\int_\Gamma [u] \cdot [v]
\end{split}
\end{equation*}
Please read the documentation for the amsmath package (available as
amsldoc.dvi) with standard TeX distributions, which contains many such
examples.
--
Krishnan
More information about the tugindia
mailing list