# Latex filter, no, the other kind of latexOctober 8, 2008 7:36 AM   Subscribe

Latex filter (not that sort). I'm using Latex (with TexShop and Bibdesk) and I need to format a bibliography in a particular way. Please help!

I need to format the bibliography so that each reference simply follows on from the one before, without a carriage return.

i.e. like this:

1. Bloggs, F. 2000 Working can be fun. Journal of Work Science 10:30-45. 2. Doe, J. 1999 Camels for beginners. Camel Racing Press 34:56-76. 3. Giles, F. 1987 Sheep are woolly. Farmers Weekly. 4:67-90.

Rather than this:

1. Bloggs, F. 2000 Working can be fun. Journal of Work Science 10:30-45.

2. Doe, J. 1999 Camels for beginners. Camel Racing Press 34:56-76.

3. Giles, F. 1987 Sheep are woolly. Farmers Weekly. 4:67-90.

Are there any style files out there that accomplish this? Or ones that can be easily edited to do it?

I'm a total beginner at this...
posted by jonesor to Computers & Internet (9 answers total) 2 users marked this as a favorite

I presume you mean that you don't want white space between the entries, rather than no carriage returns at all...

I don't know about humanities-type articles, but the amsart documentclass produces the no-space-between style bibliography, if you want something quick and dirty.
posted by leahwrenn at 8:42 AM on October 8, 2008

By the way, to avoid "latex filter" and having to say "not that way", folks often write LaTeX instead of latex or Latex.
posted by leahwrenn at 8:43 AM on October 8, 2008

LaTeX it is then :).
I want no carriage returns at all, just a block of references with no new lines started. This is for a grant application where space is at a premium.
posted by jonesor at 8:59 AM on October 8, 2008

You might find this site useful. I couldn't see precisely what its bibloigraphy looked like, but his style file might be adaptable.
posted by leahwrenn at 10:35 AM on October 8, 2008

Also (I've not used it personally, but lots of people seem to find it useful), natbib may be useful.
posted by leahwrenn at 10:49 AM on October 8, 2008

Here's a term you can use to google: You will need to edit your .bst file. I'm not exactly sure *how*, but that's where those kinds of formatting of bibliography settings are kept. Those files are quite hairy, but it's certainly possible...
posted by zpousman at 10:52 AM on October 8, 2008

It's deeper than that. The .bst file merely indicates how the .bib file gets translated into a .bbl file. The .bbl file uses the {thebibliography} environment directly. This is a list environment, and it determines the line spacing. To get the desired effect, one might need to redefine the bibitem command, or the {thebibliography} environment.

Pretty hairy. You might be better off making an end run around BibTeX: take the processed .bbl file, strip out all references to the bib environment, and include the formatted text in your document as-is.
posted by rlk at 1:14 PM on October 8, 2008

Thanks all. Editing the .bst file proved a little tricky for me. So, because I won't be doing this on a regular basis I've used rlk's suggestion - quick and dirty.
I hadn't realised the bibliography system worked like that.
posted by jonesor at 3:36 PM on October 8, 2008

I got a neat solution to this from a a nice man called Adam elsewhere (bibdesk-users listserv).
He suggested putting the following snippet in my .tex file.

It seems to do the trick.

%%%% cut here

\usepackage{paralist}

\makeatletter
\renewenvironment{thebibliography}[1]
{\section*{\refname}%
\@mkboth{\MakeUppercase\refname}{\MakeUppercase\refname}%
\begin{inparaenum}%
\list{\@biblabel{\@arabic\c@enumiv}}%
{\settowidth\labelwidth{\@biblabel{#1}}%
\leftmargin\labelwidth
\@openbib@code
\usecounter{enumiv}%
\let\p@enumiv\@empty
\renewcommand\theenumiv{\@arabic\c@enumiv}}%
\sloppy
\clubpenalty4000
\@clubpenalty \clubpenalty
\widowpenalty4000%
\sfcode\.\@m}
{\def\@noitemerr
{\@latex@warning{Empty thebibliography' environment}}%
\endlist\end{inparaenum}}
\renewcommand\newblock{}
\makeatother

%%%% cut here
posted by jonesor at 1:38 PM on November 10, 2008

« Older How do I change settings in Hotmail's Deleted...   |   Like Chuck E. Cheese for twentysomethings. Newer »