On Tue, Aug 20, 2002 at 12:26:50PM +0200, Andre Poenitz wrote:

> On Tue, Aug 20, 2002 at 01:30:02PM +0300, Martin Vermeer wrote:
> > I looked at this, and it seems very, very difficult. (And it wouldn't be
> > paradigmatically correct to have a 'free floating' inset containing
> > stuff that nevertheless belongs as a label to the left of the bibitem.
> 
> Actually, in this _very special case_ I don't care about "paradigmatical
> correctness". The bibitem stuff convolutes so much code all over the
> place...
> 
> > I believe I can simplify bibitem a little, though.
> 
> I'd like to see that ;-)
> 
> Andre'

Be my guest ;-)

I still don't understand it, though. But this seems to work...


Martin


Index: paragraph.C
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/paragraph.C,v
retrieving revision 1.222
diff -u -p -r1.222 paragraph.C
--- paragraph.C 2002/08/15 07:53:46     1.222
+++ paragraph.C 2002/08/20 12:58:14
@@ -121,15 +122,8 @@ Paragraph::Paragraph(Paragraph const & l
        // this is because of the dummy layout of the paragraphs that
        // follow footnotes
        layout_ = lp.layout();
+       bibkey = 0;
 
-       // ale970302
-       if (lp.bibkey) {
-               bibkey = static_cast<InsetBibKey *>
-                       (lp.bibkey->clone(*current_view->buffer()));
-       } else {
-               bibkey = 0;
-       }
-
        // copy everything behind the break-position to the new paragraph
        insetlist = lp.insetlist;
        InsetList::iterator it = insetlist.begin();
 Paragraph * Paragraph::TeXOnePar(Buffer const * buf,
                                 BufferParams const & bparams,
                                 ostream & os, TexRow & texrow,
Index: text2.C
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/text2.C,v
retrieving revision 1.247
diff -u -p -r1.247 text2.C
--- text2.C     2002/08/12 20:24:08     1.247
+++ text2.C     2002/08/20 12:58:19
@@ -508,11 +510,6 @@ Paragraph * LyXText::setLayout(BufferVie
                                            : VSpace(VSpace::NONE));
                if (lyxlayout->margintype == MARGIN_MANUAL)
                        par->setLabelWidthString(lyxlayout->labelstring());
-               if (lyxlayout->labeltype != LABEL_BIBLIO
-                   && fppar->bibkey) {
-                       delete fppar->bibkey;
-                       fppar->bibkey = 0;
-               }
                cur.par(par);
                par = par->next();
        } while (par != epar);
@@ -1268,6 +1269,13 @@ void LyXText::setCounter(Buffer const * 
                par->setLabelWidthString(string());
        }
 
+       if (layout->labeltype != LABEL_BIBLIO) {
+               if (par->bibkey) {
+                       delete par->bibkey;
+                       par->bibkey = 0;
+               }
+       }
+
        // is it a layout that has an automatic label?
        if (layout->labeltype >=  LABEL_COUNTER_CHAPTER) {
 
@@ -1332,8 +1341,7 @@ void LyXText::setCounter(Buffer const * 
                }
                par->bibkey->setCounter(number);
                par->params().labelString(layout->labelstring());
-
-               // In biblio should't be following counters but...
+               
        } else {
                string s = layout->labelstring();
 

Attachment: msg43185/pgp00000.pgp
Description: PGP signature

Reply via email to