getting bibtex keys when using Writer2LaTeX on a Zotero/OpenOffice document
Hi,
Has anyone found a workflow for using Writer2LaTeX on an OpenOffice.org odt document with Zotero citations? I'd like to turn the odt file into a LaTeX document with citation keys that match the bibtex keys I use in LyX (where I also use Zotero).
What Writer2LaTeX gives me now is just stuff like
\label{ref:ZOTEROITEMsorttruecitationItemsurihttpzoteroorggroups23258itemsVQT5RPTURNDi5Ug45XVK3}(Nordahl,
S�rlie, Manger, \& Tveit, 2007)
Has anyone found a workflow for using Writer2LaTeX on an OpenOffice.org odt document with Zotero citations? I'd like to turn the odt file into a LaTeX document with citation keys that match the bibtex keys I use in LyX (where I also use Zotero).
What Writer2LaTeX gives me now is just stuff like
\label{ref:ZOTEROITEMsorttruecitationItemsurihttpzoteroorggroups23258itemsVQT5RPTURNDi5Ug45XVK3}(Nordahl,
S�rlie, Manger, \& Tveit, 2007)
<text:reference-mark-start text:name="ZOTERO_ITEM {"sort":true,"citationItems":[{"uri":["http://zotero.org/groups/23258/items/VQT5RPTU"]}]} RNDsvJ507erEH"/>
(Nordahl, Sørlie, Manger, & Tveit, 2007)<text:reference-mark-end text:name="ZOTERO_ITEM {"sort":true,"citationItems":[{"uri":["http://zotero.org/groups/23258/items/VQT5RPTU"]}]} RNDsvJ507erEH"/>
and when I use LyZ to cite in LyX with "zotero" as the bibtex key, I get
260548_VQT5RPTU
as the bibtex key. Now, VQT5RPTU should be extractable (by Writer2LaTeX) from the reference-marks XML (the URI ends in that), but 260548? Where does LyZ get that from? Another item I cited with LyZ got a 0 and then the reference-marks URI.
I guess I could run a script on both the bibtex and the LyX file to strip those initial numbers before running bibtex, but that seems rather hacky :-/
In an ideal world, the Zotero UI would show a persistent "bibtex" field, and ensure uniqueness for this, while putting it into the reference-marks XML; but I guess something like that requires more work than just getting LyZ to output VQT5RPTU instead of 260548_VQT5RPTU.
Is there any way to find the Library ID from the odt xml? I see the number in the URI doesn't match with the library ID :-(
The patched http://github.com/unhammer/lyz will give LyZ a new citekey format "writer2latex" that outputs only the ItemID (object key).
http://github.com/unhammer/writer2latex is a version of writer2latex that reads Zotero reference-marks and outputs LaTeX \cite commands.
I haven't tested with multiple authors yet, and LyX doesn't seem to be able to parse \cite[prefix][]{citekey} (ie. using empty suffix in order to only have prefix), but I'll be continuing to work on this as I really need it this fall...