On Mon, Feb 16, 2015 at 7:10 PM, Uwe Stöhr <uwesto...@web.de> wrote: > Since more about 10 years it has been a dream for me to have a TeX code > inset for math. > http://www.lyx.org/trac/ticket/2579 > > For LyX 2.2 I want implemented such a beast. Its features are simply these: > - it is added to a formula by typing \TeX in math > - its content is not parsed by LyX, so everything is allowed like in the TeX > code inset (ERT) > - its content is output to LaTeX as it is > - its content appears in red like normal TeX code > > This sound simple but every year when I experiment with this but fail. > Attached is a patch idea. Unfortunately I am not able to disable the parsing > of the inset content and when re-opening a file with the new inset the color > of the inset is lost. > Does anybody have an idea how to achieve what I want? I assume that > InsetNest is the wrong type but what kind of inset can/must I use? > How to I manage that LyX recognize the TeX code inset without writing > anything to the LaTeX output that I don't want? > > many thanks in advance for any hint and help and regards > Uwe
Probably a silly question, but just so I understand better, why not implement it using a direct analog of ERT (e.g. Ctrl L)? Scott