diff options
author | Jeffrey H. Kingston <jeff@it.usyd.edu.au> | 2010-09-14 19:38:32 +0000 |
---|---|---|
committer | Jeffrey H. Kingston <jeff@it.usyd.edu.au> | 2010-09-14 19:38:32 +0000 |
commit | 7602c70b4a3fb15369d96fd984418d2b4492bc52 (patch) | |
tree | f4eb37a19d1b8d6e9c038b5f3e4c24fc8083bad7 /doc/user/tbl_alig | |
parent | d4b68bb27f42afb8338f35f9fda0c467ec5d8787 (diff) | |
download | lout-89d1d112d90727873224f8f1164c999194376bea.tar.gz |
Lout 3.19 tag.3.19
git-svn-id: http://svn.savannah.nongnu.org/svn/lout/tags/3.19@8 9365b830-b601-4143-9ba8-b4a8e2c3339c
Diffstat (limited to 'doc/user/tbl_alig')
-rw-r--r-- | doc/user/tbl_alig | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/doc/user/tbl_alig b/doc/user/tbl_alig index 0032e86..69e5588 100644 --- a/doc/user/tbl_alig +++ b/doc/user/tbl_alig @@ -28,21 +28,19 @@ each entry: @Rowa A { 5772^ } } } -The equals signs of equations can be aligned in the same way (see the -example at the start of this chapter). +The equals signs of equations can be aligned in the same way. @PP Owing to problems behind the scenes, in a column in which one cell is labelled {@Code "indent { align }"}, all the other cells have to be so labelled, otherwise Lout make a mess of things. This is a problem when we want to get a heading over the top of an aligned column: if -we follow the rule, the @I heading gets aligned, which is wrong; but -if we don't, Lout makes a mess of things. There is no ideal solution -to this problem. +we follow the rule, the @I heading gets aligned, which is wrong. There +is no ideal solution to this problem. @PP What most people want is for the heading to be centred in the column, and the aligned entries to be centred in the column as a block, but Lout cannot do this. One approximation is to make the heading cell a spanning -cell with centring, like this: +cell (Section {@NumberOf tbl_span}) with centring, like this: @FootNote { Lout does not currently accept single-column tables with {@Code "@StartHSpan"}, so we've had to add an empty second column. } @@ -50,22 +48,22 @@ an empty second column. } @Tbl marginvertical { 0.5vx } aformat { @StartHSpan @Cell indent { ctr } @B A | } - bformat { @Cell A | } + bformat { @Cell indent { align } A | } { -@Rowa A { Heading } +@Rowa A { Head } @Rowb A { 5^.46 } @Rowb A { 3^.4159 } @Rowb A { 5772^ } } } -The spanning quarantines the centred cell from the aligned cells, -permitting @Code "indent { ctr }" to work: +The spanning quarantines the centred cell, permitting +@Code "indent { ctr }" to work: @CD @OneRow @Tbl marginvertical { 0.5vx } aformat { @StartHSpan @Cell indent { ctr } @B A | } - bformat { @Cell A | } + bformat { @Cell indent { align } A | } { -@Rowa A { V } marginabove { 0i } +@Rowa A { Head } marginabove { 0i } @Rowb A { 5^.46 } @Rowb A { 3^.4159 } @Rowb A { 5772^ } marginbelow { 0i } @@ -74,7 +72,7 @@ But if the heading cell is wider than the aligned cells, you get this: @CD @OneRow @Tbl marginvertical { 0.5vx } aformat { @StartHSpan @Cell indent { ctr } @B A | } - bformat { @Cell A | } + bformat { @Cell indent { align } A | } { @Rowa A { A Wider Heading } marginabove { 0i } @Rowb A { 5^.46 } @@ -87,17 +85,19 @@ respect to a heading. In these cases you could forget about @Code "@StartHSpan" and treat the heading as an aligned entry, either by placing a @Code "^" within it or by using @ID @Code "@Cell 0.5w @HShift A" -which places the alignment point in the centre of the entry. -#@CD @OneRow @Tbl -# marginvertical { 0.5vx } -# aformat { @Cell 0.5w @HShift @B A } -# bformat { @Cell A } -#{ -#@Rowa A { A Wider Heading } marginabove { 0i } -#@Rowb A { 5^.46 } -#@Rowb A { 3^.4159 } -#@Rowb A { 5772^ } marginbelow { 0i } -#} -You can move the alignment point about by changing the 0.5. Of course, -all this is a poor substitute for the real thing. +which places the alignment point in the centre of the entry: +@CD @OneRow @Tbl + indent { align } + marginvertical { 0.5vx } + aformat { @Cell 0.5w @HShift @B A } + bformat { @Cell A } +{ +@Rowa A { A Wider Heading } marginabove { 0i } +@Rowb A { 5^.46 } +@Rowb A { 3^.4159 } +@Rowb A { 5772^ } marginbelow { 0i } +} +You can move the alignment point about by changing the 0.5 to something +smaller or larger. Of course, all this is a poor substitute for the +real thing. @End @Section |