Copyright 1991 Sudden Incorporated, Rod Coleman Formatting Text Formatting text in Sudden View occurs naturally. Recognizing that each individual text objects defines a separate field, Sudden View's text format is a simply a reflection of the text itself. This concept is explored in detail under Implicit Formatting. I then explain how to define, adopt and adjust a format. This is followed by a presentation of the Word Wrap features which is the more explicit part of formatting text. Implicit Formatting Sudden View has no margin bars; its formatting is implicit. Implicit Formatting means that the format of any text is simply a reflection of the text itself. This isn't a sly way of saying that Sudden View doesn't use formatting; it does. It's just that the format conforms to the text, instead of the text conforming to the format. Let's work with it a little bit, it'll make more sense. Text in Sudden View automatically forms itself into fields. You don't have to explicitly create them. Just place the cursor (using the mouse or cursor keys) in any blank area and type some text; a field will be created. If you move the cursor more than two spaces to the right and type some more, another field will be created. It may seem that you were only entering text, but Sudden View was also collecting information as to the text field's position, size and other characteristics. Some of this information is described later under Field Profile. If you would like to see the fields, just do a right mouse drag from the top left to the bottom right of the screen. Any text fields touched by the selection rectangle will be highlighted in gold. For more on selecting text fields, see Arranging Text; but before you do anything else, hit Esc. We don't want to re-arrange these fields just now. Another way of finding these fields, is by using the Tab and Shift/Tab functions. They will move you either right or left to the beginning and ending of each field for each line. The type, position and size of these fields defines the format of the line. If you do a Carriage Return or a normal line insert, the format of the existing line will be copied to the new line. You can also "adopt" a format from any other line in the file. Since the text is its own format, you can have as many different formats as you have lines of text. And you don't have to manage margin bars; just find a format you like, and adopt it to wherever you want. This may seem a little strange, but in general, you can ignore formatting and just type. Sudden View will keep using whatever format you started with. If you need to do something more involved, read on. First I'll cover a special aspect of formatting called word wrap followed by how to adopt and alter formats. Word Wrap Text can take on several different forms. It can be simple lines of text, such as a list of items, or maybe a table of text using multiple columns. One of the most common forms of text is as sentences, which form paragraphs with indentation. To work well, this type of text needs to be supported by something called Word Wrap. This just means that when text is entered past some defined right margin, any over-hanging word will be wrapped down to the next line so the user can continue entering text without bothering with the Return key. Sudden View supports this special format in several ways. First, any non-wrapped text can have its format set to wrapped by placing the cursor on the first line of the paragraph and then selecting Word Wrap. If the cursor was not over text, the menu will not activate. From that point, just Set Word Wrap; it's that easy. You also could chose to go to the last or next paragraph using the indicated Power Menu functions. Sudden View will try to find indentation or an actual paragraph to carry out your wishes. Next Paragraph is handy for locating the text you want to wrap. Notice that when word wrap is set, the same Power Menu key can be used to clear word wrap. This is so you can toggle the function on and off if needed. This toggling can also be done using the right mouse button if the mouse cursor is in the paragraph. Adjusting Word Wrap Once Word Wrap is set, you can adjust it's right margin. If you are not in the Word Wrap menu, just place the text cursor in the paragraph to be adjusted and select Word Wrap. Now you can select an adjust function in the Power Menu or do a right mouse drag. Again, the mouse cursor must be in the paragraph or you will find yourself escaped back to the Root menu. Notice also, as you make adjustments, the text cursor moves to the right margin and its position is indicated in the Status Line. If you want to adjust the left margin, this actually becomes a Field Block Move - see Text Arrangement. Normally, you would position the left margin by moving the whole paragraph, and then you would adjust the right margin as needed. Re-wrapping Once you have provided an example by adjusting the right margin, you can move to the Next Paragraph, Set Word Wrap and then do a Re-Wrap Paragraph. As normal with Implicit Formatting, Sudden View will follow your example and re-wrap the next paragraph according to your desired margins. This set of functions is handy for converting a series of paragraphs to the same margin. As a matter of fact, it's so handy, I have provided a way of doing it wholesale. If you have the personalized version of Sudden View, you can use a right mouse vertical drag to re-format many pages in one arm motion, or select the Re-wrap All function to do the whole document. Since this feature is so powerful, I have restricted it to only reformatting paragraphs of the same format as the first paragraph selected to be reformatted. Note that this may be a different paragraph from the one that was first adjusted. This restriction is necessary to keep from altering the wrong text. Just one last note on mouse usage; as with other functions, a right click in blank area will return you to the Root menu. Now, back to formatting in general. Adopting a Format Since defining a format is as easy as putting the text wherever you want it; how about if you like an already defined format and want to adopt it to a new place in the file? Sudden View has a special function just for that purpose. Alternate/Insert will insert a line just like Shift/Insert, except that instead of using the format of the current line, it uses the format of the last line edited or selected. This effectively "adopts" a chosen format. For example, if you do a double right click on a line with a format that you like, you can then do an Alternate/Insert anywhere in the file and the newly inserted line will have your selected format. From here, you can use a Carriage Return or normal line insert to copy this preferred format to subsequent lines. Adjusting a Format Since the text is the format, the easiest way to alter a format is simply to re-arrange the text (see Arranging Text); but there are also some subtle short-cuts. Obviously, the Insert Space and Delete Character will affect the format if they are done in the left margin of any field. This is actually simple text arrangement. The same is true for the Delete Field function. As a matter of fact, if you Shift/Tab to the beginning of the line, and then do multiple Delete Field functions, you will quickly erase the entire format of the line. This is handy if you want to start with a fresh format. Now that I've shown you that Sudden View actually does have formatting, let's see what we can do with it. You already know that you can change it by simply moving text around, but formatting really comes in handy when you are entering more text. For instance if you want to enter a table of text, just place the cursor where you want the first column and enter some text. Now cursor over to where you want the second column and enter some more text. If you want, create another field or two on the same line. Not only do you have a line with some text on it, you also have a format. Here's another way to see it. If the cursor is anywhere on the line, hit the Tab key a few times. When you get to the right, do some Shift/Tabs. Tab or Shift/Tab will stop at the beginning and ending of each field. OK, Tab all the way to the right again. We're going to apply this format. If you now do a Carriage Return, the existing format will be copied to the new line created below, and the cursor will be placed at the first column of the table. You can continue to use this format to enter text into the table until you are done. There is one last, but important, way to adjust formats. If you have just done a Return, and are at the beginning of a non-wrapped field, you can adjust the beginning of that field either left or right by using Backspace or Space. This is sometimes faster than entering the text, selecting the field and then moving it. A similar feature also works for wrapped text if it is the second line of the paragraph. This is for adjusting the left body margin after the first line has been indented or outdented. Since Backspacing in wrapped text moves the cursor to the end of the line above, I have reserved the Shift/Backspace key to perform this adjustment. Space will adjust to the right in the same manner as non-wrapped text above. See Backspace under Editing Text for more details. Field Profile This section is not needed in order to understand Implied Formatting, but if you're are interested in how it works, read on! As you are aware, text in Sudden View is defined as a collection of fields. The three items on the right hand side of the Status Line describe the field currently under the text cursor. I call it the Field Profile. The first number is the right margin or distance from the last field or beginning of the line. You can see this by doing a Start New Block and then Select Field. Now use the cursor keys to move the field around. If you move the field left or right, the margin changes. Hit Esc to return to the Root menu. The second number is the size of the field. If you delete some characters, you'll see it change; at least if the field you delete from is not word-wrapped. Wrapped fields adjust their size in a different way. See Re-wrapping above. The last item in the Field Profile is the Field Flags. They get a little more complicated, and you can generally just ignore them anyway. If you are still interested, here is what they mean: Bit 0 = Last field in line Bit 1 = First line of paragraph Bit 2 = Word wrapped field Bit 3 = Zero margin (for obscure exception) Bit 4 = Primary field (for complex delete rights) The flags are presented in the form of a hexadecimal number with the indicated bit assignments. For instance, a 07 is the last field and first line of a word wrapped paragraph. If the flags are equal to "EF" it means that the text cursor is past the end of the last field in the line. As I said, you really don't need to understand the Field Profile in order to use Implicit Formatting. I put it in the Status Line for debugging, and I just never took it out. It's fun to watch sometimes. Insert Form Feed The Insert Form Feed function is activated from the Filer menu and will insert a special character that will force most printers to move to the top of the page. Since Sudden View only supports ASCII files, it's the least I can do for page formatting.