Bibtex export in Zotero 4.0 - please help!

I just updated Zotero Standalone for Mac to 4.0 and reset my translators (backup first, of course). And I wonder why there is still no way to export Bibtex properly.
I still have 4 fundamental problems - and would be more than thankful for any help!

1) Exporting my library using the official Bibtex.js translator adds numeric suffixes to colliding Bibtex keys (like, for example, {baecker_network_2007} and {baecker_network_2007-1}; However, whenever I copy and paste (using the "cmd+shift+c" shortcut) only one of these entries it exports: {baecker_network_2007}, even if it is the {baecker_network_2007-1} entry in the .bib file...
The solution would be that the translator could anticipate collisions (or: read it from the library or I don't know) and give the actual cite key that is produced when exporting the whole library. If there is no way to do that - how can I use zotero with LaTeX? The elaborate suggestions in the thread "Improving Bibtex support" are not good for me since they go very deep and change too much of zotero which is not officially supported.

2) There is still no official or other "cite-key-only" translator that works in the above mentioned way so I could just export e.g. \cite{baecker_network_2007-1} by using cmd+shift+c

3) I suggested to change the default name of exported libraries to "MyLibrary" instead of "My Library" - which should be very easy, I assume. Are there any ideas on this issue?

4) If there is a corporate author field like "UNESCO" the translator exports: {{{UNESCO}}} which causes serious trouble with biber back end for biblatex - since biber and biblatex both have become the standard, it would be essential to delete {} in the export. And there is no purpose for {{{}}} I know this issue has been raised before, so I wonder why this has been ignored as well in the current update, or what is the state of the development here?

I started to learn Java and Javascript in order to adjust my translators - but for now I need help... please.
Are there so little people out there using LaTeX with zotero? I am so passionate about zotero, but this really troubles me...
From all I can see these issues should all be solvable, right? There must be a solution - let me know what I can do to contribute! Anything!

