[Tex/LaTex] Reduce bibliography to one line

bibliographiesline-breakingparagraphs

Quick question, hopefully with a quick answer. I'm writing a paper where I'm limited by length (2 pages) and I need references, but it doesn't have to look nice. I'd like LaTeX to compress my bibliography to fit on as few lines as possible.

I have this (except, you know, longer and actual books and articles):

[1] Book 1
[2] Article 1
[3] Book 2
[4] Book 3
[5] Article 2

and I want this:

[1] Book 1 [2] Article 1 [3] Book 2 [4] Book 3 [5] Article 2

Edit: I'm not using any special bibliography packages and my document class is article.

Edit 2: Here's my bbl file:

\begin{thebibliography}{1}

\bibitem{kutsenok}
A.~Kutsenok.
\newblock Swarm {AI}: {A} {G}eneral-{P}urpose {S}warm {I}ntelligence
  {T}echnique.
\newblock
  \small{\url{http://mysite.ncnetwork.net/resqlap4/sitebuildercontent/sitebuil%
derfiles/SwarmAI-Short05.pdf}}.

\bibitem{shoham}
Y.~Shoham and K.~Leyton-Brown.
\newblock {\em Multiagent Systems: Algorithmic, Game-Theoretic, and Logical
  Foundations}.
\newblock Cambridge University Press, 2008.

\bibitem{wooldridge}
M.~Wooldridge.
\newblock {\em An Introduction to MultiAgent Systems}.
\newblock John Wiley \& Sons Ltd, 2002.

\end{thebibliography}

Best Answer

Since you did not say which document class or bibliography packages you're using I will give you a general answer.

A bibliography like this uses a numbered list. The paralist package provides such in-paragraph lists: you could use the inparaenum environment of paralist to get numbered items within a paragraph without linebreaks.

For instance, with article these two redefinitons would achieve it:

\renewenvironment{thebibliography}[1]{%
  \section*{\refname}\inparaenum[{[}1{]}]}{\endinparaenum}
\renewcommand{\bibitem}[1]{\item}

The bibliography would then look like:

alt text

Further features of paralist may be used for customization.

Edit: here's a minimal example showing it with your example bbl file. Note, I additionally disabled \par temporarily, because the bbl file contains empty lines.

\documentclass{article}
\usepackage{paralist}
\renewenvironment{thebibliography}[1]{%
  \section*{\refname}%
  \let\par\relax\let\newblock\relax%
  \inparaenum[{[}1{]}]}{\endinparaenum}
\renewcommand{\bibitem}[1]{\item}
\usepackage{url}
\begin{document}
\nocite{*}
\bibliography{testbib}
\end{document}

Output:

alt text