Eliminating .txt file hard returns

Subject: Eliminating .txt file hard returns
From: Laurence Burrows <burrows -at- IBM -dot- NET>
Date: Thu, 22 Oct 1998 13:08:40 +1000

Gary G. Robinson wrote:

--------------snip
A colleague of mine downloaded an important reference document from the
Internet. This document arrived as a .txt file containing hundreds (at
least) superfluous hard returns. Currently the document is 555 pages
long. We figure it is actually about a third of that length without the
extra returns. Does anyone have any suggestions of how to automatically
remove these returns? To remove them manually could take years and cost
thousands of lives.
--------------snip

Assuming you have FrameMaker (and this can equally apply in general terms
to other dtp/wp tools) the task can be easy.

1. If you have a situation where all lines end with a hard return <hr>
and paragraphs end with two.<hr>
<hr>
...then the solution is (a) search/replace all <hr><hr> pairs with "~", (b)
search/replace all <hr> with "" (null), (c) search/replace all "~" with <hr>.

2. If there are no <hr><hr> pairs, then look for the logical paragraph
terminators like ".", ":", "?", "!", etc. and add a "~" character, then
proceed as above with (b) & (c).

Have fun!

Regards,

....................................................
Laurence Burrows, Navex Pty Ltd
mailto:burrows -at- ibm -dot- net, 100026 -dot- 172 -at- compuserve -dot- com
tel: +61 3 9602 4533 fax: +61 3 9602 4854
....................................................

From ??? -at- ??? Sun Jan 00 00:00:00 0000=




Previous by Author: Shipping a product with only the online help
Next by Author: Re: Frame to PDF=crap
Previous by Thread: Re: Eliminating .txt file hard returns
Next by Thread: Re: Eliminating .txt file hard returns


What this post helpful? Share it with friends and colleagues:


Sponsored Ads