On Mon, Oct 25, 2004 at 03:25:50PM +0300, Martin Vermeer wrote: > > Wrong fix I think. > > What if style->latexparam() is non-empty, but does not contain a '#'? > > :-)
I think that we need to agree on a common syntax for string substitution and place that on openTag. :-) Second try, something like this? Index: output_docbook.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/output_docbook.C,v retrieving revision 1.17 diff -u -p -r1.17 output_docbook.C --- output_docbook.C 25 Oct 2004 11:20:02 -0000 1.17 +++ output_docbook.C 25 Oct 2004 12:32:53 -0000 @@ -234,14 +234,12 @@ ParagraphList::const_iterator makeComman string id = par->getDocbookId(); id = id.empty()? "" : " id = \"" + id + "\""; - if (!bstyle->latexparam().empty()) { + if (!bstyle->latexparam().empty() && bstyle->latexparam().find('#') != string::npos) { counters.step(bstyle->counter); id = bstyle->latexparam(); - if (id.find('#') != string::npos) { - string el = expandLabel(buf.params().getLyXTextClass(), - bstyle, false); - id = subst(id, "#", el); - } + string el = expandLabel(buf.params().getLyXTextClass(), + bstyle, false); + id = subst(id, "#", el); } //Open outter tag > -- > Martin Vermeer <[EMAIL PROTECTED]> -- José Abílio Matos LyX and docbook a perfect match. :-)