Monday, August 31, 2009

CLICK HERE FOR THE SOURCE
Hi, I have a large .txt file of which I'm trying to format because all the sentences in the txt file have early line-breaks, like this:

This is an example
of how the paragraphs
look like in notepad.
All short and they
don't stretch far
enough to touch both
sides of the margins.

I tried word-wrapping in Notepad, but it didn't work because it seems like the line-breaks have been manually inserted in the first place.

I realized the only way to change the format of the text is to back-space at the beginning of each line, but it's impossible to do with almost 80 or 90 pages of text I have...

Is there anyway to fix that problem with any version of Microsoft Word? Or any other program? Would somebody please kindly help me out?

copy /paste all text in word. Next select top of text, clic Edit/replace use "special" choose the "block markin"or the appropriate sign, and replace it by either a space, or nothin. It works fine for me
Hey taxi, thanks a lot for helping us out here. I tried what you suggested and it's really working out. But the only thing is when I pick "replace all...", all the paragraphs are crunched up into one. I can't think of any other solution besides selecting each paragraph separately and then pick "replace all.." but there are about a 90 pages to go through.. just wondering if you've encountered the same problem before and what did you do to go around it..

Thanks a lot for your help!
If a paragraph is delimited by 2 carriage return line feed pairs (block markers), replace that first with a special delimiter (example [para]), then replace the single line endings with the space.
Then replace the special delimiter with two line endings to restore the paragraph spacing.
yes
But I have it in 2 times : 1st I replace each block markin by a space.
Next I replace each "2 blanks" by "1 block markin". Of course i suppose u've got a blank line (and only 1) to separate a block, and that there's no double spacin in the text...
Think u can have it and coulda make a piece of all ur job...!

To have 1 blank line you need 2 carriage return/line feeds.

You first replace the 2 line feeds with a para marker to mark the paragraphs.
Then you replace the single line feeds with a space.
You then may replace 2 spaces with a single space.
Then you replace the para marker with 2 line feeds to restore the paragraphs.

No comments:

Post a Comment