在参考文献列表中的(年份)和(标题)之间插入冒号:作者年份样式

在参考文献列表中的(年份)和(标题)之间插入冒号:作者年份样式

我的代码如下:

我希望在参考文献列表中的 (年份) 和标题的 (") 之间有一个 : (冒号)。我试过使用,\renewcommand{\labelnamepunct}{\addcolon\space}但没有用!!

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

注意:冒号后面有一个空格。

例如: ” 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}

感谢:lockstep 和 karlkoeller 提供此代码。

答案1

只需从代码中删除以下两行:

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

看这里:使用 biblatex、字母表的作者后使用冒号 (:) 代替句号 (.)

和这里:使用 biblatex 将年份后的句点替换为冒号,以接近 ametsoc 指南

它一开始对我来说不起作用,但是..经过 3 个小时的工作最终成功了!!

相关内容