WS/KAMAS: The WordStar - KAMAS Affair by Dick Ezzard Introduction The new version of KAMAS (release 1.2) has been slimmed down and made more compatible with WordStar. It is therefore much more useful to me and I believe I will be working with KAMAS more and more now. I am now able to use WordStar to take notes on a general topic over a period of time, and then use KAMAS to structure-edit such notes by putting them in a logical order for presentation or study. This article is about how to expedite the movement of text material back and forth between WordStar and KAMAS. Such operations are necessary if one wants to take advantage of the respective strengths of both programs. KAMAS is good for rearranging files of text, not so good on text entry, editing, output formatting and printing. WordStar does those jobs well but is a bear on rearrangement. Together KAMAS and WordStar provide a complete set of tools for the text manipulator. Although WordStar and KAMAS are not yet married, they now seem to be stepping out together. The rest of this article pre-supposes a working knowledge of both KAMAS and WordStar. The operations are described in general terms and you will have to translate those operations into actual command keystrokes yourself. This is not a "how to run KAMAS article" but rather a how to do something with KAMAS after you know how to run it article. Note Entry First enter your notes in "manuscript" or "journal" files using WordStar. Enter notes in any convenient order, as ideas occur to you, or as you come across relevant material while reading or researching. You may format notes as you enter them or, if more convenient, go back and format notes later. My "manuscript" files have minimum formatting since they are designed for editing, not for output. A good format for WordStar notes: Set margins to wrap at a convenient screen width. 80 columns crams more context on the screen, but may be difficult to read. I use 65 which looks fine and is often a good width for printing to paper at a later stage. The vertical format is predicated on the notion that a note should be like a paragraph, the expression of a single idea. Separate your one-idea notes by two strikes of the key at the end of each note. This puts a blank line between notes, so that each note has a top and bottom edge for handling as a separate building brick in some larger edifice. Put descriptive titles on your notes. This can be done as you enter during original entry, or at a later time. Sometimes it is expeditious to enter stuff in one massive block, typing as fast as you can. Then later you go back and break out the individual notes and add titles. A title is conveniently entered as a WordStar double dot comment line (a line which begins with two periods) on a line directly above the note itself. For KAMAS a title should include a short unique classifying key and optionally, an explanatory subtitle which is indicative of what the note is about. Adopt the Kamas convention of separating the key and the subtitle with the backslash \ character. Although KAMAS literature states that a too-long key or subtitle will be automatically truncated, during my operations I have found it necessary to take care to keep keys under 31 characters in length and to keep subtitles under 63 characters. Otherwise KAMAS aborts during the process of importing the file. Your notes should now look like this: A double dot line with a key and a subtitle separated by a backslash, followed by a paragraph-like note which starts on the very next line after the title and ends with two carriage returns, so that a blank line separates the end of one note from the double dot header line of the next note. Followed by another note. And so forth. By-the-way, this format is a good format for the keeping of notes even if you are not going to use KAMAS as your main rearrange tool. The blank line between notes expedites the block marking of notes within WordStar, since you can then mark the beginning and end of notes using just vertical motions of the cursor. (When the cursor encounters the blank line it snaps to the leftmost column automatically). Once a note is marked as a block there are several techniques you can use to throw it to various locations in a file. Transition to KAMAS However, KAMAS is a very good tool for rearrangement of a text file which has notes headed by keys and titles. And most of my notes need rearrangement from time to time, since the original order of entry was seldom the most interesting order for presentation. And the original order of entry has never yet been the most logical order for remembering as an organized body of knowledge. KAMAS can structure and organize my notes. To prepare a file for export to KAMAS you use three special dot commands. They are ..IN (insert next), ..ID (insert down), and finally ..GU (go up). The simplest way to prepare a file is to use the ID command on the top three or four notes to establish several levels in your logical hierarchy. Then just use IN for the rest of the notes. When you get into KAMAS it is a simple matter to just promote and demote notes to their correct logical level. Since your notes are all preceded by a double dot header line, just add those special commands to the header lines. Use a WordStar Find and Replace to find ^N.. and replace it with ^N..ID, for the three or four top notes. Then do find ^N.., replace with ^N..IN for 99 or 999 notes (pick a number bigger than you have notes). Your notes now have titles and KAMAS dot commands so they can be exported to a KAMAS file. After your existing notes are configured, you can enter a list of supertitles, main headings which will have no individual note attached, but which will be a higher order heading under which you will want to group several notes. For example, if you have notes on roses, peonies, and snapdragons you may wish to make a heading called "Flowers." Enter your list of main headings anywhere in your WordStar file, configuring each header as a double dot IN line. (..IN Flowers, for example.) You can group your notes under these main headings after you get everything into a KAMAS file. If you don't have any main headers in mind right now, don't worry, you can always add them after you get to the reorganization stage in KAMAS. On the KAMAS Side Exit WordStar and run KAMAS. Open a KAMAS topic large enough to hold your notes. This should be at least three times the size of your raw text file. (If the text file was 20k, open a 60k KAMAS topic.) Use the new KAMAS FINPUT utility and bring the formatted WordStar note file into your new empty KAMAS topic at the top level (give the TOPIC name at the Branch prompt). Then use the outline editing facilities of KAMAS to massage and re-order your notes by moving the titles around. Depending on how many levels you descended, your note file will now appear as a list of headings, probably most on one level of indentation. Use your KAMAS commands to promote, demote, move and shuffle the headers. Expand and collapse your outline as desired for manipulation. Of course your notes are dragged around with their headers during this structure editing. However, unless it is absolutely necessary, you will do well to avoid editing the notes themselves (called "leafs" in KAMAS parlance). Save note editing for WordStar. Do Outline Editing in KAMAS. When you are ready to send the now-structured and arranged notes back to WordStar for polishing and formatting, select the KAMAS Outfile Branch command to do it. Yes, KAMAS has several alternative commands which will export a file to CP/M and WordStar. But each export method has its own output format, differing on such things as the number of blank lines between major headings and subheadings, headers and their notes, etc. Experimentation has shown that for purposes of restoring the file to a nice WordStar-editable configuration, the KAMAS OB command from within the topic outline, with the cursor at the top of the topic, is the best solution. Do it. Back in WordStar When you leave KAMAS and again edit the file with WordStar, you will find some changes have taken place. All carriage return line endings will be "hard" as far as WordStar is concerned. There will be two blank lines between notes and between major headings. There will be one blank line between a note and its own header. The double dots designating headers have disappeared and so have the backslashes which separated keys from subtitles in headers. Perhaps the file is usable in its present configuration. If so, just edit it for format and output and be done with it. If you want to restore the file to its previous (prior to KAMAS) condition, use the public domain utility ENSOFT.COM to make the notes themselves reformable. Then edit the file with WordStar's D mode and find and replace ^N^N with a single ^N. Do this throughout the file and you will end up with all major headers separated by single blank lines, and notes once again attached to their noteheaders. This single Find and Replace wouldn't work to restore the spacing if you selected one of KAMAS's other output modes. You could get there, but it will take more editing. To restore all the headers to their double dot comment line configuration, just do find and replace ^N^N, replace with ^N^N.. That's two line endings, two dots. Voila, your WordStar manuscript file is back in shape, ready for re-transport to KAMAS and another re-organization if you add the appropriate KAMAS dot commands. For printing or electronic presentation, I usually leave my manuscript file alone, open a file with the extension PRN, and read the manuscript into it. Then I gussie up this PRN copy with whatever special formatting, printer control characters, dot commands, hyphenation, etc, seems to be required for this particular occasion of presentation. If I don't want all those little double dot headers (which were convenient aids to organization, but may be clutter to a reader), I strip 'em out by printing the file to a PRN disk file. At some point I may have too many versions of a file. There will be the KAMAS topic, and one or more dolled up PRN versions for outputting to the printer or via modem to a typesetter, or whatever. Plus the minimum format, signposted manuscript file. When the time comes to cull the redundant files I always decide in favor of my personal manuscript working copy. The manuscript is still simple, standard, eminently editable, and easily transported back to KAMAS should the need arise. Or copied for fixing up to print in some special way. It turns out that KAMAS is a great partner for WordStar to visit once in a while to get files reorganized. Maybe marriage is not in the offing, but the relationship is getting serious. END OF WORDSTAR/KAMAS AFFAIR ARTICLE