A propos the caption discussion, a small documentation patch. Please review and commit if it doesn't tell lies ;-)
Martin
Index: buffer.C =================================================================== RCS file: /cvs/lyx/lyx-devel/src/buffer.C,v retrieving revision 1.298 diff -u -b -B -p -r1.298 buffer.C --- buffer.C 2002/02/08 14:32:16 1.298 +++ buffer.C 2002/02/16 16:45:51 @@ -3624,7 +3624,7 @@ Buffer::Lists const Buffer::getLists() c textclasslist.TextClass(params.textclass).maxcounter()); item.push_back(TocItem(par, depth, par->asString(this, true))); } - // For each paragrph, traverse its insets and look for + // For each paragraph, traverse its insets and look for // FLOAT_CODE if (found) { @@ -3638,15 +3638,19 @@ Buffer::Lists const Buffer::getLists() c InsetFloat * il = static_cast<InsetFloat*>(*it); + // Get type of float + string const type = il->type(); // Now find the caption in the float... - // We now tranverse the paragraphs of + // We now traverse the paragraphs of // the inset... Paragraph * tmp = il->inset.paragraph(); while (tmp) { + // is this a caption-style paragraph? if (tmp->layout == cap) { + // List-of-appropriate-floats SingleList & item = l[type]; + // To tail of list, getting +no. from current size string const str = tostr(item.size()+1) + ". " + tmp->asString(this, false); item.push_back(TocItem(tmp, 0 , str)); @@ -3656,7 +3660,7 @@ Buffer::Lists const Buffer::getLists() c } } } else { - lyxerr << "caption not found" << endl; + lyxerr << "caption style not found in this textclass" << endl; } par = par->next();
msg33102/pgp00000.pgp
Description: PGP signature