I have been using a snipet for making a specific authors name bold in the bibliography (see \newcommand below). It works very well, but it changes the style of the author from the default way (which I prefer, see image below). My problem is, that the command is rather complicated, and I don't really understand what happens there. I would really appreciate if someone could explain to me how to change the format back to the prefered and why that way, so I could actually understand the code (or is there a simpler way to achieve this bolding than the code below?).
Update
Added extra authors, notice that only the selected author (Strombom) is highlighted
MWEB
\documentclass{article}
\usepackage[defernumbers=true,sorting=none,backend=biber,maxnames=10]{biblatex}
\addbibresource{\jobname.bib}
\usepackage{filecontents}
\newcommand{\makeauthorbold}[1]{%
\DeclareNameFormat{author}{%
\edef\tempname{{#1}}%
\ifnumequal{\value{listcount}}{1}
{\ifnumequal{\value{liststop}}{1}
{\expandafter\ifstrequal\tempname{##1}{\textbf{##1\addcomma\addspace ##4\addcomma\isdot}}{##1\addcomma\addspace ##4\addcomma\isdot}}
{\expandafter\ifstrequal\tempname{##1}{\textbf{##1\addcomma\addspace ##4}}{##1\addcomma\addspace ##4}}}
{\ifnumless{\value{listcount}}{\value{liststop}}
{\expandafter\ifstrequal\tempname{##1}{\textbf{\addcomma\addspace ##1\addcomma\addspace ##4}}{\addcomma\addspace ##1\addcomma\addspace ##4}}
{\expandafter\ifstrequal\tempname{##1}{\textbf{\addcomma\addspace ##1\addcomma\addspace ##4\addcomma\isdot}}{\addcomma\addspace ##1\addcomma\addspace ##4\addcomma\isdot}}%
}%
}%
}
\begin{filecontents}{\jobname.bib}
@article{Perunov,
author = {Perunov, Nikolay and Marsland, Robert A and England, Jeremy L},
doi = {10.1103/PhysRevX.6.021036},
keywords = {Biological Physics,Complex Systems,Statistical Physics,Subject Areas},
mendeley-groups = {dissertation},
title = {{Statistical Physics of Adaptation}},
url = {https://journals.aps.org/prx/pdf/10.1103/PhysRevX.6.021036}
}
@article{Strombom2011,
author = {Strombom, Daniel and Random, Author2 and Familyname, Givenname},
doi = {10.1016/j.jtbi.2011.05.019},
journal = {Journal of Theoretical Biology},
mendeley-groups = {dissertation},
month = {aug},
number = {1},
pages = {145--151},
title = {{Collective motion from local attraction}},
url = {http://linkinghub.elsevier.com/retrieve/pii/S002251931100261X},
volume = {283},
year = {2011},
keywords = "nourl"
}
@article{Gell-Mann1995,
author = {Gell-Mann, Murray and Random, Author2 and Familyname, Givenname},
doi = {10.1002/cplx.6130010105},
journal = {Complexity},
mendeley-groups = {dissertation},
month = {sep},
number = {1},
pages = {16--19},
publisher = {Wiley Subscription Services, Inc., A Wiley Company},
title = {{What is complexity?}},
url = {http://doi.wiley.com/10.1002/cplx.6130010105},
volume = {1},
year = {1995},
keywords = "nourl"
}
\end{filecontents}
\begin{document}
\nocite{*}
{
\makeauthorbold{Strombom}
\printbibliography[title={bad author},heading=subbibliography,keyword=nourl]
}
\printbibliography[title={good author},heading=subbibliography,notkeyword=nourl]
\end{document}
compile
lualatex mweb.tex && biber mweb && lualatex mweb.tex
I compiled this with the above command.
$ lualatex --v
This is LuaTeX, Version beta-0.80.0 (TeX Live 2015) (rev 5238)


! Illegal parameter number in definition of \blx@defformat@d.– Skillmon Jul 21 '17 at 22:11biblatexin the edit history). – moewe Jul 22 '17 at 07:40