# Reference error “Warning--empty year in (…); set to ”????“”

I am new to latex/bibtex, and I can't figure out where this error is coming from. I generated a .bib file from a Zotero collection, and try to generate a bibliography in my latex document. However, the references generated in the document fail to get the year of publication correctly, all though it is present in the .bib file.

The reduced .bib file looks like this:

@article{packham_interactive_2005,
title = {Interactive Visualisation for Decision Support and Evaluation of Robustness—in Theory and in Practice},
volume = {19},
issn = {1474-0346},
url = {http://www.sciencedirect.com/science/article/pii/S1474034605000613},
doi = {10.1016/j.aei.2005.07.006},
timestamp = {2016-04-06T06:59:27Z},
number = {4},
series = {Computing in Civil Engineering11th International Workshop of the European Group for Intelligent Computing in Engineering},
author = {Packham, I. S. J. and Rafiq, M. Y. and Borthwick, M. F. and Denham, S. L.},
urldate = {2016-04-06},
date = {2005-10},
pages = {263--280},
note = {00019},
keywords = {decision support,Genetic algorithms,Interactive visualisation,Knowledge discovery,Robustness evaluation},
}


And I am generating the bibliography like in the following MWE(I tried 2 different styles, one from the elsevier template, and one available here (http://www.frontiersin.org/Design/bst/frontiersinSCNS_ENG_HUMS.bst) which both fail to load years):

\documentclass[preprint,12pt]{elsarticle}

\begin{document}

fermentum \cite{packham_interactive_2005}

\section{References}
%\bibliographystyle{model1-num-names}
\bibliographystyle{frontiersinSCNS_ENG_HUMS}
\bibliography{Interactive_Optimization}

\end{document}


[2] I. S. J. Packham, M. Y. Raq, M. F. Borthwick, S. L. Denham, Interactive visualisation for decision support and evaluation of robustness|in theory and in practice 19 (????) 263{280. 00019.

A first compilation highlighted the following error: Warning--empty year in (...); set to ???? And now, no more errors are displayed, although the years are still represented by (????) instead of "2005".

Am I missing something? Is this a problem with the bib style I am using? Or with the bib file I generated from Zotero? Any clues on how to fix it? Note that I also tried changing the label in the bib file from "date" to "year", without solving the issue. Thanks for any help!

• Can you please add a minimal working example with bibliography (MWEB)? Can you reproduce the problem with a commonly available bib style? Otherwise can you please point us to where we can get these styles from? – user36296 Dec 17 '16 at 0:56
• Thanks for replying. I added a MWE which produces the same error. Sorry, got a bit lost creating the MWEB though, hope the separate bib example will be enough. I added a link to the style I used, as not sure where to find other "common" styles. Thanks if you have any further tips! – sc28 Dec 17 '16 at 2:06
• @samcarter, sorry, couldn't edit my previous comment to include your name :') – sc28 Dec 17 '16 at 2:08

As the Zotero complement to Ross's answer (which is imo correct on the bibtex, though I'm pretty sure underscores in citekeys are fine), note that Zotero can export both BibLaTeX and BibTeX. This is also true for the Bettter BibTeX add-on which you may be using (and if not should consider). Your MWE is from a BibLaTeX export. Zotero's BibTeX export will do exactly the things that Ross fixed for you in the MWE automatically: correctly separate out the date into year and month fields. (It will also do a couple of other things differently that align more closely with standard bibtex).

• Thank you! Indeed I wasn't aware of this difference between the Better BibTex and BibLaTeX exports. With bibtex, my problem was solved. I confirm also that the underscores work fine. – sc28 Dec 18 '16 at 13:03

I wish to point out that you are using Elsevier's class file, elsarticle.cls, with a bst file prepared for a Springer journal. It is hard to imagine that is your deliberate intention. If you are preparing a paper for one of those publishers, you need to review their instructions.

Nevertheless, the critical thing that makes your MWE work is to recognize that the frontiersinSCNS_ENG_HUMS file is an authoryear style. This means you need to tell the elsarticle class that you are using authoryear. This is done by adding that option to the the class options. To solve the empty year warning, just add year = {2005} to the bibitem.

I also removed dashes and underscores from file names and bibitem keys. These are fine in BibLaTeX, but I think they create problems here. There may be another error in the bibitem somewhere. I finished up pasting in into JabRef, running Cleanup Entry and pasting it back into the MWE.

The MWE and result are as follows:

\documentclass[preprint,authoryear]{elsarticle}

\begin{filecontents*}{InteractiveOptimization.bib}
@Article{packham05,
author       = {Packham, I. S. J. and Rafiq, M. Y. and Borthwick, M. F. and Denham, S. L.},
title        = {Interactive Visualisation for Decision Support and Evaluation of Robustness---in Theory and in Practice},
year         = {2005},
volume       = {19},
number       = {4},
pages        = {263--280},
note         = {00019},
date         = {2005-10},
doi          = {10.1016/j.aei.2005.07.006},
issn         = {1474-0346},
keywords     = {decision support,Genetic algorithms,Interactive visualisation,Knowledge discovery,Robustness evaluation},
series       = {Computing in Civil Engineering11th International Workshop of the European Group for Intelligent Computing in Engineering},
timestamp    = {2016-04-06T06:59:27Z},
url          = {http://www.sciencedirect.com/science/article/pii/S1474034605000613},
urldate      = {2016-04-06},
}
\end{filecontents*}

\begin{document}

fermentum \citep{packham05}

%\section{References}
%\bibliographystyle{model1-num-names}
\bibliographystyle{frontiersinSCNS_ENG_HUMS}
\bibliography{InteractiveOptimization}

\end{document}


• Many thanks! Your answer was very helpful to understand a bit better what is going on. @adam.smith 's answer below complemented well, indicating that a Better BibTex export of the bib file has the correct format, as you manually fixed in my MWE. I think the error was coming from the Better BibLatex export. – sc28 Dec 18 '16 at 12:58
• However, though interesting to note that authoryear should be indicated as a class option, I found that the style I am using can in fact also work without that option (just plain numbered e.g. [1]), so I don't think that was the main issue here. Thanks anyway! – sc28 Dec 18 '16 at 13:01