Technologies XML / XSL-FO / Référence / Extensions XSL d’Antenna House Formatter / Propriétés / abbreviation-character-count
(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 Sauts de ligne
Définit le nombre minimal de caractères considérés comme une abréviation.
Valeur : | auto | <number> |
Valeur initiale : | auto |
S’applique à : | |
Hérité : | yes |
Pourcentages : | N/A |
Les valeurs ont les significations suivantes.
auto | Utilise la valeur définie par abbreviation-character-count dans le fichier de configuration des options. |
<number> | Définit le nombre de caractères considérés comme une abréviation. |
axf:abbreviation-character-count contrôle les sauts de ligne des abréviations contenant U+002F ou /. En général, km/h ou w/o, par exemple, peuvent être coupés car la position immédiatement après / permet un saut de ligne, ce qui n’est pas souhaitable. Dans UAX#14 : Propriétés des sauts de ligne, il est indiqué d’éviter une coupure dans ces cas. Dans AH Formatter V6.3, si le nombre de caractères du mot suivant / est inférieur ou égal à axf:abbreviation-character-count, le mot est considéré comme une abréviation et n’est pas coupé. Le même comportement s’applique aussi à la césure. Une chaîne n’est considérée comme une abréviation que si elle appartient à l’une des écritures suivantes.
Latn
Cyrl
Grek
Zyyy
axf:abbreviation-character-count doit être un entier positif ou nul. 0 désactive le traitement des abréviations. Si la ligne déborde sans qu’un point de coupure soit trouvé, un saut de ligne peut être forcé immédiatement après /.
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="Specify the minimum character count to be regarded as an abbreviation"/>
<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">
Specify the minimum character count to be regarded as an abbreviation
</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 can be specified by using axf:abbreviation-character-count. Normally, line break occurs with km/h, w/o, etc. as what comes right after / is in a scope of line break, but it can be avoided by this setting.
auto is the default value of axf:abbreviation-character-count and 3 is set as default by abbreviation-character-count in the option setting file.
</fo:block>
<fo:block font-size="1.2em">
<fo:block-container>
<fo:block>
axf:abbreviation-character-count="auto"
</fo:block>
<fo:block border="0.5pt solid" font-size="1.5em" axf:abbreviation-character-count="auto">
sample sample sample sample sample sample sample sample km/hr sample
</fo:block>
<fo:block space-before="1em">
axf:abbreviation-character-count="2"
</fo:block>
<fo:block border="0.5pt solid" font-size="1.5em" axf:abbreviation-character-count="2">
sample sample sample sample sample sample sample sample km/hr sample
</fo:block>
<fo:block space-before="1em">
axf:abbreviation-character-count="1"
</fo:block>
<fo:block border="0.5pt solid" font-size="1.5em" axf:abbreviation-character-count="1">
sample sample sample sample sample sample sample sample km/hr sample
</fo:block>
</fo:block-container>
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>Résultat :