Lyx is a very very nice WYSIWYM frontend for latex (and sgml, which is how this document is being written). Sixpack can communicate with LyX and insert references directly at the curser location. To do this
(read the documentation of LyX called 'extended features')
The configuration variable LYXPIPE should point to the pipe that LyX uses, as defined by the serverpipe variable in LyX. The default is ˜/.lyx/.lyxpipe.in
Thus your ˜/.lyx/lyxrc should contain a line of the form
\serverpipe "/home/dirk/.lyx/.lyxpipe" |
and your .sixpack.rc a line like
LYXPIPE = /home/dirk/.lyx/.lyxpipe.in |
Whenever you want to insert a citation in your lyx document, go to sixpack and select 'insert into lyx', or press alt-l (l as in love).
Notice that another, simpler though less flashy possiblity is to insert a citation into LyX manually, inserting
\cite{CITEID} |
In TeX mode into LyX. Whichever you prefer, you need to then do the following:
You need to tell LyX which bibtex file to use. For this, go to the end of the lyx file, and select Insert->lists and TOC->bibtex reference. Enter the name of the bibtex file, without the .bib extension - for example 'test'.
In sixpack you need to export the document to bibtex. So, either select all the references you want (middle mouse button or alt +) or leave everything unselected, and then you will export everything. Select Transfer->Export->bibtex and then write the name of the file, in our example test.bib.
Another possibility for selecting all entries used in a lyx file is to generate an .aux file with latex (just invoking latex on the latex file will do that, as will 'export as DVI' in LyX), and then selecting 'Edit->mark according to aux file' from the menu. All entries that are used will be highlighted and can then be exported.
Now when you create the document with lyx, you should have a bibliography, and all references correctly.