Reply to: blank or space functionApril 27, 2012 at 8:32 pm
Collapsing white-space is the default rendering behaviour (what dcramer is describing) but you can override that with CSS.
If the spaces in a particular element are “significant” you can alter the CSS for the current document type to include the white-space:pre property in selectors for specific elements.
Elements with this CSS property set will render spaces (including tabs and carriage returns) as those characters and not collapse them.
element in the Journalist sample (XMetaL Author Enterprise and XMetaL Author Essential) and elements in the DocBook sample (XMetaL Author Enterprise and XMetaL Author Essential) and elements in DITA documents (XMetaL Author Enterprise)
Note that if your CTM file currently has pretty printing enabled you will want to check the settings in there to make sure your pretty printing settings for specific elements don't add white-space inside these elements when saving. There is a CTM directive to preserve white-space in specific elements (ie: don't do any pretty printing inside those elements) allowing you to have pretty printing enabled for the document but turned off inside specific elements. In XMetaL Developer this property appears as “preserve space”. You will see that in the Journalist sample this directive is enabled for the