help / color / mirror / Atom feed
* eqn(7) "delim" is undocumented (maybe)
@ 2019-12-08  8:42 Anthony J. Bentley
  2020-01-07 18:32 ` Ingo Schwarze
  2020-01-08 12:21 ` Ingo Schwarze
  0 siblings, 2 replies; 4+ messages in thread
From: Anthony J. Bentley @ 2019-12-08  8:42 UTC (permalink / raw)
  To: tech


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):

 delim $$
 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)

.\" "delim off sin(<pi>)"
delim $$
delim off
$sin { pi }$

.\" "$sin { pi }$"
delim $$
delim off
$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 .
+Inline equations are delimited by characters set by a
+.Cm delim
 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
 .Cm tdefine
 is discarded.
+.It Cm delim
+Set the two characters used to delimit inline equations.
+Its syntax is as follows:
+.D1 Cm delim Ar param
+.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.
+.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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-01-10 10:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-08  8:42 eqn(7) "delim" is undocumented (maybe) Anthony J. Bentley
2020-01-07 18:32 ` Ingo Schwarze
2020-01-10 10:53   ` Anthony J. Bentley
2020-01-08 12:21 ` Ingo Schwarze

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).