I am using the template from here: https://www.overleaf.com/16456399bnxqhtkjwzft#/63153901/
I am trying to make my name bold in the publications list by setting in the .tex
file:
\myname{de\bibnamedelima Klein}{Niek}
and in the .sty
file
\newcommand{\myname}[2]{%
\def\@mylastname{#1}%
\def\@myfirstname{#2}%
}
\renewcommand*{\mkbibnamefamily}[1]{%
\ifboolexpr{ test {\ifdefstrequal{\namepartfamily}{\@mylastname}}
and
test {\ifdefstrequal{\namepartgiven}{\@myfirstname}}}
{\textbf{#1}}%
{#1}%
}
\renewcommand*{\mkbibnamegiven}[1]{%
\ifboolexpr{ test {\ifdefstrequal{\namepartfamily}{\@mylastname}}
and
test {\ifdefstrequal{\namepartgiven}{\@myfirstname}}}
{\textbf{#1}}%
{#1}%
}
and in the .bib
file my name is written as:
de Klein, Niek
However, because I have two parts in my last name, it is not making it bold. When I change my name to Klein, Niek
in the bib file and \myname{Klein}{Niek}
in the tex file, or when I change my name to Klein, Niek de
in the bib file and \myname{Klein}{Niek\bibnamedelima de}
in the tex file it does correctly bold my name.
So the two part name does work if I put it as two first names, but not when I put it as two lasts names.
Compilable snippets:
cv.tex
\documentclass[a4paper,skipsamekey,11pt,british]{curve}
\usepackage{settings}
\addbibresource{own-bib.bib}
\myname{de\bibnamedelima Klein}{Niek}
\excludecomment{fullonly}
\begin{document}
\input{publications}
\end{document}
settings.sty
\RequirePackage[main=british]{babel}
\raggedright
\RequirePackage{fontawesome}
\RequirePackage[a4paper,nohead,nofoot,hmargin=2.25cm,vmargin=2cm]{geometry}
\RequirePackage{relsize}
\RequirePackage[dvipsnames,svgnames]{xcolor}
\RequirePackage{tikz}
\usetikzlibrary{shapes,shadows}
\RequirePackage{comment}
\definecolor{SwishLineColour}{HTML}{88AC0B}
\definecolor{MarkerColour}{HTML}{B6073F}
% If you're not a researcher nor an academic, you probably don't need biblatex; delete this line.
\RequirePackage[backend=biber,bibstyle=apa,sorting=ydnt,uniquename=init,maxnames=7,defernumbers=true]{biblatex}
\DeclareLanguageMapping{british}{british-apa}
\RequirePackage{tikz}
\newcommand*\circled[1]{\tikz[baseline=(char.base)]{
\node[shape=circle,text=white,fill=MarkerColour!80!black,font=\sffamily\scriptsize\bfseries,inner sep=1pt,text height=1.35ex,minimum width=1.5em,text centered] (char) {#1};}}
\newcounter{bibitem}
\AtBeginBibliography{\setcounter{bibitem}{1}}
\AtEveryBibitem{\makebox[2.5em][l]{\circled{\thebibitem}\stepcounter{bibitem}}}
% \renewcommand{\bibfont}{\small}
\setlength{\bibitemsep}{1.5ex}
\setlength{\bibhang}{2.7em}
\NewBibliographyString{retrieved}
\NewBibliographyString{from}
\DefineBibliographyStrings{british}{
from = {\textcolor{MarkerColour!80!black}{\faLink}},
retrieved = {}
}
\headerscale{1}
%\setlength{\headerspace}{6pt}
\rubricfont{\Large\bfseries\sffamily}
\setlength{\rubricspace}{2pt}
%\setlength{\rubricafterspace}{-9pt}
\setlength{\rubricafterspace}{-3pt}
\setlength{\subrubricspace}{3pt}
\setlength{\subrubricbeforespace}{4pt}
\def\@@rubrichead#1{%
\begin{tikzpicture}[baseline]%\
\shade[left color=black!40!white, right color=white] rectangle (\@almosttextwidth,2.5pt);
\node[font={\@rubricfont},inner sep=0pt,text ragged,anchor=south west,text depth=.5ex,text height=1.5ex] at (1pt,2pt) {#1};
\end{tikzpicture}%
\vspace\rubricspace%
}
\subrubricfont{\large\bfseries\sffamily}
\subrubricalignment{l}
\newcommand{\makefield}[2]{\makebox[1.5em]{\color{MarkerColour!80!black}#1} #2\hspace{2em}}
\keyalignment{r}
\rubricalignment{l}
\renewcommand{\arraystretch}{1.25}
\urlstyle{tt}
\newcommand{\prefixmarker}[1]{\def\@prefixmarker{#1}}
\def\@prefixmarker{\relscale{.9}\faBookmark}
\prefix{%
\hspace*{-1ex}
\color{MarkerColour!80!black}\@prefixmarker%
\hspace*{1ex}%
}
\newcommand{\makerubrichead}[1]{\vskip\baselineskip\@@rubrichead{#1}}
\defbibheading{subbibliography}{\vskip\subrubricbeforespace{\@subrubricfont\hspace{3pt}#1}\par}
\defbibfilter{booksandchapters}{%
( type=book or type=incollection )
}
\newcommand{\myname}[2]{%
\def\@mylastname{#1}%
\def\@myfirstname{#2}%
}
\renewcommand*{\mkbibnamefamily}[1]{%
\ifboolexpr{ test {\ifdefstrequal{\namepartfamily}{\@mylastname}}
and
test {\ifdefstrequal{\namepartgiven}{\@myfirstname}}}
{\textbf{#1}}%
{#1}%
}
\renewcommand*{\mkbibnamegiven}[1]{%
\ifboolexpr{ test {\ifdefstrequal{\namepartfamily}{\@mylastname}}
and
test {\ifdefstrequal{\namepartgiven}{\@myfirstname}}}
{\textbf{#1}}%
{#1}%
}
\RequirePackage[colorlinks=true,allcolors=black,breaklinks=true]{hyperref}
own-bib.bib
@article{example},
title={Some titel},
author={de Klein, Niek and Other, Authors},
journal={Journal},
volume={5},
pages={470},
year={2015},
publisher={Publisher}
}