Im using this code from Make specific author bold using biblatex to highlight authors with First Name Last Name and First Name Middle Name Last Name in this way:
\makeatletter
\def\nhblx@bibfile@name{\jobname -nhblx.bib}
\newwrite\nhblx@bibfile
\immediate\openout\nhblx@bibfile=\nhblx@bibfile@name
\immediate\write\nhblx@bibfile{%
@comment{Auto-generated file}\blx@nl}
\newcounter{nhblx@name}
\setcounter{nhblx@name}{0}
\newcommand*{\nhblx@writenametobib}[1]{%
\stepcounter{nhblx@name}%
\edef\nhblx@tmp@nocite{%
\noexpand\AfterPreamble{%
\noexpand\setbox0\noexpand\vbox{%
\noexpand\nhblx@getmethehash{nhblx@name@\the\value{nhblx@name}}}}%
}%
\nhblx@tmp@nocite
\immediate\write\nhblx@bibfile{%
@misc{nhblx@name@\the\value{nhblx@name}, author = {\unexpanded{#1}}, %
options = {dataonly=true},}%
}%
}
\AtEndDocument{%
\closeout\nhblx@bibfile}
\addbibresource{\nhblx@bibfile@name}
\newcommand*{\nhblx@boldhashes}{}
\DeclareNameFormat{nhblx@hashextract}{%
\xifinlist{\thefield{hash}}{\nhblx@boldhashes}
{}
{\listxadd{\nhblx@boldhashes}{\thefield{hash}}}}
\DeclareCiteCommand{\nhblx@getmethehash}
{}
{\printnames[nhblx@hashextract][1-999]{author}}
{}
{}
\newcommand{\addboldnames}{\forcsvlist\nhblx@writenametobib}
\newcommand{\resetboldnames}{\def\nhblx@boldhashes{}}
\newcommand*{\mkboldifhashinlist}[1]{%
\xifinlist{\thefield{hash}}{\nhblx@boldhashes}
{\mkbibbold{#1}}
{#1}}
\makeatother
\DeclareNameWrapperFormat{boldifhashinlist}{%
\renewcommand*{\mkbibcompletename}{\mkboldifhashinlist}%
#1}
\DeclareNameWrapperAlias{sortname}{default}
\DeclareNameWrapperAlias{default}{boldifhashinlist}
\resetboldnames\addboldnames{{Pedro Filipe Oliveira}, {Pedro Oliveira}}
\bibliography{info_extra_files/PFO_Publications}
The highlight is correct, but at references the first two publications printed are the boldnames defined before, like you can see in the picture attached.
The complete code is: main.tex
\documentclass[portuguese,a4paper,nologo]{europasscv}
\usepackage[utf8]{inputenc}
\usepackage[backend=bibtex,autolang=hyphen,sorting=none,style=numeric,maxbibnames=99,doi=true,isbn=false,maxcitenames=2]{biblatex}
\usepackage{csquotes}
\usepackage{europasscv-bibliography}
\makeatletter
\def\nhblx@bibfile@name{\jobname -nhblx.bib}
\newwrite\nhblx@bibfile
\immediate\openout\nhblx@bibfile=\nhblx@bibfile@name
\immediate\write\nhblx@bibfile{%
@comment{Auto-generated file}\blx@nl}
\newcounter{nhblx@name}
\setcounter{nhblx@name}{0}
\newcommand*{\nhblx@writenametobib}[1]{%
\stepcounter{nhblx@name}%
\edef\nhblx@tmp@nocite{%
\noexpand\AfterPreamble{%
\noexpand\setbox0\noexpand\vbox{%
\noexpand\nhblx@getmethehash{nhblx@name@\the\value{nhblx@name}}}}%
}%
\nhblx@tmp@nocite
\immediate\write\nhblx@bibfile{%
@misc{nhblx@name@\the\value{nhblx@name}, author = {\unexpanded{#1}}, %
options = {dataonly=true},}%
}%
}
\AtEndDocument{%
\closeout\nhblx@bibfile}
\addbibresource{\nhblx@bibfile@name}
\newcommand*{\nhblx@boldhashes}{}
\DeclareNameFormat{nhblx@hashextract}{%
\xifinlist{\thefield{hash}}{\nhblx@boldhashes}
{}
{\listxadd{\nhblx@boldhashes}{\thefield{hash}}}}
\DeclareCiteCommand{\nhblx@getmethehash}
{}
{\printnames[nhblx@hashextract][1-999]{author}}
{}
{}
\newcommand{\addboldnames}{\forcsvlist\nhblx@writenametobib}
\newcommand{\resetboldnames}{\def\nhblx@boldhashes{}}
\newcommand*{\mkboldifhashinlist}[1]{%
\xifinlist{\thefield{hash}}{\nhblx@boldhashes}
{\mkbibbold{#1}}
{#1}}
\makeatother
\DeclareNameWrapperFormat{boldifhashinlist}{%
\renewcommand*{\mkbibcompletename}{\mkboldifhashinlist}%
#1}
\DeclareNameWrapperAlias{sortname}{default}
\DeclareNameWrapperAlias{default}{boldifhashinlist}
\resetboldnames\addboldnames{{Pedro Filipe Oliveira}, {Pedro Oliveira}}
\bibliography{PFO_Publications}
\begin{document}
\begin{europasscv}
\section{Introduction}
\nocite{*}
\renewcommand{\section}[2]{\ecvsection{#2}}
\printbibtabular[title=Publicações]
\end{europasscv}
\end{document}
PFO_Publications.bib
@article{oliveira2016blegen,
title={BLEGen—a code generator for bluetooth low energy services},
author={Oliveira, Pedro Filipe and Matos, Paulo},
journal={Lecture Notes on Software Engineering},
volume={4},
number={1},
pages={7--11},
year={2016},
publisher={Lecture Notes on Software Engineering}
}
@inproceedings{oliveira2016behaviour,
title={Behaviour analysis in smart spaces},
author={Oliveira, Pedro and Matos, Paulo and Novais, Paulo},
booktitle={2016 Intl IEEE Conferences on Ubiquitous Intelligence & Computing, Advanced and Trusted Computing, Scalable Computing and Communications, Cloud and Big Data Computing, Internet of People, and Smart World Congress (UIC/ATC/ScalCom/CBDCom/IoP/SmartWorld)},
pages={880--887},
year={2016},
organization={IEEE}
}
@inproceedings{oliveira2017challenges,
title={Challenges in smart spaces: aware of users, preferences, behaviours and habits},
author={Oliveira, Pedro and Novais, Paulo and Matos, Paulo},
booktitle={International Conference on Practical Applications of Agents and Multi-Agent Systems},
pages={268--271},
year={2017},
organization={Springer, Cham}
}


\documentclassalong with\begin{document}...\end{document}. Please make sure to include everything needed to compile the file. Test that the code can be run in a new empty folder. See https://tex.meta.stackexchange.com/q/228/35864 – moewe Jan 09 '21 at 20:22