# Biber fails at supporting { } in author names

I have a bug using Biber and LaTeX:

Here is my MNWE:

test.bib:

@misc{citation1, title = {Any title}, author = {{{Foo} bar}}, },


test.tex:

\documentclass{book}
\usepackage[backend=biber]{biblatex}
\begin{document}
Minimal\cite{citation1}.
\end{document}


Where changing the author line in bib-file by author = {{Foo} bar} corrects the issue.

Errors:

(./test.bbl
Runaway argument?
{{{hash=caae7d4677b9798ddeb82790f6e3b20d}{{{Foo}\bibnamedelimb bar}}{\ETC.
! Paragraph ended before \name was complete.


When using BibTeX, there is no problem (change backend=bibtex).

Tried with biber 1.2 and the last biblatex and biber 0.99 and the biblatex included in texlive2011, same problem.

-
This is mostly because biber does lots of tricky things with generating initials and this is a tradeoff with edge cases like this. I can't really see why you'd ever want to do this anyway? You can always fix such cases with the sourcemap feature. –  PLK Aug 31 '12 at 18:00
That's because zotero outputs BibTex files with this format… –  Bjonnh Sep 3 '12 at 8:40

This is a bit of a mess of an output format as it's not clear whether the point is to protect "Foo" or the whole name. Short of asking the Zotero team not to output such messy bibtex, add this to your biber.conf to automatically remove braces inside an already completely protected name:

<?xml version="1.0" encoding="UTF-8"?>
<config>
<sourcemap>
<maps datatype="bibtex" map_overwrite="1">
<map>
<map_step map_field_source="AUTHOR"
map_match="\A{.+}\z" final="1"/>
<map_step map_field_source="AUTHOR"
map_match="(?:(?!\A){|}(?!\z))"
map_replace=""/>
</map>
</maps>
</sourcemap>
</config>


This particular fix needs biber 1.3/biblatex 2.3 dev versions from SF as there was a bug in processing empty replace strings.

-
Thanks a lot PLK ! Will try this, as I need to output my document rather fast, I use the RDF import of Biber to get rid of this problem. –  Bjonnh Sep 3 '12 at 17:30
Let me know if the RDF import gives you any trouble - it's rather hacky and I'd like to do properly at some point with SQLLite but Zotero needs a real entry citekey first ... –  PLK Sep 3 '12 at 17:39
I made my own RDF exporter with the BibTex citekey to avoid waiting them to add this: github.com/bjonnh/ZoteroRDF-citekey but I needed to remove tags as I get the same error as with the authors. –  Bjonnh Sep 5 '12 at 13:30