I would like to create bibliographies that have certain authors highlighted (e.g., bold). There are several solutions along these lines, but they usually assume that it's the same author that's being highlight throughout:
I'm hoping for a BibTeX solution along these lines that lets me indicate, in the .bib
file, which authors should be highlighted, e.g.,
author = {J. Doe and J. Smith and J. Quincy}
usera = {1,3}
My goal is to use this for my CV, and to highlight student authors.
Best Answer
My solution works by hacking the bibliography style, similar to what @Katuyci proposed, but conforming more to your example.
plain.bst
here, but it works with any other style, too.Insert
usera
to theENTRY
field:Add the following functions to your style file, after
FUNCTION {not}
(or afterFUNCTION {or} if using natbib). The
multand
str.to.int` functions are taken from Tame the Beast, with a small bug fix.Now locate
FUNCTION {format.names}
, and putbefore that.
format.names
has to be modified. I indicated all lines that I added. Your function might look a little different when you are not working withplain.bst
, but pretty similar.Finally, we provide a default style for highlighting authors, here we use bold. This is to be injected into the
begin.bib
function:That's it! Let's test it:
Note that authors to be emphasized should be given in increasing order, e.g.
separated by spaces. Otherwise you will get warnings as in the test code.