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


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

[docbook] Re: DocBook colwidth Problems


/ "Bob Stayton" <bobs@sagehill.net> was heard to say:
| Apparently the adjustColumnWidths() extension function is required for
| setting HTML table column widths.  I'm not sure why.  Perhaps the extension
| function author  Norm Walsh could explain why the function is needed.

Sure. Consider this table:

  <colspec colwidth="1.5in"/>
  <colspec colwidth="2*"/>
  <colspec colwidth="5*"/>

In CALS, "*" means "the relative width of a single column". So the
CALS meaning here is that the first column should be 1.5in wide and
the second and third columns, whatever their width, should have a
ratio of 2:5.

That's *way more* complex than you can express with HTML. In HTML, you
have to specify either the explicit width of each column, in pixels,
or the relative widths as a percentage.

Transforming the colspec definitions above into HTML requires
translating all of those units into either fixed pixels or percentages
(based on some nominal table width).

That's what the extension function does and I really don't think it
can be done without an extension function.

Maybe there should be an option that says if you specify all the
widths explicitly, use them.

                                        Be seeing you,
                                          norm

-- 
Norman Walsh <ndw@nwalsh.com>      | The only people who find what they
http://www.oasis-open.org/docbook/ | are looking for in life are the
Chair, DocBook Technical Committee | fault finders.--Foster's Law

Attachment: pgp00000.pgp
Description: PGP signature


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