Math & Sciencesplit numerator over two lines

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
huki1
Posts: 3
Joined: Tue May 17, 2011 12:29 pm

split numerator over two lines

Post by huki1 »

Hello,
I have a long fraction that doesn't fit on a page:

Code: Select all

\vec{u}_{i+1/2,j,k} = \left(u_{i+1/2,j,k}, \frac{v_{i,j-1/2,k}+v_{i,j+1/2,k}+v_{i+1,j-1/2,k}+v_{i+1,j+1/2,k}}{4}, \frac{w_{i,j,k-1/2}+w_{i,j,k+1/2}+w_{i+1,j,k-1/2}+w_{i+1,j,k+1/2}}{4} \right)
,

What I would like to do, is to split the numerator over two lines and get sth like that: Image

I tried to look for a solution but without any results so far.

Thanks in advance.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Re: split numerator over two lines

Post by Stefan Kottwitz »

Hi,

you could use an array environment for the numerator.

Stefan
LaTeX.org admin
huki1
Posts: 3
Joined: Tue May 17, 2011 12:29 pm

split numerator over two lines

Post by huki1 »

Stefan_K wrote: you could use an array environment for the numerator.
Yes, but i thought there is a more elegant solution. Besides, the equation is a part of

Code: Select all

\begin{subequations}
\begin{align}
.... %subequations here
\vec{u}_{i,j,k+1/2} &= \left(\frac{u_{i-1/2,j,k}+u_{i+1/2,j,k}+u_{i-1/2,j,k+1}+u_{i+1/2,j,k+1}}{4}, \frac{v_{i,j-1/2,k}+v_{i,j+1/2,k}+v_{i,j-1/2,k+1}+v_{i,j+1/2,k+1}}{4}, w_{i,j,k+1/2} \right). \\
.... %subequations here
\end{align}
\end{subequations}
huki1
Posts: 3
Joined: Tue May 17, 2011 12:29 pm

split numerator over two lines

Post by huki1 »

There actually is a good solution for the problem I encountered. The key is \atop. For example:

Code: Select all

\frac{{a+b+ \atop c+d}}{4}
Post Reply