PROGRAM TYPESET - CONVERSION OF WORDSTAR TEXT TO OTHER FORMATS PER STANGELAND 4230 SAND NORWAY 1982/11/27 Program TYPESET converts a text written by WORDSTAR to a format acceptable to type setting equipment. Operating instructions TYPESET.SRC is the program code TYPESET.COM is the version you run TYPESET.PRM contains the parameter list. Any CP/M system with at least one disk drive can be used. TYPESET.COM and TYPESET.PRM must be on the same disk. Write TYPESET, and press RETURN The program asks for your text file. Assure that there is sufficient space on that disk for the new version, and give it the drive prefix and file name. The file text is displayed on your terminal as it is read. Non- printable characters are substituted with ? The program stops execution at undefines dot commands, so that you may give a suitable number code at this point. Your new file is written in chunks of 4K. It is called .SET WHAT DOES THE PROGRAM DO? Your WORDSTAR text is read, character by character. Special wordstar features are exchanged with special symbols.All symbols to be entered in the new text are read from a separate file:TYPESET.PRM. These parameters can be changed at will, to suit different typesetter equipment. Equipped with the correct parameters, this program may also be useful for converting WORDSTAR texts to a format accepted by other text editors. The old file is left unchanged. The new file with suffix .SET has the following characteristics: *Only one blank (or other word delimiter of your choice) between each word *Additional whitespace - blank lines and characters, line shifts within paragraphs- are removed *A special symbol marks end of every paragraph *Headings, subtitles and quotations are marked at beginning and end *Other features in the WORDSTAR text are standardized to ASCII. The distributed version of TYPESET.COM requires a file named TYPESET.PRM with 21 parameters in it. These parameters are put into the new file instead of the corresponding WORDSTAR symbol in this list: CONVERSION CODES FROM WS TO TYPESETTER SYMBOLS No Dot commands in WS- file TYPESET.PRM for LINOTRON 202N - .cp x (conditional page shift) on-line choice 1 .pa (new page) Bell c1> 2 .lh 10 (line height 1 1/2) ON: Bell c2> OFF: Bell c5> 3 .lh 8 (narrow lines) Bell c3> 4 .lh 12 (double spaced lines) Bell c4> After .lh 8: Bell c5> ________________________________________________________________ ASCII-code No Hex dec. Function: TYPESET.PRM - 08 08 BS Backspace removed 8 02 02 Boldface ^P B ON: Bell c8> 9 OFF: Bell c9> 10 13 19 underline on/off ^P S ON: Bell c10> 11 OFF: Bell c11> 12 14 20 superscript on/off ^P T ON: 07 3c 75 32 hex 13 OFF: Bell c13> 14 22 34 " quote symbol ON: 02 hex 15 OFF: 01 hex 17 1E 30 soft hyphen (not printed by WS) @ (means:removed) 17 1F 31 soft hyphen at end-of-line @ (means:removed) 18 0F 15 non- break space ON: Bell c 15> OFF:Bell c 15> 19 8D SOFTLINE line shift within if only delimiter a paragraph between two words: 20 hex Else:removed. 20 0D 13 CR - new paragraph 16 03 5E hex - 0a 10 LF (line feed -follows CR) removed 21 09 09 TAB 20 hex ______________________________________________________________________ "Bell" in this table means the character 07 hex. ________________________________________________________________ The parameters given in this table are the ones found in TYPESET.PRM on the distribution disk. They suit my printer contact and his LINOTRON 202N pretty well. But they may be changed to any other symbol, or sequence of symbols. Each sequence of symbols in TYPESET.PRM is terminated by a CR-LF. This means that the CR-LF symbol itself can not be a parameter. It is represented by the symbol '$' (24 hex), which the program interprets as a standard end-of-paragraph symbol(0d 0a hex) The sign '@' (40 hex) in TYPESET.PRM means removal of that Wordstar feature. Parameter no. 6,7 and 16 are at disposal when running the program. Dot commands that may have different meaning according to the context, have no pre-determined conversion code. Example: It the program finds a '.cp 10' symbol in the WORDSTAR file, it will give a BELL sign to the terminal, and request a number from the user. 0 means that this dot command should be ignored. If the "conditional page"- command at this spot means that a table starts here, the user may enter symbol 6, and tell the typeset ting firm that symbol 6 means start of tables. PROGRAM CHANGES If you'd like to add to the list of Wordstar features to be converted, you'd have to compile a new version of the TYPESET program. Example: You'd like to change all {,| and } to something else. It requires the following changes: in the sequence CASE ord(ch) OF (*in procedure convert- line 257 *) you add: '{': Enter(22); '|': Enter(23); '}': Enter(24); CONST no_of_codes = 21; (Line 4) is changed to CONST no_of_codes = 24; (*three extra codes for {,|,}*) and the file TYPESET.PRM is given three additional lines, containing the symbols you'd like to have instead of {,| and }. IS THE FINAL TEXT READY FOR PRINT? Some final editing by the typesetting firm will be necessary. The codes given by this program are intermediate, and are switched to codes which indicate character fonts. Page size and page numbering is not carried over from the WORDSTAR text. These final touches concerning lay-out are better left to the typesetter professionals. If, however, the use of underlining and different line heights in your text is inconsistent, you'd have to pay extra for re-editing. Some advice: Agree with your typesetter contact first on suitable parameters. Make sure that he can read your disk or cassette format. Start the text with a .lh 10 - this is interpreted as ordinary line height use .lh 8 for quotations use .pa for new chapters Use underlining and boldface for sub-headings NON-COPYRIGHT NOTICE This program is at disposal for non-commercial use by writers. Your comments are welcome. Any publisher or printer firm that considers taking the program into regular use is requested to contact me at the address above. I might sell them an updated or custom-built version.