Johann Kellerman wrote: > Am Montag, 6. März 2006 21:35 schrieb Georg Baum: > >> This solution is wrong for two reasons: >> 1. All file names in the temp dir must be mangled in order to avoid name >> clashes > > The extension .bib should be fairly unique, only a problem if you have > refs.bib for subdocument 1 in one folder and refs.bib for subdocument 2 in > another folder. Which would be pointless, since the point of bibtex is to > have a library like '.bib' file.
OK, this reason is indeed not very probable, but we have another one which is more important: forbidden characters in filenames. LyX should work for a novice windows user who does not know anything about filename restrictions and creates a bib file "Meine Bücher.bib". > I'm trying to get this to work with bibunit (no luck yet) > ------------------------------------------- > ERT "\begin{bibunit}" after each chapter / section etc. > And then a normal lyx bibtex inset with the following in the preamble. > \usepackage{bibunits} % multiple bibliographies > [EMAIL PROTECTED]@bibunitauxcnt} > \renewcommand{\bibliography}[1]{ > \section{References} > \putbib[##1] > \end{bibunit} > } You are really on your own here. You can't expect that LyX will work when doing such 'clever' tricks. A better option IMHHO would be to write a wrapper script for bibtex (like given in the bibunuits documentation) and simply use normal ERT. >> A solution that would work in all cases is to set the BIBUNITS variable >> from within LyX. >> export BIBINPUTS=.:${HOME} >> > > This solution will also fail if you have bibtex files with the same name > as my example above. (point 1) At least it will still work for your point > 2. No, it will work, since you need to give all names relative to the main document in TeX, so you would reference the files like "subfolder1/refs.bib" and "subfolder2/refs.bib". > This seems like the best solution. And is already being done for another > path type variable since tex can find the preamble \include{xx.tex} files > (which is not copied to temp) As long as the ${home} is the home of the > document and not global home! Of course, it was only an example. >> Do you file this in bugzilla? > > Should I file request to export BIBINPUTS? Yes please. And while you are at it, request native support for bibunits, too. I too use it myself (but create the final output by a Makefile) Georg