xsl-list
[Top] [All Lists]

Re: [xsl] Need Math Help: How to Convert Proportional Column Widths to Real Values?

2014-03-07 18:10:29
On Fri, 2014-03-07 at 17:51 -0600, Eliot Kimber wrote:

For example, say that I have two proportional columns of width "1*" and
"1.39*" and the available width is 240pt.

How do I determine fraction of 240 each of these proportions get?

1. add up the proportional values; call that Peter.
2. subtract any fixed-width columns from the available width to get
   whatever remaineth; call that Wendy.
3. each column has width in proportion, so that a column with width 1.38
   has actual width of Wendy × 1.38 divided by Peter.
(you could call them ProportionalTotal and WidthAvailable rather than
Peter and Wendy if you wanted I suppose.)

-- 
Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/
Pictures from old books: http://fromoldbooks.org/
Ankh: irc.sorcery.net irc.gnome.org freenode/#xml


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--