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.

how can I add vertical space between lines in an equation while using IEEEeqnarray?

share|improve this question
    
Please add a small example of your use of the ieeeeqnarray environment. Also, are you looking to change the space between successive lines globally or on a one-off basis? –  Mico Sep 18 '11 at 22:14
add comment

4 Answers

You can use the optional argument for \\:

\documentclass{IEEEtran}

\begin{document}

\begin{IEEEeqnarray}{c}
a = b\\[5pt]
c=d
\end{IEEEeqnarray}

\end{document}
share|improve this answer
    
How can change the setting once for the entire equation? –  Isaac Kleinman Sep 18 '11 at 20:00
add comment

If you want to change the spacing for all the lines in the current IEEEeqnarray environment you can use:

\documentclass{IEEEtran}

\begin{document}{\setlength{\IEEEnormaljot}{15pt}%
\begin{IEEEeqnarray}{c}
a = b\\
c=d\\
e=f
\end{IEEEeqnarray}
}
\end{document}

Note the additional { which makes the setting local to this group and does not affect other IEEEeqnarray environments. Alternatively you could define your own environment that contains this setting:

\documentclass{IEEEtran}

\newenvironment{MyIEEEeqnarray}[1][c]{%
    \setlength{\IEEEnormaljot}{15pt}%
    \begin{IEEEeqnarray}{#1}%
}{%
    \end{IEEEeqnarray}%
}%

\begin{document}
\begin{MyIEEEeqnarray}[c]
a = b\\
c=d\\
e=f
\end{MyIEEEeqnarray}
\end{document}

Here I made the [c] setting optional.

share|improve this answer
    
I only want extra space for the lines of the equation itself. In other words, only part enclosed in \begin{IEEEeqnarray}... \end{IEEEeqnarray}. –  Isaac Kleinman Sep 18 '11 at 20:16
    
The above will ONLY affect spacing in the current IEEEeqnarray as it is in a group. –  Peter Grill Sep 18 '11 at 20:18
    
Actually, there is no need to wrap around the IEEEeqnarray environment. The \IEEEeqnarraydecl hook or the optional argument of the IEEEeqnarray environment can be used instead. –  mhp Sep 18 '11 at 20:56
    
@mhp: Thanks, I did not know about that. But I personally prefer to wrap it in an environment, as then it is going to be consistent across the entire document. –  Peter Grill Sep 18 '11 at 21:51
    
Settings specified in the \IEEEeqnarraydecl hook apply to every instance of the IEEEeqnarray environment in the document. You can override them for a single instance using the optional argument. Note furthermore that setting \IEEEnormaljot only works because \jot is initialized as \IEEEnormaljot in the standard set-up of the IEEEeqnarray environment. –  mhp Sep 19 '11 at 8:27
add comment

You can set the \jot length in the \IEEEeqnarraydecl hook:

\documentclass{article}

\usepackage{IEEEtrantools}

\renewcommand*{\IEEEeqnarraydecl}{%
  \setlength{\jot}{2\IEEEnormaljot}% twice the normal value of \jot
}

\begin{document}

\begin{IEEEeqnarray}{RCL}
  a&=&b\\
  x&=&y
\end{IEEEeqnarray}

\end{document}

Alternatively, you can set \jot in the optional argument of the IEEEeqnarray environment. Note that, in both cases, the change of \jot is only local.

share|improve this answer
add comment

I have never used gather, but if working within the array environment, just add vertical space to line jumps. It may work with gather.

If used often, define a new line jump command.

Example:

\documentclass{article}

\newcommand{\lj}{\vspace*{2mm}\\} % vertical space is added

\begin{document}

\[
\begin{array}{c}
  Line 1 \lj
  Line 2 \lj
  Line 3 \lj
  Line 4 \lj
  Line 5
\end{array}
\]

\end{document}
share|improve this answer
1  
a) This doesn't seem to address the particular question of the IEEE environments and b) in such an approach you would be better with \\[2mm] as in Gonzalo Medina's answer. –  Andrew Swann Sep 30 '13 at 13:43
add comment

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.