copy+paste in displayed math

pviton's picture

SWP 6.0.20 on MSWin
====================

(This problem also existed in 6.0.19
and possibly earlier versions).

Start with the Std Latex article. Put the cursor after
"article.cls". Hit Ctrl+d to start a display, which
will be numbered as (1.1). In the display enter
a fraction template (ctrl+/). Fill in the numerator
as a+b and the denominator as c+d.

Now use the mouse to select the numerator and do
Ctrl+c to copy it to the clipboard. Use the
right-arrow to exit the display and then
enter Ctrl+d to start another display,
which is automatically numbered as (1.2). The cursor
is in the new display, so do Ctrl+V to paste in
the clipboard contents.

The result I consistently get is a fraction with
a gray label (1.2) in the numerator, and
c+d in the denominator. The label for the
actual display is changed to (1.3). Surprisingly,
pdf preview is correct: the two displays are
(1) and (2) and the second display shows the
original (complete) fraction. However,
cross-referencing goes wrong: if you create key
labels for two displays and then insert cross
refs to each of them, the refs both resolve to
equation (1).

(Also, as previously pointed out, it does not
seem possible to copy only the numerator of the
fraction to the clipboard; there appears to be
a general problem with copying bits of math.
But let's ignore that for now).

Exit this display and once again do
ctrl+d for a third one, which is automatically
(1.4). Do Ctrl+V to paste in the clipboard
contents. You get a fraction with a gray
(1.4) label in the numerator; the display
label is changed to (1.5).

I used the mouse to once again copy the
numerator of the first display
to the clipboard. Then I tried to paste
the contents of the clipboard inline after
"as necessary". Here the results were erratic.
Sometimes I got a new display: unlike the
others, this one had the complete original
fraction (no display label in the
numerator). Other times I got "a+c+d"
in inline math. And sometimes nothing
happened at all: copying and pasting
seemed to have stopped working.

It seems clear that SWP6 still has serious
difficulties in copying and pasting
math. Since that's one of the fundamental
requisites for an effective technical
word-processor --- you shouldn't have
to type in everything from scratch
when all you want to do is make a small
change in an existing expression --- this is
something that pretty clearly needs more work.
To the best of my recollection, nothing like
this ever happened in SWP55.

Final comment: Creating key labels for displays.
Apparently the cursor needs to be to the right of
the displayed math in order to do this. If you
select the automatically created display key label
and try to alter its properties (which to me
seems to be the natural approach), you don't get
anything: there are no properties to alter.
As far as I can tell, creating key labels isn't
explained in the Help; it probably should be.
(There are no relevant entries under "key",
"label", "display",or "cross" [for 'cross-ref']).

ADDED: on there being no Properties when you
select the equation number/label. Select the
equation label. Now right-click and select
Properties. Note that there is a ">" here,
which suggests that there *should*
be some properties. Perhaps this is a case where
something is wrong with the implementation
of those Properties (as in the similar-appearing
case of the Properties of an entry in a Matrix).

jm's picture

There seems to be a general

There seems to be a general problem copying and pasting the whole of the numerator in a fraction, or indeed the whole of a display, because selecting and copying seems to copy more than is actually highlighted (and hence more than I intend to copy). The (somewhat cumbersome) solution I have come up with is to enter some unwanted letter at the beginning and the end of the numerator, or the display, copy the selection I want between these unwanted letters and then delete the unwanted letters. With that procedure, the copy command seems to copy only the selection I really want.

Is there a better way to get what I want?