我在 Biblatex 中使用style = authoryear
,我想将所有作者姓名(包括连词“and”)都加粗。我使用了以下命令
\renewcommand{\mkbibnamefirst}[1]{\textbf{#1}}
\renewcommand{\mkbibnamelast}[1]{\textbf{#1}}
然而,这只会使作者姓名加粗,而不会使“and”连词加粗,所以我得到了这样的结果
我怎样才能使作者字段中的“and”和逗号变为粗体?
答案1
此答案来自以下邮政。
\DeclareNameFormat{last-first/first-last-bold}{\mkbibbold{%
\ifnumequal{\value{listcount}}{1}
{\iffirstinits
{\usebibmacro{name:last-first}{#1}{#4}{#5}{#7}}
{\usebibmacro{name:last-first}{#1}{#3}{#5}{#7}}%
\ifblank{#3#5}
{}
{\usebibmacro{name:revsdelim}}}
{\iffirstinits
{\usebibmacro{name:first-last}{#1}{#4}{#5}{#7}}
{\usebibmacro{name:first-last}{#1}{#3}{#5}{#7}}}%
\usebibmacro{name:andothers}}}
\DeclareNameAlias{sortname}{last-first/first-last-bold}