I'm trying to implement the author highlighting provided here:
Make one author's name bold every time it shows up in the bibliography
The solution works fine until i activate the apa style for biblatex. Heres my code:
\documentclass{article}
\usepackage[english,ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage[
babel,
german=quotes
]{csquotes}
\usepackage[
backend=biber,
%style=apa, %<===========uncomment me!!
sortcites=true,
sorting=nyt,
hyperref=true,
backref=true,
alldates=iso8601
]{biblatex}
\begin{filecontents}{\jobname.bib}
@article{zongker_chicken_2006,
title = {Chicken chicken chicken: Chicken chicken},
volume = {12},
url = {http://www.superfrink.net/athenaeum/dougz.pdf},
shorttitle = {Chicken chicken chicken},
pages = {16--21},
number = {5},
journaltitle = {Annals of Improbable Research},
author = {Zongker, Doug},
urldate = {2013-04-05},
date = {2006}
}
@article{zongker_chicken_2007,
title = {Chicken chicken chicken: Chicken chicken},
volume = {12},
url = {http://www.superfrink.net/athenaeum/dougz.pdf},
shorttitle = {Chicken chicken chicken},
pages = {16--21},
number = {5},
journaltitle = {Annals of Improbable Research},
author = {OhterZongker, Doug},
urldate = {2013-04-05},
date = {2007}
}
\end{filecontents}
\addbibresource{\jobname.bib}
\DeclareLanguageMapping{ngerman}{ngerman-apa}
% https://tex.stackexchange.com/a/211821/48182
\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}}%
}%
}%
}
\makeauthorbold{Zongker}
\begin{document}
\fullcite{zongker_chicken_2006}
\fullcite{zongker_chicken_2007}
\end{document}
Heres the different output without style=apa
with style=apa
Why doesn't my command overwrite the apa style ?