I’m using jurabib for citation in the humanities. Since LyX jurabib support is incomplete I’ve come up with the following solution to “hack” the preamble and document. Just include it in a LyX template and don’t worry about it no more.
Update: It was pointed out to me on the lyx-users mailing list that there is a better way to do it. Take a look in the LyX wiki for more on that.
The following is now deprecated, please take a look in the LyX wiki for instructions.
First I include the following in the preamble to control the citation style:
This is just an example style using the latest version of jurabib (v0.6). Take a look at the jurabib web site and documentation for more information. As you can see jurabib is flexible and you can tailor the style with just a couple of parameters.
I’ve also made the
cite command an alias to
footcite so that I can insert citation as usual in LyX but they will still end up as foot notes.
And because I’m not going to use the regular bibliography formating but jurabibs footnote I must insert the following code in the document, presumably last. Using Insert > TeX Code and put the following in the ERT block:
But this alone will not make it possible to use the LyX support for looking up and inserting citation. To enable that I must also insert a regular BibTex Bibliograhy as usual and select the BibTex database to be used. Of course this will give me a regular bibliography at the end of the document (or wherever I decided to insert it). Since that bibliography is only a concern for LyX and not the final LaTeX document I’ve come up with an rather elegand solution: Put the BibTex Bibliography in a LyX Note block! That way LyX will still find the BibTex database but the
bibliography code it generate will never reach the LaTeX processor.
The hiding only works in LyX 1.4, in LyX 1.3.6 you need to have the BibTeX Bibliography block outside any notes. The problem is that you will end up with an empty bibliography list and a header. To remove it I insert the following code in an ERT block right before the BibTeX Bibliography:
For articles, or the following for reports and books:
This remove the header, there is still an extra empty page. Less smooth but it works too. Or just upgrade to LyX 1.4.
All this is somewhat “hackish” solution but at least a working one until LyX get complete support for jurabib.