Skip to content
This repository has been archived by the owner on Jun 15, 2018. It is now read-only.

Latest commit

 

History

History
36 lines (27 loc) · 3 KB

README.org

File metadata and controls

36 lines (27 loc) · 3 KB

Zotero BibLaTeX translator

This is an export (only) translator adapted from the standard BibTeX translator of Zotero (available here on github). It aims to map item types and item fields as correctly as possible from Zotero to the extended .bib-format of BibLaTeX. It also contains some special features, see below.

Only use this version if you need the “special features”!

And if you do, you would probably also be better off using Better Bib(la)Tex which has incorporated all these features and much more.

As of 2013-10-24 there is an official version of this translator included with Zotero. This version should then only be used if you need the “special features” below. The name of this translator in the translator dialog is “BibLaTeX-with-hacks” to distinguish it from the official version.

Installation

Download BibLaTeX-with-hacks.js and copy it to the translators directory of your Zotero data directory.

Special features (“hacks”)

Recursive export of collections

When exporting a collection, all items in subcollections are included as well. This is also in the official translator and not really a hack but if you don’t want it you only have to remove line 11:

"configOptions":{"getCollections":"true"},

Using special fields of BibLaTeX not available in Zotero

To use some of the fields that are available in BibLaTeX but not in Zotero I have implemented a special feature where these can be added to Zotero’s Extra field. For example, to store origdate and origtitle in Zotero and get them correctly exported to BibLaTeX one would put the following into the Extra field:

biblatexdata[origdate=1856;origtitle=An Old Title]

The complete syntax for the Extra field thus is:

<Text that could be whatever>biblatexdata[fieldname1=fieldvalue1;...]<could also be some text>

This works great for simple examples, but it will break if you for instance need to use [, ], = or ; in your field values. I guess I could come up with some better way if this is needed.

Using custom citekeys

You can also put biblatexcitekey[my_key] (along with other text) in the Extra field and my_key will be used as citekey.

More documentation

For a list of the field mappings, see the wiki.

Contributing

Feel free to fork, submit issues or pull requests or help with documenting the mappings over at the wiki. The code is adapted from the standard BibTeX-translator and sometimes a little messy, sorry about that.

License

GNU Affero General Public License, version 3