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

  1. Newsgroups: comp.sources.misc
  2. From: jeff@joyce.cs.su.oz.au (Jeff Kingston)
  3. Subject: v37i127:  lout - Lout document formatting system, v2, Part29/30
  4. Message-ID: <1993Jun2.030700.29254@sparky.imd.sterling.com>
  5. X-Md4-Signature: a20e64e80552f452a6303f81565af04c
  6. Sender: kent@sparky.imd.sterling.com (Kent Landfield)
  7. Organization: Sterling Software
  8. Date: Wed, 2 Jun 1993 03:07:00 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 127
  13. Archive-name: lout/part29
  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/README lout/doc/tr.begin/s05 lout/doc/tr.begin/s06
  21. #   lout/doc/tr.begin/s08 lout/doc/tr.begin/s09 lout/doc/tr.begin/s11
  22. #   lout/doc/tr.begin/s12 lout/doc/tr.eq/s0 lout/doc/tr.eq/s1
  23. #   lout/doc/tr.eq/setup lout/doc/tr.fig/s0 lout/doc/tr.fig/s1
  24. #   lout/doc/tr.fig/s7 lout/doc/tr.fig/setup lout/doc/tr.impl/s1.0
  25. #   lout/doc/tr.impl/s3.1 lout/doc/tr.impl/s3.4
  26. #   lout/doc/tr.lout/ch0.00 lout/doc/tr.lout/ch2.03
  27. #   lout/doc/tr.lout/ch3.06 lout/doc/tr.lout/ch3.08
  28. #   lout/doc/tr.lout/ch3.10 lout/doc/tr.lout/ch3.11
  29. #   lout/doc/tr.lout/ch3.13 lout/doc/tr.lout/ch3.16
  30. #   lout/doc/tr.lout/ch3.21 lout/doc/tr.lout/ch3.22
  31. #   lout/doc/tr.lout/ch3.24 lout/doc/tr.over/s0 lout/doc/tr.over/s6
  32. #   lout/doc/tr.over/s7 lout/doc/tr.tab/s0 lout/doc/tr.tab/s1
  33. #   lout/doc/tr.tab/s3 lout/doc/tr.tab/s5 lout/hyph.install
  34. #   lout/include/ft
  35. # Wrapped by kent@sparky on Sun May 30 19:44:02 1993
  36. PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin ; export PATH
  37. echo If this archive is complete, you will see the following message:
  38. echo '          "shar: End of archive 29 (of 30)."'
  39. if test -f 'lout/README' -a "${1}" != "-c" ; then 
  40.   echo shar: Will not clobber existing file \"'lout/README'\"
  41. else
  42.   echo shar: Extracting \"'lout/README'\" \(2310 characters\)
  43.   sed "s/^X//" >'lout/README' <<'END_OF_FILE'
  44. XLOUT: A HIGH-LEVEL LANGUAGE FOR DOCUMENT FORMATTING (VERSION 2.03)
  45. XCOPYRIGHT (C) 1993 Jeffrey H. Kingston
  46. X
  47. XJeffrey H. Kingston
  48. XBasser Department of Computer Science
  49. XThe University of Sydney 2006
  50. XAUSTRALIA
  51. X
  52. XTelephone (direct): 61 2 692 4216
  53. XTelephone (messages): 61 2 692 3423
  54. XEmail: jeff@cs.su.oz.au
  55. XFax: 61 2 692 3838
  56. X
  57. XThis program is free software; you can redistribute it and/or modify
  58. Xit under the terms of the GNU General Public License as published by
  59. Xthe Free Software Foundation; either version 1, or (at your option)
  60. Xany later version.
  61. X
  62. XThis program is distributed in the hope that it will be useful,
  63. Xbut WITHOUT ANY WARRANTY; without even the implied warranty of
  64. XMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  65. XGNU General Public License for more details.
  66. X
  67. XYou should have received a copy of the GNU General Public License
  68. X(file gnu.gpl in this directory); if not, write to the Free Software
  69. XFoundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  70. X
  71. XVersion 2.xx is not completely upward compatible with the original October
  72. X1991 release.  The Lout base language semantics have changed slightly (some
  73. Xobjects come out wider than they used to), but more importantly the standard
  74. Xpackages DocumentLayout, ReportLayout, and BookLayout have been coalesced
  75. Xinto one, and some changes made to some of the symbols.  This means that
  76. Xmost setup files will need to be changed.  The more specialized packages
  77. X(Tab, Eq, Fig, and Pas) are compatible with the old versions.  Apologies for
  78. Xany inconvenience caused.
  79. X
  80. X
  81. XThis directory contains everything needed to install the Lout document
  82. Xformatting system on Unix.  It contains the following directories:
  83. X
  84. X    include        Lout packages (in Lout) and hyphenation patterns file
  85. X    data           Lout databases (in Lout)
  86. X    font0          Adobe Systems font metrics (.AFM) files (ASCII)
  87. X    font1          Adobe Systems font metrics (.AFM) files (ISO-LATIN-1)
  88. X    doc            Lout documents (in Lout)
  89. X    man            Lout manual entry
  90. X
  91. Xand the following files:
  92. X
  93. X    externs z*.c   Lout source code
  94. X    gnu.gpl        A copy of the GNU General Public License
  95. X    hyph.install   Information about how to change the hyphenation patterns
  96. X    makefile       A makefile for installing Lout
  97. X
  98. XPlease see the makefile for installation instructions.
  99. END_OF_FILE
  100.   if test 2310 -ne `wc -c <'lout/README'`; then
  101.     echo shar: \"'lout/README'\" unpacked with wrong size!
  102.   fi
  103.   # end of 'lout/README'
  104. fi
  105. if test -f 'lout/doc/tr.begin/s05' -a "${1}" != "-c" ; then 
  106.   echo shar: Will not clobber existing file \"'lout/doc/tr.begin/s05'\"
  107. else
  108.   echo shar: Extracting \"'lout/doc/tr.begin/s05'\" \(2789 characters\)
  109.   sed "s/^X//" >'lout/doc/tr.begin/s05' <<'END_OF_FILE'
  110. X@Section
  111. X   @Tag { paras }
  112. X   @Title { Paragraph breaking }
  113. X@Begin
  114. X@PP
  115. XLout takes the words or other things making up a paragraph and fills
  116. Xlines with them.  If two words are separated by one space in the input,
  117. Xthey will be separated by one space in the output; two spaces in, two
  118. Xspaces out, and so on.  The end of a line counts as one space, and a tab
  119. Xcharacter as eight.  These spaces are then enlarged to remove ragged line ends.
  120. X@PP
  121. XThis process is called @I paragraph {@I breaking}, and the enlargement
  122. Xof spaces is @I {line adjustment.}  The @Code "@Break" symbol, which is
  123. Xmost commonly used with displays and list items, affects paragraph
  124. Xbreaking:
  125. X@ID @Code {
  126. X"@IndentedDisplay ragged @Break {"
  127. X"This little paragraph will appear with"
  128. X"ragged ends to its lines."
  129. X"}"
  130. X}
  131. Xhas result
  132. X@IndentedDisplay 4c @Wide ragged @Break {
  133. XThis little paragraph will appear with
  134. Xragged ends to its lines.
  135. X}
  136. Xwhen placed in a four centimetre column; line adjustment is turned
  137. Xoff.  Also available are @Code "cragged @Break" and {@Code "rragged @Break"},
  138. Xwhich centre or right-justify each line respectively after breaking.
  139. X@PP
  140. XIt is also possible to have paragraphs broken in the output at the same
  141. Xplaces they are broken in the input, using { @Code "lines @Break" }:
  142. X@ID @Code {
  143. X"@CenteredDisplay lines @Break @I {"
  144. X"Teach me to hear Mermaides singing,"
  145. X"Or to keep off envies stinging,"
  146. X"     And finde"
  147. X"     What winde"
  148. X"Serves to'advance an honest minde."
  149. X"}"
  150. X}
  151. Xhas result
  152. X@CenteredDisplay lines @Break @I {
  153. XTeach me to hear Mermaides singing,
  154. XOr to keep off envies stinging,
  155. X     And finde
  156. X     What winde
  157. XServes to'advance an honest minde.
  158. X}
  159. XWith @Code "lines @Break" it makes sense to indent individual lines in the
  160. Xinput (except the first), as shown.  To centre or right-justify each line, use
  161. X{@Code "clines @Break"} or {@PageMark clines} {@Code "rlines @Break"}.
  162. X@PP
  163. XThe usual method, where Lout fills and adjusts lines, is called
  164. X{@Code "adjust @Break"}.  It has a variant called {@Code "outdent @Break"}
  165. Xwhich inserts a small space at the beginning of each line except the first.
  166. X@PP
  167. XThe @Code "@Break" symbol also controls hyphenation:  @Code "hyphen"
  168. X@Code "@Break" turns it on, @Code "nohyphen" @Code "@Break" turns it
  169. Xoff.  For example, ragged breaking is often done without hyphenation,
  170. Xlike this:
  171. X@ID @Code {
  172. X"@ID { ragged nohyphen } @Break {"
  173. X"This little paragraph will appear with"
  174. X"ragged ends to its lines."
  175. X"}"
  176. X}
  177. XTo prevent hyphenation in the entire document, see Section
  178. X{@NumberOf changes}.  To tell Lout where you would prefer a hyphen to be 
  179. Xinserted (rarely necessary), use the @Code "&-" symbol:
  180. X@ID @Code {
  181. X"incent&-iv&-ate"
  182. X}
  183. XIf @Code "&-" occurs directly after a hyphen character, hyphenation will
  184. Xbe permitted but no extra hyphen will be inserted.
  185. X@End @Section
  186. END_OF_FILE
  187.   if test 2789 -ne `wc -c <'lout/doc/tr.begin/s05'`; then
  188.     echo shar: \"'lout/doc/tr.begin/s05'\" unpacked with wrong size!
  189.   fi
  190.   # end of 'lout/doc/tr.begin/s05'
  191. fi
  192. if test -f 'lout/doc/tr.begin/s06' -a "${1}" != "-c" ; then 
  193.   echo shar: Will not clobber existing file \"'lout/doc/tr.begin/s06'\"
  194. else
  195.   echo shar: Extracting \"'lout/doc/tr.begin/s06'\" \(1009 characters\)
  196.   sed "s/^X//" >'lout/doc/tr.begin/s06' <<'END_OF_FILE'
  197. X@Section
  198. X   @Tag { cnp }
  199. X   @Title { Conditional new page }
  200. X@Begin
  201. X@PP
  202. XOccasionally Lout will insert a page break directly following a heading,
  203. Xand this looks very poor.  The solution is to precede the heading with
  204. Xthe conditional new page symbol {@Code "@CNP"}, which checks whether
  205. Xenough space is left in the page or column for a heading and at least
  206. Xtwo lines of text.  If so, @Code "@CNP" does nothing; if not, @Code "@CNP"
  207. Xcauses a new page or column to be begun, like {@Code "@NP"}.  The recommended
  208. Xarrangement is
  209. X@ID @Code {
  210. X"end of previous part."
  211. X"@DP"
  212. X"@CNP"
  213. X"@Heading { A Heading }"
  214. X"@PP"
  215. X"First paragraph of next part ..."
  216. X}
  217. XThe @Code "@CNP" symbol should be preceded by either @Code "@DP" or
  218. X@Code "@LP", preferably {@Code "@DP"}, and this determines the amount of
  219. Xspace when the @Code "@NP" action does not occur.  In most cases it will
  220. Xbe better to use the @Code "@Section" symbol described below, which has
  221. X@Code "@CNP" included in it, rather than using @Code "@CNP" directly.
  222. X@End @Section
  223. END_OF_FILE
  224.   if test 1009 -ne `wc -c <'lout/doc/tr.begin/s06'`; then
  225.     echo shar: \"'lout/doc/tr.begin/s06'\" unpacked with wrong size!
  226.   fi
  227.   # end of 'lout/doc/tr.begin/s06'
  228. fi
  229. if test -f 'lout/doc/tr.begin/s08' -a "${1}" != "-c" ; then 
  230.   echo shar: Will not clobber existing file \"'lout/doc/tr.begin/s08'\"
  231. else
  232.   echo shar: Extracting \"'lout/doc/tr.begin/s08'\" \(1142 characters\)
  233.   sed "s/^X//" >'lout/doc/tr.begin/s08' <<'END_OF_FILE'
  234. X@Section
  235. X   @Tag { footnotes }
  236. X   @Title { Footnotes, figures, and tables }
  237. X@Begin
  238. X@PP
  239. XA footnote is created by typing
  240. X@ID @Code "@FootNote { Like this. }"
  241. Xafter the word that the footnote refers to.  It will be numbered
  242. Xautomatically and placed at the foot of the page or column;
  243. X@FootNote { Like this. }
  244. Xor, if space there is insufficient, it may start on or run onto the
  245. Xfollowing page or column.  Figures are created in a similar way:
  246. X@ID @Code {
  247. X"@Figure"
  248. X"    @Caption { Basser Lout }"
  249. X"@Fig {"
  250. X"    @Box Lout &"
  251. X"    @HArrow { 2c @Wide } &"
  252. X"    @Box PostScript"
  253. X"}"
  254. X}
  255. XThe @Code "@Figure" symbol places the figure (which in this example is
  256. Xcreated using the Fig figure drawing package [{@Ref kingston92fig}]) at
  257. Xthe top of the following column or page,
  258. X@Figure
  259. X    @Caption { Basser Lout }
  260. X@Fig {
  261. X    @Box Lout &
  262. X    @HArrow { 2c @Wide } &
  263. X    @Box PostScript
  264. X}
  265. Xlabelled by the @Code "@Caption" option and automatically numbered.  Unlike
  266. Xfootnotes, figures will not break across several pages; each figure must
  267. Xfit on one page.
  268. X@PP
  269. XTables are obtained in the same way using {@Code "@Table"} instead of
  270. X{@Code "@Figure"}.
  271. X@End @Section
  272. END_OF_FILE
  273.   if test 1142 -ne `wc -c <'lout/doc/tr.begin/s08'`; then
  274.     echo shar: \"'lout/doc/tr.begin/s08'\" unpacked with wrong size!
  275.   fi
  276.   # end of 'lout/doc/tr.begin/s08'
  277. fi
  278. if test -f 'lout/doc/tr.begin/s09' -a "${1}" != "-c" ; then 
  279.   echo shar: Will not clobber existing file \"'lout/doc/tr.begin/s09'\"
  280. else
  281.   echo shar: Extracting \"'lout/doc/tr.begin/s09'\" \(1428 characters\)
  282.   sed "s/^X//" >'lout/doc/tr.begin/s09' <<'END_OF_FILE'
  283. X@Section
  284. X   @Tag { cross }
  285. X   @Title { Cross references }
  286. X@Begin
  287. X@PP
  288. X@I {Cross references} like `see page {@PageOf cross}' are a useful feature of
  289. Xdocuments, but they are troublesome to authors, since, as the document
  290. Xis revised, the thing on page {@PageOf cross} might find itself on page
  291. X{@PageOf reportlayout} and the cross reference must be changed.  Lout has
  292. Xa simple solution to this problem:  instead of writing the page number
  293. Xdirectly, write
  294. X@ID @Code "see page {@PageOf taxinfo}"
  295. Xinstead, and at the point referred to, write
  296. X@ID @Code "Taxation {@PageMark taxinfo} ..."
  297. X@Code "{@PageMark taxinfo}" will not appear in the output, but Lout makes
  298. Xa note of the number of the page on which the word preceding it appears,
  299. Xand inserts that number in place of {@Code "{@PageOf taxinfo}"}.  Any
  300. Xsingle word may be used for the tag.
  301. X@PP
  302. XCross referencing also applies to sections, subsections, appendices,
  303. Xsubappendices, figures, tables, and numbered displays, and can supply
  304. Xboth the page on which the item begins and its number.  First, add a
  305. X@Code "@Tag" option whose value is a single word:
  306. X@ID @Code {
  307. X"@Section"
  308. X"     @Title { Cross references }"
  309. X"     @Tag { cross }"
  310. X"@Begin"
  311. X"..."
  312. X}
  313. XThis marks the page on which the section begins, so @Code "{@PageOf cross}"
  314. Xwill be {@PageOf cross} in this case.  In addition, @Code "{@NumberOf cross}"
  315. Xwill be the number of the section, in this case {@NumberOf cross}.
  316. X@End @Section
  317. END_OF_FILE
  318.   if test 1428 -ne `wc -c <'lout/doc/tr.begin/s09'`; then
  319.     echo shar: \"'lout/doc/tr.begin/s09'\" unpacked with wrong size!
  320.   fi
  321.   # end of 'lout/doc/tr.begin/s09'
  322. fi
  323. if test -f 'lout/doc/tr.begin/s11' -a "${1}" != "-c" ; then 
  324.   echo shar: Will not clobber existing file \"'lout/doc/tr.begin/s11'\"
  325. else
  326.   echo shar: Extracting \"'lout/doc/tr.begin/s11'\" \(953 characters\)
  327.   sed "s/^X//" >'lout/doc/tr.begin/s11' <<'END_OF_FILE'
  328. X@Section
  329. X   @Tag { cols }
  330. X   @Title { Multiple columns }
  331. X@Begin
  332. X@PP
  333. XDocumentLayout normally produces pages with a single column of text occupying
  334. Xthe full width.  To get multiple columns, enclose the document in
  335. X@ID @Code {
  336. X"@Doc @ColText @Begin"
  337. X"..."
  338. X"@End @ColText"
  339. X}
  340. XThis will ordinarily produce two columns per page, although we will see
  341. Xin the next section how to produce three or more.
  342. X@PP
  343. XIt is possible to start off a document with single columns and switch to
  344. Xmultiple columns later, using the following arrangement:
  345. X@ID @Code {
  346. X"@Doc @Text @Begin"
  347. X"single column part"
  348. X"@ColText @Begin"
  349. X"multiple column part"
  350. X"@End @ColText"
  351. X"@End @Text"
  352. X}
  353. XThis is the most useful combination, because switching from multiple back to
  354. Xsingle causes a new page to be begun, which generally looks poor.  Tables
  355. Xand figures are always full width, but the width of footnotes depends on
  356. Xwhether they occur within @Code "@Text" or {@Code "@ColText"}.
  357. X@End @Section
  358. END_OF_FILE
  359.   if test 953 -ne `wc -c <'lout/doc/tr.begin/s11'`; then
  360.     echo shar: \"'lout/doc/tr.begin/s11'\" unpacked with wrong size!
  361.   fi
  362.   # end of 'lout/doc/tr.begin/s11'
  363. fi
  364. if test -f 'lout/doc/tr.begin/s12' -a "${1}" != "-c" ; then 
  365.   echo shar: Will not clobber existing file \"'lout/doc/tr.begin/s12'\"
  366. else
  367.   echo shar: Extracting \"'lout/doc/tr.begin/s12'\" \(2068 characters\)
  368.   sed "s/^X//" >'lout/doc/tr.begin/s12' <<'END_OF_FILE'
  369. X@Section
  370. X   @Tag { changes }
  371. X   @Title { Changing the overall appearance }
  372. X@Begin
  373. X@PP
  374. XA few aspects of the overall appearance of the document may be changed
  375. Xby beginning with a @Code "@Document" symbol, as in the following
  376. Xexample:
  377. X@ID @Code {
  378. X"@Document"
  379. X"    @InitialFont { Times Base 12p }"
  380. X"    @InitialBreak { adjust 1.2fx }"
  381. X"    @Hyphenate { Yes }"
  382. X"    @PageNumbers { Yes }"
  383. X"    @FirstPageNumber { 1 }"
  384. X"    @Columns { Double }"
  385. X"//"
  386. X"@Text @Begin"
  387. X"..."
  388. X"@End @Text"
  389. X}
  390. XThis shows the six options available with {@Code "@Document"}, and their
  391. Xdefault values.
  392. X@PP
  393. X@Code "@InitialFont" and @Code "@InitialBreak" determine
  394. Xthe overall font and paragraph breaking style; @Code "1.2fx" means that
  395. Xthe inter-line spacing is to be 1.2 times the current font size, measured
  396. Xfrom baseline to baseline.  To get double spacing, use {@Code "2.4fx"},
  397. Xetc.  @Code "@Hyphenate" determines whether hyphenation is permitted or
  398. Xnot, and may be @Code Yes or {@Code No}.
  399. X@PP
  400. X@Code "@PageNumbers" determines whether or not page numbers will be
  401. Xprinted (but not their format), and also may be @Code Yes or {@Code No};
  402. X@Code "@FirstPageNumber" is the number given to the first page; and
  403. X@Code "@Columns" determines the number of columns that @Code "@ColText"
  404. Xproduces, and may be {@Code Single}, {@Code Double}, or {@Code Multi},
  405. Xthe last usually meaning triple.
  406. X@PP
  407. XSince there are default values for the options, it is only necessary to
  408. Xmention those options that are to be changed.  For example, to produce a
  409. Xdocument in Helvetica 10 point font with no page numbers, begin with
  410. X@ID @Code {
  411. X"@Document"
  412. X"    @InitialFont { Helvetica Base 10p }"
  413. X"    @PageNumbers { No }"
  414. X"//"
  415. X}
  416. XDisaster will ensue if the @Code "//" symbol is forgotten.  The
  417. X@Code "@Doc" symbol used previously is just an abbreviation for
  418. X{@Code "@Document //"}.
  419. X@PP
  420. XOf course, these five options only scratch the surface of the possible
  421. Xchanges that could be made.  Section {@NumberOf big.changes} explains
  422. Xhow to make many other and more radical changes to the overall appearance
  423. Xof the document.
  424. X@End @Section
  425. END_OF_FILE
  426.   if test 2068 -ne `wc -c <'lout/doc/tr.begin/s12'`; then
  427.     echo shar: \"'lout/doc/tr.begin/s12'\" unpacked with wrong size!
  428.   fi
  429.   # end of 'lout/doc/tr.begin/s12'
  430. fi
  431. if test -f 'lout/doc/tr.eq/s0' -a "${1}" != "-c" ; then 
  432.   echo shar: Will not clobber existing file \"'lout/doc/tr.eq/s0'\"
  433. else
  434.   echo shar: Extracting \"'lout/doc/tr.eq/s0'\" \(909 characters\)
  435.   sed "s/^X//" >'lout/doc/tr.eq/s0' <<'END_OF_FILE'
  436. X@Report
  437. X   @Title { Eq -- A Lout Package for Typesetting Mathematics }
  438. X   @Author { Jeffrey H. Kingston }
  439. X   @Institution { Basser Department of Computer Science
  440. XUniversity of Sydney 2006
  441. XAustralia }
  442. X   @DateLine { 22 December, 1992 }
  443. X//
  444. X
  445. X@Abstract {
  446. XThis report describes the use of Eq, a package of definitions for
  447. Xtypesetting mathematics with the Lout document formatter.  For example,
  448. X@ID @Code "@Eq { big int supp 1 on 0 ` dx over sqrt {1 - x sup 2} = pi over 2 }"
  449. Xproduces the output
  450. X@ID @Eq { big int supp 1 on 0 ` dx over sqrt {1 - x sup 2} = pi over 2 }
  451. XThe advantages of Eq include careful attention to details of spacing, a
  452. Xrepertoire of several hundred mathematical symbols, a simple syntax
  453. Xextensible by the user, and complete integration with the rest of Lout.
  454. X@PP
  455. XIn addition, this report contains an appendix describing the use of Pas,
  456. Xa package of definitions for printing Pascal programs.
  457. X}
  458. END_OF_FILE
  459.   if test 909 -ne `wc -c <'lout/doc/tr.eq/s0'`; then
  460.     echo shar: \"'lout/doc/tr.eq/s0'\" unpacked with wrong size!
  461.   fi
  462.   # end of 'lout/doc/tr.eq/s0'
  463. fi
  464. if test -f 'lout/doc/tr.eq/s1' -a "${1}" != "-c" ; then 
  465.   echo shar: Will not clobber existing file \"'lout/doc/tr.eq/s1'\"
  466. else
  467.   echo shar: Extracting \"'lout/doc/tr.eq/s1'\" \(1344 characters\)
  468.   sed "s/^X//" >'lout/doc/tr.eq/s1' <<'END_OF_FILE'
  469. X@Section
  470. X   @Title { Introduction }
  471. X@Begin
  472. X@PP
  473. XEq is a package of definitions for typesetting mathematics with the Lout
  474. Xdocument formatter [{@Ref kingston92}].  It includes several hundred
  475. Xmathematical and other special characters (including the entire PostScript
  476. X@FootNote { PostScript is a trademark of Adobe Systems, Incorporated. }
  477. XSymbol font [{@Ref adobe90}]), and a smaller number of symbols for joining
  478. Xobjects together in mathematical ways.  Eq is based on the eqn language
  479. Xof Kernighan and Cherry [{@Ref kernighan75}], with
  480. Xspacing rules similar to Knuth's @TeX formatter [{@Ref knuth84}].
  481. X@PP
  482. XTo use Eq in a Lout document, first ensure that its definition is
  483. Xincluded, either by having @Code "@SysInclude { eq }"
  484. Xin the setup file, or @Code "-ieq" on the command line.  Then, at any point
  485. Xin the document, write @Code "@Eq  {  ...  }"
  486. Xand the symbols of Eq will be available between the braces.  Any symbols
  487. Xavailable outside continue to be available inside, which means that Eq
  488. Xcan be freely mixed with standard Lout and with symbols from other
  489. Xpackages, without restriction.
  490. X@PP
  491. XIn this report we show the Lout input at the left, and its
  492. Xresult at the right:
  493. X@ID {
  494. X@Code "@Eq { {x sup 2 + y sup 2} over 2 }"
  495. X|7ct
  496. X@Eq { {x sup 2 + y sup 2} over 2 }
  497. X}
  498. XSubsequent examples will omit the enclosing {@Code "@Eq { ... }"}.
  499. X@End @Section
  500. END_OF_FILE
  501.   if test 1344 -ne `wc -c <'lout/doc/tr.eq/s1'`; then
  502.     echo shar: \"'lout/doc/tr.eq/s1'\" unpacked with wrong size!
  503.   fi
  504.   # end of 'lout/doc/tr.eq/s1'
  505. fi
  506. if test -f 'lout/doc/tr.eq/setup' -a "${1}" != "-c" ; then 
  507.   echo shar: Will not clobber existing file \"'lout/doc/tr.eq/setup'\"
  508. else
  509.   echo shar: Extracting \"'lout/doc/tr.eq/setup'\" \(1054 characters\)
  510.   sed "s/^X//" >'lout/doc/tr.eq/setup' <<'END_OF_FILE'
  511. X
  512. X######################################################
  513. X#                                                    #
  514. X#  Lout setup file for Eq paper.                     #
  515. X#                                                    #
  516. X#  Jeffrey H. Kingston                               #
  517. X#  8 June 1991                                       #
  518. X#  22 December 1992                                  #
  519. X#                                                    #
  520. X######################################################
  521. X
  522. X@SysInclude { ft  }
  523. X@SysInclude { dl  }
  524. X@SysInclude { tab }
  525. X@SysInclude { eq  }
  526. X@SysInclude { pas }
  527. X@SysInclude { fig }
  528. X
  529. X   def @TeX { T{ /0.2fo E}X }
  530. X
  531. X   def @Code
  532. X      right x
  533. X   { { Helvetica Base -1p } @Font lines @Break x
  534. X   }
  535. X
  536. X   import @Eq
  537. X   def epi { p sub i ` log sub 2 ` p sub i }
  538. X
  539. X   import @Eq
  540. X   def ep right x { p sub x ` log sub 2 ` p sub x }
  541. X
  542. X   def @Dbl left x right y
  543. X   { 1.95i @Wide
  544. X     { 1.2i @Wide { |1rt @Code x } |0.2i @Eq {non y} }
  545. X   }
  546. X
  547. X@Use { @DocumentLayout
  548. X  @AppendixGap { 1.10b }
  549. X}
  550. X
  551. X@SysDatabase @Reference { "loutrefs"  }
  552. END_OF_FILE
  553.   if test 1054 -ne `wc -c <'lout/doc/tr.eq/setup'`; then
  554.     echo shar: \"'lout/doc/tr.eq/setup'\" unpacked with wrong size!
  555.   fi
  556.   # end of 'lout/doc/tr.eq/setup'
  557. fi
  558. if test -f 'lout/doc/tr.fig/s0' -a "${1}" != "-c" ; then 
  559.   echo shar: Will not clobber existing file \"'lout/doc/tr.fig/s0'\"
  560. else
  561.   echo shar: Extracting \"'lout/doc/tr.fig/s0'\" \(1153 characters\)
  562.   sed "s/^X//" >'lout/doc/tr.fig/s0' <<'END_OF_FILE'
  563. X@Report
  564. X   @Title { Fig -- A Lout Package for Drawing Figures }
  565. X   @Author { Jeffrey H. Kingston }
  566. X   @Institution { Basser Department of Computer Science
  567. XThe University of Sydney 2006
  568. XAustralia }
  569. X   @DateLine { 22 December, 1992 }
  570. X//
  571. X
  572. X@Abstract @Begin
  573. XThis report describes the use of Fig, a package of definitions
  574. Xfor use with the Lout document formatter.  Fig draws, colours, and
  575. Xpositions arbitrary shapes made from straight lines, circular and
  576. Xelliptical arcs, and Bezier curves:
  577. X@CD @Fig
  578. X    margin { 0.2c }
  579. X{
  580. X@Frame -2p @Font
  581. X{ A:: @Ellipse { 25, 39 }
  582. X/0.3c |0.2c B:: @Ellipse { 43 } |0.1c |0.8c E:: @Box linestyle {noline} {Problem node}
  583. X/0.3c C:: @Ellipse { 40, 41 } | | D:: @Ellipse paint { light } {44, 45, 46}
  584. X}
  585. X// @Line from { A@SE } to { B@NW }
  586. X// @Line from { B@SW } to { C@NE }
  587. X// @Line from { B@SE } to { D@NW }
  588. X// @Arrow from { E@W } to { D@NE }
  589. X}
  590. XThe graphical objects may be rotated and scaled; they may enclose, and
  591. Xbe enclosed by arbitrary Lout objects (text, equations, tables, other
  592. Xgraphical objects, etc.) without restriction.  A convenient algebra of
  593. Xpoints and a method of labelling points assist positioning.
  594. X@End @Abstract
  595. END_OF_FILE
  596.   if test 1153 -ne `wc -c <'lout/doc/tr.fig/s0'`; then
  597.     echo shar: \"'lout/doc/tr.fig/s0'\" unpacked with wrong size!
  598.   fi
  599.   # end of 'lout/doc/tr.fig/s0'
  600. fi
  601. if test -f 'lout/doc/tr.fig/s1' -a "${1}" != "-c" ; then 
  602.   echo shar: Will not clobber existing file \"'lout/doc/tr.fig/s1'\"
  603. else
  604.   echo shar: Extracting \"'lout/doc/tr.fig/s1'\" \(1445 characters\)
  605.   sed "s/^X//" >'lout/doc/tr.fig/s1' <<'END_OF_FILE'
  606. X@Section
  607. X   @Title { Introduction }
  608. X@Begin
  609. X@PP
  610. XFig is a package of Lout definitions for drawing and filling in
  611. Xarbitrary shapes made from straight lines, circular and elliptical arcs,
  612. Xand Bezier curves.  Its features are smoothly integrated with the rest
  613. Xof Lout: one can rotate and concatenate objects created by Fig, draw a
  614. Xbox to fit neatly around any object, etc.  The design of Fig is based
  615. Xentirely on Brian W. Kernighan's PIC language [{@Ref kernighan82}].  The
  616. Ximplementation of Fig makes good use of the PostScript
  617. X@FootNote { PostScript is a trademark of Adobe Systems, Inc. }
  618. Xpage description language [{@Ref adobe90}], which was designed by John
  619. XWarnock and others.  Lout was designed and implemented by Jeffrey
  620. XH. Kingston [{@Ref kingston92}].
  621. X@PP
  622. XTo use Fig within a Lout document, first ensure that its definition is
  623. Xincluded, either by putting @Code "@SysInclude { fig }" at the start of
  624. Xthe document, or @Code "-ifig" on the command line.  Then, anywhere at
  625. Xall within the document, write
  626. X@ID @Code "@Fig {  ...  }"
  627. Xand the symbols of Fig will be available
  628. Xbetween the braces, which may enclose an arbitrary Lout object.  Throughout
  629. Xthis report we will show the Lout text on the left and the corresponding
  630. Xresult on the right, like this:
  631. X@ID {
  632. X@Code {
  633. X"@Fig {"
  634. X"   @Square"
  635. X"   //0.5c"
  636. X"   @Circle"
  637. X"}"
  638. X}
  639. X||7ct
  640. X@Fig {
  641. X   @Square
  642. X   //0.5c
  643. X   @Circle
  644. X}
  645. X}
  646. XSubsequent examples will omit the enclosing {@Code "@Fig"}.
  647. X@End @Section
  648. END_OF_FILE
  649.   if test 1445 -ne `wc -c <'lout/doc/tr.fig/s1'`; then
  650.     echo shar: \"'lout/doc/tr.fig/s1'\" unpacked with wrong size!
  651.   fi
  652.   # end of 'lout/doc/tr.fig/s1'
  653. fi
  654. if test -f 'lout/doc/tr.fig/s7' -a "${1}" != "-c" ; then 
  655.   echo shar: Will not clobber existing file \"'lout/doc/tr.fig/s7'\"
  656. else
  657.   echo shar: Extracting \"'lout/doc/tr.fig/s7'\" \(1067 characters\)
  658.   sed "s/^X//" >'lout/doc/tr.fig/s7' <<'END_OF_FILE'
  659. X@Section
  660. X   @Title { Errors }
  661. X@Begin
  662. X@PP
  663. XLout normally produces an output file that will print without mishap on
  664. Xany PostScript device.  However, some of the options of Fig's symbols
  665. Xare passed through Lout to the output file without checking, including
  666. Xanything containing Fig lengths, angles, points, and labels.  Any errors
  667. Xin these options will not be detected until the file is printed.
  668. X@PP
  669. XThe most likely errors are {@I syntax @I errors}, as in
  670. X@Code "shape { 0 0 [ 0 xsize }" for example, in which a @Code "]" is
  671. Xmissing; {@I type @I errors}, as in @Code "0 0 @Distance 45" where the
  672. Xright parameter is not a point; and {@I undefined @I errors}, arising
  673. Xfrom labels misspelt or used before being defined.  Less commonly, the
  674. Xoptions may all be correct but the figure is too large in some way:  too
  675. Xmany labels, too deeply nested, etc.
  676. X@PP
  677. XWhen an error is detected, Fig arranges for the offending page to
  678. Xbe printed up to the point where the error occurred, with a message
  679. Xnearby describing the error.  Printing of the document is then aborted.
  680. X@End @Section
  681. END_OF_FILE
  682.   if test 1067 -ne `wc -c <'lout/doc/tr.fig/s7'`; then
  683.     echo shar: \"'lout/doc/tr.fig/s7'\" unpacked with wrong size!
  684.   fi
  685.   # end of 'lout/doc/tr.fig/s7'
  686. fi
  687. if test -f 'lout/doc/tr.fig/setup' -a "${1}" != "-c" ; then 
  688.   echo shar: Will not clobber existing file \"'lout/doc/tr.fig/setup'\"
  689. else
  690.   echo shar: Extracting \"'lout/doc/tr.fig/setup'\" \(1718 characters\)
  691.   sed "s/^X//" >'lout/doc/tr.fig/setup' <<'END_OF_FILE'
  692. X
  693. X######################################################
  694. X#                                                    #
  695. X#  Lout setup file for producing the Fig report.     #
  696. X#                                                    #
  697. X#  Jeffrey H. Kingston                               #
  698. X#  8 June 1991                                       #
  699. X#  22 December 1992                                  #
  700. X#                                                    #
  701. X######################################################
  702. X
  703. X@SysInclude { ft  }
  704. X@SysInclude { dl  }
  705. X@SysInclude { tab }
  706. X@SysInclude { eq  }
  707. X@SysInclude { fig }
  708. X
  709. X   def @Code
  710. X      right x
  711. X   { { Helvetica Base -1p } @Font lines @Break x
  712. X   }
  713. X
  714. X   import @Fig
  715. X   def @JoinFigures
  716. X      left A
  717. X      named linestyle { solid }
  718. X      named dashlength { 0.15 cm }
  719. X      named arrow { noarrow }
  720. X      named linewidth { 0.5 pt }
  721. X      right B
  722. X   {  @Arrow
  723. X     from { A"@CTR" ++ {{A"@CTR" @Angle B"@CTR"} A@CIRCUM} }
  724. X     to   { B"@CTR" ++ {{B"@CTR" @Angle A"@CTR"} B@CIRCUM} }
  725. X         linestyle { linestyle }
  726. X         dashlength { dashlength }
  727. X         arrow { arrow }
  728. X         linewidth { linewidth }
  729. X      {}
  730. X   }
  731. X
  732. X   def @ShowMarks
  733. X      named linewidth  { 0.015 cm }
  734. X      named linestyle  { dashed   }
  735. X      named dashlength { 0.15 cm  }
  736. X      named paint      { light    }
  737. X      right x
  738. X   {
  739. X      @Fig
  740. X      {   @Box margin { 0c } linewidth { linewidth } paint { paint }
  741. X      {   @Figure
  742. X         shape { -0.3 cm ymark
  743. X             {xsize ymark} ++ {0.3 cm 0}  []
  744. X             xmark -0.3 cm
  745. X             {xmark ysize} ++ {0 0.3 cm}
  746. X               }
  747. X         linewidth { linewidth }
  748. X         linestyle { linestyle }
  749. X         dashlength { dashlength }
  750. X          x
  751. X      }
  752. X
  753. X      }
  754. X   }
  755. X
  756. X@Use { @DocumentLayout }
  757. X
  758. X@SysDatabase @Reference { "loutrefs"  }
  759. END_OF_FILE
  760.   if test 1718 -ne `wc -c <'lout/doc/tr.fig/setup'`; then
  761.     echo shar: \"'lout/doc/tr.fig/setup'\" unpacked with wrong size!
  762.   fi
  763.   # end of 'lout/doc/tr.fig/setup'
  764. fi
  765. if test -f 'lout/doc/tr.impl/s1.0' -a "${1}" != "-c" ; then 
  766.   echo shar: Will not clobber existing file \"'lout/doc/tr.impl/s1.0'\"
  767. else
  768.   echo shar: Extracting \"'lout/doc/tr.impl/s1.0'\" \(2523 characters\)
  769.   sed "s/^X//" >'lout/doc/tr.impl/s1.0' <<'END_OF_FILE'
  770. X@Section
  771. X    @Title { Introduction }
  772. X@Begin
  773. X@PP
  774. XLout [1, 2] is a high-level language
  775. Xfor document formatting, designed and implemented by the author.  The
  776. Ximplementation, known as Basser Lout, is a fully operational production
  777. Xversion written in C for the Unix operating system,
  778. X@FootNote { Unix is a trademark of "AT&T" Bell Laboratories. }
  779. Xwhich translates Lout source code into PostScript,
  780. X@FootNote { PostScript is a trademark of Adobe Systems, Incorporated. }
  781. Xa device-independent graphics rendering language accepted by many
  782. Xhigh-resolution output devices, including most laser printers.  Basser
  783. XLout is available free of charge [3].  It includes
  784. Xinstallation instructions, C source, seven standard packages, and complete
  785. Xdocumentation in the form of six technical reports and a manual page.
  786. X@PP
  787. XThe Lout project arose out of the author's desire to bring to document
  788. Xformatting languages the elegance of expression found in programming
  789. Xlanguages like Algol-60 and Pascal.  This emphasis on expressiveness
  790. Xhas produced an order of magnitude reduction in the cost of developing
  791. Xdocument formatting applications.  For example, an equation formatting
  792. Xapplication, which may be difficult or impossible to add to other
  793. Xsystems, can be written in Lout in a few days.
  794. X@PP
  795. XWhen expert users can implement such applications quickly, non-experts
  796. Xbenefit.  Although Lout itself provides only a small kernel of carefully
  797. Xchosen primitives, packages written in Lout and distributed with Basser
  798. XLout provide an unprecedented array of advanced features in a form
  799. Xaccessible to non-expert users.  The features include rotation and scaling,
  800. Xfonts, paragraph and page breaking, displays and lists, floating figures
  801. Xand tables, footnotes, chapters and sections (automatically numbered),
  802. Xrunning page headers and footers, odd-even page layouts, automatically
  803. Xgenerated tables of contents, sorted indexes and reference lists,
  804. Xbibliographic and other databases (including databases of formats for
  805. Xprinting references), equations, tables, diagrams, formatting of
  806. XPascal programs, and automatically maintained cross references.
  807. X@PP
  808. XThis paper charts the evolution of Lout from conception in mid-1984 to the
  809. Xpublic release of Basser Lout in October 1991.  Lout is organized around
  810. Xfour key concepts -- objects, definitions, galleys, and cross references --
  811. Xand they were developed in the order listed, so this paper will treat each
  812. Xin turn, discussing its design, implementation, problems, and
  813. Xprospects for further improvement.
  814. X@End @Section
  815. END_OF_FILE
  816.   if test 2523 -ne `wc -c <'lout/doc/tr.impl/s1.0'`; then
  817.     echo shar: \"'lout/doc/tr.impl/s1.0'\" unpacked with wrong size!
  818.   fi
  819.   # end of 'lout/doc/tr.impl/s1.0'
  820. fi
  821. if test -f 'lout/doc/tr.impl/s3.1' -a "${1}" != "-c" ; then 
  822.   echo shar: Will not clobber existing file \"'lout/doc/tr.impl/s3.1'\"
  823. else
  824.   echo shar: Extracting \"'lout/doc/tr.impl/s3.1'\" \(2778 characters\)
  825.   sed "s/^X//" >'lout/doc/tr.impl/s3.1' <<'END_OF_FILE'
  826. X@SubSection
  827. X    @Tag { operators }
  828. X    @Title { Operators }
  829. X@Begin
  830. X@PP
  831. XIt is evident from the example of Eqn that user-defined operators are
  832. Xneeded that mimic the primitive ones in taking objects as parameters
  833. Xand returning objects as results.  For example, to define a superscript
  834. Xoperator so that
  835. X@ID @Code "2 sup n"
  836. Xappears as {@Eq {2 sup @R n}}, the following operator definition may
  837. Xbe used:
  838. X@ID @Code {
  839. X"def sup"
  840. X"    precedence 50"
  841. X"    associativity right"
  842. X"    left x"
  843. X"    right y"
  844. X"{"
  845. X"    @OneRow {  |  {-2p @Font y}  ^/0.5fk  x  }"
  846. X"}"
  847. X}
  848. XThe @Code "sup" operator has precedence 50, is right associative, takes
  849. Xtwo objects as parameters passed on the left and right, and returns the
  850. Xobject between braces as result.  This object has the structure
  851. X@ID @I +2p @Font {
  852. X| @ShowMarks @Code y / @ShowMarks @Code x
  853. X}
  854. Xbut with the first row mark hidden by the @Code "@OneRow" operator,
  855. Xand @Code y two points smaller than it would otherwise have been.  The
  856. Xlength @Code "0.5f" specifies half the current font size;  Figure
  857. X{@NumberOf gapmodes} describes the @Code k gap mode.  In the Eq equation
  858. Xformatting package [10] the equation as a whole is
  859. Xset in italic font, and @Code 2 is an identifier whose body contains
  860. Xa font change back to Roman.  The digits @Code 0 to @Code 9 are classed
  861. Xas punctuation characters, permitting @Code 234 for example to be
  862. Xinterpreted as a sequence of three identifiers.
  863. X@PP
  864. XThese definitions are easily implemented by a standard symbol table
  865. Xand an operator precedence parser.  Algol block structure with the
  866. Xusual scope rules was adopted as a matter of course.
  867. X@PP
  868. XOperators are limited to at most two parameters, left and
  869. Xright, and the parameters cannot be given default values.  @I Named
  870. Xparameters solve both problems:
  871. X@ID @Code {
  872. X"def @Preface"
  873. X"    named @Tag {}"
  874. X"    named @Title { Preface }"
  875. X"    right @Body"
  876. X"{"
  877. X"    Bold @Font @Title"
  878. X"    //0.3v  @Body"
  879. X"}"
  880. X}
  881. XThe default value appears just after the parameter's declaration,
  882. Xbetween braces.  Invocations have a natural syntax:
  883. X@ID @Code {
  884. X"@Preface"
  885. X"    @Title { About this book }"
  886. X"{"
  887. X"    Few observers would have supposed in 1984, that ..."
  888. X"}"
  889. X}
  890. Xwith the actual named parameters following directly after the
  891. Xoperator, before any right parameter.  In this example, @Code "@Tag"
  892. Xwill receive its default value, and a less expert user could safely
  893. Xomit the @Code "@Title" parameter as well.
  894. X@PP
  895. XLout permits named parameters to have parameters, a feature with
  896. Xapplications to bibliographic databases, running headers, and other
  897. Xplaces where a format has to be supplied before content is
  898. Xknown.  One could go further and provide a complete lambda calculus,
  899. Xwith functions as first-class objects, provided care was taken not
  900. Xto intimidate the non-expert user.
  901. X@End @SubSection
  902. END_OF_FILE
  903.   if test 2778 -ne `wc -c <'lout/doc/tr.impl/s3.1'`; then
  904.     echo shar: \"'lout/doc/tr.impl/s3.1'\" unpacked with wrong size!
  905.   fi
  906.   # end of 'lout/doc/tr.impl/s3.1'
  907. fi
  908. if test -f 'lout/doc/tr.impl/s3.4' -a "${1}" != "-c" ; then 
  909.   echo shar: Will not clobber existing file \"'lout/doc/tr.impl/s3.4'\"
  910. else
  911.   echo shar: Extracting \"'lout/doc/tr.impl/s3.4'\" \(2778 characters\)
  912.   sed "s/^X//" >'lout/doc/tr.impl/s3.4' <<'END_OF_FILE'
  913. X@SubSection
  914. X    @Tag { defs.impl }
  915. X    @Title { Implementation of definitions }
  916. X@Begin
  917. X@PP
  918. XInput is processed by a hybrid parser which employs operator precedence
  919. Xfor objects and simple recursive descent for the headers of
  920. Xdefinitions.  A symbol table stores the body of each definition as a
  921. Xparse tree, except for macros which are lists of tokens, and manages the
  922. Xusual stack of static scopes, accepting @I PushScope and @I PopScope
  923. Xoperations as the parser enters and leaves scope regions, including
  924. Xactual body parameters and the right parameter of the @Code "@Open"
  925. Xoperator.
  926. X@PP
  927. XAs the parse proceeds, a complete call graph is constructed, recording,
  928. Xfor each symbol, which symbols are invoked within its body.  Immediately
  929. Xafter the last definition is read, the transitive closure of the call
  930. Xgraph is computed, and used to determine whether each non-parameter
  931. Xsymbol is recursive or receptive (Section {@NumberOf galleys}), and
  932. Xwhether each parameter is invoked exactly once or not.
  933. X@PP
  934. XPurely functional systems may evaluate symbol invocations in applicative
  935. Xorder (where parameters are evaluated before substitution into bodies),
  936. Xor in normal order (substitution before evaluation), and they may also
  937. Xshare the value of a parameter among all uses of it.  But in Basser
  938. XLout, the presence of context-sensitive style information (Section
  939. X{@NumberOf style}) forces normal order evaluation and prevents sharing
  940. Xof parameter values.
  941. X@PP
  942. XTo evaluate an unsized object (pure parse tree), its {@I environment},
  943. Xthe equivalent of the stack frames in Algol-like languages, must be
  944. Xavailable, containing the actual values of all formal parameters
  945. Xthat are visible within the unsized object.  Environment handling is
  946. Xa well-known implementation technique, so it will be discussed
  947. Xonly briefly here.
  948. X@PP
  949. XEnvironments are extra subtrees hung from the objects they refer
  950. Xto.  This organization makes excellent use of the ordered dag to
  951. Xpermit environments to be shared, and deleted when the last
  952. Xreference to them is removed.  Several optimizations have been
  953. Ximplemented.  Actual parameters known to be invoked only once are moved
  954. Xin from the environment, not copied; copying could lead to quadratic time
  955. Xcomplexity.  Actual parameters of the form @Code "@Next" @I object
  956. Xreceive an applicative pre-evaluation which prevents long chains of
  957. X@Code "@Next" symbols from forming during the generation of large page
  958. Xnumbers.  Some environments which provably contribute nothing are
  959. Xdeleted, most notably when a symbol invocation has no symbols within its
  960. Xactual parameters and no import list, so that only the environment of its
  961. Xbody need be kept; this saves a great deal of space when objects with
  962. Xenvironments are written to auxiliary files (Section {@NumberOf cross}).
  963. X@End @SubSection
  964. END_OF_FILE
  965.   if test 2778 -ne `wc -c <'lout/doc/tr.impl/s3.4'`; then
  966.     echo shar: \"'lout/doc/tr.impl/s3.4'\" unpacked with wrong size!
  967.   fi
  968.   # end of 'lout/doc/tr.impl/s3.4'
  969. fi
  970. if test -f 'lout/doc/tr.lout/ch0.00' -a "${1}" != "-c" ; then 
  971.   echo shar: Will not clobber existing file \"'lout/doc/tr.lout/ch0.00'\"
  972. else
  973.   echo shar: Extracting \"'lout/doc/tr.lout/ch0.00'\" \(2371 characters\)
  974.   sed "s/^X//" >'lout/doc/tr.lout/ch0.00' <<'END_OF_FILE'
  975. X
  976. X######################################################
  977. X#                                                    #
  978. X#  Start main document off                           #
  979. X#                                                    #
  980. X######################################################
  981. X
  982. X@Book
  983. X   @Title { Document Formatting
  984. X
  985. Xwith Lout }
  986. X   @Author { JEFFREY H. KINGSTON }
  987. X   @Edition { SECOND EDITION
  988. X
  989. X23 April, 1993}
  990. X   @Publisher { @I { @CopyRight Copyright 1991 and 1993, Jeffrey H. Kingston,
  991. XBasser Department of Computer Science, The University
  992. Xof Sydney 2006, Australia.} }
  993. X//
  994. X
  995. X@Preface
  996. X   @Tag { preface }
  997. X@Begin
  998. X@LP
  999. X@IndexBlanks
  1000. XThis manual is addressed to those who wish to become
  1001. Xexpert users of the document formatting language Lout.  An expert user
  1002. Xis someone who understands the principles of document formatting
  1003. Xthat Lout embodies, and is able to apply them, for example to design
  1004. Xa document format or a special-purpose package.  In contrast, a non-expert
  1005. Xuser is someone who simply uses Lout to format documents.
  1006. X@PP
  1007. XChapter {@NumberOf principles} explains these principles, and it
  1008. Xshould be read carefully and in sequence.  Chapters {@NumberOf details}
  1009. Xand {@NumberOf symbols} are for reference; respectively, they
  1010. Xcontain descriptions of the detailed operation of Lout's major
  1011. Xcomponents, and a complete description of each predefined symbol.  The
  1012. Xfinal chapter presents a collection of advanced examples.
  1013. X@PP
  1014. XThis manual presents Version 2 of Basser Lout, as released in April 1993
  1015. X[{@Ref kingston93basser}].  Those familiar with Version 1 will notice
  1016. Xmany enhancements, including PostScript
  1017. X@FootNote { PostScript is a trademark of Adobe Systems, Inc. }
  1018. XEPS file inclusion, optimal paragraph breaking, automatic hyphenation,
  1019. Xand ligatures.
  1020. X@PP
  1021. XThis manual was printed on an Apple LaserWriter
  1022. Xapple.laserwriter @Index { Apple LaserWriter }
  1023. X@FootNote { Apple and LaserWriter are trademarks of Apple Computer, Inc. }
  1024. Xlaser printer from a PostScript
  1025. Xpostscript @Index { PostScript }
  1026. Xfile generated by Version 2 of the Basser Lout interpreter, using the
  1027. XDocumentLayout package [{@Ref kingston92begin}].
  1028. X@DP
  1029. X@Heading { Acknowledgment. }  Version 2 has benefited from hundreds of
  1030. Xcomments received since the release of Version 1 in October 1991.  Not
  1031. Xevery suggestion could be followed, but many have been, and the
  1032. Xencouragement was greatly appreciated.
  1033. X@End @Preface
  1034. END_OF_FILE
  1035.   if test 2371 -ne `wc -c <'lout/doc/tr.lout/ch0.00'`; then
  1036.     echo shar: \"'lout/doc/tr.lout/ch0.00'\" unpacked with wrong size!
  1037.   fi
  1038.   # end of 'lout/doc/tr.lout/ch0.00'
  1039. fi
  1040. if test -f 'lout/doc/tr.lout/ch2.03' -a "${1}" != "-c" ; then 
  1041.   echo shar: Will not clobber existing file \"'lout/doc/tr.lout/ch2.03'\"
  1042. else
  1043.   echo shar: Extracting \"'lout/doc/tr.lout/ch2.03'\" \(2556 characters\)
  1044.   sed "s/^X//" >'lout/doc/tr.lout/ch2.03' <<'END_OF_FILE'
  1045. X@Section
  1046. X  @Tag { named }
  1047. X  @Title { Named parameters }
  1048. X@Begin
  1049. X@PP
  1050. XIn addition to left and right (or body) parameters, a symbol may have
  1051. Xany number of {@I {named parameters}}:
  1052. Xparameter.named @SubIndex { @Code named parameter }
  1053. Xnamed.par @Index { @Code named parameter }
  1054. X@ID @Code  {
  1055. X"def @Chapter"
  1056. X"    named @Tag {}"
  1057. X"    named @Title {}"
  1058. X"    right x"
  1059. X"{"
  1060. X"    ..."
  1061. X"}"
  1062. X}
  1063. XTheir definitions appear in between those of any left and right
  1064. Xparameters, and each is followed by a @I {default value} between
  1065. Xdefault @Index { Default value of parameter }
  1066. Xbraces.  When @Code "@Chapter" is invoked, its named parameters are
  1067. Xgiven values in the following way:
  1068. X@ID @Code  {
  1069. X"@Chapter"
  1070. X"    @Tag { intro }"
  1071. X"    @Title { Introduction }"
  1072. X"{"
  1073. X"    ..."
  1074. X"}"
  1075. X}
  1076. XThat is, a list of named parameters appears immediately following the
  1077. Xsymbol, each with its value enclosed in braces.  Any right parameter
  1078. Xfollows after them.  They do not have to appear in the order they were
  1079. Xdefined, and they can even be omitted altogether, in which case the
  1080. Xdefault value from the definition is used instead.
  1081. X@PP
  1082. XA named @Code "@Tag" parameter
  1083. Xtag.par @Index { @Code "@Tag" parameter, default value of }
  1084. Xdoes not take its default value from the definition; instead, if a default
  1085. Xvalue is needed, Lout invents a simple word which differs from every other
  1086. Xtag.  This is important, for example, in the production of numbered
  1087. Xchapters and sections (Section {@NumberOf chapters}).
  1088. X@PP
  1089. XNamed parameters may have parameters, {@PageMark strange} as in the
  1090. Xfollowing definition:
  1091. X@ID @Code {
  1092. X"def @Strange"
  1093. X"    named @Format right @Val { [@Val] }"
  1094. X"    right x"
  1095. X"{"
  1096. X"    @Format x"
  1097. X"}"
  1098. X}
  1099. XThe named parameter @Code "@Format" has right parameter {@Code "@Val"},
  1100. Xand the default value of @Code "@Format" is this parameter enclosed in
  1101. Xbrackets.  When @Code "@Format" is invoked it must be supplied with
  1102. Xa right parameter, which will replace {@Code "@Val"}.  Thus,
  1103. X@ID @Code {
  1104. X"@Strange 27"
  1105. X}
  1106. Xequals @Code "@Format 27" and so has result
  1107. X@ID {
  1108. X@Strange 27
  1109. X}
  1110. XThe @Code "@Format" symbol is like a definition with parameters whose
  1111. Xbody can be changed:
  1112. X@ID @Code {
  1113. X"@Strange"
  1114. X"    @Format { Slope @Font @Val. }"
  1115. X"27"
  1116. X}
  1117. Xstill equals {@Code "@Format 27"}, but this time the result is
  1118. X@ID {
  1119. X@Strange
  1120. X    @Format { Slope @Font @Val. }
  1121. X27
  1122. X}
  1123. XIn practice, examples of named parameters with parameters all have this
  1124. Xflavour of format being separated from content; running headers (Section
  1125. X{@NumberOf pagelayout}) and printing styles for bibliographies
  1126. X(Section {@NumberOf biblio}) are two major ones.
  1127. X@End @Section
  1128. END_OF_FILE
  1129.   if test 2556 -ne `wc -c <'lout/doc/tr.lout/ch2.03'`; then
  1130.     echo shar: \"'lout/doc/tr.lout/ch2.03'\" unpacked with wrong size!
  1131.   fi
  1132.   # end of 'lout/doc/tr.lout/ch2.03'
  1133. fi
  1134. if test -f 'lout/doc/tr.lout/ch3.06' -a "${1}" != "-c" ; then 
  1135.   echo shar: Will not clobber existing file \"'lout/doc/tr.lout/ch3.06'\"
  1136. else
  1137.   echo shar: Extracting \"'lout/doc/tr.lout/ch3.06'\" \(1114 characters\)
  1138.   sed "s/^X//" >'lout/doc/tr.lout/ch3.06' <<'END_OF_FILE'
  1139. X@Section
  1140. X   @Title { "@OneCol" and "@OneRow" }
  1141. X   @Tag { onerow }
  1142. X@Begin
  1143. X@PP
  1144. XThe @@OneRow symbol
  1145. Xonerow.sym @Index { @@OneRow symbol }
  1146. Xprincipal.mark.effect @SubIndex { effect on @@OneCol and @@OneRow }
  1147. Xreturns its right parameter modified so that only the principal row mark
  1148. Xprotrudes.  This is normally the first row mark, but another one may be
  1149. Xchosen by preceding it with @Code "^/" or {@Code "^//"}.  For example,
  1150. X@ID @Code {
  1151. X"@OneRow {  |0.5rt  Slope @Font x + 2  ^//1p  @HLine  //1p  |0.5rt  5 }"
  1152. X}
  1153. Xhas result
  1154. X@LP
  1155. X@ID {
  1156. X@ShowMarks
  1157. X@OneRow { |0.5rt Slope @Font x + 2 ^//1p @HLine //1p |0.5rt 5 }
  1158. X}
  1159. X@LP
  1160. Xwith one row mark protruding from the bar as shown.  Compare this with
  1161. X@ID @Code {
  1162. X"@OneRow {  |0.5rt  Slope @Font x + 2  //1p  @HLine  //1p  |0.5rt  5 }"
  1163. X}
  1164. Xwhere the mark protrudes from the numerator:
  1165. X@LP
  1166. X@ID {
  1167. X@ShowMarks
  1168. X@OneRow { |0.5rt Slope @Font x + 2 //1p @HLine //1p |0.5rt 5 }
  1169. X}
  1170. X@PP
  1171. Xonecol.sym @Index { @@OneCol symbol }
  1172. X@@OneCol has the same effect on columns as @@OneRow does on rows, with
  1173. Xthe symbols @Code "^|" and @Code "^||" (or {@Code "^&"}) determining
  1174. Xwhich mark is chosen.
  1175. X@End @Section
  1176. END_OF_FILE
  1177.   if test 1114 -ne `wc -c <'lout/doc/tr.lout/ch3.06'`; then
  1178.     echo shar: \"'lout/doc/tr.lout/ch3.06'\" unpacked with wrong size!
  1179.   fi
  1180.   # end of 'lout/doc/tr.lout/ch3.06'
  1181. fi
  1182. if test -f 'lout/doc/tr.lout/ch3.08' -a "${1}" != "-c" ; then 
  1183.   echo shar: Will not clobber existing file \"'lout/doc/tr.lout/ch3.08'\"
  1184. else
  1185.   echo shar: Extracting \"'lout/doc/tr.lout/ch3.08'\" \(1138 characters\)
  1186.   sed "s/^X//" >'lout/doc/tr.lout/ch3.08' <<'END_OF_FILE'
  1187. X@Section
  1188. X   @Title { "@HExpand" and "@VExpand" }
  1189. X   @Tag { hexpand }
  1190. X@Begin
  1191. X@PP
  1192. Xhexpand @Index { @@HExpand symbol }
  1193. Xvexpand @Index { @@VExpand symbol }
  1194. Xexpansion @Index { Expansion of object }
  1195. XThe @@HExpand symbol causes its right parameter to be as wide as it
  1196. Xpossibly could be without violating a @@Wide symbol or intruding into
  1197. Xthe space occupied by neighbouring gaps or objects.  The @@VExpand
  1198. Xsymbol is similar, but it affects height.  For example, in the object
  1199. X@ID @Code {
  1200. X"8i @Wide 11i @High {"
  1201. X"    //1i  ||1i @HExpand @VExpand x ||1i"
  1202. X"    //1i"
  1203. X"}"
  1204. X}
  1205. Xobject @Code x could have any size up to six inches wide by nine inches
  1206. Xhigh, so the @@HExpand and @@VExpand symbols cause it to have exactly
  1207. Xthis size.  This is important, for example, if @Code x contains
  1208. X@Code "|1rt" or {@Code "/1rt"}; without the expansion these might not
  1209. Xmove as far across or down as expected.
  1210. X@PP
  1211. XAs Section {@NumberOf size} explains in detail, most objects are
  1212. Xalready as large as they possibly could be.  Consequently these symbols
  1213. Xare needed only rarely.  @@HExpand includes a @@OneCol effect, and
  1214. X@@VExpand includes a @@OneRow effect.
  1215. X@End @Section
  1216. END_OF_FILE
  1217.   if test 1138 -ne `wc -c <'lout/doc/tr.lout/ch3.08'`; then
  1218.     echo shar: \"'lout/doc/tr.lout/ch3.08'\" unpacked with wrong size!
  1219.   fi
  1220.   # end of 'lout/doc/tr.lout/ch3.08'
  1221. fi
  1222. if test -f 'lout/doc/tr.lout/ch3.10' -a "${1}" != "-c" ; then 
  1223.   echo shar: Will not clobber existing file \"'lout/doc/tr.lout/ch3.10'\"
  1224. else
  1225.   echo shar: Extracting \"'lout/doc/tr.lout/ch3.10'\" \(1288 characters\)
  1226.   sed "s/^X//" >'lout/doc/tr.lout/ch3.10' <<'END_OF_FILE'
  1227. X@Section
  1228. X   @Title { "@HAdjust", "@VAdjust", and "@PAdjust" }
  1229. X   @Tag { hadjust }
  1230. X@Begin
  1231. X@PP
  1232. Xpadjust @Index { @@PAdjust symbol }
  1233. Xhadjust @Index { @@HAdjust symbol }
  1234. Xvadjust @Index { @@VAdjust symbol }
  1235. Xadjustment @Index { Adjustment of object }
  1236. XThese symbols spread their right parameter apart until it occupies
  1237. Xall the space available to it;  @@HAdjust adjusts @Code "|" sequences,
  1238. X@@VAdjust adjusts @Code "/" sequences, and @@PAdjust adjusts @Code "&"
  1239. Xsequences.  For example,
  1240. X@ID @Code {
  1241. X"4i @Wide @PAdjust { 1 2 3 4 5 6 7 8 }"
  1242. X}
  1243. Xhas result
  1244. X@ID {
  1245. X4i @Wide @PAdjust { 1 2 3 4 5 6 7 8 }
  1246. X}
  1247. XMore precisely, the widening is effected by enlarging the size of each
  1248. Xcomponent except the last by an equal fraction of the space that would
  1249. Xotherwise be left over -- just the opposite of the usual procedure,
  1250. Xwhich assigns all the leftover space to the last component (Section
  1251. X{@NumberOf size}).
  1252. X@PP
  1253. X@@PAdjust is used by the @Code adjust and @Code outdent options of
  1254. Xthe @@Break symbol (Section {@NumberOf break}).  It has a slight
  1255. Xpeculiarity:  it will not enlarge components when the immediately
  1256. Xfollowing gap has width 0.  This is to prevent space from appearing
  1257. X(for example) between a word and an immediately following comma.  The
  1258. Xother two symbols will enlarge such components.
  1259. X@End @Section
  1260. END_OF_FILE
  1261.   if test 1288 -ne `wc -c <'lout/doc/tr.lout/ch3.10'`; then
  1262.     echo shar: \"'lout/doc/tr.lout/ch3.10'\" unpacked with wrong size!
  1263.   fi
  1264.   # end of 'lout/doc/tr.lout/ch3.10'
  1265. fi
  1266. if test -f 'lout/doc/tr.lout/ch3.11' -a "${1}" != "-c" ; then 
  1267.   echo shar: Will not clobber existing file \"'lout/doc/tr.lout/ch3.11'\"
  1268. else
  1269.   echo shar: Extracting \"'lout/doc/tr.lout/ch3.11'\" \(999 characters\)
  1270.   sed "s/^X//" >'lout/doc/tr.lout/ch3.11' <<'END_OF_FILE'
  1271. X@Section
  1272. X   @Title { "@HScale" and "@VScale" }
  1273. X   @Tag { hscale }
  1274. X@Begin
  1275. X@PP
  1276. Xhscale @Index { @@HScale symbol }
  1277. Xvscale @Index { @@VScale symbol }
  1278. Xscaling @Index { Scaling of object }
  1279. X@@HScale causes its right parameter to expand to fill the space available,
  1280. Xby geometricallly scaling it:
  1281. X@ID @Code {
  1282. X"4i @Wide @HScale { 1 2 3 4 5 6 7 8 }"
  1283. X}
  1284. Xhas result
  1285. X@ID {
  1286. X4i @Wide @HScale { 1 2 3 4 5 6 7 8 }
  1287. X}
  1288. Xand
  1289. X@ID @Code {
  1290. X"0.5i @Wide @HScale { 1 2 3 4 5 6 7 8 }"
  1291. X}
  1292. Xhas result
  1293. X@ID {
  1294. X0.5i @Wide @HScale { 1 2 3 4 5 6 7 8 }
  1295. X}
  1296. X@@HScale first applies @@HContract to its parameter, then horizontally
  1297. Xscales it to the actual size.  The principal mark of the right parameter
  1298. Xhas no effect on the result; the parameter is scaled to the actual size
  1299. Xand positioned to fill the space available.  (Taking account of alignment
  1300. Xof the principal mark only causes trouble in practice.)
  1301. X@PP
  1302. X@@VScale is similar, but in a vertical direction.  @@HScale and @@VScale
  1303. Xeach have both a @@OneCol and a @@OneRow effect.
  1304. X@End @Section
  1305. END_OF_FILE
  1306.   if test 999 -ne `wc -c <'lout/doc/tr.lout/ch3.11'`; then
  1307.     echo shar: \"'lout/doc/tr.lout/ch3.11'\" unpacked with wrong size!
  1308.   fi
  1309.   # end of 'lout/doc/tr.lout/ch3.11'
  1310. fi
  1311. if test -f 'lout/doc/tr.lout/ch3.13' -a "${1}" != "-c" ; then 
  1312.   echo shar: Will not clobber existing file \"'lout/doc/tr.lout/ch3.13'\"
  1313. else
  1314.   echo shar: Extracting \"'lout/doc/tr.lout/ch3.13'\" \(1552 characters\)
  1315.   sed "s/^X//" >'lout/doc/tr.lout/ch3.13' <<'END_OF_FILE'
  1316. X@Section
  1317. X   @Title { "@Rotate" }
  1318. X   @Tag { rotate }
  1319. X@Begin
  1320. X@PP
  1321. Xrotate.sym @Index { @@Rotate symbol }
  1322. Xrotation @Index { Rotation of object }
  1323. XThe symbol @@Rotate will rotate its
  1324. Xright parameter counterclockwise an amount given in degrees (positive or
  1325. Xnegative) by its left parameter.  For example,
  1326. X@ID @Code {
  1327. X"30d  @Rotate  { hello, world }"
  1328. X}
  1329. Xhas result
  1330. X@ID {
  1331. X30d  @Rotate  { hello, world }
  1332. X}
  1333. XBefore rotating the object, @@OneCol and @@OneRow are applied to it.  The
  1334. Xresult is a rectangle whose marks pass through the point where the
  1335. Xoriginal marks crossed:
  1336. X@ID {
  1337. X   @ShowMarks
  1338. X   { 0.6c @Wide 0.3c @High ^| 2.2c @Wide ^/ 0.2c @High }
  1339. X
  1340. X&4m => &4m
  1341. X
  1342. X   @ShowMarks
  1343. X   {
  1344. X    30d @Rotate
  1345. X    {    @ShowMarks
  1346. X        { 0.6c @Wide 0.3c @High ^| 2.2c @Wide ^/ 0.2c @High }
  1347. X    }
  1348. X   }
  1349. X}
  1350. XAs this example shows, rotation by an angle other than a multiple of
  1351. Xninety degrees introduces quite a lot of white space.  So, for example, the
  1352. Xresult of
  1353. X@ID {
  1354. X@Code { "-30d" "@Rotate" 30d "@Rotate" }  @I object
  1355. X}
  1356. Xis a much larger object than {@I object}, despite the fact that one
  1357. Xrotation cancels the other.
  1358. X@PP
  1359. XRotation of objects containing receptive and recursive symbols is
  1360. Xpermitted, but for angles other than multiples of ninety degrees it is
  1361. Xbest to make the size of the rotated object clear with @@Wide and
  1362. X@@High symbols:
  1363. X@ID @Code {
  1364. X"30d @Rotate 5i @Wide 4i @High"
  1365. X"{   //1i @TextPlace"
  1366. X"    //1i"
  1367. X"}"
  1368. X}
  1369. XThis is because for angles other than multiples of ninety degrees the
  1370. Xspace available for @Code "@TextPlace" to occupy is indeterminate, and
  1371. Xthe result is poor.
  1372. X@End @Section
  1373. END_OF_FILE
  1374.   if test 1552 -ne `wc -c <'lout/doc/tr.lout/ch3.13'`; then
  1375.     echo shar: \"'lout/doc/tr.lout/ch3.13'\" unpacked with wrong size!
  1376.   fi
  1377.   # end of 'lout/doc/tr.lout/ch3.13'
  1378. fi
  1379. if test -f 'lout/doc/tr.lout/ch3.16' -a "${1}" != "-c" ; then 
  1380.   echo shar: Will not clobber existing file \"'lout/doc/tr.lout/ch3.16'\"
  1381. else
  1382.   echo shar: Extracting \"'lout/doc/tr.lout/ch3.16'\" \(1705 characters\)
  1383.   sed "s/^X//" >'lout/doc/tr.lout/ch3.16' <<'END_OF_FILE'
  1384. X@Section
  1385. X   @Title { "@Moment" }
  1386. X   @Tag { moment }
  1387. X@Begin
  1388. X@PP
  1389. XThe predefined symbol @@Moment
  1390. Xmoment.sym @Index { @@Moment symbol }
  1391. Xhas the following definition:
  1392. X@ID @Code {
  1393. X"def @Moment"
  1394. X"   named @Tag {}"
  1395. X"   named @Second {}"
  1396. X"   named @Minute {}"
  1397. X"   named @Hour {}"
  1398. X"   named @Day {}"
  1399. X"   named @Month {}"
  1400. X"   named @Year {}"
  1401. X"   named @Century {}"
  1402. X"   named @WeekDay {}"
  1403. X"   named @YearDay {}"
  1404. X"   named @DaylightSaving {}"
  1405. X"{}"
  1406. X}
  1407. XIt may be used like any other symbol.  Lout provides an invocation of
  1408. X@@Moment with tag {@Code now}, whose other parameters are numbers
  1409. Xencoding the current date and time:
  1410. X@ID {
  1411. X@JP @Code "@Second"  |0.5i the current second, between 0 and 59
  1412. X@JP @Code "@Minute"  | the current minute, between 0 and 59
  1413. X@JP @Code "@Hour"    | the current hour, between 0 and 23
  1414. X@JP @Code "@Day"     | the current day of the month, between 1 and 31
  1415. X@JP @Code "@Month"   | the current month, between 1 (January) and 12 (December)
  1416. X@JP @Code "@Year"    | the current year of the century, between 00 and 99
  1417. X@JP @Code "@Century" | the current century, e.g. 19 or 20
  1418. X@JP @Code "@WeekDay" | the current day of the week, between 1 (Sunday) and 7 (Saturday)
  1419. X@JP @Code "@YearDay" | the current day of the year, between 0 and 365
  1420. X@JP @Code "@DaylightSaving" | an implementation-dependent number that
  1421. Xmay encode the daylight saving currently in effect
  1422. X}
  1423. Xdate @Index { Date, printing of current }
  1424. XJudicious use of databases can convert
  1425. Xthese numbers into useful dates.  For example,
  1426. X@ID @Code {
  1427. X"@Moment&&now @Open { @Day {@Months&&@Month}, @Century{@Year} }"
  1428. X}
  1429. Xproduces something like
  1430. X@Moment&&now @Open { @Day {@Months&&@Month}, @Century{@Year} }
  1431. Xgiven a suitable database of months.
  1432. X@End @Section
  1433. END_OF_FILE
  1434.   if test 1705 -ne `wc -c <'lout/doc/tr.lout/ch3.16'`; then
  1435.     echo shar: \"'lout/doc/tr.lout/ch3.16'\" unpacked with wrong size!
  1436.   fi
  1437.   # end of 'lout/doc/tr.lout/ch3.16'
  1438. fi
  1439. if test -f 'lout/doc/tr.lout/ch3.21' -a "${1}" != "-c" ; then 
  1440.   echo shar: Will not clobber existing file \"'lout/doc/tr.lout/ch3.21'\"
  1441. else
  1442.   echo shar: Extracting \"'lout/doc/tr.lout/ch3.21'\" \(1524 characters\)
  1443.   sed "s/^X//" >'lout/doc/tr.lout/ch3.21' <<'END_OF_FILE'
  1444. X@Section
  1445. X   @Title { "@Open and @Use" }
  1446. X   @Tag { open }
  1447. X@Begin
  1448. X@PP
  1449. XThe @@Open symbol
  1450. Xopen.sym @Index { @@Open symbol }
  1451. Xtakes a cross reference or symbol
  1452. Xinvocation for its left parameter, and an arbitrary object, which must
  1453. Xbe enclosed in braces, for its right parameter.  The right parameter
  1454. Xmay refer to the exported parameters and nested definitions of the invocation
  1455. Xdenoted by the left parameter, and its value is the @@Open
  1456. Xsymbol's result.  The target of the cross reference may lie in an
  1457. Xexternal database (Section {@NumberOf database}).  Any symbol available
  1458. Xoutside the @@Open which happens to have the same name as one of the
  1459. Xsymbols made available by the @@Open will be unavailable within the @@Open.
  1460. X@PP
  1461. Xuse.sym @Index { @@Use symbol }
  1462. XThe @@Use symbol is an @@Open symbol in a
  1463. Xdifferent form.  It may only appear just after the definitions
  1464. Xin Lout's input, and it is equivalent to enclosing the remainder of the
  1465. Xinput in an @@Open symbol.  For example,
  1466. X@ID {
  1467. X      @I definitions
  1468. X//1vx @Code "@Use" @Code "{" @I x @Code "}"
  1469. X//1vx @Code "@Use" @Code "{" @I y @Code "}"
  1470. X//1vx @I { rest of input }
  1471. X}
  1472. Xis equivalent to
  1473. X@ID {
  1474. X      @I definitions
  1475. X//1vx @I x @Code "@Open"
  1476. X//1vx @Code "{" &4mt @I y @Code "@Open"
  1477. X//1vx   &4mt @Code "{" @I { rest of input }
  1478. X//1vx   &4mt @Code "}"
  1479. X//1vx @Code "}"
  1480. X}
  1481. XThe @@Use symbol allows a set of standard packages to be opened without
  1482. Xthe inconvenience of enclosing the entire document in @@Open symbols.  Such
  1483. Xenclosure could cause Basser Lout to run out of memory.
  1484. X@End @Section
  1485. END_OF_FILE
  1486.   if test 1524 -ne `wc -c <'lout/doc/tr.lout/ch3.21'`; then
  1487.     echo shar: \"'lout/doc/tr.lout/ch3.21'\" unpacked with wrong size!
  1488.   fi
  1489.   # end of 'lout/doc/tr.lout/ch3.21'
  1490. fi
  1491. if test -f 'lout/doc/tr.lout/ch3.22' -a "${1}" != "-c" ; then 
  1492.   echo shar: Will not clobber existing file \"'lout/doc/tr.lout/ch3.22'\"
  1493. else
  1494.   echo shar: Extracting \"'lout/doc/tr.lout/ch3.22'\" \(1685 characters\)
  1495.   sed "s/^X//" >'lout/doc/tr.lout/ch3.22' <<'END_OF_FILE'
  1496. X@Section
  1497. X   @Title { "@Database and @SysDatabase" }
  1498. X   @Tag { database }
  1499. X@Begin
  1500. X@PP
  1501. Xdatabase.sym @Index { @@Database symbol }
  1502. XThe @@Database symbol is used to declare the existence of a file
  1503. Xof symbol invocations that Lout may refer to when evaluating cross
  1504. Xreferences.  In Basser Lout, for example,
  1505. X@ID @Code {
  1506. X"@Database @Months @WeekDays { standard }"
  1507. X}
  1508. Xmeans that there is a file called @Code "standard.ld" containing
  1509. Xinvocations of the previously defined symbols @Code "@Months" and
  1510. X{@Code "@WeekDays"}.  A @@Database symbol may appear anywhere, although
  1511. Xit is most naturally placed immediately following the definitions of the
  1512. Xsymbols it refers to.  Different definitions packages may refer to a
  1513. Xcommon database, provided the definitions they give for its symbols are
  1514. Xcompatible.  An entry is interpreted as though it appears at the point
  1515. Xwhere the cross reference that retrieves it does, which allows symbols
  1516. Xlike @Code "@I" for @Code "Slope @Font" to be used in databases.  The
  1517. Xdatabase file may not contain @@Database or @@Include symbols, and each
  1518. Xinvocation within it must be enclosed in braces.
  1519. X@PP
  1520. XBasser Lout constructs an {@I {index file}},
  1521. Xindex.file @Index { Index file (for databases) }
  1522. Xwhich in this example is called {@Code "standard.li"}, the first time it
  1523. Xever encounters the database, as an aid to searching it.  If the database
  1524. Xfile is changed, its index file must be deleted by the user so that
  1525. XBasser Lout knows to reconstruct it.
  1526. X@PP
  1527. XBasser Lout searches for databases in the current directory first, then
  1528. Xin a sequence of standard places.  To search the standard places only, use
  1529. Xsysdatabase.sym @Index { @@SysDatabase symbol }
  1530. X@@SysDatabase.
  1531. X@End @Section
  1532. END_OF_FILE
  1533.   if test 1685 -ne `wc -c <'lout/doc/tr.lout/ch3.22'`; then
  1534.     echo shar: \"'lout/doc/tr.lout/ch3.22'\" unpacked with wrong size!
  1535.   fi
  1536.   # end of 'lout/doc/tr.lout/ch3.22'
  1537. fi
  1538. if test -f 'lout/doc/tr.lout/ch3.24' -a "${1}" != "-c" ; then 
  1539.   echo shar: Will not clobber existing file \"'lout/doc/tr.lout/ch3.24'\"
  1540. else
  1541.   echo shar: Extracting \"'lout/doc/tr.lout/ch3.24'\" \(1436 characters\)
  1542.   sed "s/^X//" >'lout/doc/tr.lout/ch3.24' <<'END_OF_FILE'
  1543. X@Section
  1544. X   @Title { "@IncludeGraphic" and "@SysIncludeGraphic" }
  1545. X   @Tag { includegraphic }
  1546. X@Begin
  1547. X@PP
  1548. Xincludegraphic.sym @Index { @@IncludeGraphic symbol }
  1549. Xsysincludegraphic.sym @Index { @@SysIncludeGraphic symbol }
  1550. Xpostscript.includegraphic @SubIndex { used by @@IncludeGraphic }
  1551. XThese symbols instruct Lout to incorporate a separately created
  1552. Xillustration:
  1553. X@ID @Code "@IncludeGraphic  \"myportrait.eps\""
  1554. XThe parameter is implementation-dependent; in Basser Lout it is an
  1555. Xobject whose value is a simple word denoting the name of a file.  This
  1556. Xfile should ideally be a PostScript EPS Version 3.0 file [{@Ref adobe90}],
  1557. Xsince then Lout will keep careful track of what resources are required
  1558. Xfor printing that file.  However, any PostScript file containing the
  1559. X@Code "%%BoundingBox:" comment and not requiring unusual resources is
  1560. Xlikely to work.
  1561. X@PP
  1562. XThe result of @@IncludeGraphic is an ordinary Lout object with marks
  1563. Xthrough its centre.  It may be rotated, scaled, and generally
  1564. Xtreated like any other object.  Basser Lout determines its size by
  1565. Xconsulting the bounding box information in the file.  If this cannot be
  1566. Xfound, a warning message is printed and the result object has zero size.
  1567. X@PP
  1568. X@@IncludeGraphic searches the same directories that @@Include does
  1569. X(Section {@NumberOf include}).  @@SysIncludeGraphic is the same as
  1570. X@@IncludeGraphic, except that it searches only the directories searched
  1571. Xby @@SysInclude.
  1572. X@End @Section
  1573. END_OF_FILE
  1574.   if test 1436 -ne `wc -c <'lout/doc/tr.lout/ch3.24'`; then
  1575.     echo shar: \"'lout/doc/tr.lout/ch3.24'\" unpacked with wrong size!
  1576.   fi
  1577.   # end of 'lout/doc/tr.lout/ch3.24'
  1578. fi
  1579. if test -f 'lout/doc/tr.over/s0' -a "${1}" != "-c" ; then 
  1580.   echo shar: Will not clobber existing file \"'lout/doc/tr.over/s0'\"
  1581. else
  1582.   echo shar: Extracting \"'lout/doc/tr.over/s0'\" \(883 characters\)
  1583.   sed "s/^X//" >'lout/doc/tr.over/s0' <<'END_OF_FILE'
  1584. X@Report
  1585. X   @Title { A New Approach to Document Formatting }
  1586. X   @Author { Jeffrey H. Kingston }
  1587. X   @Institution { Basser Department of Computer Science
  1588. XUniversity of Sydney 2006
  1589. XAustralia }
  1590. X   @Columns { Double }
  1591. X   @DateLine { 22 December, 1992 }
  1592. X//
  1593. X
  1594. X@Abstract {
  1595. XThis paper describes a new approach to document formatting, in which
  1596. Xfeatures are written in a small, coherent, high-level language called
  1597. XLout.  The resulting increase in productivity has permitted many advanced
  1598. Xfeatures to be developed quickly and accurately, including page layout of
  1599. Xunprecedented flexibility, equation formatting, automatically generated
  1600. Xtables of contents, running page headers and footers, cross references,
  1601. Xsorted indexes, and access to bibliographic databases.  A fully operational
  1602. Xproduction implementation of the Lout system including all these features
  1603. Xand many others is freely available.
  1604. X}
  1605. END_OF_FILE
  1606.   if test 883 -ne `wc -c <'lout/doc/tr.over/s0'`; then
  1607.     echo shar: \"'lout/doc/tr.over/s0'\" unpacked with wrong size!
  1608.   fi
  1609.   # end of 'lout/doc/tr.over/s0'
  1610. fi
  1611. if test -f 'lout/doc/tr.over/s6' -a "${1}" != "-c" ; then 
  1612.   echo shar: Will not clobber existing file \"'lout/doc/tr.over/s6'\"
  1613. else
  1614.   echo shar: Extracting \"'lout/doc/tr.over/s6'\" \(2574 characters\)
  1615.   sed "s/^X//" >'lout/doc/tr.over/s6' <<'END_OF_FILE'
  1616. X@Section
  1617. X   @Title { Cross references }
  1618. X@Begin
  1619. X@PP
  1620. XThe terms @Code "@TextPlace&&preceding" and @Code "@FootPlace&&following"
  1621. Xused above can be thought of as arrows in the final printed document,
  1622. Xpointing from themselves to the place they name.  Expressed in this way,
  1623. Xfree of any reference to the internal action of the document formatter,
  1624. Xthey are easy to comprehend and work with.  These arrows are called
  1625. Xcross references in Lout.
  1626. X@PP
  1627. XA galley is transported forwards along its arrow, but it turns out that
  1628. Xa reverse flow of information can also be very useful.  For example,
  1629. Xlarge documents often have cross references such as `see Table 6 on page
  1630. X57.'  If the numbers are replaced by arrows pointing to the table in
  1631. Xquestion, it should be possible to have their values filled in
  1632. Xautomatically (an idea introduced by Scribe [{@Ref reid80}]).  An arrow
  1633. Xpointing outside the docu&-ment could retrieve an entry from a database of
  1634. Xreferences, Roman numerals, etc.  And a running page header like
  1635. X`Chapter 8:  Sorting' might obtain its value from an arrow pointing from
  1636. Xthe page header line down into the body text of the page, where the
  1637. Xcurrent chapter is known.
  1638. X@PP
  1639. XAll these ideas are realized in Lout, but here we will just sketch a
  1640. Xsimplified version of the running page header definitions found in the
  1641. XBookLayout package [{@Ref kingston92begin}].  A symbol called
  1642. X@Code "@Runner" is first defined:
  1643. X@ID @Code {
  1644. X"def @Runner"
  1645. X"    right @Val"
  1646. X"{}"
  1647. X}
  1648. X@Code "@Runner" produces nothing at all, which means that we may place
  1649. Xthe invokation
  1650. X@ID @Code {
  1651. X"@Runner { Chapter"
  1652. X"8:  Sorting }"
  1653. X}
  1654. Xat the end of a chapter without harm.  This invisible invokation will be
  1655. Xcarried along with the chapter and will end up on some page of the final
  1656. Xprinted document.
  1657. X@PP
  1658. XBy modifying the definition of {@Code "@PageList"}, we can add to each
  1659. Xpage a header line containing the expression
  1660. X@ID @Code {
  1661. X"@Runner&&following"
  1662. X"@Open { @Val }"
  1663. X}
  1664. XThis means `find the nearest following invokation of @Code "@Runner" in the
  1665. Xfinal printed document and retrieve its @Code "@Val" parameter.' Every page
  1666. Xof Chapter 8 will find the correct running header, since @Code "@Runner"
  1667. Xwas placed at the end of the chapter.  The invokation @Code "@Runner {}"
  1668. Xplaced at the beginning of the chapter will suppress the header on the
  1669. Xfirst page of the chapter, as it is conventional to do.
  1670. X@PP
  1671. XThese invokations of @Code "@Runner" are hidden from the non-expert user
  1672. Xwithin the definition of the @Code "@Chapter" operator.  The result is a
  1673. Xreliable implementation of a notoriously difficult feature.
  1674. X@End @Section
  1675. END_OF_FILE
  1676.   if test 2574 -ne `wc -c <'lout/doc/tr.over/s6'`; then
  1677.     echo shar: \"'lout/doc/tr.over/s6'\" unpacked with wrong size!
  1678.   fi
  1679.   # end of 'lout/doc/tr.over/s6'
  1680. fi
  1681. if test -f 'lout/doc/tr.over/s7' -a "${1}" != "-c" ; then 
  1682.   echo shar: Will not clobber existing file \"'lout/doc/tr.over/s7'\"
  1683. else
  1684.   echo shar: Extracting \"'lout/doc/tr.over/s7'\" \(1850 characters\)
  1685.   sed "s/^X//" >'lout/doc/tr.over/s7' <<'END_OF_FILE'
  1686. X@Section
  1687. X   @Title { Conclusion }
  1688. X@Begin
  1689. X@PP
  1690. XThe Lout document formatting system permits features as diverse as page
  1691. Xlayout and equation formatting to be implemented by definitions written
  1692. Xin a high-level language.  The consequent improvement in productivity
  1693. Xhas allowed an unprecedented repertoire of advanced features to be
  1694. Xpresented to the non-expert user.
  1695. X@PP
  1696. XTo future research in document formatting, Lout offers evidence of the
  1697. Xutility of the functional paradigm, as well as two new abstractions:
  1698. Xgalleys and cross references.  These provide a secure foundation for
  1699. Xfeatures which have proven very difficult to implement in the past.
  1700. X@PP
  1701. XA number of improvements to the current system can be envisaged.  Better
  1702. Xparagraph and page breaking algorithms could be added to the formatter
  1703. Xwithout any change to the language; non-rectangular objects would be
  1704. Xuseful in some places.  Perhaps the most useful improvement would be the
  1705. Xrepresentation of paragraphs as horizontal galleys, since this would allow
  1706. Xthe full power of the language to be brought to bear on paragraph
  1707. Xlayout, in contrast to the present built-in system which offers only the
  1708. Xtraditional styles (ragged right, justified, and so on).
  1709. X{ @Reference
  1710. X    @Tag { brooks91 }
  1711. X    @Type { JournalArticle }
  1712. X    @Author { Brooks, Kenneth P. }
  1713. X    @Title { Lilac: a two-view document editor }
  1714. X    @Journal { IEEE Computer }
  1715. X    @Volume { @Null }
  1716. X    @Pages { 7--19 }
  1717. X    @Year { 1991 }
  1718. X}
  1719. X@PP
  1720. XThe author of a recent inter&-active document editor [{@Ref brooks91}]
  1721. Xhas recommended that the interface be supported by a functional base
  1722. Xlanguage, accessible to the expert user, for such purposes as page
  1723. Xlayout definition and fine control over formatting.  Lout appears to be
  1724. Xan excellent candidate for such a language, because of its small size,
  1725. Xprecision, and functional semantics.
  1726. X@End @Section
  1727. END_OF_FILE
  1728.   if test 1850 -ne `wc -c <'lout/doc/tr.over/s7'`; then
  1729.     echo shar: \"'lout/doc/tr.over/s7'\" unpacked with wrong size!
  1730.   fi
  1731.   # end of 'lout/doc/tr.over/s7'
  1732. fi
  1733. if test -f 'lout/doc/tr.tab/s0' -a "${1}" != "-c" ; then 
  1734.   echo shar: Will not clobber existing file \"'lout/doc/tr.tab/s0'\"
  1735. else
  1736.   echo shar: Extracting \"'lout/doc/tr.tab/s0'\" \(1096 characters\)
  1737.   sed "s/^X//" >'lout/doc/tr.tab/s0' <<'END_OF_FILE'
  1738. X@Report
  1739. X   @Title { Tab -- A Lout Package for Formatting Tables }
  1740. X   @Author { Jeffrey H. Kingston }
  1741. X   @Institution { Basser Department of Computer Science
  1742. XUniversity of Sydney 2006
  1743. XAustralia }
  1744. X   @DateLine { 22 December 1992 }
  1745. X//
  1746. X
  1747. X@Abstract {
  1748. XThis report describes the use of Tab, a package of definitions for
  1749. Xproducing tables with the Lout document formatter:
  1750. X@Display @Tab
  1751. X   hmargin { 0.4c }
  1752. X   vmargin { 0.3v }
  1753. X   side { single }
  1754. X   @Fmta { @Col @B @CC X @Over A,B,C }
  1755. X   @Fmtb { @Col @I A ! @Col B !! @Col C }
  1756. X{
  1757. X@Rowa
  1758. X   above { single }
  1759. X   X { Value of mathematical formulae (millions of dollars) }
  1760. X@Rowb
  1761. X   above { double }
  1762. X   A { Quadratic formula }
  1763. X   B { @Eq { x ^= { minus b +- sqrt { b sup 2 - 4ac } } over 2a } }
  1764. X   C { 3^.5 }
  1765. X@Rowb
  1766. X   below { single }
  1767. X   A { Binomial theorem }
  1768. X   B { @Eq { ( a + b ) sup n ^= big sum from k=0 to infty 
  1769. Xmatrix atleft { ( } atright { ) } { n above k } a sup k b sup n-k
  1770. X} }
  1771. X   C { 12^ }
  1772. X}
  1773. XA wide variety of styles for columns and individual entries is provided,
  1774. Xand entries may contain equations, figures, and other objects without
  1775. Xrestriction.
  1776. X}
  1777. END_OF_FILE
  1778.   if test 1096 -ne `wc -c <'lout/doc/tr.tab/s0'`; then
  1779.     echo shar: \"'lout/doc/tr.tab/s0'\" unpacked with wrong size!
  1780.   fi
  1781.   # end of 'lout/doc/tr.tab/s0'
  1782. fi
  1783. if test -f 'lout/doc/tr.tab/s1' -a "${1}" != "-c" ; then 
  1784.   echo shar: Will not clobber existing file \"'lout/doc/tr.tab/s1'\"
  1785. else
  1786.   echo shar: Extracting \"'lout/doc/tr.tab/s1'\" \(2564 characters\)
  1787.   sed "s/^X//" >'lout/doc/tr.tab/s1' <<'END_OF_FILE'
  1788. X@Section
  1789. X   @Title { Introduction }
  1790. X@Begin
  1791. X@PP
  1792. XThe Tab table formatting package is designed to simplify the production
  1793. Xof tables in documents produced with the Lout document formatting system
  1794. X[{@Ref kingston92}].  Tab aligns entries in columns, draws boxes and
  1795. Xrules, and so on.  To use Tab, either place @Code "-itab" on the Unix
  1796. X@FootNote { Unix is a trademark of "AT&T" Bell Laboratories. }
  1797. Xcommand line, or @Code "@SysInclude { tab }" in the setup file.
  1798. X@PP
  1799. XTo begin with a very simple example, the table
  1800. X@CD
  1801. X@Tab
  1802. X    @Fmta { @Col A  !  @Col B  !  @Col C }
  1803. X{
  1804. X    @Rowa A { Austen } B { Chaucer } C { Donne }
  1805. X    @Rowa A { Balzac } B { Darwin } C { Goethe }
  1806. X    @Rowa A { Byron } B { Dickens } C { Homer }
  1807. X}
  1808. Xis the result of the following Lout input:
  1809. X@ID @Code {
  1810. X"@Tab"
  1811. X"    @Fmta { @Col A  !  @Col B  !  @Col C }"
  1812. X"{"
  1813. X"    @Rowa A { Austen } B { Chaucer } C { Donne }"
  1814. X"    @Rowa A { Balzac } B { Darwin } C { Goethe }"
  1815. X"    @Rowa A { Byron } B { Dickens } C { Homer }"
  1816. X"}"
  1817. X}
  1818. XImmediately after the @Code "@Tab" symbol, which introduces the table,
  1819. Xcomes a @I { format option } & , {@Code "@Fmta"}, describing the format
  1820. Xof each row.  It says that each row contains three columns:
  1821. X{@Code "@Col A"}, {@Code "@Col B"}, and {@Code "@Col C"}.  The format
  1822. Xoption may have up to 26 columns, with names chosen freely
  1823. Xfrom the upper-&-case letters from @Code A to {@Code Z}.  The symbol
  1824. X@Code "!" separates each pair of columns.
  1825. X@PP
  1826. XAfter the format option comes the body of the table, enclosed in
  1827. Xbraces.  It consists entirely of a sequence of rows, each introduced by
  1828. Xthe @Code "@Rowa" symbol and containing one entry for each column of the
  1829. Xformat option, as shown (the row may occupy any number of lines of the
  1830. Xinput file).  The entries may be arbitrary Lout objects, such as words,
  1831. Xparagraphs, equations, figures, and so on without restriction.  An entry
  1832. Xmay be omitted altogether if it is empty.  Lout will choose suitable widths
  1833. Xfor the columns, and break paragraphs in the entries to the right widths.
  1834. X@PP
  1835. XTab neither knows nor cares what happens to the table it produces; it
  1836. Xcould appear at any point in the document, even within a paragraph of
  1837. Xtext.  Most commonly, though, tables are displayed using the 
  1838. X@Code "@IndentedDisplay" and @Code "@CentredDisplay" symbols from the
  1839. XDocumentLayout package [{@Ref kingston92begin}]:
  1840. X@ID @Code "@CentredDisplay @Tab ..."
  1841. Xor else they go into the @Code "@Table" symbol:
  1842. X@ID @Code {
  1843. X"@Table"
  1844. X"    @Caption { ... }"
  1845. X"@Tab"
  1846. X"{ ..."
  1847. X"}"
  1848. X}
  1849. Xwhich centres them at the top of the following page and adds a caption.
  1850. X@End @Section
  1851. END_OF_FILE
  1852.   if test 2564 -ne `wc -c <'lout/doc/tr.tab/s1'`; then
  1853.     echo shar: \"'lout/doc/tr.tab/s1'\" unpacked with wrong size!
  1854.   fi
  1855.   # end of 'lout/doc/tr.tab/s1'
  1856. fi
  1857. if test -f 'lout/doc/tr.tab/s3' -a "${1}" != "-c" ; then 
  1858.   echo shar: Will not clobber existing file \"'lout/doc/tr.tab/s3'\"
  1859. else
  1860.   echo shar: Extracting \"'lout/doc/tr.tab/s3'\" \(2783 characters\)
  1861.   sed "s/^X//" >'lout/doc/tr.tab/s3' <<'END_OF_FILE'
  1862. X@Section
  1863. X   @Title { Changing the style of rows }
  1864. X@Begin
  1865. X@PP
  1866. XSometimes different rows need different formats, usually because they
  1867. Xare headings.  Although this can be done with style-changing symbols in
  1868. Xthe entries, it is probably better to use multiple format options:
  1869. X@ID @Code {
  1870. X"@Tab"
  1871. X"    @Fmta { @Col @Heading A  !  @Col @Heading B }"
  1872. X"    @Fmtb { @Col @A  !  @Col @CC B }"
  1873. X"{"
  1874. X"    @Rowa A { Course } B { Enrolment }"
  1875. X"    @Rowb A { Software Engineering } B { 174 }"
  1876. X"    @Rowb A { Complexity Theory } B { 37 }"
  1877. X"}"
  1878. X}
  1879. Xhas result
  1880. X@CD {
  1881. X@Tab
  1882. X    @Fmta { @Col @Heading A  !  @Col @Heading B }
  1883. X    @Fmtb { @Col A  !  @Col @CC B }
  1884. X{
  1885. X    @Rowa A { Course } B { Enrolment }
  1886. X    @Rowb A { Software Engineering } B { 174 }
  1887. X    @Rowb A { Complexity Theory } B { 37 }
  1888. X}
  1889. X}
  1890. XWe have used the @Code "@Heading" symbol from the DocumentLayout package
  1891. Xjust to prove that it can be done.  Each row appears in the format of
  1892. Xthe corresponding format option:  @Code "@Rowa" rows in the format of
  1893. X{@Code "@Fmta"}, @Code "@Rowb" rows in the format of {@Code "@Fmtb"},
  1894. Xand so on.  There may be up to ten different format options, from
  1895. X@Code "@Fmta" to {@Code "@Fmtj"}, and they may be used repeatedly and
  1896. Xin any order.
  1897. X@PP
  1898. XThere is an @Code "@Over" symbol for constructing
  1899. X{@I{spanning columns}}:  columns that spread over two or more following
  1900. Xcolumns.  For example, the Lout input
  1901. X@ID @Code {
  1902. X"@I @Tab"
  1903. X"    @Fmta { @Col @CC X @Over A,B  !  @Col C }"
  1904. X"    @Fmtb { @Col A  !  @Col B  !  @Col C }"
  1905. X"{"
  1906. X"    @Rowa X { X } C { C }"
  1907. X"    @Rowb A { A } B { B } C { C }"
  1908. X"}"
  1909. X}
  1910. Xproduces the table
  1911. X@CD {
  1912. X@I @Tab
  1913. X    side { single }
  1914. X    @Fmta { @Col @CC X @Over A,B !! @Col C }
  1915. X    @Fmtb { @Col A !! @Col B !! @Col C }
  1916. X{
  1917. X    @Rowa X { X } C { C }
  1918. X       above { single }
  1919. X       below { single }
  1920. X    @Rowb A { A } B { B } C { C }
  1921. X       below { single }
  1922. X}
  1923. X}
  1924. X(We will see how to get the lines later.)  The @Code "@Over" symbol
  1925. Xalways comes directly after the column letter, and it is followed by one
  1926. Xor more letters separated by commas indicating which columns in the
  1927. Xfollowing row this column is to span over.
  1928. X@PP
  1929. XWith multiple row formats, especially those with spanning columns, it is
  1930. Ximportant to take care that each row is compatible with the one
  1931. Xpreceding it, in the sense of having the same number of columns, taking
  1932. X@Code "@Over" symbols into account.  For example, two successive
  1933. X@Code "@Rowa" rows would not be compatible in the example above, since
  1934. Xthe second has only two columns but the first prepares the way for three.
  1935. X@PP
  1936. XTab does not provide a way to have spanning columns underneath the columns
  1937. Xthey span, so spanning columns are useful only for headings.  This
  1938. Xrestriction was made necessary by inadequacies in the
  1939. Xway that the Basser Lout interpreter handles spanning columns.
  1940. X@End @Section
  1941. END_OF_FILE
  1942.   if test 2783 -ne `wc -c <'lout/doc/tr.tab/s3'`; then
  1943.     echo shar: \"'lout/doc/tr.tab/s3'\" unpacked with wrong size!
  1944.   fi
  1945.   # end of 'lout/doc/tr.tab/s3'
  1946. fi
  1947. if test -f 'lout/doc/tr.tab/s5' -a "${1}" != "-c" ; then 
  1948.   echo shar: Will not clobber existing file \"'lout/doc/tr.tab/s5'\"
  1949. else
  1950.   echo shar: Extracting \"'lout/doc/tr.tab/s5'\" \(1538 characters\)
  1951.   sed "s/^X//" >'lout/doc/tr.tab/s5' <<'END_OF_FILE'
  1952. X@Section
  1953. X   @Title { Margins }
  1954. X@Begin
  1955. X@PP
  1956. XTab places a @I { vertical margin } above and below each row, and a
  1957. X@I { horizontal margin } to the left and right of each column.  (If
  1958. Xthere are no side rules, the leftmost and rightmost margins are
  1959. Xomitted.)  The size of these margins is determined by two options to the
  1960. X@Code "@Tab" symbol:
  1961. X@ID @Code {
  1962. X"@Tab"
  1963. X"    hmargin { 0.3c }"
  1964. X"    vmargin { 0.2v }"
  1965. X"    @Fmta { ... }"
  1966. X"..."
  1967. X}
  1968. XShown here are the default values, 0.3 centimetres for the horizontal
  1969. Xmargins, and 0.2 times the current inter-line spacing (denoted by the
  1970. Xletter {@Code v}) for the vertical margins.
  1971. X@PP
  1972. XThe horizontal margin is fixed, but each row may have its own vertical margin:
  1973. X@ID @Code {
  1974. X"@Rowa"
  1975. X"    vmargin { 0.5vx }"
  1976. X"    A { ... }"
  1977. X}
  1978. XIf omitted, the @Code vmargin value is taken from the @Code "@Tab" option.
  1979. X@PP
  1980. XThe value shown here, {@Code "0.5vx"}, requests a vertical margin of
  1981. Xhalf the current inter-line spacing, measured from the baseline of the
  1982. Xentry rather than from its edge (this is what the @Code x means).  This
  1983. Xvalue is a good choice when the entries contain simple words or lines
  1984. Xof text (i.e. no paragraphs, large equations, figures, etc.):
  1985. X@CD {
  1986. X@Tab
  1987. X    vmargin { 0.5vx }
  1988. X    @Fmta { @Col @Heading A  !  @Col @Heading B }
  1989. X    @Fmtb { @Col A  !  @Col @CC B }
  1990. X{
  1991. X    @Rowa A { Course } B { Enrolment }
  1992. X    @Rowb A { Software Engineering } B { 174 }
  1993. X    @Rowb A { Complexity Theory } B { 37 }
  1994. X}
  1995. X}
  1996. Xsince the lines of the table will then be separated evenly like
  1997. Xthe lines in paragraphs.
  1998. X@End @Section
  1999. END_OF_FILE
  2000.   if test 1538 -ne `wc -c <'lout/doc/tr.tab/s5'`; then
  2001.     echo shar: \"'lout/doc/tr.tab/s5'\" unpacked with wrong size!
  2002.   fi
  2003.   # end of 'lout/doc/tr.tab/s5'
  2004. fi
  2005. if test -f 'lout/hyph.install' -a "${1}" != "-c" ; then 
  2006.   echo shar: Will not clobber existing file \"'lout/hyph.install'\"
  2007. else
  2008.   echo shar: Extracting \"'lout/hyph.install'\" \(2297 characters\)
  2009.   sed "s/^X//" >'lout/hyph.install' <<'END_OF_FILE'
  2010. XInstallation of hyphenation patterns
  2011. X
  2012. XJeffrey H. Kingston
  2013. X22 December 1992
  2014. X
  2015. XBasser Lout Version 2.03 incorporates automatic hyphenation using the method
  2016. Xintroduced by TeX (see Appendix H of the TeXBook by D. E. Knuth).  No special
  2017. Xaction is required to install hyphenation unless it is desired to change the
  2018. Xhyphenation patterns that control it.
  2019. X
  2020. XThe first time on any run that hyphenation is required, Lout will search the
  2021. X@SysInclude directories for a binary file called lout.hyph.packed, which
  2022. Xcontains a memory image of the TeX hyphenation patterns, modified so that
  2023. Xthe file may be safely shared by big-endian and little-endian machines.  If
  2024. Xthis file cannot be found, Lout then searches for the text file lout.hyph
  2025. Xinstead, and uses it to construct lout.hyph.packed.  To change the hyphenation
  2026. Xpatterns, delete lout.hyph.packed and modify lout.hyph; the rest is automatic.
  2027. X
  2028. XFile lout.hyph mainly contains the long list of TeX hyphenation patterns,
  2029. Xbut it begins with a sequence of character classes, one class per line,
  2030. Xterminated by a blank line:
  2031. X
  2032. X    @!$%^&*()_-+=~`{[}]:;'|<,.>?/0123456789
  2033. X    aA
  2034. X    bB
  2035. X    cC
  2036. X    ...
  2037. X    yY
  2038. X    zZ
  2039. X
  2040. XBriefly, hyphenation of a word works like this.  If the word contains a
  2041. Xcharacter not found in any of these classes, it will not be hyphenated.
  2042. XOtherwise the word is analysed into sequences of letters separated by
  2043. Xsequences of non-letters (the characters in the first class are by
  2044. Xdefinition the non-letters, and the remaining characters are the letters).
  2045. XEach sequence of five or more letters is then matched with the hyphenation
  2046. Xpatterns and hyphenated.  The matching process treats the members of each
  2047. Xclass as identical (so the classes above ensure that the distinction
  2048. Xbetween upper and lower case is ignored).  The hyphen character "-" is
  2049. Xtreated specially.  Apart from the weighting digits, the patterns should
  2050. Xcontain only letters.
  2051. X
  2052. XExtreme lengths were resorted to to compress the .packed file as much as
  2053. Xpossible, and attempts to increase the number of classes or patterns
  2054. Xsignificantly are likely to fail.  Some words are not hyphenated well by
  2055. Xthe standard patterns and must be treated as exceptions; see the
  2056. XDocumentLayout package implementation (file dl in lout/include) for
  2057. Xthe standard list of these exceptions and how to deal with them.
  2058. END_OF_FILE
  2059.   if test 2297 -ne `wc -c <'lout/hyph.install'`; then
  2060.     echo shar: \"'lout/hyph.install'\" unpacked with wrong size!
  2061.   fi
  2062.   # end of 'lout/hyph.install'
  2063. fi
  2064. if test -f 'lout/include/ft' -a "${1}" != "-c" ; then 
  2065.   echo shar: Will not clobber existing file \"'lout/include/ft'\"
  2066. else
  2067.   echo shar: Extracting \"'lout/include/ft'\" \(2243 characters\)
  2068.   sed "s/^X//" >'lout/include/ft' <<'END_OF_FILE'
  2069. X
  2070. X###############################################################################
  2071. X#                                                                             #
  2072. X#  Font definitions                                                           #
  2073. X#                                                                             #
  2074. X###############################################################################
  2075. X
  2076. Xfontdef    AvantGarde Base            { "AvantGarBoo.AFM"    }
  2077. Xfontdef    AvantGarde Slope        { "AvantGarBooObl.AFM"    }
  2078. Xfontdef    AvantGarde Demi            { "AvantGarDem.AFM"    }
  2079. Xfontdef    AvantGarde DemiSlope        { "AvantGarDemObl.AFM"    }
  2080. X
  2081. Xfontdef    Bookman Base            { "BookmDem.AFM"    }
  2082. Xfontdef    Bookman Slope            { "BookmDemIta.AFM"    }
  2083. Xfontdef    Bookman Light            { "BookmLig.AFM"    }
  2084. Xfontdef    Bookman LightSlope        { "BookmLigIta.AFM"    }
  2085. X
  2086. Xfontdef    Courier Base            { "Couri.AFM"        }
  2087. Xfontdef    Courier Slope            { "CouriObl.AFM"    }
  2088. Xfontdef    Courier Bold            { "CouriBol.AFM"    }
  2089. Xfontdef    Courier BoldSlope        { "CouriBolObl.AFM"    }
  2090. X
  2091. Xfontdef    Helvetica Base            { "Helve.AFM"        }
  2092. Xfontdef    Helvetica Slope            { "HelveObl.AFM"    }
  2093. Xfontdef    Helvetica Bold            { "HelveBol.AFM"    }
  2094. Xfontdef    Helvetica BoldSlope        { "HelveBolObl.AFM"    }
  2095. Xfontdef    Helvetica Cond            { "HelveCon.AFM"    }
  2096. Xfontdef    Helvetica CondSlope        { "HelveConObl.AFM"    }
  2097. Xfontdef    Helvetica CondBold        { "HelveConBol.AFM"    }
  2098. Xfontdef    Helvetica CondBoldSlope        { "HelveConBolObl.AFM"    }
  2099. Xfontdef    Helvetica Narrow        { "HelveNar.AFM"    }
  2100. Xfontdef    Helvetica NarrowSlope        { "HelveNarObl.AFM"    }
  2101. Xfontdef    Helvetica NarrowBold        { "HelveNarBol.AFM"    }
  2102. Xfontdef    Helvetica NarrowBoldSlope    { "HelveNarBolObl.AFM"    }
  2103. X
  2104. Xfontdef    Schoolbook Base            { "NewCenSchRom.AFM"    }
  2105. Xfontdef    Schoolbook Slope        { "NewCenSchIta.AFM"    }
  2106. Xfontdef    Schoolbook Bold            { "NewCenSchBol.AFM"    }
  2107. Xfontdef    Schoolbook BoldSlope        { "NewCenSchBolIta.AFM"    }
  2108. X
  2109. Xfontdef    Palatino Base            { "PalatRom.AFM"    }
  2110. Xfontdef    Palatino Slope            { "PalatIta.AFM"    }
  2111. Xfontdef    Palatino Bold            { "PalatBol.AFM"    }
  2112. Xfontdef    Palatino BoldSlope        { "PalatBolIta.AFM"    }
  2113. X
  2114. Xfontdef    Symbol Base            { "Symbo.AFM"        }
  2115. X
  2116. Xfontdef    Times Base            { "TimesRom.AFM"    }
  2117. Xfontdef    Times Slope            { "TimesIta.AFM"    }
  2118. Xfontdef    Times Bold            { "TimesBol.AFM"    }
  2119. Xfontdef    Times BoldSlope            { "TimesBolIta.AFM"    }
  2120. X
  2121. Xfontdef    Chancery Base            { "ZapfChaMedIta.AFM"    }
  2122. Xfontdef    Dingbats Base            { "ZapfDin.AFM"        }
  2123. END_OF_FILE
  2124.   if test 2243 -ne `wc -c <'lout/include/ft'`; then
  2125.     echo shar: \"'lout/include/ft'\" unpacked with wrong size!
  2126.   fi
  2127.   # end of 'lout/include/ft'
  2128. fi
  2129. echo shar: End of archive 29 \(of 30\).
  2130. cp /dev/null ark29isdone
  2131. MISSING=""
  2132. 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
  2133.     if test ! -f ark${I}isdone ; then
  2134.     MISSING="${MISSING} ${I}"
  2135.     fi
  2136. done
  2137. if test "${MISSING}" = "" ; then
  2138.     echo You have unpacked all 30 archives.
  2139.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  2140. else
  2141.     echo You still must unpack the following archives:
  2142.     echo "        " ${MISSING}
  2143. fi
  2144. exit 0
  2145. exit 0 # Just in case...
  2146.