axf:text-justify-trim

(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 Trimming and Hanging

Specifies the way to trim in text justification. [CSS3-Text] Additional compression: The 'text-justify-trim' property

Value:none | [ punctuation || punctuation-except-fullstop || punctuation-except-middledot || [ kana | ideograph ] || inter-word ] | auto
Initial:auto
Applies to:all block-level and inline-level formatting objects
Inherited:yes
Percentages:N/A

Values have the following meanings.

none Do not trim Japanese text.
punctuation Trim text with parentheses, middle dots, and punctuations of full width in Japanese.
punctuation-except-fullstopBehaves as the same as the punctuation value except for the following two characters.
U+3002IDEOGRAPHIC FULL STOP
U+FF0EFULLWIDTH FULL STOP

punctuation-except-middledot Behaves as the same as the punctuation value except for the following middle dots.
U+30FBKATAKANA MIDDLE DOT
U+FF1AFULLWIDTH COLON
U+FF1BFULLWIDTH SEMICOLON

kanaTrim Hiragana and Katakana a bit.
ideographTrim spaces between Kanji or Kana.
inter-wordTrim spaces between Western words.
auto Dependent on the system setting. This is the value specified by punctuation-trim and text-justify-mode in the Option Setting File. However, when axf:avoid-widow-words is "true", it is considered as "Ideograph inter-word" specified.

Trim the spaces between characters as specified so that text fits into a line. When axf:punctuation-trim="all" is specified, there may be no more space to trim.

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.

Example of trimming Japanese text

Spesify whether text is trimmed or not. If none is specified to axf:text-justify-trim, text is not trimmed. Parentheses, middle dots, and punctuations of full width in Japanese are also trimmed. Hiragana and Katakana, spaces between Kanji or Kana, spaces between Western words can also be trimmed.

none

(あいうえお。かき・くけこ)

punctuation

(あいうえお。かき・くけこ)

punctuation-except-fullstop

Same as punctuation, but the two letters of U+3002 (。), U+FF0E (.) are excluded.

(あいうえお。かき・くけこ)

punctuation-except-middledot

Same as punctuation, but middle dots of U+30FB (・), U+FF1A (:), U+FF1B (;) are excluded.

(あいうえお。かき・くけこ)

none

Specify whether text is trimmed or not.

kana, ideograph

Specify whether text is trimmed or not.

none

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam bibendum tincidunt pharetra.

inter-word

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam bibendum tincidunt pharetra.

Download der Beispiele

Output:

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