[Table of Contents] [docx version]

WordprocessingML Reference Material - Table of Contents

softHyphen (Optional Hyphen Character)

This element specifies that an optional hyphen character shall be placed at the current location in the run content. An optional hyphen is a character which may be used as a valid line breaking character for the current line of text when displaying this WordprocessingML content, using the following logic:

• When this character is not the character which is used to break the line, then it shall not change the normal display of text (it shall have zero width)

• When this character is the character used to break the line, it shall display using the hyphen-minus character within the display of text

[Note: This character is typically used to mark locations where a word may optionally be hyphenated without causing the hyphen character to be displayed unnecessarily. end note]

[Example: Consider the following sentence in a WordprocessingML document:

This sentence needs to be long enough to cause some kind of line breaking.

Normally, just as shown above, this sentence not would be displayed on a single line as it is long enough to require line breaking (given the width of the current page). However, if an optional hyphen were inserted after the letter r in breaking, as follows:

<w:r>
<w:t>This sentence needs to be long enough to cause some kind of line br</w:t>
<w:softHyphen/>
<w:t>eaking.</w:t>
</w:r>

This would allow a break at that position, and when that location is the point of the line break, would insert a hyphen-minus in the word after that character:

This sentence needs to be long enough to cause some kind of line br­eaking.

If this was not the point of the line break, then no character would be displayed at that location:

This sentence should not be long enough to cause line br­eaking.

The sentence now does not break at that location, so no hyphen appears in the word breaking. end example]

Parent Elements

r (§7.1.2.87); r (§2.3.2.23)

The following XML Schema fragment defines the contents of this element:

<complexType name="CT_Empty"/>