LyZ is a plugin for Zotero (version 2), which is intended to make working with LyX/Zotero more pleasant.
Features
- Inserting citations to LyX from Zotero.
- BibTeX database automatically updated when citation is inserted.
- BibTeX database can be updated when the references in Zotero are modified.

- Custom BibTeX key format.
- Unique BibTeX key check.
- Synchronization of BibTex keys between LyX document, BibTeX database and LyZ.
- Editing of master/child documents (the same BibTeX database) and multiple documents (different BibTeX database for each document).
- Persistent association of LyX documents and BibTeX databases.
- Support for group cooperation.
Installation and Settings
Please report your experience at Firefox Addons. If you have any problems, there should be an error message, in Firefox menu select Tools>Error console. Please send the error message to petr.simon@gmail.com. Enjoy!
- LyZ only works with Zotero 2.0.
- Install LyZ from Firefox Addons and restart Firefox.
- Open LyX and set LyXServer path (in LyX go to menu, Tools > Preferences... > Inputs > Paths and set LyXServer path to): Windows users can use the default path setting in LyZ, i.e. “\\.\pipe\lyxpipe”. Linux and Mac users can use e.g. “~/.lyxpipe” and change the LyZ settings accordingly.
- By default all characters are escaped, e.g. š becomes \v{s}. Set extensions.lyz.use_utf8 to true in about:config to avoid escaping (in case you need to use non-latin scripts such as Chinese).
- Open document in LyX.
Adding and inserting citations
- Open Zotero, select citation and either from LyZ menu or from context menu (right click on the citation) do “Cite in LyX”.
- When you try to insert citation into a new document (i.e. document unknown to LyZ) you have select BibTeX database. You will be asked to either create a new database or choose a database you have created before (by LyZ). Type the database name (*.bib extension is automatically added if you don’t provide it) and press OK. The citation is added into the BibTeX database you have just created and inserted into the LyX document. Your citation should appear in LyX document now.
- Insert the BibTeX database into LyX document. See BibTeX and LyX.
- Insert additional citations, new ones from Zotero, previously added citation can be either inserted through the LyX interface or from Zotero.
- If you modify the reference information in Zotero, use “Update BibTeX” from LyZ menu to update the BibTeX database.
Custom BibTeX keys
- Custom BibTeX keys can be set in LyZ > Settings dialog.
- The default format is “author year title”. Good alternative for the use with natbib package is format “zotero”, which will produce “human unreadable” BibTeX keys.
- Key formats can be composed from keywords “author”, “year”, “title”, “zotero” and separators such as “_” (the following characters should be safe to use: a-z, 0-9!$&*+-.:;<>?[]^`|), e.g. “author year title”, which will produce authoryeartitle BibTeX key, e.g. tichy1988thefoundations. If you prefer the default format used in Zotero BibTeX export (tichy_thefoundations_1988), change the pattern to “author _ title _ year”. The keywords and any separating characters have to be separated by space. Characters in citekeys are escaped and unsafe characters are removed conforming to /[^a-z0-9\!\$\&\*\+\-\.\/\:\;\<\>\?\[\]\^\_\`\|]+/g.
Update BibTeX
Menu command “Update BibTex” will update BibTeX database of the active LyX document. Whatever changes made in Zotero will be reflected in the update, including BibTeX keys if the BibTeX key format or the relevant information (first author, title, year) have been changed.
When a single BibTeX database is shared among several authors, e.g. using version control system such as SVN and CVS, LyZ database is updated from local working copy of BibTeX database.
Only current LyX document will be updated. Multiple document update is implemented, but seems unreliable. Needs more testing…
Synchronization between LyX/BibTeX/LyZ
When Zotero reference is changed, BibTeX database as well as the LyX document can be updated. This is useful when nice BibTeX keys are used, such as ‘author year title’ and e.g. the title or the first author’s surname has been modified, which will result in modification of the BibTeX key. When the “Update BibTeX” is run, you should select to update the LyX document in case your modifications to Zotero references might affect your BibTeX keys. Before the update, a backup of the active LyX document is made (extension *.lyz). LyZ will save, close and then reopen your document.
Notes on usage
- Credits: Lyz is inspired by Lytero, which I wanted to improve, but ended up starting from scratch. Hence the new name. Thanks to Dan Stillman and mronkko at zotero.org forum. Justin Wood for BOM and escaping suggestions and donation!
- Always modify your references in Zotero. If you modify the BibTeX database manually or using other software, LyZ will overwrite all the changes when you run “Update BibTeX“.
- Keep your Zotero items unique. LyZ does not make an attempt to identify duplicates, they will be treated as different items and unique BibTeX keys will be created.
- When working with master/child documents in LyX, you will have to specify the BibTeX database for each child document. This will be the same file as specified for the master document. Unfortunately LyZ has no way of knowing the relationship between documents, so it has to be done manually.
- Old writing projects can be deleted from LyZ menu. When the record of BibTeX database is deleted, all associated LyX document records are also deleted. When LyX document is deleted, associated BibTeX database will remain untouched as it may be used by another document. The actual file won’t be deleted.
- BibTeX database is uniformly exported to UTF8 and all characters are escaped. Exporting to doesn’t seem to have any advantages. When your references contain extra characters such as the degree symbol, add \usepackage{textcomp} to your preamble.
- URLs in bibliography. Use bibliography style that can handle URLs, such as apalike, or add \usepackage{url} to your preamble.
- LyZ stores the information about documents and BibTeX databases in lyz.sqlite in the Zotero folder. If you backup Zotero with some synchronization application, you will notice the new file.
- When working with non-latin scripts such as Chinese, set extensions.lyz.use_utf8 to true in about:config to avoid escaping.
Source code, Problems, Ideas, Requests
Please explore at https://launchpad.net/lyz. You can comment here, but preferably:
- If you have encounter a problem: Submit a bug.
- If you have a question: Ask here.
- If you have an idea: Submit a request.
English
January 2nd, 2010 at 17:26
Thanks a lot! I have searched for this function for a long time!!!
I think I do not need to export bibtex file every time when I change it…So wonderful!
January 2nd, 2010 at 18:18
Dear, I have wrote a brief introduction to LyZ on my blog (in Chinese, http://www.loyhome.cn/873.html), and I’d like to translate this post into Chinese later on. Thank you again for your wonderful work!
January 2nd, 2010 at 18:22
太好了! 謝謝你
January 2nd, 2010 at 19:56
Done! See http://www.loyhome.cn/874.html if you like…:)
By the way, can you understand Chinese? That’s really surprising!
January 4th, 2010 at 12:23
Great job!
谢谢你的工作!
January 6th, 2010 at 6:28
Sounds great! I was always looking to prevent this extra export of data into a .bib file from zotero.
But I have some problems:
1. Your plug-in does not export special characters like German umlaute correctly.
2. Deleting and renaming of bib and lyx-record does not work for me.
But I’m working on a Mac, perhaps this explains the problem. What a pity! – I really would need your plug-in!
January 6th, 2010 at 7:11
Peter,
thanks for you interest. Please let me know more and I try to fix it. 1. export the entries you have problem with to bibtex and send it to me (petr.simon@gmail.com). 2. in what way does not the deleting and renaming work? Please look in firefox menu bar Tools>Error Console, there should be an error message.
Thanks
January 7th, 2010 at 3:54
Hello,
thanks for this plugin. I am using lyx on my mac and have problems using bibdesk for my references. I like zotero for this much more. I installed lyz and I can’t get it to work for some reason. I cannot find lyz preferences anywhere as well. In the add-ons lyz preferences is disabled and I don’t know if I have to make any changes. I get the cite in lyx option but I can’t get the citation in lyx. Any ideas or similar problem? Am I doing something wrong?
Thanks again and happy new year!
January 7th, 2010 at 10:40
I feel like an idiot, but I cannot get past the first step. I already have zotero. I installed the LyZ addon & restarted firefox. In Lyx I set the lyxserver path.
But where is the “LyZ” menu? How do I find it? In the Firefox Tools panel, it says I do have LyZ installed, but the preferences button for LyZ is gray, it can’t be clicked.
PS: there’s a misspelling in your title. you have an extra r in “integration” in Firefox’s addon listing, you have “LyX intergration plugin”
January 7th, 2010 at 10:46
Paul,
thanks a lot. I have corrected the typo.
The Lyz menu should appear in Zotero, left of the advanced search button. Lyz preferences are in the Lyz menu.
If you don’t see it, please let me know what platform are you on and please check in Firefox menu: Tools> Error console. There should be an error message.
Do you use any other Zotero plugins?
Cheers
January 9th, 2010 at 4:37
First: thanks for all the efforts you make
I have installed LyZ. My question is when I click on “Update bib Tex” which .bib database it updates or how can I link the Bib Tex database that I created and inserted in the new document in LyX with Zotero, so when I click “Update BibTex” that database to be updated.
Thanks!
January 9th, 2010 at 5:18
solved! I do not know why it took some time to ask me to create a new database. It functions perfectly
January 11th, 2010 at 1:25
Great tool!
But I’m dealing with a kind of an error… When I cite in Lyx using Lyz pluging for Zotero I manage to see te citation in Lyx workplace but not in the previewed document where I only get a “[?]“.
Can anyone help me on this one?
Thanks
January 27th, 2010 at 18:35
Sorry for late reply, do you still have that problem have you already solved it? It seems that you haven’t inserted the Bibliography into the document. Cheers
January 28th, 2010 at 8:04
Hey Petr, thanks for this plugin, it is really needed in the latex world
I have a problem with it, though – I use Kile instead of LyX and LyZ simply does not work. I set the lyxserver correctly, but when I try to push the citation to LyX (Kile, actually), Firefox freezes and I have to kill it. Can you think of what could go wrong here?
Thanks again for this!
January 29th, 2010 at 14:39
I have glanced at the Kile server implementation and my guess is that the hangs are caused by the fact that the Kile server only supports two commands that LyX server has and does not communicate back at all. So LyZ is waiting for response, which never comes.
The functionality that Kile supports is very basic (only inserting citations and the whole biblipgraphy), so creating a separate plugin for Kile would be the simplest way. So none of the the convenience functions that LyZ has, will be possible for Kile. Btw. I’ve used Kile for a while, but I never saw how it could be even remotely compared to Emacs/AucTex/RefTex/Ebib.
February 2nd, 2010 at 15:03
Petr,
I’ve been having some difficulty with citation records that contain non-ascii characters, like these:
title: limiting … to 2 °C
author: Voß, Jan-Peter
After some messing about, I’ve finally learnt that BibTeX=LaTeX, and so rather than try to have these as Unicode in the BibTeX file – which won’t work – they need to be written as escaped LaTeX.
title: limiting … to 2 {{\textdegree}C}}
author: Vo{\ss}}, Jan-Peter
This then works as I need it to with the LyX document set as Unicode UTF8, as you say above (and including package ‘textcomp’ in the document LaTeX preamble for the degree symbol).
I also can get Zotero to export the underlying .bib file this way if it exports in a non-UTF8 encoding: so far “Western (MacRoman)” and “Western (Windows-1252)” have done the trick. That’s on my Windows box too; I will normally be using OS X.
I’m telling you all this because I’d like to suggest that you update LyZ to allow setting the BibTeX export file encoding to handle this situation. I’m assuming Zotero’s API would allow you to do this, but I haven’t been able to find the necessary method to check at this point. (I was hoping to temporarily modify your JS code to test this before coming here.)
Hope you feel this is worthwhile, thanks!
PS – I have LyZ working fine on OS X, but so far I can’t get it to work on Vista32 (LyX 1.6.5). Nothing happens when calling Cite in LyX (no request to create bib file)
February 2nd, 2010 at 15:24
Justin, thanks. The “ß” can be crunched by bibtex without problems. Only the degree symbol is problematic. Good idea about the encoding choice, I will look at it soon.
February 2nd, 2010 at 15:36
Btw. I have no idea what Vista is about. Try to have a look at the Error console in Firefox and try to start lyx from commandline with ‘-dbg lyxserver’ option.
February 11th, 2010 at 7:07
Dear Petr,
Great add-on. It makes Zotero complete.
I’ve only run into one small problem. If a web site or report is authored by an organization, LyX/LaTeX breaks the organization name into a “first” and “last” name. The way to avoid this is to use double curly brackets in the BibTeX database, but LyZ is only putting single brackets. For example, we want {{National Bureau of Economic Research}} but LyZ is putting {National Bureau of Economic Research}. As a result, without editing the .bib file, the References will have an entry: “of Economic Research, National Bureau.”
Thanks again.
February 12th, 2010 at 8:04
Marsh,
Thank you. I have tried putting the organization name into the single field and manually enclosing it with brackets, which seems to work fine (only LyX displays it incorrectly, splitting the name), but this might be limiting if you also use Zotero with Word or OOo plugins.
I am not sure how to distinguish organization from an author.
In fact all the export to bibtex is identical with Zotero’s, except for the citekeys, so this issue would be better dealt with in Zotero code.
The only solution I can see would be to add another type of creator in Zotero (such as Organization), which would be handled during export to Bibtex by double brackets.
Someone must have had this issue with Zotero already, have you found some discussion about it? I try to look, later today, someone must have had this problem.
Petr
February 12th, 2010 at 10:21
Thanks a lot, at last someone made it! you rock man! Now switching completly to Lyx
February 19th, 2010 at 4:52
This looks great and I’d love to try Lyz, but it isn’t compatible with my version of Firefox (3.6.2pre). Can you bump the maxVersion from 3.6 to 3.6.* in the .xpi?
Thanks.
February 20th, 2010 at 3:18
Congrats! This combo is the best ref man on the market now.
It.
A keyboard shortcut to insert refs would make it complete for me.
February 21st, 2010 at 6:34
Will do
Had that in mind, but it slipped…
February 21st, 2010 at 6:34
Will do, try to update tomorrow.
February 21st, 2010 at 22:33
It’s me again. I worked with Lyz pretty well while dealing with English reference. However, today when I tried to cite one Chinese book, there is no response. I set the LyX document as UTF-8. And if I export the bib database in zotero and import it in LyX,it will work well(just in the old way before lyZ’s appearance). Can you help me?
March 8th, 2010 at 7:27
Hi Petr,
This is a great tool, I’ve installed it along with LyX and successfully managed to insert my Zotero citations into my paper. I have a couple of questions about modifying the behavior of the bibliography; as I’m a bit of a LyX novice I’m not sure if these issues are a LyX or LyZ matter. Here it goes:
1) When inserting citations from the BibTeX bibliography into the paper body, there doesn’t seem to be anything keeping the citations in numerical order according to first appearance in the paper. For example, I have a document with only three citations, all from Smith. When I preview with two citations inserted, I can have citations that look like this:
“…we know this is true, according to Smith [1][2] …”
but then I can add another reference earlier in the sentence and it will appear as
“…we know this[3] is true, according to Smith [1][2] …”
Generally in papers the first paper to be referenced is also the first to appear in the bibliography or references section. I would expect the bibliography to insert the first referenced paper as the first in the references list, so the reference numbers always go in order — i.e., I would expect the numbers to shift such that it looks like
“…we know this[1] is true, according to Smith [2][3] …”
noting that the numbers now point to different references. Is getting that ordering right something LyZ controls, or do I need to fiddle in LyX?
2) If I would like to change the appearance of citations from bracket-enclosed to superscripts, is that a LyZ or LyX matter? i.e., going from [1] to a superscripted ^1.
3) If you click ‘Update BibTeX’ without saving your LyX document first, when LyZ closes and reopens the LyX file it loses all unsaved changes. I’m not sure if this means that the save-before-backup you mentioned isn’t working in general, or just that my particular installation is bad. Does anyone else have this problem?
Thanks,
Mike
March 8th, 2010 at 10:20
Hi Mike,
1) LyX issue, you need to change the type of bibliography to e.g. unsrt
2) this you also have to do in LyX
3) Thanks, I will repair that.
Cheers
Petr
March 16th, 2010 at 6:41
If you implemented the keyboard shortcut, how do we upgrade? FF doesn’t grap updates to the plugin automatically.
Also, I cannot get it to work on windows using Lytex (portable lyx). It complains that lyxpipe doesn’t exist. Any idea why?
March 16th, 2010 at 7:17
Jose,
I haven’t implemented the keyboard shortcut yet.
Not sure why FF wouldn’t get the updates. In case you have lower version than that on Addons, just install from there directly. I will take a look at this later.
Try to start the portable lyx from commandline by “lyx.exe -dbg lyxserver”. I suppose the server might be disabled because of the portable installation. Not something I can help with, sorry.
Cheers
Petr
March 16th, 2010 at 21:24
This is a nice tool but…
If it ancounters any alien reference during “Update Bibtex” i eats it – replacing with “undefined” AND replaces it on disk too. I have lerned about .lyz~ backup file too late… !
It have deleted my whole bibliography in 30p paper. I was a little bit mad…
I have modified the script to guard against this – just skipping over unknown keys and informing about it. Where do you want it to be send? (Maybe just contact me).
And to others – just do not mix bibliographies for now! Keep it all under zotero/lyz or you will be sorry!
March 18th, 2010 at 19:55
Petr,
Can I use LyZ to keep my BibTeX file updated for use in other LaTeX authoring software? (in my case Emacs, using org-mode to export to LaTeX and eBib for the bibliography)? I like that LyZ (so it seems) can do an incremental export of the additions and changes to my Zotero library. Of course I’m willing to run LyX in the background. I tried setting the LyX server path in LyZ and LyX to the same value (~/.lyxpipe), but that, it would seem, is not enough.
And here’s a feature request: the ability to delete some of Zotero’s normally exported BibTeX fields. In my case I like keeping URLs in my database for paper articles, but my BibTeX style uses them if they’re in my .bib file (which don’t want and can’t seem to change). I’d be glad to keep them in Zotero, but omit them from the .bib file. Alternately, LyZ could offer a way to pipe the changes through something like ‘bibtool’ which I could configure to do the transformations. But I suppose this would be hard to do in a cross platform way.
March 18th, 2010 at 20:39
ScoBe,
you should be able to do it as long as LyX is running. It’s been a while since I used ebib, so I don’t remember if it watches whether the bibtex file has been modified.
You would be adding references to the opened LyX document (which you should save and open again later or you will need to relate new document to the original bibtex file). Much better way would be to write a simulation of lyxserver for Emacs (that’s the way Kile works, even though in rather limited way). I might give it a shot since I still use Emacs for everything else, but no promises (certainly not sooner than end of April).
I was thinking about something like your request. As you say, using bibtool might not play nicely on all platforms.
I will keep that in mind and try to figure something out soon…
March 26th, 2010 at 7:31
Very interested in using this – I normally use JabRef / windows and would like to cut out the intermediate stage. My initial experience has been a bit frustrating getting the bibliography format I want -some author-name style like APA would do – but a lot of the combinations of bibtex styles and bibliography settings selected in LyX seem to fail on output. Only basic numbered forms seem to work properly. Maybe this is a LyX-side problem, but it is not obvious to me where the problems lie.
March 26th, 2010 at 7:44
Ian,
could you be more specific in what way do the bibliography styles fail? There are two sides that: (1) how the citation appears in the text (your author-name) and (2) how the whole reference gets formatted in the bibliography.
I assume you have troubles getting (1) right. You can to do this simply in LyX > Document > Settings > Bibliography > Natbib (author-name). If you want “Author (2009)” instead of “(Author 2009)” or any other format you click on the citation, and you change Formatting > Citation style
Hope this helps
Petr
March 26th, 2010 at 9:12
Hi Petr.
I have zotero LyZ setting to produce [author year title] bibtex keys.
If I use in LyX: Document > Settings > Bibliography Default
and for the bibliography style I choose style > unsrt then the PDF is produced with numbered citations and a numbered bibliography OK.
If I use in LyX: Document > Settings > Bibliography natbib
and for the bibliography style I choose style > unsrt
some of the entries in body text of the PDf appear as (author?) [n] but appear in the bibliography OK
If I try and use apacite latex warns the style is not compatible with natbib.
If I try and use the plainnat style recommended by latex I get [author, year] citations in the text, and an alphabetical list in the bibliography, but not in APA style and with unwanted hyperlinks to citation sources that run right across the right margin.
I’ve been messing around to try and solve the APA issue, and updated my miktex packages in the last hour or so. I also switched the document property from Book (AMS) to Book (Koma) and back – I don’t suppose that helped.
There seems to be a style apalike that is for natbib but I don’t have it in my distribution – maybe I need to install that. Or maybe just stick to a basic style that is working – I can probably live without using APA (though I am planning to write a psychology book, so it would be nice…). I looked at how I set up JabRef in another project I’ve started working on a while back – there I just use the plain citation style and settings > bibliography> default. That gives numbered citations in the text and an alphabetical un-numbered bibliography, which thinking about it now I realise is useless.
There are clearly things I need to understand better to use this effectively.
Ian
March 26th, 2010 at 9:17
OK. I always use apalike2 with natbib, in miktex. I am not sure if it’s part of natbib, but as you say, mixtex has apalike style. That should work too.
Hope that works
Petr
March 26th, 2010 at 14:24
Thanks for LyZ!
I’m just starting using LyZ and Zotero for the first time, but I’ve run into a problem. My university requires that for any website I reference, I add the date I accessed it into the bibliography, but LyZ doesn’t include the info in the bibtex file. I suppose it makes sense since bibtex doesn’t have a field for it, but I’ve got around that before by sticking the date accessed into the note field. Actually, with a customised bst file, I think it would be possible to create a new accessed field, but I’m not certain about that.
To get down to my real question, could you include the date accessed in the output? Or give me some advice on how to do it myself if you don’t have the time?
David
March 26th, 2010 at 14:48
Hi,
Zotero’s field “Extra” is usually exported into bibtex’s note. So you can copy from accessed to extra to achieve what you need.
Would this be a usable solution?
Petr
March 26th, 2010 at 15:23
That does exactly what I want – thanks! But it would still be nice to automate it somehow. Most of my research is web based, so I need to copy it for each reference.
I’ve just had a closer look at bibtex, and it seems that fields can be added to the bib file which will be used if the bst specifies them. So my suggestion is that the accessed date be written to a new “accessed” field in the bib file, which will then be there to be used by anyone willing to customize the bst.
As I said, I’d be happy to try making the coding changes if you’d accept them upstream.
David
March 26th, 2010 at 15:29
David,
So try to submit a patch to Zotero developers.
These changes would have to be done in Zotero’s sources (I am simply using Zotero’s Bibtex export routines) and that’s beyond my powers
Petr
April 7th, 2010 at 16:26
Petr,
I am getting a notice from Firefox with the latest updates >3.6 (on Mac OS Leopard – but I don’t think this makes a difference) that Lyz will no longer work. I don’t want to do the upgrade and risk being not able to use Lyz or go back to the previous version. Do you know what the go is here, any comments? Thanks for your help!
April 7th, 2010 at 22:34
Tom,
not sure why the notice appears, but you should be able to upgrade safely. I have no way of testing it, but as long as Zotero works, LyZ should work too. Please let me know if you run into troubles.
Petr
April 29th, 2010 at 0:15
This addon is great!
Thanks you very much
April 29th, 2010 at 5:35
Tom, Petr, and all the ships at sea,
I had the same problem as Tom but have the very excellent MR Tech Toolkit plug-in installed in Firefox. It allows you to right-click an entry in the FF add-ons list and choose a context menu item to make the installed add-on compatible with the current version of FF. Of course, the add-on may really be incompatible and work in ways that break things, but usually the incompatibility is just because of the way maxVersion is set. This solution seemed to work fine.
Then today I upgraded LyZ to version 1.6.7.1, and there’s no problem any longer (w/ FF 3.6.3).
So that’s the solution. Now for the problem.
For some reason, FF did not update LyZ to 1.6.7.1 automatically. I even went into Add-ons, highlighted LyZ, and pressed Update, but still I got zilch. I had to go to the web site and install the new version manually and without benefit of an update.
Any chance of getting this last problem fixed?
Marsh
April 29th, 2010 at 7:16
Marsch and Tom,
unfortunately until Lyz is moved from experimental, the automatic updates won’t work. There are suggestions to use https://addons.mozilla.org/en-US/firefox/addon/59266, which is also experimental.
I have applied to move Lyz to public some time ago, but the review process takes time.
We must be patient
Petr
April 30th, 2010 at 17:31
Pretty good software, exactly what I’ve been searching for. Many thanks!
One feature request: At least for me it seems not to be possible to remove an entry once you decided to push it from zotero to Lyx.
Removing the entry out of the bibtext file will restore the entry via the next “update bibtex” in zotero, removing the item in zotero completely (delete the entry and empty the trash) seems to crash Lyz somehow, as now Lyz won’t update the bibtex file any longer and also refuses to update the Lyx file. Removing the entry out of the bibtex file manually after deleting it from zotero won’t make Lyz work again.
So an entry once cited in Lyx needs to stay in zotero forever and also can’t be deleted in the bibtex file, which may get us in messy trouble somehow, especially as purging an item in zotero crashes Lyz (tried it 2 times).
Regards and thx again
John
April 30th, 2010 at 17:36
update: what is still working after deleting an entry in zotero is pushing new entrys to Lyx out of zotero. However updating the bibtex file won’t work, neither old entries before the deletion are updated, nor are the most recent ones. The bibtex file won’t be changed any longer via “update bibtex”
April 30th, 2010 at 17:46
John, good point. The ‘update bibtex’ works via the keys (which are zotero unique ids) that you find on the first line of the generated bibtex file. So lyz basically just reads those and everything else is rewritten.
I will add checking for deleted items soon. Stay tuned.
Thanks a lot
May 6th, 2010 at 22:37
Dear Petr,
many thanks for your quick answer. Unfortunately, I got another feature request, perhaps very special, but perhaps also
really useful for many people:
I am using Lyx and Zotero at least on 3 Computers (2xWin, 1 Linux) and I am syncing the zotero folder and the Lyx and corresponding bibtex file I am working on to all these machines (via dropbox; btw: great piece of software, too).
So I have to tell Lyz on the first time on every computer which Lyx and which bib file to use.
So for now, I got 3 entries, all pointing to another path but in effect to the same files (lyx and bibtex). At first, it seemed to work. I can cite in Lyx from Zotero on all machines.
But if I update the bibtex file via Lyz, all inserted entrys from other computers into Lyx become [undefined] even though in
effect the bibtex file is still the same and even though the identifiers in Lyx haven’t changed.
To cut a long story short, it would be perhaps easier to tell Lyz to use not an absolute path to the Lyx and bibtex file
(like: C:\documents and settings….), but to use a relative one, like: example.lyx needs the bibtex file example.bib in the
same folder, or the folder “references” as a subfolder of the folder the lyx file is in. Then one would only have one entry
for a bibtex or Lyx file and only one sqlite entry.
Lyx does this too with images inserted into lyx if the images are in the same or in a subfolder of the lyx file. Using my
suggested solution, one would only have one entry in the sqlite database and so Lyz should work on all Computers even if you
carry your files around what many people might actually do.
Another problem:
Lyz seems to loose connection to Lyxpipe somehow: Using Ubuntu Lucid and Lyx 1.6.5 I can usually add only one entry, after that, firefox just hangs. I even can’t update the bibtex file. Only closing Lyx will get firefox working again. Then the error message is
ERROR: lyxGetDoc:
Could not retrieve document name.
After adding some entries in Windows 7, trying to update the bibtex file led to nearly the same error, with the difference
that the first error message was something about no connection to the lyxpipe. However, firefox does not crash, you can make
another try right after clicking away the error messages. In Ubuntu however, you only can close Lyx to unfreeze firefox
again. Only one time firefox told me sth. like “a script is working but needs to long”. Unfortunately there aren’t any error
messages in firefox’ Error console.
It does not seem to have sth. to do with using Lyz, Zotero, and my files via Dropbox on different computers as I already
tried all this stuff with fresh mozilla user profiles, fresh lyx configurations, fresh Zotero etc.
Update: After trying again with a fresh profile on Ubuntu with only 3 Zotero entries I get a message trying to update the bibtex file:
“Zotero record has been changed. Press OK tu run ‘Update Bibtex’and insert the citation…”
But firefox needed a few minutes, so perhaps with a larger database that might be what causes firefox to freeze….
However hitting the “OK”-Button will freeze firefox again…
Now on the fresh Ubuntu profile I even can’t add one entry, irrespectively if I use a new Lyx file or a file already known by Lyz. Sooner or later Lyz seems to crash.
Thanks again for Lyz, without it I would have to use OpenOffice
I hope I don’t cause you too much trouble
Bye
May 6th, 2010 at 23:04
short update: now with my first/main zotero database (after rebooting from windows where I checked if Lyz in Windows works) I was able to add at least 10 entries to Lyx via Lyz in Ubuntu. So the Problem might not be related to Ubuntu alone. Unfortunately updating the bibtex file after adding some entries, Lyz at first showed all the entries I added in Windows to tell me that these will be added to the bibtex file (even though they are still in there as Lyz in Windows added them), but after hitting “OK” Firefox is frozen again…
May 6th, 2010 at 23:12
John, thanks for the input.
I have actually already realized the absolute path problem, as I also use both linux and windows, but lately I had little time for it. I promise to look at it during next week.
As for the lyx server, all the freezing is caused by miscommunication with lyxserver, I will have to investigate more. I have noticed occasional problems earlier, which seemed to go away with a little timeout added. Sometimes the server seems to be little lazy. I’ll try to find out soon and correct all this behaviour.
I personally use the ‘update’ rarely usually just for one or two slightly modified entries. For what purpose do you typically use it?
May 6th, 2010 at 23:49
Petr,
. Therefore I also tested the “update bibtex” function a lot. I really like this feature as I have the ability to change my entries in Zotero without loosing all entries in Lyx. Therefore this feature becomes more and more important the more I have already cited. So I think i will use this feature regularly as I notice failures in my references often really lately 
thanks for your fast answer. I am glad to hear that you use linux and windows, too. and that therefore you also think about switching to relative path names
I think that the lazy Lyx server might be the problem, too, as the faster you add entries via Lyz to Lyx the earlier you will run into trouble.
At the moment I don’t use Lyx and Lyz productively, I am just doing some tests to find out if it fits my need to write 200 pages
I will be glad to do some tests with the new Lyz version in a few weeks
May 6th, 2010 at 23:59
Great. You’re on!
I am actually bold enough to write my thesis with it and so far I didn’t have to curse… There are always the backup files before each update… I’ll post the totally bug-free revision soon
May 7th, 2010 at 1:43
Petr,
if you like to, you can gladly send me some alpha/beta/pre-release versions via email. I can do some user-like testing, e.g. migrating an already existing lyx and bibtex file from absolute to relative paths etc.
May 7th, 2010 at 10:05
Thanks, will do
May 8th, 2010 at 4:32
Hi. Thank you for the Lyz-plugin. I have been following the discussion here for the last weeks, since I have started writing my thesis (in theology) in Lyx. Sadly I can not get the piping to work (maybe because I am using Zotero 2.0.3). But I am really looking forward to a bug-free version soon:-) (By now I can’t get my bibliography into my document; all the special characters are strange when I just save it as a .bib-file). Sorry for this long message and thank you again for your work
May 15th, 2010 at 2:12
Dear Petr and others,
I am a novice with lyx and zotero. I followed all the steps to get it work but failed. Zotero is normally installed and Lyz too. If i want to citate in lyx, i get an error: “Wrong path to Lyx server. Set the path specified in Lyx preferences.” and “Could not contact server at: \\.\pipe\lyxpipe” and “Could not retrieve document name.”
I really don’t have a clue what i’ve done wrong. I hope you can help. I suppose it’s a lyx problem?
May 15th, 2010 at 8:45
Reiner,
I assume you are using windows. Make sure that “\\.\pipe\lyxpipe” is set in Lyx. Naturally, Lyx has to be running. You can start lyx by “lyx.exe -dbg lyxserver” from commandline to see if it’s really working.
Cheers
Petr
May 21st, 2010 at 19:28
With Firefox 3.6.3 and Lyz 1.6.7.1 on Mac OS the update Bibtex function does not seem to work. I don’t get any error message, but it is not updating the Bibtex file…
May 22nd, 2010 at 0:19
Might be related to a lyxserver problem. I will try to write up an alternative communication with the lyxserver soon (couple of days, as I am too busy now). In case you speak javascript, don’t hesitate to have a look at the source code at launchpad
May 22nd, 2010 at 17:54
Ahhh, I think it’s because I deleted a reference in Zotero…
May 22nd, 2010 at 18:04
Right, that’s possible. This is already fixed for the next release. Give me few days.
June 9th, 2010 at 8:13
Hi Petr,
I’m really impressed by the functionality. I was just looking at switching back to Lyx from OpenOffice but the key point for me was the Zotero integration as I got used to it very much. Unfortunately I admit I encounter a lot of LyxServer communication issues (Firefox freezes), so to get 3-4 citations through it may even require 10 restarts of Lyx and Firefox. I’m on Kubuntu 10.04 with disabled KDE integration in Firefox (I noticed it caused trouble). Apart from standard Kubuntu versions (FF 3.6.3, Zotero 2.0.3, Lyx 1.6.5) I tried to test it with a freshly compiled Lyx (1.6.6.1) but the rate of crashing is similar. I’d be happy to test any bug-fixed versions so please send me any newer ones.
BTW, how do you create a FF plugin file from the sources downloaded using bzr from Launchpad?
June 9th, 2010 at 9:45
Fix is basically ready, I just had little time lately to finish it up. It will appear on FF addons soon.
FF plugins are simple zip files with extension .xpi. I have a Makefile for it:
all:
rm -rf lyz.xpi && zip -r lyz.xpi ./*
Petr
June 13th, 2010 at 4:41
Hi Pol,
I had the same as you encountered so I just wanted to say thx to Petr here for fixing this bug. I am glad that also other people (and not only me) can benefit from the new version
July 17th, 2010 at 2:37
Hi Petr,
thank you for the Lyz-plugin – it’s doing a great job! Nevertheless I noticed a little glitch on Mac OS X 10.6.4 using Lyx 1.6.5, Firefox 3.6.6 and Lyz 1.6.8.1.
When I change an existing Zotero item (e.g. author name) and then use “Update BibTeX” from the Lyz menu I get the error “Wrong path to Lyx server. Set the path specified in Lyx preferences” before Lyz asks me if I want to update the lyx document. None the less the lyx document will be updated correctly after I close and reopen it manually.
I do not know if I am the only one witnessing this behavior but it’s truely just a minor inconvenience.
I Hope, I could help you to make Lyz even better
Michael
July 17th, 2010 at 7:43
Hi Michael,
).
you’re not the only one. It seems to be happening from time to time, for reasons unknown, so far that is
Occasionally I am trying to find out what’s going on, but being too busy recently, I haven’t gave it too much effort (I’m hoping someone comes by, looks at the code and finds the problem
Take care
Petr
August 6th, 2010 at 22:28
Works great (on Ubuntu 10.04). I’m especially grateful for the plugin since exporting the whole Zotero-Database would produce flawed BibTex files (probably due to special characters some abstracts). Thanks so much!