From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f45.google.com (mail-pj1-f45.google.com [209.85.216.45]) by mandoc.bsd.lv (OpenSMTPD) with ESMTP id 85cfa366 for ; Sun, 8 Dec 2019 03:42:41 -0500 (EST) Received: by mail-pj1-f45.google.com with SMTP id w5so4533405pjh.11 for ; Sun, 08 Dec 2019 00:42:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anjbe-name.20150623.gappssmtp.com; s=20150623; h=from:to:subject:mime-version:content-id:date:message-id; bh=nLNzRRC9aSUzNHnS0jTpfEyOM9B4J5DFz2OG6I8FLnw=; b=LqdMW4GNb9xWNHM7xpg86Y4cbh7EijOHLgdK5O3tAsIKDJwlNr3keObLZE4+fIvsO3 sNAXSLaakTNjn4LC7rNj0utmcCpo02Wb0f006WHRN83iX0q3VT/05ayvqC/MrDarbfvr XQk62dmZAg+vslDoDR1V0kwp43ywTMQ71Yxc+8PTtsZkf9dAM/ZHAEJO2+8QJLR5GP9x mntXBuNAlCPURuRiUfJvVZm+/Su5kRR1Uv2ebOenaFwX6SKeLcbENPOdO4jzC61AsaDv lTHYdokmRGspuIWrlCbbQ5Qp93y9ONtGxhFDHIskXBGjMzW4J8m44SfSOylcp6QrmD7J +oVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:mime-version:content-id:date :message-id; bh=nLNzRRC9aSUzNHnS0jTpfEyOM9B4J5DFz2OG6I8FLnw=; b=Cysbi1twSrheGSjPht75tt7f3CxPPPQo5kag6ikg8iXZs6a+VoSHnVv37mI3cflzcK puFybfQtrgycA0TR63+/s738ZgQpbU4jtTxCi3tGhQJSMxNdHiEUhzygWEamevLgrupR BwhRacHjo4ZrZQwULVlkxXhA7PtQXAA2eXP3ECOuGWpJKFCDhKelwLw2PBa96l6cq52l w5+sealtvGH/n9Hnwgk329Nu6S3RFfL5BXgXH0ZPPbEdExgRYJ3YgaA/vRSFrpK40x+3 KSlxjlh1H1LuKemGEHORQ5yswJdjA2IGDJZhh1uifJ/6QqS02ElecQEN9iSquVcZsW38 yoDA== X-Gm-Message-State: APjAAAUzEQNF37x0HOP3ZyyQd+pGmGT05z81IQSAPwWICSwolz7XQNiQ wU5QDqRRD0KCy9AQxnRRsF3V2QDIOYE= X-Google-Smtp-Source: APXvYqxxjclcaXV4Kjg7uZDyTLp/3QITAyH5hQt9Q4QIpjCjRhGwSf3PgRq+VpGDdWAzNllIt/G47Q== X-Received: by 2002:a17:902:a614:: with SMTP id u20mr23879246plq.107.1575794559409; Sun, 08 Dec 2019 00:42:39 -0800 (PST) Received: from desktop.ajb.soy (174-28-243-81.albq.qwest.net. [174.28.243.81]) by smtp.gmail.com with ESMTPSA id x12sm21955564pfm.130.2019.12.08.00.42.38 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 08 Dec 2019 00:42:39 -0800 (PST) Received: from desktop.ajb.soy (localhost [127.0.0.1]) by desktop.ajb.soy (OpenSMTPD) with ESMTP id 849a65a6 for ; Sun, 8 Dec 2019 01:42:37 -0700 (MST) From: "Anthony J. Bentley" To: tech@mandoc.bsd.lv Subject: eqn(7) "delim" is undocumented (maybe) X-Mailinglist: mandoc-tech Reply-To: tech@mandoc.bsd.lv MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <47225.1575794557.1@desktop.ajb.soy> Date: Sun, 08 Dec 2019 01:42:37 -0700 Message-ID: <38466-1575794557.527458@DkTY.Emny.Ld6w> 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()" .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