TechWhirl (TECHWR-L) is a resource for technical writing and technical communications professionals of all experience levels and in all industries to share their experiences and acquire information.
For two decades, technical communicators have turned to TechWhirl to ask and answer questions about the always-changing world of technical communications, such as tools, skills, career paths, methodologies, and emerging industries. The TechWhirl Archives and magazine, created for, by and about technical writers, offer a wealth of knowledge to everyone with an interest in any aspect of technical communications.
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).