18

My University requires that all submissions use the Harvard format for referencing. I understand this is not directly supported by BibLaTeX without some tweaking.

I spent much of my evening yesterday researching how to do this and I have almost managed to get BibLaTeX to output my bibliography in the required format. Below is an example of the current output:

Example of Harvard bibliography

However, a few issues still remain unresolved.

  1. There should be no spacing between the first and middle initials of authors, i.e. Doe, J.D. not Doe, J. D.. I have tried using \renewcommand*{\bibinitdelim}{} as suggested here, but it did not work. The nearest I have to a solution is to insert a thin space as suggested in this response.

  2. The first author should be listed as de Silva, U.C., not Silva, U.C. de.

  3. The year of publication should not have a full stop after the parentheses, i.e. (2011), not (2011),.

  4. Some bibliography entries will need to be appended with additional information (such as the date of access, if the source was online, etc.) using the note field at the end of the entry. However, the current settings cause the note field for articles to be sandwiched between the volume number and page numbers, rather than after the page numbers, as shown below:

biblatex note field

Does anyone have any ideas as to how I can resolve these formatting issues?

Here are the settings I've applied so far:

\documentclass[12pt,a4paper,oneside]{report}

\usepackage{filecontents}
\usepackage[
firstinits=true, % render first and middle names as initials
maxcitenames=3,
maxbibnames=99,
style=authoryear,
dashed=false, % re-print recurring author names in bibliography
natbib=true,
url=false
]{biblatex}

% Use single quotes around titles:
\usepackage[british]{babel}
\usepackage{csquotes}

