# Avoiding vertical spaces between bibitems while using IEEEtran

I'm using IEEEtran class and bibliography style and I see that the references section that it generates leaves empty lines between bibitems when the compsocconf option is used. Is there a way to avoid this?

Note: If you do not use the compsocconf option, which is meant for Computer Society conferences, you don't have this problem. Also, the article is a lot more compact as a whole.

-
 Please consider to convert your "Note" to an answer to your own question (self-answers are permissible). Otherwise, your question is likely to remain part of the "Unanswered questions" list. – lockstep Aug 16 '11 at 11:36 I thought it might be a good idea to keep the question open since it is not yet answered for the situation when one wants to use the compsocconf option. – Chan Li Aug 16 '11 at 13:25

This behaviour is not specific to ieeetran.bst, but also occurs with, e.g., the plain style. LaTeX uses the thebibliography environment to typeset the "References" section. thebibliography in turn uses the generic list environment, and lists by default add vertical space between (bibliography) items. To remove the spacing, one must add \itemsep 0pt at the right place of the definition of \thebibliography. (In the following example, I use the etoolbox package to selectively change the definition.)

EDIT: As you didn't reveal your document class, I'm assuming a standard class here, or at least a class with a "standard" definition of the thebibliography environment.

EDIT 2: In response to your revised question: Here's how to use the ieeetran class with the options compsoc and conference (sic!), but without enlarged vertical space between bibitems.

\documentclass[compsoc,conference]{ieeetran}

% \usepackage{etoolbox}
% \patchcmd{\thebibliography}{\leftmargin\labelwidth}
%     {\itemsep 0pt \leftmargin\labelwidth}{}{}

\def\IEEEbibitemsep{0pt plus .5pt}

\begin{filecontents}{\jobname.bib}
@misc{A01,
author = {Author, A.},
year = {2001},
title = {Alpha},
}
@misc{B02,
author = {Buthor, B.},
year = {2002},
title = {Bravo},
}
@misc{C03,
author = {Cuthor, C.},
year = {2003},
title = {Charlie},
}
\end{filecontents}

\begin{document}

\nocite{*}

\bibliographystyle{ieeetran}
\bibliography{\jobname}

\end{document}

(The filecontents environment is only used to include some external files directly into the example, so that it compiles. It is not necessary for the solution.)

-
I tried your solution, but it didn't work for me. The algorithm2e package threw up an error that wasn't appearing earlier. When I ignored the error, the spaces between bibitems remained in the output. I'm using the IEEETran class file. – Chan Li Aug 16 '11 at 9:00
Using the ieeetran class, I get no spaces between bibitems from the outset, so you must be doing something else. Please provide a minimal example that shows the problem. – lockstep Aug 16 '11 at 9:07
While trying to create the minimal example, I figured that when I dropped the "compsocconf" option of the IEEEtran class file, the spacing disappeared. This even without using the etoolbox package. Thanks for your kind help. – Chan Li Aug 16 '11 at 10:00