• ## Feeds

Vanilla 1.1.10 is a product of Lussumo. More Information: Documentation, Community Support.

• CommentAuthornoahwf
• CommentTimeNov 9th 2006

I've seen a couple discussions here about integration with Word -- but I'm a Latex user (specifically, TeXShop on a Mac) and I haven't been able to find any conversations/information about what the future might hold for people who want to use Latex and Zotero together. Is there any information out there?
• CommentAuthornoksagt
• CommentTimeNov 9th 2006 edited

Zotero can export to BibTeX, so you can already use it with LaTeX.

I suppose it might be nice if some developer would add the ability to push to LyX/Kile, Emacs, WinEdt, etc. (just as JabRef already can).
• CommentAuthornoahwf
• CommentTimeNov 9th 2006

In the absence of tighter integration, do you know if I can set things up so that every time I make a change in Zotero it automatically updates the BibTex file, so that I can work with Zotero and Latex smoothly? Or will I have to re-export over and over?
• CommentAuthornoksagt
• CommentTimeNov 9th 2006

This functionality doesn't exist--you'll have to re-export it over and over.

In principle, it should be possible to do this with a third-party plugin (I don't know if it is so common a need that the Zotero devs should add it to the core extension).
1.
I'd like to second Noahwf's request to have Zotero automatically maintain a BibTeX file that's equivalent to an export of the whole library. This would be very useful for me. A simpler alternative would be to streamline the user interface for exporting, making it as painless as possible to export the entire library to the same file repeatedly.
• CommentAuthorelwood151
• CommentTimeJan 29th 2007

I also agree with noahwf:
it would be very useful to have a BibTeX-file which is constantly updated when changes in Zotero are made.
It would be very nice also, if a field "abstract" would exist (and be exported to BibTeX) for the abstract of a paper and if the note fields in Zotero could also be exported (maybe as an option - choosen by the Zotero user).
• CommentAuthororange
• CommentTimeSep 4th 2007

I also work with Latex, and while I wasn't worried about having to re-export the file, I've found that I have lost all my citation keys - they've been overwritten with very long and illogical (from my viewpoint) keys that I could never remember. Is there any way I can set the citation keys in Zotero so that every time I re-export I don't have to reset hundreds of citation keys? I'm sure I need not add that this is never going to happen, and as I have been using the same method of giving keys that my filing system of papers and handwritten notes also uses I am not about to change.

I figure there has to be somewhere that zotero stores the keys, otherwise every time you export you run the risk of having the citation keys change which would play havoc with in text citations.
• CommentAuthornoksagt
• CommentTimeSep 4th 2007

Is there any way I can set the citation keys in Zotero so that every time I re-export I don't have to reset hundreds of citation keys?
No & there hasn't yet been announcements that this is under consideration, although it has come up a few times in the forum. There has been some talk (by people who aren't actually zotero devs) about customizing the automated citekey instead.

My personal solution is to just import zotero export into bibliographic tools more capable of handling bibtex for now. There are other utilities that can make sensible citekeys for you (but if you export everything several times rather than append new entries, it could be that you clobber some of your keys).

I figure there has to be somewhere that zotero stores the keys, otherwise every time you export you run the risk of having the citation keys change which would play havoc with in text citations.
This is exactly what happens right now--citekeys are auto-generated at the time of export.
• CommentAuthorratoune
• CommentTimeSep 5th 2007

I do agree with Andrew and Noahwf about maintening a BibTeX File...
• CommentAuthorhravenel
• CommentTimeSep 5th 2007

@ Orange : I agree with you that automatically generated key in BibTex export are almost not usable. I proceed like Noksagt. I export in bibtex format. Then using Jabref, I regenerate a key using for instance Author Date. That way, I can continue to manage my bibliography in Zotero, even if I am writing something. Author Date is key that does not change too much when you add new item to your biblio.
• CommentAuthorpqs
• CommentTimeSep 17th 2007

Hello,

I agree that it would be very useful, zotero to maintain an updated bibtex file.

It would also be very useful to be able to copy and paste the bibtex key from zotero to the text editor.
• CommentAuthornoksagt
• CommentTimeSep 17th 2007

• CommentAuthorpqs
• CommentTimeSep 18th 2007

@noksagt, thank you.
2.
I agree that it would be very useful, zotero to maintain an updated bibtex file.

