From: "Anthony J. Bentley" <anthony@anjbe.name>
To: tech@mandoc.bsd.lv
Subject: eqn(7) "delim" is undocumented (maybe)
Date: Sun, 08 Dec 2019 01:42:37 -0700 [thread overview]
Message-ID: <38466-1575794557.527458@DkTY.Emny.Ld6w> (raw)
Hi,
I can't find anyplace that documents eqn(7)'s "delim" statement (even
groff's eqn(1) doesn't really). This is widely used in the X11 manuals
and others for inline math. For example, glTexGenfv(3):
.EQ
delim $$
.EN
...
This function can be used, for example, to texture-map terrain using sea level
as a reference plane
(defined by $p sub 1$, $p sub 2$, $p sub 3$, and $p sub 4$).
I gave a shot at documenting it in the diff below... of course, open to
improvements in both correctness and clarity.
As an aside, I expected these two examples to render the same, but they
don't. Should they look the same, or am I misunderstanding how eqn(7)
works?
.\" "delim off sin(<pi>)"
.EQ
delim $$
delim off
.EN
$sin { pi }$
.\" "$sin { pi }$"
.EQ
delim $$
.EN
.EQ
delim off
.EN
$sin { pi }$
Index: eqn.7
===================================================================
RCS file: /cvs/src/share/man/man7/eqn.7,v
retrieving revision 1.11
diff -u -p -r1.11 eqn.7
--- eqn.7 23 Apr 2019 17:52:12 -0000 1.11
+++ eqn.7 8 Dec 2019 08:41:25 -0000
@@ -67,6 +67,10 @@ these are not the same as
macros, and may only be invoked as
.Sq \&.EQ .
.Pp
+Inline equations are delimited by characters set by a
+.Cm delim
+statement.
+.Pp
The equation grammar is as follows, where quoted strings are
case-sensitive literals in the input:
.Bd -literal -offset indent
@@ -178,6 +182,23 @@ statement is a synonym for
while
.Cm tdefine
is discarded.
+.It Cm delim
+Set the two characters used to delimit inline equations.
+Its syntax is as follows:
+.Pp
+.D1 Cm delim Ar param
+.Pp
+.Ar param
+is a two-character string,
+the first and second character of which delimit the start and end of inline
+equations throughout the document.
+Alternately,
+.Ar param
+may be the special string
+.Cm off ,
+which disables any previously declared delimiters, or
+.Cm on ,
+which reenables previously defined delimiters that have been turned off.
.It Cm gfont
Set the default font of subsequent output.
Its syntax is as follows:
--
To unsubscribe send an email to tech+unsubscribe@mandoc.bsd.lv
next reply other threads:[~2019-12-08 8:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-08 8:42 Anthony J. Bentley [this message]
2020-01-07 18:32 ` Ingo Schwarze
2020-01-10 10:53 ` Anthony J. Bentley
2020-01-08 12:21 ` Ingo Schwarze
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=38466-1575794557.527458@DkTY.Emny.Ld6w \
--to=anthony@anjbe.name \
--cc=tech@mandoc.bsd.lv \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).