I'm trying to bold my name in a publication list. After an embarrassing amount of time/experimentation I have something I'm happy with via etoolbox and xstring:
\renewcommand{\mkbibnamegiven}[1]{\ifboolexpr{(test {\IfSubStr{\namepartfamily}{Knowles}} and (test {\IfSubStr{\namepartgiven}{David}})}{\mkbibbold{#1}}{#1}}
\renewcommand{\mkbibnamefamily}[1]{\mkbibnamegiven{#1}}
However, this results in an odd indentation artefact when I do printbibliography twice:

Am I doing something incorrect with the macro or is this an actual bug? Thanks! MWE:
\documentclass[10pt, a4paper]{article}
\usepackage{filecontents}
\usepackage[backend=biber]{biblatex}
\begin{filecontents}{test.bib}
@ARTICLE{Isaev2023-ax,
title = "Investigating {RNA} splicing as a source of cellular diversity
using a binomial mixture model",
author = "Isaev, Keren and Knowles, David A",
journal = "bioRxiv",
year = 2023,
Keywords = {Working}
}
@ARTICLE{Brown2023-fm,
title = "MCFA",
author = "Brown†, Brielin C and Knowles†, David A and Lappalainen†, Tuuli",
journal = "Cell Genomics",
year = 2023,
bibbase_note = {†Co-corresponding},
Keywords = {Genetics}
}
\end{filecontents}
\addbibresource{test.bib}
\usepackage{xstring}
\usepackage{etoolbox}
\renewcommand{\mkbibnamegiven}[1]{\ifboolexpr{(test {\IfSubStr{\namepartfamily}{Knowles}} and (test {\IfSubStr{\namepartgiven}{David}})}{\mkbibbold{#1}}{#1}}
\renewcommand{\mkbibnamefamily}[1]{\mkbibnamegiven{#1}}
\begin{document}
\nocite{*}
\printbibliography[title=Journal articles, type=article, keyword=Genetics]
\noindent % doesn't help
\setlength{\parindent}{0pt}
\printbibliography[title=Working, type=article, keyword=Working]
\end{document}

xstring. (xstringcan be a bit tricky at times.) See https://tex.stackexchange.com/q/73136/35864. – moewe Oct 30 '23 at 05:58