The chances of our implementing this within Zotero are quite slim. But, as noksagt mentioned at the beginning of this thread, it could be done as a plugin—extremely easily without any optimization, or with a bit more work the more efficient the updating logic was.

If anyone is interested, see our sample plugin and post a note on the dev list to let others know you're working on this.
• CommentAuthorjamesh
• CommentTimeSep 26th 2007

To respond to noksagt's comment about using zotero with bibtex / latex and pushing citations to LyX/Kile, emacs, and WinEdit: Others are interested in this as well, see the posts at:

http://forums.zotero.org/discussion/537/lyx-support

If someone is working on the custom bibtex key generator or updater, please post to that discussion, since the projects would work well together.
• CommentAuthorKramer
• CommentTimeJan 25th 2009

Yes! I also would be very interested in this. Most importantly I would like to see the ability to have the citekey listed as a column in zotero's main table so at the very least I could write my latex with the correct citekey before exporting.

Ideally, I would like to be able to drag and drop a Zotero entry into a text window and have it plot out \cite{articlename}.
• CommentAuthorCB
• CommentTimeJan 25th 2009

I'm a LaTeX user, but I'd rather see more facilities for combining zotero with external tools than have zotero try and do everything.

BibTool, for example, does a better job than zotero is ever likely to do of cleaning up bibtex files, auto-generating citekeys, etc. I'd like to be able to automatically invoke it (or any other tool of my choice) every time I do a bibtex export.
• CommentAuthorKramer
• CommentTimeMay 3rd 2009

I just wrote a hack that answers my earlier request. This will allow you to copy-and-paste or drag and drop the \cite{key} from zotero into a waiting text editor.

This may not solve noahwf's original problem, but it should help anyone who uses a text editor to write Latex.

It is available here:
http://www.people.fas.harvard.edu/~leifer/zotero/BibTexCiteKeyOnly.js
And it is just a crudely modified version of Simon Kornblith's "BibTex" translator version 1.0.0b4.r1.

To install, simply save the .js file to your Zotero translator's directory and restart Zotero.

If you don't know where your translator's directory is do the following:Go to Zotero Preferences. Open the Advanced pane. Click on "Show Data Directory." This will take you to a "zotero" folder. The "zotero" folder will contain a "translators" folder. Save the.BibtexCiteKeyOnly.js file here.

To Use:
After you restart Zotero, set "BibTex CiteKey-Only Exporter" as the Default Output Format in the Export preferences pane. Now, you can select a reference and drag it off the screen into a waiting text editor. Alternatively you can use Cmd+Shift+C to copy the \Cite{key} to your clipboard.

I hope someone will find this useful.
• CommentAuthoralbot
• CommentTimeMay 3rd 2009

Great Kramer, this is exactly what I was looking for! Works (almost) perfectly :)
Just a few notes though

1) the translator folder doesn't exist in the version 1.0.9, only in the beta version. not sure how to adapt this for the old version, I just upgraded to beta
2) when I drag and drop a citation, it goes into TexShop great, but it always goes to a new line, ie drops [Enter] \cite{citekey}

Otherwise, great!!
• CommentAuthorKramer
• CommentTimeMay 3rd 2009 edited

I uploaded a new version that got rid of the carriage return. Don't know where the folder is for 1.09 (I use 1.5beta) so I can't help you there.

Good luck!
• CommentAuthorRintze
• CommentTimeMay 4th 2009

There isn't a translator folder in 1.0.x. Instead all translators are stored in a single sql file, and a tool is available to insert and modify translators in that file:
http://www.zotero.org/support/dev/scaffold_tutorial
Upgrading to 1.5 is probably easier though.
• CommentAuthortrixtah
• CommentTimeAug 1st 2009

• CommentAuthorKramer
• CommentTimeAug 1st 2009

Awesome.

Well since people are finding this useful, maybe the powers-that-be would consider adding this as a default translator that ships with Zotero. Does anyone know how that works?
3.
Well, Zotero should probably just generate the cite key automatically when using the copy-as-citation shortcut key or Shift-drag. There's currently no mechanism to do this with export translators (as opposed to bibliographic styles), so it would take a little work, but it'd be better than having a separate BibTeX translator just for Quick Copy.
• CommentAuthortormod.boe
• CommentTimeMay 26th 2010

I am using this setup:

