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
Traditional ChineseU+3001 IDEOGRAPHIC COMMA 、 U+3002 IDEOGRAPHIC FULL STOP 。 U+FF0C FULLWIDTH COMMA , U+FF0E FULLWIDTH FULL STOP .
Other languagesU+FE50 SMALL COMMA ﹐ U+FE51 SMALL IDEOGRAPHIC ﹑ U+FE52 SMALL FULL STOP ﹒ U+FF64 HALFWIDTH IDEOGRAPHIC COMMA 、 - 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. | |
| ||
| </fo:block> | |
| ||
| ||
| ||
| ||
| Hanging punctuation at the start /end of line | |
| </fo:block> | |
| </fo:block> | |
| ||
| 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. | |
| </fo:block> | |
| ||
| ||
| none | |
| </fo:block> | |
| ||
| ||
| 「あいうえお、 | |
| </fo:block> | |
| ||
| ||
| start | |
| </fo:block> | |
| ||
| ||
| 「あいうえお、 | |
| </fo:block> | |
| ||
| ||
| force-end | |
| </fo:block> | |
| ||
| ||
| 「あいうえお、 | |
| </fo:block> | |
| ||
| ||
| first | |
| </fo:block> | |
| <fo:block> | |
| The same behavior as start is applied only at the first line of a paragraph. | |
| </fo:block> | |
| ||
| ||
| 「あいうえお」「かきく | |
| </fo:block> | |
| ||
| ||
| allow-end | |
| </fo:block> | |
| <fo:block> | |
| 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. | |
| </fo:block> | |
| ||
| ||
| あいうえお、「かきくけこ、 | |
| </fo:block> | |
| ||
| ||
| last | |
| </fo:block> | |
| <fo:block> | |
| The same behavior as force-end is applied only at the end line of a paragraph. | |
| </fo:block> | |
| ||
| ||
| あいうえおかきくけこ、さしすせそたちつ、 | |
| </fo:block> | |
| ||
| </fo:block> | |
| </fo:flow> | |
| ||
| </fo:root> |
Output:
Tipp der data2type-Redaktion: Zum Thema XSL-FO bieten wir auch folgende Schulungen zur Vertiefung und professionellen Fortbildung an: |