.left margin .ifnot hlp .hl 1 DEFINE, DELETE, and RESET .p;The DEFINE, DELETE, and RESET commands are not available in DSR. These commands may be used to define features such as bolding which is available in DSR. .else hlp .i-1;3 DEFINE .p;These commands are not available in DSR. .endif hlp A _.DEFINE command must be the last command on a line. It may not be followed by any other command or comment. .if hlp .if rsx.i5;ADDITIONAL HELP AVAILABLE: .nj.ts+10,+10,+10,+10,+10 COMMAND ESCAPE SUBSCRIPT SUPERSCRIPT SUBSTITUTE VARIABLE__SPACE .j .endif rsx .i-1;4 COMMAND .endif hlp .lm +5 .q _.DEFINE COMMAND /label/command string .p.x DEFINE>COMMAND defines commands. The label consists of up to 20 letters. Imbedded spaces inside the label are treated as optional syntax elements. The actual command may have single, multiple or no spaces. The command string must be a legal set of commands to be substituted for the label. If a command is defined the same as a normal command, the normal command will be used and the defined one ignored. _.ENDIF will be ignored if used in a defined command. .p Essentially the command string is substituted for the defined command. This is a special use of the substitute facility. If you use the _.RESET SUBSTITUTE command the defined commands are also removed. The defined commands may be nested to 3 levels the same as substitutions. To prevent conflict with future commands all user commands may begin with the letter Q. This command is invaluable for defining commands which exist in other versions of RUNOFF, but are not available here. .if hlp .if rsx.i5;FURTHER HELP: EXAMPLE .endif rsx .i-6;5 EXAMPLE .rm -2 .endif hlp .c;EXAMPLE _.HEADER#A may be defined to skip a line, indent both margins by 5 spaces, and output a centered line of text. .s.i5;_.DEFINE COMMAND /HEADER#A/s.lm+5.rm-5.c; .br;Acceptable variants of the command are _.HEADERA, _.HEADER#A, and _.HEADER##A .p;Notice that the first command after the label (s) is not preceeded by a decimal point as it is already implied. .rm .if hlp.i-6;4 ESCAPE .endif hlp .q_.DEFINE ESCAPE "escape label" [,modifiers] definition .ifnot hlp .p.x DEFINE>ESCAPE defines non printing escape sequences for control of a variety of printers. Each escape sequence is indicated in the text by either _\ or _^ or a symbol of your choice followed by another symbol. For example _^* can enable bolding by issuing a sequence to turn on bolding and _\* may disable bolding by issuing a turn off sequence. The escape sequence is entered as follows. First you select which 2 character label. The first character must be either _^,_\, or your flag character, while the second one may be any other character. They are entered as a literal. For example the label _^_* may be entered as "_^_*" or '_^_*' or "_^","_*". Your flag character is defined by the _.FLAGS ESCAPE command. .bb .p If you change the uppercase flag from _^ or the lowercase flag from _/ then the new uppercase and lowercase flags may be the first character of an escape sequence. You must pick your upper/lowercase flags via a _.FLAGS command before defining the escape sequences. .eb .p Next the modifiers are entered. These define how the escape sequence is handled. The modifiers are: .endif hlp .if hlp .c; Modifiers .endif hlp .lm+5 .i-5; LCK - escape sequence is a lock/unlock pair. .ifnot hlp For example if _^_* and _\_* are defined as a lock/unlock pair, then the first appearance of _^_* will "lock" this feature on and a subsequent appearance of _^_* will be ignored if _\_* is not used in between them. Effectively the lock is _^_* and unlock is _\_*. In addition this allows RNO to control these sequences to prevent them from acting on the headers. They will only change the text, much in the same way the underline flag works. Only 16 escape sequences may be declared LCK. If a line contains only the "lock" sequence then the unlock sequence will be automatically output at the end off the line. The next line will then automatically be preceeded by the lock sequence. This continues till the input text contains the "unlock" sequence flag. If you define a sequence which changes the character style it should always be defined as a lock/unlock pair. An example of changed character style is hardware underlining, shadow printing, bolding, font changes, or ribbon color changes. .endif hlp .i-5; VSP,spacing - escape sequence changes vertical position by spacing. .ifnot hlp This allows you to define a sequence which changes the vertical position. The spacing parameter is specified in half lines with 1 being 1/2 line advance, -1 1/2 line backwards. .endif hlp .i-5; HSP,spacing - sequence modifies the horizontal position by spacing. .ifnot hlp You may define a sequence which modifies the horizontal position. Sequences which modify the position are considered printable characters ,while sequences without HSP are considered attribute changes. If a space follows an escape sequence it will be deleted from the output (while in fill mode) if HSP is not defined. .endif hlp .i-5; PSP - The horizontal spacing specified by HSP is applied to all printable characters following the escape sequence. .ifnot hlp This attribute modifies the HSP attribute. You can define a sequence which changes the character width, and let RNO know what the new width is. The width may only be 0,1,2,... or multiples of the normal width. If the HSP is specified as a number other than 1, certains aspects of fill are disabled. Spaces will not be expanded if necessary to justify. Only "normal" spaces with HSP=1 are expanded. This allows imbedding extra wide text inside normal text, or centering extra wide text. A whole line of extra wide text can not be justified, but a mixed line of normal and wide can be justified. This restriction may be removed in future releases of RNO. .p If an escape sequence changes the permanent spacing to a value other than 1 then it should also have the attribute LCK. Failure to do this will mess up a varitey of things including underlining and margins. .endif hlp .i-5; CHR - The lock/unlock pair is used to change only 1 printable character. .ifnot hlp This attribute is used only if the lock/unlock pair is designed to function similarly to the underline flag. You must also declare the escape character in a _.FLAGS SPECIAL command. .endif hlp .lm-5 .ifnot hlp .p Then following this the escape sequence is entered. Printable characters may be entered as literals ('This is a literl'), while non printable must be entered as a decimal value. The literals may be enclosed in either single (') or double (") quotes. If a literal is started by a single quote it must be terminated by a single quote, but it may contain a double quote. Similarly a literal enclosed in double quotes may contain a single quote. The numbers and literals may be separated by blanks,tabs, and or commas. Two commas in a row constitute a null and are illegal. If you define an escape sequence twice in your text only the first definition will be obeyed unless you reset escape before the second one. The second definition will cause an error message. .p If you use a large number of different escape sequences frequently, you should define the most commonly used ones first. This will increase the speed with which RUNOFF can find them. .p; Escape sequences can be very trickey. To use them intelligently the following rules will be helpful. .list 0 .le Always use LCK and define a lock/unlock pair for a sequence that changes the text attributes. Such sequences are ones which .list 0 .le Change font .le Change all character spacing .le Underline characters .le Change ribbon color .le Bold or shadow print characters .els .le Always define HSP for sequences which output printable characters .le Always define HSP and PSP for sequences which change the horizontal character spacing. .le Always define VSP for sequences which change the vertical postion. .ifnot RT .le Use /UL:L instead of /UL:B for the underlining option especially if sub or superscripted expressions are to be underlined. /UL:L is also necessary if alternate fonts substitute other characters for the underscore. .endif RT .if RT .le Use /U:L instead of /U:B for the underlining option especially if sub or superscripted expressions are to be underlined. /U:L is also necessary if alternate fonts substitute other characters for the underscore. .endif RT .le If a font switch results in a pitch change which is not an even multiple of the normal font, you must handle this change manually. If such a change is defines as a lock/unlock pair, RNO will be able to print headers in the old pitch while using the new one for text. New margins should be set for the new pitch, while the old permanent margins are maintained to control the headers. .ifnot rt Underlining will not work properly in the new pitch unless /UL:B is used. .endif rt .if rt Underlining will not work properly in the new pitch unless /U:B is used. .endif rt .le If a single font is used throughout then no attributes need be defined for the font change. .bb .le Never use letters after _^ or ^/ when defining escape sequence labels. Combinations like _^A will defeat the uppercase flag for the letter "A", and _/A defeats the lowercase flag for "A". You may not intend using either the uppercase flag or lowercase flag, but you will probably need it. .eb .els 0 .note Failure to use these suggestions can cause unpredictable results. .end note .c;EXAMPLES .list 1 .le The following example shows the definition of an escape sequence to turn on bolding, and turn off bolding: .s.tt6.c;DIABLO compatible printer. .s.i5;_.DEFINE ESCAPE '_^*',CHR,LCK,27,'W' .I5; _.DEFINE ESCAPE '_\*',CHR,LCK,27,'_&' .i5; _.FLAGS SPECIAL * .s.tt 6.c;Bolding for an LA-50: .s.i5;_.DEFINE ESCAPE '_^*',CHR,LCK,27,'[1m' .I +5; _.DEFINE ESCAPE '_\*',CHR,LCK,27,'[22m' .i5; _.FLAGS SPECIAL * .p The net effect of these definitions is to have _^_* turn on bolding, _\_* turn off bolding and _* will bold a single character following it. Bolding will never occurr for titles, page numbers and subtitles. .le The following shows how to define escape sequences to produce special symbols on a DIABLO compatible printer. The extra font is enabled by SO(14) and disabled by SI(15). .s.i5; _.FLAGS ESCAPE ` .i5; _.DEFINE ESCAPE "`A",HSP,1,14,"A",15 .i5; _.DEFINE ESCAPE "`a",HSP,1,14,"q",15 .i5; _.DEFINE ESCAPE "`_^",HSP,1,14,1,15 .br;The 3 symbols are invoked by `A, `B, and `_^. .p;The following defines a "pi" for an LA-50 or VT-100: .i5;_.DEFINE ESCAPE '`p',HSP,1,27,"(0{",27,"(B" .le;The following example shows double width characters for an LA-50. It is assumed that the normal pitch is 10 characters/inch. .i5;_.DEFINE ESCAPE "_^=",HSP,2,PSP,LCK,27,"[5w" .i5;_.DEFINE ESCAPE "_\=",HSP,1,PSP,LCK,27,"[1w" .br;_^_= turns on elongated characters. (5 pitch) .br;_/_= turns off elongated chars. (10 pitch) .els 0 .endif hlp .if hlp.i-6;4 SUBSTITUTE .endif hlp .q_.DEFINE SUBSTITUTE /label/ text .p.x DEFINE>SUBSTITUTE defines a substitution to be made in the text. The label is preceeded and followed by a delimiter of your choice. The label must be no more than 20 characters long and may not contain spaces or tabs. The command and the first delimiter must be separated by one or more spaces or tabs, but no spaces are necessary after the second delimiter unless you wish to include them in the text. When the substitute flag is encountered in your text followed by a defined label, the specified text will be substituted for the flag+label. The text may contain another substitution. Up to 3 levels of substitution may be nested. The rules for multiple definitions of escape sequences also apply to substitutions. .IF HLP .if RSX.i5;ADDITIONAL HELP AVAILABLE: .ts+10,+10,+10,+10,+10 .nf;example DELIMETERS LABELS DSR__CONVENTIONS WARNING .f .endif RSX .rm-2.i-6;5 EXAMPLE .endif hlp .s.tt5; EXAMPLE: You wish to abbreviate the phrase: .i 5; The party of the first part .s;So you define and enable substitution: .i5; _.DEFINE SUBSTITUTE /P1_$/The party of the first part .i5; _.FLAGS SUBSTITUTE .s;Then every time you type into the text _$P1_$ you get instead the substitute phrase: .i5;The party of the first part .if hlp.i-6;5 DELIMITERS .endif hlp .br;The example of define substitute could have used different delimiters if you needed to used the delimiters in the text. For example it could be done as follows: .i5; _.DEFINE SUBSTITUTE :P1_$:The party of the first part .I15; _... or .i5; _.DEFINE SUBSTITUTE "P1_$"The party of the first part .p .if hlp.i-6;5 LABELS .br .endif hlp The substitution label or name may consist of any printable character. Upper case or lowercase letters may be used, however the case of the letter will be ignored except for the first character. In other words the following commands are equivalent. .i5; _.DEFINE SUBSTITUTE /ABC/ .i5; _.DEFINE SUBSTITUTE /Abc/ .i5; _.DEFINE SUBSTITUTE /AbC/ .br;But the following are not equivalent. .i5; _.DEFINE SUBSTITUTE /aBC/ .i5; _.DEFINE SUBSTITUTE /ABC/ .if hlp.i-6;5 DSR__CONVENTIONS .endif hlp .p A special convention is used to define DSR compatible substitutions. If the first character of the substitution name is a dollar sign, the dollar sign stands for the substitute flag. If the substitute flag is changed to a character other than the dollar sign then the defined substitution is considered to begin with the new substitute flag. When the substitution is searched for, the case of the input characters is ignored. An example of such a substitution is the _$_$DATE permanently defined substitution. .s.lm+10.no fill.i-5; For example the following input: _.FLAGS SUBSTITUTE @ _.DEFINE SUBSTITUTE /_$TEST/This is a test @@test !! .i-5; Will produce the following line: This is a test !! .lm-10.fill .ifnot hlp .p The substitution is a really invaluable aid for defining complicated mathematical symbols. All you need to enter in the text is the simple abbreviation and the complicated symbol will be substituted. The substitution may contain all kinds of escape sequences overstrike symbols and so on to construct the special symbol needed. .endif hlp .if HLP .i-6;5 Warning .endif HLP .note WARNING You should always define substitutions with labels that do not contain other substitute labels. For example the labels ABC and A while unique will cause you no ends of problems. The first label ABC contains the second label. As a result the construction _$ABC could be ambiguous. Did you intend the substitution _$A followed by the letters BC or the substitutions _$ABC? The easy way around this problem is to always terminate each substitution with a terminal character. It is suggested that the substitute flag character be used. You would then define A_$ and ABC_$ as the labels. The typist would then type _$ABC_$ for one substitution and _$A_$BC for the other followed by BC. .en .if hlp.i-6;4 SUBSCRIPT .rm .endif hlp .q_.DEFINE SUBSCRIPT [parameters] .p.x DEFINE>SUBSCRIPT This command allows the user to define subscript escape sequences. This is an escape sequence that moves the text down 1/2 space on the page. It must be a maximum of 10 numbers or characters. The command is followed by either numbers or literals. The default is: .i5;_.DEFINE SUBSCRIPT 27,"U" .br;This must be properly defined for equations of half spacing to work. For an LA-50 it would be: .i5;_.DEFINE SUBSCRIPT 27,"K" .if hlp.i-6;4 SUPERSCRIPT .endif hlp .q_.DEFINE SUPERSCRIPT [parameters] .p.x DEFINE>SUPERSCRIPT This command allows the user to define superscript escape sequences. This is an escape sequence that moves the text down 1/2 space on the page. It must be a maximum of 10 numbers or characters. The parameters are either numbers or literals. The default is: .i5;_.DEFINE SUPERSCRIPT 27,"D" .br;This must be properly defined for equations of half spacing to work. For an LA-50 it would be: .i5;_.DEFINE SUPERSCRIPT 27,"L" .if hlp.i-6;4 VARIABLE__SPACE .endif hlp .q_.DEFINE VARIABLE SPACE n,[parameters] .p.x DEFINE>VARIABLE SPACE This command defines a micro space for implementing variable spacing between words. The n is the number of microspaces/space. The parameters define an escape sequence which produces a microspace. The escape sequence may have up to 19 numbers or characters. The default is: .i5;_.DEFINE VARIABLE SPACE 6,27,31,3," ",27,31,13 .br;This defines 6 microspaces/space for a DIABLO style printer at 10 pitch. To do the same for an LA-50 in 10 pitch with 180 dots/inch graphics: .i5;_.DEFINE VARIABLE SPACE 6,27,"Pq",62,62,62,27,"\" .if hlp .i-6;3 DELETE .p;These commands are not available in DSR. .if rsx.i5;ADDITIONAL HELP AVAILABLE: .nj.ts+10,+10,+10,+10,+10 COMMAND SUBSTITUTE .j .endif rsx .i-6;4 COMMAND .endif hlp .q_.DELETE COMMAND /label/ .p.x DELETE>COMMAND This command deletes an already defined command. Only commands defined by _.DEFINE COMMAND may be removed. Both this command and _.DELETE SUBSTITUTE do not reclaim the space in the substitution tables, so that extensive useage may cause the tables to overflow. .if hlp.i-6;4 SUBSTITUTE .endif hlp .q_.DELETE SUBSTITUTE /label/ .p.x DELETE>SUBSTITUTE This command deletes an already defined substitution. Only commands defined by _.DEFINE SUBSTITUTE may be removed. .if hlp .i-6;3 RESET .p;These commands are not available in DSR. .if rsx.i5;ADDITIONAL HELP AVAILABLE: .nj.ts+10,+10,+10,+10,+10 ESCAPE SUBSTITUTE .j .endif rsx .i-6;4 ESCAPE .endif hlp .q_.RESET ESCAPE .p.x RESET>ESCAPE resets all escape sequences. This clears the table of escape sequences so you may enter a new one by using _.DEFINE ESCAPE. After giving this command all escape sequences are no longer defined. .if hlp.i-6;4 SUBSTITUTE .endif hlp .q_.RESET SUBSTITUTE .p.x RESET>SUBSTITUTE resets the table of substitutions so that all the previous ones are no longer defined. The permanently defined substitutions (_$_$DATE...) and defined commands are also no longer defined. To remove a single entry use _.DELETE SUBSTITUTE or _.DELETE COMMAND. .lm