List Info

Thread: Copy & Paste




Copy & Paste
country flaguser name
Canada
2007-04-07 15:58:01

Greetings All,

I'm using Amiga PageStream 4.1.5.6 with OS4.0 under Update
Final.

Recently, I had some annoying sessions where the annoyance
was the direct consequence of a COPY command subsequently
followed by a PASTE command. These operations were at the
PageStream document level, not within PageLiner.

The problem was that the COPY operation would pick up some
hidden text formatting codes that resulted in sudden and
strange transformations of paragraph(s) that followed the
location where the PASTE operation was performed. Sometimes
the unwanted transformations would apply to several
paragraphs.

Thinking about this, I realized that the operation "Paste as
is" is almost never used here. Perhaps the "Paste as is"
operation would save the day!? Not finding an explanation
of the difference between 'Paste' and "Paste as is" I tried
the following:

% Type a short 'first' paragraph.

% Blank line, then type in the following two explanatory
paras:

(1) Following paragraph resulted from a 'Paste' operation:
«blank line»
(2) Following paragraph resulted from a 'Paste as is'
operation:

% Highlight everything typed so far and apply the style
'BodyFlat' which has been defined so that it uses
Times-Normal set at 16/18; i.e., font is 16 points set on
fixed leading of 18 points.

% Return to the first para, and change the font to
Times-Bold.

% Highlight the first para, then COPY it.

% Using the 'Paste' operator, paste the 'copy' immediately
following the '(1)' paragraph; i.e., as the 3rd para.

So the doc should look like the following where font size,
leading and boldface have to be imagined:

-----------------------
This first para is set to Times-Bold.

(1) Following paragraph resulted from a 'Paste' operation:
This first para is set to Times-Bold.

(2) Following paragraph resulted from a 'Paste as
is' operation:
------------------------------

In the following and above, blank or null paras are ignored;
i.e.,
above the second para is actually a null para but that fact
will be ignored and the para that begins with '(1)' will be
referred to as the 'second' para. With this convention, the
1st and 3rd paras should appear as identical, displayed
using Times-Bold, and set at 16/18. The 2nd and 4th paras
should appear in Times-Normal and set at 16/18 as well.

In PageStream, the first three paras are okay, i.e., the
first appears in Times-Bold at 16/18, the second is set in
Times-Normal at 16/18, and the third is a replica of the
first, as intended.

But the last paragraph has been transformed and this
transformation occurred immediately AFTER the PASTE
operation was performed. The problem is:

(a) In the last para, the font size used throughout is
11/14!!! Not 16/18! Where does 11/14 come from? From the
parameters set in the style <No Style> -- I think!

Highlighting the above and sending it to PageLiner, I see
(approximately)

-----------------------
<PageStream3.0&gt;[]
C:<t0%&gt;<T3&gt;<*l&gt;<lf,14pt><*k1><*h1><;*t><z11pt>&lt;h100%>;
<*i0",0&quot;,0"><*sf,0pt,f,0pt>PBodyFlat:<f";Times-Bold">This
first para is set to Times-Bold.[]
<f"Times-Normal&quot;>[]
(1) Following paragraph resulted from a
<#8216>Paste<#8217> operation:[]
<f&quot;Times-Bold">This first para is set to
Times-Bold.<f"Times-Normal&quot;>[]
<lf,14pt><*h1>[]
(2) Following paragraph resulted from a <#8220&gt;Paste as
is<;#8221> operation:[]
------------------------------

The 'approximation' alluded to above is that '[]' is used to
represent the 'Esc' character which PageLiner represents as
a hollow square character (roughly Ctrl-D 9633) and appears
to be the "end of paragraph&quot; code.

>From my perspective, there are several things 'wrong' with
the text formatting commands as seen above.

Everything is okay up to and including the Pageliner line
(YAM displays on two lines!):

<f&quot;Times-Bold"&gt;This first para is set to
Times-Bold.<f"Times-Normal&quot;>[]

The very next line:

<lf,14pt><*h1>[]

is simply 'wrong' from my perspective! The part <lf,14pt>
changes the leading 'l' to fixed 'f' and at 14pt whereas it
should have remained at <lf,18pt> as defined within the
style 'BodyFlat'. Also, the font size has been reduced to
11pt (in PageStream) although I can find nothing in the
text codes to suggest that transformation. Since there is
no indication that the font size is to be changed, why does
the last para appear in Times-Normal at 11/14? Had the
penultimate line in Pageliner been

<lf,14pt><*h1><z11pt>[]

