On Tuesday 17 December 2002 1:26 pm, Jean-Marc Lasgouttes wrote:
> >>>>> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes:
> >>
> >>  But then you have to write all the code that uses this hidden
> >> buffer.
>
> Angus> Are you clearing out your mail tray ;-)
>
> Yes, down from 205 to 150 for lyx-devel.
>
> Angus> I don't get your point. However we handle the BibTeX file we
> Angus> should still load something into memory, rather than parse it
> Angus> each and every time some info is requested as we do now.
>
> I mean that parsing individual info from a text-file database is
> easier than trying to parse the bibtex output (how do you get the
> author's name, for example?)

???

There's nothing to parse. The script generates a .lyx file from a .bib one. 
Effectively it goes from a BibTeX database to a buffer that contains a 
bibliography environment. Ie a stack of BibKeys. So there REALY is nothing 
new to parse because the machinery to handle BibKey insets exists already.

Effectively all I'm suggesting is that internally LyX should handle an 
external database in the same way as it handles an internal database. Seems 
to me like a major win in terms of maintainability.

The only thing we have to do is store this LyX buffer internally. If you're 
worried about the amount of code this will need, then we could start off with 
a
        std::list<boost::shared_ptr<Buffer> > bibtex_buffers;
in each BibTeX inset. Thereafter, we'd use the same machinery to extract info 
for citation insets and citation dialogs as we use for the BibKey insets.

-- 
Angus

Reply via email to