Bibtex export doesn't contain journal abbreviations

Hi,

First let me say Zotero is amazingly useful! That said, I'm having difficulty exporting my collection to bibtex format and including the journal abbreviation. (Actions->Export Library...->Bibtex).

I intend to publish in Image and Vision Computing and they require journal references to be in abbreviated format. Is there anyway that I can select which format to use (full or abbreviated) on the export? I don't mind digging around through xml and js files or amending the database directly and I feel it might be useful functionality to include.

I'm sure I'm not the only person to have experienced this issue, so apologies if I'm bringing up something with an obvious solution or workaround, but I haven't been able to find anything related on this forum.

Any pointers greatly appreciated - I'm using 1.5beta btw,

Jim
  • This is an issue with most reference management software, as there is no standard way in BibTeX to store both full journal names & (multiple!) abbreviations used for them. You'd have to modify the BibTeX.js translator to export the abbreviated names. My preferred solution is to leave full names intact & to use another BibTeX manager to handle abbreviated names. JabRef, for example, can convert to ISO/Medline abbreviations.
  • If you are contributing to this journal a lot and you submit them the contents of a bbl (rather than your BibTeX database), you might use custom-bib & generate your own .bst file that uses abbreviations. It is too much work for a single paper, but it is a useful resource to have. I don't know if BibLaTeX has a good solution to this problem.
  • Thanks a lot for the replies. I've literally just found bibtex.js and amended it to do what I want in doExport(). I'll just keep 2 versions of the file - one to output full length journal names, the other abbreviated. Not perfect, especially as I'll forget about it when I do an update, but I understand that this isn't a simple problem!
  • This is a bit off-topic, but I'm hoping to get Zotero to use (and maybe contribute to) this new in-development service. Some, but not all. of the data includes short titles.
  • but I'm hoping to get Zotero to use (and maybe contribute to) this new in-development service
    Is that meant to act as a lookup service? Will it be able to handle all the traffic Zotero users will generate if Zotero will use it to find complementary journal titles and journal title abbreviations for items?
  • The data will be totally open, and able to be bulk-downloaded.
  • For those users who need a quick solution for abbreviated journal names in Bibtex export (without using customized .bst files or external managers) I include here a small hack similar as proposed by jimwormold. If you use the stable Zotero version (1.0.10), then access via Scaffold the Bibtex translator and modify the doExport() function,

    ...
    if(item.publicationTitle) {
    if(item.itemType == "bookSection" || item.itemType == "conferencePaper") {
    writeField("booktitle", item.publicationTitle);
    } else {
    // Uncomment next 3 lines to export abbreviated journal names
    // if(item.journalAbbreviation) {
    // writeField("journal", item.journalAbbreviation);
    // } else
    writeField("journal", item.publicationTitle);
    }
    }
    ...

    where I added the commented lines. When you want the abbreviated journal names, just remove the comments in the last 3 commented lines. Otherwise full names are used. I hope this serves as a temporal fix for regular users until this is properly addressed.
  • Where do I find the file that has to be edited? And does it still work this way in actual zotero versions?
    Regards,
    Jfr
  • I don't know if this will still work - the bibtex translator has undergone substantive revisions - but it's easier to find now - it's a file called bibtex.js that's in the translator folder of your Zotero data directory -
    http://www.zotero.org/support/zotero_data
    open and edit with a text editor
  • Your Zotero directory contains translators/BibTeX.js. Yes, you would still have to modify the file manually to get this behavior. I'm not aware of any standard method in BibTeX that Zotero could implement easily that would adequately address my needs as a BibTeX user. Eventually, something like the abbreviations gadget for CSL may help things. Right now, I do this with JabRef.
  • To avoid anyone getting confused by this old thread:
    Zotero already has an option to select journal abbreviation for bibtex export.
    Well done Zotero team :)
  • Is there something I should do after a fresh install of zotero (desktop) to get the "use journal abbreviation" option in bibtex export working? right now, if I select the option, the "journal" fields are not present in the bib file at all. without the option selected, the journals are exported correctly (but unabbreviated).
  • You'll only get journal abbreviations where the journal abbr. field is populated. We should probably make sure it defaults back to the population field otherwise (which it doesn't), but you won't be able to take advantage of Zotero's automated abbreviations in bibtex export (nor in anything else that doesn't involve the Word/LO plugin).
  • I see. whould it be difficult to add the automated abbreviation feature to the bibtex export? in the sense that upon selecting an option, the "journal" field in the bibtex file would be populated with an automated abbreviation of the zotero "journal" field. if it was only a matter of porting some functions into other places of the code, I could try that myself
  • Simon would have to say for sure, but given that the current replacement code is integrated with the citation processor (which isn't used at all for bibtex export), I suspect that would indeed be quite a bit of coding and not easy to do.
  • What about the following change?

    --- BibTeX.js 2013-09-18 10:46:44.946348697 +0200
    +++ BibTeX.abbrevFallback.js 2013-09-18 10:57:14.916348376 +0200
    @@ -2401,7 +2401,11 @@
    if(item.itemType == "bookSection" || item.itemType == "conferencePaper") {
    writeField("booktitle", item.publicationTitle);
    } else if(Zotero.getOption("useJournalAbbreviation")){
    - writeField("journal", item.journalAbbreviation);
    + if(item.journalAbbreviation) {
    + writeField("journal", item.journalAbbreviation);
    + } else {
    + writeField("journal", item.publicationTitle);
    + }
    } else {
    writeField("journal", item.publicationTitle);
    }


    At least it works for me.
  • Well, this should certainly work, but it does something else than I intended. I would like to use the Zotero journal abbreviation machinery for fallback.
  • (we will implement the above, though, it's just waiting to get accepted).
  • the patch as suggested by quazgar is now implemented.
    As I say above, using Zotero's automated abbreviation function for bibtex export isn't likely to happen, at least not anytime soon.
  • edited October 7, 2016
    Hello,

    I just wonder if the Zotero's automated abbreviation function for bibtex export has been implemented now. I searched a lot but still can't find an answer for it.

    Btw, if Zotero hasn't implemented the automated abbreviation function for bibtex export, is there a workaround to fix it? After all, such a function has been achieved in word processors.

    Thanks a lot for your help.
  • sorry, no news on that. You could ask Emiliano at better bibtex (https://github.com/retorquere/zotero-better-bibtex ) if he has an idea -- or maybe even has this implemented already, but as I say above, doing it in Zotero is a lot more complicated than just adding a couple of lines to the bibtex export script.
  • edited October 9, 2016
    BBT has had it for a while, but as Adam noticed, it's more involved than just adding a few lines of code. BBT can (optionally, see here) add them, but as abbreviation differs per bibliography style, you'll need to specify which style you want to use. Zotero doesn't have to deal with this because it can generate the abbreviations at the same time it generates the bibliography; for Bib(La)TeX, the bibliography gets generated only later. The list of styles you can select is rather limited because as I understand it, only a limited set of styles will generate abbreviations.

    The abbreviations will be generated by Zotero, not BBT, I'm just picking them up if you have it turned on and the reference doesn't have one set explicitly.
  • Hello,
    I am using Zotero to export my bibs to LATEX. The format of exported bib is like this:
    @book{bellman_dynamic_1957,
    address = {Princeton, N.J.},
    title = {Dynamic programming},
    publisher = {Princeton University Press},
    author = {Bellman, Richard E.},
    year = {1957}
    }
    When I want to enter the citation in my editor, I want this format: bellman_1957
    and I don't want the abbrevation of title of journal. How can I fix this problem?
    Sorry if my question is foolish. I am a beginner in using both ZOTERO and LATEX.
  • @Niki1: This would have been better in a new thread or in one of the more relevant threads. But, concisely: either customize the BibTeX translator, use BetterBibTeX, or transform the keys after you export the file (I do this in JabRef). Also know that you'll increase the key collisions moving to an author/year format.
  • @Niki1: what you want can be done by installing Better BibTeX and setting a format pattern in its preference pane ([auth:lower][year] in your case).
Sign In or Register to comment.