# Why extra space and how to remove it?

I'm using:

\documentclass[journal]{IEEEtran}
\begin{document}
%
\begin{enumerate}
\item something
\item something
\end{enumerate}
%
I have an empty line space just before this line.
\end{document}


I don't know why there is a line space before "I have an empty ...". How do I remove it?

Thanks

• (Enumerate) lists do have such space, to make them more outstanding – user31729 Apr 30 '15 at 21:36
• @ChristianHupfer Isn't "%" supposed to remove the extra spaces? – Elnaz Apr 30 '15 at 21:37
• Not in this case, as there is some extra \vskip\somelength statement in the end code of \enumerate (at least as far as I remember). I tried your document and the spacings are not too large, in my point of view – user31729 Apr 30 '15 at 21:38
• The code posted produces this do you really want the last line closer to the display list? – David Carlisle Apr 30 '15 at 21:41
• Mine is at least 3 lines of space!? – Elnaz Apr 30 '15 at 21:48

The standard behavior of enumerate lists is to add some vertical space above and below them (unless they are nested and start just after \item).

This space is \topsep and is used both above and below.

So you get no space by setting it to zero and enumerate in the IEEEtran class accepts an optional argument for doing shose settings.

\documentclass[journal]{IEEEtran}
\begin{document}

\begin{enumerate}[\setlength\topsep{0pt}]
\item something
\item something
\end{enumerate}
I have an empty line space just before this line.
\end{document}


Of course no space will be left above the list (you can add it manually with \vspace{\topsep}.

A more complete example, showing the difference. I think that the space is good, because it makes the list a bit more outstanding from the context.

\documentclass[journal]{IEEEtran}
\usepackage{lipsum}

\begin{document}

\lipsum*[1]
\begin{enumerate}
\item something
\item something
\end{enumerate}
\lipsum*[2]
\begin{enumerate}[\setlength\topsep{0pt}]
\item something
\item something
\end{enumerate}
\lipsum[3]

\end{document}


• in my code posted above, I do not have any space above the list nut only after the list. – Elnaz Apr 30 '15 at 21:52
• your code doesn't work for me. I still have the space after the list. – Elnaz Apr 30 '15 at 21:54
• @Elnaz What version of IEEEtran do you have? – egreg Apr 30 '15 at 21:57
• I just downloaded it few months ago. I'm using ''\documentclass[journal,transmag]{IEEEtran}'', if that makes a difference. – Elnaz Apr 30 '15 at 21:59
• @Elnaz I get exactly what I showed in the picture. Note that IEEEtran is included in TeX Live, where did you download it? – egreg Apr 30 '15 at 22:02