Make one author's name bold every time it shows up in the bibliography

In the solution I found, you need to modify your bibtex style file for this and implement a new TeX macro. Suppose you use the plain bibliography style. Locate plain.bst (you can use the command kpsewhich plain.bst for that) and copy it to your local tex directory as, say, myplain.bst. In myplain.bst locate the function format.names. In this function replace the line

{ s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=

by

{ "\FormatName{" s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ * "}" * 't :=

Now in your tex file, first change the style to myplain.bst and insert the following macro definitions:

\def\FormatName#1{%
  \def\myname{Elmar Zander}%
  \edef\name{#1}%
  \ifx\name\myname
    \textbf{#1}%
  \else
    #1%
  \fi
}

This should work now. (And, of course, don't forget do replace my name by yours ;-)

Note1: format.name$ is a builtin function that takes the preceding three arguments, which are: a string with the author names (s), the number of the name to be formatted (nameptr) and a formatting string ("{ff~...") and formats the author name according to this format string. As bibtex is stack oriented the arguments need to be pushed first on the stack, then format.name$ pops them off the stack, computes the result and pushes it back onto the stack. The "ff,ll,vv,jj" in the format string stand for first name(s), last name, stuff like "von" or "de", and stuff like "jr./junior" respectively (see btxhak.pdf included in the bibtex distribution). The single letter versions "f", "l" etc. would give you abbreviated forms. The * operator in bibtex concatenates two strings. Again, the strings need to be on the stack first, and the result is pushed back on the top of the stack.

Note2: You can have the FormatName macro in your bst file: modify the begin.bib function in myplain.bst in the following way

FUNCTION {begin.bib}
{ 
  "\def\FormatName#1{%" write$
  "  \edef\name{#1}%" write$
  "  \ifx\name\myname" write$
  "  \textbf{#1}%" write$
  "  \else%" write$
  "  #1%" write$
  "  \fi" write$
  "}" write$
  preamble$ empty$
    'skip$
    { preamble$ write$ newline$ }
  if$
  "\begin{thebibliography}{"  longest.label  * "}" * write$ newline$
}

Just keep the \def\myname{...} macro in your tex file. So that you can change the name to be highlighted (if any) easily.

Note3: the FormatName command can have problems with the spaces between a first name and last name, and it will also not find both 'Elmar Zander' and 'E. Zander'. If the above does not work for you, you can use the xstring package and then define FormatName as follows:

\def\FormatName#1{%
  \IfSubStr{#1}{Zander}{\textbf{#1}}{#1}%
}

You can do this with BibLaTeX without much hackery by putting the following in your preamble:

\newcommand{\makeauthorbold}[1]{%
\DeclareNameFormat{author}{%
  \ifnumequal{\value{listcount}}{1}
    {\ifnumequal{\value{liststop}}{1}
      {\expandafter\ifstrequal{##1}{#1}{\textbf{##1\addcomma\addspace ##4\addcomma\isdot}}{##1\addcomma\addspace ##4\addcomma\isdot}}
      {\expandafter\ifstrequal{##1}{#1}{\textbf{##1\addcomma\addspace ##4}}{##1\addcomma\addspace ##4}}}
    {\ifnumless{\value{listcount}}{\value{liststop}}
      {\expandafter\ifstrequal{##1}{#1}{\textbf{\addcomma\addspace ##1\addcomma\addspace ##4}}{\addcomma\addspace ##1\addcomma\addspace ##4}}
      {\expandafter\ifstrequal{##1}{#1}{\textbf{\addcomma\addspace ##1\addcomma\addspace ##4\addcomma\isdot}}{\addcomma\addspace ##1\addcomma\addspace ##4\addcomma\isdot}}%
    }%
}%
}
\makeauthorbold{Smith}

By using \IfSubStr from the xstring package in place of \ifstrequal one can also make multiple names bold with something like the following:

\usepackage{xstring}
\newcommand{\makeauthorsbold}[1]{%
\DeclareNameFormat{author}{%
  \ifnumequal{\value{listcount}}{1}
    {\ifnumequal{\value{liststop}}{1}
      {\expandafter\IfSubStr{#1}{##1}{\textbf{##1\addcomma\addspace ##4\addcomma\isdot}}{##1\addcomma\addspace ##4\addcomma\isdot}}
      {\expandafter\IfSubStr{#1}{##1}{\textbf{##1\addcomma\addspace ##4}}{##1\addcomma\addspace ##4}}}
    {\ifnumless{\value{listcount}}{\value{liststop}}
      {\expandafter\IfSubStr{#1}{##1}{\textbf{\addcomma\addspace ##1\addcomma\addspace ##4}}{\addcomma\addspace ##1\addcomma\addspace ##4}}
          {\expandafter\IfSubStr{#1}{##1}{\textbf{\addcomma\addspace ##1\addcomma\addspace ##4\addcomma\isdot}}{\addcomma\addspace ##1\addcomma\addspace ##4\addcomma\isdot}}%
    }%
}%
}
\makeauthorsbold{Smith,Doe}

The only caveat is that this will also make authors bold whose name is a sub string of one of the given names. For example "Do" will also end up being bold.

Update: For biblatex 3.3 and above use the answer by Lawrence Crosby below.


As of biblatex 3.3 cgogolin's answer no longer works. This is due to changes in the \DeclareNameFormat macro (see https://github.com/plk/biblatex/issues/372 for a discussion). I was eventually able to modify cgogolin's macro to work, with the following as the solution:

\newcommand{\makeauthorbold}[1]{%
  \DeclareNameFormat{author}{%
    \ifthenelse{\value{listcount}=1}
    {%
      {\expandafter\ifstrequal\expandafter{\namepartfamily}{#1}{\mkbibbold{\namepartfamily\addcomma\addspace \namepartgiveni}}{\namepartfamily\addcomma\addspace \namepartgiveni}}
      %
    }{\ifnumless{\value{listcount}}{\value{liststop}}
        {\expandafter\ifstrequal\expandafter{\namepartfamily}{#1}{\mkbibbold{\addcomma\addspace \namepartfamily\addcomma\addspace \namepartgiveni}}{\addcomma\addspace \namepartfamily\addcomma\addspace \namepartgiveni}}
        {\expandafter\ifstrequal\expandafter{\namepartfamily}{#1}{\mkbibbold{\addcomma\addspace \namepartfamily\addcomma\addspace \namepartgiveni\addcomma\isdot}}{\addcomma\addspace \namepartfamily\addcomma\addspace \namepartgiveni\addcomma\isdot}}%
      }
    \ifthenelse{\value{listcount}<\value{liststop}}
    {\addcomma\space}
  }
}

This is my first attempt to write LaTeX macros, so I hope the code style doesn't deviate too far from convention. Hopefully this will help those who are using newer versions of the biblatex package.