home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume38 / lout / part32 < prev    next >
Text File  |  1993-08-11  |  75KB  |  1,770 lines

  1. Newsgroups: comp.sources.misc
  2. From: jeff@joyce.cs.su.oz.au (Jeff Kingston)
  3. Subject: v38i100:  lout - Lout document formatting system, v2.05, Part32/35
  4. Message-ID: <1993Aug10.132429.19340@sparky.sterling.com>
  5. X-Md4-Signature: 50a49c88125ce98195fce9ad67113ef9
  6. Sender: kent@sparky.sterling.com (Kent Landfield)
  7. Organization: Sterling Software
  8. Date: Tue, 10 Aug 1993 13:24:29 GMT
  9. Approved: kent@sparky.sterling.com
  10.  
  11. Submitted-by: jeff@joyce.cs.su.oz.au (Jeff Kingston)
  12. Posting-number: Volume 38, Issue 100
  13. Archive-name: lout/part32
  14. Environment: UNIX
  15. Supersedes: lout: Volume 37, Issue 99-128
  16.  
  17. #! /bin/sh
  18. # This is a shell archive.  Remove anything before this line, then feed it
  19. # into a shell via "sh file" or similar.  To overwrite existing files,
  20. # type "sh file -c".
  21. # Contents:  doc/tr.begin/s15 doc/tr.impl/s2.1 doc/tr.impl/s3.2
  22. #   doc/tr.impl/s6.1 doc/tr.impl/s7.0 doc/tr.lout/ch1.03
  23. #   doc/tr.lout/ch3.04 doc/tr.over/s1 doc/tr.over/s3 doc/tr.tab/s2
  24. #   doc/tr.tab/s7 include/doc include/fontdefs0 include/fontdefs1
  25. #   include/pas include/report man/lout.1
  26. # Wrapped by kent@sparky on Sun Aug  8 12:29:33 1993
  27. PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin ; export PATH
  28. echo If this archive is complete, you will see the following message:
  29. echo '          "shar: End of archive 32 (of 35)."'
  30. if test -f 'doc/tr.begin/s15' -a "${1}" != "-c" ; then 
  31.   echo shar: Will not clobber existing file \"'doc/tr.begin/s15'\"
  32. else
  33.   echo shar: Extracting \"'doc/tr.begin/s15'\" \(3933 characters\)
  34.   sed "s/^X//" >'doc/tr.begin/s15' <<'END_OF_FILE'
  35. X@Section
  36. X   @Tag { big.changes }
  37. X   @Title { Making more radical changes }
  38. X@Begin
  39. X@PP
  40. XThe DocumentLayout package makes a large number
  41. Xof decisions, about how large the pages will be, which fonts will
  42. Xordinarily be used, and so on.  The more complex decisions, such as the
  43. Xappearance of tables of contents in books, can only be changed by
  44. Xmodifying the packages,  but many of the simpler decisions can be changed
  45. Xquite easily by setting options in the setup file.
  46. X@PP
  47. XThe first step is to obtain a private copy of the setup file.  A local
  48. Xexpert will know where these files are kept; for example, in directory
  49. X{ @Code "/usr/lout/include"}.  Suppose the @Code report setup file is
  50. Xcopied into a file called { @Code myrep }; then typing
  51. X@ID @Code "lout myrep myfile"
  52. Xinstead of
  53. X@ID @Code "lout -ireport myfile"
  54. Xruns Lout with the private copy of the setup file, {@Code "myrep"}.
  55. X@PP
  56. XExactly what the setup file contains will depend upon the local
  57. Xsituation, but it will be something like this:
  58. X@ID @Code {
  59. X"# Setup file for reports."
  60. X"# J. H. Kingston, July 1991"
  61. X""
  62. X"@SysInclude { ft }"
  63. X"@SysInclude { dl }"
  64. X"# @SysInclude { eq }"
  65. X"# @SysInclude { pas }"
  66. X"# @SysInclude { fig }"
  67. X"# @SysInclude { tab }"
  68. X""
  69. X"@Use { @DocumentLayout"
  70. X"  # @InitialFont { Times Base 12p }"
  71. X"  # @InitialBreak { adjust 1.2fx }"
  72. X"  # @Hyphenate { Yes }"
  73. X"  # @PageNumbers { Yes }"
  74. X"  # @Columns { Single }"
  75. X"  # @HeadingFont { Bold }"
  76. X"  # @ParaIndent { 2.0f }"
  77. X"  # @PageTop { |0.5rt - @PageNum - }" &0io ""
  78. X"  # @PageFoot { @Null }"
  79. X"}"
  80. X}
  81. XWhenever Lout encounters a @Code "#" character not enclosed in quotes,
  82. Xit ignores it and everything following it up to the end of the line.  The
  83. Xfirst two lines of the setup file, then, are comments for the human
  84. Xreader.  After them come lines which cause Lout to read the file
  85. X@Code "ft" of font definitions and the file @Code "dl" which contains
  86. Xthe definition of the DocumentLayout package.
  87. X@PP
  88. XThe next four lines are comments and will be ignored, but if the initial
  89. X@Code "#" is deleted they cause Lout to read the definitions of the Eq
  90. Xequation formatting package and the Pas Pascal program formatting package
  91. X[{@Ref kingston92eq}], the Fig diagram drawing package [{@Ref kingston92fig}],
  92. Xand the Tab table formatting package [{@Ref kingston92tab}].
  93. X@PP
  94. XNext comes a @Code "@DocumentLayout" symbol within a @Code "@Use"
  95. Xclause.  It is this symbol whose options may
  96. Xbe changed so as to affect the overall layout.  These options are listed
  97. Xas comments on the following lines, together with the default value
  98. Xof each.  To change an option, delete the @Code "#" and change the
  99. Xvalue.  For example, the normal paragraph indent produced by @Code "@PP" is
  100. X@Code "2.0f" (twice the current font size).  To change it, say to
  101. X{@Code "3.0f"}, change the line to
  102. X@ID @Code "@ParaIndent { 3.0f }"
  103. XThe display indent option (not shown here) should probably be changed as well.
  104. X@PP
  105. XThe first five options have the same name as five of the @Code "@Document"
  106. Xsymbol's options, and they determine the default value of those
  107. Xoptions.  The @Code "@PageTop" and @Code "@PageFoot" options determine
  108. Xthe appearance of the page header and footer lines (where the page
  109. Xnumbers appear), and are best left to experts;  but, for example,
  110. X@ID @Code "@PageTop { |1rt  @PageNum }"
  111. Xwill make the page number appear at the top right of each page, without
  112. Xthe @Code "-" characters.
  113. X@PP
  114. XThe setup file is also the place to add your own definitions.  They should
  115. Xbe placed just before the @Code "@Use" clause, as shown for example in
  116. XSection 4 of the report describing the Eq equation formatting package
  117. X[{@Ref kingston92eq}].
  118. X@PP
  119. XThose who wish to make more radical changes will have to copy the @Code dl
  120. Xfile and change the definition of the DocumentLayout package.  This requires
  121. Xknowledge of the principles of Lout, and the primitive features from which
  122. Xothers are built, as described in the Lout user manual [{@Ref kingston92}].
  123. X@End @Section
  124. END_OF_FILE
  125.   if test 3933 -ne `wc -c <'doc/tr.begin/s15'`; then
  126.     echo shar: \"'doc/tr.begin/s15'\" unpacked with wrong size!
  127.   fi
  128.   # end of 'doc/tr.begin/s15'
  129. fi
  130. if test -f 'doc/tr.impl/s2.1' -a "${1}" != "-c" ; then 
  131.   echo shar: Will not clobber existing file \"'doc/tr.impl/s2.1'\"
  132. else
  133.   echo shar: Extracting \"'doc/tr.impl/s2.1'\" \(4030 characters\)
  134.   sed "s/^X//" >'doc/tr.impl/s2.1' <<'END_OF_FILE'
  135. X@SubSection
  136. X    @Tag { genesis }
  137. X    @Title { The genesis of the object abstraction }
  138. X@Begin
  139. X@PP
  140. XWhen one examines previous document formatting systems [4]
  141. Xlooking for ideas for abstractions, as the author did in 1984, the Eqn
  142. Xformatting language [5] stands out like a beacon.  In
  143. XEqn, a mathematical formula such as 
  144. X@ID @Eq { { x sup 2 + 1 } over 4 }
  145. Xis produced by typing
  146. X@ID @Code "{ x sup 2 + 1 } over 4"
  147. Xin the input file; @Code sup and @Code over are binary operators, and
  148. Xbraces are used for grouping.  This is document formatting at a very
  149. Xhigh level, close to the language of mathematics itself, with all
  150. Xreference to font changes and spacing suppressed.
  151. X@PP
  152. XEqn provides a single data type (let us call it the {@I expression}),
  153. Xbuilt up recursively in context-free style:  where one expression may appear,
  154. Xany expression may appear.  This approach is common in algebra and
  155. Xprogramming languages, where its simplicity and expressiveness have long
  156. Xbeen appreciated; but Eqn was the first language to demonstrate its
  157. Xutility in document formatting.
  158. X@PP
  159. XEach expression is treated by Eqn as a rectangle with a
  160. X{@I {horizontal axis}}, used for alignment with adjacent expressions:
  161. X@ID @ShowMarks marks { horizontal } @Eq { { x sup 2 + 1 } over 4 }
  162. XThe size and rendering of the expression on the printed page are
  163. Xknown only to the implementation, never explicitly calculated or
  164. Xaccessed by the user.  This prohibition is
  165. Xcrucial to the maintenance of the context-free property in practice.  In
  166. XLout, for example, equations, figures, tables, and arbitrary objects may
  167. Xbe mixed together freely.  This would be impossible if size information
  168. Xwas hidden from the implementation in user calculations.
  169. X@PP
  170. XThe object abstraction of Lout is a direct descendant of the Eqn
  171. Xexpression.  It employs the same context-free recursive style of construction,
  172. Xand each object is treated by Lout as a rectangle:
  173. X@ID @Fig {
  174. X@ShowMarks { 1c @Wide ^| 2c @Wide 0.45c @High ^/ 0.35c @High }
  175. X}
  176. XThe horizontal axis, called a @I { row mark } in Lout, has a
  177. Xvertical analogue called a {@I {column mark}}, creating a valuable
  178. Xsymmetry between horizontal and vertical.  Multiple column and row marks
  179. Xare permitted:
  180. X@ID @Fig {
  181. XA:: @Box margin { 0c } paint { grey } { 1.2c @Wide 0.8c @High }
  182. X|1c
  183. XB:: @Box margin { 0c } paint { grey } { 1c @Wide 0.8c @High }
  184. X/0.5c
  185. XC:: @Box margin { 0c } paint { grey } { 0.7c @Wide 0.8c @High }
  186. X|1c
  187. XD:: @Box margin { 0c } paint { grey } { 1.3c @Wide 0.8c @High }
  188. X// @Line linestyle { dashed }
  189. X     from { A@W -- { 0.3 cm 0 } }
  190. X     to   { B@W ++ { 1.6 cm 0 } }
  191. X// @Line linestyle { dashed }
  192. X     from { C@W -- { 0.3 cm 0 } }
  193. X     to   { D@W ++ { 1.6 cm 0 } }
  194. X// @Line linestyle { dashed }
  195. X     from { A@NW ++ { 0 0.3 cm } }
  196. X     to   { C@SW -- { 0 0.3 cm } }
  197. X// @Line linestyle { dashed }
  198. X     from { B@NW ++ { 0.3 cm 0.3 cm } }
  199. X     to   { D@SW ++ { 0.3 cm -0.3 cm } }
  200. X}
  201. Xso that objects are able to represent tables.
  202. X@PP
  203. XThis abstraction has some limitations, the most obvious being the restriction
  204. Xof size calculations to rectangular bounding boxes.  Non-rectangular and
  205. Xdisconnected shapes arise naturally in figures and in the characters of
  206. Xfonts; the extension to them is conceptually straightforward and might
  207. Xhelp to explain some fine points of layout such as kerning.  However,
  208. Xthere are implementation and language design problems, particularly
  209. Xwhen filling non-rectangular shapes with text, and so the author chose
  210. Xto keep to Eqn's rectangles.
  211. X@PP
  212. XA more fundamental limitation of the object abstraction arises from the
  213. Xinability of recursive data types to describe cross-linked structures,
  214. Xwhich seem to require some means of naming the multiply referenced
  215. Xparts.  Lout is obliged to introduce additional abstractions to cope
  216. Xwith cross linking:  galleys for inserting text into pages
  217. X(Section {@NumberOf galleys}), cross references (Section {@NumberOf cross}),
  218. Xand labelled points in figure drawing [6].  An
  219. Xabstraction closer to hypertext might form a more unified basis for
  220. Xthese features.
  221. X@End @SubSection
  222. END_OF_FILE
  223.   if test 4030 -ne `wc -c <'doc/tr.impl/s2.1'`; then
  224.     echo shar: \"'doc/tr.impl/s2.1'\" unpacked with wrong size!
  225.   fi
  226.   # end of 'doc/tr.impl/s2.1'
  227. fi
  228. if test -f 'doc/tr.impl/s3.2' -a "${1}" != "-c" ; then 
  229.   echo shar: Will not clobber existing file \"'doc/tr.impl/s3.2'\"
  230. else
  231.   echo shar: Extracting \"'doc/tr.impl/s3.2'\" \(3408 characters\)
  232.   sed "s/^X//" >'doc/tr.impl/s3.2' <<'END_OF_FILE'
  233. X@SubSection
  234. X    @Tag { recursion }
  235. X    @Title { Recursion and page layout }
  236. X@Begin
  237. X@PP
  238. XDesign and implementation should proceed together in exploratory projects,
  239. Xsince otherwise the design too easily becomes unrealistic.  Sometimes the
  240. Ximplementation does more than its designer intended.  The author wrote the
  241. Xfollowing purely as a testing scaffold:
  242. X@ID @Code {
  243. X"def @Page right x"
  244. X"{"
  245. X"    8i @Wide 11i @High"
  246. X"    {"
  247. X"        //1i  ||1i  x  ||1i"
  248. X"        //1i"
  249. X"    }"
  250. X"}"
  251. X}
  252. XOnly afterwards did he realize its significance:  the concept of a page
  253. Xhad been defined outside the implementation, removing the need for
  254. Xcommands for setting page width and height, margins, and so on.
  255. X@PP
  256. XDefining a sequence of pages is harder, since their number is not known
  257. Xin advance.  A simple version of this same problem is afforded by the
  258. Xleaders found in tables of contents:
  259. X@ID {
  260. X4i @Wide { Chapter 7  @Leaders  53 }
  261. X}
  262. XThis seemed to require recursion, specifically the definition
  263. X@ID @Code {
  264. X"def @Leaders { ..   @Leaders }"
  265. X}
  266. XNote that both @Code ".." and @Code "@Leaders" are objects, so the two
  267. Xspaces separating them are significant.  No base case is given, and indeed
  268. Xwe have no boolean or conditional operators with which to express it;
  269. Xbut we can adopt the implicit base `if space is not sufficient, delete
  270. X{@Code "@Leaders"} and any preceding space'.  Then the expression
  271. X@ID @Code "4i @Wide { Chapter 7  @Leaders  53 }"
  272. Xwill produce the object shown above.  It is hard to see how this base
  273. Xcould be made explicit, without violating the general principle of
  274. Xkeeping all size information internal.  In the implementation,
  275. X@Code "@Leaders" remains unexpanded while sizes are being
  276. Xcalculated; then it is treated similarly to a receptive symbol, with
  277. Xits body as an incoming galley (Section {@NumberOf flushing}).
  278. X@PP
  279. XWith this settled, it is now clear how to define a document which is a
  280. Xnumbered sequence of pages.  Let @Code "@Next" be a prefix operator
  281. Xwhich returns its parameter plus one.  Then
  282. X@ID @Code {
  283. X"def @PageList"
  284. X"    right @PageNum"
  285. X"{"
  286. X"    @Page {"
  287. X"          |0.5rt - @PageNum -"
  288. X"          //1v   @TextPlace"
  289. X"          //1rt  @FootSect"
  290. X"    }"
  291. X"    //"
  292. X"    @PageList @Next @PageNum"
  293. X"}"
  294. X}
  295. Xwhen invoked in the expression {@Code "@PageList 1"}, has for its result
  296. Xthe potentially infinite object
  297. X@ID {
  298. X@LittlePage {
  299. X|0.5rt - 1 -
  300. X//1.2vx @Code "@TextPlace"
  301. X//1rt @Code "@FootSect"
  302. X}
  303. X//
  304. X@LittlePage {
  305. X|0.5rt - 2 -
  306. X//1.2vx @Code "@TextPlace"
  307. X//1rt @Code "@FootSect"
  308. X}
  309. X//0.2c
  310. X8p @Font @Code "@PageList 3"
  311. X}
  312. XSimilarly, we may define @Code "@FootSect" like this:
  313. X@ID @Code {
  314. X"def @FootSect"
  315. X"{"
  316. X"    def @FootList"
  317. X"        right @Num"
  318. X"    {"
  319. X"        @FootPlace"
  320. X"        //1v"
  321. X"        @FootList @Next @Num"
  322. X"    }"
  323. X""
  324. X"    1i @Wide @HLine"
  325. X"    //1v"
  326. X"    @FootList 1"
  327. X"}"
  328. X}
  329. Xso that an invocation of @Code "@FootSect" produces
  330. X@ID @Code {
  331. X1i @Wide @HLine
  332. X"@FootPlace"
  333. X"@FootPlace"
  334. X"@FootPlace"
  335. X"..."
  336. X}
  337. XThe expansion process is very similar to a BNF derivation, and would be
  338. Xattempted only on demand.
  339. X@PP
  340. XClearly, deciding which expansions to take and replacing @Code "@TextPlace"
  341. Xand {@Code "@FootPlace"} by the appropriate actual text will not be easy;
  342. Xthis is the subject of Section {@NumberOf galleys}.  The important point
  343. Xfor now is that we have here a very simple and flexible method of specifying
  344. Xthe layout of pages, which requires no specialized language features.
  345. X@End @SubSection
  346. END_OF_FILE
  347.   if test 3408 -ne `wc -c <'doc/tr.impl/s3.2'`; then
  348.     echo shar: \"'doc/tr.impl/s3.2'\" unpacked with wrong size!
  349.   fi
  350.   # end of 'doc/tr.impl/s3.2'
  351. fi
  352. if test -f 'doc/tr.impl/s6.1' -a "${1}" != "-c" ; then 
  353.   echo shar: Will not clobber existing file \"'doc/tr.impl/s6.1'\"
  354. else
  355.   echo shar: Extracting \"'doc/tr.impl/s6.1'\" \(3774 characters\)
  356.   sed "s/^X//" >'doc/tr.impl/s6.1' <<'END_OF_FILE'
  357. X@SubSection
  358. X    @Tag { cross }
  359. X    @Title { The cross reference abstraction }
  360. X@Begin
  361. X@PP
  362. XIn developing the cross reference abstraction, it seemed best to begin
  363. Xwith the database application, since it is the simplest.  Database
  364. Xrelations are naturally mapped into Lout definitions:
  365. X@ID @Code {
  366. X"def @Reference"
  367. X"    named @Tag {}"
  368. X"    named @Author {}"
  369. X"    named @Title {}"
  370. X"    named @Journal {}"
  371. X"{}"
  372. X}
  373. XThe set of all invocations of @Code "@Reference" is a relation whose
  374. Xattributes are the parameters, and whose tuples are the invocations.  To
  375. Xcomplete the correspondence, we need only declare that the @Code "@Tag"
  376. Xparameter is special, serving as the key attribute.
  377. X@PP
  378. XFollowing the database model, we next need a notation for retrieving the
  379. Xinvocation with a given tag:
  380. X@ID @Code "@Reference&&kingston91"
  381. XThis @I {cross reference} is like an arrow pointing to the invocation.  To
  382. Xaccess its attributes, we write
  383. X@ID @Code "@Reference&&kingston91 @Open { @Author, @Title }"
  384. XThe @Code "@Open" operator evaluates its right parameter in an
  385. Xenvironment which includes the exported parameters of its left.
  386. X@PP
  387. XAn invocation is chosen to be a running header because of its proximity
  388. Xto the place where it is used, rather than by its tag.  Such proximity
  389. Xis naturally expressed by two special tags, {@Code preceding} and
  390. X{@Code following}; for example, @Code "@Sym&&following" will point to
  391. Xthe closest following invocation of @Code "@Sym" in the final printed
  392. Xdocument.  This is much simpler conceptually than reference to the
  393. Xinternal state of the document formatter at a critical moment, the usual
  394. Xapproach to running headers.
  395. X@PP
  396. XIt turns out that the above design solves all the cross referencing
  397. Xproblems encountered in practice except one, which may be typified by
  398. Xthe problem of finding the number of the page on which the chapter whose
  399. Xtag is @Code "intro" begins.  Two cross referencing steps are needed,
  400. Xfirst to {@Code "@Chapter&&intro"}, then from there to
  401. X{@Code "@Page&&preceding"}, where the page number is known.
  402. X@PP
  403. XGiven the success of the design so far, this last problem proves to be
  404. Xsurprisingly difficult.  We first try
  405. X@ID @Code {
  406. X"@Chapter&&intro @Open {"
  407. X"    @Page&&preceding @Open { @PageNum }"
  408. X"}"
  409. X}
  410. Xbut this fails because @Code "@Page&&preceding" is evaluated in the
  411. Xpresent context, not in the context of @Code "@Chapter&&intro" as
  412. Xrequired.  So our next attempt is
  413. X@ID @Code {
  414. X"def @Chapter"
  415. X"    named @PageNum { @Page&&preceding @Open { @PageNum } }"
  416. X"    ..."
  417. X}
  418. Xwith the @Code "@Page&&preceding" cross reference attached to the
  419. Xchapter; we write
  420. X@ID @Code "@Chapter&&intro @Open { @PageNum }"
  421. XThis also fails, because parameters are evaluated after substitution, so
  422. Xonce again @Code "@Page&&preceding" is evaluated in the wrong context.  We
  423. Xcould of course define a new operator specifically for this case:
  424. X@ID @Code "@Page&&{ @Preceding @Chapter&&intro }"
  425. Xor some such.  This is free of the annoying context-sensitivity, but it
  426. Xseems quite complex, and the expected cross reference @Code "@Page&&preceding"
  427. Xdoes not appear.
  428. X@PP
  429. XThe author was lost in these obscurities for some time, and ultimately
  430. Xrescued himself by looking ahead to the implementation of the
  431. X@Code preceding and @Code following tags, to see if a simple extension
  432. Xof it would solve the problem.  This led to the @Code "@Tagged" operator:
  433. X@ID @Code "@Page&&preceding @Tagged intro"
  434. Xplaced at the beginning of the body of the chapter will attach @Code intro
  435. Xas an extra tag to the closest preceding invocation of {@Code "@Page"},
  436. Xso that
  437. X@ID @Code "@Page&&intro @Open { @PageNum }"
  438. Xyields the desired page number.  There is something low-level and ad hoc
  439. Xabout the @Code "@Tagged" operator, but the two cross references do
  440. Xappear naturally, and it works.
  441. X@End @SubSection
  442. END_OF_FILE
  443.   if test 3774 -ne `wc -c <'doc/tr.impl/s6.1'`; then
  444.     echo shar: \"'doc/tr.impl/s6.1'\" unpacked with wrong size!
  445.   fi
  446.   # end of 'doc/tr.impl/s6.1'
  447. fi
  448. if test -f 'doc/tr.impl/s7.0' -a "${1}" != "-c" ; then 
  449.   echo shar: Will not clobber existing file \"'doc/tr.impl/s7.0'\"
  450. else
  451.   echo shar: Extracting \"'doc/tr.impl/s7.0'\" \(3895 characters\)
  452.   sed "s/^X//" >'doc/tr.impl/s7.0' <<'END_OF_FILE'
  453. X@Section
  454. X    @Title { Conclusion }
  455. X@Begin
  456. X@PP
  457. XSince its public release in October 1991, the Basser Lout interpreter
  458. Xhas been ported without incident to a wide variety of Unix systems and
  459. Xhardware.  It was tested extensively before release on its own
  460. Xdocumentation, and the few minor bugs which have emerged since then have
  461. Xall been fixed in the second release, scheduled to appear in mid-1992.
  462. X@PP
  463. XSeven substantial packages of definitions are distributed with Basser
  464. XLout.  The DocumentLayout package, and its variants ReportLayout and
  465. XBookLayout, provide the standard features that all documents
  466. Xrequire:  pages, columns, paragraphs, headings, footnotes, floating
  467. Xfigures and tables, chapters and sections, displays and lists, access
  468. Xto bibliographic databases, cross references, and so on
  469. X[11].  The BookLayout package has extra features
  470. Xneeded by books, including an automatically generated table of contents,
  471. XRoman page numbers for the prefatory material, running page headers,
  472. Xodd and even page layouts, and a sorted index.  The Eq package formats
  473. Xequations, and Pas formats Pascal programs [10]; Tab
  474. Xformats tables [12]; and Fig draws figures
  475. X[6].
  476. X@PP
  477. XThe non-expert user who uses these packages perceives a system of a
  478. Xstandard quite similar to other fully developed batch formatters,
  479. Xalthough the interface is considerably more coherent than, say, the troff
  480. Xfamily's [8].  The expert user perceives a system which
  481. Xis radically different from previous ones, in which a great deal can be
  482. Xachieved very quickly.  To take an extreme example, Pas was designed,
  483. Ximplemented, tested, and documented in one afternoon.  Eq took about
  484. Xa week, but most of that time was spent in marshalling the vast
  485. Xrepertoire of mathematical symbols, and fine-tuning the spacing.  Most
  486. Xof the effort seems to go into designing a good interface; most symbols
  487. Xare implemented in just one or a few lines of Lout.
  488. X@PP
  489. XA group of about 20 satisfied non-expert users has grown up within
  490. Xthe author's department, mainly Honours students with no investment
  491. Xin older systems to hold them back.  Basser Lout has been advertised
  492. Xon the Internet news as available via anonymous {@I ftp}, so the
  493. Xextent of its outside user community is hard to gauge.  About 50
  494. Xpeople have mailed comments or questions to the author; many
  495. Xof these people have ported the program, written small definitions,
  496. Xand modified the standard packages.
  497. X@PP
  498. XFuture work could usefully begin with the improvements suggested in this
  499. Xpaper:  overlapping spanning columns, better semantics for available
  500. Xspace, and especially horizontal galleys.  Support for non-European
  501. Xlanguages is also needed.  However, the main task is the development of
  502. Xan interactive document editor based on Lout.  A structure editor similar
  503. Xto Lilac [13], which already has objects and user-defined
  504. Xsymbols, is envisaged; since cross references are easy when the whole
  505. Xdocument is available, the only major new problem is the treatment of
  506. Xgalleys, including the expansion and retraction of receptive symbols.
  507. X@LP
  508. X@LP
  509. X@B { Note. }  Since the above was written the author has completed a
  510. Xrevised version of Basser Lout, in which the problem concerning
  511. Xavailable space mentioned in Section {@NumberOf style} has been resolved.
  512. X@LP
  513. X@LP
  514. X@B { Acknowledgment. }  The author gratefully acknowledges many
  515. Xvaluable discussions with Douglas W. Jones, especially during the
  516. Xdevelopment of the galley abstraction; and also many helpful comments on
  517. Xpresentation by the anonymous referee.
  518. X@DP
  519. X@DP
  520. X@Heading { References }
  521. X@NumberedList
  522. X@LI @RefPrint kingston91
  523. X@LI @RefPrint kingston91over
  524. X@LI @RefPrint kingston91basser
  525. X@LI @RefPrint furuta82
  526. X@LI @RefPrint kernighan75
  527. X@LI @RefPrint kingston91fig
  528. X@LI @RefPrint reid80
  529. X@LI @RefPrint ossanna76
  530. X@LI @RefPrint knuth84
  531. X@LI @RefPrint kingston91eq
  532. X@LI @RefPrint kingston91begin
  533. X@LI @RefPrint kingston91tab
  534. X@LI @RefPrint brooks91
  535. X@EndList
  536. X@End @Section
  537. END_OF_FILE
  538.   if test 3895 -ne `wc -c <'doc/tr.impl/s7.0'`; then
  539.     echo shar: \"'doc/tr.impl/s7.0'\" unpacked with wrong size!
  540.   fi
  541.   # end of 'doc/tr.impl/s7.0'
  542. fi
  543. if test -f 'doc/tr.lout/ch1.03' -a "${1}" != "-c" ; then 
  544.   echo shar: Will not clobber existing file \"'doc/tr.lout/ch1.03'\"
  545. else
  546.   echo shar: Extracting \"'doc/tr.lout/ch1.03'\" \(3701 characters\)
  547.   sed "s/^X//" >'doc/tr.lout/ch1.03' <<'END_OF_FILE'
  548. X@Section
  549. X   @Tag { cross }
  550. X   @Title { Cross references }
  551. X@Begin
  552. X@PP
  553. XA cross reference
  554. Xcross.ref @Index { Cross reference }
  555. Xin common terminology is something like `see Table 6'
  556. Xor `see page 57' -- a reference within a document to some other part of
  557. Xthe document.  Readers find them very useful, but they are a major
  558. Xbookkeeping problem for authors.  As the document is revised, Table 6
  559. Xbecomes Table 7, the thing on page 57 moves to page 63, and all the
  560. Xcross references must be changed.
  561. X@PP
  562. XThe Scribe
  563. Xscribe @Index { Scribe }
  564. Xdocument formatter, developed by Brian K. Reid [{@Ref reid80}],
  565. Xreid.brian @Index { Reid, Brian K. }
  566. Xintroduced a scheme for keeping track of cross
  567. Xreferences.  It allows you to give names to tables, figures, etc., and to
  568. Xrefer to them by name.  The formatter inserts the appropriate numbers in
  569. Xplace of the names, so that as the document is revised, the
  570. Xcross references are kept up to date automatically.  Lout has adopted
  571. Xand extended this scheme.
  572. X@PP
  573. XIn Lout, automatic cross referencing works in the following way.  First
  574. Xdefine a symbol with a parameter with the special name @Code "@Tag":
  575. X@ID @Code {
  576. X"def @Table"
  577. X"   left @Tag"
  578. X"   right @Value"
  579. X"{"
  580. X"   ||1i  @Value"
  581. X"}"
  582. X}
  583. XWhen this symbol is invoked, the value given to @Code "@Tag" should be a
  584. Xsimple word like {@Code "cities"}, or several simple words juxtaposed
  585. Xlike {@Code "cities.compare"}; it serves to name the invocation:
  586. X@ID @Code {
  587. X"cities @Table"
  588. X"{"
  589. X"    Washington  |0.5i  Canberra"
  590. X"}"
  591. X}
  592. XWe may now refer to this invocation elsewhere in the document, using the
  593. X@I {cross reference} @Code "@Table&&cities".  Here @Code "&&" is the
  594. X{@I {cross reference symbol}}; its left parameter is a symbol and its right
  595. Xparameter is the value of the @Code "@Tag" parameter of some invocation
  596. Xof that symbol.
  597. X@PP
  598. XA cross reference is not an object; the reader should think of it as
  599. Xan arrow in the final printed document, beginning at the cross reference
  600. Xsymbol and ending at the top of the target
  601. Xtarget @Index { Target of cross reference }
  602. Xinvocation, like this:
  603. X@ID 8p @Font {
  604. X  { @LittlePage // @LittlePage }
  605. X  ||0io ||0.7c
  606. X  { //2c 
  607. X    { @Code "@Table&&cities" }
  608. X    //0.1c
  609. X    ||0.5c 90d @Rotate @Arrow 2.5c
  610. X    //0.05c
  611. X    @HContract @VContract
  612. X      @Fig { @Box margin { 0c } paint { grey } { 1.5c @Wide 1c @High } }
  613. X  }
  614. X}
  615. X@PP
  616. XTwo special values may be given to the right parameter of
  617. X{@Code "&&"}:  @Code preceding
  618. Xpreceding. @Index { @Code preceding }
  619. Xfollowing. @Index { @Code following }
  620. Xand
  621. X@Code following.  The cross
  622. Xreference @Code "@Table&&preceding" points to some table
  623. Xappearing earlier in the final printed document than itself; that is, the
  624. Xarrow is guaranteed to point backwards through the document.  Usually it
  625. Xpoints to the nearest preceding invocation.  Similarly, 
  626. X@Code "@Table&&following" points forwards, usually to the
  627. Xnearest following invocation of @Code "@Table".
  628. X@PP
  629. XThis section has been concerned with what a cross reference is -- an
  630. Xarrow from one point in a document to another -- but not with how it is
  631. Xused.  One simple way to use a cross reference is to put it where an
  632. Xobject is expected, like this:
  633. X@ID @Code {
  634. X"a  |  @Table&&cities  |  c"
  635. X}
  636. XIn this case the cross reference will be replaced by a copy of the
  637. Xinvocation it points to:  in the example just given, a table will appear
  638. Xbetween @Code a and @Code c.  Other applications of cross references may be
  639. Xfound in Chapter {@NumberOf examples}, including finding the number of
  640. Xthe page where something appears, producing running page headers and footers,
  641. Xand accessing databases of Roman numerals, references, etc.  Cross
  642. Xreferences are also used by galleys, as will be explained in the next section.
  643. X@End @Section
  644. END_OF_FILE
  645.   if test 3701 -ne `wc -c <'doc/tr.lout/ch1.03'`; then
  646.     echo shar: \"'doc/tr.lout/ch1.03'\" unpacked with wrong size!
  647.   fi
  648.   # end of 'doc/tr.lout/ch1.03'
  649. fi
  650. if test -f 'doc/tr.lout/ch3.04' -a "${1}" != "-c" ; then 
  651.   echo shar: Will not clobber existing file \"'doc/tr.lout/ch3.04'\"
  652. else
  653.   echo shar: Extracting \"'doc/tr.lout/ch3.04'\" \(3886 characters\)
  654.   sed "s/^X//" >'doc/tr.lout/ch3.04' <<'END_OF_FILE'
  655. X@Section
  656. X   @Title { "@Break" }
  657. X   @Tag { break }
  658. X@Begin
  659. X@PP
  660. XThe @@Break symbol influences the appearance of paragraphs (Section
  661. X{@NumberOf concatenation}), offering a fixed set of eight styles:
  662. X@IL
  663. X
  664. X@LI {
  665. X2i @Wide { |1rt @Code adjust @@Break @I object }
  666. Xadjust.break @Index { @Code adjust @@Break }
  667. X|2m Break the paragraphs of {@I object} into lines, and apply @@PAdjust
  668. X(Section {@NumberOf hadjust}) to every line except the last in
  669. Xeach paragraph;
  670. X}
  671. X
  672. X@LI {
  673. X2i @Wide { |1rt @Code outdent @@Break @I object }
  674. Xoutdent.break @Index { @Code outdent @@Break }
  675. X|2m Like {@Code adjust}, except that @Code "2.0f @Wide {} &0i" is
  676. Xinserted at the beginning of every line except the first, creating
  677. Xan outdented paragraph;
  678. X}
  679. X
  680. X@LI {
  681. X2i @Wide { |1rt @Code ragged @@Break @I object }
  682. Xragged.break @Index { @Code ragged @@Break }
  683. X|2m Break the paragraphs of {@I object} into lines, but do not adjust
  684. Xthe lines (`ragged right');
  685. X}
  686. X
  687. X@LI {
  688. X2i @Wide { |1rt @Code cragged @@Break @I object }
  689. Xcragged.break @Index { @Code cragged @@Break }
  690. X|2m Like {@Code ragged}, except that each line will be centred with
  691. Xrespect to the others;
  692. X}
  693. X
  694. X@LI {
  695. X2i @Wide { |1rt @Code rragged @@Break @I object }
  696. Xrragged.break @Index { @Code rragged @@Break }
  697. X|2m Like {@Code ragged}, except that each line will be right-justified with
  698. Xrespect to the others (`ragged left');
  699. X}
  700. X
  701. X@LI {
  702. X2i @Wide { |1rt @Code lines @@Break @I object }
  703. Xlines.break @Index { @Code lines @@Break }
  704. X|2m Break the paragraphs of {@I object} into lines at the same points
  705. Xthat they are broken into lines in the input; do not adjust the lines.  Any
  706. Xspaces at the start of a line other than the first will appear in the output;
  707. X}
  708. X
  709. X@LI {
  710. X2i @Wide { |1rt @Code clines @@Break @I object }
  711. Xclines.break @Index { @Code clines @@Break }
  712. X|2m Break the paragraphs of {@I object} into lines at the same points
  713. Xthat they are broken into lines in the input file, then centre each line with
  714. Xrespect to the others;
  715. X}
  716. X
  717. X@LI {
  718. X2i @Wide { |1rt @Code rlines @@Break @I object }
  719. Xrlines.break @Index { @Code rlines @@Break }
  720. X|2m Break the paragraphs of {@I object} into lines at the same points
  721. Xthat they are broken into lines in the input file, then right-justify
  722. Xeach line with respect to the others.
  723. X}
  724. X
  725. X@EL
  726. XIf the paragraph was an entire component of a galley, so will each of
  727. Xits lines be; otherwise the lines are enclosed in a {@Code "@OneRow"}
  728. Xsymbol after breaking.
  729. X@PP
  730. XThe length of the gap used to separate the lines produced by paragraph
  731. Xbreaking is always {@Code 1v}.  However, the @Code v unit itself and the
  732. Xv.unit.effect @SubIndex { effect on paragraph breaking }
  733. Xgap mode may be changed:
  734. X@IL
  735. X
  736. X@LI {
  737. X2i @Wide { |1rt @I gap @Code "@Break" @I object }
  738. X|2m Within {@I object}, take the value of the @Code "v" unit to be the
  739. Xlength of {@I gap};
  740. X}
  741. X
  742. X@LI {
  743. X2i @Wide { |1rt + & @I gap @Code "@Break" @I object }
  744. X|2m Within {@I object}, take the value of the @Code "v" unit to be
  745. Xlarger by the length of @I gap than it would otherwise have been;
  746. X}
  747. X
  748. X@LI {
  749. X2i @Wide { |1rt -- & @I gap @Code "@Break" @I object }
  750. X|2m Within {@I object}, take the value of the @Code "v" unit to be
  751. Xsmaller by the length of @I gap than it would otherwise have been.
  752. X}
  753. X
  754. X@EL
  755. XIn each case, the mode of @I gap is adopted within {@I object}.
  756. X@PP
  757. XFinally, the @@Break symbol influences hyphenation:
  758. X@IL
  759. X
  760. X@LI {
  761. X2i @Wide { |1rt @Code "hyphen @Break" @I object }
  762. Xhyphen.break @Index { @Code hyphen @@Break }
  763. X|2m Permit hyphenation within the paragraphs of {@I object};
  764. X}
  765. X
  766. X@LI {
  767. X2i @Wide { |1rt @Code "nohyphen @Break" @I object }
  768. Xnohyphen.break @Index { @Code nohyphen @@Break }
  769. X|2m Prohibit hyphenation within the paragraphs of {@I object}; all
  770. Xhyphenation gaps without exception revert to edge-to-edge mode.
  771. X}
  772. X
  773. X@EL
  774. XSeveral options may be given to the @@Break symbol simultaneously, in
  775. Xany order.  For example,
  776. X@ID @Code "{ adjust 1.2fx hyphen }  @Break  ..."
  777. Xis a typical initial value.
  778. X@End @Section
  779. END_OF_FILE
  780.   if test 3886 -ne `wc -c <'doc/tr.lout/ch3.04'`; then
  781.     echo shar: \"'doc/tr.lout/ch3.04'\" unpacked with wrong size!
  782.   fi
  783.   # end of 'doc/tr.lout/ch3.04'
  784. fi
  785. if test -f 'doc/tr.over/s1' -a "${1}" != "-c" ; then 
  786.   echo shar: Will not clobber existing file \"'doc/tr.over/s1'\"
  787. else
  788.   echo shar: Extracting \"'doc/tr.over/s1'\" \(3752 characters\)
  789.   sed "s/^X//" >'doc/tr.over/s1' <<'END_OF_FILE'
  790. X@Section
  791. X   @Title { Introduction }
  792. X@Begin
  793. X@PP
  794. XThe personal computer and the laser printer have sparked a revolution in
  795. Xthe production of documents.  Many authors now routinely take their work
  796. Xfrom conception to camera-ready copy, many publishers are using desktop
  797. Xpublishing systems, and it is probable that manual assembly of documents
  798. Xwill become uncommon in the near future.
  799. X@PP
  800. XAs control moves into the hands of an ever-increasing number of
  801. Xnon-technical people, the stresses on document formatting software
  802. Xincrease.  On the one hand, this software must be so simple that anyone
  803. Xcan use it; on the other, it must supply a bewildering array of
  804. Xfeatures.  A book, for example, demands fonts, paragraph and page
  805. Xbreaking, floating figures and tables, footnotes, chapters and sections,
  806. Xrunning page headers and footers, an automatically generated table of
  807. Xcontents, and a sorted index.  Add to this an open-ended list of
  808. Xspecialized features, beginning with mathematical typesetting, diagrams,
  809. Xand access to bibliographic databases, and the result is a nightmare for
  810. Xthe software developer.
  811. X@PP
  812. XOne solution to this feature explosion problem is to implement as a
  813. Xsystem primitive every feature that will ever be required.  Although all
  814. Xof the successful interactive document editors known to the author take
  815. Xthis approach (admittedly with some attempt to generalize and unify
  816. Xtheir features), it has clearly reached its limit.  Few such systems
  817. Xprovide equation formatting, fewer still will format a Pascal program,
  818. Xand other specialized features will simply never be implemented.
  819. X@PP
  820. XA second solution is to provide a relatively small system equipped with
  821. Xa means of defining new features, as in programming languages.  This
  822. Xapproach has been taken by the batch formatters (those which do not
  823. Xdisplay a continuously updated image of the printed document while
  824. Xediting) found in academia, notably troff [{@Ref ossanna76}], @TeX
  825. X[{@Ref knuth84}], and Scribe [{@Ref reid80}].  Features such as
  826. Xfootnotes and automatic tables of contents have been added to these
  827. Xsystems using macro definitions.  Unfortunately, such extensions are
  828. Xvery difficult and error-prone in practice: @TeX's footnote macro alone
  829. Xcontains half a page of dense, obscure code, while those who have
  830. Xextended troff have abandoned the language itself and taken refuge in
  831. Xpreprocessors.  A more productive basis for developing new features is needed.
  832. X@PP
  833. XThis article presents a high-level language for document formatting,
  834. Xcalled Lout, which is intended to form such a basis.  Lout is quite
  835. Xaccessible to non-expert users, but its unique property is the ease with
  836. Xwhich expert users can add new features.  We begin with a presentation
  837. Xof Lout as it appears to the non-expert user who employs the standard
  838. Xpackages without under&-standing Lout's principles.  Later sections switch
  839. Xto the expert's view, showing by examples the principles of Lout and how
  840. Xadvanced features are defined.
  841. X@PP
  842. XA Unix-compatible
  843. X@FootNote { Unix is a trademark of "AT&T" Bell Laboratories. }
  844. Xbatch formatter for Lout (called Basser Lout) has been written which
  845. Xproduces PostScript
  846. X@FootNote { PostScript is a trademark of Adobe Systems, Incorporated. }
  847. Xoutput suitable for printing on most laser printers and many other
  848. Xdevices.  A library of standard packages written in Lout provides all of
  849. Xthe features listed above and many others.  This system is not an
  850. Xexperimental prototype, it is a fully operational prod&-uct&-ion
  851. Ximplementation.  The software and its supporting documentation
  852. X[{@Ref kingston92}, {@Ref kingston93basser}, {@Ref kingston92begin},
  853. X{@Ref kingston92design}, {@Ref kingston92eq}, {@Ref kingston92fig},
  854. X{@Ref kingston92tab}] are available free of charge from the author.
  855. X@End @Section
  856. END_OF_FILE
  857.   if test 3752 -ne `wc -c <'doc/tr.over/s1'`; then
  858.     echo shar: \"'doc/tr.over/s1'\" unpacked with wrong size!
  859.   fi
  860.   # end of 'doc/tr.over/s1'
  861. fi
  862. if test -f 'doc/tr.over/s3' -a "${1}" != "-c" ; then 
  863.   echo shar: Will not clobber existing file \"'doc/tr.over/s3'\"
  864. else
  865.   echo shar: Extracting \"'doc/tr.over/s3'\" \(4009 characters\)
  866.   sed "s/^X//" >'doc/tr.over/s3' <<'END_OF_FILE'
  867. X@Section
  868. X   @Title { Objects }
  869. X@Begin
  870. X@PP
  871. XTo the expert user, Lout is a high-level functional language with a
  872. Xrelatively small repertoire of primitive features organized around four
  873. Xkey concepts: {@I objects}, {@I definitions}, {@I cross @I references}, 
  874. Xand {@I galleys}.  An object is a rectangle with at least one horizontal
  875. Xand one vertical mark protruding from it.  For example,
  876. X@ID @Code "Australia"
  877. Xis an object which is viewed by Lout like this:
  878. X@ID @ShowMarks Australia
  879. XHorizontal and vertical concatenation operators, denoted by the symbols
  880. X@Code "|" and {@Code "/"}, are used to assemble larger objects:
  881. X@ID @Code { "USA  |0.2i  Australia" }
  882. Xis the object
  883. X@ID { @ShowMarks USA  |0.2i  @ShowMarks Australia }
  884. XThe parameters are separated by the length given after the concatenation
  885. Xsymbol (0.2 inches in this example), and their horizontal marks are
  886. Xaligned.
  887. X@PP
  888. XTables are made by combining the two operators, with @Code "|" having
  889. Xthe higher precedence:
  890. X@ID  @Code {
  891. X             |1m  USA         |1m  "|0.2i" |1m   Australia
  892. X/1vx "/0.1i" |    Washington  |    "|"     |     Canberra
  893. X}
  894. Xis the object
  895. X@ID {
  896. X      @ShowMarks USA &0.4c @Fig { @Line from { 0 0 } to { xsize 0 }
  897. X      linestyle { dashed } linewidth { 0.015 cm } 0.8c @Wide {} }
  898. X      #{ 0 ymark moveto xsize 10 pt add ymark lineto [ 3 pt ] 0 setdash stroke }
  899. X      #@Graphic {1c @Wide }
  900. X      |0.2i @ShowMarks Australia
  901. X/0.1i @ShowMarks Washington  |     @ShowMarks Canberra
  902. X}
  903. XThe second horizontal concatenation symbol needs no length, since the
  904. Xfirst one determines the separation between the two columns created by
  905. Xthe alignment of the vertical marks.  Objects of arbitrary complexity
  906. Xmay be assembled using these and other operators, and braces used for
  907. Xgrouping, in a manner analogous to the assembly of expressions in
  908. Xprogramming languages.
  909. X@PP
  910. XThe lengths attached to concatenation symbols have features which permit
  911. Xobjects to be positioned very precisely.  In addition to the usual units
  912. Xof measurement (inches, centimetres, points, and ems), lengths may be
  913. Xmeasured in units of the current font size, space width, inter-line
  914. Xspace, and available width (for centering and right justification).
  915. X@PP
  916. XThere are also six @I gap {@I modes}, which determine where the lengths
  917. Xare measured from.  Previous examples have used edge-to-edge mode:
  918. X@ID @Fig margin { 0c } headstyle { closed } {
  919. X@ShowMarks { 0.3c @Wide ^| 0.9c @Wide 0.3c @High ^/ 0.2c @High }
  920. X|0.5c
  921. X@ShowMarks { 0.3c @Wide ^| 0.9c @Wide 0.3c @High ^/ 0.2c @High }
  922. X//0.2c
  923. X|1.2c @Arrow arrow { both } { 0.5c @Wide }
  924. X}
  925. XLout also provides a mark-to-mark mode, obtained by appending
  926. X@Code x to the length:
  927. X@ID @Fig margin { 0c } headstyle { closed } {
  928. X@ShowMarks { 0.3c @Wide ^| 0.9c @Wide 0.3c @High ^/ 0.2c @High }
  929. X|0.5c
  930. X@ShowMarks { 0.3c @Wide ^| 0.9c @Wide 0.3c @High ^/ 0.2c @High }
  931. X//0.2c
  932. X|0.3c @Arrow arrow { both } { 1.7c @Wide }
  933. X}
  934. XThe length will be widened if necessary to prevent the parameters from
  935. Xoverlapping, thus implementing the baseline-to-baseline spacing used
  936. Xbetween lines of text.  Other modes provide tabulation from the left
  937. Xmargin, overstriking, and hyphenation.
  938. X@PP
  939. XThe final appearance of an object is affected by a limited amount of
  940. Xinformation inherited from the context, principally the font and the
  941. Xwidth available for the object to occupy.  There are operators for
  942. Xsetting these attributes:
  943. X@ID @Code {
  944. X"Slope  @Font  {"
  945. X"Hello, world"
  946. X"}"
  947. X}
  948. Xproduces
  949. X@ID {
  950. XSlope  @Font  { Hello, world }
  951. X}
  952. Xand in a similar way
  953. X@ID @Code {
  954. X"1.5i @Wide {"
  955. X"(1)  |0.1i  A small"
  956. X"indented paragraph"
  957. X"of text."
  958. X"}"
  959. X}
  960. Xproduces
  961. X@ID {
  962. X1.5i @Wide {
  963. X(1)  |0.1i  A small
  964. Xindented paragraph
  965. Xof text.
  966. X}
  967. X}
  968. Xwith the paragraph inheriting and being broken to an available width of
  969. X1.4 inches minus the width of (1).  This size inheritance remains secure
  970. Xthrough all the complexities of gap modes, mark align&-ment, the @Code
  971. X"@Wide" and other operators, and so on, providing a high-level service
  972. Xcomparable in value with strong typing in programming languages.
  973. X@End @Section
  974. END_OF_FILE
  975.   if test 4009 -ne `wc -c <'doc/tr.over/s3'`; then
  976.     echo shar: \"'doc/tr.over/s3'\" unpacked with wrong size!
  977.   fi
  978.   # end of 'doc/tr.over/s3'
  979. fi
  980. if test -f 'doc/tr.tab/s2' -a "${1}" != "-c" ; then 
  981.   echo shar: Will not clobber existing file \"'doc/tr.tab/s2'\"
  982. else
  983.   echo shar: Extracting \"'doc/tr.tab/s2'\" \(3628 characters\)
  984.   sed "s/^X//" >'doc/tr.tab/s2' <<'END_OF_FILE'
  985. X@Section
  986. X   @Title { Changing the style of entries and columns }
  987. X@Begin
  988. X@PP
  989. XThe style of an entry is mainly determined by four symbols from standard
  990. XLout:  {@Code "@Font"}, {@Code "@Break"}, {@Code "@Wide"}, and
  991. X{@Code "@High"}.  We will review them only briefly here, since they are
  992. Xtreated elsewhere [{@Ref kingston92}, {@Ref kingston92begin}],
  993. Xthen explain how they are used within tables.
  994. X@PP
  995. XThe @Code "@Font" symbol changes the font and font size of an object.  For
  996. Xexample,
  997. X@ID @Code "Slope @Font { hello world }"
  998. Xproduces {Slope @Font { hello world }}, and
  999. X@ID @Code "{ Bold +2p } @Font { hello world }"
  1000. Xproduces
  1001. X@ID {{ Bold +2p } @Font { hello world }}
  1002. Xwhich is two points larger than it otherwise would have been, as well
  1003. Xas set in bold.  The DocumentLayout package provides the abbreviations
  1004. X@Code "@I" and @Code "@B" for @Code "Slope @Font" and {@Code "Bold @Font"}.
  1005. X@PP
  1006. XThe @Code "@Break" symbol affects paragraph breaking.  Most relevant
  1007. Xhere are @Code "clines @Break" and {@Code "rlines @Break"}, which will
  1008. Xcentre or right-justify one or more lines in the given column:
  1009. X@ID @Code {
  1010. X"clines @Break {"
  1011. X"A small centred"
  1012. X"paragraph."
  1013. X"}"
  1014. X}
  1015. Xproduces
  1016. X@ID {
  1017. Xclines @Break {
  1018. XA small centred
  1019. Xparagraph.
  1020. X}
  1021. X}
  1022. Xfor example.  Actually, there is a small problem with these symbols:  they
  1023. Xonly work on paragraphs of at least two words, so they will fail to
  1024. Xcentre or right-justify a solitary word.  Tab provides two symbols,
  1025. X{@Code "@CC"} and {@Code "@RR"}, which do essentially the same thing,
  1026. Xbut which work on single words as well.
  1027. X@PP
  1028. XThe @Code "@Wide" symbol forces an object to have a given width, by
  1029. Xpadding it with white space on the right if it is too small, or breaking
  1030. Xits paragraphs if it is too wide:
  1031. X@ID @Code {
  1032. X"1.5i @Wide {"
  1033. X"This small paragraph will"
  1034. X"be broken to a width of"
  1035. X"one and one half inches."
  1036. X"}"
  1037. X}
  1038. Xproduces
  1039. X@ID {
  1040. X1.5i @Wide {
  1041. XThis small paragraph will
  1042. Xbe broken to a width of
  1043. Xone and one half inches.
  1044. X}
  1045. X}
  1046. XWidths may be specified in centimetres, points or ems using the letters
  1047. X{@Code "c"}, {@Code "p"} and {@Code "e"} instead of {@Code "i"}.  The
  1048. X@Code "@High" symbol is very similar, forcing an object to have a given
  1049. Xheight by adding white space beneath it.
  1050. X@PP
  1051. XAlthough we will use only these four symbols in the following, more
  1052. Xexotic symbols may be used, for example @Code "90d @Rotate" which
  1053. Xrotates any object (the entire table, for example, or one entry) ninety
  1054. Xdegrees, or any other positive or negative angle.  Symbols defined by
  1055. Xthe user or taken from other packages may also be used.
  1056. X@PP
  1057. XTo change the style of an individual entry, enclose it in the symbols
  1058. Xrequired:
  1059. X@ID @Code {
  1060. X"@Rowa"
  1061. X"    A { @CC { one entry of the table } }"
  1062. X}
  1063. XMore commonly, the same style is to be applied to every entry in a
  1064. Xparticular column, and this is done by placing the symbols for the style
  1065. Xinside the format option, between @Code "@Col" and the column letter:
  1066. X@ID @Code {
  1067. X"@Tab"
  1068. X"    @Fmta { @Col 3c @Wide @CC A  !  ... }"
  1069. X}
  1070. XAny @Code "@CC" or @Code "@RR" symbol should appear last, immediately
  1071. Xbefore the column letter.  Now every entry in column @Code A will be
  1072. Xcentred in a three centimetre space, which means that the column as
  1073. Xa whole will be three centimetres wide (excluding margins) and its
  1074. Xentries will be centred.
  1075. X@PP
  1076. XIt is best not to use the @Code "@Wide" symbol at first, since Lout is
  1077. Xquite good at choosing appropriate column widths.  If the result is not
  1078. Xsatisfactory, and the table is wide enough to require paragraph breaking
  1079. Xwithin its entries, @Code "@Wide" should be used only to reduce the width
  1080. Xof the wider columns, not to increase the width of the narrower ones.
  1081. X@End @Section
  1082. END_OF_FILE
  1083.   if test 3628 -ne `wc -c <'doc/tr.tab/s2'`; then
  1084.     echo shar: \"'doc/tr.tab/s2'\" unpacked with wrong size!
  1085.   fi
  1086.   # end of 'doc/tr.tab/s2'
  1087. fi
  1088. if test -f 'doc/tr.tab/s7' -a "${1}" != "-c" ; then 
  1089.   echo shar: Will not clobber existing file \"'doc/tr.tab/s7'\"
  1090. else
  1091.   echo shar: Extracting \"'doc/tr.tab/s7'\" \(3508 characters\)
  1092.   sed "s/^X//" >'doc/tr.tab/s7' <<'END_OF_FILE'
  1093. X@Section
  1094. X   @Title { A final example }
  1095. X@Begin
  1096. X@PP
  1097. XIn conclusion, here is the input for a relatively large table:
  1098. X@ID 10p @Font @Code 1.18fx @Break {
  1099. X"@OneRow 10p @Font 1.15fx @Break @Tab"
  1100. X"    linewidth { 1.0 pt }"
  1101. X"    vmargin { 0.4v }"
  1102. X"    @Fmta { @Col @B A  !  @Col @B B  !  @Col @B C  !  @Col @B D }"
  1103. X"    @Fmtb { @Col outdent @Break A  !  @Col 1.8c @Wide ragged @Break B !"
  1104. X"            @Col C  !  @Col outdent @Break D }"
  1105. X"{"
  1106. X""
  1107. X"@Rowa above { single } below { single }"
  1108. X"    A { Scholarship }"
  1109. X"    B { Value $ }"
  1110. X"    C { Closing date }"
  1111. X"    D { Qualifications }"
  1112. X""
  1113. X"@Rowa"
  1114. X"    A { 1.  Tenable at the University of Sydney }"
  1115. X""
  1116. X"@Rowb"
  1117. X"    A { Commonwealth and University Postgraduate Research Awards }"
  1118. X"    B { 10,415 (12,724 to 16,433 from 1 January 1990) }"
  1119. X"    C { 31 October }"
  1120. X"    D { Graduates with Hons I or Hons II Div. 1.  For research in any field }"
  1121. X""
  1122. X"@Rowb"
  1123. X"    A { Commonwealth Postgraduate Course Awards }"
  1124. X"    B { 10,415 }"
  1125. X"    C { 30 September }"
  1126. X"    D { Graduates with honours degrees or very good pass degrees.  For"
  1127. X"Master's degrees undertaken by coursework }"
  1128. X""
  1129. X"@Rowb"
  1130. X"    A { R. and M. Bentwich Scholarship }"
  1131. X"    D { Graduate who holds a postgraduate research scholarship and who"
  1132. X"requires a supplementary grant }"
  1133. X""
  1134. X"@Rowa"
  1135. X"    A { 2.  Awarded by external bodies }"
  1136. X""
  1137. X"@Rowb"
  1138. X"    A { Caltex }"
  1139. X"    B { 24,000 }"
  1140. X"    C { 30 September }"
  1141. X"    D { Female graduates completing degree or diploma in year of application }"
  1142. X""
  1143. X"@Rowb"
  1144. X"    A { Rhodes Scholarship }"
  1145. X"    B { @Sterling3500 + return air-fare }"
  1146. X"    C { 1 October }"
  1147. X"    D { Age limit 25.  For tenure at the University of Oxford }"
  1148. X"    below { single }"
  1149. X"}"
  1150. X"@DP"
  1151. X"10p @Font { *Additional benefits include cost of travel and payment of fees. }"
  1152. X}
  1153. XThe most interesting things about it are the use of outdented paragraphs,
  1154. Xand the @Code "@Wide" symbol which restricts the width of the second column,
  1155. Xwhich would otherwise be as wide as the first and last.  Here is the result:
  1156. X@DP
  1157. X@OneRow 10p @Font 1.15fx @Break @Tab
  1158. X    linewidth { 1.0 pt }
  1159. X    vmargin { 0.4v }
  1160. X    @Fmta { @Col @B A ! @Col @B B ! @Col @B C ! @Col @B D }
  1161. X    @Fmtb { @Col outdent @Break A ! @Col 1.8c @Wide ragged @Break B !
  1162. X            @Col C ! @Col outdent @Break D }
  1163. X{
  1164. X@Rowa above { single } below { single }
  1165. X    A { Scholarship }
  1166. X    B { Value $ }
  1167. X    C { Closing date }
  1168. X    D { Qualifications }
  1169. X
  1170. X@Rowa
  1171. X    A { 1.  Tenable at the University of Sydney }
  1172. X
  1173. X@Rowb
  1174. X    A { Commonwealth and University Postgraduate Research Awards }
  1175. X    B { 10,415 (12,724 to 16,433 from 1 January 1990) }
  1176. X    C { 31 October }
  1177. X    D { Graduates with Hons I or Hons II Div. 1.  For research in any field }
  1178. X
  1179. X@Rowb
  1180. X    A { Commonwealth Postgraduate Course Awards }
  1181. X    B { 10,415 }
  1182. X    C { 30 September }
  1183. X    D { Graduates with honours degrees or very good pass degrees.  For
  1184. XMaster's degrees undertaken by coursework }
  1185. X
  1186. X@Rowb
  1187. X    A { R. and M. Bentwich Scholarship }
  1188. X    D { Graduate who holds a postgraduate research scholarship and who
  1189. Xrequires a supplementary grant }
  1190. X
  1191. X@Rowa
  1192. X    A { 2.  Awarded by external bodies }
  1193. X
  1194. X@Rowb
  1195. X    A { Caltex }
  1196. X    B { 24,000 }
  1197. X    C { 30 September }
  1198. X    D { Female graduates completing degree or diploma in year of application }
  1199. X
  1200. X@Rowb
  1201. X    A { Rhodes Scholarship }
  1202. X    B { @Sterling3500 + return air-fare }
  1203. X    C { 1 October }
  1204. X    D { Age limit 25.  For tenure at the University of Oxford }
  1205. X    below { single }
  1206. X}
  1207. X@DP
  1208. X10p @Font { *Additional benefits include cost of travel and payment of fees. }
  1209. X@End @Section
  1210. END_OF_FILE
  1211.   if test 3508 -ne `wc -c <'doc/tr.tab/s7'`; then
  1212.     echo shar: \"'doc/tr.tab/s7'\" unpacked with wrong size!
  1213.   fi
  1214.   # end of 'doc/tr.tab/s7'
  1215. fi
  1216. if test -f 'include/doc' -a "${1}" != "-c" ; then 
  1217.   echo shar: Will not clobber existing file \"'include/doc'\"
  1218. else
  1219.   echo shar: Extracting \"'include/doc'\" \(4110 characters\)
  1220.   sed "s/^X//" >'include/doc' <<'END_OF_FILE'
  1221. X
  1222. X###############################################################################
  1223. X#                                                                             #
  1224. X#  Setup file for invoking @DocumentLayout for simple documents               #
  1225. X#                                                                             #
  1226. X#  Jeffrey H. Kingston                                                        #
  1227. X#  22 December 1992                                                           #
  1228. X#                                                                             #
  1229. X###############################################################################
  1230. X
  1231. X@SysInclude { ft  }
  1232. X@SysInclude { dl  }
  1233. X# @SysInclude { eq  }
  1234. X# @SysInclude { tab }
  1235. X# @SysInclude { pas }
  1236. X# @SysInclude { fig }
  1237. X
  1238. X@Use { @DocumentLayout
  1239. X  # @InitialFont       {  Times Base 12p } # initial font
  1240. X  # @InitialBreak      {  adjust 1.20fx  } # initial break
  1241. X  # @Hyphenate         {  Yes            } # Want hyphenation? Yes or No
  1242. X  # @MajorHeadingFont  {  Bold 2.0f      } # font for major headings
  1243. X  # @HeadingFont       {  Bold           } # font for ordinary headings
  1244. X  # @MinorHeadingFont  {  Bold           } # font for minor headings
  1245. X  # @BookCoverFont     {  Helvetica Base } # font for book cover
  1246. X
  1247. X  # @ParaGap           {  1.30vx         } # gap between paragraphs
  1248. X  # @ParaIndent        {  2.00f          } # paragraph first-line indent
  1249. X
  1250. X  # @DispGap           {  1.00v          } # gap above and below displays
  1251. X  # @DispIndent        {  2.00f          } # @IndentedDisplay indent
  1252. X  # @DefaultIndent     {  0.5rt          } # @Display indent
  1253. X  # @WideIndent        {  4.00f          } # @WideTaggedList indent
  1254. X  # @VeryWideIndent    {  8.00f          } # @VeryWideTaggedList indent
  1255. X
  1256. X  # @PageWidth         { 21.00c          } # width of page
  1257. X  # @PageHeight        { 29.70c          } # height of page
  1258. X  # @PageMargin        {  2.50c          } # size of all four margins
  1259. X  # @Columns           {  Single         } # Single, Double, Multi
  1260. X  # @DoubleColWidth    {  7.50c          } # column width used by Double
  1261. X  # @MultiColWidth     {  4.67c          } # column width used by Multi
  1262. X  # @ColGap            {  1.00c          } # gap between columns
  1263. X  # @TopGap            {  0.75c          } # gap between figures
  1264. X  # @MidGap            {  0.75c          } # gap above and below body text
  1265. X
  1266. X  # @FootNoteFont      {  0.80f          } # font for footnotes
  1267. X  # @FootNoteBreak     {  1.20fx         } # break for footnotes
  1268. X  # @FootLen           {  2.00c          } # footnote line and indent size
  1269. X  # @ColFootLen        {  1.20c          } # @FootLen when Double, Multi
  1270. X  # @FootGap           {  0.20c          } # gap between footnotes
  1271. X
  1272. X  # @MakeIndex         {  No             } # Want index? Yes or No
  1273. X  # @IndexColumns      {  Double         } # Single, Double, Multi
  1274. X
  1275. X  # @TableOfContents   {  No             } # Want contents? Yes or No
  1276. X  # @MajorContentsGap  {  1.30v          } # gap above major entry
  1277. X  # @ContentsGap       {  1.00v          } # gap above ordinary entry
  1278. X
  1279. X  # @ChapterNumbers    {  Yes            } # Yes or No            
  1280. X  # @SectionNumbers    {  Yes            } # Yes or No            
  1281. X  # @SubSectionNumbers {  Yes            } # Yes or No            
  1282. X  # @AppendixNumbers   {  Yes            } # Yes or No            
  1283. X  # @SubAppendixNumbers{  Yes            } # Yes or No            
  1284. X  # @ChapterGap        {  1.10b          } # gap before each chapter
  1285. X  # @SectionGap        {  2.00v          } # gap before each section
  1286. X  # @SubSectionGap     {  1.50v          } # gap before each subsection
  1287. X  # @AppendixGap       {  2.00v          } # gap before each appendix
  1288. X  # @SubAppendixGap    {  2.00v          } # gap before each subappendix
  1289. X
  1290. X  # @PageNumbers       {  Yes            } # Want page numbers? Yes or No
  1291. X  # @FirstPageNumber   {  1              } # Number of first page 
  1292. X  # @PageOneTopFormat  { @Null               }
  1293. X  # @PageOneFootFormat { @Null               }
  1294. X  # @PageTopFormat     { |0.5rt - @PageNum - }
  1295. X  # @PageFootFormat    { @Null               }
  1296. X  # @BookTitleFormat   { Bold @Font @Title   } 
  1297. X}
  1298. END_OF_FILE
  1299.   if test 4110 -ne `wc -c <'include/doc'`; then
  1300.     echo shar: \"'include/doc'\" unpacked with wrong size!
  1301.   fi
  1302.   # end of 'include/doc'
  1303. fi
  1304. if test -f 'include/fontdefs0' -a "${1}" != "-c" ; then 
  1305.   echo shar: Will not clobber existing file \"'include/fontdefs0'\"
  1306. else
  1307.   echo shar: Extracting \"'include/fontdefs0'\" \(3856 characters\)
  1308.   sed "s/^X//" >'include/fontdefs0' <<'END_OF_FILE'
  1309. X
  1310. X##################################################################################################################
  1311. X#                                                                                                                #
  1312. X#  Font definitions (English language version).  Use a very wide window to see them clearly.                     #
  1313. X#                                                                                                                #
  1314. X##################################################################################################################
  1315. X
  1316. Xfontdef    AvantGarde Base          { AvantGarde-Book        AvantGarBoo.AFM        Std.CEV        NoRecode }
  1317. Xfontdef    AvantGarde Slope      { AvantGarde-BookOblique    AvantGarBooObl.AFM    Std.CEV        NoRecode }
  1318. Xfontdef    AvantGarde Demi          { AvantGarde-Demi        AvantGarDem.AFM        Std.CEV        NoRecode }
  1319. Xfontdef    AvantGarde DemiSlope      { AvantGarde-DemiOblique    AvantGarDemObl.AFM    Std.CEV        NoRecode }
  1320. X
  1321. Xfontdef    Bookman Base          { Bookman-Demi        BookmDem.AFM        Std.CEV        NoRecode }
  1322. Xfontdef    Bookman Slope          { Bookman-DemiItalic        BookmDemIta.AFM        Std.CEV        NoRecode }
  1323. Xfontdef    Bookman Light          { Bookman-Light        BookmLig.AFM        Std.CEV        NoRecode }
  1324. Xfontdef    Bookman LightSlope      { Bookman-LightItalic        BookmLigIta.AFM        Std.CEV        NoRecode }
  1325. X
  1326. Xfontdef    Courier Base          { Courier            Couri.AFM        Std.CEV        NoRecode }
  1327. Xfontdef    Courier Slope          { Courier-Oblique        CouriObl.AFM        Std.CEV        NoRecode }
  1328. Xfontdef    Courier Bold          { Courier-Bold        CouriBol.AFM        Std.CEV        NoRecode }
  1329. Xfontdef    Courier BoldSlope      { Courier-BoldOblique        CouriBolObl.AFM        Std.CEV        NoRecode }
  1330. X
  1331. Xfontdef    Helvetica Base          { Helvetica            Helve.AFM        Std.CEV        NoRecode }
  1332. Xfontdef    Helvetica Slope          { Helvetica-Oblique        HelveObl.AFM        Std.CEV        NoRecode }
  1333. Xfontdef    Helvetica Bold          { Helvetica-Bold        HelveBol.AFM        Std.CEV        NoRecode }
  1334. Xfontdef    Helvetica BoldSlope      { Helvetica-BoldOblique    HelveBolObl.AFM        Std.CEV        NoRecode }
  1335. Xfontdef    Helvetica Cond          { Helvetica-Condensed        HelveCon.AFM        Std.CEV        NoRecode }
  1336. Xfontdef    Helvetica CondSlope      { Helvetica-Condensed-Bold    HelveConObl.AFM        Std.CEV        NoRecode }
  1337. Xfontdef    Helvetica CondBold      { Helvetica-Condensed-Oblique    HelveConBol.AFM        Std.CEV        NoRecode }
  1338. Xfontdef    Helvetica CondBoldSlope      { Helvetica-Condensed-BoldObl    HelveConBolObl.AFM    Std.CEV        NoRecode }
  1339. Xfontdef    Helvetica Narrow      { Helvetica-Narrow        HelveNar.AFM        Std.CEV        NoRecode }
  1340. Xfontdef    Helvetica NarrowSlope      { Helvetica-Narrow-Oblique    HelveNarObl.AFM        Std.CEV        NoRecode }
  1341. Xfontdef    Helvetica NarrowBold      { Helvetica-Narrow-Bold    HelveNarBol.AFM        Std.CEV        NoRecode }
  1342. Xfontdef    Helvetica NarrowBoldSlope {Helvetica-Narrow-BoldOblique    HelveNarBolObl.AFM    Std.CEV        NoRecode }
  1343. X
  1344. Xfontdef    Schoolbook Base          { NewCenturySchlbk-Roman    NewCenSchRom.AFM    Std.CEV        NoRecode }
  1345. Xfontdef    Schoolbook Slope      { NewCenturySchlbk-Italic    NewCenSchIta.AFM    Std.CEV        NoRecode }
  1346. Xfontdef    Schoolbook Bold          { NewCenturySchlbk-Bold    NewCenSchBol.AFM    Std.CEV        NoRecode }
  1347. Xfontdef    Schoolbook BoldSlope      { NewCenturySchlbk-BoldItalic    NewCenSchBolIta.AFM    Std.CEV        NoRecode }
  1348. X
  1349. Xfontdef    Palatino Base          { Palatino-Roman        PalatRom.AFM        Std.CEV        NoRecode }
  1350. Xfontdef    Palatino Slope          { Palatino-Italic        PalatIta.AFM        Std.CEV        NoRecode }
  1351. Xfontdef    Palatino Bold          { Palatino-Bold        PalatBol.AFM        Std.CEV        NoRecode }
  1352. Xfontdef    Palatino BoldSlope      { Palatino-BoldItalic        PalatBolIta.AFM        Std.CEV        NoRecode }
  1353. X
  1354. Xfontdef    Symbol Base          { Symbol            Symbo.AFM        Symb.CEV    NoRecode }
  1355. X
  1356. Xfontdef    Times Base          { Times-Roman            TimesRom.AFM        Std.CEV        NoRecode }
  1357. Xfontdef    Times Slope          { Times-Italic        TimesIta.AFM        Std.CEV        NoRecode }
  1358. Xfontdef    Times Bold          { Times-Bold            TimesBol.AFM        Std.CEV        NoRecode }
  1359. Xfontdef    Times BoldSlope          { Times-BoldItalic        TimesBolIta.AFM        Std.CEV        NoRecode }
  1360. X
  1361. Xfontdef    Chancery Base          { ZapfChancery-MediumItalic    ZapfChaMedIta.AFM    Std.CEV        NoRecode }
  1362. Xfontdef    Dingbats Base          { ZapfDingbats        ZapfDin.AFM        Ding.CEV    NoRecode }
  1363. END_OF_FILE
  1364.   if test 3856 -ne `wc -c <'include/fontdefs0'`; then
  1365.     echo shar: \"'include/fontdefs0'\" unpacked with wrong size!
  1366.   fi
  1367.   # end of 'include/fontdefs0'
  1368. fi
  1369. if test -f 'include/fontdefs1' -a "${1}" != "-c" ; then 
  1370.   echo shar: Will not clobber existing file \"'include/fontdefs1'\"
  1371. else
  1372.   echo shar: Extracting \"'include/fontdefs1'\" \(4078 characters\)
  1373.   sed "s/^X//" >'include/fontdefs1' <<'END_OF_FILE'
  1374. X
  1375. X##################################################################################################################
  1376. X#                                                                                                                #
  1377. X#  Font definitions (ISO-LATIN-1 version).  Use a very wide window to see them clearly.                          #
  1378. X#                                                                                                                #
  1379. X##################################################################################################################
  1380. X
  1381. Xfontdef    AvantGarde Base          { AvantGarde-Book        AvantGarBoo.AFM        LoutLatin1.CEV    Recode   }
  1382. Xfontdef    AvantGarde Slope      { AvantGarde-BookOblique    AvantGarBooObl.AFM    LoutLatin1.CEV    Recode   }
  1383. Xfontdef    AvantGarde Demi          { AvantGarde-Demi        AvantGarDem.AFM        LoutLatin1.CEV    Recode   }
  1384. Xfontdef    AvantGarde DemiSlope      { AvantGarde-DemiOblique    AvantGarDemObl.AFM    LoutLatin1.CEV    Recode   }
  1385. X
  1386. Xfontdef    Bookman Base          { Bookman-Demi        BookmDem.AFM        LoutLatin1.CEV    Recode   }
  1387. Xfontdef    Bookman Slope          { Bookman-DemiItalic        BookmDemIta.AFM        LoutLatin1.CEV    Recode   }
  1388. Xfontdef    Bookman Light          { Bookman-Light        BookmLig.AFM        LoutLatin1.CEV    Recode   }
  1389. Xfontdef    Bookman LightSlope      { Bookman-LightItalic        BookmLigIta.AFM        LoutLatin1.CEV    Recode   }
  1390. X
  1391. Xfontdef    Courier Base          { Courier            Couri.AFM        LoutLatin1.CEV    Recode   }
  1392. Xfontdef    Courier Slope          { Courier-Oblique        CouriObl.AFM        LoutLatin1.CEV    Recode   }
  1393. Xfontdef    Courier Bold          { Courier-Bold        CouriBol.AFM        LoutLatin1.CEV    Recode   }
  1394. Xfontdef    Courier BoldSlope      { Courier-BoldOblique        CouriBolObl.AFM        LoutLatin1.CEV    Recode   }
  1395. X
  1396. Xfontdef    Helvetica Base          { Helvetica            Helve.AFM        LoutLatin1.CEV    Recode   }
  1397. Xfontdef    Helvetica Slope          { Helvetica-Oblique        HelveObl.AFM        LoutLatin1.CEV    Recode   }
  1398. Xfontdef    Helvetica Bold          { Helvetica-Bold        HelveBol.AFM        LoutLatin1.CEV    Recode   }
  1399. Xfontdef    Helvetica BoldSlope      { Helvetica-BoldOblique    HelveBolObl.AFM        LoutLatin1.CEV    Recode   }
  1400. Xfontdef    Helvetica Cond          { Helvetica-Condensed        HelveCon.AFM        LoutLatin1.CEV    Recode   }
  1401. Xfontdef    Helvetica CondSlope      { Helvetica-Condensed-Bold    HelveConObl.AFM        LoutLatin1.CEV    Recode   }
  1402. Xfontdef    Helvetica CondBold      { Helvetica-Condensed-Oblique    HelveConBol.AFM        LoutLatin1.CEV    Recode   }
  1403. Xfontdef    Helvetica CondBoldSlope      { Helvetica-Condensed-BoldObl    HelveConBolObl.AFM    LoutLatin1.CEV    Recode   }
  1404. Xfontdef    Helvetica Narrow      { Helvetica-Narrow        HelveNar.AFM        LoutLatin1.CEV    Recode   }
  1405. Xfontdef    Helvetica NarrowSlope      { Helvetica-Narrow-Oblique    HelveNarObl.AFM        LoutLatin1.CEV    Recode   }
  1406. Xfontdef    Helvetica NarrowBold      { Helvetica-Narrow-Bold    HelveNarBol.AFM        LoutLatin1.CEV    Recode   }
  1407. Xfontdef    Helvetica NarrowBoldSlope {Helvetica-Narrow-BoldOblique    HelveNarBolObl.AFM    LoutLatin1.CEV    Recode   }
  1408. X
  1409. Xfontdef    Schoolbook Base          { NewCenturySchlbk-Roman    NewCenSchRom.AFM    LoutLatin1.CEV    Recode   }
  1410. Xfontdef    Schoolbook Slope      { NewCenturySchlbk-Italic    NewCenSchIta.AFM    LoutLatin1.CEV    Recode   }
  1411. Xfontdef    Schoolbook Bold          { NewCenturySchlbk-Bold    NewCenSchBol.AFM    LoutLatin1.CEV    Recode   }
  1412. Xfontdef    Schoolbook BoldSlope      { NewCenturySchlbk-BoldItalic    NewCenSchBolIta.AFM    LoutLatin1.CEV    Recode   }
  1413. X
  1414. Xfontdef    Palatino Base          { Palatino-Roman        PalatRom.AFM        LoutLatin1.CEV    Recode   }
  1415. Xfontdef    Palatino Slope          { Palatino-Italic        PalatIta.AFM        LoutLatin1.CEV    Recode   }
  1416. Xfontdef    Palatino Bold          { Palatino-Bold        PalatBol.AFM        LoutLatin1.CEV    Recode   }
  1417. Xfontdef    Palatino BoldSlope      { Palatino-BoldItalic        PalatBolIta.AFM        LoutLatin1.CEV    Recode   }
  1418. X
  1419. Xfontdef    Symbol Base          { Symbol            Symbo.AFM        Symb.CEV    NoRecode }
  1420. X
  1421. Xfontdef    Times Base          { Times-Roman            TimesRom.AFM        LoutLatin1.CEV    Recode   }
  1422. Xfontdef    Times Slope          { Times-Italic        TimesIta.AFM        LoutLatin1.CEV    Recode   }
  1423. Xfontdef    Times Bold          { Times-Bold            TimesBol.AFM        LoutLatin1.CEV    Recode   }
  1424. Xfontdef    Times BoldSlope          { Times-BoldItalic        TimesBolIta.AFM        LoutLatin1.CEV    Recode   }
  1425. X
  1426. Xfontdef    Chancery Base          { ZapfChancery-MediumItalic    ZapfChaMedIta.AFM    LoutLatin1.CEV    Recode   }
  1427. Xfontdef    Dingbats Base          { ZapfDingbats        ZapfDin.AFM        Ding.CEV    NoRecode }
  1428. END_OF_FILE
  1429.   if test 4078 -ne `wc -c <'include/fontdefs1'`; then
  1430.     echo shar: \"'include/fontdefs1'\" unpacked with wrong size!
  1431.   fi
  1432.   # end of 'include/fontdefs1'
  1433. fi
  1434. if test -f 'include/pas' -a "${1}" != "-c" ; then 
  1435.   echo shar: Will not clobber existing file \"'include/pas'\"
  1436. else
  1437.   echo shar: Extracting \"'include/pas'\" \(3765 characters\)
  1438.   sed "s/^X//" >'include/pas' <<'END_OF_FILE'
  1439. X
  1440. X###############################################################################
  1441. X#                                                                             #
  1442. X#  Lout @Pas package for formatting Pascal programs (Version 2.0)             #
  1443. X#                                                                             #
  1444. X#  Version 1.0 by Jeffrey H. Kingston, June 1991.                             #
  1445. X#  Version 2.0 by Jeffrey H. Kingston, 22 December 1992.                      #
  1446. X#                                                                             #
  1447. X#  See "Eq - a Lout package for typesetting mathematics" for user             #
  1448. X#  information.                                                               #
  1449. X#                                                                             #
  1450. X#  Reference:   Jensen, K. and Wirth, N.  Pascal User Manual and Report.      #
  1451. X#               Second Edition, Springer-Verlag, 1975.                        #
  1452. X#                                                                             #
  1453. X###############################################################################
  1454. X
  1455. Xexport    "0" "1" "2" "3" "4" "5" "6" "7" "8" "9"
  1456. X    "." "," ":" ";" "'" "`" "+" "-" "*" "/" "(" ")"
  1457. X    "[" "]" "^" ".." "=" "<" ">" "<>" "<=" ">=" ":="
  1458. X
  1459. X    and array begin case const div do downto else end
  1460. X    file for forward function goto if in label mod nil not
  1461. X    of or otherwise packed procedure program record repeat
  1462. X    set then to type until var while with @Com
  1463. X
  1464. Xdef @Pas
  1465. X   body @Body
  1466. X@Begin
  1467. X
  1468. X    def @R right x { Base @Font x }
  1469. X    def @B right x { Bold @Font x }
  1470. X    def @S right x { { Symbol Base } @Font x }
  1471. X
  1472. X    def "0"    { @R "0"            }
  1473. X    def "1"    { @R "1"            }
  1474. X    def "2"    { @R "2"            }
  1475. X    def "3"    { @R "3"            }
  1476. X    def "4"    { @R "4"            }
  1477. X    def "5"    { @R "5"            }
  1478. X    def "6"    { @R "6"            }
  1479. X    def "7"    { @R "7"            }
  1480. X    def "8"    { @R "8"            }
  1481. X    def "9"    { @R "9"            }
  1482. X    def "."    { @R "."            }
  1483. X    def ","    { @R ","            }
  1484. X    def ":"    { @R ":"            }
  1485. X    def ";"    { @R ";"            }
  1486. X    def "'"    { @R "'"            }
  1487. X    def "`"    { @R "`"            }
  1488. X    def "+"    { @S "+"            }
  1489. X    def "-"    { @S "-"            }
  1490. X    def "*"    { @S @Char "asteriskmath"    }
  1491. X    def "/"    { @R @Char "fraction"        }
  1492. X    def "("    { @R "("            }
  1493. X    def ")"    { @R ")"            }
  1494. X    def "["    { @R "["            }
  1495. X    def "]"    { @R "]"            }
  1496. X    def "^"    { @S 0.8f @Font @Char "arrowup"    }
  1497. X    def ".."    { @R ".."            }
  1498. X    def "="    { @S @Char "equal"        }
  1499. X    def "<"    { @S @Char "less"        }
  1500. X    def ">"    { @S @Char "greater"        }
  1501. X    def "<>"    { @S @Char "notequal"        }
  1502. X    def "<="    { @S @Char "lessequal"        }
  1503. X    def ">="    { @S @Char "greaterequal"    }
  1504. X    def ":="    { :{//0.03fo =}            }
  1505. X
  1506. X    def and        { @B "and"        }
  1507. X    def array        { @B "array"        }
  1508. X    def begin        { @B "begin"        }
  1509. X    def case        { @B "case"        }
  1510. X    def const        { @B "const"        }
  1511. X    def div        { @B "div"        }
  1512. X    def do        { @B "do"        }
  1513. X    def downto        { @B "downto"        }
  1514. X    def else        { @B "else"        }
  1515. X    def end        { @B "end"        }
  1516. X    def file        { @B "file"        }
  1517. X    def for        { @B "for"        }
  1518. X    def forward        { @B "forward"        }
  1519. X    def function    { @B "function"        }
  1520. X    def goto        { @B "goto"        }
  1521. X    def if        { @B "if"        }
  1522. X    def in        { @B "in"        }
  1523. X    def label        { @B "label"        }
  1524. X    def mod        { @B "mod"        }
  1525. X    def nil        { @B "nil"        }
  1526. X    def not        { @B "not"        }
  1527. X    def of        { @B "of"        }
  1528. X    def or        { @B "or"        }
  1529. X    def otherwise    { @B "otherwise"    }
  1530. X    def packed        { @B "packed"        }
  1531. X    def procedure    { @B "procedure"    }
  1532. X    def program        { @B "program"        }
  1533. X    def record        { @B "record"        }
  1534. X    def repeat        { @B "repeat"        }
  1535. X    def set        { @B "set"        }
  1536. X    def then        { @B "then"        }
  1537. X    def to        { @B "to"        }
  1538. X    def type        { @B "type"        }
  1539. X    def until        { @B "until"        }
  1540. X    def var        { @B "var"        }
  1541. X    def while        { @B "while"        }
  1542. X    def with        { @B "with"        }
  1543. X
  1544. X    def @Com right x    { @R "{" x @R "}"    }
  1545. X
  1546. X   Slope @Font lines @Break @Body
  1547. X
  1548. X@End @Pas
  1549. END_OF_FILE
  1550.   if test 3765 -ne `wc -c <'include/pas'`; then
  1551.     echo shar: \"'include/pas'\" unpacked with wrong size!
  1552.   fi
  1553.   # end of 'include/pas'
  1554. fi
  1555. if test -f 'include/report' -a "${1}" != "-c" ; then 
  1556.   echo shar: Will not clobber existing file \"'include/report'\"
  1557. else
  1558.   echo shar: Extracting \"'include/report'\" \(4110 characters\)
  1559.   sed "s/^X//" >'include/report' <<'END_OF_FILE'
  1560. X
  1561. X###############################################################################
  1562. X#                                                                             #
  1563. X#  Setup file for invoking @DocumentLayout for technical reports              #
  1564. X#                                                                             #
  1565. X#  Jeffrey H. Kingston                                                        #
  1566. X#  22 December 1992                                                           #
  1567. X#                                                                             #
  1568. X###############################################################################
  1569. X
  1570. X@SysInclude { ft  }
  1571. X@SysInclude { dl  }
  1572. X# @SysInclude { eq  }
  1573. X# @SysInclude { tab }
  1574. X# @SysInclude { pas }
  1575. X# @SysInclude { fig }
  1576. X
  1577. X@Use { @DocumentLayout
  1578. X  # @InitialFont       {  Times Base 12p } # initial font
  1579. X  # @InitialBreak      {  adjust 1.20fx  } # initial break
  1580. X  # @Hyphenate         {  Yes            } # Want hyphenation? Yes or No
  1581. X  # @MajorHeadingFont  {  Bold 2.0f      } # font for major headings
  1582. X  # @HeadingFont       {  Bold           } # font for ordinary headings
  1583. X  # @MinorHeadingFont  {  Bold           } # font for minor headings
  1584. X  # @BookCoverFont     {  Helvetica Base } # font for book cover
  1585. X
  1586. X  # @ParaGap           {  1.30vx         } # gap between paragraphs
  1587. X  # @ParaIndent        {  2.00f          } # paragraph first-line indent
  1588. X
  1589. X  # @DispGap           {  1.00v          } # gap above and below displays
  1590. X  # @DispIndent        {  2.00f          } # @IndentedDisplay indent
  1591. X  # @DefaultIndent     {  0.5rt          } # @Display indent
  1592. X  # @WideIndent        {  4.00f          } # @WideTaggedList indent
  1593. X  # @VeryWideIndent    {  8.00f          } # @VeryWideTaggedList indent
  1594. X
  1595. X  # @PageWidth         { 21.00c          } # width of page
  1596. X  # @PageHeight        { 29.70c          } # height of page
  1597. X  # @PageMargin        {  2.50c          } # size of all four margins
  1598. X  # @Columns           {  Single         } # Single, Double, Multi
  1599. X  # @DoubleColWidth    {  7.50c          } # column width used by Double
  1600. X  # @MultiColWidth     {  4.67c          } # column width used by Multi
  1601. X  # @ColGap            {  1.00c          } # gap between columns
  1602. X  # @TopGap            {  0.75c          } # gap between figures
  1603. X  # @MidGap            {  0.75c          } # gap above and below body text
  1604. X
  1605. X  # @FootNoteFont      {  0.80f          } # font for footnotes
  1606. X  # @FootNoteBreak     {  1.20fx         } # break for footnotes
  1607. X  # @FootLen           {  2.00c          } # footnote line and indent size
  1608. X  # @ColFootLen        {  1.20c          } # @FootLen when Double, Multi
  1609. X  # @FootGap           {  0.20c          } # gap between footnotes
  1610. X
  1611. X  # @MakeIndex         {  No             } # Want index? Yes or No
  1612. X  # @IndexColumns      {  Double         } # Single, Double, Multi
  1613. X
  1614. X  # @TableOfContents   {  No             } # Want contents? Yes or No
  1615. X  # @MajorContentsGap  {  1.30v          } # gap above major entry
  1616. X  # @ContentsGap       {  1.00v          } # gap above ordinary entry
  1617. X
  1618. X  # @ChapterNumbers    {  Yes            } # Yes or No            
  1619. X  # @SectionNumbers    {  Yes            } # Yes or No            
  1620. X  # @SubSectionNumbers {  Yes            } # Yes or No            
  1621. X  # @AppendixNumbers   {  Yes            } # Yes or No            
  1622. X  # @SubAppendixNumbers{  Yes            } # Yes or No            
  1623. X  # @ChapterGap        {  1.10b          } # gap before each chapter
  1624. X  # @SectionGap        {  2.00v          } # gap before each section
  1625. X  # @SubSectionGap     {  1.50v          } # gap before each subsection
  1626. X  # @AppendixGap       {  2.00v          } # gap before each appendix
  1627. X  # @SubAppendixGap    {  2.00v          } # gap before each subappendix
  1628. X
  1629. X  # @PageNumbers       {  Yes            } # Want page numbers? Yes or No
  1630. X  # @FirstPageNumber   {  1              } # Number of first page 
  1631. X  # @PageOneTopFormat  { @Null               }
  1632. X  # @PageOneFootFormat { @Null               }
  1633. X  # @PageTopFormat     { |0.5rt - @PageNum - }
  1634. X  # @PageFootFormat    { @Null               }
  1635. X  # @BookTitleFormat   { Bold @Font @Title   } 
  1636. X}
  1637. END_OF_FILE
  1638.   if test 4110 -ne `wc -c <'include/report'`; then
  1639.     echo shar: \"'include/report'\" unpacked with wrong size!
  1640.   fi
  1641.   # end of 'include/report'
  1642. fi
  1643. if test -f 'man/lout.1' -a "${1}" != "-c" ; then 
  1644.   echo shar: Will not clobber existing file \"'man/lout.1'\"
  1645. else
  1646.   echo shar: Extracting \"'man/lout.1'\" \(3576 characters\)
  1647.   sed "s/^X//" >'man/lout.1' <<'END_OF_FILE'
  1648. X.TH LOUT 1
  1649. X.SH NAME
  1650. Xlout - prepare Lout document for printing
  1651. X.SH SYNOPSIS
  1652. Xlout [ -i<filename> ] files
  1653. X.SH DESCRIPTION
  1654. XInvoke the Basser Lout interpreter on the concatenation of the named
  1655. Xfiles, producing a PostScript file on standard output suitable for
  1656. Xprinting on PostScript printers using lpr(1).  If no files are named,
  1657. Xstdin is used instead.  The special file name - may be used to denote
  1658. Xstandard input.  There may be white space between flags like -i and
  1659. Xtheir associated <filename> or <dirname> values.
  1660. X.P
  1661. XAn optional .lout suffix may be used for Lout source and include
  1662. Xfiles.  When invoking files ending in this suffix the suffix may be
  1663. Xomitted.
  1664. X.SH OPTIONS
  1665. X.TP 16
  1666. X-i<filename>  
  1667. XSearch the directories of the include file path (see below) for
  1668. X<filename> or <filename>.lout and include it.  There may be
  1669. Xmultiple -i options.
  1670. X.TP
  1671. X-s
  1672. XSuppress all reading and writing of the cross reference database;
  1673. Xother databases are not affected.  Useful when many simple documents that
  1674. Xdon't do any cross referencing are stored in one directory.
  1675. X.TP
  1676. X-e<filename>
  1677. XDirect error messages to <filename> instead of to stderr.
  1678. X.TP
  1679. X-o<filename>
  1680. XDirect PostScript output to <filename> instead of to stdout.
  1681. X.TP
  1682. X-I<dirname>
  1683. XAdd <dirname> to the list of directories searched for @Include files
  1684. Xand -i option files.  There may be multiple -I options.  @Include first
  1685. Xsearches the current directory, then searches the -I directories in the
  1686. Xorder given, and finally searches the default include file directory
  1687. X(see below).  @SysInclude and the -i option omit the search of the
  1688. Xcurrent directory.
  1689. X.TP
  1690. X-C<dirname>
  1691. XAdd <dirname> to the list of directories searched for character
  1692. Xencoding (.CEV) files.  There may be multiple -C options; the directories
  1693. Xare searched in the order given, and finally the default encoding
  1694. Xvectors directory is searched (see below).
  1695. X.TP
  1696. X-F<dirname>
  1697. XAdd <dirname> to the list of directories searched for font metrics
  1698. X(.AFM) files.  There may be multiple -F options; the directories are
  1699. Xsearched in the order given, and finally the default font metrics
  1700. Xdirectory is searched (see below).
  1701. X.TP
  1702. X-D<dirname>
  1703. XAdd <dirname> to the list of directories searched for Lout database
  1704. Xfiles.  There may be multiple -D options.  @Database searches the
  1705. Xcurrent directory, then the -D directories in the order given, and
  1706. Xfinally searches the default databases directory (see below).
  1707. X@SysDatabase omits the search of the current directory.
  1708. X.TP
  1709. X-u
  1710. XPrint usage information on stderr.
  1711. X.TP
  1712. X-V
  1713. XPrint version information on stderr.
  1714. X.TP
  1715. X-EPS
  1716. XProduce output in the form of an EPS (Encapsulated PostScript) file,
  1717. Xsuitable for inclusion in another document.
  1718. X.SH LIMITS
  1719. X.nf
  1720. XAt most 255 input files (no limit on @IncludeGraphic files)
  1721. XAt most 255 characters per input line
  1722. XAt most 100 fonts (each different size counts as one font)
  1723. XAt most 5 deep nesting of @Include files
  1724. X.SH FILES
  1725. X.nf
  1726. XBinary file:                    <BINDIR>/lout
  1727. XDefault include file directory: <LIBDIR>/include
  1728. XDefault databases directory:    <LIBDIR>/data
  1729. XDefault font metrics directory: <LIBDIR>/font
  1730. XDefault encoding vectors dir.:  <LIBDIR>/evec
  1731. XLout documentation directory:   <DOCDIR>
  1732. X.fi
  1733. X.SH SEE ALSO
  1734. X.P
  1735. Xlpr(1), ghostview(1)
  1736. X.SH REFERENCES
  1737. X.P
  1738. XFor a description of the Lout document formatting system,
  1739. Xsee Jeffrey H. Kingston, "Document Formatting with Lout",
  1740. XTech. Rep. 449, Basser Dept. of Computer Science, The
  1741. XUniversity of Sydney 2006, Australia (December 1992).
  1742. XSee Adobe Systems Inc., "PostScript Language Reference Manual
  1743. X(Second Edition)", Addison-Wesley, 1990, for PostScript.
  1744. X.SH AUTHOR
  1745. X.P
  1746. XJeffrey H. Kingston
  1747. END_OF_FILE
  1748.   if test 3576 -ne `wc -c <'man/lout.1'`; then
  1749.     echo shar: \"'man/lout.1'\" unpacked with wrong size!
  1750.   fi
  1751.   # end of 'man/lout.1'
  1752. fi
  1753. echo shar: End of archive 32 \(of 35\).
  1754. cp /dev/null ark32isdone
  1755. MISSING=""
  1756. 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 31 32 33 34 35 ; do
  1757.     if test ! -f ark${I}isdone ; then
  1758.     MISSING="${MISSING} ${I}"
  1759.     fi
  1760. done
  1761. if test "${MISSING}" = "" ; then
  1762.     echo You have unpacked all 35 archives.
  1763.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1764. else
  1765.     echo You still must unpack the following archives:
  1766.     echo "        " ${MISSING}
  1767. fi
  1768. exit 0
  1769. exit 0 # Just in case...
  1770.