Add comment to an item in the bibliography

biblatexbibliographies

The question and answer here propose a way to display a note field before items in the the biblio. I am wondering if I can change this in two ways:

  • I want the note to be after the biblio item rather than before.
  • Also, I have one universal biblio file that I use in all my latex files and I want to include different notes in different latex files. So I am wondering if I can add the note as part of the latex file rather than the bib file.

Below is a MWE (stolen from the answer above) but with what I would like to acheive


\documentclass{scrreprt}
\usepackage[bibstyle=authoryear, backend=biber]{biblatex}
\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@misc{A2011,
  author = {Author, A.},
  year = {2011},
  title = {A short title.}
}
@misc{A2012,
  author = {Buthor, B.},
  year = {2012},
  title = {Systems biology and personalized medicine are two emerging research areas, which promise to transform our health system.}
}
@misc{A2013,
  author = {Cuthor, C.},
  year = {2013},
  title = {This title is not so short.}
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
\nocite{A2012, A2013}

% Add notes to entries
%\addbibnote{A2012}{This is the first note}
%\addbibnote{A2013}{Another note}

\printbibliography
\end{document}

Any help is appreciated.

Best Answer

You can modify the bibmacro finentry in order to print your note at the end of an entry. See for example also How to move the note field out and away from the main reference using biblatex? and Print and format Mendeley Notes field (annote) in bibliography.

If you prefer not to give the note in the .bib file, we can instead define a new command to collect the note.

\documentclass{scrreprt}
\usepackage[bibstyle=authoryear, backend=biber]{biblatex}

\DeclareFieldFormat{entrynote}{\small\itshape #1}

\makeatletter
\newrobustcmd{\addentrynote}[2]{%
  \csdef{tohikoblx@entrynote@\the\c@refsection @#1}{#2}}

\renewbibmacro*{finentry}{%
  \ifcsundef{tohikoblx@entrynote@\the\c@refsection @\thefield{entrykey}}
    {}
    {\setunit{\finentrypunct\par}%
     \printtext[entrynote]{\csuse{tohikoblx@entrynote@\the\c@refsection @\thefield{entrykey}}}%
     \renewcommand*{\finentrypunct}{}}%
  \finentry
}
\makeatother

\addbibresource{biblatex-examples.bib}

\begin{document}
\nocite{sigfridsson,worman,geer}

% Add notes to entries
\addentrynote{sigfridsson}{This is the first note.}
\addentrynote{worman}{Another note}

\printbibliography
\end{document}

Geer, Ingrid de (1985). “Earl, Saint, Bishop, Skald – and Music. The Orkney Earldom of the Twelfth Century. A Musicological Study”. PhD thesis. Uppsala: Uppsala Universitet.
Sigfridsson, Emma and Ulf Ryde (1998). “Comparison of methods for deriving atomic charges from the electrostatic potential and moments”. In: Journal of Computational Chemistry 19.4, pp. 377–395. doi: 10.1002/(SICI)1096-987X(199803)19:4<377::AID-JCC1>3.0.CO;2-P. This is the first note.
Worman, Nancy (2002). The Cast of Character. Style in Greek Literature. Austin: University of Texas Press. Another note

Related Question