(something like that) then the change in font size would be
understandable.

Going even further back, in the very second line in
Pageliner, I fail to understand why the entries

<z11pt> and <lf,14pt>

appear since those values are associated with <No Style>. At
this point, I do not use character styles, i.e., the only
character style available is <No Style>.

Furthermore, the above behaviour is NOT consistent. I have
gone through the EXACT same steps and on more than one
occasion end up in Pageliner with

-----------------------
<PageStream3.0>[]
C:<t0%&gt;<T3&gt;<*l&gt;<lf,14pt><*k1><*h1><;*t><z11pt>&lt;h100%>;
<*i0",0&quot;,0"><*sf,0pt,f,0pt>PBodyFlat:<f";Times-Bold">This
first para is set to Times-Bold.[]
<f"Times-Normal&quot;>[]
(1) Following paragraph resulted from a
<#8216>Paste<#8217> operation:[]
<f&quot;Times-Bold">This first para is set to Times-Bold.[]
<lf,14pt><*h1>[]
(2) Following paragraph resulted from a <#8220&gt;Paste as
is<;#8221> operation:[]
------------------------------

The difference is that in the line

<f"Times-Bold&quot;>This first para is set to Times-Bold.[]

the ending <f";Times-Normal"&gt; is missing and hence the last
para is not only of the wrong "font size/leading"
combination, but the font applied is Times-Bold instead of
Times-Normal.

Although clumsy to describe, the 'screwups' related above
result from rather simple operations. In more complicated
paragraphs, the results can be really confusing. If I use
the Edit Palette to "set things right"; and then look at the
text formatting codes, then it makes sense -- sometimes.
Additionally, on doing so, I observe the 'missing' text
descriptors appear roughly where I expect them. But having
to resort to the examination of the text formatting codes
is ridiculous.

Contrariwise, I often find 'stuff' repeated for no reason
that I can comprehend.

It has reached the point that in a doc of even 'moderate'
complexity or a 'longish' document, I avoid using the PASTE
operation for fear of weird results propogating through
large areas of text. From my point of view, COPY and PASTE
in PageStream is simply defective. Either that or after all
these bloody years I still do not know how to perform these
operations with any competence.

Oh, by the way, I still have not figured out the difference
between 'Paste' and "Paste as is". I hope you have.

Cheers Don (Green Dragon)
--

__._,_.___
.

__,_._,___
Re: Copy & Paste
country flaguser name
United States
2007-04-07 09:34:37

On Saturday 07 April 2007 15:58, Don Ferguson wrote:
&gt; Greetings All,
>;
> I'm using Amiga PageStream 4.1.5.6 with OS4.0 under Update
&gt; Final.
&gt;
> Recently, I had some annoying sessions where the annoyance
> was the direct consequence of a COPY command subsequently
> followed by a PASTE command. These operations were at the
> PageStream document level, not within PageLiner.

[snip thorough description of the problem]

> Although clumsy to describe, the 'screwups' related above
&gt; result from rather simple operations. In more complicated
> paragraphs, the results can be really confusing. If I use
> the Edit Palette to "set things right"; and then look at the
> text formatting codes, then it makes sense -- sometimes.
> Additionally, on doing so, I observe the 'missing' text
>; descriptors appear roughly where I expect them. But having
&gt; to resort to the examination of the text formatting codes
&gt; is ridiculous.
>
> It has reached the point that in a doc of even 'moderate'
> complexity or a 'longish' document, I avoid using the PASTE
&gt; operation for fear of weird results propogating through
> large areas of text. From my point of view, COPY and PASTE
&gt; in PageStream is simply defective. Either that or after all
> these bloody years I still do not know how to perform these
&gt; operations with any competence.

There are some difficulties with using copy and paste of text in PgS though
some of the problems you describe have, I think, been alleviated in more
recent versions. Out of long habit I suppose I never use copy and paste of
text in PgS, instead I do that sort of editing in an editor (and is a major
reason why I ported the SendToEditor script to Python).

I recently did do copy and paste (how's that for an exception to the
previously stated "never" actually I did drag and drop but it amounts to
the same thing) to reshuffle some text in a quick document I was doing for a
friend. For the most part it was okay because there was minimal formatting
being used, but in the end there were visible defects and I had to send to
editor to fix things.

Why does this happen? Having looked at and fixed text suffering from these
problems in my opinion it is caused by PgS trying to maintain formatting. If
you get right down to it this can be a tricky thing because PgS doesn't know
your /intent/. So it tries to preserve the formatting of the copied text by
grabbing context.

