Articles

Highlight a name in BibTeX Bibliography

In howto on Jan 24, 2016 by theoryl Tagged: , ,

How to highlight a particular author’s name in the bibliography when using BibTeX? This was asked on TeX Stack Exchange. I didn’t like the top answer as much as the third answer. Simply edit the .bst file and add a function that highlights your name:

FUNCTION {highlight.if.cv.author}
{ duplicate$ purify$ "YOURNAME" purify$ =
    { bold }
    'skip$
  if$
}

(Here I chose to bold the name)

Then, look for the string “format.name$” in the .bst file, and call the function right after it, e.g.

FUNCTION {format.names}
...
        format.name$
        highlight.if.cv.author
...

A related modification you can make in the .bst file is to turn DOI into a hyperlink. Look for the string “doi *”, change it to:

FUNCTION { format.doi } {
...
        "\href{http://dx.doi.org/" doi * "}{DOI: " * doi * "}" *
...
}
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: