|
|
1.1 ! root 1: #once #create message ! 2: .ND ! 3: .tr %$ ! 4: .EQ ! 5: delim $$ ! 6: .EN ! 7: .LP ! 8: The next topic goes back to the problem of formatting ! 9: equations on the page. Sometimes it is desirable to ! 10: line up one part of an equation with some part ! 11: of a previous equation - for example, equals signs ! 12: are often lined up like this: ! 13: .EQ I ! 14: x mark = y sub i ! 15: .EN ! 16: .EQ I ! 17: lineup = z sub i ! 18: .EN ! 19: .EQ I ! 20: x sub i + y sub i lineup = z sub i ! 21: .EN ! 22: ! 23: To achieve this, you have to do several things. ! 24: (1) tell neqn to remember the place where things are ! 25: to be lined up, which is done by saying ! 26: "mark" just before the thing you want remembered: ! 27: .EQ I ! 28: x mark = y sub i ! 29: .EN ! 30: .br ! 31: (2) Then, in successive equations, telling neqn ! 32: to line up something on the previous mark, with ! 33: "lineup": ! 34: .EQ I ! 35: lineup = z sub i ! 36: .EN ! 37: .br ! 38: (3) You ____have __to use either ".EQ I" or ".EQ L"; ! 39: you can't line things up in a centered equation. ! 40: ! 41: For practice, modify "Example" so the ! 42: equations are lined up on the equals signs, then ! 43: type "ready". ! 44: .pl 1 ! 45: #once #create Ref ! 46: .LP ! 47: A test of mark and lineup: ! 48: .EQ I ! 49: x sub i ~ mark =~ 1 ! 50: .EN ! 51: .EQ I ! 52: x sub i + y sub i ~ lineup = ~2 ! 53: .EN ! 54: .pl 1 ! 55: #once #create Example ! 56: .LP ! 57: A test of mark and lineup: ! 58: .EQ I ! 59: x sub i ~ =~ 1 ! 60: .EN ! 61: .EQ I ! 62: x sub i + y sub i ~ =~ 2 ! 63: .EN ! 64: .pl 1 ! 65: # ! 66: #once neqn Ref | nroff >X1 & ! 67: #once neqn message Ref | nroff -T$term %s/tinyms - ! 68: #user ! 69: neqn Example | nroff >X2 ! 70: #cmp X1 X2 ! 71: #fail ! 72: Don't forget that tilde is a real character; ! 73: put the mark and lineup after it. ! 74: Remember .EQ I. ! 75: #log ! 76: #next ! 77: 10.1b 10
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.