I have messed up my formatting?

So, I’m new to Scrivener, and I’ve made a bit of a mess with my paragraph indents. Made the mistake of just adding spaces as I wrote my manuscript. So, I am just seeing if there is any way I can format the whole document (80,000 words) without having to go through every paragraph and change it. I’ve looked through the manual and watched some videos but I can’t seem to work out how to do it. I have found some suggestions but none of them seem to work. Please help!!

Select CMD+SPACE with focus in the editor for each document should clear the spaces.

Won’t work. Cmd-Space on the Mac brings up Spotlight (System search).

Not at my computer at the moment. If no one beats me to it, I’ll post a recipe tomorrow.

:slight_smile:
Mark

Oops, my bad. I translated Ctrl+Space on Windows to clear redundant spaces. It works for leading spaces as pseudo indents, as well.

1 Like

It did indeed bring up Spotlight :grinning: Your recipe would be most welcome. Thankyou

1 Like

It’ll take me a bit of time and I can’t get to it yet. I’m on my iPad at the moment, and I want to include screenshots for you so I need to be at my Mac. But in the meantime:

  1. For safety’s sake, create a duplicate of your project: you can close Scrivener, locate the project in Finder, right (Control) click and choose “Duplicate” from the drop-down or with Scrivener open and the project loaded, choose File → Save As, and give it a slightly different name (NB if you do that, from now on you’ll be working on the duplicate, so you need to be able to identify them clearly in Finder). When you’ve done that:
  2. if you haven’t already, turn on “Show Invisibles”… if you don’t know where the command is, go to Help and type that, it’ll show you the path.
  3. Choose “Draft/Manuscript” in the Binder, enter “Scrivenings View” (from the View menu if you’re not yet familiar with it) and your whole draft will be loaded into the editor… Select All (Cmd-A) to select the entire draft.
  4. Next go to Edit → Text Tidying → and choose “Replace multiple spaces with single spaces” or words to that effect. Repeat the command as necessary until the paragraphs just begin with a single space.
  5. Now use Find, and in the search box hold down Opt and tap Return (you’ll see the paragraph marker there) and then type a space (so you are searching for all occurrences of a new paragraph beginning with a space) and in the Replace box again enter just Opt-Return. To check it works, click Find Next then Replace and Find. The space at the beginning of that paragraph should have been removed. If it has, just click Replace All. If it hasn’t worked let us know here and we’ll get onto it.

In truth, the whole thing could be done with a single RegEx replacement, but that would need more time in my case to work out the details, though there are others here who could probably tell you more quickly.

When you’ve done that, you’ll have got rid of the spaces at the beginning of your paragraphs, so we’ll then need to show you how to set up your default paragraph and convert all the existing ones.

PS. Duplicating the project is an essential step as hitting a wrong key while you have the whole draft selected is a disaster waiting in the wings. If you do do that Cmd-Z is the immediate response.

1 Like

Thanks for your help; it’s much appreciated. There is no rush; when you have time, it is fine. I shall start by duplicating my manuscript, just in case.

1 Like

I have just worked my way through your instructions, and all is ok until I get to step 5. It seems to budge the paragraph back a bit but doesn’t remove all the spaces.

1 Like

