LyZ: Zotero and LyX integration
This is an old discussion that has not been active in a long time. Before commenting here, you should strongly consider starting a new discussion instead. If you think the content of this discussion is still relevant, you can link to it from your new discussion.
In the error logs, I see "No chrome package registered for chrome://lytero/locale/lytero.dtd". However, this might not be related. I do not have Lytero installed at the moment.
I don't know what's causing it. I have found another problem: The plugin only works in one window. When you open a second window it's gone. I am asking at zotero-dev.
Perhaps it's related to your problem. However, it still work fine for me on windows and linux.
Would you be so kind and try this: http://www.klubko.net/LyZ-1.1-oldinit.xpi
Many thanks for you help
Petr
If I open a new window after the first window, the Lyz icon does not appear in this window, as you said.
Could you perhaps try to see Zotero's debug info, perhaps something shows up there.
Thanks.
I have added "Update from BibTeX" function. This should solve your problem. When you checkout your working copy, run this and it will update LyZ database from bibtex file. It can be only used with "zotero" BibTeX key format (i.e. "human unreadable" format).
I have a couple of suggestions on how to improve the usability of the plugin. First, I would remove the "Update from Bibtex" entry and run this funtionality when either the "Update bibtex" is clicked or a new entry would be inserted to the bibtex file.
Second, I would move the LyZ button to the left so that instead of appearing after the search button, it would appear before that.
Third, I would make the settings popup to have a file dialog with browse button instead of a text box for locating lyxpipe and a radiobutton for choosing the key format.
Finally, Mac version of Zotero currently has different style for buttons than windows and linux versions. Making the style consistent would be nice.
http://img63.yfrog.com/i/screenshot20091231at943.png/
I will move "Update from BibTeX" as the first step in "Update BibTeX". So it will still be manual.
As for the settings, I thought of that, but I didn't do that for two reasons:
1. user has to set the path in LyX first anyway so copy/paste is easy and
2. as far as I understand, on windows pipes are not actually files so that might be quite confusing for a windows user.
As for the radio button, I had that, but I have removed it as well. I think I leave it like that because I am going to implement synchronization of LyZ/Bibtex/LyX so the user can actually play with the cite keys at his or her will (most importantly, nice cite keys can be used and zotero items can be edited after which all is synchronized including the LyX document). It's actually almost ready. I was reluctant to get into it, but I realized that it's quite simple to implement.
How did you resolve the window problem and the conflict with zotfile? I am curious because I have the same problem with my zotfile plugin.
The problem was that we both used the suggestions from Lytero (at least I did ;)), which was forcing the button at the same spot. Zotero overlay, however, has proper identifiers (not sure about before when Lytero was created and that might have been the reason why the Lytero author inserted the buttons the way he did), so it's more appropriate to do it with overlay:
<hbox class="toolbar" id="zotero-items-toolbar" align="center">
<toolbarbutton id="lyz-menu-button" tooltiptext="LyZ" type="menu"
insertafter="zotero-tb-attachment-add">
The multiple window problem is solved by different init() and include.js:
if (!Zotero.Lyz) {
const lyzLoader = Components.classes["@mozilla.org/moz/jssubscript-loader;1"]
.getService(Components.interfaces.mozIJSSubScriptLoader);
lyzLoader.loadSubScript("chrome://lyz/content/lyz.js");
window.addEventListener('load', function(e) { Zotero.Lyz.init(); }, false);
}
and then you need to call all the window stuff like alerts from the current window by
var win = this.wm.getMostRecentWindow("navigator:browser");
win.alert();
as was pointed out to me by Dan Stillman. I should stress that I was learning Mozilla and javascript by writing this plugin so there might be better ways to do stuff.
I have one problem with the plugin though. It's not really working with reference which include umlaute such as ü, ö, and ä. The reference is added to the .bib file and the citation to the lyx document. When I try to create the pdf, though, an error occurs. I have to open the .bib file with another application and simply replace the umlaute with the same character even though they look perfectly fine in the .bib file. After having done this, the pdf file is created without any problems.
Chaning to 'Unicode (utf8)' also doesn't help...
Here is an example:
http://www.springerlink.com/content/6282t3pw0p164758/?p=1c0614ad190f429fb7b43d5f0aba923f&pi=6
By the way, they look perfectly fine when I open the file .bib file. I just replace them with the 'same' character meaning that I can't see any difference between the one ü before and after I replaced it.
Thanks!
I have tried your example, but it works fine (after changing lyx document to utf8). Can you be more specific about the error you saw? In fact the same should happen when you export directly from Zotero. Thanks
Thanks!
___________
LaTeX Error: Command \texteuro unavailable in encoding T1.
Description:
Realität?}
Your command was ignored.
Type I <command> <return> to replace it with another command,
or <return> to continue without it.
___________
I've been trying to get LyZ to work on windows but LyZ always complains that the pipe does not exist. I activate LyxServer by setting the pipe to \\.\pipe\lyxserver in LyX and set the same value in LyZ but it keeps complaining that the pipe does not exist.
Am I doing something wrong?
Thanks
EDIT: it actually works intermittently. Not sure why sometimes it works and others it doesn't. Rebooting firefox seems to help, as not trying to insert citations from the search window but this is really anecdotal...
Thanks in advance
I think you still have to include the line to to overlay browser.xul for backward compatibility. These two lines in the chrome.manifest should do the job:
overlay chrome://browser/content/browser.xul chrome://lyz/content/overlay.xul
overlay chrome://zotero/content/zoteroPane.xul chrome://lyz/content/overlay.xul
Thanks for the plugin!!
Sorry if I state the obvious: It seems that LyX needs to have the document that should recieve the citation active. Moreover, using the value \\.\pipe\lyxserver in the settings in both LyX and LyZ seemed to help me in this regard.
Mots times LyX will have to be restarted in order for changes to the settings to take effect...
;)Frode
I think I might have been to triggerhappy. I have not used LyZ for some time. Seems I too have the same problem as tpaixao. LyZ 2.0 and LyX 1.6 does not work for me on Firefox 3.6.15 on Windows 7.
;)Frode
1) as mentioned, trying to use the exported library directly in a latex compiler (LyX or WinEdit) won´t work. It is necessary to fist open it in JabRef and save. Has this been solved? is anyone working on this?
2) Many of my references are in portuguese, so I have characters such as: "à", "á", "ã", "ç". They all go wrong when Zotero Export´s them. I have to manually correct them in Jabref to the LaTeX equivlents ( " \´a ", " \'a ", " \~a ", "{\c c} ).
3) I tryed LyZ, wich actually includes the refs in Zotero (with the Zotero call name for the ref), but when you compile all references become "(?)". I think this problem is a consequence of problem 1.
I´ve seached several discussions on this and found no answer. I´ve also posted this comment on: http://forums.zotero.org/discussion/3160/issue-with-bibtex-export/
I´m a big fan of Zotero and I´m helping to develop the Brazilian Citation style (ABNT) in Zotero. But now that I have to submit a papper in Latex, exporting my references from Zotero has become a big hassle, that I´m even considering moving to a JabRef or Mendlye. Please let me know if there are ways to solve this because I really love using Zotero.
It would be great if I could get LyZ to work.
1) OK. Exporting and aponing in the Latex compiler (WinEdit) is working. No need for JabRef in the middle.
2) Ok, sounds reasonable. But I don´t know with format supports the portuguese characters. Any ideas (I searched a bit and did not figuere it out). Any ideas? There may also be something with the .bib file. Even when I manually alter it in WinEdit, exchanging for the Latex equivlent (á for \'a), it still ignores thoose characters in the bibliography output.
3) about LyZ, aparently the only thing going wrong is the reference identifier. If in Zotero I do "cite in LyX", it add the LaTeX code. :
\cite{bardelin2004osefeitos} (which are autorYEARfirswordoftitle), and when I compile it shows "(?)"
if I use the regular export bibtex in Zotero, and than open the .bib file the reference identifier is in the format: autor_firswordoftitle_YEAR . So citing:
\cite{bardelin_osefeitos_2004} works fine.
Why does LyZ does that?