2

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]
                           }
\\
&\qquad\qquad\qquad
+\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)
\\
&\qquad\qquad = [d,U_p] \left( \gamma_1,\dots,\gamma_p \right)
\end{IEEEeqnarray*}

\end{document}

1 Answer 1

3

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].

Sample output

\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]
   &\qquad\qquad\qquad
   +\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)
   \\
   &\qquad\qquad = [d,U_p] \left( \gamma_1,\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:

Second sample

\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]
   &\qquad\qquad\qquad
   +\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)
   \\
   &\qquad\qquad = [d,U_p] \left( \gamma_1,\dots,\gamma_p \right)
\end{IEEEeqnarray*}

\end{document}
8
  • Thank you, that's what I need! The IEEE somehow got lost in the process of writing the question. Commented Oct 25, 2014 at 20:47
  • Did you mean \\[-1ex]? Commented Oct 25, 2014 at 20:53
  • 1
    No I used \\[1ex] - without it the lines are too close together. You may well prefer a smaller value, but with \\[-1ex] they overlap. Commented Oct 26, 2014 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
    Commented Oct 26, 2014 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
    Commented Oct 26, 2014 at 19:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .