# Remove period between DOI and urldate

Whenever a DOI is available, I provide it instead of a URL in my bibliography. In both cases, I need to provide the access date (urldate field) as well. My problem: biblatex puts a period after the DOI, so that the ensuing visited on is capitalized, but no period after the URL (so no capitalization). This does not look homogenous.

How can I remove the period after the DOI?

MWE:

\documentclass{article}

\usepackage[
backend = biber,
style = authortitle,
]{biblatex}

\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@article{a,
author = {Lily},
title = {Trees},
journaltitle = {Journal of Trees},
year = {2015},
url = {www.trees.com},
urldate = {2016-11-21},
}

@article{b,
author = {John},
title = {Flowers},
journaltitle = {Journal of Flowers},
year = {2015},
doi = {17.7-31893.23},
urldate = {2016-11-21},
}
\end{filecontents*}

\begin{document}
\nocite{*}
\printbibliography
\end{document}


Here you are. Just redefine the bibmacro doi+eprint+url:

\documentclass{article}

\usepackage[
backend = biber,
style = authortitle,
]{biblatex}

\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@article{a,
author = {Lily},
title = {Trees},
journaltitle = {Journal of Trees},
year = {2015},
url = {www.trees.com},
urldate = {2016-11-21},
}

@article{b,
author = {John},
title = {Flowers},
journaltitle = {Journal of Flowers},
year = {2015},
doi = {17.7-31893.23},
urldate = {2016-11-21},
}
\end{filecontents*}

\renewbibmacro*{doi+eprint+url}{%
\iftoggle{bbx:doi}
{\printfield{doi}}
{}%
\newunit\newblock
\iftoggle{bbx:eprint}
{\usebibmacro{eprint}}
{}%

• Thanks, perfect! I had gotten to the doi+eprint+url bibmacro, but didn’t know how to modify it. (I guess I could have put that in the question as well.) So you changed \newunit\newblock to \setunit{\addspace}\newblock. Looks like I’ll have to read up on units and blocks in biblatex, or is there a simple explanation of these concepts? – doncherry Nov 21 '16 at 21:29
• It's fairly simple: units are groups in the bibliography, and they're separated by a default punctuation ( \adddot\addspace). It's explained in §4.7 of the documentation, pp. 209–213. – Bernard Nov 21 '16 at 21:36