![biblatex:删除参考书目中姓氏和名字之间的逗号](https://linux22.com/image/236924/biblatex%EF%BC%9A%E5%88%A0%E9%99%A4%E5%8F%82%E8%80%83%E4%B9%A6%E7%9B%AE%E4%B8%AD%E5%A7%93%E6%B0%8F%E5%92%8C%E5%90%8D%E5%AD%97%E4%B9%8B%E9%97%B4%E7%9A%84%E9%80%97%E5%8F%B7.png)
我是 的新手biblatex
,我需要创建一个参考书目,其中包含作者姓名(姓氏后跟纯首字母)。使用style=numeric
、firstinits
和terseinits
选项以及:
\DeclareNameAlias{author}{last-first}
我列出了如下名单:
Doe,J、Smith,K 和 Doe,W”
如何删除姓氏和名字首字母之间的逗号?
答案1
编辑:自biblatex
v2.2 起,人们可以简单地\renewcommand*{\revsdnamepunct}{}
在文档序言中发出该指令。
\documentclass{article}
\usepackage[firstinits=true,terseinits=true]{biblatex}
\DeclareNameAlias{default}{last-first}
\renewcommand*{\revsdnamepunct}{}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@misc{A01,
author = {Author, Aaa and Buthor, Bbb and Cuthor, Ccc},
year = {2001},
title = {Alpha},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\nocite{*}
\begin{document}
\printbibliography
\end{document}
原始答案:重新定义 bibmacro name:last-first
。
\documentclass{article}
\usepackage[firstinits=true,terseinits=true]{biblatex}
\DeclareNameAlias{default}{last-first}
\renewbibmacro*{name:last-first}[4]{%
\ifuseprefix
{\usebibmacro{name:delim}{#3#1}%
\usebibmacro{name:hook}{#3#1}%
\ifblank{#3}{}{%
\ifcapital
{\mkbibnameprefix{\MakeCapital{#3}}\isdot}
{\mkbibnameprefix{#3}\isdot}%
\ifpunctmark{'}{}{\bibnamedelimc}}%
\mkbibnamelast{#1}\isdot
\ifblank{#4}{}{\bibnamedelimd\mkbibnameaffix{#4}\isdot}%
% \ifblank{#2}{}{\addcomma\bibnamedelimd\mkbibnamefirst{#2}\isdot}}% DELETED
\ifblank{#2}{}{\bibnamedelimd\mkbibnamefirst{#2}\isdot}}% NEW
{\usebibmacro{name:delim}{#1}%
\usebibmacro{name:hook}{#1}%
\mkbibnamelast{#1}\isdot
\ifblank{#4}{}{\bibnamedelimd\mkbibnameaffix{#4}\isdot}%
% \ifblank{#2#3}{}{\addcomma}% DELETED
\ifblank{#2}{}{\bibnamedelimd\mkbibnamefirst{#2}\isdot}%
\ifblank{#3}{}{\bibnamedelimd\mkbibnameprefix{#3}\isdot}}}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@misc{A01,
author = {Author, Aaa and Buthor, Bbb and Cuthor, Ccc},
year = {2001},
title = {Alpha},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\nocite{*}
\begin{document}
\printbibliography
\end{document}
答案2
您\bibliographystyle{Vancouver}
也可以使用删除逗号