BibTex export for German Zotero entries

The official BibTeX support of Zotero is sadly still not stellar (although it improved), and today I finally improved a small aspect of the BibTeX export of Zotero.

The problem: If you write LaTeX using an English style and have German references along with your English references, LaTeX usually will not know what reference is of what type and thus will render the German titles in lower case letters, which is wrong for German.

So if you have the title "Die Leiden des jungen Werthers" you will get "Die leiden des jungen werthers" - Goethe would not be amused ;)

If your have a worklfow where BibTeX is the source of your references, writing "{Die} {Leiden} des jungen {Werthers}" would work, but in Zotero you can't do that (at least I think so).

To solve that problem for my few references, I did the following:
  • enter "de" or "ger" in the language field of the Zotero entries for German entries.
  • modified the official BibTeX-translator (BibTeX.js) coming with my current Zotero installation to take the language field into account when exporting to BibTeX. When the translator encounters a German entry, it generates curly brackets for the title field where needed.
For those interested, I posted the modified BibTeX.js here: https://gist.github.com/4262556

Maybe someone wants to improve on it or integrate it into a better (official) solution. The source comes with no guarantee; it was just a quick hack to get things done for me.
  • edited December 11, 2012
    If your have a worklfow where BibTeX is the source of your references, writing "{Die} {Leiden} des jungen {Werthers}" would work, but in Zotero you can't do that (at least I think so).
    We actually have a patch for that: https://github.com/zotero/translators/pull/477
    It still needs some fine-tuning, but we'll do this more generally to preserve proper nouns, not just for German entries (though, of course, what you do works, too).
  • I knew I should have done more research...

    Glad to read that - until that is released I'll use my solution.

    Just some thoughts on the casing problem:

    I think there will always be cases where the proper casing can not be deduced from the field value alone (as you are trying to do with the patch if I understand that correctly).

    So, maybe you could just add some metainformation (as I did with the language) to an entry to cope with purposeful capitalization. The action could be hidden in the context menu of the title (or any other field) and be named like "keep casing as is".

    Or the user could add a specific tag like _meta_title_casing_as_is, although this needs to be hidden from the general tag cloud and is probably not a very good idea anyway.
Sign In or Register to comment.