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

Annotation of mandoc/eqn.7, Revision 1.4

1.4     ! kristaps    1: .\"    $Id: eqn.7,v 1.3 2011/07/17 14:08:49 kristaps Exp $
1.1       kristaps    2: .\"
                      3: .\" Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv>
                      4: .\"
                      5: .\" Permission to use, copy, modify, and distribute this software for any
                      6: .\" purpose with or without fee is hereby granted, provided that the above
                      7: .\" copyright notice and this permission notice appear in all copies.
                      8: .\"
                      9: .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
                     10: .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
                     11: .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
                     12: .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
                     13: .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
                     14: .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
                     15: .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
                     16: .\"
1.4     ! kristaps   17: .Dd $Mdocdate: July 17 2011 $
1.1       kristaps   18: .Dt EQN 7
                     19: .Os
                     20: .Sh NAME
                     21: .Nm eqn
                     22: .Nd eqn language reference for mandoc
                     23: .Sh DESCRIPTION
                     24: The
                     25: .Nm eqn
                     26: language is a equation-formatting language.
                     27: It is used within
                     28: .Xr mdoc 7
                     29: and
                     30: .Xr man 7
                     31: .Ux
                     32: manual pages.
                     33: This manual describes the subset of the
                     34: .Nm
                     35: language accepted by the
                     36: .Xr mandoc 1
                     37: utility.
                     38: .Pp
                     39: Equations within
                     40: .Xr mdoc 7
                     41: or
                     42: .Xr man 7
1.3       kristaps   43: documents are enclosed by the standalone
                     44: .Sq \&.EQ
1.1       kristaps   45: and
1.3       kristaps   46: .Sq \&.EN
                     47: tags.
                     48: Equations are multi-line blocks consisting of formulas and control
                     49: statements.
                     50: .Sh EQUATION STRUCTURE
                     51: Each equation is bracketed by
                     52: .Sq \&.EQ
                     53: and
                     54: .Sq \&.EN
                     55: strings.
                     56: .Em Note :
                     57: these are not the same as
                     58: .Xr roff 7
                     59: macros, and may only be invoked as
                     60: .Sq \&.EQ .
                     61: .Pp
                     62: The equation grammar is as follows:
                     63: .Bd -literal -offset indent
                     64: eqn     : box | eqn box
                     65: box     : text
                     66:         | DEFINE text text
                     67:         | SET text text
                     68:         | UNDEF text
                     69: text    : TEXT
                     70: .Ed
                     71: .Pp
                     72: Data in TEXT form is a non-empty sequence of non-space characters or a
                     73: non-empty quoted string.
                     74: White-space (and enclosing literal quote pairs) is thrown away and
                     75: productions may not be broken by newlines.
                     76: .Pp
                     77: The following control statements are available:
                     78: .Bl -tag -width Ds
                     79: .It Cm define
                     80: Replace all occurances of a key with a value.
                     81: Its syntax is as follows:
                     82: .Pp
                     83: .D1 define Ar key val
1.2       kristaps   84: .Pp
1.3       kristaps   85: It is an error to have an empty
                     86: .Ar key or
                     87: .Ar value .
                     88: Note that a quoted
                     89: .Ar key
                     90: causes errors in some
1.2       kristaps   91: .Nm
1.3       kristaps   92: implementations and should not be considered portable.
1.4     ! kristaps   93: Definitions may refer to other definitions; these are evaluated
        !            94: recursively when text replacement occurs and not when the definition is
        !            95: created.
        !            96: Self-referencing definitions will raise an error.
1.3       kristaps   97: .It Cm set
1.4     ! kristaps   98: Set an equation mode.
1.3       kristaps   99: Both arguments are thrown away.
                    100: .It Cm undef
                    101: Unset a previously-defined key.
                    102: Its syntax is as follows:
                    103: .Pp
                    104: .D1 define Ar key
1.2       kristaps  105: .Pp
1.3       kristaps  106: Once invoked, the definition for
                    107: .Ar key
                    108: is discarded.
                    109: .El
1.1       kristaps  110: .Sh SEE ALSO
                    111: .Xr mandoc 1 ,
                    112: .Xr man 7 ,
                    113: .Xr mandoc_char 7 ,
                    114: .Xr mdoc 7 ,
                    115: .Xr roff 7
                    116: .Rs
                    117: .%A Brian W. Kernighan
                    118: .%A Lorinda L. Cherry
                    119: .%T System for Typesetting Mathematics
                    120: .%J Communications of the ACM
                    121: .%V 18
                    122: .%P 151\(en157
                    123: .%D March, 1975
                    124: .Re
                    125: .\" .Sh HISTORY
                    126: .\" The tbl utility, a preprocessor for troff, was originally written by M.
                    127: .\" E. Lesk at Bell Labs in 1975.
                    128: .\" The GNU reimplementation of tbl, part of the groff package, was released
                    129: .\" in 1990 by James Clark.
                    130: .\" A standalone tbl implementation was written by Kristaps Dzonsons in
                    131: .\" 2010.
                    132: .\" This formed the basis of the implementation that is part of the
                    133: .\" .Xr mandoc 1
                    134: .\" utility.
                    135: .Sh AUTHORS
                    136: This partial
                    137: .Nm
                    138: reference was written by
                    139: .An Kristaps Dzonsons Aq kristaps@bsd.lv .

CVSweb