Home Forums General XMetaL Discussion How do writers enter a non-breaking space in XMetal Author Essential 8.0 Reply To: How do writers enter a non-breaking space in XMetal Author Essential 8.0

Derek Read

Reply to: How do writers enter a non-breaking space in XMetal Author Essential 8.0

Yes, Alt+Numpad 0160 is the easiest solution.

This character has not been available on those toolbars in any version that I recall. I suspect that if it was in your version it was there due to customization. If so, bringing the customization files along from your old version to the current one should give you that same functionality, whatever it was.

If not, you could add it by customizing either toolbar. You'd need to create a macro first (to tie to a toolbar button) and find an appropriate icon for the button (the software does not include anything I would consider “nice”, so you might want to draw a new one, which means even more customization). Such a macro could use the Selection.TypeText() API to insert the character (there are other APIs that could be used instead but this will do). Personally, I'd avoid toolbar customization in this case as I don't think it's worth the trouble.

If the numpad solution is difficult for your users to remember (or maybe they don't have a numpad, or are using a laptop where it is a PITA) and you'd like to give them something slightly easier you could add a macro with a new shortcut. Perhaps Shift+Space or something else your users prefer. Note that Ctrl+Space switches views and Alt+Space opens the application context menu, so best not to use those.

[code=example]

Selection.TypeText(“ ”);
//Note: could also use   or a real no-break space.
]]>

[/code]

I use the numbered character entity reference in this example to avoid issues with the forum changing the character, copying from the forum (which might change it if it isn't changed by the forum) and saving the MCR file. You could just replace it with a “real” no-break space provided you save your MCR file using UTF-8 encoding. Regardless, the character will be inserted as a no-break space character. As written, this particular macro will work in all three editing views (which is why I chose this API over others as some won't work in Plain Text view).

If you don't want the macro to appear in the list in the Macros toolbar or the Macros dialog change the “hide” value.
If you want it to be available to all schemas put the macro in an application-level MCR file (one you have added to your Startup folder).
If you want it to be available to a specific schema add it to the MCR file associated with that schema (DTD or XSD).
If you are not the person in charge of creating customizations for XMetaL Author at your organization then it would be best to have them add it instead to make sure it does not conflict with anything they have created.

Reply

Products
Downloads
Support