home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
rtsi.com
/
2014.01.www.rtsi.com.tar
/
www.rtsi.com
/
OS9
/
OSK
/
APPS
/
lout2.lzh
/
LOUT2
/
DOC
/
TR.TAB
/
s6
< prev
next >
Wrap
Text File
|
1994-01-25
|
5KB
|
137 lines
@Section
@Title { Rules, boxes, multi-page tables, etc. }
@Begin
@PP
Tab draws four kinds of rules. @I {Above rules} go across the table
above a specified row; @I {below rules} go across the table below a
row. @I {Between rules} go down the table between any two columns, but
not before the first or after the last; and @I { side rules } go down
the two sides:
@ID @Code {
"@Tab"
" above { no }"
" below { yes }"
" between { single }"
" side { double }"
" @Fmta { ... }"
"..."
}
Each option may have the value @Code no (no rules), @Code yes or
@Code single (draw single rules), or @Code double (draw double
rules). Omitting an option is equivalent to giving it the value
{@Code no}. A rule below one row exactly overstrikes a rule above the
next, unless a page break intervenes.
@PP
These options to @Code "@Tab" will draw all possible rules of the given
type. If only some are wanted, there are {@Code above} and
{@Code below} options (but no {@Code side} option) for each row symbol:
@ID @Code {
"@Rowf"
" above { yes }"
" below { double }"
" A { ... }"
" ..."
}
and there is a @Code between option for the @Code "!" symbol that
separates columns in the format options:
@ID @Code "@Col A ! between { double } @Col B"
The symbols @Code "!!" and @Code "!!!" are abbreviations for
@Code "! between { single }" and {@Code "! between { double }"}. All
these options override the corresponding @Code "@Tab" options when they
are present; when they are absent, the @Code "@Tab" options hold sway.
@PP
It is not hard to assemble a single box around a table, using side
rules, a rule above the first row, and a rule below the last:
@ID @Code {
"@Tab"
" side { single }"
"{"
" @Rowa above { single } ..."
" ..."
" @Rowj below { single } ..."
"}"
}
Double boxes around a table should be assembled using the following recipe:
@ID @Code {
"@Tab"
" side { double }"
"{"
" @Rowa above { doubleboxabove } ..."
" ..."
" @Rowj below { doubleboxbelow } ..."
"}"
}
This is a little tedious, but the result is good.
@PP
The symbols @Code "@Line" and @Code "@DoubleLine" produce horizontal
single and double lines of the width of the column. Two other symbols,
@Code "@Rule" and {@Code "@DoubleRule"}, produce lines which extend into
the adjacent margins as well. For example,
@CD {
@Tab
@Fmta { @Col A }
{
@Rowa A { 5^.46 }
@Rowa A { 3^.4159 }
@Rowa A { 5772^ }
@Rowa A { @Line } vmargin { 0i }
@Rowa A { 5909^.0759 }
}
}
is produced by
@ID @Code {
"@Tab"
" @Fmta { @Col A }"
"{"
" @Rowa A { 5^.46 }"
" @Rowa A { 3^.4159 }"
" @Rowa A { 5772^ }"
" @Rowa A { @Line } vmargin { 0i }"
" @Rowa A { 5909^.0759 }"
"}"
}
Owing to problems behind the scenes, @Code "@Rule" and @Code "@DoubleRule"
fail in aligned columns.
@PP
The @Code "@Tab" symbol has a @Code "linewidth" option which determines
the thickness of all the lines:
@ID @Code {
"@Tab"
" linewidth { 0.5 pt }"
}
shows the default value, 0.5 points. This cannot be overridden within
the table. Double rules are drawn with their centres three line widths
apart. Tab thinks that rules and double rules occupy no space, so thick
rules may require larger margins.
@PP
The tables produced by Tab permit page breaks between any two rows. The
choice of page breaks can either be left to Lout, or it can be forced by
placing the new page symbol @Code "@NP" between two rows. To
ensure that each part of a multi-page table is boxed, the rows preceding
the page breaks must have @Code below rules, and the rows following them
must have @Code above rules. The @Code "@IndentedDisplay" and
@Code "@CentredDisplay" symbols of the DocumentLayout package prevent
page breaks in the thing displayed, so they cannot be used to display
multi-page tables; a multi-page table should be displayed at the left
margin by preceding and following it with {@Code "@DP"}. To prevent
page breaks within a small table, either use one of the
display symbols just mentioned or else use @Code "@OneRow @Tab ...".
@PP
The @Code "@HAdjust" symbol from standard Lout can be used to widen a
table's columns until it occupies the full column width. The
recommended arrangement is
@ID @Code {
"@DP"
"@HAdjust @Tab"
" ..."
"@DP"
}
since @Code "@HAdjust" is not effective within displays.
@PP
Expert users might occasionally find a use for the @Code "@MarkRow"
symbols. There is one of them for each @Code "@Row" symbol
({@Code "@MarkRowa"} for {@Code "@Rowa"}, etc.). A @Code "@MarkRow"
symbol causes the principal mark of the table to pass through its row,
permitting that row to be aligned with horizontally adjacent objects.
@End @Section