2

BibTex is having issues with default three-letter abbreviations for months. I'm using overleaf and the mdpi template, as well as Zotero for managing my references. However, Overleaf is having some issues with the BibTex generated by Zotero. Months are not displayed in the bibliography at all, even though the month field is filled in in the .bib file. Overleaf gives an error of "BibTex: string name "jul" is undefined", but for basically every month of the year.

Here is a sample entry from the BibTex:

@article{yangSegStereoExploitingSemantic2018,
    title = {{SegStereo}: {Exploiting} {Semantic} {Information} for {Disparity} {Estimation}},
    shorttitle = {{SegStereo}},
    url = {http://arxiv.org/abs/1807.11699},
    language = {en},
    urldate = {2021-06-30},
    journal = {arXiv:1807.11699 [cs]},
    author = {Yang, Guorun and Zhao, Hengshuang and Shi, Jianping and Deng, Zhidong and Jia, Jiaya},
    month = jul,
    year = {2018},
    note = {arXiv: 1807.11699},
    keywords = {Computer Science - Computer Vision and Pattern Recognition, Sensors Paper},
}

Any advice on how to fix this is greatly appreciated.

3
  • 1
    What bibliography style are you using? It must define the strings for the months, which are not hardwired in BibTeX.
    – egreg
    Nov 1, 2021 at 11:00
  • You can also consider just removing the month information, it is not so relevant (anymore) for finding the actual paper or to put the reference into perspective (old vs. new). One could say that this is the case for almost all bibliographic information nowadays, just the title is usually sufficient to unambiguously find the paper online, but even if you value complete bibliographies for some reason, then the month adds very little value and is often not included in my experience.
    – Marijn
    Nov 1, 2021 at 11:41
  • Thank you both for your help. Yes, I'm aware that it's common to just drop the month nowadays, but in my opinion, if the info is already in the reference manager, then why not use it in the bibliography. @egreg thanks, yes, that was the issue. I thought they were defined by default in BibTex. I added them to the .bst file, and now it works like a charm. Nov 2, 2021 at 17:17

1 Answer 1

3

If you look into plain.bst, the basic bibliography style of BibTeX, you'll find

MACRO {jan} {"January"}
MACRO {feb} {"February"}
MACRO {mar} {"March"}
MACRO {apr} {"April"}
MACRO {may} {"May"}
MACRO {jun} {"June"}
MACRO {jul} {"July"}
MACRO {aug} {"August"}
MACRO {sep} {"September"}
MACRO {oct} {"October"}
MACRO {nov} {"November"}
MACRO {dec} {"December"}

which means that the style must define those macros. In BibTeX syntax, something like

month=mar,

without braces or quotes is interpreted as giving a macro as value (because the value consists of letters).

However, if the style file doesn't define those macros, you can add them in your .bib file via @string. Here's a bit contrived example, you'll need just to add the strings for the common months.

\begin{filecontents*}{\jobname.bib}
@string{therm="Th\'ermidore"}
@article{test,
  title={Title},
  author={A. Uthor},
  Journal={Journal},
  year=2021,
  month=therm,
  pages={1--31}
}
\end{filecontents*}

\documentclass{article}

\begin{document}

\cite{test}

\bibliographystyle{plain}
\bibliography{\jobname}

\end{document}

enter image description here

1
  • thanks, I already got this from your previous comment, but good to document it in full detail. Thanks again! Nov 2, 2021 at 17:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .