25

I have the following in .bib file:

@online{solarfarm, 
author = {Buckley, Alastair and nee Hall, Lisa Clark and {Colantuono, Giuseppe Everard}, Aldous}, 
file = {:Users/Desktop/Downloaded/85c4687c.html:html}, 
title = {{The Sheffield Solar Farm}}, 
Howpublished = {\url{http://www.sheffieldsolarfarm.group.shef.ac.uk/solar-panel-data}}, 
url = {\url{http://www.sheffieldsolarfarm.group.shef.ac.uk/solar-panel-data}}, 
urldate = {16/5/2013} 
}

but I can't get the date retrieved or date accessed to work, it never shows up in references.

MWE:

\documentclass[12pt,a4paper]{report}
\begin{document}
\renewcommand\bibname{References} 
\bibliographystyle{abbrv}    
\bibliography{library}  
\end{document}
  • The abbrv style doesn't know those fields. – egreg Apr 30 '13 at 20:24
  • Agree with @MarcoDaniel , note field is useful for date accessed. e.g. in harvard system simply enter [Date accessed: 2013]. – oLas Apr 30 '13 at 20:40
  • @oLas Where is Note field ? – Razor Apr 30 '13 at 20:44
  • @egreg I want to order them alphabetically though – Razor Apr 30 '13 at 20:44
  • 1
    see the link from @MarcoDaniel, I'm confident this will answer your question, if it does I'm sure an upvote would be appreciated over there! – oLas Apr 30 '13 at 20:52
17

Your question is not clear. Do you want to use package biblatex or not? Some of your comments make me think you mixed up BibTeX, biblatex and principles of building bib files.

The following MWE shows you the usage of biblatex with some package options to controll the layout of your bibliography. What you at last need you can read in the manual of package biblatex, try texdoc biblatex.

Please have a look on the comments in my MWE.

\RequirePackage{filecontents}
\begin{filecontents}{\jobname.bib}
@online{solarfarm, 
  author  = {Buckley, Alastair and nee Hall, Lisa Clark and {Colantuono, Giuseppe Everard}, Aldous}, 
  file    = {:Users/Desktop/Downloaded/85c4687c.html:html}, 
  title   = {{The Sheffield Solar Farm}}, 
  url     = {http://www.sheffieldsolarfarm.group.shef.ac.uk/solar-panel-data}, 
  urldate = {2013-05-16}, 
}
\end{filecontents}


\documentclass[12pt,a4paper]{article}
\usepackage[%
  backend=bibtex      % biber or bibtex
%,style=authoryear    % Alphabeticalsch
 ,style=numeric-comp  % numerical-compressed
 ,sorting=none        % no sorting
 ,sortcites=true      % some other example options ...
 ,block=none
 ,indexing=false
 ,citereset=none
 ,isbn=true
 ,url=true
 ,doi=true            % prints doi
 ,natbib=true         % if you need natbib functions
]{biblatex}
\addbibresource{\jobname.bib}  % better than \bibliography

\begin{document}
Text \cite{solarfarm} Text.
\printbibliography
\end{document}

The result will be: enter image description here

  • Is it possible to change the american date formate 05/16/2013 to a european format: 16.05.2013? – Zwähnia Jun 24 '13 at 16:02
  • 1
    @Sorry, was offline. Try package isodate. – Mensch Jun 26 '13 at 18:33
9

you say you want to make biblatex use the urldate field, but the most important thing seems to be missing from your example: \usepackage{biblatex}. ...if you really want to use biblatex: your MWE and your question (title, tags) provide conflicting information.

\documentclass[12pt,a4paper]{article}
\usepackage[sorting=nyt,firstinits=true]{biblatex}
\usepackage{filecontents}

\begin{filecontents}{testbib.bib}
@online{solarfarm,
author = {Buckley, Alastair and nee Hall, Lisa Clark and {Colantuono, Giuseppe Everard}, Aldous},
file = {:Users/Desktop/Downloaded/85c4687c.html:html},
title = {{The Sheffield Solar Farm}},
url = {http://www.sheffieldsolarfarm.group.shef.ac.uk/solar-panel-data},
urldate = {2013-05-16}
}
@online{solarfarm2,
author = {Auckley, Alastair and nee Hall, Lisa Clark and {Colantuono, Giuseppe Everard}, Aldous},
file = {:Users/Desktop/Downloaded/85c4687c.html:html},
title = {{The Sheffield Solar Farm}},
url = {http://www.sheffieldsolarfarm.group.shef.ac.uk/solar-panel-data},
urldate = {2013-05-16}
}
\end{filecontents}

\bibliography{testbib.bib}

\begin{document}
\cite{solarfarm}
\cite{solarfarm2}
\printbibliography
\end{document}

Biblatex will print the URL's date automatically, so if an urldate field is present, no further action is required. enter image description here

  • But I want to use the .bib file, not manually insert it there – Razor Apr 30 '13 at 20:40
  • sure, but you're the only one who actually has your bib file. We need to create it via filecontents, for testing and demonstration purposes. You may simply remove that section. In other words: that filecontents section has nothing to do with the problem your question relates to. It's all about properly loading the biblatex package. – Nils L Apr 30 '13 at 20:46
  • ...unless that biblatex in your question title is a mistake, i.e. you're not intending to use biblatex at all. – Nils L Apr 30 '13 at 20:54
  • I tried adding that package and I get an error saying that the .bbl file was not created by biblatex .. I'm using Mendeley to organise my references. Is that causing a problem ? – Razor Apr 30 '13 at 20:57
  • don't know much about Mendeley, but if that's the tool that creates your .bib files, that's not going to cause that problem. The .bbl file might be a leftover from the time before you inserted biblatex. You can safely delete it (it's a temporary file that's re-created as required), and thus give biblatex a chance to create a new one that it can work with. – Nils L Apr 30 '13 at 21:02

Not the answer you're looking for? Browse other questions tagged or ask your own question.