[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Groff] PSPIC in Tables and Nested Tables
From: |
Robert Thorsby |
Subject: |
[Groff] PSPIC in Tables and Nested Tables |
Date: |
Mon, 12 Jun 2006 10:27:54 +1000 |
I often place graphics in tables, and I use PSPIC (in a diversion) to
do so.
When used in a diversion for placement within a table cell, PSPIC's
positioning option [-L | -R | -I n ] works IMHO in a somewhat unusual
manner. The options L, R and nothing (= center) place the image with
reference to the overall line length (or maybe page width, I'm not
sure) and _not_ with reference to the table cell boundaries. OTOH, the
I option places the image with reference to the cell -- but requires a
negative space argument in order to align the image to the centre of
the cell. These behaviours are not affected by the attributes of the
table cells.
However, when using PSPIC in nested tables, PSPIC's alignment options
"left, right and centre" now function with respect to the outer
placeholder table and not the inner diversion table -- I is
well-behaved.
For example:
.ps 14
.vs 16
.br
.di d0
.in 0
.ps 4
.vs 4
.PSPIC -I -10p /path/to/image.eps 24p 16p
.ps
.vs
.br
.di
.br
.di d1
.in 0
.TS
box;
cw(50p)p-4
c.
.sp 2p
T{
.nf
.d0
T}
.sp 4p
Text Goes Here
.sp 4p
.TE
.br
.di
.br
\" Main Table [5 cells, no rules]
.TS
[table formatting and data deleted]
\&<tab>\&<tab>T{
.nf
.d0
T}<tab>T{
.nf
Two lines
of text
T}<tab>\&
\&<tab>\&<tab>T{
.nf
.d1
T}<tab>T{
.nf
Two more
text lines
T}<tab>\&
[more table data deleted]
.TE
.rm d0 d1
If the "-I -10p" in Diversion 0 is replaced by "-L", "-R" or nothing,
the alignments of the image in the two rows change dramatically. In the
first row the alignment is now with respect to the overall page (ie,
the table is ignored) but in the second row the alignment is with
respect to the unruled Main Table not the boxed inner table.
This is all a distraction but it can get rather annoying.
Can anyone shed any light?
Robert Thorsby
- [Groff] PSPIC in Tables and Nested Tables,
Robert Thorsby <=