I am trying to change the et~al. that appears in the bibliography in the case that inside the extra (et~al) authors there is an author that I am trying to make bold in the bibliography using the answer of @LawrenceCrosby here
My code is:
\documentclass{article}
\usepackage{filecontents}
\begin{filecontents}{MyBibliography.bib}
@article{cite1,
author={Konstantinos Leledakis},
title={An Article},
year={2019},
journal={Some Journal}
}
@article{cite2,
author={Another Author and Konstantinos Leledakis},
title={A Book},
year={2017},
journal={A publisher}
}
@book{cite3,
author={Another SomeAuthor and One AnotherAuthor and SomeOther UnKnownAuthor and Konstantinos Leledakis},
title={A Book},
year={1988},
publisher={Someone}
}
@book{cite4,
author={Another Author and An UnknownAuthor and SomeOther UnKnownAuthor},
title={A Book},
year={2015},
publisher={A publisher}
}
\end{filecontents}
\usepackage[english]{babel}
\usepackage{csquotes}
\usepackage[style=authoryear-comp,maxnames=2, minnames=2]{biblatex}
\usepackage{etoolbox}
\DefineBibliographyStrings{english}{andothers={\ifthenelse{\boolean{bold}}{et~al(including Leledakis, K.)}{et~al}\adddot}}
\newboolean{bold}
\newcommand{\makeauthorbold}[1]{%
\setboolean{bold}{false}
\DeclareNameFormat{author}{%
\ifthenelse{\value{listcount}=1}
{%
{\expandafter\ifstrequal\expandafter{\namepartfamily}{#1}{\setboolean{bold}{true}\mkbibbold{\namepartfamily\addcomma\addspace \namepartgiveni}}{\namepartfamily\addcomma\addspace \namepartgiveni}}
%
}{\ifnumless{\value{listcount}}{\value{liststop}}
{\expandafter\ifstrequal\expandafter{\namepartfamily}{#1}{\setboolean{bold}{true}\mkbibbold{\addcomma\addspace \namepartfamily\addcomma\addspace \namepartgiveni}}{\addcomma\addspace \namepartfamily\addcomma\addspace \namepartgiveni}}
{\expandafter\ifstrequal\expandafter{\namepartfamily}{#1}{\setboolean{bold}{true}\mkbibbold{\addcomma\addspace \namepartfamily\addcomma\addspace \namepartgiveni\addcomma\isdot}}{\addcomma\addspace \namepartfamily\addcomma\addspace \namepartgiveni\addcomma\isdot}}%
}
\ifthenelse{\value{listcount}<\value{liststop}}
{\addcomma\space}
}
}
%\makeauthorbold{Leledakis}
\DefineBibliographyStrings{english}{andothers={et~al}} % To translate "et al."
\ExecuteBibliographyOptions{firstinits=true, uniquename=init}
\addbibresource{MyBibliography.bib}
\renewcommand*{\nameyeardelim}{\addcomma\addspace} % Should add the comma, but somehow doesn't work
\begin{document}
\nocite{*}
\printbibliography
\end{document}
This has two problems:
- If I comment in (I mean enable) the commented out command
%\makeauthorbold{Leledakis}and enable it. Te result from:
(that contains some et~al).becomes:
Where the name is already highlighted but the et~al. part is missing at all.
PS: I tested the code without my changes too, but it still misses the et. al. part.


