On Mon, Feb 27, 2017 at 12:41:40PM -0500, Scott Kostyshak wrote:

> I'm often asked by LyX users why LyX behaves in the following way:
> 
> 1. Start math and type X to the power \alpha.
> 2. Inside the math inset, copy the contents.
> 3. Outside the math inset, paste.
> 
> The text "X^{\alpha}" is pasted. The user seems to expect a math inset to be
> created and for it to contain X to the power alpha.
> 
> The workaround is easy: just create a math inset before pasting (or in
> this case, select the entire math inset instead of its contents).
> 
> However, enough users have asked me about this behavior and expressed
> their confusion, and I realized I don't know why we do it this way,
> since it seems uncommon that the user would actually want the LaTeX
> "X^{\alpha}".
> 
> I understand if pasting outside of LyX, we need some plain-text
> representation, but when inside LyX, would it make sense to always
> create an inline math inset (e.g. even if the copy was made inside a
> display equation) and paste the contents in it?
> 
> Is there a missing feature here?

No, this is actually a feature. This allows you to overcome
shortcomings of lyx that do not allow to otherwise obtain what
you can directly get with latex.

For example, suppose that you create a 3x3 matrix but want to
increase the space between rows. You can achieve this by copy
and pasting the matrix ourside math, obtaining:

\begin{array}{ccc}a & b & c\\x & y & z\\1 & 2 & 3\end{array}

now you can add the wanted space like this:

\begin{array}{ccc}a & b & c\\[1ex]x & y & z\\[1ex]1 & 2 & 3\end{array}

Now you copy the text, select the original matrix and paste
over it. This is also the way you can change invisible elements
such as \kern.

Please, don't touch it.

-- 
Enrico

Reply via email to