summaryrefslogtreecommitdiff
path: root/usr.bin/learn/lib/eqn/L3.1e
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/learn/lib/eqn/L3.1e')
-rw-r--r--usr.bin/learn/lib/eqn/L3.1e41
1 files changed, 41 insertions, 0 deletions
diff --git a/usr.bin/learn/lib/eqn/L3.1e b/usr.bin/learn/lib/eqn/L3.1e
new file mode 100644
index 00000000000..49fdba797c9
--- /dev/null
+++ b/usr.bin/learn/lib/eqn/L3.1e
@@ -0,0 +1,41 @@
+#once #create message
+.ND
+.PP
+One common typing error that you should watch out for
+is forgetting to end a superscript or subscript
+with a blank or other delimiter (like tilde).
+For instance, you often see output like
+.EQ
+f(x sup 2)=1
+.EN
+because there wasn't a space left between the 2 and the ).
+What we really wanted, of course, was
+.EQ
+f(x sup 2 )=1
+.EN
+
+Modify "Example" to produce this output, then type "ready".
+.pl 1
+#once #create Ref
+.LP
+.EQ
+g( x sup pi )
+= pi (gx sup 2 )
+.EN
+.pl 1
+#once #create Example
+.LP
+.EQ
+g( x sup pi)
+=pi(gxsup2)
+.EN
+.pl 1
+#
+#once neqn Ref | nroff >X1 &
+#once neqn message Ref | nroff -T$term %s/tinyms -
+#user
+neqn Example | nroff >X2
+#cmp X1 X2
+#log
+#next
+4.1a 10