XML-Technologien / XSL-FO / Referenz / Antenna House Formatter XSL Extensions / Properties / ruby-limit-overhang

(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 Ruby Extended Properties

Specifies the limit of the amount that ruby overhangs the adjacent base character when ruby is longer than its own base character.

Value:

<number> | <length> | <percentage>

Initial:

1.0

Applies to:

axf:ruby

Inherited:

yes

Percentages:

refer to the font size

Values have the following meanings.

<number>

The used value is this number multiplied by the font size of the ruby text (axf:ruby-font-size). The value must be non-negative.

<length>

Specifies the length. The value must be non-negative.

<percentage>

The computed value is this percentage multiplied by the font size of the axf:ruby element (not the font size of the ruby text). The value must be non-negative.

This value shows the amount that ruby overhangs the adjacent base character (It is not the protruding amount).

XSL-FO sample:

<fo:root xml:lang="ja" 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="ルビの文字への掛かり方の表現例"/>
<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.antenna.co.jp/AHF/">
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.6" 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">
ルビの文字への掛かり方の表現例
</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">
axf:ruby-overhang によりルビを隣の文字にどのように掛けるか指定します。ルビが親文字より長い場合は、axf:ruby-limit-overhang で掛かる量の限界値、短い場合は axf:ruby-limit-space で前後の空き量を設定できます。
</fo:block>
<fo:block space-before="1em" font-family="sans-serif" font-size="1.2em" font-weight="bold" text-indent="0em" line-height="2" keep-with-next.within-column="always">
axf:ruby-overhang(ルビを隣の文字へ掛ける方法の設定)
</fo:block>
<fo:block>
none(隣の文字へ掛けません)、start(start側の文字に掛けます)、end(end側の文字に掛けます) 
</fo:block>
<fo:block-container column-count="3" column-gap="8pt">
<fo:block>
axf:ruby-overhang="none"
</fo:block>
<fo:block line-height="2" font-size="2.5em">
あ
<axf:ruby axf:ruby-overhang="none">
<axf:ruby-base>
燕
</axf:ruby-base>
<axf:ruby-text>
つばめ
</axf:ruby-text>
</axf:ruby>
あ
</fo:block>
<fo:block>
axf:ruby-overhang="start"
</fo:block>
<fo:block line-height="2" font-size="2.5em">
あ
<axf:ruby axf:ruby-overhang="start">
<axf:ruby-base>
燕
</axf:ruby-base>
<axf:ruby-text>
つばめ
</axf:ruby-text>
</axf:ruby>
あ
</fo:block>
<fo:block>
axf:ruby-overhang="end"
</fo:block>
<fo:block line-height="2" font-size="2.5em">
あ
<axf:ruby axf:ruby-overhang="end">
<axf:ruby-base>
燕
</axf:ruby-base>
<axf:ruby-text>
つばめ
</axf:ruby-text>
</axf:ruby>
あ
</fo:block>
</fo:block-container>
<fo:block space-before="1.5em">
except-kanji(隣の文字が漢字のときは掛けません)、except-katakana(隣の文字が片仮名のときは掛けません)
</fo:block>
<fo:block-container column-count="3" column-gap="8pt">
<fo:block>
axf:ruby-overhang="except-kanji"
</fo:block>
<fo:block line-height="2" font-size="2.5em">
あ
<axf:ruby axf:ruby-overhang="except-kanji">
<axf:ruby-base>
燕
</axf:ruby-base>
<axf:ruby-text>
つばめ
</axf:ruby-text>
</axf:ruby>
阿
</fo:block>
<fo:block>
axf:ruby-overhang="except-katakana"
</fo:block>
<fo:block line-height="2" font-size="2.5em">
あ
<axf:ruby axf:ruby-overhang="except-katakana">
<axf:ruby-base>
燕
</axf:ruby-base>
<axf:ruby-text>
つばめ
</axf:ruby-text>
</axf:ruby>
ア
</fo:block>
</fo:block-container>
<fo:block space-before="1.5em">
except-start-open-parenthesis(start側が開き括弧類のときは掛けません)、except-end-close-parenthesis(end側が閉じ括弧類のときは掛けません)
</fo:block>
<fo:block-container column-count="3" column-gap="8pt">
<fo:block>
axf:ruby-overhang="except-start-open-parenthesis"
</fo:block>
<fo:block line-height="2" font-size="2.5em">
(
<axf:ruby axf:ruby-overhang="except-start-open-parenthesis">
<axf:ruby-base>
燕
</axf:ruby-base>
<axf:ruby-text>
つばめ
</axf:ruby-text>
</axf:ruby>
あ
</fo:block>
<fo:block>
axf:ruby-overhang="except-end-close-parenthesis"
</fo:block>
<fo:block line-height="2" font-size="2.5em">
あ
<axf:ruby axf:ruby-overhang="except-end-close-parenthesis">
<axf:ruby-base>
燕
</axf:ruby-base>
<axf:ruby-text>
つばめ
</axf:ruby-text>
</axf:ruby>
)
</fo:block>
</fo:block-container>
<fo:block space-before="1em" font-family="sans-serif" font-size="1.2em" font-weight="bold" text-indent="0em" line-height="2" keep-with-next.within-column="always">
axf:ruby-limit-overhang(ルビが親文字より長い場合の隣りの文字に掛ける限界量)
</fo:block>
<fo:block>
限界量は number(ルビのフォントサイズと掛け合わせた値)、length(長さ指定)、percentage(フォントサイズと掛け合わせた値)で指定します。
</fo:block>
<fo:block-container column-count="3" column-gap="8pt">
<fo:block font-size="0.9em">
axf:ruby-limit-overhang="1.0"(既定値)
</fo:block>
<fo:block line-height="2" font-size="2.5em">
あ
<axf:ruby axf:ruby-limit-overhang="1.0">
<axf:ruby-base>
燕
</axf:ruby-base>
<axf:ruby-text>
つばめ
</axf:ruby-text>
</axf:ruby>
あ
</fo:block>
<fo:block font-size="0.9em">
axf:ruby-limit-overhang="0"
</fo:block>
<fo:block line-height="2" font-size="2.5em">
あ
<axf:ruby axf:ruby-limit-overhang="0">
<axf:ruby-base>
燕
</axf:ruby-base>
<axf:ruby-text>
つばめ
</axf:ruby-text>
</axf:ruby>
あ
</fo:block>
</fo:block-container>
<fo:block space-before="1em" font-family="sans-serif" font-size="1.2em" font-weight="bold" text-indent="0em" line-height="2" keep-with-next.within-column="always">
axf:ruby-limit-space(ルビが親文字より短い場合の前後のアキ量の限界)
</fo:block>
<fo:block>
アキ量の限界は number(ルビのフォントサイズと掛け合わせた値)、length(長さ指定)、percentage(フォントサイズと掛け合わせた値)で指定、none はアキ量の制限をしません。
</fo:block>
<fo:block-container space-before="0.5em" column-count="3" column-gap="8pt">
<fo:block font-size="0.9em">
axf:ruby-limit-space="1.0"(既定値)
</fo:block>
<fo:block line-height="2" font-size="2em">
<axf:ruby axf:ruby-limit-space="1.0">
<axf:ruby-base>
なげきの聖母像
</axf:ruby-base>
<axf:ruby-text>
ピエタ
</axf:ruby-text>
</axf:ruby>
</fo:block>
<fo:block font-size="0.9em">
axf:ruby-limit-space="0"
</fo:block>
<fo:block line-height="2" font-size="2em">
<axf:ruby axf:ruby-limit-space="0">
<axf:ruby-base>
なげきの聖母像
</axf:ruby-base>
<axf:ruby-text>
ピエタ
</axf:ruby-text>
</axf:ruby>
</fo:block>
<fo:block font-size="0.9em">
axf:ruby-limit-space="none"
</fo:block>
<fo:block line-height="2" font-size="2em">
<axf:ruby axf:ruby-limit-space="none">
<axf:ruby-base>
なげきの聖母像
</axf:ruby-base>
<axf:ruby-text>
ピエタ
</axf:ruby-text>
</axf:ruby>
</fo:block>
</fo:block-container>
</fo:flow>
</fo:page-sequence>
</fo:root>

Download der Beispiele

Output:

nach oben