Ignore a bibliography field [e.g. "urldate"] for eliminating of biblatex/biber warnings
biblatex
rightly warns you about a not well-formed field format, so the best solution is to do away with that and use the proper date format yyyy-mm-dd
; since you use a citation manager that should be as easy as telling the citation manager to export the date properly (I have no idea how hard that actually is.).
Since you do not want to do this - and since you do not need the urldate
field anyway, one solution is to just do away with the field \AtEveryBibitem{\clearfield{urlyear}}
, but this of course still issues warnings, because, technically, biber
is still processing the field (and still notices it is not well-formed). Note that you don't use \clearfield{urldate}
here, because biblatex
decomposes date fields into their year, month and day parts - it is enough to delete the year to suppress the output of the field.
To get rid of the errors, we need to prevent biber
from seeing the bad field, so we just add
\DeclareSourcemap{
\maps[datatype=bibtex]{
\map[overwrite=true]{
\step[fieldset=urldate, null]
}
}
}
to our preamble. This will tell biber
to discard the urldate
field without even properly looking at it.
In my test run this MWE did not complain at all
\begin{filecontents*}{bibliograp.bib}
@BOOK{Ab_Steg,
author = "M. Abramowitz and I. A. Stegun",
title = {Handbook of mathematical functions},
publisher = "Dover publications",
year = "1965",
urldate = {15.10.2013},
language="English" }
\end{filecontents*}
\documentclass[11pt,onecolumn,twoside]{scrbook}
\usepackage[style=numeric-comp,
backend=biber,
date=short,
firstinits=true,
language=english]{biblatex}
\AtEveryBibitem{\clearlist{abstract}}
\addbibresource[datatype=bibtex]{bibliograp.bib}
\DeclareSourcemap{
\maps[datatype=bibtex]{
\map[overwrite=true]{
\step[fieldset=urldate, null]
}
}
}
\begin{document}
hello world \cite{Ab_Steg}
\printbibliography
\end{document}
One positive effect is that you can get rid of \AtEveryBibitem{\clearfield{urlyear}
since that field is ignored further down the road (assuming we're travelling uphill here).
Here is possibly another way for ignoring the warnings; those come from a \warn
command in the .bbl
file:
$ sed -n '/\\warn/p' my_new_article.bbl
\warn{\item Overwriting field 'year' with year value from field 'date' for entry 'author2001paper'}
\warn{\item Overwriting field 'month' with month value from field 'date' for entry 'author2001paper'}
\warn{\item Overwriting field 'year' with year value from field 'date' for entry 'author2002paper'}
...
Clearly, if we get rid of these lines, we shouldn't be troubled by the warnings in Latex runs anymore; the above sed
statement already prints confirming that our match regex is right; all we need to do is to D
elete lines (to newline) and save an in-place replacement of the file:
sed -i '/\\warn/D' my_new_article.bbl
Then when I run pdflatex my_new_article.tex
, I don't see those warnings anymore. Of course, this has to be done after each time you've ran biber
or bibtex
to re-generate the .bbl
file (but it could pay off, if you tend to run latex
more often than bibtex
/biber
)