Le 09/11/2014 22:06, Guy Rutenberg a écrit :
Hi,

Suppose I want to add to LyX new built-in math macros, like \pmod. Which
files do I need to modify?

(To clarify, I want to change the sources not my specific document).

Dear Guy, I see you did not get any answer, so I'll try to help. Unfortunately, mathed is not the part of LyX I am the most acquainted with.

The answer really depend on the macro you want to define. In the case of \pmod, I did not find any inset (in src/mathed) that seems to be similar enough. You want an inset with only one cell, like in InsetMathDecoration, which implements accents. So the inset would be a /very/ simplified version of this.

However, it seems a bit strange to create a new inset class for this simple example. I am not sure what the simplest solution would be. A math macro inset gives a not too bad interface, so a solution might be to have a way to define a set of default macros that are known to LyX from start. Then the macro inset machinery would be sue for the display part.

What do the others think?

JMarc

Reply via email to