在参考书目中,我想反转最后一位作者的名字。我使用 biblatex 和 authoryear-comp 样式。目前,我得到的要么是
Bloggs, F., J. Doe und M. Mustermann
默认或
Bloggs, F., Doe, J. und Mustermann, M.
使用
\DeclareNameAlias{sortname}{last-first}
但是,我需要它看起来像这样:
Bloggs, F., Doe, J. und M. Mustermann
有什么命令我可以用来实现这一点吗?
答案1
假设你总是希望姓氏given-family
和所有其他名字都包含在内family-given
- 除非只有一个名字,在这种情况下你family-given
无论如何都想要这个名字 - 使用
\DeclareNameFormat{family-given/given-family/last}{%
\ifboolexpr{test {\ifnumless{\value{listcount}}{\value{listtotal}}} or test {\ifnumequal{\value{listcount}}{1}}}
{\ifgiveninits
{\usebibmacro{name:family-given}
{\namepartfamily}
{\namepartgiveni}
{\namepartprefix}
{\namepartsuffix}}
{\usebibmacro{name:family-given}
{\namepartfamily}
{\namepartgiven}
{\namepartprefix}
{\namepartsuffix}}%
\ifboolexpe{%
test {\ifdefvoid\namepartgiven}
and
test {\ifdefvoid\namepartprefix}}
{}
{\usebibmacro{name:revsdelim}}}
{\ifgiveninits
{\usebibmacro{name:given-family}
{\namepartfamily}
{\namepartgiveni}
{\namepartprefix}
{\namepartsuffix}}
{\usebibmacro{name:given-family}
{\namepartfamily}
{\namepartgiven}
{\namepartprefix}
{\namepartsuffix}}}%
\usebibmacro{name:andothers}}
\DeclareNameAlias{sortname}{family-given/given-family/last}