使用 biblatex 的哈佛风格书目......差不多,但不完全!

使用 biblatex 的哈佛风格书目......差不多,但不完全!

我的大学要求所有提交的参考文献都使用哈佛格式。我知道 BibLaTeX 如果不进行一些调整,无法直接支持该格式。

我昨天晚上花了很多时间研究如何做到这一点,并且我已经几乎设法让 BibLaTeX 以所需格式输出我的参考书目。以下是当前输出的示例:

哈佛书目示例

然而,仍有一些问题尚未解决。

  1. 作者的首字母和中间字母之间不应有空格,即Doe, J.D.不是Doe, J. D.。我尝试使用\renewcommand*{\bibinitdelim}{}建议的这里,但它不起作用。我最接近的解决方案是插入一个细小的空间,如此回复

  2. 第一作者应列为de Silva, U.C.,而不是Silva, U.C. de

  3. 出版年份在括号后不应该有句号,即(2011)不是(2011),

  4. 一些书目条目需要使用note条目末尾的字段附加其他信息(例如访问日期、来源是否在线等)。但是,当前设置导致note文章字段夹在卷号和页码之间,而不是在页码之后,如下所示:

biblatex 注释字段

有人知道如何解决这些格式问题吗?

以下是我目前所采用的设置:

\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}

我的设置包括 Debian Wheezy 上的 TeXstudio 2.3、TeXlive 2012 和 BibLaTeX 1.7-1,如果这会影响任何东西的话。

提前感谢大家,

鲍德温

编辑:感谢大家的帮助性回复。这是我第一次使用 BibLaTeX 包处理文档,因此非常感谢大家的回复。

答案1

广告 1:\renewcommand*{\bibinitdelim}{}对我有用。编辑:请注意,\bibinitdelim需要 Biber 而不是 BibTeX。由于此命令是在biblatex1.3 中添加的,因此它有可能适用于您的发行版(尝试该backend=biber选项);不过,请考虑升级到当前版本的biblatexBiber。

广告2:使用包装选项useprefix=true

广告3 \usepackage{xpatch}\xapptobibmacro{date+extrayear}{\nopunct}{}{}:。

广告 4:使用addendum代替 字段note。编辑:在当前情况下,请遵循 moewe 的建议并使用urlurldate字段。

\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}

在此处输入图片描述

相关内容