Do Run Run STWRITER.PRGB!B!12 4 8 5 0 12 85 2 12 132ST Writer Secrets Part 2ST Writer Secrets Part Twoby Bruce D. Noonan, M.D.Since 12 ST Writer Secrets8 , and ST Writer version 1.50 appeared in the winter 1986 issue of 9-Start8 , I have had an overwhelming number of letters and electronic mail on Compuserve regarding ST Writer! It seems many of you, (like myself) prefer ST Writer to whatever else is out there for a first-line word processor. I have taken many of the suggestions and incorporated them into the current version, 1.73. I have tried to answer as many questions as possible personally by mail, electronic or otherwise, but the task has been somewhat overwhelming, what with my involvement in Seattle's Atari Trek '87 and all. Nevertheless, 1.73 is now here (bugs?? I think it's darn near bullet-proof by now!).NEW AND IMPROVEDSome of the bugs I have corrected included fixing up some annoyances. For example, in 1.50 you couldn't enter a [Control M] in the command line for searches or replacement. As many of you may recall, [Control M] is the normal carriage return character to the rest of the ASCII world, but ST Writer uses a null to terminate paragraphs. One person asked if he could transmit SAVEd ST Writer files by modem to UPI, since ASCII files PRINTed to disk contain carriage returns (ASCII 13) and line feeds (ASCII 10) at the end of every line.I informed him that SAVEd files always have the "DO RUN RUN STWRITER.PRG" identification string followed by the tab data and format string at the top of a file. The format string is optional, of course, and could be deleted. Fortunately, the computer which received his file would ignore all data except that following a special code, which he entered at the beginning of the file to be saved. Then, just before saving the file, he substituted [Control M] for all those carriage returns using the global replace feature [Shift F7]. Since I have heard nothing further from him, I suspect it must have worked.Before I forget to mention it, a number of you wrote to say that the START disk files LONGREF and QUICKREF were mangled. Before you can print these files to screen or paper, they must be LOADed into ST Writer, and PRINTed from the master menu. Printing via the desktop option will not work, as the files contain nulls for carriage returns, and are not ASCII files.FASTER THAN A SPEEDING BULLETSome people wrote to complain about the rapidity with which the screen scrolled past in print preview. I agreed. I fixed it so that if [Control W] (page wait) is present, the scrolling will not occur until a key is pressed. The [Control S] function was inconvenient and almost impossible to implement when trying to stop scrolling, so almost any key except [Esc] will stop and start scrolling. I prefer to use the space bar.I was cautioned not to eliminate the rapid scrolling, though, as some writers wanted to be able to scan quickly. The page wait function was just the ticket. Print preview still worked ok, except when only part of the document was wanted. For some silly reason, after showing the final page selected, it continued to format (but not print to screen) the remaining pages in the file. I put the kybosh on that! But on further examination, I found that when page numbers were double-wide, they did not appear double spaced on print preview. (This is the way to simulate double-wide on the screen). I re-wrote that portion of the code. Next, I tried to fix it so that double and triple digit page numbers in headers and footers would be flush with the right margin when justification was ON. There just isn't any way to do it. The headers and footers are formatted the first time they are encountered in the file, then saved in strings for printing on succeeding pages. When the [@] sign is replaced with a single digit page number, centering and right justification works just fine. But when the single [@] is replaced with a double or triple digit number, everything shifts right one or two columns respectively.The immediate fix was suggested by one writer, John Woodley of Montgomery, AL, and for those with rigid standards of right margin widths, such as in masters and doctoral theses, is as follows: (1) Print out pages 1 to 9 separately. (2) Find the page break, and just before text for page ten, re-write the header, but set the right margin one column less. This will NOT affect the body of the text, only the header. Thus, for a paper with right margin of 70, make the justified right header containing the [@] 69 instead of 70 as: [Control H][Control C][Control C][Control R][6][9]Page @[Return] (3) For pages 100 to 999, decrease the [Control R] in the header line by two less than the right margin for the body of the text.(This can also be done for centering page numbers.)Header and footer formatting was also improved. For example, if a header was wider than the selected margins, some of it would unpredictably overflow into a footer. I changed the routine to ignore any text extending past the right margin in a header or footer, but to observe any control functions which may have been placed there, such as a command to turn off an underline. This results in less calculation and allows more flexibility when creating headers which extend the width of a page even though the page width is later altered.QUALITY IS JOB ONETom Hudson uses ST Writer as his first-choice word processor. He made one suggestion, however, which I have implemented in the current version. You can now select or de-select letter quality printing (provided, of course, that your printer supports it) without having to type in the [Control O] codes or pre-setting the printer configuration desk accessory.I also could not leave the disk formatting feature alone. The new TOS ROMs (coming with the Blitter chip) support skewing of sector placement in disk tracks to enhance reading speed. The code to do this is not difficult to write, but will cause a crash if attempted with the current TOS. I wrote the code into this version of ST Writer, but before doing it, the program first reads which version of TOS is being used. If it is version 1, the old formatting routine is followed, but if a later version, the new skewing is used. I just hope that the version number is changed in the new ROMs, as I haven't had the opportunity to test this.BUG ALERTOne astute individual found that when underlining more than one word while out-denting extended the underline all the way to the left margin. Yecchh. That has been rectified.I further found a bug in form insertion which caused an extra page to be printed while retrieving data from a database, such as in mail merge. I re-wrote the code to allow the correct number of documents to print. Remember that a database containing six names and addresses must be PRINTed to disk (ASCII format), and requires that copies be set to 1, unless all six addressees are to receive more than one copy of the letter each.A further annoyance was that the little letters (ie., D,A,C,I or T) at the end of the middle line of the command box did not show up on every screen. This is troublesome if, for example, you are in [Alternate X] mode (special characters) and you are trying to type a menu command. The desired command will not work, and the character is wisked away off the screen before you can read it. Now, in [Alternate X] mode, a capital [A] is always present in the command box to alert you of this fact. In fact, a further letter was added to this area, [D] to signal a new command: the "deadkey" mode.BETTER DEAD, THEN READThe deadkey allows you to get all those foreign vowels, such as umlauted ones, underlined a and o, scandinavian slash-o's, etc. In fact, just about any character in the ST character set that resembles a combination of a vowel and some other mark (^,_,',",/,~,`,-) can be produced. The deadkey function is toggled on and off with [Control Clr Home]. For an umlaut u, for example, first type a ["] mark. Nothing will appear on the screen. Next, type a [u]. An umlaut u, [] appears. This is simpler than looking up the character in a table and going through the [Alternate X] toggle. The ligatures, or diphthongs combining a and e, or o and e were excluded so as to keep to a minimum the slowing of typing speed when in this mode. While deadkey is turned on, to get regular quotation marks requires hitting the ["] key twice in succession.MERGE RIGHTOne thing that always annoyed me was that non-ST Writer files could not be merged into files already in memory without scrambling things into an unreadable mess. I had always supposed that it just was never meant to be, so I always loaded the non-ST Writer file, converted it to ST Writer format, saved it, THEN merged it. I had forgotten that the problem existed.Well, finally it dawned on me to re-examine the code, and I found the bug. It seems that for non-ST Writer files, the code called for all merged files to insert at the beginning of the buffer instead of the current cursor location! I wish ALL bugs were so easy to correct!ST WRITER 2.0Many of you are asking, "What about the GEM version of ST Writer." I got tired of waiting for Atari to do it. We even had a letter writing campaign and a template of a letter up on Compuserve. It must have fallen on deaf ears, as Atari disavowed any knowledge of attempts to create the GEM version.So I did it. No, it's not yet complete, and no, it won't be Thunder! compatible, but it will allow use of dialog boxes for such things as selecting printer options, file selection, and global formatting. Further, all menu functions can be selected with the mouse, and warning messages arrive in alert boxes.The reason for lack of Thunder! compatibility is the need to go through event_multi(), a 'C' function which handles input from the keyboard, mouse, timer, and message pipe. The function is also the reason such programs as First Word are so slow. I had many pleas to produce a GEM version, while maintaining ST Writer's special attribute, speed. This couldn't be maintained while using event_multi().For those of you who do not want GEM, the program looks and runs as usual. But if you wish the GEM features, clicking the left mouse button allows you to work in GEM. This is the only program I am aware of that allows this kind of toggle. Oh yes, the GEM version also can work in all three resolutions, making ST Writer the only word processor for the ST that can make that claim.The two features still waiting to be implemented are cursor positioning with the mouse, and deselection of the GEM portion if the program is booted from an AUTO folder. John Feagans of Atari has promised to do this. So gently prod HIM, OK? [Return] that concludes your header or footer text, then enter the starting page number you want. ST Writer accep