This question is probably a home-run for people that are more into the workings of biblatex than me...
Anyway, I want to achieve what has been solved here and here, but with using biblatex-chicago
instead of biblatex
. That means the URL should be suppressed whenever a DOI is present in the reference. Note: In the original questions it was the other way round.
The MWE of karlkoeller will not work as soon as I replace biblatex
:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[backend=biber]{biblatex-chicago}
\addbibresource{\jobname.bib}
\renewbibmacro*{doi+eprint+url}{%
\iftoggle{bbx:doi}
{\iffieldundef{url}{\printfield{doi}}{}}
{}%
\newunit\newblock
\iftoggle{bbx:eprint}
{\usebibmacro{eprint}}
{}%
\newunit\newblock
\iftoggle{bbx:url}
{\usebibmacro{url+urldate}}
{}}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{kastenholz1,
hyphenation = {american},
author = {Kastenholz, M. A. and H{\"u}nenberger, Philippe H.},
indextitle = {Computation of ionic solvation free energies},
title = {Computation of methodology\hyphen independent ionic solvation free
energies from molecular simulations},
subtitle = {I. The electrostatic potential in molecular liquids},
journaltitle = jchph,
volume = {124},
eid = {124106},
date = {2006},
url = {http://dx.doi.org/10.1063/1.2172593},
urldate = {2006-10-01},
doi = {10.1063/1.2172593},
}
@article{kastenholz2,
hyphenation = {american},
author = {Kastenholz, M. A. and H{\"u}nenberger, Philippe H.},
indextitle = {Computation of ionic solvation free energies},
title = {Computation of methodology\hyphen independent ionic solvation free
energies from molecular simulations},
subtitle = {I. The electrostatic potential in molecular liquids},
journaltitle = jchph,
volume = {124},
eid = {124106},
date = {2006},
doi = {10.1063/1.2172593},
}
\end{filecontents}
\begin{document}
\nocite{*}
\printbibliography
\end{document}
Output:
Who can help, please?