Hi!

I need to restrict the allowed characters a user can enter in a cell of a InsetMathNest class. More precisely I want to disallow entering anything which is not a valid tex identifier in the math macro definition inset. At the moment the user can enter a fraction or any other math. The only thing I do currently is to show everything in red to indicate the error.

Is there anything similar like that already anywhere? If not, how can one implement this easily? The only way I see is to tweak the behaviour of InsetMathNest a lot, i.e. by changing InsetMathNest::interpretChar. But I guess even then the user can paste invalid stuff into the cells. Another idea would be to tweak the MathData of the cell to skip everything that is no valid character. But I am not sure how easy this would be because a MathData is essentially an stl vector.

Stefan

Reply via email to