10

I keep all my sources in the one BibTeX file, and noticed in JabRef that there's a "review" field.

I thought this would be a handy place to keep notes while doing a literature review, and was wondering how I could go about making a document which showed this review field.

Basically, I'd like to use this as a kind of annotated bibliography.

So is there some way I could access this field in a LaTeX document? Like:

\cite{Barniv:1985}.review() 

or something to that effect.

11

This field is not usually accessed by the normal bibliography styles. The biblatex package, however, has an annotation field and a bibliography style designed for annotated bibliographies.

In JabRef, you first need to change the name of field that is used by the review tab. You can do this by choosing Set General Fields from the Options menu. This will bring up the following window:

jabref dialog

Change the line that says Review:review to Review:annotation. This makes anything you enter into the Review tab of an entry into a bibtex field named annotation (which biblatex recognizes.) Note that this will not change any existing review fields to annotation; that would need to be done separately with a search and replace.

Once you've done this, you can now use the biblatex reading bibliography style to print out the annotations with the bibliography.

Here's a sample document.

\documentclass[12pt,letterpaper]{article}
\usepackage[style=reading,entryhead=false,annotation=true,backend=biber]{biblatex}
\begin{filecontents}{\jobname.bib}
@book{Saussure1995,
    Author = {Ferdinand de Saussure},
    Origyear = {1916},
    Publisher = {Payot},
    Title = {Cours de Linguistique G{\'e}n{\'e}rale},
    Year = {1995},
    Annotation = {This is a classic of linguistics.}}

@book{Labov1972,
    Address = {Philadelphia},
    Author = {William Labov},
    Publisher = {University of Pennsylvania Press},
    Title = {Sociolinguistic Patterns},
    Year = {1972},
    Annotation = {This is another classic of linguistics.}}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\nocite{*}
\printbibliography
\end{document}

The formatting leaves something to be desired. You would need to customize the formatting yourself to get things to look a bit nicer, but all of the pieces are there. See the biblatex manual for more details.

output of code

  • Sorry i haven't marked this a solution. Your example doesn't compile for me. I think it might be because i have an older version of texlive thought (2009). – Alex Oct 6 '11 at 3:14
  • Yes, that's likely. BiBLaTeX is quite actively developed, and TL 2009 is quite old at this point. – Alan Munn Oct 6 '11 at 3:47
4

I wanted a bit more control than just using the biblatex setting, that causes the annotation to directly appear in the bibliography section.

I wanted to insert it in the middle of my text, so I could talk abit more about it before and after, break it up into different sections and so forth.

BibLaTeX actually does let you directly access the value of any field. But it does have to be one of its defined fields -- so you can't use your review field, instead use as @Alan Munn suggest the annotation field (which is aliased to annote, but that is another explanation)

the command is \citefield{𝘣𝘪𝘣𝘵𝘦𝘹𝘬𝘦𝘺}{𝘧𝘪𝘦𝘭𝘥𝘯𝘢𝘮𝘦} or \citelist{𝘣𝘪𝘣𝘵𝘦𝘹𝘬𝘦𝘺}{𝘧𝘪𝘦𝘭𝘥𝘯𝘢𝘮𝘦} or \citename{𝘣𝘪𝘣𝘵𝘦𝘹𝘬𝘦𝘺}{𝘧𝘪𝘦𝘭𝘥𝘯𝘢𝘮𝘦} Depending on if BibLatex considers this field to be a field, a list or a name. Abstract and Annotation and keywords, and title are (biblatex) fields, author is a name. I'm not sure on lists I have yet to find one.

See page 94 of the biblatex manual Also this excellent answer to the closely related question.

Eg \citename{WhiteL2016}{author} would insert into your document the name of the author, of the document with the key WhiteL2016. So probably something like "Lyndon White"

We can use this to define a macro that writes the summary. Right now I am using

\newcommand{\summaryfromcite}[1]{%
    \subsection{\citefield{#1}{title}}%
    \fullcite{#1}%
    \smallskip \\%
    \citefield{#1}{annotation}%
}

Which is called by doing \summaryfromcite{WhiteL2016} And makes a nice little subsection for the names paper.

There are also a few more convenience methods too. See page 91 of the biblatex manual

Like \Citetitle{𝘣𝘪𝘣𝘵𝘦𝘹𝘬𝘦𝘺} inserts the title, with first letter capitalized.

A different version of the above:

\newcommand{\summaryfromcite}[1]{%
    \subsubsection{\Citetitle{#1} -- \citeauthor{#1} (\citeyear{#1})}%
    \fullcite{#1}%
    \smallskip \\%
    \citefield{#1}{annotation}%
}

Rather than using \newcommand, you might like to use \DeclareCiteCommandit exposes different options for different context where you might use it. I'm not too clued up on it, so you may like to ask another question

  • Please note that biblatex distinguishes three types of fields: fields, lists and names. And you will have to use the correct \cite* command for each type, in particular \citefield{sigfridsson}{author} will not work, because author is a name list, so you need \citename{sigfridsson}{author}. Please note that often stuffing several \cite*-commands into one \newcommand is better avoided for a dedicated command defined with \DeclareCiteCommand. Note also that your command might introduce spurious spaces (see here). – moewe Aug 11 '16 at 7:39
  • Finally \Citetitle{#1}{title} is probably a bit much. See also How to extract BibTeX entries (as DOI, abstract, etc.) – moewe Aug 11 '16 at 7:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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