[EMAIL PROTECTED] (Lars Gullik Bj$Bxn(Jnes) wrote:

> Uwe Brauer <[EMAIL PROTECTED]> writes:
> 
> | And last not least in Sciword in Windows it was possible to copy
> | displayed equation in a another window of another application, say
> | notepad in which the equation was display according to its LaTeX
> | Syntax; any plans for LyX to do the same?
> 
> Yes, but as usual: Don't hold your breath.

In fact, mathed, unlike LyX kernel has a proper LaTeX writer.
So this feature is as simple as:

--- math_cursor.C.orig  Tue Jul 13 16:01:28 1999
+++ math_cursor.C       Thu Oct  7 06:41:42 1999
@@ -811,6 +811,11 @@
        p1 = (cursor->pos < selpos) ? cursor->pos: selpos;
        p2 = (cursor->pos > selpos) ? cursor->pos: selpos;
        selarray = cursor->Copy(p1, p2);
+       MathParInset p = new MathParInset(LM_ST_TEXT);
+       LString xclipboard;
+       p.SetData(selarray);
+       p.Write(xclipboard);
+       XStoreBuffer(fl_display, xclipboard.c_str(), xclipboard.length(), 0);
        cursor->Adjust();
        SelClear();
     }
@@ -825,6 +830,11 @@
        p1 = (cursor->pos < selpos) ? cursor->pos: selpos;
        p2 = (cursor->pos > selpos) ? cursor->pos: selpos;
        selarray = cursor->Copy(p1, p2);
+       MathParInset p = new MathParInset(LM_ST_TEXT);
+       LString xclipboard;
+       p.SetData(selarray);
+       p.Write(xclipboard);
+       XStoreBuffer(fl_display, xclipboard.c_str(), xclipboard.length(), 0);
        cursor->Clean(selpos);
        cursor->Adjust();
        SelClear();

Regards,
        SMiyata
P.S. I can't checkout lyx-devel with cmd.exe as shell!

Reply via email to