• Quick note - the problem with Youtube videos not embedding on the forum appears to have been fixed, thanks to ZiprHead. If you do still see problems let me know.

Text formatting problem

chrisqqgx4

Critical Thinker
Joined
Jul 30, 2003
Messages
291
I have a bunch of text ebooks (mostly from Gutenberg) that have hard-coded carriage-returns after each line.

I want to remove them but I'd be forever doing it manually. I tried in Word (replacing all paragraph marks with space and then replacing double spaces with paragraph marks) but that didn't work. There are a lot of double spaces already in the text and they get changed also.

What I want is a "Replace all single paragraph marks with a space" type function. I obviously want to keep the paragraph breaks where they are. Anybody help? (doesn't have to be in Word, use anything a standard Windows PC has).

Here's an extract:

On November 8, when both parties were united at Snow Hill, they
were unexpectedly joined by Captain Irizar, of the Argentine gunboat
Uruguay, and one of his officers. Some anxiety had been felt owing to
the absence of news of the Antarctic, and the Argentine Government
had sent the Uruguay to the South to search for the expedition. But
what in the world had become of Captain Larsen and the Antarctic? This
was the question the others asked themselves.

The same night -- it sounds almost incredible -- there was a knock
at the door of the hut, and in walked Captain Larsen with five of his
men. They brought the sad intelligence that the good ship Antarctic
was no more. The crew had saved themselves on the nearest island,
while the vessel sank, severely damaged by ice.

They, too, had had to build themselves a stone hut and get through the
winter as best they could. They certainly did not have an easy time,
and I can imagine that the responsibility weighed heavily on him who
had to bear it. One man died; the others came through it well.
 
What format are these ebooks in?

You ought to be able to do it with a wildcard replacement in Word, but the wildcard replacement feature is even more broken than most of the crapola in Word.

~~ Paul
 
This is a function many text editors can do. It looks like the free TED editor can:

http://jsimlo.sk/notepad/notepad.php

There is a note in one of the change releases that the unwrap tool has been modified specifically to preseve paragraphs.
 
I managed it with:

1. Change all ^p^p to vwxyz
2. Change all ^p to space
3. Change all vwxyz to ^p^p

ie, change all the real paragraph breaks to some dummy text, change all end-of-lines to a space and the put the paragraph breaks back in (caret-p is the Word way of specifying a paragraph break in find / replace)
 
Holy cow! It never occurred to me to try that in non-wildcard mode. If you turn on wildcard mode, there isn't even a special character for paragraph break.

What a crock.

~~ Paul
 
OK, does anybody know how to turn off the Delete All verification? I select a word and press Delete. It then comes back with "Delete All? Yes/No", so I have to hit Y every time. It used to just delete the block.

I had to reinstall a few months ago and this feature has been on ever since. I've been through all the menus and Help (no help) and can't find how to turn that off.
 

Back
Top Bottom