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

Diff for /mandoc/roff.7 between version 1.47 and 1.52

version 1.47, 2014/02/14 23:50:57 version 1.52, 2014/04/05 20:34:57
Line 659  This line-scoped request is intended to have one argum
Line 659  This line-scoped request is intended to have one argum
 the font family to be selected.  the font family to be selected.
 It is a groff extension, and currently, it is ignored including its  It is a groff extension, and currently, it is ignored including its
 arguments, and the number of arguments is not checked.  arguments, and the number of arguments is not checked.
   .Ss \&ft
   Change the font.
   Its syntax is as follows:
   .Pp
   .D1 Pf . Cm \&ft Op Ar font
   .Pp
   The following
   .Ar font
   arguments are supported:
   .Bl -tag -width 4n -offset indent
   .It Cm B , BI , 3 , 4
   switches to
   .Sy bold
   font
   .It Cm I , 2
   switches to
   .Em underlined
   font
   .It Cm R , CW , 1
   switches to normal font
   .It Cm P No "or no argument"
   switches back to the previous font
   .El
   .Pp
   This request takes effect only locally, may be overridden by macros
   and escape sequences, and is only supported in
   .Xr man 7
   for now.
 .Ss \&hw  .Ss \&hw
 Specify hyphenation points in words.  Specify hyphenation points in words.
 This line-scoped request is currently ignored.  This line-scoped request is currently ignored.
Line 677  Its syntax is equivalent to
Line 705  Its syntax is equivalent to
 .Sx \&if .  .Sx \&if .
 .Ss \&if  .Ss \&if
 Begins a conditional.  Begins a conditional.
 Right now, the conditional evaluates to true  This request has the following syntax:
 if and only if it starts with the letter  .Bd -literal -offset indent
 .Sy n ,  \&.if COND BODY
 indicating processing in nroff style as opposed to troff style.  .Ed
   .Bd -literal -offset indent
   \&.if COND \e{BODY
   BODY...\e}
   .Ed
   .Bd -literal -offset indent
   \&.if COND \e{\e
   BODY...
   \&.\e}
   .Ed
   .Pp
   COND is a conditional statement.
   Currently,
   .Xr mandoc 1
   supports the following subset of roff conditionals:
   .Bl -bullet
   .It
   If
   .Sq \&!
   is prefixed to COND, the condition is logically inverted.
   .It
   If the first character of COND is
   .Sq n
   .Pq nroff mode
   or
   .Sq o
   .Pq odd page ,
   COND evaluates to true.
   .It
   If the first character of COND is
   .Sq c
   .Pq character available ,
   .Sq d
   .Pq string defined ,
   .Sq e
   .Pq even page ,
   .Sq r
   .Pq register accessed ,
   or
   .Sq t
   .Pq troff mode ,
   COND evaluates to false.
   .It
   If COND starts with a digit, optionally prefixed by a minus sign,
   it is evaluated as a numerical expression of the form
   .Ar number operator number ,
   where
   .Ar operator
   is one of
   .Sq < ,
   .Sq <= ,
   .Sq = ,
   .Sq >= ,
   or
   .Sq > .
   .It
   Otherwise, the first character of COND is regarded as a delimiter
   and COND evaluates to true if the string extending from its first
   to its second occurrence is equal to the string extending from its
   second to its third occurrence.
   .It
   If COND cannot be parsed, it evaluates to false.
   .El
   .Pp
 If a conditional is false, its children are not processed, but are  If a conditional is false, its children are not processed, but are
 syntactically interpreted to preserve the integrity of the input  syntactically interpreted to preserve the integrity of the input
 document.  document.
Line 698  will continue to syntactically interpret to the block 
Line 789  will continue to syntactically interpret to the block 
 conditional.  conditional.
 Sub-conditionals, in this case, obviously inherit the truth value of  Sub-conditionals, in this case, obviously inherit the truth value of
 the parent.  the parent.
 This request has the following syntax:  
 .Bd -literal -offset indent  
 \&.if COND \e{\e  
 BODY...  
 \&.\e}  
 .Ed  
 .Bd -literal -offset indent  
 \&.if COND \e{ BODY  
 BODY... \e}  
 .Ed  
 .Bd -literal -offset indent  
 \&.if COND \e{ BODY  
 BODY...  
 \&.\e}  
 .Ed  
 .Bd -literal -offset indent  
 \&.if COND \e  
 BODY  
 .Ed  
 .Pp  .Pp
 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  
 If the BODY section is begun by an escaped brace  If the BODY section is begun by an escaped brace
 .Sq \e{ ,  .Sq \e{ ,
 scope continues until a closing-brace escape sequence  scope continues until the end of the input line containing the
 .Sq \.\e} .  matching closing-brace escape sequence
   .Sq \e} .
 If the BODY is not enclosed in braces, scope continues until  If the BODY is not enclosed in braces, scope continues until
 the end of the line.  the end of the line.
 If the COND is followed by a BODY on the same line, whether after a  If the COND is followed by a BODY on the same line, whether after a
Line 815  Otherwise, it only terminates the
Line 874  Otherwise, it only terminates the
 and arguments following it or the  and arguments following it or the
 .Sq \&..  .Sq \&..
 request are discarded.  request are discarded.
   .Ss \&ll
   Change the output line length.
   Its syntax is as follows:
   .Pp
   .D1 Pf . Cm \&ll Op Oo +|- Oc Ns Ar width
   .Pp
   If the
   .Ar width
   argument is omitted, the line length is reset to its previous value.
   The default setting for terminal output is 78n.
   If a sign is given, the line length is added to or subtracted from;
   otherwise, it is set to the provided value.
   Using this request in new manuals is discouraged for several reasons,
   among others because it overrides the
   .Xr mandoc 1
   .Fl O Cm width
   command line option.
 .Ss \&ne  .Ss \&ne
 Declare the need for the specified minimum vertical space  Declare the need for the specified minimum vertical space
 before the next trap or the bottom of the page.  before the next trap or the bottom of the page.
Line 822  This line-scoped request is currently ignored.
Line 898  This line-scoped request is currently ignored.
 .Ss \&nh  .Ss \&nh
 Turn off automatic hyphenation mode.  Turn off automatic hyphenation mode.
 This line-scoped request is currently ignored.  This line-scoped request is currently ignored.
 .Ss \&rm  
 Remove a request, macro or string.  
 This request 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  .Ss \&nr
 Define or change a register.  Define or change a register.
 A register is an arbitrary string value that defines some sort of state,  A register is an arbitrary string value that defines some sort of state,
Line 873  Change point size.
Line 943  Change point size.
 This line-scoped request is intended to take one numerical argument.  This line-scoped request is intended to take one numerical argument.
 Currently, it is ignored including its arguments,  Currently, it is ignored including its arguments,
 and the number of arguments is not checked.  and the number of arguments is not checked.
   .Ss \&rm
   Remove a request, macro or string.
   Its syntax is as follows:
   .Pp
   .D1 Pf \. Cm \&rm Ar name
   .Ss \&rr
   Remove a register.
   Its syntax is as follows:
   .Pp
   .D1 Pf \. Cm \&rr Ar name
 .Ss \&so  .Ss \&so
 Include a source file.  Include a source file.
 Its syntax is as follows:  Its syntax is as follows:

Legend:
Removed from v.1.47  
changed lines
  Added in v.1.52

CVSweb