Good point, Scott, thank you. I haven't seen this before, sorry...
The syntax in the XML file would be like this: a) numeric example <Colspec colnum = "1" colname = "1" colwidth = "0.543in"/> <Colspec colnum = "2" colname = "2" colwidth = "3.984in"/> b) proportional example <Colspec colnum = "1" colname = "1" colwidth = "12*"/> <Colspec colnum = "2" colname = "2" colwidth = "88*"/> (here with the default that proportions add to "100") Best regards - Tino Scott Prentice: > Fei Min... > > Column widths can be percentages using the "NN*" format, if your r/w rules > file includes this rule .. > > writer use proportional widths; > > Cheers, > ...scott > > On 2/24/15 10:41 AM, Fei Min Lorente wrote: > >> Thanks everyone who responded to this question. The conclusion is that we >> can't expect FrameMaker to automatically size the column widths depending on >> the cells' contents. The next best solution seems to be a post-processing >> script. Maybe a preprocessing script is feasible, but since XML is supposed >> to be format-independent, we really shouldn't know the font type and size or >> padding in each cell, so preprocessing is probably a bad idea. >> >> In the interests of clarity, I should point out that Russ Ward seems to be >> correct (at least in FrameMaker 10). If no column widths are specified in >> the XML file, FrameMaker uses the column widths of the table style (i.e. >> template), even though you don't explicitly specify them. FrameMaker saves >> the number of columns and the width of them behind the scenes whenever you >> save that table style. When you import the XML table using that style, it >> uses the width of the columns in the table style going from left to right >> (of course), and if the XML table has more columns than the table style, it >> keeps using the width of the last (rightmost) column. I know it never >> truncates nor adds columns according to the table style. >> >> Thanks for letting me know that the widths have to be fixed numbers and >> can't be percentages. >> >> Fei Min Lorente >> >> Senior Technical Communicator >> >> Medical and Wireless Division >> >> [email protected] >> >> +1 519-884-9696 ext. 2297 | Waterloo office >> >> +1 519-831-4931 | mobile >> >> +1 905-631-5724 | fax >> >> www.onsemi.com [5] >> >> Hi, >> >> last time I had a closer look I found that FrameMaker would only support >> >> the CALS table model with fixed numeric column widths, not with >> >> percentages. >> >> Although it may be possible to set the widths via scripting, the result >> >> will probably not be satisfying at the first attempt. (... especially >> >> when translating the text in different languages) >> >> Each column has a numeric "column width" entry. >> >> If these entries are deleted or not written, FrameMaker assumes all >> >> colums to have the same width when interpreting the XML code. >> >> (I have an example here where all columns are output with a width of 2 >> >> cm, but I do not know what the default value would be.) >> >> Although a template may seem to specify a certain no. of columns (when >> >> inserted as a new table), in the XML workflow a template will only have >> >> influences on margins, ruling and shading. It does not mean that all >> >> tables would be complemented or trunkated to this quantity of columns. >> >> We are using FrameMaker as XML editor, so the columns widths are >> >> specified during the editing process and are thus transfered to the XML >> >> code. Indesign e.g. would not be "able" to understand this XML directly >> >> without transformation. >> >> As you can see, one XML is not like another... >> >> Tino H. Haida, Berlin >> >> Lin Sims: >> >>> _ We've an internal perl script that sets up tables at a predefined table >>> width with the columns at predefined widths, but I'm pretty sure those >>> measurements are hard-coded into the script that creates the XML file from >>> the Excel spreadsheet. It's doable if you know what sizes you're working >>> with before you get started, including how many columns you need included._ >> >>> _ _ >> >>> _ XML might let you set column widths as a percentage of page/screen width, >>> but I don't think that's directly transferable to FM. Can perl handle >>> calculations? _ >> >>> _ _ >> >>> _ On Mon, Feb 23, 2015 at 4:26 PM, Scott Prentice <sp14 at leximation.com >>> [1]> wrote:_ >> >>> _ _ >> >>> _ Fei Min..._ >> >>> _ _ >> >>> _ FM won't auto-adjust table columns in any useful way. The only way I know >>> of is to write a script or plugin to analyze the contents of the cells and >>> do the width adjustment based on some predefined logic (widest graphic, or >>> amount of text, etc.)._ >> >>> _ _ >> >>> _ Would love to hear I'm wrong .. but hot holding my breath._ >> >>> _ _ >> >>> _ ...scott_ >> >>> _ _ >> >>> _ On 2/23/15 9:16 AM, Fei Min Lorente wrote: _ >> >>> _ _ >> >>> _ Hi folks: _ >> >>> _ _ >> >>> _ I found this discussion from 2008: >>> https://forums.adobe.com/message/1279946#1279946 [2] [3], and this helpful >>> answer from Russ Ward in 2010: >>> https://forums.adobe.com/thread/577820?tstart=0 [3] [4], but I don't see >>> the solution that I'm looking for. My manager (a software development guy) >>> would like to create an XML file that I can import into FrameMaker that >>> doesn't specify the width of each column. He's taking output from Jira, and >>> people can create tables in the Description field there, but he has no way >>> of knowing how wide the columns are. He figures that if HTML can >>> automatically size the columns to suit the contents, surely FrameMaker can >>> do this too (I'm not so sure). _ >> >>> _ _ >> >>> _ I've tried it myself, and the column widths in the table template apply >>> when you don't specify widths in XML. If you have more columns than are in >>> your template, it seems to use the width of the last templated column. And >>> the tables might contain graphics as well as text. _ >> >>> _ _ >> >>> _ Anyone have any better ideas? _ >> >>> _ _ >> >>> _ I'm using FrameMaker 10 on Windows 7. I think my manager is using Perl or >>> some other scripting language. Jira outputs HTML as well as some other text >>> format. _ >> >>> _ _ >> >>> _ Fei Min Lorente _ >> >>> _ _ >> >>> _ Senior Technical Communicator _ >> >>> _ _ >> >>> _ Medical and Wireless Division _ >> >>> _ _ >> >>> _ feimin.lorente at onsemi.com [1] _ >> >>> _ _ >> >>> _ +1 519-884-9696 ext. 2297 [5] | Waterloo office _ >> >>> _ _ >> >>> _ +1 519-831-4931 [6] | mobile _ >> >>> _ _ >> >>> _ +1 905-631-5724 [7] | fax _ >> >>> _ _ >> >>> _ www.onsemi.com [4] [8] _ >> >>> __ Links: ------ [1] http://lists.frameusers.com/mailman/listinfo/framers [2] https://forums.adobe.com/message/1279946#1279946 [3] https://forums.adobe.com/thread/577820?tstart=0 [4] http://www.onsemi.com [5] http://www.onsemi.com/
_______________________________________________ You are currently subscribed to framers as [email protected]. Send list messages to [email protected]. To unsubscribe send a blank email to [email protected] or visit http://lists.frameusers.com/mailman/options/framers/archive%40mail-archive.com Send administrative questions to [email protected]. Visit http://www.frameusers.com/ for more resources and info.
