LyZ: LyX plugin pro Zotero LyZ: LyX plugin pro Zotero « Slasti a strasti života na moři

LyZ: LyX plugin pro Zotero

LyZ je plugin pro bibliografický manažer Zotero (verze 2 a vyšší), jehož smyslem je zpříjemnit práci s vizuálním editorem pro LaTeX LyX. Bohužel jsem zatím neměl čas přeložit tuto stránku do češtiny. Zdrojový kód je zde: https://github.com/willsALMANJ/lyz.

Máte-li jakékoli dotazy, s radostí na ně odpovím. Pište na petr.simon@gmail.com.

190 comments to LyZ: LyX plugin pro Zotero

  • Thanks a lot, at last someone made it! you rock man! Now switching completly to Lyx

  • Scott

    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?


  • Jose

    Congrats! This combo is the best ref man on the market now.

    A keyboard shortcut to insert refs would make it complete for me.

  • 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?

  • Mike

    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?


  • Petr

    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.

  • Jose

    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?

  • Petr

    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.

  • 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!

  • ScoBe


    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.

  • Petr

    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…

  • Ian

    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.

  • Petr

    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

  • Ian

    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.


  • Petr

    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

  • David

    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?


    • Petr

      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?

  • David

    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.


  • Petr

    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 😉 So try to submit a patch to Zotero developers.

  • Tom


    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!

    • Petr

      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.

  • Manuel

    This addon is great!
    Thanks you very much

Napsat komentář k Ian Zrušit odpověď na komentář