On 07/06/2010 08:58 PM, Uwe Stöhr wrote:
> Am 06.07.2010 00:31, schrieb Richard Heck:
>
>> In the revert_flex_inset case, you ought to be able to do
>> something like:
>> content = lyx2latex(document, document.lines[i:z+1]
>> content = LaTeXname + "{" + content + "}"
>> document.body[i:z+1] = put_cmd_in_ert(content)
>
> I think that this is not the correct solution. We should only put the
> command into an ERT box, not the content of the flex inset. This way
> the user is still able to modify the document contents the LyX way
> (without being forced to learn much LaTeX).
>
I eventually realized what you were doing, which does seem right. I
wonder if it would have been easier to do it this way for Index entries,
too, rather than use the complicated method we did.One thing you might want to check. Right now, a box can have various layouts. This seems to get wiped out at present. And if there were multiple paragraphs in the box (is that allowed?) then something weird will definitely happen. The solution would be pretty simple, but I didn't know what you intended. Richard