Cheers, obsrvng_obsrvrs
  • (1) requires changing the database structure and sync architecture. We aren't ignoring this, but these are large-scale changes that didn't make it into Zotero 4, which we had to release now for compatibility with Firefox 20.

    (2) won't work reliably without (1).

    (3) doesn't really make sense to me. In 2013, pretty much every tool should be able to handle spaces in filenames.

    As noksagt notes here, (4) is valid BibTeX. I'm not sure I believe that there are more biber/biblatex users than there are standard bibtex users, but it would be possible to make this behavior configurable via hidden preference. In any case, translators get updated daily so it shouldn't be surprising that there are no major changes between releases.
  • @simon while I agree 3) doesn't make sense, the inability of bibtex to deal with spaces in filepaths is commonly known and doesn't appear to be connected to a specific application. There are plenty of discussions on this, especially because, of course, this means that _every_ Windows filepath is broken for bibtex if you use absolute paths.

    I don't see why we shouldn't accomodate that (that said, as I point out in the other thread this is brought up, autoZotBib solves that issue).
  • thanks for your reply.

    (1) was raised in May 2011 and has been discussed lively
    here and with much support since then… I was hoping for at least a proper work around since I rely on zotero completely - aren't there any ideas on how to solve the problem
    (2) there is no copy and paste translator for bibtex-keys-only that is supported officially - even if you do not have any of the problems with (1)
    (3) I know there is autoZotBib (thanks again for the hint) but it does not work with zotero 4.0, does it? it was a very good solution until 4.0
    (4) might be valid, although it causes trouble, but does it any good? corporate author field do not need {{{}}} and only two {{ }} do no harm and do not cause trouble… or is there anything I don't see in the bigger pciture?

    I mean if there is no major update that can solve the problem can't anyone just provide a work around for the cite key problem? If it is too much to change the whole export, wouldn't it be possible to write a translator that works like:

    -export the whole library
    -delete everything else except the key

    embarrasing stupid ideas, probably… but you see I have no clue - only the problem.

  • 1. I believe the proper workaround currently is to use something like jabref or bibdesk in between Zotero and the document. I know that's what many power users do. Zotero CWYW with LaTeX won't work reliably until the changes mentioned by Simon are implemented.

    2) The reason there is no officially supported version is that it can't be done properly. For an "OK" version, there is really no reason not to use the custom script. I woudn't get too hung up on the "officially supported" part - as you'll have noted, many people using bibtex use custom set-ups.

    3) My guess is that autoZotBib is broken for Firefox 20 (on which Standalone 4.0 is built). Try contacting the developer.

    4) The issue with 4) is that getting rid of it isn't trivial and we need to be careful not to break other things. Especially when this should really be fixed in Biber.
  • For 1-2, I export to BibTeX to a file. My text editor auto-completes citekeys. Many editors do. Alternatively, you can open the file in something like jabref. If I need to manage keys, I still use a third-party app. These work-arounds work well until Zotero does get a field for unique local IDs.

    I had proposed a work-around for citekey disambiguation similar to yours (and to also make citekeys sorted by creation date, so that there would be some semblance of preservation). But it is brittle, needlessly complicated, creates disambiguation suffixes even if exporting a subset of the library, and just doesn't work as well as the current third-party alternatives & would take enough effort to implement even half-well that we might as well wait for those local IDs.

    (3) I change the default export name to something more useful and differentiating. No objections to removing spaces in the default name, though.

    (4) should be fixed. It is on my 'eventual todo' list. It isn't quite as trivial as it would appear, because of the different places those brackets come from & because we haven't agreed on how many redundant brackets to keep. But this is also a relatively rare bit of "ugliness", so I can't say it is high on my todo list.
  • @noksagt 1-2 thanks so much!! this made my day! sun is shining again... I didn't know that there was is function - always had to switch to zotero copy+paste and that even broke... and no it turns out there is an even better way. wow!

    (3) great!

    (4) is there a way to automate deleting any "{{{...}," and replacing it by "{{...}," - I don't know an app that can do this, but there might be...
    biblatex, to me as to many I guess, is essential for a few reasons as described by the author: "[biblatex] also supports subdivided bibliographies, multiple bibliographies within one document, and separate lists of bibliographic shorthands. Bibliographies may be subdivided into parts and/or segmented by topics. Just like the bibliography styles, all citation commands may be freely defined. The package is completely localized and can interface with the babel package."
    But I am glad and thankful it is on your todo list, with whatever priority...
    thanks again for your great help
  • stupid me: I found it: textedit for mac does the trick:
    find "{{{any},"
    replace "{{any,"
    click: replace all
    safe,
    done.
  • edited April 3, 2013
    (4) is there a way to automate deleting any "{{{...}," and replacing it by "{{...}," - I don't know an app that can do this, but there might be...
    unless I'm missing something, any regex capable editor (notepad++ e.g.) or script (sed e.g.) should be able to do this.
    \{\{\{([^\}^\{]+)\}\}\} --> \{\{$1\}\}
  • sure, or use a quasi-regex like that in TextEdit.
  • edited April 4, 2013
    If you are using BibLaTeX consider using my BibLaTeX export translator (modified from the standard BibTeX). Available here on GitHub.

    It solves (4) by bypassing some of the escaping in the BibTeX translator (I haven't really tested all cases though).

    It also provides the other benefit of matching Zotero's fields much better to the extended bibtex-format of biblatex. This means that for example references to websites will be handled better as they are mapped to the "online" (instead of "misc") type and their urls are put in the "url" (instead of "howpublished") field.
  • (that's a good idea - Aurimas is working on an integrated BibLaTeX translator, but there's also talk of including anjo's in Zotero, so you can regard it as semi-supported ;-))
  • edited April 10, 2013
    AutoZotBib is actually compatible, but the max versions need to be increased. I've asked Robin, the developer to do that, but in the meantime I've uploaded a tweaked version
    https://github.com/adam3smith/zotero-tools/raw/master/autozotbib.xpi
    You can download it and then use "Install from file" from tools --> add-ons in Firefox/Zotero Standalone. This should work.

    (In general you shouldn't install xpis if you don't trust the author - all I did was to increase the max versions in install.rdf - you can do that yourself if you want).


    The official version is now updated, install from:
    http://www.rtwilson.com/academic/autozotbib
  • I tried to install it following your instructions, but I only get the note: "The add-on "Automatic Zotero to BibTeX exporter" could not be installed. It may be incompatible with this version of Zotero Standalone."
    I'm using Zotero Standalone Mac 4.0.4...
  • sorry, my bad.
    Robin has updated his version, so you can install from
    http://www.rtwilson.com/academic/autozotbib again.
  • great, thanks! it did work
    only problem is that anjo's wonderful translator does not easily work together with AutoZotBib... will have to figure something out...
  • I did. Only had to insert the BibLaTeX.js id "ba4cd274-f24e-42cf-8ff2-ccfc603aacf3" as explained for BibTeX_RobinTan.js here: http://www.rtwilson.com/academic/autozotbib
    worked like a charm :)
  • If you're not using the special bibtex translator provided by Robin, you can follow the Advanced options for using that, but where it says
    "Then simply paste in the following value DA47106C-1265-4D19-8E75-0A4CD77CD369, click OK and exit the config editor." post the ID of the biblatex translator instead: ba4cd274-f24e-42cf-8ff2-ccfc603aacf3
    You'll have to have the biblatex translator installed, of course.

    I haven't tested this, but see no reason it wouldn't work.


    It would also be possible to merge the two - not much coding knowledge requires - though you may not find that you need that.
  • oh well - I'll leave my extended instructions there for posteriority. Glad it's working for you.
  • https://github.com/friflaj/zotero-better-bibtex fixes #1 & #2. I could do #3 but it would be fragile and there's an easy workaround: select a different filename in the export dialog, or copy all your citations into a collection which has no spaces in its name and export that.

    For #4, you mean that you'd want to see it exported as {{UNESCO}}, {UNESCO} or as UNESCO (sans braces)? That is possible, but bibtex will change the latter two into Unesco.
Sign In or Register to comment.