There are times when this is the behavior you would want, such as copying a
complete body of formatted text and pasting it to a new location. However, if
you copy text internal to a paragraph and paste it internal to a new
paragraph you probably want it to take on the formatting of the new paragraph
-- except for applied formatting.

If everyone used styles and in a uniform fashion then PgS /could/ alter
behavior to preserve styles in the one case and not the other. But trying to
second guess the user ends up in complaints (see MS Word for reference). I
don't fault PgS for what I see as the basic approach of trying to preserve
the formatting of text.

You do mention (and I quote out of order):

> Contrariwise, I often find 'stuff' repeated for no reason
&gt; that I can comprehend.

I assume you are referring to things like
PHeader1:PParagraph:PHeader1:PParagraph: repeated ad naseum?

That is a long standing flaw and one that I argue can be programmatically
solved. It is a little problematic though.

The way I use styles you could always drop all but the last style in the list
and, in many cases, drop it as well because what has happened is along the
lines of:

PParagraph:some text
PHeader1:...PParagraph:some more text

The problem with the suggested approach is it doesn't actually match how
styles work in PgS -- only the subset of case of how /I/ use them.

In PgS a style need not, and rarely does, declare all possible formatting
attributes. Those that are not defined are picked up from the previous style.
If the previous style does not set the attribute then they are picked up from
the previous style ... until you get to the beginning of the article in which
case they are set by the default attributes.

There is one additional wrinkle: as PgS scans back to find the setting of a
format attribute it will stop at an applied format. And this causes mixing of
applied formatting with styles as an almost inevitable result due to the
scarcity of styles covering all formatting attributes.

So having PHeader1:PParagraph: is perfectly valid, despite the fact that I
would never use it. There would always be pathological cases, but repeating
patterns, e.g., PS1:PS2:PS1:PS2:PS1:PS2:PS1:PS2:PS1:PS2: could be
reduced to PS1:PS2: and PgS does not currently do this.

> Oh, by the way, I still have not figured out the difference
> between 'Paste' and "Paste as is". I hope you have.

Sorry to say I had even forgotten there was a "Paste as is" because I never
really use copy/paste in PgS. Looking.... okay, you've got me. Where is
"Paste as is"?

Tim Doty

__._,_.___
.

__,_._,___
Re: Copy & Paste
country flaguser name
Netherlands
2007-04-07 14:44:46

Don Ferguson wrote:
&gt; Greetings All,
>;
> ...
> Thinking about this, I realized that the operation "Paste as
> is" is almost never used here. Perhaps the "Paste as is"
> operation would save the day!? Not finding an explanation
> of the difference between 'Paste' and "Paste as is" I tried
&gt; the following:
>

Hmm? I never heard of "Paste as is". However I found the text in
PageStream5_##.rsc. No idea what it does.
Or did you found this in one of the first two lines in the Edit menu?
Then it is a Redo or Undo item.

Also found in PageStream5_##.rsc:
There is however also a "Select Text on Paste";, from which I have no
idea what this does, and where it can be found in the PGS-program. (You
paste something and select text?? I'm lost!)

> ....
>; Cheers Don (Green Dragon)
>

I never ever copy and paste any text from Word or even text from a
PGS-document into PGS.
I paste this in a text editor (notepad for Windows) so it is derived of
all text codes. And then copy it in PGS.

First I must say that my text in PGS uses styles!

And even then, all the time, my text after the paste (the next words
after the highlighted text!) changes miraculous (and that's not what I
want).
Leave the pasted text highlighted (!), change the style into another
style. Then change the, still highlighted, text back into the original
style.
Now the text after the highlighted text is back to what it original was,
and the pasted text is almost what you want (you may change some text to
italic, bold or whatever).

Hope this helps a bit,

Theo

__._,_.___
.

__,_._,___
Re: Copy & Paste
country flaguser name
Netherlands
2007-04-07 15:32:30

Theo Zweers wrote:
&gt; ....
>; Also found in PageStream5_##.rsc:
> There is however also a "Select Text on Paste";, from which I have no
> idea what this does, and where it can be found in the PGS-program. (You
> paste something and select text?? I'm lost!)
&gt;

Okay, I found it. Just googled on "Select Text on Paste";. And what did I
got as first item... http://www.grasshopperllc.com/showdocs.php?id=666.

Which gave me: Select to cause imported or pasted text to remain
selected for further editing.

Ah, that makes more sense! The pasted text stays highlighted.

Thank you Deron :-[ .

>; .....
Theo

__._,_.___
.

__,_._,___
[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )