vu wrote:

rgheck wrote:
Export the document to LaTeX and try compiling it manually. Report the error messages. It sounds to me as if either LyX or LaTeX isn't finding the .bib file, and there are various reasons this can happen.



I did this, and the output in the terminal was as follows:

[EMAIL PROTECTED]:~$ bibtex CONS6017-Essay
This is BibTeX, Version 0.99c (Web2C 7.5.6)
The top-level auxiliary file: CONS6017-Essay.aux
I couldn't open style file authordate1.bst
---line 3 of file CONS6017-Essay.aux
 : \bibstyle{authordate1
 :                      }
I'm skipping whatever remains of this command
I found no style file---while reading file CONS6017-Essay.aux
(There were 2 error messages)


I was using the .bst file authordate1, but I have tried using other .bst
files (naturemag, authordate2) with the same result.

Because the message said it was missing a style file, I tried using a
different style file, one that was not part of the default Lyx installation
(the same .bst files, authordate1, harvard, agsm). DOING THIS SOLVED THE
PROBLEM.
I explored the /usr/share/texmf-texlive/bibtex/bst folder, which is where I
assume the .bst files are located upon installation. I noticed many were
missing (the ones I had a problem with initially).
However, I'm perplexed as to why the .bst files included in the Lyx
installation have disappeared. How to I return it back to its "original"
state? Can I put the bst files I've downloaded from CTAN and elsewhere into
the usr/.../bst folder, and if so, under which subdirectory (ams, babelbib,
base, index, natbib)? Why have the Lyx bst files disappeared?
LyX itself doesn't install any .bst files. Your distribution might, or maybe some Mac thing does, but LyX itself doesn't. Anyway, yes, you can put .bst files into the .../bst folder, and it doesn't really matter where they go. But a better solution is to create a "local TeX tree" and put them there. There are instructions for how to do this, relating to class files, in the Customization manual.

Basically, you want to find the file texmf.cnf and then, in that file, find the line that declares the variable TEXMFHOME. This will tell you where TeX expects to find your local tree. In my case, it's $HOME/texmf/. So you create that directory and then---this is very, very important---mirror the structure underneath your MAIN TeX directory, which in your case is /usr/share/texmf-texlive/. So you'd want to create $HOME/texmf/bibtex/bst/, and put your bst files there. You can create subdirectories within .../bst/ as you wish. Always make sure to run texhash after you put new stuff there, though. The advantage to doing it this way, of course, is that you don't have to mess with the system directories, which means the stuff you add from CTAN or stuff you write yourself won't get over-written on upgrades.

You can also run:
kpsepath bst
to see where TeX will look for bst files, etc.

Richard

Reply via email to