我已使用此代码更改了参考书目中作者的分隔符。它正在起作用。
\renewcommand*{\multinamedelim}{\addcomma\space}
\renewcommand*{\multilistdelim}{\addcomma\space}
\renewcommand*{\newunitpunct}{\addcomma\space}
但我还在序言中添加了更改顺序和作者姓名的命令。现在逗号分隔符不再显示。
\DeclareNameFormat{lastname}{#1\addspace}
\DeclareNameFormat{last-init}{#1 #4\addspace}
\DeclareNameAlias{sortname}{lastname}
\DeclareNameAlias{default}{lastname}
\DeclareNameAlias{author}{last-init}
\DeclareSortingScheme{last}{
\sort{
\field{presort}
}
\sort[final]{
\field{author}
}
\sort{
\field{title}
\field{year}
}
}
\DeclareStyleSourcemap{
\maps[datatype=bibtex]{
\map{
\step[fieldsource=author, match=\regexp{(.+)\sand}, final]
\step[fieldset=sortname, fieldvalue=$1, final] }
}}
答案1
您对lastname
和的定义last-init
似乎有点可疑,请尝试定义
\DeclareNameFormat{lastname}{%
\usebibmacro{name:last}{#1}{#3}{#5}{#7}%
\usebibmacro{name:andothers}}
\DeclareNameFormat{last-init}{%
\usebibmacro{name:last-first}{#1}{#4}{#5}{#7}%
\usebibmacro{name:andothers}}
反而。
答案2
当我尝试将其作为一个最小示例时,我已经得到了Package keyval error: fieldname undefined
:
\documentclass{article}
\usepackage[backend=biber]{biblatex}
\renewcommand*{\multinamedelim}{\addcomma\space}
\renewcommand*{\multilistdelim}{\addcomma\space}
\renewcommand*{\newunitpunct}{\addcomma\space}
\DeclareNameFormat{lastname}{#1\addspace}
\DeclareNameFormat{last-init}{#1 #4\addspace}
\DeclareNameAlias{sortname}{lastname}
\DeclareNameAlias{default}{lastname}
\DeclareNameAlias{author}{last-init}
\DeclareSortingScheme{last}{
\sort{
\field{presort}
}
\sort[final]{
\field{author}
}
\sort{
\field{title}
\field{year}
}
}
\DeclareStyleSourcemap{
\maps[datatype=bibtex]{
\map{
\step[fieldsource=author, match=\regexp{(.+)\sand}, final]
\step[fieldname=sortname, fieldvalue=$1, final]
}
}
}
\begin{document}
Test
\end{document}
此外,如果我正确解释您的代码,您可能只是想要??
\usepackage[sorting=nty,backend=biber]{biblatex}
\renewcommand{\multinamedelim}{\addcomma\space}
\renewcommand{\multilistdelim}{\addcomma\space}
\renewcommand{\newunitpunct}{\addcomma\space}
\DeclareNameAlias{sortname}{last-first}