aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/regress/eqn/subsup
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2017-07-06 00:19:54 +0000
committerIngo Schwarze <schwarze@openbsd.org>2017-07-06 00:19:54 +0000
commit85dde46a7c3beea67394f0a89322372457dcbbf4 (patch)
treeb005a91c14c7f0f5b74bbd5744dc6c218bdce789 /regress/eqn/subsup
parentacb30a24128863f2d57ac9aa20a93c8dd243b80b (diff)
downloadmandoc-85dde46a7c3beea67394f0a89322372457dcbbf4.tar.gz
mandoc-85dde46a7c3beea67394f0a89322372457dcbbf4.tar.zst
mandoc-85dde46a7c3beea67394f0a89322372457dcbbf4.zip
Fix operator precedence according to Brian W. Kernighan and Lorinda
L. Cherry, "Typesetting Mathematics - User's Guide (Second Edition)", August 15, 1978, paragraph 23; swarm of bugs pointed out by bentley@.
Diffstat (limited to 'regress/eqn/subsup')
-rw-r--r--regress/eqn/subsup/Makefile6
-rw-r--r--regress/eqn/subsup/precedence.in14
-rw-r--r--regress/eqn/subsup/precedence.out_ascii9
-rw-r--r--regress/eqn/subsup/precedence.out_html1
4 files changed, 27 insertions, 3 deletions
diff --git a/regress/eqn/subsup/Makefile b/regress/eqn/subsup/Makefile
index 4e11b33d..a7801046 100644
--- a/regress/eqn/subsup/Makefile
+++ b/regress/eqn/subsup/Makefile
@@ -1,6 +1,6 @@
-# $OpenBSD: Makefile,v 1.2 2015/01/01 15:34:43 schwarze Exp $
+# $OpenBSD: Makefile,v 1.3 2017/07/06 00:08:52 schwarze Exp $
-REGRESS_TARGETS = combine noarg sub_group
-HTML_TARGETS = combine noarg sub_group
+REGRESS_TARGETS = combine noarg precedence sub_group
+HTML_TARGETS = combine noarg precedence sub_group
.include <bsd.regress.mk>
diff --git a/regress/eqn/subsup/precedence.in b/regress/eqn/subsup/precedence.in
new file mode 100644
index 00000000..d184fc07
--- /dev/null
+++ b/regress/eqn/subsup/precedence.in
@@ -0,0 +1,14 @@
+.\" $OpenBSD: precedence.in,v 1.1 2017/07/06 00:08:52 schwarze Exp $
+.Dd $Mdocdate: July 6 2017 $
+.Dt SUBSUP-PRECEDENCE 1
+.Os
+.Sh NAME
+.Nm subsup-precedence
+.Nd precedence of subscripts and superscripts
+.Sh DESCRIPTION
+initial text
+.EQ
+x hat sub 1 under sup 2 bar + e tilde sup x hat sub s dyad ;
+roman I sub bold I sup italic I + roman I sup bold I sub italic I
+.EN
+final text
diff --git a/regress/eqn/subsup/precedence.out_ascii b/regress/eqn/subsup/precedence.out_ascii
new file mode 100644
index 00000000..60619b54
--- /dev/null
+++ b/regress/eqn/subsup/precedence.out_ascii
@@ -0,0 +1,9 @@
+SUBSUP-PRECEDENCE(1) General Commands Manual SUBSUP-PRECEDENCE(1)
+
+NNAAMMEE
+ ssuubbssuupp--pprreecceeddeennccee - precedence of subscripts and superscripts
+
+DDEESSCCRRIIPPTTIIOONN
+ initial text _x^_1_^2 + _e~^_x^__s<-> ; I_II^_I + I^II__I final text
+
+OpenBSD July 6, 2017 OpenBSD
diff --git a/regress/eqn/subsup/precedence.out_html b/regress/eqn/subsup/precedence.out_html
new file mode 100644
index 00000000..1cad9ce2
--- /dev/null
+++ b/regress/eqn/subsup/precedence.out_html
@@ -0,0 +1 @@
+<mrow><msubsup><mover><mi>x</mi><mo>^</mo></mover><munder><mn>1</mn><mo>_</mo></munder><mover><mn>2</mn><mo></mo></mover></msubsup><mo>+</mo><msup><mover><mi>e</mi><mo>~</mo></mover><msub><mover><mi>x</mi><mo>^</mo></mover><mover><mi>s</mi><mo>&#8596;</mo></mover></msub></msup><mo>;</mo><msubsup><mrow><mi fontstyle="normal">I</mi></mrow><mrow><mi fontweight="bold">I</mi></mrow><mrow><mi>I</mi></mrow></msubsup><mo>+</mo><msup><mrow><mi fontstyle="normal">I</mi></mrow><msub><mrow><mi fontweight="bold">I</mi></mrow><mrow><mi>I</mi></mrow></msub></msup></mrow>