aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/regress/eqn/fromto
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/fromto
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/fromto')
-rw-r--r--regress/eqn/fromto/Makefile6
-rw-r--r--regress/eqn/fromto/precedence.in15
-rw-r--r--regress/eqn/fromto/precedence.out_ascii9
-rw-r--r--regress/eqn/fromto/precedence.out_html1
4 files changed, 28 insertions, 3 deletions
diff --git a/regress/eqn/fromto/Makefile b/regress/eqn/fromto/Makefile
index a2012e8f..1384c543 100644
--- a/regress/eqn/fromto/Makefile
+++ b/regress/eqn/fromto/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 = basic noarg
-HTML_TARGETS = basic noarg
+REGRESS_TARGETS = basic noarg precedence
+HTML_TARGETS = basic noarg precedence
.include <bsd.regress.mk>
diff --git a/regress/eqn/fromto/precedence.in b/regress/eqn/fromto/precedence.in
new file mode 100644
index 00000000..939ab51a
--- /dev/null
+++ b/regress/eqn/fromto/precedence.in
@@ -0,0 +1,15 @@
+.\" $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
+.ps 36
+initial text
+.EQ
+X from a under to c hat ; roman X from bold a to italic c ;
+X sub 1 sup 2 from a sub c sup e to o sub r sup s
+.EN
+final text
diff --git a/regress/eqn/fromto/precedence.out_ascii b/regress/eqn/fromto/precedence.out_ascii
new file mode 100644
index 00000000..1eba1bef
--- /dev/null
+++ b/regress/eqn/fromto/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__a_^_c^ ; X_aa^_c ; _X_1^2__a__c^_e^_o__r^_s final text
+
+OpenBSD July 6, 2017 OpenBSD
diff --git a/regress/eqn/fromto/precedence.out_html b/regress/eqn/fromto/precedence.out_html
new file mode 100644
index 00000000..bb9074e6
--- /dev/null
+++ b/regress/eqn/fromto/precedence.out_html
@@ -0,0 +1 @@
+<mrow><munderover><mi>X</mi><munder><mi>a</mi><mo>_</mo></munder><mover><mi>c</mi><mo>^</mo></mover></munderover><mo>;</mo><munderover><mrow><mi fontstyle="normal">X</mi></mrow><mrow><mi fontweight="bold">a</mi></mrow><mrow><mi>c</mi></mrow></munderover><mo>;</mo><munderover><msubsup><mi>X</mi><mn>1</mn><mn>2</mn></msubsup><msubsup><mi>a</mi><mi>c</mi><mi>e</mi></msubsup><msubsup><mi>o</mi><mi>r</mi><mi>s</mi></msubsup></munderover></mrow>