Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How do I set column widths in read/write rules?

Advocate ,
Apr 03, 2013 Apr 03, 2013

Hello structure experts,

I am reading a set of DITA files into a specific FM template format, and there is one detail I cannot get to work properly. It should be possible to define column widths in a table, even if the DITA file does not include that information. But the Structure Application Developer Reference does not give the information on which string to pass to the column widths fm property. Does anyone out there have experience in doing this ?

Thanks

Jang

TOPICS
Structured
1.5K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Advocate , Apr 03, 2013 Apr 03, 2013

Got it !!!

Turned out to be simple, but the info was more or less hidden in the Dev Ref Guide: I had already put the "fm property column widths is value " line in but did not know the syntax for the values. Turns out you need to delimit the values by spaces, not commas. The parser does not give ANY useful information about this, just mentions 'syntax error near somewhere' or completely ignores the values you specify.

This is how the rule for my DITA properties element now works out:

element "proper

...
Translate
Contributor ,
Apr 03, 2013 Apr 03, 2013

Hello Jang,

this information in the r/w-rules should do the trick:

element "colspec"

{

  is fm colspec;

  attribute "colnum" is fm property column number;

  attribute "colname" is fm property column name;

  attribute "align" is fm property cell alignment type;

  attribute "charoff" is fm property cell alignment offset;

  attribute "char" is fm property cell alignment character;

  attribute "colwidth" is fm property column width;

  attribute "colsep" is fm property column ruling;

  attribute "rowsep" is fm property row ruling;

}

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Apr 03, 2013 Apr 03, 2013

Hi Gorly,

Thanks for this info. I need to introduce the colspec in the reader rules, as there is none in the DITA file for this particular table type, but I think I will manage.

Ciao

Jang

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Apr 03, 2013 Apr 03, 2013

Hi Jang,

With apologies for the commercialized post (hopefully OK since you already own the software), FrameSLT Node Wizard Scripts can set table column widths, perhaps as a post-processing option in the event that you don't get it to work on import.

Russ

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Apr 03, 2013 Apr 03, 2013

Hi Russ,

there's nothing bad about a good plug. In this case, the customer does not own FrameSLT and the project will not require it for anything else, so I will have to solve it in the read-write rules (so that no additional scripting is required) or maybe do it from ExtendScript if all else fails. There is only one table with a specific framemaker element name that requires fixed settings for its columns. I am checking various options, might even be able to do this via the EDD.

Thanks

Jang

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Apr 03, 2013 Apr 03, 2013

Got it !!!

Turned out to be simple, but the info was more or less hidden in the Dev Ref Guide: I had already put the "fm property column widths is value " line in but did not know the syntax for the values. Turns out you need to delimit the values by spaces, not commas. The parser does not give ANY useful information about this, just mentions 'syntax error near somewhere' or completely ignores the values you specify.

This is how the rule for my DITA properties element now works out:

element "properties" {

  is fm table element;

  fm property columns value is "3";

  fm property column widths value is "5cm 5cm 6cm";

  }

It works. I earn 10 points for answering my own question. 🙂

Ciao

Jang

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Apr 03, 2013 Apr 03, 2013
LATEST

Jang, thanks for the followup. I wasn't aware that this was even possible, but luckily I didn't have the confidence to assert it as fact.

Russ

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines