BibTeX, biblatex and biberNew line in bibliography

Information and discussion about BiBTeX - the bibliography tool for LaTeX documents.
Post Reply
Erikve
Posts: 1
Joined: Fri Apr 23, 2010 10:47 am

New line in bibliography

Post by Erikve »

Dear all,

I think the answer will be easy, but I cannot manage it myself... i try to avoid that latex creates a new line after each reference in unsrt.bst. However, I cannot find what to change in this particular file, or should i change more than only something in this file.

Thanks for your help!

Erik

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

jocom
Posts: 25
Joined: Fri May 07, 2010 4:28 pm

New line in bibliography

Post by jocom »

Hi,

You'll have to search for

Code: Select all

newline$
in the .bst and delete it in the appropriate places. But - for me - editing .bst's is quite tricky.
However, you could at least test it :D

So not sure if this works and solves your problem.

Good luck,
jocom
olofos
Posts: 56
Joined: Tue Nov 24, 2009 10:37 pm

New line in bibliography

Post by olofos »

If Erikve wants all the references in a single paragraph, I don't think it's enough to change the bibliography style. Instead one needs to redefine the thebibliography environment and the bibitem macro. If it's OK to also change the bst file the following seems to work. Change the function "fin.entry" to (remember to save the changed style under a new filename!)

Code: Select all

FUNCTION {fin.entry}
{ add.period$
  write$
}
In the preamble of the latex file add

Code: Select all

\makeatletter

\newcounter{cit@tion}

\renewenvironment{thebibliography}[1]
{\section*{\refname}%
  \sfcode`\.\@m%
  \flushleft%
}{\endflushleft}

\def\@bibitem#1{%
\ifthenelse{\value{cit@tion}>0}{%
\textbullet\ %
}{}%
\refstepcounter{cit@tion}%
[\thecit@tion]~%
\if@filesw \immediate\write\@auxout{\string\bibcite{#1}{\thecit@tion}}\fi\ignorespaces%
}

\def\@lbibitem[#1]#2{%
\ifthenelse{\value{cit@tion}>0}{%
\textbullet\ %
}{}%
\refstepcounter{cit@tion}%
[#1]~%
\if@filesw \immediate\write\@auxout{\string\bibcite{#2}{#1}}\fi\ignorespaces%
}

\makeatother
If you don't want to change the .bst file it's a bit more tricky. The simplest thing I've come up with is something like

Code: Select all

\renewenvironment{thebibliography}[1]
{\section*{\refname}%
  \sfcode`\.\@m%
  \def\par{}%
  \ignorespaces%
}{}%
(with the rest of the code as above). However, I would personally prefer a ragged right margin here, but I'm not sure how to get it since I need to redefine \par to get it to ignore the empty line between each \bibitem entry in the .bbl file. Does anyone have a nicer way to do this?
Post Reply