見開きページマスタ拡張

AH Formatter V6.6では見開きページをひとつの単位と判断できるため、2ページにまたがる見開き領域を定義することができます。また、見開きページにひとつの背景を定義することもできます。

見開きページをひとつの見開きページとして組版する際の要件は以下に記載されています。

見開きが必要となるのは一部のドキュメントのみですが、次の場合に見開きを使用します。

見開きページマスタ拡張には次のふたつのFOが追加されています。

FO意味
<axf:spread-page-master>見開きを定義します。
<axf:spread-region>2ページにまたがる領域。

見開きページは通常の組版の例外であるため、<axf:spread-page-master>では2ページのサイズおよび見開き以外の領域を定義するのに他のページマスタを参照します。<axf:spread-region>がいずれかのページマスタによって<fo:region-body>を横切ってしまう場合、<fo:region-body>はさらに小さい矩形領域にリサイズされます。<axf:spread-region>がいずれかのページマスタによって<fo:region-body>を覆ってしまう場合、<fo:region-body>は見開きページから外されます。

見開きページマスタ拡張要素

<axf:spread-page-master>

Common Usage:

見開きページマスタを指定します。

axf:spread-page-master を、fo:simple-page-master と同じ方法でページマスタ選択に使用し、常に2ページの倍数を生成します。見開き2ページを1単位として必ずペアで使用する必要があります。これを実行するのに役立つプロパティは、maximum-repeatsinitial-page-numberforce-page-count です。

axf:spread-region の子要素がページ上のすべての領域を生成する場合(例えば、見開きページが複数ページ、ダブル幅の表)、しかし見開きページの内容がどのくらいのペア数になるか分からない場合は、axf:spread-page-masterfo:page-sequence-master の最後のページマスタにするか、または見開きページの内容に axf:spread-page-master だけを使用して 入れ子の fo:page-sequence に入れるかのどちらかでなければなりません。

Areas:

領域は直接作成せず、fo:page-sequenceによるページ作成で使用されます。

Constraints:
<!ELEMENT axf:spread-page-master (axf:spread-region+)> <!ATTLIST axf:spread-page-master master-name CDATA #REQUIRED> <!ATTLIST axf:spread-page-master axf:left-page-master-reference CDATA #REQUIRED> <!ATTLIST axf:spread-page-master axf:right-page-master-reference CDATA #REQUIRED> <!ATTLIST axf:spread-page-master reference-orientation CDATA "0"> <!ATTLIST axf:spread-page-master writing-mode CDATA "lr-tb"> <!ATTLIST axf:spread-page-master %common-margin-properties-block;>

<axf:spread-region>

Common Usage:

見開きページの領域を指定します。

Areas:

親である <axf:spread-page-master> を使用してページを生成するたびに、ひとつの region-viewport-area とひとつの region-reference-area を生成するのに使用します。

Constraints:
<!ELEMENT axf:spread-region EMPTY> <!ATTLIST axf:spread-region region-name CDATA #REQUIRED> <!ATTLIST axf:spread-region height CDATA "auto"> <!ATTLIST axf:spread-region overflow CDATA "auto"> <!ATTLIST axf:spread-region reference-orientation CDATA "0"> <!ATTLIST axf:spread-region width CDATA "auto"> <!ATTLIST axf:spread-region writing-mode CDATA "lr-tb"> <!ATTLIST axf:spread-region %common-absolute-position-properties;> <!ATTLIST axf:spread-region %common-border-padding-and-background-properties;> <!ATTLIST axf:spread-region %common-margin-properties-block;>

見開きページマスタ拡張プロパティ

axf:left-page-master-reference

見開きでの左ページのマスタ名を指定します。

Value: <name>
Initial: なし(値が必須)
Applies to: axf:spread-page-master
Inherited: no
Percentages: N/A

値の意味は以下のとおりです。

<name>

nameはドキュメント内にあるマスタ名を参照する必要があります。

