home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / misc / volume37 / lout / part01 < prev    next >
Encoding:
Text File  |  1993-05-31  |  83.0 KB  |  2,427 lines

  1. Newsgroups: comp.sources.misc
  2. From: jeff@joyce.cs.su.oz.au (Jeff Kingston)
  3. Subject: v37i099:  lout - Lout document formatting system, v2, Part01/30
  4. Message-ID: <csm-v37i099=lout.224826@sparky.IMD.Sterling.COM>
  5. X-Md4-Signature: 83e2dfb69e6867db9221df18dba329ae
  6. Sender: kent@sparky.imd.sterling.com (Kent Landfield)
  7. Organization: Sterling Software
  8. Date: Mon, 31 May 1993 03:50:37 GMT
  9. Approved: kent@sparky.imd.sterling.com
  10.  
  11. Submitted-by: jeff@joyce.cs.su.oz.au (Jeff Kingston)
  12. Posting-number: Volume 37, Issue 99
  13. Archive-name: lout/part01
  14. Environment: UNIX
  15.  
  16. This is version 2 of the Lout document formatting system.  Lout offers an wide
  17. range of advanced features, including equation formatting, tables, diagrams,
  18. rotation and scaling, sorted indexes, bibliographic databases, running headers
  19. and odd-even pages, automatic cross referencing, and much more, all ready to 
  20. go.  Furthermore, Lout is easily extended with definitions which are very
  21. much easier to write than troff of TeX macros because Lout is a high-level 
  22. language, the outcome of an eight-year research project that went back to 
  23. the beginning.
  24.  
  25. New features introduced by Version 2 include optimal paragraph breaking,
  26. automatic hyphenation, PostScript EPS file inclusion, ligatures, and
  27. many small enhancements and bug fixes.  This version has been beta
  28. tested at a number of sites around the world over the last few months.
  29.  
  30. Lout is written in C, is highly portable to Unix systems, and produces
  31. PostScript output (used by most laser printers).  Lout is also available
  32. via ftp from ftp.cs.su.oz.au in jeff/lout.2.03.tar.Z.  The FTP distribution
  33. contains formatted outfile.ps files that are not a part of the c.s.misc
  34. posting.
  35.  
  36. This distribution contains
  37.  
  38.   *  Complete C source code
  39.   *  Standard packages of definitions for tech reports, books, equations,
  40.      tables, diagrams, and Pascal prettyprinting (all written in Lout)
  41.   *  Complete user documentation in the form of seven technical reports
  42.      and a Unix manual page
  43.   *  A makefile and installation instructions
  44.  
  45. Lout was designed and implemented by Jeffrey H. Kingston (jeff@cs.su.oz.au)
  46. of the Basser Department of Computer Science at the University of Sydney.
  47. ---------------
  48. #! /bin/sh
  49. # This is a shell archive.  Remove anything before this line, then feed it
  50. # into a shell via "sh file" or similar.  To overwrite existing files,
  51. # type "sh file -c".
  52. # Contents:  lout lout/data lout/doc lout/doc/tr.begin lout/doc/tr.eq
  53. #   lout/doc/tr.fig lout/doc/tr.impl lout/doc/tr.lout lout/doc/tr.over
  54. #   lout/doc/tr.tab lout/font0 lout/font0/ZapfDin.AFM lout/font1
  55. #   lout/include lout/include/dl lout/man
  56. # Wrapped by kent@sparky on Sun May 30 19:43:53 1993
  57. PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin ; export PATH
  58. echo If this archive is complete, you will see the following message:
  59. echo '          "shar: End of archive 1 (of 30)."'
  60. if test ! -d 'lout' ; then
  61.     echo shar: Creating directory \"'lout'\"
  62.     mkdir 'lout'
  63. fi
  64. if test ! -d 'lout/data' ; then
  65.     echo shar: Creating directory \"'lout/data'\"
  66.     mkdir 'lout/data'
  67. fi
  68. if test ! -d 'lout/doc' ; then
  69.     echo shar: Creating directory \"'lout/doc'\"
  70.     mkdir 'lout/doc'
  71. fi
  72. if test ! -d 'lout/doc/tr.begin' ; then
  73.     echo shar: Creating directory \"'lout/doc/tr.begin'\"
  74.     mkdir 'lout/doc/tr.begin'
  75. fi
  76. if test ! -d 'lout/doc/tr.eq' ; then
  77.     echo shar: Creating directory \"'lout/doc/tr.eq'\"
  78.     mkdir 'lout/doc/tr.eq'
  79. fi
  80. if test ! -d 'lout/doc/tr.fig' ; then
  81.     echo shar: Creating directory \"'lout/doc/tr.fig'\"
  82.     mkdir 'lout/doc/tr.fig'
  83. fi
  84. if test ! -d 'lout/doc/tr.impl' ; then
  85.     echo shar: Creating directory \"'lout/doc/tr.impl'\"
  86.     mkdir 'lout/doc/tr.impl'
  87. fi
  88. if test ! -d 'lout/doc/tr.lout' ; then
  89.     echo shar: Creating directory \"'lout/doc/tr.lout'\"
  90.     mkdir 'lout/doc/tr.lout'
  91. fi
  92. if test ! -d 'lout/doc/tr.over' ; then
  93.     echo shar: Creating directory \"'lout/doc/tr.over'\"
  94.     mkdir 'lout/doc/tr.over'
  95. fi
  96. if test ! -d 'lout/doc/tr.tab' ; then
  97.     echo shar: Creating directory \"'lout/doc/tr.tab'\"
  98.     mkdir 'lout/doc/tr.tab'
  99. fi
  100. if test ! -d 'lout/font0' ; then
  101.     echo shar: Creating directory \"'lout/font0'\"
  102.     mkdir 'lout/font0'
  103. fi
  104. if test -f 'lout/font0/ZapfDin.AFM' -a "${1}" != "-c" ; then 
  105.   echo shar: Will not clobber existing file \"'lout/font0/ZapfDin.AFM'\"
  106. else
  107.   echo shar: Extracting \"'lout/font0/ZapfDin.AFM'\" \(9316 characters\)
  108.   sed "s/^X//" >'lout/font0/ZapfDin.AFM' <<'END_OF_FILE'
  109. XStartFontMetrics 2.0
  110. XComment Copyright (c) 1984 Adobe Systems Incorporated.     All Rights Reserved.
  111. XComment Creation Date:Tue Mar 3 15:22:45 PST 1987
  112. XFontName ZapfDingbats
  113. XEncodingScheme FontSpecific
  114. XFullName ITC Zapf Dingbats
  115. XFamilyName ITC Zapf Dingbats
  116. XWeight Medium
  117. XItalicAngle 0.0
  118. XIsFixedPitch false
  119. XUnderlinePosition -98
  120. XUnderlineThickness 54
  121. XVersion 001.001
  122. XNotice ITC Zapf Dingbats is a registered trademark of International Typeface Corporation.
  123. XFontBBox -1 -143 981 820
  124. XStartCharMetrics 202
  125. XC 32 ; WX 278 ; N space ; B 0 0 0 0 ;
  126. XC 33 ; WX 974 ; N a1 ; B 35 72 939 621 ;
  127. XC 34 ; WX 961 ; N a2 ; B 35 81 927 611 ;
  128. XC 35 ; WX 974 ; N a202 ; B 35 72 939 621 ;
  129. XC 36 ; WX 980 ; N a3 ; B 35 0 945 692 ;
  130. XC 37 ; WX 719 ; N a4 ; B 34 139 685 566 ;
  131. XC 38 ; WX 789 ; N a5 ; B 35 -14 755 705 ;
  132. XC 39 ; WX 790 ; N a119 ; B 35 -14 755 705 ;
  133. XC 40 ; WX 791 ; N a118 ; B 35 -14 761 705 ;
  134. XC 41 ; WX 690 ; N a117 ; B 35 138 655 553 ;
  135. XC 42 ; WX 960 ; N a11 ; B 35 123 925 568 ;
  136. XC 43 ; WX 939 ; N a12 ; B 35 134 904 559 ;
  137. XC 44 ; WX 549 ; N a13 ; B 29 -11 516 705 ;
  138. XC 45 ; WX 855 ; N a14 ; B 34 59 820 632 ;
  139. XC 46 ; WX 911 ; N a15 ; B 35 50 876 642 ;
  140. XC 47 ; WX 933 ; N a16 ; B 35 139 899 550 ;
  141. XC 48 ; WX 911 ; N a105 ; B 35 50 876 642 ;
  142. XC 49 ; WX 945 ; N a17 ; B 35 139 909 553 ;
  143. XC 50 ; WX 974 ; N a18 ; B 35 104 938 586 ;
  144. XC 51 ; WX 755 ; N a19 ; B 34 -14 721 704 ;
  145. XC 52 ; WX 846 ; N a20 ; B 36 -14 811 705 ;
  146. XC 53 ; WX 762 ; N a21 ; B 35 0 727 692 ;
  147. XC 54 ; WX 761 ; N a22 ; B 35 0 727 692 ;
  148. XC 55 ; WX 571 ; N a23 ; B -1 -68 571 661 ;
  149. XC 56 ; WX 677 ; N a24 ; B 36 -14 642 705 ;
  150. XC 57 ; WX 763 ; N a25 ; B 35 0 728 692 ;
  151. XC 58 ; WX 760 ; N a26 ; B 35 0 726 692 ;
  152. XC 59 ; WX 759 ; N a27 ; B 35 0 725 692 ;
  153. XC 60 ; WX 754 ; N a28 ; B 35 0 720 692 ;
  154. XC 61 ; WX 494 ; N a6 ; B 35 0 460 692 ;
  155. XC 62 ; WX 552 ; N a7 ; B 35 0 517 692 ;
  156. XC 63 ; WX 537 ; N a8 ; B 35 0 503 692 ;
  157. XC 64 ; WX 577 ; N a9 ; B 35 96 542 596 ;
  158. XC 65 ; WX 692 ; N a10 ; B 35 -14 657 705 ;
  159. XC 66 ; WX 786 ; N a29 ; B 35 -14 751 705 ;
  160. XC 67 ; WX 788 ; N a30 ; B 35 -14 752 705 ;
  161. XC 68 ; WX 788 ; N a31 ; B 35 -14 753 705 ;
  162. XC 69 ; WX 790 ; N a32 ; B 35 -14 756 705 ;
  163. XC 70 ; WX 793 ; N a33 ; B 35 -14 759 705 ;
  164. XC 71 ; WX 794 ; N a34 ; B 35 -14 759 705 ;
  165. XC 72 ; WX 816 ; N a35 ; B 35 -14 782 705 ;
  166. XC 73 ; WX 823 ; N a36 ; B 35 -14 787 705 ;
  167. XC 74 ; WX 789 ; N a37 ; B 35 -14 754 705 ;
  168. XC 75 ; WX 841 ; N a38 ; B 35 -14 807 705 ;
  169. XC 76 ; WX 823 ; N a39 ; B 35 -14 789 705 ;
  170. XC 77 ; WX 833 ; N a40 ; B 35 -14 798 705 ;
  171. XC 78 ; WX 816 ; N a41 ; B 35 -13 782 705 ;
  172. XC 79 ; WX 831 ; N a42 ; B 35 -14 796 705 ;
  173. XC 80 ; WX 923 ; N a43 ; B 35 -14 888 705 ;
  174. XC 81 ; WX 744 ; N a44 ; B 35 0 710 692 ;
  175. XC 82 ; WX 723 ; N a45 ; B 35 0 688 692 ;
  176. XC 83 ; WX 749 ; N a46 ; B 35 0 714 692 ;
  177. XC 84 ; WX 790 ; N a47 ; B 34 -14 756 705 ;
  178. XC 85 ; WX 792 ; N a48 ; B 35 -14 758 705 ;
  179. XC 86 ; WX 695 ; N a49 ; B 35 -14 661 706 ;
  180. XC 87 ; WX 776 ; N a50 ; B 35 -6 741 699 ;
  181. XC 88 ; WX 768 ; N a51 ; B 35 -7 734 699 ;
  182. XC 89 ; WX 792 ; N a52 ; B 35 -14 757 705 ;
  183. XC 90 ; WX 759 ; N a53 ; B 35 0 725 692 ;
  184. XC 91 ; WX 707 ; N a54 ; B 35 -14 672 705 ;
  185. XC 92 ; WX 708 ; N a55 ; B 35 -14 672 705 ;
  186. XC 93 ; WX 682 ; N a56 ; B 35 -14 647 705 ;
  187. XC 94 ; WX 701 ; N a57 ; B 35 -14 666 705 ;
  188. XC 95 ; WX 826 ; N a58 ; B 35 -14 791 705 ;
  189. XC 96 ; WX 815 ; N a59 ; B 35 -14 780 705 ;
  190. XC 97 ; WX 789 ; N a60 ; B 35 -14 754 705 ;
  191. XC 98 ; WX 789 ; N a61 ; B 35 -14 754 705 ;
  192. XC 99 ; WX 707 ; N a62 ; B 34 -14 673 705 ;
  193. XC 100 ; WX 687 ; N a63 ; B 36 0 651 692 ;
  194. XC 101 ; WX 696 ; N a64 ; B 35 0 661 691 ;
  195. XC 102 ; WX 689 ; N a65 ; B 35 0 655 692 ;
  196. XC 103 ; WX 786 ; N a66 ; B 34 -14 751 705 ;
  197. XC 104 ; WX 787 ; N a67 ; B 35 -14 752 705 ;
  198. XC 105 ; WX 713 ; N a68 ; B 35 -14 678 705 ;
  199. XC 106 ; WX 791 ; N a69 ; B 35 -14 756 705 ;
  200. XC 107 ; WX 785 ; N a70 ; B 36 -14 751 705 ;
  201. XC 108 ; WX 791 ; N a71 ; B 35 -14 757 705 ;
  202. XC 109 ; WX 873 ; N a72 ; B 35 -14 838 705 ;
  203. XC 110 ; WX 761 ; N a73 ; B 35 0 726 692 ;
  204. XC 111 ; WX 762 ; N a74 ; B 35 0 727 692 ;
  205. XC 112 ; WX 762 ; N a203 ; B 35 0 727 692 ;
  206. XC 113 ; WX 759 ; N a75 ; B 35 0 725 692 ;
  207. XC 114 ; WX 759 ; N a204 ; B 35 0 725 692 ;
  208. XC 115 ; WX 892 ; N a76 ; B 35 0 858 705 ;
  209. XC 116 ; WX 892 ; N a77 ; B 35 -14 858 692 ;
  210. XC 117 ; WX 788 ; N a78 ; B 35 -14 754 705 ;
  211. XC 118 ; WX 784 ; N a79 ; B 35 -14 749 705 ;
  212. XC 119 ; WX 438 ; N a81 ; B 35 -14 403 705 ;
  213. XC 120 ; WX 138 ; N a82 ; B 35 0 104 692 ;
  214. XC 121 ; WX 277 ; N a83 ; B 35 0 242 692 ;
  215. XC 122 ; WX 415 ; N a84 ; B 35 0 380 692 ;
  216. XC 123 ; WX 392 ; N a97 ; B 35 263 357 705 ;
  217. XC 124 ; WX 392 ; N a98 ; B 34 263 357 705 ;
  218. XC 125 ; WX 668 ; N a99 ; B 35 263 633 705 ;
  219. XC 126 ; WX 668 ; N a100 ; B 36 263 634 705 ;
  220. XC 161 ; WX 732 ; N a101 ; B 35 -143 697 806 ;
  221. XC 162 ; WX 544 ; N a102 ; B 56 -14 488 706 ;
  222. XC 163 ; WX 544 ; N a103 ; B 34 -14 508 705 ;
  223. XC 164 ; WX 910 ; N a104 ; B 35 40 875 651 ;
  224. XC 165 ; WX 667 ; N a106 ; B 35 -14 633 705 ;
  225. XC 166 ; WX 760 ; N a107 ; B 35 -14 726 705 ;
  226. XC 167 ; WX 760 ; N a108 ; B 0 121 758 569 ;
  227. XC 168 ; WX 776 ; N a112 ; B 35 0 741 705 ;
  228. XC 169 ; WX 595 ; N a111 ; B 34 -14 560 705 ;
  229. XC 170 ; WX 694 ; N a110 ; B 35 -14 659 705 ;
  230. XC 171 ; WX 626 ; N a109 ; B 34 0 591 705 ;
  231. XC 172 ; WX 788 ; N a120 ; B 35 -14 754 705 ;
  232. XC 173 ; WX 788 ; N a121 ; B 35 -14 754 705 ;
  233. XC 174 ; WX 788 ; N a122 ; B 35 -14 754 705 ;
  234. XC 175 ; WX 788 ; N a123 ; B 35 -14 754 705 ;
  235. XC 176 ; WX 788 ; N a124 ; B 35 -14 754 705 ;
  236. XC 177 ; WX 788 ; N a125 ; B 35 -14 754 705 ;
  237. XC 178 ; WX 788 ; N a126 ; B 35 -14 754 705 ;
  238. XC 179 ; WX 788 ; N a127 ; B 35 -14 754 705 ;
  239. XC 180 ; WX 788 ; N a128 ; B 35 -14 754 705 ;
  240. XC 181 ; WX 788 ; N a129 ; B 35 -14 754 705 ;
  241. XC 182 ; WX 788 ; N a130 ; B 35 -14 754 705 ;
  242. XC 183 ; WX 788 ; N a131 ; B 35 -14 754 705 ;
  243. XC 184 ; WX 788 ; N a132 ; B 35 -14 754 705 ;
  244. XC 185 ; WX 788 ; N a133 ; B 35 -14 754 705 ;
  245. XC 186 ; WX 788 ; N a134 ; B 35 -14 754 705 ;
  246. XC 187 ; WX 788 ; N a135 ; B 35 -14 754 705 ;
  247. XC 188 ; WX 788 ; N a136 ; B 35 -14 754 705 ;
  248. XC 189 ; WX 788 ; N a137 ; B 35 -14 754 705 ;
  249. XC 190 ; WX 788 ; N a138 ; B 35 -14 754 705 ;
  250. XC 191 ; WX 788 ; N a139 ; B 35 -14 754 705 ;
  251. XC 192 ; WX 788 ; N a140 ; B 35 -14 754 705 ;
  252. XC 193 ; WX 788 ; N a141 ; B 35 -14 754 705 ;
  253. XC 194 ; WX 788 ; N a142 ; B 35 -14 754 705 ;
  254. XC 195 ; WX 788 ; N a143 ; B 35 -14 754 705 ;
  255. XC 196 ; WX 788 ; N a144 ; B 35 -14 754 705 ;
  256. XC 197 ; WX 788 ; N a145 ; B 35 -14 754 705 ;
  257. XC 198 ; WX 788 ; N a146 ; B 35 -14 754 705 ;
  258. XC 199 ; WX 788 ; N a147 ; B 35 -14 754 705 ;
  259. XC 200 ; WX 788 ; N a148 ; B 35 -14 754 705 ;
  260. XC 201 ; WX 788 ; N a149 ; B 35 -14 754 705 ;
  261. XC 202 ; WX 788 ; N a150 ; B 35 -14 754 705 ;
  262. XC 203 ; WX 788 ; N a151 ; B 35 -14 754 705 ;
  263. XC 204 ; WX 788 ; N a152 ; B 35 -14 754 705 ;
  264. XC 205 ; WX 788 ; N a153 ; B 35 -14 754 705 ;
  265. XC 206 ; WX 788 ; N a154 ; B 35 -14 754 705 ;
  266. XC 207 ; WX 788 ; N a155 ; B 35 -14 754 705 ;
  267. XC 208 ; WX 788 ; N a156 ; B 35 -14 754 705 ;
  268. XC 209 ; WX 788 ; N a157 ; B 35 -14 754 705 ;
  269. XC 210 ; WX 788 ; N a158 ; B 35 -14 754 705 ;
  270. XC 211 ; WX 788 ; N a159 ; B 35 -14 754 705 ;
  271. XC 212 ; WX 894 ; N a160 ; B 35 58 860 634 ;
  272. XC 213 ; WX 838 ; N a161 ; B 35 153 803 539 ;
  273. XC 214 ; WX 1016 ; N a163 ; B 34 151 981 541 ;
  274. XC 215 ; WX 458 ; N a164 ; B 35 -127 422 820 ;
  275. XC 216 ; WX 748 ; N a196 ; B 35 94 698 597 ;
  276. XC 217 ; WX 924 ; N a165 ; B 35 140 890 552 ;
  277. XC 218 ; WX 748 ; N a192 ; B 35 94 698 597 ;
  278. XC 219 ; WX 918 ; N a166 ; B 35 167 884 525 ;
  279. XC 220 ; WX 927 ; N a167 ; B 35 32 892 660 ;
  280. XC 221 ; WX 928 ; N a168 ; B 35 129 891 562 ;
  281. XC 222 ; WX 928 ; N a169 ; B 35 128 893 563 ;
  282. XC 223 ; WX 834 ; N a170 ; B 35 155 799 537 ;
  283. XC 224 ; WX 873 ; N a171 ; B 35 93 838 599 ;
  284. XC 225 ; WX 828 ; N a172 ; B 35 104 791 588 ;
  285. XC 226 ; WX 924 ; N a173 ; B 35 98 889 594 ;
  286. XC 227 ; WX 924 ; N a162 ; B 35 97 889 593 ;
  287. XC 228 ; WX 917 ; N a174 ; B 35 0 882 692 ;
  288. XC 229 ; WX 930 ; N a175 ; B 35 84 896 608 ;
  289. XC 230 ; WX 931 ; N a176 ; B 35 84 896 608 ;
  290. XC 231 ; WX 463 ; N a177 ; B 35 -99 429 791 ;
  291. XC 232 ; WX 883 ; N a178 ; B 35 71 848 623 ;
  292. XC 233 ; WX 836 ; N a179 ; B 35 44 802 648 ;
  293. XC 234 ; WX 836 ; N a193 ; B 35 44 802 648 ;
  294. XC 235 ; WX 867 ; N a180 ; B 35 101 832 591 ;
  295. XC 236 ; WX 867 ; N a199 ; B 35 101 832 591 ;
  296. XC 237 ; WX 696 ; N a181 ; B 35 44 661 648 ;
  297. XC 238 ; WX 696 ; N a200 ; B 35 44 661 648 ;
  298. XC 239 ; WX 874 ; N a182 ; B 35 77 840 619 ;
  299. XC 241 ; WX 874 ; N a201 ; B 35 73 840 615 ;
  300. XC 242 ; WX 760 ; N a183 ; B 35 0 725 692 ;
  301. XC 243 ; WX 946 ; N a184 ; B 35 160 911 533 ;
  302. XC 244 ; WX 771 ; N a197 ; B 34 37 736 655 ;
  303. XC 245 ; WX 865 ; N a185 ; B 35 207 830 481 ;
  304. XC 246 ; WX 771 ; N a194 ; B 34 37 736 655 ;
  305. XC 247 ; WX 888 ; N a198 ; B 34 -19 853 712 ;
  306. XC 248 ; WX 967 ; N a186 ; B 35 124 932 568 ;
  307. XC 249 ; WX 888 ; N a195 ; B 34 -19 853 712 ;
  308. XC 250 ; WX 831 ; N a187 ; B 35 113 796 579 ;
  309. XC 251 ; WX 873 ; N a188 ; B 36 118 838 578 ;
  310. XC 252 ; WX 927 ; N a189 ; B 35 150 891 542 ;
  311. XC 253 ; WX 970 ; N a190 ; B 35 76 931 616 ;
  312. XC 254 ; WX 918 ; N a191 ; B 34 99 884 593 ;
  313. XC -1 ; WX 509 ; N a205 ; B 35 0 475 692 ;
  314. XC -1 ; WX 410 ; N a206 ; B 35 0 375 692 ;
  315. XC -1 ; WX 509 ; N a85 ; B 35 0 475 692 ;
  316. XC -1 ; WX 410 ; N a86 ; B 35 0 375 692 ;
  317. XC -1 ; WX 234 ; N a87 ; B 35 -14 199 705 ;
  318. XC -1 ; WX 234 ; N a88 ; B 35 -14 199 705 ;
  319. XC -1 ; WX 390 ; N a89 ; B 35 -14 356 705 ;
  320. XC -1 ; WX 390 ; N a90 ; B 35 -14 355 705 ;
  321. XC -1 ; WX 276 ; N a91 ; B 35 0 242 692 ;
  322. XC -1 ; WX 276 ; N a92 ; B 35 0 242 692 ;
  323. XC -1 ; WX 317 ; N a93 ; B 35 0 283 692 ;
  324. XC -1 ; WX 317 ; N a94 ; B 35 0 283 692 ;
  325. XC -1 ; WX 334 ; N a95 ; B 35 0 299 692 ;
  326. XC -1 ; WX 334 ; N a96 ; B 35 0 299 692 ;
  327. XEndCharMetrics
  328. XEndFontMetrics
  329. END_OF_FILE
  330.   if test 9316 -ne `wc -c <'lout/font0/ZapfDin.AFM'`; then
  331.     echo shar: \"'lout/font0/ZapfDin.AFM'\" unpacked with wrong size!
  332.   fi
  333.   # end of 'lout/font0/ZapfDin.AFM'
  334. fi
  335. if test ! -d 'lout/font1' ; then
  336.     echo shar: Creating directory \"'lout/font1'\"
  337.     mkdir 'lout/font1'
  338. fi
  339. if test ! -d 'lout/include' ; then
  340.     echo shar: Creating directory \"'lout/include'\"
  341.     mkdir 'lout/include'
  342. fi
  343. if test -f 'lout/include/dl' -a "${1}" != "-c" ; then 
  344.   echo shar: Will not clobber existing file \"'lout/include/dl'\"
  345. else
  346.   echo shar: Extracting \"'lout/include/dl'\" \(67583 characters\)
  347.   sed "s/^X//" >'lout/include/dl' <<'END_OF_FILE'
  348. X
  349. X###############################################################################
  350. X#                                                                             #
  351. X#  Lout @DocumentLayout package (Version 2.0)                                 #
  352. X#                                                                             #
  353. X#  Version 1.0 by Jeffrey H. Kingston, 17 July 1991.                          #
  354. X#  Version 2.0 by Jeffrey H. Kingston, 22 December 1992.                      #
  355. X#                                                                             #
  356. X#  This Lout package contains the basic definitions for documents, such as    #
  357. X#  simple documents, technical reports, and books.  See "A Beginners' Guide   #
  358. X#  to Lout" for user information.                                             #
  359. X#                                                                             #
  360. X###############################################################################
  361. X
  362. Xexport
  363. X    @InitialFont @InitialBreak @Hyphenate
  364. X    @MajorHeadingFont @HeadingFont @MinorHeadingFont @ParaGap @ParaIndent
  365. X    @DispGap @DispIndent @DefaultIndent @WideIndent @VeryWideIndent
  366. X
  367. X    @Roman @UCRoman @Alpha @UCAlpha @Months @ShortMonths
  368. X    @WeekDays @ShortWeekDays
  369. X
  370. X    "--" "---" @Bullet @ParSym @SectSym @Dagger @DaggerDbl @CDot @Sterling
  371. X    @Yen @Florin @Star @Degree @Minute @Second @Multiply @Divide @Lozenge
  372. X    @Register @CopyRight @TradeMark
  373. X
  374. X    @R @I @B @S @MajorHeading @Heading @MinorHeading "^" "&-" @Date
  375. X
  376. X    associate associates declination obligatory philanthropic present presents
  377. X    project projects reciprocity recognizance reformation retribution table
  378. X
  379. X    @Runner @PageMark @PageOf @NumberOf
  380. X
  381. X    @PP @LP @DP @NP @CNP
  382. X    
  383. X    @BAD     @BeginAlignedDisplays
  384. X    @EAD     @EndAlignedDisplays
  385. X    @BND     @BeginNumberedDisplays
  386. X    @END     @EndNumberedDisplays
  387. X
  388. X    @D       @Display
  389. X    @LD      @LeftDisplay
  390. X    @ID      @IndentedDisplay
  391. X    @CD      @CentredDisplay @CenteredDisplay
  392. X    @AD      @AlignedDisplay
  393. X    @LAD     @LeftAlignedDisplay
  394. X    @IAD     @IndentedAlignedDisplay
  395. X    @CAD     @CentredAlignedDisplay @CenteredAlignedDisplay
  396. X    @ND      @NumberedDisplay
  397. X    @LND     @LeftNumberedDisplay
  398. X    @IND     @IndentedNumberedDisplay
  399. X    @CND     @CentredNumberedDisplay @CenteredNumberedDisplay
  400. X    @AND     @AlignedNumberedDisplay
  401. X    @LAND    @LeftAlignedNumberedDisplay
  402. X    @IAND    @IndentedAlignedNumberedDisplay
  403. X    @CAND    @CentredAlignedNumberedDisplay @CenteredAlignedNumberedDisplay
  404. X
  405. X    @RD      @RawDisplay
  406. X    @RLD     @RawLeftDisplay
  407. X    @RID     @RawIndentedDisplay
  408. X    @RCD     @RawCentredDisplay @RawCenteredDisplay
  409. X    @RAD     @RawAlignedDisplay
  410. X    @RLAD    @RawLeftAlignedDisplay
  411. X    @RIAD    @RawIndentedAlignedDisplay
  412. X    @RCAD    @RawCentredAlignedDisplay @RawCenteredAlignedDisplay
  413. X    @RND     @RawNumberedDisplay
  414. X    @RLND    @RawLeftNumberedDisplay
  415. X    @RIND    @RawIndentedNumberedDisplay
  416. X    @RCND    @RawCentredNumberedDisplay @RawCenteredNumberedDisplay
  417. X    @RAND    @RawAlignedNumberedDisplay
  418. X    @RLAND   @RawLeftAlignedNumberedDisplay
  419. X    @RIAND   @RawIndentedAlignedNumberedDisplay
  420. X    @RCAND   @RawCentredAlignedNumberedDisplay
  421. X             @RawCenteredAlignedNumberedDisplay
  422. X    
  423. X    @LI      @ListItem
  424. X    @EL      @EndList
  425. X
  426. X    @RLL     @RawLeftList
  427. X    @RCL     @RawCentredList @RawCenteredList
  428. X
  429. X    @LL         @LeftList
  430. X    @CL         @CentredList @CenteredList
  431. X
  432. X    @RIL     @RawIndentedList
  433. X    @RNL     @RawNumberedList
  434. X    @RPNL    @RawParenNumberedList
  435. X    @RRL     @RawRomanList
  436. X    @RPRL    @RawParenRomanList
  437. X    @RUCRL   @RawUCRomanList
  438. X    @RPUCRL  @RawParenUCRomanList
  439. X    @RAL     @RawAlphaList
  440. X    @RPAL    @RawParenAlphaList
  441. X    @RUCAL   @RawUCAlphaList
  442. X    @RPUCAL  @RawParenUCAlphaList
  443. X    @RBL     @RawBulletList
  444. X    @RSL     @RawStarList
  445. X    @RDL     @RawDashList
  446. X
  447. X    @IL      @IndentedList
  448. X    @NL      @NumberedList 
  449. X    @PNL     @ParenNumberedList
  450. X    @RL      @RomanList
  451. X    @PRL     @ParenRomanList
  452. X    @UCRL    @UCRomanList
  453. X    @PUCRL   @ParenUCRomanList
  454. X    @AL      @AlphaList
  455. X    @PAL     @ParenAlphaList
  456. X    @UCAL    @UCAlphaList
  457. X    @PUCAL   @ParenUCAlphaList
  458. X    @BL      @BulletList 
  459. X    @SL      @StarList 
  460. X    @DL      @DashList
  461. X
  462. X    @TI      @TagItem
  463. X    @RTL     @RawTaggedList
  464. X    @RWTL    @RawWideTaggedList
  465. X    @RVWTL   @RawVeryWideTaggedList
  466. X
  467. X    @TL         @TaggedList
  468. X    @WTL     @WideTaggedList
  469. X    @VWTL    @VeryWideTaggedList
  470. X
  471. X    @Document @Doc @Report @Book            # root galley objects
  472. X    @Abstract @Preface @Introduction            # outer level galleys
  473. X    @Chapter @Section @Appendix @Text @ColText
  474. X    @Figure @EndFigures @Table @EndTables        # inner level galleys
  475. X    @Reference @RefStyle @RefPrint
  476. X    @ReferenceSection @Ref @ChapRefSection @ChapRef
  477. X    @IndexSection @Index @SubIndex @SubSubIndex @RawIndex
  478. X    @RawSubIndex @RawSubSubIndex @IndexBlanks
  479. X    @ContentsSection
  480. X
  481. X
  482. X
  483. Xdef @DocumentLayout
  484. X    named @InitialFont       {  Times Base 12p } # initial font
  485. X    named @InitialBreak      {  adjust 1.20fx  } # initial break
  486. X    named @Hyphenate         {  Yes            } # Want hyphenation? Yes or No
  487. X    named @MajorHeadingFont  {  Bold 2.0f      } # font for major headings
  488. X    named @HeadingFont       {  Bold           } # font for ordinary headings
  489. X    named @MinorHeadingFont  {  Bold           } # font for minor headings
  490. X    named @BookCoverFont     {  Helvetica Base } # font for book cover
  491. X
  492. X    named @ParaGap           {  1.30vx         } # gap between paragraphs
  493. X    named @ParaIndent        {  2.00f          } # paragraph first-line indent
  494. X
  495. X    named @DispGap           {  1.00v          } # gap above and below displays
  496. X    named @DispIndent        {  2.00f          } # @IndentedDisplay indent
  497. X    named @DefaultIndent     {  0.5rt          } # @Display indent
  498. X    named @WideIndent        {  4.00f          } # @WideTaggedList indent
  499. X    named @VeryWideIndent    {  8.00f          } # @VeryWideTaggedList indent
  500. X
  501. X    named @PageWidth         { 21.00c          } # width of page
  502. X    named @PageHeight        { 29.70c          } # height of page
  503. X    named @PageMargin        {  2.50c          } # size of all four margins
  504. X    named @Columns           {  Single         } # Single, Double, Multi
  505. X    named @DoubleColWidth    {  7.50c          } # column width used by Double
  506. X    named @MultiColWidth     {  4.67c          } # column width used by Multi
  507. X    named @ColGap            {  1.00c          } # gap between columns
  508. X    named @TopGap            {  0.75c          } # gap between figures
  509. X    named @MidGap            {  0.75c          } # gap above and below body text
  510. X
  511. X    named @FootNoteFont      {  0.80f          } # font for footnotes
  512. X    named @FootNoteBreak     {  1.20fx         } # break for footnotes
  513. X    named @FootLen           {  2.00c          } # footnote line and indent size
  514. X    named @ColFootLen        {  1.20c          } # @FootLen when Double, Multi
  515. X    named @FootGap           {  0.20c          } # gap between footnotes
  516. X
  517. X    named @MakeIndex         {  No             } # Want index? Yes or No
  518. X    named @IndexColumns      {  Double         } # Single, Double, Multi
  519. X
  520. X    named @TableOfContents   {  No             } # Want contents? Yes or No
  521. X    named @MajorContentsGap  {  1.30v          } # gap above major entry
  522. X    named @ContentsGap       {  1.00v          } # gap above ordinary entry
  523. X
  524. X    named @ChapterNumbers    {  Yes            } # Yes or No            
  525. X    named @SectionNumbers    {  Yes            } # Yes or No            
  526. X    named @SubSectionNumbers {  Yes            } # Yes or No            
  527. X    named @AppendixNumbers   {  Yes            } # Yes or No            
  528. X    named @SubAppendixNumbers{  Yes            } # Yes or No            
  529. X    named @ChapterGap        {  1.10b          } # gap before each chapter
  530. X    named @SectionGap        {  2.00v          } # gap before each section
  531. X    named @SubSectionGap     {  1.50v          } # gap before each subsection
  532. X    named @AppendixGap       {  2.00v          } # gap before each appendix
  533. X    named @SubAppendixGap    {  2.00v          } # gap before each subappendix
  534. X
  535. X    named @PageNumbers       {  Yes            } # Want page numbers? Yes or No
  536. X    named @FirstPageNumber   {  1              } # Number of first page 
  537. X    named @PageOneTopFormat  right @PageNum { @Null               }
  538. X    named @PageOneFootFormat right @PageNum { @Null               }
  539. X    named @PageTopFormat     right @PageNum { |0.5rt - @PageNum - }
  540. X    named @PageFootFormat    right @PageNum { @Null               }
  541. X    named @BookTitleFormat   right @Title   { Bold @Font @Title   } 
  542. X
  543. X@Begin
  544. X
  545. X    ###########################################################################
  546. X    #                                                                         #
  547. X    #  @Protect x                                                             #
  548. X    #                                                                         #
  549. X    #  Like @CNP, this reserves space on the current page or else makes sure  #
  550. X    #  x appears on the following page.  Lookahead is proportional to font    #
  551. X    #  size.                                                                  #
  552. X    #                                                                         #
  553. X    ###########################################################################
  554. X
  555. X    def @Protect right x { 3.0f @High //0io // x }
  556. X
  557. X
  558. X    ###########################################################################
  559. X    #                                                                         #
  560. X    #   @HLine                                                                #
  561. X    #                                                                         #
  562. X    #   Draws a horizontal line to fill available space.                      #
  563. X    #                                                                         #
  564. X    ###########################################################################
  565. X
  566. X    def @HLine { {0 0 moveto xsize 0 lineto stroke} @Graphic {} }
  567. X
  568. X
  569. X    ###########################################################################
  570. X    #                                                                         #
  571. X    #  Symbols stored in the "standard" database:                             #
  572. X    #                                                                         #
  573. X    #    @Roman           lower case Roman numerals i, ii, ... , c            #
  574. X    #    @UCRoman         upper case Roman numerals I, II, ... , C            #
  575. X    #    @Alpha           lower case Roman alphabet a, b,  ... , z            #
  576. X    #    @UCAlpha         upper case Roman alphabet A, B,  ... , Z            #
  577. X    #    @Months          months of the year:  January, ... , December        #
  578. X    #    @ShortMonths     months of the year, abbreviated:  Jan, ... , Dec    #
  579. X    #    @WeekDays        days of the week:  Sunday, ... , Saturday           #
  580. X    #    @ShortWeekDays   days of the week, abbreviated:  Sun, ... , Sat      #
  581. X    #                                                                         #
  582. X    ###########################################################################
  583. X
  584. X    def @Roman        left @Tag right @Val { @Val }
  585. X    def @UCRoman    left @Tag right @Val { @Val }
  586. X    def @Alpha        left @Tag right @Val { @Val }
  587. X    def @UCAlpha    left @Tag right @Val { @Val }
  588. X    def @Months        left @Tag right @Val { @Val }
  589. X    def @ShortMonths    left @Tag right @Val { @Val }
  590. X    def @WeekDays    left @Tag right @Val { @Val }
  591. X    def @ShortWeekDays    left @Tag right @Val { @Val }
  592. X
  593. X    @SysDatabase @Roman @UCRoman @Alpha @UCAlpha @Months
  594. X         @ShortMonths @WeekDays @ShortWeekDays
  595. X    { "standard"  }
  596. X
  597. X
  598. X    ###########################################################################
  599. X    #                                                                         #
  600. X    #  Selected characters from Adobe's fonts.                                #
  601. X    #                                                                         #
  602. X    ###########################################################################
  603. X
  604. X    def "--"        { "\261"             }
  605. X    def "---"        { "\320"             }
  606. X    def @Bullet        { "\267"            }
  607. X    def @ParSym        { "\266"            }
  608. X    def @SectSym    { "\247"            }
  609. X    def @Dagger        { "\262"            }
  610. X    def @DaggerDbl    { "\263"            }
  611. X    def @CDot        { "\264"            }
  612. X    def @Sterling    { "\243"            }
  613. X    def @Yen        { "\245"            }
  614. X    def @Florin        { "\246"            }
  615. X    def @Star        { { Symbol Base } @Font "\052"    }
  616. X    def @Degree        { { Symbol Base } @Font "\260"    }
  617. X    def @Minute        { { Symbol Base } @Font "\242"    }
  618. X    def @Second        { { Symbol Base } @Font "\262"    }
  619. X    def @Multiply    { { Symbol Base } @Font "\264"    }
  620. X    def @Divide        { { Symbol Base } @Font "\270"    }
  621. X    def @Lozenge    { { Symbol Base } @Font "\340"    }
  622. X    def @Register    { { Symbol Base } @Font "\342"    }
  623. X    def @CopyRight    { { Symbol Base } @Font "\343"    }
  624. X    def @TradeMark    { { Symbol Base } @Font "\344"    }
  625. X
  626. X
  627. X    ###########################################################################
  628. X    #                                                                         #
  629. X    #  Miscellaneous.                                                         #
  630. X    #                                                                         #
  631. X    ###########################################################################
  632. X
  633. X    def @R             right x { Base @Font x                 }
  634. X    def @I             right x { Slope @Font x                 }
  635. X    def @B             right x { Bold @Font x                 }
  636. X    def @S             right x { @OneRow { //0.04fo 0.8f @Font x }     }
  637. X    def "^"               { {} ^& {}                 }
  638. X    def "&-"  left x   right y { x &0ch y                 }
  639. X    def @MajorHeading  right x { ragged @Break @MajorHeadingFont @Font x }
  640. X    def @Heading       right x { ragged @Break @HeadingFont      @Font x }
  641. X    def @MinorHeading  right x { ragged @Break @MinorHeadingFont @Font x }
  642. X    def @Date { @Moment&&now @Open {@Day {@Months&&@Month}, @Century{@Year}} }
  643. X
  644. X
  645. X    ###########################################################################
  646. X    #                                                                         #
  647. X    #  Exception list for hyphenation.                                        #
  648. X    #                                                                         #
  649. X    ###########################################################################
  650. X
  651. X    def associate     { "as" &- "so" &- "ciate"                }
  652. X    def associates    { "as" &- "so" &- "ciates"            }
  653. X    def declination   { "dec" &- "li" &- "na" &- "tion"            }
  654. X    def obligatory    { "oblig" &- "a" &- "tory"            }
  655. X    def philanthropic { "phil" &- "an" &- "thropic"            }
  656. X    def present       { "present"                    }
  657. X    def presents      { "presents"                    }
  658. X    def project       { "project"                    }
  659. X    def projects      { "projects"                    }
  660. X    def reciprocity   { "reci" &- "procity"                }
  661. X    def recognizance  { "re" &- "cog" &- "ni" &- "zance"        }
  662. X    def reformation   { "ref" &- "or" &- "ma" &- "tion"            }
  663. X    def retribution   { "ret" &- "ri" &- "bu" &- "tion"            }
  664. X    def table         { "ta" &- "ble"                    }
  665. X
  666. X
  667. X    ###########################################################################
  668. X    #                                                                         #
  669. X    #  Page and item markers.   @Runner is used only by books.                #
  670. X    #                                                                         #
  671. X    ###########################################################################
  672. X
  673. X    export @Tag
  674. X    def @PageMarker
  675. X    right @Tag
  676. X    {
  677. X    @Null
  678. X    }
  679. X
  680. X    def @PageMark
  681. X    right x
  682. X    {
  683. X    @PageMarker&&preceding @Tagged x
  684. X    }
  685. X
  686. X    def @PageOf
  687. X    right x
  688. X    {
  689. X    @PageMarker&&x @Open { @Tag }
  690. X    }
  691. X
  692. X    export @Tag
  693. X    def @NumberMarker
  694. X    right @Tag
  695. X    {
  696. X    @Null
  697. X    }
  698. X
  699. X    def @NumberOf
  700. X    right x
  701. X    {
  702. X    @NumberMarker&&x @Open { @Tag }
  703. X    }
  704. X
  705. X    export @TopOdd @TopEven @FootOdd @FootEven
  706. X    def @Runner
  707. X    named @TopOdd    right @PageNum { @Null }
  708. X    named @TopEven    right @PageNum { @Null }
  709. X    named @FootOdd    right @PageNum { @Null }
  710. X    named @FootEven    right @PageNum { @Null }
  711. X    named @Tag {}
  712. X    { @Null
  713. X    }
  714. X
  715. X
  716. X    ###########################################################################
  717. X    #                                                                         #
  718. X    #   @Hyph x                                                               #
  719. X    #                                                                         #
  720. X    #   Return "hyphen" if x is "Yes" or "yes", else "nohyphen".              #
  721. X    #                                                                         #
  722. X    ###########################################################################
  723. X
  724. X    def @Hyph right x
  725. X    {
  726. X    x @Case {
  727. X        {Yes yes} @Yield "hyphen"
  728. X        else      @Yield "nohyphen"
  729. X    }
  730. X    }
  731. X
  732. X
  733. X    ###########################################################################
  734. X    #                                                                         #
  735. X    #  x @OrElse y                                                            #
  736. X    #                                                                         #
  737. X    #  This returns x unless its value is "dft", in which case it returns y.  #
  738. X    #  Useful for defaulting the value of one parameter to another.           #
  739. X    #                                                                         #
  740. X    ###########################################################################
  741. X
  742. X    def @OrElse
  743. X    left x
  744. X    right y
  745. X    {
  746. X    x @Case {
  747. X        dft  @Yield y
  748. X        else @Yield x
  749. X    }
  750. X    }
  751. X
  752. X
  753. X    ###########################################################################
  754. X    #                                                                         #
  755. X    #  Paragraphs.                                                            #
  756. X    #                                                                         #
  757. X    ###########################################################################
  758. X
  759. X    macro @PP    { //@ParaGap @ParaIndent @Wide &0i }
  760. X    macro @LP    { //@ParaGap               }
  761. X    macro @DP    { //@DispGap               }
  762. X    macro @NP    { //1.1b               }
  763. X    macro @CNP    { // 3.2v @High //0io //           }
  764. X
  765. X
  766. X    ###########################################################################
  767. X    #                                                                         #
  768. X    #  Beginning and ending of aligned displays.                              #
  769. X    #                                                                         #
  770. X    ###########################################################################
  771. X
  772. X    def @APlace            { @Galley }
  773. X    def @EndAlignedPlace   { @Galley }
  774. X    def @AlignedPlace      { @Galley }
  775. X
  776. X    def @BAligned into { @APlace&&preceding }
  777. X    {
  778. X    def @AlignedList { @AlignedPlace /1.1b @AlignedList }
  779. X
  780. X    //1.1b @AlignedList
  781. X    //     @EndAlignedPlace
  782. X    }
  783. X
  784. X    macro @BAD { // @APlace | @BAligned }
  785. X    def   @EAD force into { @EndAlignedPlace&&preceding } {}
  786. X
  787. X    macro @BeginAlignedDisplays { @BAD }
  788. X    macro @EndAlignedDisplays   { @EAD }
  789. X
  790. X
  791. X    ###########################################################################
  792. X    #                                                                         #
  793. X    #  Beginning and ending of numbered displays.                             #
  794. X    #                                                                         #
  795. X    ###########################################################################
  796. X
  797. X    def @BeginNumberedPlace { @Galley }
  798. X    def @EndNumberedPlace   { @Galley }
  799. X    def @NextNumberPlace    { @Galley }
  800. X
  801. X    def @NNumber into { @NextNumberPlace&&following } {}
  802. X    macro @NN { @NNumber @BeginNumberedPlace }
  803. X
  804. X    def @BNumbered into { @BeginNumberedPlace&&preceding }
  805. X    named style right tag { (tag) }
  806. X    named start { 1 }
  807. X    {
  808. X    def @NList right num
  809. X    {
  810. X        |1rt style num & @NumberMarker num & @NextNumberPlace
  811. X        // @NList @Next num
  812. X    }
  813. X
  814. X    //  @NList start
  815. X    //  @EndNumberedPlace
  816. X    }
  817. X
  818. X    macro @BND { // @BeginNumberedPlace // @BNumbered }
  819. X    def   @END force into { @EndNumberedPlace&&preceding } {}
  820. X    
  821. X    macro @BeginNumberedDisplays { @BND }
  822. X    macro @EndNumberedDisplays   { @END }
  823. X
  824. X
  825. X    ###########################################################################
  826. X    #                                                                         #
  827. X    #  Galleys which carry displays to their places.                          #
  828. X    #                                                                         #
  829. X    ###########################################################################
  830. X
  831. X    def @DispPlace { @Galley }
  832. X
  833. X    def @Disp into { @DispPlace&&preceding }
  834. X    right x
  835. X    {
  836. X    @OneRow x
  837. X    }
  838. X
  839. X    def @NDisp into { @DispPlace&&preceding }
  840. X    named @Tag {}
  841. X    right x
  842. X    {
  843. X    @OneRow {
  844. X       @NumberMarker&&following @Tagged @Tag
  845. X       @PageMarker&&preceding @Tagged @Tag
  846. X       ^//
  847. X       @OneRow x
  848. X    }
  849. X    }
  850. X
  851. X    def @ADisp into { @AlignedPlace&&preceding }
  852. X    right x
  853. X    {
  854. X    @OneRow x
  855. X    }
  856. X
  857. X    def @ANDisp into { @AlignedPlace&&preceding }
  858. X    named @Tag {}
  859. X    right x
  860. X    {
  861. X    @OneRow {
  862. X       @NumberMarker&&following @Tagged @Tag
  863. X       @PageMarker&&preceding @Tagged @Tag
  864. X       ^/
  865. X       @OneRow x
  866. X    }
  867. X    }
  868. X
  869. X
  870. X    ###########################################################################
  871. X    #                                                                         #
  872. X    #  Displays and raw displays.                                             #
  873. X    #                                                                         #
  874. X    ###########################################################################
  875. X
  876. X    macro @G  { |@DefaultIndent }
  877. X    macro @LG { |               }
  878. X    macro @IG { |@DispIndent    }
  879. X    macro @CG { |0.5rt          }
  880. X
  881. X    macro @D     { @DP @G   @DispPlace  |        @DP // @Disp   }
  882. X    macro @LD    { @DP @LG  @DispPlace  |        @DP // @Disp   }
  883. X    macro @ID    { @DP @IG  @DispPlace  |        @DP // @Disp   }
  884. X    macro @CD    { @DP @CG  @DispPlace  |        @DP // @Disp   }
  885. X
  886. X    macro @AD    { @DP @G   @APlace     |        @DP // @ADisp  }
  887. X    macro @LAD   { @DP @LG  @APlace     |        @DP // @ADisp  }
  888. X    macro @IAD   { @DP @IG  @APlace     |        @DP // @ADisp  }
  889. X    macro @CAD   { @DP @CG  @APlace     |        @DP // @ADisp  }
  890. X
  891. X    macro @ND    { @DP @G   @DispPlace  |1rt @NN @DP // @NDisp  }
  892. X    macro @LND   { @DP @LG  @DispPlace  |1rt @NN @DP // @NDisp  }
  893. X    macro @IND   { @DP @IG  @DispPlace  |1rt @NN @DP // @NDisp  }
  894. X    macro @CND   { @DP @CG  @DispPlace  |1rt @NN @DP // @NDisp  }
  895. X
  896. X    macro @AND   { @DP @G   @APlace     |1rt @NN @DP // @ANDisp }
  897. X    macro @LAND  { @DP @LG  @APlace     |1rt @NN @DP // @ANDisp }
  898. X    macro @IAND  { @DP @IG  @APlace     |1rt @NN @DP // @ANDisp }
  899. X    macro @CAND  { @DP @CG  @APlace     |1rt @NN @DP // @ANDisp }
  900. X
  901. X
  902. X    macro @RD    {     @G   @DispPlace  |               @Disp   }
  903. X    macro @RLD   {     @LG  @DispPlace  |               @Disp   }
  904. X    macro @RID   {     @IG  @DispPlace  |               @Disp   }
  905. X    macro @RCD   {     @CG  @DispPlace  |               @Disp   }
  906. X
  907. X    macro @RAD   {     @G   @APlace     |               @ADisp  }
  908. X    macro @RLAD  {     @LG  @APlace     |               @ADisp  }
  909. X    macro @RIAD  {     @IG  @APlace     |               @ADisp  }
  910. X    macro @RCAD  {     @CG  @APlace     |               @ADisp  }
  911. X
  912. X    macro @RND   {     @G   @DispPlace  |1rt @NN        @NDisp  }
  913. X    macro @RLND  {     @LG  @DispPlace  |1rt @NN        @NDisp  }
  914. X    macro @RIND  {     @IG  @DispPlace  |1rt @NN        @NDisp  }
  915. X    macro @RCND  {     @CG  @DispPlace  |1rt @NN        @NDisp  }
  916. X
  917. X    macro @RAND  {     @G   @APlace     |1rt @NN        @ANDisp }
  918. X    macro @RLAND {     @LG  @APlace     |1rt @NN        @ANDisp }
  919. X    macro @RIAND {     @IG  @APlace     |1rt @NN        @ANDisp }
  920. X    macro @RCAND {     @CG  @APlace     |1rt @NN        @ANDisp }
  921. X
  922. X
  923. X    macro @Display                            { @D     }
  924. X    macro @LeftDisplay                        { @LD    }
  925. X    macro @IndentedDisplay                    { @ID    }
  926. X    macro @CentredDisplay                     { @CD    }
  927. X    macro @CenteredDisplay                    { @CD    }
  928. X
  929. X    macro @AlignedDisplay                     { @AD    }
  930. X    macro @LeftAlignedDisplay                 { @LAD   }
  931. X    macro @IndentedAlignedDisplay             { @IAD   }
  932. X    macro @CentredAlignedDisplay              { @CAD   }
  933. X    macro @CenteredAlignedDisplay             { @CAD   }
  934. X
  935. X    macro @NumberedDisplay                    { @ND    }
  936. X    macro @LeftNumberedDisplay                { @LND   }
  937. X    macro @IndentedNumberedDisplay            { @IND   }
  938. X    macro @CentredNumberedDisplay             { @CND   }
  939. X    macro @CenteredNumberedDisplay            { @CND   }
  940. X
  941. X    macro @AlignedNumberedDisplay             { @AND   }
  942. X    macro @LeftAlignedNumberedDisplay         { @LAND  }
  943. X    macro @IndentedAlignedNumberedDisplay     { @IAND  }
  944. X    macro @CentredAlignedNumberedDisplay      { @CAND  }
  945. X    macro @CenteredAlignedNumberedDisplay     { @CAND  }
  946. X
  947. X
  948. X    macro @RawDisplay                         { @RD    }
  949. X    macro @RawLeftDisplay                     { @RLD   }
  950. X    macro @RawIndentedDisplay                 { @RID   }
  951. X    macro @RawCentredDisplay                  { @RCD   }
  952. X    macro @RawCenteredDisplay                 { @RCD   }
  953. X
  954. X    macro @RawAlignedDisplay                  { @RAD   }
  955. X    macro @RawLeftAlignedDisplay              { @RLAD  }
  956. X    macro @RawIndentedAlignedDisplay          { @RIAD  }
  957. X    macro @RawCentredAlignedDisplay           { @RCAD  }
  958. X    macro @RawCenteredAlignedDisplay          { @RCAD  }
  959. X
  960. X    macro @RawNumberedDisplay                 { @RND   }
  961. X    macro @RawLeftNumberedDisplay             { @RLND  }
  962. X    macro @RawIndentedNumberedDisplay         { @RIND  }
  963. X    macro @RawCentredNumberedDisplay          { @RCND  }
  964. X    macro @RawCenteredNumberedDisplay         { @RCND  }
  965. X
  966. X    macro @RawAlignedNumberedDisplay          { @RAND  }
  967. X    macro @RawLeftAlignedNumberedDisplay      { @RLAND }
  968. X    macro @RawIndentedAlignedNumberedDisplay  { @RIAND }
  969. X    macro @RawCentredAlignedNumberedDisplay   { @RCAND }
  970. X    macro @RawCenteredAlignedNumberedDisplay  { @RCAND }
  971. X
  972. X
  973. X    ###########################################################################
  974. X    #                                                                         #
  975. X    #  Lists and raw lists (except indented lists).                           #
  976. X    #                                                                         #
  977. X    ###########################################################################
  978. X
  979. X    def   @ItemPlace { @Galley }
  980. X    def   @ListItem into { @ItemPlace&&preceding } right x { x }
  981. X    macro @LI { @ListItem }
  982. X
  983. X    def   @EndListPlace { @Galley }
  984. X    def   @EndList force into { @EndListPlace&&preceding } {}
  985. X    macro @EL { @EndList }
  986. X
  987. X    def @RLL
  988. X    named indent { @DispIndent }
  989. X    named gap    { @DispGap }
  990. X    {
  991. X    def @List { |indent @ItemPlace | //gap @List }
  992. X
  993. X    @List // @EndListPlace
  994. X    }
  995. X
  996. X    def   @RCL    { @RLL indent { 0.5rt     } }
  997. X    macro @LL    { @DP @RLL @DP    }
  998. X    macro @CL    { @DP @RCL @DP    }
  999. X
  1000. X    macro @RawLeftList        { @RLL    }
  1001. X    macro @RawCentredList    { @RCL    }
  1002. X    macro @RawCenteredList    { @RCL    }
  1003. X    macro @LeftList        { @LL    }
  1004. X    macro @CentredList        { @CL    }
  1005. X    macro @CenteredList        { @CL    }
  1006. X
  1007. X
  1008. X    ###########################################################################
  1009. X    #                                                                         #
  1010. X    #  Indented lists and raw indented lists, tagged automatically.           #
  1011. X    #                                                                         #
  1012. X    ###########################################################################
  1013. X
  1014. X    def @RawIndentedList
  1015. X       named style right tag    {               }
  1016. X       named indent        { @DispIndent    }
  1017. X       named gap        { @DispGap    }
  1018. X       named start        { 1        }
  1019. X    {
  1020. X    def @IList right num
  1021. X    {   indent @Wide {style num} | @ItemPlace |
  1022. X        //gap @IList @Next num
  1023. X    }
  1024. X
  1025. X    @IList start // @EndListPlace
  1026. X    }
  1027. X
  1028. X    def @RawNumberedList      { @RawIndentedList style { tag.               } }
  1029. X    def @RawParenNumberedList { @RawIndentedList style { (tag)               } }
  1030. X    def @RawRomanList          { @RawIndentedList style { {@Roman&&tag}.    } }
  1031. X    def @RawParenRomanList    { @RawIndentedList style { ({@Roman&&tag})   } }
  1032. X    def @RawUCRomanList          { @RawIndentedList style { {@UCRoman&&tag}.  } }
  1033. X    def @RawParenUCRomanList  { @RawIndentedList style { ({@UCRoman&&tag}) } }
  1034. X    def @RawAlphaList          { @RawIndentedList style { {@Alpha&&tag}.    } }
  1035. X    def @RawParenAlphaList    { @RawIndentedList style { ({@Alpha&&tag})   } }
  1036. X    def @RawUCAlphaList          { @RawIndentedList style { {@UCAlpha&&tag}.  } }
  1037. X    def @RawParenUCAlphaList  { @RawIndentedList style { ({@UCAlpha&&tag}) } }
  1038. X    def @RawBulletList          { @RawIndentedList style { @Bullet       } }
  1039. X    def @RawStarList          { @RawIndentedList style { @Star           } }
  1040. X    def @RawDashList          { @RawIndentedList style { --            } }
  1041. X
  1042. X    macro @IndentedList          { @DP @RawIndentedList        @DP }
  1043. X    macro @NumberedList          { @DP @RawNumberedList        @DP }
  1044. X    macro @ParenNumberedList  { @DP @RawParenNumberedList    @DP }
  1045. X    macro @RomanList          { @DP @RawRomanList        @DP }
  1046. X    macro @ParenRomanList     { @DP @RawParenRomanList        @DP }
  1047. X    macro @UCRomanList          { @DP @RawUCRomanList        @DP }
  1048. X    macro @ParenUCRomanList   { @DP @RawParenUCRomanList    @DP }
  1049. X    macro @AlphaList          { @DP @RawAlphaList        @DP }
  1050. X    macro @ParenAlphaList     { @DP @RawParenAlphaList        @DP }
  1051. X    macro @UCAlphaList          { @DP @RawUCAlphaList        @DP }
  1052. X    macro @ParenUCAlphaList   { @DP @RawParenUCAlphaList    @DP }
  1053. X    macro @BulletList          { @DP @RawBulletList        @DP }
  1054. X    macro @StarList          { @DP @RawStarList        @DP }
  1055. X    macro @DashList          { @DP @RawDashList        @DP }
  1056. X
  1057. X    macro @RIL        { @RawIndentedList    }
  1058. X    macro @RNL        { @RawNumberedList    }
  1059. X    macro @RPNL        { @RawParenNumberedList    }
  1060. X    macro @RRL        { @RawRomanList        }
  1061. X    macro @RPRL        { @RawParenRomanList    }
  1062. X    macro @RUCRL    { @RawUCRomanList    }
  1063. X    macro @RPUCRL    { @RawParenUCRomanList    }
  1064. X    macro @RAL        { @RawAlphaList        }
  1065. X    macro @RPAL        { @RawParenAlphaList    }
  1066. X    macro @RUCAL    { @RawUCAlphaList    }
  1067. X    macro @RPUCAL    { @RawParenUCAlphaList    }
  1068. X    macro @RBL        { @RawBulletList    }
  1069. X    macro @RSL        { @RawStarList        }
  1070. X    macro @RDL        { @RawDashList        }
  1071. X
  1072. X    macro @IL        { @IndentedList        }
  1073. X    macro @NL        { @NumberedList        }
  1074. X    macro @PNL        { @ParenNumberedList    }
  1075. X    macro @RL        { @RomanList        }
  1076. X    macro @PRL        { @ParenRomanList    }
  1077. X    macro @UCRL        { @UCRomanList        }
  1078. X    macro @PUCRL    { @ParenUCRomanList    }
  1079. X    macro @AL        { @AlphaList        }
  1080. X    macro @PAL        { @ParenAlphaList    }
  1081. X    macro @UCAL        { @UCAlphaList        }
  1082. X    macro @PUCAL    { @ParenUCAlphaList    }
  1083. X    macro @BL        { @BulletList        }
  1084. X    macro @SL        { @StarList        }
  1085. X    macro @DL        { @DashList        }
  1086. X
  1087. X
  1088. X    ###########################################################################
  1089. X    #                                                                         #
  1090. X    #  Indented lists and raw indented lists, tagged by the author.           #
  1091. X    #                                                                         #
  1092. X    ###########################################################################
  1093. X
  1094. X    def @TagPlace    { @Galley }
  1095. X
  1096. X    def @TagItem into { @ItemPlace&&preceding }
  1097. X       left x
  1098. X       right y
  1099. X    { 
  1100. X       def senditem into { @TagPlace&&preceding } { x }
  1101. X
  1102. X       senditem | y
  1103. X    }
  1104. X
  1105. X    macro @TI { @TagItem }
  1106. X
  1107. X    def @RawTaggedList
  1108. X    named style right tag { tag }
  1109. X    named indent { @DispIndent }
  1110. X    named gap    { @DispGap }
  1111. X    {
  1112. X    def @LList
  1113. X    {   indent @Wide {style @TagPlace} | @ItemPlace
  1114. X        //gap @LList
  1115. X    }
  1116. X
  1117. X    @LList // @EndListPlace
  1118. X    }
  1119. X
  1120. X    def @RawWideTaggedList    { @RawTaggedList indent { @WideIndent       } }
  1121. X    def @RawVeryWideTaggedList    { @RawTaggedList indent { @VeryWideIndent   } }
  1122. X    macro @TaggedList        { @DP @RawTaggedList        @DP }
  1123. X    macro @WideTaggedList    { @DP @RawWideTaggedList    @DP }
  1124. X    macro @VeryWideTaggedList    { @DP @RawVeryWideTaggedList    @DP }
  1125. X
  1126. X    macro @RTL        { @RawTaggedList        }
  1127. X    macro @RWTL        { @RawWideTaggedList        }
  1128. X    macro @RVWTL    { @RawVeryWideTaggedList    }
  1129. X    macro @TL        { @TaggedList            }
  1130. X    macro @WTL        { @WideTaggedList        }
  1131. X    macro @VWTL        { @VeryWideTaggedList        }
  1132. X
  1133. X
  1134. X
  1135. X    ###########################################################################
  1136. X    #                                                                         #
  1137. X    #  Definitions for laying out one general-purpose page.                   #
  1138. X    #                                                                         #
  1139. X    ###########################################################################
  1140. X
  1141. X    def @FullPlace        { @Galley }
  1142. X    def @ColPlace         { @Galley }
  1143. X    def @IndexPlace       { @Galley }
  1144. X
  1145. X    export @Tag
  1146. X    def @TopList right @Tag
  1147. X    {
  1148. X           @Galley
  1149. X    //@TopGap  @TopList @Next @Tag
  1150. X    }
  1151. X
  1152. X    export @Tag
  1153. X    def @FootList right @Tag
  1154. X    {
  1155. X            @Galley
  1156. X    //@FootGap  @FootList @Next @Tag
  1157. X    }
  1158. X
  1159. X    def @FootSect
  1160. X    {
  1161. X            @FootLen @Wide @HLine
  1162. X    //@FootGap  @FootList 1 ||@FootLen
  1163. X    }
  1164. X
  1165. X    export @Tag
  1166. X    def @ColFootList right @Tag
  1167. X    {
  1168. X            @Galley
  1169. X    //@FootGap  @ColFootList @Next @Tag
  1170. X    }
  1171. X
  1172. X    def @ColFootSect
  1173. X    {
  1174. X            @ColFootLen @Wide @HLine
  1175. X    //@FootGap  @ColFootList 1 ||@ColFootLen
  1176. X    }
  1177. X
  1178. X    def @ColList right col
  1179. X    {
  1180. X    def @Column
  1181. X    {
  1182. X        @VExpand { @ColPlace //1rt @OneRow { //@MidGap @ColFootSect } }
  1183. X    }
  1184. X
  1185. X    col @Case {
  1186. X
  1187. X        Single @Yield @Column
  1188. X
  1189. X        Double @Yield { @DoubleColWidth @Wide @Column
  1190. X                ||@ColGap @ColList col }
  1191. X
  1192. X        Multi  @Yield { @MultiColWidth @Wide @Column
  1193. X                ||@ColGap @ColList col }
  1194. X
  1195. X    }
  1196. X    }
  1197. X    
  1198. X    def @IndexColList right col
  1199. X    {
  1200. X    col @Case {
  1201. X
  1202. X        Single @Yield @VExpand @IndexPlace
  1203. X
  1204. X        Double @Yield { @DoubleColWidth @Wide @VExpand @IndexPlace
  1205. X                ||@ColGap @IndexColList col }
  1206. X
  1207. X        Multi  @Yield { @MultiColWidth @Wide @VExpand @IndexPlace
  1208. X                ||@ColGap @IndexColList col }
  1209. X
  1210. X    }
  1211. X    }
  1212. X
  1213. X    def @Page right x
  1214. X    {    @PageWidth @Wide @PageHeight @High
  1215. X    {   //@PageMargin ||@PageMargin
  1216. X        @HExpand @VExpand x
  1217. X        ||@PageMargin //@PageMargin
  1218. X    }
  1219. X    }
  1220. X
  1221. X    def @OnePage
  1222. X    named @Columns {}
  1223. X    named @PageTop {}
  1224. X    named @PageFoot {}
  1225. X    {
  1226. X    @Page {
  1227. X              @PageTop
  1228. X        //@MidGap @TopList
  1229. X        //@MidGap @FullPlace
  1230. X        //@MidGap @ColList @Columns
  1231. X        //@MidGap @IndexColList @IndexColumns
  1232. X        // //1rt  @OneRow { //@MidGap @FootSect //@MidGap @PageFoot }
  1233. X    }
  1234. X    }
  1235. X
  1236. X
  1237. X    ###########################################################################
  1238. X    #                                                                         #
  1239. X    #  Introductory page (with @IntroFullPlace and @IntroColPlace).           #
  1240. X    #                                                                         #
  1241. X    ###########################################################################
  1242. X
  1243. X    def @IntroFullPlace   { @Galley }
  1244. X    def @IntroColPlace    { @Galley }
  1245. X
  1246. X    def @IntroColList right col
  1247. X    {
  1248. X    def @Column
  1249. X    {
  1250. X        @VExpand { @IntroColPlace //1rt @OneRow { //@MidGap @ColFootSect } }
  1251. X    }
  1252. X
  1253. X    col @Case {
  1254. X
  1255. X        Single @Yield @Column
  1256. X
  1257. X        Double @Yield { @DoubleColWidth @Wide @Column
  1258. X                ||@ColGap @IntroColList col }
  1259. X
  1260. X        Multi  @Yield { @MultiColWidth @Wide @Column
  1261. X                ||@ColGap @IntroColList col }
  1262. X
  1263. X    }
  1264. X    }
  1265. X
  1266. X    def @OneIntroPage
  1267. X    named @Columns {}
  1268. X    named @PageTop {}
  1269. X    named @PageFoot {}
  1270. X    {
  1271. X    @Page {
  1272. X        @PageTop
  1273. X        //@MidGap @TopList
  1274. X        //@MidGap @IntroFullPlace
  1275. X        //@MidGap @IntroColList @Columns
  1276. X        //@MidGap @IndexColList @IndexColumns
  1277. X        // //1rt @OneRow { //@MidGap @FootSect //@MidGap @PageFoot }
  1278. X    }
  1279. X    }
  1280. X
  1281. X
  1282. X    ###########################################################################
  1283. X    #                                                                         #
  1284. X    #  Page layout for documents other than books (simple and tech. reports)  #
  1285. X    #                                                                         #
  1286. X    ###########################################################################
  1287. X
  1288. X    def @SimplePageList
  1289. X    named @Columns {}
  1290. X    named @PageNumbers {}
  1291. X    right @PageNum
  1292. X    {
  1293. X            @PageMarker @PageNum
  1294. X    //  @OnePage
  1295. X            @Columns { @Columns }
  1296. X            @PageTop {
  1297. X            @PageNumbers @Case
  1298. X            {
  1299. X                {Yes yes} @Yield
  1300. X                {
  1301. X                @PageNum @Case
  1302. X                {
  1303. X                    1    @Yield @PageOneTopFormat @PageNum
  1304. X                    else @Yield @PageTopFormat    @PageNum
  1305. X                }
  1306. X                }
  1307. X                else @Yield @Null
  1308. X            }
  1309. X            }
  1310. X            @PageFoot {
  1311. X            @PageNumbers @Case
  1312. X            {
  1313. X            {Yes yes} @Yield
  1314. X            {
  1315. X                @PageNum @Case
  1316. X                {
  1317. X                1    @Yield @PageOneFootFormat @PageNum
  1318. X                else @Yield @PageFootFormat    @PageNum
  1319. X                }
  1320. X            }
  1321. X            else @Yield @Null
  1322. X            }
  1323. X        }
  1324. X    //  @SimplePageList
  1325. X        @Columns { @Columns }
  1326. X        @PageNumbers { @PageNumbers }
  1327. X        @Next @PageNum
  1328. X    }
  1329. X
  1330. X
  1331. X    ###########################################################################
  1332. X    #                                                                         #
  1333. X    #  Page list for ordinary pages of books.                                 #
  1334. X    #                                                                         #
  1335. X    ###########################################################################
  1336. X
  1337. X    def @OddPageList
  1338. X    named @Columns {}
  1339. X    right @PageNum
  1340. X    {
  1341. X    def @EvenPageList
  1342. X        named @Columns {}
  1343. X        right @PageNum
  1344. X    {
  1345. X        @PageMarker @PageNum
  1346. X        //    @Runner&&following @Open
  1347. X        {
  1348. X            @OnePage
  1349. X            @Columns { @Columns }
  1350. X            @PageTop { @TopEven @PageNum }
  1351. X            @PageFoot { @FootEven @PageNum }
  1352. X        }
  1353. X        //    @OddPageList
  1354. X            @Columns { @Columns }
  1355. X            @Next @PageNum
  1356. X    }
  1357. X
  1358. X        @PageMarker @PageNum
  1359. X    //  @Runner&&following @Open
  1360. X        {
  1361. X        @OnePage
  1362. X            @Columns { @Columns }
  1363. X            @PageTop { @TopOdd @PageNum }
  1364. X            @PageFoot { @FootOdd @PageNum }
  1365. X        }
  1366. X    //  @EvenPageList
  1367. X        @Columns { @Columns }
  1368. X        @Next @PageNum
  1369. X    }
  1370. X
  1371. X
  1372. X    ###########################################################################
  1373. X    #                                                                         #
  1374. X    #  Page list for introductory pages of books.                             #
  1375. X    #                                                                         #
  1376. X    ###########################################################################
  1377. X
  1378. X    def @IntroOddPageList
  1379. X    named @Columns {}
  1380. X    right @PageNum
  1381. X    {
  1382. X        @PageMarker @Roman&&@PageNum
  1383. X    //  @Runner&&following @Open
  1384. X        {
  1385. X        @OneIntroPage
  1386. X            @Columns { @Columns }
  1387. X            @PageTop { @TopOdd @Roman&&@PageNum }
  1388. X            @PageFoot { @FootOdd @Roman&&@PageNum }
  1389. X        }
  1390. X    //  @PageMarker @Roman&&{@Next @PageNum}
  1391. X    //  @Runner&&following @Open
  1392. X        {
  1393. X        @OneIntroPage
  1394. X            @Columns { @Columns }
  1395. X            @PageTop { @TopEven @Roman&&{@Next @PageNum} }
  1396. X            @PageFoot { @FootEven @Roman&&{@Next @PageNum} }
  1397. X        }
  1398. X    //  @IntroOddPageList
  1399. X        @Columns { @Columns }
  1400. X        @Next @Next @PageNum
  1401. X    }
  1402. X
  1403. X
  1404. X    ###########################################################################
  1405. X    #                                                                         #
  1406. X    #  Table of contents.                                                     #
  1407. X    #                                                                         #
  1408. X    ###########################################################################
  1409. X
  1410. X    def @ContentsPlace { @Galley }
  1411. X
  1412. X    def @ContentsEntry
  1413. X    left lpart
  1414. X    named pregap { @ContentsGap }
  1415. X    right rpart
  1416. X    {
  1417. X    def @Leaders { .. &4s @Leaders }
  1418. X
  1419. X    def sendentry into { @ContentsPlace&&preceding }
  1420. X    {
  1421. X        //pregap
  1422. X        lpart |1rt &2s @Leaders & 2f @Wide {|1rt rpart}
  1423. X    }
  1424. X
  1425. X    @TableOfContents @Case {
  1426. X        {Yes yes} @Yield sendentry
  1427. X        else      @Yield @Null
  1428. X    }
  1429. X    }
  1430. X
  1431. X    def @MajorContentsEntry
  1432. X    left lpart
  1433. X    named pregap { @MajorContentsGap }
  1434. X    right rpart
  1435. X    {
  1436. X    {@B lpart} @ContentsEntry pregap { pregap } rpart
  1437. X    }
  1438. X
  1439. X    def @ContentsSection
  1440. X    {
  1441. X    def @ContentsList { @ContentsPlace // @ContentsList }
  1442. X
  1443. X    @TableOfContents @Case {
  1444. X        {Yes yes} @Yield { @BookTitleFormat Contents // @ContentsList }
  1445. X        else      @Yield @Null
  1446. X    }
  1447. X    }
  1448. X
  1449. X
  1450. X    ###########################################################################
  1451. X    #                                                                         #
  1452. X    #  Footnotes.                                                             #
  1453. X    #                                                                         #
  1454. X    ###########################################################################
  1455. X
  1456. X    def @FullFootNote
  1457. X    named @Tag {}
  1458. X    right x
  1459. X    {
  1460. X    def ftag
  1461. X    { @OneRow { @FootList&&@Tag @Open { 0.8f @Font @Tag } ^/0.3vo }
  1462. X    }
  1463. X
  1464. X    def fnote into { @FootList&&following }
  1465. X    {
  1466. X        @FootNoteFont @Font @FootNoteBreak @Break
  1467. X        { @FootList&&preceding @Tagged @Tag  ftag & x }
  1468. X    }
  1469. X
  1470. X    @Null & @FootNoteFont @Font ftag & fnote
  1471. X    }
  1472. X
  1473. X    def @ColFootNote
  1474. X    named @Tag {}
  1475. X    right x
  1476. X    {
  1477. X    def ftag
  1478. X    { @OneRow { @ColFootList&&@Tag @Open { 0.8f @Font @Tag } ^/0.3vo }
  1479. X    }
  1480. X
  1481. X    def fnote into { @ColFootList&&following }
  1482. X    {
  1483. X        @FootNoteFont @Font @FootNoteBreak @Break
  1484. X        { @ColFootList&&preceding @Tagged @Tag  ftag & x }
  1485. X    }
  1486. X
  1487. X    @Null & @FootNoteFont @Font ftag & fnote
  1488. X    }
  1489. X
  1490. X
  1491. X    ###########################################################################
  1492. X    #                                                                         #
  1493. X    #  References.                                                            #
  1494. X    #                                                                         #
  1495. X    ###########################################################################
  1496. X
  1497. X    export  @Type @Author @Title @Institution
  1498. X        @Number @Publisher @Year @Proceedings
  1499. X        @Journal @Volume @Pages @Comment
  1500. X
  1501. X    def @Reference
  1502. X    named @Tag          { TAG?         }
  1503. X    named @Type         { TYPE?        }
  1504. X    named @Author       { AUTHOR?      }
  1505. X    named @Title        { TITLE?       }
  1506. X    named @Institution  { INSTITUTION? }
  1507. X    named @Number       { NUMBER?      }
  1508. X    named @Publisher    { PUBLISHER?   }
  1509. X    named @Year         { YEAR?        }
  1510. X    named @Proceedings  { PROCEEDINGS? }
  1511. X    named @Journal      { JOURNAL?     }
  1512. X    named @Volume       { VOLUME?      }
  1513. X    named @Pages        { PAGES?       }
  1514. X    named @Comment      { @Null        }
  1515. X    { @Null }
  1516. X
  1517. X    export @Style
  1518. X    def @RefStyle
  1519. X    left @Tag
  1520. X    named @Style right reftag {}
  1521. X    {}
  1522. X
  1523. X    @SysDatabase @RefStyle { "refstyles" }
  1524. X
  1525. X    def @RefPrint right reftag
  1526. X    {    @RefStyle&&{ @Reference&&reftag @Open { @Type } }
  1527. X    @Open { @Style reftag }
  1528. X    }
  1529. X
  1530. X
  1531. X    ###########################################################################
  1532. X    #                                                                         #
  1533. X    #  Reference collection at end of chapter.                                #
  1534. X    #                                                                         #
  1535. X    ###########################################################################
  1536. X
  1537. X    def @ChapRefPlace { @Galley }
  1538. X
  1539. X    def @ChapRefSection
  1540. X    named @Title        { References }
  1541. X    named style right tag    { tag. }
  1542. X    named indent        { @DispIndent }
  1543. X    named gap        { @DispGap }
  1544. X    named start        { 1 }
  1545. X    {
  1546. X    def @RefList right num
  1547. X    {
  1548. X        @NumberMarker num &
  1549. X        indent @Wide {style num}  |  @ChapRefPlace
  1550. X        //gap @RefList @Next num
  1551. X    }
  1552. X
  1553. X    @Heading @Protect @Title
  1554. X    //@DispGap
  1555. X    @RefList start
  1556. X    }
  1557. X
  1558. X    def @ChapRef right x
  1559. X    {
  1560. X    def sendref into { @ChapRefPlace&&following }
  1561. X        right @Key
  1562. X    {
  1563. X        @NumberMarker&&preceding @Tagged x &
  1564. X        @PageMarker&&preceding @Tagged x &
  1565. X        @RefPrint x
  1566. X    }
  1567. X
  1568. X    @NumberMarker&&x @Open { @Tag } sendref x
  1569. X    }
  1570. X
  1571. X
  1572. X    ###########################################################################
  1573. X    #                                                                         #
  1574. X    #  Reference collection at end of document.                               #
  1575. X    #                                                                         #
  1576. X    ###########################################################################
  1577. X
  1578. X    def @RefPlace { @Galley }
  1579. X
  1580. X    def @Ref right x
  1581. X    {
  1582. X    def sendref into { @RefPlace&&following }
  1583. X        right @Key
  1584. X    {
  1585. X        @NumberMarker&&preceding @Tagged x &
  1586. X        @PageMarker&&preceding @Tagged x &
  1587. X        @RefPrint x
  1588. X    }
  1589. X
  1590. X    @NumberMarker&&x @Open { @Tag } sendref x
  1591. X    }
  1592. X
  1593. X    def @ReferenceSection
  1594. X    named @Tag        {}
  1595. X    named @Title        { References }
  1596. X    named @RunningTitle    { dft }
  1597. X    named style right tag    { tag. }
  1598. X    named headstyle right @Title { @Heading @Title }
  1599. X    named indent        { @DispIndent }
  1600. X    named gap        { @DispGap }
  1601. X    named start        { 1 }
  1602. X    {
  1603. X    def @RefList right num
  1604. X    {
  1605. X        @NumberMarker num &
  1606. X        indent @Wide {style num}  |  @RefPlace
  1607. X        //gap @RefList @Next num
  1608. X    }
  1609. X
  1610. X        @Protect headstyle @Title
  1611. X    //  @PageMarker&&preceding @Tagged @Tag
  1612. X    //  @Title @MajorContentsEntry {@PageOf @Tag}
  1613. X    //  @Runner
  1614. X        @FootEven { |0.5rt 0.8f @Font @B @PageNum }
  1615. X        @FootOdd  { |0.5rt 0.8f @Font @B @PageNum }
  1616. X    //@DispGap  @RefList start
  1617. X    //  @Runner
  1618. X        @TopEven { @B @PageNum }
  1619. X        @TopOdd  { @I {@RunningTitle @OrElse @Title} |1rt @B @PageNum }
  1620. X    }
  1621. X
  1622. X
  1623. X    ###########################################################################
  1624. X    #                                                                         #
  1625. X    #  Floating figures.                                                      #
  1626. X    #                                                                         #
  1627. X    ###########################################################################
  1628. X
  1629. X    def @FigurePlace { @Galley }
  1630. X    def @EndFigurePlace { @Galley }
  1631. X
  1632. X    def @FigureGalley into { @TopList&&following }
  1633. X    right prefix
  1634. X    {
  1635. X    def @FigureList right x
  1636. X    {
  1637. X        @NumberMarker {prefix}x & ||0.5rt @FigurePlace ||
  1638. X        //@TopGap
  1639. X        @FigureList @Next x
  1640. X    }
  1641. X
  1642. X    @FigureList 1
  1643. X    //
  1644. X    @EndFigurePlace
  1645. X    }
  1646. X
  1647. X    def @EndFigures force into { @EndFigurePlace&&following } {}
  1648. X
  1649. X    def @Figure into { @FigurePlace&&following }
  1650. X    named @Caption {}
  1651. X    named @Tag {}
  1652. X    right @Body
  1653. X    {
  1654. X    @OneRow
  1655. X    {
  1656. X        ||0.5rt @HContract @Body
  1657. X        //@DispGap
  1658. X        ||0.5rt
  1659. X        @NumberMarker&&preceding @Tagged @Tag
  1660. X        @PageMarker&&preceding @Tagged @Tag
  1661. X        @B { Figure {@NumberOf @Tag}. }  @Caption
  1662. X    }
  1663. X    }
  1664. X
  1665. X
  1666. X    ###########################################################################
  1667. X    #                                                                         #
  1668. X    #  Floating tables.                                                       #
  1669. X    #                                                                         #
  1670. X    ###########################################################################
  1671. X
  1672. X    def @TablePlace { @Galley }
  1673. X    def @EndTablePlace { @Galley }
  1674. X
  1675. X    def @TableGalley into { @TopList&&following }
  1676. X    right prefix
  1677. X    {
  1678. X    def @TableList right x
  1679. X    {
  1680. X        @NumberMarker {prefix}x & ||0.5rt @TablePlace ||
  1681. X        //@TopGap
  1682. X        @TableList @Next x
  1683. X    }
  1684. X
  1685. X    @TableList 1
  1686. X    //
  1687. X    @EndTablePlace
  1688. X    }
  1689. X
  1690. X    def @EndTables force into { @EndTablePlace&&following } {}
  1691. X
  1692. X    def @Table into { @TablePlace&&following }
  1693. X    named @Caption {}
  1694. X    named @Tag {}
  1695. X    right @Body
  1696. X    {
  1697. X    @OneRow
  1698. X    {
  1699. X        ||0.5rt @HContract @Body
  1700. X        //@DispGap
  1701. X        ||0.5rt
  1702. X        @NumberMarker&&preceding @Tagged @Tag
  1703. X        @PageMarker&&preceding @Tagged @Tag
  1704. X        @B { Table {@NumberOf @Tag}. }  @Caption
  1705. X    }
  1706. X    }
  1707. X
  1708. X
  1709. X    ###########################################################################
  1710. X    #                                                                         #
  1711. X    #  Lists of chapters, sections, subsections, and appendices.              #
  1712. X    #                                                                         #
  1713. X    ###########################################################################
  1714. X
  1715. X    export @Tag
  1716. X    def @ChapterList right @Tag
  1717. X    {
  1718. X                @Galley
  1719. X    //@ChapterGap        @ChapterList @Next @Tag
  1720. X    }
  1721. X
  1722. X    export @Tag
  1723. X    def @SectionList right @Tag
  1724. X    {
  1725. X                @Galley
  1726. X        //@SectionGap        @SectionList @Next @Tag
  1727. X    }
  1728. X
  1729. X    export @Tag
  1730. X    def @SubSectionList right @Tag
  1731. X    {
  1732. X                @Galley
  1733. X    //@SubSectionGap    @SubSectionList @Next @Tag
  1734. X    }
  1735. X
  1736. X    export @Tag
  1737. X    def @AppendixList right @Tag
  1738. X    {
  1739. X                @Galley
  1740. X    //@AppendixGap        @AppendixList @Next @Tag
  1741. X    }
  1742. X
  1743. X    export @Tag
  1744. X    def @SubAppendixList right @Tag
  1745. X    {
  1746. X                @Galley
  1747. X    //@SubAppendixGap   @SubAppendixList @Next @Tag
  1748. X    }
  1749. X
  1750. X
  1751. X    ###########################################################################
  1752. X    #                                                                         #
  1753. X    #  Body text.                                                             #
  1754. X    #                                                                         #
  1755. X    ###########################################################################
  1756. X
  1757. X    export @ColText @FootNote
  1758. X       @BeginSections @EndSections @BeginAppendices @EndAppendices
  1759. X
  1760. X    def @Text force into { @FullPlace&&preceding }
  1761. X    body x
  1762. X    {
  1763. X    def @FootNote right x { @FullFootNote x }
  1764. X
  1765. X    def @EndSectionsPlace { @Galley }
  1766. X    def @EndSections force into { @EndSectionsPlace&&preceding }  {}
  1767. X    macro @BeginSections
  1768. X          { //@SectionGap @SectionList 1 // @EndSectionsPlace // }
  1769. X
  1770. X    def @EndAppendicesPlace { @Galley }
  1771. X    def @EndAppendices force into { @EndAppendicesPlace&&preceding }  {}
  1772. X    macro @BeginAppendices
  1773. X          { //@AppendixGap @AppendixList 1 // @EndAppendicesPlace //}
  1774. X
  1775. X
  1776. X    export @FootNote
  1777. X    def @ColText force into { @ColPlace&&following }
  1778. X        body x
  1779. X    {
  1780. X        def @FootNote right x { @ColFootNote x }
  1781. X    
  1782. X        x
  1783. X    }
  1784. X
  1785. X    x
  1786. X    }
  1787. X
  1788. X    export @FootNote
  1789. X       @BeginSections @EndSections @BeginAppendices @EndAppendices
  1790. X    def @ColText force into { @ColPlace&&preceding }
  1791. X    body x
  1792. X    {
  1793. X    def @FootNote right x { @ColFootNote x }
  1794. X
  1795. X    def @EndSectionsPlace { @Galley }
  1796. X    def @EndSections force into { @EndSectionsPlace&&preceding }  {}
  1797. X    macro @BeginSections
  1798. X          { //@SectionGap @SectionList 1 // @EndSectionsPlace // }
  1799. X
  1800. X    def @EndAppendicesPlace { @Galley }
  1801. X    def @EndAppendices force into { @EndAppendicesPlace&&preceding }  {}
  1802. X    macro @BeginAppendices
  1803. X          { //@AppendixGap @AppendixList 1 // @EndAppendicesPlace //}
  1804. X    x
  1805. X    }
  1806. X
  1807. X
  1808. X    ###########################################################################
  1809. X    #                                                                         #
  1810. X    #  Abstract.                                                              #
  1811. X    #                                                                         #
  1812. X    ###########################################################################
  1813. X
  1814. X    def @AbstractPlace { @Galley }
  1815. X
  1816. X    export @FootNote
  1817. X    def @Abstract into { @AbstractPlace&&preceding }
  1818. X    named @Title { ABSTRACT }
  1819. X    body x
  1820. X    {  
  1821. X    def @FootNote right x { @FullFootNote x }
  1822. X
  1823. X    |0.5rt @I @Title
  1824. X    //@DispGap x
  1825. X    }
  1826. X
  1827. X
  1828. X    ###########################################################################
  1829. X    #                                                                         #
  1830. X    #  Preface.                                                               #
  1831. X    #                                                                         #
  1832. X    ###########################################################################
  1833. X
  1834. X    def @PrefacePlace { @Galley }
  1835. X
  1836. X    export @FootNote @BeginFigures @BeginTables
  1837. X    def @Preface force into { @PrefacePlace&&preceding }
  1838. X    named @Tag {}
  1839. X    named @Title { Preface }
  1840. X    named @RunningTitle { dft }
  1841. X    body @Body
  1842. X    {
  1843. X    def @FootNote right x { @ColFootNote x }
  1844. X    macro @BeginFigures { // @FigureGalley {} // }
  1845. X    macro @BeginTables  { // @TableGalley  {} // }
  1846. X
  1847. X        ragged @Break @BookTitleFormat @Title
  1848. X    //  @PageMarker&&preceding @Tagged @Tag
  1849. X    //  @Body
  1850. X    //@SectionGap    @ChapRefSection
  1851. X    }
  1852. X
  1853. X
  1854. X    ###########################################################################
  1855. X    #                                                                         #
  1856. X    #  Introduction.                                                          #
  1857. X    #                                                                         #
  1858. X    ###########################################################################
  1859. X
  1860. X    def @IntroductionPlace { @Galley }
  1861. X
  1862. X    export @FootNote @BeginFigures @BeginTables
  1863. X    def @Introduction force into { @IntroductionPlace&&preceding }
  1864. X    named @Tag {}
  1865. X    named @Title { Introduction }
  1866. X    named @RunningTitle { dft }
  1867. X    body @Body
  1868. X    {
  1869. X    def @FootNote right x { @ColFootNote x }
  1870. X    macro @BeginFigures { // @FigureGalley {} // }
  1871. X    macro @BeginTables  { // @TableGalley  {} // }
  1872. X
  1873. X        ragged @Break @BookTitleFormat @Title
  1874. X    //  @Runner
  1875. X        @FootEven { |0.5rt 0.8f @Font @B @PageNum }
  1876. X        @FootOdd  { |0.5rt 0.8f @Font @B @PageNum }
  1877. X    //  @PageMarker&&preceding @Tagged @Tag
  1878. X    //  @Title @MajorContentsEntry {@PageOf @Tag}
  1879. X    //  @Body
  1880. X    //@SectionGap    @ChapRefSection
  1881. X    //  @Runner
  1882. X        @TopEven { @B @PageNum }
  1883. X        @TopOdd { @I {@RunningTitle @OrElse @Title} |1rt @B @PageNum }
  1884. X    }
  1885. X
  1886. X
  1887. X    ###########################################################################
  1888. X    #                                                                         #
  1889. X    #  Chapters containing sections and subsections.                          #
  1890. X    #                                                                         #
  1891. X    ###########################################################################
  1892. X
  1893. X    export @FootNote @BeginFigures @BeginTables
  1894. X       @BeginSections @EndSections @Section
  1895. X    def @Chapter force into { @ChapterList&&preceding }
  1896. X    named @Tag {}
  1897. X    named @Title {}
  1898. X    named @RunningTitle { dft }
  1899. X    body @Body
  1900. X    {
  1901. X    def @FootNote right x { @ColFootNote x }
  1902. X    macro @BeginFigures { // @FigureGalley {@NumberOf @Tag}. // }
  1903. X    macro @BeginTables  { // @TableGalley  {@NumberOf @Tag}. // }
  1904. X
  1905. X    def @EndSectionsPlace { @Galley }
  1906. X    def @EndSections force into { @EndSectionsPlace&&preceding } {}
  1907. X    macro @BeginSections
  1908. X          { //@SectionGap @SectionList 1 // @EndSectionsPlace // }
  1909. X
  1910. X    export @BeginSubSections @EndSubSections @SubSection
  1911. X    def @Section force into { @SectionList&&preceding }
  1912. X        named @Tag {}
  1913. X        named @Title {}
  1914. X        named @RunningTitle { dft }
  1915. X        body @Body
  1916. X    {
  1917. X
  1918. X        def @EndSubSectsPlace { @Galley }
  1919. X        def @EndSubSections force into { @EndSubSectsPlace&&preceding } {}
  1920. X        macro @BeginSubSections
  1921. X         { //@SubSectionGap @SubSectionList 1// @EndSubSectsPlace//}
  1922. X
  1923. X        def @SubSection force into { @SubSectionList&&preceding }
  1924. X        named @Tag {}
  1925. X        named @Title {}
  1926. X            named @RunningTitle { dft }
  1927. X        body @Body
  1928. X        {
  1929. X        def @SubSectionTitle
  1930. X        {
  1931. X            @SubSectionNumbers @Case {
  1932. X            {Yes yes} @Yield { {@NumberOf @Tag}.  |2s  @Title }
  1933. X            else      @Yield @Title
  1934. X            }
  1935. X        }
  1936. X
  1937. X            @MinorHeading @Protect @SubSectionTitle
  1938. X        //  @NumberMarker {
  1939. X            {@ChapterList&&@Tag    @Open { @Tag }}.{
  1940. X             @SectionList&&@Tag    @Open { @Tag }}.{
  1941. X             @SubSectionList&&@Tag @Open { @Tag }}
  1942. X            }
  1943. X        //  @ChapterList&&preceding     @Tagged @Tag
  1944. X        //  @SectionList&&preceding     @Tagged @Tag
  1945. X        //  @SubSectionList&&preceding  @Tagged @Tag
  1946. X        //  @NumberMarker&&preceding    @Tagged @Tag
  1947. X        //  @PageMarker&&preceding      @Tagged @Tag
  1948. X        //  {&5f @SubSectionTitle} @ContentsEntry {@PageOf @Tag}
  1949. X        //0io @Body
  1950. X        }
  1951. X
  1952. X        def @SectionTitle
  1953. X        {
  1954. X        @SectionNumbers @Case {
  1955. X            {Yes yes} @Yield { {@NumberOf @Tag}.  |2s  @Title }
  1956. X            else      @Yield @Title
  1957. X        }
  1958. X        }
  1959. X
  1960. X            @Heading @Protect @SectionTitle
  1961. X        //  @NumberMarker {
  1962. X            {@ChapterList&&@Tag @Open { @Tag }}.{
  1963. X             @SectionList&&@Tag @Open { @Tag }}
  1964. X        }
  1965. X        //  @ChapterList&&preceding  @Tagged @Tag
  1966. X        //  @SectionList&&preceding  @Tagged @Tag
  1967. X        //  @NumberMarker&&preceding @Tagged @Tag
  1968. X        //  @PageMarker&&preceding   @Tagged @Tag
  1969. X        //  { &3f @SectionTitle } @ContentsEntry {@PageOf @Tag}
  1970. X        //0io @Body
  1971. X
  1972. X    }
  1973. X
  1974. X    def @ChapterTitle
  1975. X    {
  1976. X        @ChapterNumbers @Case {
  1977. X        {Yes yes} @Yield { Chapter {@NumberOf @Tag}.  |2s  @Title }
  1978. X        else      @Yield @Title
  1979. X        }
  1980. X    }
  1981. X
  1982. X    def @ChapterNum
  1983. X    {
  1984. X        @ChapterNumbers @Case {
  1985. X        {Yes yes} @Yield { Chapter {@NumberOf @Tag} }
  1986. X        else      @Yield @Null
  1987. X        }
  1988. X    }
  1989. X
  1990. X        ragged @Break @BookTitleFormat @ChapterTitle
  1991. X    //  @NumberMarker {
  1992. X        @ChapterList&&@Tag @Open { @Tag }
  1993. X        }
  1994. X    //  @ChapterList&&preceding  @Tagged @Tag
  1995. X    //  @NumberMarker&&preceding @Tagged @Tag
  1996. X    //  @PageMarker&&preceding   @Tagged @Tag
  1997. X    //  { @ChapterTitle } @MajorContentsEntry {@PageOf @Tag}
  1998. X    //  @Runner
  1999. X        @FootEven { |0.5rt 0.8f @Font @B @PageNum }
  2000. X        @FootOdd  { |0.5rt 0.8f @Font @B @PageNum }
  2001. X    //  @Body
  2002. X    //@SectionGap @ChapRefSection
  2003. X    //  @Runner
  2004. X        @TopEven { @B @PageNum |1rt @I @ChapterNum }
  2005. X        @TopOdd  { @I {@RunningTitle @OrElse @Title} |1rt @B @PageNum }
  2006. X    }
  2007. X
  2008. X
  2009. X    ###########################################################################
  2010. X    #                                                                         #
  2011. X    #  Sections containing subsections.                                       #
  2012. X    #                                                                         #
  2013. X    ###########################################################################
  2014. X
  2015. X    export @FootNote @BeginFigures @BeginTables
  2016. X       @BeginSubSections @SubSection @EndSubSections
  2017. X    def @Section force into { @SectionList&&preceding }
  2018. X    named @Tag {}
  2019. X    named @Title {}
  2020. X    named @RunningTitle { dft }
  2021. X    body @Body
  2022. X    {
  2023. X    def @FootNote right x { @ColFootNote x }
  2024. X    macro @BeginFigures { // @FigureGalley {@NumberOf @Tag}. // }
  2025. X    macro @BeginTables  { // @TableGalley  {@NumberOf @Tag}. // }
  2026. X
  2027. X    def @EndSubSectsPlace { @Galley }
  2028. X    def @EndSubSections force into { @EndSubSectsPlace&&preceding }  {}
  2029. X    macro @BeginSubSections
  2030. X      { //@SubSectionGap @SubSectionList 1 // @EndSubSectsPlace // }
  2031. X
  2032. X    def @SubSection force into { @SubSectionList&&preceding }
  2033. X        named @Tag {}
  2034. X        named @Title {}
  2035. X        named @RunningTitle { dft }
  2036. X        right @Body
  2037. X    {
  2038. X        def @SubSectionTitle
  2039. X        {
  2040. X        @SubSectionNumbers @Case {
  2041. X            {Yes yes} @Yield { {@NumberOf @Tag}.  |2s  @Title }
  2042. X            else      @Yield @Title
  2043. X        }
  2044. X        }
  2045. X
  2046. X            @MinorHeading @Protect @SubSectionTitle
  2047. X        //    @NumberMarker {
  2048. X            {@SectionList&&@Tag @Open { @Tag }}.{
  2049. X             @SubSectionList&&@Tag @Open { @Tag }}
  2050. X        }
  2051. X        //    @SubSectionList&&preceding @Tagged @Tag
  2052. X        //    @SectionList&&preceding    @Tagged @Tag
  2053. X        //    @NumberMarker&&preceding   @Tagged @Tag
  2054. X        //    @PageMarker&&preceding     @Tagged @Tag
  2055. X        //0io @Body
  2056. X    }
  2057. X
  2058. X    def @SectionTitle
  2059. X    {
  2060. X        @SectionNumbers @Case {
  2061. X        {Yes yes} @Yield { {@NumberOf @Tag}.  |2s  @Title }
  2062. X        else      @Yield @Title
  2063. X        }
  2064. X    }
  2065. X
  2066. X        @Heading @Protect @SectionTitle
  2067. X    //  @NumberMarker {
  2068. X        @SectionList&&@Tag @Open { @Tag }
  2069. X        }
  2070. X    //  @SectionList&&preceding  @Tagged @Tag
  2071. X    //  @NumberMarker&&preceding @Tagged @Tag
  2072. X    //  @PageMarker&&preceding   @Tagged @Tag
  2073. X    //0io @Body
  2074. X    }
  2075. X
  2076. X
  2077. X    ###########################################################################
  2078. X    #                                                                         #
  2079. X    #  Appendices.                                                            #
  2080. X    #                                                                         #
  2081. X    ###########################################################################
  2082. X
  2083. X    export @FootNote @BeginFigures @BeginTables
  2084. X       @BeginSubAppendices @SubAppendix @EndSubAppendices
  2085. X    def @Appendix force into { @AppendixList&&preceding }
  2086. X    named @Tag {}
  2087. X    named @Title {}
  2088. X    named @RunningTitle { dft }
  2089. X    body  @Body
  2090. X    {
  2091. X    def @FootNote right x { @ColFootNote x }
  2092. X    macro @BeginFigures { // @FigureGalley {@NumberOf @Tag}. // }
  2093. X    macro @BeginTables  { // @TableGalley  {@NumberOf @Tag}. // }
  2094. X
  2095. X    def @EndSubAppendicesPlace { @Galley }
  2096. X    def @EndSubAppendices force into {@EndSubAppendicesPlace&&preceding} {}
  2097. X    macro @BeginSubAppendices
  2098. X      { //@SubAppendixGap @SubAppendixList 1 // @EndSubAppendicesPlace // }
  2099. X
  2100. X    def @SubAppendix force into { @SubAppendixList&&preceding }
  2101. X        named @Tag {}
  2102. X        named @Title {}
  2103. X        named @RunningTitle { dft }
  2104. X        right @Body
  2105. X    {
  2106. X        def @SubAppendixTitle
  2107. X        {
  2108. X        @SubAppendixNumbers @Case {
  2109. X            {Yes yes} @Yield { {@NumberOf @Tag}.  |2s  @Title }
  2110. X            else      @Yield @Title
  2111. X        }
  2112. X        }
  2113. X
  2114. X            @Heading @Protect @SubAppendixTitle
  2115. X        //    @NumberMarker {
  2116. X            {@AppendixList&&@Tag @Open { @Tag }}.{
  2117. X             @SubAppendixList&&@Tag @Open { @Tag }}
  2118. X        }
  2119. X        //    @SubAppendixList&&preceding @Tagged @Tag
  2120. X        //    @AppendixList&&preceding    @Tagged @Tag
  2121. X        //    @NumberMarker&&preceding   @Tagged @Tag
  2122. X        //    @PageMarker&&preceding     @Tagged @Tag
  2123. X        //    @SubAppendixTitle @ContentsEntry {@PageOf @Tag}
  2124. X        //0io @Body
  2125. X    }
  2126. X
  2127. X    def @AppendixTitle
  2128. X    {
  2129. X        @AppendixNumbers @Case {
  2130. X        {Yes yes} @Yield { Appendix {@NumberOf @Tag}.  |2s  @Title }
  2131. X        else      @Yield { Appendix.  @Title }
  2132. X        }
  2133. X    }
  2134. X
  2135. X    def @AppendixNum
  2136. X    {
  2137. X        @AppendixNumbers @Case {
  2138. X        {Yes yes} @Yield { @NumberOf @Tag }
  2139. X        else      @Yield @Null
  2140. X        }
  2141. X    }
  2142. X
  2143. X        ragged @Break @BookTitleFormat @AppendixTitle
  2144. X    //  @NumberMarker {
  2145. X        @AppendixList&&@Tag @Open { @UCAlpha&&@Tag }
  2146. X        }
  2147. X    //  @AppendixList&&preceding @Tagged @Tag
  2148. X    //  @NumberMarker&&preceding @Tagged @Tag
  2149. X    //  @PageMarker&&preceding   @Tagged @Tag
  2150. X    //  @AppendixTitle @MajorContentsEntry {@PageOf @Tag}
  2151. X    //  @Runner
  2152. X        @FootEven { |0.5rt 0.8f @Font @B @PageNum }
  2153. X        @FootOdd  { |0.5rt 0.8f @Font @B @PageNum }
  2154. X    //  @Body
  2155. X    //@SectionGap @ChapRefSection
  2156. X    //  @Runner
  2157. X        @TopEven { @B @PageNum |1rt @I { Appendix @AppendixNum } }
  2158. X        @TopOdd  { @I {@RunningTitle @OrElse @Title} |1rt @B @PageNum }
  2159. X    }
  2160. X
  2161. X
  2162. X    ###########################################################################
  2163. X    #                                                                         #
  2164. X    #  Index.                                                                 #
  2165. X    #                                                                         #
  2166. X    ###########################################################################
  2167. X
  2168. X    def @IndexList { @Galley //1vx @IndexList }
  2169. X
  2170. X    def @IndexSection
  2171. X    named @Tag {}
  2172. X    named @Title { Index }
  2173. X    named @RunningTitle { dft }
  2174. X    named headstyle right @Title { @Heading @Title //@DispGap }
  2175. X    {
  2176. X
  2177. X    def @IndexBody into { @IndexPlace&&following }
  2178. X    { // @IndexList
  2179. X      // @Runner
  2180. X        @TopEven { @B @PageNum }
  2181. X        @TopOdd  { @I {@RunningTitle @OrElse @Title} |1rt @B @PageNum }
  2182. X    }
  2183. X
  2184. X        def indexsection
  2185. X        {
  2186. X        headstyle @Title
  2187. X        //    @PageMarker&&preceding @Tagged @Tag
  2188. X        //    @Title @MajorContentsEntry {@PageOf @Tag}
  2189. X        //    @Runner
  2190. X            @FootEven { |0.5rt 0.8f @Font @B @PageNum }
  2191. X            @FootOdd  { |0.5rt 0.8f @Font @B @PageNum }
  2192. X        //    @IndexBody
  2193. X        }
  2194. X
  2195. X    @MakeIndex @Case {
  2196. X        {Yes yes} @Yield indexsection
  2197. X        else      @Yield @Null
  2198. X    }
  2199. X    }
  2200. X
  2201. X    def @SendIndex
  2202. X    left key
  2203. X    right @Body
  2204. X    {
  2205. X        def sendindex into { @IndexList&&following }
  2206. X        left @Key
  2207. X        right @Body
  2208. X    {
  2209. X        outdent @Break @Body
  2210. X    }
  2211. X
  2212. X    @MakeIndex @Case {
  2213. X        {Yes yes} @Yield {key sendindex @Body}
  2214. X        else      @Yield @Null
  2215. X    }
  2216. X    }
  2217. X
  2218. X    def @RawIndex       left x right y { {@PageMark x} x @SendIndex { &0f y } }
  2219. X    def @RawSubIndex    left x right y { {@PageMark x} x @SendIndex { &1f y } }
  2220. X    def @RawSubSubIndex left x right y { {@PageMark x} x @SendIndex { &2f y } }
  2221. X
  2222. X    def @Index       left x right y { x @RawIndex       { y, {@PageOf x} } }
  2223. X    def @SubIndex    left x right y { x @RawSubIndex    { y, {@PageOf x} } }
  2224. X    def @SubSubIndex left x right y { x @RawSubSubIndex { y, {@PageOf x} } }
  2225. X
  2226. X    def @IndexBlanks
  2227. X    {
  2228. X    b @RawIndex {} c @RawIndex {} d @RawIndex {} e @RawIndex {}
  2229. X    f @RawIndex {} g @RawIndex {} h @RawIndex {} i @RawIndex {}
  2230. X    j @RawIndex {} k @RawIndex {} l @RawIndex {} m @RawIndex {}
  2231. X    n @RawIndex {} o @RawIndex {} p @RawIndex {} q @RawIndex {}
  2232. X    r @RawIndex {} s @RawIndex {} t @RawIndex {} u @RawIndex {}
  2233. X    v @RawIndex {} w @RawIndex {} x @RawIndex {} y @RawIndex {}
  2234. X    z @RawIndex {}
  2235. X    }
  2236. X
  2237. X
  2238. X    ###########################################################################
  2239. X    #                                                                         #
  2240. X    #  Document.                                                              #
  2241. X    #                                                                         #
  2242. X    ###########################################################################
  2243. X
  2244. X    def @Document
  2245. X    named @InitialFont { @InitialFont }
  2246. X    named @InitialBreak { @InitialBreak }
  2247. X    named @Hyphenate { @Hyphenate }
  2248. X    named @PageNumbers { @PageNumbers }
  2249. X    named @FirstPageNumber { @FirstPageNumber }
  2250. X    named @Columns { @Columns }
  2251. X    {
  2252. X        { Times Base 12p } @Font @InitialFont @Font
  2253. X    { {@Hyph @Hyphenate} adjust 1.20fx } @Break @InitialBreak @Break
  2254. X    {
  2255. X        //  @FigureGalley {}
  2256. X        //  @TableGalley  {}
  2257. X        //  @SimplePageList
  2258. X            @Columns { @Columns }
  2259. X            @PageNumbers { @PageNumbers }
  2260. X            @FirstPageNumber
  2261. X    }
  2262. X    }
  2263. X
  2264. X    macro @Doc { @Document // }
  2265. X
  2266. X
  2267. X    ###########################################################################
  2268. X    #                                                                         #
  2269. X    #  Report.                                                                #
  2270. X    #                                                                         #
  2271. X    ###########################################################################
  2272. X
  2273. X    def @Report
  2274. X    named @Title {}
  2275. X    named @Author {}
  2276. X    named @Institution {}
  2277. X    named @DateLine { @Date }
  2278. X    named @InitialFont { @InitialFont }
  2279. X    named @InitialBreak { @InitialBreak }
  2280. X    named @Hyphenate { @Hyphenate }
  2281. X    named @PageNumbers { @PageNumbers }
  2282. X    named @Columns { @Columns }
  2283. X    {
  2284. X    def @TitleMaterial
  2285. X    {
  2286. X            |0.5rt @B {{clines 1.4vx} @Break @Title} |
  2287. X        //0.25i |0.5rt @I {clines @Break @Author} |
  2288. X        //0.25i |0.5rt clines @Break @Institution |
  2289. X    }
  2290. X
  2291. X    def @ReportContent force into { @ColPlace&&following }
  2292. X    {
  2293. X                    @SectionList 1
  2294. X        //@AppendixGap  @AppendixList 1
  2295. X        //@SectionGap   @ReferenceSection
  2296. X    }
  2297. X
  2298. X    { Times Base 12p } @Font @InitialFont @Font
  2299. X    { {@Hyph @Hyphenate} adjust 1.20fx } @Break @InitialBreak @Break
  2300. X    {
  2301. X        # cover sheet
  2302. X            //  @PageMarker 0
  2303. X        //  @Page {
  2304. X            //1i      @TitleMaterial
  2305. X            //0.5i      |0.5rt @OneCol { |0.5i @AbstractPlace |0.5i }
  2306. X            //1i      @DateLine
  2307. X            //1rt      @OneRow { //@MidGap @FootSect }
  2308. X        }
  2309. X
  2310. X        //  @FigureGalley {}
  2311. X        //  @TableGalley  {}
  2312. X        //  @ReportContent
  2313. X
  2314. X        # first page
  2315. X            //  @PageMarker 1
  2316. X        //  @Page
  2317. X        {
  2318. X          @PageNumbers @Case
  2319. X          {
  2320. X            {Yes yes} @Yield @PageOneTopFormat num
  2321. X            else      @Yield @Null
  2322. X          }
  2323. X          //
  2324. X          //0.5i    @TitleMaterial
  2325. X          //@MidGap    @ColList @Columns
  2326. X          //1rt @OneRow
  2327. X          {
  2328. X                //@MidGap
  2329. X                @PageNumbers @Case
  2330. X                {
  2331. X                    {Yes yes} @Yield @PageOneFootFormat num
  2332. X                    else      @Yield @Null
  2333. X                }
  2334. X          }
  2335. X        }
  2336. X
  2337. X        # subsequent pages
  2338. X        //    @SimplePageList
  2339. X          @Columns { @Columns }
  2340. X          @PageNumbers { @PageNumbers }
  2341. X          2
  2342. X    }
  2343. X    }
  2344. X
  2345. X
  2346. X    ###########################################################################
  2347. X    #                                                                         #
  2348. X    #  Book.                                                                  #
  2349. X    #                                                                         #
  2350. X    ###########################################################################
  2351. X
  2352. X    def @Book
  2353. X    named @Title {}
  2354. X    named @Author {}
  2355. X    named @Edition {}
  2356. X    named @Publisher {}
  2357. X    named @InitialFont { @InitialFont }
  2358. X    named @InitialBreak { @InitialBreak }
  2359. X    named @Hyphenate { @Hyphenate }
  2360. X    {
  2361. X    def @BookIntro force into { @IntroColPlace&&preceding }
  2362. X    {
  2363. X      @BookCoverFont @Font
  2364. X      { //1i    |0.5rt 2.5f @Font {1.2fx clines} @Break @Title |
  2365. X        //2i    |0.5rt clines @Break @Author |
  2366. X        //1i    |0.5rt clines @Break @Edition |
  2367. X        //1rt   @OneRow @Publisher
  2368. X      }
  2369. X        //        @Runner
  2370. X        //1.1b  @PrefacePlace
  2371. X        //1.1b  @ContentsSection
  2372. X    }
  2373. X
  2374. X    def @BookBody force into { @ColPlace&&preceding }
  2375. X    {
  2376. X            @IntroductionPlace
  2377. X        //@ChapterGap   @ChapterList 1
  2378. X        //@AppendixGap  @AppendixList 1
  2379. X        //1.1b  @ReferenceSection
  2380. X            headstyle { ragged @Break @BookTitleFormat @Title }
  2381. X        //1.1b  @IndexSection
  2382. X            headstyle { ragged @Break @BookTitleFormat @Title }
  2383. X    }
  2384. X
  2385. X    { Times Base 12p } @Font @InitialFont @Font
  2386. X    { {@Hyph @Hyphenate} adjust 1.20fx } @Break @InitialBreak @Break
  2387. X    {
  2388. X            @IntroOddPageList @Columns { Single } 1
  2389. X        //        @Runner
  2390. X                @FootEven { @PageNum }
  2391. X                @FootOdd  { |1rt @PageNum }
  2392. X        //        @OddPageList @Columns { Single } 1
  2393. X        //        @BookIntro
  2394. X        //        @BookBody
  2395. X        //        @Runner
  2396. X    }
  2397. X    }
  2398. X
  2399. X@End @DocumentLayout
  2400. END_OF_FILE
  2401.   if test 67583 -ne `wc -c <'lout/include/dl'`; then
  2402.     echo shar: \"'lout/include/dl'\" unpacked with wrong size!
  2403.   fi
  2404.   # end of 'lout/include/dl'
  2405. fi
  2406. if test ! -d 'lout/man' ; then
  2407.     echo shar: Creating directory \"'lout/man'\"
  2408.     mkdir 'lout/man'
  2409. fi
  2410. echo shar: End of archive 1 \(of 30\).
  2411. cp /dev/null ark1isdone
  2412. MISSING=""
  2413. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 ; do
  2414.     if test ! -f ark${I}isdone ; then
  2415.     MISSING="${MISSING} ${I}"
  2416.     fi
  2417. done
  2418. if test "${MISSING}" = "" ; then
  2419.     echo You have unpacked all 30 archives.
  2420.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  2421. else
  2422.     echo You still must unpack the following archives:
  2423.     echo "        " ${MISSING}
  2424. fi
  2425. exit 0
  2426. exit 0 # Just in case...
  2427.