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

Re: extra codes



Simple, really. First, sit down and make a list of codes/modes you want to
retain. By the process of elimination, then, the others should be set for
removal.

In my case, I wish to retain all mode codes, but nothing else, because after
the operation is complete, I will then insert what I call my styles file, which
is merely a series of "SS" codes, which I place at the top of the file. Then, I
insert the proper "US" codes to match them as I go along.

Therefore, my routine (and it's all done in expanded mode, of course) replaces
mode italics with an ASCII 1 (the smile face), mode bold with ASCII 2 (the
reverse smile face), and mode normal with ASCIII 3 (the heart). (Please don't
bring up the subject of additive modes again, friends--I don't use 'em so I
don't provide for em.) There might be a couple more codes I might want to
retain for a specific project, but usually I don't.

Anyhow, with the temporary characters now in place, I replace chevron any
string chevron, with nothing, after which I restore the mode codes.

And that's it.

[If you're still clinging to version 3+ you can do a kludgy search and delete
to accomplish the same thing]

I believe Patricia Godfrey has similar routines and doubtless she'll mention
them if so.

Hope this helps.


Myron Gochnauer wrote:

> Does anyone have a way of stripping excess formatting codes from documents
> converted from RTF format?
>
> The jumbo U2 file has a routine for stripping multiple Mode commands, but
> RTF seems to have several other coding conventions that result in needless
> baggage for XyWrite. For example, every time it changes from normal to
> italic in a section of text with an explicit typeface and size, it repeats
> the typeface and size. I can see how this makes sense in some typesetting
> systems, but it is not necessary in XyWrite. Similar XyWrite-excesses occur
> at the beginnings of every line covered by special indentation (e.g. a
> series of hanging indents: ≪IP0,.25IN≫).
>
> Since RTF seems to be the most common and robust format-of-exchange, it
> might be a good idea to write a series of XPL routines that would strip as
> much of the excess coding as possible. How far have others gone with this?
>
> I often find myself trying to edit a document in Word or WordPerfect and
> becoming so frustrated that I save it as RTF, do the editing in XyWrite and
> then send it back to the big dog.
>
> Myron

--
Leslie Bialler, Columbia University Press
lb136@xxxxxxxx
61 W. 62 St, NYC 10023
212-459-0600 X7109 (phone) 212-459-3677 (fax)
> http://www.columbia.edu/cu/cup