[Tex/LaTex] Adding information to bibitems

bibliographiesbibtex

For a lecture note/book project I have to following problem: I have an extensive list of references processed by bibtex as usual, the entries coming from a large collection of bib-files. Now since the whole project is ment for students, I would like to add some recommendations for particular references like:

This is a standard text book where every student will have to take a look,
for this course Chap~3 and Chap~4 are most important.

Of course, I can add lines like that directly as a "note" into the bib-files, but I do not want to spoil my bib-file collection with notes like that which I never will need again (imagine this kind of note appears in a journal article by accident).

So the question is: can I modify the behaviour of the bibitem command such that I have an additonal command like \bibnote{key}{text} somewhere in my main file, taking the key of the bibentry and adds some text at the end of it, maybe as a separate paragraph. Ideally, it would write things directly to the bbl-file automatically.

Best Answer

If the combination of biblatex+biber is an option you can use the mapping feature to add information to a bibentry. This can be done, by using

\DeclareSourcemap{
  \maps{
    \map{
      \step[fieldset=entrykey, fieldvalue={<entryke>}]
      \step[fieldset=note, fieldvalue={text for <entrykey>}]
    }
  }
}

and use a map for every reference for which you want to add the note.

Or an alternative is to introduce a new field, let us say, notesonlyformystudent (and use such a field in the .bib file).

\begin{filecontents}{biblatex-dm.cfg}
\DeclareDatamodelFields[type=field,datatype=literal]{notesonlyformystudents}
\DeclareDatamodelEntryfields{notesonlyformystudents}
\end{filecontents}

and

\DeclareFieldFormat{notesonlyformystudents}{#1}
\renewbibmacro{finentry}{\finentry\par\printfield{notesonlyformystudents}}