home *** CD-ROM | disk | FTP | other *** search
/ PC Online 1998 November / PCO_1198.ISO / filesbbs / os2 / epmtfe22.arj / EPMTFE22.ZIP / SOURCE / texfek.e < prev   
LaTeX Document  |  1998-08-10  |  7.5 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: LaTeX Document (document/latex).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert LaTeX Document (document/latex) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file LaTeX document, ISO-8859 text, with CRLF line terminators default
100% perlTextCheck Likely Text (Perl) default
100% siegfried x-fmt/111 Plain Text File default
100% detectItEasy Format: Plain text[CRLF] default
100% xdgMime text/x-csrc default (weak)



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 2f 2a 0d 0a 20 57 68 61 | 74 27 73 20 69 74 20 63 |/*.. Wha|t's it c|
|00000010| 61 6c 6c 65 64 3a 20 54 | 65 58 20 46 72 6f 6e 74 |alled: T|eX Front|
|00000020| 20 45 6e 64 20 6b 65 79 | 20 64 65 66 69 6e 69 74 | End key| definit|
|00000030| 69 6f 6e 73 20 28 74 65 | 78 66 65 6b 2e 65 29 2c |ions (te|xfek.e),|
|00000040| 20 76 32 2e 32 0d 0a 0d | 0a 20 57 68 61 74 20 64 | v2.2...|. What d|
|00000050| 6f 65 73 20 69 74 20 64 | 6f 3a 20 20 44 65 66 69 |oes it d|o: Defi|
|00000060| 6e 65 73 20 74 68 65 20 | 54 65 58 20 6b 65 79 73 |nes the |TeX keys|
|00000070| 65 74 73 20 61 6e 64 20 | 73 79 6e 74 61 78 20 61 |ets and |syntax a|
|00000080| 73 73 69 73 74 20 70 72 | 6f 63 65 64 75 72 65 73 |ssist pr|ocedures|
|00000090| 2e 0d 0a 0d 0a 20 57 68 | 6f 20 61 6e 64 20 57 68 |..... Wh|o and Wh|
|000000a0| 65 6e 3a 20 20 20 20 20 | 4a 6f 20 4b 6f 65 6e 65 |en: |Jo Koene|
|000000b0| 6e 20 37 2f 39 34 0d 0a | 20 20 20 20 20 20 20 20 |n 7/94..| |
|000000c0| 20 20 20 20 20 20 20 20 | 20 20 20 4a 6f 6e 20 48 | | Jon H|
|000000d0| 61 63 6b 65 72 20 38 2f | 39 35 0d 0a 20 20 20 20 |acker 8/|95.. |
|000000e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 57 | | W|
|000000f0| 61 6c 74 65 72 20 53 63 | 68 6d 69 64 74 20 20 38 |alter Sc|hmidt 8|
|00000100| 2f 31 39 39 38 0d 0a 2a | 2f 0d 0a 0d 0a 63 6f 6d |/1998..*|/....com|
|00000110| 70 69 6c 65 20 69 66 20 | 6e 6f 74 20 64 65 66 69 |pile if |not defi|
|00000120| 6e 65 64 28 45 4e 54 45 | 52 5f 41 43 54 49 4f 4e |ned(ENTE|R_ACTION|
|00000130| 29 0d 0a 20 20 20 63 6f | 6e 73 74 20 45 4e 54 45 |).. co|nst ENTE|
|00000140| 52 5f 41 43 54 49 4f 4e | 20 3d 20 27 41 44 44 4c |R_ACTION| = 'ADDL|
|00000150| 49 4e 45 27 0d 0a 63 6f | 6d 70 69 6c 65 20 65 6e |INE'..co|mpile en|
|00000160| 64 69 66 0d 0a 0d 0a 63 | 6f 6d 70 69 6c 65 20 69 |dif....c|ompile i|
|00000170| 66 20 6e 6f 74 20 64 65 | 66 69 6e 65 64 28 45 4e |f not de|fined(EN|
|00000180| 48 41 4e 43 45 44 5f 45 | 4e 54 45 52 5f 4b 45 59 |HANCED_E|NTER_KEY|
|00000190| 53 29 0d 0a 20 20 20 63 | 6f 6e 73 74 20 45 4e 48 |S).. c|onst ENH|
|000001a0| 41 4e 43 45 44 5f 45 4e | 54 45 52 5f 4b 45 59 53 |ANCED_EN|TER_KEYS|
|000001b0| 20 3d 20 31 20 2d 2d 20 | 3f 3f 3f 0d 0a 63 6f 6d | = 1 -- |???..com|
|000001c0| 70 69 6c 65 20 65 6e 64 | 69 66 0d 0a 0d 0a 63 6f |pile end|if....co|
|000001d0| 6d 70 69 6c 65 20 69 66 | 20 6e 6f 74 20 64 65 66 |mpile if| not def|
|000001e0| 69 6e 65 64 28 4c 41 54 | 45 58 5f 53 59 4e 54 41 |ined(LAT|EX_SYNTA|
|000001f0| 58 5f 49 4e 44 45 4e 54 | 29 0d 0a 20 20 20 63 6f |X_INDENT|).. co|
|00000200| 6e 73 74 20 4c 41 54 45 | 58 5f 53 59 4e 54 41 58 |nst LATE|X_SYNTAX|
|00000210| 5f 49 4e 44 45 4e 54 20 | 3d 20 32 20 2d 2d 20 63 |_INDENT |= 2 -- c|
|00000220| 68 61 6e 67 65 64 20 76 | 32 2e 32 0d 0a 63 6f 6d |hanged v|2.2..com|
|00000230| 70 69 6c 65 20 65 6e 64 | 69 66 20 20 20 0d 0a 0d |pile end|if ...|
|00000240| 0a 2f 2a 0d 0a da c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |./*.....|........|
|00000250| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |........|........|
|00000260| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |........|........|
|00000270| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |........|........|
|00000280| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |........|........|
|00000290| c4 c4 bf 0d 0a b3 20 20 | 54 65 78 20 6b 65 79 73 |...... |Tex keys|
|000002a0| 65 74 73 20 61 72 65 20 | 6c 6f 61 64 65 64 20 64 |ets are |loaded d|
|000002b0| 75 72 69 6e 67 20 64 65 | 66 73 65 6c 65 63 74 20 |uring de|fselect |
|000002c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000002d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000002e0| 20 20 b3 0d 0a b3 20 20 | 57 65 20 70 75 74 20 74 | .... |We put t|
|000002f0| 68 65 20 6b 65 79 73 20 | 73 74 61 74 65 6d 65 6e |he keys |statemen|
|00000300| 74 20 69 6e 20 74 68 65 | 20 64 65 66 73 65 6c 65 |t in the| defsele|
|00000310| 63 74 20 73 6f 20 74 68 | 61 74 20 77 65 20 63 61 |ct so th|at we ca|
|00000320| 6e 20 63 68 65 63 6b 20 | 20 20 20 20 20 20 20 20 |n check | |
|00000330| 20 20 b3 0d 0a b3 20 20 | 74 6f 20 6d 61 6b 65 20 | .... |to make |
|00000340| 73 75 72 65 20 69 74 20 | 69 73 20 61 20 54 65 58 |sure it |is a TeX|
|00000350| 20 66 69 6c 65 20 62 65 | 66 6f 72 65 20 77 65 20 | file be|fore we |
|00000360| 6c 6f 61 64 20 74 68 65 | 20 6b 65 79 73 65 74 2e |load the| keyset.|
|00000370| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000380| 20 20 b3 0d 0a c0 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 | ......|........|
|00000390| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |........|........|
|000003a0| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |........|........|
|000003b0| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |........|........|
|000003c0| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |........|........|
|000003d0| c4 c4 d9 0d 0a 2a 2f 0d | 0a 0d 0a 64 65 66 70 72 |.....*/.|...defpr|
|000003e0| 6f 63 20 73 65 74 54 65 | 58 4b 65 79 53 65 74 73 |oc setTe|XKeySets|
|000003f0| 0d 0a 20 20 20 20 75 6e | 69 76 65 72 73 61 6c 20 |.. un|iversal |
|00000400| 61 70 70 5f 68 69 6e 69 | 0d 0a 0d 0a 20 20 20 20 |app_hini|.... |
|00000410| 69 66 20 74 65 78 5f 69 | 73 5f 64 6f 63 28 29 20 |if tex_i|s_doc() |
|00000420| 6f 72 20 74 65 78 5f 69 | 73 5f 73 74 79 6c 65 28 |or tex_i|s_style(|
|00000430| 29 20 74 68 65 6e 20 20 | 2d 2d 20 69 66 20 54 65 |) then |-- if Te|
|00000440| 58 20 64 6f 63 2f 73 74 | 79 6c 65 20 6c 6f 61 64 |X doc/st|yle load|
|00000450| 65 64 0d 0a 20 20 20 20 | 20 20 20 20 69 66 20 71 |ed.. | if q|
|00000460| 75 65 72 79 70 72 6f 66 | 69 6c 65 28 20 61 70 70 |ueryprof|ile( app|
|00000470| 5f 68 69 6e 69 2c 20 54 | 45 58 5f 41 50 50 2c 20 |_hini, T|EX_APP, |
|00000480| 27 54 45 58 5f 4b 45 59 | 53 27 29 20 74 68 65 6e |'TEX_KEY|S') then|
|00000490| 0d 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 69 66 |.. | if|
|000004a0| 20 74 72 61 6e 73 6c 61 | 74 65 28 2e 6b 65 79 73 | transla|te(.keys|
|000004b0| 65 74 29 20 3c 3e 20 27 | 54 45 58 4b 45 59 53 41 |et) <> '|TEXKEYSA|
|000004c0| 27 20 74 68 65 6e 20 6b | 65 79 73 20 54 45 58 4b |' then k|eys TEXK|
|000004d0| 45 59 53 41 20 65 6e 64 | 69 66 0d 0a 20 20 20 20 |EYSA end|if.. |
|000004e0| 20 20 20 20 65 6c 73 65 | 0d 0a 20 20 20 20 20 20 | else|.. |
|000004f0| 20 20 20 20 20 20 69 66 | 20 74 72 61 6e 73 6c 61 | if| transla|
|00000500| 74 65 28 2e 6b 65 79 73 | 65 74 29 20 3c 3e 20 27 |te(.keys|et) <> '|
|00000510| 54 45 58 4b 45 59 53 4e | 27 20 74 68 65 6e 20 6b |TEXKEYSN|' then k|
|00000520| 65 79 73 20 54 45 58 4b | 45 59 53 4e 20 65 6e 64 |eys TEXK|EYSN end|
|00000530| 69 66 0d 0a 20 20 20 20 | 20 20 20 20 65 6e 64 69 |if.. | endi|
|00000540| 66 20 2d 2d 20 54 45 58 | 5f 4b 45 59 53 0d 0a 20 |f -- TEX|_KEYS.. |
|00000550| 20 20 20 65 6c 73 65 69 | 66 20 74 65 78 5f 69 73 | elsei|f tex_is|
|00000560| 5f 61 75 78 28 29 20 74 | 68 65 6e 0d 0a 20 20 20 |_aux() t|hen.. |
|00000570| 20 20 20 20 20 69 66 20 | 74 72 61 6e 73 6c 61 74 | if |translat|
|00000580| 65 28 2e 6b 65 79 73 65 | 74 29 20 3c 3e 20 27 54 |e(.keyse|t) <> 'T|
|00000590| 45 58 4b 45 59 53 51 27 | 20 74 68 65 6e 20 6b 65 |EXKEYSQ'| then ke|
|000005a0| 79 73 20 54 45 58 4b 45 | 59 53 51 20 65 6e 64 69 |ys TEXKE|YSQ endi|
|000005b0| 66 0d 0a 20 20 20 20 65 | 6e 64 69 66 20 20 2d 2d |f.. e|ndif --|
|000005c0| 20 54 65 58 20 64 6f 63 | 2f 73 74 79 6c 65 20 6c | TeX doc|/style l|
|000005d0| 6f 61 64 65 64 0d 0a 0d | 0a 0d 0a 2f 2a 0d 0a da |oaded...|.../*...|
|000005e0| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |........|........|
|000005f0| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |........|........|
|00000600| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |........|........|
|00000610| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |........|........|
|00000620| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 bf 0d 0a b3 |........|........|
|00000630| 20 20 44 65 66 69 6e 65 | 20 74 68 65 20 54 65 58 | Define| the TeX|
|00000640| 20 73 79 6e 74 61 78 20 | 61 73 73 69 73 74 20 6b | syntax |assist k|
|00000650| 65 79 20 73 65 74 20 63 | 6f 6d 62 6f 20 20 20 20 |ey set c|ombo |
|00000660| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000670| 20 20 20 20 20 20 20 20 | 20 20 20 20 b3 0d 0a c0 | | ....|
|00000680| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |........|........|
|00000690| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |........|........|
|000006a0| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |........|........|
|000006b0| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |........|........|
|000006c0| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 d9 0d 0a 2a |........|.......*|
|000006d0| 2f 0d 0a 0d 0a 64 65 66 | 6b 65 79 73 20 54 45 58 |/....def|keys TEX|
|000006e0| 4b 45 59 53 41 20 20 20 | 2d 2d 20 71 75 69 63 6b |KEYSA |-- quick|
|000006f0| 20 6b 65 79 73 20 2b 20 | 73 79 6e 74 61 78 20 65 | keys + |syntax e|
|00000700| 78 70 61 6e 73 69 6f 6e | 20 2b 20 45 50 4d 54 65 |xpansion| + EPMTe|
|00000710| 58 20 61 63 63 65 6c 65 | 72 61 74 6f 72 20 6b 65 |X accele|rator ke|
|00000720| 79 73 20 0d 0a 64 65 66 | 69 6e 65 20 54 45 58 41 |ys ..def|ine TEXA|
|00000730| 43 43 45 4c 20 3d 20 31 | 0d 0a 64 65 66 69 6e 65 |CCEL = 1|..define|
|00000740| 20 54 45 58 43 4f 4d 50 | 4c 20 3d 20 31 0d 0a 69 | TEXCOMP|L = 1..i|
|00000750| 6e 63 6c 75 64 65 20 27 | 74 65 78 66 65 64 2e 65 |nclude '|texfed.e|
|00000760| 27 0d 0a 0d 0a 64 65 66 | 6b 65 79 73 20 54 45 58 |'....def|keys TEX|
|00000770| 4b 45 59 53 4e 20 20 20 | 2d 2d 20 71 75 69 63 6b |KEYSN |-- quick|
|00000780| 20 6b 65 79 73 20 2b 20 | 73 79 6e 74 61 78 20 65 | keys + |syntax e|
|00000790| 78 70 61 6e 73 69 6f 6e | 0d 0a 64 65 66 69 6e 65 |xpansion|..define|
|000007a0| 20 54 45 58 41 43 43 45 | 4c 20 3d 20 30 0d 0a 64 | TEXACCE|L = 0..d|
|000007b0| 65 66 69 6e 65 20 54 45 | 58 43 4f 4d 50 4c 20 3d |efine TE|XCOMPL =|
|000007c0| 20 31 0d 0a 69 6e 63 6c | 75 64 65 20 27 74 65 78 | 1..incl|ude 'tex|
|000007d0| 66 65 64 2e 65 27 0d 0a | 0d 0a 64 65 66 6b 65 79 |fed.e'..|..defkey|
|000007e0| 73 20 54 45 58 4b 45 59 | 53 51 20 20 20 2d 2d 20 |s TEXKEY|SQ -- |
|000007f0| 71 75 69 63 6b 20 6b 65 | 79 73 20 6f 6e 6c 79 0d |quick ke|ys only.|
|00000800| 0a 64 65 66 69 6e 65 20 | 54 45 58 41 43 43 45 4c |.define |TEXACCEL|
|00000810| 20 3d 20 30 0d 0a 64 65 | 66 69 6e 65 20 54 45 58 | = 0..de|fine TEX|
|00000820| 43 4f 4d 50 4c 20 3d 20 | 30 0d 0a 69 6e 63 6c 75 |COMPL = |0..inclu|
|00000830| 64 65 20 27 74 65 78 66 | 65 64 2e 65 27 0d 0a 0d |de 'texf|ed.e'...|
|00000840| 0a 2f 2a 0d 0a c9 cd cd | cd cd cd cd cd cd cd cd |./*.....|........|
|00000850| cd cd cd cd cd cd cd cd | cd cd cd cd cd cd cd cd |........|........|
|00000860| cd cd cd cd cd cd cd cd | cd cd cd cd cd cd cd cd |........|........|
|00000870| cd cd cd cd cd cd cd cd | cd cd cd cd cd cd cd cd |........|........|
|00000880| cd cd cd cd cd cd cd cd | cd cd cd cd cd cd cd cd |........|........|
|00000890| cd cd bb 0d 0a ba 20 54 | 65 58 20 73 79 6e 74 61 |...... T|eX synta|
|000008a0| 78 20 61 73 73 69 73 74 | 20 70 72 6f 63 65 64 75 |x assist| procedu|
|000008b0| 72 65 20 64 65 66 69 6e | 69 74 69 6f 6e 73 2e 20 |re defin|itions. |
|000008c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000008d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000008e0| 20 20 ba 0d 0a ba 20 20 | 20 20 20 20 20 20 20 20 | .... | |
|000008f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000900| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000910| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000920| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000930| 20 20 ba 0d 0a ba 20 57 | 68 61 74 20 64 6f 65 73 | .... W|hat does|
|00000940| 20 69 74 20 64 6f 3a 20 | 20 54 68 65 20 65 6e 74 | it do: | The ent|
|00000950| 65 72 20 61 6e 64 20 73 | 70 61 63 65 20 62 61 72 |er and s|pace bar|
|00000960| 20 6b 65 79 73 20 68 61 | 76 65 20 62 65 65 6e 20 | keys ha|ve been |
|00000970| 64 65 66 69 6e 65 64 20 | 74 6f 20 68 61 76 65 20 |defined |to have |
|00000980| 20 20 ba 0d 0a ba 20 20 | 20 20 20 20 20 20 20 20 | .... | |
|00000990| 20 20 20 20 20 20 20 20 | 20 73 70 65 63 69 66 69 | | specifi|
|000009a0| 63 20 54 65 58 20 65 64 | 69 74 69 6e 67 20 66 65 |c TeX ed|iting fe|
|000009b0| 61 74 75 72 65 73 20 69 | 6e 20 74 68 69 73 20 6b |atures i|n this k|
|000009c0| 65 79 73 65 74 2e 20 20 | 20 20 20 20 20 20 20 20 |eyset. | |
|000009d0| 20 20 ba 0d 0a ba 20 20 | 20 20 20 20 20 20 20 20 | .... | |
|000009e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000009f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000a00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000a10| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000a20| 20 20 ba 0d 0a c8 cd cd | cd cd cd cd cd cd cd cd | ......|........|
|00000a30| cd cd cd cd cd cd cd cd | cd cd cd cd cd cd cd cd |........|........|
|00000a40| cd cd cd cd cd cd cd cd | cd cd cd cd cd cd cd cd |........|........|
|00000a50| cd cd cd cd cd cd cd cd | cd cd cd cd cd cd cd cd |........|........|
|00000a60| cd cd cd cd cd cd cd cd | cd cd cd cd cd cd cd cd |........|........|
|00000a70| cd cd bc 0d 0a 2a 2f 0d | 0a 0d 0a 20 20 64 65 66 |.....*/.|... def|
|00000a80| 70 72 6f 63 20 74 65 78 | 5f 66 69 72 73 74 5f 65 |proc tex|_first_e|
|00000a90| 78 70 61 6e 73 69 6f 6e | 0d 0a 20 20 20 20 72 65 |xpansion|.. re|
|00000aa0| 74 63 3d 31 20 20 20 2d | 2d 20 64 65 66 61 75 6c |tc=1 -|- defaul|
|00000ab0| 74 20 72 65 74 75 72 6e | 20 63 6f 64 65 0d 0a 20 |t return| code.. |
|00000ac0| 20 63 6f 6d 70 69 6c 65 | 20 69 66 20 45 56 45 52 | compile| if EVER|
|00000ad0| 53 49 4f 4e 20 3e 3d 20 | 35 0d 0a 20 20 20 20 69 |SION >= |5.. i|
|00000ae0| 66 20 2e 6c 69 6e 65 20 | 74 68 65 6e 20 20 2d 2d |f .line |then --|
|00000af0| 20 63 75 72 72 65 6e 74 | 20 6c 69 6e 65 20 6e 75 | current| line nu|
|00000b00| 6d 62 65 72 0d 0a 20 20 | 63 6f 6d 70 69 6c 65 20 |mber.. |compile |
|00000b10| 65 6c 73 65 0d 0a 20 20 | 20 20 69 66 20 2e 6c 69 |else.. | if .li|
|00000b20| 6e 65 20 61 6e 64 20 28 | 6e 6f 74 20 63 6f 6d 6d |ne and (|not comm|
|00000b30| 61 6e 64 5f 73 74 61 74 | 65 28 29 29 20 74 68 65 |and_stat|e()) the|
|00000b40| 6e 0d 0a 20 20 63 6f 6d | 70 69 6c 65 20 65 6e 64 |n.. com|pile end|
|00000b50| 69 66 0d 0a 20 20 20 20 | 20 20 67 65 74 6c 69 6e |if.. | getlin|
|00000b60| 65 20 6c 69 6e 65 0d 0a | 20 20 20 20 20 20 6c 69 |e line..| li|
|00000b70| 6e 65 3d 73 74 72 69 70 | 28 6c 69 6e 65 2c 27 54 |ne=strip|(line,'T|
|00000b80| 27 29 20 2d 2d 20 72 65 | 6d 6f 76 65 20 74 72 61 |') -- re|move tra|
|00000b90| 69 6c 69 6e 67 20 73 70 | 61 63 65 73 0d 0a 20 20 |iling sp|aces.. |
|00000ba0| 20 20 20 20 6c 69 6e 65 | 5f 6c 3d 73 75 62 73 74 | line|_l=subst|
|00000bb0| 72 28 6c 69 6e 65 2c 31 | 2c 2e 63 6f 6c 2d 31 29 |r(line,1|,.col-1)|
|00000bc0| 20 2d 2d 20 73 70 6c 69 | 74 20 6c 69 6e 65 20 69 | -- spli|t line i|
|00000bd0| 6e 74 6f 20 74 77 6f 20 | 70 61 72 74 73 20 61 74 |nto two |parts at|
|00000be0| 20 63 75 72 73 6f 72 0d | 0a 20 20 20 20 20 20 6c | cursor.|. l|
|00000bf0| 69 6e 65 5f 72 3d 73 75 | 62 73 74 72 28 6c 69 6e |ine_r=su|bstr(lin|
|00000c00| 65 2c 2e 63 6f 6c 29 0d | 0a 20 20 20 20 20 20 6c |e,.col).|. l|
|00000c10| 69 6e 65 6c 65 6e 3d 6c | 65 6e 67 74 68 28 6c 69 |inelen=l|ength(li|
|00000c20| 6e 65 5f 6c 29 0d 0a 20 | 20 20 20 20 20 69 66 20 |ne_l).. | if |
|00000c30| 6c 69 6e 65 6c 65 6e 20 | 3e 20 32 20 74 68 65 6e |linelen |> 2 then|
|00000c40| 0d 0a 20 20 20 20 20 20 | 20 20 77 72 64 3d 73 75 |.. | wrd=su|
|00000c50| 62 73 74 72 28 6c 69 6e | 65 5f 6c 2c 2e 63 6f 6c |bstr(lin|e_l,.col|
|00000c60| 2d 33 2c 33 29 0d 0a 20 | 20 20 20 20 20 65 6c 73 |-3,3).. | els|
|00000c70| 65 0d 0a 20 20 20 20 20 | 20 20 20 77 72 64 3d 6c |e.. | wrd=l|
|00000c80| 69 6e 65 5f 6c 0d 0a 20 | 20 20 20 20 20 65 6e 64 |ine_l.. | end|
|00000c90| 69 66 0d 0a 2d 2d 20 65 | 78 70 61 6e 64 20 5c 62 |if..-- e|xpand \b|
|00000ca0| 65 67 69 6e 0d 0a 20 20 | 20 20 20 20 69 66 20 77 |egin.. | if w|
|00000cb0| 72 64 3d 27 5c 62 65 27 | 20 74 68 65 6e 0d 0a 20 |rd='\be'| then.. |
|00000cc0| 20 20 20 20 20 20 20 72 | 65 70 6c 61 63 65 6c 69 | r|eplaceli|
|00000cd0| 6e 65 20 6c 69 6e 65 5f | 6c 27 67 69 6e 7b 7d 27 |ne line_|l'gin{}'|
|00000ce0| 6c 69 6e 65 5f 72 0d 0a | 20 20 20 20 20 20 20 20 |line_r..| |
|00000cf0| 69 66 20 6e 6f 74 20 69 | 6e 73 65 72 74 5f 73 74 |if not i|nsert_st|
|00000d00| 61 74 65 28 29 20 74 68 | 65 6e 20 69 6e 73 65 72 |ate() th|en inser|
|00000d10| 74 5f 74 6f 67 67 6c 65 | 0d 0a 20 20 20 20 20 20 |t_toggle|.. |
|00000d20| 20 20 63 6f 6d 70 69 6c | 65 20 69 66 20 45 56 45 | compil|e if EVE|
|00000d30| 52 53 49 4f 4e 20 3e 3d | 20 27 35 2e 35 30 27 0d |RSION >=| '5.50'.|
|00000d40| 0a 20 20 20 20 20 20 20 | 20 20 20 63 61 6c 6c 20 |. | call |
|00000d50| 66 69 78 75 70 5f 63 75 | 72 73 6f 72 28 29 0d 0a |fixup_cu|rsor()..|
|00000d60| 20 20 20 20 20 20 20 20 | 63 6f 6d 70 69 6c 65 20 | |compile |
|00000d70| 65 6e 64 69 66 0d 0a 20 | 20 20 20 20 20 20 20 65 |endif.. | e|
|00000d80| 6e 64 69 66 0d 0a 20 20 | 20 20 20 20 20 20 2e 63 |ndif.. | .c|
|00000d90| 6f 6c 3d 2e 63 6f 6c 2b | 34 0d 0a 2d 2d 20 65 78 |ol=.col+|4..-- ex|
|00000da0| 70 61 6e 64 20 5c 63 69 | 74 65 0d 0a 20 20 20 20 |pand \ci|te.. |
|00000db0| 20 20 65 6c 73 65 69 66 | 20 77 72 64 3d 27 5c 63 | elseif| wrd='\c|
|00000dc0| 69 27 20 74 68 65 6e 0d | 0a 20 20 20 20 20 20 20 |i' then.|. |
|00000dd0| 20 72 65 70 6c 61 63 65 | 6c 69 6e 65 20 6c 69 6e | replace|line lin|
|00000de0| 65 5f 6c 27 74 65 7b 7d | 27 6c 69 6e 65 5f 72 0d |e_l'te{}|'line_r.|
|00000df0| 0a 20 20 20 20 20 20 20 | 20 69 66 20 6e 6f 74 20 |. | if not |
|00000e00| 69 6e 73 65 72 74 5f 73 | 74 61 74 65 28 29 20 74 |insert_s|tate() t|
|00000e10| 68 65 6e 20 69 6e 73 65 | 72 74 5f 74 6f 67 67 6c |hen inse|rt_toggl|
|00000e20| 65 0d 0a 20 20 20 20 20 | 20 20 20 63 6f 6d 70 69 |e.. | compi|
|00000e30| 6c 65 20 69 66 20 45 56 | 45 52 53 49 4f 4e 20 3e |le if EV|ERSION >|
|00000e40| 3d 20 27 35 2e 35 30 27 | 0d 0a 20 20 20 20 20 20 |= '5.50'|.. |
|00000e50| 20 20 20 20 63 61 6c 6c | 20 66 69 78 75 70 5f 63 | call| fixup_c|
|00000e60| 75 72 73 6f 72 28 29 0d | 0a 20 20 20 20 20 20 20 |ursor().|. |
|00000e70| 20 63 6f 6d 70 69 6c 65 | 20 65 6e 64 69 66 0d 0a | compile| endif..|
|00000e80| 20 20 20 20 20 20 20 20 | 65 6e 64 69 66 0d 0a 20 | |endif.. |
|00000e90| 20 20 20 20 20 20 20 2e | 63 6f 6c 3d 2e 63 6f 6c | .|col=.col|
|00000ea0| 2b 33 20 20 2d 2d 20 72 | 65 70 6f 73 69 74 69 6f |+3 -- r|epositio|
|00000eb0| 6e 20 63 75 72 73 6f 72 | 0d 0a 2d 2d 20 65 78 70 |n cursor|..-- exp|
|00000ec0| 61 6e 64 20 5c 6c 61 62 | 65 6c 0d 0a 20 20 20 20 |and \lab|el.. |
|00000ed0| 20 20 65 6c 73 65 69 66 | 20 77 72 64 3d 27 5c 6c | elseif| wrd='\l|
|00000ee0| 61 27 20 74 68 65 6e 0d | 0a 20 20 20 20 20 20 20 |a' then.|. |
|00000ef0| 20 72 65 70 6c 61 63 65 | 6c 69 6e 65 20 6c 69 6e | replace|line lin|
|00000f00| 65 5f 6c 27 62 65 6c 7b | 7d 27 6c 69 6e 65 5f 72 |e_l'bel{|}'line_r|
|00000f10| 0d 0a 20 20 20 20 20 20 | 20 20 69 66 20 6e 6f 74 |.. | if not|
|00000f20| 20 69 6e 73 65 72 74 5f | 73 74 61 74 65 28 29 20 | insert_|state() |
|00000f30| 74 68 65 6e 20 69 6e 73 | 65 72 74 5f 74 6f 67 67 |then ins|ert_togg|
|00000f40| 6c 65 0d 0a 20 20 20 20 | 20 20 20 20 63 6f 6d 70 |le.. | comp|
|00000f50| 69 6c 65 20 69 66 20 45 | 56 45 52 53 49 4f 4e 20 |ile if E|VERSION |
|00000f60| 3e 3d 20 27 35 2e 35 30 | 27 0d 0a 20 20 20 20 20 |>= '5.50|'.. |
|00000f70| 20 20 20 20 20 63 61 6c | 6c 20 66 69 78 75 70 5f | cal|l fixup_|
|00000f80| 63 75 72 73 6f 72 28 29 | 0d 0a 20 20 20 20 20 20 |cursor()|.. |
|00000f90| 20 20 63 6f 6d 70 69 6c | 65 20 65 6e 64 69 66 0d | compil|e endif.|
|00000fa0| 0a 20 20 20 20 20 20 20 | 20 65 6e 64 69 66 0d 0a |. | endif..|
|00000fb0| 20 20 20 20 20 20 20 20 | 2e 63 6f 6c 3d 2e 63 6f | |.col=.co|
|00000fc0| 6c 2b 34 20 20 2d 2d 20 | 72 65 70 6f 73 69 74 69 |l+4 -- |repositi|
|00000fd0| 6f 6e 20 63 75 72 73 6f | 72 0d 0a 2d 2d 20 65 78 |on curso|r..-- ex|
|00000fe0| 70 61 6e 64 20 5c 72 65 | 66 0d 0a 20 20 20 20 20 |pand \re|f.. |
|00000ff0| 20 65 6c 73 65 69 66 20 | 77 72 64 3d 27 5c 72 65 | elseif |wrd='\re|
|00001000| 27 20 74 68 65 6e 0d 0a | 20 20 20 20 20 20 20 20 |' then..| |
|00001010| 72 65 70 6c 61 63 65 6c | 69 6e 65 20 6c 69 6e 65 |replacel|ine line|
|00001020| 5f 6c 27 66 7b 7d 27 6c | 69 6e 65 5f 72 0d 0a 20 |_l'f{}'l|ine_r.. |
|00001030| 20 20 20 20 20 20 20 69 | 66 20 6e 6f 74 20 69 6e | i|f not in|
|00001040| 73 65 72 74 5f 73 74 61 | 74 65 28 29 20 74 68 65 |sert_sta|te() the|
|00001050| 6e 20 69 6e 73 65 72 74 | 5f 74 6f 67 67 6c 65 0d |n insert|_toggle.|
|00001060| 0a 20 20 20 20 20 20 20 | 20 63 6f 6d 70 69 6c 65 |. | compile|
|00001070| 20 69 66 20 45 56 45 52 | 53 49 4f 4e 20 3e 3d 20 | if EVER|SION >= |
|00001080| 27 35 2e 35 30 27 0d 0a | 20 20 20 20 20 20 20 20 |'5.50'..| |
|00001090| 20 20 63 61 6c 6c 20 66 | 69 78 75 70 5f 63 75 72 | call f|ixup_cur|
|000010a0| 73 6f 72 28 29 0d 0a 20 | 20 20 20 20 20 20 20 63 |sor().. | c|
|000010b0| 6f 6d 70 69 6c 65 20 65 | 6e 64 69 66 0d 0a 20 20 |ompile e|ndif.. |
|000010c0| 20 20 20 20 20 20 65 6e | 64 69 66 0d 0a 20 20 20 | en|dif.. |
|000010d0| 20 20 20 20 20 2e 63 6f | 6c 3d 2e 63 6f 6c 2b 32 | .co|l=.col+2|
|000010e0| 20 20 2d 2d 20 72 65 70 | 6f 73 69 74 69 6f 6e 20 | -- rep|osition |
|000010f0| 63 75 72 73 6f 72 0d 0a | 2d 2d 20 65 78 70 61 6e |cursor..|-- expan|
|00001100| 64 20 5c 66 72 61 63 74 | 69 6f 6e 0d 0a 20 20 20 |d \fract|ion.. |
|00001110| 20 20 20 65 6c 73 65 69 | 66 20 77 72 64 3d 27 5c | elsei|f wrd='\|
|00001120| 66 72 27 20 74 68 65 6e | 0d 0a 20 20 20 20 20 20 |fr' then|.. |
|00001130| 20 20 72 65 70 6c 61 63 | 65 6c 69 6e 65 20 6c 69 | replac|eline li|
|00001140| 6e 65 5f 6c 27 61 63 7b | 7d 7b 7d 27 6c 69 6e 65 |ne_l'ac{|}{}'line|
|00001150| 5f 72 0d 0a 20 20 20 20 | 20 20 20 20 69 66 20 6e |_r.. | if n|
|00001160| 6f 74 20 69 6e 73 65 72 | 74 5f 73 74 61 74 65 28 |ot inser|t_state(|
|00001170| 29 20 74 68 65 6e 20 69 | 6e 73 65 72 74 5f 74 6f |) then i|nsert_to|
|00001180| 67 67 6c 65 0d 0a 20 20 | 20 20 20 20 20 20 63 6f |ggle.. | co|
|00001190| 6d 70 69 6c 65 20 69 66 | 20 45 56 45 52 53 49 4f |mpile if| EVERSIO|
|000011a0| 4e 20 3e 3d 20 27 35 2e | 35 30 27 0d 0a 20 20 20 |N >= '5.|50'.. |
|000011b0| 20 20 20 20 20 20 20 63 | 61 6c 6c 20 66 69 78 75 | c|all fixu|
|000011c0| 70 5f 63 75 72 73 6f 72 | 28 29 0d 0a 20 20 20 20 |p_cursor|().. |
|000011d0| 20 20 20 20 63 6f 6d 70 | 69 6c 65 20 65 6e 64 69 | comp|ile endi|
|000011e0| 66 0d 0a 20 20 20 20 20 | 20 20 20 65 6e 64 69 66 |f.. | endif|
|000011f0| 0d 0a 20 20 20 20 20 20 | 20 20 2e 63 6f 6c 3d 2e |.. | .col=.|
|00001200| 63 6f 6c 2b 33 20 20 2d | 2d 20 72 65 70 6f 73 69 |col+3 -|- reposi|
|00001210| 74 69 6f 6e 20 63 75 72 | 73 6f 72 0d 0a 2d 2d 20 |tion cur|sor..-- |
|00001220| 65 78 70 61 6e 64 20 65 | 71 75 61 74 69 6f 6e 0d |expand e|quation.|
|00001230| 0a 20 20 20 20 20 20 65 | 6c 73 65 69 66 20 77 72 |. e|lseif wr|
|00001240| 64 3d 27 65 71 75 27 20 | 74 68 65 6e 0d 0a 20 20 |d='equ' |then.. |
|00001250| 20 20 20 20 20 20 72 65 | 70 6c 61 63 65 6c 69 6e | re|placelin|
|00001260| 65 20 6c 69 6e 65 5f 6c | 27 61 74 69 6f 6e 27 6c |e line_l|'ation'l|
|00001270| 69 6e 65 5f 72 0d 0a 20 | 20 20 20 20 20 20 20 69 |ine_r.. | i|
|00001280| 66 20 6e 6f 74 20 69 6e | 73 65 72 74 5f 73 74 61 |f not in|sert_sta|
|00001290| 74 65 28 29 20 74 68 65 | 6e 20 69 6e 73 65 72 74 |te() the|n insert|
|000012a0| 5f 74 6f 67 67 6c 65 0d | 0a 20 20 20 20 20 20 20 |_toggle.|. |
|000012b0| 20 63 6f 6d 70 69 6c 65 | 20 69 66 20 45 56 45 52 | compile| if EVER|
|000012c0| 53 49 4f 4e 20 3e 3d 20 | 27 35 2e 35 30 27 0d 0a |SION >= |'5.50'..|
|000012d0| 20 20 20 20 20 20 20 20 | 20 20 63 61 6c 6c 20 66 | | call f|
|000012e0| 69 78 75 70 5f 63 75 72 | 73 6f 72 28 29 0d 0a 20 |ixup_cur|sor().. |
|000012f0| 20 20 20 20 20 20 20 63 | 6f 6d 70 69 6c 65 20 65 | c|ompile e|
|00001300| 6e 64 69 66 0d 0a 20 20 | 20 20 20 20 20 20 65 6e |ndif.. | en|
|00001310| 64 69 66 0d 0a 20 20 20 | 20 20 20 20 20 2e 63 6f |dif.. | .co|
|00001320| 6c 3d 2e 63 6f 6c 2b 36 | 20 20 2d 2d 20 72 65 70 |l=.col+6| -- rep|
|00001330| 6f 73 69 74 69 6f 6e 20 | 63 75 72 73 6f 72 0d 0a |osition |cursor..|
|00001340| 2d 2d 20 65 78 70 61 6e | 64 20 65 71 6e 61 72 72 |-- expan|d eqnarr|
|00001350| 61 79 0d 0a 20 20 20 20 | 20 20 65 6c 73 65 69 66 |ay.. | elseif|
|00001360| 20 77 72 64 3d 27 65 71 | 6e 27 20 74 68 65 6e 0d | wrd='eq|n' then.|
|00001370| 0a 20 20 20 20 20 20 20 | 20 72 65 70 6c 61 63 65 |. | replace|
|00001380| 6c 69 6e 65 20 6c 69 6e | 65 5f 6c 27 61 72 72 61 |line lin|e_l'arra|
|00001390| 79 27 6c 69 6e 65 5f 72 | 0d 0a 20 20 20 20 20 20 |y'line_r|.. |
|000013a0| 20 20 69 66 20 6e 6f 74 | 20 69 6e 73 65 72 74 5f | if not| insert_|
|000013b0| 73 74 61 74 65 28 29 20 | 74 68 65 6e 20 69 6e 73 |state() |then ins|
|000013c0| 65 72 74 5f 74 6f 67 67 | 6c 65 0d 0a 20 20 20 20 |ert_togg|le.. |
|000013d0| 20 20 20 20 63 6f 6d 70 | 69 6c 65 20 69 66 20 45 | comp|ile if E|
|000013e0| 56 45 52 53 49 4f 4e 20 | 3e 3d 20 27 35 2e 35 30 |VERSION |>= '5.50|
|000013f0| 27 0d 0a 20 20 20 20 20 | 20 20 20 20 20 63 61 6c |'.. | cal|
|00001400| 6c 20 66 69 78 75 70 5f | 63 75 72 73 6f 72 28 29 |l fixup_|cursor()|
|00001410| 0d 0a 20 20 20 20 20 20 | 20 20 63 6f 6d 70 69 6c |.. | compil|
|00001420| 65 20 65 6e 64 69 66 0d | 0a 20 20 20 20 20 20 20 |e endif.|. |
|00001430| 20 65 6e 64 69 66 0d 0a | 20 20 20 20 20 20 20 20 | endif..| |
|00001440| 2e 63 6f 6c 3d 2e 63 6f | 6c 2b 36 20 20 2d 2d 20 |.col=.co|l+6 -- |
|00001450| 72 65 70 6f 73 69 74 69 | 6f 6e 20 63 75 72 73 6f |repositi|on curso|
|00001460| 72 0d 0a 2d 2d 20 65 78 | 70 61 6e 64 20 66 6f 6f |r..-- ex|pand foo|
|00001470| 74 6e 6f 74 65 0d 0a 20 | 20 20 20 20 20 65 6c 73 |tnote.. | els|
|00001480| 65 69 66 20 77 72 64 3d | 27 5c 66 6f 27 20 74 68 |eif wrd=|'\fo' th|
|00001490| 65 6e 0d 0a 20 20 20 20 | 20 20 20 20 72 65 70 6c |en.. | repl|
|000014a0| 61 63 65 6c 69 6e 65 20 | 6c 69 6e 65 5f 6c 27 6f |aceline |line_l'o|
|000014b0| 74 6e 6f 74 65 7b 7d 27 | 6c 69 6e 65 5f 72 0d 0a |tnote{}'|line_r..|
|000014c0| 20 20 20 20 20 20 20 20 | 69 66 20 6e 6f 74 20 69 | |if not i|
|000014d0| 6e 73 65 72 74 5f 73 74 | 61 74 65 28 29 20 74 68 |nsert_st|ate() th|
|000014e0| 65 6e 20 69 6e 73 65 72 | 74 5f 74 6f 67 67 6c 65 |en inser|t_toggle|
|000014f0| 0d 0a 20 20 20 20 20 20 | 20 20 63 6f 6d 70 69 6c |.. | compil|
|00001500| 65 20 69 66 20 45 56 45 | 52 53 49 4f 4e 20 3e 3d |e if EVE|RSION >=|
|00001510| 20 27 35 2e 35 30 27 0d | 0a 20 20 20 20 20 20 20 | '5.50'.|. |
|00001520| 20 20 20 63 61 6c 6c 20 | 66 69 78 75 70 5f 63 75 | call |fixup_cu|
|00001530| 72 73 6f 72 28 29 0d 0a | 20 20 20 20 20 20 20 20 |rsor()..| |
|00001540| 63 6f 6d 70 69 6c 65 20 | 65 6e 64 69 66 0d 0a 20 |compile |endif.. |
|00001550| 20 20 20 20 20 20 20 65 | 6e 64 69 66 0d 0a 20 20 | e|ndif.. |
|00001560| 20 20 20 20 20 20 2e 63 | 6f 6c 3d 2e 63 6f 6c 2b | .c|ol=.col+|
|00001570| 37 20 20 2d 2d 20 72 65 | 70 6f 73 69 74 69 6f 6e |7 -- re|position|
|00001580| 20 63 75 72 73 6f 72 0d | 0a 2d 2d 20 65 78 70 61 | cursor.|.-- expa|
|00001590| 6e 64 20 70 61 67 65 72 | 65 66 0d 0a 20 20 20 20 |nd pager|ef.. |
|000015a0| 20 20 65 6c 73 65 69 66 | 20 77 72 64 3d 27 5c 70 | elseif| wrd='\p|
|000015b0| 61 27 20 74 68 65 6e 0d | 0a 20 20 20 20 20 20 20 |a' then.|. |
|000015c0| 20 72 65 70 6c 61 63 65 | 6c 69 6e 65 20 6c 69 6e | replace|line lin|
|000015d0| 65 5f 6c 27 67 65 72 65 | 66 7b 7d 27 6c 69 6e 65 |e_l'gere|f{}'line|
|000015e0| 5f 72 0d 0a 20 20 20 20 | 20 20 20 20 69 66 20 6e |_r.. | if n|
|000015f0| 6f 74 20 69 6e 73 65 72 | 74 5f 73 74 61 74 65 28 |ot inser|t_state(|
|00001600| 29 20 74 68 65 6e 20 69 | 6e 73 65 72 74 5f 74 6f |) then i|nsert_to|
|00001610| 67 67 6c 65 0d 0a 20 20 | 20 20 20 20 20 20 63 6f |ggle.. | co|
|00001620| 6d 70 69 6c 65 20 69 66 | 20 45 56 45 52 53 49 4f |mpile if| EVERSIO|
|00001630| 4e 20 3e 3d 20 27 35 2e | 35 30 27 0d 0a 20 20 20 |N >= '5.|50'.. |
|00001640| 20 20 20 20 20 20 20 63 | 61 6c 6c 20 66 69 78 75 | c|all fixu|
|00001650| 70 5f 63 75 72 73 6f 72 | 28 29 0d 0a 20 20 20 20 |p_cursor|().. |
|00001660| 20 20 20 20 63 6f 6d 70 | 69 6c 65 20 65 6e 64 69 | comp|ile endi|
|00001670| 66 0d 0a 20 20 20 20 20 | 20 20 20 65 6e 64 69 66 |f.. | endif|
|00001680| 0d 0a 20 20 20 20 20 20 | 20 20 2e 63 6f 6c 3d 2e |.. | .col=.|
|00001690| 63 6f 6c 2b 36 20 20 2d | 2d 20 72 65 70 6f 73 69 |col+6 -|- reposi|
|000016a0| 74 69 6f 6e 20 63 75 72 | 73 6f 72 0d 0a 2d 2d 20 |tion cur|sor..-- |
|000016b0| 66 75 74 75 72 65 20 65 | 78 70 61 6e 73 69 6f 6e |future e|xpansion|
|000016c0| 73 20 61 64 64 65 64 20 | 68 65 72 65 0d 0a 20 20 |s added |here.. |
|000016d0| 20 20 20 20 65 6c 73 65 | 20 20 2d 2d 20 77 72 64 | else| -- wrd|
|000016e0| 20 3d 0d 0a 20 20 20 20 | 20 20 20 20 72 65 74 63 | =.. | retc|
|000016f0| 3d 30 20 20 2d 2d 20 64 | 69 64 6e 27 74 20 6d 61 |=0 -- d|idn't ma|
|00001700| 74 63 68 20 77 72 64 2c | 20 6e 6f 20 65 78 70 61 |tch wrd,| no expa|
|00001710| 6e 73 69 6f 6e 20 70 65 | 72 66 6f 72 6d 65 64 0d |nsion pe|rformed.|
|00001720| 0a 20 20 20 20 20 20 65 | 6e 64 69 66 0d 0a 20 20 |. e|ndif.. |
|00001730| 20 20 65 6c 73 65 20 20 | 20 2d 2d 20 2e 6c 69 6e | else | -- .lin|
|00001740| 65 20 20 61 74 20 74 6f | 70 20 6f 66 20 66 69 6c |e at to|p of fil|
|00001750| 65 2c 20 61 62 6f 72 74 | 20 65 78 70 61 6e 73 69 |e, abort| expansi|
|00001760| 6f 6e 0d 0a 20 20 20 20 | 20 20 72 65 74 63 3d 30 |on.. | retc=0|
|00001770| 0d 0a 20 20 20 20 65 6e | 64 69 66 20 20 2d 2d 20 |.. en|dif -- |
|00001780| 2e 6c 69 6e 65 20 3d 20 | 30 0d 0a 20 20 72 65 74 |.line = |0.. ret|
|00001790| 75 72 6e 20 72 65 74 63 | 0d 0a 0d 0a 2f 2a 0d 0a |urn retc|..../*..|
|000017a0| da c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |........|........|
|000017b0| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |........|........|
|000017c0| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |........|........|
|000017d0| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |........|........|
|000017e0| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 bf 0d 0a |........|........|
|000017f0| b3 20 20 44 65 66 69 6e | 65 20 73 65 63 6f 6e 64 |. Defin|e second|
|00001800| 20 54 65 58 20 73 79 6e | 74 61 78 20 65 78 70 61 | TeX syn|tax expa|
|00001810| 6e 73 69 6f 6e 20 70 72 | 6f 63 65 64 75 72 65 20 |nsion pr|ocedure |
|00001820| 66 6f 72 20 73 70 61 63 | 65 62 61 72 20 61 6e 64 |for spac|ebar and|
|00001830| 20 65 6e 74 65 72 20 20 | 20 20 20 20 20 b3 0d 0a | enter | ...|
|00001840| b3 20 20 20 20 2d 2d 20 | 72 65 74 75 72 6e 73 20 |. -- |returns |
|00001850| 31 20 69 66 20 65 78 70 | 61 6e 73 69 6f 6e 20 70 |1 if exp|ansion p|
|00001860| 65 72 66 6f 72 6d 65 64 | 20 20 20 20 20 20 20 20 |erformed| |
|00001870| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001880| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 b3 0d 0a | | ...|
|00001890| c0 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |........|........|
|000018a0| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |........|........|
|000018b0| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |........|........|
|000018c0| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |........|........|
|000018d0| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 d9 0d 0a |........|........|
|000018e0| 2a 2f 0d 0a 20 20 64 65 | 66 70 72 6f 63 20 74 65 |*/.. de|fproc te|
|000018f0| 78 5f 73 65 63 6f 6e 64 | 5f 65 78 70 61 6e 73 69 |x_second|_expansi|
|00001900| 6f 6e 0d 0a 20 20 20 20 | 72 65 74 63 3d 31 20 20 |on.. |retc=1 |
|00001910| 2d 2d 20 64 65 66 61 75 | 6c 74 20 72 65 74 75 72 |-- defau|lt retur|
|00001920| 6e 20 76 61 6c 75 65 0d | 0a 20 20 20 20 69 66 20 |n value.|. if |
|00001930| 2e 6c 69 6e 65 20 74 68 | 65 6e 0d 0a 20 20 20 20 |.line th|en.. |
|00001940| 20 20 67 65 74 6c 69 6e | 65 20 6c 69 6e 0d 0a 20 | getlin|e lin.. |
|00001950| 20 20 20 20 20 70 61 72 | 73 65 20 76 61 6c 75 65 | par|se value|
|00001960| 20 6c 69 6e 20 77 69 74 | 68 20 27 5c 62 65 67 69 | lin wit|h '\begi|
|00001970| 6e 7b 27 74 65 78 77 6f | 72 64 27 7d 27 61 72 67 |n{'texwo|rd'}'arg|
|00001980| 73 0d 0a 20 20 20 20 20 | 20 2d 2d 20 65 6e 76 69 |s.. | -- envi|
|00001990| 72 6f 6e 6d 65 6e 74 20 | 72 65 63 6f 67 6e 69 7a |ronment |recogniz|
|000019a0| 65 64 3f 0d 0a 20 20 20 | 20 20 20 69 66 20 74 65 |ed?.. | if te|
|000019b0| 78 77 6f 72 64 20 3c 3e | 20 27 27 20 74 68 65 6e |xword <>| '' then|
|000019c0| 0d 0a 20 20 20 20 20 20 | 20 20 63 3d 6d 61 78 28 |.. | c=max(|
|000019d0| 31 2c 76 65 72 69 66 79 | 28 6c 69 6e 2c 27 20 27 |1,verify|(lin,' '|
|000019e0| 29 29 2d 31 20 2d 2d 20 | 6e 75 6d 62 65 72 20 6f |))-1 -- |number o|
|000019f0| 66 20 73 70 61 63 65 73 | 20 62 65 66 6f 72 65 20 |f spaces| before |
|00001a00| 66 69 72 73 74 20 77 6f | 72 64 0d 0a 20 20 20 20 |first wo|rd.. |
|00001a10| 20 20 20 20 69 66 20 74 | 65 78 77 6f 72 64 3d 27 | if t|exword='|
|00001a20| 74 61 62 75 6c 61 72 27 | 20 61 6e 64 20 61 72 67 |tabular'| and arg|
|00001a30| 73 20 3d 20 27 27 20 74 | 68 65 6e 20 0d 0a 20 20 |s = '' t|hen .. |
|00001a40| 20 20 20 20 20 20 20 20 | 2d 2d 20 73 74 61 79 20 | |-- stay |
|00001a50| 63 6f 6d 70 61 74 69 62 | 6c 65 20 77 69 74 68 20 |compatib|le with |
|00001a60| 70 72 65 76 69 6f 75 73 | 20 62 65 68 61 76 69 6f |previous| behavio|
|00001a70| 75 72 3a 0d 0a 20 20 20 | 20 20 20 20 20 20 20 6c |ur:.. | l|
|00001a80| 69 6e 65 5f 6c 3d 73 75 | 62 73 74 72 28 6c 69 6e |ine_l=su|bstr(lin|
|00001a90| 2c 31 2c 2e 63 6f 6c 29 | 0d 0a 20 20 20 20 20 20 |,1,.col)|.. |
|00001aa0| 20 20 20 20 6c 69 6e 65 | 5f 72 3d 73 75 62 73 74 | line|_r=subst|
|00001ab0| 72 28 6c 69 6e 2c 2e 63 | 6f 6c 2b 31 29 0d 0a 20 |r(lin,.c|ol+1).. |
|00001ac0| 20 20 20 20 20 20 20 20 | 20 72 65 70 6c 61 63 65 | | replace|
|00001ad0| 6c 69 6e 65 20 6c 69 6e | 65 5f 6c 27 7b 7c 63 7c |line lin|e_l'{|c||
|00001ae0| 7d 27 6c 69 6e 65 5f 72 | 0d 0a 20 20 20 20 20 20 |}'line_r|.. |
|00001af0| 20 20 20 20 69 6e 73 65 | 72 74 6c 69 6e 65 20 73 | inse|rtline s|
|00001b00| 75 62 73 74 72 28 27 27 | 2c 31 2c 63 29 27 5c 65 |ubstr(''|,1,c)'\e|
|00001b10| 6e 64 7b 27 74 65 78 77 | 6f 72 64 27 7d 27 2c 2e |nd{'texw|ord'}',.|
|00001b20| 6c 69 6e 65 2b 31 0d 0a | 20 20 20 20 20 20 20 20 |line+1..| |
|00001b30| 65 6c 73 65 69 66 20 74 | 65 78 77 6f 72 64 3d 27 |elseif t|exword='|
|00001b40| 6d 61 63 72 6f 63 6f 64 | 65 27 20 74 68 65 6e 0d |macrocod|e' then.|
|00001b50| 0a 20 20 20 20 20 20 20 | 20 20 20 72 65 70 6c 61 |. | repla|
|00001b60| 63 65 6c 69 6e 65 20 27 | 25 20 20 20 20 5c 62 65 |celine '|% \be|
|00001b70| 67 69 6e 7b 6d 61 63 72 | 6f 63 6f 64 65 7d 27 0d |gin{macr|ocode}'.|
|00001b80| 0a 20 20 20 20 20 20 20 | 20 20 20 69 6e 73 65 72 |. | inser|
|00001b90| 74 6c 69 6e 65 20 27 25 | 20 20 20 20 5c 65 6e 64 |tline '%| \end|
|00001ba0| 7b 6d 61 63 72 6f 63 6f | 64 65 7d 27 2c 2e 6c 69 |{macroco|de}',.li|
|00001bb0| 6e 65 2b 31 0d 0a 20 20 | 20 20 20 20 20 20 65 6c |ne+1.. | el|
|00001bc0| 73 65 0d 0a 20 20 20 20 | 20 20 20 20 20 20 69 6e |se.. | in|
|00001bd0| 73 65 72 74 6c 69 6e 65 | 20 73 75 62 73 74 72 28 |sertline| substr(|
|00001be0| 27 27 2c 31 2c 63 29 27 | 5c 65 6e 64 7b 27 74 65 |'',1,c)'|\end{'te|
|00001bf0| 78 77 6f 72 64 27 7d 27 | 2c 2e 6c 69 6e 65 2b 31 |xword'}'|,.line+1|
|00001c00| 0d 0a 20 20 20 20 20 20 | 20 20 65 6e 64 69 66 0d |.. | endif.|
|00001c10| 0a 20 20 20 20 20 20 20 | 20 63 61 6c 6c 20 65 69 |. | call ei|
|00001c20| 6e 73 65 72 74 5f 6c 69 | 6e 65 28 29 20 20 2d 2d |nsert_li|ne() --|
|00001c30| 20 70 6f 73 69 74 69 6f | 6e 20 63 75 72 73 6f 72 | positio|n cursor|
|00001c40| 20 6f 6e 20 61 20 6e 65 | 77 20 6c 69 6e 65 20 66 | on a ne|w line f|
|00001c50| 6f 6c 6c 6f 77 69 6e 67 | 20 5c 62 65 67 69 6e 0d |ollowing| \begin.|
|00001c60| 0a 63 6f 6d 70 69 6c 65 | 20 69 66 20 28 4c 41 54 |.compile| if (LAT|
|00001c70| 45 58 5f 53 59 4e 54 41 | 58 5f 49 4e 44 45 4e 54 |EX_SYNTA|X_INDENT|
|00001c80| 20 3e 20 30 29 0d 0a 20 | 20 20 20 20 20 20 20 69 | > 0).. | i|
|00001c90| 66 20 28 74 65 78 77 6f | 72 64 20 3d 20 27 76 65 |f (texwo|rd = 've|
|00001ca0| 72 62 61 74 69 6d 27 29 | 20 6f 72 20 0d 0a 20 20 |rbatim')| or .. |
|00001cb0| 20 20 20 20 20 20 20 20 | 20 28 74 65 78 77 6f 72 | | (texwor|
|00001cc0| 64 20 3d 20 27 76 65 72 | 62 61 74 69 6d 2a 27 29 |d = 'ver|batim*')|
|00001cd0| 20 6f 72 20 0d 0a 20 20 | 20 20 20 20 20 20 20 20 | or .. | |
|00001ce0| 20 28 74 65 78 77 6f 72 | 64 20 3d 20 27 6d 61 63 | (texwor|d = 'mac|
|00001cf0| 72 6f 63 6f 64 65 27 29 | 20 74 68 65 6e 0d 0a 20 |rocode')| then.. |
|00001d00| 20 20 20 20 20 20 20 20 | 20 20 2e 63 6f 6c 20 3d | | .col =|
|00001d10| 20 31 0d 0a 20 20 20 20 | 20 20 20 20 65 6c 73 65 | 1.. | else|
|00001d20| 69 66 20 28 74 65 78 77 | 6f 72 64 20 3c 3e 20 27 |if (texw|ord <> '|
|00001d30| 64 6f 63 75 6d 65 6e 74 | 27 29 20 74 68 65 6e 0d |document|') then.|
|00001d40| 0a 20 20 20 20 20 20 20 | 20 20 20 20 2e 63 6f 6c |. | .col|
|00001d50| 20 3d 20 2e 63 6f 6c 20 | 2b 20 4c 41 54 45 58 5f | = .col |+ LATEX_|
|00001d60| 53 59 4e 54 41 58 5f 49 | 4e 44 45 4e 54 0d 0a 20 |SYNTAX_I|NDENT.. |
|00001d70| 20 20 20 20 20 20 20 65 | 6e 64 69 66 0d 0a 63 6f | e|ndif..co|
|00001d80| 6d 70 69 6c 65 20 65 6e | 64 69 66 20 20 20 20 20 |mpile en|dif |
|00001d90| 20 20 20 0d 0a 20 20 20 | 20 20 20 65 6c 73 65 20 | .. | else |
|00001da0| 0d 0a 20 20 20 20 20 20 | 20 20 72 65 74 63 3d 30 |.. | retc=0|
|00001db0| 0d 0a 20 20 20 20 20 20 | 65 6e 64 69 66 20 2d 2d |.. |endif --|
|00001dc0| 20 74 65 78 77 6f 72 64 | 20 3c 3e 20 27 27 0d 0a | texword| <> ''..|
|00001dd0| 20 20 20 20 65 6c 73 65 | 0d 0a 20 20 20 20 20 20 | else|.. |
|00001de0| 72 65 74 63 3d 30 0d 0a | 20 20 20 20 65 6e 64 69 |retc=0..| endi|
|00001df0| 66 20 2d 2d 20 2e 6c 69 | 6e 65 0d 0a 20 20 72 65 |f -- .li|ne.. re|
|00001e00| 74 75 72 6e 20 72 65 74 | 63 0d 0a 0d 0a 2d 2d 20 |turn ret|c....-- |
|00001e10| 66 69 6e 69 73 0d 0a | |finis.. | |
+--------+-------------------------+-------------------------+--------+--------+