Thanks for the reply.

That seems working except that I got exactly the same "Bibliography" after
each chapter even when I have different set of citations in each chapter.

Zailong

-----Original Message-----
From: Dekel Tsur
To: Zailong Bian; LyX users
Sent: 3/29/01 12:13 PM
Subject: Re: Mutiple Documents and chapterbib.

On Thu, Mar 29, 2001 at 11:22:44AM -0500, Zailong Bian wrote:
> I am using Koma-script/report to write a thesis. I tried to create a
master
> file then include several other files as each chapter.  I also wanted
to
> have references in each chapter. As I understand, I cannot use latex
> preamble in the included lyx files since they will be ignored.  And
from the
> chapterbib document, I need to include the bibtex file in each
included
> file.  That's want  I did, but it didn't work.  The citation in the
text
> shows only "[?]" and the references are not listed at the back either.
If I
> insert the bibtex list at the end of root file, the references will be
> listed correctly, but I still see only "[?]" in the text. I didn't see
any
> error messages either.
> 
> I don't know what I did wrong, anyone can help with this? 
>
> The attached are the files I was playing around. Thesis.lyx is the
root
> file, test.lyx and test2.lyx are the included files. interconnect.bib
is the
> bibtex file.

The problem is that lyx runs 'bibtex Thesis' while when using chapterbib
you need to run 'bibtex Test' and 'bibtex Test2'.
A solution is to use the following script:
-------------------
#!/usr/bin/tcsh
foreach file (*.aux)
     /usr/bin/bibtex $file:r
end
-------------------
Save the script into a file called bibtex, and put it somewhere in your
path
before /usr/bin (so the result of `which bibtex` is not give
/usr/bin/bibtex).
You should also remove the \usepackage{chapterbib} from the preamble of
Test.lyx and Test2.lyx

Reply via email to