On 04-Jan-07 T. Kurt Bond wrote: > Werner LEMBERG writes: >> > Is there any way to find out the width of the most recent table? >> >> Please give an example showing what you want to do. > > I'd like to place something on the page relative to the right side of > the most recent table. Right now I have to manually place it using > \h'|...|'. > > For instance, in a greatly simplified example: > .TS > tab(#), box; > l r r > l n n . > Col a#Col b#Col c > Row 1#1.5\(dg#10.23 > Row 2#42.24#1.1 > .TE > \Z'\h'|1.1i'\(dg - Note' > I'd like to be able to figure out what the value for \h should be > automatically.
It's still not clear exactly what you want to do, and why you necessarily need to use the table-width for it. For example, in your case above it seems more likely that you want to tie the Note to the table itself, in which case you can make it part of the table. For example: .TS tab(#); |l r r| |l n n| . _ Col a#Col b#Col c Row 1#1.5\(dg#10.23 Row 2#42.24#1.1 _ .T& r s s. \(dg - Note .TE (This "fakes" the table box, and changes the table format for the last line so that the Note is right-justified in a single spanning column). I often put "footnotes" in the bottom lines of a table in this way. You could also, for instance, make it a "right marginal note" in the following kind of way: .TS tab(#), box; l r r0 r l n n r. Col a#Col b#Col c Row 1#1.5\(dg#10.23#\Z'\h'1m'\(dg - Note' Row 2#42.24#1.1 .TE Here there is a "pseudo-dummy" final column, with zero width separation from the preceding column, with zero-width content (because of the "\Z' ... '"), which therefore has no effect on overall layout of the main table. Finally, of course, you can also use the \n[TW] register which I described earlier; .TS tab(#), box; l r r l n n . Col a#Col b#Col c Row 1#1.5\(dg#10.23 Row 2#42.24#1.1 .TE \Z'\h'|\n[TW]u-\w'\(dg - Note'u'\(dg - Note' which alighns the right-hand end of "Note" exactly with the right-hand edge of the table (as marked by the right-hand vertical rule). But, of course, this solution is relative to the left-hand edge of the printing area, and assumes that the table is left-justified. It would not work without modification if the table itself were indented centred (and working out what the modification should be is a bit complicated, though it can still be done using \n[TW]). Ted. -------------------------------------------------------------------- E-Mail: (Ted Harding) <[EMAIL PROTECTED]> Fax-to-email: +44 (0)870 094 0861 Date: 04-Jan-07 Time: 16:35:26 ------------------------------ XFMail ------------------------------ _______________________________________________ Groff mailing list Groff@gnu.org http://lists.gnu.org/mailman/listinfo/groff