BibTeX, biblatex and bibercustomising 'apacite.bst'

Information and discussion about BiBTeX - the bibliography tool for LaTeX documents.
Post Reply
scooterb
Posts: 2
Joined: Wed Jan 12, 2011 2:52 am

customising 'apacite.bst'

Post by scooterb »

Thanks in advance for helping me with this problem.

I use apacite package a lot, and it makes a Harvard-style bibliography. I want to make just one change: remove the \newline that is put between items in the bibliography list (so they appear as a dense block of ugly text!).

I thought this might do it:
\setlength{\bibitemsep}{0mm}

But it doesn't. I think I need to edit the .bst file, but I've never done that before. Any hints for me?

Thanks again.

Scott.

Recommended reading 2024:

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

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

frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

customising 'apacite.bst'

Post by frabjous »

All right, I'll try to give you hints. Firstly, "apacite.bst" is not a package, it is a bibliography style. However, there is also a package called "apacite" (apacite.sty). Separate from this, there is also a harvard package, and six different harvard styles, and you also mentioned harvard. So it is very unclear what your document is like.

My next hint is that it will be impossible to provide help in this case unless you produce a minimal working example showing your usage.

I tried the following:

Code: Select all

\documentclass{article}
\usepackage{apacite}
\begin{document}
\cite{sample1,sample2}
\bibliographystyle{apacite}
\bibliography{sample}
\end{document}
And there was no spacing at all between the entries in the bibliography. The apacite documentation also clearly says that the spacing is determined by the length \bibitemsep, and indeed, I can increase that space by modifying that length with \setlength. So if things are different with your document, you have not provided enough information to help us identify what that problem is. That's why a minimal working example is so important.
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

customising 'apacite.bst'

Post by frabjous »

Actually, I think I might have misread what you're trying to do.

Do you want one big paragraph, with no demarcation at all between the entries? In that case, I don't think modifying the .bst will be necessary. You could just do something like this:

Code: Select all

\documentclass{article}
\usepackage{apacite}
\renewcommand{\bibitem}[2][]{}
\setlength{\bibleftmargin}{0pt}
\begin{document}
\cite{sample1,sample2}
\setlength{\bibitemsep}{2\baselineskip}
\bibliographystyle{apacite}
\bibliography{sample}
\end{document}
The important thing here is the third and fourth lines, obviously.
scooterb
Posts: 2
Joined: Wed Jan 12, 2011 2:52 am

Re: customising 'apacite.bst'

Post by scooterb »

Genius! Thanks! Re-defining the \bibitem function did the trick just as you suggested. And no mucking around with the .bst file, either.

Thanks again.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

customising 'apacite.bst'

Post by localghost »

Now that the problem is solved, please be so kind and mark the topic (not the last post) accordingly as clearly written in the Board Rules (to be read before posting). Please keep that in mind for the future so that further reminders will not be necessary.


Thorsten
Post Reply