Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have a very big equation and I tried to seperate that equation into different lines using the following code but the spacing is very big. Can anyone suggest what would be the best way to save space and reduce the bulkiness of the code ?

    \[
\rho \Delta x \Delta y \Delta z \Delta \tau \partial_tc_i(t,x,\tau)_
=
\rho \Delta x \Delta y \Delta z \Delta \tau (p_i-d_i)-  
\]

\[
 \rho \Delta y, \Delta z \Delta \tau [q_{i,x}(t,x+\Delta x/2, y, z, \tau)-q_{i,x}(t,x - \Delta x/2, y, z, \tau)]
\]

\[
-  \rho \Delta x, \Delta z \Delta  \tau [q_{i,y}(t,x,y+\Delta y/2, y, z, \tau)-q_{i,y}(t,x,y - \Delta y/2, z, z, \tau)]
\]

\[
-\rho \Delta x \Delta y \Delta \tau[q_{i,z}(t,x,y,z+\Delta z/2, \tau) - q_{i,z}(t,x,y,z-\Delta z/2, \tau)]
\]

The output of this code is as follows: enter image description here

I want to reduce the spacing between the lines.

Thank you.

share|improve this question
1  
In general, bo not leave a blank line before or after a display math environment. But, in this case put them in a single displaymath environment such as gather. –  Peter Grill Mar 20 '13 at 3:22
1  
Don't use consecutive displayed math environments; you could use instead multline or other of the environments provided by amsmath for equations in several lines. –  Gonzalo Medina Mar 20 '13 at 3:22

1 Answer 1

up vote 7 down vote accepted

You could use either the gather* or the align* environment. Both are provided by the amsmath package. In the MWE below, I use the align* method, taking the opportunity to break up the expression from 4 rather long lines to 7 less-long lines of math.

enter image description here

\documentclass{beamer}
\usepackage{amsmath}
\begin{document}  
\begin{frame}
\begin{align*}
\rho \Delta x \Delta y \Delta z \Delta \tau \partial_t c_i(t,x,\tau) 
&= \rho \Delta x \Delta y \Delta z \Delta \tau (p_i-d_i)  \\
&- \rho \Delta y, \Delta z \Delta \tau [q_{i,x}(t,x+\Delta x/2, y, z, \tau)\\
&\qquad - q_{i,x}(t,x - \Delta x/2, y, z, \tau)]\\
&- \rho \Delta x, \Delta z \Delta  \tau [q_{i,y}(t,x,y+\Delta y/2, y, z, \tau)\\
&\qquad - q_{i,y}(t,x,y - \Delta y/2, z, z, \tau)]\\
&- \rho \Delta x \Delta y \Delta \tau[q_{i,z}(t,x,y,z+\Delta z/2, \tau) \\
&\qquad - q_{i,z}(t,x,y,z-\Delta z/2, \tau)]
\end{align*}
\end{frame}
\end{document}
share|improve this answer
    
Mico, thank you so much. Works perfect and efficient. –  Jdbaba Mar 20 '13 at 4:26

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.