home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-06-19 | 82.8 KB | 2,227 lines |
- Newsgroups: comp.sources.misc
- From: jeff@joyce.cs.su.oz.au (Jeff Kingston)
- Subject: v37i126: lout - Lout document formatting system, v2, Part28/30
- Message-ID: <1993Jun2.030626.29172@sparky.imd.sterling.com>
- X-Md4-Signature: 953ff4cdf7f443cf67c1571d2ea7e31b
- Sender: kent@sparky.imd.sterling.com (Kent Landfield)
- Organization: Sterling Software
- Date: Wed, 2 Jun 1993 03:06:26 GMT
- Approved: kent@sparky.imd.sterling.com
-
- Submitted-by: jeff@joyce.cs.su.oz.au (Jeff Kingston)
- Posting-number: Volume 37, Issue 126
- Archive-name: lout/part28
- Environment: UNIX
-
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then feed it
- # into a shell via "sh file" or similar. To overwrite existing files,
- # type "sh file -c".
- # Contents: lout/doc/tr.begin/s04 lout/doc/tr.begin/s13
- # lout/doc/tr.begin/s15 lout/doc/tr.impl/s2.1 lout/doc/tr.impl/s2.2
- # lout/doc/tr.impl/s6.1 lout/doc/tr.impl/s7.0
- # lout/doc/tr.lout/ch1.03 lout/doc/tr.lout/ch2.04
- # lout/doc/tr.lout/ch3.03 lout/doc/tr.lout/ch3.04
- # lout/doc/tr.over/s1 lout/doc/tr.over/s3 lout/doc/tr.over/setup
- # lout/doc/tr.tab/s2 lout/doc/tr.tab/s4 lout/doc/tr.tab/s7
- # lout/include/doc lout/include/pas lout/include/tab_prepend
- # lout/man/lout.1
- # Wrapped by kent@sparky on Sun May 30 19:44:02 1993
- PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin ; export PATH
- echo If this archive is complete, you will see the following message:
- echo ' "shar: End of archive 28 (of 30)."'
- if test -f 'lout/doc/tr.begin/s04' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'lout/doc/tr.begin/s04'\"
- else
- echo shar: Extracting \"'lout/doc/tr.begin/s04'\" \(2847 characters\)
- sed "s/^X//" >'lout/doc/tr.begin/s04' <<'END_OF_FILE'
- X@Section
- X @Tag { fonts }
- X @Title { Fonts and unusual characters }
- X@Begin
- X@PP
- XThis section explains how to gain access to the many different fonts and
- Xunusual characters available with Lout.
- X@PP
- XWe are already familiar with the @Code "@I" symbol, which changes the font
- Xof the following thing to {@I Italic}. Similarly, there is @Code "@B" for
- X{@B Bold}, @Code "@S" for @S SMALL {@S CAPITALS},
- X@FootNote {
- XOwing to problems behind the scenes, if several words are grouped within one
- X@Code "@S" symbol they will be kept together on one line, so to get small
- Xcapitals over several lines it is necessary to apply @Code "@S" to each
- Xword individually. This does not happen with other font symbols.
- X}
- Xand @Code "@R" for Roman.
- X@PP
- XThe @Code "@Font" symbol can be used to get many other fonts (a local
- Xexpert should be able to supply the full list):
- X@ID @Code {
- X"{ Helvetica Slope } @Font Hello"
- X"{ Courier Base } @Font { Hello there }"
- X}
- Xhas result
- X@ID {
- X{ Helvetica Slope } @Font Hello
- X{ Courier Base } @Font { Hello there }
- X}
- XEach font has a family name, such as Times, Helvetica, or Courier, and a
- Xface name, generally Base, Slope, or Bold. The fonts that were
- Xcalled Roman, Italic, and Bold above are Times Base, Times Slope, and
- XTimes Bold. When changing families the new family and a face must be
- Xspecified, but when changing face within a family just the face name is
- Xenough.
- X@PP
- XThe @Code "@Font" symbol also changes sizes:
- X@ID @Code {
- X"+5p @Font Hello"
- X"-3p @Font Hello"
- X"12p @Font Hello"
- X}
- Xhas result
- X@ID {
- X+5p @Font Hello -3p @Font Hello 12p @Font Hello
- X}
- Xwith the first Hello 5 points larger than it would have been otherwise,
- Xthe second 3 points smaller, and the third in a 12 point font. There are
- X72 points to one inch, and most documents are set in 10 or 12 point.
- X@PP
- XThere are symbols for some unusual characters that do not appear
- Xon keyboards:
- X@ID {
- X @Code "--" |0.35i --
- X/1vx @Code "---" | ---
- X/1vx @Code "@Bullet" | @Bullet
- X/1vx @Code "@Star" | @Star
- X/1vx @Code "@ParSym" | @ParSym
- X/1vx @Code "@SectSym" | @SectSym
- X/1vx @Code "@Dagger" | @Dagger
- X/1vx @Code "@DaggerDbl" | @DaggerDbl
- X/1vx @Code "@CDot" | @CDot
- X/1vx @Code "@Sterling" | @Sterling
- X/1vx @Code "@Yen" | @Yen
- X/1vx @Code "@Florin" | @Florin
- X/1vx @Code "@Degree" | @Degree
- X/1vx @Code "@Minute" | @Minute
- X/1vx @Code "@Second" | @Second
- X/1vx @Code "@Lozenge" | @Lozenge
- X/1vx @Code "@Multiply" | @Multiply
- X/1vx @Code "@Divide" | @Divide
- X/1vx @Code "@CopyRight" | @CopyRight
- X/1vx @Code "@Register" | @Register
- X/1vx @Code "@TradeMark" | @TradeMark
- X/1vx @Code "@Date" | @Date
- X}
- XThese may be used anywhere. The Adobe Systems Symbol font has many more such
- Xcharacters; the Eq equation formatting package [{@Ref kingston92eq}] has
- Xthe complete list. For example, @Code "@Eq { heart }" will give @Eq { heart }.
- X@End @Section
- END_OF_FILE
- if test 2847 -ne `wc -c <'lout/doc/tr.begin/s04'`; then
- echo shar: \"'lout/doc/tr.begin/s04'\" unpacked with wrong size!
- fi
- # end of 'lout/doc/tr.begin/s04'
- fi
- if test -f 'lout/doc/tr.begin/s13' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'lout/doc/tr.begin/s13'\"
- else
- echo shar: Extracting \"'lout/doc/tr.begin/s13'\" \(2988 characters\)
- sed "s/^X//" >'lout/doc/tr.begin/s13' <<'END_OF_FILE'
- X@Section
- X @Tag { reportlayout }
- X @Title { Technical reports }
- X@Begin
- X@PP
- XThis section describes how to use the DocumentLayout package to produce
- Xtechnical reports like the present document. Type @Code "-ireport" in
- Xthe Unix command instead of @Code "-idoc" to use the package in this
- Xway. We present only the differences here; everything else works as
- Xbefore.
- X@PP
- XA technical report begins with a @Code "@Report" symbol analogous to the
- X@Code "@Document" symbol described in the previous section. Here it is,
- Xwith its nine options and their default values:
- X@ID @Code {
- X"@Report"
- X" @Title {}"
- X" @Author {}"
- X" @Institution {}"
- X" @DateLine { @Date }"
- X" @InitialFont { Times Base 12p }"
- X" @InitialBreak { adjust 1.2fx }"
- X" @Hyphenate { Yes }"
- X" @PageNumbers { Yes }"
- X" @Columns { Single }"
- X"//"
- X}
- XThe {@Code "@Title"}, {@Code "@Author"}, and {@Code "@Institution"} options
- Xwill be printed on the cover sheet and on the first page; they are formatted
- Xusing {@Code "clines @Break"} (see page {@PageOf clines}). Multiple authors
- Xshould be given on separate lines within the @Code "@Author"
- Xoption. {@Code "@DateLine"} appears below the abstract on the cover sheet,
- Xand its default value is the current date as shown. {@Code "@InitialFont"},
- X{@Code "@InitialBreak"}, {@Code "@Hyphenate"}, {@Code "@PageNumbers"} and
- X{@Code "@Columns"} are as described in the last section, except that there
- Xis nothing analogous to @Code "@Text" and {@Code "@ColText"}: if
- X@Code "@Columns" is set to {@Code Double}, the entire document after the
- Xtitle will be set in two columns. There is no @Code "@FirstPageNumber"
- Xoption. As for {@Code "@Document"}, the symbol @Code "//" must follow
- Xafter, and disaster will ensue if it is omitted.
- X@PP
- XIf the technical report has an abstract, it comes next:
- X@ID @Code {
- X"@Abstract @Begin"
- X"..."
- X"..."
- X"@End @Abstract"
- X}
- XThe cover sheet of the present report shows how this will
- Xappear. @Code "@Abstract" has a @Code "@Title" option like the ones
- Xbelow; its default value is {@I ABSTRACT}.
- X@PP
- XNext come the sections of the report, each enclosed in a @Code
- X"@Section" symbol:
- X@ID @Code {
- X"@Section"
- X" @Title { Introduction }"
- X"@Begin"
- X"@PP"
- X"..."
- X"..."
- X"@End @Section"
- X}
- XNo @Code "@BeginSections" or @Code "@EndSections" symbols are needed.
- X The sections may contain subsections, preceded as usual by
- X@Code "@BeginSubSections" and followed by {@Code "@EndSubSections"}.
- X After the sections there is opportunity for a sequence of appendices,
- Xeach of the form
- X@ID @Code {
- X"@Appendix"
- X" @Title { ... }"
- X"@Begin"
- X"@PP"
- X"..."
- X"..."
- X"@End @Appendix"
- X}
- Xbut these are quite optional. No @Code "@BeginAppendices" and
- X@Code "@EndAppendices" symbols are needed. An appendix may contain
- Xsub-appendices via the usual symbols {@Code "@BeginSubAppendices"},
- X{@Code "@SubAppendix"}, and {@Code "@BeginSubAppendices"}. This ends
- Xthe input; there is no {@Code "@End @Text"}, and any reference section
- Xwill be added automatically.
- X@End @Section
- END_OF_FILE
- if test 2988 -ne `wc -c <'lout/doc/tr.begin/s13'`; then
- echo shar: \"'lout/doc/tr.begin/s13'\" unpacked with wrong size!
- fi
- # end of 'lout/doc/tr.begin/s13'
- fi
- if test -f 'lout/doc/tr.begin/s15' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'lout/doc/tr.begin/s15'\"
- else
- echo shar: Extracting \"'lout/doc/tr.begin/s15'\" \(3682 characters\)
- sed "s/^X//" >'lout/doc/tr.begin/s15' <<'END_OF_FILE'
- X@Section
- X @Tag { big.changes }
- X @Title { Making more radical changes }
- X@Begin
- X@PP
- XThe DocumentLayout package makes a large number
- Xof decisions, about how large the pages will be, which fonts will
- Xordinarily be used, and so on. The more complex decisions, such as the
- Xappearance of tables of contents in books, can only be changed by
- Xmodifying the packages, but many of the simpler decisions can be changed
- Xquite easily by setting options in the setup file.
- X@PP
- XThe first step is to obtain a private copy of the setup file. A local
- Xexpert will know where these files are kept; for example, in directory
- X{ @Code "/usr/lout/include"}. Suppose the @Code report setup file is
- Xcopied into a file called { @Code myrep }; then typing
- X@ID @Code "lout myrep myfile"
- Xinstead of
- X@ID @Code "lout -ireport myfile"
- Xruns Lout with the private copy of the setup file, {@Code "myrep"}.
- X@PP
- XExactly what the setup file contains will depend upon the local
- Xsituation, but it will be something like this:
- X@ID @Code {
- X"# Setup file for reports."
- X"# J. H. Kingston, July 1991"
- X""
- X"@SysInclude { ft }"
- X"@SysInclude { dl }"
- X"# @SysInclude { eq }"
- X"# @SysInclude { pas }"
- X"# @SysInclude { fig }"
- X"# @SysInclude { tab }"
- X""
- X"@Use { @DocumentLayout"
- X" # @InitialFont { Times Base 12p }"
- X" # @InitialBreak { adjust 1.2fx }"
- X" # @Hyphenate { Yes }"
- X" # @PageNumbers { Yes }"
- X" # @Columns { Single }"
- X" # @HeadingFont { Bold }"
- X" # @ParaIndent { 2.0f }"
- X" # @PageTop { |0.5rt - @PageNum - }"
- X" # @PageFoot { @Null }"
- X"}"
- X}
- XWhenever Lout encounters a @Code "#" character not enclosed in quotes,
- Xit ignores it and everything following it up to the end of the line. The
- Xfirst two lines of the setup file, then, are comments for the human
- Xreader. After them come lines which cause Lout to read the file
- X@Code "ft" of font definitions and the file @Code "dl" which contains
- Xthe definition of the DocumentLayout package.
- X@PP
- XThe next four lines are comments and will be ignored, but if the initial
- X@Code "#" is deleted they cause Lout to read the definitions of the Eq
- Xequation formatting package and the Pas Pascal program formatting package
- X[{@Ref kingston92eq}], the Fig diagram drawing package [{@Ref kingston92fig}],
- Xand the Tab table formatting package [{@Ref kingston92tab}].
- X@PP
- XNext comes a @Code "@DocumentLayout" symbol within a @Code "@Use"
- Xclause. It is this symbol whose options may
- Xbe changed so as to affect the overall layout. These options are listed
- Xas comments on the following lines, together with the default value
- Xof each. To change an option, delete the @Code "#" and change the
- Xvalue. For example, the normal paragraph indent produced by @Code "@PP" is
- X@Code "2.0f" (twice the current font size). To change it, say to
- X{@Code "3.0f"}, change the line to
- X@ID @Code "@ParaIndent { 3.0f }"
- XThe display indent option (not shown here) should probably be changed as well.
- X@PP
- XThe first five options have the same name as five of the @Code "@Document"
- Xsymbol's options, and they determine the default value of those
- Xoptions. The @Code "@PageTop" and @Code "@PageFoot" options determine
- Xthe appearance of the page header and footer lines (where the page
- Xnumbers appear), and are best left to experts; but, for example,
- X@ID @Code "@PageTop { |1rt @PageNum }"
- Xwill make the page number appear at the top right of each page, without
- Xthe @Code "-" characters.
- X@PP
- XThose who wish to make more radical changes will have to copy the @Code dl
- Xfile and change the definition of the DocumentLayout package. This requires
- Xknowledge of the principles of Lout, and the primitive features from which
- Xothers are built, as described in the Lout user manual [{@Ref kingston92}].
- X@End @Section
- END_OF_FILE
- if test 3682 -ne `wc -c <'lout/doc/tr.begin/s15'`; then
- echo shar: \"'lout/doc/tr.begin/s15'\" unpacked with wrong size!
- fi
- # end of 'lout/doc/tr.begin/s15'
- fi
- if test -f 'lout/doc/tr.impl/s2.1' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'lout/doc/tr.impl/s2.1'\"
- else
- echo shar: Extracting \"'lout/doc/tr.impl/s2.1'\" \(4030 characters\)
- sed "s/^X//" >'lout/doc/tr.impl/s2.1' <<'END_OF_FILE'
- X@SubSection
- X @Tag { genesis }
- X @Title { The genesis of the object abstraction }
- X@Begin
- X@PP
- XWhen one examines previous document formatting systems [4]
- Xlooking for ideas for abstractions, as the author did in 1984, the Eqn
- Xformatting language [5] stands out like a beacon. In
- XEqn, a mathematical formula such as
- X@ID @Eq { { x sup 2 + 1 } over 4 }
- Xis produced by typing
- X@ID @Code "{ x sup 2 + 1 } over 4"
- Xin the input file; @Code sup and @Code over are binary operators, and
- Xbraces are used for grouping. This is document formatting at a very
- Xhigh level, close to the language of mathematics itself, with all
- Xreference to font changes and spacing suppressed.
- X@PP
- XEqn provides a single data type (let us call it the {@I expression}),
- Xbuilt up recursively in context-free style: where one expression may appear,
- Xany expression may appear. This approach is common in algebra and
- Xprogramming languages, where its simplicity and expressiveness have long
- Xbeen appreciated; but Eqn was the first language to demonstrate its
- Xutility in document formatting.
- X@PP
- XEach expression is treated by Eqn as a rectangle with a
- X{@I {horizontal axis}}, used for alignment with adjacent expressions:
- X@ID @ShowMarks marks { horizontal } @Eq { { x sup 2 + 1 } over 4 }
- XThe size and rendering of the expression on the printed page are
- Xknown only to the implementation, never explicitly calculated or
- Xaccessed by the user. This prohibition is
- Xcrucial to the maintenance of the context-free property in practice. In
- XLout, for example, equations, figures, tables, and arbitrary objects may
- Xbe mixed together freely. This would be impossible if size information
- Xwas hidden from the implementation in user calculations.
- X@PP
- XThe object abstraction of Lout is a direct descendant of the Eqn
- Xexpression. It employs the same context-free recursive style of construction,
- Xand each object is treated by Lout as a rectangle:
- X@ID @Fig {
- X@ShowMarks { 1c @Wide ^| 2c @Wide 0.45c @High ^/ 0.35c @High }
- X}
- XThe horizontal axis, called a @I { row mark } in Lout, has a
- Xvertical analogue called a {@I {column mark}}, creating a valuable
- Xsymmetry between horizontal and vertical. Multiple column and row marks
- Xare permitted:
- X@ID @Fig {
- XA:: @Box margin { 0c } paint { grey } { 1.2c @Wide 0.8c @High }
- X|1c
- XB:: @Box margin { 0c } paint { grey } { 1c @Wide 0.8c @High }
- X/0.5c
- XC:: @Box margin { 0c } paint { grey } { 0.7c @Wide 0.8c @High }
- X|1c
- XD:: @Box margin { 0c } paint { grey } { 1.3c @Wide 0.8c @High }
- X// @Line linestyle { dashed }
- X from { A@W -- { 0.3 cm 0 } }
- X to { B@W ++ { 1.6 cm 0 } }
- X// @Line linestyle { dashed }
- X from { C@W -- { 0.3 cm 0 } }
- X to { D@W ++ { 1.6 cm 0 } }
- X// @Line linestyle { dashed }
- X from { A@NW ++ { 0 0.3 cm } }
- X to { C@SW -- { 0 0.3 cm } }
- X// @Line linestyle { dashed }
- X from { B@NW ++ { 0.3 cm 0.3 cm } }
- X to { D@SW ++ { 0.3 cm -0.3 cm } }
- X}
- Xso that objects are able to represent tables.
- X@PP
- XThis abstraction has some limitations, the most obvious being the restriction
- Xof size calculations to rectangular bounding boxes. Non-rectangular and
- Xdisconnected shapes arise naturally in figures and in the characters of
- Xfonts; the extension to them is conceptually straightforward and might
- Xhelp to explain some fine points of layout such as kerning. However,
- Xthere are implementation and language design problems, particularly
- Xwhen filling non-rectangular shapes with text, and so the author chose
- Xto keep to Eqn's rectangles.
- X@PP
- XA more fundamental limitation of the object abstraction arises from the
- Xinability of recursive data types to describe cross-linked structures,
- Xwhich seem to require some means of naming the multiply referenced
- Xparts. Lout is obliged to introduce additional abstractions to cope
- Xwith cross linking: galleys for inserting text into pages
- X(Section {@NumberOf galleys}), cross references (Section {@NumberOf cross}),
- Xand labelled points in figure drawing [6]. An
- Xabstraction closer to hypertext might form a more unified basis for
- Xthese features.
- X@End @SubSection
- END_OF_FILE
- if test 4030 -ne `wc -c <'lout/doc/tr.impl/s2.1'`; then
- echo shar: \"'lout/doc/tr.impl/s2.1'\" unpacked with wrong size!
- fi
- # end of 'lout/doc/tr.impl/s2.1'
- fi
- if test -f 'lout/doc/tr.impl/s2.2' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'lout/doc/tr.impl/s2.2'\"
- else
- echo shar: Extracting \"'lout/doc/tr.impl/s2.2'\" \(3349 characters\)
- sed "s/^X//" >'lout/doc/tr.impl/s2.2' <<'END_OF_FILE'
- X@SubSection
- X @Tag { lexical }
- X @Title { Grammatical and lexical structure }
- X@Begin
- X@PP
- XIf objects are to be constructed like mathematical expressions, the
- Xnatural notation is a functional language based on operators, as in
- XEqn. The grammar of Lout objects is accordingly
- X@ID @Eq {
- Xmatrix {
- Xobject
- Xnextcol
- X--> above --> above --> above --> above --> above --> above --> above -->
- Xnextcol
- X{ object ``` infixop ``` object }
- Xlabove gap { "1fx" }
- X{ prefixop ``` object }
- Xlabove gap { "1fx" }
- X{ object ``` postfixop }
- Xlabove gap { "1fx" }
- X{ noparsop }
- Xlabove gap { "1fx" }
- X{ literalword }
- Xlabove gap { "1fx" }
- X{ @Code "{" ``` object ``` @Code "}" }
- Xlabove gap { "1fx" }
- X{ object ``` object }
- Xlabove gap { "1fx" }
- X}
- X}
- Xwhere {@Eq {infixop}}, {@Eq {prefixop}}, {@Eq {postfixop}}, and
- X{@Eq {noparsop}} are identifiers naming operators which take 0, 1
- Xor 2 parameters, as shown, and @Eq {literalword} is a sequence of
- Xnon-space characters, or an arbitrary sequence of characters
- Xenclosed in double quotes. Ambiguities are resolved by precedence
- Xand associativity.
- X@PP
- XThe last production allows a meaning for expressions such as
- X{@Code "{}"}, in which an object is missing. The value of this
- X@I {empty object} is a rectangle of size 0 by 0, with one column
- Xmark and one row mark, that prints as nothing.
- X@PP
- XThe second-last production generates sequences of arbitrary objects
- Xseparated by white space, called {@I paragraphs}. Ignoring
- Xparagraph breaking for now, the natural meaning is that the two
- Xobjects should appear side by side, and Lout's parser accordingly
- Xinterpolates an infix horizontal concatenation operator (see below)
- Xbetween them. This operator is associative, so the grammatical
- Xambiguity does no harm. However, the Algol-60 rule that white space
- Xshould be significant only as a separator is necessarily broken by
- XLout in just this one place.
- X@PP
- XAlgol-like languages distinguish literal strings from identifiers by
- Xenclosing them in quotes, but literals are far too frequent in document
- Xformatting for this to be viable. The conventional solution is to
- Xbegin identifiers with a special character, and Lout follows Scribe
- X[7] in using "`@'" rather than the "`\\'" of troff
- X[8] and @TeX [9].
- X@PP
- XHowever, Lout takes the unusual step of making an initial "`@'"
- Xoptional. The designers of Eqn apparently considered such
- Xcharacters disfiguring in fine-grained input like equations, and
- Xthis author agrees. The implementation is straightforward: "`@'" is
- Xclassed as just another letter, and every word is searched for in
- Xthe symbol table. If it is found, it is an identifier, otherwise it
- Xis a literal. A warning message is printed when a literal beginning
- Xwith "`@'" is found, since it is probably a mis-spelt identifier. No
- Xsuch safety net is possible for identifiers without "`@'".
- X@PP
- XEquation formatting also demands symbols made from punctuation
- Xcharacters, such as @Code "+" and {@Code "<="}. It is traditional to
- Xallow such symbols to be juxtaposed, which means that the input
- X@ID @Code "<=++"
- Xfor example must be interpreted within the lexical analyser by searching
- Xthe symbol table for its prefixes in the order {@Code "<=++"},
- X{@Code "<=+"}, {@Code "<="}. Although this takes quadratic time, in
- Xpractice such sequences are too short to make a more sophisticated
- Xlinear method like tries worthwhile.
- X@End @SubSection
- END_OF_FILE
- if test 3349 -ne `wc -c <'lout/doc/tr.impl/s2.2'`; then
- echo shar: \"'lout/doc/tr.impl/s2.2'\" unpacked with wrong size!
- fi
- # end of 'lout/doc/tr.impl/s2.2'
- fi
- if test -f 'lout/doc/tr.impl/s6.1' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'lout/doc/tr.impl/s6.1'\"
- else
- echo shar: Extracting \"'lout/doc/tr.impl/s6.1'\" \(3774 characters\)
- sed "s/^X//" >'lout/doc/tr.impl/s6.1' <<'END_OF_FILE'
- X@SubSection
- X @Tag { cross }
- X @Title { The cross reference abstraction }
- X@Begin
- X@PP
- XIn developing the cross reference abstraction, it seemed best to begin
- Xwith the database application, since it is the simplest. Database
- Xrelations are naturally mapped into Lout definitions:
- X@ID @Code {
- X"def @Reference"
- X" named @Tag {}"
- X" named @Author {}"
- X" named @Title {}"
- X" named @Journal {}"
- X"{}"
- X}
- XThe set of all invocations of @Code "@Reference" is a relation whose
- Xattributes are the parameters, and whose tuples are the invocations. To
- Xcomplete the correspondence, we need only declare that the @Code "@Tag"
- Xparameter is special, serving as the key attribute.
- X@PP
- XFollowing the database model, we next need a notation for retrieving the
- Xinvocation with a given tag:
- X@ID @Code "@Reference&&kingston91"
- XThis @I {cross reference} is like an arrow pointing to the invocation. To
- Xaccess its attributes, we write
- X@ID @Code "@Reference&&kingston91 @Open { @Author, @Title }"
- XThe @Code "@Open" operator evaluates its right parameter in an
- Xenvironment which includes the exported parameters of its left.
- X@PP
- XAn invocation is chosen to be a running header because of its proximity
- Xto the place where it is used, rather than by its tag. Such proximity
- Xis naturally expressed by two special tags, {@Code preceding} and
- X{@Code following}; for example, @Code "@Sym&&following" will point to
- Xthe closest following invocation of @Code "@Sym" in the final printed
- Xdocument. This is much simpler conceptually than reference to the
- Xinternal state of the document formatter at a critical moment, the usual
- Xapproach to running headers.
- X@PP
- XIt turns out that the above design solves all the cross referencing
- Xproblems encountered in practice except one, which may be typified by
- Xthe problem of finding the number of the page on which the chapter whose
- Xtag is @Code "intro" begins. Two cross referencing steps are needed,
- Xfirst to {@Code "@Chapter&&intro"}, then from there to
- X{@Code "@Page&&preceding"}, where the page number is known.
- X@PP
- XGiven the success of the design so far, this last problem proves to be
- Xsurprisingly difficult. We first try
- X@ID @Code {
- X"@Chapter&&intro @Open {"
- X" @Page&&preceding @Open { @PageNum }"
- X"}"
- X}
- Xbut this fails because @Code "@Page&&preceding" is evaluated in the
- Xpresent context, not in the context of @Code "@Chapter&&intro" as
- Xrequired. So our next attempt is
- X@ID @Code {
- X"def @Chapter"
- X" named @PageNum { @Page&&preceding @Open { @PageNum } }"
- X" ..."
- X}
- Xwith the @Code "@Page&&preceding" cross reference attached to the
- Xchapter; we write
- X@ID @Code "@Chapter&&intro @Open { @PageNum }"
- XThis also fails, because parameters are evaluated after substitution, so
- Xonce again @Code "@Page&&preceding" is evaluated in the wrong context. We
- Xcould of course define a new operator specifically for this case:
- X@ID @Code "@Page&&{ @Preceding @Chapter&&intro }"
- Xor some such. This is free of the annoying context-sensitivity, but it
- Xseems quite complex, and the expected cross reference @Code "@Page&&preceding"
- Xdoes not appear.
- X@PP
- XThe author was lost in these obscurities for some time, and ultimately
- Xrescued himself by looking ahead to the implementation of the
- X@Code preceding and @Code following tags, to see if a simple extension
- Xof it would solve the problem. This led to the @Code "@Tagged" operator:
- X@ID @Code "@Page&&preceding @Tagged intro"
- Xplaced at the beginning of the body of the chapter will attach @Code intro
- Xas an extra tag to the closest preceding invocation of {@Code "@Page"},
- Xso that
- X@ID @Code "@Page&&intro @Open { @PageNum }"
- Xyields the desired page number. There is something low-level and ad hoc
- Xabout the @Code "@Tagged" operator, but the two cross references do
- Xappear naturally, and it works.
- X@End @SubSection
- END_OF_FILE
- if test 3774 -ne `wc -c <'lout/doc/tr.impl/s6.1'`; then
- echo shar: \"'lout/doc/tr.impl/s6.1'\" unpacked with wrong size!
- fi
- # end of 'lout/doc/tr.impl/s6.1'
- fi
- if test -f 'lout/doc/tr.impl/s7.0' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'lout/doc/tr.impl/s7.0'\"
- else
- echo shar: Extracting \"'lout/doc/tr.impl/s7.0'\" \(3895 characters\)
- sed "s/^X//" >'lout/doc/tr.impl/s7.0' <<'END_OF_FILE'
- X@Section
- X @Title { Conclusion }
- X@Begin
- X@PP
- XSince its public release in October 1991, the Basser Lout interpreter
- Xhas been ported without incident to a wide variety of Unix systems and
- Xhardware. It was tested extensively before release on its own
- Xdocumentation, and the few minor bugs which have emerged since then have
- Xall been fixed in the second release, scheduled to appear in mid-1992.
- X@PP
- XSeven substantial packages of definitions are distributed with Basser
- XLout. The DocumentLayout package, and its variants ReportLayout and
- XBookLayout, provide the standard features that all documents
- Xrequire: pages, columns, paragraphs, headings, footnotes, floating
- Xfigures and tables, chapters and sections, displays and lists, access
- Xto bibliographic databases, cross references, and so on
- X[11]. The BookLayout package has extra features
- Xneeded by books, including an automatically generated table of contents,
- XRoman page numbers for the prefatory material, running page headers,
- Xodd and even page layouts, and a sorted index. The Eq package formats
- Xequations, and Pas formats Pascal programs [10]; Tab
- Xformats tables [12]; and Fig draws figures
- X[6].
- X@PP
- XThe non-expert user who uses these packages perceives a system of a
- Xstandard quite similar to other fully developed batch formatters,
- Xalthough the interface is considerably more coherent than, say, the troff
- Xfamily's [8]. The expert user perceives a system which
- Xis radically different from previous ones, in which a great deal can be
- Xachieved very quickly. To take an extreme example, Pas was designed,
- Ximplemented, tested, and documented in one afternoon. Eq took about
- Xa week, but most of that time was spent in marshalling the vast
- Xrepertoire of mathematical symbols, and fine-tuning the spacing. Most
- Xof the effort seems to go into designing a good interface; most symbols
- Xare implemented in just one or a few lines of Lout.
- X@PP
- XA group of about 20 satisfied non-expert users has grown up within
- Xthe author's department, mainly Honours students with no investment
- Xin older systems to hold them back. Basser Lout has been advertised
- Xon the Internet news as available via anonymous {@I ftp}, so the
- Xextent of its outside user community is hard to gauge. About 50
- Xpeople have mailed comments or questions to the author; many
- Xof these people have ported the program, written small definitions,
- Xand modified the standard packages.
- X@PP
- XFuture work could usefully begin with the improvements suggested in this
- Xpaper: overlapping spanning columns, better semantics for available
- Xspace, and especially horizontal galleys. Support for non-European
- Xlanguages is also needed. However, the main task is the development of
- Xan interactive document editor based on Lout. A structure editor similar
- Xto Lilac [13], which already has objects and user-defined
- Xsymbols, is envisaged; since cross references are easy when the whole
- Xdocument is available, the only major new problem is the treatment of
- Xgalleys, including the expansion and retraction of receptive symbols.
- X@LP
- X@LP
- X@B { Note. } Since the above was written the author has completed a
- Xrevised version of Basser Lout, in which the problem concerning
- Xavailable space mentioned in Section {@NumberOf style} has been resolved.
- X@LP
- X@LP
- X@B { Acknowledgment. } The author gratefully acknowledges many
- Xvaluable discussions with Douglas W. Jones, especially during the
- Xdevelopment of the galley abstraction; and also many helpful comments on
- Xpresentation by the anonymous referee.
- X@DP
- X@DP
- X@Heading { References }
- X@NumberedList
- X@LI @RefPrint kingston91
- X@LI @RefPrint kingston91over
- X@LI @RefPrint kingston91basser
- X@LI @RefPrint furuta82
- X@LI @RefPrint kernighan75
- X@LI @RefPrint kingston91fig
- X@LI @RefPrint reid80
- X@LI @RefPrint ossanna76
- X@LI @RefPrint knuth84
- X@LI @RefPrint kingston91eq
- X@LI @RefPrint kingston91begin
- X@LI @RefPrint kingston91tab
- X@LI @RefPrint brooks91
- X@EndList
- X@End @Section
- END_OF_FILE
- if test 3895 -ne `wc -c <'lout/doc/tr.impl/s7.0'`; then
- echo shar: \"'lout/doc/tr.impl/s7.0'\" unpacked with wrong size!
- fi
- # end of 'lout/doc/tr.impl/s7.0'
- fi
- if test -f 'lout/doc/tr.lout/ch1.03' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'lout/doc/tr.lout/ch1.03'\"
- else
- echo shar: Extracting \"'lout/doc/tr.lout/ch1.03'\" \(3701 characters\)
- sed "s/^X//" >'lout/doc/tr.lout/ch1.03' <<'END_OF_FILE'
- X@Section
- X @Tag { cross }
- X @Title { Cross references }
- X@Begin
- X@PP
- XA cross reference
- Xcross.ref @Index { Cross reference }
- Xin common terminology is something like `see Table 6'
- Xor `see page 57' -- a reference within a document to some other part of
- Xthe document. Readers find them very useful, but they are a major
- Xbookkeeping problem for authors. As the document is revised, Table 6
- Xbecomes Table 7, the thing on page 57 moves to page 63, and all the
- Xcross references must be changed.
- X@PP
- XThe Scribe
- Xscribe @Index { Scribe }
- Xdocument formatter, developed by Brian K. Reid [{@Ref reid80}],
- Xreid.brian @Index { Reid, Brian K. }
- Xintroduced a scheme for keeping track of cross
- Xreferences. It allows you to give names to tables, figures, etc., and to
- Xrefer to them by name. The formatter inserts the appropriate numbers in
- Xplace of the names, so that as the document is revised, the
- Xcross references are kept up to date automatically. Lout has adopted
- Xand extended this scheme.
- X@PP
- XIn Lout, automatic cross referencing works in the following way. First
- Xdefine a symbol with a parameter with the special name @Code "@Tag":
- X@ID @Code {
- X"def @Table"
- X" left @Tag"
- X" right @Value"
- X"{"
- X" ||1i @Value"
- X"}"
- X}
- XWhen this symbol is invoked, the value given to @Code "@Tag" should be a
- Xsimple word like {@Code "cities"}, or several simple words juxtaposed
- Xlike {@Code "cities.compare"}; it serves to name the invocation:
- X@ID @Code {
- X"cities @Table"
- X"{"
- X" Washington |0.5i Canberra"
- X"}"
- X}
- XWe may now refer to this invocation elsewhere in the document, using the
- X@I {cross reference} @Code "@Table&&cities". Here @Code "&&" is the
- X{@I {cross reference symbol}}; its left parameter is a symbol and its right
- Xparameter is the value of the @Code "@Tag" parameter of some invocation
- Xof that symbol.
- X@PP
- XA cross reference is not an object; the reader should think of it as
- Xan arrow in the final printed document, beginning at the cross reference
- Xsymbol and ending at the top of the target
- Xtarget @Index { Target of cross reference }
- Xinvocation, like this:
- X@ID 8p @Font {
- X { @LittlePage // @LittlePage }
- X ||0io ||0.7c
- X { //2c
- X { @Code "@Table&&cities" }
- X //0.1c
- X ||0.5c 90d @Rotate @Arrow 2.5c
- X //0.05c
- X @HContract @VContract
- X @Fig { @Box margin { 0c } paint { grey } { 1.5c @Wide 1c @High } }
- X }
- X}
- X@PP
- XTwo special values may be given to the right parameter of
- X{@Code "&&"}: @Code preceding
- Xpreceding. @Index { @Code preceding }
- Xfollowing. @Index { @Code following }
- Xand
- X@Code following. The cross
- Xreference @Code "@Table&&preceding" points to some table
- Xappearing earlier in the final printed document than itself; that is, the
- Xarrow is guaranteed to point backwards through the document. Usually it
- Xpoints to the nearest preceding invocation. Similarly,
- X@Code "@Table&&following" points forwards, usually to the
- Xnearest following invocation of @Code "@Table".
- X@PP
- XThis section has been concerned with what a cross reference is -- an
- Xarrow from one point in a document to another -- but not with how it is
- Xused. One simple way to use a cross reference is to put it where an
- Xobject is expected, like this:
- X@ID @Code {
- X"a | @Table&&cities | c"
- X}
- XIn this case the cross reference will be replaced by a copy of the
- Xinvocation it points to: in the example just given, a table will appear
- Xbetween @Code a and @Code c. Other applications of cross references may be
- Xfound in Chapter {@NumberOf examples}, including finding the number of
- Xthe page where something appears, producing running page headers and footers,
- Xand accessing databases of Roman numerals, references, etc. Cross
- Xreferences are also used by galleys, as will be explained in the next section.
- X@End @Section
- END_OF_FILE
- if test 3701 -ne `wc -c <'lout/doc/tr.lout/ch1.03'`; then
- echo shar: \"'lout/doc/tr.lout/ch1.03'\" unpacked with wrong size!
- fi
- # end of 'lout/doc/tr.lout/ch1.03'
- fi
- if test -f 'lout/doc/tr.lout/ch2.04' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'lout/doc/tr.lout/ch2.04'\"
- else
- echo shar: Extracting \"'lout/doc/tr.lout/ch2.04'\" \(2850 characters\)
- sed "s/^X//" >'lout/doc/tr.lout/ch2.04' <<'END_OF_FILE'
- X@Section
- X @Title { Precedence and associativity of symbols }
- X @Tag { precedence }
- X@Begin
- X@PP
- XEvery symbol in Lout has a {@I precedence},
- Xpreceden @Index { Precedence }
- Xwhich is a positive whole number. When two symbols compete for an object,
- Xthe one with the higher precedence wins it. For example,
- X@ID @Code {
- X"a | b / c"
- X}
- Xis equivalent to @OneCol @Code { "{" a "|" b "}" "/" c } rather than
- X{@OneCol @Code { a "|" "{" b "/" c "}"} }, because @Code "|" has higher
- Xprecedence than @Code "/" and thus wins the {@Code b}.
- X@PP
- XWhen the two competing symbols have equal precedence, Lout applies a
- Xsecond rule. Each symbol is either @I left-associative or
- Xassociativity @Index { Associativity }
- X{@I right-associative}. The value of @OneCol @Code { a op1 b op2 c} is taken
- Xto be @OneCol @Code { "{" a op1 b "}" op2 c } if the symbols are both
- Xleft-associative, and @OneCol @Code "a op1 { b op2 c }" if they are
- Xright-associative. In cases not covered by these two rules, use braces.
- X@PP
- XIt sometimes happens that the result is the same regardless of how the
- Xexpression is grouped. For example, @OneCol @Code { "{" a "|" b "}" "|" c }
- Xand @OneCol @Code { a "|" "{" b "|" c "}" } are always the same, for any
- Xcombination of objects, gaps, and variants of {@Code "|"}. In such cases
- Xthe symbols are said to be {@I associative}, and we can confidently omit
- Xthe braces.
- X@PP
- XUser-defined symbols may be given a precedence and associativity:
- X@ID @Code {
- X"def @Super"
- X" precedence 50"
- X" associativity right"
- X" left x"
- X" right y"
- X"{"
- X" @OneRow { | -2p @Font y ^/0.5fk x }"
- X"}"
- X}
- XThey come just after any @Code into clause and before any parameter
- Xdefinitions. The precedence may be
- Xany whole number between 10 and 100, and if omitted is assigned the
- Xvalue 100. The higher the number, the higher the precedence. The
- Xassociativity may be @Code left or {@Code right}, and if omitted
- Xdefaults to {@Code right}. Lout's symbols have the following
- Xprecedences and associativities:
- X@ID @Tab
- X vmargin { 0.5vx }
- X @Fmta { @Col @CC A ! @Col @CC B ! @Col C }
- X{
- X@Rowa
- X A { Precedence }
- X B { Associativity }
- X C { Symbols }
- X@Rowa
- X@Rowa
- X A { 5 }
- X B { associative }
- X C { @Code "/ ^/ // ^//" }
- X@Rowa
- X A { 6 }
- X B { associative }
- X C { @Code "| ^| || ^||" }
- X@Rowa
- X A { 7 }
- X B { associative }
- X C { @Code "& ^&" }
- X@Rowa
- X A { 7 }
- X B { associative }
- X C { @Code "&" in the form of one or more white space characters }
- X@Rowa
- X A { 10-100 }
- X B { @Code left or @Code right }
- X C { user-defined symbols }
- X@Rowa
- X A { 100 }
- X B { @Code right }
- X C { @@Wide, @@High, @@Graphic, etc. }
- X@Rowa
- X A { 101 }
- X B { - }
- X C { @Code "&&" }
- X@Rowa
- X A { 102 }
- X B { associative }
- X C { @Code "&" in the form of 0 spaces }
- X@Rowa
- X A { 103 }
- X B { - }
- X C { Body parameters and right parameters of @@Open }
- X}
- X@End @Section
- END_OF_FILE
- if test 2850 -ne `wc -c <'lout/doc/tr.lout/ch2.04'`; then
- echo shar: \"'lout/doc/tr.lout/ch2.04'\" unpacked with wrong size!
- fi
- # end of 'lout/doc/tr.lout/ch2.04'
- fi
- if test -f 'lout/doc/tr.lout/ch3.03' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'lout/doc/tr.lout/ch3.03'\"
- else
- echo shar: Extracting \"'lout/doc/tr.lout/ch3.03'\" \(3574 characters\)
- sed "s/^X//" >'lout/doc/tr.lout/ch3.03' <<'END_OF_FILE'
- X@Section
- X @Title { "@Font" }
- X @Tag { font }
- X@Begin
- X@PP
- XA @I font
- Xfont. @Index { Fonts }
- Xis a collection of characters which may be
- Xprinted. Many fonts come in {@I families},
- Xfamily @Index { Family of a font }
- Xface @Index { Face of a font }
- Xwhich are groups of fonts that
- Xhave been designed to go together. For example, the Times family
- Xincludes the following fonts:
- X@ID { Times Base } @Font {
- X Base @Font { Times Base }
- X//1vx Slope @Font { Times Slope }
- X//1vx Bold @Font { Times Bold }
- X//1vx BoldSlope @Font { Times BoldSlope }
- X}
- XThus, each font has two names: its @I { family name } (Times,
- XHelvetica, etc.) and its @I { face name } (Base, Slope, etc.). Times
- XBase is more commonly called Times Roman, and Times Slope is more
- Xcommonly called Times Italic. Lout avoids these names in favour of
- Xgeneric names which can be applied to many font families.
- X@PP
- XWhen Lout runs, the first thing it reads is a list of font definitions,
- Xfont.def @Index { @Code fontdef }
- Xlike these:
- X@ID {
- X @Code "fontdef Times Base {" @I implementation-dependent @Code "}"
- X//1vx @Code "fontdef Times Slope {" @I implementation-dependent @Code "}"
- X}
- XEach line tells Lout of the existence of a font, and assigns it a family
- Xname and a face name. There are a few fonts which are the only members
- Xof their families; even though these fonts do not need a face name, they
- Xmust be given one by their {@Code fontdef}. The part between braces may
- Xvary with different implementations of Lout, but it will usually be the
- Xname of a file containing the information Lout needs to work with the
- Xfont; for example, Basser Lout uses
- Xadobe @Index { Adobe Systems, Inc. }
- XAdobe Font Metrics files.
- X@PP
- XLigatures,
- Xligatures @Index Ligatures
- Xsuch as fl for {@OneCol f}l and fi for {@OneCol f}i, are considered by
- XBasser Lout to be an integral part of the font: if the @Code fontdef
- Xfile mentions them, they will be used. Enclosing one of the letters in
- X@@OneCol is one sure way to disable a ligature.
- X@PP
- XThe @@Font symbol
- Xfont.sym @Index { @@Font symbol }
- Xreturns its right parameter in a font
- Xand size specified by its left:
- X@ID {
- X@Code "{ Times Base 12p } @Font" @I object
- X}
- XThe family and face names must have appeared together in a {@Code fontdef};
- Xthe size is arbitrary and may be given in any one of the {@Code "c"},
- X{@Code "i"}, {@Code "p"}, {@Code "m"}, {@Code "f"}, {@Code "s"}, and
- X{@Code "v"} units of measurement (Section {@NumberOf concatenation}),
- Xalthough @Code 10p and @Code 12p are the most common sizes for text.
- X@PP
- XWhen a @@Font symbol is nested inside the right parameter of
- Xanother @@Font symbol, the inner one determines the font of its
- Xown right parameter. However, it may be abbreviated so as to inherit
- Xpart of the outer symbol:
- X@ID @Code {
- X"{ Times Base 12p } @Font"
- X"{ hello, Slope @Font hello, 15p @Font hello }"
- X}
- Xhas result
- X@ID {
- X{ Times Base 12p } @Font
- X{ hello, Slope @Font hello, 15p @Font hello }
- X}
- XThe first inner @@Font inherits the outer family and size, changing only
- Xthe face; the second inherits the outer family and face. When a family
- Xname is given, it must be followed immediately by a face name. A size
- Xchange always comes last.
- X@PP
- XSizes of the form +{@I length} and --{@I length} may also be used,
- Xmeaning that the font size is to be @I length larger or smaller than
- Xthe inherited value. For example, --{@Code "2p"} is often used for
- Xsuperscripts and subscripts. These forms are highly recommended, since
- Xthey don't need to be changed if a decision is made to alter the font
- Xsize of the document as a whole.
- X@End @Section
- END_OF_FILE
- if test 3574 -ne `wc -c <'lout/doc/tr.lout/ch3.03'`; then
- echo shar: \"'lout/doc/tr.lout/ch3.03'\" unpacked with wrong size!
- fi
- # end of 'lout/doc/tr.lout/ch3.03'
- fi
- if test -f 'lout/doc/tr.lout/ch3.04' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'lout/doc/tr.lout/ch3.04'\"
- else
- echo shar: Extracting \"'lout/doc/tr.lout/ch3.04'\" \(3886 characters\)
- sed "s/^X//" >'lout/doc/tr.lout/ch3.04' <<'END_OF_FILE'
- X@Section
- X @Title { "@Break" }
- X @Tag { break }
- X@Begin
- X@PP
- XThe @@Break symbol influences the appearance of paragraphs (Section
- X{@NumberOf concatenation}), offering a fixed set of eight styles:
- X@IL
- X
- X@LI {
- X2i @Wide { |1rt @Code adjust @@Break @I object }
- Xadjust.break @Index { @Code adjust @@Break }
- X|2m Break the paragraphs of {@I object} into lines, and apply @@PAdjust
- X(Section {@NumberOf hadjust}) to every line except the last in
- Xeach paragraph;
- X}
- X
- X@LI {
- X2i @Wide { |1rt @Code outdent @@Break @I object }
- Xoutdent.break @Index { @Code outdent @@Break }
- X|2m Like {@Code adjust}, except that @Code "2.0f @Wide {} &0i" is
- Xinserted at the beginning of every line except the first, creating
- Xan outdented paragraph;
- X}
- X
- X@LI {
- X2i @Wide { |1rt @Code ragged @@Break @I object }
- Xragged.break @Index { @Code ragged @@Break }
- X|2m Break the paragraphs of {@I object} into lines, but do not adjust
- Xthe lines (`ragged right');
- X}
- X
- X@LI {
- X2i @Wide { |1rt @Code cragged @@Break @I object }
- Xcragged.break @Index { @Code cragged @@Break }
- X|2m Like {@Code ragged}, except that each line will be centred with
- Xrespect to the others;
- X}
- X
- X@LI {
- X2i @Wide { |1rt @Code rragged @@Break @I object }
- Xrragged.break @Index { @Code rragged @@Break }
- X|2m Like {@Code ragged}, except that each line will be right-justified with
- Xrespect to the others (`ragged left');
- X}
- X
- X@LI {
- X2i @Wide { |1rt @Code lines @@Break @I object }
- Xlines.break @Index { @Code lines @@Break }
- X|2m Break the paragraphs of {@I object} into lines at the same points
- Xthat they are broken into lines in the input; do not adjust the lines. Any
- Xspaces at the start of a line other than the first will appear in the output;
- X}
- X
- X@LI {
- X2i @Wide { |1rt @Code clines @@Break @I object }
- Xclines.break @Index { @Code clines @@Break }
- X|2m Break the paragraphs of {@I object} into lines at the same points
- Xthat they are broken into lines in the input file, then centre each line with
- Xrespect to the others;
- X}
- X
- X@LI {
- X2i @Wide { |1rt @Code rlines @@Break @I object }
- Xrlines.break @Index { @Code rlines @@Break }
- X|2m Break the paragraphs of {@I object} into lines at the same points
- Xthat they are broken into lines in the input file, then right-justify
- Xeach line with respect to the others.
- X}
- X
- X@EL
- XIf the paragraph was an entire component of a galley, so will each of
- Xits lines be; otherwise the lines are enclosed in a {@Code "@OneRow"}
- Xsymbol after breaking.
- X@PP
- XThe length of the gap used to separate the lines produced by paragraph
- Xbreaking is always {@Code 1v}. However, the @Code v unit itself and the
- Xv.unit.effect @SubIndex { effect on paragraph breaking }
- Xgap mode may be changed:
- X@IL
- X
- X@LI {
- X2i @Wide { |1rt @I gap @Code "@Break" @I object }
- X|2m Within {@I object}, take the value of the @Code "v" unit to be the
- Xlength of {@I gap};
- X}
- X
- X@LI {
- X2i @Wide { |1rt + & @I gap @Code "@Break" @I object }
- X|2m Within {@I object}, take the value of the @Code "v" unit to be
- Xlarger by the length of @I gap than it would otherwise have been;
- X}
- X
- X@LI {
- X2i @Wide { |1rt -- & @I gap @Code "@Break" @I object }
- X|2m Within {@I object}, take the value of the @Code "v" unit to be
- Xsmaller by the length of @I gap than it would otherwise have been.
- X}
- X
- X@EL
- XIn each case, the mode of @I gap is adopted within {@I object}.
- X@PP
- XFinally, the @@Break symbol influences hyphenation:
- X@IL
- X
- X@LI {
- X2i @Wide { |1rt @Code "hyphen @Break" @I object }
- Xhyphen.break @Index { @Code hyphen @@Break }
- X|2m Permit hyphenation within the paragraphs of {@I object};
- X}
- X
- X@LI {
- X2i @Wide { |1rt @Code "nohyphen @Break" @I object }
- Xnohyphen.break @Index { @Code nohyphen @@Break }
- X|2m Prohibit hyphenation within the paragraphs of {@I object}; all
- Xhyphenation gaps without exception revert to edge-to-edge mode.
- X}
- X
- X@EL
- XSeveral options may be given to the @@Break symbol simultaneously, in
- Xany order. For example,
- X@ID @Code "{ adjust 1.2fx hyphen } @Break ..."
- Xis a typical initial value.
- X@End @Section
- END_OF_FILE
- if test 3886 -ne `wc -c <'lout/doc/tr.lout/ch3.04'`; then
- echo shar: \"'lout/doc/tr.lout/ch3.04'\" unpacked with wrong size!
- fi
- # end of 'lout/doc/tr.lout/ch3.04'
- fi
- if test -f 'lout/doc/tr.over/s1' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'lout/doc/tr.over/s1'\"
- else
- echo shar: Extracting \"'lout/doc/tr.over/s1'\" \(3752 characters\)
- sed "s/^X//" >'lout/doc/tr.over/s1' <<'END_OF_FILE'
- X@Section
- X @Title { Introduction }
- X@Begin
- X@PP
- XThe personal computer and the laser printer have sparked a revolution in
- Xthe production of documents. Many authors now routinely take their work
- Xfrom conception to camera-ready copy, many publishers are using desktop
- Xpublishing systems, and it is probable that manual assembly of documents
- Xwill become uncommon in the near future.
- X@PP
- XAs control moves into the hands of an ever-increasing number of
- Xnon-technical people, the stresses on document formatting software
- Xincrease. On the one hand, this software must be so simple that anyone
- Xcan use it; on the other, it must supply a bewildering array of
- Xfeatures. A book, for example, demands fonts, paragraph and page
- Xbreaking, floating figures and tables, footnotes, chapters and sections,
- Xrunning page headers and footers, an automatically generated table of
- Xcontents, and a sorted index. Add to this an open-ended list of
- Xspecialized features, beginning with mathematical typesetting, diagrams,
- Xand access to bibliographic databases, and the result is a nightmare for
- Xthe software developer.
- X@PP
- XOne solution to this feature explosion problem is to implement as a
- Xsystem primitive every feature that will ever be required. Although all
- Xof the successful interactive document editors known to the author take
- Xthis approach (admittedly with some attempt to generalize and unify
- Xtheir features), it has clearly reached its limit. Few such systems
- Xprovide equation formatting, fewer still will format a Pascal program,
- Xand other specialized features will simply never be implemented.
- X@PP
- XA second solution is to provide a relatively small system equipped with
- Xa means of defining new features, as in programming languages. This
- Xapproach has been taken by the batch formatters (those which do not
- Xdisplay a continuously updated image of the printed document while
- Xediting) found in academia, notably troff [{@Ref ossanna76}], @TeX
- X[{@Ref knuth84}], and Scribe [{@Ref reid80}]. Features such as
- Xfootnotes and automatic tables of contents have been added to these
- Xsystems using macro definitions. Unfortunately, such extensions are
- Xvery difficult and error-prone in practice: @TeX's footnote macro alone
- Xcontains half a page of dense, obscure code, while those who have
- Xextended troff have abandoned the language itself and taken refuge in
- Xpreprocessors. A more productive basis for developing new features is needed.
- X@PP
- XThis article presents a high-level language for document formatting,
- Xcalled Lout, which is intended to form such a basis. Lout is quite
- Xaccessible to non-expert users, but its unique property is the ease with
- Xwhich expert users can add new features. We begin with a presentation
- Xof Lout as it appears to the non-expert user who employs the standard
- Xpackages without under&-standing Lout's principles. Later sections switch
- Xto the expert's view, showing by examples the principles of Lout and how
- Xadvanced features are defined.
- X@PP
- XA Unix-compatible
- X@FootNote { Unix is a trademark of "AT&T" Bell Laboratories. }
- Xbatch formatter for Lout (called Basser Lout) has been written which
- Xproduces PostScript
- X@FootNote { PostScript is a trademark of Adobe Systems, Incorporated. }
- Xoutput suitable for printing on most laser printers and many other
- Xdevices. A library of standard packages written in Lout provides all of
- Xthe features listed above and many others. This system is not an
- Xexperimental prototype, it is a fully operational prod&-uct&-ion
- Ximplementation. The software and its supporting documentation
- X[{@Ref kingston92}, {@Ref kingston93basser}, {@Ref kingston92begin},
- X{@Ref kingston92design}, {@Ref kingston92eq}, {@Ref kingston92fig},
- X{@Ref kingston92tab}] are available free of charge from the author.
- X@End @Section
- END_OF_FILE
- if test 3752 -ne `wc -c <'lout/doc/tr.over/s1'`; then
- echo shar: \"'lout/doc/tr.over/s1'\" unpacked with wrong size!
- fi
- # end of 'lout/doc/tr.over/s1'
- fi
- if test -f 'lout/doc/tr.over/s3' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'lout/doc/tr.over/s3'\"
- else
- echo shar: Extracting \"'lout/doc/tr.over/s3'\" \(4009 characters\)
- sed "s/^X//" >'lout/doc/tr.over/s3' <<'END_OF_FILE'
- X@Section
- X @Title { Objects }
- X@Begin
- X@PP
- XTo the expert user, Lout is a high-level functional language with a
- Xrelatively small repertoire of primitive features organized around four
- Xkey concepts: {@I objects}, {@I definitions}, {@I cross @I references},
- Xand {@I galleys}. An object is a rectangle with at least one horizontal
- Xand one vertical mark protruding from it. For example,
- X@ID @Code "Australia"
- Xis an object which is viewed by Lout like this:
- X@ID @ShowMarks Australia
- XHorizontal and vertical concatenation operators, denoted by the symbols
- X@Code "|" and {@Code "/"}, are used to assemble larger objects:
- X@ID @Code { "USA |0.2i Australia" }
- Xis the object
- X@ID { @ShowMarks USA |0.2i @ShowMarks Australia }
- XThe parameters are separated by the length given after the concatenation
- Xsymbol (0.2 inches in this example), and their horizontal marks are
- Xaligned.
- X@PP
- XTables are made by combining the two operators, with @Code "|" having
- Xthe higher precedence:
- X@ID @Code {
- X |1m USA |1m "|0.2i" |1m Australia
- X/1vx "/0.1i" | Washington | "|" | Canberra
- X}
- Xis the object
- X@ID {
- X @ShowMarks USA &0.4c @Fig { @Line from { 0 0 } to { xsize 0 }
- X linestyle { dashed } linewidth { 0.015 cm } 0.8c @Wide {} }
- X #{ 0 ymark moveto xsize 10 pt add ymark lineto [ 3 pt ] 0 setdash stroke }
- X #@Graphic {1c @Wide }
- X |0.2i @ShowMarks Australia
- X/0.1i @ShowMarks Washington | @ShowMarks Canberra
- X}
- XThe second horizontal concatenation symbol needs no length, since the
- Xfirst one determines the separation between the two columns created by
- Xthe alignment of the vertical marks. Objects of arbitrary complexity
- Xmay be assembled using these and other operators, and braces used for
- Xgrouping, in a manner analogous to the assembly of expressions in
- Xprogramming languages.
- X@PP
- XThe lengths attached to concatenation symbols have features which permit
- Xobjects to be positioned very precisely. In addition to the usual units
- Xof measurement (inches, centimetres, points, and ems), lengths may be
- Xmeasured in units of the current font size, space width, inter-line
- Xspace, and available width (for centering and right justification).
- X@PP
- XThere are also six @I gap {@I modes}, which determine where the lengths
- Xare measured from. Previous examples have used edge-to-edge mode:
- X@ID @Fig margin { 0c } headstyle { closed } {
- X@ShowMarks { 0.3c @Wide ^| 0.9c @Wide 0.3c @High ^/ 0.2c @High }
- X|0.5c
- X@ShowMarks { 0.3c @Wide ^| 0.9c @Wide 0.3c @High ^/ 0.2c @High }
- X//0.2c
- X|1.2c @Arrow arrow { both } { 0.5c @Wide }
- X}
- XLout also provides a mark-to-mark mode, obtained by appending
- X@Code x to the length:
- X@ID @Fig margin { 0c } headstyle { closed } {
- X@ShowMarks { 0.3c @Wide ^| 0.9c @Wide 0.3c @High ^/ 0.2c @High }
- X|0.5c
- X@ShowMarks { 0.3c @Wide ^| 0.9c @Wide 0.3c @High ^/ 0.2c @High }
- X//0.2c
- X|0.3c @Arrow arrow { both } { 1.7c @Wide }
- X}
- XThe length will be widened if necessary to prevent the parameters from
- Xoverlapping, thus implementing the baseline-to-baseline spacing used
- Xbetween lines of text. Other modes provide tabulation from the left
- Xmargin, overstriking, and hyphenation.
- X@PP
- XThe final appearance of an object is affected by a limited amount of
- Xinformation inherited from the context, principally the font and the
- Xwidth available for the object to occupy. There are operators for
- Xsetting these attributes:
- X@ID @Code {
- X"Slope @Font {"
- X"Hello, world"
- X"}"
- X}
- Xproduces
- X@ID {
- XSlope @Font { Hello, world }
- X}
- Xand in a similar way
- X@ID @Code {
- X"1.5i @Wide {"
- X"(1) |0.1i A small"
- X"indented paragraph"
- X"of text."
- X"}"
- X}
- Xproduces
- X@ID {
- X1.5i @Wide {
- X(1) |0.1i A small
- Xindented paragraph
- Xof text.
- X}
- X}
- Xwith the paragraph inheriting and being broken to an available width of
- X1.4 inches minus the width of (1). This size inheritance remains secure
- Xthrough all the complexities of gap modes, mark align&-ment, the @Code
- X"@Wide" and other operators, and so on, providing a high-level service
- Xcomparable in value with strong typing in programming languages.
- X@End @Section
- END_OF_FILE
- if test 4009 -ne `wc -c <'lout/doc/tr.over/s3'`; then
- echo shar: \"'lout/doc/tr.over/s3'\" unpacked with wrong size!
- fi
- # end of 'lout/doc/tr.over/s3'
- fi
- if test -f 'lout/doc/tr.over/setup' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'lout/doc/tr.over/setup'\"
- else
- echo shar: Extracting \"'lout/doc/tr.over/setup'\" \(2867 characters\)
- sed "s/^X//" >'lout/doc/tr.over/setup' <<'END_OF_FILE'
- X
- X######################################################
- X# #
- X# Lout setup file for Overview paper. #
- X# #
- X# Jeffrey H. Kingston #
- X# 8 June 1991 #
- X# 23 December 1991 #
- X# #
- X######################################################
- X
- X@SysInclude { ft }
- X@SysInclude { dl }
- X@SysInclude { eq }
- X@SysInclude { fig }
- X
- X def @Code
- X right x
- X { { Helvetica Base -1p } @Font lines @Break x
- X }
- X
- X def @ShowMarks
- X named linewidth { 0.015 cm }
- X named linestyle { dashed }
- X named dashlength { 0.15 cm }
- X named paint { light }
- X right x
- X {
- X @Fig
- X { @Box margin { 0c } linewidth { linewidth } paint { paint }
- X { @Figure
- X shape { -0.3 cm ymark
- X {xsize ymark} ++ {0.3 cm 0} []
- X xmark -0.3 cm
- X {xmark ysize} ++ {0 0.3 cm}
- X }
- X linewidth { linewidth }
- X linestyle { linestyle }
- X dashlength { dashlength }
- X x
- X }
- X
- X }
- X }
- X
- X def @TeX { T{ /0.2fo E}X }
- X
- X def @Leaders { .. @Leaders }
- X
- X ###################################################
- X # #
- X # Interpolated example documents. #
- X # #
- X ###################################################
- X
- X def @HLine
- X {
- X { 0 0 moveto xsize 0 lineto stroke } @Graphic {}
- X }
- X
- X def @LittleEndRunPlace { @Galley }
- X def @LittleEndRun
- X force into { @LittleEndRunPlace&&preceding }
- X {}
- X
- X def @LittleTextPlace { @Galley }
- X def @LittleText into { @LittleTextPlace&&preceding }
- X right x
- X { x
- X }
- X
- X def @LittleFootPlace { @Galley }
- X def @LittleFootNote into { @LittleFootPlace&&following }
- X right x
- X { x
- X }
- X
- X def @LittlePageColumn
- X right x
- X {
- X 9px @Break 8p @Font
- X 2.8c @Wide x
- X }
- X
- X def @LittlePage
- X right x
- X {
- X @HContract @VContract
- X { 0 0 moveto xsize 0 lineto xsize ysize lineto
- X 0 ysize lineto closepath stroke } @Graphic
- X { //0.3c ||0.3c
- X 9px @Break 8p @Font
- X 2.8c @Wide 3.8c @High x
- X ||0.3c //0.3c
- X }
- X }
- X
- X def @LittleFootSect
- X { 1c @Wide @HLine
- X //0.3v @LittleFootPlace ||0.5c
- X }
- X
- X def @LittlePageList
- X right @PageNum
- X {
- X @LittlePage { |0.5rt - @PageNum - //0.8v
- X //0.3v @LittleTextPlace
- X //1rt @LittleFootSect
- X }
- X //
- X @LittlePageList @Next @PageNum
- X }
- X
- X def @LittleDocument
- X { @LittlePage
- X { @LittleTextPlace
- X //1rt @LittleFootSect
- X }
- X // @LittlePageList 2
- X // @LittleEndRunPlace
- X }
- X
- X@Use { @DocumentLayout }
- X
- X@SysDatabase @Reference { "loutrefs" }
- END_OF_FILE
- if test 2867 -ne `wc -c <'lout/doc/tr.over/setup'`; then
- echo shar: \"'lout/doc/tr.over/setup'\" unpacked with wrong size!
- fi
- # end of 'lout/doc/tr.over/setup'
- fi
- if test -f 'lout/doc/tr.tab/s2' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'lout/doc/tr.tab/s2'\"
- else
- echo shar: Extracting \"'lout/doc/tr.tab/s2'\" \(3628 characters\)
- sed "s/^X//" >'lout/doc/tr.tab/s2' <<'END_OF_FILE'
- X@Section
- X @Title { Changing the style of entries and columns }
- X@Begin
- X@PP
- XThe style of an entry is mainly determined by four symbols from standard
- XLout: {@Code "@Font"}, {@Code "@Break"}, {@Code "@Wide"}, and
- X{@Code "@High"}. We will review them only briefly here, since they are
- Xtreated elsewhere [{@Ref kingston92}, {@Ref kingston92begin}],
- Xthen explain how they are used within tables.
- X@PP
- XThe @Code "@Font" symbol changes the font and font size of an object. For
- Xexample,
- X@ID @Code "Slope @Font { hello world }"
- Xproduces {Slope @Font { hello world }}, and
- X@ID @Code "{ Bold +2p } @Font { hello world }"
- Xproduces
- X@ID {{ Bold +2p } @Font { hello world }}
- Xwhich is two points larger than it otherwise would have been, as well
- Xas set in bold. The DocumentLayout package provides the abbreviations
- X@Code "@I" and @Code "@B" for @Code "Slope @Font" and {@Code "Bold @Font"}.
- X@PP
- XThe @Code "@Break" symbol affects paragraph breaking. Most relevant
- Xhere are @Code "clines @Break" and {@Code "rlines @Break"}, which will
- Xcentre or right-justify one or more lines in the given column:
- X@ID @Code {
- X"clines @Break {"
- X"A small centred"
- X"paragraph."
- X"}"
- X}
- Xproduces
- X@ID {
- Xclines @Break {
- XA small centred
- Xparagraph.
- X}
- X}
- Xfor example. Actually, there is a small problem with these symbols: they
- Xonly work on paragraphs of at least two words, so they will fail to
- Xcentre or right-justify a solitary word. Tab provides two symbols,
- X{@Code "@CC"} and {@Code "@RR"}, which do essentially the same thing,
- Xbut which work on single words as well.
- X@PP
- XThe @Code "@Wide" symbol forces an object to have a given width, by
- Xpadding it with white space on the right if it is too small, or breaking
- Xits paragraphs if it is too wide:
- X@ID @Code {
- X"1.5i @Wide {"
- X"This small paragraph will"
- X"be broken to a width of"
- X"one and one half inches."
- X"}"
- X}
- Xproduces
- X@ID {
- X1.5i @Wide {
- XThis small paragraph will
- Xbe broken to a width of
- Xone and one half inches.
- X}
- X}
- XWidths may be specified in centimetres, points or ems using the letters
- X{@Code "c"}, {@Code "p"} and {@Code "e"} instead of {@Code "i"}. The
- X@Code "@High" symbol is very similar, forcing an object to have a given
- Xheight by adding white space beneath it.
- X@PP
- XAlthough we will use only these four symbols in the following, more
- Xexotic symbols may be used, for example @Code "90d @Rotate" which
- Xrotates any object (the entire table, for example, or one entry) ninety
- Xdegrees, or any other positive or negative angle. Symbols defined by
- Xthe user or taken from other packages may also be used.
- X@PP
- XTo change the style of an individual entry, enclose it in the symbols
- Xrequired:
- X@ID @Code {
- X"@Rowa"
- X" A { @CC { one entry of the table } }"
- X}
- XMore commonly, the same style is to be applied to every entry in a
- Xparticular column, and this is done by placing the symbols for the style
- Xinside the format option, between @Code "@Col" and the column letter:
- X@ID @Code {
- X"@Tab"
- X" @Fmta { @Col 3c @Wide @CC A ! ... }"
- X}
- XAny @Code "@CC" or @Code "@RR" symbol should appear last, immediately
- Xbefore the column letter. Now every entry in column @Code A will be
- Xcentred in a three centimetre space, which means that the column as
- Xa whole will be three centimetres wide (excluding margins) and its
- Xentries will be centred.
- X@PP
- XIt is best not to use the @Code "@Wide" symbol at first, since Lout is
- Xquite good at choosing appropriate column widths. If the result is not
- Xsatisfactory, and the table is wide enough to require paragraph breaking
- Xwithin its entries, @Code "@Wide" should be used only to reduce the width
- Xof the wider columns, not to increase the width of the narrower ones.
- X@End @Section
- END_OF_FILE
- if test 3628 -ne `wc -c <'lout/doc/tr.tab/s2'`; then
- echo shar: \"'lout/doc/tr.tab/s2'\" unpacked with wrong size!
- fi
- # end of 'lout/doc/tr.tab/s2'
- fi
- if test -f 'lout/doc/tr.tab/s4' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'lout/doc/tr.tab/s4'\"
- else
- echo shar: Extracting \"'lout/doc/tr.tab/s4'\" \(1609 characters\)
- sed "s/^X//" >'lout/doc/tr.tab/s4' <<'END_OF_FILE'
- X@Section
- X @Title { Aligned columns }
- X@Begin
- X@PP
- XColumns of numbers are often presented with decimal points aligned:
- X@CD @Tab
- X @Fmta { @Col A }
- X{
- X @Rowa A { 5^.46 }
- X @Rowa A { 128^.2 }
- X @Rowa A { 3^.4159 }
- X @Rowa A { 5772^ }
- X}
- XThis is achieved with Tab by placing the @Code "^" symbol (which
- Xactually comes from the DocumentLayout package) just before the
- Xalignment point in each entry:
- X@ID @Code {
- X"@Tab"
- X" @Fmta { @Col A }"
- X"{"
- X" @Rowa A { 5^.46 }"
- X" @Rowa A { 128^.2 }"
- X" @Rowa A { 3^.4159 }"
- X" @Rowa A { 5772^ }"
- X"}"
- X}
- XThe equals signs of equations can be aligned in the same way. The
- Xformat of such columns should not contain @Code "@CC" or {@Code "@RR"}.
- X@PP
- XThe simplest way to get a heading over an aligned column is to use the
- X@Code "^" symbol in the heading as well. If it is not possible to do
- Xthis, for example because the heading entry is a paragraph of text
- Xbroken over more than one line, the most viable alternative is to use
- X@Code "@Over" in the heading line's format to make the heading column
- Xspan over the aligned column:
- X@ID @Code {
- X"@Tab"
- X" @Fmta { @Col @CC H @Over A }"
- X" @Fmtb { @Col A }"
- X"{"
- X" @Rowa H { Heading }"
- X" @Rowb A { 5^.46 }"
- X" @Rowb A { 128^.2 }"
- X" @Rowb A { 3^.4159 }"
- X" @Rowb A { 5772^ }"
- X"}"
- X}
- Xfor example produces
- X@CD @Tab
- X @Fmta { @Col @CC H @Over A }
- X @Fmtb { @Col A }
- X{
- X @Rowa H { Heading }
- X @Rowb A { 5^.46 }
- X @Rowb A { 128^.2 }
- X @Rowb A { 3^.4159 }
- X @Rowb A { 5772^ }
- X}
- XUnfortunately, the aligned entries are left-justified in the column, when
- Xthey should really be centred.
- X@End @Section
- END_OF_FILE
- if test 1609 -ne `wc -c <'lout/doc/tr.tab/s4'`; then
- echo shar: \"'lout/doc/tr.tab/s4'\" unpacked with wrong size!
- fi
- # end of 'lout/doc/tr.tab/s4'
- fi
- if test -f 'lout/doc/tr.tab/s7' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'lout/doc/tr.tab/s7'\"
- else
- echo shar: Extracting \"'lout/doc/tr.tab/s7'\" \(3507 characters\)
- sed "s/^X//" >'lout/doc/tr.tab/s7' <<'END_OF_FILE'
- X@Section
- X @Title { A final example }
- X@Begin
- X@PP
- XIn conclusion, here is the input for a relatively large table:
- X@ID 10p @Font @Code 1.2fx @Break {
- X"@OneRow 10p @Font 1.15fx @Break @Tab"
- X" linewidth { 1.0 pt }"
- X" vmargin { 0.4v }"
- X" @Fmta { @Col @B A ! @Col @B B ! @Col @B C ! @Col @B D }"
- X" @Fmtb { @Col outdent @Break A ! @Col 1.8c @Wide ragged @Break B !"
- X" @Col C ! @Col outdent @Break D }"
- X"{"
- X""
- X"@Rowa above { single } below { single }"
- X" A { Scholarship }"
- X" B { Value $ }"
- X" C { Closing date }"
- X" D { Qualifications }"
- X""
- X"@Rowa"
- X" A { 1. Tenable at the University of Sydney }"
- X""
- X"@Rowb"
- X" A { Commonwealth and University Postgraduate Research Awards }"
- X" B { 10,415 (12,724 to 16,433 from 1 January 1990) }"
- X" C { 31 October }"
- X" D { Graduates with Hons I or Hons II Div. 1. For research in any field }"
- X""
- X"@Rowb"
- X" A { Commonwealth Postgraduate Course Awards }"
- X" B { 10,415 }"
- X" C { 30 September }"
- X" D { Graduates with honours degrees or very good pass degrees. For"
- X"Master's degrees undertaken by coursework }"
- X""
- X"@Rowb"
- X" A { R. and M. Bentwich Scholarship }"
- X" D { Graduate who holds a postgraduate research scholarship and who"
- X"requires a supplementary grant }"
- X""
- X"@Rowa"
- X" A { 2. Awarded by external bodies }"
- X""
- X"@Rowb"
- X" A { Caltex }"
- X" B { 24,000 }"
- X" C { 30 September }"
- X" D { Female graduates completing degree or diploma in year of application }"
- X""
- X"@Rowb"
- X" A { Rhodes Scholarship }"
- X" B { @Sterling3500 + return air-fare }"
- X" C { 1 October }"
- X" D { Age limit 25. For tenure at the University of Oxford }"
- X" below { single }"
- X"}"
- X"@DP"
- X"10p @Font { *Additional benefits include cost of travel and payment of fees. }"
- X}
- XThe most interesting things about it are the use of outdented paragraphs,
- Xand the @Code "@Wide" symbol which restricts the width of the second column,
- Xwhich would otherwise be as wide as the first and last. Here is the result:
- X@DP
- X@OneRow 10p @Font 1.15fx @Break @Tab
- X linewidth { 1.0 pt }
- X vmargin { 0.4v }
- X @Fmta { @Col @B A ! @Col @B B ! @Col @B C ! @Col @B D }
- X @Fmtb { @Col outdent @Break A ! @Col 1.8c @Wide ragged @Break B !
- X @Col C ! @Col outdent @Break D }
- X{
- X@Rowa above { single } below { single }
- X A { Scholarship }
- X B { Value $ }
- X C { Closing date }
- X D { Qualifications }
- X
- X@Rowa
- X A { 1. Tenable at the University of Sydney }
- X
- X@Rowb
- X A { Commonwealth and University Postgraduate Research Awards }
- X B { 10,415 (12,724 to 16,433 from 1 January 1990) }
- X C { 31 October }
- X D { Graduates with Hons I or Hons II Div. 1. For research in any field }
- X
- X@Rowb
- X A { Commonwealth Postgraduate Course Awards }
- X B { 10,415 }
- X C { 30 September }
- X D { Graduates with honours degrees or very good pass degrees. For
- XMaster's degrees undertaken by coursework }
- X
- X@Rowb
- X A { R. and M. Bentwich Scholarship }
- X D { Graduate who holds a postgraduate research scholarship and who
- Xrequires a supplementary grant }
- X
- X@Rowa
- X A { 2. Awarded by external bodies }
- X
- X@Rowb
- X A { Caltex }
- X B { 24,000 }
- X C { 30 September }
- X D { Female graduates completing degree or diploma in year of application }
- X
- X@Rowb
- X A { Rhodes Scholarship }
- X B { @Sterling3500 + return air-fare }
- X C { 1 October }
- X D { Age limit 25. For tenure at the University of Oxford }
- X below { single }
- X}
- X@DP
- X10p @Font { *Additional benefits include cost of travel and payment of fees. }
- X@End @Section
- END_OF_FILE
- if test 3507 -ne `wc -c <'lout/doc/tr.tab/s7'`; then
- echo shar: \"'lout/doc/tr.tab/s7'\" unpacked with wrong size!
- fi
- # end of 'lout/doc/tr.tab/s7'
- fi
- if test -f 'lout/include/doc' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'lout/include/doc'\"
- else
- echo shar: Extracting \"'lout/include/doc'\" \(4110 characters\)
- sed "s/^X//" >'lout/include/doc' <<'END_OF_FILE'
- X
- X###############################################################################
- X# #
- X# Setup file for invoking @DocumentLayout for simple documents #
- X# #
- X# Jeffrey H. Kingston #
- X# 22 December 1992 #
- X# #
- X###############################################################################
- X
- X@SysInclude { ft }
- X@SysInclude { dl }
- X# @SysInclude { eq }
- X# @SysInclude { tab }
- X# @SysInclude { pas }
- X# @SysInclude { fig }
- X
- X@Use { @DocumentLayout
- X # @InitialFont { Times Base 12p } # initial font
- X # @InitialBreak { adjust 1.20fx } # initial break
- X # @Hyphenate { Yes } # Want hyphenation? Yes or No
- X # @MajorHeadingFont { Bold 2.0f } # font for major headings
- X # @HeadingFont { Bold } # font for ordinary headings
- X # @MinorHeadingFont { Bold } # font for minor headings
- X # @BookCoverFont { Helvetica Base } # font for book cover
- X
- X # @ParaGap { 1.30vx } # gap between paragraphs
- X # @ParaIndent { 2.00f } # paragraph first-line indent
- X
- X # @DispGap { 1.00v } # gap above and below displays
- X # @DispIndent { 2.00f } # @IndentedDisplay indent
- X # @DefaultIndent { 0.5rt } # @Display indent
- X # @WideIndent { 4.00f } # @WideTaggedList indent
- X # @VeryWideIndent { 8.00f } # @VeryWideTaggedList indent
- X
- X # @PageWidth { 21.00c } # width of page
- X # @PageHeight { 29.70c } # height of page
- X # @PageMargin { 2.50c } # size of all four margins
- X # @Columns { Single } # Single, Double, Multi
- X # @DoubleColWidth { 7.50c } # column width used by Double
- X # @MultiColWidth { 4.67c } # column width used by Multi
- X # @ColGap { 1.00c } # gap between columns
- X # @TopGap { 0.75c } # gap between figures
- X # @MidGap { 0.75c } # gap above and below body text
- X
- X # @FootNoteFont { 0.80f } # font for footnotes
- X # @FootNoteBreak { 1.20fx } # break for footnotes
- X # @FootLen { 2.00c } # footnote line and indent size
- X # @ColFootLen { 1.20c } # @FootLen when Double, Multi
- X # @FootGap { 0.20c } # gap between footnotes
- X
- X # @MakeIndex { No } # Want index? Yes or No
- X # @IndexColumns { Double } # Single, Double, Multi
- X
- X # @TableOfContents { No } # Want contents? Yes or No
- X # @MajorContentsGap { 1.30v } # gap above major entry
- X # @ContentsGap { 1.00v } # gap above ordinary entry
- X
- X # @ChapterNumbers { Yes } # Yes or No
- X # @SectionNumbers { Yes } # Yes or No
- X # @SubSectionNumbers { Yes } # Yes or No
- X # @AppendixNumbers { Yes } # Yes or No
- X # @SubAppendixNumbers{ Yes } # Yes or No
- X # @ChapterGap { 1.10b } # gap before each chapter
- X # @SectionGap { 2.00v } # gap before each section
- X # @SubSectionGap { 1.50v } # gap before each subsection
- X # @AppendixGap { 2.00v } # gap before each appendix
- X # @SubAppendixGap { 2.00v } # gap before each subappendix
- X
- X # @PageNumbers { Yes } # Want page numbers? Yes or No
- X # @FirstPageNumber { 1 } # Number of first page
- X # @PageOneTopFormat { @Null }
- X # @PageOneFootFormat { @Null }
- X # @PageTopFormat { |0.5rt - @PageNum - }
- X # @PageFootFormat { @Null }
- X # @BookTitleFormat { Bold @Font @Title }
- X}
- END_OF_FILE
- if test 4110 -ne `wc -c <'lout/include/doc'`; then
- echo shar: \"'lout/include/doc'\" unpacked with wrong size!
- fi
- # end of 'lout/include/doc'
- fi
- if test -f 'lout/include/pas' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'lout/include/pas'\"
- else
- echo shar: Extracting \"'lout/include/pas'\" \(3621 characters\)
- sed "s/^X//" >'lout/include/pas' <<'END_OF_FILE'
- X
- X###############################################################################
- X# #
- X# Lout @Pas package for formatting Pascal programs (Version 2.0) #
- X# #
- X# Version 1.0 by Jeffrey H. Kingston, June 1991. #
- X# Version 2.0 by Jeffrey H. Kingston, 22 December 1992. #
- X# #
- X# See "Eq - a Lout package for typesetting mathematics" for user #
- X# information. #
- X# #
- X# Reference: Jensen, K. and Wirth, N. Pascal User Manual and Report. #
- X# Second Edition, Springer-Verlag, 1975. #
- X# #
- X###############################################################################
- X
- Xexport "0" "1" "2" "3" "4" "5" "6" "7" "8" "9"
- X "." "," ":" ";" "'" "`" "+" "-" "*" "/" "(" ")"
- X "[" "]" "^" ".." "=" "<" ">" "<>" "<=" ">=" ":="
- X
- X and array begin case const div do downto else end
- X file for forward function goto if in label mod nil not
- X of or otherwise packed procedure program record repeat
- X set then to type until var while with @Com
- X
- Xdef @Pas
- X body @Body
- X@Begin
- X
- X def @R right x { Base @Font x }
- X def @B right x { Bold @Font x }
- X def @S right x { { Symbol Base } @Font x }
- X
- X def "0" { @R "0" }
- X def "1" { @R "1" }
- X def "2" { @R "2" }
- X def "3" { @R "3" }
- X def "4" { @R "4" }
- X def "5" { @R "5" }
- X def "6" { @R "6" }
- X def "7" { @R "7" }
- X def "8" { @R "8" }
- X def "9" { @R "9" }
- X def "." { @R "." }
- X def "," { @R "," }
- X def ":" { @R ":" }
- X def ";" { @R ";" }
- X def "'" { @R "'" }
- X def "`" { @R "`" }
- X def "+" { @S "+" }
- X def "-" { @S "-" }
- X def "*" { @S "\052" }
- X def "/" { @R "\057" }
- X def "(" { @R "(" }
- X def ")" { @R ")" }
- X def "[" { @R "[" }
- X def "]" { @R "]" }
- X def "^" { @S 0.8f @Font "\255" }
- X def ".." { @R ".." }
- X def "=" { @S "\075" }
- X def "<" { @S "\074" }
- X def ">" { @S "\076" }
- X def "<>" { @S "\271" }
- X def "<=" { @S "\243" }
- X def ">=" { @S "\263" }
- X def ":=" { :{//0.03fo =} }
- X
- X def and { @B "and" }
- X def array { @B "array" }
- X def begin { @B "begin" }
- X def case { @B "case" }
- X def const { @B "const" }
- X def div { @B "div" }
- X def do { @B "do" }
- X def downto { @B "downto" }
- X def else { @B "else" }
- X def end { @B "end" }
- X def file { @B "file" }
- X def for { @B "for" }
- X def forward { @B "forward" }
- X def function { @B "function" }
- X def goto { @B "goto" }
- X def if { @B "if" }
- X def in { @B "in" }
- X def label { @B "label" }
- X def mod { @B "mod" }
- X def nil { @B "nil" }
- X def not { @B "not" }
- X def of { @B "of" }
- X def or { @B "or" }
- X def otherwise { @B "otherwise" }
- X def packed { @B "packed" }
- X def procedure { @B "procedure" }
- X def program { @B "program" }
- X def record { @B "record" }
- X def repeat { @B "repeat" }
- X def set { @B "set" }
- X def then { @B "then" }
- X def to { @B "to" }
- X def type { @B "type" }
- X def until { @B "until" }
- X def var { @B "var" }
- X def while { @B "while" }
- X def with { @B "with" }
- X
- X def @Com right x { @R "{" x @R "}" }
- X
- X Slope @Font lines @Break @Body
- X
- X@End @Pas
- END_OF_FILE
- if test 3621 -ne `wc -c <'lout/include/pas'`; then
- echo shar: \"'lout/include/pas'\" unpacked with wrong size!
- fi
- # end of 'lout/include/pas'
- fi
- if test -f 'lout/include/tab_prepend' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'lout/include/tab_prepend'\"
- else
- echo shar: Extracting \"'lout/include/tab_prepend'\" \(2912 characters\)
- sed "s/^X//" >'lout/include/tab_prepend' <<'END_OF_FILE'
- X%%BeginResource: procset LoutTabPrependGraphic
- X%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- X% %
- X% PostScript @SysPrependGraphic file for @Tab %
- X% %
- X% To assist in avoiding name clashes, the names %
- X% of all these symbols begin with "ltab". %
- X% %
- X% Jeffrey H. Kingston %
- X% 24 September 1991 %
- X% 22 December 1992 %
- X% %
- X%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- X
- X% linewidth ltabhs -
- X% horizontal single line
- X/ltabhs
- X{ 0 0 moveto xsize 0 lineto
- X setlinewidth 0 setlinecap stroke
- X} def
- X
- X% linewidth ltabhsp -
- X% horizontal single line with projecting ends
- X/ltabhsp
- X{ 0 0 moveto xsize 0 lineto
- X setlinewidth 2 setlinecap stroke
- X} def
- X
- X% linewidth ltabhd -
- X% horizontal double line
- X/ltabhd
- X{ dup dup
- X 0 0 moveto xsize 0 lineto
- X 0 exch 3 mul moveto xsize exch 3 mul lineto
- X setlinewidth 0 setlinecap stroke
- X} def
- X
- X% linewidth ltabhdb -
- X% horizontal double line below mark
- X/ltabhdb
- X{ dup dup
- X 0 0 moveto xsize 0 lineto
- X 0 exch -3 mul moveto xsize exch -3 mul lineto
- X setlinewidth 0 setlinecap stroke
- X} def
- X
- X% linewidth ltabhdnw -
- X% horizontal double line with northwest corner
- X/ltabhdnw
- X{ dup dup dup dup
- X 0 0 moveto xsize 0 lineto
- X xsize exch 3 mul moveto
- X -3 mul exch 3 mul lineto
- X -3 mul 0 lineto
- X setlinewidth 0 setlinejoin 2 setlinecap stroke
- X} def
- X
- X% linewidth ltabhdne -
- X% horizontal double line with northeast corner
- X/ltabhdne
- X{ dup dup dup dup
- X 0 0 moveto xsize 0 lineto
- X 0 exch 3 mul moveto
- X 3 mul xsize add exch 3 mul lineto
- X 3 mul xsize add 0 lineto
- X setlinewidth 0 setlinejoin 2 setlinecap stroke
- X} def
- X
- X% linewidth ltabhdsw -
- X% horizontal double line with southwest corner
- X/ltabhdsw
- X{ dup dup dup dup
- X 0 0 moveto xsize 0 lineto
- X xsize exch -3 mul moveto
- X -3 mul exch -3 mul lineto
- X -3 mul 0 lineto
- X setlinewidth 0 setlinejoin 2 setlinecap stroke
- X} def
- X
- X% linewidth ltabhdse -
- X% horizontal double line with southeast corner
- X/ltabhdse
- X{ dup dup dup dup
- X 0 0 moveto xsize 0 lineto
- X 0 exch -3 mul moveto
- X 3 mul xsize add exch -3 mul lineto
- X 3 mul xsize add 0 lineto
- X setlinewidth 0 setlinejoin 2 setlinecap stroke
- X} def
- X
- X% linewidth ltabvs -
- X% vertical single line
- X/ltabvs
- X{ 0 0 moveto 0 ysize lineto
- X setlinewidth 0 setlinecap stroke
- X} def
- X
- X% linewidth ltabvd -
- X% vertical double line
- X/ltabvd
- X{ dup dup
- X 0 0 moveto 0 ysize lineto
- X -3 mul 0 moveto -3 mul ysize lineto
- X setlinewidth 0 setlinecap stroke
- X} def
- X
- X% linewidth ltabvdr -
- X% vertical double line to right of mark
- X/ltabvdr
- X{ dup dup
- X 0 0 moveto 0 ysize lineto
- X 3 mul 0 moveto 3 mul ysize lineto
- X setlinewidth 0 setlinecap stroke
- X} def
- X%%EndResource
- END_OF_FILE
- if test 2912 -ne `wc -c <'lout/include/tab_prepend'`; then
- echo shar: \"'lout/include/tab_prepend'\" unpacked with wrong size!
- fi
- # end of 'lout/include/tab_prepend'
- fi
- if test -f 'lout/man/lout.1' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'lout/man/lout.1'\"
- else
- echo shar: Extracting \"'lout/man/lout.1'\" \(2954 characters\)
- sed "s/^X//" >'lout/man/lout.1' <<'END_OF_FILE'
- X.TH LOUT 1
- X.SH NAME
- Xlout - prepare Lout document for printing
- X.SH SYNOPSIS
- Xlout [ -i<filename> ] files
- X.SH DESCRIPTION
- XInvoke the Basser Lout interpreter on the concatenation of the named
- Xfiles, producing a PostScript file on standard output suitable for
- Xprinting on PostScript printers using lpr(1). If no files are named,
- Xstdin is used instead. The special file name - may be used to denote
- Xstandard input.
- X.SH OPTIONS
- X.TP 16
- X-i<filename>
- XSearch the directories of the include file path (see below) for
- X<filename> and include it. There may be multiple -i options.
- X.TP
- X-s
- XSuppress all reading and writing of the cross reference database;
- Xother databases are not affected. Useful when many simple documents that
- Xdon't do any cross referencing are stored in one directory.
- X.TP
- X-e<filename>
- XDirect error messages to <filename> instead of to stderr.
- X.TP
- X-o<filename>
- XDirect PostScript output to <filename> instead of to stdout.
- X.TP
- X-I<dirname>
- XAdd <dirname> to the list of directories searched for @Include files
- Xand -i option files. There may be multiple -I options. @Include first
- Xsearches the current directory, then searches the -I directories in the
- Xorder given, and finally searches the default include file directory
- X(see below). @SysInclude and the -i option omit the search of the
- Xcurrent directory.
- X.TP
- X-F<dirname>
- XAdd <dirname> to the list of directories searched for font (.AFM) files.
- XThere may be multiple -F options; the directories are searched in the
- Xorder given, and finally the default font file directory is searched
- X(see below).
- X.TP
- X-D<dirname>
- XAdd <dirname> to the list of directories searched for Lout database
- Xfiles. There may be multiple -D options. @Database searches the
- Xcurrent directory, then the -D directories in the order given, and
- Xfinally searches the default database file directory (see below).
- X@SysDatabase omits the search of the current directory.
- X.TP
- X-V
- XPrint version information on stderr.
- X.TP
- X-EPS
- XProduce output in the form of an EPS (Encapsulated PostScript) file,
- Xsuitable for inclusion in another document.
- X.SH LIMITS
- X.nf
- XAt most 255 input files (no limit on @IncludeGraphic files)
- XAt most 255 characters per input line
- XAt most 100 fonts (each different size counts as one font)
- XAt most 5 deep nesting of @Include files
- X.SH FILES
- X.nf
- X<BINDIR>/lout - Binary file
- X<LIBDIR>/include - Default include file dir.
- X<LIBDIR>/data - Default standard databases dir.
- X<LIBDIR>/font - Default font metrics files dir.
- X<DOCDIR> - Directory containing Lout documentation
- X.fi
- X.SH SEE ALSO
- X.P
- Xlpr(1), ghostview(1)
- X.SH REFERENCES
- X.P
- XFor a description of the Lout document formatting system,
- Xsee Jeffrey H. Kingston, "Document Formatting with Lout",
- XTech. Rep. 449, Basser Dept. of Computer Science, The
- XUniversity of Sydney 2006, Australia (December 1992).
- XSee Adobe Systems Inc., "PostScript Language Reference Manual
- X(Second Edition)", Addison-Wesley, 1990, for PostScript.
- X.SH AUTHOR
- X.P
- XJeffrey H. Kingston
- END_OF_FILE
- if test 2954 -ne `wc -c <'lout/man/lout.1'`; then
- echo shar: \"'lout/man/lout.1'\" unpacked with wrong size!
- fi
- # end of 'lout/man/lout.1'
- fi
- echo shar: End of archive 28 \(of 30\).
- cp /dev/null ark28isdone
- MISSING=""
- 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
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
- done
- if test "${MISSING}" = "" ; then
- echo You have unpacked all 30 archives.
- rm -f ark[1-9]isdone ark[1-9][0-9]isdone
- else
- echo You still must unpack the following archives:
- echo " " ${MISSING}
- fi
- exit 0
- exit 0 # Just in case...
-