summaryrefslogtreecommitdiffstats
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
commit8825d633ba5c75cbf9811e9fb39af2fe5aa887d7 (patch)
treef9f7e989cd53a9bc5f272dd8f37670d34aacf791
parent1c56bbdf26bc339ff32709360e5b8de0e220592f (diff)
downloadmandoc-8825d633ba5c75cbf9811e9fb39af2fe5aa887d7.tar.gz
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--TODO6
-rw-r--r--eqn.779
-rw-r--r--man.71
-rw-r--r--mandoc.11
-rw-r--r--mdoc.71
-rw-r--r--roff.723
7 files changed, 114 insertions, 14 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 56f0deda..8d801250 100644
--- a/TODO
+++ b/TODO
@@ -7,12 +7,6 @@
* 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..6ed4251b
--- /dev/null
+++ b/eqn.7
@@ -0,0 +1,79 @@
+.\" $Id$
+.\"
+.\" 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$
+.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 c3fa7ddf..be02d406 100644
--- a/man.7
+++ b/man.7
@@ -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 902085f1..05575035 100644
--- a/mandoc.1
+++ b/mandoc.1
@@ -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 c8f576ce..ec3ba477 100644
--- a/mdoc.7
+++ b/mdoc.7
@@ -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 0cea7f84..7e893ba9 100644
--- a/roff.7
+++ b/roff.7
@@ -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 ,