2

My code is as follows:

I would like to have a : (colon) in between (year) and the (") of the title in references list. i tried using \renewcommand{\labelnamepunct}{\addcolon\space} but it doesn't work !!

<Author><year>: <Title> in: Ed by name1 and name2, place, pp. 1-90

Note: There's a space after the colon.

For example: "Hansmann, K.W. (2001): Industrielles Management,..........."

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

\usepackage{filecontents}
\usepackage[
firstinits=true, % render first and middle names as initials
useprefix=true,
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
\renewcommand{\labelnamepunct}{\addcolon\space}
\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}

Credits to: lockstep and karlkoeller for this code..

  • http://tex.stackexchange.com/questions/28892/colon-instead-of-period-after-author-with-biblatex-alphabetic the question has been answered here?? but it doesn't work for authoryear style..as you can see in my case I have used the same command mentioned in the above link.. also this one here: http://tex.stackexchange.com/questions/186240/replace-period-with-colon-after-year-with-biblatex-to-approximate-ametsoc-guidel .. It didnt work me though.. i dont get it.. !! – walterhunk Nov 12 '14 at 19:25
  • I just removed the following two lines: \usepackage{xpatch} \xapptobibmacro{date+extrayear}{\nopunct}{}{} it worked like charm.. Thanks anyway .. for No one !! :D – walterhunk Nov 12 '14 at 19:43

1 Answers1

1

Just removed the following two lines from the code:

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

Looked here: Colon (:) instead of period (.) after author with biblatex, alphabetic

and here: Replace period with colon after year with biblatex to approximate ametsoc guidelines

It didn't work for me in the first place but.. finally after 3 hrs of work !!