Error with percent sign in bib entry field when using biblatex/biber
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.
Your second request -- automatically adding an escape character to percent signs -- is not possible. Quoting from the biber manual:
[P]lease note that biber will not attempt to sanitise the content of
bibtex
data sources. That is, don’t expect it to auto-escape any TeX special characters like ‘&’ or ‘%’ which it finds in, for example, your TITLE fields. It used to do this in earlier versions in some cases but as of version 0.9, it doesn’t because it’s fraught with problems and leads to inconsistent expectations and behaviour between different data source types. In yourbibtex
data sources, please make sure your entries are legal TeX code.