Technologies XML / XSL-FO / Référence / Extensions XSL d’Antenna House Formatter / Propriétés / hyphenation-zone

(Extrait de « XSL-FO ― Die Referenz » de Manuel Montero Pineda & Steffen Herkert, 2016, dpunkt.verlag)

A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z

Catégorie Extensions de césure

axf:hyphenation-zone limite la zone où la césure est autorisée.

Valeur :

none | <length>

Valeur initiale :

none

S’applique à :

fo:block

Hérité :

yes

Pourcentages :

N/A

Les valeurs ont les significations suivantes.

none

La césure n’est soumise à aucune restriction.

<length>

Si la distance entre la fin d’un mot et la fin de la ligne est inférieure ou égale à la valeur spécifiée, le mot suivant n’est pas coupé.
Une valeur inférieure ou égale à 0 n’est pas valide.

Exemple XSL-FO :

<fo:root xml:lang="en" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:cpfo="http://www.compart.net/xmlns/cpfo" xmlns:svg="http://www.w3.org/2000/svg" xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions">
<axf:document-info name="document-title" value="Specifying the character count and zone of the word to be hyphenated"/>
<axf:document-info name="author" value="Antenna House, Inc."/>
<fo:layout-master-set>
<fo:simple-page-master page-height="297mm" page-width="210mm" margin-top="10mm" margin-left="20mm" margin-right="20mm" margin-bottom="10mm" master-name="PageMaster1">
<fo:region-after extent="7mm"/>
<fo:region-body margin-top="0mm" margin-left="0mm" margin-right="0mm" margin-bottom="10mm"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="PageMaster1">
<fo:static-content flow-name="xsl-region-after">
<fo:block font-size="0.8em" text-align="right" color="green">
<fo:basic-link external-destination="http://www.antennahouse.com/">
Antenna House, Inc.
</fo:basic-link>
</fo:block>
</fo:static-content>
<fo:flow flow-name="xsl-region-body" font-family="serif" font-size="1em" line-height="1.4" axf:hyphenate-hyphenated-word="false" hyphenate="true">
<fo:block span="all" font-family="sans-serif" font-size="2em" font-weight="bold" line-height="2" space-before="1em" space-after="1em" space-before.conditionality="retain" space-after.conditionality="retain" background-color="#EEEEEE">
<fo:block start-indent="1em" end-indent="1em">
Specifying the character count and zone of the word to be hyphenated
</fo:block>
</fo:block>
<fo:block span="all" space-before="1em" space-after="1em" space-after.conditionality="retain" text-indent="0em" border="1pt solid #9999FF" start-indent="0.5em" end-indent="0.5em" padding="0.5em" text-align="justify">
The minimum character count (integral value of 1 or more) of the word to be hyphenated can be specified by axf:hyphenation-minimum-character-count. The available range to be hyphenated can be controlled by axf:hyphenation-zone. With axf:hyphenation-zone, if the length from the end of a word to the end of line is less or equal to the specified value, the following word is not hyphenated. It is invalid when 0 or less value is specified. 
</fo:block>
<fo:block space-before="1em" font-family="sans-serif" font-size="1.2em" font-weight="bold" text-indent="0em" line-height="2" keep-with-next.within-column="always">
No setting of axf:hyphenation-minimum-character-count 
</fo:block>
<fo:block border="1pt solid gray" text-align="justify" hyphenate="true" font-size="1.6em" xml:lang="en">
a sample sample sample sample sample sample sample sample 
<fo:inline color="red">
hyphenation
</fo:inline>
 sample sample sample sample
</fo:block>
<fo:block space-before="1em" font-family="sans-serif" font-size="1.2em" font-weight="bold" text-indent="0em" line-height="2" keep-with-next.within-column="always">
axf:hyphenation-minimum-character-count="12"
</fo:block>
<fo:block border="1pt solid gray" space-after="1.5em" text-align="justify" hyphenate="true" axf:hyphenation-minimum-character-count="12" font-size="1.6em" xml:lang="en">
a sample sample sample sample sample sample sample sample 
<fo:inline color="red">
hyphenation
</fo:inline>
 sample sample sample sample
</fo:block>
<fo:block space-before="1em" font-family="sans-serif" font-size="1.2em" font-weight="bold" text-indent="0em" line-height="2" keep-with-next.within-column="always">
axf:hyphenation-zone="none"
</fo:block>
<fo:block border="1pt solid gray" text-align="justify" hyphenate="true" axf:hyphenation-zone="none" font-size="1.6em" xml:lang="en">
a sample sample sample sample sample sample sample sample 
<fo:inline color="red">
hyphenation
</fo:inline>
 sample sample sample sample
</fo:block>
<fo:block space-before="1em" font-family="sans-serif" font-size="1.2em" font-weight="bold" text-indent="0em" line-height="2" keep-with-next.within-column="always">
axf:hyphenation-zone="4em"
</fo:block>
<fo:block border="1pt solid gray" text-align="justify" hyphenate="true" axf:hyphenation-zone="4em" font-size="1.6em" xml:lang="en">
a sample sample sample sample sample sample sample sample 
<fo:inline color="red">
hyphenation
</fo:inline>
 sample sample sample sample
</fo:block>
<fo:block space-before="1em" font-family="sans-serif" font-size="1.2em" font-weight="bold" text-indent="0em" line-height="2" keep-with-next.within-column="always">
axf:hyphenation-zone="5em"
</fo:block>
<fo:block border="1pt solid gray" text-align="justify" hyphenate="true" axf:hyphenation-zone="5em" font-size="1.6em" xml:lang="en">
a sample sample sample sample sample sample sample sample 
<fo:inline color="red">
hyphenation
</fo:inline>
 sample sample sample sample
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>

Télécharger les exemples

Résultat :

haut de page