This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: howto make nicer tables?


On Friday 17 January 2003 07:21, A.R. (Tom) Peters wrote:
> I am processing DocBook/XML with jade and jadtex and hence to pdf and ps.

Switch to openjade. I recently experienced wierd problems with 
tablefootnotes while using Jade, but they disappeared after switching
to openjade (I believe the two were correlated, but I was also 
experimenting with customizing the dsssl so not 100% sure).

> I am using the standard DSSSL stylesheets by Norman Walsh.
> Now tables when printed have the following flaws:
> a) all columns are equally wide and not adjusted to width of content.

You need to use a <colspec colwidth="x*" /> tag for each column.
I think it is recommended to use relative width specifiers (the *) if you 
are transforming to  print as well as html, but if you are only
transforming to print maybe a specific dimension like colwidth="30mm"
might be fine.

You might also experience the problem of long text strings not being wrapped 
to fit the cell dimensions. I believe this can be cured by customizing 
the stylesheets to add the dsssl  attribute
         lines:  'wrap 
to table cells. On the other hand maybe switching to openjade fixed this too
(not sure at the moment).

> b) text starts immediately next to the table border (when left-adjusted),
> without any spacing.

under debian linux there is a file :
 /usr/share/sgml/docbook/stylesheet/dsssl/modular/print/dbtable.dsl

It contained the following parameters (along with several others)
(define %cals-cell-content-start-indent% 2pt)
(define %cals-cell-content-end-indent% 2pt)

You should be able to redefine those in your customization layer.

> I do specify the align="justify" label in the tgroup tag, but it makes no
> difference.
> How can I improve the appearence on these two points?
> 	Thanx,

What suprises me is that there is no docbook attribute for 
explicitly setting the desired width of the table. There is
only the pgwide attribute. I would have liked to be able to say
tablewidth="50%" of the page, just like in html. 
pgwide basically switches from 100% to an invariably bad 
automatic calculation. 

You can work around this by using tabstyle attributes  and 
hacking the dsssl code, but if you have many unique tables
it could be quite painful.

I get the feeling that the dsssl route is a technological 
dead end and you would probably be better off switching to xsl
rather than learning to hack dsssl, especially as you are already
using docbook/XML. I think passivetex is also being more 
actively developed than jadetex, if I understand correctly.

cheers
Doug


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]