[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Need Math Help: How to Convert Proportional Column

Subject: Re: Need Math Help: How to Convert Proportional Column Widths to Real Values?
From: "Eliot Kimber ekimber@xxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 30 Dec 2015 14:46:55 -0000
Re:  Need Math Help: How to Convert Proportional Column
I think you either have to impose some total width or apply an arbitrary
multiplier to the proportional widths (but that would only work if you are
sure the proportional values are within some reasonable range―some
programs simply convert real values to proportions by dropping the units,
so that would break this approach).

I have this problem in generating InDesign tables from DITA tables where
you know the proportional widths of the columns but not necessarily the
target table width (because the geometry is known only to InDesign). For
that case I provide a runtime parameter to set the nominal table width so
you at least get something.

Cheers,

E.
----
Eliot Kimber, Owner
Contrext, LLC
http://contrext.com




On 12/29/15, 12:18 PM, "a kusa akusa8@xxxxxxxxx"
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:

>Hello:
>
>I was looking to do something similar and found this question. In my
>case, I don't have the total table column width always. So, if I have
>a mixed col width values of 1.38,1.38.1*,1.38, how can I find the real
>value for 1*?
>
>Thanks in advance for all suggestions.
>
>
>
>On Fri, Mar 7, 2014 at 6:10 PM, Liam R E Quin <liam@xxxxxx> wrote:
>> 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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.