diff options
Diffstat (limited to 'doc/user/tbl_plai')
-rw-r--r-- | doc/user/tbl_plai | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/doc/user/tbl_plai b/doc/user/tbl_plai new file mode 100644 index 0000000..0813717 --- /dev/null +++ b/doc/user/tbl_plai @@ -0,0 +1,84 @@ +@Section + @Title { Plain text tables } + @Tag { tbl_plai } +@Begin +@PP +Tables work well with plain text output (Section {@NumberOf plain}): +plain.text.tables @Index { plain text tables } +@CD @OneRow -1px @Break @F @Verbatim { +................................................... +. . . +. Johnson . Johnson suddenly uttered an . +. suddenly . apophegm, at which many will . +. uttered an . start: `Patriotism is the . +. apophegm, at . last refuge of a scoundrel.' . +. which many . . +. will start: . . +. `Patriotism ................................. +. is the last . . . +. refuge of a . Johnson . Johnson . +. scoundrel.' . suddenly . suddenly . +. . uttered an . uttered an . +. . apophegm, at . apophegm, at . +. . which many . which many . +. . will start: . will start: . +. . `Patriotism . `Patriotism . +. . is the last . is the last . +. . refuge of a . refuge of a . +. . scoundrel.' . scoundrel.' . +. . . . +. . . . +................................... . +. . . +. Johnson suddenly uttered an . . +. apophegm, at which many will . . +. start: `Patriotism is the . . +. last refuge of a scoundrel.' . . +. . . +. . . +................................................... +} +This table was produced by a separate run of Lout and pasted into this +document. +@PP +@Code "@Tbl" changes the default values of several options when used +in a plain text document: +@ID @Code @Verbatim { +@Tbl + marginvertical { 2f } + marginhorizontal { 2s } + rulehorizontalwidth { 1f } + ruleverticalwidth { 1s } + rulehorizontalgap { 0f } + ruleverticalgap { 0s } +} +When using plain text it is advisable to make vertical distances whole +multiples of {@Code "1f"}, and horizontal distances whole multiples of +{@Code "1s"}, since this avoids fractional spacing which cannot be successful +in plain text files and produces quite messy results. There is also a +@Code ruleplainchar option for changing the character used to +draw rules. For example, +@ID @Code @Verbatim { +@Tbl + ruleplainchar { - } +} +would be a good choice if you plan to draw only horizontal rules. This +option can be set anywhere as usual. +@PP +If you do use rules it is worth pondering the implications of the last +part of Section {@NumberOf tbl_rule}. Right and below rules are drawn +outside the boundary of the cell, which is unimportant +in ordinary output, but means that they will appear one space to the +right and one line below the cell in plain text output. This explains +the slight asymmetry in the example above; you can correct it with +@ID @Code @Verbatim { +@Tbl + marginright { 1s } + marginbelow { 1f } +} +but you still have to worry about rules at the extreme right of the +page going off the edge, and rules below the last line bumping into +whatever follows the table. The first can be fixed by not using +full width tables with right rules; the second by inserting an extra +@Code "@DP" after a table that ends with a below rule. +@End @Section |