bibtex citation

I hope in the future zotero can be used to make bibtex citation as I can do this in mendeley
  • What exactly are you asking for? Zotero has always supported BibTeX.
  • In Mendeley, I just right click of the mouse, then, I could get \cite{key1} for bibtex by using right click mouse and select "copy LaTex citation" and then paste to LaTex editor. Sorry, I didn't explain my question well, I hope u understand what I mean.
  • That's an interesting feature, and it isn't currently available. It should be possible to implement this as an export translator -- I have one that I use to create links to Zotero items, posted at http://github.com/ajlyon/zotero-bits/blob/master/zotselect-link.js . Take a look at it and at the BibTex translator at https://www.zotero.org/trac/browser/extension/trunk/translators/BibTeX.js -- you should be able to copy the citation key logic from the latter, pop it into the former, and get what you want. Then you can set your export translator as the Quick Copy action in Zotero, and you'll have the desired functionality.
  • edited May 1, 2010
    The new CSL processor will support arbitrary output formats, and should work for this. You would use the existing HTML style format definition as a template, and edit it to apply the desired LaTeX macros, referring to the CSL 1.0 specification for guidance on the effect that each output attribute is meant to have. You would then need to either modify Zotero or (probably better) set up some sort of Firefox plugin to provide a UI to call the processor with the new output format and deliver the result to the clipboard.

    (This may not be exactly what you were after; I'm not that familiar with LaTeX anymore, and could be jumping to conclusions. But you get the idea.)

    Once you had the processor output format set up, it would be a short step to the implementation of a complete BibTeX substitute that uses Zotero to store citations, runs CSL styles natively, and fits into the LaTeX processing chain in the same way as current BibTeX.
  • Ideally this would just use the citation Quick Copy mode instead of the full mode, but the problem is that the citation mode doesn't exist for export formats, only bibliographic formats. It's possible we could add citation output to export translators, though I'm not sure it would be used for anything other than BibTeX.
  • Quick copy mode can use export formats. This is a simple job, and I've almost finished writing an export translator to use with quick copy mode.
  • This is now complete. http://github.com/ajlyon/zotero-bits/blob/master/BibTex Citation Key.js

    Click on the "raw" link and place the file in the translators directory of your Zotero Data Directory (http://www.zotero.org/support/zotero_data).

    You can now select the BibTex Citation Key export method in the Export tab of the Zotero preferences, to use it with Quick Copy.
  • Quick copy mode can use export formats
    You misunderstand what I wrote. Quick Copy has a standard mode and a citation mode. I was referring to the latter, which does not support export formats. The point is that you shouldn't need to install and select an entirely separate translator just to generate BibTeX citations (and then switch back to the standard one to get full BibTeX output).
  • It would be nice if this could be done more elegantly, without making a second translator. That said, this should be a perfectly workable stop-gap solution.

    If you do make changes to allow for export translators to have a citation mode, can you also allow export translators access to the CSL processor? In the zotselect-link.js translator I linked to above, I wanted to format the output using existing styles, but that seemed to be impossible.

    @limpato: Can you try the translator I posted and see if it suits your purposes?
  • Ah, I get it, it's the key that the item will have when exported in BibTeX format. Bennett once again comes forward with a solution in search of a problem. :)
  • Thank you Ajlyon for your suggestion, I have tried to use that, but unfortunately I could not get " \cite{author} " directly after right click in zotero, please check in Mendeley, you can make "\cite{author}" and easily you can paste it to your latex editor.
    I hope someone can solve it, I like zotero very much, why this option not available yet? Do you have solution for this?
  • I have been using Kramer's solution in this thread http://forums.zotero.org/discussion/5094/%3FFocus%3D22050 to great success. I can even drag and drop the reference straight from zotero into my latex editor - in a dual screen set-up I suspect that can't be beaten for efficiency.
  • @limpato,

    The solution linked by clio_13 and the one just built by ajlyon in response to your post work in the same way, and both of them do exactly what you want, but you have to follow the cookbook. Open the Zotero gear menu, then go Preferences -> Export, and find the Quick Copy item (in boldface, at the top, the first section of the Export preferences). Find the selection list under "Default Output Format". Click on the list to open it. Scroll down to find the "BibTex Citation Key" translator (the code linked by clio_13 uses a different name for the translator -- if you're using that, then follow the link and read the post, which mentions the name).

    Once you have performed the steps above, open a text editor of some sort, and position it on the same screen as your open Firefox browser. Open Zotero. Left-click on an item in Zotero, and hold down the left mouse button while moving the mouse pointer into the text editor. Release the mouse button ...

    ... I think that's what you're after. :)
  • Yes, Fbennett... I am only a newbie in this game... thank you for your help
  • Glad it worked for you!
  • Hi Everyone,

    You are all discussing something I'm trying to figure out. However, I'm relatively new to Zotero and LaTeX.

    Could someone please explain in novice-friendly terms how to make Zotero show bibtex citation keys? I'd like to have these keys without having to export all my refs (e.g., to Jabref) because I'm constantly adding sources to Zotero as I'm researching and writing. I'd like to have the bibtex citation keys ready in Zotero before exporting so I can include the citation keys in the text I'm writing.

    Can this be done? Any tips?
Sign In or Register to comment.