[bksvol-discuss] Re: Fw: clearing out line breaks

  • From: "Gerald Hovas" <geraldhovas@xxxxxxxxxxx>
  • To: <bksvol-discuss@xxxxxxxxxxxxx>
  • Date: Sat, 19 Mar 2005 13:33:43 -0600

Tony,

If you really want to delete the first line on every page, then the easiest
way is to use a global search and replace in Word.  I know you said that you
couldn't do it that way, but it is possible if you use wildcards in the
Search field.  Since you didn't specify whether your file contains Paragraph
Markers (^p) or Manual Line Breaks (^l) at the end of the headers, I'm
assuming that it has a Paragraph Marker since, from what I read in Word's
help information,  this appears to be the trickier case.

Before you delete the first line, I'd recommend adding a blank line before
the chapter headings by replacing ^mChapter with ^m^pChapter.  That way you
don't delete your chapter headings.  You may need to use ^m^wChapter in the
Search filed if your chapter headings contain whitespace at the beginning of
the heading.  Of course, if it happens that the pages that begin a chapter
contain a header or there is already a blank line above the chapter heading,
then this is not necessary.  If the chapter heading doesn't include the word
chapter, and there is not already a blank line above the chapter heading,
then it may be faster to go in and add the blank line by hand than figure
out how to do it with a search and replace, assuming there is even a way to
do it with a Search and Replace.

To delete the first line,

Go to the first page of chapter 1 or the prologue, back the cursor up until
its a character or two before the Manual Page Break, then select the rest of
the document by pressing Ctrl-Shift-End.  As you probably know, this will
select the remaining text in the document and restrict the replace to the
selected text, which will prevent you from stripping the first line of the
title page, etc.  If your book contains a book jacket at the end of the
file, then you will want to either add a blank line at the top of those
pages or be a little more careful about selecting your text.

Open the Search and Replace dialog box with Ctrl-H.

If the Use Wildcards check box is not on your screen, then type Alt-M or
press the More button.

Type Alt-U or check the Use Wildcards check box.

Enter ^m*^13 in the Search field.  The asterisk is a wildcard that
represents any string of characters.  The ^13 is an alternative for ^p when
wildcards are being used.  The help doesn't list an alternative for ^l, so I
am assuming the ^l is acceptable when wildcards are used.  If you assume
that I didn't try this out with ^l, then you'd be making a valid assumption.
<smile>  As the textbooks say, The ^l instance will be left as an exercise
for the reader.  I did try this with ^p though, and it deleted the first
line at the top of each page.

Enter ^m in the Replace field to prevent stripping the page breaks.  You can
also use ^m^p if you want to replace the line you deleted with a blank line.

Type Alt-A or press the Replace All button.

That should do it.  Of course, you may need to tailor this a bit since you
didn't give any details about how your file is formatted.

I strongly recommend making a backup copy of the file prior to doing the
replace and checking every page afterwards.  You can also add the page
numbers back in while you're doing the checking.  Checking every page
afterwards may sound like it's defeating the purpose of using a Search and
Replace to do the work, but you can't count on a Search and Replace working
100% correctly, and you don't want the book to have to be rescanned later
because you accidentally deleted some of the top lines of the core content
on a few pages, or worse, a large number of pages.  Using the Search and
Replace to strip the line instead of doing it manually saves a lot of
keystrokes, which you would have had to do if you did the entire job by
hand, and makes the rest of the work go pretty quickly.

Gerald

-----Original Message-----
From: bksvol-discuss-bounce@xxxxxxxxxxxxx
[mailto:bksvol-discuss-bounce@xxxxxxxxxxxxx]On Behalf Of Tony Baechler
Sent: Saturday, March 19, 2005 1:18 AM
To: bksvol-discuss@xxxxxxxxxxxxx
Subject: [bksvol-discuss] Re: Fw: clearing out line breaks


Hi all.  I really need help on this!  I have both Word 2000 and K1000
7.02.  I tried opening the rtf file in K1000 and it wouldn't open even
though it should be OK.  It said that it couldn't recognize the format.

I have a rather large book that I'm validating.  It is a very good scan for
the most part.  It has some errors but not bad.  However, it has one
serious problem which I'm stumped on.  It has a page header or footer (I'm
not sure which) with page numbers.  Both the numbers and header or footer
text got mangled, so the best thing is to remove it.  The numbers got
turned into letters and each footer or header is mangled differently.  I
can't do a generic find and replace because the thing to find is different
on each page.  I can send an example if this is still unclear.  I need a
way to delete the first line following the page break.  I just want to
eliminate the line since it's garbled anyway.  How can I do this?  Is there
an easy way to do this?



Other related posts: