Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

For instance:

  1. Copy enter image description here
  2. Paste in a new location
  3. Result: x^{2}

LyX 2.0.4 (new)/MiKTeX/Windows 7 Ultimate 64 bit

share|improve this question
3  
I assume that you consider this a problem, and that you would like the formatted version instead. Where are you pasting it to? –  Niel de Beaudrap Nov 2 '12 at 15:47
    
@NieldeBeaudrap Your assumptions are correct. I paste it to the same document. –  Evan Aad Nov 2 '12 at 15:59
7  
I wish PDFs worked like that :) –  dominikh Nov 2 '12 at 22:37
add comment

4 Answers 4

up vote 10 down vote accepted

Since you are copying within LyX math-mode, you are in fact copying the raw TeX. Simply create a new equation using Ctrl-M (or whatever you've bound it to be) and then paste.

Unfortunately, there is no good way around this problem internally without significant changes to the program logic.

share|improve this answer
    
Thanks. The problem is: i usually copy-and-paste not single formulas, but whole paragraphs containing many formulas. Am i doomed? –  Evan Aad Nov 2 '12 at 16:22
2  
There might be an easy way around that in the program logic, actually. Unfortunately, it's more a feature request than some problem to be fixed. –  Sean Allred Nov 2 '12 at 16:53
    
In a WYSIWYG editor i'd consider it a critical bug. –  Evan Aad Nov 2 '12 at 16:59
    
There is a good argument for either. WYSIWYG should be innately intuitive, and all environments that are encompassed in a selection should carry with their environments. –  Sean Allred Nov 2 '12 at 18:08
1  
I do not have LyX installed at the moment, but I seem to remember that you can select the TeX formula, press Ctrl-M, and it will convert it into math. –  Jan Hlavacek Nov 20 '12 at 5:16
add comment

Go to Tools > Preferences > Editing > Shortcuts > Cursor, Mouse and Editing... Now remove the shortcut for paste which is set as Ctrl+V.

Now go to selection-paste in the same list, click Modify and set as Ctrl+V.

Your problem will be solved.

share|improve this answer
    
Thx, this solved the issue for me. I also remapped the normal paste to another key, thus I can easily copy plain-TeX. –  Juve Dec 5 '13 at 7:34
add comment

If you mark inside the math block, you have to paste into another math block. Otherwise you would resolve the math TeX-Code into your normal text.

You may also mark the block and surronding normal text and paste it somewhere else. As of LyX 2.0.4 on my old windows machine in the office, this does not always work. After restarting LyX, it usually works. On linux, I have not encountered this problem.

share|improve this answer
add comment

I am using LyX 2.0.6/MiKTeX on Windows, and have experienced the same problem - a copy and paste of an equation pastes the literal equation text instead of the equation. Even worse, it strips out any labels in the process. For figure floats, I don't get anything at all when I paste. This can make editing and re-arranging text problematic.

However, this appears to be a matter of some bad internal program state (I don't know how to reproduce it yet). Most of the time, copy and paste work as intuitively expected. The best work around is to close and re-open LyX with the same document. This restores the appropriate behavior for me.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.