Re: Table Height - explicitly setting AND Re: Title Page with a Table

Subject: Re: Table Height - explicitly setting AND Re: Title Page with a Table
From: Oisin McGuinness <oisin@xxxxxxxx>
Date: Fri, 20 Feb 98 11:29:34 -0500
This is partly a comment on Norman Walsh's reply, which I saw in Digest
number 236. Also partly a reply to  Glenn R. Kronschnabl's query.

For a large SGML to RTF conversion project, (to be explicit, the SGML is
ArborText's "The Publisher"---not to be confused with the Adept series of products), I
encountered many tables where we had an explicit row height setting.
Sample table code (just to convince you it is NOT the same table model as in
the query):

<tbl><?Pub Lcl Width="absolute">

<table wdm="abs" cwl="1.49in:1.48in">
<rowrule rtl="=:=">
<tablerow hdr="1">
        <cellrule rty="=">
        <tablecell chj="c" cvj="t" cts="bi">Manager
</tablecell>
        <cellrule rty="=">
        <tablecell chj="c" cvj="t" cff="MONO" cts="bf">Employee
</tablecell>
        <cellrule rty="=">
</tablerow>
<rowrule rtl="=:=">
<tablerow rht="0.78in">
        <cellrule rty="=">
        <tablecell chj="l" cvj="t"></tablecell>
        <cellrule rty="=">
        <tablecell chj="l" cvj="t"></tablecell>
        <cellrule rty="=">
</tablerow>
<rowrule rtl="=:=">
</table>

</tbl>


Notice the rht="0.78in" attribute on the 2nd tablerow. The intention is to generate 2 blank boxes
exactly the right size to contain "stamps" etc. 
Since I couldn't find any characteristic that?let me set this in the Rtf backend, I bit the bullet and
implemented a Jade extension, modifying the source file RtfFOTBuilder.cxx in order to
implement a characteristic of tablerow, which I call?table-row-height, and which translates into
the RTF control sequence \trrhN, where N is the right # of twips. The implementation is not the
cleanest: Jade stores a table as a Vector of Vector of cells, with no explicit row structure, so to make
the changes as small as possible, I added a tableRowHeight field to every cell (groan!), but only use that one
from the first cell in each row when outputing the table. It works.  (Other extensions I've made
include a characteristic to set the first page of a document to something other than 1, and a change
to the header/footer margin handling. Does anyone have an extension that handles
graphic files such as WMF files, allowing for rescaling etc? )

Of course, if the row height is not an actual attribute of an element (it is for me), but a PI, you might
also want to do some scripting to make the height an attribute so you can get at it in the style sheet. This
probably also involves some DTD changes. (I had to do a lot of this for the
Publisher to RTF project, since many important style features are represented by PI's like
the <?Pub Lcl Width="absolute"> attribute on the table tag in the sample.)

By the way, if anyone needs "The Publisher" to RTF style sheets, I've been on the verge of asking
my management for permission to release the code and scripts for public consumption. Would
anyone from ArborText care to comment on whether they object/care? (The code currently is
targeting at our specific document conversion needs. So it is strong on simple letters, memos, lists
tables --- 400 lines of code in DSSSL for this-- but weak on chapters/parts/sections etc.) Does
anyone need this besides me?

I should say that the tables in "The Publisher" were extraordinarily good---it also helps to have
a TeX backend. It is rather painful to convert into RTF/Word, where one cannot do such simple
things in a reasonable way as align table entries on decimal points (Word overlays Tabs on top
of Tables!!!!!!), or set a table row header attribute without forcing it to be at the top of a page (see
the RTF spec on the control word \trhdr, or have captions repeat on every page for long tables etc.


Oisin McGuinness

Sumitomo Bank Capital Markets
277 Park Avenue
New York NY 10172
USA

(212)-224-4913, email: oisin@xxxxxxxx


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


Current Thread
  • Re: Table Height - explicitly setting AND Re: Title Page with a Table
    • Oisin McGuinness - from mail1.ability.netby web4.ability.net (8.8.5/8.6.12) with ESMTP id LAA16524Fri, 20 Feb 1998 11:32:31 -0500 (EST) <=
      • Norman Walsh - from mail1.ability.netby web4.ability.net (8.8.5/8.6.12) with ESMTP id LAA16965Fri, 20 Feb 1998 11:59:08 -0500 (EST)
        • Chris Maden - from mail1.ability.netby web4.ability.net (8.8.5/8.6.12) with ESMTP id MAA17230Fri, 20 Feb 1998 12:10:27 -0500 (EST)