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.

This is an example code of my problem:

\documentclass[a4paper]{article}
\usepackage{amsmath}
\begin{document}
 \begin{align*}
    x_n&=\begin{split}
           &1+\frac{1}{2}+\left( \frac{1}{3}+\frac{1}{4} \right)+\left( \frac{1}{5}+\frac{1}                {6}+\frac{1}{7}+\frac{1}{8} \right)+\cdots+\left( \frac{1}{2^{k-1}+1}+\cdots+\frac{1}{2^k} \right)\\
           &+\cdots+\left( \frac{1}{2^{2N-1}+1}+\cdots+\frac{1}{2^{2N}} \right)
         \end{split}\\
       &>1+2^0\frac{1}{2^1}+2^1\frac{1}{2^2}+2^2\frac{1}{2^3}+\cdots+2^{k-1}\frac{1}{2^k}+\cdots+2^{2N-1}\frac{1}{2^{2N}}
 \end{align*}
\end{document}

It produces a giant blank gap between equality sign and split equations like the following:

enter image description here

I don't know what is wrong. Can anybody enlighten me?

share|improve this question
1  
Are you sure you don't want something like \begin{aligned}[t] or \begin{multlined}[t] instead of \begin{split}? By the way, you might need mathtools package. –  Manuel Jun 6 at 11:20
    
Oh, aligned is an option, but is it really improper to use split in this case? –  Naitree Jun 6 at 11:24
1  
I always thought that split is only meant to be used inside an equation environment so it gets only one number the whole equation while you split it in many lines. And aligned for everything else. –  Manuel Jun 6 at 11:31
2  
The amsmath package documentation also says 'The split structure should constitute the entire body of the enclosing structure, apart from commands like \label that produce no visible material.' –  Ian Thompson Jun 6 at 12:20
1  
regardless of other considerations, the fact that you begin each line of the split portion with a & is what is pushing it to the right of what's on the longest line. there's rarely a good reason to begin lines of a split (or most other multi-line) environment(s) with &. –  barbara beeton Jun 6 at 12:56

1 Answer 1

up vote 3 down vote accepted

I think you may be better off using the multlined environment from the mathtools package.

\documentclass[a4paper]{article}
\usepackage{mathtools}
\begin{document}
\begin{align*}  
x_n&= 
\begin{multlined}[t]  
 1+\frac{1}{2}+\left( \frac{1}{3}+\frac{1}{4} \right)    
  +\left( \frac{1}{5}+\frac{1}{6}+\frac{1}{7}+\frac{1}{8} \right)
  +\cdots+\left( \frac{1}{2^{k-1}+1}+\cdots+\frac{1}{2^k} \right)\\
  +\cdots+\left( \frac{1}{2^{2N-1}+1}+\cdots+\frac{1}{2^{2N}} \right)
\end{multlined}\\
&>1+2^0\frac{1}{2^1}+2^1\frac{1}{2^2}+2^2\frac{1}{2^3}+\cdots+2^{k-1}
\frac{1}{2^k}+\cdots+2^{2N-1}\frac{1}{2^{2N}} 
\end{align*}
\end{document}

equation

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.