latex2man: Conditional Text

 
 Conditional Text
 ----------------
 
 latex2man preprocesses the LaTeX input to allow text to be used
 conditionally. A special sort of LaTeX comment is used for that purpose.
    * %@% IF _condition_ %@%
 
    * %@% ELSE %@%
 
    * %@% END-IF %@%
 
    A line must contain only such a comment and nothing else. _condition_
 is a boolean expression containing "names" and operators. The names
 given with the -CNAME option have the value "true", while all other
 names occuring in the expression are assumed to be "false". If the
 evaluation of the boolean expression results in the value "true", the
 text in the "then"-part is used and the text in the optional
 "else"-part is skipped (and vice versa). The IF/ELSE/END-IF may be
 nested. As boolean operators the following are allowed:
 
 ||                               boolean or
 &&                               boolean and
 !                                negation
 
    ( and ) for grouping are allowed.
 
 For example:
 %@% IF abc %@%
 abc set
 %@%  IF xyz %@%
 xyz set
 %@%  ELSE %@%
 xyz NOT set
 %@%  END-IF %@%
 %@% ELSE %@%
 abc NOT set
 %@%  IF xyz || !XYZ %@%
 xyz OR !XYZ set
 %@%  ELSE %@%
 xyz OR !XYZ NOT set
 %@%  END-IF %@%
 %@% END-IF %@%
 
 Run this manual page through latex2man with e.g.  -C'ABC XYZ' and have
 a look to the generated output.  (If simply running the LaTeX-document
 through LaTeX,all lines are shown in the .dvi file).
 abc NOT set
 xyz OR !XYZ set
 To check the conditional text feature, when latex2man is called with
 `-CHTML'
      the lines 1a, 2b, 3b, and 4b;
 
 `-CTEXI'
      the lines 1b, 2a, 3b, and 4b;
 
 `-CMAN'
      the lines 1b, 2b, 3a, and 4b;
 
 `-CLATEX'
      the lines 1b, 2b, 3b, and 4a;
 
 `calling LaTeX without preprocessing'
      all lines
    should be shown:
 
    1b. The HTML conditional was not set.
 
    2a. This text occurs only when viewing the TEXI output
 
    3b. The MAN conditional was not set.
 
    4b. The LATEX conditional was not set.