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:
However, a few issues still remain unresolved.
There should be no spacing between the first and middle initials of authors, i.e.
Doe, J.D.
notDoe, 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.The first author should be listed as
de Silva, U.C.
, notSilva, U.C. de
.The year of publication should not have a full stop after the parentheses, i.e.
(2011)
, not(2011),
.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 thenote
field for articles to be sandwiched between the volume number and page numbers, rather than after the page numbers, as shown below:
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.
\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.)biblatex
provides field dedicated to the URL (aptly namedurl
) and the access date of that URL (calledurldate
), 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 thenote
(oraddendum
field).\renewcommand*{\mkbibnamefirst}[1]{{\let~\,#1}}
(\let
ting integral commands such as~
is not the best option in most cases), use\renewcommand*{\bibnamedelimd}{\addlpthinspace}
instead.