You can do this via mapping of datasources. The \DeclareSourcemap
command
\DeclareSourcemap{
\maps[datatype=bibtex]{
\map{
\step[fieldsource=url,final]
\step[fieldset=doi,null]
}
}
}
processes any bibtex
input data and for each item in the bibliograhpy file it executes a number of commands given by \step
:
the first step fieldsource
checks the url
field
- the instruction
final
means processing of the current entry is terminated if this field is empty or does not exist
otherwise the next step fieldset=doi,null
is executed; this clears the doi
field, in fact it makes it look as if there was never a doi
field in the input.
The result of this is that all biber/biblatex
sees is an entry with either a url
field or a doi
field, but not both.
This has the advantage that you don't need to know how the particular biblatex
style chooses to process these fields.

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[backend=biber]{biblatex}
\addbibresource{\jobname.bib}
\DeclareSourcemap{
\maps[datatype=bibtex]{
\map{
\step[fieldsource=url,final]
\step[fieldset=doi,null]
}
}
}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@Article{Akbulut-S:deformations-G2,
author = {Akbulut, Selman and Salur, Sema},
title = {Deformations in {$G_2$} manifolds},
journal = {Adv. Math.},
volume = 217,
year = 2008,
number = 5,
pages = {2130--2140},
issn = {0001-8708},
doi = {10.1016/j.aim.2007.09.009},
url = {http://dx.doi.org/10.1016/j.aim.2007.09.009}
}
@Article{Akbulut-S:deformations-G22,
author = {Akbulut, Selman and Salur, Sema},
title = {Deformations in {$G_2$} manifolds},
journal = {Adv. Math.},
volume = 217,
year = 2008,
number = 5,
pages = {2130--2140},
issn = {0001-8708},
url = {http://dx.doi.org/10.1016/j.aim.2007.09.009}
}
@Article{Akbulut-S:deformations-G23,
author = {Akbulut, Selman and Salur, Sema},
title = {Deformations in {$G_2$} manifolds},
journal = {Adv. Math.},
volume = 217,
year = 2008,
number = 5,
pages = {2130--2140},
issn = {0001-8708},
doi = {10.1016/j.aim.2007.09.009},
}
\end{filecontents}
\begin{document}
\nocite{*}
\printbibliography
\end{document}