Bibtex export - Date and Year

I have recently found that .bib exports by zotero use the field "date" instead of "year", see example below, resulting in all my cites showing the message "(n. d.)" which stands for "no date".

This seems really odd to me as I thought the "year" and "month" fields were pretty standard.

Can this behaviour be changed so that the output shows the "year"?
Will zotero fix this, in my opinion, issue in future versions?

Example:

@article{martinez_introducing_2014,
title = {Introducing the Levinthal’s Protein Folding Paradox and Its Solution},
volume = {91},
issn = {0021-9584, 1938-1328},
url = {http://pubs.acs.org/doi/abs/10.1021/ed300302h},
doi = {10.1021/ed300302h},
pages = {1918--1923},
number = {11},
journaltitle = {Journal of Chemical Education},
author = {Martínez, Leandro},
urldate = {2015-04-14},
date = {2014-11-11},
langid = {english}
}
  • do you have better bibtex installed? I think that might default to date, which works with some bibtex flavors and, especially biblatex. Zotero exports year, month, day.
  • Well this is embarrassing... I had accidentally set Zotero to export as BibLatex, missclicked I guess. Better Bibtex was actually not necessary but it does provide with a lot of useful tweaks so, every cloud has a silver lining.

    Thanks a lot!
  • zotero (without better_bibtex) is exporting date and journaltitle, instead of year and journal. this seems to be confusing my Docear import (stand-alone jabref reads the entries just fine) and it does not recognize the year or journal entries. is there a way to fix this in the export?
  • I suspect that you're using the BibLaTeX translator rather than the BibTeX translator.
  • ugh, you are right! my bad. thanks for finding my silly mistake!
  • Better BibTeX has started exporting the month and year field for BibTeX if it can find those data points.
  • Using Better BibLatex export, only Date is generated (no Year). Sometimes these Date entries have Year-Month-Date and sometimes they have just Year.

    My question is, will Latex, using BibLatex in Author-Year style, pick up the year information from both Year-Month-Dates and Year-only dates? Or, will it complain that no Year entry was found?

    Thanks.
  • Using Better BibLatex export, only Date is generated (no Year). Sometimes these Date entries have Year-Month-Date and sometimes they have just Year.
    that is the correct behavior for BibLaTex. While it reads Year/Month/Day fields (I believe), a single Date field is preferred/prescribed by the standard. The question above was for bibtex.

    Because of that, the answer to your second question is that it will work correctly for author-year styles regardless of whether the field is year only or has complete dates.
  • Thanks Adam.

    A quick follow-up, if you don't mind: Within Latex, using BibLatex, does it matter whether the bbl file was exported under Better BibLatex or Better Bibtex?

    Thanks again.
  • yes it does. Better BibLaTeX will work better.
  • I'm encountering this issue. Note: I have the latest Zotero (5.0.96.2) and have installed the latest Better Bibtex (5.4.25).

    The Default Format for a manual export is set to BibTeX. This format includes the Year and Journal entries. However, the automatic BibTex export does not, and instead provided the entries 'Date' and Journaltitle' instead - which when compiling my LaTeX file emits the actual years and publication title.

    Does anyone have any suggestions?
  • For automatic exports you select the format when you set it up at first export. If you export over your existing file, but choose better bibtex rather than better biblatex, check "keep updated", and export, the existing auto-export will be replaced. Or you can remove it from the preferences and set it up anew using the same procedure.
  • Hi, just confirming: Exporting through BBT as "Better BibTeX" instead of "Better BibLaTeX" uses 'year' instead of 'date'.
  • @Zorozero you just helped me solve a problem that I was stuck on for the past hour. Thank you!

    For others facing this problem, my bibliography was missing the year, even though I could see my .tex file included dates YYYY-MM-DD, and therefore my citations were also missing the year. I thought it was an issue within my Overleaf document (e.g. bibliographystyle, setcitestyle commands), but in fact, I just had to import BibTeX instead of BibLaTeX! Silly me!
  • edited July 28, 2023
    @erush91: Great. The simple "search and replace" of date with year should work, too. Of course if you bib is ~1000 entries with names that include "year" or "date" often, this is a new challenge.

    I face a new problem now.

    The BibTeX export will kill the hyperurl-ability. Both exports (BibLaTeX or BibTeX) contain the exact same attribute 'url', only BibLaTeX export will work. In fact I have a complete mess right now, need to go 10 steps back.

    Update on my own behalf, 15 Mins later.

    BibLaTeX does not work (is incompatible) with RevTeX, or vice versa.
  • BBT offers a few options for exporting urls in bibtex exports. Biblatex simply supports url fields, so there's nothing special to do there.

    What revtex expects I don't know - if it is its own processor, I might have to look at that at some point, but in the interim you can almost certainly get what you want with a postscript.
  • For those using Better BibTex, I found a fix that allows to export a collection with BibLaTex and have a year field.
    To achieve that go to Edit > Settings > Advanced > Config Editor. Then click Accept the Risk and Continue the search for this setting `extensions.zotero.translators.better-bibtex.biblatexExtendedDateFormat` and set it to false.
Sign In or Register to comment.