Line feeds

Hello again, again,

Messing around with Scrivener, trying to understand it, I tried creating a new document in “novel format.” Under “Manuscript,” I designated three folders as Chapter One, Chapter Two and Chapter Three. I then looked for some convenient material to paste into my chapters. I found Huckleberry Finn at the Gutenberg Project. I chose the plain text format. I copied and pasted a few paragraphs into each of my chapters.

Then I tried “compile.” It turns out that the end of each line of the Huckleberry Finn text has an invisible line feed character, which might be known to some as a carriage return. In “Wrap” mode the text looks fine. Turn “wrap” off and each line is broken, followed by an empty line. It looks the same way in “compile.”

Is there a way in Scrivener to search for these line feed or carriage return characters and substitute them with a space, without erasing the double line feeds indicating the end of a paragraph?

I know how to do this with a standard word processor. It isn’t clear I can do the same thing in Scrivener, but I am still learning.

Thanks in advance.

Tim

Yes, you can do this with Find/Replace. In the binder, select all the documents you want to run the Find/Replace on and then choose View>Scrivenings so you see all their text combined in the editor. If they’re not on already, turn on Format>Options>Show Invisibles. Presumably you’ll see the nefarious character scatted throughout, sometimes in double–where you want to keep it–and sometimes just wrecking the end of your line.

First replace all the instances of the double character with something else unique, e.g. “$$CARRIAGE RETURN$$”. Open Edit>Find (Cmd-F). Select a double instance of the invisible characters in the editor and paste it into the Find field, then enter your unique string into the Replace field and choose Replace All.

Now repeat, using only a single instance of the character and replacing with a space, as you want. Finally replace previous unique string with a double instance of the break character, and you’re done.

You can speed this up by ignoring the whole “show invisibles” and copy/paste if you know what the character is by just typing it directly into the search field. If it’s a regular carriage return, use Opt-Return to enter it into the field. If it’s a soft return, use Ctrl-Return.

I’m not sure why you suggest the intermediate step, MM - I must be missing something because I know you always have a good reason! :slight_smile: Why not just use Find & Replace to replace return characters (you can enter return characters into the Find panel using Opt-return, as MM says - this is standard in most Mac apps such as TextEdit and Pages) with a space? This is what I do whenever I paste in text from the Gutenberg project or suchlike…

All the best,
Keith

I appreciate your confidence, Keith, although it may have been unwarranted. :wink:

If you refer to the intermediate step of replacing double carriage returns with some other character and then replacing that character, it was so that you didn’t end up with double spaces where you actually wanted a paragraph break. (My reading of the OP was that lines were undesirably broken by carriage returns but that actual paragraphs were also separated by double carriage returns, and these you’d want to keep.) I suppose you could just replace the double-spaces afterwards, but then you might have some random double spaces between sentences and end up with the whole problem again, only worse this time. Hence the extra step.

If you mean the whole invisibles and copy paste, it was just to ensure it was the right line break character and also in case that was easier/more obvious.

But it could all just have been extraneous because I was blathering. That happens to me a lot too…

And looking at it again, given the Wrap mode comment, it sounds more like the lines are broken by a soft return or such and actual paragraphs separated by a carriage return, so if that’s true you don’t need the middle step. Which makes looking at the invisibles worthwhile. There, see, I did have a reason. I’m leaving before I come up with another reason it doesn’t make sense.

Ahh… That’s what I needed to know. I overlooked that.

Yup. That’s the way to do it. Standard procedure in a word processor. Very similar in Scrivener, it turns out.

Cheers,

Tim