On 12/05/2010 08:53 PM, Richard Heck wrote:
On 12/04/2010 06:36 PM, Abdelrazak Younes wrote:
On 04/12/2010 23:55, Richard Heck wrote:
On 12/04/2010 03:41 PM, Abdelrazak Younes wrote:
On 04/12/2010 04:15, rgh...@lyx.org wrote:
Author: rgheck
Date: Sat Dec  4 04:15:53 2010
New Revision: 36710
URL: http://www.lyx.org/trac/changeset/36710

Log:
Revert r36696: We can't collect BibTeX information during the
updateBuffer() traversal. The reason is simple: InsetCitation needs
access to the BibTeX info to calculate its label. But we won't have it
until we get to the bibliography.
I don't think there is any way around that.

Couldn't we just pass until it gets loaded? I don't see how this is any different than reference and labels... maybe I am wrong but it should be as simple as coming back to the InsetCitation in InsetBibtex::updateBuffe().

How do we go back to the InsetCitation once we have already passed it? I mean, on that trip through? How do we know when all the bibliography information has been loaded? We can't until we are done. So the only thing I can see would be to collect pointers to all the InsetCitations and then do them all at the end. I don't see anything similar with references and labels. Their screen labels do not depend upon anything else.

We _do_ something similar with references and labels: see Buffer::references() and Buffer::setInsetLabel().

This seems along the lines of the other suggestion that you picked up on: collecting pointers to all the citations and then doing them at the end. I'll look at implementing something like that.

Maybe you should wait for 2.1 to be opened.

We then end up with a citation cache, much like the reference cache. Then the question is: Are there other cool things one could do with it, if we had it?

I am sure we would then be able to do funky things with outline and context menu. No concrete idea though...

Abdel.

Reply via email to