# Last bibitem in beamerpost bibliography has strange spacing

I'm making an academic poster using the beamerposter package in LaTeX.

The poster has a bibliography. The final entry in the bibliography block puts large vertical spaces between each line of the entry.

Example: this code:

\begin{block}{Bibliography}
\begin{thebibliography}{1}
{\scriptsize \bibitem{keyname1}
Author1, Author2 and Author3, {\em A long long long long long long long long long long title.}, Some Journal, Some Year}
{\scriptsize \bibitem{keyname2}
Author1, Author2 and Author3, {\em A long long long long long long long long long long title.}, Some Journal, Some Year}
{\scriptsize \bibitem{keyname3}
Author1, Author2 and Author3, {\em A long long long long long long long long long long title.}, Some Journal, Some Year}
{\scriptsize \bibitem{keyname4}
Author1, Author2 and Author3, {\em A long long long long long long long long long long title.}, Some Journal, Some Year}
\end{thebibliography}
\end{block}


Produces:

In practice, this happens independent of which references I put last, and of the way the reference is formatted (i.e. the length can come from things other than the title). It also doesn't matter where in the document I put the bibliography block.

-

## migrated from stackoverflow.comMay 14 '11 at 14:39

This question came from our site for professional and enthusiast programmers.

Use \scriptsize out of thebibliography

\documentclass{beamer}

\begin{document}
\begin{frame}
\begin{block}{Bibliography}
\scriptsize
\begin{thebibliography}{1}
\bibitem{keyname1}
Author1, Author2 and Author3, {\em A long long long long long long long long long long title.}, Some Journal, Some Year
\bibitem{keyname2}
Author1, Author2 and Author3, {\em A long long long long long long long long long long title.}, Some Journal, Some Year
\bibitem{keyname3}
Author1, Author2 and Author3, {\em A long long long long long long long long long long title.}, Some Journal, Some Year
\bibitem{keyname4}
Author1, Author2 and Author3, {\em A long long long long long long long long long long title.}, Some Journal, Some Year
\end{thebibliography}
\end{block}
\end{frame}
\end{document}

-

Marco's answer is good, but some comment might be useful.

TeX typesets a paragraph with only one baseline skip, choosing the length that's current when it sees the \par command (most of the time it's just the empty line). When one says

{\scriptsize A paragraph to be typeset in small type.}

Something else ...


TeX sees the \par when the effect of \scriptsize has already ended and the baseline skip is the normal one. This is cured by

{\scriptsize A paragraph to be typeset in small type.\par}


probably adding some vertical space above and below the part in smaller (or larger) type. Embedding the type size declaration at the outer level inside an environment is often the best way to cope with type size changes.

Let's look at what happens in the OP's case, because it seems odd that the spacing is not uniform, from the reasoning above.

In the thebibliography environment, LaTeX is typesetting a special form of the enumerate environment. In such environments, it's the text appearing after an \item command (here it's the special form \bibitem) that ends the preceding paragraph, if still pending, and starts a new one.

So when TeX starts to typeset the first reference, it has already processed the \scriptsize that's in the second one! Hence the first reference gets typeset with the baseline skip set by \scriptsize. This goes on until the last reference, when the terminating \par command is issued as part of the \end{thebibliography} code, when \scriptsize is not in effect any more.

-