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 used multiline to break a equation but in the 2nd line it goes to the end. Can't we move the 2nd line more ahead?

\documentclass[12pt,a4paper]{thesis}
\usepackage{amsmath}\usepackage{amssymb}
\usepackage{graphicx}

\usepackage[left=1.25in, right=1.0in, top=1.25in, bottom=1.0in]{geometry}

\newcommand{\piRsquare}{\pi r^2}        

\title{{Study x}}       
\date{August 24, 2013}              
%
\begin{document} \baselineskip=22pt
        \begin{multline}
    \mathcal{A}(\phi + h) - \mathcal{A}(\phi) = c_d \int_0^T \left\{\int_0^\infty \left(-\ddot{\phi} + \frac{1}{r^{d-1}}\frac{\partial}{\partial r}\left(r^{d-1} \frac{\partial \phi}{\partial r}\right) - 2m^2\phi\right)hr^{d-1}dr\right\}dt \\
    + \mbox{ Boundary Terms } + O\left(\|h^2\|\right),
    \end{multline}
\end{document}
share|improve this question
    
Please add a minimal working example (MWE), starting with \documentclass{...} and ending with \end{document}. For instance, what is your class? For article the first line is too wide. — You can add horizontal space at the end of the second (last) line with \hspace*{<length>}. Though, in your case, I’d simply add another \\ after the =. –  Qrrbrbirlbel Aug 28 '13 at 21:17
    
Lines in multline cannot be broken across a \left...\right group. And what do you mean by "ahead"? Left or right? Perhaps add some visual aid that shows exactly what you're after. –  Werner Aug 28 '13 at 21:18
    
I meant to write the 2nd line in the left. –  Complex Guy Aug 28 '13 at 21:34

2 Answers 2

up vote 2 down vote accepted

I wouldn’t use multline if you don’t want the last line to be flushright. Use equation + split instead.

Add \raisetag{\normalbaselineskip} after \end{split} to get the equation number on the same line as the last term.

Code

\documentclass[12pt,a4paper]{thesis}
\usepackage{amsmath}
\usepackage[left=1.25in, right=1.0in, top=1.25in, bottom=1.0in]{geometry}
\newcommand*{\hpheq}{\hphantom{{}={}}}
\begin{document}
\begin{equation}
\begin{split}
  \mathcal{A}(\phi + h) - \mathcal{A}(\phi) &
    = c_d \int_0^T
      \left\{ \int_0^\infty
        \left(-\ddot{\phi} + \frac{1}{r^{d-1}}\frac{\partial}{\partial r}
          \left(r^{d-1} \frac{\partial \phi}{\partial r}\right)
          - 2m^2\phi\right)
        hr^{d-1} dr
      \right\} dt \\
    & \hpheq + \mbox{ Boundary Terms } + O\left(\|h^2\|\right),
\end{split}
\end{equation}
\end{document}

Output

enter image description here

share|improve this answer

The primary line of your equation extended past the right margin, so I broke it into three lines. Perhaps this is closer to what you wanted.

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{multline}
\mathcal{A}(\phi + h) - \mathcal{A}(\phi)\\
= c_d \int_0^T 
\left\{\int_0^\infty \left(-\ddot{\phi} + 
\frac{1}{r^{d-1}}\frac{\partial}{\partial r}\left(r^{d-1} 
\frac{\partial \phi}{\partial r}\right) - 
2m^2\phi\right)hr^{d-1}dr\right\}dt \\
\hfil+ \mbox{ Boundary Terms } + O\left(\|h^2\|\right)~~,\hfil\hfil\hfil
\end{multline}
\end{document}

enter image description here

share|improve this answer
    
Shouldn't the = be on the second line? Also, the spacing around Boundary Terms is too big, right? –  Svend Tveskæg Aug 28 '13 at 21:28
    
@Mico -- if the comma weren't there, then the whole last line would be shifted to the far right. (i don't disagree about the odd positioning) and a single \hfill at the end of the line would be ignored by an \unskip in the environment definition -- needs something (like the comma) to "stop" it. and i agree with @Svend that the = should be at the beginning of the second line. –  barbara beeton Aug 28 '13 at 21:42

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.