Thanks a lot! I'm trying Lyxserver and Lyx functions. They are amazing. I can just send commands to open a document and insert a display math!
One problem seems that there is no Lyx function allowing me to get the content of math. I can use select and copy to put it into clipboard, then maybe read the clipboard to get the content. This seems not very elegant and reliable? Another problem is that I don't know how to return to the editor. That seems a much harder problem. Wei-Ting