Exporting and Importing from BibTeX: urldate/Accessed and note/Extra

When I export to BibTex from Zotero, the records in the .bib file include these fields:
- urldate, which is populated from Accessed
- note, which is populated from Extra

However, when I import from a .bib file, the urldate and note fields are not imported.

I have tried renaming them Accessed and Extra, and they still don't get imported into Zotero.

Is there any way to get these fields to import?
  • Thank you. Are there any other ways? This resolves the extra/note issue. However, I am still having problems with urldate/accessed.

    Zotero exports the contents of accessed to urldate, but I cannot find a way to have data imported to the accessed field. I have tried:
    urldate (because that is what Zotero is exporting to)
    accessed (because that is a standard CSL variable)
    accessDate (mentioned in the BBT documentation)
  • If you want help with BBT you will have to open an issue on the project page on github. My support tooling is built around github issues.
  • I met the same problem. Zotero export the field "accessed date" to "urldate" in .bib. But the "urldate" is not imported to Zotero at all.

    Which keyword in .bib can be imported into Zotero's "accessed date"?
  • If you want help with BBT you will have to open an issue on the project page on github. My support tooling is built around github issues.
  • edited January 9, 2023
    Could I ask how to open an issue? And what link is the BBT's project page on github please ? thanks a lot!

    Strange why Zotero cannot inherently get “urldate” into “accessed date” while it exports “accessed date” to “urldate” .
  • Could I ask how to open an issue? And what link is the BBT's project page on github please ? thanks a lot!
    https://github.com/retorquere/zotero-better-bibtex/issues
    Strange why Zotero cannot inherently get “urldate” into “accessed date” while it exports “accessed date” to “urldate” .
    It's just an oversight.
  • What's an oversight? Are you saying this is an issue in Zotero proper or in BBT?

    If there's a bug in the core BibTeX translators we'd obviously want to fix that. Just sending someone to BBT with no context when they report something here isn't ideal.
  • Apologies. I meant an oversight in BBT.
  • thanks a lot @emilianoeheyns

    The issue is that no field from .bib can be imported into Zotero's "Accessed (accessed date)". I would think this should be an issue for Zotero's core translator, instead of relying on an extension (add-on) like BBT.

    As Zotero already exports "accessed" to BibTeX's "urldate", which is widely used by most .bst, it is reasonable to use "urldate" as the keyword from .bib to be imported into "Accessed", unless there are other reasons not allowing to use "urldate".

    Can we, as a user, to propose an issue for the core BibTeX translator of Zotero?
  • edited January 10, 2023
    Well what are you reporting? Are you reporting an issue with Zotero's built-in BibTeX export, or are you reporting an issue with an export using Better BibTeX? They're totally separate, unrelated translators.
  • edited January 10, 2023
    I am reporting an issue with Zotero's built-in BibTeX import.

    No field from .bib can be imported into Zotero's "Accessed (accessed date)".

    And I recommend to use "urldate" as the keyword in .bib to be imported into Zotero's "Accessed (accessed date)".

    Can we, as a user, propose an issue for the core BibTeX import translator of Zotero?
  • edited January 10, 2023
    It seems it already should import it: https://github.com/zotero/translators/blob/master/BibTeX.js#L457 (BBT already does too).
  • yeah, I have just tested accessed date roundtripping successfully in the stock BibTeX translator. Could you give an example that doesn't import properly?
  • Thanks for showing the BibTeX.js, but it does not work:

    @article{r2,
    author = {Brush, C},
    title = {Herzinfarkt Symptome},
    journal = {Family Business Review},
    url = {http://www.netdoktor.de/},
    year = {2011},
    urldate = {29 November 2011},
    volume = {29},
    pages = {45-73},
    language = {en},
    }

    @webpage{r42,
    author = {Kelley, D},
    title = {Global entrepreneurship},
    url = {http://www.gemconsortium.org},
    year = {2015},
    urldate = {Feb. 3, 2016},
    }

    If you import those, the "Accessed" in Zotero is blank. The "urldate" data is just thrown away.
  • edited January 10, 2023
    He's right, both for stock and BBT, but I don't think it's a translator issue. The error log says
    JavaScript Error: "Discarding invalid accessDate '29 November 2011' for item 1/null"
    which comes from the data/item.js, not the translator.

    edit: looks like accessDate must be a valid SQL datetime. Same when entered through the UI.
  • edited January 10, 2023
    Yeah, the field currently expects ISO dates (i.e. 2016-02-03, which is what Zotero exports). We could try to be more accomodating, but (understanding that regular BibTeX doesn't actually have the concept of urldate) should we be? Shouldn't dates in urldate and lastaccessed be in ISO format?

    edit: on a technical level this wouldn't be hard to address: it'd just be ZU.strToISO on the date
  • edited January 10, 2023
    Personally I'd follow the robustness principle. Be lenient in what you accept, be strict in what you dish out. bibtex is also often (ab)used as a data exchange format, and this is what @miyalatex found in the wild I take it.

    edit: upcoming version of BBT will parse the urldate to ISOdate or preserve it in the extra field it it can't.
  • It is good to know the reason of failure is the format restriction, having to be 2016-02-03.

    Many BibTeX style .bst files use the keyword "urldate" from .bib, and will add strings like "Accessed: " before the "urldate" string, to form the final output in .pdf, such as "Accessed: Feb. 3, 2016", or in other textual format such as "29 November 2011" etc.

    As few journals like the format of "Accessed 2016-02-03", most .bib are not using the format "2016-02-03" in "urldate".

    So it is quite necessary to be able to accept normal textual date format in "urldate".
  • OK, we'll do that in stock BibTeX as well.
  • Thank you both, look forward to the new version.
  • BBT has been updated.
Sign In or Register to comment.