I need to underline all occurrences of a person's name in the bibliography, using ClassicThesis and BibLaTeX. I would prefer to change the tex file only (not the bib or bst). So far, I have tried this and this approach without success. The code for those approaches is reported in the MWE below in commented form.
With the first approach I observe no underline:
With the second approach the list of authors is removed:
My current setup:
This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015/Debian) (preloaded format=pdflatex 2017.8.23)
Package: biblatex 2016/03/03 v3.3 programmable bibliographies (PK/JW/AB)
Package: classicthesis 2015/09/06 v4.2 Typographic style for a classic-looking
MWE:
\documentclass{scrbook}
\usepackage{classicthesis}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{one,
author = {Smith, Robert and Garcia, Maria and Johnson, James},
title = {{Title One}},
journal = {Journal One},
year = {2017}
}
@InProceedings{two,
author = {Garcia, Maria and Smith, Robert and Johnson, James},
title = {{Title Two}},
booktitle = {Conference Two},
year = {2016}
}
\end{filecontents}
\usepackage[backend=biber, style=alphabetic]{biblatex}
\addbibresource{\jobname.bib}
\usepackage[normalem]{ulem} %for \uline{}
\newcommand{\myLastName}{Smith}
%% solution by Andrzej, https://tex.stackexchange.com/a/31202
% \renewbibmacro*{name:first-last}[4]{%
% \usebibmacro{name:delim}{#2#3#1}%
% \usebibmacro{name:hook}{#2#3#1}%
% \ifthenelse{\equal{#1}{\myLastName}}% matches last name against YourLastName
% {
% \uline{% wrapped with \uline
% \ifblank{#2}{}{\mkbibnamefirst{#2}\isdot\bibnamedelimd}%
% \ifblank{#3}{}{%
% \mkbibnameprefix{#3}\isdot%
% \ifpunctmark{'}%
% {}%
% {\ifuseprefix{\bibnamedelimc}{\bibnamedelimd}}}%
% \mkbibnamelast{#1}\isdot%
% \ifblank{#4}{}{\bibnamedelimd\mkbibnameaffix{#4}\isdot}}}%
% {% original
% \ifblank{#2}{}{\mkbibnamefirst{#2}\isdot\bibnamedelimd}%
% \ifblank{#3}{}{%
% \mkbibnameprefix{#3}\isdot%
% \ifpunctmark{'}%
% {}%
% {\ifuseprefix{\bibnamedelimc}{\bibnamedelimd}}}%
% \mkbibnamelast{#1}\isdot%
% \ifblank{#4}{}{\bibnamedelimd\mkbibnameaffix{#4}\isdot}}}
%% solution by dardisco, https://tex.stackexchange.com/a/394458
% \DeclareNameFormat{given-family}{
% \ifgiveninits
% {\ifthenelse{\equal{\namepartfamily}{\myLastName}}
% {\uline{\namepartfamily\addspace\namepartgiveni\namepartsuffix}}
% {\namepartfamily\addspace\namepartgiveni\namepartsuffix}
% \ifthenelse{\value{listcount} < \value{liststop}}
% {\addcomma}
% {\ifthenelse{\ifmorenames}{~et \,al \adddot}}
% {}
% }
% }
\begin{document}
\nocite{*}
\printbibliography
\end{document}
Any suggestion?


