Pages: 1
Print
Author Topic: Long lines of code in Plain Text View  (Read 10427 times)
nancyt
Member

Posts: 9


« on: September 15, 2009, 03:55:52 PM »

How do you prevent extremely long horizontal lines of code from appearing in xml files viewed in Plain Text View? I'm using XMetal Author 5.5 to edit DITA files with the options for Plain Text View set to the default setting (Word Wrap off). Is this what controls how the lines of code are constructed?

Logged
Derek Read
Program Manager (XMetaL)
Administrator
Member

Posts: 2621



WWW
« Reply #1 on: September 15, 2009, 04:20:54 PM »

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: <xmetal installation path>\DITA\XACs\<dtdname>\<dtdname>_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.

Non DITA:
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.
« Last Edit: September 15, 2009, 04:37:12 PM by Derek Read » Logged
achu
Member

Posts: 43


« Reply #2 on: March 01, 2010, 02:32:28 PM »

How about in XMAX? how to wrap long line in the plain text view in XMAX?
Logged
Derek Read
Program Manager (XMetaL)
Administrator
Member

Posts: 2621



WWW
« Reply #3 on: March 01, 2010, 07:29:05 PM »

For XMAX someone will need to implement pretty printing settings in the CTM file if these have not already been set for the document type you are working with (basically the answer in my post under "Non DITA").
Logged
Pages: 1
Print
Jump to:  

email us