.; RUNOFF Chapter 5 .; .; H.R. Tumblin 7-Jan-78 .; .CH;Source File Format .in RNOCHAINI .ix Source File Format .pp The source file contains the textual material which will appear on the final copy, plus information to specify formatting. Most importantly, upper and lower case information also may be supplied so that material can be prepared on the terminal or other such device which can normally input only upper case letters. All command information consists of regular ##>####Greater than##Quote next character .PP To allow the appearance of the special characters (ampersand(%&), dollar sign(%$), number sign(%#), circumflex(%^), backslash(%\), greater than(%>), less than(%<), equals sign(%=), at sign(%@), tilda(%~), percent sign (%%) or exclamation mark (%!) in the output, the greater than character(>) is used as the quote character. That is, the character immediately following a greater than will be transmitted to the output file with no formatting effect. Thus the following cases occur: .ls .le;>%& .le;>%$ .le;>%# .le;>%^ .le;>%\ .le;>> .le;>%< .le;>%= .le;>%@ .le;>%~ .le;>%% .le;>%! .els .ix Quote Next Character .; .hl 2 Upper case shift or mode lock. ##%^####Circumflex####Upper case shift or mode lock. .pp As described in section 5.1, the circumflex character(%^) is used to convert the letter following to upper case. It is also used to lock the case mode in upper case. It is usually used in conjuntion with one of the special characters to lock into the mode designated by the special character. e.g, to lock on underlining or overbaring, lock on super/sub scipt, or to lock on selection of the 2nd character set (usually greek). .ix Upper Case Shift .ix Mode Lock .ix %^ .; .tp 6 .hl 2 Lower case shift or mode unlock. ##%\####Backslash####Lower case shift or mode unlock .pp As described in section 5.1, the backslash character(%\) is used to output the letter following in lower case. It is also used to lock the case mode in lower case. It unlocks the mode locked into as described in the above section. .ix Lower Case Shift .ix Mode Unlock .ix %\ .; .hl 2 Flags Capitalize. ##%<####Less than character####Capitalize entire word. .pp If the command "FLAGS-CAPITALIZE" has been engaged, then all words preceded with a less than character(%<) will be capitalized. If it is to be used in printed text, then it also must be preceded by the quote character. .ix Flags Capitalize .ix %< .; .hl 2 Flags Hyphenate. .ix %= ##%=####Equals sign####Hyphenation disable. .pp If the command "FLAGS-HYPHENATE" has been engaged, the equals character(=) is used to disable hyphenation for the word it precedes. If it is to appear in the printed text, then it must be preceded by the quote character. .ix Flags Hyphenate. .; .hl 2 Superscripting ##%@####at sign########Superscripting character .pp The at sign causes the next character to be placed a fraction of a line above the line being typed for a superscript. This character works only if the DI switch is enabled. Otherwise, the character is ignored. The amount of superscript, or subscript, movement can be adjusted by the .SETSS command and nesting of the at sign (%@). e.g., if super/subscipt movement is set to 1/8 line, then x%@2 will raise the '2' 1/8 line above the 'x'. If we have x%@%@%@2 then the '2' will be 3/8 of a line above the 'x'. This allows for very fine adjustment of super/sub scripts within the text to allow for single spacing and the use of subs and supers. The default movement value is 1/2 line. Movement can be set to 1/8, 1/4, 3/8 or 1/2, see also .SETSS. .ix Superscript .ix %@ .; .hl 2Subscripting ##%~####tilda##########Subscripting character .pp The %~ character causes the next character to be placed a fraction of a line below the line being typed for a subscript. This character works only if the DI switch is enabled. Otherwise, the character is ignored. Refer to the above section on superscripting for a discussion of amount of movement a subscript will have relative to the line. .ix Subscript .ix %~ .; .hl 2Greek Processing ##%%####percent sign###Select 2nd character set .p .ix Greek processing .ix %% .ix Multiple Character sets The %% character indicates to RUNOFF that the next character should be printed from an alternate character set. At arap we generally use this feature for printing greek characters used in equations and technical documents. The %% mode can be locked and unlocked, like underline, overbar etc., by use of the circumflex and backslash. The action taken by RUNOFF when the %% is encountered is determined by the /CS switch on the command line. We use a single wheel DIABLO 1640, so we make two passes at the document. The first pass (/CS:1) will print all english text, select print wheel 1. After rewinding the paper to the beginning of the document we repeat the exact RUNOFF command line but use /CS:2, which will print only the text marked by the %% sign character. Pass 1 leaves the appropriate spaces for pass 2 printing. This method has worked very well for us at arap, and we do quite a lot of complex equations and greek. Obviously, a QUME twin-track printer would be the ideal solution. Modifying RUNOFF to work with QUME escape sequences would probably be straightforward. .hl 2Backspace/Overstrike .ix Backspace character .ix %^H .ix Overstrike ##%^H####control H#######Backspace character .p A backspace facility is essential in scientific text processing. Many times one needs both a super and a subscipt at the same location. .b.NJ .ce;example:####x'%^H%~2##becomes x'~2##or e%^H%^##becomes##e%^. .b.J The backspace works properly when a line is justified. .hl 2In-line comments ##%!####exclamation mark#In-line comments/remarks .p The exclamation mark, unless preceded by 'quote next character', indicates to RUNOFF that the text following should be ignored. Note also that %! works as .ix %! .ix Comments .ix Equation mode an on/off switch. That is, if a second %! appears, the commenting is turned off and the remaining text is processed by RUNOFF. This feature is used in setting up a template file for creating equations using the .EQ command. .hl 1 Special Characters - Notes .ls .le;Nesting of special characters Special characters may be combined in any fashion and may appear next to each other. A typical example is a super/subscipt greek character. The %% should precede the character it is to modify. e.g. x%@%%a would result in x super alpha. Note that the greek input should be the same character you would type .ix Greek processing in an IBM selectric typewriter using the SYMBOL 10 print ball. RUNOFF makes ther proper translation of this input to be compatible with the QUME scientific print wheel. .els .; End of chapter 5