=================================================================== RCS file: /cvs/mandoc/roff.7,v retrieving revision 1.2 retrieving revision 1.8 diff -u -p -r1.2 -r1.8 --- mandoc/roff.7 2010/05/16 22:28:33 1.2 +++ mandoc/roff.7 2010/06/01 11:54:23 1.8 @@ -1,4 +1,4 @@ -.\" $Id: roff.7,v 1.2 2010/05/16 22:28:33 kristaps Exp $ +.\" $Id: roff.7,v 1.8 2010/06/01 11:54:23 kristaps Exp $ .\" .\" Copyright (c) 2010 Kristaps Dzonsons .\" @@ -14,7 +14,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: May 16 2010 $ +.Dd $Mdocdate: June 1 2010 $ .Dt ROFF 7 .Os .Sh NAME @@ -65,10 +65,95 @@ Thus, the following are equivalent: .Sh REFERENCE This section is a canonical reference of all macros, arranged 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 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 +.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 \&.if COND \e{\e BODY... @@ -88,7 +173,8 @@ BODY... BODY .Ed .Pp -COND is a conditional (TODO: document). +COND is a conditional (for the time being, this always evaluates to +false). .Pp If the BODY section is begun by an escaped brace .Sq \e{ , @@ -121,7 +207,9 @@ macro is discarded. Furthermore, if an explicit closing sequence .Sq \e} 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. +scope of the prior macro, not only the text preceding the close, with the +.Sq \e} +collapsing into a zero-width space. .Ss \&ig Ignore input. Accepts the following syntax: @@ -163,6 +251,18 @@ 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 \&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 @@ -180,6 +280,11 @@ Historic groff did not accept white-space buffering th 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 The