summaryrefslogtreecommitdiffstats
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
commit8bfd46f38d1b15589e5ffa8b44915557a3030385 (patch)
tree02789eb4144757c270da344ddd007d37cb15d92a /regress/eqn/subsup
parente0015d9facf740a96124938363ba25c3b6c09af8 (diff)
downloadmandoc-8bfd46f38d1b15589e5ffa8b44915557a3030385.tar.gz
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..3972de65
--- /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$
+.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>