General XMetaL Discussion

XMetaL Community Forum General XMetaL Discussion Styling non-breaking spaces

  • sandvik

    Styling non-breaking spaces

    Participants 3
    Replies 4
    Last Activity 12 years, 8 months ago

    Using XMAX, is there any way to style non-breaking spaces to make them distinguishable from a regular space?

    thanks,
    – craig

    Reply

    Derek Read

    Reply to: Styling non-breaking spaces

    Until we specifically support such a feature (assuming you are looking for a checkbox you can simply turn on and off) the only way to do this is to specify a font in the XMetaL customization that contains a visible glyph defined for this character. This would be done in the CSS file or using the APIs provided for manipulating styling, including Selection.ContainerStyle.

    Reply

    sandvik

    Reply to: Styling non-breaking spaces

    I was actually hoping for a CSS solution. Is there a way (propietary or not) to select the nbsp character in CSS? That is, select by codepoint or by string content.

    Since posting, I've discovered that DITA has an nbsp entity defined. That could meet our needs, as the entity reference displays in Tags On view. A CSS solution would be ideal though.

    thanks,
    – Craig

    Reply

    dcramer

    Reply to: Styling non-breaking spaces

    Just thinking out loud: You could have a processing-instruction or an empty inline element (a specialization of something that is allowed in all places you need it) that you render in the desired way using css (). Then add a template to your xslts that match the pi or element and replaces it with a real nonbreaking space. Then add a keyboard shortcut and macro to insert the pi or element quickly.

    David

    Reply

    Derek Read

    Reply to: Styling non-breaking spaces

    Nothing smaller than an element can be styled using CSS.

    Reply

  • You must be logged in to reply to this topic.

Lost Your Password?

Products
Downloads
Support