Home Forums DITA and XMetaL Discussion Long lines of code in Plain Text View Reply To: Long lines of code in Plain Text View

Derek Read

Reply to: Long lines of code in Plain Text View

There are two ways to handle this.

1. Using the settings in the Tools > Options dialog on the PlainText view tab in the section called “Word Wrap” tells XMetaL to do “soft” wrapping (ie: what you see should not affect the actual XML and should not be saved to disk).

2. Enable “Pretty Printing” by running the macro called “DITA Configuration: Turn ON Pretty-Printing” listed in the dropdown on the Macros toolbar. This *does* alter the XML content by inserting real line breaks, indentation, etc, so you should experiment with this on some test files and with the rest of your software, including the DITA OT and the specific output formats you generate using it, because many people (and the software they use) have different requirements for Pretty Printing.

Pretty Printing can be further controlled (at the element level) by modifying the CTM file used by  the particular document type being edited. For DITA these files live here: DITAXACs_ditabase.ctm. That type of customization is not normally expected to be done by people not intimately familiar with creating XMetaL Author customizations (generally people that have XMetaL Developer), so if you have specific needs that the default Pretty Printing settings do not address you may wish to contract any required changes out to our Professional Services team or one of our partners.

For people wondering if this affects them if they are not using DITA it does, everything here applies equally except for the macros specifically included with XMetaL Author Enterprise to make it easy to turn Pretty Printing on and off (these only affect DITA and simply copy a few existing files around). For all other DTDs and Schema the CTM file is designed as part of the customization (possibly created by you, one of our partners or our Professional Services team) using XMetaL Developer and its location will vary depending on the method you use to deploy your customization files. If you designed your customization then you will obviously know where the CTM file is. If you did not please check with the people that provided it and ask them to make changes.