summaryrefslogtreecommitdiff
path: root/usr.bin/learn/lib/eqn/L6.1a
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/learn/lib/eqn/L6.1a')
-rw-r--r--usr.bin/learn/lib/eqn/L6.1a60
1 files changed, 60 insertions, 0 deletions
diff --git a/usr.bin/learn/lib/eqn/L6.1a b/usr.bin/learn/lib/eqn/L6.1a
new file mode 100644
index 00000000000..fc51f1fa4b6
--- /dev/null
+++ b/usr.bin/learn/lib/eqn/L6.1a
@@ -0,0 +1,60 @@
+#once #create message
+.ND
+.tr %$
+.EQ
+delim $$
+.EN
+.LP
+So far every equation you have typed in
+has been "displayed" - neatly centered or indented, and
+offset from the surrounding text.
+But not all equations are like that.
+Very often they appear right in the middle of
+running text as subscripts like $x sub i$ or special characters
+like $pi$ or $partial$. How are these done?
+
+The idea is this. Two characters (which may be identical)
+are set aside as "delimiters". When the
+left delimiter is seen anywhere in ___any line,
+it marks the beginning of an in-line equation.
+The end is marked by the right delimiter. Between the
+delimiters, all the normal rules of neqn apply.
+
+Suppose we say the delimiters are % signs.
+Then to get $pi$, you have to type %pi%.
+
+To make sure that you can do this much, find the
+$pi$, $alpha$ and $sum$ characters in "Example"
+and make them into in-line equations.
+Use % and % as the delimiter characters.
+(This is the most frequent choice, by the way.)
+Type "ready" when you're done.
+.pl 1
+#once #create Ref
+.EQ
+delim $$
+.EN
+.LP
+This line contains some $pi$ and $alpha$ Greek
+and $sum$ as well. Don't forget that spaces
+inside dollar signs are ignored, while spaces
+outside them are significant.
+.pl 1
+#once #create Example
+.EQ
+delim $$
+.EN
+.LP
+This line contains some pi and alpha Greek
+and sum as well. Don't forget that spaces
+inside dollar signs are ignored, while spaces
+outside them are significant.
+.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
+6.1b