# How to embed a review in biblatex?

In the context of biblatex it's possible to say bibstyle=reading, this will produce bibliography including abstract and annotation fields. I'm thinking to use annotation to include my review of that reference.

Its cool to be able to use LaTeX on a review with the possibility of special formating and equations.

I would be interested in which approach would lead me to that.

Or perhaps refer to an external file for each reference containing a review, a file structure like this may be:

mylatex project/
doc.tex
bib/
doc.bib
bibannotation-key1.tex
bibannotation-key2.tex
bibannotation-key3.tex

• The question in the title can be answered with: "Just do it, it should work." Fields marked as literal in the biblatex documentation (that includes most non-name and non-special fields like url, date, ...) can contain normal LaTeX material (there are some restrictions to what you can write in there, but most normal uses would be fine). – moewe May 3 at 10:13
• annotation = {Lorem ipsum $x^2+y^2=z^2$ that was mathy. Also $a+b=c$ and so forth. Just a few words to make the next paragraph stand out properly.\par We can even have a new paragraph.}, for example just works. – moewe May 3 at 10:17

Most fields in biblatex are so-called literal fields, which basically means that you can fill them with normal LaTeX content. You don't have to restrict yourself to just words without macros. There are some restrictions to what you can enter with respect to grouping and special characters and some limits are imposed by the context in which the code will be printed, but paragraphs, display and inline maths and basic text formatting are fine.

Sometimes it is advisable to restrict the input even more. The title-like fields, for example, may be subject to \MakeSentenceCase, which has quite a complicated implementation and requires that special macros be 'protected' with curly braces.

Anyway, in case of annotation, you can just punch in your LaTeX code directly.

\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book{appleby,
author     = {Humphrey Appleby},
title      = {On the Importance of the Civil Service},
date       = {1980},
annotation = {Lorem ipsum $x^2+y^2=z^2$ that was mathy.
Also $a+b=c$ and so forth.
Just a few words to make the next
paragraph stand out properly.\par
We can even have a new paragraph.},
}
\end{filecontents}

\begin{document}
\cite{sigfridsson,appleby}
\printbibliography
\end{document}


At some point, however, it may become tedious to edit large portions of LaTeX code in the annotation field of the .bib file. For that biblatex already offers a way to load external files. You can read about this in §3.13.8 External Abstracts and Annotations and §4.11.3 External Abstracts and Annotations of the biblatex documentation.

To enable this feature load biblatex with the option loadfiles. You can then place the annotation in a file bibannotation-<entrykey>.tex. The bibannotation- bit can be customised with the macro \bibannotationprefix.

\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book{appleby,
author     = {Humphrey Appleby},
title      = {On the Importance of the Civil Service},
date       = {1980},
}
\end{filecontents}
\begin{filecontents}{bibannotation-appleby.tex}
Lorem ipsum $x^2+y^2=z^2$ that was mathy.
Also $a+b=c$ and so forth.
Just a few words to make the next
paragraph stand out properly.

We can even have a new paragraph.
\end{filecontents}

\begin{document}
\cite{sigfridsson,appleby}
\printbibliography
\end{document}


The is the same as above.

In the set-up with the bib subdirectory in your question you would probably also say

\renewcommand*{\bibannotationprefix}{bib/bibannotation-}


The file path is relative to the main .tex file (or rather your LaTeX invocation) and not relative to the .bib file.

The idea behind the implementation of loadfiles is quite simple and you could expand this to load the file name specified in a given field in the .bib file instead of a file name based on the entrykey. You could also expand this idea to fields different from annotation or abstract.