FRIENDLY%YORKVM1.BITNET@WISCVM.WISC.EDU (Michael Friendly) (08/11/86)
I have written a book using WordStar on an IBM-PC which is to be typeset on a Shafstall phototypesetter using a formatter called XY-Vision which runs under Unix. It is a book on Advanced Logo programming with many programs and display material requiring lots of font changes and so the text files are peppered with WS control codes and formatting commands. My problem is how to translate about 1 Mbyte of text with WordStar formatting commands to XY-Vision commands, minimizing the amount of manual work. I know that a completely general solution is quite difficult. I'm just looking for ideas that can help ease the pain. Much of the translation can be described by production rules, such as ^S arb ^S --> $f2 arb $f1 (italics) ^D arb ^D --> $f3 arb $f1 (monospaced Logo font) " arb " --> `` arb '' ' arb ' --> ` arb ' ..IA nl arb --> $h1 arb .IA nl arb --> $h1 arb ..IB nl arb --> $h2 arb etc. .IB nl arb --> $h2 arb etc. where ^c means ASCII control-c, arb is an arbitrary character string, nl is a new line, etc. I have gotten a C program called WSNROFF from someone on another net which translates WS files to nroff, at least partially. It is a fairly old program (dated 1-Sep-81) and does a fairly minimal translation, though the structure is there to build on. Before I start to hack on it, I thought I'd enquire whether anyone has or knows of a more complete translator for WS text files, or other ideas for how to proceed. This seems like a problem that someone else must have faced before, so I thought I'd send this query. Any help would be greatly appreciated. Please reply directly to the address below. I will collect any useful replies and repost them to the discussion. -- Snail Mail -- ** E-mail ** Michael Friendly BITNET: FRIENDLY@YORKVM1 Psychology Department Othernet: FRIENDLY@YORKVM1.BITNET York University or FRIENDLY%YORKVM1.BITNET@WISCVM.WISC.EDU Toronto ONT CompuServe: 72777,253 CANADA M3J 1P3 Voice: (416) 736-5118 x6249 *NEW*