home *** CD-ROM | disk | FTP | other *** search
Texinfo Document | 1996-10-12 | 17.7 KB |
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: Texinfo Document
(document/texInfo).
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| LaTeX Document (document/latex)
| magic
| Supported |
100%
| dexvert
| Texinfo Document (document/texInfo)
| magic
| Supported |
1%
| dexvert
| Corel 10 Texture (image/corel10Texture)
| ext
| Unsupported |
1%
| dexvert
| Croteam texture file (image/croteamTextureFile)
| ext
| Unsupported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| LaTeX auxiliary file
| default
| |
99%
| file
| TeX document text
| default
| |
98%
| file
| LaTeX document, ASCII text
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| siegfried
| x-fmt/111 Plain Text File
| default
| |
100%
| detectItEasy
| Format: plain text[LF]
| default (weak)
| |
100%
| xdgMime
| text/x-matlab
| default (weak)
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 25 09 09 74 62 31 31 65 | 70 70 73 74 65 69 6e 2e |%..tb11e|ppstein.|
|00000010| 74 65 78 0a 0a 5c 54 69 | 74 6c 65 20 54 72 65 65 |tex..\Ti|tle Tree|
|00000020| 73 20 69 6e 20 5c 54 65 | 58 0a 5c 5c 44 61 76 69 |s in \Te|X.\\Davi|
|00000030| 64 20 45 70 70 73 74 65 | 69 6e 0a 5c 65 6e 64 78 |d Eppste|in.\endx|
|00000040| 0a 0a 25 09 54 68 69 73 | 20 70 61 70 65 72 20 77 |..%.This| paper w|
|00000050| 61 73 20 70 75 62 6c 69 | 73 68 65 64 20 69 6e 20 |as publi|shed in |
|00000060| 54 55 47 62 6f 61 74 20 | 36 23 31 2c 20 4d 61 72 |TUGboat |6#1, Mar|
|00000070| 63 68 20 31 39 38 35 2e | 0a 25 09 44 61 76 69 64 |ch 1985.|.%.David|
|00000080| 20 45 70 70 73 74 65 69 | 6e 27 73 20 61 64 64 72 | Eppstei|n's addr|
|00000090| 65 73 73 20 28 61 73 20 | 6f 66 20 31 35 20 4a 75 |ess (as |of 15 Ju|
|000000a0| 6e 65 20 31 39 38 38 29 | 20 69 73 0a 25 09 09 43 |ne 1988)| is.%..C|
|000000b0| 6f 6d 70 75 74 65 72 20 | 53 63 69 65 6e 63 65 20 |omputer |Science |
|000000c0| 44 65 70 61 72 74 6d 65 | 6e 74 0a 25 09 09 43 6f |Departme|nt.%..Co|
|000000d0| 6c 75 6d 62 69 61 20 55 | 6e 69 76 65 72 73 69 74 |lumbia U|niversit|
|000000e0| 79 0a 25 09 09 4e 65 77 | 20 59 6f 72 6b 2c 20 4e |y.%..New| York, N|
|000000f0| 59 20 31 30 30 32 37 0a | 25 09 09 45 70 70 73 74 |Y 10027.|%..Eppst|
|00000100| 65 69 6e 40 63 73 2e 43 | 6f 6c 75 6d 62 69 61 2e |ein@cs.C|olumbia.|
|00000110| 65 64 75 0a 0a 25 20 46 | 69 72 73 74 20 74 68 65 |edu..% F|irst the|
|00000120| 20 74 72 65 65 20 6d 61 | 63 72 6f 20 64 65 66 69 | tree ma|cro defi|
|00000130| 6e 69 74 69 6f 6e 73 2e | 0a 0a 5c 69 6e 70 75 74 |nitions.|..\input|
|00000140| 20 74 72 65 65 64 65 66 | 0a 0a 25 20 4e 6f 77 20 | treedef|..% Now |
|00000150| 74 68 65 20 70 61 70 65 | 72 20 69 74 73 65 6c 66 |the pape|r itself|
|00000160| 0a 0a 7b 5c 6f 62 65 79 | 73 70 61 63 65 73 5c 67 |..{\obey|spaces\g|
|00000170| 64 65 66 20 7b 5c 69 66 | 76 6d 6f 64 65 5c 69 6e |def {\if|vmode\in|
|00000180| 64 65 6e 74 5c 66 69 5c | 73 70 61 63 65 7d 7d 0a |dent\fi\|space}}.|
|00000190| 7b 5c 63 61 74 63 6f 64 | 65 20 60 7c 3d 30 20 5c |{\catcod|e `|=0 \|
|000001a0| 63 61 74 63 6f 64 65 60 | 5c 5c 3d 31 32 20 7c 67 |catcode`|\\=12 |g|
|000001b0| 64 65 66 7c 76 62 61 72 | 67 23 31 5c 65 6e 64 76 |def|vbar|g#1\endv|
|000001c0| 62 7b 23 31 7c 65 6e 64 | 67 72 6f 75 70 7c 6d 65 |b{#1|end|group|me|
|000001d0| 64 73 6b 69 70 7d 7d 0a | 5c 64 65 66 5c 6d 61 6b |dskip}}.|\def\mak|
|000001e0| 65 6f 74 68 65 72 23 31 | 7b 5c 63 61 74 63 6f 64 |eother#1|{\catcod|
|000001f0| 65 60 23 31 31 32 5c 72 | 65 6c 61 78 7d 0a 5c 64 |e`#112\r|elax}.\d|
|00000200| 65 66 5c 76 62 7b 5c 6d | 65 64 73 6b 69 70 20 5c |ef\vb{\m|edskip \|
|00000210| 62 65 67 69 6e 67 72 6f | 75 70 20 5c 76 65 72 62 |begingro|up \verb|
|00000220| 20 5c 6f 62 65 79 6c 69 | 6e 65 73 20 5c 6f 62 65 | \obeyli|nes \obe|
|00000230| 79 73 70 61 63 65 73 20 | 5c 74 74 20 5c 76 62 61 |yspaces |\tt \vba|
|00000240| 72 67 7d 0a 5c 64 65 66 | 5c 76 65 72 62 7b 5c 6c |rg}.\def|\verb{\l|
|00000250| 65 74 5c 64 6f 5c 6d 61 | 6b 65 6f 74 68 65 72 20 |et\do\ma|keother |
|00000260| 5c 64 6f 73 70 65 63 69 | 61 6c 73 7d 0a 5c 63 61 |\dospeci|als}.\ca|
|00000270| 74 63 6f 64 65 60 5c 2a | 3d 5c 61 63 74 69 76 65 |tcode`\*|=\active|
|00000280| 0a 5c 64 65 66 2a 7b 5c | 62 65 67 69 6e 67 72 6f |.\def*{\|begingro|
|00000290| 75 70 5c 76 65 72 62 5c | 74 74 5c 64 6f 73 74 61 |up\verb\|tt\dosta|
|000002a0| 72 7d 0a 5c 64 65 66 5c | 64 6f 73 74 61 72 23 31 |r}.\def\|dostar#1|
|000002b0| 2a 7b 23 31 5c 65 6e 64 | 67 72 6f 75 70 7d 0a 0a |*{#1\end|group}..|
|000002c0| 25 20 5c 63 65 6e 74 65 | 72 6c 69 6e 65 7b 5c 62 |% \cente|rline{\b|
|000002d0| 66 20 54 72 65 65 73 20 | 69 6e 20 5c 54 65 58 7d |f Trees |in \TeX}|
|000002e0| 0a 25 20 5c 63 65 6e 74 | 65 72 6c 69 6e 65 7b 44 |.% \cent|erline{D|
|000002f0| 61 76 69 64 20 45 70 70 | 73 74 65 69 6e 3b 20 46 |avid Epp|stein; F|
|00000300| 65 62 72 75 61 72 79 20 | 36 2c 20 31 39 38 35 7d |ebruary |6, 1985}|
|00000310| 0a 0a 5c 62 65 67 69 6e | 73 65 63 74 69 6f 6e 20 |..\begin|section |
|00000320| 49 6e 74 72 6f 64 75 63 | 74 69 6f 6e 0a 0a 54 68 |Introduc|tion..Th|
|00000330| 65 72 65 20 61 72 65 20 | 6d 61 6e 79 20 70 6f 73 |ere are |many pos|
|00000340| 73 69 62 6c 65 20 75 73 | 65 73 20 66 6f 72 20 74 |sible us|es for t|
|00000350| 72 65 65 73 20 69 6e 20 | 74 79 70 65 73 65 74 20 |rees in |typeset |
|00000360| 74 65 78 74 2e 20 20 54 | 68 65 20 66 6f 6c 6c 6f |text. T|he follo|
|00000370| 77 69 6e 67 0a 74 61 78 | 6f 6e 6f 6d 79 20 69 6c |wing.tax|onomy il|
|00000380| 6c 75 73 74 72 61 74 65 | 73 20 73 6f 6d 65 20 6f |lustrate|s some o|
|00000390| 66 20 74 68 65 6d 2e 0a | 0a 5c 74 72 65 65 0a 20 |f them..|.\tree. |
|000003a0| 20 54 72 65 65 0a 20 20 | 55 73 65 73 0a 0a 20 20 | Tree. |Uses.. |
|000003b0| 5c 73 75 62 74 72 65 65 | 0a 20 20 20 20 43 6f 6d |\subtree|. Com|
|000003c0| 70 75 74 65 72 0a 20 20 | 20 20 53 63 69 65 6e 63 |puter. | Scienc|
|000003d0| 65 0a 0a 20 20 20 20 5c | 73 75 62 74 72 65 65 0a |e.. \|subtree.|
|000003e0| 20 20 20 20 20 20 44 61 | 74 61 0a 20 20 20 20 20 | Da|ta. |
|000003f0| 20 53 74 72 75 63 74 75 | 72 65 73 0a 20 20 20 20 | Structu|res. |
|00000400| 20 20 0a 20 20 20 20 20 | 20 5c 6c 65 61 66 7b 53 | . | \leaf{S|
|00000410| 65 61 72 63 68 20 54 72 | 65 65 7d 0a 20 20 20 20 |earch Tr|ee}. |
|00000420| 20 20 5c 6c 65 61 66 7b | 50 72 69 6f 72 69 74 79 | \leaf{|Priority|
|00000430| 20 51 75 65 75 65 7d 0a | 20 20 20 20 5c 65 6e 64 | Queue}.| \end|
|00000440| 73 75 62 74 72 65 65 0a | 0a 20 20 20 20 5c 73 75 |subtree.|. \su|
|00000450| 62 74 72 65 65 0a 20 20 | 20 20 20 20 50 61 72 73 |btree. | Pars|
|00000460| 69 6e 67 0a 0a 20 20 20 | 20 20 20 5c 6c 65 61 66 |ing.. | \leaf|
|00000470| 7b 50 61 72 73 65 20 54 | 72 65 65 7d 0a 20 20 20 |{Parse T|ree}. |
|00000480| 20 20 20 5c 6c 65 61 66 | 7b 53 79 6d 62 6f 6c 20 | \leaf|{Symbol |
|00000490| 54 61 62 6c 65 7d 0a 20 | 20 20 20 5c 65 6e 64 73 |Table}. | \ends|
|000004a0| 75 62 74 72 65 65 0a 0a | 20 20 20 20 5c 73 75 62 |ubtree..| \sub|
|000004b0| 74 72 65 65 0a 20 20 20 | 20 20 20 53 74 72 75 63 |tree. | Struc|
|000004c0| 74 75 72 65 64 0a 20 20 | 20 20 20 20 50 72 6f 67 |tured. | Prog|
|000004d0| 72 61 6d 6d 69 6e 67 0a | 20 20 20 20 5c 65 6e 64 |ramming.| \end|
|000004e0| 73 75 62 74 72 65 65 0a | 20 20 5c 65 6e 64 73 75 |subtree.| \endsu|
|000004f0| 62 74 72 65 65 0a 0a 20 | 20 5c 73 75 62 74 72 65 |btree.. | \subtre|
|00000500| 65 0a 20 20 20 20 47 65 | 6e 65 61 6c 6f 67 79 0a |e. Ge|nealogy.|
|00000510| 20 20 20 20 5c 6c 65 61 | 66 7b 41 6e 63 65 73 74 | \lea|f{Ancest|
|00000520| 6f 72 73 7d 0a 20 20 20 | 20 5c 6c 65 61 66 7b 44 |ors}. | \leaf{D|
|00000530| 65 73 63 65 6e 64 61 6e | 74 73 7d 0a 20 20 5c 65 |escendan|ts}. \e|
|00000540| 6e 64 73 75 62 74 72 65 | 65 0a 0a 20 20 5c 73 75 |ndsubtre|e.. \su|
|00000550| 62 74 72 65 65 0a 20 20 | 20 20 54 61 78 6f 6e 6f |btree. | Taxono|
|00000560| 6d 69 65 73 0a 20 20 20 | 20 5c 6c 65 61 66 7b 54 |mies. | \leaf{T|
|00000570| 72 65 65 20 55 73 65 73 | 7d 0a 20 20 5c 65 6e 64 |ree Uses|}. \end|
|00000580| 73 75 62 74 72 65 65 0a | 5c 65 6e 64 74 72 65 65 |subtree.|\endtree|
|00000590| 0a 0a 55 6e 66 6f 72 74 | 75 6e 61 74 65 6c 79 20 |..Unfort|unately |
|000005a0| 5c 54 65 58 5c 20 70 72 | 6f 76 69 64 65 73 20 6e |\TeX\ pr|ovides n|
|000005b0| 6f 20 65 61 73 79 20 77 | 61 79 20 74 6f 20 74 79 |o easy w|ay to ty|
|000005c0| 70 65 73 65 74 20 73 75 | 63 68 20 74 72 65 65 73 |peset su|ch trees|
|000005d0| 2e 0a 4f 6e 65 20 70 6f | 73 73 69 62 6c 65 20 6d |..One po|ssible m|
|000005e0| 65 74 68 6f 64 20 69 73 | 20 67 69 76 65 6e 20 69 |ethod is| given i|
|000005f0| 6e 20 65 78 65 72 63 69 | 73 65 20 32 32 2e 31 34 |n exerci|se 22.14|
|00000600| 20 6f 66 20 74 68 65 20 | 5c 54 65 58 20 62 6f 6f | of the |\TeX boo|
|00000610| 6b 3a 20 75 73 69 6e 67 | 0a 5c 54 65 58 27 73 20 |k: using|.\TeX's |
|00000620| 61 6c 69 67 6e 6d 65 6e | 74 20 70 72 69 6d 69 74 |alignmen|t primit|
|00000630| 69 76 65 73 20 62 79 20 | 68 61 6e 64 2e 20 20 54 |ives by |hand. T|
|00000640| 68 69 73 20 6d 65 74 68 | 6f 64 20 62 65 63 6f 6d |his meth|od becom|
|00000650| 65 73 20 76 65 72 79 20 | 63 6c 75 6d 73 79 20 61 |es very |clumsy a|
|00000660| 73 20 74 68 65 0a 74 72 | 65 65 73 20 67 72 6f 77 |s the.tr|ees grow|
|00000670| 2c 20 68 6f 77 65 76 65 | 72 2e 20 20 41 20 6d 6f |, howeve|r. A mo|
|00000680| 72 65 20 67 65 6e 65 72 | 61 6c 20 74 65 63 68 6e |re gener|al techn|
|00000690| 69 71 75 65 20 69 73 20 | 74 6f 20 77 72 69 74 65 |ique is |to write|
|000006a0| 20 61 20 73 65 74 20 6f | 66 20 74 72 65 65 0a 63 | a set o|f tree.c|
|000006b0| 6f 6e 73 74 72 75 63 74 | 69 6f 6e 20 6d 61 63 72 |onstruct|ion macr|
|000006c0| 6f 73 3b 20 74 68 61 74 | 20 69 73 20 74 68 65 20 |os; that| is the |
|000006d0| 61 70 70 72 6f 61 63 68 | 20 74 61 6b 65 6e 20 69 |approach| taken i|
|000006e0| 6e 20 74 68 69 73 20 70 | 61 70 65 72 2e 20 20 54 |n this p|aper. T|
|000006f0| 68 65 0a 74 61 78 6f 6e | 6f 6d 79 20 61 62 6f 76 |he.taxon|omy abov|
|00000700| 65 20 77 61 73 20 74 79 | 70 65 73 65 74 20 77 69 |e was ty|peset wi|
|00000710| 74 68 20 74 68 65 20 66 | 6f 6c 6c 6f 77 69 6e 67 |th the f|ollowing|
|00000720| 20 69 6e 70 75 74 3a 0a | 0a 5c 76 62 0a 5c 74 72 | input:.|.\vb.\tr|
|00000730| 65 65 0a 20 20 54 72 65 | 65 0a 20 20 55 73 65 73 |ee. Tre|e. Uses|
|00000740| 0a 0a 20 20 5c 73 75 62 | 74 72 65 65 0a 20 20 20 |.. \sub|tree. |
|00000750| 20 43 6f 6d 70 75 74 65 | 72 0a 20 20 20 20 53 63 | Compute|r. Sc|
|00000760| 69 65 6e 63 65 0a 0a 20 | 20 20 20 5c 73 75 62 74 |ience.. | \subt|
|00000770| 72 65 65 0a 20 20 20 20 | 20 20 44 61 74 61 0a 20 |ree. | Data. |
|00000780| 20 20 20 20 20 53 74 72 | 75 63 74 75 72 65 73 0a | Str|uctures.|
|00000790| 0a 20 20 20 20 20 20 5c | 6c 65 61 66 7b 53 65 61 |. \|leaf{Sea|
|000007a0| 72 63 68 20 54 72 65 65 | 7d 0a 20 20 20 20 20 20 |rch Tree|}. |
|000007b0| 5c 6c 65 61 66 7b 50 72 | 69 6f 72 69 74 79 20 51 |\leaf{Pr|iority Q|
|000007c0| 75 65 75 65 7d 0a 20 20 | 20 20 5c 65 6e 64 73 75 |ueue}. | \endsu|
|000007d0| 62 74 72 65 65 0a 20 20 | 20 20 2e 2e 2e 0a 20 20 |btree. | .... |
|000007e0| 5c 65 6e 64 73 75 62 74 | 72 65 65 0a 20 20 2e 2e |\endsubt|ree. ..|
|000007f0| 2e 0a 5c 65 6e 64 74 72 | 65 65 0a 5c 65 6e 64 76 |..\endtr|ee.\endv|
|00000800| 62 0a 0a 49 74 20 74 75 | 72 6e 73 20 6f 75 74 20 |b..It tu|rns out |
|00000810| 74 68 61 74 20 5c 54 65 | 58 27 73 20 61 6c 69 67 |that \Te|X's alig|
|00000820| 6e 6d 65 6e 74 20 70 72 | 69 6d 69 74 69 76 65 73 |nment pr|imitives|
|00000830| 20 61 72 65 20 6e 6f 74 | 20 76 65 72 79 20 77 65 | are not| very we|
|00000840| 6c 6c 20 73 75 69 74 65 | 64 20 74 6f 0a 61 75 74 |ll suite|d to.aut|
|00000850| 6f 6d 61 74 69 63 20 67 | 65 6e 65 72 61 74 69 6f |omatic g|eneratio|
|00000860| 6e 20 6f 66 20 74 72 65 | 65 73 2e 20 20 54 68 65 |n of tre|es. The|
|00000870| 20 6c 65 66 74 20 65 64 | 67 65 73 20 6f 66 20 74 | left ed|ges of t|
|00000880| 68 65 20 74 72 65 65 73 | 20 61 74 20 65 61 63 68 |he trees| at each|
|00000890| 0a 6c 65 76 65 6c 20 63 | 61 6e 20 65 61 73 69 6c |.level c|an easil|
|000008a0| 79 20 62 65 20 6d 61 64 | 65 20 74 6f 20 6c 69 6e |y be mad|e to lin|
|000008b0| 65 20 75 70 2c 20 62 75 | 74 20 69 74 20 69 73 20 |e up, bu|t it is |
|000008c0| 64 69 66 66 69 63 75 6c | 74 20 74 6f 20 63 65 6e |difficul|t to cen|
|000008d0| 74 65 72 0a 6c 69 6e 65 | 73 20 6f 66 20 74 65 78 |ter.line|s of tex|
|000008e0| 74 20 66 6f 72 20 74 68 | 65 20 72 6f 6f 74 20 6f |t for th|e root o|
|000008f0| 66 20 61 20 74 72 65 65 | 20 69 6e 20 76 65 72 74 |f a tree| in vert|
|00000900| 69 63 61 6c 20 72 65 6c | 61 74 69 6f 6e 20 74 6f |ical rel|ation to|
|00000910| 20 69 74 73 20 73 75 62 | 74 72 65 65 73 2e 0a 49 | its sub|trees..I|
|00000920| 6e 73 74 65 61 64 2c 20 | 74 68 65 20 6d 61 63 72 |nstead, |the macr|
|00000930| 6f 73 20 64 65 73 63 72 | 69 62 65 64 20 68 65 72 |os descr|ibed her|
|00000940| 65 20 63 6f 6e 73 74 72 | 75 63 74 20 74 72 65 65 |e constr|uct tree|
|00000950| 73 20 66 72 6f 6d 20 62 | 6f 78 65 73 20 61 6e 64 |s from b|oxes and|
|00000960| 0a 67 6c 75 65 2c 20 64 | 6f 69 6e 67 20 74 68 65 |.glue, d|oing the|
|00000970| 20 61 6c 69 67 6e 6d 65 | 6e 74 20 74 68 65 6d 73 | alignme|nt thems|
|00000980| 65 6c 76 65 73 2e 20 20 | 54 68 69 73 20 69 73 20 |elves. |This is |
|00000990| 6e 6f 74 20 71 75 69 74 | 65 20 61 73 20 73 69 6d |not quit|e as sim|
|000009a0| 70 6c 65 20 61 73 0a 69 | 74 20 73 6f 75 6e 64 73 |ple as.i|t sounds|
|000009b0| 2d 2d 2d 69 74 20 77 6f | 75 6c 64 20 62 65 20 69 |---it wo|uld be i|
|000009c0| 6e 63 6f 72 72 65 63 74 | 20 74 6f 20 73 65 74 20 |ncorrect| to set |
|000009d0| 73 75 62 74 72 65 65 73 | 20 69 6e 64 65 70 65 6e |subtrees| indepen|
|000009e0| 64 65 6e 74 6c 79 20 6f | 66 0a 65 61 63 68 20 6f |dently o|f.each o|
|000009f0| 74 68 65 72 2c 20 62 65 | 63 61 75 73 65 20 74 68 |ther, be|cause th|
|00000a00| 65 6e 20 74 68 65 20 65 | 64 67 65 73 20 77 6f 75 |en the e|dges wou|
|00000a10| 6c 64 20 6e 6f 74 20 6c | 69 6e 65 20 75 70 2e 20 |ld not l|ine up. |
|00000a20| 20 46 6f 72 20 69 6e 73 | 74 61 6e 63 65 2c 0a 69 | For ins|tance,.i|
|00000a30| 6e 20 74 68 65 20 74 61 | 78 6f 6e 6f 6d 79 20 61 |n the ta|xonomy a|
|00000a40| 62 6f 76 65 2c 20 74 68 | 65 20 74 65 78 74 20 60 |bove, th|e text `|
|00000a50| 60 53 65 61 72 63 68 20 | 54 72 65 65 27 27 20 73 |`Search |Tree'' s|
|00000a60| 68 6f 75 6c 64 20 6c 69 | 6e 65 20 75 70 0a 77 69 |hould li|ne up.wi|
|00000a70| 74 68 20 60 60 50 61 72 | 73 65 20 54 72 65 65 27 |th ``Par|se Tree'|
|00000a80| 27 2e 20 20 41 20 6f 6e | 65 2d 70 61 73 73 20 61 |'. A on|e-pass a|
|00000a90| 6c 67 6f 72 69 74 68 6d | 20 77 6f 75 6c 64 20 73 |lgorithm| would s|
|00000aa0| 65 74 20 74 68 65 20 66 | 6f 72 6d 65 72 0a 73 6f |et the f|ormer.so|
|00000ab0| 6d 65 77 68 61 74 20 74 | 6f 20 74 68 65 20 72 69 |mewhat t|o the ri|
|00000ac0| 67 68 74 20 6f 66 20 74 | 68 65 20 6c 61 74 74 65 |ght of t|he latte|
|00000ad0| 72 2e 0a 0a 54 6f 20 73 | 6f 6c 76 65 20 74 68 69 |r...To s|olve thi|
|00000ae0| 73 20 70 72 6f 62 6c 65 | 6d 2c 20 74 68 65 20 6d |s proble|m, the m|
|00000af0| 61 63 72 6f 73 20 64 65 | 73 63 72 69 62 65 64 20 |acros de|scribed |
|00000b00| 68 65 72 65 20 73 65 74 | 20 61 20 74 72 65 65 20 |here set| a tree |
|00000b10| 75 73 69 6e 67 0a 74 68 | 72 65 65 20 70 61 73 73 |using.th|ree pass|
|00000b20| 65 73 2e 20 20 46 69 72 | 73 74 2c 20 61 20 64 61 |es. Fir|st, a da|
|00000b30| 74 61 20 73 74 72 75 63 | 74 75 72 65 20 69 73 20 |ta struc|ture is |
|00000b40| 62 75 69 6c 74 20 75 70 | 20 66 72 6f 6d 20 74 68 |built up| from th|
|00000b50| 65 20 74 72 65 65 0a 64 | 65 66 69 6e 69 74 69 6f |e tree.d|efinitio|
|00000b60| 6e 2e 20 20 53 65 63 6f | 6e 64 2c 20 74 68 61 74 |n. Seco|nd, that|
|00000b70| 20 64 61 74 61 20 73 74 | 72 75 63 74 75 72 65 20 | data st|ructure |
|00000b80| 69 73 20 75 73 65 64 20 | 74 6f 20 63 61 6c 63 75 |is used |to calcu|
|00000b90| 6c 61 74 65 20 74 68 65 | 0a 77 69 64 74 68 20 6f |late the|.width o|
|00000ba0| 66 20 65 61 63 68 20 6c | 65 76 65 6c 20 6f 66 20 |f each l|evel of |
|00000bb0| 74 68 65 20 74 72 65 65 | 2c 20 73 6f 20 74 68 61 |the tree|, so tha|
|00000bc0| 74 20 74 68 65 20 73 75 | 62 74 72 65 65 73 20 63 |t the su|btrees c|
|00000bd0| 61 6e 20 62 65 20 61 6c | 69 67 6e 65 64 20 77 69 |an be al|igned wi|
|00000be0| 74 68 20 65 61 63 68 0a | 6f 74 68 65 72 2e 20 20 |th each.|other. |
|00000bf0| 46 69 6e 61 6c 6c 79 2c | 20 74 68 65 20 64 61 74 |Finally,| the dat|
|00000c00| 61 20 73 74 72 75 63 74 | 75 72 65 20 61 6e 64 20 |a struct|ure and |
|00000c10| 74 68 65 20 63 61 6c 63 | 75 6c 61 74 65 64 20 6c |the calc|ulated l|
|00000c20| 69 73 74 20 6f 66 20 77 | 69 64 74 68 73 0a 61 72 |ist of w|idths.ar|
|00000c30| 65 20 75 73 65 64 20 74 | 6f 20 73 65 74 20 74 68 |e used t|o set th|
|00000c40| 65 20 73 79 73 74 65 6d | 20 6f 66 20 62 6f 78 65 |e system| of boxe|
|00000c50| 73 2c 20 67 6c 75 65 2c | 20 61 6e 64 20 72 75 6c |s, glue,| and rul|
|00000c60| 65 73 20 74 68 61 74 20 | 6d 61 6b 65 20 75 70 20 |es that |make up |
|00000c70| 74 68 65 20 74 72 65 65 | 2e 0a 0c 0a 5c 62 65 67 |the tree|....\beg|
|00000c80| 69 6e 73 65 63 74 69 6f | 6e 20 50 61 73 73 20 31 |insectio|n Pass 1|
|00000c90| 3a 20 49 6e 74 65 72 6e | 61 6c 20 73 74 6f 72 61 |: Intern|al stora|
|00000ca0| 67 65 20 6f 66 20 74 68 | 65 20 74 72 65 65 20 73 |ge of th|e tree s|
|00000cb0| 74 72 75 63 74 75 72 65 | 0a 0a 54 68 65 72 65 20 |tructure|..There |
|00000cc0| 61 72 65 20 73 65 76 65 | 72 61 6c 20 70 6f 73 73 |are seve|ral poss|
|00000cd0| 69 62 6c 65 20 77 61 79 | 73 20 74 6f 20 73 74 6f |ible way|s to sto|
|00000ce0| 72 65 20 74 68 65 20 73 | 74 72 75 63 74 75 72 65 |re the s|tructure|
|00000cf0| 20 64 65 66 69 6e 65 64 | 20 62 79 20 74 68 65 0a | defined| by the.|
|00000d00| 74 72 65 65 20 6d 61 63 | 72 6f 73 2e 20 20 53 69 |tree mac|ros. Si|
|00000d10| 6e 63 65 20 77 65 20 77 | 61 6e 74 20 74 6f 20 72 |nce we w|ant to r|
|00000d20| 65 6d 65 6d 62 65 72 20 | 61 6c 72 65 61 64 79 2d |emember |already-|
|00000d30| 73 65 74 20 74 65 78 74 | 20 28 74 68 65 20 77 6f |set text| (the wo|
|00000d40| 72 64 73 20 61 74 0a 74 | 68 65 20 72 6f 6f 74 73 |rds at.t|he roots|
|00000d50| 20 6f 66 20 65 61 63 68 | 20 74 72 65 65 20 6f 66 | of each| tree of|
|00000d60| 20 73 75 62 74 72 65 65 | 29 20 77 65 20 77 69 6c | subtree|) we wil|
|00000d70| 6c 20 75 73 65 20 61 20 | 6e 65 73 74 65 64 20 73 |l use a |nested s|
|00000d80| 74 72 75 63 74 75 72 65 | 20 6f 66 20 62 6f 78 65 |tructure| of boxe|
|00000d90| 73 2e 0a 45 61 63 68 20 | 73 75 62 74 72 65 65 20 |s..Each |subtree |
|00000da0| 69 73 20 73 74 6f 72 65 | 64 20 69 6e 20 61 6e 20 |is store|d in an |
|00000db0| 2a 5c 68 62 6f 78 2a 2c | 20 73 6f 20 74 68 61 74 |*\hbox*,| so that|
|00000dc0| 20 70 69 65 63 65 73 20 | 6f 66 20 69 74 20 63 61 | pieces |of it ca|
|00000dd0| 6e 20 62 65 20 70 75 6c | 6c 65 64 0a 6f 66 66 20 |n be pul|led.off |
|00000de0| 65 61 73 69 6c 79 20 75 | 73 69 6e 67 20 2a 5c 6c |easily u|sing *\l|
|00000df0| 61 73 74 62 6f 78 2a 20 | 61 6e 64 20 2a 5c 75 6e |astbox* |and *\un|
|00000e00| 73 6b 69 70 2a 2e 20 20 | 54 6f 20 64 69 73 74 69 |skip*. |To disti|
|00000e10| 6e 67 75 69 73 68 20 69 | 74 20 66 72 6f 6d 0a 61 |nguish i|t from.a|
|00000e20| 6e 6f 74 68 65 72 20 73 | 75 62 74 72 65 65 2c 20 |nother s|ubtree, |
|00000e30| 74 68 65 20 74 65 78 74 | 20 61 74 20 74 68 65 20 |the text| at the |
|00000e40| 72 6f 6f 74 20 6f 66 20 | 61 20 73 75 62 74 72 65 |root of |a subtre|
|00000e50| 65 20 69 73 20 73 74 6f | 72 65 64 20 69 6e 20 61 |e is sto|red in a|
|00000e60| 20 2a 5c 76 62 6f 78 2a | 2e 0a 54 6f 20 6d 61 6b | *\vbox*|..To mak|
|00000e70| 65 20 74 68 69 73 20 63 | 6c 65 61 72 65 72 2c 20 |e this c|learer, |
|00000e80| 6c 65 74 20 75 73 20 72 | 65 74 75 72 6e 20 74 6f |let us r|eturn to|
|00000e90| 20 6f 75 72 20 6f 72 69 | 67 69 6e 61 6c 20 74 61 | our ori|ginal ta|
|00000ea0| 78 6f 6e 6f 6d 79 2e 0a | 57 65 20 73 68 61 6c 6c |xonomy..|We shall|
|00000eb0| 20 69 67 6e 6f 72 65 20 | 66 6f 72 20 74 68 65 20 | ignore |for the |
|00000ec0| 6d 6f 6d 65 6e 74 0a 74 | 68 65 20 64 65 74 61 69 |moment.t|he detai|
|00000ed0| 6c 73 20 69 6e 73 69 64 | 65 20 74 68 65 20 74 65 |ls insid|e the te|
|00000ee0| 78 74 20 2a 5c 76 62 6f | 78 2a 65 73 2c 20 61 6e |xt *\vbo|x*es, an|
|00000ef0| 64 20 74 68 65 20 67 6c | 75 65 20 62 65 74 77 65 |d the gl|ue betwe|
|00000f00| 65 6e 20 62 6f 78 65 73 | 2e 0a 41 66 74 65 72 20 |en boxes|..After |
|00000f10| 74 68 65 20 66 69 72 73 | 74 20 70 61 73 73 2c 20 |the firs|t pass, |
|00000f20| 74 68 65 20 74 72 65 65 | 20 61 73 20 61 20 77 68 |the tree| as a wh|
|00000f30| 6f 6c 65 20 77 6f 75 6c | 64 20 6c 6f 6f 6b 20 6c |ole woul|d look l|
|00000f40| 69 6b 65 20 74 68 65 0a | 66 6f 6c 6c 6f 77 69 6e |ike the.|followin|
|00000f50| 67 20 73 65 74 20 6f 66 | 20 62 6f 78 65 73 3a 0a |g set of| boxes:.|
|00000f60| 0a 5c 76 62 0a 5c 68 62 | 6f 78 7b 5c 76 62 6f 78 |.\vb.\hb|ox{\vbox|
|00000f70| 7b 54 72 65 65 20 55 73 | 65 73 7d 0a 20 20 5c 68 |{Tree Us|es}. \h|
|00000f80| 62 6f 78 7b 5c 76 62 6f | 78 7b 43 6f 6d 70 75 74 |box{\vbo|x{Comput|
|00000f90| 65 72 20 53 63 69 65 6e | 63 65 7d 0a 20 20 20 20 |er Scien|ce}. |
|00000fa0| 5c 68 62 6f 78 7b 5c 76 | 62 6f 78 7b 44 61 74 61 |\hbox{\v|box{Data|
|00000fb0| 20 53 74 72 75 63 74 75 | 72 65 73 7d 0a 20 20 20 | Structu|res}. |
|00000fc0| 20 20 20 5c 68 62 6f 78 | 7b 5c 76 62 6f 78 7b 53 | \hbox|{\vbox{S|
|00000fd0| 65 61 72 63 68 20 54 72 | 65 65 7d 7d 0a 20 20 20 |earch Tr|ee}}. |
|00000fe0| 20 20 20 5c 68 62 6f 78 | 7b 5c 76 62 6f 78 7b 50 | \hbox|{\vbox{P|
|00000ff0| 72 69 6f 72 69 74 79 20 | 51 75 65 75 65 7d 7d 7d |riority |Queue}}}|
|00001000| 0a 20 20 20 20 2e 2e 2e | 7d 0a 20 20 2e 2e 2e 7d |. ...|}. ...}|
|00001010| 0a 5c 65 6e 64 76 62 0a | 0a 4e 6f 77 20 77 65 20 |.\endvb.|.Now we |
|00001020| 63 61 6e 20 62 65 67 69 | 6e 20 64 65 66 69 6e 69 |can begi|n defini|
|00001030| 6e 67 20 74 68 65 20 74 | 72 65 65 20 6d 61 63 72 |ng the t|ree macr|
|00001040| 6f 73 2e 20 20 57 65 20 | 73 74 61 72 74 20 64 65 |os. We |start de|
|00001050| 66 69 6e 69 6e 67 20 61 | 20 74 72 65 65 0a 77 69 |fining a| tree.wi|
|00001060| 74 68 20 74 68 65 20 2a | 5c 74 72 65 65 2a 20 6d |th the *|\tree* m|
|00001070| 61 63 72 6f 3b 20 74 68 | 69 73 20 6d 65 72 65 6c |acro; th|is merel|
|00001080| 79 20 73 65 74 73 20 75 | 70 20 74 68 65 20 61 73 |y sets u|p the as|
|00001090| 73 69 67 6e 6d 65 6e 74 | 20 6f 66 20 74 68 65 0a |signment| of the.|
|000010a0| 62 6f 78 65 64 20 74 72 | 65 65 20 73 74 72 75 63 |boxed tr|ee struc|
|000010b0| 74 75 72 65 20 69 6e 74 | 6f 20 61 20 62 6f 78 20 |ture int|o a box |
|000010c0| 63 61 6c 6c 65 64 20 2a | 5c 74 72 65 65 62 6f 78 |called *|\treebox|
|000010d0| 2a 2e 20 20 53 74 61 72 | 74 69 6e 67 20 61 20 73 |*. Star|ting a s|
|000010e0| 75 62 74 72 65 65 0a 69 | 73 20 73 69 6d 69 6c 61 |ubtree.i|s simila|
|000010f0| 72 2c 20 62 75 74 20 74 | 68 65 72 65 20 69 73 20 |r, but t|here is |
|00001100| 6e 6f 20 61 73 73 69 67 | 6e 6d 65 6e 74 3b 20 61 |no assig|nment; a|
|00001110| 6c 73 6f 2c 20 69 66 20 | 69 74 20 69 73 20 74 68 |lso, if |it is th|
|00001120| 65 20 66 69 72 73 74 0a | 2a 5c 73 75 62 74 72 65 |e first.|*\subtre|
|00001130| 65 2a 20 6f 66 20 69 74 | 73 20 74 72 65 65 20 6f |e* of it|s tree o|
|00001140| 72 20 73 75 62 74 72 65 | 65 2c 20 77 65 20 6d 75 |r subtre|e, we mu|
|00001150| 73 74 20 73 74 6f 70 20 | 6d 61 6b 69 6e 67 20 74 |st stop |making t|
|00001160| 68 65 20 2a 5c 76 62 6f | 78 2a 0a 63 6f 6e 74 61 |he *\vbo|x*.conta|
|00001170| 69 6e 69 6e 67 20 74 68 | 65 20 72 6f 6f 74 20 74 |ining th|e root t|
|00001180| 65 78 74 2e 20 20 41 20 | 6c 65 61 66 20 69 73 20 |ext. A |leaf is |
|00001190| 6d 65 72 65 6c 79 20 61 | 20 73 75 62 74 72 65 65 |merely a| subtree|
|000011a0| 20 77 69 74 68 6f 75 74 | 20 61 6e 79 0a 73 75 62 | without| any.sub|
|000011b0| 2d 73 75 62 74 72 65 65 | 73 2e 0a 0a 5c 76 62 0a |-subtree|s...\vb.|
|000011c0| 5c 6e 65 77 62 6f 78 5c | 74 72 65 65 62 6f 78 0a |\newbox\|treebox.|
|000011d0| 5c 64 65 66 5c 74 72 65 | 65 7b 5c 67 6c 6f 62 61 |\def\tre|e{\globa|
|000011e0| 6c 5c 73 65 74 62 6f 78 | 5c 74 72 65 65 62 6f 78 |l\setbox|\treebox|
|000011f0| 3d 5c 62 6f 78 74 72 65 | 65 7d 0a 5c 64 65 66 5c |=\boxtre|e}.\def\|
|00001200| 73 75 62 74 72 65 65 7b | 5c 65 74 74 65 78 74 20 |subtree{|\ettext |
|00001210| 5c 62 6f 78 74 72 65 65 | 7d 0a 5c 64 65 66 5c 6c |\boxtree|}.\def\l|
|00001220| 65 61 66 23 31 7b 5c 73 | 75 62 74 72 65 65 23 31 |eaf#1{\s|ubtree#1|
|00001230| 5c 65 6e 64 73 75 62 74 | 72 65 65 7d 0a 5c 65 6e |\endsubt|ree}.\en|
|00001240| 64 76 62 0a 0a 46 69 6e | 69 73 68 69 6e 67 20 61 |dvb..Fin|ishing a|
|00001250| 20 73 75 62 74 72 65 65 | 20 6d 65 72 65 6c 79 20 | subtree| merely |
|00001260| 69 6e 76 6f 6c 76 65 73 | 20 66 69 72 73 74 20 6d |involves| first m|
|00001270| 61 6b 69 6e 67 20 73 75 | 72 65 20 74 68 65 20 72 |aking su|re the r|
|00001280| 6f 6f 74 20 74 65 78 74 | 20 69 73 0a 63 6f 6d 70 |oot text| is.comp|
|00001290| 6c 65 74 65 2c 20 61 6e | 64 20 73 65 63 6f 6e 64 |lete, an|d second|
|000012a0| 0a 63 6f 6d 70 6c 65 74 | 69 6e 67 20 74 68 65 20 |.complet|ing the |
|000012b0| 62 6f 78 20 74 68 61 74 | 20 77 61 73 20 73 74 61 |box that| was sta|
|000012c0| 72 74 65 64 20 69 6e 20 | 74 68 65 20 65 78 70 61 |rted in |the expa|
|000012d0| 6e 73 69 6f 6e 20 6f 66 | 20 2a 5c 73 75 62 74 72 |nsion of| *\subtr|
|000012e0| 65 65 2a 2e 0a 46 69 6e | 69 73 68 69 6e 67 20 61 |ee*..Fin|ishing a|
|000012f0| 20 77 68 6f 6c 65 20 74 | 72 65 65 20 69 6e 76 6f | whole t|ree invo|
|00001300| 6c 76 65 73 20 62 6f 74 | 68 20 6f 66 20 74 68 6f |lves bot|h of tho|
|00001310| 73 65 20 73 74 65 70 73 | 2c 20 62 75 74 20 74 68 |se steps|, but th|
|00001320| 65 6e 20 61 66 74 65 72 | 20 74 68 65 0a 62 6f 78 |en after| the.box|
|00001330| 20 69 73 20 63 6f 6d 70 | 6c 65 74 65 64 20 74 68 | is comp|leted th|
|00001340| 65 20 72 65 6d 61 69 6e | 69 6e 67 20 74 77 6f 20 |e remain|ing two |
|00001350| 70 61 73 73 65 73 20 6d | 75 73 74 20 62 65 20 72 |passes m|ust be r|
|00001360| 75 6e 2e 0a 0a 5c 76 62 | 0a 5c 64 65 66 5c 65 6e |un...\vb|.\def\en|
|00001370| 64 73 75 62 74 72 65 65 | 7b 5c 65 74 74 65 78 74 |dsubtree|{\ettext|
|00001380| 20 5c 65 67 72 6f 75 70 | 7d 0a 5c 64 65 66 5c 65 | \egroup|}.\def\e|
|00001390| 6e 64 74 72 65 65 7b 5c | 65 6e 64 73 75 62 74 72 |ndtree{\|endsubtr|
|000013a0| 65 65 20 5c 73 65 74 74 | 72 65 65 73 69 7a 65 73 |ee \sett|reesizes|
|000013b0| 20 5c 74 79 70 65 73 65 | 74 74 72 65 65 7d 0a 5c | \typese|ttree}.\|
|000013c0| 65 6e 64 76 62 0a 0a 0a | 4e 6f 77 20 61 6c 6c 20 |endvb...|Now all |
|000013d0| 74 68 61 74 20 72 65 6d | 61 69 6e 73 20 74 6f 20 |that rem|ains to |
|000013e0| 62 65 20 64 65 66 69 6e | 65 64 20 6f 66 20 74 68 |be defin|ed of th|
|000013f0| 65 20 66 69 72 73 74 20 | 70 61 73 73 20 69 73 20 |e first |pass is |
|00001400| 74 68 65 20 63 6f 6e 73 | 74 72 75 63 74 69 6f 6e |the cons|truction|
|00001410| 0a 6f 66 20 74 68 65 20 | 2a 5c 76 62 6f 78 2a 20 |.of the |*\vbox* |
|00001420| 63 6f 6e 74 61 69 6e 69 | 6e 67 20 74 68 65 20 72 |containi|ng the r|
|00001430| 6f 6f 74 20 74 65 78 74 | 2e 20 20 54 68 65 20 64 |oot text|. The d|
|00001440| 69 66 66 69 63 75 6c 74 | 79 20 68 65 72 65 20 69 |ifficult|y here i|
|00001450| 73 0a 63 6f 6e 76 69 6e | 63 69 6e 67 20 5c 54 65 |s.convin|cing \Te|
|00001460| 58 5c 20 74 6f 20 6d 61 | 6b 65 20 74 68 65 20 2a |X\ to ma|ke the *|
|00001470| 5c 76 62 6f 78 2a 20 6f | 6e 6c 79 20 61 73 20 77 |\vbox* o|nly as w|
|00001480| 69 64 65 20 61 73 20 74 | 68 65 20 77 69 64 65 73 |ide as t|he wides|
|00001490| 74 20 6c 69 6e 65 0a 6f | 66 20 74 65 78 74 2c 20 |t line.o|f text, |
|000014a0| 72 61 74 68 65 72 20 74 | 68 61 6e 20 74 68 65 20 |rather t|han the |
|000014b0| 77 69 64 74 68 20 6f 66 | 20 74 68 65 20 65 6e 74 |width of| the ent|
|000014c0| 69 72 65 20 70 61 67 65 | 2e 20 20 4f 6e 65 20 73 |ire page|. One s|
|000014d0| 6f 6c 75 74 69 6f 6e 20 | 69 73 20 74 6f 0a 70 75 |olution |is to.pu|
|000014e0| 74 20 74 68 65 20 74 65 | 78 74 20 69 6e 20 61 6e |t the te|xt in an|
|000014f0| 20 2a 5c 68 61 6c 69 67 | 6e 2a 2c 20 77 69 74 68 | *\halig|n*, with|
|00001500| 20 2a 5c 63 72 63 72 2a | 20 69 6d 70 6c 69 63 69 | *\crcr*| implici|
|00001510| 74 20 61 74 20 74 68 65 | 20 65 6e 64 20 6f 66 20 |t at the| end of |
|00001520| 65 61 63 68 20 6c 69 6e | 65 2e 0a 54 68 65 20 2a |each lin|e..The *|
|00001530| 5c 69 66 74 72 65 65 74 | 65 78 74 2a 20 74 65 73 |\iftreet|ext* tes|
|00001540| 74 20 69 73 20 75 73 65 | 64 20 74 6f 20 74 65 6c |t is use|d to tel|
|00001550| 6c 20 77 68 65 74 68 65 | 72 20 77 65 20 61 72 65 |l whethe|r we are|
|00001560| 20 73 74 69 6c 6c 20 69 | 6e 73 69 64 65 20 74 68 | still i|nside th|
|00001570| 65 0a 2a 5c 68 61 6c 69 | 67 6e 2a 20 61 6e 64 20 |e.*\hali|gn* and |
|00001580| 2a 5c 76 62 6f 78 2a 2c | 20 73 6f 20 74 68 61 74 |*\vbox*,| so that|
|00001590| 20 2a 5c 65 74 74 65 78 | 74 2a 20 63 61 6e 20 74 | *\ettex|t* can t|
|000015a0| 65 6c 6c 20 77 68 65 74 | 68 65 72 20 69 74 20 73 |ell whet|her it s|
|000015b0| 68 6f 75 6c 64 20 64 6f | 0a 61 6e 79 74 68 69 6e |hould do|.anythin|
|000015c0| 67 2e 20 20 49 74 20 69 | 73 20 67 6c 6f 62 61 6c |g. It i|s global|
|000015d0| 6c 79 20 66 61 6c 73 65 | 2c 20 62 75 74 20 77 69 |ly false|, but wi|
|000015e0| 74 68 69 6e 20 74 68 65 | 20 2a 5c 76 62 6f 78 2a |thin the| *\vbox*|
|000015f0| 20 69 74 20 67 65 74 73 | 20 73 65 74 20 74 6f 20 | it gets| set to |
|00001600| 74 72 75 65 2e 0a 0a 5c | 76 62 0a 5c 6e 65 77 69 |true...\|vb.\newi|
|00001610| 66 5c 69 66 74 72 65 65 | 74 65 78 74 5c 74 72 65 |f\iftree|text\tre|
|00001620| 65 74 65 78 74 66 61 6c | 73 65 20 20 20 20 20 20 |etextfal|se |
|00001630| 20 20 20 25 20 57 68 65 | 74 68 65 72 20 73 74 69 | % Whe|ther sti|
|00001640| 6c 6c 20 61 6c 69 67 6e | 69 6e 67 20 74 65 78 74 |ll align|ing text|
|00001650| 0a 5c 64 65 66 5c 62 6f | 78 74 72 65 65 7b 5c 68 |.\def\bo|xtree{\h|
|00001660| 62 6f 78 5c 62 67 72 6f | 75 70 20 20 20 20 20 20 |box\bgro|up |
|00001670| 20 20 20 20 20 20 20 20 | 20 25 20 53 74 61 72 74 | | % Start|
|00001680| 20 6f 75 74 65 72 20 62 | 6f 78 20 6f 66 20 74 72 | outer b|ox of tr|
|00001690| 65 65 20 6f 72 20 73 75 | 62 74 72 65 65 0a 20 20 |ee or su|btree. |
|000016a0| 5c 62 61 73 65 6c 69 6e | 65 73 6b 69 70 20 32 2e |\baselin|eskip 2.|
|000016b0| 35 65 78 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |5ex | |
|000016c0| 20 20 20 20 20 20 25 20 | 4e 61 72 72 6f 77 20 6c | % |Narrow l|
|000016d0| 69 6e 65 20 73 70 61 63 | 69 6e 67 20 73 6c 69 67 |ine spac|ing slig|
|000016e0| 68 74 6c 79 0a 20 20 5c | 74 61 62 73 6b 69 70 20 |htly. \|tabskip |
|000016f0| 30 70 74 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |0pt | |
|00001700| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 25 20 4e | | % N|
|00001710| 6f 20 73 70 75 72 69 6f | 75 73 20 67 6c 75 65 20 |o spurio|us glue |
|00001720| 69 6e 20 61 6c 69 67 6e | 6d 65 6e 74 0a 20 20 5c |in align|ment. \|
|00001730| 76 62 6f 78 5c 62 67 72 | 6f 75 70 20 20 20 20 20 |vbox\bgr|oup |
|00001740| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001750| 20 20 20 20 20 25 20 53 | 74 61 72 74 20 69 6e 6e | % S|tart inn|
|00001760| 65 72 20 74 65 78 74 20 | 5c 76 62 6f 78 0a 20 20 |er text |\vbox. |
|00001770| 5c 74 72 65 65 74 65 78 | 74 74 72 75 65 20 20 20 |\treetex|ttrue |
|00001780| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001790| 20 20 20 20 20 20 25 20 | 52 65 6d 65 6d 62 65 72 | % |Remember|
|000017a0| 20 66 6f 72 20 5c 65 74 | 74 65 78 74 0a 20 20 5c | for \et|text. \|
|000017b0| 6c 65 74 5c 70 61 72 5c | 63 72 63 72 20 5c 6f 62 |let\par\|crcr \ob|
|000017c0| 65 79 6c 69 6e 65 73 20 | 20 20 20 20 20 20 20 20 |eylines | |
|000017d0| 20 20 20 20 20 25 20 4e | 65 77 20 6c 69 6e 65 20 | % N|ew line |
|000017e0| 62 72 65 61 6b 73 20 77 | 69 74 68 6f 75 74 20 65 |breaks w|ithout e|
|000017f0| 78 70 6c 69 63 69 74 20 | 5c 63 72 0a 20 20 5c 68 |xplicit |\cr. \h|
|00001800| 61 6c 69 67 6e 5c 62 67 | 72 6f 75 70 23 23 5c 68 |align\bg|roup##\h|
|00001810| 66 69 6c 5c 63 72 7d 20 | 20 20 20 20 20 20 20 20 |fil\cr} | |
|00001820| 20 20 20 20 25 20 53 74 | 61 72 74 20 61 6c 69 67 | % St|art alig|
|00001830| 6e 6d 65 6e 74 20 77 69 | 74 68 20 73 69 6d 70 6c |nment wi|th simpl|
|00001840| 65 20 74 65 6d 70 6c 61 | 74 65 0a 5c 64 65 66 5c |e templa|te.\def\|
|00001850| 65 74 74 65 78 74 7b 5c | 69 66 74 72 65 65 74 65 |ettext{\|iftreete|
|00001860| 78 74 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |xt | |
|00001870| 20 20 20 25 20 41 72 65 | 20 77 65 20 73 74 69 6c | % Are| we stil|
|00001880| 6c 20 69 6e 20 69 6e 6e | 65 72 20 74 65 78 74 20 |l in inn|er text |
|00001890| 5c 76 62 6f 78 3f 0a 20 | 20 5c 63 72 63 72 5c 65 |\vbox?. | \crcr\e|
|000018a0| 67 72 6f 75 70 20 5c 65 | 67 72 6f 75 70 20 5c 66 |group \e|group \f|
|000018b0| 69 7d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 25 |i} | %|
|000018c0| 20 59 65 73 2c 20 65 6e | 64 20 61 6c 69 67 6e 6d | Yes, en|d alignm|
|000018d0| 65 6e 74 20 61 6e 64 20 | 62 6f 78 0a 5c 65 6e 64 |ent and |box.\end|
|000018e0| 76 62 0a 0c 0a 5c 62 65 | 67 69 6e 73 65 63 74 69 |vb...\be|ginsecti|
|000018f0| 6f 6e 20 50 61 73 73 20 | 32 3a 20 43 61 6c 63 75 |on Pass |2: Calcu|
|00001900| 6c 61 74 69 6f 6e 20 6f | 66 20 77 69 64 74 68 73 |lation o|f widths|
|00001910| 20 61 74 20 65 61 63 68 | 20 6c 65 76 65 6c 0a 0a | at each| level..|
|00001920| 48 65 72 65 20 77 65 20 | 63 61 6c 63 75 6c 61 74 |Here we |calculat|
|00001930| 65 20 61 20 6c 69 73 74 | 20 6f 66 20 74 68 65 20 |e a list| of the |
|00001940| 64 69 6d 65 6e 73 69 6f | 6e 73 20 6f 66 20 65 61 |dimensio|ns of ea|
|00001950| 63 68 20 6c 65 76 65 6c | 20 6f 66 20 74 68 65 20 |ch level| of the |
|00001960| 74 72 65 65 3b 0a 74 68 | 61 74 20 69 73 2c 20 74 |tree;.th|at is, t|
|00001970| 68 65 20 77 69 64 74 68 | 73 20 6f 66 20 74 68 65 |he width|s of the|
|00001980| 20 77 69 64 65 73 74 20 | 2a 5c 76 62 6f 78 2a 20 | widest |*\vbox* |
|00001990| 61 74 20 65 61 63 68 20 | 6c 65 76 65 6c 2e 0a 54 |at each |level..T|
|000019a0| 6f 20 64 6f 20 74 68 69 | 73 2c 20 77 65 20 6e 65 |o do thi|s, we ne|
|000019b0| 65 64 20 74 6f 20 62 65 | 20 61 62 6c 65 20 74 6f |ed to be| able to|
|000019c0| 20 6d 61 69 6e 74 61 69 | 6e 20 6c 69 73 74 73 20 | maintai|n lists |
|000019d0| 6f 66 20 74 68 69 6e 67 | 73 2e 20 20 53 69 6e 63 |of thing|s. Sinc|
|000019e0| 65 20 74 68 65 73 65 0a | 61 72 65 20 64 69 6d 65 |e these.|are dime|
|000019f0| 6e 73 69 6f 6e 73 20 72 | 61 74 68 65 72 20 74 68 |nsions r|ather th|
|00001a00| 61 6e 20 62 6f 78 65 73 | 20 6f 66 20 74 65 78 74 |an boxes| of text|
|00001a10| 20 69 74 20 77 69 6c 6c | 20 62 65 20 6d 6f 73 74 | it will| be most|
|00001a20| 20 63 6f 6e 76 65 6e 69 | 65 6e 74 20 74 6f 0a 75 | conveni|ent to.u|
|00001a30| 73 65 20 6d 61 63 72 6f | 73 20 6c 69 6b 65 20 74 |se macro|s like t|
|00001a40| 68 65 20 6f 6e 65 73 20 | 67 69 76 65 6e 20 6f 6e |he ones |given on|
|00001a50| 20 70 61 67 65 20 33 37 | 38 20 6f 66 20 74 68 65 | page 37|8 of the|
|00001a60| 20 5c 54 65 58 20 62 6f | 6f 6b 2e 20 20 48 6f 77 | \TeX bo|ok. How|
|00001a70| 65 76 65 72 2c 0a 69 74 | 20 74 75 72 6e 73 20 6f |ever,.it| turns o|
|00001a80| 75 74 20 74 68 61 74 20 | 77 65 20 6e 65 65 64 20 |ut that |we need |
|00001a90| 74 6f 20 73 65 74 20 6f | 75 72 20 6c 69 73 74 73 |to set o|ur lists|
|00001aa0| 20 62 6f 74 68 20 6c 6f | 63 61 6c 6c 79 20 74 6f | both lo|cally to|
|00001ab0| 20 73 6f 6d 65 0a 67 72 | 6f 75 70 69 6e 67 20 61 | some.gr|ouping a|
|00001ac0| 6e 64 20 61 6c 73 6f 20 | 67 6c 6f 62 61 6c 6c 79 |nd also |globally|
|00001ad0| 2e 20 20 54 68 65 72 65 | 66 6f 72 65 2c 20 77 65 |. There|fore, we|
|00001ae0| 20 77 69 6c 6c 20 75 73 | 65 20 61 20 73 74 72 69 | will us|e a stri|
|00001af0| 70 70 65 64 20 64 6f 77 | 6e 0a 76 65 72 73 69 6f |pped dow|n.versio|
|00001b00| 6e 20 6f 66 20 74 68 6f | 73 65 20 6c 69 73 74 20 |n of tho|se list |
|00001b10| 6d 61 63 72 6f 73 20 74 | 68 61 74 20 63 61 6e 20 |macros t|hat can |
|00001b20| 68 61 6e 64 6c 65 20 74 | 68 65 20 2a 5c 67 6c 6f |handle t|he *\glo|
|00001b30| 62 61 6c 2a 20 66 6c 61 | 67 2e 0a 54 6f 20 69 6d |bal* fla|g..To im|
|00001b40| 70 6c 65 6d 65 6e 74 20 | 74 68 69 73 20 66 65 61 |plement |this fea|
|00001b50| 74 75 72 65 2c 20 77 65 | 20 68 61 76 65 20 74 6f |ture, we| have to|
|00001b60| 20 6c 6f 73 65 20 73 6f | 6d 65 20 6f 74 68 65 72 | lose so|me other|
|00001b70| 73 3b 20 74 68 65 20 63 | 68 69 65 66 20 6c 6f 73 |s; the c|hief los|
|00001b80| 73 65 73 0a 61 72 65 20 | 74 68 61 74 20 74 68 65 |ses.are |that the|
|00001b90| 20 63 6f 6e 74 65 6e 74 | 73 20 6f 66 20 74 68 65 | content|s of the|
|00001ba0| 20 6c 69 73 74 73 20 77 | 69 6c 6c 20 62 65 20 6d | lists w|ill be m|
|00001bb0| 61 63 72 6f 2d 65 78 70 | 61 6e 64 65 64 20 62 79 |acro-exp|anded by|
|00001bc0| 20 76 61 72 69 6f 75 73 | 20 6f 66 0a 74 68 65 20 | various| of.the |
|00001bd0| 6c 69 73 74 20 6d 61 6e | 69 70 75 6c 61 74 69 6f |list man|ipulatio|
|00001be0| 6e 20 6d 61 63 72 6f 73 | 2c 20 61 6e 64 20 74 68 |n macros|, and th|
|00001bf0| 61 74 20 77 65 20 63 61 | 6e 27 74 20 75 73 65 20 |at we ca|n't use |
|00001c00| 72 65 64 65 66 69 6e 69 | 74 69 6f 6e 73 20 6f 66 |redefini|tions of|
|00001c10| 20 2a 5c 5c 2a 0a 74 6f | 20 70 65 72 66 6f 72 6d | *\\*.to| perform|
|00001c20| 20 73 6f 6d 65 20 6f 70 | 65 72 61 74 69 6f 6e 20 | some op|eration |
|00001c30| 6f 6e 20 74 68 65 20 77 | 68 6f 6c 65 20 6c 69 73 |on the w|hole lis|
|00001c40| 74 2e 0a 0a 54 6f 20 69 | 6e 69 74 69 61 6c 69 7a |t...To i|nitializ|
|00001c50| 65 20 61 20 63 6f 6e 74 | 72 6f 6c 20 73 65 71 75 |e a cont|rol sequ|
|00001c60| 65 6e 63 65 20 74 6f 20 | 74 68 65 20 65 6d 70 74 |ence to |the empt|
|00001c70| 79 20 6c 69 73 74 2c 20 | 77 65 20 64 6f 20 2a 5c |y list, |we do *\|
|00001c80| 6c 65 74 5c 63 73 6e 61 | 6d 65 5c 6e 69 6c 2a 2e |let\csna|me\nil*.|
|00001c90| 0a 54 68 65 6e 20 74 6f | 20 61 64 64 20 61 6e 20 |.Then to| add an |
|00001ca0| 65 6c 65 6d 65 6e 74 20 | 74 6f 20 74 68 65 20 73 |element |to the s|
|00001cb0| 74 61 72 74 20 6f 66 20 | 74 68 65 20 6c 69 73 74 |tart of |the list|
|00001cc0| 20 77 65 20 64 6f 20 2a | 5c 63 6f 6e 73 7b 74 6f | we do *|\cons{to|
|00001cd0| 6b 65 6e 73 7d 5c 63 73 | 6e 61 6d 65 2a 2c 0a 61 |kens}\cs|name*,.a|
|00001ce0| 6e 64 20 74 6f 20 72 65 | 6d 6f 76 65 20 74 68 61 |nd to re|move tha|
|00001cf0| 74 20 65 6c 65 6d 65 6e | 74 20 77 65 20 64 6f 20 |t elemen|t we do |
|00001d00| 2a 5c 63 64 72 5c 63 73 | 6e 61 6d 65 2a 2e 20 20 |*\cdr\cs|name*. |
|00001d10| 42 6f 74 68 20 2a 5c 63 | 6f 6e 73 2a 20 61 6e 64 |Both *\c|ons* and|
|00001d20| 20 2a 5c 63 64 72 2a 0a | 63 61 6e 20 62 65 20 70 | *\cdr*.|can be p|
|00001d30| 72 65 66 69 78 65 64 20 | 77 69 74 68 20 2a 5c 67 |refixed |with *\g|
|00001d40| 6c 6f 62 61 6c 2a 2e 20 | 20 54 68 65 20 66 69 72 |lobal*. | The fir|
|00001d50| 73 74 20 65 6c 65 6d 65 | 6e 74 20 6f 6e 20 74 68 |st eleme|nt on th|
|00001d60| 65 20 6c 69 73 74 20 63 | 61 6e 20 62 65 0a 65 78 |e list c|an be.ex|
|00001d70| 70 61 6e 64 65 64 20 69 | 6e 74 6f 20 74 68 65 20 |panded i|nto the |
|00001d80| 74 6f 6b 65 6e 20 73 74 | 72 65 61 6d 20 62 79 20 |token st|ream by |
|00001d90| 64 6f 69 6e 67 20 2a 5c | 63 61 72 5c 63 73 6e 61 |doing *\|car\csna|
|00001da0| 6d 65 2a 2e 20 20 54 68 | 65 72 65 20 69 73 20 6e |me*. Th|ere is n|
|00001db0| 6f 0a 65 72 72 6f 72 20 | 63 68 65 63 6b 69 6e 67 |o.error |checking|
|00001dc0| 2c 20 73 6f 20 67 69 76 | 69 6e 67 20 2a 5c 63 61 |, so giv|ing *\ca|
|00001dd0| 72 2a 20 6f 72 20 2a 5c | 63 64 72 2a 20 74 68 65 |r* or *\|cdr* the|
|00001de0| 20 65 6d 70 74 79 20 6c | 69 73 74 20 77 69 6c 6c | empty l|ist will|
|00001df0| 20 63 61 75 73 65 0a 6d | 79 73 74 65 72 69 6f 75 | cause.m|ysteriou|
|00001e00| 73 20 65 72 72 6f 72 73 | 20 6c 61 74 65 72 20 6f |s errors| later o|
|00001e10| 6e 2e 20 20 42 65 63 61 | 75 73 65 20 6f 66 20 74 |n. Beca|use of t|
|00001e20| 68 65 20 6d 61 63 72 6f | 20 65 78 70 61 6e 73 69 |he macro| expansi|
|00001e30| 6f 6e 20 70 65 72 66 6f | 72 6d 65 64 0a 62 79 20 |on perfo|rmed.by |
|00001e40| 2a 5c 63 6f 6e 73 2a 20 | 61 6e 64 20 2a 5c 63 64 |*\cons* |and *\cd|
|00001e50| 72 2a 2c 20 74 68 65 20 | 74 6f 6b 65 6e 20 75 73 |r*, the |token us|
|00001e60| 65 64 20 74 6f 20 73 65 | 70 61 72 61 74 65 20 6c |ed to se|parate l|
|00001e70| 69 73 74 20 65 6c 65 6d | 65 6e 74 73 0a 65 78 70 |ist elem|ents.exp|
|00001e80| 61 6e 64 73 20 74 6f 20 | 69 74 73 65 6c 66 2c 20 |ands to |itself, |
|00001e90| 61 6e 64 20 75 6e 6c 69 | 6b 65 20 74 68 65 20 5c |and unli|ke the \|
|00001ea0| 54 65 58 20 62 6f 6f 6b | 20 6d 61 63 72 6f 73 20 |TeX book| macros |
|00001eb0| 63 61 6e 6e 6f 74 20 62 | 65 20 72 65 64 65 66 69 |cannot b|e redefi|
|00001ec0| 6e 65 64 0a 74 6f 20 64 | 6f 20 61 6e 79 74 68 69 |ned.to d|o anythi|
|00001ed0| 6e 67 20 75 73 65 66 75 | 6c 2e 0a 0a 5c 76 62 0a |ng usefu|l...\vb.|
|00001ee0| 5c 64 65 66 5c 63 6f 6e | 73 23 31 23 32 7b 5c 65 |\def\con|s#1#2{\e|
|00001ef0| 64 65 66 23 32 7b 5c 78 | 6d 61 72 6b 20 23 31 23 |def#2{\x|mark #1#|
|00001f00| 32 7d 7d 20 20 20 20 20 | 25 20 41 64 64 20 73 6f |2}} |% Add so|
|00001f10| 6d 65 74 68 69 6e 67 20 | 74 6f 20 73 74 61 72 74 |mething |to start|
|00001f20| 20 6f 66 20 6c 69 73 74 | 2e 0a 5c 64 65 66 5c 63 | of list|..\def\c|
|00001f30| 61 72 23 31 7b 5c 65 78 | 70 61 6e 64 61 66 74 65 |ar#1{\ex|pandafte|
|00001f40| 72 5c 64 6f 63 61 72 23 | 31 5c 64 6f 63 61 72 7d |r\docar#|1\docar}|
|00001f50| 20 20 25 20 54 61 6b 65 | 20 66 69 72 73 74 20 65 | % Take| first e|
|00001f60| 6c 65 6d 65 6e 74 20 6f | 66 20 6c 69 73 74 0a 5c |lement o|f list.\|
|00001f70| 64 65 66 5c 64 6f 63 61 | 72 5c 78 6d 61 72 6b 23 |def\doca|r\xmark#|
|00001f80| 31 5c 78 6d 61 72 6b 23 | 32 5c 64 6f 63 61 72 7b |1\xmark#|2\docar{|
|00001f90| 23 31 7d 20 20 20 20 25 | 20 2e 2e 62 79 20 69 67 |#1} %| ..by ig|
|00001fa0| 6e 6f 72 69 6e 67 20 72 | 65 73 74 20 69 6e 20 65 |noring r|est in e|
|00001fb0| 78 70 61 6e 73 69 6f 6e | 2e 0a 5c 64 65 66 5c 63 |xpansion|..\def\c|
|00001fc0| 64 72 23 31 7b 5c 65 78 | 70 61 6e 64 61 66 74 65 |dr#1{\ex|pandafte|
|00001fd0| 72 5c 64 6f 63 64 72 23 | 31 5c 64 6f 63 64 72 23 |r\docdr#|1\docdr#|
|00001fe0| 31 7d 25 20 53 69 6d 69 | 6c 61 72 6c 79 2c 20 64 |1}% Simi|larly, d|
|00001ff0| 72 6f 70 20 66 69 72 73 | 74 20 65 6c 65 6d 65 6e |rop firs|t elemen|
|00002000| 74 2e 0a 5c 64 65 66 5c | 64 6f 63 64 72 5c 78 6d |t..\def\|docdr\xm|
|00002010| 61 72 6b 23 31 5c 78 6d | 61 72 6b 23 32 5c 64 6f |ark#1\xm|ark#2\do|
|00002020| 63 64 72 23 33 7b 5c 64 | 65 66 23 33 7b 5c 78 6d |cdr#3{\d|ef#3{\xm|
|00002030| 61 72 6b 20 23 32 7d 7d | 0a 5c 64 65 66 5c 78 6d |ark #2}}|.\def\xm|
|00002040| 61 72 6b 7b 5c 6e 6f 65 | 78 70 61 6e 64 5c 78 6d |ark{\noe|xpand\xm|
|00002050| 61 72 6b 7d 20 20 20 20 | 20 20 20 20 20 20 20 20 |ark} | |
|00002060| 20 25 20 4c 69 73 74 20 | 73 65 70 61 72 61 74 6f | % List |separato|
|00002070| 72 20 65 78 70 61 6e 64 | 73 20 74 6f 20 73 65 6c |r expand|s to sel|
|00002080| 66 2e 0a 5c 64 65 66 5c | 6e 69 6c 7b 5c 78 6d 61 |f..\def\|nil{\xma|
|00002090| 72 6b 7d 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |rk} | |
|000020a0| 20 20 20 20 20 20 20 20 | 20 20 20 25 20 45 6d 70 | | % Emp|
|000020b0| 74 79 20 6c 69 73 74 20 | 69 73 20 6a 75 73 74 20 |ty list |is just |
|000020c0| 61 20 73 65 70 61 72 61 | 74 6f 72 2e 0a 5c 65 6e |a separa|tor..\en|
|000020d0| 64 76 62 0a 0a 57 65 20 | 63 61 6c 63 75 6c 61 74 |dvb..We |calculat|
|000020e0| 65 20 74 68 65 20 6c 65 | 76 65 6c 20 77 69 64 74 |e the le|vel widt|
|000020f0| 68 73 20 62 79 20 63 61 | 6c 6c 69 6e 67 20 2a 5c |hs by ca|lling *\|
|00002100| 73 65 74 73 69 7a 65 73 | 2a 20 6f 6e 20 74 68 65 |setsizes|* on the|
|00002110| 20 74 72 65 65 3b 20 69 | 74 0a 77 69 6c 6c 20 69 | tree; i|t.will i|
|00002120| 6e 20 74 75 72 6e 20 63 | 61 6c 6c 20 69 74 73 65 |n turn c|all itse|
|00002130| 6c 66 20 72 65 63 75 72 | 73 69 76 65 6c 79 20 66 |lf recur|sively f|
|00002140| 6f 72 20 65 61 63 68 20 | 6f 66 20 69 74 73 20 73 |or each |of its s|
|00002150| 75 62 74 72 65 65 73 2e | 20 20 54 68 65 0a 74 72 |ubtrees.| The.tr|
|00002160| 65 65 20 62 65 69 6e 67 | 20 73 69 7a 65 64 20 77 |ee being| sized w|
|00002170| 69 6c 6c 20 62 65 20 69 | 6e 20 2a 5c 62 6f 78 30 |ill be i|n *\box0|
|00002180| 2a 2c 20 77 68 69 63 68 | 20 69 73 20 75 73 65 64 |*, which| is used|
|00002190| 20 61 73 20 73 63 72 61 | 74 63 68 20 69 6e 20 74 | as scra|tch in t|
|000021a0| 68 69 73 0a 6d 61 63 72 | 6f 2c 20 61 6e 64 20 74 |his.macr|o, and t|
|000021b0| 68 65 20 6c 69 73 74 20 | 6f 66 20 77 69 64 74 68 |he list |of width|
|000021c0| 73 20 61 6c 72 65 61 64 | 79 20 66 6f 75 6e 64 20 |s alread|y found |
|000021d0| 66 6f 72 20 74 68 69 73 | 20 6c 65 76 65 6c 20 61 |for this| level a|
|000021e0| 6e 64 20 62 65 6c 6f 77 | 0a 77 69 6c 6c 20 62 65 |nd below|.will be|
|000021f0| 20 69 6e 20 2a 5c 74 72 | 65 65 73 69 7a 65 73 2a | in *\tr|eesizes*|
|00002200| 20 28 69 6e 69 74 69 61 | 6c 6c 79 20 2a 5c 6e 69 | (initia|lly *\ni|
|00002210| 6c 2a 29 2e 20 20 57 68 | 65 6e 20 74 68 65 20 6d |l*). Wh|en the m|
|00002220| 61 63 72 6f 20 65 78 69 | 74 73 2c 0a 2a 5c 74 72 |acro exi|ts,.*\tr|
|00002230| 65 65 73 69 7a 65 73 2a | 20 77 69 6c 6c 20 62 65 |eesizes*| will be|
|00002240| 20 75 70 64 61 74 65 64 | 20 77 69 74 68 20 74 68 | updated| with th|
|00002250| 65 20 77 69 64 74 68 73 | 20 66 6f 75 6e 64 20 69 |e widths| found i|
|00002260| 6e 20 74 68 65 20 76 61 | 72 69 6f 75 73 0a 6c 65 |n the va|rious.le|
|00002270| 76 65 6c 73 20 6f 66 20 | 74 68 65 20 67 69 76 65 |vels of |the give|
|00002280| 6e 20 74 72 65 65 20 6f | 72 20 73 75 62 74 72 65 |n tree o|r subtre|
|00002290| 65 2e 20 20 41 20 6e 65 | 77 20 2a 5c 64 69 6d 65 |e. A ne|w *\dime|
|000022a0| 6e 2a 2c 20 2a 5c 74 72 | 65 65 77 69 64 74 68 2a |n*, *\tr|eewidth*|
|000022b0| 2c 20 69 73 0a 75 73 65 | 64 20 77 69 74 68 69 6e |, is.use|d within|
|000022c0| 20 74 68 65 20 6d 61 63 | 72 6f 20 74 6f 20 72 65 | the mac|ro to re|
|000022d0| 6d 65 6d 62 65 72 20 74 | 68 65 20 70 72 65 76 69 |member t|he previ|
|000022e0| 6f 75 73 20 6d 61 78 69 | 6d 75 6d 20 77 69 64 74 |ous maxi|mum widt|
|000022f0| 68 20 61 74 20 74 68 65 | 0a 6c 65 76 65 6c 20 6f |h at the|.level o|
|00002300| 66 20 74 68 65 20 74 72 | 65 65 27 73 20 72 6f 6f |f the tr|ee's roo|
|00002310| 74 2e 0a 0a 5c 76 62 0a | 5c 64 65 66 5c 73 65 74 |t...\vb.|\def\set|
|00002320| 74 72 65 65 73 69 7a 65 | 73 7b 5c 73 65 74 62 6f |treesize|s{\setbo|
|00002330| 78 30 3d 5c 63 6f 70 79 | 5c 74 72 65 65 62 6f 78 |x0=\copy|\treebox|
|00002340| 20 5c 67 6c 6f 62 61 6c | 5c 6c 65 74 5c 74 72 65 | \global|\let\tre|
|00002350| 65 73 69 7a 65 73 5c 6e | 69 6c 20 5c 73 65 74 73 |esizes\n|il \sets|
|00002360| 69 7a 65 73 7d 0a 5c 6e | 65 77 64 69 6d 65 6e 5c |izes}.\n|ewdimen\|
|00002370| 74 72 65 65 77 69 64 74 | 68 20 20 20 20 20 20 20 |treewidt|h |
|00002380| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 25 20 | | % |
|00002390| 57 69 64 74 68 20 6f 66 | 20 74 68 69 73 20 70 61 |Width of| this pa|
|000023a0| 72 74 20 6f 66 20 74 68 | 65 20 74 72 65 65 2e 0a |rt of th|e tree..|
|000023b0| 5c 64 65 66 5c 73 65 74 | 73 69 7a 65 73 7b 5c 73 |\def\set|sizes{\s|
|000023c0| 65 74 62 6f 78 30 3d 5c | 68 62 6f 78 5c 62 67 72 |etbox0=\|hbox\bgr|
|000023d0| 6f 75 70 20 20 20 20 20 | 25 20 47 65 74 20 61 20 |oup |% Get a |
|000023e0| 68 6f 72 69 7a 20 6c 69 | 73 74 20 61 73 20 61 20 |horiz li|st as a |
|000023f0| 77 6f 72 6b 73 70 61 63 | 65 2e 0a 20 20 5c 75 6e |workspac|e.. \un|
|00002400| 68 62 6f 78 30 5c 75 6e | 73 6b 69 70 20 20 20 20 |hbox0\un|skip |
|00002410| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002420| 20 20 20 25 20 54 61 6b | 65 20 74 72 65 65 2c 20 | % Tak|e tree, |
|00002430| 75 6e 70 61 63 6b 20 69 | 74 20 69 6e 74 6f 20 68 |unpack i|t into h|
|00002440| 6f 72 69 7a 20 6c 69 73 | 74 2e 0a 20 20 5c 69 6e |oriz lis|t.. \in|
|00002450| 69 74 74 72 65 65 77 69 | 64 74 68 20 20 20 20 20 |ittreewi|dth |
|00002460| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002470| 20 20 20 25 20 47 65 74 | 20 6f 6c 64 20 77 69 64 | % Get| old wid|
|00002480| 74 68 20 61 74 20 74 68 | 69 73 20 6c 65 76 65 6c |th at th|is level|
|00002490| 2e 0a 20 20 5c 73 69 7a | 65 73 75 62 74 72 65 65 |.. \siz|esubtree|
|000024a0| 73 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |s | |
|000024b0| 20 20 20 20 20 20 20 20 | 20 20 25 20 52 65 63 75 | | % Recu|
|000024c0| 72 73 65 20 74 68 72 6f | 75 67 68 20 61 6c 6c 20 |rse thro|ugh all |
|000024d0| 73 75 62 74 72 65 65 73 | 2e 0a 20 20 5c 73 69 7a |subtrees|.. \siz|
|000024e0| 65 6c 65 76 65 6c 20 20 | 20 20 20 20 20 20 20 20 |elevel | |
|000024f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002500| 20 20 25 20 4e 6f 77 20 | 73 65 74 20 77 69 64 74 | % Now |set widt|
|00002510| 68 20 66 72 6f 6d 20 72 | 65 6d 61 69 6e 69 6e 67 |h from r|emaining|
|00002520| 20 5c 76 62 6f 78 2e 0a | 20 20 5c 65 67 72 6f 75 | \vbox..| \egrou|
|00002530| 70 7d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |p} | |
|00002540| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002550| 25 20 41 6c 6c 20 64 6f | 6e 65 2c 20 66 69 6e 69 |% All do|ne, fini|
|00002560| 73 68 20 6f 75 72 20 5c | 68 62 6f 78 2e 0a 5c 65 |sh our \|hbox..\e|
|00002570| 6e 64 76 62 0a 0a 54 68 | 65 20 66 69 72 73 74 20 |ndvb..Th|e first |
|00002580| 74 68 69 6e 67 20 2a 5c | 73 65 74 73 69 7a 65 73 |thing *\|setsizes|
|00002590| 2a 20 64 6f 65 73 20 69 | 73 20 74 6f 20 66 69 6e |* does i|s to fin|
|000025a0| 64 20 6f 75 74 20 77 68 | 61 74 20 74 68 65 20 70 |d out wh|at the p|
|000025b0| 72 65 76 69 6f 75 73 0a | 6d 61 78 69 6d 75 6d 20 |revious.|maximum |
|000025c0| 61 74 20 74 68 69 73 20 | 6c 65 76 65 6c 20 77 61 |at this |level wa|
|000025d0| 73 2c 20 61 6e 64 20 73 | 74 6f 72 65 20 69 74 20 |s, and s|tore it |
|000025e0| 69 6e 20 2a 5c 74 72 65 | 65 77 69 64 74 68 2a 2e |in *\tre|ewidth*.|
|000025f0| 20 20 49 66 0a 2a 5c 74 | 72 65 65 73 69 7a 65 73 | If.*\t|reesizes|
|00002600| 2a 20 69 73 20 2a 5c 6e | 69 6c 2a 2c 20 77 65 20 |* is *\n|il*, we |
|00002610| 68 61 76 65 6e 27 74 20 | 73 65 65 6e 20 61 6e 79 |haven't |seen any|
|00002620| 74 68 69 6e 67 20 74 68 | 69 73 20 64 65 65 70 20 |thing th|is deep |
|00002630| 69 6e 20 74 68 65 20 74 | 72 65 65 0a 62 65 66 6f |in the t|ree.befo|
|00002640| 72 65 2c 20 73 6f 20 74 | 68 65 20 70 72 65 76 69 |re, so t|he previ|
|00002650| 6f 75 73 20 73 69 7a 65 | 20 69 73 20 7a 65 72 6f |ous size| is zero|
|00002660| 2e 20 20 4f 74 68 65 72 | 77 69 73 65 2c 20 69 74 |. Other|wise, it|
|00002670| 20 69 73 20 2a 5c 63 61 | 72 5c 74 72 65 65 73 69 | is *\ca|r\treesi|
|00002680| 7a 65 73 2a 2c 0a 61 6e | 64 20 77 65 20 61 6c 73 |zes*,.an|d we als|
|00002690| 6f 20 64 6f 20 2a 5c 63 | 64 72 5c 74 72 65 65 73 |o do *\c|dr\trees|
|000026a0| 69 7a 65 73 2a 20 74 6f | 20 70 72 65 70 61 72 65 |izes* to| prepare|
|000026b0| 20 66 6f 72 20 6c 61 74 | 65 72 20 72 65 63 75 72 | for lat|er recur|
|000026c0| 73 69 76 65 20 63 61 6c | 6c 73 0a 74 6f 20 2a 5c |sive cal|ls.to *\|
|000026d0| 73 65 74 73 69 7a 65 73 | 2a 2e 0a 0a 5c 76 62 0a |setsizes|*...\vb.|
|000026e0| 5c 64 65 66 5c 69 6e 69 | 74 74 72 65 65 77 69 64 |\def\ini|ttreewid|
|000026f0| 74 68 7b 5c 69 66 78 5c | 74 72 65 65 73 69 7a 65 |th{\ifx\|treesize|
|00002700| 73 5c 6e 69 6c 20 20 20 | 25 20 49 66 20 74 68 69 |s\nil |% If thi|
|00002710| 73 20 69 73 20 74 68 65 | 20 66 69 72 73 74 20 61 |s is the| first a|
|00002720| 74 20 74 68 69 73 20 6c | 65 76 65 6c 0a 20 20 20 |t this l|evel. |
|00002730| 20 5c 74 72 65 65 77 69 | 64 74 68 3d 30 70 74 20 | \treewi|dth=0pt |
|00002740| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002750| 20 20 20 20 20 25 20 2e | 2e 74 68 65 6e 20 77 65 | % .|.then we|
|00002760| 20 68 61 76 65 20 6e 6f | 20 70 72 65 76 69 6f 75 | have no| previou|
|00002770| 73 20 6d 61 78 20 77 69 | 64 74 68 2e 0a 20 20 5c |s max wi|dth.. \|
|00002780| 65 6c 73 65 20 5c 74 72 | 65 65 77 69 64 74 68 3d |else \tr|eewidth=|
|00002790| 5c 63 61 72 5c 74 72 65 | 65 73 69 7a 65 73 20 20 |\car\tre|esizes |
|000027a0| 20 20 20 20 20 25 20 4f | 74 68 65 72 77 69 73 65 | % O|therwise|
|000027b0| 20 74 61 6b 65 20 6f 6c | 64 20 6d 61 78 20 6c 65 | take ol|d max le|
|000027c0| 76 65 6c 20 77 69 64 74 | 68 0a 20 20 20 20 5c 67 |vel widt|h. \g|
|000027d0| 6c 6f 62 61 6c 5c 63 64 | 72 5c 74 72 65 65 73 69 |lobal\cd|r\treesi|
|000027e0| 7a 65 73 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |zes | |
|000027f0| 20 20 25 20 2e 2e 61 6e | 64 20 61 64 76 61 6e 63 | % ..an|d advanc|
|00002800| 65 20 6c 65 76 65 6c 20 | 77 69 64 74 68 20 73 74 |e level |width st|
|00002810| 6f 72 61 67 65 0a 20 20 | 20 20 5c 66 69 7d 20 20 |orage. | \fi} |
|00002820| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002830| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 25 20 | | % |
|00002840| 2e 2e 69 6e 20 70 72 65 | 70 61 72 61 74 69 6f 6e |..in pre|paration|
|00002850| 20 66 6f 72 20 6e 65 78 | 74 20 6c 65 76 65 6c 2e | for nex|t level.|
|00002860| 0a 5c 65 6e 64 76 62 0a | 0a 41 74 20 74 68 69 73 |.\endvb.|.At this|
|00002870| 20 70 6f 69 6e 74 2c 20 | 77 65 20 68 61 76 65 20 | point, |we have |
|00002880| 61 20 68 6f 72 69 7a 6f | 6e 74 61 6c 20 6c 69 73 |a horizo|ntal lis|
|00002890| 74 20 28 74 68 65 20 2a | 5c 68 62 6f 78 2a 20 69 |t (the *|\hbox* i|
|000028a0| 6e 20 2a 5c 73 65 74 73 | 69 7a 65 73 2a 29 0a 63 |n *\sets|izes*).c|
|000028b0| 6f 6e 74 61 69 6e 69 6e | 67 20 74 68 65 20 2a 5c |ontainin|g the *\|
|000028c0| 76 62 6f 78 2a 20 66 6f | 72 20 74 68 65 20 74 65 |vbox* fo|r the te|
|000028d0| 78 74 20 61 74 20 74 68 | 65 20 72 6f 6f 74 20 6f |xt at th|e root o|
|000028e0| 66 20 74 68 69 73 20 73 | 75 62 74 72 65 65 2c 0a |f this s|ubtree,.|
|000028f0| 66 6f 6c 6c 6f 77 65 64 | 20 62 79 20 74 68 65 20 |followed| by the |
|00002900| 2a 5c 68 62 6f 78 2a 65 | 73 20 66 6f 72 20 61 6c |*\hbox*e|s for al|
|00002910| 6c 20 6f 66 20 69 74 73 | 20 73 75 62 2d 73 75 62 |l of its| sub-sub|
|00002920| 74 72 65 65 73 2e 20 20 | 57 65 20 6c 6f 6f 70 20 |trees. |We loop |
|00002930| 70 75 6c 6c 69 6e 67 20 | 62 6f 78 65 73 0a 66 72 |pulling |boxes.fr|
|00002940| 6f 6d 20 74 68 65 20 65 | 6e 64 20 6f 66 20 74 68 |om the e|nd of th|
|00002950| 65 20 6c 69 73 74 20 77 | 69 74 68 20 2a 5c 6c 61 |e list w|ith *\la|
|00002960| 73 74 62 6f 78 2a 20 75 | 6e 74 69 6c 20 77 65 20 |stbox* u|ntil we |
|00002970| 66 69 6e 64 20 74 68 65 | 20 74 65 78 74 20 2a 5c |find the| text *\|
|00002980| 76 62 6f 78 2a 2c 0a 63 | 61 6c 6c 69 6e 67 20 2a |vbox*,.c|alling *|
|00002990| 5c 73 65 74 73 69 7a 65 | 73 2a 20 72 65 63 75 72 |\setsize|s* recur|
|000029a0| 73 69 76 65 6c 79 20 66 | 6f 72 20 65 61 63 68 20 |sively f|or each |
|000029b0| 2a 5c 68 62 6f 78 2a 20 | 77 65 20 63 6f 6d 65 20 |*\hbox* |we come |
|000029c0| 61 63 72 6f 73 73 2e 0a | 0a 5c 76 62 0a 5c 64 65 |across..|.\vb.\de|
|000029d0| 66 5c 73 69 7a 65 73 75 | 62 74 72 65 65 73 7b 5c |f\sizesu|btrees{\|
|000029e0| 6c 6f 6f 70 20 20 20 20 | 20 20 20 20 20 20 20 20 |loop | |
|000029f0| 20 20 20 20 20 25 20 46 | 6f 72 20 65 61 63 68 20 | % F|or each |
|00002a00| 62 6f 78 20 69 6e 20 68 | 6f 72 69 7a 20 6c 69 73 |box in h|oriz lis|
|00002a10| 74 20 28 73 75 62 74 72 | 65 65 29 0a 20 20 5c 73 |t (subtr|ee). \s|
|00002a20| 65 74 62 6f 78 30 3d 5c | 6c 61 73 74 62 6f 78 20 |etbox0=\|lastbox |
|00002a30| 5c 75 6e 73 6b 69 70 20 | 20 20 20 20 20 20 20 20 |\unskip | |
|00002a40| 20 20 20 20 25 20 2e 2e | 70 75 6c 6c 20 69 74 20 | % ..|pull it |
|00002a50| 6f 66 66 20 6c 69 73 74 | 20 61 6e 64 20 66 6c 75 |off list| and flu|
|00002a60| 73 68 20 67 6c 75 65 2e | 0a 20 20 5c 69 66 68 62 |sh glue.|. \ifhb|
|00002a70| 6f 78 30 20 5c 73 65 74 | 73 69 7a 65 73 20 20 20 |ox0 \set|sizes |
|00002a80| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002a90| 20 25 20 49 66 20 68 62 | 6f 78 2c 20 69 74 27 73 | % If hb|ox, it's|
|00002aa0| 20 61 20 73 75 62 74 72 | 65 65 20 2d 20 72 65 63 | a subtr|ee - rec|
|00002ab0| 75 72 73 65 0a 20 20 5c | 72 65 70 65 61 74 7d 20 |urse. \|repeat} |
|00002ac0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002ad0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 25 20 2e | | % .|
|00002ae0| 2e 61 6e 64 20 6c 6f 6f | 70 3b 20 65 6e 64 20 6c |.and loo|p; end l|
|00002af0| 6f 6f 70 20 6f 6e 20 74 | 72 65 65 20 74 65 78 74 |oop on t|ree text|
|00002b00| 2e 0a 5c 65 6e 64 76 62 | 0a 0a 4e 6f 77 20 61 6c |..\endvb|..Now al|
|00002b10| 6c 20 74 68 61 74 20 72 | 65 6d 61 69 6e 73 20 74 |l that r|emains t|
|00002b20| 6f 20 64 6f 20 69 6e 20 | 74 68 69 73 20 63 61 6c |o do in |this cal|
|00002b30| 6c 20 74 6f 20 2a 5c 73 | 65 74 73 69 7a 65 73 2a |l to *\s|etsizes*|
|00002b40| 20 69 73 20 74 6f 20 75 | 70 64 61 74 65 0a 2a 5c | is to u|pdate.*\|
|00002b50| 74 72 65 65 77 69 64 74 | 68 2a 20 69 66 20 74 68 |treewidt|h* if th|
|00002b60| 65 20 74 65 78 74 20 62 | 6f 78 2c 20 77 68 69 63 |e text b|ox, whic|
|00002b70| 68 20 63 61 6e 20 62 65 | 20 66 6f 75 6e 64 20 69 |h can be| found i|
|00002b80| 6e 20 2a 5c 62 6f 78 30 | 2a 2c 20 69 73 20 77 69 |n *\box0|*, is wi|
|00002b90| 64 65 72 0a 74 68 61 6e | 20 74 68 65 20 70 72 65 |der.than| the pre|
|00002ba0| 76 69 6f 75 73 20 6d 61 | 78 69 6d 75 6d 2e 20 20 |vious ma|ximum. |
|00002bb0| 54 68 65 6e 20 77 65 20 | 61 64 64 20 74 68 65 20 |Then we |add the |
|00002bc0| 28 70 6f 73 73 69 62 6c | 79 20 75 70 64 61 74 65 |(possibl|y update|
|00002bd0| 64 29 20 76 61 6c 75 65 | 0a 6f 66 20 2a 5c 74 72 |d) value|.of *\tr|
|00002be0| 65 65 77 69 64 74 68 2a | 20 61 73 20 61 20 74 65 |eewidth*| as a te|
|00002bf0| 78 74 20 73 74 72 69 6e | 67 20 62 61 63 6b 20 6f |xt strin|g back o|
|00002c00| 6e 74 6f 20 74 68 65 20 | 68 65 61 64 20 6f 66 20 |nto the |head of |
|00002c10| 2a 5c 74 72 65 65 73 69 | 7a 65 73 2a 2e 0a 0a 5c |*\treesi|zes*...\|
|00002c20| 76 62 0a 5c 64 65 66 5c | 73 69 7a 65 6c 65 76 65 |vb.\def\|sizeleve|
|00002c30| 6c 7b 5c 69 66 64 69 6d | 5c 74 72 65 65 77 69 64 |l{\ifdim|\treewid|
|00002c40| 74 68 3c 5c 77 64 30 20 | 20 20 20 25 20 49 66 20 |th<\wd0 | % If |
|00002c50| 67 72 65 61 74 65 72 20 | 74 68 61 6e 20 70 72 65 |greater |than pre|
|00002c60| 76 69 6f 75 73 20 6d 61 | 78 69 6d 75 6d 0a 20 20 |vious ma|ximum. |
|00002c70| 20 5c 74 72 65 65 77 69 | 64 74 68 3d 5c 77 64 30 | \treewi|dth=\wd0|
|00002c80| 20 5c 66 69 20 20 20 20 | 20 20 20 20 20 20 20 20 | \fi | |
|00002c90| 20 20 20 20 20 20 25 20 | 54 68 65 6e 20 73 65 74 | % |Then set|
|00002ca0| 20 6d 61 78 20 74 6f 20 | 6e 65 77 20 68 69 67 68 | max to |new high|
|00002cb0| 0a 20 5c 67 6c 6f 62 61 | 6c 5c 63 6f 6e 73 7b 5c |. \globa|l\cons{\|
|00002cc0| 74 68 65 5c 74 72 65 65 | 77 69 64 74 68 7d 5c 74 |the\tree|width}\t|
|00002cd0| 72 65 65 73 69 7a 65 73 | 7d 25 20 49 6e 20 65 69 |reesizes|}% In ei|
|00002ce0| 74 68 65 72 20 63 61 73 | 65 2c 20 70 75 74 20 62 |ther cas|e, put b|
|00002cf0| 61 63 6b 20 6f 6e 20 6c | 69 73 74 0a 5c 65 6e 64 |ack on l|ist.\end|
|00002d00| 76 62 0a 0c 0a 5c 62 65 | 67 69 6e 73 65 63 74 69 |vb...\be|ginsecti|
|00002d10| 6f 6e 20 50 61 73 73 20 | 33 3a 20 54 79 70 65 73 |on Pass |3: Types|
|00002d20| 65 74 74 69 6e 67 20 74 | 68 65 20 74 72 65 65 0a |etting t|he tree.|
|00002d30| 0a 57 65 20 61 72 65 20 | 6e 6f 77 20 72 65 61 64 |.We are |now read|
|00002d40| 79 20 74 6f 20 62 65 67 | 69 6e 20 61 63 74 75 61 |y to beg|in actua|
|00002d50| 6c 20 63 6f 6e 73 74 72 | 75 63 74 69 6f 6e 20 6f |l constr|uction o|
|00002d60| 66 20 74 68 65 20 74 72 | 65 65 2e 20 20 54 68 69 |f the tr|ee. Thi|
|00002d70| 73 20 69 73 0a 64 6f 6e | 65 20 62 79 20 63 61 6c |s is.don|e by cal|
|00002d80| 6c 69 6e 67 20 2a 5c 6d | 61 6b 65 74 72 65 65 2a |ling *\m|aketree*|
|00002d90| 2c 20 77 68 69 63 68 20 | 6c 69 6b 65 20 2a 5c 73 |, which |like *\s|
|00002da0| 65 74 73 69 7a 65 73 2a | 20 63 61 6c 6c 73 20 69 |etsizes*| calls i|
|00002db0| 74 73 65 6c 66 0a 72 65 | 63 75 72 73 69 76 65 6c |tself.re|cursivel|
|00002dc0| 79 20 66 6f 72 20 61 6c | 6c 20 73 75 62 74 72 65 |y for al|l subtre|
|00002dd0| 65 73 2e 20 20 49 74 20 | 61 64 64 73 20 61 6e 20 |es. It |adds an |
|00002de0| 2a 5c 68 62 6f 78 2a 20 | 63 6f 6e 74 61 69 6e 69 |*\hbox* |containi|
|00002df0| 6e 67 20 74 68 65 20 67 | 69 76 65 6e 0a 73 75 62 |ng the g|iven.sub|
|00002e00| 74 72 65 65 20 28 77 68 | 69 63 68 20 69 74 20 66 |tree (wh|ich it f|
|00002e10| 69 6e 64 73 20 69 6e 20 | 2a 5c 74 72 65 65 62 6f |inds in |*\treebo|
|00002e20| 78 2a 29 20 74 6f 20 74 | 68 65 20 63 75 72 72 65 |x*) to t|he curre|
|00002e30| 6e 74 20 68 6f 72 69 7a | 6f 6e 74 61 6c 20 6c 69 |nt horiz|ontal li|
|00002e40| 73 74 3b 0a 74 68 75 73 | 20 74 68 65 20 6f 75 74 |st;.thus| the out|
|00002e50| 65 72 20 63 61 6c 6c 20 | 74 6f 20 2a 5c 6d 61 6b |er call |to *\mak|
|00002e60| 65 74 72 65 65 2a 20 73 | 65 6e 64 73 20 74 68 65 |etree* s|ends the|
|00002e70| 20 77 68 6f 6c 65 20 74 | 72 65 65 20 69 6e 74 6f | whole t|ree into|
|00002e80| 20 5c 54 65 58 27 73 0a | 6f 75 74 70 75 74 20 73 | \TeX's.|output s|
|00002e90| 74 72 65 61 6d 2e 20 20 | 0a 0a 5c 76 62 0a 5c 6e |tream. |..\vb.\n|
|00002ea0| 65 77 64 69 6d 65 6e 5c | 74 72 65 65 68 65 69 67 |ewdimen\|treeheig|
|00002eb0| 68 74 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |ht | |
|00002ec0| 20 20 20 20 20 20 25 20 | 48 65 69 67 68 74 20 6f | % |Height o|
|00002ed0| 66 20 74 68 69 73 20 70 | 61 72 74 20 6f 66 20 74 |f this p|art of t|
|00002ee0| 68 65 20 74 72 65 65 2e | 0a 5c 6e 65 77 69 66 5c |he tree.|.\newif\|
|00002ef0| 69 66 6c 65 61 66 20 20 | 20 20 20 20 20 20 20 20 |ifleaf | |
|00002f00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002f10| 20 25 20 54 72 65 65 20 | 68 61 73 20 6e 6f 20 73 | % Tree |has no s|
|00002f20| 75 62 74 72 65 65 73 20 | 28 69 73 20 61 20 6c 65 |ubtrees |(is a le|
|00002f30| 61 66 29 2e 0a 5c 6e 65 | 77 69 66 5c 69 66 62 6f |af)..\ne|wif\ifbo|
|00002f40| 74 73 75 62 20 20 20 20 | 20 20 20 20 20 20 20 20 |tsub | |
|00002f50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 25 20 42 | | % B|
|00002f60| 6f 74 74 6f 6d 20 73 75 | 62 74 72 65 65 20 6f 66 |ottom su|btree of|
|00002f70| 20 70 61 72 65 6e 74 2e | 0a 5c 6e 65 77 69 66 5c | parent.|.\newif\|
|00002f80| 69 66 74 6f 70 73 75 62 | 20 20 20 20 20 20 20 20 |iftopsub| |
|00002f90| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002fa0| 20 25 20 54 6f 70 20 73 | 75 62 74 72 65 65 20 6f | % Top s|ubtree o|
|00002fb0| 66 20 70 61 72 65 6e 74 | 2e 0a 5c 64 65 66 5c 74 |f parent|..\def\t|
|00002fc0| 79 70 65 73 65 74 74 72 | 65 65 7b 5c 6d 65 64 73 |ypesettr|ee{\meds|
|00002fd0| 6b 69 70 20 5c 6d 61 6b | 65 74 72 65 65 20 5c 6d |kip \mak|etree \m|
|00002fe0| 65 64 73 6b 69 70 7d 20 | 20 20 25 20 4d 61 6b 65 |edskip} | % Make|
|00002ff0| 20 77 68 6f 6c 65 20 74 | 72 65 65 20 77 69 74 68 | whole t|ree with|
|00003000| 20 73 70 61 63 69 6e 67 | 2e 0a 5c 64 65 66 5c 6d | spacing|..\def\m|
|00003010| 61 6b 65 74 72 65 65 7b | 5c 68 62 6f 78 7b 5c 74 |aketree{|\hbox{\t|
|00003020| 72 65 65 77 69 64 74 68 | 3d 5c 63 61 72 5c 74 72 |reewidth|=\car\tr|
|00003030| 65 65 73 69 7a 65 73 20 | 20 20 25 20 47 65 74 20 |eesizes | % Get |
|00003040| 77 69 64 74 68 20 61 74 | 20 74 68 69 73 20 6c 65 |width at| this le|
|00003050| 76 65 6c 2e 0a 20 20 5c | 63 64 72 5c 74 72 65 65 |vel.. \|cdr\tree|
|00003060| 73 69 7a 65 73 20 20 20 | 20 20 20 20 20 20 20 20 |sizes | |
|00003070| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 25 20 53 | | % S|
|00003080| 65 74 20 75 70 20 77 69 | 64 74 68 20 6c 69 73 74 |et up wi|dth list|
|00003090| 20 66 6f 72 20 72 65 63 | 75 72 73 69 6f 6e 2e 0a | for rec|ursion..|
|000030a0| 20 20 5c 6d 61 6b 65 73 | 75 62 74 72 65 65 62 6f | \makes|ubtreebo|
|000030b0| 78 5c 75 6e 73 6b 69 70 | 20 20 20 20 20 20 20 20 |x\unskip| |
|000030c0| 20 20 20 20 20 20 20 20 | 25 20 53 65 74 20 5c 74 | |% Set \t|
|000030d0| 72 65 65 62 6f 78 20 74 | 6f 20 74 65 78 74 2c 20 |reebox t|o text, |
|000030e0| 6d 61 6b 65 20 73 75 62 | 74 72 65 65 73 2e 0a 20 |make sub|trees.. |
|000030f0| 20 5c 69 66 6c 65 61 66 | 20 5c 6d 61 6b 65 6c 65 | \ifleaf| \makele|
|00003100| 61 66 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |af | |
|00003110| 20 20 20 20 20 20 20 25 | 20 4e 6f 20 73 75 62 74 | %| No subt|
|00003120| 72 65 65 73 2c 20 61 64 | 64 20 67 6c 75 65 2e 0a |rees, ad|d glue..|
|00003130| 20 20 5c 65 6c 73 65 20 | 5c 6d 61 6b 65 70 61 72 | \else |\makepar|
|00003140| 65 6e 74 20 5c 66 69 7d | 7d 20 20 20 20 20 20 20 |ent \fi}|} |
|00003150| 20 20 20 20 20 20 20 20 | 25 20 48 61 76 65 20 73 | |% Have s|
|00003160| 75 62 74 72 65 65 73 2c | 20 73 74 69 63 6b 20 74 |ubtrees,| stick t|
|00003170| 68 65 6d 20 61 74 20 72 | 69 67 68 74 2e 0a 5c 65 |hem at r|ight..\e|
|00003180| 6e 64 76 62 0a 0a 41 66 | 74 65 72 20 2a 5c 6d 61 |ndvb..Af|ter *\ma|
|00003190| 6b 65 74 72 65 65 2a 20 | 73 65 74 73 20 2a 5c 74 |ketree* |sets *\t|
|000031a0| 72 65 65 77 69 64 74 68 | 2a 20 66 72 6f 6d 20 2a |reewidth|* from *|
|000031b0| 5c 74 72 65 65 73 69 7a | 65 73 2a 2c 20 69 74 20 |\treesiz|es*, it |
|000031c0| 63 61 6c 6c 73 0a 2a 5c | 6d 61 6b 65 73 75 62 74 |calls.*\|makesubt|
|000031d0| 72 65 65 62 6f 78 2a 2e | 20 20 54 68 69 73 20 6f |reebox*.| This o|
|000031e0| 70 65 6e 73 20 75 70 20 | 74 68 65 20 68 6f 72 69 |pens up |the hori|
|000031f0| 7a 6f 6e 74 61 6c 20 6c | 69 73 74 20 64 65 73 63 |zontal l|ist desc|
|00003200| 72 69 62 69 6e 67 20 74 | 68 69 73 0a 6c 65 76 65 |ribing t|his.leve|
|00003210| 6c 20 6f 66 20 74 68 65 | 20 74 72 65 65 2c 20 61 |l of the| tree, a|
|00003220| 6e 64 20 63 68 65 63 6b | 73 20 77 68 65 74 68 65 |nd check|s whethe|
|00003230| 72 20 69 74 20 68 61 73 | 20 73 75 62 74 72 65 65 |r it has| subtree|
|00003240| 73 2e 20 20 49 66 20 6e | 6f 74 2c 0a 2a 5c 69 66 |s. If n|ot,.*\if|
|00003250| 6c 65 61 66 2a 20 69 73 | 20 73 65 74 20 74 6f 20 |leaf* is| set to |
|00003260| 74 72 75 65 3b 20 6f 74 | 68 65 72 77 69 73 65 20 |true; ot|herwise |
|00003270| 69 74 20 69 73 20 73 65 | 74 20 74 6f 20 66 61 6c |it is se|t to fal|
|00003280| 73 65 2c 20 61 6e 64 20 | 2a 5c 62 6f 78 30 2a 0a |se, and |*\box0*.|
|00003290| 69 73 20 73 65 74 20 74 | 6f 20 63 6f 6e 74 61 69 |is set t|o contai|
|000032a0| 6e 20 61 20 2a 5c 76 62 | 6f 78 2a 20 6f 66 20 74 |n a *\vb|ox* of t|
|000032b0| 68 65 6d 20 77 69 74 68 | 20 74 68 65 69 72 20 63 |hem with| their c|
|000032c0| 6f 6e 6e 65 63 74 69 6e | 67 20 72 75 6c 65 73 2c |onnectin|g rules,|
|000032d0| 0a 65 78 63 65 70 74 20 | 66 6f 72 20 74 68 65 20 |.except |for the |
|000032e0| 68 6f 72 69 7a 6f 6e 74 | 61 6c 20 72 75 6c 65 20 |horizont|al rule |
|000032f0| 6c 65 61 64 69 6e 67 20 | 66 72 6f 6d 20 74 68 65 |leading |from the|
|00003300| 20 74 72 65 65 20 74 65 | 78 74 20 74 6f 20 74 68 | tree te|xt to th|
|00003310| 65 0a 73 75 62 74 72 65 | 65 73 2e 20 20 49 6e 20 |e.subtre|es. In |
|00003320| 61 6e 79 20 63 61 73 65 | 20 2a 5c 74 72 65 65 62 |any case| *\treeb|
|00003330| 6f 78 2a 20 69 73 20 73 | 65 74 20 74 6f 20 74 68 |ox* is s|et to th|
|00003340| 65 20 2a 5c 76 62 6f 78 | 2a 20 63 6f 6e 74 61 69 |e *\vbox|* contai|
|00003350| 6e 69 6e 67 20 74 68 65 | 0a 74 72 65 65 20 74 65 |ning the|.tree te|
|00003360| 78 74 2e 0a 0a 5c 76 62 | 0a 0a 7b 5c 63 61 74 63 |xt...\vb|..{\catc|
|00003370| 6f 64 65 60 40 3d 31 31 | 20 20 20 20 20 20 20 20 |ode`@=11| |
|00003380| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003390| 20 20 25 20 42 65 20 61 | 62 6c 65 20 74 6f 20 75 | % Be a|ble to u|
|000033a0| 73 65 20 5c 76 6f 69 64 | 62 40 78 2e 0a 5c 67 64 |se \void|b@x..\gd|
|000033b0| 65 66 5c 6d 61 6b 65 73 | 75 62 74 72 65 65 62 6f |ef\makes|ubtreebo|
|000033c0| 78 7b 5c 75 6e 68 62 6f | 78 5c 74 72 65 65 62 6f |x{\unhbo|x\treebo|
|000033d0| 78 20 20 20 20 25 20 4f | 70 65 6e 20 75 70 20 74 |x % O|pen up t|
|000033e0| 72 65 65 20 6f 72 20 73 | 75 62 74 72 65 65 2e 0a |ree or s|ubtree..|
|000033f0| 20 20 5c 75 6e 73 6b 69 | 70 5c 67 6c 6f 62 61 6c | \unski|p\global|
|00003400| 5c 73 65 74 62 6f 78 5c | 74 72 65 65 62 6f 78 5c |\setbox\|treebox\|
|00003410| 6c 61 73 74 62 6f 78 20 | 25 20 50 69 63 6b 20 75 |lastbox |% Pick u|
|00003420| 70 20 76 65 72 79 20 6c | 61 73 74 20 62 6f 78 2e |p very l|ast box.|
|00003430| 0a 20 20 5c 69 66 76 62 | 6f 78 5c 74 72 65 65 62 |. \ifvb|ox\treeb|
|00003440| 6f 78 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |ox | |
|00003450| 20 20 20 20 20 20 20 20 | 20 25 20 49 66 20 77 65 | | % If we|
|00003460| 27 72 65 20 61 6c 72 65 | 61 64 79 20 61 74 20 74 |'re alre|ady at t|
|00003470| 68 65 20 5c 76 62 6f 78 | 0a 20 20 20 20 5c 67 6c |he \vbox|. \gl|
|00003480| 6f 62 61 6c 5c 6c 65 61 | 66 74 72 75 65 20 5c 6c |obal\lea|ftrue \l|
|00003490| 65 74 5c 6e 65 78 74 5c | 72 65 6c 61 78 20 20 20 |et\next\|relax |
|000034a0| 20 25 20 2e 2e 74 68 65 | 6e 20 74 68 69 73 20 69 | % ..the|n this i|
|000034b0| 73 20 61 20 6c 65 61 66 | 2e 0a 20 20 5c 65 6c 73 |s a leaf|.. \els|
|000034c0| 65 20 5c 62 6f 74 73 75 | 62 74 72 75 65 20 20 20 |e \botsu|btrue |
|000034d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000034e0| 20 20 25 20 4f 74 68 65 | 72 77 69 73 65 2c 20 77 | % Othe|rwise, w|
|000034f0| 65 20 68 61 76 65 20 73 | 75 62 74 72 65 65 73 2e |e have s|ubtrees.|
|00003500| 0a 20 20 20 20 5c 73 65 | 74 62 6f 78 30 5c 62 6f |. \se|tbox0\bo|
|00003510| 78 5c 76 6f 69 64 62 40 | 78 20 20 20 20 20 20 20 |x\voidb@|x |
|00003520| 20 20 20 20 20 20 20 20 | 20 25 20 49 6e 69 74 20 | | % Init |
|00003530| 73 74 61 63 6b 20 6f 66 | 20 70 72 6f 63 65 73 73 |stack of| process|
|00003540| 65 64 20 73 75 62 73 0a | 20 20 20 20 5c 62 6f 74 |ed subs.| \bot|
|00003550| 73 75 62 74 72 75 65 20 | 5c 6c 65 74 5c 6e 65 78 |subtrue |\let\nex|
|00003560| 74 5c 6d 61 6b 65 73 75 | 62 74 72 65 65 20 20 20 |t\makesu|btree |
|00003570| 25 20 2e 2e 61 6e 64 20 | 63 61 6c 6c 20 5c 6d 61 |% ..and |call \ma|
|00003580| 6b 65 74 72 65 65 20 6f | 6e 20 74 68 65 6d 2e 0a |ketree o|n them..|
|00003590| 20 20 5c 66 69 20 5c 6e | 65 78 74 7d 7d 20 20 20 | \fi \n|ext}} |
|000035a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000035b0| 20 20 20 20 20 20 20 20 | 25 20 46 69 6e 69 73 68 | |% Finish|
|000035c0| 20 75 70 20 66 6f 72 20 | 77 68 69 63 68 65 76 65 | up for |whicheve|
|000035d0| 72 20 69 74 20 77 61 73 | 2e 0a 5c 65 6e 64 76 62 |r it was|..\endvb|
|000035e0| 0a 0a 49 66 20 74 68 69 | 73 20 74 72 65 65 20 6f |..If thi|s tree o|
|000035f0| 72 20 73 75 62 74 72 65 | 65 20 69 74 73 65 6c 66 |r subtre|e itself|
|00003600| 20 68 61 73 20 73 75 62 | 74 72 65 65 73 2c 20 77 | has sub|trees, w|
|00003610| 65 20 6e 65 65 64 20 74 | 6f 20 70 75 74 20 74 68 |e need t|o put th|
|00003620| 65 6d 20 61 6e 64 0a 74 | 68 65 69 72 20 63 6f 6e |em and.t|heir con|
|00003630| 6e 65 63 74 69 6f 6e 73 | 20 69 6e 20 2a 5c 62 6f |nections| in *\bo|
|00003640| 78 30 2a 20 66 6f 72 20 | 2a 5c 6d 61 6b 65 73 75 |x0* for |*\makesu|
|00003650| 62 74 72 65 65 62 6f 78 | 2a 2e 20 20 57 65 20 63 |btreebox|*. We c|
|00003660| 6f 6d 65 20 68 65 72 65 | 20 77 69 74 68 0a 74 68 |ome here| with.th|
|00003670| 65 20 62 6f 74 74 6f 6d | 20 73 75 62 74 72 65 65 |e bottom| subtree|
|00003680| 20 69 6e 20 2a 5c 74 72 | 65 65 62 6f 78 2a 2c 20 | in *\tr|eebox*, |
|00003690| 74 68 65 20 72 65 6d 61 | 69 6e 69 6e 67 20 6c 69 |the rema|ining li|
|000036a0| 73 74 20 6f 66 20 73 75 | 62 74 72 65 65 73 20 69 |st of su|btrees i|
|000036b0| 6e 0a 74 68 65 20 63 75 | 72 72 65 6e 74 20 68 6f |n.the cu|rrent ho|
|000036c0| 72 69 7a 6f 6e 74 61 6c | 20 6c 69 73 74 2c 20 61 |rizontal| list, a|
|000036d0| 6e 64 20 74 68 65 20 61 | 6c 72 65 61 64 79 20 70 |nd the a|lready p|
|000036e0| 72 6f 63 65 73 73 65 64 | 20 73 75 62 74 72 65 65 |rocessed| subtree|
|000036f0| 73 0a 73 74 61 63 6b 65 | 64 20 69 6e 20 2a 5c 62 |s.stacke|d in *\b|
|00003700| 6f 78 30 2a 2e 20 20 54 | 68 65 20 2a 5c 69 66 62 |ox0*. T|he *\ifb|
|00003710| 6f 74 73 75 62 2a 20 74 | 65 73 74 20 77 69 6c 6c |otsub* t|est will|
|00003720| 20 62 65 20 74 72 75 65 | 20 66 6f 72 20 74 68 65 | be true| for the|
|00003730| 20 66 69 72 73 74 0a 63 | 61 6c 6c 2c 20 74 68 61 | first.c|all, tha|
|00003740| 74 20 69 73 2c 20 74 68 | 65 20 62 6f 74 74 6f 6d |t is, th|e bottom|
|00003750| 20 73 75 62 74 72 65 65 | 2e 20 20 48 65 72 65 20 | subtree|. Here |
|00003760| 77 65 20 70 72 6f 63 65 | 73 73 20 74 68 65 20 73 |we proce|ss the s|
|00003770| 75 62 74 72 65 65 20 69 | 6e 0a 2a 5c 74 72 65 65 |ubtree i|n.*\tree|
|00003780| 62 6f 78 2a 2e 20 20 49 | 66 20 74 68 69 73 20 69 |box*. I|f this i|
|00003790| 73 20 74 68 65 20 74 6f | 70 20 73 75 62 74 72 65 |s the to|p subtre|
|000037a0| 65 2c 20 77 65 20 72 65 | 74 75 72 6e 3b 20 6f 74 |e, we re|turn; ot|
|000037b0| 68 65 72 77 69 73 65 20 | 77 65 20 74 61 69 6c 0a |herwise |we tail.|
|000037c0| 72 65 63 75 72 73 65 20 | 74 6f 20 70 72 6f 63 65 |recurse |to proce|
|000037d0| 73 73 20 74 68 65 20 72 | 65 6d 61 69 6e 69 6e 67 |ss the r|emaining|
|000037e0| 20 73 75 62 74 72 65 65 | 73 2e 20 20 57 65 20 75 | subtree|s. We u|
|000037f0| 73 65 20 2a 5c 62 6f 78 | 31 2a 20 61 73 0a 61 6e |se *\box|1* as.an|
|00003800| 6f 74 68 65 72 20 73 63 | 72 61 74 63 68 20 76 61 |other sc|ratch va|
|00003810| 72 69 61 62 6c 65 3b 20 | 74 68 69 73 20 69 73 20 |riable; |this is |
|00003820| 73 61 66 65 20 62 65 63 | 61 75 73 65 20 74 68 65 |safe bec|ause the|
|00003830| 20 2a 5c 68 62 6f 78 2a | 20 69 6e 20 2a 5c 6d 61 | *\hbox*| in *\ma|
|00003840| 6b 65 74 72 65 65 2a 0a | 70 75 74 73 20 75 73 20 |ketree*.|puts us |
|00003850| 69 6e 73 69 64 65 20 61 | 20 67 72 6f 75 70 2c 20 |inside a| group, |
|00003860| 61 6e 64 20 61 6c 73 6f | 20 62 65 63 61 75 73 65 |and also| because|
|00003870| 20 77 65 20 61 72 65 20 | 6e 6f 74 20 63 68 61 6e | we are |not chan|
|00003880| 67 69 6e 67 20 74 68 65 | 20 6f 75 74 70 75 74 20 |ging the| output |
|00003890| 6c 69 73 74 2e 0a 0a 5c | 70 65 6e 61 6c 74 79 2d |list...\|penalty-|
|000038a0| 32 30 30 09 09 25 25 25 | 25 25 25 25 25 25 25 25 |200..%%%|%%%%%%%%|
|000038b0| 25 25 25 25 25 25 25 25 | 25 09 61 64 64 65 64 20 |%%%%%%%%|%.added |
|000038c0| 66 6f 72 20 54 55 47 62 | 6f 61 74 0a 0a 5c 76 62 |for TUGb|oat..\vb|
|000038d0| 0a 0a 5c 64 65 66 5c 6d | 61 6b 65 73 75 62 74 72 |..\def\m|akesubtr|
|000038e0| 65 65 7b 5c 73 65 74 62 | 6f 78 31 5c 6d 61 6b 65 |ee{\setb|ox1\make|
|000038f0| 74 72 65 65 20 20 20 20 | 20 20 25 20 43 61 6c 6c |tree | % Call|
|00003900| 20 5c 6d 61 6b 65 74 72 | 65 65 20 6f 6e 20 74 68 | \maketr|ee on th|
|00003910| 69 73 20 73 75 62 74 72 | 65 65 2e 0a 20 20 5c 75 |is subtr|ee.. \u|
|00003920| 6e 73 6b 69 70 5c 67 6c | 6f 62 61 6c 5c 73 65 74 |nskip\gl|obal\set|
|00003930| 62 6f 78 5c 74 72 65 65 | 62 6f 78 5c 6c 61 73 74 |box\tree|box\last|
|00003940| 62 6f 78 20 25 20 50 69 | 63 6b 20 75 70 20 62 6f |box % Pi|ck up bo|
|00003950| 78 20 62 65 66 6f 72 65 | 20 69 74 2e 0a 20 20 5c |x before| it.. \|
|00003960| 74 72 65 65 68 65 69 67 | 68 74 3d 5c 68 74 31 20 |treeheig|ht=\ht1 |
|00003970| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003980| 20 20 20 20 20 25 20 47 | 65 74 20 68 65 69 67 68 | % G|et heigh|
|00003990| 74 20 6f 66 20 73 75 62 | 74 72 65 65 20 77 65 20 |t of sub|tree we |
|000039a0| 6d 61 64 65 0a 20 20 5c | 61 64 76 61 6e 63 65 5c |made. \|advance\|
|000039b0| 74 72 65 65 68 65 69 67 | 68 74 20 32 65 78 20 20 |treeheig|ht 2ex |
|000039c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 25 20 41 | | % A|
|000039d0| 64 64 20 73 6f 6d 65 20 | 72 6f 6f 6d 20 61 72 6f |dd some |room aro|
|000039e0| 75 6e 64 20 74 68 65 20 | 65 64 67 65 73 0a 20 20 |und the |edges. |
|000039f0| 5c 69 66 68 62 6f 78 5c | 74 72 65 65 62 6f 78 20 |\ifhbox\|treebox |
|00003a00| 5c 74 6f 70 73 75 62 66 | 61 6c 73 65 20 20 20 20 |\topsubf|alse |
|00003a10| 20 20 20 20 20 20 25 20 | 49 66 20 70 69 63 6b 65 | % |If picke|
|00003a20| 64 20 75 70 20 62 6f 78 | 20 69 73 20 61 20 5c 76 |d up box| is a \v|
|00003a30| 62 6f 78 2c 0a 20 20 20 | 20 5c 65 6c 73 65 20 5c |box,. | \else \|
|00003a40| 74 6f 70 73 75 62 74 72 | 75 65 20 5c 66 69 20 20 |topsubtr|ue \fi |
|00003a50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 25 20 2e | | % .|
|00003a60| 2e 74 68 69 73 20 69 73 | 20 74 68 65 20 74 6f 70 |.this is| the top|
|00003a70| 2c 20 6f 74 68 65 72 77 | 69 73 65 20 6e 6f 74 2e |, otherw|ise not.|
|00003a80| 0a 20 20 5c 61 64 64 73 | 75 62 74 72 65 65 62 6f |. \adds|ubtreebo|
|00003a90| 78 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |x | |
|00003aa0| 20 20 20 20 20 20 20 20 | 20 25 20 53 74 61 63 6b | | % Stack|
|00003ab0| 20 73 75 62 74 72 65 65 | 20 77 69 74 68 20 74 68 | subtree| with th|
|00003ac0| 65 20 72 65 73 74 2e 0a | 20 20 5c 69 66 74 6f 70 |e rest..| \iftop|
|00003ad0| 73 75 62 20 5c 67 6c 6f | 62 61 6c 5c 6c 65 61 66 |sub \glo|bal\leaf|
|00003ae0| 66 61 6c 73 65 20 20 20 | 20 20 20 20 20 20 20 20 |false | |
|00003af0| 25 20 49 66 20 74 6f 70 | 2c 20 72 65 6d 65 6d 62 |% If top|, rememb|
|00003b00| 65 72 20 6e 6f 74 20 61 | 20 6c 65 61 66 0a 20 20 |er not a| leaf. |
|00003b10| 20 20 5c 6c 65 74 5c 6e | 65 78 74 5c 72 65 6c 61 | \let\n|ext\rela|
|00003b20| 78 20 5c 65 6c 73 65 20 | 20 20 20 20 20 20 20 20 |x \else | |
|00003b30| 20 20 20 20 20 20 25 20 | 2e 2e 28 61 66 74 65 72 | % |..(after|
|00003b40| 20 72 65 63 75 72 73 69 | 6f 6e 29 2c 20 73 65 74 | recursi|on), set|
|00003b50| 20 72 65 74 75 72 6e 2e | 0a 20 20 20 20 5c 62 6f | return.|. \bo|
|00003b60| 74 73 75 62 66 61 6c 73 | 65 20 5c 6c 65 74 5c 6e |tsubfals|e \let\n|
|00003b70| 65 78 74 5c 6d 61 6b 65 | 73 75 62 74 72 65 65 20 |ext\make|subtree |
|00003b80| 20 25 20 4f 74 68 65 72 | 77 69 73 65 2c 20 77 65 | % Other|wise, we|
|00003b90| 20 68 61 76 65 20 6d 6f | 72 65 20 73 75 62 74 72 | have mo|re subtr|
|00003ba0| 65 65 73 2e 0a 20 20 5c | 66 69 20 5c 6e 65 78 74 |ees.. \|fi \next|
|00003bb0| 7d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |} | |
|00003bc0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 25 20 44 | | % D|
|00003bd0| 6f 20 74 61 69 6c 20 72 | 65 63 75 72 73 69 6f 6e |o tail r|ecursion|
|00003be0| 20 6f 72 20 72 65 74 75 | 72 6e 2e 0a 5c 65 6e 64 | or retu|rn..\end|
|00003bf0| 76 62 0a 0a 45 61 63 68 | 20 73 75 62 74 72 65 65 |vb..Each| subtree|
|00003c00| 20 69 6e 20 74 68 65 20 | 6c 69 73 74 20 69 73 20 | in the |list is |
|00003c10| 70 72 6f 63 65 73 73 65 | 64 20 61 6e 64 20 73 74 |processe|d and st|
|00003c20| 61 63 6b 65 64 20 69 6e | 20 2a 5c 62 6f 78 30 2a |acked in| *\box0*|
|00003c30| 3b 20 74 68 69 73 20 69 | 73 0a 64 6f 6e 65 20 62 |; this i|s.done b|
|00003c40| 79 20 2a 5c 61 64 64 73 | 75 62 74 72 65 65 62 6f |y *\adds|ubtreebo|
|00003c50| 78 2a 2c 20 77 68 69 63 | 68 20 63 61 6c 6c 73 20 |x*, whic|h calls |
|00003c60| 2a 5c 73 75 62 74 72 65 | 65 62 6f 78 2a 20 74 6f |*\subtre|ebox* to|
|00003c70| 20 61 64 64 20 63 6f 6e | 6e 65 63 74 69 6e 67 0a | add con|necting.|
|00003c80| 72 75 6c 65 73 20 74 6f | 20 74 68 65 20 73 75 62 |rules to| the sub|
|00003c90| 74 72 65 65 20 69 6e 20 | 2a 5c 62 6f 78 31 2a 2c |tree in |*\box1*,|
|00003ca0| 20 61 6e 64 20 61 70 70 | 65 6e 64 73 20 74 6f 20 | and app|ends to |
|00003cb0| 74 68 61 74 20 74 68 65 | 20 6f 6c 64 20 63 6f 6e |that the| old con|
|00003cc0| 74 65 6e 74 73 0a 6f 66 | 20 2a 5c 62 6f 78 30 2a |tents.of| *\box0*|
|00003cd0| 2e 20 20 54 68 65 20 76 | 65 72 74 69 63 61 6c 20 |. The v|ertical |
|00003ce0| 63 6f 6e 6e 65 63 74 69 | 6e 67 20 72 75 6c 65 73 |connecti|ng rules|
|00003cf0| 20 69 6e 20 74 68 65 20 | 74 72 65 65 20 61 72 65 | in the |tree are|
|00003d00| 20 6d 61 64 65 20 77 69 | 74 68 0a 74 61 6c 6c 20 | made wi|th.tall |
|00003d10| 6e 61 72 72 6f 77 20 2a | 5c 68 72 75 6c 65 2a 73 |narrow *|\hrule*s|
|00003d20| 20 72 61 74 68 65 72 20 | 74 68 61 6e 20 61 20 6d | rather |than a m|
|00003d30| 6f 72 65 20 73 69 6d 70 | 6c 65 20 63 61 6c 6c 73 |ore simp|le calls|
|00003d40| 20 74 6f 20 2a 5c 76 72 | 75 6c 65 2a 2c 0a 62 65 | to *\vr|ule*,.be|
|00003d50| 63 61 75 73 65 20 74 68 | 65 79 20 61 72 65 20 6d |cause th|ey are m|
|00003d60| 61 64 65 20 69 6e 73 69 | 64 65 20 61 20 2a 5c 76 |ade insi|de a *\v|
|00003d70| 62 6f 78 2a 2e 0a 0a 5c | 76 62 0a 5c 64 65 66 5c |box*...\|vb.\def\|
|00003d80| 61 64 64 73 75 62 74 72 | 65 65 62 6f 78 7b 5c 73 |addsubtr|eebox{\s|
|00003d90| 65 74 62 6f 78 30 3d 5c | 76 62 6f 78 7b 5c 73 75 |etbox0=\|vbox{\su|
|00003da0| 62 74 72 65 65 62 6f 78 | 5c 75 6e 76 62 6f 78 30 |btreebox|\unvbox0|
|00003db0| 7d 7d 0a 5c 64 65 66 5c | 73 75 62 74 72 65 65 62 |}}.\def\|subtreeb|
|00003dc0| 6f 78 7b 5c 68 62 6f 78 | 5c 62 67 72 6f 75 70 20 |ox{\hbox|\bgroup |
|00003dd0| 20 20 20 20 20 20 20 20 | 20 20 20 25 20 53 74 61 | | % Sta|
|00003de0| 72 74 20 5c 68 62 6f 78 | 20 6f 66 20 74 72 65 65 |rt \hbox| of tree|
|00003df0| 20 61 6e 64 20 6c 69 6e | 65 73 0a 20 20 5c 76 62 | and lin|es. \vb|
|00003e00| 6f 78 20 74 6f 20 5c 74 | 72 65 65 68 65 69 67 68 |ox to \t|reeheigh|
|00003e10| 74 5c 62 67 72 6f 75 70 | 20 20 20 20 20 20 20 20 |t\bgroup| |
|00003e20| 20 20 20 25 20 53 74 61 | 72 74 20 5c 76 62 6f 78 | % Sta|rt \vbox|
|00003e30| 20 66 6f 72 20 76 65 72 | 74 69 63 61 6c 20 72 75 | for ver|tical ru|
|00003e40| 6c 65 73 2e 0a 20 20 20 | 20 5c 69 66 62 6f 74 73 |les.. | \ifbots|
|00003e50| 75 62 20 5c 69 66 74 6f | 70 73 75 62 20 5c 76 66 |ub \ifto|psub \vf|
|00003e60| 69 6c 20 20 20 20 20 20 | 20 20 20 20 20 25 20 49 |il | % I|
|00003e70| 66 20 62 6f 74 68 20 62 | 6f 74 74 6f 6d 20 61 6e |f both b|ottom an|
|00003e80| 64 20 74 6f 70 20 73 75 | 62 74 72 65 65 0a 20 20 |d top su|btree. |
|00003e90| 20 20 20 20 20 20 5c 68 | 72 75 6c 65 20 77 69 64 | \h|rule wid|
|00003ea0| 74 68 20 30 2e 34 70 74 | 20 20 20 20 20 20 20 20 |th 0.4pt| |
|00003eb0| 20 20 20 20 20 20 25 20 | 2e 2e 76 65 72 74 69 63 | % |..vertic|
|00003ec0| 61 6c 20 72 75 6c 65 20 | 69 73 20 6a 75 73 74 20 |al rule |is just |
|00003ed0| 61 20 64 6f 74 2e 0a 20 | 20 20 20 20 20 5c 65 6c |a dot.. | \el|
|00003ee0| 73 65 20 5c 74 72 65 65 | 68 61 6c 66 72 75 6c 65 |se \tree|halfrule|
|00003ef0| 20 5c 66 69 20 5c 76 66 | 69 6c 20 20 20 20 20 25 | \fi \vf|il %|
|00003f00| 20 42 6f 74 74 6f 6d 20 | 67 65 74 73 20 68 61 6c | Bottom |gets hal|
|00003f10| 66 2d 68 65 69 67 68 74 | 20 72 75 6c 65 2e 0a 20 |f-height| rule.. |
|00003f20| 20 20 20 5c 65 6c 73 65 | 20 5c 69 66 74 6f 70 73 | \else| \iftops|
|00003f30| 75 62 20 5c 76 66 69 6c | 20 5c 74 72 65 65 68 61 |ub \vfil| \treeha|
|00003f40| 6c 66 72 75 6c 65 20 25 | 20 54 6f 70 20 67 65 74 |lfrule %| Top get|
|00003f50| 73 20 68 61 6c 66 2d 68 | 65 69 67 68 74 20 74 68 |s half-h|eight th|
|00003f60| 65 20 6f 74 68 65 72 20 | 77 61 79 2e 0a 20 20 20 |e other |way.. |
|00003f70| 20 20 20 5c 65 6c 73 65 | 20 5c 68 72 75 6c 65 20 | \else| \hrule |
|00003f80| 77 69 64 74 68 20 30 2e | 34 70 74 20 68 65 69 67 |width 0.|4pt heig|
|00003f90| 68 74 20 5c 74 72 65 65 | 68 65 69 67 68 74 20 5c |ht \tree|height \|
|00003fa0| 66 69 5c 66 69 20 25 20 | 4d 69 64 64 6c 65 2c 20 |fi\fi % |Middle, |
|00003fb0| 66 75 6c 6c 20 68 65 69 | 67 68 74 2e 0a 20 20 20 |full hei|ght.. |
|00003fc0| 20 5c 65 67 72 6f 75 70 | 20 20 20 20 20 20 20 20 | \egroup| |
|00003fd0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003fe0| 20 20 20 20 20 25 20 46 | 69 6e 69 73 68 20 76 65 | % F|inish ve|
|00003ff0| 72 74 69 63 61 6c 20 72 | 75 6c 65 20 5c 76 62 6f |rtical r|ule \vbo|
|00004000| 78 2e 0a 20 20 5c 74 72 | 65 65 63 74 72 62 6f 78 |x.. \tr|eectrbox|
|00004010| 7b 5c 68 72 75 6c 65 20 | 77 69 64 74 68 20 31 65 |{\hrule |width 1e|
|00004020| 6d 7d 5c 68 73 6b 69 70 | 20 30 2e 32 65 6d 5c 74 |m}\hskip| 0.2em\t|
|00004030| 72 65 65 63 74 72 62 6f | 78 7b 5c 62 6f 78 31 7d |reectrbo|x{\box1}|
|00004040| 5c 65 67 72 6f 75 70 7d | 0a 5c 65 6e 64 76 62 0a |\egroup}|.\endvb.|
|00004050| 0a 54 68 65 20 6c 61 73 | 74 20 6c 69 6e 65 20 6f |.The las|t line o|
|00004060| 66 20 74 68 65 20 64 65 | 66 69 6e 69 74 69 6f 6e |f the de|finition|
|00004070| 20 6f 66 20 2a 5c 73 75 | 62 74 72 65 65 62 6f 78 | of *\su|btreebox|
|00004080| 2a 20 63 61 6c 6c 73 20 | 2a 5c 74 72 65 65 63 74 |* calls |*\treect|
|00004090| 72 62 6f 78 2a 0a 74 77 | 69 63 65 3a 20 6f 6e 63 |rbox*.tw|ice: onc|
|000040a0| 65 20 66 6f 72 20 74 68 | 65 20 68 6f 72 69 7a 6f |e for th|e horizo|
|000040b0| 6e 74 61 6c 20 63 6f 6e | 6e 65 63 74 69 6e 67 20 |ntal con|necting |
|000040c0| 72 75 6c 65 2c 20 61 6e | 64 20 6f 6e 63 65 20 66 |rule, an|d once f|
|000040d0| 6f 72 20 74 68 65 0a 73 | 75 62 74 72 65 65 20 62 |or the.s|ubtree b|
|000040e0| 6f 78 20 69 74 73 65 6c | 66 2e 20 20 54 68 69 73 |ox itsel|f. This|
|000040f0| 20 6d 61 63 72 6f 20 63 | 65 6e 74 65 72 73 20 69 | macro c|enters i|
|00004100| 74 73 20 61 72 67 75 6d | 65 6e 74 20 69 6e 20 61 |ts argum|ent in a|
|00004110| 20 2a 5c 76 62 6f 78 2a | 20 74 68 65 0a 68 65 69 | *\vbox*| the.hei|
|00004120| 67 68 74 20 6f 66 20 74 | 68 69 73 20 73 75 62 74 |ght of t|his subt|
|00004130| 72 65 65 20 61 6e 64 20 | 73 75 72 72 6f 75 6e 64 |ree and |surround|
|00004140| 69 6e 67 20 73 70 61 63 | 65 2e 20 20 57 65 20 61 |ing spac|e. We a|
|00004150| 6c 73 6f 20 64 65 66 69 | 6e 65 20 68 65 72 65 0a |lso defi|ne here.|
|00004160| 2a 5c 74 72 65 65 68 61 | 6c 66 72 75 6c 65 2a 2c |*\treeha|lfrule*,|
|00004170| 20 74 68 65 20 6d 61 63 | 72 6f 20 63 61 6c 6c 65 | the mac|ro calle|
|00004180| 64 20 74 6f 20 6d 61 6b | 65 20 61 6e 20 2a 5c 68 |d to mak|e an *\h|
|00004190| 72 75 6c 65 2a 20 68 61 | 6c 66 20 74 68 65 20 68 |rule* ha|lf the h|
|000041a0| 65 69 67 68 74 0a 6f 66 | 20 74 68 65 20 73 75 62 |eight.of| the sub|
|000041b0| 74 72 65 65 20 28 77 69 | 74 68 20 68 61 6c 66 20 |tree (wi|th half |
|000041c0| 74 68 65 20 68 65 69 67 | 68 74 20 6f 66 20 74 68 |the heig|ht of th|
|000041d0| 65 20 68 6f 72 69 7a 6f | 6e 74 61 6c 20 63 6f 6e |e horizo|ntal con|
|000041e0| 6e 65 63 74 69 6f 6e 0a | 61 64 64 65 64 20 74 6f |nection.|added to|
|000041f0| 20 6d 61 6b 65 20 74 68 | 65 20 63 6f 72 6e 65 72 | make th|e corner|
|00004200| 73 20 63 6f 6d 65 20 6f | 75 74 20 73 71 75 61 72 |s come o|ut squar|
|00004210| 65 29 2e 0a 0a 5c 76 62 | 0a 5c 64 65 66 5c 74 72 |e)...\vb|.\def\tr|
|00004220| 65 65 63 74 72 62 6f 78 | 23 31 7b 5c 76 62 6f 78 |eectrbox|#1{\vbox|
|00004230| 20 74 6f 20 5c 74 72 65 | 65 68 65 69 67 68 74 7b | to \tre|eheight{|
|00004240| 5c 76 66 69 6c 20 23 31 | 5c 76 66 69 6c 7d 7d 0a |\vfil #1|\vfil}}.|
|00004250| 5c 64 65 66 5c 74 72 65 | 65 68 61 6c 66 72 75 6c |\def\tre|ehalfrul|
|00004260| 65 7b 5c 64 69 6d 65 6e | 30 3d 5c 74 72 65 65 68 |e{\dimen|0=\treeh|
|00004270| 65 69 67 68 74 20 20 20 | 25 20 47 65 74 20 74 6f |eight |% Get to|
|00004280| 74 61 6c 20 68 65 69 67 | 68 74 2e 0a 20 20 5c 64 |tal heig|ht.. \d|
|00004290| 69 76 69 64 65 5c 64 69 | 6d 65 6e 30 20 32 5c 61 |ivide\di|men0 2\a|
|000042a0| 64 76 61 6e 63 65 5c 64 | 69 6d 65 6e 30 20 30 2e |dvance\d|imen0 0.|
|000042b0| 32 70 74 20 25 20 44 69 | 76 69 64 65 20 62 79 20 |2pt % Di|vide by |
|000042c0| 74 77 6f 2c 20 61 64 64 | 20 68 61 6c 66 20 68 6f |two, add| half ho|
|000042d0| 72 69 7a 20 68 65 69 67 | 68 74 2e 0a 20 20 5c 68 |riz heig|ht.. \h|
|000042e0| 72 75 6c 65 20 77 69 64 | 74 68 20 30 2e 34 70 74 |rule wid|th 0.4pt|
|000042f0| 20 68 65 69 67 68 74 20 | 5c 64 69 6d 65 6e 30 7d | height |\dimen0}|
|00004300| 20 20 20 20 25 20 4d 61 | 6b 65 20 61 20 76 65 72 | % Ma|ke a ver|
|00004310| 74 69 63 61 6c 20 72 75 | 6c 65 20 74 68 61 74 20 |tical ru|le that |
|00004320| 68 69 67 68 2e 0a 5c 65 | 6e 64 76 62 0a 0a 54 68 |high..\e|ndvb..Th|
|00004330| 61 74 20 63 6f 6d 70 6c | 65 74 65 73 20 2a 5c 6d |at compl|etes *\m|
|00004340| 61 6b 65 73 75 62 74 72 | 65 65 2a 2e 20 20 49 66 |akesubtr|ee*. If|
|00004350| 20 74 68 69 73 20 73 75 | 62 74 72 65 65 20 68 61 | this su|btree ha|
|00004360| 73 20 6e 6f 20 73 75 62 | 2d 73 75 62 74 72 65 65 |s no sub|-subtree|
|00004370| 73 0a 75 6e 64 65 72 20 | 69 74 2c 20 2a 5c 6d 61 |s.under |it, *\ma|
|00004380| 6b 65 74 72 65 65 2a 20 | 77 69 6c 6c 20 6e 6f 77 |ketree* |will now|
|00004390| 20 72 75 6e 20 2a 5c 6d | 61 6b 65 6c 65 61 66 2a | run *\m|akeleaf*|
|000043a0| 3b 20 74 68 69 73 20 6d | 65 72 65 6c 79 20 61 64 |; this m|erely ad|
|000043b0| 64 73 20 74 68 65 0a 74 | 72 65 65 20 74 65 78 74 |ds the.t|ree text|
|000043c0| 20 74 6f 20 74 68 65 20 | 2a 5c 68 62 6f 78 2a 20 | to the |*\hbox* |
|000043d0| 6f 70 65 6e 65 64 20 69 | 6e 20 2a 5c 6d 61 6b 65 |opened i|n *\make|
|000043e0| 74 72 65 65 2a 2e 20 20 | 4f 74 68 65 72 77 69 73 |tree*. |Otherwis|
|000043f0| 65 20 77 65 20 63 61 6c | 6c 0a 2a 5c 6d 61 6b 65 |e we cal|l.*\make|
|00004400| 70 61 72 65 6e 74 2a 20 | 74 6f 20 61 74 74 61 63 |parent* |to attac|
|00004410| 68 20 74 68 65 20 73 75 | 62 2d 73 75 62 74 72 65 |h the su|b-subtre|
|00004420| 65 73 20 61 6e 64 20 63 | 6f 6e 6e 65 63 74 69 6e |es and c|onnectin|
|00004430| 67 20 72 75 6c 65 73 20 | 74 6f 20 74 68 65 0a 74 |g rules |to the.t|
|00004440| 65 78 74 20 61 74 20 74 | 68 65 20 72 6f 6f 74 20 |ext at t|he root |
|00004450| 6f 66 20 74 68 65 20 73 | 75 62 74 72 65 65 2e 0a |of the s|ubtree..|
|00004460| 0a 5c 76 62 0a 5c 64 65 | 66 5c 6d 61 6b 65 6c 65 |.\vb.\de|f\makele|
|00004470| 61 66 7b 5c 62 6f 78 5c | 74 72 65 65 62 6f 78 7d |af{\box\|treebox}|
|00004480| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 25 20 41 | | % A|
|00004490| 64 64 20 6c 65 61 66 20 | 62 6f 78 20 74 6f 20 68 |dd leaf |box to h|
|000044a0| 6f 72 69 7a 20 6c 69 73 | 74 2e 0a 5c 64 65 66 5c |oriz lis|t..\def\|
|000044b0| 6d 61 6b 65 70 61 72 65 | 6e 74 7b 5c 69 66 64 69 |makepare|nt{\ifdi|
|000044c0| 6d 5c 68 74 5c 74 72 65 | 65 62 6f 78 3e 5c 68 74 |m\ht\tre|ebox>\ht|
|000044d0| 30 20 20 25 20 49 66 20 | 74 65 78 74 20 69 73 20 |0 % If |text is |
|000044e0| 68 69 67 68 65 72 20 74 | 68 61 6e 20 73 75 62 74 |higher t|han subt|
|000044f0| 72 65 65 73 0a 20 20 20 | 20 5c 74 72 65 65 68 65 |rees. | \treehe|
|00004500| 69 67 68 74 3d 5c 68 74 | 5c 74 72 65 65 62 6f 78 |ight=\ht|\treebox|
|00004510| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 25 20 2e | | % .|
|00004520| 2e 75 73 65 20 74 68 61 | 74 20 68 65 69 67 68 74 |.use tha|t height|
|00004530| 2e 0a 20 20 5c 65 6c 73 | 65 20 5c 74 72 65 65 68 |.. \els|e \treeh|
|00004540| 65 69 67 68 74 3d 5c 68 | 74 30 20 5c 66 69 20 20 |eight=\h|t0 \fi |
|00004550| 20 20 20 20 20 20 20 20 | 20 20 25 20 4f 74 68 65 | | % Othe|
|00004560| 72 77 69 73 65 20 75 73 | 65 20 68 65 69 67 68 74 |rwise us|e height|
|00004570| 20 6f 66 20 73 75 62 74 | 72 65 65 73 2e 0a 20 20 | of subt|rees.. |
|00004580| 5c 61 64 76 61 6e 63 65 | 5c 74 72 65 65 77 69 64 |\advance|\treewid|
|00004590| 74 68 2d 5c 77 64 5c 74 | 72 65 65 62 6f 78 20 20 |th-\wd\t|reebox |
|000045a0| 20 20 20 20 20 20 25 20 | 54 61 6b 65 20 72 65 6d | % |Take rem|
|000045b0| 61 69 6e 64 65 72 20 6f | 66 20 6c 65 76 65 6c 20 |ainder o|f level |
|000045c0| 77 69 64 74 68 0a 20 20 | 5c 61 64 76 61 6e 63 65 |width. |\advance|
|000045d0| 5c 74 72 65 65 77 69 64 | 74 68 20 31 65 6d 20 20 |\treewid|th 1em |
|000045e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 25 20 | | % |
|000045f0| 2e 2e 61 66 74 65 72 20 | 61 63 63 6f 75 6e 74 69 |..after |accounti|
|00004600| 6e 67 20 66 6f 72 20 74 | 65 78 74 20 61 6e 64 20 |ng for t|ext and |
|00004610| 67 6c 75 65 2e 0a 20 20 | 5c 74 72 65 65 63 74 72 |glue.. |\treectr|
|00004620| 62 6f 78 7b 5c 62 6f 78 | 5c 74 72 65 65 62 6f 78 |box{\box|\treebox|
|00004630| 7d 5c 68 73 6b 69 70 20 | 30 2e 32 65 6d 20 25 20 |}\hskip |0.2em % |
|00004640| 41 64 64 20 74 65 78 74 | 2c 20 73 70 61 63 65 20 |Add text|, space |
|00004650| 62 65 66 6f 72 65 20 63 | 6f 6e 6e 65 63 74 69 6f |before c|onnectio|
|00004660| 6e 2e 0a 20 20 5c 74 72 | 65 65 63 74 72 62 6f 78 |n.. \tr|eectrbox|
|00004670| 7b 5c 68 72 75 6c 65 20 | 77 69 64 74 68 20 5c 74 |{\hrule |width \t|
|00004680| 72 65 65 77 69 64 74 68 | 7d 5c 74 72 65 65 63 74 |reewidth|}\treect|
|00004690| 72 62 6f 78 7b 5c 62 6f | 78 30 7d 7d 20 25 20 41 |rbox{\bo|x0}} % A|
|000046a0| 64 64 20 5c 68 72 75 6c | 65 2c 20 73 75 62 73 2e |dd \hrul|e, subs.|
|000046b0| 0a 5c 65 6e 64 76 62 0a | 0a 25 09 72 65 73 74 6f |.\endvb.|.%.resto|
|000046c0| 72 65 20 2a 20 74 6f 20 | 74 79 70 65 20 6f 72 64 |re * to |type ord|
|000046d0| 69 6e 61 72 79 0a 5c 63 | 61 74 63 6f 64 65 60 5c |inary.\c|atcode`\|
|000046e0| 2a 3d 31 32 0a 0a 5c 65 | 6e 64 69 6e 70 75 74 0a |*=12..\e|ndinput.|
|000046f0| 25 5c 62 79 65 0a | |%\bye. | |
+--------+-------------------------+-------------------------+--------+--------+