Technologies XML / XSL-FO / Référence / Extensions XSL d’Antenna House Formatter / Propriétés / punctuation-trim

(Extrait de «XSL-FO ― La Référence » de 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

Catégorie : réduction et ponctuation suspendue

Indique le traitement de la ponctuation japonaise de pleine chasse. [CSS3-Text] Crénage de la ponctuation pleine chasse : propriété ‘punctuation-trim’

Valeur :

none | [ [ start | start-except-first ] || [ end | allow-end | end-except-fullstop ] || adjacent ] | all | <string> | auto

Valeur initiale :

auto

S’applique à :

tous les objets de mise en forme de bloc et en ligne

Hérité :

yes

Pourcentages :

N/A

Les valeurs ont les significations suivantes.

none

Les caractères de ponctuation ne sont pas réduits.

start

Les caractères de ponctuation (parenthèses ouvrantes, etc.) en début de ligne sont réduits.

start-except-first

Identique à start, sauf pour la première ligne d’un paragraphe ou celle située juste après un saut de ligne forcé.

end

Lorsque text-align="right" ou text-align="justify" (ou text-align-last="justify") est indiqué et que des signes de ponctuation pleine chasse (parenthèses fermantes, etc.) se trouvent en fin de phrase, le caractère est systématiquement traité comme demi-chasse.

allow-end

Lorsque text-align="right" ou text-align="justify" (ou text-align-last="justify") est indiqué et que des signes de ponctuation pleine chasse (parenthèses fermantes, etc.) se trouvent en fin de phrase, ils conservent leur pleine chasse si le texte tient sur une ligne ; sinon, ils sont traités comme demi-chasse.

end-except-fullstop

Se comporte comme la valeur end, sauf pour les deux caractères suivants.

U+3002

IDEOGRAPHIC FULL STOP

。

U+FF0E

FULLWIDTH FULL STOP

.


adjacent

L’espace entre une ponctuation pleine chasse et un caractère pleine chasse en japonais est réduit.

  • Entre une parenthèse fermante et une parenthèse ouvrante de pleine chasse.

  • Entre deux parenthèses fermantes de pleine chasse.

  • Entre une parenthèse fermante et des points médians de pleine chasse.

  • Entre une parenthèse fermante et une espace de pleine chasse.

  • Entre une parenthèse fermante et des caractères autres que la ponctuation, de pleine chasse.

  • Entre deux parenthèses ouvrantes de pleine chasse.

  • Entre des points médians et une parenthèse ouvrante de pleine chasse.

  • Entre une espace et une parenthèse ouvrante de pleine chasse.

  • Entre un caractère autre que la ponctuation et une parenthèse ouvrante, de pleine chasse.

Les caractères de ponctuation pleine chasse sont traités comme les parenthèses fermantes de pleine chasse. La valeur adjacent équivaut à axf:kerning-mode="contextual" avec XSL Formatter V4.

all

Réduit toutes les parenthèses, tous les points médians et tous les signes de ponctuation pleine chasse pour les traiter comme demi-chasse.

<string>

Identique à "all", mais seuls les caractères inclus dans la chaîne indiquée sont traités comme demi-chasse. Les caractères autres que les parenthèses, points médians et signes de ponctuation pleine chasse sont ignorés.

auto

Dépend du réglage système. La valeur est interprétée comme "none" ou "start end adjacent" selon punctuation-trim dans le fichier de configuration des options.

Les parenthèses ouvrantes de pleine chasse traitées par axf:punctuation-trim sont les suivantes :

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

Les parenthèses fermantes de pleine chasse traitées par axf:punctuation-trim sont les suivantes :

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

Les signes de ponctuation pleine chasse traités par axf:punctuation-trim sont les suivants :

U+3001

IDEOGRAPHIC COMMA

、

U+3002

IDEOGRAPHIC FULL STOP

。

U+FF0C

FULLWIDTH COMMA

,

U+FF0E

FULLWIDTH FULL STOP

.

Les points médians de pleine chasse traités par axf:punctuation-trim sont les suivants :

U+30FB

KATAKANA MIDDLE DOT

・

U+FF1A

FULLWIDTH COLON

:

U+FF1B

FULLWIDTH SEMICOLON

;

ATTENTION :

Pour reproduire le comportement de axf:punctuation-trim="both" dans XSL Formatter V4, indiquez axf:punctuation-trim="start end" ou axf:punctuation-trim="start allow-end" dans AH Formatter V6.3. Si vous utilisez aussi cette extension avec axf:kerning-mode="contextual", indiquez axf:punctuation-trim="start end adjacent", etc., avec AH Formatter V6.3.

Exemple XSL-FO :

<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">
<axf:document-info name="document-title" value="Trimming Japanses full-width punctuations"/>
<axf:document-info name="author" value="Antenna House, Inc."/>
<fo:layout-master-set>
<fo:simple-page-master page-height="297mm" page-width="210mm" margin-top="10mm" margin-left="20mm" margin-right="20mm" margin-bottom="10mm" master-name="PageMaster1">
<fo:region-after extent="7mm"/>
<fo:region-body margin-top="0mm" margin-left="0mm" margin-right="0mm" margin-bottom="10mm"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="PageMaster1">
<fo:static-content flow-name="xsl-region-after">
<fo:block font-size="0.8em" text-align="right" color="green">
<fo:basic-link external-destination="http://www.antennahouse.com/">
Antenna House, Inc.
</fo:basic-link>
</fo:block>
</fo:static-content>
<fo:flow flow-name="xsl-region-body" font-family="serif" font-size="1em" line-height="1.4" axf:hyphenate-hyphenated-word="false" hyphenate="true">
<fo:block span="all" font-family="sans-serif" font-size="2em" font-weight="bold" line-height="2" space-before="1em" space-after="1em" space-before.conditionality="retain" space-after.conditionality="retain" background-color="#EEEEEE">
<fo:block start-indent="1em" end-indent="1em">
Trimming Japanses full-width punctuations 
</fo:block>
</fo:block>
<fo:block span="all" space-before="1em" space-after="1em" space-after.conditionality="retain" text-indent="0em" border="1pt solid #9999FF" start-indent="0.5em" end-indent="0.5em" padding="0.5em" text-align="justify">
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>
<fo:block text-align="justify">
<fo:block font-size="1.2em">
none
</fo:block>
<fo:block-container space-after="0.3em" font-size="1.5em" width="6.5em" axf:punctuation-trim="none">
<fo:block background="orange" xml:lang="ja">
(あいうえお)
</fo:block>
</fo:block-container>
<fo:block font-size="1.2em">
start
</fo:block>
<fo:block-container space-after="0.3em" font-size="1.5em" width="6.5em" axf:punctuation-trim="start">
<fo:block background="orange" xml:lang="ja">
(あいうえお)
</fo:block>
</fo:block-container>
<fo:block font-size="1.2em">
end
</fo:block>
<fo:block-container space-after="1.3em" font-size="1.5em" width="6.5em" axf:punctuation-trim="end">
<fo:block background="orange" xml:lang="ja">
(あいうえお)
</fo:block>
</fo:block-container>
<fo:block font-size="1.2em">
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-container space-after="0.3em" font-size="1.5em" width="6.5em" axf:punctuation-trim="start-except-first">
<fo:block background="orange" xml:lang="ja">
(あいうえ(お))
</fo:block>
</fo:block-container>
<fo:block font-size="1.2em">
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-container space-after="0.3em" font-size="1.5em" width="6.5em" axf:punctuation-trim="allow-end">
<fo:block background="orange" xml:lang="ja">
(あいうえおか)きくけこ)
</fo:block>
</fo:block-container>
<fo:block font-size="1.2em">
end-except-fullstop
</fo:block>
<fo:block>
It is same as end, but U+3002 (。) and U+FF0E (.) are excluded.
</fo:block>
<fo:block-container space-after="1.3em" font-size="1.5em" width="6.5em" axf:punctuation-trim="end-except-fullstop">
<fo:block background="orange" xml:lang="ja">
(あいうえお)(かきくけこ。
</fo:block>
</fo:block-container>
<fo:block font-size="1.2em">
adjacent
</fo:block>
<fo:block space-after="0.3em">
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-container space-after="0.3em" font-size="1.5em" width="15em" axf:punctuation-trim="none">
<fo:block background="orange" xml:lang="ja">
((あいう);かき)、けこ
</fo:block>
</fo:block-container>
<fo:block>
axf:punctuation-trim="adjacent"
</fo:block>
<fo:block-container space-after="1.3em" font-size="1.5em" width="15em" axf:punctuation-trim="adjacent">
<fo:block background="orange" xml:lang="ja">
((あいう);かき)、けこ
</fo:block>
</fo:block-container>
<fo:block font-size="1.2em">
all、<string>
</fo:block>
<fo:block space-after="0.5em">
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-container space-after="0.5em" font-size="1.5em" width="20em" axf:punctuation-trim="none">
<fo:block background="orange" xml:lang="ja">
【あ(あ“あ:あ〈・〉あ、あ”あ)あ】
</fo:block>
</fo:block-container>
<fo:block>
axf:punctuation-trim="all"
</fo:block>
<fo:block-container space-after="0.5em" font-size="1.5em" width="20em" axf:punctuation-trim="all">
<fo:block background="orange" xml:lang="ja">
【あ(あ“あ:あ〈・〉あ、あ”あ)あ】
</fo:block>
</fo:block-container>
<fo:block>
axf:punctuation-trim="〉,、,”,),】"
</fo:block>
<fo:block-container space-after="1.5em" font-size="1.5em" width="20em" axf:punctuation-trim="〉,、,”,),】">
<fo:block background="orange" xml:lang="ja">
【あ(あ“あ:あ〈・〉あ、あ”あ)あ】
</fo:block>
</fo:block-container>
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>

Télécharger les exemples

Sortie :

page 2

haut de page