|
Subject: Re: alignment in tables From: Jany Quintard <quintard.j@xxxxxx> Date: Tue, 18 May 1999 17:23:28 +0200 (MEST) |
On Tue, 18 May 1999, Pieter Rijken wrote:
> I cannot get the alignment of text in tables right.
> The table I want to format consists of 3 columns.
> Text in the first and third column is left aligned,
> while the contents of the second column should be
> right-aligned.
>
> An example table in SGML looks like:
>
> <table columns="3">
> <row>
> <cell>first column</cell>
> <cell>second column</cell>
> <cell>third column</cell>
> </row>
> </table>
>
> I'm trying to display this as:
>
> first row second row third row
> \-------/ \---------------/ \-------/
> column 1 column 2 column 3
>
> I try to achieve this with the following DSSSL script
>
> (element table
> (make table
> ; display-alignment: 'start
> (make table-column
> display-alignment: 'start)
> (make table-column
> display-alignment: 'end)
> (make table-column
> display-alignment: 'start)
> (process-children)))
>
> (element row
> (process-children))
Well, I don't know the cell-alignment characteristic. I get the result I
want by using quadding: on a paragraph in the table-cell ; something like
the following 5~:
(element tbody
(make sequence label: 'tbody
quadding: 'start
(process-children)))
(element (tbody row)
(make table-row
(process-children)))
(element tfoot
(make sequence label: 'tfoot
(process-children)))
(element (tfoot row)
(make table-row font-posture: 'italic
quadding: 'end
(process-children)))
(element (entry)
(make table-cell
(make paragraph
(process-children-trim))))
I am not sure this is the "good" way, but it work with the RTF backend.
See if you can adapt it to your needs.
-------------------------------------------------------
Jany Quintard | Jeg er en flot fyr,
IBM Paris Laboratory | kun jeg trækker maven ind
Tel : 33 (0)2 51 16 40 36 |
DSSSList info and archive: http://www.mulberrytech.com/dsssl/dssslist
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: alignment in tables, Sebastian Rahtz | Thread | Re: alignment in tables, G. Ken Holman |
| Re: alignment in tables, Sebastian Rahtz | Date | Re: alignment in tables, G. Ken Holman |
| Month |