Skip to content

Instantly share code, notes, and snippets.

@hensing
Created October 17, 2016 15:38
Show Gist options
  • Save hensing/d0420bb14af9448bd007a37368a35f74 to your computer and use it in GitHub Desktop.
Save hensing/d0420bb14af9448bd007a37368a35f74 to your computer and use it in GitHub Desktop.
Make specific author bold using biblatex
% use boldface for specific author in biblatex bibliography
% http://tex.stackexchange.com/questions/73136/make-specific-author-bold-using-biblatex
%
% usage:
% \input{boldauthorname}
% ...
% \begin{document}
% \boldname{Doe}{John}{J.}
% \printbibliography
% \end{document}
%
% deactivate:
% \boldname{}{}{}
%
\def\makenamesetup{%
\def\bibnamedelima{~}%
\def\bibnamedelimb{ }%
\def\bibnamedelimc{ }%
\def\bibnamedelimd{ }%
\def\bibnamedelimi{ }%
\def\bibinitperiod{.}%
\def\bibinitdelim{~}%
\def\bibinithyphendelim{.-}}
\newcommand*{\makename}[2]{\begingroup\makenamesetup\xdef#1{#2}\endgroup}
\newcommand*{\boldname}[3]{%
\def\lastname{#1}%
\def\firstname{#2}%
\def\firstinit{#3}}
\boldname{}{}{}
% Patch new definitions
\renewcommand{\mkbibnamegiven}[1]{%
\makename{\currname}{#1}%
\makename{\findname}{\firstname}%
\makename{\findinit}{\firstinit}%
\ifboolexpr{ test {\ifdefequal{\currname}{\findname}}%
or test {\ifdefequal{\currname}{\findinit}} }%
{\mkbibbold{#1}}{#1}%
}
\renewcommand{\mkbibnamefamily}[1]{%
\makename{\currname}{#1}%
\makename{\findname}{\lastname}%
\ifboolexpr{ test {\ifdefequal{\currname}{\findname}} }%
{\mkbibbold{#1}}{#1}%
}
@hensing
Copy link
Author

hensing commented Oct 16, 2020

Hey!

Sorry for the late response. I think you should change the order of first and last name of the authors to

author = {Paulicke, Denny and Buhtz, Christian and [...]}

Best regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment