平均能量损失

平均能量损失

我刚刚从 转到biblatexbibtex以下是我的选择biblatex

\usepackage[style=authoryear, giveninits=true,backend=biber, maxcitenames=3,%
            maxbibnames=9, sortcites, url=false, backref=false,]{biblatex} 
\addbibresource{proposal.bib}
\usepackage{babel} % Switch to English style quotation mark, remember to add british to document option
\renewcommand{\labelnamepunct}{\addspace} % Remove dot in the bibliography after Author(year)

\renewbibmacro{in:}{} % Suppress In: in the reference list

%use ":" after year in the in-text citation
\renewcommand*{\postnotedelim}{\addcolon\space}
\DeclareFieldFormat{postnote}{#1}
\DeclareFieldFormat{multipostnote}{#1}

%format pages in the article entry of bibliography 
\renewcommand{\bibpagespunct}{\ifentrytype{article}{\addcolon\addspace} {\addcomma\addspace}}
\DeclareFieldFormat[article,incollection]{pages}{#1}

%format volume và issue

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

以下是@article条目的示例:

@Article{Vanschoenwinkel2016,
  author  = {Vanschoenwinkel, Janka and Mendelsohn, Robert and Van Passel, Steven},
  title   = {Do Western and Eastern Europe have the same agricultural climate response? Taking adaptive capacity into account},
  journal = {Global Environmental Change},
  year    = {2016},
  volume  = {41},
  number  = {7},
  pages   = {74-87},
  issn    = {0959-3780},
  type    = {Journal Article},
}

如果按照上述设置,参考书目中文章条目的格式将是:

Vanschoenwinkel, J.、R. Mendelsohn 和 S. Van Passel (2016) “西欧和东欧对农业气候的反应是否相同?考虑到适应能力” 全球环境变化41 (7): 74-87。

我怎样才能将标题后的点“。”替换为逗号“,”?

答案1

假设这是仅有的参考书目中的标点符号变化,没有内置的方法可以做到这一点。

但是您可以使用该xpatch包来修补每个参考书目驱动程序,将标题的标点符号从句号更改为逗号。例如,为了将其更改为文章条目类型,您可以将其添加到序言中:

\usepackage{xpatch}
\xpatchbibdriver{article}
  {\usebibmacro{title}%
   \newunit}
  {\usebibmacro{title}%
   \printunit{\addcomma\space}}
  {}
  {}

我使用\printunit而不是来\setunit确保逗号保留在标点符号缓冲区中,而不是被后续\newunit命令覆盖。

您可以对其他条目类型执行类似操作。查看文件standard.bbx以了解其他条目类型的标题如何打印,因为略有不同。

在旁边,您的问题被否决(可能是)因为您的代码无法编译。缺少一个括号,并且它不是以 开头\documentclass和结尾的\end{document}。将来,请包含像下面我的一样的 MWE。

平均能量损失

\documentclass{article}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@Article{Vanschoenwinkel2016,
  author  = {Vanschoenwinkel, Janka and Mendelsohn, Robert and Van Passel,
             Steven},
  title   = {Do Western and Eastern Europe have the same agricultural climate
             response? Taking adaptive capacity into account},
  journal = {Global Environmental Change},
  year    = {2016},
  volume  = {41},
  number  = {7},
  pages   = {74-87}
}
\end{filecontents}
\usepackage[style=authoryear, giveninits=true, maxcitenames=3,
            maxbibnames=9, sortcites, url=false, backref=false,]{biblatex} 
\addbibresource{\jobname.bib}
\usepackage[british]{babel}
\usepackage{csquotes}
\renewcommand{\labelnamepunct}{\addspace}
\renewbibmacro{in:}{}
\renewcommand*{\postnotedelim}{\addcolon\space}
\DeclareFieldFormat{postnote}{#1}
\DeclareFieldFormat{multipostnote}{#1}
\renewcommand{\bibpagespunct}{\ifentrytype{article}{\addcolon\addspace
  {\addcomma\addspace}}}
\DeclareFieldFormat[article,incollection]{pages}{#1}
\renewbibmacro*{volume+number+eid}{%
  \printfield{volume}%
  \setunit*{\addnbspace}%
  \printfield{number}%
  \setunit{\addcomma\space}%
  \printfield{eid}}
\DeclareFieldFormat[article]{number}{\mkbibparens{#1}}
\usepackage{xpatch}
\xpatchbibdriver{article}
  {\usebibmacro{title}%
   \newunit}
  {\usebibmacro{title}%
   \printunit{\addcomma\space}}
  {}
  {}
\begin{document}
\nocite{*}
\printbibliography
\end{document}

在此处输入图片描述

相关内容