Say I use a bibliography file in my document, relying on Biblatex and Biber for citation management.
Given a citation command such as \cite{A, B, C}
(or any other standard Biblatex citation command), I'd like the resulting citations to be typeset differently depending on whether a given field (e.g. the author field) in the corresponding bibliography entry contains a given string (e.g. someone's lastname).
Besides, I'd like to generate two different bibliography sections in the resulting document, depending on the same condition as above.
Typically this would be used to differentiate, both at the citation level in the main text and in the appendix, the publications that I co-authored from others.
EDIT: adding a MWE:
\documentclass{article}
\usepackage{filecontents}
\usepackage[backend=biber,style = alphabetic]{biblatex}
\usepackage[colorlinks=true, breaklinks, allcolors = blue]{hyperref}
\DeclareSourcemap{%
\maps[datatype=bibtex]{%
\map{%
\step[fieldsource=author, match=Doe, final]%
\step[fieldset=keywords, fieldvalue=doe]%
}%
}%
}
\begin{filecontents}{\jobname.bib}
@Book{p1,
author = "A. U. Thor and John Doe",
title = "A Scientific Article 1",
year = "1975"
}
@Book{p2,
author = "John Doe",
title = "A Scientific Article 2",
year = "1985"
}
@Book{p3,
author = "Joe Bar",
title = "A Scientific Article 3",
year = "1995"
}
@Book{p4,
author = "Jane Baz",
title = "A Scientific Article 4",
year = "2005"
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
% Requirement 1: should make citations of Doe bold
In \parencite{p4, p1, p2, p3}, ``TD75'' and ``Doe85'' should appear in
bold (the semicolon should remain plain).
% Requirement 2: separating bibliographies. IT WORKS.
\section{Co-authored Publications}
\nocite{*}
\printbibliography[keyword=doe,heading=none]
\section{Other Publications}
\nocite{*}
\printbibliography[notkeyword=doe,heading=none]
\end{document}
keyword
field instead of auto-detection of names? Anyway, biblatex: filter out publications from a specific author in the references dynamically seems to be a pretty good fit (there you can even get automatic name recognition).cite
bibmacro, though with some styles there might be other solutions.) So in order to be of any help we would need to see which one you use, this is best done in an MWE.