OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]

Subject: DOCBOOK-APPS: Fix for table cell indents and margins in PDF files


I wrote to the list some time back asking about the problems I was 
having with first-line indents and cell margins inside of tables.
The issue was that the text inside of a table cell would line up
right against the column rule, or, if you were able to set an indent,
it only applied to the very first line of the paragraph, leaving the
rest of the paragraph to have no space between it and the column rule.

I thought I'd report back that the latest round of tools *do* solve
that problem.  The tables in my PDF file now look great with regards
to spacing!  And I can *control* the spacing.

Here's what was involved...  I had to first get the latest copy
of JadeTex (3.3 for me, but Sebastian has now released 3.4) from:


I installed that per the instructions in the 'install.pdf' document
in the 'doc' subdirectory.   I later modified 'jadetex.dtx' to change
'\cleardoublepage' (the only occurence of it) to '\clearpage' so that
I didn't get extra blank pages.  After doing that, I had to do a
'make install' in the jadetex source code directory to rebuild the
jadetex format files.

Regarding openjade, I already had openjade 1.3 installed,
but as I needed to patch it, I pulled the 1.3 source from:


And then applied the patches to it ('patch -p0 < openjade-1.3.patch')
from the site:

Next, I went into Norm's 1.62 DSSSL stylesheets, into the file
'print/dbtable.dsl' and did the following:

1. Adjusted top and bottom cell margins by changing these two lines:

  (define %cals-cell-before-row-margin% 3pt)
  (define %cals-cell-after-row-margin% 3pt)

2. Adjusted the right side cell margin by modifying this line:

  (define %cals-cell-after-column-margin% 3pt)

3. Adjusted the left side cell margin by first commenting out 
   Adam Di Carlo's fix in the stylesheet:

     ;; seems to be a bug in JadeTeX -- we get a wierd indent on table
     ;;   cells for the first line only.  This is a workaround.
     ;; Adam Di Carlo, adam@onshore.com
     (define %cals-cell-before-column-margin% 
       (cond ((equal? (print-backend) 'tex)

   and replacing it with the single line:

     (define %cals-cell-before-column-margin% 3pt)

And then generating the PDF file. It all worked fine. (There is also
a  %cals-cell-content-start-indent% which can be used to control 
paragraph indenting further.)

Now, the reason that I was modifying Norm's DSSSL stylesheets 
directly is because the front end to jade that generated the
best PDF files for me is 'sgml2x', found at:


but it seems to only take a *directory* as the path to the
stylesheets (provided in /etc/sgml2x.conf).  I wanted to provide
my own single file as a DSSSL customization layer, but since the tool
didn't seem to accept that, I wound up copying Norm's 1.62 stylesheets
into a separate directory ('docbook-custom') and directly modifying
the stylesheets.

In the end, I have PDF files where the cell spacing and margins works
quite well. (You can see it if you wish at
http://www.e-smith.org/docs/manual/4.1/userguide.pdf - the tables are in
Chapter 4 and Chapter 7.)

I hope this helps some other folks out...


Dan York, Director of Training        dyork@e-smith.com
Ph: +1-613-751-4401  Mobile: +1-613-263-4312 Fax: +1-613-564-7739 
e-smith, inc. 150 Metcalfe St., Suite 1500, Ottawa,ON K2P 1P1 Canada
http://www.e-smith.com/            open source, open mind

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]

Powered by eList eXpress LLC