Trying to compile and replace empty lines with no empty lines

My manuscript looks like this:

[i]Lobsters were not very clever. Instead of backing deeper into their holes at the first sign of a human, they boldly faced the threat. Since spiny lobsters had neither claws nor any other form of defense they were usually easy prey.

This time, Hatuey was lucky and found two large lobsters sharing the same ledge. With a practiced grab of their carapaces, Hatuey ascended with tonight’s dinner in each hand. Dropping them into the dugout, they flicked their tails and rasped their displeasure. [/i]

I want it to look like this after compiling:
—indent----> Lobsters were not very clever. Instead of backing deeper into their holes at the first sign of a human, they boldly faced the threat. Since spiny lobsters had neither claws nor any other form of defense they were usually easy prey.
—indent----> This time, Hatuey was lucky and found two large lobsters sharing the same ledge. With a practiced grab of their carapaces, Hatuey ascended with tonight’s dinner in each hand. Dropping them into the dugout, they flicked their tails and rasped their displeasure.

Note: I had to use, “—indent---->” to represent an indent, as this forum sw kills empty spaces preceding text.

I have figured out how to do the indent, but I’ve tried everything to remove the empty line and cannot figure it out. My paragraphs are always separated by an empty line.

If paragraphs are separated in the editor with two returns, you can remove these during compile by setting up a replacement that searches for two returns and replaces them with one.

Use OPTION RETURN to type each return in the replacement interface: you won’t see the characters represented on screen, but they will be there.

Hope I haven’t misunderstood.

I didn’t realize that the Compile could search/replace - that will probably work. I’ll test it.

thanks!
ken

The compile replacement must be happening first - before the rest of the formatting rules because I just get everything combined out of the compile. I guess I only wanted an “empty line” rather than all carriage returns. I’ll see if a RegExp can tackle this.

ledge. Lobsters were not very clever. Instead of backing deeper into their holes at the first sign of a human, they boldly faced the threat. Since spiny lobsters had neither claws nor any other form of defense they were usually easy prey. This time, Hatuey was lucky and found two large lobsters

Success!

You need to do this:
search term: \n\n
replacement term: “OPTION return” - you don’t type this, you just press the OPTION and return key once - you won’t see anything in the field, but it is there

Select “RegEx” and then go ahead and Compile.

Hey, ken.

For me, I just key OPTION RETURN OPTION RETURN (i.e. key the combo twice) in the “Replace” field and OPTION RETURN once in the “With” field, and that works fine. But, yes, RegEx also works as you describe.

Come what may, glad you got it to work, and hopefully this thread might help others in the future,

1 Like

My manuscript looks like this:

Lobsters were not very clever. Instead of backing deeper into their holes at the first sign of a human, they boldly faced the threat. Since spiny lobsters had neither claws nor any other form of defense they were usually easy prey.

This time, Hatuey was lucky and found two large lobsters sharing the same ledge. With a practiced grab of their carapaces, Hatuey ascended with tonight’s dinner in each hand. Dropping them into the dugout, they flicked their tails and rasped their displeasure.

I want it to look like this after compiling:
—indent----> Lobsters were not very clever. Instead of backing deeper into their holes at the first sign of a human, they boldly faced the threat. Since spiny lobsters had neither claws nor any other form of defense they were usually easy prey.
—indent----> This time, Hatuey was lucky and found two large lobsters sharing the same ledge. With a practiced grab of their carapaces, Hatuey ascended with tonight’s dinner in each hand. Dropping them into the dugout, they flicked their tails and rasped their displeasure.

Note: I had to use, “—indent---->” to represent an indent, as this forum sw kills empty spaces preceding text.

I have figured out how to do the indent, but I’ve tried everything to remove the empty line and cannot figure it out. My paragraphs are always separated by an empty line.

[size=50]ดูบอลออนไลน์[/size]

Use Edit->Text Tidying->Remove Empty Lines Between Paragraphs to do this.

This menu item also includes other useful editing things, like removing double spaces and such.

Another crucial problem I have is this: I’v written nearly 600 pages. To get it printed as a paper book, I must shrink the amount of pages, because the book it’s getting too thick. There is a possibility in SCRIVENER to skip empty lines between paragraphs in a normal text. An I used hundreds of them in the whole manuscript. I’m accoustemed to that style. Never wrote a book before. These empty lines are between the last characters of the previous (last) paragraph and the upcoming line of the next paragraph. It’s a visual separation.

I know that there exists a tool to do it in SCRIVENER - with small indents. Don’t exactly know how, but I once read about it. The problem that I fear is, that there will be lines exstincted that belong to the overall layout in my documents (chapters) all over the project. It looks like this:

(Example)

"… and the government did not change that.(Pilcrow)
(Pilcrow)
HOW TO INVOLVE CITIZENS IN POLITICS (Pilcrow)
(Pilcrow)
Since many years there are movements in several european countries to vote more than once every four years. In Switzerland they use this possibility of direct democracy since …

(End of example)

This style is spread all over my manuscript in SCRIVENER. It’s the main structure. When I now give the order to delete empty lines, I fear that all the empty lines in this example above are “killed”. But then the idea of writing in such a way with intermediate titles is gone. It doesn’t look well, wenn the intermediate title (heading) is surrounded by normal lines of text, touching them - in a certain way.

Is there somebody in the forum who knows, how to manage this problem?

It would help me very much.

Auschiller

In addition to the existing discussion on the same topic, which I’ve merged your query into, there is also a thread on a similar question (trimming empty lines from the ends of sections), which although there is a dedicated compile checkbox for doing so, evolved into a more general discussion about fixing the problem in the source text.

Pretty much any tactic that can be used to fix the source text, with search and replace, can be applied to the concept of Replacements, at compile-time, as described above. The advantage of the latter is that one can continue writing with whatever habits and aesthetics they prefer, and have the final result cleaned up to spec on the fly.

1 Like