Home Forums General XMetaL Discussion colwidth attribute with percentage sign (%) and table display Reply To: colwidth attribute with percentage sign (%) and table display

Derek Read

Reply to: colwidth attribute with percentage sign (%) and table display

XMetaL supports the CALS spec for CALS editing, and so does not support this. The proper way to denote proportional widths for CALS tables ([url=http://www.oasis-open.org/specs/tm9502.html]OASIS CALS spec[/url]) is to use the asterisk.

The only solution for this that I can think of is to convert the % symbols to asterisks. I could log a feature request for this but it is unlikely to be implemented anytime soon as I suspect this is a unique requirement for this client only (ie: not of much use to anyone else) because we have not had any other requests to date along similar lines. I will note it however in case it does begin to come up as a frequent request.

I'm not sure I understand the read-only issue. For documents that are read-only could you not simply make the replacements after the document is open? This would not affect the document on disk and the user would not be saving a read-only document (I assume) unless perhaps they use SaveAs, but it sounds like you are OK with having them use asterisks in “new” documents (
Save As creates a new document).

You would probably use the event On_Document_Open_Complete to run your macro and then either Range or DOM calls to replace CALS attributes containing the questionable characters (%) with new values containing asterisks (*). If absolutely necessary you could keep track of whether the document was “legacy” (ie: were changes made?) and then revert those changes before saving if absolutely necessary (say perhaps for legacy documents that are not read-only). There is an On_Before_Document_Save event for that purpose.

Reply

Products
Downloads
Support