At 12:39 AM +0900 8/15/03, Nobumi Iyanaga wrote:
On Thursday, August 14, 2003, at 08:04 PM, Patrick Gormley wrote:
I am a chemistry teacher and would like to design a macro that would take text like Na2SO4 and have the macro drop all numbers to subscripts.

Here's a possible approach: write an AppleScript droplet on which you drop a NWEx RTF file containing chemical formulas; the AppleScript sends the file to a Unix shell script (sed, perl, etc) which sniffs out the formulas, encloses digits found therein in \sub-\nosupersub RTF tags (makes them subscript), outputs a new file and has NWEx open the new file. To do it this way, I believe you'd need to have the Apple Developer Tools (free but many megabytes) installed on your computer. If there's a way within NWEx to bet the RTF to the Perl engine, then it could be done as a NWEx macro without the Developer Tools, but I haven't done anything with this approach. On the other hand, if a version of sed or perl comes with Jaguar routinely, then one wouldn't need anything else. Feel free to send me a short file or two privately, if you wish.


Regards,

Jonathan

---------------------------------------------------
The Nisus Interactive List
[EMAIL PROTECTED]

Searchable archives:
http://www.mail-archive.com/nisus-interactive%40nisus.com/

To unsubscribe from this list please send a message with "unsubscribe
nisus-interactive" in the body of the email to [EMAIL PROTECTED]




Reply via email to