diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2020-01-10 11:54:06 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2020-01-10 11:54:06 +0000 |
commit | 2a1762cbf9a2a6edc0c7c00d8c56a38520b8ce3f (patch) | |
tree | 10376e19fb5a2041bc8612848fadaa2514058c8e /share/man/man7 | |
parent | 6c0fb7224acfdbdbd5c415c3ec0fb17df8e915f2 (diff) |
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@
Diffstat (limited to 'share/man/man7')
-rw-r--r-- | share/man/man7/eqn.7 | 55 |
1 files changed, 31 insertions, 24 deletions
diff --git a/share/man/man7/eqn.7 b/share/man/man7/eqn.7 index 4c8759d7557..5d4c3a04073 100644 --- a/share/man/man7/eqn.7 +++ b/share/man/man7/eqn.7 @@ -1,4 +1,4 @@ -.\" $OpenBSD: eqn.7,v 1.11 2019/04/23 17:52:12 schwarze Exp $ +.\" $OpenBSD: eqn.7,v 1.12 2020/01/10 11:54:05 schwarze Exp $ .\" .\" Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv> .\" Copyright (c) 2014 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: April 23 2019 $ +.Dd $Mdocdate: January 10 2020 $ .Dt EQN 7 .Os .Sh NAME @@ -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: |