axf:hanging-punctuation

(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 whether to hang punctuations at the start of the line or end of the line. [CSS3-Text] Hanging Punctuation: the ‘hanging-punctuation’ property

Value:none | [ start || first || [ force-end | allow-end ] || last ]
Initial:none
Applies to:fo:block
Inherited:yes
Percentages:N/A

Values have the following meanings.

none Do not hang punctuations at the start of the line or end of the line.
start Hangs punctuations at the start of the line. If the target character for hanging comes to the start of the line, the character is hanged forcibly.
first Behaves as the same as the start value only with the start line of a paragraph.
force-end Hangs punctuations at the end of the line. When text-align="right" or text-align="justify" (or text-align-last="justify") is specified and a target character for hanging comes to the end of the sentence, the character is hanged forcibly. When anything else is specified to text-align, the character is hanged naturally. the end value before V5 is taken as the allow-end value.
allow-end Hangs punctuations at the end of the line. When text-align="right" or text-align="justify" (or text-align-last="justify") is specified and a target character for hanging comes to the end of the sentence, the character is not hanged if text fits into one line, the character is hanged if text does not fit into one line. When anything else is specified to text-align, the character is hanged naturally.
last Behaves the same as the force-end value only with the end of the line of a paragraph.

The target punctuation marks is as follows.

  • force-end, allow-end
    Japanese or Simplified Chinese
    U+3001IDEOGRAPHIC COMMA
    U+3002IDEOGRAPHIC FULL STOP
    U+FF0CFULLWIDTH COMMA
    U+FF0EFULLWIDTH FULL STOP
    Traditional Chinese
    U+FE50SMALL COMMA
    U+FE51SMALL IDEOGRAPHIC
    U+FE52SMALL FULL STOP
    U+FF64HALFWIDTH IDEOGRAPHIC COMMA
    Other languages
    Same as the last value.
  • last
    quotation marks, closing parentheses, period, comma and hyphen
  • start, first
    quotation marks, closing parentheses and bullet

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.

Hanging punctuation at the start /end of line

Specifies whether the hanging punctuation at the start and end of a line is applied. If axf:hanging-punctuation is specified, hanging punctuation is not applied. If start is specified, hanging punctuation is applied at the start of a line. text-align="right" or text-align="justify" can be specified together with the force-end property, then the full-width punctuation comes at the end of a line, it is forced to be hanged. The other settings are explained in this sample. See also XSL/CSS extension in the manual to learn more about the corresponding punctuations.

none

「あいうえお、

start

「あいうえお、

force-end

「あいうえお、

first

The same behavior as start is applied only at the first line of a paragraph.

「あいうえお」「かきく

allow-end

When the target character to be hanged comes at the end of a line, it isn't hanged when fitting into a line, it is hanged when not fitting into a line.

あいうえお、「かきくけこ、

last

The same behavior as force-end is applied only at the end line of a paragraph.

あいうえおかきくけこ、さしすせそたちつ、

Download der Beispiele

Output:

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