Home Forums General XMetaL Discussion Typeing 2 spaces Reply To: Typeing 2 spaces

Derek Read

Reply to: Typeing 2 spaces

Default behaviour (no special CSS settings configured) for Tags On and Normal view is to collapse multiple white-spaces and treat them as insignificant (W3C XML recommendation definition of “insignificant”).

To make them all visible in Tags On or Normal view you will need to change the white-space property in the CSS for the element that will contain the text. You would want to probably set this to either “pre” or “pre-wrap”.

If you have pretty printing enabled then you may want to disable it entirely or just for that element. Whether you want to do this will depend on whether you care if just your extra spaces are to be inserted. I'm guessing that if you care about inserting extra spaces then you'll also care about XMetaL adding them for pretting printing as well. If you want to disable it just for the one element you do that in the element's pretty printing section in the CTM file. The setting is listed as “Preserve Space” in the “Text Layout” dialog accessed via the Properties window in XMetaL Developer (when you have a CTM file open). In the CTM file itself it is inserted as . See the Journalist example's CSS and CTM settings for the “ProgramListing” element. See attached screenshots.

You may also wish to increase the general pretty printing property in the CTM file or set the on the individual element (this one is new to 7.0 and not included in the XMetaL Developer GUI). The CTM files for DITA use this property on the DITA element “imagemap”.

Having said all of this it would be good to know why you need to enter multiple spaces between words. Clients have asked XMetaL Support about this type of thing in the past and it has turned out in several cases that they actually don't really want extra spaces in their XML. They were trying to compensate for flaws in some kinds of output. Those are best dealt with by fixing whatever is generating your output instead. In some cases when you really do want the text to look different (but there isn't really anything wrong with the output) adding extra markup might also be needed so that you end up identifying a special exception:
[code]This is a test.[/code]

Then you might change your output engine to lay that para out by adding additional spaces between words programmatically, or by taking advantage of specific formatting properties supported in the output engine (such as font kerning or word spacing) or the viewing application (such as with CSS in an HTML page).

Reply

Products
Downloads
Support