Biblatex 书目:如何使年份加粗并将编辑者放在括号中?

Biblatex 书目:如何使年份加粗并将编辑者放在括号中?

第一个问题,告诉我我做错的所有事情!

所以感谢@moewe (在 biblatex 书目中以粗体显示作者/编辑的姓氏(但仅限于标题前面的姓氏))我的参考书目看起来几乎符合我的要求。还有两件事:

a) 如何将“编辑”备注(在我的德语示例中为“Hrsg.”)放在括号中,而不在名字后面加逗号

b) 如何使年份变为粗体?

现在看起来像:,名字,时薪(年份):[...]

它看起来应该是这样的:, 名字 (Hrsg.) (): [...]

\documentclass[11pt, a4paper, ngerman, headsepline]{scrreprt}

\usepackage[utf8]{inputenc}

\usepackage[T1]{fontenc}

\usepackage[ngerman]{babel}

%biblatex
\usepackage[
backend=biber,
style=authoryear-icomp,
ibidpage=true,
natbib,
ibidtracker=true,
idemtracker=true,
maxbibnames=9,
maxcitenames=2,
dashed=false
]
{biblatex}

\addbibresource{lit_test.bib}

%divide names by slash
\let\oldmultinamedelim\multinamedelim
\let\oldfinalnamedelim\finalnamedelim
\renewcommand*{\multinamedelim}{\addslash}
\renewcommand*{\finalnamedelim}{\addslash}

%last name bold
\DeclareNameAlias{sortname}{family-given-fb}
\DeclareNameFormat{family-given-fb}{%
    \renewcommand*{\mkbibnamefamily}[1]{\mkbibbold{##1}}%
    \ifgiveninits
    {\usebibmacro{name:family-given}
        {\namepartfamily}
        {\namepartgiveni}
        {\namepartprefix}
        {\namepartsuffix}}
    {\usebibmacro{name:family-given}
        {\namepartfamily}
        {\namepartgiven}
        {\namepartprefix}
        {\namepartsuffix}}%
    \usebibmacro{name:andothers}}

%colon insted of period after year
\renewcommand*{\labelnamepunct}{\addcolon\space}

\begin{document}

\cite{Hirsch}

\printbibliography

\end{document}

答案1

将以下宏的重新定义添加authoryear.bbx到你的序言中

a) 部分是稍微现代化的版本步调一致的回答biblatex:如何删除 ed./eds. 之前的逗号?

\makeatletter
\DeclareFieldFormat{editortype}{\mkbibparens{#1}}
\DeclareFieldFormat{parensbold}{\mkbibparens{\mkbibbold{#1}}}
\newbibmacro*{bbx:editor}[1]{%
  \ifboolexpr{
    test \ifuseeditor
    and
    not test {\ifnameundef{editor}}
  }
    {\usebibmacro{bbx:dashcheck}
       {\bibnamedash}
       {\printnames{editor}%
        \setunit{\addspace}%
        \usebibmacro{bbx:savehash}}%
     \usebibmacro{#1}%
     \clearname{editor}%
     \setunit{\printdelim{nameyeardelim}}}%
    {\global\undef\bbx@lasthash
     \usebibmacro{labeltitle}%
     \setunit*{\printdelim{nonameyeardelim}}}%
  \usebibmacro{date+extrayear}}

\renewbibmacro*{date+extrayear}{%
  \iffieldundef{\thefield{datelabelsource}year}
    {}
    {\printtext[parensbold]{%
       \iffieldsequal{year}{\thefield{datelabelsource}year}
         {\printdateextralabel}%
         {\printfield{labelyear}%
          \printfield{extrayear}}}}}%
\makeatother

相关内容