At 19:28 24/10/2002 +0200, Dekel Tsur wrote:
On Thu, Oct 24, 2002 at 06:10:04PM +0100, Milos Komarcevic wrote: > At 18:47 24/10/2002 +0200, Dekel Tsur wrote: > >On Thu, Oct 24, 2002 at 05:32:37PM +0100, Milos Komarcevic wrote: > > > >> \usepackage[sectionbib]{chapterbib} works fine for the generic > >> latex report class, but I get errors when I use koma-script. > >> > >> How do I make it work with koma-script? > > > >Try using bibunits. > >After loading the package, you should add > > > > \def\@bibunitname{\jobname.\the\@bibunitauxcnt} > > This still puts the bibliography at chapter level. > In addition, all the bibliographies are combined and identical.Read the bibunits documentation. It is not enough to just load the package.
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...