2

I currently have the following markup to render aligned equations:

\[
\begin{split}
\sum_{j=1}^{n+1} j \cdot j! &= \overbrace{(n+1)!-1}^{A(n)} + (n+1) \cdot (n+1)! \\
&= ((n+1)+1) \cdot (n+1)! - 1 \\
&= (n+2) \cdot (n+1)! - 1 \\
&= (n+2)!-1
\end{split}
\]

It seems like the summation is creating an awkward non-uniform space between the first and second lines:

enter image description here

I understand why it's happening, but is there a way to prevent this from happening and reduce the spacing between the first and second lines?

  • Reduce, or eliminate? Eliminate is easy but you may not like the result as much as you thought you would, evening out probably involves a little more visual correction and tweaking to taste – Au101 Sep 6 '18 at 1:32
1

We can use \smash to get rid of the excess space completely, and it doesn't involve any tweaking of lengths by eye.

The result may or may not be to your taste though.

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\[
  \begin{split}
    \smash{\sum_{j=1}^{n+1}} j \cdot j! &= \overbrace{(n+1)!-1}^{A(n)} + (n+1) \cdot
    (n+1)! \\
    &= ((n+1)+1) \cdot (n+1)! - 1 \\
    &= (n+2) \cdot (n+1)! - 1 \\
    &= (n+2)!-1
  \end{split}
\]

\end{document}

enter image description here

2

\\ has an optional argument, so you can correct the vertical skip, writing, say, \\[-10pt]:

\documentclass{article}
\usepackage{amsmath}
\begin{document}

\[
\begin{split}
\sum_{j=1}^{n+1} j \cdot j! &= \overbrace{(n+1)!-1}^{A(n)} + (n+1) \cdot (n+1)! \\[-10pt]
&= ((n+1)+1) \cdot (n+1)! - 1 \\
&= (n+2) \cdot (n+1)! - 1 \\
&= (n+2)!-1
\end{split}
\]
\end{document}

enter image description here

  • Wow, didn't know that. Looks great, thanks! – Andrew Li Sep 6 '18 at 1:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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