[Tex/LaTex] Error with percent sign in bib entry field when using biblatex/biber

biberbiblatexcharacterssymbols

I'm trying to use biblatex (v1.5a) with biber (v0.9.3) instead of BibTeX but I am having a problem with bib entries, where the abstract contains a percent sign. In that case, in the bbl file the corresponding entry will have a line with \field{abstract}{ ...% ...} with the percent sign causing the quotes not to be closed. And pdflatex complains with an error "Runaway argument" (see error message and minimal example below).

So here is my question: How can I either make biblatex ignore the abstract entries (as BibTeX does) since I do not need them in my LaTeX document or
tell biblatex to add an escape character automatically?

Or am I missing something here? Any help is appreciated! Thanks.

The error message is:

Runaway argument?
{Limit Cycle Walkers are bipeds that exhibit a stable cyclic gait wit\ETC.
! File ended while scanning use of \field.
<inserted text> 
                \par 
l.51 \begin{document}

! Undefined control sequence.
<argument> \blx@bbl@data 

Here is a minimal working example:

\documentclass{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[american]{babel}
\usepackage{graphicx}
\usepackage{amsmath} 
\usepackage{booktabs}
\usepackage[citestyle=authoryear,%numeric-comp, 
bibstyle=authoryear,%numeric
backend=biber,
natbib=true,
hyperref=false]{biblatex}
\bibliography{myref}
\listfiles
\begin{document}
 adsf asdf asdf asdf asdf asdf  asdf
\citep{Hobbelen2008b}

\printbibliography
\end{document}

with the corresponding conflicting entry (abstract shortened) given as:

@ARTICLE{Hobbelen2008b,
  author = {Hobbelen, D.G.E. and Wisse, M.},
  title = {{Ankle Actuation for Limit Cycle Walkers}},
  journal = {The International Journal of Robotics Research},
  year = {2008},
  volume = {27},
  pages = {709-735},
  number = {6},
  abstract = {Limit Cycle Walkers are bipeds that exhibit a stable ... by at  least 60%, without increasing ...
    of 5% of its leg length, while walking efficiently at a mechanical
    cost of transport of 0.09.}
}

(some other package versions: etoolbox v2.1, logreq v1.0)

Best Answer

As of biber 0.9.4/biblatex 1.6 you can define user-specified field and entrytype mappings. A special case of this is that you can map fields to null which essentially removes them from the input stream completely. So if for example, you want to just ignore all ABSTRACT fields in bibtex data sources (which are often the source of unwanted special chars when exported from automated systems), you can put this in your biber.conf:

<map>
  <bibtex>
   <globalfield>
     ABSTRACT BMAP_NULL
   </globalfield>
  </bibtex>
</map>

The nice thing about this is that you don't have to change the data source itself which is good if it's auto-generated and you don't have control over it. You can also ignore/map fields only in certain entrytypes. See the 0.9.4 biber manual, section 2.1.1.

EDIT: The config file format will change in Biber 0.9.8 because the current format is too restrictive. Mapping will be less confusing. Here is the same solution in the new format:

<config>
  <sourcemap>
    <maps datatype="bibtex" map_overwrite="1">
      <map>
        <map_step map_field_set="ABSTRACT" map_null="1"/>
      </map>
    </maps>
  </sourcemap>
</config>

With recent versions of biblatex and Biber you can put

\DeclareSourcemap{
  \maps[datatype=bibtex]{
    \map{
      \step[fieldset=abstract, null]
    }
  }
}

into your preamble to obtain the same result.

Related Question