Hi.

I am using bibunits and it is working perfectly with koma-script.  It
is easy too!

Try the following:

1. Put "\usepackage{bibunits}" in preamble of your master document and
each subdocument you include. Make sure to use "include" option. 
Forget all other latex code.

2. At the begining of each included document, write in ERT
"\begin{bibunit}[unsrt]". Replace unsrt with the style you like.

3. At the end of each included document, write in ERT:

"\putbib[/path/to/bib/file without .bib]"
"\addtocontentsline{toc}{section}{\numberline{}\bibname}" -- this makes
the references appear as a section in chapter.
"\end{bibunit}"

Additionly, add this ERT for some good. :)  -- It lets the
"Insert/citation reference" work as expected.

"{\renewcommand{\bibliography}[1]{}"
 <<< Insert the BibTexGeneratedReferences via Insert/LIST &TOC menu>>>
"}" 

And the final step:  Make a script (eg. name it mylatex) to wrap around
"latex" command.

===================================
#!/bin/bash
/usr/bin/latex $1
/usr/bin/latex $1
for file in *.aux;
do
 file=`echo $file |sed -e s/\.aux$//`;
 /usr/bin/bibtex $file;
done;
/usr/bin/latex $1
=================================
You must go to Edit/Preferences/Conversion/Converters/ and change the
Latex->DVI converter to "mylatex $$i".

After these simple steps, it should work!!

Max



--- Milos Komarcevic <[EMAIL PROTECTED]> wrote:
> 
> 
> Ok, so I have in the preamble:
> 
> \usepackage{bibunits}
> \def\@bibunitname{\jobname.\the\@bibunitauxcnt}
> \let\stdthebibliography\thebibliography
>     \renewcommand{\thebibliography}{%
>     \let\chapter\section
>     \stdthebibliography}
> 
> In the master document I have at the beginning in ERT:
> 
> \bibliographyunit[\chapter]
> \bibliography*{mybibfile}
> \bibliographystyle*{ieeetr}
> 
> and then at the end of each chapter I added a \putbib in ERT.
> 
> When I compile, questionmarks appear instead of references, the
> "Bibliography" headings appear at the correct place and level, but
> there is just nothing there.
> 
> When I remove the BibTeX insets from the end of my chapters, I cannot
> compile at all, I get some errors after the 3rd latex run.
> I don't want to have to remove the BibTeX insets anyway, because then
> I can't
> cross-reference without ERT in LyX while I'm writing.
> 
> (I think the problem is because the BibTeX insets define a global 
> \bibliography,
> so, according to the bibunits documentation, you have to use \cite*
> instead of
> \cite which would mean even more ERT.)
> 
> This bibunits stuff is getting too complicated, I'm tempted to ditch 
> koma-script
> and stick with chapterbib or put all the references at the end...
> 
> 


__________________________________________________
Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site
http://webhosting.yahoo.com/

Reply via email to