The solution proposed is the discussion Make a specific author bold using biblatex, does not work properly when using "french" language with the babel package. I suppose that french option in babel over write the given name format produced by biblatex. Is there a solution ?
This problem can be reproduced with the code below. I'am using the last updated version of biblatex (v3.10) and babel (v3.17).
Is there a way of extending this code to highlight in the same reference some author's name in bold and some other author's name with underline font ?
% !TeX TXS-program:bibliography = txs:///biber
\documentclass{article}
%\usepackage[french]{babel}
\usepackage{xpatch}
\usepackage[backend=biber,maxbibnames=99,defernumbers=true,sorting=ydnt,giveninits=true]{biblatex}
\begin{filecontents}{\jobname.bib}
@InProceedings{identifier1,
Title = {Some Awesome Title},
Author = {Some Author and Another Author},
AUTHOR+an = {1=gras},
Booktitle = {Some Book about the Future},
Year = {2042},
Pages = {1--42}
}
@InProceedings{identifier2,
Title = {Some So-So Title},
Author = {First Author and Second Author},
Booktitle = {An okay Booktitle},
Year = {2000},
Pages = {1--100}
}
\end{filecontents}
\addbibresource{\jobname.bib}
%% Other alternative which don't work.
%\renewcommand*{\mkbibnamegiven}[1]{%
% \ifitemannotation{gras}
% {\textbf{#1}}
% {#1}}
%
%\renewcommand*{\mkbibnamefamily}[1]{%
% \ifitemannotation{gras}
% {\textbf{#1}}
% {#1}}
\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}%
}
\boldname{Author}{Some}{S.}
\begin{document}
Examples :
\nocite{*}
\printbibliography
\end{document}

