[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

re 2 spaces etc.



If someone has written a refined, elegant hundred per
cent-effective universal xpl text cleanup that requires no
subsequent proofing, I haven't seen it. Having written a lot of
cleanup routines to run under deadline pressure, I'm convinced
that a kludge is often the best solution and that, after running,
a quick manual scroll through the file is a must. I've never
liked using xpl routines that {rc} through a whole file, and
never spellcheck that way either.

My draft fragment to double-space after sentences was untested,
was not the point of my posting, and that goal is of little
interest to me, but since others turned it into a federal case I
went ahead and took the time to write and test a working macro.
It runs in about two minutes on a 386dx25 on a 150k file--longer
than if my graphics card didn't treat DX as an act of war (after
conferencing, XyQuest tech support said that they'd never heard
of such a thing, but I've never been able to use DX since I got it).

After reading Carl's and Chet's solutions, because of the
command's speed I stand by my ci kludge approach, and proofing
manually after running for abbreviations omitted from the
exceptions list (which is entirely up to the user) and, e.g.,
whether what follows a colon is in fact a sentence (i.e., has
subject and verb so begins with a capital--old NYTimes style). I
wrote in command ci code to correct double-spaced initials,
leaving abbreviations the biggest problem.

So as not to further offend David and Chet's delicate eyes, I
won't post the pseudocode to the xylist. I'm emailing a copy to
Joel, who posed the problem, and will be happy to share it with
anyone who wants to email me offlist for a copy. I should note
that in a series of unconditional ci commands I always put
repetitious code in a variable and {pvNN} it, so the code is easy
to write and probably faster but some may find it difficult to
read, as in this fragment:

   BC ci _"] _"]{sv86, _XC BC cia _}{pv86}!] _!]{pv86}{lb
   }?] _?]{pv86}.] _.]{pv86}") _"){pv86}!) _!){pv86}{lb
   }?) _?){pv86}.) _.){pv86}?" _?"{pv86}!" _!"{pv86}{lb
   }." _."{pv86}: _:{pv86}? _?{pv86}! _!{pv86}. _.{pv86}{lb
   }{sv86, _XC BC cia _}... _...{pv86}. ... _. ... {pv86}BC

========================== annie fisher  nyc