Annotation of 43BSDReno/share/doc/usd/27.eqnguide/g4, revision 1.1.1.1

1.1       root        1: .\"    @(#)g4  6.1 (Berkeley) 5/22/86
                      2: .\"
                      3: .SC "A Large Example"
                      4: .PP
                      5: Here is the complete source for the three display equations
                      6: in the abstract of this guide.
                      7: .sp
                      8: .nf
                      9: .ps -2
                     10: .vs -2
                     11:  .EQ I
                     12:  G(z)~mark =~ e sup { ln ~ G(z) }
                     13:  ~=~ exp left ( 
                     14:  sum from k>=1 {S sub k z sup k} over k right )
                     15:  ~=~  prod from k>=1 e sup {S sub k z sup k /k}
                     16:  .EN
                     17:  .EQ I
                     18:  lineup = left ( 1 + S sub 1 z + 
                     19:  { S sub 1 sup 2 z sup 2 } over 2! + ... right )
                     20:  left ( 1+ { S sub 2 z sup 2 } over 2
                     21:  + { S sub 2 sup 2 z sup 4 } over { 2 sup 2 cdot 2! }
                     22:  + ... right ) ...
                     23:  .EN
                     24:  .EQ I
                     25:  lineup =  sum from m>=0 left (
                     26:  sum from
                     27:  pile { k sub 1 ,k sub 2 ,..., k sub m  >=0
                     28:  above
                     29:  k sub 1 +2k sub 2 + ... +mk sub m =m}
                     30:  { S sub 1 sup {k sub 1} } over {1 sup k sub 1 k sub 1 ! } ~
                     31:  { S sub 2 sup {k sub 2} } over {2 sup k sub 2 k sub 2 ! } ~
                     32:  ...
                     33:  { S sub m sup {k sub m} } over {m sup k sub m k sub m ! } 
                     34:  right ) z sup m
                     35:  .EN
                     36: .sp
                     37: .fi
                     38: .ps +2
                     39: .vs +2
                     40: .SC "Keywords, Precedences, Etc."
                     41: .PP
                     42: If you don't use braces,
                     43: .UC EQN
                     44: will
                     45: do operations in the order shown in this list.
                     46: .P1 3
                     47: .ft I
                     48: dyad vec under bar tilde hat dot dotdot
                     49: fwd  back  down  up
                     50: fat  roman  italic  bold  size
                     51: sub  sup  sqrt  over
                     52: from  to
                     53: .ft R
                     54: .P2
                     55: These operations group to the left:
                     56: .P1
                     57: .ft I
                     58: over  sqrt  left  right
                     59: .ft R
                     60: .P2
                     61: All others group to the right.
                     62: .PP
                     63: Digits, parentheses, brackets, punctuation marks, and these mathematical words
                     64: are converted
                     65: to Roman font when encountered:
                     66: .P1
                     67: sin  cos  tan  sinh  cosh  tanh  arc
                     68: max  min  lim  log  ln  exp
                     69: Re  Im  and  if  for  det
                     70: .P2
                     71: These character sequences are recognized and translated as shown.
                     72: .sp
                     73: .nf
                     74: .tr -\(mi
                     75: .in .5i
                     76: .ta 1i
                     77: >=             $>=$
                     78: <=             $<=$
                     79: ==             $==$
                     80: !=             $!=$
                     81: +-             $+-$
                     82: ->             $->$
                     83: <-             $<-$
                     84: <<             $<<$
                     85: >>             $>>$
                     86: inf            $inf$
                     87: partial                $partial$
                     88: half           $half$
                     89: prime          $prime$
                     90: approx         $approx$
                     91: nothing                $nothing$
                     92: cdot           $cdot$
                     93: times          $times$
                     94: del            $del$
                     95: grad           $grad$
                     96: \&...          $...$
                     97: ,...,          $,...,$
                     98: sum            $sum$
                     99: .sp 3p
                    100: int            $int$
                    101: .sp 2p
                    102: prod           $prod$
                    103: union          $union$
                    104: inter          $inter$
                    105: .sp
                    106: .in
                    107: .fi
                    108: .tr --
                    109: .PP
                    110: To obtain Greek letters,
                    111: simply spell them out in whatever case you want:
                    112: .sp
                    113: .nf
                    114: .in .2i
                    115: .ta .7i 1.4i 2.1i
                    116: DELTA  $DELTA$ iota    $iota$
                    117: GAMMA  $GAMMA$ kappa   $kappa$
                    118: LAMBDA $LAMBDA$        lambda  $lambda$
                    119: OMEGA  $OMEGA$ mu      $mu$
                    120: PHI    $PHI$   nu      $nu$
                    121: PI     $PI$    omega   $omega$
                    122: PSI    $PSI$   omicron $omicron$
                    123: SIGMA  $SIGMA$ phi     $phi$
                    124: THETA  $THETA$ pi      $pi$
                    125: UPSILON        $UPSILON$       psi     $psi$
                    126: XI     $XI$    rho     $rho$
                    127: alpha  $alpha$ sigma   $sigma$
                    128: beta   $beta$  tau     $tau$
                    129: chi    $chi$   theta   $theta$
                    130: delta  $delta$ upsilon $upsilon$
                    131: epsilon        $epsilon$       xi      $xi$
                    132: eta    $eta$   zeta    $zeta$
                    133: gamma  $gamma$
                    134: .sp
                    135: .in
                    136: .fi
                    137: .PP
                    138: These are all the words known to
                    139: .UC EQN
                    140: (except for characters with names),
                    141: together with the section where they are discussed.
                    142: .sp
                    143: .nf
                    144: .in .2i
                    145: .ta .7i 1.4i 2.1i
                    146: above  17, 18  lpile   17
                    147: back   21      mark    15
                    148: bar    13      matrix  18
                    149: bold   12      ndefine 20
                    150: ccol   18      over    9
                    151: col    18      pile    17
                    152: cpile  17      rcol    18
                    153: define 20      right   16
                    154: delim  19      roman   12
                    155: dot    13      rpile   17
                    156: dotdot 13      size    12
                    157: down   21      sqrt    10
                    158: dyad   13      sub     7
                    159: fat    12      sup     7
                    160: font   12      tdefine 20
                    161: from   11      tilde   13
                    162: fwd    21      to      11
                    163: gfont  12      under   13
                    164: gsize  12      up      21
                    165: hat    13      vec     13
                    166: italic 12      ~, ^    4, 6
                    167: lcol   18      { }     8
                    168: left   16      "..."   8, 14
                    169: lineup 15
                    170: .sp
                    171: .in 0
                    172: .fi
                    173: .SC Troubleshooting
                    174: .PP
                    175: If you make a mistake in an equation,
                    176: like leaving out a brace (very common)
                    177: or having one too many (very common)
                    178: or having a
                    179: .ul
                    180: sup
                    181: with nothing before it (common),
                    182: .UC EQN
                    183: will tell you with the message
                    184: .P1 2
                    185: .ft I
                    186: syntax error between lines x and y, file z
                    187: .ft R
                    188: .P2
                    189: where
                    190: .ul
                    191: x
                    192: and
                    193: .ul
                    194: y
                    195: are approximately the lines
                    196: between which the trouble occurred, and
                    197: .ul
                    198: z
                    199: is the name
                    200: of the file in question.
                    201: The line numbers are approximate _ look nearby as well.
                    202: There are also self-explanatory messages that arise if you leave out a quote
                    203: or try to run
                    204: .UC EQN
                    205: on a non-existent file.
                    206: .PP
                    207: If you want to check a document before actually printing it
                    208: (on
                    209: .UC UNIX 
                    210: only),
                    211: .P1
                    212: eqn  files >/dev/null
                    213: .P2
                    214: will
                    215: throw away the output but print the messages.
                    216: .PP
                    217: If you use something like dollar signs as delimiters,
                    218: it is easy to leave one out.
                    219: This causes very strange troubles.
                    220: The program
                    221: .ul
                    222: checkeq
                    223: checks for misplaced or missing dollar signs
                    224: and similar troubles.
                    225: .PP
                    226: In-line equations can only be so big
                    227: because of an internal buffer in
                    228: .UC TROFF .
                    229: If you get a message
                    230: ``word overflow'',
                    231: you have exceeded this limit.
                    232: If you print the equation as a displayed equation
                    233: this message will usually go away.
                    234: The message
                    235: ``line overflow''
                    236: indicates you have exceeded an even bigger buffer.
                    237: The only cure for this is to break the equation into two separate ones.
                    238: .PP
                    239: On a related topic,
                    240: .UC EQN
                    241: does not break equations by itself _
                    242: you must split long equations up across multiple lines
                    243: by yourself,
                    244: marking each by a separate
                    245: .UC .EQ
                    246: \&...\&
                    247: .UC .EN
                    248: sequence.
                    249: .UC EQN
                    250: does warn about equations that are too long
                    251: to fit on one line.

unix.superglobalmegacorp.com

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