home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-08-11 | 73.7 KB | 1,931 lines |
- Newsgroups: comp.sources.misc
- From: jeff@joyce.cs.su.oz.au (Jeff Kingston)
- Subject: v38i096: lout - Lout document formatting system, v2.05, Part28/35
- Message-ID: <1993Aug10.132206.18785@sparky.sterling.com>
- X-Md4-Signature: fd1a7f87733ff0c261b01a1b047bb771
- Sender: kent@sparky.sterling.com (Kent Landfield)
- Organization: Sterling Software
- Date: Tue, 10 Aug 1993 13:22:06 GMT
- Approved: kent@sparky.sterling.com
-
- Submitted-by: jeff@joyce.cs.su.oz.au (Jeff Kingston)
- Posting-number: Volume 38, Issue 96
- Archive-name: lout/part28
- Environment: UNIX
- Supersedes: lout: Volume 37, Issue 99-128
-
- #! /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: doc/tr.fig/s5 doc/tr.lout/ch1.04 doc/tr.lout/ch2.06
- # doc/tr.lout/ch4.03 doc/tr.lout/ch4.04 font/Symbo.AFM z27.c
- # Wrapped by kent@sparky on Sun Aug 8 12:29:32 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 35)."'
- if test -f 'doc/tr.fig/s5' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'doc/tr.fig/s5'\"
- else
- echo shar: Extracting \"'doc/tr.fig/s5'\" \(9154 characters\)
- sed "s/^X//" >'doc/tr.fig/s5' <<'END_OF_FILE'
- X@Section
- X @Title { Lengths, angles, and points }
- X@Begin
- X@PP
- XWe already know that two lengths placed side by side define a point. This is
- Xonly the simplest of a number of such geometrical combinations.
- X@PP
- XThe symbol @Code "@Distance" returns the length of the line joining two
- Xpoints:
- X@ID @Code "{0 0} @Distance {3 cm 4 cm}"
- Xis equivalent to the length {@Code "5 cm"}. The result of @Code "@Distance"
- Xis never negative. Notice that braces must enclose the two points. The
- Xsymbol @Code "@XDistance" returns the distance in the @Eq { x } direction
- Xfrom one point to another:
- X@ID {
- X@Code "{" & @Eq { x sub 1 ``` y sub 1 } & @Code "} @XDistance {"
- X& @Eq { x sub 2 ``` y sub 2 } & @Code "}"
- X}
- Xhas for its result the length @Eq { x sub 2 - x sub 1 }, and so may be
- Xnegative. There is an analogous @Code "@YDistance" symbol.
- X@PP
- XThe symbol @Code "@Angle" returns the angle @Eq {theta} from one point to
- Xanother:
- X@ID {
- X@Code "{" & @Eq { x sub 1 ``` y sub 1 } & @Code "} @Angle {"
- X& @Eq { x sub 2 ``` y sub 2 } & @Code "}"
- X||7ct
- X@Fig {
- X@Figure
- X arrow { forward }
- X shape { 4 cm 0 0 0 4 cm 3 cm }
- X{ 4c @Wide 3c @High }
- X// {4 cm 3 cm} ** 0.4 ++ { 0.5 cm 0 } @MarkOf @Eq { (x sub 1 & , y sub 1 & ) }
- X// {4 cm 3 cm} ** 0.4 @BaseOf @Circle margin { 0.05c } paint { black } {}
- X// {4 cm 3 cm} ** 0.8 ++ { 0.5 cm 0 } @MarkOf @Eq { (x sub 2 & , y sub 2 & ) }
- X// {4 cm 3 cm} ** 0.8 @BaseOf @Circle margin { 0.05c } paint { black } {}
- X// { 1 cm 0.2 cm } ** 0.7 @BaseOf @Eq { theta }
- X}
- X}
- XThe result will be 0 if the two points are equal. The symbol @Code "<<"
- Xreturns the point at a given distance and angle from @Eq { (0, 0) }:
- X@ID {
- X@Code "{" & @Eq { length } @Code "<<" @Eq { theta } & @Code "}"
- X||7ct
- X@Fig {
- X@Figure
- X arrow { forward }
- X shape { 4 cm 0 0 0 4 cm 3 cm }
- X{ 4c @Wide 3c @High }
- X// {4 cm 3 cm} ** 0.5 -- {1.5 cm 0} @BaseOf @I length
- X// {4 cm 3 cm} ** 0.8 @BaseOf @Circle margin { 0.05c } paint { black } {}
- X// { 1 cm 0.2 cm } ** 0.7 @BaseOf @Eq { theta }
- X}
- X}
- XFor example, @Code "{ 5 cm << 45 dg }" is the point 5 cm
- Xfrom @Eq { (0, 0) } at 45 degrees.
- X@PP
- XPoints may be added, subtracted, and multiplied by a number:
- X@ID @Tab
- X vmargin { 0.5vx }
- X @Fmta { @Col A ! @Col is ! @Col B }
- X{
- X@Rowa
- X A { @Code "{" & @Eq {x sub 1 ``` y sub 1} & @Code "} ++ {" &
- X@Eq {x sub 2 ``` y sub 2} & @Code "}" }
- X B { @Eq { (x sub 1 + x sub 2 & , y sub 1 + y sub 2 & ) } }
- X@Rowa
- X A { @Code "{" & @Eq {x sub 1 ``` y sub 1} & @Code "} -- {" &
- X@Eq {x sub 2 ``` y sub 2} & @Code "}" }
- X B { @Eq { (x sub 1 - x sub 2 & , y sub 1 - y sub 2 & ) } }
- X@Rowa
- X A { @Code "{" & @Eq {x sub 1 ``` y sub 1} & @Code "} ** " & @Eq {k} }
- X B { @Eq { (x sub 1 & k, y sub 1 & k) } }
- X}
- XFor example,
- X@ID {
- X@Code "{" & @Eq {x sub 1 ``` y sub 1} & @Code "} ** 0.2 ++ " &
- X@Code "{" & @Eq {x sub 2 ``` y sub 2} & @Code "} ** 0.8"
- X}
- Xis the point eight tenths of the way from
- X@Eq { (x sub 1 & , y sub 1 & ) } to
- X@Eq { (x sub 2 & , y sub 2 & ) } on the line joining them:
- X@LP
- X@ID @Fig {
- X@Figure
- X shape {
- X {xsize 0} ** 0.3 ++ {0 ysize} @Label P1
- X {xsize 0} ++ {0 ysize} ** 0.4 @Label P2
- X P1 ** 0.2 @Label FP1
- X P2 ** 0.8 @Label FP2
- X 0 0 P1 P2 0 0 [] FP1 FP1 ++ FP2 FP2
- X }
- X{ 6c @High 9c @Wide }
- X// P1 ++ {0.3 cm 0} @BaseOf @Eq { (x sub 1 & , y sub 1 & ) }
- X// P2 ++ {0.3 cm 0} @BaseOf @Eq { (x sub 2 & , y sub 2 & ) }
- X// FP1 ++ FP2 ++ {0.3 cm 0} @BaseOf
- X@Eq { (0.2x sub 1 & + 0.8x sub 2 & , 0.2y sub 1 & + 0.8y sub 2 & ) }
- X}
- XWhen using {@Code "**"}, the point must be on the left and the number on
- Xthe right. It would be more convenient to name these symbols
- X{@Code "+"}, {@Code "-"}, and {@Code "*"}, but these names
- Xare often taken by equation formatters, and @Code "-" appears in
- Xlengths, so we don't. There are @Code "@Max" and @Code "@Min" symbols:
- X@ID @Tab
- X vmargin { 0.5vx }
- X @Fmta { @Col A ! @Col is ! @Col B }
- X{
- X@Rowa
- X A { @Code "{" & @Eq {x sub 1 ``` y sub 1} & @Code "} @Max {" &
- X@Eq {x sub 2 ``` y sub 2} & @Code "}" }
- X B { @Eq { (max(x sub 1 & , x sub 2 & ), max(y sub 1 & , y sub 2 & )) } }
- X@Rowa
- X A { @Code "{" & @Eq {x sub 1 ``` y sub 1} & @Code "} @Min {" &
- X@Eq {x sub 2 ``` y sub 2} & @Code "}" }
- X B { @Eq { (min(x sub 1 & , x sub 2 & ), min(y sub 1 & , y sub 2 & )) } }
- X}
- XNote carefully that these apply to points, not to numbers.
- X@PP
- XThe result of adding two points together depends on where the origin is
- Xat the time, as well as on the points themselves. This can lead to
- Xunexpected results, as the author has found to his cost more than
- Xonce. Within the @Code shape option of {@Code "@Figure"}, the origin is
- Xthe lower left corner of the result of the {@Code "@Figure"}. In cases
- Xlike the example on page {@PageOf sumpoints}, where points are added
- Xoutside of any {@Code "@Figure"} symbol, the origin is usually at the
- Xbottom left corner of the figure as a whole. A label always denotes a
- Xparticular point on the printed page, regardless of where the origin
- Xhappens to be.
- X@PP
- XThe symbol @Code "@Prev" within the @Code "shape" option of @Code
- X"@Figure" denotes the previous point of the shape, ignoring points within
- X{@Code {"[" &0.5s "]"}}. This makes it easy to specify each point
- Xrelative to the previous one:
- X@ID {
- X@Code {
- X" shape {"
- X" 0 0"
- X" { 2 cm << 30 }"
- X" @Prev ++ { 2 cm << 90 }"
- X" @Prev ++ { 2 cm << 150 }"
- X" @Prev ++ { 2 cm << 210 }"
- X" @Prev ++ { 2 cm << 270 }"
- X" 0 0"
- X" }"
- X}
- X||7ct
- X@Fig { ||2.5c
- X@Figure
- X shape {
- X 0 0
- X { 2 cm << 30 }
- X @Prev ++ { 2 cm << 90 }
- X @Prev ++ { 2 cm << 150 }
- X @Prev ++ { 2 cm << 210 }
- X @Prev ++ { 2 cm << 270 }
- X 0 0
- X }
- X{ 4c @Wide 4c @High }
- X}
- X}
- X@PP
- XFig provides a @Code "@Label" symbol for attaching a label to a point in
- Xa shape, like this:
- X@ID @Code "{xsize ysize} ** 0.5 @Label CTR"
- XThe point may then be referred to more concisely by its label,
- X{@Code CTR}. For example, the large arrow appearing in Section 2 was
- Xbuilt like this:
- X@ID {
- X@Code {
- X"@Figure"
- X" shape {"
- X" {0 ysize} ** 0.4 @Label SB"
- X" {0 ysize} ** 0.6 @Label ST"
- X" {xsize 0} ** 0.7 @Label HB"
- X" SB"
- X" SB ++ HB"
- X" HB"
- X" {xsize 0} ++ {0 ysize} ** 0.5"
- X" HB ++ {0 ysize}"
- X" HB ++ ST"
- X" ST"
- X" SB"
- X" }"
- X" paint { grey }"
- X"{ 6c @Wide 2c @High }"
- X}
- X||7ct
- X@Fig {
- X@Figure
- X shape {
- X {0 ysize} ** 0.4 @Label SB
- X {0 ysize} ** 0.6 @Label ST
- X {xsize 0} ** 0.7 @Label HB
- X SB
- X SB ++ HB
- X HB
- X {xsize 0} ++ {0 ysize} ** 0.5
- X HB ++ {0 ysize}
- X HB ++ ST
- X ST
- X SB
- X }
- X paint { grey }
- X{ 6c @Wide 2c @High }
- X// @ShowLabels
- X}
- X}
- XIncidentally, the labels of a figure can be displayed as above by putting
- Xthe symbol @Code "@ShowLabels" at the end of the figure. Labels can
- Xsave a lot of effort. They should contain only digits, upper-case
- Xletters and {@Code "@"}, because Fig and Lout use labels of their own
- Xmade from lower-case letters.
- X@PP
- XThe standard shapes have standard labels; for example, the labels
- Xof @Code "@Ellipse" are
- X@LP
- X@ID {
- X@Code {
- X"@Ellipse"
- X"{ 3c @Wide 2c @High }"
- X}
- X||7ct
- X@Fig {
- X@Ellipse { 3c @Wide 2c @High }
- X// @ShowLabels
- X}
- X}
- XThere is a symbol, {@Code "::"}, for @I relabelling an object.
- XEach label in the right parameter is relabelled in the following way:
- X@LP
- X@ID {
- X@Code {
- X"E1:: @Ellipse"
- X"{ 3c @Wide 2c @High }"
- X}
- X||7ct
- X@Fig {
- XE1:: @Ellipse { 3c @Wide 2c @High }
- X// @ShowLabels
- X}
- X}
- XWithin the right parameter of @Code "::" the original names hold sway;
- Xbut afterwards the names are changed by prefixing the label
- Xand @Code "@" to them. These composite labels may be used exactly like
- Xother labels. Relabelling can be nested to arbitrary depth:
- X@LP
- X@ID {
- X5c @Wide @Code {
- X"A::"
- X"{ 1:: @Ellipse"
- X" { 3c @Wide 2c @High }"
- X" //1c"
- X" 2:: @Box"
- X" { 3c @Wide 2c @High }"
- X"}"
- X}
- X||7ct
- X@Fig {
- XA::
- X{ 1:: @Ellipse { 3c @Wide 2c @High }
- X //1c
- X 2:: @Box { 3c @Wide 2c @High }
- X}
- X// @ShowLabels
- X}
- X}
- XThe right parameter of @Code "::" may be any object.
- X@PP
- XThe six standard shapes ({@Code "@Box"}, {@Code "@Square"},
- X{@Code "@Diamond"}, {@Code "@Polygon"}, {@Code "@Ellipse"}, and
- X{@Code "@Circle"}) have a special @Code CIRCUM label, not displayed by
- X{@Code "@ShowLabels"}. The expression
- X@ID {
- X@Eq { "angle" } @Code CIRCUM
- X}
- Xyields the point on the boundary of the shape at the given angle from
- Xthe centre, in a coord&-inate system with the centre for origin. Thus,
- Xgiven a labelled standard shape such as
- X@ID @Code "A :: @Ellipse ..."
- Xthe point on its boundary at an angle of 45 degrees from the centre is
- X@ID @Code "A@CTR ++ {45 A@CIRCUM}"
- XThe braces must be present. Regrettably, there is no way to produce a
- X@Code CIRCUM label for shapes defined by the user in any reasonable time.
- X@PP
- XIf the same label is used twice, as is inevitable with unlabelled standard
- Xshapes, only the most recent value is remembered. There is a limit on the
- Xmaximum number of distinct labels in any one figure, which
- Xcan be changed by means of an option to the @Code "@Fig" symbol:
- X@ID @Code {
- X"@Fig"
- X" maxlabels { 500 }"
- X"{ ... }"
- X}
- XThe default value is 200. Large values could cause the printing device
- Xto run out of memory. Memory is reclaimed at the end of each figure.
- X@End @Section
- END_OF_FILE
- if test 9154 -ne `wc -c <'doc/tr.fig/s5'`; then
- echo shar: \"'doc/tr.fig/s5'\" unpacked with wrong size!
- fi
- # end of 'doc/tr.fig/s5'
- fi
- if test -f 'doc/tr.lout/ch1.04' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'doc/tr.lout/ch1.04'\"
- else
- echo shar: Extracting \"'doc/tr.lout/ch1.04'\" \(10331 characters\)
- sed "s/^X//" >'doc/tr.lout/ch1.04' <<'END_OF_FILE'
- X@Section
- X @Title { Galleys }
- X @Tag { galleys }
- X@Begin
- X@PP
- XIt is time to pause and ask ourselves how close we are to achieving our
- Xaim of producing neatly formatted documents. We can certainly produce
- Xthe pieces of a document, using the page layout definitions from Section
- X{@NumberOf definitions}:
- X@ID {
- X
- Xnohyphen @Break @LittlePageColumn {
- X@DP
- X|0.5rt {@B PURCELL}{ 0.8f @Font 1 ^//0.2v}
- X@DP
- XIn the world of music England is supposed to be a mere province. If she
- Xproduces an indifferent composer or performer, that is regarded
- Xelsewhere as perfectly normal and natural; but if foreign students of
- Xmusical history have to acknowledge a British musical genius, he is
- Xconsidered a freak.
- X@PP
- XSuch a freak is Henry Purcell. Yet if we make a choice of fifteen of
- Xthe world's musical classics, as here, we find that we cannot omit this
- XEnglish master.
- X}
- X
- X||1c
- X
- X@LittlePageColumn
- X{ { 0.8f @Font 1 ^//0.2v}Blom, Eric. @I {Some Great Composers.} Oxford, 1944.
- X}
- X
- X||1c
- X
- X@Code {
- X @LittlePage { "@TextPlace" //1rt "@FootSect" }
- X// @LittlePage { "@TextPlace" //1rt "@FootSect" }
- X// @LittlePage { "@TextPlace" //1rt "@FootSect" }
- X//0.2c 8p @Font "@PageList"
- X}
- X
- X}
- Xbut when we try to merge them together, we encounter two obstacles.
- X@PP
- XFirst, when an object is entered at a certain place in the document, it
- Xappears at that place. But a footnote is naturally entered immediately
- Xafter the point it refers to (`{-2p @Font PURCELL}' in this case), yet it
- Xappears somewhere else: at the bottom of a page.
- X@PP
- XSecond, all our features build up larger objects out of smaller ones,
- Xbut the -2p @Font PURCELL object, for example, must be broken down into
- Xpage-sized pieces. This occurs when the available space at the
- X`somewhere else' is insufficient to hold the entire object, so this
- Xsecond obstacle arises out of the first.
- X@PP
- XLout's last major feature, which we introduce to overcome these
- Xobstacles, is the @I galley
- Xgalley.feature @Index { Galleys }
- X(the name is borrowed from the galleys
- Xused in manual typesetting). A galley is an object plus a cross
- Xreference which points to where the object is to appear. The example
- Xabove has three galleys:
- X@ID {
- X
- X{
- X//0.1c
- X
- Xnohyphen @Break @LittlePageColumn {
- X@DP
- X|0.5rt {@B PURCELL}{ 0.8f @Font 1 ^//0.2v}
- X@DP
- XIn the world of music England is supposed to be a mere province. If she
- Xproduces an indifferent composer or performer, that is regarded
- Xelsewhere as perfectly normal and natural; but if foreign students of
- Xmusical history have to acknowledge a British musical genius, he is
- Xconsidered a freak.
- X@PP
- XSuch a freak is Henry Purcell. Yet if we make a choice of fifteen of
- Xthe world's musical classics, as here, we find that we cannot omit this
- XEnglish master.
- X} { //0.4c 180d @Rotate @Arrow 2.0c }
- X
- X}
- X
- X||0io ||4.8c
- X
- X@Code {
- X @LittlePage { "@TextPlace" //1rt "@FootSect" }
- X// @LittlePage { "@TextPlace" //1rt "@FootSect" }
- X// @LittlePage { "@TextPlace" //1rt "@FootSect" }
- X//0.2c 8p @Font "@PageList"
- X} 180d @Rotate @Arrow 1i @I -2p @Font {to printer}
- X
- X||0io ||2.0c
- X{
- X//3.9c
- X
- X{ @Arrow 1.7c } nohyphen @Break @LittlePageColumn
- X{ { 0.8f @Font 1 ^//0.2v}Blom, Eric. @I {Some Great Composers.} Oxford, 1944.
- X}
- X}
- X}
- XA galley replaces the invocation pointed to by its cross reference. If
- Xspace is not sufficient there to hold it all, the remainder of the
- Xgalley is split off (the vertical concatenation symbol preceding it
- Xbeing discarded) and it replaces later invocations of the same symbol.
- XThis is exactly what is required to get text and footnotes onto pages.
- X@PP
- XTo create a galley, first define a symbol with a
- Xspecial @Code into
- Xinto @Index { @Code into clause }
- Xclause, like this:
- X@ID @Code {
- X"def @FootNote into { @FootPlace&&following }"
- X" right x"
- X"{"
- X" 8p @Font x"
- X"}"
- X}
- XAn invocation of such a symbol will then be a galley whose object is the
- Xresult of the invocation, and whose cross reference is given by the
- X@Code into clause. The right parameter of the cross reference must be
- Xeither @Code preceding or @Code following.
- X@PP
- XA symbol, like @Code "@FootPlace", which is the @I target of a galley,
- Xtarget @Index { Target of a galley }
- Xmust contain the special symbol @@Galley exactly once in its body; often
- Xthis is all that the body contains:
- X@ID @Code {
- X"def @FootPlace { @Galley }"
- X}
- XIt is this special symbol that is replaced by the incoming galley, in
- Xfact, not the @Code "@FootPlace" symbol as a whole.
- X@PP
- XA symbol which contains @@Galley, either directly within its body or
- Xindirectly within the body of a symbol it invokes, is called a @I receptive
- Xreceptive @Index { Receptive symbol }
- Xsymbol, meaning receptive to galleys. @Code "@FootPlace" is receptive, which
- Xmakes @Code "@FootList", @Code "@FootSect" and @Code "@PageList"
- Xreceptive since they invoke @Code "@FootPlace". If no galley replaces
- Xany @@Galley within some invocation of a receptive symbol, that
- Xinvocation is replaced by @@Null. The advantages of this rule for page
- Xlayout were explained at the end of Section {@NumberOf definitions}.
- X@PP
- XLet us now follow through the construction of our example
- Xdocument. Initially there is just the one @I root
- Xroot.galley @Index { Root galley }
- Xgalley, containing an unexpanded invocation of @Code "@PageList":
- X@ID { ||5c
- X10p @Font @Code "@PageList" 180d @Rotate @Arrow 1i @I -2p @Font {to printer}
- X}
- XThen the -2p @Font PURCELL galley appears, targeted to a @Code
- X"@TextPlace". Lout knows that there is a @Code "@TextPlace" hidden
- Xinside @Code "@PageList", so it expands @Code "@PageList":
- X@ID {
- X
- X{
- X//0.1c
- X
- Xnohyphen @Break @LittlePageColumn {
- X@DP
- X|0.5rt {@B PURCELL}{ 0.8f @Font 1 ^//0.2v}
- X@DP
- XIn the world of music England is supposed to be a mere province. If she
- Xproduces an indifferent composer or performer, that is regarded
- Xelsewhere as perfectly normal and natural; but if foreign students of
- Xmusical history have to acknowledge a British musical genius, he is
- Xconsidered a freak.
- X@PP
- XSuch a freak is Henry Purcell. Yet if we make a choice of fifteen of
- Xthe world's musical classics, as here, we find that we cannot omit this
- XEnglish master.
- X} { //0.4c 180d @Rotate @Arrow 2.2c }
- X}
- X
- X||0io ||5c
- X
- X@Code {
- X @LittlePage { "@TextPlace" //1rt "@FootSect" }
- X//0.2c 8p @Font "@PageList"
- X} 180d @Rotate @Arrow 1i @I -2p @Font {to printer}
- X
- X}
- XAfter promoting the first line into @Code "@TextPlace", the footnote
- Xgalley attached to it appears and demands an invocation of
- X@Code "@FootPlace" following its attachment point
- X(`{-2p @Font PURCELL}'). Such a @Code "@FootPlace" is found at
- Xthe bottom of the first page, inside @Code "@FootSect", which is
- Xaccordingly expanded, and the footnote is promoted onto the page:
- X@ID {
- X
- X{
- X//1.2c
- X
- Xnohyphen @Break @LittlePageColumn {
- XIn the world of music England is supposed to be a mere province. If she
- Xproduces an indifferent composer or performer, that is regarded
- Xelsewhere as perfectly normal and natural; but if foreign
- Xstudents of musical history have to acknowledge a British musical genius,
- Xhe is considered a freak.
- X@PP
- XSuch a freak is Henry Purcell. Yet if we make a choice of fifteen of
- Xthe world's musical classics, as here, we find that we cannot omit this
- XEnglish master.
- X} 180d @Rotate @Arrow 2.2c
- X}
- X
- X||0io ||5c
- X
- X{
- Xnohyphen @Break @LittleDocument
- X//
- X@LittleText {
- X@DP
- X|0.5rt {@B PURCELL}{ 0.8f @Font 1 ^//0.2v}
- X@LittleFootNote
- X{ { 0.8f @Font 1 ^//0.2v}Blom, Eric. @I {Some Great Composers.} Oxford, 1944.
- X//1vx @Code "@FootList"
- X}
- X//1vx @Code "@TextPlace" }
- X//
- X@LittleEndRun
- X//0.2c 8p @Font @Code "@PageList"
- X} 180d @Rotate @Arrow 1i -2p @Font @I {to printer}
- X
- X}
- XNow the promotion of the -2p @Font PURCELL galley resumes. When the
- Xfirst page is filled, Lout searches forwards for another @Code "@TextPlace"
- Xto receive the remainder, once again expanding a @Code "@PageList":
- X@ID {
- X
- X{
- X//4.85c
- X
- Xnohyphen @Break @LittlePageColumn {
- Xperformer, that is regarded
- Xelsewhere as perfectly normal and natural; but if foreign
- Xstudents of musical history have to acknowledge a British musical genius,
- Xhe is considered a freak.
- X@PP
- XSuch a freak is Henry Purcell. Yet if we make a choice of fifteen of
- Xthe world's musical classics, as here, we find that we cannot omit this
- XEnglish master.
- X} 180d @Rotate @Arrow 2.2c
- X}
- X
- X||0io ||5c
- X
- X{
- Xnohyphen @Break @LittleDocument
- X//
- X@LittleText {
- X@DP
- X|0.5rt {@B PURCELL}{ 0.8f @Font 1 ^//0.2v}
- X@LittleFootNote
- X{ { 0.8f @Font 1 ^//0.2v}Blom, Eric. @I {Some Great Composers.} Oxford, 1944.
- X}
- X@DP
- X @HExpand {In the world of music}
- X//1vx @HExpand {England is supposed to}
- X//1vx @HExpand {be a mere province. If}
- X//1vx @HExpand {she produces an indifferent composer or}
- X}
- X//
- X@LittleEndRun
- X// @LittlePage { @Code "@TextPlace" //1rt @Code "@FootSect" }
- X//0.2c 8p @Font @Code "@PageList"
- X} 180d @Rotate @Arrow 1i -2p @Font @I {to printer}
- X
- X}
- Xand so on until the entire galley is promoted. All these expansions and
- Xreplacements are done with total
- Xintegrity. For example, if Lout finds after expanding @Code "@FootSect"
- Xthat the page is too full to accept even the first line of the footnote,
- X@Code "@FootSect" is reset to unexpanded and the search for a target for
- Xthe footnote moves on. And the cross reference direction, @Code
- Xpreceding or @Code following, is always obeyed (although lack of space
- Xsometimes prevents Lout from choosing the nearest target). Only the
- Xroot galley contains receptive symbols in our running example, but in
- Xfact any galley may contain them, without restriction.
- X@PP
- XWhen footnotes are placed at the bottom of a page, they appear there in
- Xfirst come, first served order. To make galleys appear in sorted order, as
- Xsorted.galley @Index { Sorted galleys }
- Xis needed in bibliographies and indexes, a parameter or nested definition
- Xwith the special name @@Key
- Xkey. @Index { @@Key parameter }
- Xis added to the galley definition, like this:
- X@ID @Code {
- X"def @IndexEntry into { @IndexPlace&&following }"
- X" left @Key"
- X" right x"
- X"{ x }"
- X}
- XLike @@Tag, @@Key must be set to a simple word when the galley is invoked:
- X@ID @Code {
- X"cities @IndexEntry { cities, comparison of, 27 }"
- X}
- Xand this key is used to sort the galleys. If several sorted galleys
- Xwith the same key are sent to the same place, only one of them is
- Xprinted, since the others are probably unwanted duplicates.
- X@PP
- XThe discussion of galleys is continued at a more detailed level in
- XSection {@NumberOf targets}.
- X@End @Section
- END_OF_FILE
- if test 10331 -ne `wc -c <'doc/tr.lout/ch1.04'`; then
- echo shar: \"'doc/tr.lout/ch1.04'\" unpacked with wrong size!
- fi
- # end of 'doc/tr.lout/ch1.04'
- fi
- if test -f 'doc/tr.lout/ch2.06' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'doc/tr.lout/ch2.06'\"
- else
- echo shar: Extracting \"'doc/tr.lout/ch2.06'\" \(9965 characters\)
- sed "s/^X//" >'doc/tr.lout/ch2.06' <<'END_OF_FILE'
- X@Section
- X @Title { Galleys and targets }
- X @Tag { targets }
- X@Begin
- X@PP
- XThe behaviour of galleys and their targets, as described in Section
- Xgalley.feature.in.detail @SubIndex { in detail }
- Xtargets.in.detail @SubIndex { in detail }
- X{@NumberOf galleys}, can be summarized in three laws:
- X@DP
- X{@I {First Law}}: The first target is the closest invocation of the
- Xtarget symbol, either preceding or following the invocation point of the
- Xgalley as required, which has sufficient space to receive the first
- Xcomponent;
- X@DP
- X{@I {Second Law}}: Each subsequent target is the closest invocation of
- Xthe target symbol, following the previous target and lying within the same
- Xgalley, which has sufficient space to receive the first remaining component;
- X@DP
- X{@I {Third Law}}: A receptive symbol that does not receive at least one
- Xcomponent of any galley is replaced by @@Null.
- X@DP
- XThe terms `closest,' `preceding,' and `following' refer to position in
- Xthe final printed document. This section explains the operation of
- Xthese laws in Basser Lout.
- X@PP
- XWhen a galley cannot be fitted into just one target, Lout must find
- Xpoints in the galley where it can be split in two. The object lying
- Xbetween two neighbouring potential split points is called a @I component
- Xcomponent @Index { Components of a galley }
- Xof the galley. By definition, a component cannot be split.
- X@PP
- XTo determine the components of a galley, expand all symbols other than
- Xrecursive and receptive ones, discard all @@Font, @@Break, and @@Space
- Xsymbols, perform paragraph breaking as required, and discard all
- Xredundant braces. Then view the galley as a sequence of one or more
- Xobjects separated by vertical concatenation symbols; these are the
- Xcomponents and split points. For example, given the definition
- X@ID @Code {
- X"def @Section into { @SectionPlace&&preceding }"
- X" named @Title {}"
- X" right @Body"
- X"{"
- X" 15p @Font { @Title //0.7f }"
- X" //"
- X" @Body"
- X"}"
- X}
- Xthe galley
- X@ID @Code {
- X"@Section"
- X" @Title { Introduction }"
- X"{ This is a subject that really"
- X"needs no introduction. }"
- X}
- Xbecomes
- X@ID @Code {
- X"Introduction"
- X"//0.7f"
- X"{}"
- X"//"
- X"This is a subject that really needs"
- X"//1vx"
- X"no introduction."
- X}
- Xwith four components. If @Code "@Body" was preceded by @Code "|1.0c" in
- Xthe definition, the result would be
- X@ID @Code {
- X"Introduction"
- X"//0.7f"
- X"{}"
- X"//"
- X"|1.0c { This is a subject that really needs //1vx no introduction. }"
- X}
- Xand now @Code "//1vx" is buried within one component and is not a
- Xpotential split point. In fact, in this case the broken paragraph as
- Xa whole is enclosed in @@OneRow. This highlights a deficiency of
- XBasser Lout: an indented paragraph cannot be split.
- X@PP
- XThe lines of a paragraph become separate components if the paragraph
- Xoccupies an entire component before breaking; otherwise they are
- Xenclosed in a @@OneRow symbol within one component. The same is true of
- Xincoming components of other galleys. If a @@Galley symbol occupies an
- Xentire component by the rules above, then the incoming components that
- Xreplace it become components of their new home:
- X@ID @Tab
- X @Fmta { @Col @Code A ! @Col lines @Break B ! @Col @Code C }
- X{
- X@Rowa
- X A {
- X"An example"
- X"//0.5c"
- X"@Galley"
- X"//0.5c"
- X"@SomethingList"
- X}
- X B {
- X""
- X@Eq { ==> }
- X}
- X C {
- X"An example"
- X"//0.5c"
- X"Incoming components"
- X"//0.2c"
- X"from some other galley"
- X"//0.5c"
- X"@SomethingList"
- X}
- X}
- XOtherwise the incoming components are grouped within a @@OneRow symbol
- Xand lie within one component.
- X@PP
- XThis distinction has a marked effect on the vertical concatenation
- Xb.unit.use @SubIndex { use in @Code "//1.1b" }
- Xsymbol {@Code "//1.1b"}, which calls for more space than is available
- X(Section {@NumberOf concatenation}). There is no room for this symbol
- Xwithin any component, so it will force a split and be discarded in that
- Xcase. But it can be promoted to between two components.
- X@PP
- XComponents may be separated by @Code "/" as well as by {@Code "//"},
- Xgiving rise to column mark alignment between adjacent components:
- X@ID @ShowVMark {
- X@HContract @GreyBox { 1c @Wide ^| 1c @Wide 0.6c @High }
- X/0.3c
- X@HContract @GreyBox { 2c @Wide 0.6c @High }
- X/0.3c
- X@HContract @GreyBox { 0.5c @Wide ^| 0.8c @Wide 0.6c @High }
- X}
- XWhen aligned components are promoted into different targets, the meaning
- Xof alignment becomes very doubtful. For example, what if the targets
- Xmark.alignment.in.detail @SubIndex { in detail }
- Xare in different columns of one page, or what if one lies within
- X{@Code "90d @Rotate"}?
- X@PP
- XThe truth is that @Code "/" causes all the objects that share a mark to
- Xhave equal width:
- X@ID @ShowVMark {
- X@Box @HContract @GreyBox { 1c @Wide ^| 1c @Wide 0.6c @High }
- X/0.3c
- X@Box @HContract @GreyBox { 2c @Wide 0.6c @High }
- X/0.3c
- X@Box @HContract @GreyBox { 0.5c @Wide ^| 0.8c @Wide 0.6c @High }
- X}
- XThis is a consequence of the `as wide as possible' rule (Section
- X{@NumberOf size}). Mark alignment occurs {@I incidentally}, whenever
- Xthe fragments are placed into similar contexts.
- X@PP
- XIn this connection we must also consider the special case of a @@Galley
- Xsymbol which shares its column mark with some other object:
- X@ID @Code {
- X"@Galley"
- X"/0.2c"
- X"@SomethingList"
- X}
- X(The @@Galley may or may not occupy an entire component; that doesn't
- Xmatter here.) If incoming components are separated by @Code "//" rather
- Xthan by {@Code "/"}, the meaning is so doubtful that this is forbidden. In
- Xfact, a galley whose components replace such a @@Galley must have a
- Xsingle column mark running its full length; that is, its components must
- Xall share a single column mark. This mark will be merged with the
- Xcolumn mark passing through each @@Galley that these components replace;
- Xall the objects on the resulting merged mark will have equal width.
- X@PP
- XThe root galley, where everything collects immediately prior to output,
- Xroot.galley.in.detail @SubIndex { in detail }
- Xis created automatically, not by a definition. Its target is the output
- Xfile, and its object is the entire input, which typically looks like this:
- X@ID @Code {
- X"@PageList"
- X"//"
- X"@Text {"
- X" Body text of the document ..."
- X"}"
- X}
- Xwhere @Code "@PageList" expands to a sequence of pages containing
- X@Code "@TextPlace" symbols (see Section {@NumberOf definitions}), and
- X@Code "@Text" is a galley:
- X@ID @Code {
- X"def @TextPlace { @Galley }"
- X""
- X"def @Text into { @TextPlace&&preceding }"
- X" right x"
- X"{"
- X" x"
- X"}"
- X}
- XThe spot vacated by a galley -- its invocation point -- becomes a @@Null
- Xobject, so this root galley is effectively @Code "@PageList" alone, as
- Xrequired. The @Code "@Text" galley will find its first target preceding
- Xits invocation point, within {@Code "@PageList"}.
- X@PP
- XPrinting {@PageMark rootg} the root galley on the output file is somewhat problematical,
- Xroot.galley.printing @SubIndex { printing of }
- Xbecause Lout has no way of knowing how large the paper is. Basser Lout
- Xsimply prints one root galley component per page (except it skips
- Xcomponents of height zero), and the user is responsible for ensuring
- Xthat each component is page-sized.
- X@PP
- XBasser Lout will promote a component only after any receptive symbols
- Xcomponents.promotion @SubIndex { promotion of }
- Xpromotion @Index { Promotion of components }
- Xwithin it have been replaced, either by galleys or by @@Null, since
- Xuntil then the component is not complete. A component which shares a
- Xmark with following components is held up until they are all complete,
- Xsince until then their width is uncertain.
- X@PP
- XConsider a page with @Code "@TextPlace" and @Code "@FootSect" receptive
- Xsymbols. The rule just given will prevent the page from being printed
- Xuntil @Code "@TextPlace" is replaced by body text, quite rightly; but
- X@Code "@FootSect" will also prevent its printing, even when there are no
- Xfootnotes.
- X@PP
- XBasser Lout is keen to write out pages as soon as possible, to save memory,
- Xand it cannot afford to wait forever for non-existent footnotes. A variant
- Xof the galley concept, called a {@I {forcing galley}},
- Xforcing.galley @Index { Forcing galley } {@PageMark forcing}
- Xis introduced to solve this problem. A forcing galley is defined like this:
- X@ID @Code {
- X"def @Text force into { @TextPlace&&preceding }"
- X" ..."
- X}
- Xand so on. When such a galley replaces a @@Galley symbol, Lout replaces
- Xevery receptive symbol preceding the @@Galley by @@Null, thus ensuring that
- Xas soon as text enters a page, for example, everything up to and including
- Xthe preceding page can be printed. This does not take care of the very last
- Xpage, but Basser Lout replaces all receptive symbols by @@Null when it realizes
- Xthat its input has all been read, thus allowing the last page to print.
- X@PP
- XA forcing galley causes the Third Law to be applied earlier than
- Xexpected, and this creates two problems. First, the replacement by
- X@@Null may be premature: a galley may turn up later wanting one of the
- Xdefunct targets. Such galleys (entries in tables of contents are
- Xtypical examples) are copied into the cross reference database and read
- Xin during the next run just before their targets are closed, and so they
- Xfind their targets in the end. Care must be taken to ensure that
- Xlarge galleys such as chapters and sections do not have defunct targets,
- Xsince the cost of copying them to and from the database is unacceptably high.
- X@PP
- XA @Code "following" galley may fail to find a first target lying in a
- Xfollowing component of the same galley as its invocation point. This is
- Xa deficiency of Basser Lout, which occurs if the target has not been
- Xread from input at the time the galley tries to find it. A workaround
- Xis to use a @Code "preceding" galley instead, defined like this:
- X@ID @Code {
- X"def @AGalley into { @AGalleyPlace&&preceding }"
- X" right @Body"
- X"{"
- X" //1.1b"
- X" @Body"
- X"}"
- X}
- Xand invoked like this:
- X@ID @Code {
- X"@AGalleyPlace | @AGalley { content of galley }"
- X"//"
- X"..."
- X"@AGalleyPlace"
- X}
- XThe first @Code "@AGalleyPlace" receives only the initial empty object,
- Xsince the @Code "//1.1b" forces a split; and the Second Law puts Basser
- XLout on the right track thereafter.
- X@End @Section
- END_OF_FILE
- if test 9965 -ne `wc -c <'doc/tr.lout/ch2.06'`; then
- echo shar: \"'doc/tr.lout/ch2.06'\" unpacked with wrong size!
- fi
- # end of 'doc/tr.lout/ch2.06'
- fi
- if test -f 'doc/tr.lout/ch4.03' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'doc/tr.lout/ch4.03'\"
- else
- echo shar: Extracting \"'doc/tr.lout/ch4.03'\" \(9416 characters\)
- sed "s/^X//" >'doc/tr.lout/ch4.03' <<'END_OF_FILE'
- X@Section
- X @Title { Page layout }
- X @Tag { pagelayout }
- X@Begin
- X@PP
- XThe page layout
- Xpage.layout.inpractice @SubIndex { in practice }
- Xdocument.layout.page.layout. @SubIndex { page layout }
- Xdefinitions given in Section {@NumberOf definitions},
- Xalthough correct, are very basic. In this section we present the
- Xdefinitions used by the DocumentLayout package for laying out the pages
- Xof books, including running page headers and footers, different formats
- Xfor odd and even pages, and so on. The present document is produced with
- Xthese definitions.
- X@PP
- XWe begin with a few definitions which permit the user to create cross
- Xreferences of the `see page 27' variety which will be kept up to date
- Xautomatically. The user marks the target page by placing
- X@Code {"@PageMark intro"}, for example, at the point of interest, and
- Xrefers to the marked page as @Code "@PageOf intro" elsewhere:
- Xpageof.example @Index { @Code "@PageOf" example }
- X@IndentedList
- X@LI @Code {
- X"export @Tag"
- X"def @PageMarker right @Tag { @Null }"
- X}
- X@LI @Code {
- X"def @PageMark right x"
- X"{"
- X" @PageMarker&&preceding @Tagged x"
- X"}"
- X}
- X@LI @Code {
- X"def @PageOf right x"
- X"{"
- X" @PageMarker&&x @Open { @Tag }"
- X"}"
- X}
- X@EndList
- XWe will see below that an invocation of @Code "@PageMarker" appears before
- Xeach page, with @Code "@Tag" parameter equal to the
- Xpage number. Suppose that {@Code "@PageMark intro"}, which expands to
- X@ID @Code "@PageMarker&&preceding @Tagged intro"
- Xhappens to fall on page 27 of the final printed document (of course, its
- Xvalue is @@Null which makes it invisible). Then the effect of @@Tagged
- Xis to attach @Code "intro" as an extra tag to the first invocation of
- X{@Code "@PageMarker"} preceding that final point, and this must be
- X{@Code "@PageMarker 27"}. Therefore the expression
- X@ID @Code "@PageMarker&&intro @Open { @Tag }"
- Xwill open the invocation {@Code "@PageMarker 27"} and yield the value of
- Xits @Code "@Tag" parameter, 27. Thus, {@Code "@PageOf intro"} appearing
- Xanywhere in the document yields 27.
- X@PP
- XNext we have some little definitions for various parts of the
- Xpage. {@Code "@FullPlace"} will be the target of full-width body text:
- X@ID @Code {
- X"def @FullPlace { @Galley }"
- X}
- X{@Code "@ColPlace"} will be the target of body text within one column:
- X@ID @Code {
- X"def @ColPlace { @Galley }"
- X}
- X{@Code "@TopList"} will be the target of figures and tables:
- X@ID @Code {
- X"export @Tag"
- X"def @TopList right @Tag"
- X"{"
- X" @Galley"
- X" //@TopGap @TopList @Next @Tag"
- X"}"
- X}
- XWe have taken a shortcut here, avoiding an unnecessary @Code "@TopPlace"
- Xsymbol. @Code "@FootList" and {@Code "@FootSect"} define a sequence of
- Xfull-width targets at the foot of the page for footnotes,
- Xpreceded by a short horizontal line:
- Xfootsect.example @Index { @Code "@FootSect" example }
- X@IndentedList
- X@LI @Code {
- X"export @Tag"
- X"def @FootList right @Tag"
- X"{"
- X" @Galley"
- X" //@FootGap @FootList @Next @Tag"
- X"}"
- X}
- X@LI @Code {
- X"def @FootSect"
- X"{"
- X" @FootLen @Wide @HLine"
- X" //@FootGap @FootList 1 ||@FootLen"
- X"}"
- X}
- X@EndList
- XSimilarly, @Code "@ColFootList" and @Code "@ColFootSect" provide a
- Xsequence of targets for footnotes within one column:
- X@ID @Code {
- X"export @Tag"
- X"def @ColFootList right @Tag"
- X"{"
- X" @Galley"
- X" //@FootGap @ColFootList @Next @Tag"
- X"}"
- X""
- X"def @ColFootSect"
- X"{"
- X" @ColFootLen @Wide @HLine"
- X" //@FootGap @ColFootList 1 ||@ColFootLen"
- X"}"
- X}
- XThe next definition provides a horizontal sequence of one or more columns:
- Xcollist.example @Index { @Code "@ColList" example }
- X@ID @Code {
- X"def @ColList right col"
- X"{"
- X" def @Column"
- X" { @VExpand { @ColPlace //1rt @OneRow { //@MidGap @ColFootSect } } }"
- X""
- X" col @Case {"
- X" Single @Yield @Column"
- X" Double @Yield { @DoubleColWidth @Wide @Column ||@ColGap @ColList col }"
- X" Multi @Yield { @MultiColWidth @Wide @Column ||@ColGap @ColList col }"
- X" }"
- X"}"
- X}
- XEach column consists of a @Code "@ColPlace" at the top and a
- X@Code "@FootSect" at the foot. The @@VExpand symbol ensures that
- Xwhenever a column comes into existence, it will expand vertically so
- Xthat the bottom-justification @Code "//1rt" has as much space as
- Xpossible to work within. The @Code "col" parameter determines whether
- Xthe result has a single column, double columns, or multiple columns.
- X@PP
- XThe {@Code "@Page"} symbol places its parameter in a page of fixed width,
- Xheight, and margins:
- Xpage.example @Index { @Code "@Page" example }
- X@ID @Code {
- X"def @Page right x"
- X"{"
- X" @PageWidth @Wide @PageHeight @High {"
- X" //@PageMargin ||@PageMargin"
- X" @HExpand @VExpand x"
- X" ||@PageMargin //@PageMargin"
- X" }"
- X"}"
- X}
- X@@HExpand and @@VExpand ensure that the right parameter occupies all the
- Xavailable space; this is important when the right parameter is unusually
- Xsmall. The @@High symbol gives the page a single row mark, ensuring that
- Xit will be printed on a single sheet of paper (page {@PageOf rootg}).
- X@PP
- XNext we have {@Code "@OnePage"}, defining a typical page of a book or
- Xother document:
- Xonepage.example @Index { @Code "@OnePage" example }
- X@ID @Code {
- X"def @OnePage"
- X" named @Columns {}"
- X" named @PageTop {}"
- X" named @PageFoot {}"
- X"{"
- X" @Page {"
- X" @PageTop"
- X" //@MidGap @TopList"
- X" //@MidGap @FullPlace"
- X" //@MidGap @ColList @Columns"
- X" // //1rt @OneRow { //@MidGap @FootSect //@MidGap @PageFoot }"
- X" }"
- X"}"
- X}
- XThe page top and page foot, and the number of columns, are parameters
- Xthat will be given later when @Code "@OnePage" is invoked. The body of
- Xthe page is a straightforward combination of previous definitions. The
- X@Code "//" symbol protects the following @Code "//1rt" from deletion in
- Xthe unlikely event that all the preceding symbols are replaced by
- X@@Null. The following object is enclosed in @@OneRow to ensure that
- Xall of it is bottom-justified, not just its first component.
- X@PP
- XBefore presenting the definition of a sequence of pages, we must detour
- Xto describe how running page headers and footers (like those in the
- Xpresent document) are produced. These are based on the
- X@Code "@Runner" symbol:
- Xrunner.example @Index { @Code "@Runner" example }
- X@ID @Code {
- X"export @TopOdd @TopEven @FootOdd @FootEven"
- X"def @Runner"
- X" named @TopOdd right @PageNum { @Null }"
- X" named @TopEven right @PageNum { @Null }"
- X" named @FootOdd right @PageNum { @Null }"
- X" named @FootEven right @PageNum { @Null }"
- X" named @Tag {}"
- X"{ @Null }"
- X}
- XThe four parameters control the format of running headers and footers on
- Xodd and even pages respectively. Invocations of {@Code "@Runner"}, for
- Xexample
- X@ID @Code {
- X"@Runner"
- X" @TopEven { @B @PageNum |1rt @I { Chapter 4 } }"
- X" @TopOdd { @I { Examples } |1rt @B @PageNum }"
- X}
- Xwill be embedded in the body text of the document, and, as we will see
- Xin a moment, are accessed by @Code "@Runner&&following" cross references
- Xon the pages. Notice how the @Code "@PageNum" parameter of each
- Xparameter allows the format of the running header to be specified while
- Xleaving the page number to be substituted later.
- X@PP
- XWe may now define {@Code "@OddPageList"}, whose result is a sequence of
- Xpages beginning with an odd-numbered page:
- Xoddpagelist.example @Index { @Code "@OddPageList" example }
- X@ID @Code {
- X"def @OddPageList"
- X" named @Columns {}"
- X" right @PageNum"
- X"{"
- X" def @EvenPageList ..."
- X""
- X" @PageMarker @PageNum"
- X" // @Runner&&following @Open {"
- X" @OnePage"
- X" @Columns { @Columns }"
- X" @PageTop { @TopOdd @PageNum }"
- X" @PageFoot { @FootOdd @PageNum }"
- X" }"
- X" // @EvenPageList"
- X" @Columns { @Columns }"
- X" @Next @PageNum"
- X"}"
- X}
- XIgnoring @Code "@EvenPageList" for the moment, notice first that the
- Xinvocation of @Code "@OnePage" is enclosed in
- X{@Code "@Runner&&following @Open"}. Since {@Code "@Runner&&following"}
- Xrefers to the first invocation of @Code "@Runner" appearing after itself
- Xin the final printed document, the symbols @Code "@TopOdd" and
- X@Code "@FootOdd" will take their value from the first invocation of
- X@Code "@Runner" following the top of the page, even though @Code "@FootOdd"
- Xappears at the foot of the page. Their @Code "@PageNum" parameters are
- Xreplaced by {@Code "@PageNum"}, the actual page number parameter of
- X{@Code "@OddPageList"}.
- X@PP
- XAfter producing the odd-numbered page, @Code "@OddPageList" invokes
- X{@Code "@EvenPageList"}:
- Xevenpagelist.example @Index { @Code "@EvenPageList" example }
- X@ID @Code {
- X"def @EvenPageList"
- X" named @Columns {}"
- X" right @PageNum"
- X"{"
- X" @PageMarker @PageNum"
- X" // @Runner&&following @Open {"
- X" @OnePage"
- X" @Columns { @Columns }"
- X" @PageTop { @TopEven @PageNum }"
- X" @PageFoot { @FootEven @PageNum }"
- X" }"
- X" // @OddPageList"
- X" @Columns { @Columns }"
- X" @Next @PageNum"
- X"}"
- X}
- XThis produces an even-numbered page, then passes the ball back to
- X@Code "@OddPageList" -- a delightful example of what computer
- Xscientists call mutual recursion. The two page types differ only in
- Xtheir running headers and footers, but other changes could easily be made.
- X@PP
- XIt was foreshadowed earlier that an invocation of @Code "@PageMarker"
- Xwould precede each page, and this has been done. Although this @Code
- X"@PageMarker" is a component of the root galley, it will not cause a
- Xpage to be printed, because Basser Lout skips components of height zero.
- X@End @Section
- END_OF_FILE
- if test 9416 -ne `wc -c <'doc/tr.lout/ch4.03'`; then
- echo shar: \"'doc/tr.lout/ch4.03'\" unpacked with wrong size!
- fi
- # end of 'doc/tr.lout/ch4.03'
- fi
- if test -f 'doc/tr.lout/ch4.04' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'doc/tr.lout/ch4.04'\"
- else
- echo shar: Extracting \"'doc/tr.lout/ch4.04'\" \(10583 characters\)
- sed "s/^X//" >'doc/tr.lout/ch4.04' <<'END_OF_FILE'
- X@Section
- X @Title { Chapters and sections }
- X @Tag { chapters }
- X@Begin
- X@PP
- XThe definitions of chapters and sections from the DocumentLayout package
- Xchapters @Index { Chapters and sections }
- Xform the subject of this section. They allow a chapter to be entered
- Xlike this:
- Xdocument.layout.chapters @SubIndex { chapters and sections }
- X@ID @Code {
- X"@Chapter"
- X" @Title { ... }"
- X" @Tag { ... }"
- X"@Begin"
- X" ..."
- X"@End @Chapter"
- X}
- XWithin the chapter a sequence of sections may be included by writing
- X@ID @Code {
- X"@BeginSections"
- X"@Section { ... }"
- X"..."
- X"@Section { ... }"
- X"@EndSections"
- X}
- XThese are numbered automatically, and an entry is made for each in a
- Xtable of contents.
- X@PP
- XThe user of the DocumentLayout package can find the number of the chapter or
- Xsection with a given tag by writing @Code "@NumberOf tag" at any point
- Xin the document. This feature is based on the following definitions:
- Xnumberof.example @Index { @Code "@NumberOf" example }
- X@ID @Code {
- X"export @Tag"
- X"def @NumberMarker right @Tag { @Null }"
- X""
- X"def @NumberOf right x"
- X"{ @NumberMarker&&x @Open { @Tag } }"
- X}
- XEach chapter and section will contain one invocation of
- X{@Code "@NumberMarker"}; a full explanation will be given later.
- X@PP
- XA sequence of places for receiving chapters is easily defined:
- X@ID @Code {
- X"export @Tag"
- X"def @ChapterList right @Tag"
- X"{"
- X" @Galley"
- X" //@ChapterGap @ChapterList @Next @Tag"
- X"}"
- X}
- X@Code "@ChapterGap" will usually be {@Code "1.1b"}, ensuring that each
- Xchapter begins on a new page. The @Code "@Chapter" galley itself is
- Xdefined as follows:
- Xchapter.example @Index { @Code "@Chapter" example }
- X@IndentedList
- X@LI @Code {
- X"export @FootNote @BeginSections @EndSections @Section"
- X"def @Chapter force into { @ChapterList&&preceding }"
- X" named @Tag {}"
- X" named @Title {}"
- X" named @RunningTitle { dft }"
- X" body @Body"
- X"{"
- X" def @FootNote right x { @ColFootNote x }"
- X""
- X" def @BeginSections ..."
- X" def @EndSections ..."
- X" def @Section ..."
- X}
- X@LI @Code {
- X" def @ChapterTitle"
- X" {"
- X" @ChapterNumbers @Case {"
- X" {Yes yes} @Yield { Chapter {@NumberOf @Tag}. |2s @Title }"
- X" else @Yield @Title"
- X" }"
- X" }"
- X""
- X" def @ChapterNum"
- X" {"
- X" @ChapterNumbers @Case {"
- X" {Yes yes} @Yield { Chapter {@NumberOf @Tag} }"
- X" else @Yield @Null"
- X" }"
- X" }"
- X}
- X@LI @Code {
- X" ragged @Break @BookTitleFormat @ChapterTitle"
- X" // @NumberMarker {"
- X" @ChapterList&&@Tag @Open { @Tag }"
- X" }"
- X" // @ChapterList&&preceding @Tagged @Tag"
- X" // @NumberMarker&&preceding @Tagged @Tag"
- X" // @PageMarker&&preceding @Tagged @Tag"
- X" // { @ChapterTitle } @MajorContentsEntry {@PageOf @Tag}"
- X" // @Runner"
- X" @FootEven { |0.5rt 0.8f @Font @B @PageNum }"
- X" @FootOdd { |0.5rt 0.8f @Font @B @PageNum }"
- X" // @Body"
- X" //@SectionGap @ChapRefSection"
- X" // @Runner"
- X" @TopEven { @B @PageNum |1rt @I @ChapterNum }"
- X" @TopOdd { @I {@RunningTitle @OrElse @Title} |1rt @B @PageNum }"
- X"}"
- X}
- X@EndList
- XWe will see the symbols for sections shortly. Notice how their use has
- Xbeen restricted to within the right parameter of {@Code "@Chapter"}, by
- Xnesting them and using a body parameter.
- X@PP
- XThe meaning of @Code "@FootNote" within @Code "@Chapter" has been set
- Xto {@Code "@ColFootNote"}, which produces a footnote targeted to
- X{@Code "@ColFootList"} (see Section {@NumberOf pagelayout}). In other
- Xwords, footnotes within chapters go at the foot of the column, not at
- Xthe foot of the page. (Of course, in single-column books this
- Xdistinction is insignificant.) @Code "@ChapterTitle" and
- X@Code "@ChapterNum" are trivial definitions which vary depending on
- Xwhether the user has requested numbered chapters or not.
- X@PP
- XEach invocation of @Code "@Chapter" has its own unique {@Code "@Tag"},
- Xeither supplied by the user or else inserted automatically by Lout. We
- Xnow trace the cross referencing of chapter numbers on a hypothetical
- Xthird chapter whose tag is {@Code "euclid"}.
- X@PP
- X@Code "@ChapterList&&preceding @Tagged euclid" attaches @Code "euclid"
- Xas an extra tag to the first invocation of @Code "@ChapterList"
- Xpreceding itself in the final printed document. But this
- X@Code "@ChapterList" must be the target of the chapter, and so
- X@ID @Code "@ChapterList&&euclid @Open { @Tag }"
- Xis 3, the number of the chapter ({@Code "@Tag"} refers to the parameter
- Xof {@Code "@ChapterList"}, not the parameter of {@Code "@Chapter"}).
- X Consequently the invocation of
- X@Code "@NumberMarker" within the chapter is equal to
- X{@Code "@NumberMarker 3"}.
- X@PP
- X@Code "@NumberMarker&&preceding @Tagged euclid" attaches @Code "euclid"
- Xto {@Code "@NumberMarker 3"} as an extra tag, and so
- X{@Code "@NumberOf euclid"}, which expands to
- X@ID @Code "@NumberMarker&&euclid @Open { @Tag }"
- Xmust be equal to 3, as required. This scheme could be simplified by
- Xplacing the invocation of @Code "@NumberMarker" within
- X@Code "@ChapterList" rather than within {@Code "@Chapter"}, but it turns
- Xout that that scheme does not generalize well to sections and subsections.
- X@PP
- XThere is a trap for the unwary in the use of @Code preceding and
- X{@Code following}. Suppose that the invocation of @Code "@NumberMarker"
- Xwithin @Code "@Chapter" is replaced by the seemingly equivalent
- X@ID @Code "@NumberMarker { @ChapterList&&preceding @Open { @Tag } }"
- XNow suppose that @Code "@NumberOf euclid" appears somewhere within
- XChapter 7. It will expand to
- X@ID @Code "@NumberMarker&&euclid @Open { @Tag }"
- Xwhich would now be equal to
- X@ID @Code "@ChapterList&&preceding @Open { @Tag }"
- Xwhose value, evaluated as it is within Chapter 7, is 7, not 3. Use of
- X@Code preceding or @Code following within the parameter
- Xof a symbol, rather than within the body, is likely to be erroneous.
- X@PP
- XMuch of the remainder of the definition of @Code "@Chapter" is fairly
- Xself-explanatory: there is a heading, a tag sent to mark the page on
- Xwhich the chapter begins, a @Code "@ContentsEntry" galley sent to the
- Xtable of contents, galleys for the figures and tables of the chapter to
- Xcollect in, @Code "@Body" where the body of the chapter goes, and
- X@Code "@ChapRefSection" to hold a concluding list of references. This
- Xleaves only the two invocations of @Code "@Runner" to explain.
- X@PP
- XThe first @Code "@Runner" is just below the heading. It will be the target
- Xof the @Code "@Runner&&following" cross reference at the beginning of the
- Xfirst page of the chapter (see Section {@NumberOf pagelayout}), which
- Xconsequently will have null running headers and the given footers.
- X@PP
- XThe second @Code "@Runner" appears at the very end of the chapter, hence
- Xon its last page. Since no invocations of @Code "@Runner" lie between
- Xit and the first {@Code "@Runner"}, it will be the target of
- X@Code "@Runner&&following" on every page from the second page of the
- Xchapter to the last, inclusive, and will supply the format of their
- Xheaders and footers.
- X@PP
- XThe interested reader might care to predict the outcome in unusual
- Xcases, such as when the heading occupies two pages, or when a chapter
- Xoccupies only one, or (assuming a change to the gap between chapters)
- Xwhen a chapter starts halfway down a page. Such predictions can be made
- Xwith great confidence.
- X@PP
- XThe expression @Code "@RunningTitle @OrElse @Title" appearing in the second
- X@Code "@Runner" returns the value of the @Code "@RunningTitle" parameter
- Xof @Code "@Chapter" if this is not equal to the default value
- X{@Code "dft"}, or @Code "@Title" otherwise:
- Xorelse.example @Index { @Code "@OrElse" example }
- X@ID @Code {
- X"def @OrElse"
- X" left x"
- X" right y"
- X"{"
- X" x @Case {"
- X" dft @Yield y"
- X" else @Yield x"
- X" }"
- X"}"
- X}
- XThis produces the effect of
- X@ID @Code {
- X"named @RunningTitle { @Title }"
- X}
- Xwhich unfortunately is not permissible as it stands, because @Code "@Title"
- Xis not visible within the default value of {@Code "@RunningTitle"}.
- X@PP
- XFinally, the definitions for sections omitted earlier are as follows:
- Xsection.example @Index { @Code "@Section" example }
- X@IndentedList
- X@LI @Code {
- X"def @EndSectionsPlace { @Galley }"
- X"def @EndSections force into { @EndSectionsPlace&&preceding } {}"
- X"macro @BeginSections { //@SectionGap @SectionList 1 // @EndSectionsPlace // }"
- X}
- X@LI @Code {
- X"def @Section force into { @SectionList&&preceding }"
- X" named @Tag {}"
- X" named @Title {}"
- X" named @RunningTitle { dft }"
- X" body @Body"
- X"{"
- X" def @SectionTitle"
- X" {"
- X" @SectionNumbers @Case {"
- X" {Yes yes} @Yield { {@NumberOf @Tag}. |2s @Title }"
- X" else @Yield @Title"
- X" }"
- X" }"
- X""
- X" @Heading @Protect @SectionTitle"
- X" // @NumberMarker {"
- X" {@ChapterList&&@Tag @Open { @Tag }}.{"
- X" @SectionList&&@Tag @Open { @Tag }}"
- X" }"
- X" // @ChapterList&&preceding @Tagged @Tag"
- X" // @SectionList&&preceding @Tagged @Tag"
- X" // @NumberMarker&&preceding @Tagged @Tag"
- X" // @PageMarker&&preceding @Tagged @Tag"
- X" // { &3f @SectionTitle } @ContentsEntry {@PageOf @Tag}"
- X" //0io @Body"
- X"}"
- X}
- X@EndList
- XThe @Code "@BeginSections" macro invokes {@Code "@SectionList"},
- Xpreceded by the appropriate gap and followed by an @Code "@EndSectsPlace"
- Xfor closing the list of sections when the @Code "@EndSections" symbol is
- Xfound. @Code "@Section" itself is just a copy of @Code "@Chapter" with
- Xslight changes to the format. The parameter of @Code "@NumberMarker" is
- Xa simple generalization of the one within {@Code "@Chapter"}. Notice
- Xthat we have taken care that the value of this parameter be
- Xa juxtaposition of simple words: although
- X@ID @Code {
- X"{@ChapterList&&@Tag @Open { @Tag }}. &"
- X"{@SectionList&&@Tag @Open { @Tag }}"
- X}
- Xis formally equivalent, @Code "&" is not permitted within a
- X@Code "@Tag" parameter.
- X@PP
- XThe DocumentLayout package also contains definitions for subsections in the
- Xsame style. They raise the question of whether Lout is capable of
- Xproducing subsections should the user place {@Code "@BeginSections"},
- X{@Code "@Section"}, and {@Code "@EndSections"} within a {@I section},
- Xand whether such nesting could proceed to arbitrary depth. Arbitrary
- Xnesting of sections within sections is available now, although the
- Xnumbering would of course be wrong. The author has worked out
- Xdefinitions which provide correct numbering to arbitrary depth, with an
- Xarbitrary format for each level. These were not incorporated into
- XDocumentLayout because the author considers sub-subsections to be poor
- Xstyle, and he prefers separate names for the symbols at each level.
- X@End @Section
- END_OF_FILE
- if test 10583 -ne `wc -c <'doc/tr.lout/ch4.04'`; then
- echo shar: \"'doc/tr.lout/ch4.04'\" unpacked with wrong size!
- fi
- # end of 'doc/tr.lout/ch4.04'
- fi
- if test -f 'font/Symbo.AFM' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'font/Symbo.AFM'\"
- else
- echo shar: Extracting \"'font/Symbo.AFM'\" \(9486 characters\)
- sed "s/^X//" >'font/Symbo.AFM' <<'END_OF_FILE'
- XStartFontMetrics 2.0
- XComment Copyright (c) 1984 Adobe Systems Incorporated. All Rights Reserved.
- XComment Creation Date:Thu Apr 16 08:46:05 PST 1987
- XFontName Symbol
- XEncodingScheme FontSpecific
- XFullName Symbol
- XFamilyName Symbol
- XWeight Medium
- XItalicAngle 0.0
- XIsFixedPitch false
- XUnderlinePosition -98
- XUnderlineThickness 54
- XVersion 001.003
- XFontBBox -180 -293 1090 1010
- XStartCharMetrics 189
- XC 32 ; WX 250 ; N space ; B 0 0 0 0 ;
- XC 33 ; WX 333 ; N exclam ; B 128 -17 240 673 ;
- XC 34 ; WX 713 ; N universal ; B 31 0 681 705 ;
- XC 35 ; WX 500 ; N numbersign ; B 20 -17 481 673 ;
- XC 36 ; WX 549 ; N existential ; B 25 0 478 707 ;
- XC 37 ; WX 833 ; N percent ; B 63 -36 771 655 ;
- XC 38 ; WX 778 ; N ampersand ; B 41 -18 750 661 ;
- XC 39 ; WX 439 ; N suchthat ; B 48 -17 414 499 ;
- XC 40 ; WX 333 ; N parenleft ; B 53 -191 300 673 ;
- XC 41 ; WX 333 ; N parenright ; B 30 -191 277 674 ;
- XC 42 ; WX 500 ; N asteriskmath ; B 65 134 427 551 ;
- XC 43 ; WX 549 ; N plus ; B 10 0 539 533 ;
- XC 44 ; WX 250 ; N comma ; B 56 -152 194 104 ;
- XC 45 ; WX 549 ; N minus ; B 11 233 535 288 ;
- XC 46 ; WX 250 ; N period ; B 69 -17 181 95 ;
- XC 47 ; WX 278 ; N slash ; B 0 -17 254 646 ;
- XC 48 ; WX 500 ; N zero ; B 23 -17 471 685 ;
- XC 49 ; WX 500 ; N one ; B 117 0 390 673 ;
- XC 50 ; WX 500 ; N two ; B 25 0 475 686 ;
- XC 51 ; WX 500 ; N three ; B 39 -17 435 687 ;
- XC 52 ; WX 500 ; N four ; B 16 0 469 685 ;
- XC 53 ; WX 500 ; N five ; B 28 -17 443 685 ;
- XC 54 ; WX 500 ; N six ; B 36 -17 467 685 ;
- XC 55 ; WX 500 ; N seven ; B 24 -17 448 673 ;
- XC 56 ; WX 500 ; N eight ; B 54 -18 440 686 ;
- XC 57 ; WX 500 ; N nine ; B 31 -17 460 685 ;
- XC 58 ; WX 278 ; N colon ; B 81 -17 193 460 ;
- XC 59 ; WX 278 ; N semicolon ; B 83 -152 221 460 ;
- XC 60 ; WX 549 ; N less ; B 26 0 523 522 ;
- XC 61 ; WX 549 ; N equal ; B 11 141 537 390 ;
- XC 62 ; WX 549 ; N greater ; B 26 0 523 522 ;
- XC 63 ; WX 444 ; N question ; B 70 -17 412 685 ;
- XC 64 ; WX 549 ; N congruent ; B 11 0 537 475 ;
- XC 65 ; WX 722 ; N Alpha ; B 4 0 684 673 ;
- XC 66 ; WX 667 ; N Beta ; B 29 0 592 672 ;
- XC 67 ; WX 722 ; N Chi ; B -9 0 704 673 ;
- XC 68 ; WX 612 ; N Delta ; B 6 0 608 688 ;
- XC 69 ; WX 611 ; N Epsilon ; B 32 0 617 673 ;
- XC 70 ; WX 763 ; N Phi ; B 26 0 741 672 ;
- XC 71 ; WX 603 ; N Gamma ; B 24 0 609 673 ;
- XC 72 ; WX 722 ; N Eta ; B 39 0 729 673 ;
- XC 73 ; WX 333 ; N Iota ; B 32 0 316 673 ;
- XC 74 ; WX 631 ; N theta1 ; B 18 -17 623 689 ;
- XC 75 ; WX 722 ; N Kappa ; B 35 0 722 672 ;
- XC 76 ; WX 686 ; N Lambda ; B 6 0 680 688 ;
- XC 77 ; WX 889 ; N Mu ; B 28 0 887 673 ;
- XC 78 ; WX 722 ; N Nu ; B 29 -8 720 673 ;
- XC 79 ; WX 722 ; N Omicron ; B 41 -17 715 685 ;
- XC 80 ; WX 768 ; N Pi ; B 25 0 745 673 ;
- XC 81 ; WX 741 ; N Theta ; B 41 -17 715 685 ;
- XC 82 ; WX 556 ; N Rho ; B 28 0 563 673 ;
- XC 83 ; WX 592 ; N Sigma ; B 5 0 589 673 ;
- XC 84 ; WX 611 ; N Tau ; B 33 0 607 673 ;
- XC 85 ; WX 690 ; N Upsilon ; B -8 0 694 673 ;
- XC 86 ; WX 439 ; N sigma1 ; B 40 -233 436 500 ;
- XC 87 ; WX 768 ; N Omega ; B 34 0 736 688 ;
- XC 88 ; WX 645 ; N Xi ; B 40 0 599 672 ;
- XC 89 ; WX 795 ; N Psi ; B 15 0 781 683 ;
- XC 90 ; WX 611 ; N Zeta ; B 44 0 636 673 ;
- XC 91 ; WX 333 ; N bracketleft ; B 86 -155 299 673 ;
- XC 92 ; WX 863 ; N therefore ; B 163 0 701 478 ;
- XC 93 ; WX 333 ; N bracketright ; B 33 -155 246 673 ;
- XC 94 ; WX 658 ; N perpendicular ; B 15 0 652 674 ;
- XC 95 ; WX 500 ; N underscore ; B -2 -252 502 -206 ;
- XC 96 ; WX 500 ; N radicalex ; B 480 881 1090 917 ;
- XC 97 ; WX 631 ; N alpha ; B 41 -17 622 500 ;
- XC 98 ; WX 549 ; N beta ; B 61 -222 515 741 ;
- XC 99 ; WX 549 ; N chi ; B 12 -231 522 500 ;
- XC 100 ; WX 494 ; N delta ; B 40 -17 481 740 ;
- XC 101 ; WX 439 ; N epsilon ; B 22 -19 427 502 ;
- XC 102 ; WX 521 ; N phi ; B 27 -224 490 670 ;
- XC 103 ; WX 411 ; N gamma ; B 5 -225 484 499 ;
- XC 104 ; WX 603 ; N eta ; B 0 -202 527 514 ;
- XC 105 ; WX 329 ; N iota ; B 0 -18 301 503 ;
- XC 106 ; WX 603 ; N phi1 ; B 36 -224 587 499 ;
- XC 107 ; WX 549 ; N kappa ; B 33 0 558 502 ;
- XC 108 ; WX 549 ; N lambda ; B 24 -18 548 739 ;
- XC 109 ; WX 576 ; N mu ; B 33 -223 567 500 ;
- XC 110 ; WX 521 ; N nu ; B -9 -17 475 507 ;
- XC 111 ; WX 549 ; N omicron ; B 35 -19 501 499 ;
- XC 112 ; WX 549 ; N pi ; B 10 -20 530 486 ;
- XC 113 ; WX 521 ; N theta ; B 43 -18 485 690 ;
- XC 114 ; WX 549 ; N rho ; B 50 -230 490 499 ;
- XC 115 ; WX 603 ; N sigma ; B 30 -21 588 500 ;
- XC 116 ; WX 439 ; N tau ; B 10 -18 418 500 ;
- XC 117 ; WX 576 ; N upsilon ; B 7 -17 535 507 ;
- XC 118 ; WX 713 ; N omega1 ; B 12 -17 671 583 ;
- XC 119 ; WX 686 ; N omega ; B 42 -17 684 500 ;
- XC 120 ; WX 493 ; N xi ; B 27 -224 469 766 ;
- XC 121 ; WX 686 ; N psi ; B 12 -228 701 500 ;
- XC 122 ; WX 494 ; N zeta ; B 60 -225 467 756 ;
- XC 123 ; WX 480 ; N braceleft ; B 58 -183 397 673 ;
- XC 124 ; WX 200 ; N bar ; B 65 -177 135 673 ;
- XC 125 ; WX 480 ; N braceright ; B 79 -183 418 673 ;
- XC 126 ; WX 549 ; N similar ; B 17 203 529 307 ;
- XC 161 ; WX 620 ; N Upsilon1 ; B -2 0 610 684 ;
- XC 162 ; WX 247 ; N minute ; B 27 459 228 735 ;
- XC 163 ; WX 549 ; N lessequal ; B 29 0 526 639 ;
- XC 164 ; WX 167 ; N fraction ; B -180 -12 340 677 ;
- XC 165 ; WX 713 ; N infinity ; B 25 124 689 404 ;
- XC 166 ; WX 500 ; N florin ; B 2 -193 494 687 ;
- XC 167 ; WX 753 ; N club ; B 86 -26 660 533 ;
- XC 168 ; WX 753 ; N diamond ; B 142 -36 600 550 ;
- XC 169 ; WX 753 ; N heart ; B 117 -33 631 532 ;
- XC 170 ; WX 753 ; N spade ; B 113 -36 629 548 ;
- XC 171 ; WX 1042 ; N arrowboth ; B 24 -15 1024 511 ;
- XC 172 ; WX 987 ; N arrowleft ; B 32 -15 942 511 ;
- XC 173 ; WX 603 ; N arrowup ; B 45 0 571 910 ;
- XC 174 ; WX 987 ; N arrowright ; B 49 -15 959 511 ;
- XC 175 ; WX 603 ; N arrowdown ; B 45 -22 571 888 ;
- XC 176 ; WX 400 ; N degree ; B 50 385 350 684 ;
- XC 177 ; WX 549 ; N plusminus ; B 10 0 539 645 ;
- XC 178 ; WX 411 ; N second ; B 20 459 413 737 ;
- XC 179 ; WX 549 ; N greaterequal ; B 29 0 526 639 ;
- XC 180 ; WX 549 ; N multiply ; B 17 8 533 524 ;
- XC 181 ; WX 713 ; N proportional ; B 27 123 639 404 ;
- XC 182 ; WX 494 ; N partialdiff ; B 26 -20 462 746 ;
- XC 183 ; WX 460 ; N bullet ; B 50 113 410 473 ;
- XC 184 ; WX 549 ; N divide ; B 10 71 536 456 ;
- XC 185 ; WX 549 ; N notequal ; B 15 -25 540 549 ;
- XC 186 ; WX 549 ; N equivalence ; B 14 82 538 443 ;
- XC 187 ; WX 549 ; N approxequal ; B 14 135 527 394 ;
- XC 188 ; WX 1000 ; N ellipsis ; B 111 -17 889 95 ;
- XC 189 ; WX 603 ; N arrowvertex ; B 280 -120 336 1010 ;
- XC 190 ; WX 1000 ; N arrowhorizex ; B -60 220 1050 276 ;
- XC 191 ; WX 658 ; N carriagereturn ; B 15 -16 602 629 ;
- XC 192 ; WX 823 ; N aleph ; B 175 -18 661 658 ;
- XC 193 ; WX 686 ; N Ifraktur ; B 10 -53 578 740 ;
- XC 194 ; WX 795 ; N Rfraktur ; B 26 -15 759 734 ;
- XC 195 ; WX 987 ; N weierstrass ; B 159 -211 870 573 ;
- XC 196 ; WX 768 ; N circlemultiply ; B 43 -17 733 673 ;
- XC 197 ; WX 768 ; N circleplus ; B 43 -15 733 675 ;
- XC 198 ; WX 823 ; N emptyset ; B 39 -24 781 719 ;
- XC 199 ; WX 768 ; N intersection ; B 40 0 732 509 ;
- XC 200 ; WX 768 ; N union ; B 40 -17 732 492 ;
- XC 201 ; WX 713 ; N propersuperset ; B 20 0 673 470 ;
- XC 202 ; WX 713 ; N reflexsuperset ; B 20 -125 673 470 ;
- XC 203 ; WX 713 ; N notsubset ; B 36 -70 690 540 ;
- XC 204 ; WX 713 ; N propersubset ; B 37 0 690 470 ;
- XC 205 ; WX 713 ; N reflexsubset ; B 37 -125 690 470 ;
- XC 206 ; WX 713 ; N element ; B 45 0 505 468 ;
- XC 207 ; WX 713 ; N notelement ; B 45 -58 505 555 ;
- XC 208 ; WX 768 ; N angle ; B 26 0 738 673 ;
- XC 209 ; WX 713 ; N gradient ; B 36 -19 681 718 ;
- XC 210 ; WX 790 ; N registerserif ; B 50 -20 740 670 ;
- XC 211 ; WX 790 ; N copyrightserif ; B 51 -15 741 675 ;
- XC 212 ; WX 890 ; N trademarkserif ; B 18 293 855 673 ;
- XC 213 ; WX 823 ; N product ; B 25 -101 803 751 ;
- XC 214 ; WX 549 ; N radical ; B 10 -38 515 917 ;
- XC 215 ; WX 250 ; N dotmath ; B 69 210 169 310 ;
- XC 216 ; WX 713 ; N logicalnot ; B 15 0 680 288 ;
- XC 217 ; WX 603 ; N logicaland ; B 23 0 583 454 ;
- XC 218 ; WX 603 ; N logicalor ; B 30 0 578 477 ;
- XC 219 ; WX 1042 ; N arrowdblboth ; B 27 -20 1023 510 ;
- XC 220 ; WX 987 ; N arrowdblleft ; B 30 -15 939 513 ;
- XC 221 ; WX 603 ; N arrowdblup ; B 39 2 567 911 ;
- XC 222 ; WX 987 ; N arrowdblright ; B 45 -20 954 508 ;
- XC 223 ; WX 603 ; N arrowdbldown ; B 44 -19 572 890 ;
- XC 224 ; WX 494 ; N lozenge ; B 18 0 466 745 ;
- XC 225 ; WX 329 ; N angleleft ; B 25 -198 306 746 ;
- XC 226 ; WX 790 ; N registersans ; B 50 -20 740 670 ;
- XC 227 ; WX 790 ; N copyrightsans ; B 49 -15 739 675 ;
- XC 228 ; WX 786 ; N trademarksans ; B 5 293 725 673 ;
- XC 229 ; WX 713 ; N summation ; B 14 -108 695 752 ;
- XC 230 ; WX 384 ; N parenlefttp ; B 40 -293 436 926 ;
- XC 231 ; WX 384 ; N parenleftex ; B 40 -85 92 925 ;
- XC 232 ; WX 384 ; N parenleftbt ; B 40 -293 436 926 ;
- XC 233 ; WX 384 ; N bracketlefttp ; B 0 -80 341 926 ;
- XC 234 ; WX 384 ; N bracketleftex ; B 0 -79 55 925 ;
- XC 235 ; WX 384 ; N bracketleftbt ; B 0 -80 340 926 ;
- XC 236 ; WX 494 ; N bracelefttp ; B 201 -75 439 926 ;
- XC 237 ; WX 494 ; N braceleftmid ; B 14 -85 255 935 ;
- XC 238 ; WX 494 ; N braceleftbt ; B 201 -70 439 926 ;
- XC 239 ; WX 494 ; N braceex ; B 201 -80 255 935 ;
- XC 241 ; WX 329 ; N angleright ; B 21 -198 302 746 ;
- XC 242 ; WX 274 ; N integral ; B 2 -107 291 916 ;
- XC 243 ; WX 686 ; N integraltp ; B 332 -83 715 922 ;
- XC 244 ; WX 686 ; N integralex ; B 332 -88 415 975 ;
- XC 245 ; WX 686 ; N integralbt ; B 39 -81 415 921 ;
- XC 246 ; WX 384 ; N parenrighttp ; B 54 -293 450 926 ;
- XC 247 ; WX 384 ; N parenrightex ; B 398 -85 450 925 ;
- XC 248 ; WX 384 ; N parenrightbt ; B 54 -293 450 926 ;
- XC 249 ; WX 384 ; N bracketrighttp ; B 22 -80 360 926 ;
- XC 250 ; WX 384 ; N bracketrightex ; B 305 -79 360 925 ;
- XC 251 ; WX 384 ; N bracketrightbt ; B 20 -80 360 926 ;
- XC 252 ; WX 494 ; N bracerighttp ; B 17 -75 255 926 ;
- XC 253 ; WX 494 ; N bracerightmid ; B 201 -85 442 935 ;
- XC 254 ; WX 494 ; N bracerightbt ; B 17 -70 255 926 ;
- XC -1 ; WX 790 ; N apple ; B 56 -3 733 808 ;
- XEndCharMetrics
- XEndFontMetrics
- END_OF_FILE
- if test 9486 -ne `wc -c <'font/Symbo.AFM'`; then
- echo shar: \"'font/Symbo.AFM'\" unpacked with wrong size!
- fi
- # end of 'font/Symbo.AFM'
- fi
- if test -f 'z27.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'z27.c'\"
- else
- echo shar: Extracting \"'z27.c'\" \(10261 characters\)
- sed "s/^X//" >'z27.c' <<'END_OF_FILE'
- X/*@z27.c:Debug Service:Debug flags@*******************************************/
- X/* */
- X/* LOUT: A HIGH-LEVEL LANGUAGE FOR DOCUMENT FORMATTING (VERSION 2.05) */
- X/* COPYRIGHT (C) 1993 Jeffrey H. Kingston */
- X/* */
- X/* Jeffrey H. Kingston (jeff@cs.su.oz.au) */
- X/* Basser Department of Computer Science */
- X/* The University of Sydney 2006 */
- X/* AUSTRALIA */
- X/* */
- X/* This program is free software; you can redistribute it and/or modify */
- X/* it under the terms of the GNU General Public License as published by */
- X/* the Free Software Foundation; either version 1, or (at your option) */
- X/* any later version. */
- X/* */
- X/* This program is distributed in the hope that it will be useful, */
- X/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
- X/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
- X/* GNU General Public License for more details. */
- X/* */
- X/* You should have received a copy of the GNU General Public License */
- X/* along with this program; if not, write to the Free Software */
- X/* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
- X/* */
- X/* FILE: z27.c */
- X/* MODULE: Debug Service */
- X/* EXTERNS: dbg[], DebugInit(), Debug() */
- X/* ProfileOn(), ProfileOff(), ProfilePrint() */
- X/* */
- X/*****************************************************************************/
- X#include "externs"
- X
- X#if DEBUG_ON
- Xstruct dbs dbg[] = {
- X "zz", 0, 0, 0, /* - unused - */
- X "sp", 0, 0, 0, /* Supervise */
- X "la", 0, 0, 0, /* Lexical Analyser */
- X "fs", 0, 0, 0, /* File Service */
- X "ts", 0, 0, 0, /* Token Service */
- X "rd", 0, 0, 0, /* Read Definitions */
- X "op", 0, 0, 0, /* Object Parser */
- X "os", 0, 0, 0, /* Object Service */
- X "om", 0, 0, 0, /* Object Manifest */
- X "ce", 0, 0, 0, /* Closure Expansion */
- X "cr", 0, 0, 0, /* Cross References */
- X "ss", 0, 0, 0, /* Style Service */
- X "sf", 0, 0, 0, /* Size Finder */
- X "ob", 0, 0, 0, /* Object Breaking */
- X "of", 0, 0, 0, /* Object Filling */
- X "sc", 0, 0, 0, /* Size Constraints */
- X "sa", 0, 0, 0, /* Size Adjustments */
- X "gw", 0, 0, 0, /* Gap Widths */
- X "gt", 0, 0, 0, /* Galley Transfer */
- X "ga", 0, 0, 0, /* Galley Attaching */
- X "gf", 0, 0, 0, /* Galley Flusher */
- X "gm", 0, 0, 0, /* Galley Maker */
- X "gs", 0, 0, 0, /* Galley Service */
- X "gp", 0, 0, 0, /* Galley Printer */
- X "ps", 0, 0, 0, /* Print Service */
- X "oe", 0, 0, 0, /* Object Echo */
- X "es", 0, 0, 0, /* Echo Service */
- X "zz", 0, 0, 0, /* Debug Service (unused) */
- X "yy", 0, 0, 0, /* Error Service */
- X "st", 0, 0, 0, /* Symbol Table */
- X "su", 0, 0, 0, /* Symbol Uses */
- X "ma", 0, 0, 0, /* Memory Allocator */
- X "cs", 0, 0, 0, /* Counter Service */
- X "bs", 0, 0, 0, /* Database Service */
- X "rs", 0, 0, 0, /* Rotation Service */
- X "tk", 0, 0, 0, /* Time Keeper */
- X "hy", 0, 0, 0, /* Hyphenation */
- X "ft", 0, 0, 0, /* Font Tables */
- X "ev", 0, 0, 0, /* Encoding Vextors */
- X "sh", 0, 0, 0, /* String Handler */
- X "pp", 0, 0, 0, /* Profiling */
- X "", 0, 0, 0, /* any */
- X};
- X
- X/*@::DebugInit(), Debug()@****************************************************/
- X/* */
- X/* DebugInit(str) */
- X/* */
- X/* Turn on the debug flag given by str. */
- X/* */
- X/*****************************************************************************/
- X
- XDebugInit(str)
- XFULL_CHAR *str;
- X{ int j, urg;
- X for( urg = 0; urg < 2 && str[urg+2] == CH_FLAG_DEBUG; urg++ );
- X for( j = 1; ; j++ )
- X { if( StringEqual(AsciiToFull(dbg[j].flag), &str[urg+2]) ) break;
- X if( StringEqual(AsciiToFull(dbg[j].flag), STR_EMPTY) )
- X Error(FATAL, no_fpos, "unknown debug flag %s", str);
- X }
- X for( ; urg >= 0; urg-- ) dbg[j].on[urg] = dbg[ANY].on[urg] = TRUE;
- X} /* end DebugInit */
- X
- X
- X/*****************************************************************************/
- X/* */
- X/* Debug(category, urgency, str, p1, p2, p3, p4, p5, p6, p7, p8) */
- X/* */
- X/* Print str on debug output, if the flag corresponding to the given */
- X/* debug category and urgency is on. */
- X/* */
- X/*****************************************************************************/
- X
- X/*VARARGS3*/
- XDebug(category, urgency, str, p1, p2, p3, p4, p5, p6, p7, p8)
- Xint category, urgency; char *str; int p1, p2, p3, p4, p5, p6, p7, p8;
- X{ static BOOLEAN first_message = TRUE;
- X if( first_message )
- X { fprintf(stderr, "\nLout Debug Output:\n");
- X first_message = FALSE;
- X }
- X fprintf(stderr, "%2s: ", dbg[category].flag);
- X fprintf(stderr, str, p1, p2, p3, p4, p5, p6, p7, p8);
- X fprintf(stderr, "\n");
- X fflush(stderr);
- X} /* end Debug */
- X
- X
- X/*@::ProfileOn(), ProfileOff(), ProfilePrint()@*******************************/
- X/* */
- X/* ProfileOn(str) */
- X/* */
- X/* Start profiling label str. */
- X/* */
- X/*****************************************************************************/
- X#define MAXPROF 20
- X#include <time.h>
- X
- Xstruct profrec
- X{ char *label; /* label of the profile */
- X int calls; /* number of calls with this label */
- X long time; /* total time of this label */
- X};
- X
- Xstatic struct profrec profstack[MAXPROF];
- Xstatic struct profrec profstore[MAXPROF];
- Xstatic int proftop = 0, profsize = 0;
- X
- XProfileOn(str)
- Xchar *str;
- X{ int i; long raw_time;
- X for( i = 0; i < proftop; i++ )
- X { if( strcmp(profstack[i].label, str) == 0 )
- X { for( i = 0; i < proftop; i++ )
- X fprintf(stderr, "profstack[%d] = %s\n", i, profstack[i].label);
- X Error(INTERN, no_fpos, "ProfileOn: %s restarted", str);
- X }
- X }
- X if( proftop == MAXPROF ) Error(INTERN, no_fpos, "ProfileOn: overflow");
- X time(&raw_time); profstack[proftop].label = str;
- X profstack[proftop++].time = raw_time;
- X} /* end ProfileOn */
- X
- X
- X/*****************************************************************************/
- X/* */
- X/* ProfileOff(str) */
- X/* */
- X/* Stop profiling label str. */
- X/* */
- X/*****************************************************************************/
- X
- XProfileOff(str)
- Xchar *str;
- X{ int i; long raw_time;
- X if( proftop == 0 || strcmp(profstack[proftop-1].label, str) != 0 )
- X Error(INTERN, no_fpos, "ProfileOff: %s is not the current label", str);
- X for( i = 0; i < profsize && strcmp(profstore[i].label, str) != 0; i++ );
- X if( i >= profsize )
- X { if( profsize++ == MAXPROF ) Error(INTERN, no_fpos, "ProfileOff: overflow");
- X profstore[i].label = str;
- X profstore[i].calls = 0;
- X profstore[i].time = 0;
- X }
- X time(&raw_time); profstore[i].calls += 1;
- X profstore[i].time += (raw_time - profstack[--proftop].time);
- X} /* end ProfileOff */
- X
- X
- X/*****************************************************************************/
- X/* */
- X/* ProfilePrint() */
- X/* */
- X/* Print results of profiling. */
- X/* */
- X/*****************************************************************************/
- X
- XProfilePrint()
- X{ int i;
- X for( i = 0; i < profsize; i++ )
- X { fprintf(stderr, "Profile %-20s %6d secs, %3d calls, %6.2f secs/call\n",
- X profstore[i].label, profstore[i].time, profstore[i].calls,
- X (float) profstore[i].time / profstore[i].calls );
- X }
- X} /* end ProfilePrint */
- X#endif
- END_OF_FILE
- if test 10261 -ne `wc -c <'z27.c'`; then
- echo shar: \"'z27.c'\" unpacked with wrong size!
- fi
- # end of 'z27.c'
- fi
- echo shar: End of archive 28 \(of 35\).
- 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 31 32 33 34 35 ; do
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
- done
- if test "${MISSING}" = "" ; then
- echo You have unpacked all 35 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...
-