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.

Usually, if I have a very long formula, I will use two lines in the align environment and \qquad to space things out nicely. For example,

\begin{align*}
% First line
\rho\left(\frac{\partial u_{r}}{\partial t}+u_{r}\frac{\partial u_{r}}{\partialr}+\frac{u_{\phi}}{r}\frac{\partial u_{r}}{\partial\phi}+u_{z}\frac{\partial u_{r}}{\partial z}-\frac{u_{\phi}^{2}}{r}\right) & =-\frac{\partial p}{\partial r}+\mu\Biggl[\frac{1}{r}\frac{\partial}{\partial r}\left(r\frac{\partial u_{r}}{\partial r}\right)+\frac{1}{r^{2}}\frac{\partial^{2}u_{r}}{\partial\phi^{2}}
\\
% Second line
& \qquad\qquad\qquad\qquad
+\frac{\partial^{2}u_{r}}{\partial z^{2}}-\frac{u_{r}}{r^{2}}-\frac{2}{r^{2}}\frac{\partial u_{\phi}}{\partial\phi}\Biggr]+\rho g_{r}
\end{align*}

produces

offset-aligned formula

However, this method of alignment is tedious, and not offsetting the second line usually results in something that looks poor. Is there an environment which facilitates this automatically?

share|improve this question
    
And why do you use qquad in the first place? Why not to put the ampersand (&) where you want to align the second line directly? –  Bichoy Sep 21 '13 at 18:38
    
That will not give the desired effect. –  par Sep 21 '13 at 18:42
2  
I'd suggest to use multline* instead of align* in these cases... –  karlkoeller Sep 21 '13 at 18:43
    
Ah, this is exactly what I needed. Did not know of it. Thanks. –  par Sep 21 '13 at 18:45

1 Answer 1

up vote 8 down vote accepted

I think using multline* instead of align* is the right way to go in these cases:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{multline*}
\rho\left(\frac{\partial u_{r}}{\partial t}+u_{r}\frac{\partial u_{r}}{\partial r}+
\frac{u_{\phi}}{r}\frac{\partial u_{r}}{\partial\phi}+u_{z}\frac{\partial u_{r}}{\partial z}-
\frac{u_{\phi}^{2}}{r}\right)=\\
-\frac{\partial p}{\partial r}+
\mu\Biggl[\frac{1}{r}\frac{\partial}{\partial r}\left(r\frac{\partial u_{r}}{\partial r} \right)+
\frac{1}{r^{2}}\frac{\partial^{2}u_{r}}{\partial\phi^{2}}+
\frac{\partial^{2}u_{r}}{\partial z^{2}}-\frac{u_{r}}{r^{2}}-
\frac{2}{r^{2}}\frac{\partial u_{\phi}}{\partial\phi}\Biggr]+\rho g_{r}
\end{multline*}
\end{document} 

enter image description here

share|improve this answer

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.