# Bold the last names authors/editors in a biblatex bibliography (but only the ones in front of the title)

I use pdfLaTeX and bibLaTeX with biber as the backend. In my bibliography I want to bold the last names of all authors or editors; but not of the editors of a @collection if the entry is an @incollection. To put it differently, I want all the lastnames of the names that bibliography entries begin with in bold, but not the names that may follow the title of the entry. I found a similar question with solutions: Bold the last name of the first author in a biblatex bibliography.

How can I achieve such a result? As my knowledge of in-depth LaTeX is very limited and I can't change the macros given in the solutions (mentioned above) myself, I hope that somebody has a solution.

This solution is now updated for biblatex >= 3.3, see the edit history for the pre-3.3 version.

I follow my solution to Bold the last name of the first author in a biblatex bibliography, but make all authors bold. The only change is that now always have \renewcommand*{\mkbibnamelast}[1]{\mkbibbold{##1}}, not only on the first name.

\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}}


MWE

\documentclass{article}
\usepackage[style=authoryear,backend=biber]{biblatex}

\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}}

\begin{document}
\cite{sigfridsson,gaonkar:in,brandt}
\printbibliography
\end{document}


If you use a numeric style that does not use sortname you will also need

\DeclareNameAlias{author}{family-given-fb}
\DeclareNameAlias{editor}{family-given-fb}
\DeclareNameAlias{translator}{family-given-fb}