aboutsummaryrefslogtreecommitdiffstats
path: root/doc/user/tbl_mark
diff options
context:
space:
mode:
authorJeffrey H. Kingston <jeff@it.usyd.edu.au>2010-09-14 19:21:41 +0000
committerJeffrey H. Kingston <jeff@it.usyd.edu.au>2010-09-14 19:21:41 +0000
commit71bdb35d52747e6d7d9f55df4524d57c2966be94 (patch)
tree480ee5eefccc40d5f3331cc52d66f722fd19bfb9 /doc/user/tbl_mark
parentb41263ea7578fa9742486135c762803b52794105 (diff)
downloadlout-71bdb35d52747e6d7d9f55df4524d57c2966be94.tar.gz
Lout 3.17.
git-svn-id: http://svn.savannah.nongnu.org/svn/lout/trunk@2 9365b830-b601-4143-9ba8-b4a8e2c3339c
Diffstat (limited to 'doc/user/tbl_mark')
-rw-r--r--doc/user/tbl_mark65
1 files changed, 65 insertions, 0 deletions
diff --git a/doc/user/tbl_mark b/doc/user/tbl_mark
new file mode 100644
index 0000000..8761979
--- /dev/null
+++ b/doc/user/tbl_mark
@@ -0,0 +1,65 @@
+@Section
+ @Title { Vertical alignment of tables }
+ @Tag { tbl_mark }
+@Begin
+@PP
+Occasionally the vertical alignment of a table with objects to its left
+vertical.alignment @Index { vertical alignment of tables }
+and right becomes an issue. Examples are hard to find, but let's say
+that we need to construct a symbol
+@ID @AmberLight
+and include it in running text. The obvious first attempt at a table
+with three rows produces
+#@ID @OneRow @Code @Verbatim {
+#@Tbl
+# aformat { @Cell A }
+# margin { 0i }
+# strut { no }
+#{
+#@Rowa A { @OpenCircle }
+#@Rowa A { @ClosedCircle }
+#@Rowa A { @OpenCircle }
+#}
+#}
+#where @Code "@OpenCircle" and @Code "@ClosedCircle" produce open and
+#closed circles (they may be defined using the @Code "@Diag" package);
+#but this produces
+@Tbl
+ aformat { @Cell A }
+ margin { 0i }
+ strut { no }
+{
+@Rowa A { @OpenCircle }
+@Rowa A { @ClosedCircle }
+@Rowa A { @OpenCircle }
+}
+in running text, because vertical alignment is by default through the
+top boundary of the table. To make the alignment pass through one of
+the rows, replace its @Code "@Row" symbol by a corresponding
+@Code "@MarkRow" symbol. Here is the revised table, enclosed in a
+definition for ease of use:
+amberlight @Index { @Code "@AmberLight" symbol }
+@ID @OneRow @Code @Verbatim {
+import @TblSetup
+def @AmberLight
+{
+ @OneRow @Tbl
+ aformat { @Cell A }
+ margin { 0i }
+ strut { no }
+ paint { no } rule { no }
+ {
+ @Rowa A { @OpenCircle }
+ @MarkRowa A { @ClosedCircle }
+ @Rowa A { @OpenCircle }
+ }
+}
+}
+Now when we write
+@ID @Code "produces @AmberLight in running text"
+we find that this definition produces @AmberLight in running text, as
+desired. We have enclosed the table in @Code "@OneRow" to ensure that
+its rows will never become separated, and added some options just in
+case the definition is ever used with a setup file (Section
+{@NumberOf tbl_setu}) that has default painting or rules.
+@End @Section