[Tex/LaTex] Biber fails at supporting { } in author names

biberbiblatexerrors

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}
\addbibresource{test.bib}
\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.

Best Answer

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.

Related Question