From: schwarze@mandoc.bsd.lv
To: source@mandoc.bsd.lv
Subject: mandoc: Document the "delim" syntax and its usage.
Date: Fri, 10 Jan 2020 06:55:34 -0500 (EST) [thread overview]
Message-ID: <ba40ad1af2b97659@mandoc.bsd.lv> (raw)
Log Message:
-----------
Document the "delim" syntax and its usage.
Closing a gap reported by bentley@, who also sent a patch,
but i'm explaining it somewhat differently.
While here, remove duplicate information from the text.
OK bentley@
Modified Files:
--------------
mandoc:
eqn.7
Revision Data
-------------
Index: eqn.7
===================================================================
RCS file: /home/cvs/mandoc/mandoc/eqn.7,v
retrieving revision 1.38
retrieving revision 1.39
diff -Leqn.7 -Leqn.7 -u -p -r1.38 -r1.39
--- eqn.7
+++ eqn.7
@@ -44,28 +44,16 @@ specification (see
.Sx SEE ALSO
for references).
.Pp
-Equations within
-.Xr mdoc 7
-or
-.Xr man 7
-documents are enclosed by the standalone
-.Sq \&.EQ
-and
-.Sq \&.EN
-tags.
-Equations are multi-line blocks consisting of formulas and control
-statements.
-.Sh EQUATION STRUCTURE
-Each equation is bracketed by
-.Sq \&.EQ
-and
-.Sq \&.EN
-strings.
-.Em Note :
-these are not the same as
-.Xr roff 7
-macros, and may only be invoked as
-.Sq \&.EQ .
+An equation starts with an input line containing exactly the characters
+.Sq \&.EQ ,
+may contain multiple input lines, and ends with an input line
+containing exactly the characters
+.Sq \&.EN .
+Equivalently, an equation can be given in the middle of a single
+text input line by surrounding it with the equation delimiters
+defined with the
+.Cm delim
+statement.
.Pp
The equation grammar is as follows, where quoted strings are
case-sensitive literals in the input:
@@ -178,6 +166,25 @@ statement is a synonym for
while
.Cm tdefine
is discarded.
+.It Cm delim
+This statement takes a string argument consisting of two bytes,
+to be used as the opening and closing delimiters for equations
+in the middle of text input lines.
+Conventionally, the dollar sign is used for both delimiters,
+as follows:
+.Bd -literal -offset indent
+\&.EQ
+delim $$
+\&.EN
+An equation like $sin pi = 0$ can now be entered
+in the middle of a text input line.
+.Ed
+.Pp
+The special statement
+.Cm delim off
+temporarily disables previously declared delimiters and
+.Cm delim on
+reenables them.
.It Cm gfont
Set the default font of subsequent output.
Its syntax is as follows:
--
To unsubscribe send an email to source+unsubscribe@mandoc.bsd.lv
reply other threads:[~2020-01-10 11:55 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=ba40ad1af2b97659@mandoc.bsd.lv \
--to=schwarze@mandoc.bsd.lv \
--cc=source@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).