[BACK]Return to roff.7 CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / mandoc

Diff for /mandoc/roff.7 between version 1.1 and 1.10

version 1.1, 2010/05/16 19:08:11 version 1.10, 2010/06/26 15:22:19
Line 65  Thus, the following are equivalent:
Line 65  Thus, the following are equivalent:
 .Sh REFERENCE  .Sh REFERENCE
 This section is a canonical reference of all macros, arranged  This section is a canonical reference of all macros, arranged
 alphabetically.  alphabetically.
   .Ss \&am
   The syntax of this macro is the same as that of
   .Sx \&ig ,
   except that a leading argument must be specified.
   It is ignored, as are its children.
   .Ss \&ami
   The syntax of this macro is the same as that of
   .Sx \&ig ,
   except that a leading argument must be specified.
   It is ignored, as are its children.
   .Ss \&am1
   The syntax of this macro is the same as that of
   .Sx \&ig ,
   except that a leading argument must be specified.
   It is ignored, as are its children.
   .Ss \&de
   The syntax of this macro is the same as that of
   .Sx \&ig ,
   except that a leading argument must be specified.
   It is ignored, as are its children.
   .Ss \&dei
   The syntax of this macro is the same as that of
   .Sx \&ig ,
   except that a leading argument must be specified.
   It is ignored, as are its children.
   .Ss \&ds
   Define a string.
   This macro is intended to have two arguments,
   the name of the string to define and its content.
   Currently, it is ignored including its arguments,
   and the number of arguments is not checked.
   .Ss \&de1
   The syntax of this macro is the same as that of
   .Sx \&ig ,
   except that a leading argument must be specified.
   It is ignored, as are its children.
   .Ss \&el
   The
   .Qq else
   half of an if/else conditional.
   Pops a result off the stack of conditional evaluations pushed by
   .Sx \&ie
   and uses it as its conditional.
   If no stack entries are present (e.g., due to no prior
   .Sx \&ie
   calls)
   then false is assumed.
   The syntax of this macro is similar to
   .Sx \&if
   except that the conditional is missing.
   .Ss \&ie
   The
   .Qq if
   half of an if/else conditional.
   The result of the conditional is pushed into a stack used by subsequent
   invocations of
   .Sx \&el ,
   which may be separated by any intervening input (or not exist at all).
   Its syntax is equivalent to
   .Sx \&if .
 .Ss \&if  .Ss \&if
 Begins a conditional.  Begins a conditional.
 Has the following syntax:  Right now, the conditional evaluates to true
   if and only if it starts with the letter
   .Sy n ,
   indicating processing in
   .Xr nroff 1
   style as opposed to
   .Xr troff 1
   style.
   If a conditional is false, its children are not processed, but are
   syntactically interpreted to preserve the integrity of the input
   document.
   Thus,
 .Pp  .Pp
   .D1 \&.if t \e .ig
   .Pp
   will discard the
   .Sq \&.ig ,
   which may lead to interesting results, but
   .Pp
   .D1 \&.if t \e .if t \e{\e
   .Pp
   will continue to syntactically interpret to the block close of the final
   conditional.
   Sub-conditionals, in this case, obviously inherit the truth value of
   the parent.
   This macro has the following syntax:
   .Pp
 .Bd -literal -offset indent -compact  .Bd -literal -offset indent -compact
 \&.if COND \e{\e  \&.if COND \e{\e
 BODY...  BODY...
Line 76  BODY...
Line 161  BODY...
 .Ed  .Ed
 .Bd -literal -offset indent -compact  .Bd -literal -offset indent -compact
 \&.if COND \e{ BODY  \&.if COND \e{ BODY
   BODY... \e}
   .Ed
   .Bd -literal -offset indent -compact
   \&.if COND \e{ BODY
 BODY...  BODY...
 \&.\e}  \&.\e}
 .Ed  .Ed
Line 84  BODY...
Line 173  BODY...
 BODY  BODY
 .Ed  .Ed
 .Pp  .Pp
 COND is a conditional (TODO: document).  COND is a conditional statement.
   roff allows for complicated conditionals; mandoc is much simpler.
   At this time, mandoc supports only
   .Sq n ,
   evaluating to true;
   and
   .Sq t ,
   .Sq e ,
   and
   .Sq o ,
   evaluating to false.
   All other invocations are read up to the next end of line or space and
   evaluate as false.
 .Pp  .Pp
 If the BODY section is begun by an escaped brace  If the BODY section is begun by an escaped brace
 .Sq \e{ ,  .Sq \e{ ,
Line 112  The scope of a conditional is always parsed, but only 
Line 213  The scope of a conditional is always parsed, but only 
 conditional evaluates to true.  conditional evaluates to true.
 .Pp  .Pp
 Note that text subsequent a  Note that text subsequent a
   .Sq \&.\e}
   macro is discarded.
   Furthermore, if an explicit closing sequence
 .Sq \e}  .Sq \e}
 is discarded.  is specified in a free-form line, the entire line is accepted within the
   scope of the prior macro, not only the text preceding the close, with the
   .Sq \e}
   collapsing into a zero-width space.
 .Ss \&ig  .Ss \&ig
 Ignore input until a  Ignore input.
 .Sq \.\.  Accepts the following syntax:
   .Pp
   .Bd -literal -offset indent -compact
   \&.ig
   BODY...
   \&..
   .Ed
   .Bd -literal -offset indent -compact
   \&.ig END
   BODY...
   \&.END
   .Ed
   .Pp
   In the first case, input is ignored until a
   .Sq \&..
 macro is encountered on its own line.  macro is encountered on its own line.
 Note that text subsequent the  In the second case, input is ignored until a
 .Sq \.\.  .Sq \&.END
   is encountered.
   Text subsequent the
   .Sq \&.END
   or
   .Sq \&..
 is discarded.  is discarded.
   .Pp
   Do not use the escape
   .Sq \e
   anywhere in the definition of END.
   It causes very strange behaviour.
   Furthermore, if you redefine a
   .Nm
   macro, such as
   .Pp
   .D1 \&.ig if
   .Pp
   the subsequent invocation of
   .Sx \&if
   will first signify the end of comment, then be invoked as a macro.
   This behaviour really shouldn't be counted upon.
   .Ss \&rm
   Remove a request, macro or string.
   This macro is intended to have one argument,
   the name of the request, macro or string to be undefined.
   Currently, it is ignored including its arguments,
   and the number of arguments is not checked.
   .Ss \&nr
   Define a register.
   A register is an arbitrary string value that defines some sort of state,
   which influences parsing and/or formatting.
   Its syntax is as follows:
   .Pp
   .D1 Pf \. Sx \&nr Cm name value
   .Pp
   The
   .Cm value
   may, at the moment, only be an integer.
   The
   .Cm name
   is defined up to the next whitespace.
   The following register
   .Cm name
   requests are recognised:
   .Bl -tag -width Ds
   .It Cm nS
   If set to a positive integer value, certain
   .Xr mdoc 7
   macros will behave as if they are defined in the
   .Em SYNOPSIS
   section to a manual.
   Otherwise, this behaviour is unset (even if called within the
   .Em SYNOPSIS
   section itself).
   .El
   .Ss \&tr
   Output character translation.
   This macro is intended to have one argument,
   consisting of an even number of characters.
   Currently, it is ignored including its arguments,
   and the number of arguments is not checked.
   .Sh COMPATIBILITY
   This section documents compatibility between mandoc and other other
   troff implementations, at this time limited to GNU troff
   .Pq Qq groff .
   The term
   .Qq historic groff
   refers to groff versions before the
   .Pa doc.tmac
   file re-write
   .Pq somewhere between 1.15 and 1.19 .
   .Pp
   .Bl -dash -compact
   .It
   The
   .Cm nS
   request to
   .Sx \&nr
   is only compatible with OpenBSD's groff.
   .It
   Historic groff did not accept white-space buffering the custom END tag
   for the
   .Sx \&ig
   macro.
   .It
   The
   .Sx \&if
   and family would print funny white-spaces with historic groff when
   depending on next-line syntax.
   .El
 .Sh AUTHORS  .Sh AUTHORS
 The  The
 .Nm  .Nm

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.10

CVSweb