Biblatex 书目中的作者标点符号

Biblatex 书目中的作者标点符号

我想删除参考书目中作者名字和姓氏之间的逗号。结果如下:

Vincent C、Amalberti R. (2015) LaTeX 效果非常好。英国医学杂志25(1):370-81

相反,我得到的是:

Vincent, C, Amalberti, R. (2015) LaTeX 效果非常好。英国医学杂志25(1),370-81

我已经尝试过\renewcommand*{\revsdnamepunct}{}(按照建议biblatex:删除参考书目中姓氏和名字之间的逗号),但没有成功。

我的其他代码是否发生冲突?感谢您的建议。

    \documentclass[11pt,a4paper,twoside,openright]{book}
    \usepackage[T1]{fontenc}
    \usepackage[utf8]{inputenc}
    \usepackage{lmodern}
    \usepackage[english]{babel}
    \usepackage[autostyle]{csquotes}

    \usepackage[backend=biber,style=apa,natbib,
    uniquename=false,
    uniquelist=false,
    firstinits=true,
    terseinits=true,
    dashed=false
    sorting=nyt,
    backref=true,
    hyperref=auto,
    isbn=false,
    url=false,
    eprint=false,
    doi=false]{biblatex}

    % Omit commas in reversed names
    \renewcommand*{\revsdnamepunct}{}

    % All names reversed
    \DeclareNameAlias{default}{last-first}
    \DeclareNameAlias{sortname}{last-first}

    % Remove full stop after year
    \renewcommand{\labelnamepunct}{\addspace}

    % Omit "and" from last author
    \AtBeginBibliography{%
      \renewcommand*{\finalnamedelim}{\addcomma\space}%
    }

    \DeclareLanguageMapping{english}{english-apa}

    % Make article title a hyperlink to the DOI
    \newbibmacro{string+doi}[1]{%
      \iffieldundef{doi}{#1}{\href{http://dx.doi.org/\thefield{doi}}{#1}}}
    \DeclareFieldFormat{title}{\usebibmacro{string+doi}{\mkbibemph{#1}}}
    \DeclareFieldFormat[article]{title}{\usebibmacro{string+doi}{#1}}

    \AtEveryBibitem{%
      \clearname{translator}%
      \clearlist{publisher}%
      \clearfield{pagetotal}%
      \clearfield{note}%
    }

     % no "In: " preceding journal titles
    \renewbibmacro{in:}{%
      \ifentrytype{article}{}{\printtext{\bibstring{in}\intitlepunct}}}

     \addbibresource{LaTexbibliography.bib}

    \begin{document}

      This is where I \parencite{Vincent2015}.

     \printbibliography
       \end{document}

答案1

强制性的“我们正在修改biblatex-apa”警告:以下内容可能会以某种方式改变行为,biblatex-apa使输出可能不再符合 APA 样式。 biblatex-apa专门设计为尽可能紧密地遵循 APA 样式,因此一些(据称)简单的修改可能需要比预期更多的代码。

首先请注意,它biblatex-apa具有非常特殊的名称格式,并且您的两行

% All names reversed
\DeclareNameAlias{default}{last-first}
\DeclareNameAlias{sortname}{last-first}

没做什么。

负责名称的宏name:apa:last-first(将在未来的版本中重命名)不使用\revsdnamepunct,那里的分隔符是硬编码的。您需要直接转到源代码并在那里修改宏。

\renewbibmacro*{name:apa:last-first}[5]{%
  \ifuseprefix
    {\usebibmacro{name:delim}{#4#1}%
     \usebibmacro{name:hook}{#4#1}%
     \ifblank{#4}{}{%
       \mkbibnameprefix{#4}%
       \ifpunctmark{'}{}{\addhighpenspace}}%
     \mkbibnamelast{#1\isdot}%
     \ifblank{#2}{}{\revsdnamepunct\bibnamedelimd\mkbibnamefirst{#3}\isdot%
                    \ifthenelse{\value{uniquename}>1}
                      {\addspace\mkbibbrackets{#2}}
                      {}}%
     \ifblank{#5}{}{\addcomma\bibnamedelimd\mkbibnameaffix{#5}\isdot}}
    {\usebibmacro{name:delim}{#1}%
     \usebibmacro{name:hook}{#1}%
     \mkbibnamelast{#1}\isdot
     \ifblank{#2#4}{}{\revsdnamepunct}%
     \ifblank{#2}{}{\bibnamedelimd\mkbibnamefirst{#3}%
                    \ifthenelse{\value{uniquename}>1}
                      {\addspace\mkbibbrackets{#2}}
                      {}}%
     \ifblank{#4}{}{%
       \addhighpenspace\mkbibnameprefix{#4}%
       \ifpunctmark{'}{}{\addhighpenspace}}%
     \ifblank{#5}{}{\addcomma\addlowpenspace\mkbibnameaffix{#5}\isdot}}}

您恢复了使用的能力\revsdnamepunct,因此\renewcommand*{\revsdnamepunct}{}现在可以按预期工作。

平均能量损失

\documentclass[english]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage{babel}
\usepackage[autostyle]{csquotes}

\usepackage[backend=biber,style=apa,
  uniquename=false,
  uniquelist=false,
  firstinits=true,
  terseinits=true,]{biblatex}

\DeclareLanguageMapping{english}{english-apa}

\addbibresource{biblatex-examples.bib}

% Omit commas in reversed names
\renewcommand*{\revsdnamepunct}{}

\renewbibmacro*{name:apa:last-first}[5]{%
  \ifuseprefix
    {\usebibmacro{name:delim}{#4#1}%
     \usebibmacro{name:hook}{#4#1}%
     \ifblank{#4}{}{%
       \mkbibnameprefix{#4}%
       \ifpunctmark{'}{}{\addhighpenspace}}%
     \mkbibnamelast{#1\isdot}%
     \ifblank{#2}{}{\revsdnamepunct\bibnamedelimd\mkbibnamefirst{#3}\isdot%
                    \ifthenelse{\value{uniquename}>1}
                      {\addspace\mkbibbrackets{#2}}
                      {}}%
     \ifblank{#5}{}{\addcomma\bibnamedelimd\mkbibnameaffix{#5}\isdot}}
    {\usebibmacro{name:delim}{#1}%
     \usebibmacro{name:hook}{#1}%
     \mkbibnamelast{#1}\isdot
     \ifblank{#2#4}{}{\revsdnamepunct}%
     \ifblank{#2}{}{\bibnamedelimd\mkbibnamefirst{#3}%
                    \ifthenelse{\value{uniquename}>1}
                      {\addspace\mkbibbrackets{#2}}
                      {}}%
     \ifblank{#4}{}{%
       \addhighpenspace\mkbibnameprefix{#4}%
       \ifpunctmark{'}{}{\addhighpenspace}}%
     \ifblank{#5}{}{\addcomma\addlowpenspace\mkbibnameaffix{#5}\isdot}}}

\begin{document}
\nocite{sigfridsson,geer,worman}.
\printbibliography
\end{document}

mwe 输出

相关内容