1. Zotero to retrieve references from the web
2. Mendeley on my computer for cataloging and extracting information from locally stored pdfs
3. Zotero syncs with Mendeley
4. Mendeley is able to create and keep-in-sync a bibtex file for a) the entire mendely library, b) a collection (user defined collection).
5. Jabref to manage the bibtex-file and direct import into latex editor.

works great (..or as great as your skills are at keeping a clean collection in Mendeley...)

Cheers,
Tormod
4.
Hi

Has anyone had any problems recently after the last Zotero update with Kramer's (excellent) drag and drop \cite tool. It now seems to be generating the wrong author_first word_year line for the citation when dragged across? The Bibtex name is now not the same as that dragged across...If so (or even if not), does anyone know how to get round it?

Thanks
• CommentAuthorSMFleming
• CommentTimeJan 29th 2011

I read this thread with interest as I'm trying to setup a Zotero -> Latex solution on my mac. I came across Zot2Bib for Macs, which works great and allows me to update my .bib file using the same click-throughs that Zotero uses:

http://mackerron.com/zot2bib/

Best
Steve
5.
I have just spent a long time understanding the interplay between Zotero bibtex export using bibtex.js and using the resulting .bib file in a LaTex document bilbliography with \bibliographystyle{plain-annote} so as to be able to export an annotated bibliography directly into LaTeX using Zotero notes records for annotations.

The main issue I am encountering is the output contains sort of html formatting like {\textless}p{\textmore} paragraph text {\textless}/p{\textmore} for each paragraph, obviously to add html paragraph notation such as <p> and </p> to the output.

I cannot find how to conveniently use this in LaTeX. My current solution is to edit the .bib to remove all such entries, but surely this is not uncommon, so is there some new feature in 2.1 to address this, or some other solutions?
• CommentAuthorajlyon
• CommentTimeJan 30th 2011

We or you could modify the BibTeX.js translator to handle the paragraphing in a more BibTeX-friendly way. You'll want to modify the writeField(..) function, line 1823 in the translator, and add special treatment for the field "annote".
6.
I was mentally prepared for your response, ajlyon, so is there a dev guide I can look at? Basically what I need to do is strip html before writing I think
• CommentAuthorajlyon
• CommentTimeJan 30th 2011

It's just plain JavaScript, plus you have some extra Zotero utility functions at your disposal. You should be able to use Zotero.Utilities.cleanTags(..), which will just remove all HTML tags. Or you could write a series of regular expressions to replace the tags with BibTeX/LaTeX-friendly replacements.

Just special case field == "nnote" with an extra if clause and put your replacements there.
7.
ajlyon, the Zotero.Utilities.cleanTags(..) worked. I have tried it with only one note, but it should be fine with multiple notes. This will hold me until I have more time to get it precisely right, so very much thanks.

how do you register new .js translators with the export command?
• CommentAuthorajlyon
• CommentTimeJan 30th 2011

Can't you just replace the existing BibTeX.js and restart Firefox? Otherwise, save the new file to the translators directory and change the translatorID to a new UUID, then restart.

It should show up automatically.
8.
so type 3 is an export translator I assume, further, I assume UUID is a unique javascript ID?
• CommentAuthorajlyon
• CommentTimeJan 30th 2011 edited

This discussion should probably have moved to zotero-dev some time ago, but in short: the the types are a bitfield; 1 is import, 2 is export, 4 is web, 8 is search. The UUID is, well, a UUID. See http://en.wikipedia.org/wiki/UUID -- you can get one here (and many other places!)
9.
thanks ajlyon...I'll go to dev with further questions. But you solved my primary problem. many thanks
• CommentAuthorajlyon
• CommentTimeJan 30th 2011

In particular, the handling of HTML in note fields that you describe is not good. If you can propose a nice way of doing it in a LateX-y manner, please submit a patch to zotero-dev and we'll see about getting it into the main release.
• CommentAuthorEvelyn
• CommentTimeFeb 3rd 2011

A problem I had recently with zotero exports as a .bib file was that special characters were not translated correctly so that LaTex could display them correctly. If the title field contained gamma, the .bib file would also have gamma, not $\gamma$. If the title field contained $\gamma$, the .bib file would have $\textbackslash gamma$. This was frustrating.

