axf:punctuation-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 whether to treat full width punctuations in Japanese. [CSS3-Text] Fullwidth Punctuation Kerning: the ‘punctuation-trim’ property
Value: | none | [ [ start | start-except-first ] || [ end | allow-end | end-except-fullstop ] || adjacent ] | all | <string> | auto |
Initial: | auto |
Applies to: | all block-level and inline-level formatting objects |
Inherited: | yes |
Percentages: | N/A |
Values have the following meanings.
none | Punctuation characters are not trimmed. | ||||||
start | Punctuation characters (open parenthesis etc.) at start of line are trimmed. | ||||||
start-except-first | Same as start except for a start line of a paragraph or a line right after the forced line break. | ||||||
end | When text-align="right" or text-align="justify" (or text-align-last="justify") is specified and full width punctuation marks (closing parenthesis etc.) come to the end of the sentence, the character is treated as half width forcibly. | ||||||
allow-end | When text-align="right" or text-align="justify" (or text-align-last="justify") is specified and full width punctuation marks (closing parenthesis etc.) come to the end of the sentence, characters are treated as full width if text fits into one line, characters are treated as half width if text does not fit into one line. | ||||||
end-except-fullstop |
Behaves as the same as the end value except for the following two characters.
| ||||||
adjacent |
The space between a full width punctuation and a full width character in Japanese is trimmed.
| ||||||
all | Trim all parentheses, middle dots, and punctuations of full width and treat them as half width. | ||||||
<string> | Behave the same as "all", but only the character included in the character strings specified here is treated as a half width. Other than parentheses, middle dots, and punctuations of full width are disregarded. | ||||||
auto | Dependent on the system setting. It is regarded as "none" or "start end adjacent" by punctuation-trim in the Option Setting File. |
Full width punctuation open parenthesis processed by axf:punctuation-trim are:
U+2018 | LEFT SINGLE QUOTATION MARK | ‘ |
U+201C | LEFT DOUBLE QUOTATION MARK | “ |
U+3008 | LEFT ANGLE BRACKET | 〈 |
U+300A | LEFT DOUBLE ANGLE BRACKET | 《 |
U+300C | LEFT CORNER BRACKET | 「 |
U+300E | LEFT WHITE CORNER BRACKET | 『 |
U+3010 | LEFT BLACK LENTICULAR BRACKET | 【 |
U+3014 | LEFT TORTOISE SHELL BRACKET | 〔 |
U+3016 | LEFT WHITE LENTICULAR BRACKET | 〖 |
U+3018 | LEFT WHITE TORTOISE SHELL BRACKET | 〘 |
U+301A | LEFT WHITE SQUARE BRACKET | 〚 |
U+301D | REVERSED DOUBLE PRIME QUOTATION MARK | 〝 |
U+FF08 | FULLWIDTH LEFT PARENTHESIS | ( |
U+FF3B | FULLWIDTH LEFT SQUARE BRACKET | [ |
U+FF5B | FULLWIDTH LEFT CURLY BRACKET | { |
U+FF5F | FULLWIDTH LEFT WHITE PARENTHESIS |
Full width punctuation close parenthesis processed by axf:punctuation-trim are:
U+2019 | RIGHT SINGLE QUOTATION MARK | ’ |
U+201D | RIGHT DOUBLE QUOTATION MARK | ” |
U+3009 | RIGHT ANGLE BRACKET | 〉 |
U+300B | RIGHT DOUBLE ANGLE BRACKET | 》 |
U+300D | RIGHT CORNER BRACKET | 」 |
U+300F | RIGHT WHITE CORNER BRACKET | 』 |
U+3011 | RIGHT BLACK LENTICULAR BRACKET | 】 |
U+3015 | RIGHT TORTOISE SHELL BRACKET | 〕 |
U+3017 | RIGHT WHITE LENTICULAR BRACKET | 〗 |
U+3019 | RIGHT WHITE TORTOISE SHELL BRACKET | 〙 |
U+301B | RIGHT WHITE SQUARE BRACKET | 〛 |
U+301E | DOUBLE PRIME QUOTATION MARK | 〞 |
U+301F | LOW DOUBLE PRIME QUOTATION MARK | 〟 |
U+FF09 | FULLWIDTH RIGHT PARENTHESIS | ) |
U+FF3D | FULLWIDTH RIGHT SQUARE BRACKET | ] |
U+FF5D | FULLWIDTH RIGHT CURLY BRACKET | } |
U+FF60 | FULLWIDTH RIGHT WHITE PARENTHESIS |
Full width punctuations processed by axf:punctuation-trim are:
U+3001 | IDEOGRAPHIC COMMA | 、 |
U+3002 | IDEOGRAPHIC FULL STOP | 。 |
U+FF0C | FULLWIDTH COMMA | , |
U+FF0E | FULLWIDTH FULL STOP | . |
Full width middle dots processed by axf:punctuation-trim are:
U+30FB | KATAKANA MIDDLE DOT | ・ |
U+FF1A | FULLWIDTH COLON | : |
U+FF1B | FULLWIDTH SEMICOLON | ; |
CAUTION: | To make the behavior of axf:punctuation-trim="both" in XSL Formatter V4 the same, please specify axf:punctuation-trim="start end" or axf:punctuation-trim="start allow-end" in AH Formatter V6.3. In addition, if you use this extension together with axf:kerning-mode="contextual", please specify axf:punctuation-trim="start end adjacent" etc. with AH Formatter V6.3. |
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> | |
| ||
| ||
| ||
| ||
| Trimming Japanses full-width punctuations | |
| </fo:block> | |
| </fo:block> | |
| ||
| Specifies whether the Japanese full-width punctuations are trimmed or not. If non is specified to axf:punctuation-trim, they are not trimmed. If start is specified, the full-width punctuation at the start of a line will become harf-width. If end is specified, the full-width at the end of a line will become half-width. text-align="right" or text-align="justify" can be specified in that case. It's also possible to make the target character string half-width by specifying axf:punctuation-trim. See also the other settings in this sample page. | |
| </fo:block> | |
| ||
| ||
| none | |
| </fo:block> | |
| ||
| ||
| (あいうえお) | |
| </fo:block> | |
| ||
| ||
| start | |
| </fo:block> | |
| ||
| ||
| (あいうえお) | |
| </fo:block> | |
| ||
| ||
| end | |
| </fo:block> | |
| ||
| ||
| (あいうえお) | |
| </fo:block> | |
| ||
| ||
| start-except-first | |
| </fo:block> | |
| <fo:block> | |
| It's same as start, but punctuations in the first line or the line right after the forcible line break are excluded. | |
| </fo:block> | |
| ||
| ||
| (あいうえ(お)) | |
| </fo:block> | |
| ||
| ||
| allow-end | |
| </fo:block> | |
| <fo:block> | |
| If the full-width punctuation comes at the end of a line and it fits in a line, it's kept as full-width, if it does not fit in a line, it's made half-width. | |
| </fo:block> | |
| ||
| ||
| (あいうえおか)きくけこ) | |
| </fo:block> | |
| ||
| ||
| end-except-fullstop | |
| </fo:block> | |
| <fo:block> | |
| It is same as end, but U+3002 (。) and U+FF0E (.) are excluded. | |
| </fo:block> | |
| ||
| ||
| (あいうえお)(かきくけこ。 | |
| </fo:block> | |
| ||
| ||
| adjacent | |
| </fo:block> | |
| ||
| Trim the amount of the space between the full-width punctuation and the full-width character. (e.g. full-width opening parenthesis) The combination of the ajacent character strings before and after the space can be found in XSL/CSS Extensions in the online manual | |
| </fo:block> | |
| <fo:block> | |
| axf:punctuation-trim="none" | |
| </fo:block> | |
| ||
| ||
| ((あいう);かき)、けこ | |
| </fo:block> | |
| ||
| <fo:block> | |
| axf:punctuation-trim="adjacent" | |
| </fo:block> | |
| ||
| ||
| ((あいう);かき)、けこ | |
| </fo:block> | |
| ||
| ||
| all、<string> | |
| </fo:block> | |
| ||
| If all is specified, all parentheses, middle dots, and punctuations of full width are trimmed and treated as half width. <string> behaves the same as all, but only the character included in the character strings specified here is treated as a half width. See also XSL/CSS Extensions in the online manual for more character strings available. | |
| </fo:block> | |
| <fo:block> | |
| axf:punctuation-trim="none" | |
| </fo:block> | |
| ||
| ||
| 【あ(あ“あ:あ〈・〉あ、あ”あ)あ】 | |
| </fo:block> | |
| ||
| <fo:block> | |
| axf:punctuation-trim="all" | |
| </fo:block> | |
| ||
| ||
| 【あ(あ“あ:あ〈・〉あ、あ”あ)あ】 | |
| </fo:block> | |
| ||
| <fo:block> | |
| axf:punctuation-trim="〉,、,”,),】" | |
| </fo:block> | |
| ||
| ||
| 【あ(あ“あ:あ〈・〉あ、あ”あ)あ】 | |
| </fo:block> | |
| ||
| </fo:block> | |
| </fo:flow> | |
| ||
| </fo:root> |
Output:
page 2
Tipp der data2type-Redaktion: Zum Thema XSL-FO bieten wir auch folgende Schulungen zur Vertiefung und professionellen Fortbildung an: |