Martin Vermeer wrote: >>I think this could be fixed for now quite easily. We just have to >>draw OptInset as the first thing in LyXText (so WYSISYG is always >>given!), > > Not easy IMHO.
It is believe me ;) > PS just tried it. It isn't so hard. I have in insetoptarg.C: > + // Put Optional Argument inset always at start: > + InsetOptArg * ioa = optArgInset(*this); > + if (layout()->optionalargs == 1) { > + if (ioa != 0) > + ioa->write(buf, os); > + } Couldn't we have more than one optional Arg (Inset) in a paragraph? And then we should always write the information and not make the write depend on the layout type, that will give bad surprises (code vanishing between save/reload!) > + // Suppress writing opt arg in middle: > + if (inset != ioa) { > + os << "\n\\begin_inset "; > + inset->write(buf, os); > + os << "\n\\end_inset \n\n"; > + column = 0; > + } Same as above if we have more than one OptInset then this code is wrong. > ...and this works. It even has the added benefit of silently dropping > optional insets in illegal places... We shouldn't drop anything. Greets, Jürgen -- -._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._ Dr. Jürgen Vigna E-Mail: [EMAIL PROTECTED] Mitterstrich 151/A Tel/Fax: +39-0471-450260 / +39-0471-450253 I-39050 Steinegg Web: http://www.lyx.org/~jug -._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._