Pasting to a document

I’m curious, I have been bouncing back and forth between scrivener and Pro Writing Aid. When I paste text into scrivene it carries over the web formatting of PWA, so I have been using paste and match style, text wise it’s perfect but I get extra return spaces between paragraphs. Is there an easy way to get rid of those extra returns, right now I am going line by line. For short sections its fine but if I need to pull a chapter in ugh.

Thanks

Tommy

Why not try PWA in Scrivener, instead of opening Scrivener docs in PWA?

Edit → Text Tidying is where you need to look.

:slight_smile:

Mark

Not at my computer at the moment.

1 Like

Maybe you should bring the paragraph settings in Scriv and PWA into alignment, so you don’t need to do any Text Tidying.

It seems doubtful that you are literally getting more carriage returns upon pasting than were there to copy out of the source.

Instead, either 1) where you are doing the Paste and Match Style, the paragraph at the insertion point is set to put vertical space at the end of every the paragraph (not an extra carriage return) and you want none because you are using first-line indent, or 2) you are typing double carriage returns in PWA to make paragraphs have any space at all between them there, and but in Scriv do not need this for the same reason as above.

Either way, what you should do is get the two places set in the same way and then things will go along without Tidying. (I don’t use PWA, so cannot help with the particulars of a fix.)

When you paste text into Scrivener using the “Paste and Match Style” option, the program attempts to match the style of the text where it’s being pasted. However, this can also carry over extra paragraph breaks if they are part of the original formatting.

If you are frequently dealing with this issue, you might want to use Scrivener’s built-in tools to make this process quicker. Here’s a simple method you can try:

First, copy your text into Scrivener using the “Paste and Match Style” option as you have been doing.

Then, use Scrivener’s “Find and Replace” feature to locate and remove the extra paragraph breaks. To do this, go to the “Edit” menu, then select “Find” > “Find and Replace.”

In the “Find” box, you should enter the symbol for a paragraph break, which is typically represented as “\n” or “\r”.

In the “Replace” box, you might want to leave it blank to remove the breaks, or put a single space if you want to replace the paragraph breaks with a space.

Click “Replace All.” This should remove all the extra paragraph breaks in the selected text.

Please note, “\n” and “\r” are the typical notations for newline and return characters, which represent paragraph breaks. If these do not work, you may need to check Scrivener’s documentation or help resources for the correct notation for paragraph breaks.

Lastly, this method will remove all paragraph breaks, not just the extra ones. So, you might need to manually add back in the paragraph breaks that you do need.

I hope this helps!

As for clearing newlines between paragraphs, there is also a built-in macro for this so you don’t have to set up search parameters every time you need to do it: Edit ▸ Text Tidying ▸ Remove Empty Lines Between Paragraph.

Now if only there was an opposing command for us Scriv+Markdown users to make sense of you word processor users’ walls of text. :wink:

While Scrivener does have a RegEx mode (which you’d need to turn on in the Find dialogue), and it would accept \n for paragraph breaks (\r would recognise line breaks), you can also hover your mouse over the input field for a second to see tips on how to insert whitespace characters, for more typical search modes (like the default “Contains”).

In most cases what works best is to replace two consecutive paragraph breaks (so ¶¶ in the Find field, or \n\n if using RegEx) with one. This way you don’t merge lines that were already formatted the way you want, and all you really have to worry about are deliberately empty lines like “scene breaks”. Definitely recommend re-thinking that approach if this is a regular part of one’s workflow.

But, like I say, we’ve got a macro for that, so this is all somewhat academic, though it may be of practical use if someone wants to fine tune the behaviour.

2 Likes

Thanks everyone.
So it appears to be a werid formatting issue inside of the PWA website. I run into the same extra carriage return issues when I take the text and paste it into pages or note pade. I think has something to do with how the HTML is displaying the text.

When looking at it in PWA, it clearly looks like every paragraph has a definate extra carriage return, but when go into the PWA interface and go the first character of a new paragraph and hit backspace it will combine that paragraph with the previous.

Thank you for those who suggested the text tidying - saved me a bunch of time.

As for using PWA in the scrivener, when I started using scrivener on my Mac Ultra it was turned on and the PWA Mac app sucks in my opinion.

Again thank you

I ponied up a webpage for a little experimentation and learned this:

If the web-based rich-looking text you are copying is coded underneath with HTML paragraphs that specify some margin-bottom space (like, if some margin-bottom is thrown in to give the appearance of a blank line between paragraphs), using Paste and Match Style in Scriv will interpolate an extra carriage return after each paragraph.

The same thing happens in TextEdit when the receiving document is set to Plain Text. So the effect is not Scrivener’s doing. An underlying function in the MacOS text engine is doing this. Trying to render intent, presumably.

So, this is where the extra carriage returns are coming from.

[Note: If you use regular Paste in Scriv, the extra carriage returns do not get added. But, of course, then you get a rendering of all the styling elements of the source text — which may be unwanted.]

2 Likes