axf:left-page-master-referenceは、見開きページの左ページのページサイズおよび見開きではない領域を定義するページマスタを参照します。

axf:right-page-master-reference

見開きでの右ページのマスタ名を指定します。

Value: <name>
Initial: なし(値が必須)
Applies to: axf:spread-page-master
Inherited: no
Percentages: N/A

値の意味は以下のとおりです。

<name>

nameはドキュメント内にあるマスタ名を参照する必要があります。

axf:right-page-master-referenceは、見開きページの右ページのページサイズおよび見開きではない領域を定義するページマスタを参照します。

見開きページマスタの例

次の例は、axf:spread-page-master を使用して生成した2ページを示しています。 ページサイズと見開きページでない領域の定義は、axf:spread-page-master の "spreadpm" から参照される "left" と "right" の fo:simple-page-master を使用します。axf:spread-page-master は、見開きの2ページにまたがる axf:spread-region の "top" を定義します。この例では、"top" 領域にはタイトルが含まれています。"xsl-region-body"フローの内容は、ふたつの fo:page-sequence-masterfo:region-body で定義された "body" 領域内に配置されます。

<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions"> <fo:layout-master-set> <fo:simple-page-master master-name="left" page-width="70mm" page-height="100mm"> <fo:region-body margin="36pt" margin-right="48pt" background-color="#E1E8E2" padding="6pt"/> <fo:region-before region-name="left-header" extent="36pt" padding-start="36pt" display-align="center"/> <fo:region-after extent="36pt" padding-start="36pt" display-align="center"/> </fo:simple-page-master> <fo:simple-page-master master-name="right" page-width="70mm" page-height="100mm"> <fo:region-body margin="36pt" margin-left="48pt" background-color="#E1E8E2" padding="6pt"/> <fo:region-before region-name="right-header" extent="36pt" padding-end="36pt" display-align="center"/> <fo:region-after extent="36pt" padding-end="36pt" display-align="center"/> </fo:simple-page-master> <axf:spread-page-master master-name="spreadpm" left-page-master-reference="left" right-page-master-reference="right"> <axf:spread-region region-name="top" margin="36pt" margin-bottom="72mm"/> </axf:spread-page-master> <fo:page-sequence-master master-name="psm"> <fo:repeatable-page-master-reference master-reference="spreadpm"/> <fo:repeatable-page-master-alternatives> <fo:conditional-page-master-reference master-reference="left" odd-or-even="even"/> <fo:conditional-page-master-reference master-reference="right" odd-or-even="odd"/> </fo:repeatable-page-master-alternatives> </fo:page-sequence-master> </fo:layout-master-set> <fo:page-sequence master-reference="psm" initial-page-number="2" force-page-count="end-on-odd"> <fo:static-content flow-name="left-header"> <fo:block text-align="outside" margin="0">left</fo:block> </fo:static-content> <fo:static-content flow-name="right-header"> <fo:block text-align="outside" margin="0">right</fo:block> </fo:static-content> <fo:static-content flow-name="xsl-region-after"> <fo:block text-align="outside" margin="0"><fo:page-number /></fo:block> </fo:static-content> <fo:flow flow-name="top"> <fo:block-container height="100%" color="#003D19" font-size="100pt" overflow="condense" axf:overflow-condense="font-size" font-weight="bold"> <fo:block>axf:spread-page-master</fo:block> </fo:block-container> </fo:flow> <fo:flow flow-name="xsl-region-body"> <fo:block> <fo:inline font-weight="bold">AH Formatter</fo:inline> is able to treat two facing pages (a two-page spread) as a single unit, and you can define spread regions that span across the two pages. You can also define a single background for the two pages. </fo:block> <fo:block text-indent="1em"> Only some documents need spreads, but uses for spreads include: titles that extend across two pages; graphics or tables that are wider than one page; full-bleed background images that extend across two pages. </fo:block> </fo:flow> </fo:page-sequence> </fo:root>