axf:abbreviation-character-count

(Auszug aus "XSL-FO ― Die Referenz" von 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

Category Line Breaking

Specifies the minimum number of characters considered to be an abbreviation.

Value:auto | <number>
Initial:auto
Applies to:fo:block
Inherited:yes
Percentages:N/A

Values have the following meanings.

autoThe value specified by abbreviation-character-count in the Option Setting File is adopted.
<number>Specifies the number of characters considered to be an abbreviation.

axf:abbreviation-character-count controls the line break of the abbreviation delimited by U+002F or /. In general, the line break occurs with km/h or w/o, etc. because the position right after / is the target for the line break and it's not desirable. In UAX#14: Line Breaking Properties, it is written to avoid splitting in such cases. In AH Formatter V6.3, when the number of characters of the word right after / is less than or equal the specified number with axf:abbreviation-character-count, the word is considered as the abbreviation and the line does not break. The same behavior is also applied to the hyphenation. Only when the string is one of the following scripts, it is considered as an abbreviation.

  • Latn
  • Cyrl
  • Grek
  • Zyyy

The axf:abbreviation-character-count must be an integer number of 0 or more. 0 does not control over the abbreviation. In addition, when the line overflows without finding the line break position, the line break may forcibly occur right after /.

XSL-FO sample:

<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">

Antenna House, Inc.

Specify the minimum character count to be regarded as an abbreviation

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.

axf:abbreviation-character-count="auto"

sample sample sample sample sample sample sample sample km/hr sample

axf:abbreviation-character-count="2"

sample sample sample sample sample sample sample sample km/hr sample

axf:abbreviation-character-count="1"

sample sample sample sample sample sample sample sample km/hr sample

Download der Beispiele

Output:

Tipp der data2type-Redaktion:
Zum Thema XSL-FO bieten wir auch folgende Schulungen zur Vertiefung und professionellen Fortbildung an: