3

I have a bibliography entry that causes an error.

@incollection{Ursoiu2013Economic-effici,
    Annote = {% 2015-06-17

The article focuses on the concept of "good administration", reforms around this topic, its relation to legality and efficiency and whether the legal operationalization of good administration on the European level provides an external normative framework for the exercise of discretion of public agencies and other organs.

The first part of the article (section 3) focuses on the tension between legitimacy and efficiency in the development of "administrative systems"

The second part (section 4) discusses the legal operationalizartion of a "principle of good administration" on the European level.

---

Efficiency has been the prevailing paradigm for "structural adjustment reforms" – changes in the structure of administration through NPM. An "ethos of efficiency" promoted by the IMF, World Bank and Council of Europe.

},
    Author = {Naomi Reniutz Ursoiu},
    Booktitle = {Administrative law beyond the state : Nordic perspectives},
    Date-Added = {2015-06-17 12:53:11 +0000},
    Date-Modified = {2015-08-12 09:02:50 +0000},
    Editor = {Anna-Sara Lind and Jane Reichel},
    Publisher = {Martinus Nijhoff Publishers},
    Read = {1},
    Title = {Economic efficiency and legality as criteria for the development of good administration in a globalized order},
    Year = {2013}}

MWE:

\documentclass[11pt,a4paper]{book}
\usepackage[swedish]{babel}
\usepackage[style=authoryear,language=swedish,autocite=footnote,]{biblatex}
\addbibresource{/Users/xjtorm/Dropbox/referenser.bib}
\title{Test} 
\author{Tormod Otter Johansen}

\begin{document}

Lorem ipsum dolor sit amet.\autocite[]{Ursoiu2013Economic-effici}

\printbibliography
\end{document}     

Running this causes the following error:

Runaway argument?
{\field {booktitle}{Administrative law beyond the state : Nordic pers\ETC.
./manuskript-avhandling.tex:83: File ended while scanning use of \field.

This solves itself if the annote field is left out of the bibtex entry. But is this the only way to solve it? Do I use the annote field incorrectly?

7
  • 2
    the problem is the comment, i.e., % inside annote. If you remove it it works properly. The biblatex/bibtex way would be to create a new field myannotationdate to store such information. The field will be ingnored by biber or bibtex.
    – Guido
    Aug 12, 2015 at 9:41
  • 1
    The date comment seems hardly necessary seeing that you have Date-Added and Date-Modified already (which are both ignored by BibTeX/Biber). Of course you can use Biber to zap the annote field before it becomes toxic in the .bbl file. (With \DeclareSourcemap{ \maps{ \map{ \step[fieldset=annote,null] } } })
    – moewe
    Aug 12, 2015 at 9:49
  • 1
    Fields may contain a lot of stuff if you don't want them typeset. If you want them to be printed in the document you might face certain restrictions. The few things you need to take care of is that what you write in the field actual allows a proper processing of the .bib file. Comments within fields can cause troubles with Biber (and in fewer cases also with BibTeX). So, technically you are almost using the field right.
    – moewe
    Aug 12, 2015 at 11:50
  • 1
    The question is whether it is good usage. If you just want to write down some commentary which you don't intend to ever end up in a typeset document, you might as well use a field that is automatically ignored by Biber/BibTeX ans Guido points out, because then you might fill the field with almost anything you like.
    – moewe
    Aug 12, 2015 at 11:51
  • 1
    @Guido Since you have solved the mystery, do you want to write up an answer. (Maybe also hinting at what I wrote in the comments.)
    – moewe
    Aug 12, 2015 at 12:10

1 Answer 1

3

The problem is the comment, i.e. %, in the annote field.

biber takes the argument of the field and produce a .bbl where the lines in the argument are joined in a single line. Thus we have something looking like

...
\field{annotation}{% ...} 
\field{title}{title}

This means that LaTeX does not see the closing bracket } of the value of annotation.

The situation is a bit different when the backend is bibtex. In this case the generate .bbl file contains

...
\field{annotation}{% 
  %...
  ...%
} 
\field{title}{title}

bibtex joins the lines in the bibtex field, but then it splits them at a fixed width.

The % in the line after the line with \field{annotation}{% is the comment in the bibtex field. So in this case there will be no error, but the output will not be correct.

So as @moewe said, it is fine to have comments in bibtex fields as long as the fields are ignore by the bibliography processor and not use to be typeset.

In some fields contains % a solution is to use sourcemap, to nullify the value, i.e.,

\DeclareSourcemap{ \maps{ \map{ \step[fieldset=annote,null] } } }

The source map operates on the bibtex records before it is written to the .bbl file.

1
  • 1
    Thank you! Maybe you can mention that sourcemapping a field to null using BIber is fine because it will not be output to the .bbl then.
    – moewe
    Aug 13, 2015 at 5:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .