.lm
.ifnot hlp
.hl 1 Conditional text
Sometimes you may wish to have 2 different copies of the same
document.  There are many ways to achieve this goal. Only 3 methods
will be considered.
.list
.le .REQUIRE may be used to achieve this goal.  You can break up the
document into small sections, and then set up 2 master files which you might
call DOCMNT1.RNO or DOCMNT2.RNO.  Each master file would then require
only those sections appropriate to generating each different document.
.le SUBSTITUTIONS can be used to change a document.  For example you
may wish to generate different documents each personalized.  You could
define different substitutions which would generate different output.
.le Finally you could use the _.IF, _.IF NOT, _.ELSE, _.ENDIF, _.VARIANT, and
_.NO VARIANT statements to conditionlize sections of a document.  These are
shown below. 
.end list 2
.note
The _.IF, _.IF NOT, _.ELSE, and _.ENDIF commands must be the first command
on a line.
.end note
.endif hlp
.lm+5
.if hlp.i-6;3 IF
.endif hlp
.tp5.i-5; _.IF aaa
.s.x IF
This statement causes the text following it to be ignored or processed
depending on whether the label aaa is defined by a _.VARIANT command. The text
is processed if the label has been defined, and ignored if it has not. The
label aaa may be up to 10 numbers or letters in upper or lower case. The case
is ignored and ABC or abc are equivalent labels. No special symbols or blanks
are allowed in labels. If the label has not been defined text processing
resumes when _.ENDIF#aaa is encountered. 
.if hlp
.if rsx.DHY.i5;ADDITIONAL HELP AVAILABLE: NOT ELSE END VARIANT Aexample
Bexample Cexample nesting
.ehy
.endif rsx
.i-6;4 NOT
.endif hlp
.s.tp5.i-5; _.IF NOT aaa
.s.x IF NOT
This statement causes the text following it to be ignored if aaa is undefined.
In other words if a _.VARIANT statement preceeds the _.IF NOT with the label
aaa then the text is skipped. 
.if hlp.i-6;4 ELSE
.endif hlp
.bb
.s.tp5.i-5; _.ELSE aaa
.s.x ELSE
This command changes true conditionals to false and false to true.
If it follows a _.IF it is the same as issuing _.IFNOT with the same label.
If it follows a _.IFNOT it is equivalent to _.IF with the same label.
Only a single _.ELSE may follow _.IF or _.IFNOT.
This command must be the first command on a line.
.eb
.if hlp.i-6;4 END
.endif hlp
.s.tp5.i-5; _.ENDIF aaa
.s.x ENDIF
This command terminates the range of the _.IF or _.IF NOT statements.
The label aaa must be the same as the previous _.IF which is terminated.
This command must be the first command on a line.
This command must not be used inside a defined command, as RNO will not
recognize it.  If text is omitted all _.REQUIRE commands are not processed so
an _.ENDIF inside one of the required files will not be seen.
.note
If a literal command is used inside an IF and the text is not processed,
an _.ENDIF will still be recognized after the _.LITERAL.  This is because
the literal command is not recognized so that text following it will be
recognized as normal text.
.end note
.if hlp.i-6;4 VARIANT
.endif hlp
.s.tp5.i-5; _.VARIANT aaa
.s.x VARIANT
This statement defines a label aaa which is used to control the action of
subsequent _.IF commands.  If the label is
defined in the VARIANT statement then _.IF aaa will cause text to be printed
and _.IF NOT aaa will suppress text. 
.s.tp5.i-5; _.NO VARIANT aaa
.s.x NO>VARIANT
This statement undefines a label aaa which is used to control the action of
subsequent _.IF commands.
.if hlp.i-6;4 Aexample
.endif hlp
.s.c;Example:
.s.nf.LM+10
_.VARIANT NOTES1
_.IF NOTES1
This line is printed
_.ELSE NOTES1
This line is not printed
_.ENDIF NOTES1
_.IF NOT NOTES1
This line is not printed
_.ENDIF NOTES1
_.IF undefined
This line is not printed
_.ENDIF undefined
_.IFNOT undefined
This line is printed
_.ELSE  undefined
This line is not printed
_.ENDIF undefined
.f.lm-10
.if hlp.i-6;4 Bexample
.endif hlp
.s.c;Example:
.s
Another example of how to use _.IF statements is the following problem:
You have a prefix file that you require at the top of each _.RNO file.
The prefix file defines a bunch of substitutions and escapes.  You make up
MAIN.RNO which now requires all the other _.RNO files.  Unfortunately
each time the prefix file is required you get a string of error messages:
.i5;RNO -- Substitution already defined
.br;The way out of this problem is to only execute the prefix file once.
This may be guaranteed by putting the following at the top of the file:
.i5;_.IFNOT prefix
.br;and the following at the end of the prefix file:
.i5;_.VARIANT prefix
.i5;_.ENDIF prefix
.if hlp.i-6;4 Cexample
.endif hlp
.s.c;Example:
.p;Here is an example of the _.NO VARIANT command.
.s.nf.LM+10
_.VARIANT abc
_.IF abc
This line will appear
_.ENDIF abc
_.NO VARIANT abc
_.IF abc
This line will not appear
_.ELSE abc
This line will appear
_.ENDIF abc
.f.lm -10
.if hlp.i-6;4 nesting
.endif hlp
.s.c;Nesting:
.s
The IF statements may be nested one inside each other.  Of course once an
_.IF#aaa or _.IFNOT#aaa has started skipping text, no further text will be
processed until _.ENDIF#aaa.  Only 32 levels of nesting are allowed. Here is a
nesting example. 
.nf.lm+5
_.VARIANT B
_.IF B
This line is processed
_.IF C
This line is not
_.ELSE C
This line is processed
_.ENDIF C
_.ELSE B
This line is not
_.IFNOT C
This line is not
_.ENDIF C
_.ENDIF B
.i-5;Here is an example of improper nesting:
_.IF B
_.IF C
_.ENDIF B
_.ENDIF C
.f.lm
