I'm searching for a way to make biblatex only print URLs if there's no DOI specified (in my case the DOIs lead to a links in the refs anyhow, making the URL sort of redundant).
I came up with this (but it seems to cause an endless loop as compilation doesn't finish...):
\renewbibmacro*{url+urldate}{%
\iffieldundef{doi}
{\usebibmacro{url+urldate}}
{}%
}
it seems saving the macro with \let doesn't work due to the +...
any idea how to do this properly?
M(N)WEB:
\documentclass{article}
\usepackage[style=authoryear-comp]{biblatex}
\usepackage{hyperref}
%\renewbibmacro*{url+urldate}{%
% \iffieldundef{doi}
% {\usebibmacro{url+urldate}}
% {}%
%
\addbibresource{\jobname.bib}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book{key,
author = {Author, A.},
year = {2001},
title = {Title},
publisher = {Publisher},
archivePrefix = {arXiv},
arxivId = {1607.07249},
doi = {10.1007/978-3-319-49004-5_22},
eprint = {1607.07249},
url = {http://link.springer.com/10.1007/978-3-319-49004-5_22},
}
\end{filecontents}
\begin{document}
\nocite{*}
\printbibliography
\end{document}


url = {http://link.springer.com/10.1007/978-3-319-49004-5_22}. There is no need to escape special characters in URLs, indeed it has adverse effects to do so. – moewe Apr 24 '17 at 16:32