On Thursday 28 November 2002 3:34 pm, Juergen Spitzmueller wrote:
> Angus Leeming wrote:
> > Attached is a first go at a script to generate a LyX buffer from a BibTeX
> > database. It seems to work really well, although I'm sure that you lot
> > will find things that it fails with.
>
> Impressive! This is a feature I'd really like to have.
> I suppose it is not intended to create a LyX file that compiles without
> error? ATM, I get a lot of errors with plainnat, caused by crossrefs after
> an emphasized booktitle.
> Also, the necessary packages (natbib, url et al.) are not loaded.

Sure. I'm not trying to use it for a latex run. You have BibTeX for that. I'm 
trying to create a robust and maintainable way of parsing a BibTeX database 
so that we can fill the fields of the citation dialog and display citation 
labels in painless manner. 

And scrap a huge chunk of really ugly code.

> With my self-baked bst-file, the script fails. Bibtex produces millions of
> warnings with my style, also within an ordinary bibtex run, because I do
> not understand this really *weird* bibtex language well enough, but at
> least it produces the result I want, despite the warnings.
>
> The script gives me:
> [...]
> You can't pop an empty literal stack for entry Zizek92
> while executing---line 1559 of file diss.bst
> (There were 864 error messages)
> Failed: bibtex bib2lyx3616.aux

Umm. Why does it /fail/ when run from the script and produce only /warnings/ 
when run as part of a latex run? Note that my generated .aux file is really 
very simple. Perhaps I need more in it?

> Anyway, I like the approach. BTW I think this could be used for ascii
> output too, which would be a real killer function then.

I think that that will be trivial once it's inside LyX. Also adding a browser 
to the BibTeX dialog to display all keys, so that you can choose \nocite 
entries...

Angus

Reply via email to