# How to reduce vertical space between two line in IEEEeqnarray?

How can I lift the second line higher so that there is not a large space between the first line and the second line?

\documentclass{article}

\usepackage{amsmath}
\usepackage{mathtools} % for \smashoperator[lr]{...}
\usepackage[retainorgcmds]{trantools} % for \begin{IEEEeqnarray*}{rl}...

\begin{document}

\begin{IEEEeqnarray*}{rl}
\IEEEeqnarraymulticol{3}{l}{
\frac12\;
\smashoperator{
\sum_{
\begin{matrix} k+l=p \\ \sigma\equiv(p,q)\text{-shuffles} \end{matrix}
}
}
\;\pm\left[
U_k(\gamma_{\sigma(1)},\dots,\gamma_{\sigma(k)}),
U_l(\gamma_{\sigma(k+1)},\dots,\gamma_{\sigma(k+l)})
\right]
}
\\
+\sum_{i<j}U_{p-1}
\left(
[\gamma_i,\gamma_j],\gamma_1,\dots,\widehat{\gamma_i},\dots,\widehat{\gamma_j},\dots,\gamma_p]
\right)
\\
\end{IEEEeqnarray*}

\end{document}


You can \smash the whole of the first line and then open up with e.g. \\[1ex] at the end. In this case it is only the depth of the expression that you want to hide so probably it is most appropriate to use \smash[b]. This leaves the height intact, so spacing to the previous text is unaffected. If you want to reduce that space too then use \smash instead of \smash[b].

\documentclass{article}

\usepackage{amsmath}
\usepackage{mathtools} % for \smashoperator[lr]{...}
\usepackage[retainorgcmds]{IEEEtrantools} % for \begin{IEEEeqnarray*}{rl}...

\begin{document}

\begin{IEEEeqnarray*}{rl}
\IEEEeqnarraymulticol{2}{l}{
\smash[b]{\frac12\;
\smashoperator{\sum_{\substack{k+l=p \\ \sigma\equiv(p,q)\text{-shuffles}}}}
\;\pm\left[
U_k(\gamma_{\sigma(1)},\dots,\gamma_{\sigma(k)}),
U_l(\gamma_{\sigma(k+1)},\dots,\gamma_{\sigma(k+l)})
\right]
}}
\\[1ex]
+\sum_{i<j}U_{p-1}
\left(
[\gamma_i,\gamma_j],\gamma_1,\dots,\widehat{\gamma_i},\dots,
\widehat{\gamma_j},\dots,\gamma_p]
\right)
\\
\end{IEEEeqnarray*}

\end{document}


Note on my machine the package is IEEEtrantools, not trantools.

As Mico points out the spacing after the \pm is too big. This is a strange bug with spacing around \left...\right discussed in Spacing around \left and \right . One solution is to use the mleftright package as follows:

\documentclass{article}

\usepackage{amsmath}
\usepackage{mathtools} % for \smashoperator[lr]{...}
\usepackage[retainorgcmds]{IEEEtrantools} % for \begin{IEEEeqnarray*}{rl}...
\usepackage{mleftright}

\begin{document}

\begin{IEEEeqnarray*}{rl}
\IEEEeqnarraymulticol{2}{l}{
\smash[b]{\frac12\;
\smashoperator{\sum_{\substack{k+l=p \\ \sigma\equiv(p,q)\text{-shuffles}}}}
\;\pm\mleft[
U_k(\gamma_{\sigma(1)},\dots,\gamma_{\sigma(k)}),
U_l(\gamma_{\sigma(k+1)},\dots,\gamma_{\sigma(k+l)})
\mright]
}}
\\[1ex]
+\sum_{i<j}U_{p-1}
\left(
[\gamma_i,\gamma_j],\gamma_1,\dots,\widehat{\gamma_i},\dots,
\widehat{\gamma_j},\dots,\gamma_p]
\right)
\\

• Did you mean \\[-1ex]? – Olivier Bégassat Oct 25 '14 at 20:53
• No I used \\[1ex] - without it the lines are too close together. You may well prefer a smaller value, but with \\[-1ex] they overlap. – Andrew Swann Oct 26 '14 at 7:52
• @AndrewSwann I'd use \smash[b] to begin with and tell in the final note that in other cases \smash[t] or \smash could be beneficial. – egreg Oct 26 '14 at 11:25
• The OP's code provides an interesting case illustrating why using \left and \right may not be right even if the size of the brackets happens to be correct: the extra space inserted to the left of \left[ makes the \pm symbol like it's a binary operator. Using \bigl[ does not insert extra space, and it would be clearer that \pm is a unary operator. – Mico Oct 26 '14 at 19:59