OK, here you are, apart from duplicating the project, which you should always do if you’re going to try substantial changes like this, and turning “Show Invisibles” on as it helps a lot too see spaces, tabs, returns and line-breaks when things look strange. While I’ve been typing this, I’ve just seen your message saying Step 5 didn’t work. So, if the one you’re working on hasn’t got too messed up (If it has go back and make another duplicate! :wink:

Forget all I said above, as though that would remove the initial spaces, it’s a bit laborious. Just load the whole draft into the editor in Scrivenings View:

Then open Find (Cmd-F) and set it up like this:

In the Find Panel type ^space+ (i.e Shift-6 space Shift-=); make sure “Entire Document” is selected, and click the up-down arrows and choose “RegEx” from the dropdown. I have “Ignore Case” set by default but it should make not a whit of difference here. When you’ve got it set up looking like that, just click “Replace All”.

What you have set up is “Find the beginning of every paragraph, and if one or more spaces follow immediately, replace them with nothing.” It’s worked in all the trials I have just set up, so It should do so for you.

I’m starting on instructions for the next step.

I’ll wait till I hear how you got on with that.

:slight_smile:
Mark

If it doesn’t work, have you typed “space” rather than inserted a space with the Space-bar? If so it’s my fault for being unclear/stupid!

1 Like

What you have set up is “Find the beginning of every paragraph, and if one or more spaces follow immediately, replace them with nothing.” It’s worked in all the trials I have just set up, so It should do so for you.

This is great, thanks so much, trying it now, but what does this bit mean?

1 Like

I know I must be doing something wrong but not sure what. When I click on replace all it says - not found.

1 Like

That was to explain what the RegEx Find formula ^ + does: ‘^’ means “Beginning of Paragraph”; then ‘ +’ means “1 or more Space characters” (N.B. I haven’t written ‘space’ before the ‘+’ here, but it is there in both cases… sadly the forum software doesn’t seem to have “Show Invisibles”). The Replace field is empty.

It worked perfectly for me, so it’s hard to know what you might be doing that’s different. I’ll put my thinking cap on about how to solve this. Unfortunately, it seems from your handle that you might be in Essex, while I’m in Exeter, so, even if my guess should be right, setting up a meeting would not be easy.

Hi Mark. Sorry to be such a pain.
I am just trying to work out what I might be doing wrong. And I just want to check I am doing the all the steps correctly. Where you say load the whole draft into the editor on Scrivenings view. Do I just open the draft (where I write my document) then click on scrivener view? then do the next steps? I feel like I am doing the ‘find and replace’ bit ok.

Hi, you’re not being a pain at all; it’s very difficult to work out what someone else is doing without being actually able to see what’s happening. So I have set up a test project in which I added 4 spaces at the beginning of most of the paragraphs (since I used Find & Replace to do that, it didn’t include first paragraphs in each individual binder document). I selected the draft, made sure it was in Scrivenings view, and that the editor had focus with the cursor at the start of the first paragraph and took a screenshot, which I annotated:

I then set up my Find & Replace with the RegEx Find formula with the Replace field left Empty:

I have blanked out the number replaced in the bottom right corner as that was the number of replacements done previously!

I then clicked Replace All and in well under a second, the leading spaces had gone throughout.

225 replacements had been made.

2 Likes

So just check that you are doing it exactly like that and let me know the result.

There are other things that would be helpful to know, though.

Firstly, in you original post, you said you were new to Scrivener, yet your manuscript is 80,000 words. Did you enter them all in Scrivener, or had you typed them originally in Word or some other word processor and then import them? If in the latter way, then there may be other “gremlins” involved.

Secondly, do the paragraphs in your manuscript end with a “pilcrow”, ¶ as you can see in my screenshots, or do you see a :leftwards_arrow_with_hook:︎ (line-feed symbol) instead. If that’s what you see, that would explain why nothing has worked for you.

Thirdly, is your manuscript divided into Chapters? Chapters into scenes? Or is it a single document in the Binder? That’s useful to know going forward in terms of being able to help more.

:slight_smile:
Mark

I have tried again, and it still doesn’t seem to be working.
Yes, I am fairly new to Scrivener; I wrote quite a bit of my manuscript on Word and imported it into Scrivener, and then have since worked just on there.

Yes each paragraph ends with a pilcrow.

My manuscript is divided into chapters, about 30 chapters and scenes that are just broken with ***.
I did at one point try and sort out this issue by copying formatting from a paragraph that looked good and copied for the document. Not sure if I messed anything up by doing that ?

I have just noticed that there are these symbols before some paragraphs but not all. Do they mean anything?
It won’t let me add a screenshot on here, but they appear to be two little dots and an arrow pointing to the right.

Ah! If thw two little dots look like the ones in my screenshots, they would be spaces. The “arrow pointing to the right” sounds to me like Tab symbol. If they precede the dots, that would explain a lot!

Can you be patient for a bit? I’m in the middle or rearranging the study a bit. I’ll come back to it shortly. As someone new to the forum, your “trust-level” hasn’t been raised to allow you to post screenshots yet. I’m not a moderator—just a long-term user and forum member—so I can’t do it.

Give me a little while, please, but tell me if your “arrow pointing to the right” precedes the dots, and if they look like spaces with “Show Invisibles” tuned on. If they disappear when “Show Invisibles” is turned off, that’s what they are.

Another point, in my experience, word has a habit of seemingly randomly putting in “non-breaking spaces”—may be represented by a little, blue, square ‘U’ at the baseline. They too cause wierdnesses!

:slight_smile:
Mark

2 Likes

I’ve raised your trust level so you can post screenshots.

Thank you for helping, Mark.

1 Like