Dear Developers,

first of all thanks for spending so much time into improving Lyx: it is really great and helps me a lot in my academic daily live.

I wanted to ask if perhaps, it could be possible to add a Lyx command that allows to copy selected Lyx text containing math and text as Latex code. To be more precise, when I paste copied Lyx text in a text editor it shall be correct Latex code including $ signs. Currently, the dollar signs $ for math are not copied, e.g. when copying the following text: "text $x=5$", I can only paste it as "text x=5". I know that one can open the latex source window in Lyx, and copy code from there but that is rather inconvenient.

Background:
I am currently developing a small GUI that shall help to use Lyx together with the computer algebra system Maxima. (It is very preliminary and not yet well tested. But if somebody is interested, here is the project page: https://github.com/skranz/LyxMaxima). The program is not integrated in Lyx but rather a separate GUI (programmed in R) that takes copied code from Lyx sends it to Maxima, translates the result back to Latex and copies them into the clipboard so that it can be pasted back into Lyx. One planned functionality is that one can write in Lyx, Maxima code that is interwoven with Lyx math fields. In Latex such code may look, e.g. as follows:

solve($x_{1}+y^{2}=0$,$x_{1}$)

where the expressions between $ $ are Lyx inline math fields. My program would replace the Latex math in that expression by equivalent Maxima expression and then evaluate the resulting Maxima command. To get the correct code to the GUI, it would be really useful if I could copy such Lyx code in its true Latex representation, i.e. in a representation that keeps the $ around math. Beyond that particular application, such a "Copy-Selection-as-Latex" feature may be generally useful for users who use Lyx in combination with some other program that uses some Latex source code.

Best wishes,
Sebastian


Reply via email to