\DeclareNameAlias{author}{last-first}
\renewcommand*{\mkbibnamefirst}[1]{{\let~\,#1}} % insert thin spaces between author initials
\renewcommand*{\nameyeardelim}{\addcomma\addspace} % insert a comma between author and year in-text citations
\renewcommand*{\newunitpunct}{\addcomma\addspace} % comma as separator in bibliography, not full stop
\setlength\bibitemsep{1.5\itemsep} % increase spacing between entries in bibliography
\renewbibmacro{in:}{} % remove 'in:' preceding article title

% Place volume number within parentheses:
\renewbibmacro*{volume+number+eid}{
    \printfield{volume}
    \setunit*{\addnbspace}% NEW (optional); there's also \addnbthinspace
    \printfield{number}
    \setunit{\addcomma\space}
    \printfield{eid}}
\DeclareFieldFormat[article]{number}{\mkbibparens{#1}}

\begin{filecontents}{\jobname.bib}
@Article{Belshe_2010a,
  Title = {{{E}fficacy of live attenuated influenza vaccine in children against influenza {B} viruses by lineage and antigenic similarity}},
  Author = {Belshe, R. B. and Coelingh, K. and Ambrose, C. S. and Woo, J. C. and Wu, X.},
  Journal = {Vaccine},
  Year = {2010},
  Month = {Feb},
  Note = {[Online]. Available at: \url{example.com} (Accessed: 10 January 2013)},
  Number = {9},
  Pages = {2149--2156},
  Volume = {28},
}

@Article{de-Silva_2012,
  Title = {{{A} comprehensive analysis of reassortment in influenza {A} virus}},
  Author = {de Silva, U. C. and Tanaka, H. and Nakamura, S. and Goto, N. and Yasunaga, T.},
  Journal = {Biol Open},
  Year = {2012},
  Month = {Apr},
  Number = {4},
  Pages = {385--390},
  Volume = {1},
}
\end{filecontents}

\addbibresource{\jobname.bib}
\nocite{*} % print all citations

\begin{document}
    \printbibliography[title=References]
\end{document}

My setup consists of TeXstudio 2.3, TeXlive 2012, and BibLaTeX 1.7-1 on Debian Wheezy, if that affects anything.

Thanking you all in advance,

Baldwin

EDIT: Thanks for your helpful replies everyone. This is the first document in which I've used the BibLaTeX package, so I really appreciate your responses.

7
  • For the space between initials, say \def~{} instead of \let~\, as in the quoted answer. (I consider it bad style to have no space between initials, but it's another matter.)
    – egreg
    Sep 20, 2013 at 13:40
  • 4
    As always, 'Harvard' style simply means author-date. The exact formatting is really down to individual institutions/journals.
    – Joseph Wright
    Sep 20, 2013 at 13:41
  • 2
    biblatex provides field dedicated to the URL (aptly named url) and the access date of that URL (called urldate), you can customise the appearance of those fields (see for example here), but it might be better to use them than just whacking everything into the note (or addendum field).
    – moewe
    Sep 20, 2013 at 14:50
  • 2
    You should not use \renewcommand*{\mkbibnamefirst}[1]{{\let~\,#1}} (\letting integral commands such as ~ is not the best option in most cases), use \renewcommand*{\bibnamedelimd}{\addlpthinspace} instead.
    – moewe
    Sep 20, 2013 at 15:16
  • 1
    @Baldwin You have already received an answer to your original question; if you have further problems, it's better to ask a fresh question, with a link to this one. Maybe the new problem can be tackled as an extension of the given anwswer, maybe not.
    – egreg
    Sep 21, 2013 at 21:53

1 Answer 1

17

Ad 1: \renewcommand*{\bibinitdelim}{} works for me. EDIT: Note that \bibinitdelim requires Biber instead of BibTeX. As this command was added in biblatex 1.3, there's a chance that it works with your distribution (try the backend=biber option); nevertheless consider to upgrade to the current versions of biblatex and Biber.

Ad 2: Use the package option useprefix=true.

Ad 3: \usepackage{xpatch}\xapptobibmacro{date+extrayear}{\nopunct}{}{}.

Ad 4: Use the addendum instead of the note field. EDIT: In the case at hand, follow moewe's advice and use the url and urldate fields.

\documentclass[12pt,a4paper,oneside]{report}

\usepackage{filecontents}
\usepackage[
firstinits=true, % render first and middle names as initials
useprefix=true,
maxcitenames=3,
maxbibnames=99,
style=authoryear,
dashed=false, % re-print recurring author names in bibliography
natbib=true,
url=false
]{biblatex}

\renewcommand*{\bibinitdelim}{}

\usepackage{xpatch}
\xapptobibmacro{date+extrayear}{\nopunct}{}{}

% Use single quotes around titles:
\usepackage[british]{babel}
\usepackage{csquotes}

\DeclareNameAlias{author}{last-first}
\renewcommand*{\mkbibnamefirst}[1]{{\let~\,#1}} % insert thin spaces between author initials
\renewcommand*{\nameyeardelim}{\addcomma\addspace} % insert a comma between author and year in-text citations
\renewcommand*{\newunitpunct}{\addcomma\addspace} % comma as separator in bibliography, not full stop
\setlength\bibitemsep{1.5\itemsep} % increase spacing between entries in bibliography
\renewbibmacro{in:}{} % remove 'in:' preceding article title

% Place volume number within parentheses:
\renewbibmacro*{volume+number+eid}{
    \printfield{volume}
    \setunit*{\addnbspace}% NEW (optional); there's also \addnbthinspace
    \printfield{number}
    \setunit{\addcomma\space}
    \printfield{eid}}
\DeclareFieldFormat[article]{number}{\mkbibparens{#1}}

\begin{filecontents}{\jobname.bib}
@Article{Belshe_2010a,
  Title = {{{E}fficacy of live attenuated influenza vaccine in children against influenza {B} viruses by lineage and antigenic similarity}},
  Author = {Belshe, R. B. and Coelingh, K. and Ambrose, C. S. and Woo, J. C. and Wu, X.},
  Journal = {Vaccine},
  Year = {2010},
  Month = {Feb},
  Addendum = {[Online]. Available at: \url{example.com} (Accessed: 10 January 2013)},
  Number = {9},
  Pages = {2149--2156},
  Volume = {28},
}

@Article{de-Silva_2012,
  Title = {{{A} comprehensive analysis of reassortment in influenza {A} virus}},
  Author = {de Silva, U. C. and Tanaka, H. and Nakamura, S. and Goto, N. and Yasunaga, T.},
  Journal = {Biol Open},
  Year = {2012},
  Month = {Apr},
  Number = {4},
  Pages = {385--390},
  Volume = {1},
}
\end{filecontents}

\addbibresource{\jobname.bib}
\nocite{*} % print all citations

\begin{document}
    \printbibliography[title=References]
\end{document}

enter image description here

6
  • 2
    Shouldn't one use \renewcommand*{\bibnamedelimd}{\addlpthinspace} instead of \renewcommand*{\mkbibnamefirst}[1]{{\let~\,#1}}?
    – moewe
    Sep 20, 2013 at 14:47
  • @moewe Indeed. I dealt with the issues raised by the OP, but didn't peruse the other modifications.
    – lockstep
    Sep 20, 2013 at 15:08
  • Oh, sorry, I guess I better raise this issue in a comment to the question.
    – moewe
    Sep 20, 2013 at 15:14
  • @moewe No problem. And nice to see that another biblatex adept has joined tex.sx.
    – lockstep
    Sep 20, 2013 at 15:17
  • @karlkoeller How can i add a ":" (colon without ") after the year in the Bibliography list followed by the title etc., For example: "Hansmann, K.-W. (2001): Industrielles Management,..........."
    – walterhunk
    Nov 12, 2014 at 17:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .