Control position of tables

Subject: Control position of tables
From: "Jordi Mulet" <jmulet@xxxxxxxxxx>
Date: Mon, 30 Mar 1998 17:08:11 +0200
Hello,
We have controlled the position of the table inside the page with a PI
inside the INFORMALTABLE tag that controls the total width of the table,
using OMLE ( <200 instructions) to calculate the sum of colwidths
Next, with a customization of the stylesheet, I catched the PI and next I
formatted the table output with the display-group rule.

Here the instance:

<informaltable>
    <?width 330pt>                    ; 330 is the sum of colwidths
        <tgroup>........ </tgroup>
    <?width 200pt>
        <tgroup>........</tgroup>
</informaltable>

Here  the customized style-sheet :

(define ($pi-widthtable$ informaltable)
  (let ((widthtable (pi-value informaltable "width")))
      (if widthtable
      (measurement-to-length widthtable)
      #f)))

(element INFORMALTABLE
  (let ((widthtable ($pi-widthtable$ (current-node) )
        ))
  (make display-group
     start-indent: (if widthtable (/ (- %text-width% widthtable) 2 )
                        (/ (- %text-width% inherited-start-indent) 2)  )
    space-before: %block-sep%
    space-after: %block-sep%
    (process-children)))
  )

I know that surely it isn't the "best" and "correct" solution but for now it
works.
What is your opinion ?
Next we will try to modificate its

Jordi Mulet
Editorial Praxis S.A


 DSSSList info and archive:  http://www.mulberrytech.com/dsssl/dssslist


Current Thread
  • Control position of tables
    • Jordi Mulet - from mail1.ability.netby web4.ability.net (8.8.5/8.6.12) with ESMTP id KAA00764Mon, 30 Mar 1998 10:45:28 -0500 (EST) <=