[bksvol-discuss] For Valerie - how to replace incorrect paragraph marks that are at the end of every line in an entire document

  • From: "Judy s." <cherryjam@xxxxxxxxxxxxxxxx>
  • To: bksvol-discuss@xxxxxxxxxxxxx
  • Date: Sat, 19 Sep 2009 12:26:24 -0500

Hi Valerie,

I wrote this up a little while back as one alternative in the proofreading instructions in the volunteer manual, but it hasn't been added to the volunteer manual yet. Smile. The following has been tested by several bookshare volunteers, however, and works correctly for exactly your situation.

Give it a try! smile.

Judy s.

How to Remove any extra carriage returns inadvertently inserted by OCR:

This involves using the find and replace command in a special way that uses what are called wildcards.

Before you begin, you want to ensure that you do not lose the blank lines at the tops of pages. Simply go to the beginning of the book, or to the beginning of the text if you are sure the preliminary pages are in excellent condition and do the following:

In the find box, enter ^p^p
In the replace box enter two instances of a character that is not likely to appear in the book. A good choice is $$, that is dollar dollar.
Then execute a "replace all."
Next, in the find box, enter ^m^p
In the replace box enter two instances of a new unique character that is not likely to appear in the book. A good choice is %%, that is, percent percent. Just make sure it is not the same character that you just chose in the previous step.
Then execute a "replace all."

Now, replace all the remaining paragraph marks in the entire book temporarily.
In the find box, enter ^p
In the replace box enter ~ , that is a tilde

Now you are going to look for paragraph marks that shouldn't be there. To do this, you use a special kind of search, using the "use wildcards" box in the find and replace dialogue. In the Find and Replace dialogue box, click on the button that is mareked "More." This will expand the options that are available in the Find and Replace box to include a new list of Search Options. In the list of Search Options, check the box for "use wildcards" (you can also do this while in the Search box by typing alt U, which is alt "capital U) Next, in the find box, enter ~([a-z]) that is tilde left-parentheses left-square-bracket lowercase-a hyphen lowercase-z right-square-bracket right-parentheses
In the replace box, enter  \1 that is space backslash numeral one
Then execute a "replace all."

Now you will undo the search and replace you used to preserve the blank lines, and restore them. First, make sure you uncheck the use wildcards box in the find and replace dialogue. You don't want it to remain checked because it will affect other searches you will make later.

In the find box, enter: ~ , that is a tilde
In the replace box enter: ^p
Execute "replace all."
In the find box, enter $$ (or whatever other character you used to take the place of your blank lines)
In the replace box, enter ^p^p
Execute "replace all."
Now you will undo the search and replace you used to preserve page breaks and the blank space after them and restore them. In the find box, enter %% (or whatever other character you used to take the place of your blank lines)
In the replace box, enter ^m^p.
Execute "replace all."

To unsubscribe from this list send a blank Email to
bksvol-discuss-request@xxxxxxxxxxxxx
put the word 'unsubscribe' by itself in the subject line.  To get a list of 
available commands, put the word 'help' by itself in the subject line.

Other related posts: