In a comment to the question Notes after bibliography entry with Biber and BibLaTeX Marco Daniel suggested to use \DeclareSourcemap
to add notes to specific entries.
The most immediate solution would be to have a definition of source map like, where we search entries based on they BibTeX key
, thus using something like:
\DeclareSourcemap{
\maps[datatype=bibtex]{
\map{
\step[fieldsource=entrykey, match={key1},
fieldset=note, fieldvalue={This is a note}]
}
}
}
However, it does not work: the note
field is not inserted for the appropriate entry. However, if a different field is used, e.g., author
\DeclareSourcemap{
\maps[datatype=bibtex]{
\map{
\step[fieldsource=author, match={Author},
fieldset=note, fieldvalue={This is a note}]
}
}
}
then, the note is inserted.
I think that an MWE in this case would not be required, but since somebody is going to ask for it, here it is:
\documentclass{article}
\usepackage{filecontents}
\usepackage[style=numeric]{biblatex}
\addbibresource{\jobname.bib}
\begin{filecontents}{\jobname.bib}
@article{key1,
author = {Author, John},
title = {Title},
journal = {A Journal},
year = 2012,
}
@article{key2,
author = {Author2, John},
title = {Title},
journal = {A Journal},
year = 2012,
}
\end{filecontents}
\DeclareSourcemap{
\maps[datatype=bibtex]{
\map{
\step[fieldsource=entrykey, match={key1},
fieldset=note, fieldvalue={This is a note}]
}
\map{
\step[fieldsource=author, match={Author2},
fieldset=note, fieldvalue={This is a note}]
}
}
}
\begin{document}
\nocite{*}
\printbibliography
\end{document}
So, the question is whether it is possible to use the BibTeX key (entrykey
) in a biber mapsource specification, or what is the field
that can be used and uniquely identifies a bibentry?