Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'd like to indicate one or more authors in a bibliography entry that should be highlighted, e.g., boldface. This solution allows one to indicate one author from the list, using an index provided in the auxiliary field usera.

How would the solution be changed in order to allow multiple authors, e.g.,

author = {J. Doe and J. Smith and J. Quincy}
usera = {1,3}

This would result in the first and third authors being highlighted.

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

You can parse the usera field using \docsvfield. Here is a simplified macro from the linked solution that will set all author names indicated by usera in italics.

\newbibmacro*{name:emph}{%
  \ifboolexpr{ test {\ifcurrentname{author}} and not test {\iffieldundef{usera}} }
    {\def\do##1{%
       \ifnumequal{##1}{\value{listcount}}{\itshape\listbreak}{}}%
     \docsvfield{usera}}
    {}}
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.