Rich Shepard wrote:

> On Mon, 17 Nov 2003, Angus Leeming wrote:
> 
>> Rich, whilst you can indeed use natbib with the bibitems stored
>> directly in the lyx file, I'd heartily recommend that you don't do
>> this. Instead I'd recommend that you use BibTeX to manage your
>> database. Why? Well --- for free --- you'll only list the
>> references you use and you'll only need to compile the list once.
> 
> Angus,
> 
> I undoubtedly have the syntax wrong. I have a file 
> separate from book.lyx which is called book.bib. 
> In the latter file I have entries such as this one:
> 
> @book{Cant97,
> author = {Canter, L.W.},
> year = {1977},
> title = {Environmental Impact Assessment},
> publisher = {McGraw-Hill Book Company},
> address = {New York}
> }
> 
> In the .lyx file I used Insert -> Citation to produce
> something like this:
> 
> (Cant97) also includes a chapter discussing public 
> involvement in the overall EIA process that considers
> advantages and disadvantages of involving the public
> and includes a model for such participation.
> 
> The "Cant97" is actually in a grey block with square 
> brackets and was selected from the dialog box that displays
> all entries in book.bib.

Hmmm. If you have selected the "Use natbib" option from the 
Layout->Document dialog, then you should not see [Cant97] but 
rather "Canter (1997)" or "(Canter, 1997)" depending on the style 
that you have chosen to display this citation in (selectable from the 
citation dialog). 

Hmmm. That is true if you are using "Author-Year" citations. If you 
are using "Numerical" citations, then you'll get "[Cant97]" of 
"Canter [Cant97]" etc. 

Ok, so I surmise that you're using natbib with numerical citation 
style.

Question: is the bibtex file correct? Ie, if you create a latex file 
from your BibTeX data base can you run it through the latex compiler 
to generate a dvi file. Try the attached script, so:

$ sh bib2tex.sh book.bib temp.tex plainnat article

which should generate a file temp.tex

-- 
Angus

Attachment: bib2tex.sh
Description: application/shellscript

Reply via email to