# URL date access missing

I am using a Mendeley bibtex file in my LaTex document and my citations include journal articles and websites. When I compile my document, the bibliography entry for the website does not show the 'URL date accessed'. Can you advise on how I can include this please?

I attach my bibtex code, bibliography file and pdf output. I am using Texworks (version 0.6.2) downloaded from MikTex (version 2.9)

LaTex doc.

\documentclass[a4paper,12pt]{article}
\bibliographystyle{plain}
\begin{document}
Test 1
\cite{Nature2017}

\bibliography{library}
\end{document}

Bibtex

@misc{Nature2017,
howpublished = {https://www.nature.com/nature/},
title = {{Nature}},
url = {https://www.nature.com/nature/},
urldate = {02/12/17}
}

I can't seem to find a solution online so any help you can give will be greatly appreciated!

• The plain bibliography style has been around, more or less unchanged, since the mid-1980s. Unsurprisingly, then, it wasn't programmed to process fields called url and urldate. (What's being picked up in your formatted bib entry is the field howpublished.) You should be using a more recent bibliography style, say, plainnat (and load the natbib bibliography style). – Mico Dec 2 '17 at 20:04
• Are you maybe required to use the plain bibliography style? Please advise. – Mico Dec 2 '17 at 20:08

The plain bibliography style is one of the "orginal" BibTeX bibliography styles, and it's been around more or less unchanged since the mid-1980s. As such, it wasn't set up to do anything with fields called url and urldate, in no small part because the Internet didn't even exist yet and acronyms such as URL were but an idea in Tim Berners-Lee's mind. Do consider using a more modern bibliography style, i.e., one that at least recognizes the field url.

Assuming that, for some reason, you're stuck with having to use the plain bibliography style, I suggest you transfer the contents of both the url and urldate fields to a field called notes (and lose the howpublished field, since it just repeats the URL-related information). And, be sure to load the url and/or hyperref packages in order to activate the \url macro.

\RequirePackage{filecontents}
\begin{filecontents}{library.bib}
@misc{Nature2017,
title = {Nature},
note  = {\url{https://www.nature.com/nature/}, last accessed on 02/12/17},
}
\end{filecontents}

\documentclass[a4paper,12pt]{article}
\bibliographystyle{plain}
\usepackage[hyphens,spaces]{url}

\begin{document}
\cite{Nature2017}
\bibliography{library}
\end{document}
• Thanks Mico. I'm quite new to LaTex and using it for the first time so I haven't looked around for a better style yet. Are you able to suggest a good style for thesis writing? If I were to keep using 'plain', do I need to have my citation details in the same .tex document? – Kevin Dec 2 '17 at 21:30
• @Kevin - Your real bib entries should always be in a file with extension .bib. (The filecontents route shown above, which created a file called library.bib "on the fly", was used just to make the code self-contained.) Not knowing what your university's (or department's) formatting guidelines are, I really can't make a meaningful, let alone authoritative, recommendation. It really depends on your college or university. – Mico Dec 2 '17 at 21:56

Use package biblatex and program biber which make more sense:

\RequirePackage{filecontents}
\begin{filecontents*}{library.bib}
@online{Nature2017,
editor = {Philip Campbell},
publisher={Macmillan Publishers Ltd.},
title = {Nature},
location={Great Britain},
url = {https://www.nature.com/nature/},
urldate = {2017-12-02},
}
\end{filecontents*}
\documentclass{article}
\usepackage{biblatex}
\begin{document}
Test 1
\cite{Nature2017}

\printbibliography
\end{document}

• Thanks Herbert. I tried your suggestion but I can't get the same result. I am using Mendeley which only produces a bibtex file. Does biblatex and biber work with Mendeley? – Kevin Dec 2 '17 at 21:37
• Mendeley should be able to export a correct BibTeX file. See bar54.de/2014/02/mendeley-and-latex-bibtex: 2. Biber – user2478 Dec 2 '17 at 22:02

For anyone who struggles with this, some more explanation:

It works with mendely without making much alterations in the bibtex file, as many suggested. LaTex reads "urldate" as Year-Month-Day. So this the the entry format in mendely using "date accessed".

In the case above: In mendely, enter at "date accessed" : 2017-12-02

Or directly change it in the Bibtex file: urldate = {02/12/17} should be: (in european format): urldate = {2017-12-02}

This will show up in the reference list as (visisted on 02/12/2017)

Hope this helps!

https://www.mendeley.com/guides/web-citation-guide

• I suppose you should write "mendeley" instead of "mendely". I don't know if it is true, so I don't edit your answer. Anyways, welcome to TeX.SE. – user156344 Feb 26 '19 at 17:12