Annotation of 42BSD/usr.lib/learn/eqn/L6.1a, revision 1.1.1.1

1.1       root        1: #once #create message
                      2: .ND
                      3: .tr %$
                      4: .EQ
                      5: delim $$
                      6: .EN
                      7: .LP
                      8: So far every equation you have typed in
                      9: has been "displayed" - neatly centered or indented, and
                     10: offset from the surrounding text.
                     11: But not all equations are like that.
                     12: Very often they appear right in the middle of
                     13: running text as subscripts like $x sub i$ or special characters
                     14: like $pi$ or $partial$.  How are these done?
                     15: 
                     16: The idea is this.  Two characters (which may be identical)
                     17: are set aside as "delimiters".  When the
                     18: left delimiter is seen anywhere in ___any line,
                     19: it marks the beginning of an in-line equation.
                     20: The end is marked by the right delimiter.  Between the
                     21: delimiters, all the normal rules of neqn apply.
                     22: 
                     23: Suppose we say the delimiters are % signs.
                     24: Then to get $pi$, you have to type %pi%. 
                     25: 
                     26: To make sure that you can do this much, find the
                     27: $pi$, $alpha$ and $sum$ characters in "Example"
                     28: and make them into in-line equations.
                     29: Use % and % as the delimiter characters.
                     30: (This is the most frequent choice, by the way.)
                     31: Type "ready" when you're done.
                     32: .pl 1
                     33: #once #create Ref
                     34: .EQ
                     35: delim $$
                     36: .EN
                     37: .LP
                     38: This line contains some $pi$ and $alpha$ Greek
                     39: and $sum$ as well.  Don't forget that spaces
                     40: inside dollar signs are ignored, while spaces
                     41: outside them are significant.
                     42: .pl 1
                     43: #once #create Example
                     44: .EQ
                     45: delim $$
                     46: .EN
                     47: .LP
                     48: This line contains some pi and alpha Greek
                     49: and sum as well.  Don't forget that spaces
                     50: inside dollar signs are ignored, while spaces
                     51: outside them are significant.
                     52: .pl 1
                     53: #once neqn Ref | nroff >X1 &
                     54: #once neqn message Ref | nroff -T$term %s/tinyms -
                     55: #user
                     56: neqn Example | nroff >X2
                     57: #cmp X1 X2
                     58: #log
                     59: #next
                     60: 6.1b

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.