I produced a .sed script for post-processing of the zotero generated .bib file:
s/alpha/{$\\alpha$}/g
s/beta/{$\\beta$}/g
s/gamma/{$\\gamma$}/g
s/epsilon/{$\\epsilon$}/g
s/{a}/{\\"a}/g
s/{o}/{\\"o}/g
s/{AlCl3}/Al{C}l{$_3$}/
s/Br-1)x/Br{$^{-1})_x$}/g
s/NH3/NH{$_3$}/g
s/H2O/{H$_2$O}/g

My process was
(1) export library from zotero
(2) run the script on the zotero generated .bib file to produce a good .bib file that LaTex can read.

If I added a bunch of new references to my zotero library, it was easy to re-export and modify the new .bib file.
This got the job done, but I'm not sure if it was the most elegant solution.
• CommentAuthornoksagt
• CommentTimeFeb 3rd 2011

If the title field contained gamma, the .bib file would also have gamma, not $\gamma$.
Change the character set on export to use something other than UTF-8 (such as ISO-8859-1) & Zotero will have LaTeX transliterations for all of the entities in your sed script and more.
• CommentAuthorEvelyn
• CommentTimeFeb 6th 2011

Thanks. I will try this.
• CommentAuthorkay102
• CommentTimeFeb 27th 2011

I'm using another very simple method for combining zoteros functions with latex now:
In the Zotero style repository[1] there is an "Bibtex generic citation style"[2] which inserts the bibtex key in the document when holding shift. After installing it you probably have to edit the Zotero settings in Zotero -> Preferences -> Styles to ensure that Zotero is using this style. (I had to restart my Browser to make it work)

1. http://www.zotero.org/styles
2. http://www.zotero.org/styles/bibtex/dev?install=1
• CommentAuthorcastellg
• CommentTimeMar 24th 2011

Did anyone have a recent problem with this drag and drop solution? I recently updated zotero to V 2.1.1 and the drag and drop stopped working (doesnt drop the key on the text).

Thanks!
• CommentAuthorlallalla
• CommentTimeMar 25th 2011

encountered the same problem. see discussion on ubuntu forum

• CommentAuthorcastellg
• CommentTimeMar 25th 2011

Great!, works fine now

Thanks
• CommentAuthorizahn
• CommentTimeApr 15th 2011

I like Zotero. It does so many things right, starting with the basic idea that reference management should be built into a web browser. So I would love to start using Zotero.
<rant>
But the lack of proper bibtex import/export is a cold showstopper. I have years of citations in bibtex form, and LaTeX documents that cite those references using the existing citation keys. If I switch to Zotero I lose the ability to update those documents, because the cite keys don't survive import/export. That is simply intolerable, to the point that I'm astonished that such an obvious problem still exists in Zotero. It basically makes it impossible to switch to Zotero from bibtex-based reference management. Personally I don't care about what cite keys zotero assigns to new references, but I absolutely cannot switch until such time as Zotero preserves my existing cite keys through the import/export process.
</rant>
• CommentAuthorbdarcus
• CommentTimeApr 15th 2011

So use some other app designed specifically for use with BibTeX. And maybe check back in a few months.

What value is a rant like this really? Next time take a breath before posting.
• CommentAuthorizahn
• CommentTimeApr 15th 2011

@bdarcus <sarcasm> thanks that's really helpful </sarcasm>.
• CommentAuthorfbennett
• CommentTimeApr 15th 2011

@izahn: What you need is a mapping of your local BibTeX keys to Zotero item identifiers. That data doesn't need to be stored in Zotero, and probably shouldn't be (since the Zotero items might be used by others who apply different local keys to the same items).

Your personal mapping should reside on your local system, and would be used either to adjust the keys in data re-exported from Zotero for ordinary BibTeX processing or, if direct access to Zotero is implemented by a BibTeX tool at some point, to remap keys on the fly in LaTeX code called by a one-line header added to your existing documents.
• CommentAuthorizahn
• CommentTimeApr 15th 2011

@fbennett: Thank you, that makes very good sense. I'll try the settup you suggest.
• CommentAuthornoksagt
• CommentTimeApr 21st 2011

That data doesn't need to be stored in Zotero, and probably shouldn't be (since the Zotero items might be used by others who apply different local keys to the same items).
Zotero does store other information about records that are user-specific (tags, notes, extra, etc.). I think the medium term plans are to include a way to store local IDs, no?