aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-02-09 10:03:02 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-02-09 10:03:02 +0000
commita1a166c370914df2ab2fd8a92ebda31a2248c2a5 (patch)
treebad14aa7fddfdfbd444d97751715720121f8bbc1
parent8f65e2365fc46c19cff46c40dc76dbbd014fdbaa (diff)
downloadmandoc-a1a166c370914df2ab2fd8a92ebda31a2248c2a5.tar.gz
mandoc-a1a166c370914df2ab2fd8a92ebda31a2248c2a5.tar.zst
mandoc-a1a166c370914df2ab2fd8a92ebda31a2248c2a5.zip
Add stub for eqn.7 manual and flip it on. Also note COMPATIBILITY issue
of how we considered .TS (etc.) macros and how the preprocessors do.
-rw-r--r--Makefile17
-rw-r--r--TODO8
-rw-r--r--eqn.779
-rw-r--r--man.75
-rw-r--r--mandoc.15
-rw-r--r--mdoc.75
-rw-r--r--roff.727
7 files changed, 123 insertions, 23 deletions
diff --git a/Makefile b/Makefile
index 9a5cd801..f2c03eb6 100644
--- a/Makefile
+++ b/Makefile
@@ -99,30 +99,30 @@ HEADS = mdoc.h libmdoc.h man.h libman.h term.h \
GSGMLS = mandoc.1.sgml mdoc.3.sgml mdoc.7.sgml \
mandoc_char.7.sgml man.7.sgml man.3.sgml roff.7.sgml \
- roff.3.sgml tbl.7.sgml
+ roff.3.sgml tbl.7.sgml eqn.7.sgml
SGMLS = index.sgml
XHTMLS = mandoc.1.xhtml mdoc.3.xhtml \
man.3.xhtml mdoc.7.xhtml man.7.xhtml mandoc_char.7.xhtml \
- roff.7.xhtml roff.3.xhtml tbl.7.xhtml
+ roff.7.xhtml roff.3.xhtml tbl.7.xhtml eqn.7.xhtml
HTMLS = ChangeLog.html index.html man.h.html mdoc.h.html \
mandoc.h.html roff.h.html mandoc.1.html mdoc.3.html \
man.3.html mdoc.7.html man.7.html mandoc_char.7.html \
- roff.7.html roff.3.html tbl.7.html
+ roff.7.html roff.3.html tbl.7.html eqn.7.html
PSS = mandoc.1.ps mdoc.3.ps man.3.ps mdoc.7.ps man.7.ps \
- mandoc_char.7.ps roff.7.ps roff.3.ps tbl.7.ps
+ mandoc_char.7.ps roff.7.ps roff.3.ps tbl.7.ps eqn.7.ps
PDFS = mandoc.1.pdf mdoc.3.pdf man.3.pdf mdoc.7.pdf man.7.pdf \
- mandoc_char.7.pdf roff.7.pdf roff.3.pdf tbl.7.pdf
+ mandoc_char.7.pdf roff.7.pdf roff.3.pdf tbl.7.pdf eqn.7.pdf
XSLS = ChangeLog.xsl
TEXTS = mandoc.1.txt mdoc.3.txt man.3.txt mdoc.7.txt man.7.txt \
mandoc_char.7.txt ChangeLog.txt \
- roff.7.txt roff.3.txt tbl.7.txt
+ roff.7.txt roff.3.txt tbl.7.txt eqn.7.txt
EXAMPLES = example.style.css
@@ -135,7 +135,7 @@ MD5S = mdocml-$(VERSION).md5
TARGZS = mdocml-$(VERSION).tar.gz
MANS = mandoc.1 mdoc.3 mdoc.7 mandoc_char.7 man.7 \
- man.3 roff.7 roff.3 tbl.7
+ man.3 roff.7 roff.3 tbl.7 eqn.7
BINS = mandoc
@@ -179,7 +179,7 @@ install:
mkdir -p $(DESTDIR)$(MANDIR)/man7
$(INSTALL_PROGRAM) mandoc $(DESTDIR)$(BINDIR)
$(INSTALL_MAN) mandoc.1 $(DESTDIR)$(MANDIR)/man1
- $(INSTALL_MAN) man.7 mdoc.7 roff.7 tbl.7 mandoc_char.7 $(DESTDIR)$(MANDIR)/man7
+ $(INSTALL_MAN) man.7 mdoc.7 roff.7 eqn.7 tbl.7 mandoc_char.7 $(DESTDIR)$(MANDIR)/man7
$(INSTALL_DATA) example.style.css $(DESTDIR)$(EXAMPLEDIR)
uninstall:
@@ -187,6 +187,7 @@ uninstall:
rm -f $(DESTDIR)$(MANDIR)/man1/mandoc.1
rm -f $(DESTDIR)$(MANDIR)/man7/mdoc.7
rm -f $(DESTDIR)$(MANDIR)/man7/roff.7
+ rm -f $(DESTDIR)$(MANDIR)/man7/eqn.7
rm -f $(DESTDIR)$(MANDIR)/man7/tbl.7
rm -f $(DESTDIR)$(MANDIR)/man7/man.7
rm -f $(DESTDIR)$(MANDIR)/man7/mandoc_char.7
diff --git a/TODO b/TODO
index 2e08e6f8..7864d49c 100644
--- a/TODO
+++ b/TODO
@@ -1,18 +1,12 @@
************************************************************************
* Official mandoc TODO.
-* $Id: TODO,v 1.89 2011/02/03 10:24:21 kristaps Exp $
+* $Id: TODO,v 1.90 2011/02/09 10:03:02 kristaps Exp $
************************************************************************
************************************************************************
* parser bugs
************************************************************************
-- It should be noted that in mandoc, the TBL macros are interpreted as
- real roff macros (e.g., `. TS' is ok), while the troff preprocessor
- only looks for `.TS' (static string). This should be noted in the
- COMPATIBILITY section. The same applies for nascent `.EQ' (as it is
- now, `.EN' is processed as a static string).
-
- .TP before .SH is still FATAL in man(7)
reported by brad@ Sat, 15 Jan 2011 15:54:54 -0500
diff --git a/eqn.7 b/eqn.7
new file mode 100644
index 00000000..c18065aa
--- /dev/null
+++ b/eqn.7
@@ -0,0 +1,79 @@
+.\" $Id: eqn.7,v 1.1 2011/02/09 10:03:02 kristaps Exp $
+.\"
+.\" Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv>
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.Dd $Mdocdate: February 9 2011 $
+.Dt EQN 7
+.Os
+.Sh NAME
+.Nm eqn
+.Nd eqn language reference for mandoc
+.Sh DESCRIPTION
+The
+.Nm eqn
+language is a equation-formatting language.
+It is used within
+.Xr mdoc 7
+and
+.Xr man 7
+.Ux
+manual pages.
+This manual describes the subset of the
+.Nm
+language accepted by the
+.Xr mandoc 1
+utility.
+.Pp
+Equations within
+.Xr mdoc 7
+or
+.Xr man 7
+are enclosed by the
+.Sq EQ
+and
+.Sq EN
+macro tags, whose precise syntax is documented in
+.Xr roff 7 .
+Equations consist of multi-line equation data.
+.Sh SEE ALSO
+.Xr mandoc 1 ,
+.Xr man 7 ,
+.Xr mandoc_char 7 ,
+.Xr mdoc 7 ,
+.Xr roff 7
+.Rs
+.%A Brian W. Kernighan
+.%A Lorinda L. Cherry
+.%T System for Typesetting Mathematics
+.%J Communications of the ACM
+.%V 18
+.%P 151\(en157
+.%D March, 1975
+.Re
+.\" .Sh HISTORY
+.\" The tbl utility, a preprocessor for troff, was originally written by M.
+.\" E. Lesk at Bell Labs in 1975.
+.\" The GNU reimplementation of tbl, part of the groff package, was released
+.\" in 1990 by James Clark.
+.\" A standalone tbl implementation was written by Kristaps Dzonsons in
+.\" 2010.
+.\" This formed the basis of the implementation that is part of the
+.\" .Xr mandoc 1
+.\" utility.
+.Sh AUTHORS
+This partial
+.Nm
+reference was written by
+.An Kristaps Dzonsons Aq kristaps@bsd.lv .
diff --git a/man.7 b/man.7
index 2907cfb8..82ff2710 100644
--- a/man.7
+++ b/man.7
@@ -1,4 +1,4 @@
-.\" $Id: man.7,v 1.97 2011/01/25 00:40:14 schwarze Exp $
+.\" $Id: man.7,v 1.98 2011/02/09 10:03:02 kristaps Exp $
.\"
.\" Copyright (c) 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
.\"
@@ -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: January 25 2011 $
+.Dd $Mdocdate: February 9 2011 $
.Dt MAN 7
.Os
.Sh NAME
@@ -919,6 +919,7 @@ In GNU troff, this would result in strange behaviour.
.Sh SEE ALSO
.Xr man 1 ,
.Xr mandoc 1 ,
+.Xr eqn 7 ,
.Xr mandoc_char 7 ,
.Xr mdoc 7 ,
.Xr roff 7 ,
diff --git a/mandoc.1 b/mandoc.1
index 843f3d73..91cb8fe8 100644
--- a/mandoc.1
+++ b/mandoc.1
@@ -1,4 +1,4 @@
-.\" $Id: mandoc.1,v 1.84 2011/01/04 23:32:21 kristaps Exp $
+.\" $Id: mandoc.1,v 1.85 2011/02/09 10:03:02 kristaps Exp $
.\"
.\" Copyright (c) 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
.\"
@@ -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: January 4 2011 $
+.Dd $Mdocdate: February 9 2011 $
.Dt MANDOC 1
.Os
.Sh NAME
@@ -529,6 +529,7 @@ and
lists render similarly.
.El
.Sh SEE ALSO
+.Xr eqn 7 ,
.Xr man 7 ,
.Xr mandoc_char 7 ,
.Xr mdoc 7 ,
diff --git a/mdoc.7 b/mdoc.7
index 0d0beeba..09e4716e 100644
--- a/mdoc.7
+++ b/mdoc.7
@@ -1,4 +1,4 @@
-.\" $Id: mdoc.7,v 1.179 2011/02/07 00:05:40 schwarze Exp $
+.\" $Id: mdoc.7,v 1.180 2011/02/09 10:03:02 kristaps Exp $
.\"
.\" Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
.\" Copyright (c) 2010 Ingo Schwarze <schwarze@openbsd.org>
@@ -15,7 +15,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: February 7 2011 $
+.Dd $Mdocdate: February 9 2011 $
.Dt MDOC 7
.Os
.Sh NAME
@@ -2907,6 +2907,7 @@ This is not supported by mandoc.
.Sh SEE ALSO
.Xr man 1 ,
.Xr mandoc 1 ,
+.Xr eqn 7 ,
.Xr man 7 ,
.Xr mandoc_char 7
.Xr roff 7 ,
diff --git a/roff.7 b/roff.7
index 1f55810d..8f40d96c 100644
--- a/roff.7
+++ b/roff.7
@@ -1,4 +1,4 @@
-.\" $Id: roff.7,v 1.26 2011/01/25 01:12:02 schwarze Exp $
+.\" $Id: roff.7,v 1.27 2011/02/09 10:03:02 kristaps Exp $
.\"
.\" Copyright (c) 2010 Kristaps Dzonsons <kristaps@bsd.lv>
.\" Copyright (c) 2010 Ingo Schwarze <schwarze@openbsd.org>
@@ -15,7 +15,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: January 25 2011 $
+.Dd $Mdocdate: February 9 2011 $
.Dt ROFF 7
.Os
.Sh NAME
@@ -344,6 +344,15 @@ then false is assumed.
The syntax of this request is similar to
.Sx \&if
except that the conditional is missing.
+.Ss \&EN
+End an equation block.
+See
+.Sx \&EQ .
+.Ss \&EQ
+Begin an equation block.
+See
+.Xr eqn 7
+for a description of the equation language.
.Ss \&hy
Set automatic hyphenation mode.
This line-scoped request is currently ignored.
@@ -599,6 +608,19 @@ refers to groff version 1.15.
.Pp
.Bl -dash -compact
.It
+In mandoc, the
+.Sx \&EQ ,
+.Sx \&TE ,
+.Sx \&TS ,
+and
+.Sx \&T& ,
+macros are considered regular macros.
+In all other
+.Nm
+implementations, these are special macros that must be specified without
+spacing between the control character (which must be a period) and the
+macro name.
+.It
The
.Cm nS
register is only compatible with OpenBSD's groff-1.15.
@@ -616,6 +638,7 @@ using the next-line syntax.
.El
.Sh SEE ALSO
.Xr mandoc 1 ,
+.Xr eqn 7 ,
.Xr man 7 ,
.Xr mandoc_char 7 ,
.Xr mdoc 7 ,