The <hyphenation/> command

The <hyphenation/> command sets parameters used when deciding how to hyphenate a word.

The command format is:

<hyphenation 
mode="MODE" 
type="TYPE" 
min-length="MIN-LENGTH" 
min-before="MIN-BEFORE"
min-after="MIN-AFTER" 
stop-before="STOP-BEFORE" 
stop-after="STOP-AFTER" 
/>

where :

  • MODE sets the hyphenation mode, with values off, emergency or normal.

  • TYPE sets the type of hyphenation points that may be used. It may be explicit, good or poor.

  • MIN-LENGTH is the length of the smallest word that will be considered for hyphenation. A value of zero means that the system default (currently 5) will be used.

  • MIN-BEFORE is the minimum number of characters that must appear in the word before a hyphenation point.

  • MIN-AFTER is the minimum number of characters that must appear in the word after a hyphenation point.

  • STOP-BEFORE is a list of characters that will prevent a word from being hyphenated if any one of them appears immediately before it.

  • STOP-AFTER is a list of characters that will prevent a word from being hyphenated if any one of them appears immediately after it.

Any parameters set in this command remain in force until the end tag of the enclosing element. Any arguments that are omitted retain their current values.

For the STOP-BEFORE and STOP-AFTER lists use character references for non-ascii characters. For example, the following sets the stop before characters to a hyphen and an em dash:

<hyphenation stop-before="-&#x2014;"/>

The mode and type can also be set in the Font tab of the Mapping Editor. Parameters set by this command will override values set in the current mapping.