home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / misc / volume37 / lout / part26 < prev    next >
Encoding:
Text File  |  1993-06-19  |  82.9 KB  |  2,459 lines

  1. Newsgroups: comp.sources.misc
  2. From: jeff@joyce.cs.su.oz.au (Jeff Kingston)
  3. Subject: v37i124:  lout - Lout document formatting system, v2, Part26/30
  4. Message-ID: <1993Jun2.030540.29011@sparky.imd.sterling.com>
  5. X-Md4-Signature: 7edaa7b846957eb948cbb83fa8c3edc3
  6. Sender: kent@sparky.imd.sterling.com (Kent Landfield)
  7. Organization: Sterling Software
  8. Date: Wed, 2 Jun 1993 03:05:40 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 124
  13. Archive-name: lout/part26
  14. Environment: UNIX
  15.  
  16. #! /bin/sh
  17. # This is a shell archive.  Remove anything before this line, then feed it
  18. # into a shell via "sh file" or similar.  To overwrite existing files,
  19. # type "sh file -c".
  20. # Contents:  lout/data/loutrefs.ld lout/data/standard.ld
  21. #   lout/doc/tr.begin/s02 lout/doc/tr.begin/s03 lout/doc/tr.eq/s6
  22. #   lout/doc/tr.fig/s3 lout/doc/tr.impl/oldrefs.ld
  23. #   lout/doc/tr.impl/s3.3 lout/doc/tr.impl/s5.1
  24. #   lout/doc/tr.lout/ch2.01 lout/doc/tr.lout/ch2.05
  25. #   lout/doc/tr.lout/ch3.07 lout/z32.c lout/z34.c
  26. # Wrapped by kent@sparky on Sun May 30 19:44:01 1993
  27. PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin ; export PATH
  28. echo If this archive is complete, you will see the following message:
  29. echo '          "shar: End of archive 26 (of 30)."'
  30. if test -f 'lout/data/loutrefs.ld' -a "${1}" != "-c" ; then 
  31.   echo shar: Will not clobber existing file \"'lout/data/loutrefs.ld'\"
  32. else
  33.   echo shar: Extracting \"'lout/data/loutrefs.ld'\" \(5677 characters\)
  34.   sed "s/^X//" >'lout/data/loutrefs.ld' <<'END_OF_FILE'
  35. X{ @Reference
  36. X     @Tag { knuth84 }
  37. X     @Type { Book }
  38. X     @Author { Knuth, Donald E. }
  39. X     @Title { The T{ /0.2fo E}XBook }
  40. X     @Publisher { Addison-Wesley }
  41. X     @Year { 1984 }
  42. X}
  43. X
  44. X{ @Reference
  45. X     @Tag { adobe90 }
  46. X     @Type { Book }
  47. X     @Author { Adobe Systems, Inc. }
  48. X     @Title { PostScript Language Reference Manual, Second Edition }
  49. X     @Publisher { Addison-Wesley }
  50. X     @Year { 1990 }
  51. X}
  52. X
  53. X{ @Reference
  54. X     @Tag { reid80 }
  55. X     @Type { ConferencePaper }
  56. X     @Author { Reid, Brian K. }
  57. X     @Title { A High-Level Approach to Computer Document Production }
  58. X     @Proceedings { Proceedings of the 7th Symposium on the Principles
  59. Xof Programming Languages (POPL), Las Vegas NV }
  60. X     @Pages { 24--31 }
  61. X     @Year { 1980 }
  62. X}
  63. X
  64. X{ @Reference
  65. X     @Tag { strunk79 }
  66. X     @Type { Book }
  67. X     @Author { Strunk, William and White, E. B. }
  68. X     @Title { The Elements of Style }
  69. X     @Publisher { Macmillan, third edition }
  70. X     @Year { 1979 }
  71. X}
  72. X
  73. X{ @Reference
  74. X     @Tag { ossanna76 }
  75. X     @Type { TechReport }
  76. X     @Author { Joseph F. Ossanna }
  77. X     @Title { "Nroff/Troff" User's Manual }
  78. X     @Number { 54 }
  79. X     @Institution { Bell Laboratories, Murray Hill, NJ 07974 }
  80. X     @Year { 1976 }
  81. X}
  82. X
  83. X{ @Reference
  84. X     @Tag { kernighan75 }
  85. X     @Type { JournalArticle }
  86. X     @Author { Kernighan, Brian W. and Cherry, Lorinda L. }
  87. X     @Title { A system for typesetting mathematics }
  88. X     @Journal { Communications of the ACM }
  89. X     @Volume { 18 }
  90. X     @Pages { 182--193 }
  91. X     @Year { 1975 }
  92. X}
  93. X
  94. X{ @Reference
  95. X     @Tag { lesk76 }
  96. X     @Type { TechReport }
  97. X     @Author { Lesk, M. E. }
  98. X     @Title { Tbl -- a program to format tables }
  99. X     @Number { 49 }
  100. X     @Institution { Bell Laboratories, Murray Hill, NJ 07974 }
  101. X     @Year { 1976 }
  102. X}
  103. X
  104. X{ @Reference
  105. X     @Tag { kernighan82 }
  106. X     @Type { JournalArticle }
  107. X     @Author { Kernighan, Brian W. }
  108. X     @Title { PIC -- A language for typesetting graphics}
  109. X     @Journal { Software Practice and Experience }
  110. X     @Volume { 12 }
  111. X     @Pages { 1--21 }
  112. X     @Year { 1982 }
  113. X}
  114. X
  115. X{ @Reference
  116. X     @Tag { kingston93basser }
  117. X     @Type { Software }
  118. X     @Author { Kingston, Jeffrey H. }
  119. X     @Title { The Basser Lout Document Formatter, Version 2.03 }
  120. X     @Year { 1993 }
  121. X     @Comment { Computer program, publicly available in the
  122. X@I jeff subdirectory of the home directory of @I ftp to host
  123. X@I ftp.cs.su.oz.au with login name @I anonymous or @I ftp and any
  124. Xnon-empty password (e.g. {@I none}).  Distribution via email is
  125. Xavailable for non-{@I ftp} sites.  All enquiries to "jeff@cs.su.oz.au". }
  126. X}
  127. X
  128. X{ @Reference
  129. X     @Tag { kingston92 }
  130. X     @Type { TechReport }
  131. X     @Author { Kingston, Jeffrey H. }
  132. X     @Title { Document Formatting with Lout (Second Edition) }
  133. X     @Number { 449 }
  134. X     @Institution { Basser Department of Computer
  135. XScience F09, University of Sydney 2006, Australia }
  136. X     @Year { 1992 }
  137. X}
  138. X
  139. X{ @Reference
  140. X     @Tag { kingston92begin }
  141. X     @Type { TechReport }
  142. X     @Author { Kingston, Jeffrey H. }
  143. X     @Title { A beginners' guide to Lout }
  144. X     @Number { 450 }
  145. X     @Institution { Basser Department of Computer
  146. XScience F09, University of Sydney 2006, Australia }
  147. X     @Year { 1992 }
  148. X}
  149. X
  150. X{ @Reference
  151. X     @Tag { kingston92eq }
  152. X     @Type { TechReport }
  153. X     @Author { Kingston, Jeffrey H. }
  154. X     @Title { Eq -- a Lout package for typesetting mathematics }
  155. X     @Number { 452 }
  156. X     @Institution { Basser Department of Computer
  157. XScience F09, University of Sydney 2006, Australia }
  158. X     @Year { 1992 }
  159. X     @Comment { Contains an appendix describing the Pas Pascal
  160. Xformatter. }
  161. X}
  162. X
  163. X{ @Reference
  164. X     @Tag { kingston92fig }
  165. X     @Type { TechReport }
  166. X     @Author { Kingston, Jeffrey H. }
  167. X     @Title { Fig -- a Lout package for drawing figures }
  168. X     @Number { 453 }
  169. X     @Institution { Basser Department of Computer
  170. XScience F09, University of Sydney 2006, Australia }
  171. X     @Year { 1992 }
  172. X}
  173. X
  174. X{ @Reference
  175. X     @Tag { kingston91over }
  176. X     @Type { TechReport }
  177. X     @Author { Kingston, Jeffrey H. }
  178. X     @Title { A new approach to document formatting }
  179. X     @Number { 412 }
  180. X     @Institution { Basser Department of Computer
  181. XScience F09, University of Sydney 2006, Australia }
  182. X     @Year { 1991 }
  183. X}
  184. X
  185. X{ @Reference
  186. X     @Tag { kingston92tab }
  187. X     @Type { TechReport }
  188. X     @Author { Kingston, Jeffrey H. }
  189. X     @Title { Tab -- a Lout package for formatting tables }
  190. X     @Number { 451 }
  191. X     @Institution { Basser Department of Computer
  192. XScience F09, University of Sydney 2006, Australia }
  193. X     @Year { 1992 }
  194. X}
  195. X
  196. X{ @Reference
  197. X     @Tag { kingston92design }
  198. X     @Type { TechReport }
  199. X     @Author { Kingston, Jeffrey H. }
  200. X     @Title { The design and implementation of the Lout document formatting language }
  201. X     @Number { 442 }
  202. X     @Institution { Basser Department of Computer
  203. XScience F09, University of Sydney 2006, Australia }
  204. X     @Year { 1992 }
  205. X     @Comment { To appear in @I { Software---Practice and Experience. } }
  206. X}
  207. X
  208. X{ @Reference
  209. X     @Tag { wirth71 }
  210. X     @Type { JournalArticle }
  211. X     @Author { Wirth, N. }
  212. X     @Title { The programming language Pascal }
  213. X     @Journal { Acta Informatica }
  214. X     @Volume { 1 }
  215. X     @Year { 1975 }
  216. X     @Pages { 35--63 }
  217. X}
  218. X
  219. X{ @Reference
  220. X     @Tag { brooks91 }
  221. X     @Type { JournalArticle }
  222. X     @Author { Brooks, Kenneth P. }
  223. X     @Title { Lilac: a two-view document editor }
  224. X     @Journal { IEEE Computer }
  225. X     @Volume { @Null }
  226. X     @Pages { 7--19 }
  227. X     @Year { 1991 }
  228. X}
  229. X
  230. X{ @Reference
  231. X     @Tag { furuta82 }
  232. X     @Type { JournalArticle }
  233. X     @Author { Furuta, Richard, Scofield, Jeffrey,
  234. Xand Shaw, Alan }
  235. X     @Title { Document formatting systems:  survey,
  236. Xconcepts, and issues }
  237. X     @Journal { Computing Surveys }
  238. X     @Volume { 14 }
  239. X     @Pages { 417--472 }
  240. X     @Year { 1982 }
  241. X}
  242. END_OF_FILE
  243.   if test 5677 -ne `wc -c <'lout/data/loutrefs.ld'`; then
  244.     echo shar: \"'lout/data/loutrefs.ld'\" unpacked with wrong size!
  245.   fi
  246.   # end of 'lout/data/loutrefs.ld'
  247. fi
  248. if test -f 'lout/data/standard.ld' -a "${1}" != "-c" ; then 
  249.   echo shar: Will not clobber existing file \"'lout/data/standard.ld'\"
  250. else
  251.   echo shar: Extracting \"'lout/data/standard.ld'\" \(7113 characters\)
  252.   sed "s/^X//" >'lout/data/standard.ld' <<'END_OF_FILE'
  253. X
  254. X######################################################
  255. X#                                                    #
  256. X#  standard.ld                  Jeffrey H. Kingston  #
  257. X#                                     February 1991  #
  258. X#                                                    #
  259. X#  Database of commonly used symbols:                #
  260. X#                                                    #
  261. X#    @Roman         lower case Roman numerals        #
  262. X#    @UCRoman       upper case Roman numerals        #
  263. X#    @Alpha         lower case Roman alphabet        #
  264. X#    @UCAlpha       upper case Roman alphabet        #
  265. X#    @Months        months of the year               #
  266. X#    @ShortMonths   months of the year, abbreviated  #
  267. X#    @WeekDays      days of the week                 #
  268. X#    @ShortWeekDays days of the week, abbreviated    #
  269. X#                                                    #
  270. X######################################################
  271. X
  272. X{   1 @Roman i        }
  273. X{   2 @Roman ii        }
  274. X{   3 @Roman iii    }
  275. X{   4 @Roman iv        }
  276. X{   5 @Roman v        }
  277. X{   6 @Roman vi        }
  278. X{   7 @Roman vii    }
  279. X{   8 @Roman viii    }
  280. X{   9 @Roman ix        }
  281. X{  10 @Roman x        }
  282. X{  11 @Roman xi        }
  283. X{  12 @Roman xii    }
  284. X{  13 @Roman xiii    }
  285. X{  14 @Roman xiv    }
  286. X{  15 @Roman xv        }
  287. X{  16 @Roman xvi    }
  288. X{  17 @Roman xvii    }
  289. X{  18 @Roman xviii    }
  290. X{  19 @Roman xix    }
  291. X{  20 @Roman xx        }
  292. X{  21 @Roman xxi    }
  293. X{  22 @Roman xxii    }
  294. X{  23 @Roman xxiii    }
  295. X{  24 @Roman xxiv    }
  296. X{  25 @Roman xxv    }
  297. X{  26 @Roman xxvi    }
  298. X{  27 @Roman xxvii    }
  299. X{  28 @Roman xxviii    }
  300. X{  29 @Roman xxix    }
  301. X{  30 @Roman xxx    }
  302. X{  31 @Roman xxxi    }
  303. X{  32 @Roman xxxii    }
  304. X{  33 @Roman xxxiii    }
  305. X{  34 @Roman xxxiv    }
  306. X{  35 @Roman xxxv    }
  307. X{  36 @Roman xxxvi    }
  308. X{  37 @Roman xxxvii    }
  309. X{  38 @Roman xxxviii    }
  310. X{  39 @Roman xxxix    }
  311. X{  40 @Roman xl        }
  312. X{  41 @Roman xli    }
  313. X{  42 @Roman xlii    }
  314. X{  43 @Roman xliii    }
  315. X{  44 @Roman xliv    }
  316. X{  45 @Roman xlv    }
  317. X{  46 @Roman xlvi    }
  318. X{  47 @Roman xlvii    }
  319. X{  48 @Roman xlviii    }
  320. X{  49 @Roman xlix    }
  321. X{  50 @Roman l        }
  322. X{  51 @Roman li        }
  323. X{  52 @Roman lii    }
  324. X{  53 @Roman liii    }
  325. X{  54 @Roman liv    }
  326. X{  55 @Roman lv        }
  327. X{  56 @Roman lvi    }
  328. X{  57 @Roman lvii    }
  329. X{  58 @Roman lviii    }
  330. X{  59 @Roman lix    }
  331. X{  60 @Roman lx        }
  332. X{  61 @Roman lxi    }
  333. X{  62 @Roman lxii    }
  334. X{  63 @Roman lxiii    }
  335. X{  64 @Roman lxiv    }
  336. X{  65 @Roman lxv    }
  337. X{  66 @Roman lxvi    }
  338. X{  67 @Roman lxvii    }
  339. X{  68 @Roman lxviii    }
  340. X{  69 @Roman lxix    }
  341. X{  70 @Roman lxx    }
  342. X{  71 @Roman lxxi    }
  343. X{  72 @Roman lxxii    }
  344. X{  73 @Roman lxxiii    }
  345. X{  74 @Roman lxxiv    }
  346. X{  75 @Roman lxxv    }
  347. X{  76 @Roman lxxvi    }
  348. X{  77 @Roman lxxvii    }
  349. X{  78 @Roman lxxviii    }
  350. X{  79 @Roman lxxix    }
  351. X{  80 @Roman lxxx    }
  352. X{  81 @Roman lxxxi    }
  353. X{  82 @Roman lxxxii    }
  354. X{  83 @Roman lxxxiii    }
  355. X{  84 @Roman lxxxiv    }
  356. X{  85 @Roman lxxxv    }
  357. X{  86 @Roman lxxxvi    }
  358. X{  87 @Roman lxxxvii    }
  359. X{  88 @Roman lxxxviii    }
  360. X{  89 @Roman lxxxix    }
  361. X{  90 @Roman xc        }
  362. X{  91 @Roman xci    }
  363. X{  92 @Roman xcii    }
  364. X{  93 @Roman xciii    }
  365. X{  94 @Roman xciv    }
  366. X{  95 @Roman xcv    }
  367. X{  96 @Roman xcvi    }
  368. X{  97 @Roman xcvii    }
  369. X{  98 @Roman xcviii    }
  370. X{  99 @Roman xcix    }
  371. X{ 100 @Roman c        }
  372. X
  373. X{   1 @UCRoman I    }
  374. X{   2 @UCRoman II    }
  375. X{   3 @UCRoman III    }
  376. X{   4 @UCRoman IV    }
  377. X{   5 @UCRoman V    }
  378. X{   6 @UCRoman VI    }
  379. X{   7 @UCRoman VII    }
  380. X{   8 @UCRoman VIII    }
  381. X{   9 @UCRoman IX    }
  382. X{  10 @UCRoman X    }
  383. X{  11 @UCRoman XI    }
  384. X{  12 @UCRoman XII    }
  385. X{  13 @UCRoman XIII    }
  386. X{  14 @UCRoman XIV    }
  387. X{  15 @UCRoman XV    }
  388. X{  16 @UCRoman XVI    }
  389. X{  17 @UCRoman XVII    }
  390. X{  18 @UCRoman XVIII    }
  391. X{  19 @UCRoman XIX    }
  392. X{  20 @UCRoman XX    }
  393. X{  21 @UCRoman XXI    }
  394. X{  22 @UCRoman XXII    }
  395. X{  23 @UCRoman XXIII    }
  396. X{  24 @UCRoman XXIV    }
  397. X{  25 @UCRoman XXV    }
  398. X{  26 @UCRoman XXVI    }
  399. X{  27 @UCRoman XXVII    }
  400. X{  28 @UCRoman XXVIII    }
  401. X{  29 @UCRoman XXIX    }
  402. X{  30 @UCRoman XXX    }
  403. X{  31 @UCRoman XXXI    }
  404. X{  32 @UCRoman XXXII    }
  405. X{  33 @UCRoman XXXIII    }
  406. X{  34 @UCRoman XXXIV    }
  407. X{  35 @UCRoman XXXV    }
  408. X{  36 @UCRoman XXXVI    }
  409. X{  37 @UCRoman XXXVII    }
  410. X{  38 @UCRoman XXXVIII    }
  411. X{  39 @UCRoman XXXIX    }
  412. X{  40 @UCRoman XL    }
  413. X{  41 @UCRoman XLI    }
  414. X{  42 @UCRoman XLII    }
  415. X{  43 @UCRoman XLIII    }
  416. X{  44 @UCRoman XLIV    }
  417. X{  45 @UCRoman XLV    }
  418. X{  46 @UCRoman XLVI    }
  419. X{  47 @UCRoman XLVII    }
  420. X{  48 @UCRoman XLVIII    }
  421. X{  49 @UCRoman XLIX    }
  422. X{  50 @UCRoman L    }
  423. X{  51 @UCRoman LI    }
  424. X{  52 @UCRoman LII    }
  425. X{  53 @UCRoman LIII    }
  426. X{  54 @UCRoman LIV    }
  427. X{  55 @UCRoman LV    }
  428. X{  56 @UCRoman LVI    }
  429. X{  57 @UCRoman LVII    }
  430. X{  58 @UCRoman LVIII    }
  431. X{  59 @UCRoman LIX    }
  432. X{  60 @UCRoman LX    }
  433. X{  61 @UCRoman LXI    }
  434. X{  62 @UCRoman LXII    }
  435. X{  63 @UCRoman LXIII    }
  436. X{  64 @UCRoman LXIV    }
  437. X{  65 @UCRoman LXV    }
  438. X{  66 @UCRoman LXVI    }
  439. X{  67 @UCRoman LXVII    }
  440. X{  68 @UCRoman LXVIII    }
  441. X{  69 @UCRoman LXIX    }
  442. X{  70 @UCRoman LXX    }
  443. X{  71 @UCRoman LXXI    }
  444. X{  72 @UCRoman LXXII    }
  445. X{  73 @UCRoman LXXIII    }
  446. X{  74 @UCRoman LXXIV    }
  447. X{  75 @UCRoman LXXV    }
  448. X{  76 @UCRoman LXXVI    }
  449. X{  77 @UCRoman LXXVII    }
  450. X{  78 @UCRoman LXXVIII    }
  451. X{  79 @UCRoman LXXIX    }
  452. X{  80 @UCRoman LXXX    }
  453. X{  81 @UCRoman LXXXI    }
  454. X{  82 @UCRoman LXXXII    }
  455. X{  83 @UCRoman LXXXIII    }
  456. X{  84 @UCRoman LXXXIV    }
  457. X{  85 @UCRoman LXXXV    }
  458. X{  86 @UCRoman LXXXVI    }
  459. X{  87 @UCRoman LXXXVII    }
  460. X{  88 @UCRoman LXXXVIII    }
  461. X{  89 @UCRoman LXXXIX    }
  462. X{  90 @UCRoman XC    }
  463. X{  91 @UCRoman XCI    }
  464. X{  92 @UCRoman XCII    }
  465. X{  93 @UCRoman XCIII    }
  466. X{  94 @UCRoman XCIV    }
  467. X{  95 @UCRoman XCV    }
  468. X{  96 @UCRoman XCVI    }
  469. X{  97 @UCRoman XCVII    }
  470. X{  98 @UCRoman XCVIII    }
  471. X{  99 @UCRoman XCIX    }
  472. X{ 100 @UCRoman C    }
  473. X
  474. X{   1 @Alpha a        }
  475. X{   2 @Alpha b        }
  476. X{   3 @Alpha c        }
  477. X{   4 @Alpha d        }
  478. X{   5 @Alpha e        }
  479. X{   6 @Alpha f        }
  480. X{   7 @Alpha g        }
  481. X{   8 @Alpha h        }
  482. X{   9 @Alpha i        }
  483. X{  10 @Alpha j        }
  484. X{  11 @Alpha k        }
  485. X{  12 @Alpha l        }
  486. X{  13 @Alpha m        }
  487. X{  14 @Alpha n        }
  488. X{  15 @Alpha o        }
  489. X{  16 @Alpha p        }
  490. X{  17 @Alpha q        }
  491. X{  18 @Alpha r        }
  492. X{  19 @Alpha s        }
  493. X{  20 @Alpha t        }
  494. X{  21 @Alpha u        }
  495. X{  22 @Alpha v        }
  496. X{  23 @Alpha w        }
  497. X{  24 @Alpha x        }
  498. X{  25 @Alpha y        }
  499. X{  26 @Alpha z        }
  500. X
  501. X{   1 @UCAlpha A    }
  502. X{   2 @UCAlpha B    }
  503. X{   3 @UCAlpha C    }
  504. X{   4 @UCAlpha D    }
  505. X{   5 @UCAlpha E    }
  506. X{   6 @UCAlpha F    }
  507. X{   7 @UCAlpha G    }
  508. X{   8 @UCAlpha H    }
  509. X{   9 @UCAlpha I    }
  510. X{  10 @UCAlpha J    }
  511. X{  11 @UCAlpha K    }
  512. X{  12 @UCAlpha L    }
  513. X{  13 @UCAlpha M    }
  514. X{  14 @UCAlpha N    }
  515. X{  15 @UCAlpha O    }
  516. X{  16 @UCAlpha P    }
  517. X{  17 @UCAlpha Q    }
  518. X{  18 @UCAlpha R    }
  519. X{  19 @UCAlpha S    }
  520. X{  20 @UCAlpha T    }
  521. X{  21 @UCAlpha U    }
  522. X{  22 @UCAlpha V    }
  523. X{  23 @UCAlpha W    }
  524. X{  24 @UCAlpha X    }
  525. X{  25 @UCAlpha Y    }
  526. X{  26 @UCAlpha Z    }
  527. X
  528. X{   1 @Months January   }
  529. X{   2 @Months February  }
  530. X{   3 @Months March     }
  531. X{   4 @Months April     }
  532. X{   5 @Months May       }
  533. X{   6 @Months June      }
  534. X{   7 @Months July      }
  535. X{   8 @Months August    }
  536. X{   9 @Months September }
  537. X{  10 @Months October   }
  538. X{  11 @Months November  }
  539. X{  12 @Months December  }
  540. X
  541. X{   1 @ShortMonths Jan    }
  542. X{   2 @ShortMonths Feb    }
  543. X{   3 @ShortMonths Mar    }
  544. X{   4 @ShortMonths Apr    }
  545. X{   5 @ShortMonths May    }
  546. X{   6 @ShortMonths Jun    }
  547. X{   7 @ShortMonths Jul    }
  548. X{   8 @ShortMonths Aug    }
  549. X{   9 @ShortMonths Sep    }
  550. X{  10 @ShortMonths Oct    }
  551. X{  11 @ShortMonths Nov    }
  552. X{  12 @ShortMonths Dec    }
  553. X
  554. X{   1 @WeekDays Sunday        }
  555. X{   2 @WeekDays Monday        }
  556. X{   3 @WeekDays Tuesday        }
  557. X{   4 @WeekDays Wednesday    }
  558. X{   5 @WeekDays Thursday    }
  559. X{   6 @WeekDays Friday        }
  560. X{   7 @WeekDays Saturday    }
  561. X
  562. X{   1 @ShortWeekDays Sun    }
  563. X{   2 @ShortWeekDays Mon    }
  564. X{   3 @ShortWeekDays Tue    }
  565. X{   4 @ShortWeekDays Wed    }
  566. X{   5 @ShortWeekDays Thu    }
  567. X{   6 @ShortWeekDays Fri    }
  568. X{   7 @ShortWeekDays Sat    }
  569. END_OF_FILE
  570.   if test 7113 -ne `wc -c <'lout/data/standard.ld'`; then
  571.     echo shar: \"'lout/data/standard.ld'\" unpacked with wrong size!
  572.   fi
  573.   # end of 'lout/data/standard.ld'
  574. fi
  575. if test -f 'lout/doc/tr.begin/s02' -a "${1}" != "-c" ; then 
  576.   echo shar: Will not clobber existing file \"'lout/doc/tr.begin/s02'\"
  577. else
  578.   echo shar: Extracting \"'lout/doc/tr.begin/s02'\" \(5199 characters\)
  579.   sed "s/^X//" >'lout/doc/tr.begin/s02' <<'END_OF_FILE'
  580. X@Section
  581. X   @Tag { displays }
  582. X   @Title { Displays }
  583. X@Begin
  584. X@PP
  585. XThe @Code "@Display" symbol displays the following thing in the centre
  586. Xof the page or column:
  587. X@ID @Code "@Display @I Centred"
  588. Xhas result
  589. X@Display @I Centred
  590. XNotice that @Code "@I Centred" does not have to be grouped within braces;
  591. Xit is already a single thing.  Spaces (@Code "@DP" symbols) are inserted
  592. Xautomatically above and below the display, so no paragraph symbols are
  593. Xneeded anywhere near the display.
  594. X@PP
  595. XThe display can be made to appear at the left margin by using the
  596. X{@Code "@LeftDisplay"} symbol instead of {@Code "@Display"}, or indented
  597. Xby using {@Code "@IndentedDisplay"}.  There are also @Code "@CentredDisplay"
  598. Xand @Code "@CenteredDisplay" symbols which are the same as
  599. X{@Code "@Display"}.  In general, the word @Code Centred may be spelt
  600. X@Code Centered wherever it appears.
  601. X@PP
  602. XEach display symbol has a `raw' version, which means that no space is
  603. Xinserted above or below; the user must therefore add paragraph symbols:
  604. X@ID @Code {
  605. X"... preceding text."
  606. X"@DP"
  607. X"@RawIndentedDisplay @I Emma"
  608. X"@DP"
  609. X"@RawIndentedDisplay @I"
  610. X"{ Mansfield Park }"
  611. X"@DP"
  612. X"following text ..."
  613. X}
  614. Xhas result
  615. X@ID {
  616. X... preceding text.
  617. X@DP
  618. X@RawIndentedDisplay @I Emma
  619. X@DP
  620. X@RawIndentedDisplay @I { Mansfield Park }
  621. X@DP
  622. Xfollowing text ...
  623. X}
  624. XThe point of this particular example is that two consecutive non-raw
  625. Xdisplays would be separated by two @Code "@DP" symbols, which is too
  626. Xmuch.  A better way to do this, using a list, will be presented in the
  627. Xnext section.
  628. X@PP
  629. XDisplays may be {@I aligned}, which means that nominated points within a
  630. Xsequence of displays are made to appear directly beneath each
  631. Xother.  Displays may also be {@I numbered}, which means that an
  632. Xautomatically generated number is placed at the right-hand margin.  For
  633. Xexample, here is a first display:
  634. X@BeginNumberedDisplays
  635. X@BeginAlignedDisplays
  636. X@CentredAlignedNumberedDisplay
  637. X  @Tag { fibeq }
  638. X@Eq { F sub n ^= F sub n-1 + F sub n-2 }
  639. Xand here is a second display, which is aligned on its @Eq {equal} sign
  640. Xwith the first, and also numbered in sequence with it:
  641. X@CentredAlignedNumberedDisplay
  642. X@Eq { F sub n - F sub n-1 ^= F sub n-2 }
  643. X@EndNumberedDisplays
  644. X@EndAlignedDisplays
  645. XMathematical examples have been chosen because they are the most common
  646. Xaligned and numbered displays; but any kind of display may be aligned or
  647. Xnumbered.
  648. X@PP
  649. XNotice that the two displays are centred as a block as well as
  650. Xaligned.  Altogether then we have four ways in which displays vary:
  651. X@BL
  652. X@LI { A display can be raw or not raw; }
  653. X@LI { It can be a {@Code "@Display"}, {@Code "@LeftDisplay"},
  654. X{@Code "@IndentedDisplay"}, {@Code "@CentredDisplay"} or
  655. X{@Code "@CenteredDisplay"}; }
  656. X@LI { It can be aligned or not aligned; }
  657. X@LI { It can be numbered or not numbered. }
  658. X@EL
  659. XAll possible combinations are allowed.  The display that has everything
  660. Xis called
  661. X@ID @Code { "@RawCentredAlignedNumberedDisplay" &0io }
  662. XBy leaving out some or all of {@Code Raw}, {@Code Aligned}, and
  663. X{@Code Numbered}, and by changing or leaving out {@Code Centred},
  664. Xwe get all these combinations.
  665. X@PP
  666. XWhen aligned displays are used, it is necessary to indicate where the
  667. Xaligned group begins and ends, by inserting @Code "@BeginAlignedDisplays"
  668. Xjust before the first, and @Code "@EndAlignedDisplays" just after the
  669. Xlast.  The alignment points are indicated by preceding them by the
  670. Xsymbol {@Code "^"}.  Numbered displays are similarly bracketed by
  671. X@Code "@BeginNumberedDisplays" and {@Code "@EndNumberedDisplays"}.  So
  672. Xthen, with the help of the @Code "@Eq" equation formatting package
  673. X[{@Ref kingston92eq}], here is the input for the two displays given
  674. Xearlier:
  675. X@ID @Code {
  676. X"... a first display:"
  677. X"@BeginNumberedDisplays"
  678. X"@BeginAlignedDisplays"
  679. X"@CentredAlignedNumberedDisplay"
  680. X"  @Tag { fibeq }"
  681. X@OneCol { "@Eq { F sub n ^= F sub n-1 + F sub n-2 }" &0io }
  682. X"and ... in sequence with it:"
  683. X"@CentredAlignedNumberedDisplay"
  684. X@OneCol { "@Eq { F sub n - F sub n-1 ^= F sub n-2 }" &0io }
  685. X"@EndNumberedDisplays"
  686. X"@EndAlignedDisplays"
  687. X"Mathematical examples ..."
  688. X}
  689. XNo braces need enclose @Code "@Eq { ... }" because it is already a
  690. Xsingle entity.  The @Code "@Tag { fibeq }" part is optional and is
  691. Xexplained in Section {@NumberOf cross}.  Alignment and numbering work
  692. Xquite independently; they don't have to start or end together, and there
  693. Xcan be non-aligned and non-numbered displays among the others.
  694. X@PP
  695. X@Code "@BeginNumberedDisplays" has two {@I options}:  subsidiary
  696. Xsymbols which modify the result.  For example,
  697. X@ID @Code {
  698. X"@BeginNumberedDisplays"
  699. X"   style { [tag] }"
  700. X"   start { 12.5 }"
  701. X}
  702. Xwill cause the associated numbered displays to be labelled [12.5],
  703. X[12.6], and so on.  The first label is the @Code style option with
  704. X@Code tag replaced by the @Code start option.  Font changes and other
  705. Xsymbols are acceptable within the @Code style option.  When omitted, the
  706. Xoptions have default values @Code "(tag)" and @Code "1" respectively.
  707. X@PP
  708. XEvery symbol introduced in this section has an abbreviated form
  709. Xconsisting of @Code "@" followed by its capital letters only.  For
  710. Xexample, @Code "@BeginNumberedDisplays" can be abbreviated to {@Code "@BND"},
  711. Xand the display that has everything to {@Code "@RCAND"}.
  712. X@End @Section
  713. END_OF_FILE
  714.   if test 5199 -ne `wc -c <'lout/doc/tr.begin/s02'`; then
  715.     echo shar: \"'lout/doc/tr.begin/s02'\" unpacked with wrong size!
  716.   fi
  717.   # end of 'lout/doc/tr.begin/s02'
  718. fi
  719. if test -f 'lout/doc/tr.begin/s03' -a "${1}" != "-c" ; then 
  720.   echo shar: Will not clobber existing file \"'lout/doc/tr.begin/s03'\"
  721. else
  722.   echo shar: Extracting \"'lout/doc/tr.begin/s03'\" \(5254 characters\)
  723.   sed "s/^X//" >'lout/doc/tr.begin/s03' <<'END_OF_FILE'
  724. X@Section
  725. X   @Tag { lists }
  726. X   @Title { Lists }
  727. X@Begin
  728. X@PP
  729. XIn the previous section, we saw that several consecutive displays are
  730. Xawkward to space correctly.  Provided they are not aligned or numbered,
  731. Xsuch displays are better treated as a {@I list}:
  732. X@ID @Code {
  733. X"... preceding text."
  734. X"@IndentedList"
  735. X"@ListItem @I Emma"
  736. X"@ListItem @I { Mansfield Park }"
  737. X"@EndList"
  738. X"following text ..."
  739. X}
  740. XThere are {@Code "@LeftList"}, {@Code "@IndentedList"}, and
  741. X@Code "@CentredList" (or {@Code "@CenteredList"}) symbols; each item is
  742. Xintroduced by {@Code "@ListItem"}, and the list ends with
  743. X{@Code "@EndList"}.  There may be any number of items; @Code "@DP"
  744. Xsymbols are inserted before, between, and after them.
  745. X@PP
  746. XA variety of automatically generated tags is available for indented
  747. Xlists.  Here is the full set, showing the first tag produced:
  748. X@ID {
  749. X     @Code "@NumberedList"    |1c    1.
  750. X/1vx @Code "@ParenNumberedList" |    (1)
  751. X/1vx @Code "@RomanList"        |    i.
  752. X/1vx @Code "@ParenRomanList"    |    (i)
  753. X/1vx @Code "@UCRomanList"    |    I.
  754. X/1vx @Code "@ParenUCRomanList"    |    (I)
  755. X/1vx @Code "@AlphaList"        |    a.
  756. X/1vx @Code "@ParenAlphaList"    |    (a)
  757. X/1vx @Code "@UCAlphaList"    |    A.
  758. X/1vx @Code "@ParenUCAlphaList"    |    (A)
  759. X/1vx @Code "@BulletList"    |    @Bullet
  760. X/1vx @Code "@StarList"        |    @Star
  761. X/1vx @Code "@DashList"        |    --
  762. X}
  763. XThe Roman numerals end at c (100), and the alphabet ends
  764. Xat z (26), but ordinary numbers have no limit.  For example,
  765. X@ID @Code {
  766. X"@Heading { Quiz }"
  767. X"@NumberedList"
  768. X"@ListItem { Which American"
  769. X"statesman owned a"
  770. X"two-storey clock? }"
  771. X"@ListItem { Which Yankee"
  772. X"commander cut a swathe of"
  773. X"destruction through the"
  774. X"State of Georgia? }"
  775. X"@EndList"
  776. X}
  777. Xhas result
  778. X@ID {
  779. X@Heading { Quiz }
  780. X@DP
  781. X@RawNumberedList
  782. X@ListItem { Which American
  783. Xstatesman owned a
  784. Xtwo-storey clock? }
  785. X@ListItem { Which Yankee
  786. Xcommander cut a swathe of
  787. Xdestruction through the
  788. XState of Georgia? }
  789. X@EndList
  790. X}
  791. XAlternatively, the tags may be supplied by the author, using the
  792. X@Code "@TaggedList" symbol and its variants @Code "@WideTaggedList" and
  793. X{@Code "@VeryWideTaggedList"}, which leave a wider indent for the tags:
  794. X@ID @Code {
  795. X"@WideTaggedList"
  796. X"{ 9 a.m. } @TagItem { Breakfast in"
  797. X"the Ipamena Lounge, served with"
  798. X"Irish coffee and fresh croissants. }"
  799. X"{ 10 a.m. } @TagItem { Prof. A. Smith"
  800. X"speaks on `The Wealth of Nations.' }"
  801. X"@EndList"
  802. X}
  803. Xhas result
  804. X@ID {
  805. X@RawWideTaggedList
  806. X{ 9 a.m. } @TagItem { Breakfast in
  807. Xthe Ipamena Lounge, served with
  808. XIrish coffee and fresh croissants. }
  809. X{ 10 a.m. } @TagItem { Prof. A. Smith
  810. Xspeaks on `The Wealth of Nations.' }
  811. X@EndList
  812. X}
  813. XEach @Code "@TagItem" symbol uses the thing just preceding it as the tag.
  814. X@PP
  815. XEach of these lists also has a `raw' version which omits the preceding
  816. Xand following space.  These are mainly used when an item is itself a list:
  817. X@ID @Code {
  818. X"@ParenNumberedList"
  819. X"@ListItem {"
  820. X"   @RawParenRomanList"
  821. X"   @ListItem { MV Nominees,"
  822. X"hereinafter called the vendor, ... }"
  823. X"   @EndList"
  824. X"}"
  825. X"@EndList"
  826. X}
  827. Xhas result
  828. X@ID {
  829. X@RawParenNumberedList
  830. X@ListItem {
  831. X   @RawParenRomanList
  832. X   @ListItem { MV Nominees,
  833. Xhereinafter called the vendor, ... }
  834. X   @EndList
  835. X}
  836. X@EndList
  837. X}
  838. XIf @Code "@ParenRomanList" had been used instead of
  839. X{@Code "@RawParenRomanList"}, (1) and (i) would have appeared on
  840. Xdifferent lines.
  841. X@PP
  842. XIn cases where it is desired to have a paragraph symbol following a raw
  843. Xlist, owing to problems behind the scenes this symbol should be placed
  844. Xbefore the first {@Code "@ListItem"} or {@Code "@TagItem"}, not after
  845. Xthe @Code "@EndList" as would naturally be expected.
  846. X@PP
  847. XA finer control over the appearance of lists is obtained with
  848. X@Code "@RawIndentedList" and {@Code "@RawTaggedList"}.  These
  849. Xhave {@I options}:  optional subsidiary symbols which modify the
  850. Xresult.  For example,
  851. X@ID @Code {
  852. X"@RawIndentedList"
  853. X"     style { [tag] }"
  854. X"     indent { 0.5i }"
  855. X"     gap { 0.3v }"
  856. X"     start { 5 }"
  857. X"@ListItem { ... }"
  858. X"@ListItem { ... }"
  859. X"@EndList"
  860. X}
  861. Xshows the four options available with {@Code "@RawIndentedList"}, namely
  862. X{@Code style}, @Code {indent}, {@Code gap}, and {@Code start}.  It
  863. Xhas result
  864. X@ID {
  865. X@RawIndentedList
  866. X     style { [tag] }
  867. X     indent { 0.5i }
  868. X     gap { 0.3v }
  869. X     start { 5 }
  870. X@ListItem { ... }
  871. X@ListItem { ... }
  872. X@EndList
  873. X}
  874. XThe @Code style option determines the appearance of each tag, any
  875. X@Code tag symbol
  876. Xwithin it being replaced by the number of the item.  If numbers are not
  877. Xwanted in the tag, @Code tag may be omitted.  The other options
  878. Xdetermine the indent, the gap between items, and the number of the first
  879. Xitem.  In general, options may be given in any order, and if omitted
  880. Xwill revert to a reasonable standard value.  @Code "@RawTaggedList" works
  881. Xin a similar way, except that @Code tag is replaced by the tag supplied
  882. Xby the @Code "@TagItem" symbol, and there is no @Code start option.  The
  883. Xsymbol @Code "@DP" may be used above or below the list to produce the
  884. Xusual amount of space.
  885. X@PP
  886. XIndividual list items are kept together on one page or column.  However,
  887. Xa new page may be started between two list items.
  888. X@PP
  889. XAs in the previous section, every symbol introduced in this section has
  890. Xan abbreviated form consisting of @Code "@" followed by its capital
  891. Xletters only.  For example, @Code "@RawNumberedList" can be abbreviated
  892. Xto {@Code "@RNL"}, and @Code "@ListItem" to {@Code "@LI"}.
  893. X@End @Section
  894. END_OF_FILE
  895.   if test 5254 -ne `wc -c <'lout/doc/tr.begin/s03'`; then
  896.     echo shar: \"'lout/doc/tr.begin/s03'\" unpacked with wrong size!
  897.   fi
  898.   # end of 'lout/doc/tr.begin/s03'
  899. fi
  900. if test -f 'lout/doc/tr.eq/s6' -a "${1}" != "-c" ; then 
  901.   echo shar: Will not clobber existing file \"'lout/doc/tr.eq/s6'\"
  902. else
  903.   echo shar: Extracting \"'lout/doc/tr.eq/s6'\" \(5589 characters\)
  904.   sed "s/^X//" >'lout/doc/tr.eq/s6' <<'END_OF_FILE'
  905. X@Appendix
  906. X    @Title { Pas -- a Lout Package for Printing Pascal Programs }
  907. X@Begin
  908. X@PP
  909. XPas
  910. X@Reference
  911. X   @Tag { jensen75 }
  912. X   @Type { Book }
  913. X   @Author { Jensen, K. and Wirth, N. }
  914. X   @Title { Pascal User Manual and Report }
  915. X   @Publisher { Springer-Verlag }
  916. X   @Year { 1975 }
  917. Xis a package of definitions for printing Pascal programs
  918. X[{@Ref jensen75}] neatly with the Lout document formatter
  919. X[{@Ref kingston92}].  No attempt is made to follow any particular
  920. Xprinting standard; the design simply reflects the author's taste.
  921. X@PP
  922. XThe package is so simple that there is very little to say about
  923. Xit.  To use Pas, place @Code "@SysInclude { pas }" in the setup file,
  924. Xor type @Code "-ipas" in the command line.  A Pascal program is
  925. Xentered like this, where the @Code "@ID" symbol from the DocumentLayout
  926. Xpackage [{@Ref kingston92begin}] has been used to obtain an indented display:
  927. X@ID @Code {
  928. X"@ID @Pas {"
  929. X"procedure PriDelete(x: PriEntry; var Q: PriorityQueue);"
  930. X"    var i: integer;"
  931. X"begin"
  932. X"    with Q^ do begin"
  933. X"        size := size - 1;"
  934. X"        if x^.back <= size then"
  935. X"        begin"
  936. X"            i := x^.back;"
  937. X"            A[i] := A[size + 1];"
  938. X"            A[i]^.back := i;"
  939. X"            PriAddRoot(i, Q);"
  940. X"            PriAddLeaf(i, Q)"
  941. X"        end"
  942. X"    end"
  943. X"end;"
  944. X"}"
  945. X}
  946. XThe result will come out like this:
  947. X@ID @Pas {
  948. Xprocedure PriDelete(x: PriEntry; var Q: PriorityQueue);
  949. X    var i: integer;
  950. Xbegin
  951. X    with Q^ do begin
  952. X    size := size - 1;
  953. X    if x^.back <= size then
  954. X    begin
  955. X        i := x^.back;
  956. X        A[i] := A[size + 1];
  957. X        A[i]^.back := i;
  958. X        PriAddRoot(i, Q);
  959. X        PriAddLeaf(i, Q)
  960. X    end
  961. X    end
  962. Xend;
  963. X}
  964. XBlank lines, line breaks, indents and spaces in the input are respected, with a
  965. Xtab being considered equal to eight spaces.  @Code "@Pas" can also be used
  966. Xwithin a paragraph to produce Pascal fragments like @Pas { A[i..j] }.  Use
  967. X@Code "@OneCol @Pas { ... }" to prevent the result from breaking over two
  968. Xlines.
  969. X@PP
  970. X@Code "@Pas" does not attempt to rearrange the program in any way.  Each
  971. Xitem is simply printed according to the following plan:
  972. X@ID {
  973. X7c @Wide {
  974. X      @Code and     |2.5ct @Pas { and }
  975. X//1vx @Code array     |2.5ct @Pas { array }
  976. X//1vx @Code begin     |2.5ct @Pas { begin }
  977. X//1vx @Code case     |2.5ct @Pas { case }
  978. X//1vx @Code const     |2.5ct @Pas { const }
  979. X//1vx @Code div     |2.5ct @Pas { div }
  980. X//1vx @Code do         |2.5ct @Pas { do }
  981. X//1vx @Code downto     |2.5ct @Pas { downto }
  982. X//1vx @Code else     |2.5ct @Pas { else }
  983. X//1vx @Code end     |2.5ct @Pas { end }
  984. X//1vx @Code file     |2.5ct @Pas { file }
  985. X//1vx @Code for     |2.5ct @Pas { for }
  986. X//1vx @Code forward    |2.5ct @Pas { forward }
  987. X//1vx @Code function     |2.5ct @Pas { function }
  988. X//1vx @Code goto     |2.5ct @Pas { goto }
  989. X//1vx @Code if         |2.5ct @Pas { if }
  990. X//1vx @Code in         |2.5ct @Pas { in }
  991. X//1vx @Code label     |2.5ct @Pas { label }
  992. X//1vx @Code mod     |2.5ct @Pas { mod }
  993. X//1vx @Code nil     |2.5ct @Pas { nil }
  994. X//1vx @Code not     |2.5ct @Pas { not }
  995. X//1vx @Code of         |2.5ct @Pas { of }
  996. X//1vx @Code or         |2.5ct @Pas { or }
  997. X//1vx @Code otherwise     |2.5ct @Pas { otherwise }
  998. X//1vx @Code packed     |2.5ct @Pas { packed }
  999. X//1vx @Code procedure     |2.5ct @Pas { procedure }
  1000. X//1vx @Code program     |2.5ct @Pas { program }
  1001. X//1vx @Code record     |2.5ct @Pas { record }
  1002. X//1vx @Code repeat     |2.5ct @Pas { repeat }
  1003. X//1vx @Code set     |2.5ct @Pas { set }
  1004. X//1vx @Code then     |2.5ct @Pas { then }
  1005. X//1vx @Code to         |2.5ct @Pas { to }
  1006. X//1vx @Code type     |2.5ct @Pas { type }
  1007. X//1vx @Code until     |2.5ct @Pas { until }
  1008. X//1vx @Code var     |2.5ct @Pas { var }
  1009. X//1vx @Code while     |2.5ct @Pas { while }
  1010. X//1vx @Code with     |2.5ct @Pas { with }
  1011. X} | 7c @Wide {
  1012. X      @Code "0"        |2.5ct @Pas { 0 }
  1013. X//1vx @Code "1"        |2.5ct @Pas { 1 }
  1014. X//1vx @Code "2"        |2.5ct @Pas { 2 }
  1015. X//1vx @Code "3"        |2.5ct @Pas { 3 }
  1016. X//1vx @Code "4"        |2.5ct @Pas { 4 }
  1017. X//1vx @Code "5"        |2.5ct @Pas { 5 }
  1018. X//1vx @Code "6"        |2.5ct @Pas { 6 }
  1019. X//1vx @Code "7"        |2.5ct @Pas { 7 }
  1020. X//1vx @Code "8"        |2.5ct @Pas { 8 }
  1021. X//1vx @Code "9"        |2.5ct @Pas { 9 }
  1022. X//1vx @Code "."        |2.5ct @Pas { . }
  1023. X//1vx @Code ","        |2.5ct @Pas { , }
  1024. X//1vx @Code ":"        |2.5ct @Pas { : }
  1025. X//1vx @Code ";"        |2.5ct @Pas { ; }
  1026. X//1vx @Code "'"        |2.5ct @Pas { ' }
  1027. X//1vx @Code "`"        |2.5ct @Pas { ` }
  1028. X//1vx @Code "+"        |2.5ct @Pas { + }
  1029. X//1vx @Code "-"        |2.5ct @Pas { - }
  1030. X//1vx @Code "*"        |2.5ct @Pas { * }
  1031. X//1vx @Code "/"        |2.5ct @Pas { / }
  1032. X//1vx @Code "("        |2.5ct @Pas { ( }
  1033. X//1vx @Code ")"        |2.5ct @Pas { ) }
  1034. X//1vx @Code "["        |2.5ct @Pas { [ }
  1035. X//1vx @Code "]"        |2.5ct @Pas { ] }
  1036. X//1vx @Code "^"        |2.5ct @Pas { ^ }
  1037. X//1vx @Code ".."    |2.5ct @Pas { .. }
  1038. X//1vx @Code "="        |2.5ct @Pas { = }
  1039. X//1vx @Code "<"        |2.5ct @Pas { < }
  1040. X//1vx @Code ">"        |2.5ct @Pas { > }
  1041. X//1vx @Code "<>"    |2.5ct @Pas { <> }
  1042. X//1vx @Code "<="    |2.5ct @Pas { <= }
  1043. X//1vx @Code ">="    |2.5ct @Pas { >= }
  1044. X//1vx @Code ":="    |2.5ct @Pas { := }
  1045. X}
  1046. X}
  1047. XAnything not mentioned here will appear in italic font.
  1048. X@PP
  1049. XPascal character strings need a little attention before formatting by
  1050. XPas.  Their interiors are best enclosed in double quotes to prevent the
  1051. Xabove transformations from occurring inside them.  Any @Code "\\" or
  1052. X@Code "\"" characters inside strings will need to be replaced by
  1053. X@Code "\\\\" and @Code "\\\"" respectively, and the opening quote should
  1054. Xbe replaced by {@Code "`"}.
  1055. X@PP
  1056. XSimilar remarks apply to Pascal comments; don't forget that @Code "{"
  1057. Xand @Code "}" must be enclosed in double quotes.  Alternatively, a
  1058. X@Code "@Com" symbol can be placed in front of a comment enclosed
  1059. Xin braces.  It will add literal braces:
  1060. X@ID @Code {
  1061. X"@Com { A Pascal comment }"
  1062. X}
  1063. Xhas result
  1064. X@ID @Pas {
  1065. X@Com { A Pascal comment }
  1066. X}
  1067. XIt may still be necessary to enclose the interior in double quotes.
  1068. X@End @Appendix
  1069. END_OF_FILE
  1070.   if test 5589 -ne `wc -c <'lout/doc/tr.eq/s6'`; then
  1071.     echo shar: \"'lout/doc/tr.eq/s6'\" unpacked with wrong size!
  1072.   fi
  1073.   # end of 'lout/doc/tr.eq/s6'
  1074. fi
  1075. if test -f 'lout/doc/tr.fig/s3' -a "${1}" != "-c" ; then 
  1076.   echo shar: Will not clobber existing file \"'lout/doc/tr.fig/s3'\"
  1077. else
  1078.   echo shar: Extracting \"'lout/doc/tr.fig/s3'\" \(5295 characters\)
  1079.   sed "s/^X//" >'lout/doc/tr.fig/s3' <<'END_OF_FILE'
  1080. X@Section
  1081. X   @Title { Creating New Shapes }
  1082. X@Begin
  1083. X@PP
  1084. XIf the needed shape is not provided by Fig, it can be created
  1085. Xusing the @Code "@Figure" symbol.  @Code "@Figure" takes all the options
  1086. Xwe have already seen, plus another one called {@Code shape}.  For
  1087. Xexample,
  1088. X@ID {
  1089. X@Code {
  1090. X"@Figure"
  1091. X"   shape {"
  1092. X"      0 0  xsize 0"
  1093. X"      0 ysize  0 0"
  1094. X"   }"
  1095. X"{ 3c @High 2c @Wide }"
  1096. X}
  1097. X||7ct
  1098. X@Fig {
  1099. X@Figure
  1100. X   shape { 0 0  xsize 0
  1101. X           0 ysize  0 0
  1102. X         }
  1103. X{ 3c @High 2c @Wide }
  1104. X}
  1105. X}
  1106. XThe pairs of numbers define points in a coordinate system whose origin
  1107. Xis the lower left corner of the right parameter; the upper right corner
  1108. Xis @Code xsize {@Code ysize}, and the point where the
  1109. Xright parameter's marks cross is {@Code "xmark ymark"}:
  1110. X@ID 10p @Font
  1111. X{
  1112. X   { &1rt @I ysize /0ik &1rt @I ymark /0ik &1rt 0 } |0.4c
  1113. X   {  /
  1114. X      |0ik @ShowMarks { 1c @High 1.5c @Wide ^| 3c @Wide ^/ 2c @High }
  1115. X      |0ik /
  1116. X   }
  1117. X   /0.3c
  1118. X   | 0 | @I xmark | @I xsize
  1119. X}
  1120. XThis arrangement is identical with that for the @Code "@Graphic"
  1121. Xsymbol of basic Lout.  A sequence of points defines a shape, like
  1122. Xthe triangle above.  Arrowheads are drawn pointing forwards from the
  1123. Xlast segment and backwards from the first, as requested; the @Code margin
  1124. Xoption has default value {@Code 0c}.
  1125. X@PP
  1126. XNormally, the points are connected by straight lines to form the shape,
  1127. Xwhich is then painted and drawn in the usual way, depending on the other
  1128. Xoptions.
  1129. X@PP
  1130. XIf two points in the shape are separated by {@Code {"[" &0.5s "]"}}, no
  1131. Xline will be drawn between them.  This permits a shape to consist of two
  1132. Xor more disconnected parts.
  1133. X@PP
  1134. XIf two points in the shape are separated by
  1135. X{@Code "[" & @Eq{x ``` y} & @Code "]"}, where
  1136. X@Eq {x} and @Eq {y} are numbers, the two points will be joined by an
  1137. Xanticlockwise arc whose centre is the point @Eq {(x, y)}.  This arc
  1138. Xwill be circular if possible, otherwise it will be part of an ellipse
  1139. Xwhose axes are oriented horizontally and vertically.  The notation
  1140. X@Code "[" & @Eq {x ``` y} @Code "clockwise]" makes the arc go
  1141. Xclockwise.  For example,
  1142. X@ID {
  1143. X@Code {
  1144. X"@Figure"
  1145. X"   shape {"
  1146. X"      0 -0.5 cm"
  1147. X"      0 0.5 cm"
  1148. X"      1 cm 0  0 -0.5 cm [" &0.5s "]"
  1149. X"      1 cm 0 [ 1.1 cm 0 ]"
  1150. X"      1 cm 0"
  1151. X"   }"
  1152. X"{}"
  1153. X}
  1154. X||7ct
  1155. X@Fig { //0.5c
  1156. X@Figure
  1157. X   shape { 0 -0.5 cm  0 0.5 cm
  1158. X           1 cm 0  0 -0.5 cm []
  1159. X           1 cm 0 [ 1.1 cm 0 ] 1 cm 0
  1160. X         }
  1161. X{}
  1162. X}
  1163. X}
  1164. XWe have recklessly disregarded the size of the right parameter when
  1165. Xdrawing this shape, a dangerous thing to do since Lout thinks that the
  1166. Xfigure is the same size as its right parameter.
  1167. X@PP
  1168. XFinally, two points may be separated by
  1169. X@Eq { [x sub 1 ``` y sub 1 ```  x sub 2 ``` y sub 2 & ] }, which requests that a
  1170. XBezier curve be drawn between them with control points
  1171. X@Eq { (x sub 1 & , y sub 1 & ) } and
  1172. X@Eq { (x sub 2 & , y sub 2 & ) }:
  1173. X@ID @Fig {
  1174. X@Figure
  1175. X   margin { 0c }
  1176. X   shape { 1 cm 2 cm 4 cm 3.5 cm  9 cm 2 cm 2 cm 0.6 cm }
  1177. X   linestyle { dashed }
  1178. X@Figure
  1179. X   margin { 0c }
  1180. X   shape { 1 cm 2 cm [4 cm 3.5 cm  9 cm 2 cm] 2 cm 0.6 cm }
  1181. X{ 7c @Wide 4c @High }
  1182. X
  1183. X// { -0.3  cm 2.0 cm } @BaseOf @Eq { (x sub 0 & , y sub 0 & )}
  1184. X// {  4.2  cm 3.5 cm } @BaseOf @Eq { (x sub 1 & , y sub 1 & )}
  1185. X// {  9.1  cm 2.0 cm } @BaseOf @Eq { (x sub 2 & , y sub 2 & )}
  1186. X// {  2.1  cm 0.0 cm } @BaseOf @Eq { (x sub 3 & , y sub 3 & )}
  1187. X}
  1188. XThe curve is attracted toward the control points, without reaching
  1189. Xthem; it is tangent to the straight line from the start point to the
  1190. Xfirst control point, and from the second control point to the finishing
  1191. Xpoint, and it lies wholly inside the quadrilateral formed by the four
  1192. Xpoints.  Owing to the author's laziness, dashes and dots do not fit as
  1193. Xneatly onto Bezier curves as they do onto lines and arcs.
  1194. X @Code "@Figure" should be general enough to draw most shapes; for
  1195. Xexample, all the other shapes ({@Code "@Box"}, {@Code "@Circle"}, etc.)
  1196. Xare just instances of {@Code "@Figure"}.  When it is inadequate, one
  1197. Xcan fall back to the standard @Code "@Graphic" symbol.
  1198. X@PP
  1199. XLines, arrows and arcs at any angle can be produced using {@Code "@Figure"}:
  1200. X@ID {
  1201. X@Code {
  1202. X"@Figure"
  1203. X"   shape { 0 0  xsize ysize }"
  1204. X"   arrow { forward }"
  1205. X"{ 2c @High 3c @Wide }"
  1206. X}
  1207. X||7ct
  1208. X@Fig {
  1209. X@Figure
  1210. X   shape { 0 0  xsize ysize }
  1211. X   arrow { forward }
  1212. X{ 2c @High 3c @Wide }
  1213. X}
  1214. X}
  1215. XHowever, for convenience there are symbols @Code "@Line" and @Code
  1216. X"@Arrow" which have two options, @Code "from" and {@Code "to"}, for
  1217. Xspecifying the endpoints:
  1218. X@ID {
  1219. X@Code {
  1220. X"@Arrow"
  1221. X"   from { 0 0 }"
  1222. X"   to { xsize ysize }"
  1223. X"{ 2c @High 3c @Wide }"
  1224. X}
  1225. X||7ct
  1226. X@Fig {
  1227. X@Arrow
  1228. X   from { 0 0 }
  1229. X   to { xsize ysize }
  1230. X{ 2c @High 3c @Wide }
  1231. X}
  1232. X}
  1233. XThere is also an @Code "@Arc" symbol, which draws a circular or
  1234. Xelliptical arc from one point to another about a given centre, with
  1235. Xthe usual options:
  1236. X@ID {
  1237. X@Code {
  1238. X"@Arc"
  1239. X"   from { 0 0 }"
  1240. X"   to { xsize ysize }"
  1241. X"   ctr { 0 ysize }"
  1242. X"   direction { anticlockwise }"
  1243. X"   arrow { forward }"
  1244. X"   linestyle { dashed }"
  1245. X"{ 2c @High 3c @Wide }"
  1246. X}
  1247. X||7ct
  1248. X@Fig {
  1249. X@Arc
  1250. X   from { 0 0 }
  1251. X   to { xsize ysize }
  1252. X   ctr { 0 ysize }
  1253. X   direction { anticlockwise }
  1254. X   arrow { forward }
  1255. X   linestyle { dashed }
  1256. X{ 2c @High 3c @Wide }
  1257. X}
  1258. X}
  1259. XThe arc goes either @Code clockwise (the default) or @Code anticlockwise
  1260. Xabout the centre, depending on the @Code direction option.  Any
  1261. Xarrowhead will point in a direction tangent to the arc.
  1262. X@End @Section
  1263. END_OF_FILE
  1264.   if test 5295 -ne `wc -c <'lout/doc/tr.fig/s3'`; then
  1265.     echo shar: \"'lout/doc/tr.fig/s3'\" unpacked with wrong size!
  1266.   fi
  1267.   # end of 'lout/doc/tr.fig/s3'
  1268. fi
  1269. if test -f 'lout/doc/tr.impl/oldrefs.ld' -a "${1}" != "-c" ; then 
  1270.   echo shar: Will not clobber existing file \"'lout/doc/tr.impl/oldrefs.ld'\"
  1271. else
  1272.   echo shar: Extracting \"'lout/doc/tr.impl/oldrefs.ld'\" \(5587 characters\)
  1273.   sed "s/^X//" >'lout/doc/tr.impl/oldrefs.ld' <<'END_OF_FILE'
  1274. X{ @Reference
  1275. X     @Tag { knuth84 }
  1276. X     @Type { Book }
  1277. X     @Author { Knuth, Donald E. }
  1278. X     @Title { The T{ /0.2fo E}XBook }
  1279. X     @Publisher { Addison-Wesley }
  1280. X     @Year { 1984 }
  1281. X}
  1282. X
  1283. X{ @Reference
  1284. X     @Tag { adobe85 }
  1285. X     @Type { Book }
  1286. X     @Author { Adobe Systems, Inc. }
  1287. X     @Title { PostScript Language Reference Manual }
  1288. X     @Publisher { Addison-Wesley }
  1289. X     @Year { 1985 }
  1290. X}
  1291. X
  1292. X{ @Reference
  1293. X     @Tag { reid80 }
  1294. X     @Type { ConferencePaper }
  1295. X     @Author { Reid, Brian K. }
  1296. X     @Title { A High-Level Approach to Computer Document Production }
  1297. X     @Proceedings { Proceedings of the 7th Symposium on the Principles
  1298. Xof Programming Languages (POPL), Las Vegas NV }
  1299. X     @Pages { 24--31 }
  1300. X     @Year { 1980 }
  1301. X}
  1302. X
  1303. X{ @Reference
  1304. X     @Tag { strunk79 }
  1305. X     @Type { Book }
  1306. X     @Author { Strunk, William and White, E. B. }
  1307. X     @Title { The Elements of Style }
  1308. X     @Publisher { Macmillan, third edition }
  1309. X     @Year { 1979 }
  1310. X}
  1311. X
  1312. X{ @Reference
  1313. X     @Tag { ossanna76 }
  1314. X     @Type { TechReport }
  1315. X     @Author { Joseph F. Ossanna }
  1316. X     @Title { "Nroff/Troff" User's Manual }
  1317. X     @Number { 54 }
  1318. X     @Institution { Bell Laboratories, Murray Hill, NJ 07974 }
  1319. X     @Year { 1976 }
  1320. X}
  1321. X
  1322. X{ @Reference
  1323. X     @Tag { kernighan75 }
  1324. X     @Type { JournalArticle }
  1325. X     @Author { Kernighan, Brian W. and Cherry, Lorinda L. }
  1326. X     @Title { A system for typesetting mathematics }
  1327. X     @Journal { Communications of the ACM }
  1328. X     @Volume { 18 }
  1329. X     @Pages { 182--193 }
  1330. X     @Year { 1975 }
  1331. X}
  1332. X
  1333. X{ @Reference
  1334. X     @Tag { lesk76 }
  1335. X     @Type { TechReport }
  1336. X     @Author { Lesk, M. E. }
  1337. X     @Title { Tbl -- a program to format tables }
  1338. X     @Number { 49 }
  1339. X     @Institution { Bell Laboratories, Murray Hill, NJ 07974 }
  1340. X     @Year { 1976 }
  1341. X}
  1342. X
  1343. X{ @Reference
  1344. X     @Tag { kernighan82 }
  1345. X     @Type { JournalArticle }
  1346. X     @Author { Kernighan, Brian W. }
  1347. X     @Title { PIC -- A language for typesetting graphics}
  1348. X     @Journal { Software Practice and Experience }
  1349. X     @Volume { 12 }
  1350. X     @Pages { 1--21 }
  1351. X     @Year { 1982 }
  1352. X}
  1353. X
  1354. X{ @Reference
  1355. X     @Tag { kingston91 }
  1356. X     @Type { TechReport }
  1357. X     @Author { Kingston, Jeffrey H. }
  1358. X     @Title { Document Formatting with Lout }
  1359. X     @Number { 408 }
  1360. X     @Institution { Basser Department of Computer
  1361. XScience F09, University of Sydney 2006, Australia }
  1362. X     @Year { 1991 }
  1363. X}
  1364. X
  1365. X{ @Reference
  1366. X     @Tag { kingston91basser }
  1367. X     @Type { Software }
  1368. X     @Author { Kingston, Jeffrey H. }
  1369. X     @Title { The Basser Lout Document Formatter }
  1370. X     @Year { 1991 }
  1371. X     @Comment { Computer program; Version 2 publicly available
  1372. Xin the @I jeff subdirectory of the home directory of @I ftp to host
  1373. X@I ftp.cs.su.oz.au with login name @I anonymous or @I ftp and any
  1374. Xnon-empty password.  Distribution via email is available for
  1375. Xnon-{@I ftp} sites.  All enquiries to "jeff@cs.su.oz.au". }
  1376. X}
  1377. X
  1378. X{ @Reference
  1379. X     @Tag { kingston91begin }
  1380. X     @Type { TechReport }
  1381. X     @Author { Kingston, Jeffrey H. }
  1382. X     @Title { A beginners' guide to Lout }
  1383. X     @Number { 409 }
  1384. X     @Institution { Basser Department of Computer
  1385. XScience F09, University of Sydney 2006, Australia }
  1386. X     @Year { 1991 }
  1387. X}
  1388. X
  1389. X{ @Reference
  1390. X     @Tag { kingston91eq }
  1391. X     @Type { TechReport }
  1392. X     @Author { Kingston, Jeffrey H. }
  1393. X     @Title { Eq -- a Lout package for typesetting mathematics }
  1394. X     @Number { 410 }
  1395. X     @Institution { Basser Department of Computer
  1396. XScience F09, University of Sydney 2006, Australia }
  1397. X     @Year { 1991 }
  1398. X     @Comment { (Contains an appendix describing the Pas Pascal formatter.) }
  1399. X}
  1400. X
  1401. X{ @Reference
  1402. X     @Tag { kingston91fig }
  1403. X     @Type { TechReport }
  1404. X     @Author { Kingston, Jeffrey H. }
  1405. X     @Title { Fig -- a Lout package for drawing figures }
  1406. X     @Number { 411 }
  1407. X     @Institution { Basser Department of Computer
  1408. XScience F09, University of Sydney 2006, Australia }
  1409. X     @Year { 1991 }
  1410. X}
  1411. X
  1412. X{ @Reference
  1413. X     @Tag { kingston91over }
  1414. X     @Type { TechReport }
  1415. X     @Author { Kingston, Jeffrey H. }
  1416. X     @Title { A new approach to document formatting }
  1417. X     @Number { 412 }
  1418. X     @Institution { Basser Department of Computer
  1419. XScience F09, University of Sydney 2006, Australia }
  1420. X     @Year { 1991 }
  1421. X}
  1422. X
  1423. X{ @Reference
  1424. X     @Tag { kingston91tab }
  1425. X     @Type { TechReport }
  1426. X     @Author { Kingston, Jeffrey H. }
  1427. X     @Title { Tab -- a Lout package for formatting tables }
  1428. X     @Number { 413 }
  1429. X     @Institution { Basser Department of Computer
  1430. XScience F09, University of Sydney 2006, Australia }
  1431. X     @Year { 1991 }
  1432. X}
  1433. X
  1434. X{ @Reference
  1435. X     @Tag { kingston91design }
  1436. X     @Type { TechReport }
  1437. X     @Author { Kingston, Jeffrey H. }
  1438. X     @Title { The design and implementation of a document formatting language }
  1439. X     @Number { @Null }
  1440. X     @Institution { Basser Department of Computer
  1441. XScience F09, University of Sydney 2006, Australia }
  1442. X     @Year { 1991 }
  1443. X     @Comment { @I { In preparation. } }
  1444. X}
  1445. X
  1446. X{ @Reference
  1447. X     @Tag { wirth71 }
  1448. X     @Type { JournalArticle }
  1449. X     @Author { Wirth, N. }
  1450. X     @Title { The programming language Pascal }
  1451. X     @Journal { Acta Informatica }
  1452. X     @Volume { 1 }
  1453. X     @Year { 1975 }
  1454. X     @Pages { 35--63 }
  1455. X}
  1456. X
  1457. X{ @Reference
  1458. X     @Tag { brooks91 }
  1459. X     @Type { JournalArticle }
  1460. X     @Author { Brooks, Kenneth P. }
  1461. X     @Title { Lilac: a two-view document editor }
  1462. X     @Journal { IEEE Computer }
  1463. X     @Volume { @Null }
  1464. X     @Pages { 7--19 }
  1465. X     @Year { 1991 }
  1466. X}
  1467. X
  1468. X{ @Reference
  1469. X     @Tag { furuta82 }
  1470. X     @Type { JournalArticle }
  1471. X     @Author { Furuta, Richard, Scofield, Jeffrey,
  1472. Xand Shaw, Alan }
  1473. X     @Title { Document formatting systems:  survey,
  1474. Xconcepts, and issues }
  1475. X     @Journal { Computing Surveys }
  1476. X     @Volume { 14 }
  1477. X     @Pages { 417--472 }
  1478. X     @Year { 1982 }
  1479. X}
  1480. END_OF_FILE
  1481.   if test 5587 -ne `wc -c <'lout/doc/tr.impl/oldrefs.ld'`; then
  1482.     echo shar: \"'lout/doc/tr.impl/oldrefs.ld'\" unpacked with wrong size!
  1483.   fi
  1484.   # end of 'lout/doc/tr.impl/oldrefs.ld'
  1485. fi
  1486. if test -f 'lout/doc/tr.impl/s3.3' -a "${1}" != "-c" ; then 
  1487.   echo shar: Will not clobber existing file \"'lout/doc/tr.impl/s3.3'\"
  1488. else
  1489.   echo shar: Extracting \"'lout/doc/tr.impl/s3.3'\" \(5264 characters\)
  1490.   sed "s/^X//" >'lout/doc/tr.impl/s3.3' <<'END_OF_FILE'
  1491. X@SubSection
  1492. X    @Tag { modules }
  1493. X    @Title { Modules }
  1494. X@Begin
  1495. X@PP
  1496. XIt is well accepted that the visibility of symbols is not adequately
  1497. Xcontrolled by Algol block structure.  The author is aware of several
  1498. Xmajor problems of this kind in document formatting.
  1499. X@PP
  1500. XOne problem is that some symbols should be visible only within
  1501. Xrestricted parts of a document.  For example, we naturally expect
  1502. Xequation formatting to be accomplished like this:
  1503. X@ID @Code {
  1504. X"surrounding text"
  1505. X"@Eq { {x sup 2  +  1} over 4 }"
  1506. X"surrounding text"
  1507. X}
  1508. Xwith the symbols {@Code "sup"}, {@Code "over"}, etc., visible only within
  1509. Xthe equation, not in the surrounding text.
  1510. X@PP
  1511. XIt seems natural to define these symbols within {@Code "@Eq"}, since
  1512. Xthey are local to equations.  It only remains then to decree that
  1513. Xsymbols local to @Code "@Eq" are to be visible within its actual right
  1514. Xparameter, and this is done by replacing the right formal parameter with a
  1515. X@I body parameter:
  1516. X@ID @Code {
  1517. X"export sup over"
  1518. X"def @Eq"
  1519. X"    body @Body"
  1520. X"{"
  1521. X"    def sup ..."
  1522. X"    def over ..."
  1523. X""
  1524. X"    Slope @Font @Body"
  1525. X"}"
  1526. X}
  1527. XThe @Code export clause lists the identifiers which are permitted to be
  1528. Xvisible outside their usual range, the body of {@Code "@Eq"}; and the
  1529. X@Code body declaration imports them into (makes them visible within)
  1530. Xthe actual right parameter of each invocation of {@Code "@Eq"}.  This
  1531. Xarrangement has proven very convenient for defining a variety of
  1532. Xspecial-purpose packages.
  1533. X@PP
  1534. XAnother problem arises when global symbols, such as the ones used for
  1535. Xheadings and paragraph separators, call on values that the non-expert
  1536. Xuser will need to modify, such as the initial font or paragraph
  1537. Xindent.  These values are like parameters of the document as a whole, so
  1538. Xit is natural to try this:
  1539. X@ID @Code {
  1540. X"export @Heading @PP ..."
  1541. X"def @BookLayout"
  1542. X"    named @InitialFont { Times Base 12p }"
  1543. X"    named @InitialBreak { adjust 14p }"
  1544. X"    named @ColumnWidth { 6i }"
  1545. X"    ..."
  1546. X"{"
  1547. X"    def @Heading ..."
  1548. X"    def @PP ..."
  1549. X"}"
  1550. X}
  1551. XNow @Code "@Heading" and @Code "@PP" may invoke @Code "@InitialFont"
  1552. Xand the other parameters.  To make @Code "@Heading" and @Code "@PP"
  1553. Xvisible throughout the document, we need only add a body parameter to
  1554. X@Code "@BookLayout" and present the entire document as
  1555. X@ID @Code {
  1556. X"@BookLayout"
  1557. X"    @InitialFont { Helvetica Base 10p }"
  1558. X"    @InitialBreak { adjust 12p }"
  1559. X"{"
  1560. X"    The document."
  1561. X"}"
  1562. X}
  1563. Xbut for practical reasons given below we prefer not to enclose the
  1564. Xentire document in braces.  Instead, we write
  1565. X@ID @Code {
  1566. X"@Use { @BookLayout"
  1567. X"    @InitialFont { Helvetica Base 10p }"
  1568. X"    @InitialBreak { adjust 12p }"
  1569. X"}"
  1570. X"The document."
  1571. X}
  1572. Xwhich has the same effect:  @Code "@Use" makes the exported symbols of
  1573. X@Code "@BookLayout" visible for the remainder of the document, and is
  1574. Xpermitted only at the beginning.
  1575. X@PP
  1576. XThe third feature that affects visibility, and which will prove useful
  1577. Xfor cross referencing (Section {@NumberOf cross}), is the @Code "@Open"
  1578. Xsymbol.  It makes the exported symbols of its left parameter visible
  1579. Xwithin its right parameter, and is therefore similar to the Pascal @Code
  1580. Xwith statement.
  1581. X@PP
  1582. XIt could be argued that Lout is over-supplied with these visibility modifying
  1583. Xfeatures: the body parameter, @Code "@Use" and @Code "@Open" do not seem
  1584. Xsufficiently different from each another.  The @Code "@Open" symbol is
  1585. Xthe most general, being capable of replacing the other two.  For
  1586. Xexample,
  1587. X@ID @Code {
  1588. X"@Use { x }"
  1589. X"@Use { y }"
  1590. X"Body of document"
  1591. X}
  1592. Xcan be replaced by
  1593. X@ID @Code {
  1594. X"x @Open {"
  1595. X"y @Open {"
  1596. X"Body of document"
  1597. X"}}"
  1598. X}
  1599. Xand, taking the @Code "@Eq" symbol above as example, we could eliminate
  1600. Xits body parameter, add
  1601. X@ID @Code "def @Body right x { Slope @Font x }"
  1602. Xto the exported definitions of {@Code "@Eq"}, and replace
  1603. X@ID @Code "@Eq { object }"
  1604. Xby
  1605. X@ID @Code "@Eq @Open { @Body { object } }"
  1606. XIf @Code "@Eq" is a galley (Section {@NumberOf galleys}), @Code "@Body"
  1607. Xmust take over that function.  But one would not want to write these
  1608. Xclumsy expressions in practice, and the enclosure of large quantities
  1609. Xof input in extra braces could cause Basser Lout to run out of memory
  1610. X(Section {@NumberOf lookahead}).
  1611. X@PP
  1612. XA quite separate kind of visibility problem arises when expert
  1613. Xusers wish to define an object or operator for repeated use within, say,
  1614. Xequations:
  1615. X@ID @Code "def isum { sum from i=1 to n }"
  1616. XAs it stands this can only be placed within the @Code "@Eq" package itself, 
  1617. Xwhere @Code "sum" and the other symbols are visible, but it is not desirable
  1618. Xto modify the source code of a standard package.  Lout provides an
  1619. X@Code "import" clause to solve this problem:
  1620. X@ID @Code {
  1621. X"import @Eq"
  1622. X"def isum { sum from i=1 to n }"
  1623. X}
  1624. Xmay appear after @Code "@Eq" is defined, and it will make the exported symbols
  1625. Xof @Code "@Eq" visible within the body of {@Code "isum"}.  This feature
  1626. Xcomplicates the treatment of environments (Section {@NumberOf defs.impl}),
  1627. Xand even introduces an insecurity, when @Code isum is invoked outside an
  1628. Xequation.  A simpler approach would be to allow only one symbol in an
  1629. X@Code import clause, and treat the following definition exactly like a
  1630. Xlocal definition of that symbol; but then it would not be possible
  1631. Xto define symbols using the resources of more than one of the standard
  1632. Xpackages.
  1633. X@End @SubSection
  1634. END_OF_FILE
  1635.   if test 5264 -ne `wc -c <'lout/doc/tr.impl/s3.3'`; then
  1636.     echo shar: \"'lout/doc/tr.impl/s3.3'\" unpacked with wrong size!
  1637.   fi
  1638.   # end of 'lout/doc/tr.impl/s3.3'
  1639. fi
  1640. if test -f 'lout/doc/tr.impl/s5.1' -a "${1}" != "-c" ; then 
  1641.   echo shar: Will not clobber existing file \"'lout/doc/tr.impl/s5.1'\"
  1642. else
  1643.   echo shar: Extracting \"'lout/doc/tr.impl/s5.1'\" \(6118 characters\)
  1644.   sed "s/^X//" >'lout/doc/tr.impl/s5.1' <<'END_OF_FILE'
  1645. X@SubSection
  1646. X    @Tag { galleys }
  1647. X    @Title { The galley abstraction }
  1648. X@Begin
  1649. X@PP
  1650. XLet us take the footnote as a representative example.  At some point in
  1651. Xthe document, we wish to write
  1652. X@ID @Code {
  1653. X"preceding text"
  1654. X"@FootNote { footnote text }"
  1655. X"following text"
  1656. X}
  1657. Xand we expect the formatter to remove the footnote from this context and
  1658. Xplace it at the bottom of the current page, possibly splitting some or
  1659. Xall of it onto a following page if space is insufficient.
  1660. X@PP
  1661. XAn object appears in the final document at the point it is invoked, but
  1662. Xthis basic property does not hold for footnotes:  the point of
  1663. Xinvocation and the point of appearance are different.  In some way, the
  1664. Xfootnote is attached to the document at both points, introducing a cross
  1665. Xlinking (Section {@NumberOf genesis}) that cannot be described in purely
  1666. Xfunctional terms.
  1667. X@PP
  1668. XSince the interpretation of any object depends on an environment and
  1669. Xstyle inherited from the context, the first question must be whether
  1670. Xthe footnote inherits them through the invocation point or through
  1671. Xthe point(s) of appearance.
  1672. X@PP
  1673. XIf symbols are to be interpreted statically as heretofore, then environments
  1674. Xmust be inherited through the invocation point alone.  Dynamic inheritance
  1675. Xthrough the point of appearance is enticing in some ways:  it might
  1676. Xreplace the body parameter, and it might help with automatic numbering,
  1677. Xsince the number of a footnote is known only at the point of appearance;
  1678. Xbut the implementation problems are severe, and static inheritance seems
  1679. Xmuch simpler and more comprehensible to the user.  Style, at least its
  1680. Xavailable width and height part, must of necessity be inherited through
  1681. Xthe point of appearance.  For consistency, the entire style should be
  1682. Xinherited in this way.  There is a suggestive analogy here with actual
  1683. Xparameters, which have a point of invocation from which they inherit an
  1684. Xenvironment, and a point of appearance within the body of the enclosing
  1685. Xdefinition, from which they inherit a style.  It may be possible to treat
  1686. Xa footnote as the actual parameter of some symbol, therefore, although
  1687. Xthe details seem very obscure.
  1688. X@PP
  1689. XBut the most profound consequence of having two types of attachment
  1690. Xpoint is that it leads to two distinctive tree structures.  Considering
  1691. Xinvocation points only leads to static trees like this one:
  1692. X@ID @I @Fig margin { 0.3c } { @Tree {
  1693. X@Node @Ellipse { body text }
  1694. X@LeftSub { @Node @Ellipse footnote }
  1695. X@RightSub {
  1696. X   @Node @Ellipse figure
  1697. X   @FirstSub { @Node @Ellipse footnote }
  1698. X}
  1699. X}}
  1700. Xwhich shows that the body text contains a footnote and a figure, the
  1701. Xlatter itself containing a footnote.  Considering points of appearance
  1702. Xonly gives a completely different, dynamic tree:
  1703. X@ID @I @Fig margin { 0.3c } { @Tree {
  1704. X@Node @Ellipse { sequence of pages }
  1705. X@FirstSub { @Node @Ellipse { body text } }
  1706. X@NextSub  { @Node @Ellipse { footnote  } }
  1707. X@NextSub  { @Node @Ellipse { figure    } }
  1708. X@NextSub  { @Node @Ellipse { footnote  } }
  1709. X}}
  1710. XThe tree can be deeper, for example with sections appearing within
  1711. Xchapters which appear within the body text, which appears within the
  1712. Xfinal sequence of pages.  Document formatting languages generally shirk
  1713. Xthe issues raised by this dual tree structure, by making the dynamic
  1714. Xtree built-in, by limiting one or both trees to two levels, and so on,
  1715. Xproviding a classic example of the impoverishing effect of failing to
  1716. Xpermit language features to attain their natural level of generality.
  1717. X@PP
  1718. XWe are thus led to propose a second abstraction for document formatting,
  1719. Xwhich we name the @I galley in recognition of its similarity to the
  1720. Xgalleys used in manual typesetting.  A galley consists of an object (such
  1721. Xas a footnote) together with a sequence of places where that object may
  1722. Xappear (such as the bottoms of the current and following pages).  Splitting
  1723. Xoccurs quite naturally when space at any place is insufficient to hold
  1724. Xthe entire object.
  1725. X@PP
  1726. XIn Lout, a footnote galley and its place of appearance are defined
  1727. Xas follows:
  1728. X@ID @Code {
  1729. X"def @FootPlace { @Galley }"
  1730. X""
  1731. X"def @FootNote into { @FootPlace&&following }"
  1732. X"    right x"
  1733. X"{ x }"
  1734. X}
  1735. XThe @Code "@FootPlace" symbol contains the special symbol {@Code "@Galley"},
  1736. Xindicating that it is a point of appearance for a galley.  By placing
  1737. Xinvocations of @Code "@FootPlace" at the bottoms of pages, as in Section
  1738. X{@NumberOf recursion}, we define the desired points of appearance for
  1739. Xfootnotes.  Symbols whose body contains @Code "@Galley" either directly
  1740. Xor indirectly are called receptive symbols, meaning receptive to
  1741. Xgalleys, and they are expanded only on demand.  The effect of the
  1742. X@Code "into" clause is to make each invocation of @Code "@FootNote" a
  1743. Xgalley whose object is the result of the invocation in the usual way,
  1744. Xand whose sequence of points of appearance is specified by the @Code "into"
  1745. Xclause; in this example, the sequence of all @Code "@FootPlace" symbols
  1746. Xfollowing the invocation point.
  1747. X@PP
  1748. XLout permits galleys to be invoked within other galleys to arbitrary
  1749. Xdepth, so that one may have footnotes within figures within the body
  1750. Xtext galley, for example, creating arbitrary static trees.  Receptive
  1751. Xsymbols like @Code "@FootPlace" may appear within any galley, creating
  1752. Xarbitrary dynamic trees as well.  The root of the dynamic tree, which
  1753. Xwould normally consist of the sequence of pages of the complete assembled
  1754. Xdocument, is considered to be a galley whose point of appearance is the 
  1755. Xoutput file.  Points of appearance may be @Code preceding or @Code following
  1756. Xthe invocation point; entries in tables of contents are the main users
  1757. Xof {@Code preceding}.
  1758. X@PP
  1759. XThe galley abstraction is adequate for all of the applications listed at
  1760. Xthe beginning of this section, except that there is no provision for
  1761. Xsorting index entries and references.  Sorting of galleys has been added
  1762. Xto Lout as a built-in feature, invoked by adding a special @Code "@Key"
  1763. Xparameter to the galleys, and using its value as the sort key.  The author
  1764. Xwas at a loss to find any other way, or any useful generalization of this
  1765. Xfeature.  Its implementation will be discussed in Section
  1766. X{@NumberOf cross.impl}.
  1767. X@End @SubSection
  1768. END_OF_FILE
  1769.   if test 6118 -ne `wc -c <'lout/doc/tr.impl/s5.1'`; then
  1770.     echo shar: \"'lout/doc/tr.impl/s5.1'\" unpacked with wrong size!
  1771.   fi
  1772.   # end of 'lout/doc/tr.impl/s5.1'
  1773. fi
  1774. if test -f 'lout/doc/tr.lout/ch2.01' -a "${1}" != "-c" ; then 
  1775.   echo shar: Will not clobber existing file \"'lout/doc/tr.lout/ch2.01'\"
  1776. else
  1777.   echo shar: Extracting \"'lout/doc/tr.lout/ch2.01'\" \(6076 characters\)
  1778.   sed "s/^X//" >'lout/doc/tr.lout/ch2.01' <<'END_OF_FILE'
  1779. X@Section
  1780. X  @Tag { lexical }
  1781. X  @Title { Lexical structure (words, spaces, symbols) and macros }
  1782. X@Begin
  1783. X@PP
  1784. XThe input to Lout consists of a sequence of @I {textual units},
  1785. Xtextual.unit @Index {Textual unit }
  1786. Xwhich may be
  1787. Xeither {@I{white spaces}},
  1788. X@I identifiers,
  1789. X@I delimiters,
  1790. Xor
  1791. X@I {literal words}.  Each
  1792. Xis a sequence of @I characters chosen from:
  1793. Xletter @Index { Letter character }
  1794. Xpunctuation @Index { Punctuation character }
  1795. Xquote @Index { Quote character }
  1796. Xescape @Index { Escape character }
  1797. Xcomment.char @Index { Comment character }
  1798. X@ID @Tab
  1799. X    vmargin { 0.5vx }
  1800. X    @Fmta { @Col A ! @Col B }
  1801. X{
  1802. X@Rowa A { letter      } B { @Code "@ab-zAB-Z" }
  1803. X@Rowa A { punctuation } B { @Code "!$%&'()*+,-./0123456789:;<=>?[]^_`{|}~" }
  1804. X@Rowa A { white space } B { @I { space  tab  newline } }
  1805. X@Rowa A { quote       } B { @Code "\"" }
  1806. X@Rowa A { escape      } B { @Code "\\" }
  1807. X@Rowa A { comment     } B { @Code "#" }
  1808. X}
  1809. XNotice that @Code "@" is classed as a letter, and the ten digits as
  1810. Xpunctuation characters.
  1811. X@PP
  1812. XA @I {white space} is a sequence of one or more white space characters.
  1813. Xwhite.space @Index { White space }
  1814. Xspace.f @Index { Space }
  1815. X@PP
  1816. XAn @I identifier is a sequence of one or more letters which is the name of a
  1817. Xidentifier @Index { Identifier }
  1818. Xsymbol.  It is conventional but not essential to begin identifiers with
  1819. X{@Code "@"};  Basser Lout will print a warning message if it finds an
  1820. Xunquoted literal word (see below) beginning with {@Code "@"}, since such
  1821. Xwords are usually misspelt identifiers.  The complete list of predefined
  1822. Xidentifiers is
  1823. X@ID @Code {
  1824. X{     "@Begin"
  1825. X  @JL "@Break"
  1826. X  @JL "@Case"
  1827. X  @JL "@Database"
  1828. X  @JL "@End"
  1829. X  @JL "@Font"
  1830. X  @JL "@Galley"
  1831. X  @JL "@Graphic"
  1832. X  @JL "@HAdjust"
  1833. X  @JL "@HContract"
  1834. X  @JL "@HExpand"
  1835. X  @JL "@High"
  1836. X  @JL "@HScale"
  1837. X  @JL "@Include"
  1838. X  @JL "@IncludeGraphic"
  1839. X} |4.4cx {
  1840. X      "@Key"
  1841. X  @JL "@LClos"
  1842. X  @JL "@LEnv"
  1843. X  @JL "@LInput"
  1844. X  @JL "@LVis"
  1845. X  @JL "@Moment"
  1846. X  @JL "@Next"
  1847. X  @JL "@Null"
  1848. X  @JL "@OneCol"
  1849. X  @JL "@OneRow"
  1850. X  @JL "@Open"
  1851. X  @JL "@PAdjust"
  1852. X  @JL "@PrependGraphic"
  1853. X  @JL "@Rotate"
  1854. X  @JL "@Scale"
  1855. X} |4.4cx {
  1856. X      "@Space"
  1857. X  @JL "@SysDatabase"
  1858. X  @JL "@SysInclude"
  1859. X  @JL "@SysIncludeGraphic"
  1860. X  @JL "@SysPrependGraphic"
  1861. X  @JL "@Tag"
  1862. X  @JL "@Tagged"
  1863. X  @JL "@Use"
  1864. X  @JL "@VAdjust"
  1865. X  @JL "@VContract"
  1866. X  @JL "@VExpand"
  1867. X  @JL "@VScale"
  1868. X  @JL "@Wide"
  1869. X  @JL "@Yield"
  1870. X}
  1871. X}
  1872. Xplus the names of the parameters of @@Moment.  The symbols @@LClos, @@LEnv,
  1873. Xlclos@Index { @@LClos symbol }
  1874. Xlenv @Index { @@LEnv symbol }
  1875. Xlinput @Index { @@LInput symbol }
  1876. Xlvis @Index { @@LVis symbol }
  1877. X@@LInput, and @@LVis appear in cross reference databases generated by Lout
  1878. Xand are not for use elsewhere.
  1879. X@PP
  1880. XA @I delimiter is a sequence of one or more punctuation characters which
  1881. Xdelimiter @Index { Delimiter }
  1882. Xis the name of a symbol.  For example, @Code "{" and @Code
  1883. X"//" are delimiters.  When defining a delimiter, the name must be enclosed
  1884. Xin quotes:
  1885. X@ID @Code {
  1886. X"def  \"^\"  { {}  ^&  {} }"
  1887. X}
  1888. Xbut quotes are not used when the delimiter is invoked.  A delimiter may
  1889. Xhave other delimiters and punctuation and other characters adjacent,
  1890. Xwhereas identifiers may not be adjacent to letters or other
  1891. Xidentifiers.  The complete list of predefined delimiters is
  1892. X@ID @Code {
  1893. X{
  1894. X      "/"
  1895. X  @JL "//"
  1896. X  @JL "^/"
  1897. X  @JL "^//"
  1898. X} |2.2cx {
  1899. X      "|"
  1900. X  @JL "||"
  1901. X  @JL "^|"
  1902. X  @JL "^||"
  1903. X} |2.2cx {
  1904. X      "&"
  1905. X  @JL "^&"
  1906. X} |2.2cx {
  1907. X      "&&"
  1908. X  @JL "{"
  1909. X  @JL "}"
  1910. X}
  1911. X}
  1912. XA longer delimiter like @Code "<=" will be recognised in
  1913. Xpreference to a shorter one like {@Code "<"}.
  1914. X@PP
  1915. XA sequence of characters which is neither a white space, an identifier, nor a
  1916. Xdelimiter, is by default a @I {literal word}, which means that it will
  1917. Xword @Index { Word }
  1918. Xliteral.word @Index { Literal word }
  1919. Xquoted.word @Index { Quoted word }
  1920. Xpass through Lout unchanged.  An arbitrary sequence of characters
  1921. Xenclosed in double quotes, for example @Code "\"{  }\"", is also a
  1922. Xliteral word.  Space characters may be included, but not tabs or
  1923. Xnewlines.  There are special character sequences, used only between
  1924. Xquotes, for obtaining otherwise inaccessible characters:
  1925. X@ID @Tab
  1926. X   vmargin { 0.5vx }
  1927. X   @Fmta { @Col A ! @Col B }
  1928. X{
  1929. X@Rowa A { @Code "\\\""   } B { produces @Code "\"" }
  1930. X@Rowa A { @Code "\\\\"   } B { "\\" }
  1931. X@Rowa A { @Code "\\ddd"  } B { the character whose ASCII code }
  1932. X@Rowa A {                } B { the up to three digit octal number {@Code ddd} }
  1933. X}
  1934. XSo, for example, @Code "\"\\\"@PP\\\"\"" produces {@Code "\"@PP\""}.
  1935. X@PP
  1936. XWhen the comment character
  1937. Xcomment @Index { Comment }
  1938. X@Code "#" is encountered, everything from
  1939. Xthat point to the end of the line is ignored.  This is useful for
  1940. Xincluding reminders to oneself, like this:
  1941. X@ID @Code {
  1942. X"# Lout user manual"
  1943. X"# J. Kingston, June 1989"
  1944. X}
  1945. Xfor temporarily deleting parts of the document, and so on.
  1946. X@PP
  1947. X@I Macros
  1948. Xmacro @Index { Macro }
  1949. Xprovide a means of defining symbols which stand for a
  1950. Xsequence of textual units rather than an object.  For example, the macro
  1951. Xdefinition
  1952. X@ID @Code {
  1953. X"macro  @PP  {  //1.3vx  2.0f @Wide  &0i }"
  1954. X}
  1955. Xmakes Lout replace the symbol @Code "@PP" by the given textual units
  1956. Xbefore assembling its input into objects.  A similar macro to this
  1957. Xone is used to separate the paragraphs of the present document.  The
  1958. Xenclosing braces and any spaces adjacent to them are dropped, which can
  1959. Xbe a problem:  @Code "@PP2i" has result {@Code "//1.3vx 2.0f @Wide &0i2i"}
  1960. Xwhich is erroneous.
  1961. X@PP
  1962. XThe meaning of symbols used within the body of a macro is determined by
  1963. Xwhere the macro is defined, not by where it is used.  Due to implementation
  1964. Xproblems, @@Open symbols will not work within macros.  Named and body
  1965. Xparameters will work if the symbol that they are parameters of is also
  1966. Xpresent.  There is no way to get a left or right brace into the body of
  1967. Xa macro without the matching brace.
  1968. X@PP
  1969. XMacros may be nested within other definitions and exported, but they may
  1970. Xnot be parameters.  They may not have parameters or nested definitions
  1971. Xof their own, and consequently a preceding @Code export clause (Section
  1972. X{@NumberOf visibility}) would be pointless; however, an @Code import
  1973. Xclause is permitted.
  1974. X@End @Section
  1975. END_OF_FILE
  1976.   if test 6076 -ne `wc -c <'lout/doc/tr.lout/ch2.01'`; then
  1977.     echo shar: \"'lout/doc/tr.lout/ch2.01'\" unpacked with wrong size!
  1978.   fi
  1979.   # end of 'lout/doc/tr.lout/ch2.01'
  1980. fi
  1981. if test -f 'lout/doc/tr.lout/ch2.05' -a "${1}" != "-c" ; then 
  1982.   echo shar: Will not clobber existing file \"'lout/doc/tr.lout/ch2.05'\"
  1983. else
  1984.   echo shar: Extracting \"'lout/doc/tr.lout/ch2.05'\" \(5248 characters\)
  1985.   sed "s/^X//" >'lout/doc/tr.lout/ch2.05' <<'END_OF_FILE'
  1986. X@Section
  1987. X   @Title { The style and size of objects }
  1988. X   @Tag { size }
  1989. X@Begin
  1990. X@PP
  1991. XThis section explains how Lout determines the style and size of each
  1992. Xobject.  Together, these attributes determine the object's final
  1993. Xappearance in the output.
  1994. Xstyle @Index { Style of an object }
  1995. X@PP
  1996. XThe style of an object comprises the following:
  1997. X@BulletList
  1998. X@ListItem { Which font family, face and size to use (also defining the
  1999. X@Code f unit); }
  2000. X@ListItem { What gap to replace a single space between two objects by (also
  2001. Xdefining the @Code s unit); }
  2002. X@ListItem { The kind of paragraph breaking to employ ({@Code adjust},
  2003. X{@Code ragged}, etc.) }
  2004. X@ListItem { What gap to insert between the lines of paragraphs
  2005. X(also defining the @Code v unit); }
  2006. X@ListItem { Whether to permit hyphenation or not. }
  2007. X@EndList
  2008. XThe style of an object depends on where it appears in the final
  2009. Xdocument.  For example, the style of a parameter depends on where it is
  2010. Xused; the style of a galley is the style of the first target that it
  2011. Xattempts to attach itself to.  Of course, the style of any object can be
  2012. Xchanged by using the @@Font, @@Space, and @@Break symbols.
  2013. X@PP
  2014. XThere are no standard default values for style.  Instead one must ensure
  2015. Xthat the root galley or each of its components is enclosed in @@Font
  2016. Xand @@Break symbols.  From there the style is passed to incoming galleys
  2017. Xand the objects within them.
  2018. X@PP
  2019. Xwidth. @Index { Width of an object }
  2020. Xheight. @Index { Height of an object }
  2021. Xsize. @Index { Size of an object }
  2022. XThe remainder of this section explains how the size of each object (its
  2023. Xwidth and height on the printed page) is determined.  We will treat width
  2024. Xonly, since height is determined in exactly the same way, except that the
  2025. Xcomplications introduced by paragraph breaking are absent.
  2026. X@PP
  2027. XWith three exceptions (see below), the width of an object is as large as
  2028. Xit possibly could be without violating a @@Wide symbol or intruding into
  2029. Xthe space occupied by neighbouring gaps or objects.  As an aid to
  2030. Xinvestigating this rule, we will use the definition
  2031. X@ID @Code {
  2032. X"def @Box right x"
  2033. X"{"
  2034. X"  \"0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath stroke\""
  2035. X"  @Graphic x"
  2036. X"}"
  2037. X}
  2038. Xwhich draws a box around the boundary of its right parameter (Section
  2039. X{@NumberOf graphic}).  The result of
  2040. X@ID @Code {
  2041. X"5c @Wide @Box metempsychosis"
  2042. X}
  2043. Xis
  2044. X@ID {
  2045. X5c @Wide @Box metempsychosis
  2046. X}
  2047. XThe widest that @Code "@Box metempsychosis" could possibly be is five
  2048. Xcentimetres, and accordingly that is its width.  The same applies to
  2049. X{@Code metempsychosis}, which is five centimetres wide as well.  Note
  2050. Xcarefully that there is no object in this example whose width is equal
  2051. Xto the sum of the widths of the letters of {@Code metempsychosis}.
  2052. X@PP
  2053. XThe first of the three exceptions to the `as wide as possible' rule is the
  2054. X@@HContract symbol, which causes the width of its right parameter to be
  2055. Xreduced to a reasonable minimum (a formal definition will not be attempted):
  2056. X@ID @Code {
  2057. X"5c @Wide @HContract @Box metempsychosis"
  2058. X}
  2059. Xproduces
  2060. X@ID {
  2061. X5c @Wide @HContract @Box metempsychosis
  2062. X}
  2063. XThe object @Code "@HContract @Box metempsychosis" is still five centimetres
  2064. Xwide, but the object @Code "@Box metempsychosis" has been reduced.
  2065. X@PP
  2066. XThe second of the three exceptions is the horizontal concatenation symbol
  2067. X@Code "|" (and also {@Code "&"}).  Consider this example:
  2068. X@ID @Code {
  2069. X"5c @Wide @Box { A  |1c  B  |1c  C }"
  2070. X}
  2071. XAs usual, the right parameter of @@Wide is five centimetres wide, and
  2072. Xthe result looks like this:
  2073. X@ID {
  2074. X5c @Wide @Box { A  |1c  B  |1c  C }
  2075. X}
  2076. XLout has to apportion the size minus inter-column gaps among the three
  2077. Xcolumns.
  2078. X@PP
  2079. XIf the columns are wide enough to require paragraph breaking, Lout will
  2080. Xassign sizes to the columns in such a way as to leave narrow columns
  2081. Xunbroken and break wider columns to equal width, occupying the full
  2082. Xsize.  Otherwise, paragraph breaking is not required, and each column
  2083. Xwill be assigned a reasonable minimum size in the manner of @@HContract,
  2084. Xexcept that the last column receives all the leftover width.  For example,
  2085. X@ID @Code {
  2086. X"5c @Wide { @Box A  |1c  @Box B  |1c  @Box C }"
  2087. X}
  2088. Xhas result
  2089. X@ID {
  2090. X5c @Wide { @Box A  |1c  @Box B  |1c  @Box C }
  2091. X}
  2092. XIf it is desired that the leftover width remain unused, rather than
  2093. Xgoing into the last column, an empty column can be appended, or the last
  2094. Xcolumn can be enclosed in @@HContract.  Two other ways to apportion the
  2095. Xleftover width are provided by the @@HExpand and @@HAdjust symbols
  2096. X(Sections {@NumberOf hexpand} and {@NumberOf hadjust}).
  2097. X@PP
  2098. XThe third and final exception to the `as wide as possible' rule concerns
  2099. Xthe components of the root galley.  Each is considered to be enclosed
  2100. Xroot.galley.size @SubIndex { size of components of }
  2101. Xin @@HContract and @@VContract symbols.
  2102. X@PP
  2103. XUp to this point we have treated width as a single quantity, but of
  2104. Xcourse it has two parts:  width to left and right of the mark.  The
  2105. X`as wide as possible' rule applies to both directions:
  2106. X@ID @Code {
  2107. X"@HContract { @Box 953^.05 /0.5c @Box 2^.8286 }"
  2108. X}
  2109. Xhas result
  2110. X@ID {
  2111. X@HContract { @Box 953^.05 /0.5c @Box 2^.8286 }
  2112. X}
  2113. XLeftover width usually goes to the right, as we have seen, but here some
  2114. Xwidth was available only to the left of {@Code "2.8286"} owing to the
  2115. Xcolumn mark alignment.
  2116. X@End @Section
  2117. END_OF_FILE
  2118.   if test 5248 -ne `wc -c <'lout/doc/tr.lout/ch2.05'`; then
  2119.     echo shar: \"'lout/doc/tr.lout/ch2.05'\" unpacked with wrong size!
  2120.   fi
  2121.   # end of 'lout/doc/tr.lout/ch2.05'
  2122. fi
  2123. if test -f 'lout/doc/tr.lout/ch3.07' -a "${1}" != "-c" ; then 
  2124.   echo shar: Will not clobber existing file \"'lout/doc/tr.lout/ch3.07'\"
  2125. else
  2126.   echo shar: Extracting \"'lout/doc/tr.lout/ch3.07'\" \(977 characters\)
  2127.   sed "s/^X//" >'lout/doc/tr.lout/ch3.07' <<'END_OF_FILE'
  2128. X@Section
  2129. X   @Title { "@Wide" and "@High" }
  2130. X   @Tag { wide }
  2131. X@Begin
  2132. X@PP
  2133. XThe @@Wide symbol
  2134. Xwide.sym @Index { @@Wide symbol }
  2135. Xreturns its right parameter modified to have the width given by its left
  2136. Xparameter, which must be a length (Section {@NumberOf concatenation})
  2137. Xwhose unit of measurement is {@Code "c"}, {@Code "i"}, {@Code "p"},
  2138. X{@Code "m"}, {@Code "f"}, {@Code "s"}, or {@Code "v"}.  If the right
  2139. Xparameter is not as wide as required, white space is added at the right;
  2140. Xif it is too wide, its paragraphs are broken (Section {@NumberOf break})
  2141. Xso that it fits.  A @@OneCol operation is included in the effect of @@Wide,
  2142. Xsince it does not make sense for an object of fixed width to have two column
  2143. Xmarks.
  2144. X@PP
  2145. Xhigh.sym @Index { @@High symbol }
  2146. XThe @@High symbol similarly ensures that its result is of a given height,
  2147. Xby adding white space at the bottom.  In this case it is an error for the
  2148. Xright parameter to be too large.  A @@OneRow operation is included.
  2149. X@End @Section
  2150. END_OF_FILE
  2151.   if test 977 -ne `wc -c <'lout/doc/tr.lout/ch3.07'`; then
  2152.     echo shar: \"'lout/doc/tr.lout/ch3.07'\" unpacked with wrong size!
  2153.   fi
  2154.   # end of 'lout/doc/tr.lout/ch3.07'
  2155. fi
  2156. if test -f 'lout/z32.c' -a "${1}" != "-c" ; then 
  2157.   echo shar: Will not clobber existing file \"'lout/z32.c'\"
  2158. else
  2159.   echo shar: Extracting \"'lout/z32.c'\" \(5594 characters\)
  2160.   sed "s/^X//" >'lout/z32.c' <<'END_OF_FILE'
  2161. X/*@z32.c:Counter Service:Next()@**********************************************/
  2162. X/*                                                                           */
  2163. X/*  LOUT: A HIGH-LEVEL LANGUAGE FOR DOCUMENT FORMATTING (VERSION 2.03)       */
  2164. X/*  COPYRIGHT (C) 1993 Jeffrey H. Kingston                                   */
  2165. X/*                                                                           */
  2166. X/*  Jeffrey H. Kingston (jeff@cs.su.oz.au)                                   */
  2167. X/*  Basser Department of Computer Science                                    */
  2168. X/*  The University of Sydney 2006                                            */
  2169. X/*  AUSTRALIA                                                                */
  2170. X/*                                                                           */
  2171. X/*  This program is free software; you can redistribute it and/or modify     */
  2172. X/*  it under the terms of the GNU General Public License as published by     */
  2173. X/*  the Free Software Foundation; either version 1, or (at your option)      */
  2174. X/*  any later version.                                                       */
  2175. X/*                                                                           */
  2176. X/*  This program is distributed in the hope that it will be useful,          */
  2177. X/*  but WITHOUT ANY WARRANTY; without even the implied warranty of           */
  2178. X/*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            */
  2179. X/*  GNU General Public License for more details.                             */
  2180. X/*                                                                           */
  2181. X/*  You should have received a copy of the GNU General Public License        */
  2182. X/*  along with this program; if not, write to the Free Software              */
  2183. X/*  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.                */
  2184. X/*                                                                           */
  2185. X/*  FILE:         z32.c                                                      */
  2186. X/*  MODULE:       Counter Service                                            */
  2187. X/*  EXTERNS:      Next()                                                     */
  2188. X/*                                                                           */
  2189. X/*****************************************************************************/
  2190. X#include "externs"
  2191. X#define isdigit(x)    ( (x) >= '0' && (x) <= '9' )
  2192. X
  2193. X/*****************************************************************************/
  2194. X/*                                                                           */
  2195. X/*  OBJECT Next(x, inc, done)                                                */
  2196. X/*                                                                           */
  2197. X/*  Return x with its value incremented by inc (if possible).                */
  2198. X/*  Set *done to TRUE if successful, leave *done unchanged otherwise.        */
  2199. X/*                                                                           */
  2200. X/*****************************************************************************/
  2201. X
  2202. XOBJECT Next(x, inc, done)
  2203. XOBJECT x; int inc; BOOLEAN *done;
  2204. X{ OBJECT y, link;  int l, r, n, len;
  2205. X  unsigned char buff[MAX_LINE + 1];
  2206. X  debug3(DCS, DD, "Next( %s, %d, %s )", EchoObject(null, x), inc, bool(*done));
  2207. X  switch( type(x) )
  2208. X  {
  2209. X    case WORD:
  2210. X    
  2211. X      len = strlen(string(x));
  2212. X      for( r = len - 1;  r >= 0 && !isdigit(string(x)[r]);  r--);
  2213. X      if( r < 0 ) break;
  2214. X      for( l = r-1;  l >= 0 && isdigit(string(x)[l]);  l-- );
  2215. X      sscanf(&string(x)[l+1], "%d", &n);
  2216. X      string(x)[l+1] = '\0';
  2217. X      sprintf(buff, "%s%d%s", string(x), n+inc, &string(x)[r+1]);
  2218. X      if( strlen(buff) >= MAX_LINE )
  2219. X    Error(FATAL, &fpos(x), "word %s is too long", buff);
  2220. X      y = MakeWord(buff, &fpos(x));
  2221. X      word_font(y) = word_font(x);
  2222. X      MergeNode(y, x);  x = y;
  2223. X      *done = TRUE;
  2224. X      break;
  2225. X
  2226. X
  2227. X    case INCGRAPHIC:
  2228. X    case SINCGRAPHIC:
  2229. X    case GAP_OBJ:
  2230. X    case CLOSURE:
  2231. X    case NULL_CLOS:
  2232. X    case CROSS:
  2233. X    
  2234. X      break;
  2235. X
  2236. X
  2237. X    case ONE_COL:
  2238. X    case ONE_ROW:
  2239. X    case WIDE:
  2240. X    case HIGH:
  2241. X    case HCONTRACT:
  2242. X    case VCONTRACT:
  2243. X    case HEXPAND:
  2244. X    case VEXPAND:
  2245. X    case PADJUST:
  2246. X    case HADJUST:
  2247. X    case VADJUST:
  2248. X    case HSCALE:
  2249. X    case VSCALE:
  2250. X    case ROTATE:
  2251. X    case SCALE:
  2252. X    case SPLIT:
  2253. X    case GRAPHIC:
  2254. X    
  2255. X      Child(y, LastDown(x));
  2256. X      y = Next(y, inc, done);
  2257. X      break;
  2258. X
  2259. X
  2260. X    case ACAT:
  2261. X    
  2262. X      /* ***
  2263. X      x = ReplaceWithTidy(x);
  2264. X      *** */
  2265. X      if( type(x) == WORD )
  2266. X      {    len = strlen(string(x));
  2267. X    for( r = len-1; r >= 0 && !isdigit(string(x)[r]); r--);
  2268. X    if( r < 0 ) break;
  2269. X    for( l = r-1;  l >= 0 && isdigit(string(x)[l]);  l-- );
  2270. X    sscanf(&string(x)[l+1], "%d", &n);
  2271. X    string(x)[l+1] = '\0';
  2272. X    sprintf(buff,"%s%d%s",string(x),n+inc,&string(x)[r+1]);
  2273. X    y = MakeWord(buff, &fpos(x));
  2274. X    word_font(y) = word_font(x);
  2275. X    MergeNode(y, x);  x = y;
  2276. X    *done = TRUE;
  2277. X      }
  2278. X      else
  2279. X      {    assert( type(x) == ACAT, "Next: ACAT!" );
  2280. X    link = LastDown(x);
  2281. X    while( link != x && !*done )
  2282. X    { Child(y, link);
  2283. X      if( is_index(type(y)) )  continue;
  2284. X      y = Next(y, inc, done);
  2285. X      if( !*done )  link = PrevDown(link);
  2286. X    }
  2287. X      }
  2288. X      break;
  2289. X
  2290. X
  2291. X    case COL_THR:
  2292. X    case ROW_THR:
  2293. X    case HCAT:
  2294. X    case VCAT:
  2295. X    
  2296. X      link = LastDown(x);
  2297. X      while( link != x && !*done )
  2298. X      {    Child(y, link);
  2299. X    if( is_index(type(y)) )  continue;
  2300. X    y = Next(y, inc, done);
  2301. X    if( !*done )  link = PrevDown(link);
  2302. X      }
  2303. X      break;
  2304. X
  2305. X
  2306. X    default:
  2307. X    
  2308. X      Error(INTERN,&fpos(x), "Next: type(x) = %s", Image(type(x)));
  2309. X      break;
  2310. X
  2311. X  } /* end switch */
  2312. X  debug1(DCS, DD, "Next returning %s", EchoObject(null, x));
  2313. X  return x;
  2314. X} /* end Next */
  2315. END_OF_FILE
  2316.   if test 5594 -ne `wc -c <'lout/z32.c'`; then
  2317.     echo shar: \"'lout/z32.c'\" unpacked with wrong size!
  2318.   fi
  2319.   # end of 'lout/z32.c'
  2320. fi
  2321. if test -f 'lout/z34.c' -a "${1}" != "-c" ; then 
  2322.   echo shar: Will not clobber existing file \"'lout/z34.c'\"
  2323. else
  2324.   echo shar: Extracting \"'lout/z34.c'\" \(5705 characters\)
  2325.   sed "s/^X//" >'lout/z34.c' <<'END_OF_FILE'
  2326. X/*@z34.c:Rotation Service:RotateSize()@***************************************/
  2327. X/*                                                                           */
  2328. X/*  LOUT: A HIGH-LEVEL LANGUAGE FOR DOCUMENT FORMATTING (VERSION 2.03)       */
  2329. X/*  COPYRIGHT (C) 1993 Jeffrey H. Kingston                                   */
  2330. X/*                                                                           */
  2331. X/*  Jeffrey H. Kingston (jeff@cs.su.oz.au)                                   */
  2332. X/*  Basser Department of Computer Science                                    */
  2333. X/*  The University of Sydney 2006                                            */
  2334. X/*  AUSTRALIA                                                                */
  2335. X/*                                                                           */
  2336. X/*  This program is free software; you can redistribute it and/or modify     */
  2337. X/*  it under the terms of the GNU General Public License as published by     */
  2338. X/*  the Free Software Foundation; either version 1, or (at your option)      */
  2339. X/*  any later version.                                                       */
  2340. X/*                                                                           */
  2341. X/*  This program is distributed in the hope that it will be useful,          */
  2342. X/*  but WITHOUT ANY WARRANTY; without even the implied warranty of           */
  2343. X/*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            */
  2344. X/*  GNU General Public License for more details.                             */
  2345. X/*                                                                           */
  2346. X/*  You should have received a copy of the GNU General Public License        */
  2347. X/*  along with this program; if not, write to the Free Software              */
  2348. X/*  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.                */
  2349. X/*                                                                           */
  2350. X/*  FILE:         z34.c                                                      */
  2351. X/*  MODULE:       Rotation Service                                           */
  2352. X/*  EXTERNS:      RotateSize()                                               */
  2353. X/*                                                                           */
  2354. X/*****************************************************************************/
  2355. X#include <math.h>
  2356. X#ifndef M_PI
  2357. X#define M_PI       3.1415926535897931160E0
  2358. X#endif
  2359. X#include "externs"
  2360. X
  2361. Xtypedef struct { double x, y;          } rect_coord;
  2362. Xtypedef struct { double angle, radius; } polar_coord;
  2363. X
  2364. X#define rect_to_polar(rect, polar)                \
  2365. Xpolar.angle = atan2(rect.y, rect.x),                \
  2366. Xpolar.radius = sqrt(rect.x*rect.x + rect.y*rect.y)
  2367. X
  2368. X#define polar_to_rect(polar, rect)                \
  2369. Xrect.x = polar.radius * cos(polar.angle),            \
  2370. Xrect.y = polar.radius * sin(polar.angle)
  2371. X
  2372. X
  2373. X/*****************************************************************************/
  2374. X/*                                                                           */
  2375. X/*  RotateSize(xcb, xcf, xrb, xrf, y, theta)                                 */
  2376. X/*                                                                           */
  2377. X/*  Calculate the size of x, assuming that it is y rotated by theta degrees. */
  2378. X/*                                                                           */
  2379. X/*****************************************************************************/
  2380. X
  2381. XRotateSize(xcb, xcf, xrb, xrf, y, theta)
  2382. XLENGTH *xcb, *xcf, *xrb, *xrf;  OBJECT y;  LENGTH theta;
  2383. X{ rect_coord ycorners[4], xcorner;  polar_coord pol;
  2384. X  double maxx, maxy, minx, miny, ang;  int i;
  2385. X  unsigned char buff1[20], buff2[20];
  2386. X
  2387. X  /* calculate theta in radians */
  2388. X  ang = (double) theta * 2 * M_PI / (double) (DG * 360);
  2389. X  ifdebug(DRS, D, sprintf(buff2, "%.1f", ang));
  2390. X  debug2(DRS, D, "RotateSize( %s, %s )", EchoObject(null, y), buff2);
  2391. X  debug4(DRS, DD, "  ycb %s, ycf %s, yrb %s, yrf %s",
  2392. X    EchoLength(back(y, COL)), EchoLength(fwd(y, COL)),
  2393. X    EchoLength(back(y, ROW)), EchoLength(fwd(y, ROW)));
  2394. X
  2395. X  /* set up coordinates of the four corners of y */
  2396. X  ycorners[0].x =   (float) fwd(y, COL);
  2397. X  ycorners[0].y =   (float) back(y, ROW);
  2398. X  ycorners[1].x = - (float) back(y, COL);
  2399. X  ycorners[1].y =   (float) back(y, ROW);
  2400. X  ycorners[2].x = - (float) back(y, COL);
  2401. X  ycorners[2].y = - (float) fwd(y, ROW);
  2402. X  ycorners[3].x =   (float) fwd(y, COL);
  2403. X  ycorners[3].y = - (float) fwd(y, ROW);
  2404. X
  2405. X  /* rotate these four corners by theta and store their extremes */
  2406. X  maxx = maxy = (float) - MAX_LEN;
  2407. X  minx = miny = (float) MAX_LEN;
  2408. X  for( i = 0;  i < 4;  i++ )
  2409. X  {    
  2410. X    if( ycorners[i].x == 0 && ycorners[i].y == 0 )
  2411. X    {    pol.radius = 0; pol.angle  = 0; }
  2412. X    else rect_to_polar(ycorners[i], pol);
  2413. X    ifdebug(DRS, DD, sprintf(buff1, "%.1f", pol.angle));
  2414. X    ifdebug(DRS, DD, sprintf(buff2, "%.1f", ang));
  2415. X    debug5(DRS, DD, "  transforming (%s, %s) -> (%s, %s) + %s",
  2416. X      EchoLength( (int) ycorners[i].x), EchoLength( (int) ycorners[i].y),
  2417. X      EchoLength( (int) pol.radius), buff1, buff2);
  2418. X    pol.angle += ang;
  2419. X    polar_to_rect(pol, xcorner);
  2420. X    ifdebug(DRS, DD, sprintf(buff1, "%.1f", pol.angle));
  2421. X    debug4(DRS, DD, "    transforming (%s, %s) -> (%s, %s)",
  2422. X      EchoLength( (int) pol.radius), buff1,
  2423. X      EchoLength( (int) xcorner.x), EchoLength( (int) xcorner.y) );
  2424. X    maxx = max(maxx, xcorner.x);    minx = min(minx, xcorner.x);
  2425. X    maxy = max(maxy, xcorner.y);    miny = min(miny, xcorner.y);
  2426. X  }
  2427. X
  2428. X  /* store sizes back into x and return */
  2429. X  *xcb = - (int) minx;    *xcf  =   (int) maxx;
  2430. X  *xrb =   (int) maxy;    *xrf  = - (int) miny;
  2431. X  debug0(DRS, D, "RotateSize returning.");
  2432. X  debug4(DRS, DD, "  xcb %s, xcf %s, xrb %s, xrf %s",
  2433. X    EchoLength(*xcb), EchoLength(*xcf),
  2434. X    EchoLength(*xrb), EchoLength(*xrf));
  2435. X} /* end RotateSize */
  2436. END_OF_FILE
  2437.   if test 5705 -ne `wc -c <'lout/z34.c'`; then
  2438.     echo shar: \"'lout/z34.c'\" unpacked with wrong size!
  2439.   fi
  2440.   # end of 'lout/z34.c'
  2441. fi
  2442. echo shar: End of archive 26 \(of 30\).
  2443. cp /dev/null ark26isdone
  2444. MISSING=""
  2445. 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
  2446.     if test ! -f ark${I}isdone ; then
  2447.     MISSING="${MISSING} ${I}"
  2448.     fi
  2449. done
  2450. if test "${MISSING}" = "" ; then
  2451.     echo You have unpacked all 30 archives.
  2452.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  2453. else
  2454.     echo You still must unpack the following archives:
  2455.     echo "        " ${MISSING}
  2456. fi
  2457. exit 0
  2458. exit 0 # Just in case...
  2459.