How to Keep Line Spacing while using "Paste and Match Style"

I use Scrivener frequently for researching, and often, I’ll link a website and then add a page where I copy/paste the most useful text.

Whenever I do this, Scrivener changes all the :leftwards_arrow_with_hook: (line breaks) to ¶ (paragraphs).

This is especially an issue when I’m working with poetry.

What I really want is to have Scrivener use Shift Enter as a single line break and recognize that break when copy/pasting from other sources, but if I can keep the single line breaks when copying, it will at least keep me from spending ages using Find/Replace to remove the paragraphs between lines of poetry and replace with line breaks.

Editing to add that using “Line and Paragraph Spacing” under “Formatting” to remove the paragraph spacing is a fix of sorts, but a poor one because each line is followed by a (hidden) paragraph symbol instead of by a line break symbol. Is there no way to set a single Enter as a line break and a double one as a paragraph?

Do you have some reason to think that what you have copied from the web contains new-lines where Scrivener is giving you return-characters (paragraph breaks)?

Because I am pretty sure Scrivener is not converting line-breaks to paragraph breaks when you paste and match style, but just taking essentially the plain-text of whatever is on the pasteboard and putting it into your document – return-characters and all.

It sounds to me like you have your default paragraph style set to include Space After. So the pasted poetry gets double spaced. If the paragraph styling in the document was set to not leave space between paragraphs that wouldn’t happen.

Question: When you paste a multi-stanza poem, does the break between stanzas likewise get distended so you have to take lines out to make it look right?

-gr

P.S. But isn’t it marvelous we can actually copy and paste from web pages like this at all? That web page is not coded with return or newline characters at all! So, some conversion is being made by your browser. If the browser is not delivering different markers in the end-of-line and end-of-stanza cases, then Scrivener has nothign to work with and cannot know that you want something different than what is given it.

2 Likes

What would be awesome would be if I had an option to set both line breaks and paragraphs, so that any single spaced line would show as a line break and any double space as a paragraph. Of course, while I’m wishing, I wish shift/enter could be set for line breaks since it seems to be the universal line-break setting on most sites/programs.

I think you will just have to clean up the text to make it how you want – with line-break chars where you want to see line-breaks, and paragraph break chars where you want to see paragraph breaks.

If I have surmised your situation correctly, you can use Find and Replace to accomplish what you want. If what you have is text which was “visually typeset” with single returns and double-returrns, and you want to convert that to line-breaks and single-returns, you can use Find & Replace (cmd-F) as follows:

  1. Find and replace all double returns with a character that does not otherwise appear in the text, say $. (Return chars are entered in the Find field using option-Return.)

  2. Then find and replace all single returns with a newline character (cntrl-Return).

  3. Then find and replace all $ with a single return character.

So, while it takes three steps to accomplish, the truth is that what you want requires transcoding this material you are copying from the web, so this is just what that takes.

It would be sweet if there were a dedicated function for this process tucked away in the Text Tidying menu. Not unreasonable perhaps, since what we are doing is converting a very common sort of “visual typesetting” to digital or coded typesetting.

-gr

P.S. As for the wish you expressed that would discreetly clean up the presentation for you via a one-shot setting: There is no way to set different contextually determined looks for paragraph breaks (return chars). I know of no software that does that, and I think there are good reasons you will not find such a system implemented anywhere.

1 Like

I’ve never used shift-enter on any platform or in any app, in 51 years of coding, writing, and blogging. Your experience makes me think I did the right thing.

Just to be clear: Scrivener may use a different key combination than you are used to to get the line-break character, but it is the same character you are getting. It is not using a different character in text. So, for example, if you type some text in Word and use shift-return to get a line-break in it. If you copy and paste the text into Scrivener, the line-break will still be intact.

The issue you are having with the material you are copying and pasting from the web has nothing to do with a discrepancy between character codes used in body text to indicate a line-break.

Yeah, the key combination was just a wish, like I said. Nothing really to do with the original comment, but an aside. Thanks for all the help.

1 Like