On Sat, 2 Feb 2002 22:07:33 -0800 wrote Bo Peng <[EMAIL PROTECTED]>:
> Hi, Everyone,
>
> The Clipboard of Lyx is very confusive. It seems that there are several
> clipboards: math, text and combined since I can paste different things when
> I am in different mode. Also, it is strange that when I select (using mouse)
> half of an equation, it is very easy to change to select another half. Also,
> the selection disappears after cut or copy.
>
> Anyone know some straightforward rules for clipboard operations? How can I
> make correct copy-paste?
Here is, what I get with 1.1.6 on Linux with KDE:
* You have two clipboards: "Text" and "Math".
* Copying is done to:
"Math", if you are _in_ a blue math box (i.e. the blue frame appears),
"Text", else.
* Pasting by Ctrl_V or Shift-Ins is done from:
"Math", if you are _in_ a blue math box,
"Text", else.
* A complete mathbox can be copied to (and pasted from) the "Text"
clipboard (as well as a complete table, a complete float, a reference or
label... :-) --- if you use the LyX internal clipboard.
* You cannot copy parts of a math-box to the text and vice versa :-(
Pasting with the mouse is a different thing:
* Every copy to the "Text" buffer in LyX is exported to the X-selection
("System clipboard"). However, LyX assumes that these are intended for
another program and converts the content to a Text representation: Math
is expressed by the latex-code (but without text-math-toggle ($ $'s,
say), buttons are represented by [ref:some_ref], say)
* Insertion of the X-selection (usually by pressing the middle mouse key)
works only in Text mode (not in Math-boxes). It inserts the Text
representation: Math will become LaTeX-math code without math-toggle, a
button will become some text with [] around...
* While it is usually annoying when reinserting to LyX, this offers a way
to convert parts of math-boxes to normal text:
Copy the complete math-box, insert with mouse, delete the unwanted stuff.
-------- End of Documentation, now some stuff for discussion in the list and
implementation by friendly lyx-developers-----------------------------------
My suggestions for improvement where:
* Compliance with the "standard X behaviour": Copy any selection
by mouse-drag to the X-selection (and only these).
* Convert commands, buttons and math to a LaTeX-representation. (or
better, have a toggle set Text of LaTeX-representation.)
* Two conversion functions on highlighted LyX-content:
- math2text: convert (the highligthed part of) a math-box to a LaTeX or
text representation (may be in the simplest form similar to what is
presently done when doing export to x-selection)
- relyx: ReLyX the highlighted part of the document. This would allow
the easy incorporation of:
+ parts of LaTeX documents
+ reinserted LyX stuff (in connection with the X-export-as-LaTeX
function)
+ parts of LaTeX constructs, reLyX did not manage to convert and
inserted as ERT
+ commands, that are easier typed in as LaTeX-code than found in
the menu (similar to the ERT in math-boxes)
Guenter
--
[EMAIL PROTECTED]