下面是我的序言文件源代码的一部分:
\usepackage[natbib=true, backend=biber, style=authoryear, dashed=false]{biblatex}
\setlength{\bibitemsep}{18pt}
\setlength{\bibhang}{0.2cm}
\DeclareNameAlias{sortname}{last-first}
\AtBeginBibliography{%
\renewcommand*{\multinamedelim}{\addsemicolon\space}%
\renewcommand*{\finalnamedelim}{\addsemicolon\space}%
}
\DefineBibliographyStrings{ngerman}{%
andothers = {et\addspace al\adddotspace},%
andmore = {et\addspace al\adddotspace},%
}
\usepackage{xpatch}
\xpretobibmacro{author}{\mkbibbold\bgroup}{}{}
\xapptobibmacro{author}{\egroup}{}{}
\xpretobibmacro{bbx:editor}{\mkbibbold\bgroup}{}{}
\xapptobibmacro{bbx:editor}{\egroup}{}{}
\renewcommand*{\labelnamepunct}{\mkbibbold{\addcolon\space}}
答案1
更新
为了方便在参考书目中加粗作者,只需使用
\DeclareNameWrapperFormat{sortname}{\mkbibbold{#1}}
不需要xpatch
和朋友。
旧答案
使用
\usepackage{xpatch}
\def\bmkbibbold#1\emkbibbold{\mkbibbold{#1}}
\xpretobibmacro{author}{\bmkbibbold}{}{}
\xpatchbibmacro{author}
{\usebibmacro{date+extradate}}
{\emkbibbold\usebibmacro{date+extradate}}
{}{}
\xpretobibmacro{bbx:editor}{\bmkbibbold}{}{}
\xpatchbibmacro{bbx:editor}
{\usebibmacro{date+extradate}}
{\emkbibbold\usebibmacro{date+extradate}}
{}{}
\xpretobibmacro{bbx:translator}{\bmkbibbold}{}{}
\xpatchbibmacro{bbx:translator}
{\usebibmacro{date+extradate}}
{\emkbibbold\usebibmacro{date+extradate}}
{}{}
\DeclareDelimFormat[bib,biblist]{nametitledelim}{\addcolon\space}
这将使年份不加粗,也为译者做了正确的事情。带分隔参数的宏可能有点冒险,因此一般来说,应该优先考虑正确使用分组的解决方案。不幸的是,biblatex
的字体命令都是宏,而不是开关。