Translation:10 3/ja
From IDMLWiki
3節 / スプレッドとマスタースプレッド
10.3 スプレッドとマスタースプレッド
この節では、IDMLの<Spread>エレメントおよび<MasterSpread>エレメントのコンテンツと構造を説明します。 IDMLパッケージでは、<Spread>エレメントは、スプレッドフォルダ内のSpreadファイルにあります。(命名規則は「8.2 IDMLコンポーネントの名前」による)以降、この節ではこれらのファイルをSpread.xmlと呼びます。
<MasterSpread>エレメントは、各Spread.xmlファイルでの<Spread>エレメントとよく似ています。違いは単純に組織上の目的です。両エレメントのXML構造は基本的に同じであり、この節に記述されするほとんどの情報は、お互いに適用できます。IDMLパッケージでは、<MasterSpread>エレメントはマスタースプレッドフォルダー内にあります。
InDesignドキュメントはスプレッドとマスタースプレッドのグループです。マスタースプレッドはドキュメントスプレッドと違い、複数ページに適用することができ、ページ番号や柱見出しなど、同じレイアウトを繰り返す目的で使われます。スプレッドとマスタースプレッドはページレイアウトとInDesignドキュメントで使用できるページオブジェクトで構成されています。さらに、スプレッドには透明の分割・統合や閉じ方向、マスタースプレッドオブジェクトの表示状態といったスプレッドレベルでの特性もあります。
スキーマの例26 Spreadスキーマ
Spread_Object = element Spread {
attribute Self { xsd:string },
attribute PageTransitionType{ PageTransitionTypeOptions_EnumValue }?,
attribute PageTransitionDirection{ PageTransitionDirectionOptions_EnumValue }?,
attribute PageTransitionDuration{ PageTransitionDurationOptions_EnumValue }?,
attribute FlattenerOverride{ SpreadFlattenerLevel_EnumValue }?,
attribute ShowMasterItems{ xsd:boolean }?,
attribute PageCount{ xsd:int }?,
attribute BindingLocation{ xsd:int }?,
attribute AllowPageShuffle{ xsd:boolean }?,
attribute ItemTransform{ TransformationMatrixType_TypeDef }?,
attribute AppliedMaster{ xsd:string }?,
element Properties {element Label { element KeyValuePair{ KeyValuePair_TypeDef }*
}?
}?,(FlattenerPreference_Object?&Page_Object*&Oval_Object*&Rectangle_Object*&GraphicLine_Object*&TextFrame_Object*&Polygon_Object*&Group_Object*&EPSText_Object*&FormField_Object*&Button_Object*)}
<MasterSpread>エレメントは<Spread>エレメントと違い、Name属性、NamePrefix属性、BaseName属性とOverriddenPageItemProps属性があることに注意してください。マスタースプレッドだけがそれらのプロパティを持つことができます。(マスタースプレッドについての詳細はInDesignドキュメントを参照のこと)<MasterSpread>エレメントにはBindingLocation属性、AllowPageShuffle属性とFlattenerOverride属性がありません。それらのエレメントはドキュメントのスプレッド単位(マスタースプレッドとスプレッドの違いはInDesignドキュメントを参照のこと)で適用します。これらの違いを除き、両エレメントは同じです。子エレメント(<TextFrame>エレメント、<Rectangle>エレメントまたは<Group>エレメントを含む)も、同じです。
スキーマの例27 MasterSpreadスキーマ
MasterSpread_Object = element MasterSpread{
attribute Self { xsd:string },
attribute ItemTransform{ TransformationMatrixType_TypeDef }?,
attribute Name { xsd:string }?,
attribute NamePrefix{ xsd:string }?,
attribute BaseName{ xsd:string }?,
attribute ShowMasterItems{ xsd:boolean }?,
attribute PageCount{ xsd:int }?,
attribute AppliedMaster{ xsd:string }?,
attribute OverriddenPageItemProps{ list { xsd:int * } }?,
element Properties {element Label { element KeyValuePair{ KeyValuePair_TypeDef }*
}?
}?,(Page_Object*&Oval_Object*&Rectangle_Object*&GraphicLine_Object*&TextFrame_Object*&Polygon_Object*&Group_Object*&EPSText_Object*&FormField_Object*&Button_Object*)}
スプレッドまたはマスタースプレッドのほとんどのプロパティは属性で表されます。下記の表に<Spread>エレメント<MasterSpread>エレメントの属性を示します。
| 名前 | 値 | 必須 | 説明 |
|---|---|---|---|
| FlattenerOverride | SpreadFlattener_Level_EnumValue | 透明度の分割・統合をスプレッドでオーバーライドする。(<Spread>エレメントのみ)Default、NoneまたはCustom | |
| ItemTransform | TransformationMatrix | スプレッドの変換行列。InDesignでは、スプレッドの回転はできるが移動、拡大縮小、シアーはできない。このマトリックスで90度単位で回転を設定する | |
| ShowMasterItems | boolean | trueのとき、マスタースプレッドオブジェクトを表示する | |
| PageCount | int | ページ数 | |
| BindingLocation | int | スプレッドの綴じかた(<Spread>エレメントのみ) | |
| AllowPageShuffle | boolean | trueのとき、スプレッドの移動を許可する。falseのとき、ページネーションが変わってもスプレッドは移動されない(<Spread>エレメントのみ) | |
| AppliedMaster | string | <Spread>エレメントまたは<MasterSpread>エレメントに適用するマスタースプレッドのユニークなID(Self属性の値) | |
| Name | string | マスタースプレッドの名前(<MasterSpread>エレメントのみ) | |
| NamePrefix | string | マスタースプレッド名のプレフィックス(<MasterSpread>エレメントのみ) | |
| BaseName | string | マスタースプレッドの基準マスターの名前(<MasterSpread>エレメントのみ) |
最小のSpreadの例
<Spread>エレメントは、スプレッドに表示される他のエレメントの入れものに過ぎません。次の例では、<Page>エレメントと<Rectangle>エレメントの詳細は省略しています。これらのオブジェクトについての情報は、対応するセクションを参照してください。
IDMLの例13 最小のSpread
<Spread Self="ub5" PageCount=" 1" AppliedMaster=" ubc"><Page>...</Page>
<Rectangle>...</Rectangle>
</Spread>
10.3.1 ページオブジェクト
ページオブジェクトとは、長方形、楕円形、直線、多角形、テキストフレーム、グループまたはボタンといったInDesignのページ上のオブジェクトです。IDMLでは、ページオブジェクトは<Spread>エレメントの子エレメントの集まりです。
ページオブジェクトのエレメント名はそれぞれを特定するクラスから付けられています。Rectangle、Oval、GraphicLine、Polygon、TextFrame、GroupまたはButtonです。グラフィックフレームには、特定するページオブジェクトはありません。配置画像は、長方形、楕円形、直線または多角形に含まれます。Rectangle、Oval、GraphicLineまたはPolygonの違いは、PathGeometryエレメントに含まれるPathPointエレメントの数と配置の違いだけです。
InDesignスクリプトモデルの観点からすると、コンテンツタイプまたは図形を変更すると、ページオブジェクトは頻繁にタイプが変わります。長方形にポイントをひとつ追加すると、多角形になります。多角形のコンテンツタイプをテキストタイプに変えると、テキストフレームになります。IDMLも同じ仕様です。例えば<Rectangle>エレメントに複数のパスを追加すると、InDesignはエレメントを変更して開きます。
Rectangle、Oval、GraphicLine、PolygonまたはTextFrameエレメントのスキーマはほとんど同じです。下記はRectangleエレメントの例です。他のオブジェクトタイプの相違点については後半で説明します。
スキーマの例28 PageItem(Rectangle、Oval、GraphicLineまたはPolygon)
Rectangle_Object = element Rectangle {
attribute Self { xsd:string },
attribute StoryTitle{ xsd:string }?,
attribute ContentType{ ContentType_EnumValue }?,
attribute AllowOverrides{ xsd:boolean }?,
attribute FillColor{ xsd:string }?,
attribute FillTint{ xsd:double }?,
attribute OverprintFill{ xsd:boolean }?,
attribute StrokeWeight{ xsd:double }?,
attribute MiterLimit{ xsd:double {minInclusive="1" maxInclusive="500"} }?,
attribute EndCap{ EndCap_EnumValue }?,
attribute EndJoin{ EndJoin_EnumValue }?,
attribute StrokeType{ xsd:string }?,
attribute StrokeCornerAdjustment{ StrokeCornerAdjustment_EnumValue }?,
attribute StrokeDashAndGap{ list { xsd:double * } }?,
attribute LeftLineEnd{ ArrowHead_EnumValue }?,
attribute RightLineEnd{ ArrowHead_EnumValue }?,
attribute StrokeColor{ xsd:string }?,
attribute StrokeTint{ xsd:double }?,
attribute CornerRadius{ xsd:double }?,
attribute GradientFillStart{ UnitPointType_TypeDef }?,
attribute GradientFillLength{ xsd:double }?,
attribute GradientFillAngle{ xsd:double }?,
attribute GradientStrokeStart{ UnitPointType_TypeDef }?,
attribute GradientStrokeLength{ xsd:double }?,
attribute GradientStrokeAngle{ xsd:double }?,
attribute OverprintStroke{ xsd:boolean }?,
attribute GapColor{ xsd:string }?,
attribute GapTint{ xsd:double }?,
attribute OverprintGap{ xsd:boolean }?,
attribute StrokeAlignment{ StrokeAlignment_EnumValue }?,
attribute Nonprinting { xsd:boolean }?,
attribute ItemLayer{ xsd:string }?,
attribute Locked { xsd:boolean }?,
attribute LocalDisplaySetting{ DisplaySettingOptions_EnumValue }?,
attribute GradientFillHiliteLength{ xsd:double }?,
attribute GradientFillHiliteAngle{ xsd:double }?,
attribute GradientStrokeHiliteLength{ xsd:double }?,
attribute GradientStrokeHiliteAngle{ xsd:double }?,
attribute AppliedObjectStyle{ xsd:string }?,
attribute CornerOption{ CornerOptions_EnumValue }?,
attribute ItemTransform{ TransformationMatrixType_TypeDef }?,
element Properties {element PathGeometry{ element GeometryPathType { GeometryPathType_TypeDef }*
}?&
element Label { element KeyValuePair{ KeyValuePair_TypeDef }*
}?
}?,(TextPath_Object*,(TransparencySetting_Object?&
StrokeTransparencySetting_Object?&FillTransparencySetting_Object?&ContentTransparencySetting_Object?&AnchoredObjectSetting_Object?&TextWrapPreference_Object?&InCopyExportOption_Object?&FrameFittingOption_Object?),
(Sound_Object*&
Movie_Object*&Link_Object*&FormField_Object*&Button_Object*&Oval_Object*&Rectangle_Object*&GraphicLine_Object*&TextFrame_Object*&Graphic_Object*&Image_Object*&EPS_Object*&WMF_Object*&PICT_Object*&PDF_Object*&Polygon_Object*&Group_Object*&EPSText_Object*&ImportedPage_Object*)
)}
| 名前 | 値 | 必須 | 説明 |
|---|---|---|---|
| AllowOverrides | boolean | trueのとき、マスタースプレッドオブジェクトはオーバーライドされる | |
| AppliedObjectStyle | string | ページオブジェクトに適用されるオブジェクトスタイル | |
| ContentType | ContentType_EnumValue | フレームの属性。Unassigned(割り当てなし)、GraphicType(グラフィックフレーム)またはTextType(テキストフレーム) | |
| CornerOption | CornerOptions_EnumValue | 角の形状。Note:角オプションは半径の設定ができるという点で、角の結合と異なる。ラウンド結合またはベベル結合の効果は、線幅による。None(なし)、RoundedCorner(丸み(外))、InverseRoundedCorner(丸み(内))、InsetCorner(角(内))、BevelCorner(斜角)またはFancyCorner(飾り) | |
| CornerRadius | double | 角オプションの半径のサイズ | |
| EndCap | EndCap_EnumValue | 線端の形状。ButtEndCap(先太)、RoundEndCap(丸型線端)またはProjectingEndCap(突出線端) | |
| EndJoin | EndJoin_EnumValue | 角の結合。MiterEndJoin(マイター結合)、RoundEndJoin(ラウンド結合)またはBevelEndJoin(ベベル結合) | |
| FillColor | string | 塗りに適用するスウォッチ(カラー、グラデーション、濃淡、混合インキ) | |
| FillTint | double | 塗りの濃淡(0-100。継承またはオーバーライドは-1) | |
| GapColor | string | 点線、句点、二重線など線の間隔のカラーに適用するスウォッチ。(カラー、グラデーション、濃淡、混合インキ)詳細は線の種類を参照のこと | |
| GapTint | double | 線の間隔のカラーの濃淡(0-100。継承またはオーバーライドは-1) | |
| GradientFillAngle | double | 塗りのグラデーションの角度(-180-180) | |
| GradientFillHiliteAngle | double | 塗りのグラデーションのハイライトの角度 | |
| GradientFillHiliteLength | double | 塗りのグラデーションのハイライトの長さ | |
| GradientFillLength | double | 塗りのグラデーションの長さ(線形)または半径(円形) | |
| GradientFillStart | UnitPointType_TypeDef | [x,y]で表される塗りのグラデーション開始点 | |
| GradientStrokeAngle | double | 線のグラデーションの角度(-180-180) | |
| GradientStrokeHiliteAngle | double | 線のグラデーションのハイライトの角度 | |
| GradientStrokeHiliteLength | double | 線のグラデーションのハイライトの長さ | |
| GradientStrokeLength | double | 線のグラデーションの長さ | |
| GradientStrokeStart | UnitPointType_TypeDef | [x,y]で表される線のグラデーション開始点 | |
| ItemLayer | string | オブジェクトのあるレイヤー | |
| ItemTransform | TransformationMatrixType_TypeDef | ページオブジェクトに適用される変換行列 | |
| LeftLineEnd | ArrowHead_EnumValue | 線の始点の形状。None(なし)、SimpleArrowHead(シンプル)、SimpleWideArrowHead(広いシンプル)、TriangleArrowHead(三角)、TriangleArrowWideHead(広い三角)、BarbedArrowHead(ひげ状)、CurvedArrowHead(曲線)、CircleArrowHead(円)、CircleSolidArrowHead(円ベタ)、SquareArrowHead(四角)、SquareSolidArrowHead(四角ベタ)またはBarArrowHead(バー) | |
| LocalDisplaySetting | DisplaySettingOptions_EnumValue | ページオブジェクトの表示画質。HighQuality(高品質表示)、Typical(高速表示)、Optimized(一般表示)またはDefault(デフォルトの設定。詳細はデフォルトの表示設定を参照のこと) | |
| Locked | boolean | trueのとき、ページオブジェクトはロックされている | |
| MiterLimit | double | マイター結合がベベル結合にならない角の比率の限界 | |
| Nonprinting | boolean | trueのとき、ページオブジェクトは印刷されない | |
| OverprintFill | boolean | trueのとき、ページオブジェクトの塗りはオーバープリントになる。falseのとき、ノックアウトになる | |
| OverprintGap | boolean | trueのとき、線の間隔のカラーはオーバープリントになる。falseのとき、ノックアウトになる | |
| OverprintStroke | boolean | trueのとき、線のカラーはオーバープリントになる。falseのとき、ノックアウトになる | |
| RightLineEnd | ArrowHead_EnumValue | 線の終点の形状。None(なし)、SimpleArrowHead(シンプル)、SimpleWideArrowHead(広いシンプル)、TriangleArrowHead(三角)、TriangleArrowWideHead(広い三角)、BarbedArrowHead(ひげ状)、CurvedArrowHead(曲線)、CircleArrowHead(円)、CircleSolidArrowHead(円ベタ)、SquareArrowHead(四角)、SquareSolidArrowHead(四角ベタ)またはBarArrowHead(バー) | |
| StoryTitle | string | ストーリーのタイトル | |
| StrokeAlignment | StrokeAlignment_EnumValue | 線の位置。CenterAlignment(線を中央に揃える)、InsideAlignment(線を内側に揃える)またはOutsideAlignment(線を外側に揃える) | |
| StrokeColor | string | 線に適用するスウォッチ(カラー、グラデーション、濃淡、混合インキ) | |
| StrokeCornerAdjustment | StrokeCornerAdjustment_EnumValue | 点線の角の調整。None(なし)、Dashes(点線の調整)、Gaps(間隔の調整)またはDashesAndGaps(点線と間隔の調整) | |
| StrokeDashAndGap | string | 線分と間隔の長さ。6つの値(pt。[dash1, gap1,dash2, gap2, dash3, gap3])でカスタムの点線を設定する | |
| StrokeTint | double | 線のカラーの濃淡(0-100。継承またはオーバーライドは-1) | |
| StrokeType | string | 線種 | |
| StrokeWeight | double | 線幅 |
| 名前 | 値 | 必須 | 説明 |
|---|---|---|---|
| PathGeometry | Array of GeometryPathType elements | ○ | ページオブジェクトの図形を含むエレメント。詳細は「10.3.3 IDMLの図形」を参照のこと |
10.3.2 入れ子のオブジェクトとIDML構造
InDesignレイアウト上のページオブジェクト(および配置画像などの他のオブジェクト)はしばしば他のページオブジェクトの入れ子になります。IDML構造では、入れ子は明示的です。例えば<Document>エレメントは<Spread>エレメントを含み、<Spread>エレメントは<Rectangle>エレメントをページオブジェクトのエレメントとして含みます。配置画像は、ページオブジェクトのエレメントに含まれる、子のXMLエレメントとして格納されます。グループ内のオブジェクトは、<Group>エレメントの子エレメントとして表されます。
スプレッドの最上位のページオブジェクトだけが、<Spread>エレメントの子エレメントとして表示されます。すべての入れ子のオブジェクトは、それぞれの親エレメントの子エレメントとして表示されます。
10.3.3 IDMLの図形
IDMLファイルの編集や作成時、ページの特定の場所にページオブジェクトを描きたいときがあります。ページオブジェクトの図形がパス(xとyの座標の組で配置された点)でできていることは、既にご存じでしょう。でもここで疑問が生じます。単位は何を使うべきか?座標系の原点はどこにあるのか?ページオブジェクトの座標はページ単位かそれともスプレッド単位なのか?この項で、それらの質問に答えたいと思います。
まず知っておくべきことは、IDMLで使われる座標は、InDesignのインターフェースやInDesignスクリプトオブジェクトモデルでの座標とは同じではありません。(InDesign C++モデルで使われる座標とは同じ)そして、IDMLのオブジェクトを配置するエレメントと属性は、豊富で一貫性があり、InDesignのUIでできることはすべて可能です。
この項では、IDMLでどのようにして図形を表現するかに焦点を絞ります。ページオブジェクトの図形や、InDesignドキュメントのスプレッドに関する一般的なトピックはここでは述べません。詳細は、「InDesign SDKプログラミングガイド」の「レイアウトの基本」を参照してください。座標系と変換行列については、「ポストスクリプトランゲージリファレンスマニュアル」を参照してください。
Note:この項では、一般的な<PageItem>エレメントについて述べます。IDMLには<PageItem>エレメントはなく、目的に応じた<Rectangle>、<Oval>、<GraphicLine>、<TextFrame>や<Polygon>といった各エレメントがあります。
座標、変換行列、IDMLエレメント階層
「10.3.2 入れ子のオブジェクトとIDML構造」で述べたように、IDMLのエレメントは特定の階層で配置されています。ドキュメントはスプレッドを含みます。スプレッドはページオブジェクトを含みます。ページオブジェクトは他のページオブジェクトを含むことができます。ページオブジェクトのスプレッド上での位置は、その階層に従います。エレメント同士の関係は次のように定義されます。
- ドキュメントには基本の座標系がある(「ペーストボードの座標」参照)
- 各スプレッドまたは各マスタースプレッドには独自の座標系がある(「スプレッド座標」参照)
- 各ページオブジェクトは独自の座標系がある(「ページオブジェクトの図形」参照)
- エレメントと親エレメントの座標系の関係は、エレメントに適用される変換行列によって決まる(「変換」参照)
このように、各エレメントにはそれぞれの座標系があります。以降、エレメントの座標系はエレメントの「内部座標」と呼びます。
ペーストボードの座標
レイアウトウィンドウのルーラーから、InDesignドキュメントの座標を「ルーラー座標」といいます。ルーラー座標では、ページオブジェクトは、異なる2セットのルーラーにまたがることができます。他の理由からも、ルーラー座標は開発者にとって厄介なものとなっています。
一方、IDMLの図形は「ペーストボードの座標系」に基づいています。ここでいう「ペーストボード」とは、InDesignのインターフェースで見えているスプレッドの周辺のことではありません。InDesignドキュメントのすべてのスプレッドに渡る、グローバルな座標系です。ペーストボード座標系は、ドキュメントの1ページ目で0から始まり、すべてのスプレッドを網羅しています。(ペーストボード座標系にはマイナスの値はありません)
- ペーストボード座標系で使われる単位はポイント(72ポイント/インチ)です。InDesignのUIでポイントの大きさを変更しても、IDMLで使われているポイントの定義には影響しません。
- 垂直座標(y)の値を増やすと、ペーストボード座標では位置が「下」に動きます。ルーラー座標と同じ仕様ですが、伝統的な幾何学(すなわち、幾何学と三角法クラスで学んだようなもの)や、PostScript、PDFとは逆の、x軸とy軸の関係です。
- 水平座標(x)の値を増やすと、ペーストボード座標では位置が右に動きます。(ルーラー座標とも、伝統的な幾何学とも同じです)
変換
InDesignドキュメントには(他のものに混じって)ページオブジェクトがあります。ページオブジェクトは、1つ以上のパスで作られた、固有の形です。パスの形は、パスの始点と終点(アンカーポイント)か、アンカーポイントに接続している線分のカーブ(コントロールポイント)を指定する座標の組の連続で、完全に定義されています。ページオブジェクトの形は、xとyの座標の集まりで完全に定義されています。
1/72インチの桝目の方眼紙に、ページオブジェクトのパスを作るポイントを描くと、パスは普通、InDesignから印刷されたものとは、異なって見えるでしょう。この架空の方眼紙によって表される座標系は、オブジェクトの内部座標系です。各ページオブジェクトには、それぞれ異なる内部座標系 - 独自の方眼紙があります。ページオブジェクトの形を作るパスポイントは、常に内部座標で記述されます。
変換行列は、ページエレメントの座標系(今述べた、独自の方眼紙)とその親エレメントの座標系(別の方眼紙)との関係を特定します。変換行列を変更することによって、オブジェクトの拡大・縮小、回転、移動や他の変形を行います。例えば、InDesignでページオブジェクトを30度回転させるとき、それはオブジェクトの変換行列を変更することであり、オブジェクトの個々のパスの座標は変えません。先ほどの例でいうと、エレメントが描かれた方眼紙が親エレメントになります。
<Document>エレメントのペーストボード座標と、<Spread>エレメントの座標系の関係は、<Spread>エレメントのItemTransform属性で決まります。
IDMLでは、ページオブジェクトエレメントは<Spread>または<MasterSpread>エレメントの子エレメントであるため、ペーストボード座標系よりも、それらのエレメントの座標系と深く関わりがあります。(ページオブジェクトがレイヤーに集められる、InDesign C++モデルとは異なることに注意してください)
Documentエレメントのペーストボード座標系から、Spreadエレメントの内部座標系を通して、そして、Spreadエレメントの子としてのPageItemエレメントの内部座標系へと、エレメントに変換を適用する一連の流れを「スタック」として扱うことができます。親エレメント内でエレメントを配置するために、InDesignは子エレメントの内部座標を親エレメントの座標系に変換します。
二次元のスペースの2つの座標系間の変換は、3×3の変換行列によって表されます。
変換行列で変えられるのは、6つの要素だけで、IDMLでは標準形[a b c d e f]を使用して指定します。この変換行列は、PageItemエレメントのItemTransform属性か、または、SpreadまたはMasterSpreadエレメントのItemTransform属性に保存されます。
InDesignは下記の計算を行って(ここでTは子エレメントの変換行列)、エレメントの内部座標をその親エレメントの内部座標に変換します。
エレメントに適用された変換行列が単位行列([1 0 0 1 0 0])だと、エレメントの内部座標系と親エレメントの内部座標系は一致します。
以下のリストは、最も一般的な変換を実行するための、変換行列です。
- 移動 [1 0 0 1 tx ty]
txとtyは、ペーストボードの中央からの、水平と垂直のオブジェクトの移動距離
- 拡大・縮小 [sx 0 0 sy 0 0]
sx(水平の伸縮率)、sy(垂直の伸縮率)
- 回転 [cos(θ) sin(θ) -sin(θ) cos(θ) 0 0]
オブジェクトを左回りにθ度回転させる
- シアー [1 tan(α) tan(β) 1 0 0]
オブジェクトのx軸(水平方向)をα度、y軸(垂直方向)をβ度傾ける
変換は、拡大・縮小→シアー→回転→移動の順に適用されます。
スプレッド座標
<Spread>または<MasterSpread>エレメントのItemTransform属性は、スプレッドとペーストボードの座標系の関係を設定します。一般的に、ItemTransform属性で定義される変換行列の、y方向への移動と回転だけがスプレッドに適用されます。InDesignのUIでは、ページを90度以外の任意の角度に回転することはできません。
ItemTransform="1 0 0 1 0 0" スプレッド回転なし ItemTransform="0 1 -1 0 0 0" 90度右回り回転 ItemTransform="0 -1 1 0 0 0" 90度左回り回転 ItemTransform="-1 0 -0 -1 0 0" 180度回転
Note:ItemTransform属性の変換行列を使って、スプレッドの拡大・縮小やシアーはできません。
スプレッド座標系の原点はスプレッド中央です。最初の右ページの左端と最初の左ページの右端が、水平方向中央に揃っています。ページの垂直方向中央はスプレッドの中央に揃っています。各スプレッドにはそれぞれの座標系原点があります。
図7 IDMLスプレッド座標系
Note:スプレッドの水平方向中心は、各ページの中央とは一致しておらず、InDesignのUIでは全くマークされません。左ページは、スプレッドの水平方向中心から常に左側に、挿入されます。右ページは、常に右側に挿入されます。
ページオブジェクトの図形
<Spread>エレメントの位置は、ペーストボード座標系と関係しており、ItemTransform属性で決まります。<Spread>エレメントはペーストボード座標系と同じ単位(ポイント)を使用しますが、<PageItem>エレメントで使われる座標系の単位は任意です。(InDesignから書き出されるIDMLでは、常にポイントになります)子エレメントの内部座標と<Spread>エレメント(あるいはその他の親エレメント)の座標系の関係は、子エレメントのItemTransform属性によって決まります。子エレメントのItemTransform属性の値が、スプレッド内で子エレメントの移動や縮小、拡大を起こすおそれがあるため、子エレメントの座標は、スプレッド座標系に対して絶対ではありません。
InDesignからIDMLを書き出すとき、<PageItem>エレメントは<Spread>エレメント直の子エレメントになり(すなわち、他のページオブジェクトやグループ、アンカーテキストの子にならない)、スプレッド座標系と同じ座標系を持ちます。
各ページオブジェクトの形状は<PathGeometry>エレメント(<Properties>エレメント内)のコンテンツで決まります。<PathGeometry>エレメントのコンテンツは次の通りです。
- 1つ以上の<GeometryPathType>エレメントにより、ページオブジェクトのパスを表す。各<GeometryPathType>エレメントは<PathPointArray>エレメントを含み、<PathPointArray>エレメントは<PathPoint>エレメントのリストを含む。
- 各<PathPoint>エレメントには3つの座標組を決める属性があり、パスポイントの位置と、ポイントとポイントを連結する線セグメントのカーブを決めます。属性はPathPointAnchor(ポイントの位置を決める)、LeftDirection(ベジェの始点)とRightDirection(ベジェの終点)です。それぞれの属性はx、yの形式をとります。(xは水平方向の位置、yは垂直方向の位置。ページオブジェクトの内部座標系で表される)
- <GeometryPathType>エレメントのPathOpen属性はパスがオープンパスかクローズパスかを指定します。PathOpenがtrueのとき、パスはオープンパスとなり、falseのとき、クローズパスになります。InDesignのパスは、適用されている塗りを表示させるために閉じている必要はありません。
Note:InDesignのパスは、非ゼロ屈曲規則で塗り領域のパス内部を決めます。(偶奇ではありません)非ゼロ屈曲規則についてはPostScriptランゲージリファレンスマニュアルを参照してください。
ページオブジェクトの形状は<GeometryPathType>エレメントのコンテンツで決まりますが、ページオブジェクトの、スプレッド上での実際の位置はページオブジェクトのItemTransform属性によります。この変換行列でページオブジェクトの内部座標系と親エレメントの内部座標系の関係を決めます。
図8 PathGeometryエレメント
図形の例
変換とIDMLで入れ子になっているオブジェクトの、良いデモとして、単純な長方形を変換して、他のオブジェクトの入れ子にしてみましょう。さらに、親エレメントに他の変換を適用してみます。この例では、左上角の座標を(72,72)、右下角の座標を(144,144)とした長方形を作成します。単位はポイント、ルーラー座標系に従い、座標原点はページの左上とします。
図9 長方形の例
ダイレクト選択ツールでポイントを選択します。ルーラー座標でのポイントの位置が、コントロールパネルのXとYの欄に表示されます。
図10 ポイントの選択
IDMLでは、この長方形は次のように表されます。赤字は該当する箇所です。
IDMLの例14 変換前の長方形
<Rectangle Self="ud0" ItemTransform="1 0 0 1 0 0">
<Properties>
<PathGeometry>
<GeometryPathType PathOpen="false">
<PathPointArray>
<PathPointType Anchor="72 -324" LeftDirection="72 -324" RightDirection="72 -324"/>
<PathPointType Anchor="72 -252" LeftDirection="72 -252" RightDirection="72 -252"/>
<PathPointType Anchor="144 -252" LeftDirection="144 -252" RightDirection="144 -252"/>
<PathPointType Anchor="144 -324" LeftDirection="144 -324" RightDirection="144 -324"/>
</PathPointArray>
</GeometryPathType>
</PathGeometry>
</Properties>
</Rectangle>
<Rectangle>エレメントの親は<Spread>エレメントです。長方形は変換前なので、長方形の座標はスプレッドと同じです。スプレッドの垂直方向の座標原点はUI上のルーラーとは違うため、IDMLのy座標はコントロールパネルに表示される数値とは異なります。
次に、図形の中心で30度回転してみましょう。次の図のように、ルーラー座標のポイントの位置が変わります。
図11 回転するとポイントがルーラーに対して変わる
ただし、IDMLではポイントの座標は変わりません。次の例のように、変換は<Rectangle>エレメントのItemTransform属性で行います。(赤字は該当箇所)
IDMLの例15 IDMLでItemTransform属性を変更して回転させる
<Rectangle Self="ud0" ItemTransform="0.8660254037844387 -0.5000000000000001 0.5000000000000001 0.8660254037844387 158.46925639128065 15.415316289918337"> <Properties> <PathGeometry> <GeometryPathType PathOpen="false"> <PathPointArray> <PathPointType Anchor="72 -324" LeftDirection="72 -324" RightDirection="72 -324"/> <PathPointType Anchor="72 -252" LeftDirection="72 -252" RightDirection="72 -252"/> <PathPointType Anchor="144 -252" LeftDirection="144 -252" RightDirection="144 -252"/> <PathPointType Anchor="144 -324" LeftDirection="144 -324" RightDirection="144 -324"/> </PathPointArray> </GeometryPathType> </PathGeometry> </Properties> </Rectangle>
次に、長方形をグループ化します。
図12 楕円とグループ化された長方形
次に、このグループを、グループの中心で30度回転させます。コントロールパネルのXとYの欄の値が変化します。
図13 回転されたグループ内の長方形の例
IDMLでは、<Rectangle>エレメントは<Group>エレメントの中になります。<Rectangle>エレメント内部のポイントの位置は変わりません。変換は、<Group>エレメントと<Rectangle>エレメント両方のItemTransform属性によって長方形に適用されます。(赤字) グループと長方形の回転角度(30度)は同じなので、両ItemTransform属性の値は同じですが、重要な点は、グループが変換されても長方形のItemTransform属性とPathGeometry属性は変わらないということです。
IDMLの例16 RectangleエレメントとGroupエレメントの両ItemTransform属性で変換された長方形
<Group Self="ud2" ItemTransform="0.8660254037844387 -0.5000000000000001 0.5000000000000001 0.8660254037844387 158.46925639128065 15.415316289918337"> <Rectangle Self="ud0" ItemTransform="0.8660254037844387 -0.5000000000000001 0.5000000000000001 0.8660254037844387 158.46925639128065 15.415316289918337"> <Properties> <PathGeometry> <GeometryPathType PathOpen="false"> <PathPointArray> <PathPointType Anchor="72 -324" LeftDirection="72 -324" RightDirection="72 -324"/> <PathPointType Anchor="72 -252" LeftDirection="72 -252" RightDirection="72 -252"/> <PathPointType Anchor="144 -252" LeftDirection="144 -252" RightDirection="144 -252"/> <PathPointType Anchor="144 -324" LeftDirection="144 -324" RightDirection="144 -324"/> </PathPointArray> </GeometryPathType> </PathGeometry> </Properties> </Rectangle> <Oval Self="ud1" ItemTransform="1 0 0 1 0 0"> <Properties> <PathGeometry> <GeometryPathType PathOpen="false"> <PathPointArray> <PathPointType Anchor="69.6615427318801 -315.5" LeftDirection="63.67562810529901 -315.5" RightDirection="75.6474573584612 -315.5"/> <PathPointType Anchor="80.5 -326.3384572681199" LeftDirection="80.5 -320.35254264153883" RightDirection="80.5 -332.32437189470096"/> <PathPointType Anchor="69.6615427318801 -337.1769145362398" LeftDirection="75.6474573584612 -337.1769145362398" RightDirection="63.67562810529901 -337.1769145362398"/> <PathPointType Anchor="58.82308546376021 -326.3384572681199" LeftDirection="58.82308546376021 -332.32437189470096" RightDirection="58.82308546376021 -320.35254264153883"/> </PathPointArray> </GeometryPathType> </PathGeometry> </Properties> </Oval> </Group>
長方形の内部座標によって表されているため、この図の座標は変わりません。Rectangleエレメントとその親エレメント(この例では<Group>エレメントと<Spread>エレメント)のItemTransform属性による変換は、InDesignのUIで表示されるページで、どこにポイントが表示されるかを決めます。
10.3.4 ページオブジェクトの例
下記のIDMLは、単純な長方形の例です。
IDMLの例17 ページオブジェクト
<Rectangle Self="ucd" ItemTransform="1 0 0 1 0 0"><Properties><PathGeometry><GeometryPath PathOpen="false"><PathPointArray><PathPointType Anchor="72 -324" LeftDirection="72 -324" RightDirection="72 -324"/><PathPointType Anchor="72 -252" LeftDirection="72 -252" RightDirection="72 -252"/><PathPointType Anchor="144 -252" LeftDirection="144 -252" RightDirection="144 -252"/><PathPointType Anchor="144 -324" LeftDirection="144 -324" RightDirection="144 -324"/></PathPointArray></GeometryPath></PathGeometry></Rectangle>
図14 単純なページオブジェクト(長方形)
入れ子のページオブジェクト
InDesignのページオブジェクトは、他のページオブジェクト内にペーストすることができます。IDMLでは、ページオブジェクトエレメントの子エレメントにして、入れ子のページオブジェクトとして表します。
IDMLの例18 入れ子のページオブジェクト
<Rectangle Self="ucd" ItemTransform="1 0 0 1 0 0"><Properties><PathGeometry><GeometryPath PathOpen="false"><PathPointArray><PathPointType Anchor="72 -324" LeftDirection="72 -324" RightDirection="72 -324"/><PathPointType Anchor="72 -252" LeftDirection="72 -252" RightDirection="72 -252"/><PathPointType Anchor="144 -252" LeftDirection="144 -252" RightDirection="144 -252"/><PathPointType Anchor="144 -324" LeftDirection="144 -324" RightDirection="144 -324"/></PathPointArray></GeometryPath></PathGeometry></Properties><Rectangle Self="uda" ItemTransform="1 0 0 1 0 0"><Properties><PathGeometry><GeometryPath PathOpen="false"><PathPointArray><PathPointType Anchor="84 -312" LeftDirection="84 -312" RightDirection="84 -312"/><PathPointType Anchor="84 -288" LeftDirection="84 -288" RightDirection="84 -288"/><PathPointType Anchor="108 -288" LeftDirection="108 -288" RightDirection="108 -288"/><PathPointType Anchor="108 -312" LeftDirection="108 -312" RightDirection="108 -312"/></PathPointArray></GeometryPath></PathGeometry></Properties></Rectangle></Rectangle>
図15 入れ子のページオブジェクト
ページオブジェクトの回転
下記の例は図形を中心として30度回転したページオブジェクトの例です。パスポイントの座標と図形の境界線は前述の例と同じです。変換行列のみ変更しています。
一般的に、左回りさせるには、変換行列を次のように記述します。
a = cos(角度), b =-sin(角度), c = sin(角度), d = cos(角度)
ここで、a、b、cおよびdは変換行列の最初の4つの値で、「角度」は回転角度です。
IDMLの例19 ページオブジェクトの回転
<Rectangle Self="ucd" ItemTransform="0.8660254037844387 -0.5 0.5 0.8660254037844387 0 0"><Properties><PathGeometry><GeometryPath PathOpen="false"><PathPointArray><PathPointType Anchor="72 -324" LeftDirection="72 -324" RightDirection="72 -324"/><PathPointType Anchor="72 -252" LeftDirection="72 -252" RightDirection="72 -252"/><PathPointType Anchor="144 -252" LeftDirection="144 -252" RightDirection="144 -252"/><PathPointType Anchor="144 -324" LeftDirection="144 -324" RightDirection="144 -324"/></PathPointArray></GeometryPath></PathGeometry></Properties></Rectangle>
図16 ページオブジェクトの回転
下記は変換行列の例です。
a = 0.8660254037844387 = コサイン30度
b = -0.5 = サイン-30度
c = 0.5 = サイン30度
d = 0.8660254037844387 = コサイン30度
変換と入れ子のページオブジェクト
下記は30度回転され、別の長方形の中にペーストされた長方形の例です。外側の長方形はさらに15度回転させます。
<Rectangle Self="ucd" ItemTransform="0.9659258262890683 -0.25881904510252074 0.25881904510252074 0.9659258262890683 0 0"><Properties><PathGeometry><GeometryPath PathOpen="false"><PathPointArray><PathPointType Anchor="72 -324" LeftDirection="72 -324"RightDirection="72 -324"/><PathPointType Anchor="72 -252" LeftDirection="72 -252"RightDirection="72 -252"/><PathPointType Anchor="144 -252" LeftDirection="144 -252"RightDirection="144 -252"/><PathPointType Anchor="144 -324" LeftDirection="144 -324"RightDirection="144 -324"/></PathPointArray></GeometryPath></PathGeometry></Properties><Rectangle Self="uda" ItemTransform="0.8660254037844387 -0.5 0.5 0.8660254037844387 0 0"><Properties><PathGeometry><GeometryPath PathOpen="false"><PathPointArray><PathPointType Anchor="84 -312" LeftDirection="84 -312"RightDirection="84 -312"/><PathPointType Anchor="84 -288" LeftDirection="84 -288"RightDirection="84 -288"/><PathPointType Anchor="108 -288" LeftDirection="108 -288"RightDirection="108 -288"/><PathPointType Anchor="108 -312" LeftDirection="108 -312"RightDirection="108 -312"/></PathPointArray></GeometryPath></PathGeometry></Properties></Rectangle></Rectangle>
図17 外側の長方形
図18 内側の長方形
InDesignのUIでみると、回転が重なっています。(内側の長方形の回転角度が、元々の角度と外側の回転角度の合計になっている)IDMLの変換行列の例では、この回転を反映しています。下記は外側の長方形(前述で設定済み)の変換行列の例です。
a = 0.9659258262890683 = コサイン15度
b = -0.25881904510252074 = サイン-15度
c = 0.25881904510252074 = サイン15度
d = 0.9659258262890683 = コサイン15度
下記は内側の長方形の変換行列の例です。
a = 0.8660254037844387 = コサイン30度
b = -0.5000000000000001 = サイン-30度
c = 0.5000000000000001 = サイン30度
d = 0.8660254037844387 = コサイン30度
配置画像を含むページオブジェクト
配置された画像は常にページオブジェクトの内部にあります。そのページオブジェクトは長方形、直線、楕円または多角形です。グラフィックフレームのページオブジェクトに対しての特別なクラスはありません。
スキーマの例29 Imageスキーマ
mage_Object = element Image {
attribute Self { xsd:string },
attribute FillColor{ xsd:string }?,
attribute FillTint{ xsd:double }?,
attribute OverprintFill{ xsd:boolean }?,
attribute Nonprinting { xsd:boolean }?,
attribute Space { xsd:string }?,
attribute ActualPpi{ list { xsd:double ,xsd:double } }?,
attribute EffectivePpi{ list { xsd:double ,xsd:double } }?,
attribute ImageRenderingIntent{ RenderingIntent_EnumValue }?,
attribute LocalDisplaySetting{ DisplaySettingOptions_EnumValue }?,
attribute ImageTypeName{ xsd:string }?,
attribute AppliedObjectStyle{ xsd:string }?,
attribute ItemTransform{ TransformationMatrixType_TypeDef }?,
element Properties {element Profile {(enum_type, Profile_EnumValue ) |
(string_type, xsd:string )
}?&
element Contents { text }?&
element GraphicProxy{ text }?&
element ClippingPathGeometry{ element GeometryPath{ GeometryPath_TypeDef }*
}?&
element GraphicBounds{ RectangleBoundsType_TypeDef }?&
element Label { element KeyValuePair{ KeyValuePair_TypeDef }*
}?
}?,(TransparencySetting_Object?&StrokeTransparencySetting_Object?&FillTransparencySetting_Object?&ContentTransparencySetting_Object?&TextWrapPreference_Object?&MetadataPacketPreference_Object?&Link_Object*&ClippingPathSettings_Object?&ImageIOPreference_Object?&GraphicLayerOption_Object?&LayerCompOption_Object?)}
| 名前 | 値 | 必須 | 説明 |
|---|---|---|---|
| AppliedObjectStyle | string | 適用するオブジェクトスタイル | |
| FillColor | string | 塗りに適用するスウォッチ(カラー、グラデーション、濃淡または混合インキ) | |
| FillTint | double | 塗りの濃淡(0-100。継承またはオーバーライドは-1) | |
| ImageRenderingIntent | RenderingIntent_EnumValue | マッチング方法。UseColorSettings(ドキュメントの画像インテントを使用)、Perceptual(知覚的)、Saturation(彩度)、Relativecolorimetric(相対的な色域を維持)またはAbsolutecolorimetric(絶対的な色域を維持) | |
| ImageTypeName | string | イメージのタイプ | |
| ItemTransform | TransformationMatrixType_TypeDef | 変換行列 | |
| LocalDisplaySetting | DisplaySettingOptions_EnumValue | 表示画質。HighQuality(高品質表示)、Typical(高速表示)、Optimized(一般表示)またはDefault(親オブジェクトのデフォルトの設定) | |
| Nonprinting | boolean | trueのとき、イメージは印刷されない | |
| OverprintFill | boolean | trueのとき、塗りはオーバープリントになる。falseのとき、ノックアウトになる | |
| Space | string | カラースペース | |
| ClippingPathGeometry | GeometryPath | クリッピングパス | |
| Contents | text | 画像が外部リンクではなく埋め込まれているとき、このエレメントに画像のデータを含む | |
| GraphicBounds | RectangleBounds | [x1, y1, x2, y2]で表される境界線 | |
| GraphicProxy | text | プロクシイメージ | |
| Profile | Profile_EnumValueまたはstring | プロファイル。プロファイルの列挙か文字列を返す。PostScriptCMS(PostScript CMSプロファイルを使用)、UseDocument(ドキュメントのプロファイルを使用)、Working(作業用プロファイルを使用)またはNoCMS(CMSプロファイル不使用) |
下記は長方形の中に配置された画像の例です。(前の例と同じ)XMPメタデータを省略してみましょう。
IDMLの例20 配置画像を含むページオブジェクト
<Rectangle Self="ucd" ItemTransform=" 1 0 0 1 0 0"><Properties><PathGeometry><GeometryPath PathOpen=" false"><PathPointArray><PathPointType Anchor="72 -324" LeftDirection=" 72 -324" RightDirection=" 72 -324"/><PathPointType Anchor="72 -252" LeftDirection=" 72 -252" RightDirection=" 72 -252"/><PathPointType Anchor="144 -252" LeftDirection=" 144 -252" RightDirection=" 144 -252"/><PathPointType Anchor="144 -324" LeftDirection=" 144 -324" RightDirection=" 144 -324"/></PathPointArray></GeometryPath></PathGeometry></Properties><Image Self="udd" Space="$ID/#Links_RGB" ActualPpi=" 300 300" EffectivePpi=" 500 500" ImageRenderingIntent=" UseColorSettings" LocalDisplaySetting=" Default" ImageTypeName="$ ID/JPEG" AppliedObjectStyle=" ObjectStyle/$ ID/[None]" ItemTransform=" 0.6 0 0 0.6 64.77191011235956 -335.27547826086965"><Properties><Profile type="string">$ID/Embedded</Profile>
<GraphicBounds Left="0" Top="0" Right="144" Bottom="157.44"/></Properties><Link Self="ue2" AssetURL="$ ID/" AssetID="$ ID/" LinkResourceURI=" file://ruri/documents/IDML/assets/pumpkin.jpg" LinkResourceFormat="$ ID/JPEG" StoredState=" Normal" LinkClassID=" 35906" LinkClientID=" 257" LinkResourceModified=" false" LinkObjectModified=" false" ShowInUI=" true" CanEmbed=" true" CanUnembed=" true" CanPackage=" true" ImportPolicy=" NoAutoImport" ExportPolicy=" NoAutoExport" LinkImportStamp=" file 128385019586602016 396019" LinkImportModificationTime=" 2007-11-02T11:32:38" LinkImportTime=" 2008-06-12T17:37:35"/><ClippingPathSettings ClippingType=" None" InvertPath=" false" IncludeInsideEdges=" false" RestrictToFrame=" false" UseHighResolutionImage=" true" Threshold="25" Tolerance="2" InsetFrame ="0" AppliedPathName="$ ID/" Index="-1"/><ImageIOPreference ApplyPhotoshopClippingPath=" true" AllowAutoEmbedding=" true" AlphaChannelName="$ ID/"/></Image></Rectangle>
画像は長方形より少し大きくなっています。InDesignのUIで画像を選択すると、画像の境界線が長方形の外側にあることがわかります。(下の図は、画像が選択された状態です。ライトブルーのグラフィックフレームが、画像の境界線の内側にあります)
図19 配置画像を含むページオブジェクト
テキストフレーム(TextFrame)
<TextFrame>エレメントには、他のページオブジェクトにはないいくつかのプロパティがあります。それらのプロパティについて説明します。
スキーマの例30 TextFrame
TextFrame_Object = element TextFrame{
attribute Self { xsd:string },
attribute ParentStory{ xsd:string }?,
attribute PreviousTextFrame{ xsd:string }?,
attribute NextTextFrame{ xsd:string }?,
attribute ContentType{ ContentType_EnumValue }?,
attribute AllowOverrides{ xsd:boolean }?,
attribute FillColor{ xsd:string }?,
attribute FillTint{ xsd:double }?,
attribute OverprintFill{ xsd:boolean }?,
attribute StrokeWeight{ xsd:double }?,
attribute MiterLimit{ xsd:double {minInclusive="1" maxInclusive="500"} }?,
attribute EndCap{ EndCap_EnumValue }?,
attribute EndJoin{ EndJoin_EnumValue }?,
attribute StrokeType{ xsd:string }?,
attribute StrokeCornerAdjustment{ StrokeCornerAdjustment_EnumValue }?,
attribute StrokeDashAndGap{ list { xsd:double * } }?,
attribute LeftLineEnd{ ArrowHead_EnumValue }?,
attribute RightLineEnd{ ArrowHead_EnumValue }?,
attribute StrokeColor{ xsd:string }?,
attribute StrokeTint{ xsd:double }?,
attribute CornerRadius{ xsd:double }?,
attribute GradientFillStart{ UnitPointType_TypeDef }?,
attribute GradientFillLength{ xsd:double }?,
attribute GradientFillAngle{ xsd:double }?,
attribute GradientStrokeStart{ UnitPointType_TypeDef }?,
attribute GradientStrokeLength{ xsd:double }?,
attribute GradientStrokeAngle{ xsd:double }?,
attribute OverprintStroke{ xsd:boolean }?,
attribute GapColor{ xsd:string }?,
attribute GapTint{ xsd:double }?,
attribute OverprintGap{ xsd:boolean }?,
attribute StrokeAlignment{ StrokeAlignment_EnumValue }?,
attribute Nonprinting { xsd:boolean }?,
attribute ItemLayer{ xsd:string }?,
attribute Locked { xsd:boolean }?,
attribute LocalDisplaySetting{ DisplaySettingOptions_EnumValue }?,
attribute GradientFillHiliteLength{ xsd:double }?,
attribute GradientFillHiliteAngle{ xsd:double }?,
attribute GradientStrokeHiliteLength{ xsd:double }?,
attribute GradientStrokeHiliteAngle{ xsd:double }?,
attribute AppliedObjectStyle{ xsd:string }?,
attribute CornerOption{ CornerOptions_EnumValue }?,
attribute ItemTransform{ TransformationMatrixType_TypeDef }?,
element Properties {element PathGeometry{ element GeometryPathType { GeometryPathType_TypeDef }*
}?&
element Label { element KeyValuePair{ KeyValuePair_TypeDef }*
}?
}?,((TextPath_Object*&
GridDataInformation_Object?),
(TransparencySetting_Object?&
StrokeTransparencySetting_Object?&FillTransparencySetting_Object?&ContentTransparencySetting_Object?&TextFramePreference_Object?&AnchoredObjectSetting_Object?&BaselineFrameGridOption_Object?&TextWrapPreference_Object?)
)
| 名前 | 値 | 必須 | 説明 |
|---|---|---|---|
| NextTextFrame | string | 連結している、次のテキストフレーム(ストーリー中のスレッド順による)のSelf属性の値 | |
| ParentStory | string | ストーリーのSelf属性の値 | |
| PreviousTextFrame | string | 連結している、前のテキストフレーム(ストーリー中のスレッド順による)のSelf属性の値 |
テキストフレーム内のテキストは、<TextFrame>エレメントではないことに注意してください。その代わりに、<TextFrame>エレメントは<Story>エレメント(通常、IDMLパッケージ内のStory.xml内にある)を参照しています。<Story>エレメントにテキストが含まれています。これは、ストーリーが外部ファイルとリンクしていても同様です。テキストフレームは、外部ファイルではなくIDMLパッケージ内のStory.xmlファイルを参照し、<Story>エレメントに外部ファイルへの参照があります。
下記は単純なテキストフレームの例です。
IDMLの例21 TextFrame
<TextFrame Self="ucd" ParentStory=" ue7" PreviousTextFrame=" n" NextTextFrame=" n" ContentType=" TextType" ItemTransform=" 1 0 0 1 0 0"><Properties><PathGeometry><GeometryPathType PathOpen=" false"><PathPointArray><PathPointType Anchor="72 -324" LeftDirection=" 72 -324" RightDirection=" 72 -324"/><PathPointType Anchor="72 -252" LeftDirection=" 72 -252" RightDirection=" 72 -252"/><PathPointType Anchor="144 -252" LeftDirection=" 144 -252" RightDirection=" 144 -252"/><PathPointType Anchor="144 -324" LeftDirection=" 144 -324" RightDirection=" 144 -324"/></PathPointArray></GeometryPathType></PathGeometry></Properties><TextFramePreference TextColumnCount=" 1" TextColumnGutter=" 12" TextColumnFixedWidth=" 72" UseFixedColumnWidth=" false" FirstBaselineOffset=" AscentOffset" MinimumFirstBaselineOffset=" 0" VerticalJustification=" TopAlign" VerticalThreshold=" 0" IgnoreWrap=" false"><Properties><InsetSpacing type="list"><ListItem type="unit">0</ListItem>
<ListItem type="unit">0</ListItem>
<ListItem type="unit">0</ListItem>
<ListItem type="unit">0</ListItem>
</InsetSpacing></Properties></TextFramePreference><BaselineFrameGridOption UseCustomBaselineFrameGrid=" false" StartingOffsetForBaselineFrameGrid=" 0" BaselineFrameGridRelativeOption=" TopOfInset" BaselineFrameGridIncrement=" 12"><Properties><BaselineFrameGridColor type="enumeration">LightBlue </BaselineFrameGridColor>
</Properties></BaselineFrameGridOption></TextFrame>
図20 TextFrame
下記はNextTextFrame属性を使って、テキストフレーム同士を連結させる例です。2つのテキストフレームが同じストーリーを参照していることに注意してください。連結したテキストフレームに、別のストーリーを参照させることはできません。
IDMLの例22 連結されたTextFrame
<TextFrame Self="ucd" AppliedObjectStyle=" ObjectStyle\[ Normal Graphics Frame]" ParentStory=" uf2" PreviousTextFrame=" n" NextTextFrame=" u108" ContentType=" TextType" StoryOffset=" n" StrokeWeight=" 0" StrokeColor=" Swatch\cNone" ItemTransform=" 1 0 0 1 0 -396" ><Properties><PathGeometry><GeometryPathType PathOpen=" false"><PathPointArray><PathPointType Anchor="36 72" LeftDirection=" 36 72" RightDirection=" 36 72"/><PathPointType Anchor="36 96" LeftDirection=" 36 96" RightDirection=" 36 96"/><PathPointType Anchor="136 96" LeftDirection=" 136 96" RightDirection=" 136 96"/><PathPointType Anchor="136 72" LeftDirection=" 136 72" RightDirection=" 136 72"/></PathPointArray></GeometryPathType></PathGeometry></Properties></TextFrame><TextFrame Self="u108" AppliedObjectStyle=" ObjectStyle\ k[None]" ParentStory=" uf2" PreviousTextFrame=" ucd" NextTextFrame=" n" ContentType=" TextType" StoryOffset=" n" StrokeWeight=" 1" ItemTransform=" 1 0 0 1 0 -396"><Properties><PathGeometry><GeometryPathType PathOpen=" false"><PathPointArray><PathPointType Anchor="36 108" LeftDirection=" 36 108" RightDirection=" 36 108"/><PathPointType Anchor="36 132" LeftDirection=" 36 132" RightDirection=" 36 132"/><PathPointType Anchor="136 132" LeftDirection=" 136 132" RightDirection=" 136 132"/><PathPointType Anchor="136 108" LeftDirection=" 136 108" RightDirection=" 136 108"/></PathPointArray></GeometryPathType></PathGeometry></Properties></TextFrame>
図21 連結されたテキストフレーム
TextFramePreference
<TextFrame>エレメントには、他のページオブジェクトとの相違点がまだあります。<TextFramePreference>エレメントがあることです。<TextFramePreference>エレメントには段組、インセット、テキストの配置の設定をするエレメントと属性があります。
スキーマの例31 TextFramePreference
TextFramePreference_Object = element TextFramePreference{
attribute TextColumnCount{ xsd:int {minInclusive="1" maxInclusive="40"} }?,
attribute TextColumnGutter{ xsd:double {minInclusive="0" maxInclusive="8640"} }?,
attribute TextColumnFixedWidth{ xsd:double {minInclusive="0" maxInclusive="8640"} }?,
attribute UseFixedColumnWidth{ xsd:boolean }?,
attribute FirstBaselineOffset{ FirstBaseline_EnumValue }?,
attribute MinimumFirstBaselineOffset{ xsd:double {minInclusive="0" maxInclusive="8640"} }?,
attribute VerticalJustification{ VerticalJustification_EnumValue }?,
attribute VerticalThreshold{ xsd:double {minInclusive="0" maxInclusive=" 8640"} }?,
attribute IgnoreWrap{ xsd:boolean }?,
element Properties {element InsetSpacing{(unit_type, xsd:double {minInclusive="0" maxInclusive="8640"} ) |
(list_type,
element ListItem{ unit_type, xsd:double {minInclusive="0" maxInclusive="8640"} },
element ListItem{ unit_type, xsd:double {minInclusive="0" maxInclusive="8640"} },
element ListItem{ unit_type, xsd:double {minInclusive="0" maxInclusive="8640"} },
element ListItem{ unit_type, xsd:double {minInclusive="0" maxInclusive="8640"} })
}?
}?}}
| 名前 | 値 | 必須 | 説明 |
|---|---|---|---|
| FirstBaselineOffset | FirstBaseline_EnumValue | 先頭ベースライン位置。AscentOffset、CapHeight、LeadingOffset、EmboxHeight、XHeightまたはFixedHeight | |
| IgnoreWrap | boolean | trueのとき、テキストの回りこみを無視 | |
| MinimumFirstBaselineOffset | double {minInclusive="0"maxInclusive="8640"} | 先頭ベースライン位置の最小値 | |
| Self | string | ○ | オブジェクトのユニークなID |
| TextColumnCount | int | 段組の数。Note:UseFixedColumnWidth属性の値によっては、段組の数はテキストフレームのサイズにより変化する。1-40 | |
| TextColumnFixedWidth | double | 段組の幅。0-8640 | |
| TextColumnGutter | double | 段組の間隔。0-8640 | |
| UseFixedColumnWidth | boolean | trueのとき、固定段間幅。falseのとき、段組の幅はテキストフレームのサイズにより変化する。Note:trueのとき、フレームの大きさを変えると、段組の数が変わる | |
| VerticalJustification | VerticalJustification_EnumValue | テキストの配置。TopAlign、CenterAlign、BottomAlignまたはJustifyAlign | |
| VerticalThreshold | double | 段落スペース最大値。Note:VerticalJustification属性がJustifyAlighのときのみ。段落間隔が設定値以上にならない。0-8640 |
| 名前 | 値 | 必須 | 説明 |
|---|---|---|---|
| InSetSpacing | doubleまたはListItemエレメント | フレーム内マージン。長方形のテキストフレームでは4つの値(上下左右)。長方形以外では1つ(内)。ListItemエレメントを4つまで含めることができる。 |
IDMLの例23 TextFramePreference(単数のフレーム内マージン)
<TextFramePreference Self="udaTextFramePreference1" TextColumnCount=" 2" TextColumnFixedWidth=" 120" FirstBaselineOffset=" LeadingOffset"><Properties><InsetSpacing type="unit">6</InsetSpacing>
</Properties></TextFramePreference>
IDMLの例24 TextFramePreference(複数のフレーム内マージン)
<TextFramePreference Self="udaTextFramePreference1" TextColumnCount=" 2" TextColumnFixedWidth=" 120" FirstBaselineOffset=" LeadingOffset"><Properties><InsetSpacing type="list"><ListItem type="unit">2</ListItem>
<ListItem type="unit">3</ListItem>
<ListItem type="unit">6</ListItem>
<ListItem type="unit">3</ListItem>
</InsetSpacing></Properties></TextFramePreference>
下記はTextFramePreferenceのプロパティを使用して、複数の段組をオブジェクトに設定する例です。
IDMLの例25 段組のあるテキストフレーム
<TextFrame Self="ucd" AppliedObjectStyle=" ObjectStyle\ k[Normal Graphics Frame]" ParentStory=" uf2" PreviousTextFrame=" n" NextTextFrame=" n" ContentType=" TextType" StoryOffset=" n" StrokeWeight=" 0" StrokeColor=" Swatch\cNone" ItemTransform=" 1 0 0 1 6 -432"><Properties><PathGeometry><GeometryPathType PathOpen=" false"><PathPointArray><PathPointType Anchor="30 72" LeftDirection=" 30 72" RightDirection=" 30 72"/><PathPointType Anchor="30 144" LeftDirection=" 30 144" RightDirection=" 30 144"/><PathPointType Anchor="186 144" LeftDirection=" 186 144" RightDirection=" 186 144"/><PathPointType Anchor="186 72" LeftDirection=" 186 72" RightDirection=" 186 72"/></PathPointArray></GeometryPathType></PathGeometry></Properties><TextFramePreference Self="ucdTextFramePreference1" TextColumnCount=" 2" TextColumnGutter=" 12" TextColumnFixedWidth=" 72" UseFixedColumnWidth=" false" FirstBaselineOffset=" AscentOffset" MinimumFirstBaselineOffset=" 0" VerticalJustification=" TopAlign" VerticalThreshold=" 0" IgnoreWrap=" false"><Properties><InsetSpacing type="list"><ListItem type="unit">0</ListItem>
<ListItem type="unit">0</ListItem>
<ListItem type="unit">0</ListItem>
<ListItem type="unit">0</ListItem>
</InsetSpacing></Properties></TextFramePreference></TextFrame>
図22 段組のあるテキストフレーム
BaselineFrameGridOptions
テキストフレームには、<BaselineFrameGridOptions>エレメントを含めることもできます。このエレメントには属性とエレメントで表されるプロパティがあり、テキストフレームのベースライングリッドを設定します。ベースライングリッドは、テキストフレーム内の段落をグリッドにスナップすることができます。UseCustomBaseLineGrid属性がtrueのとき、段落のベースラインは<BaselineFrameGrid>エレメントで設定されたグリッドにスナップします。falseのとき、段落はドキュメントのベースライングリッド(<GridPreference>エレメントで設定)にスナップします。グリッドとガイドについては、InDesignのオンラインヘルプを参照してください。
スキーマの例22 BaselineFrameGrid
BaselineFrameGridOption_Object = element BaselineFrameGridOption{
attribute Self { xsd:string },
attribute UseCustomBaselineFrameGrid{ xsd:boolean }?,
attribute StartingOffsetForBaselineFrameGrid{ xsd:double {minInclusive="0"maxInclusive="8640"} }?,
attribute BaselineFrameGridRelativeOption{BaselineFrameGridRelativeOption_EnumValue }?,
attribute BaselineFrameGridIncrement{ xsd:double {minInclusive="1"maxInclusive="8640"} }?,
element Properties {element BaselineFrameGridColor{ InDesignUIColorType_TypeDef }?
}?}
IDMLの例26 BaselineFrameGrid
<BaselineFrameGridOption Self="udaBaselineFrameGridOption1" UseCustomBaselineFrameGrid=" true" BaselineFrameGridRelativeOption=" TopOfMargin"><Properties><BaselineFrameGridColor type="enumeration">LightBlue</ BaselineFrameGridColor>
</Properties></BaselineFrameGridOption>
| 名前 | 値 | 必須 | 説明 |
|---|---|---|---|
| UseCustomBaselineFrameGrid | boolean | trueのとき、カスタムのベースライングリッドを使用 | |
| StartingOffsetForBaselineFrameGrid | double | グリッドの開始位置。0-8640 | |
| BaselineFrameGridRelativeOption | BaselineFrameGridRelativeOption_EnumValue | オフセットの相対位置。TopOfPage、TopOfMargin、TopOfFrameまたはTopOfInset | |
| BaselineFrameGridIncrement | double | グリッドの間隔。0-8640 |
| 名前 | 値 | 必須 | 説明 |
|---|---|---|---|
| BaselineFrameGridColor | InDesignUIColorType | グリッドのカラー。それぞれ0-255の範囲のRとG、Bの値3組の配列かUIカラー |
透明(Transparency)
InDesignのレイアウト上で、ページオブジェクトに透明効果を適用することができます。IDMLでは、<TransparecneySetting>エレメントを使用します。このエレメントの子エレメント(1つまたは複数)で、適用する透明効果を指定します。
スキーマの例33 TransparencySetting
TransparencySetting_Object = element TransparencySetting{
attribute Self { xsd:string },
(BlendingSetting_Object?&FindChangeBlendingSetting_Object?&DropShadowSetting_Object?&FindChangeDropShadowSetting_Object?&FeatherSetting_Object?&FindChangeFeatherSetting_Object?&InnerShadowSetting_Object?&FindChangeInnerShadowSetting_Object?&OuterGlowSetting_Object?&FindChangeOuterGlowSetting_Object?&InnerGlowSetting_Object?&FindChangeInnerGlowSetting_Object?&BevelAndEmbossSetting_Object?&FindChangeBevelAndEmbossSetting_Object?&SatinSetting_Object?&FindChangeSatinSetting_Object?&DirectionalFeatherSetting_Object?&FindChangeDirectionalFeatherSetting_Object?&GradientFeatherSetting_Object?&FindChangeGradientFeatherSetting_Object?)}
スキーマの例34 BlendingSetting
BlendingSetting_Object = element BlendingSetting{
attribute Self { xsd:string },
attribute BlendMode{ BlendMode_EnumValue }?,
attribute Opacity { xsd:double {minInclusive="0" maxInclusive="100"} }?,
attribute KnockoutGroup{ xsd:boolean }?,
attribute IsolateBlending{ xsd:boolean }?
}
下記は、<BlendingSetting>エレメントが<Oval>エレメントに透明効果を適用している例です。透明なオブジェクトのアピアランスは、透明なオブジェクトを含むドキュメントまたはスプレッドの、透明の分割・統合の設定によります。
IDMLの例27 透明
<Oval Self="ucd" FillColor=" Color\cC= 100 M=0 Y=0 K=0"><TransparencySetting Self="ucdTransparencySetting1"><BlendingSetting Self="ucdTransparencySetting1BlendingSetting1" Opacity="50"/></TransparencySetting></Oval>
図23 透明
グループ(Group)
InDesignのページオブジェクトはグループ化することができます。グループのグループ化も可能です。下記の例のように、グループ内のそれぞれのオブジェクトは、<Group>エレメントの子エレメントとして表されます。
IDMLの例28 Group
<Group Self="u111" ItemTransform=" 1 0 0 1 0 0"><Rectangle Self="u10d" AppliedObjectStyle=" ObjectStyle\ k[Normal Graphics Frame]" ItemTransform=" 1 0 0 1 0 0"><Properties><PathGeometry><GeometryPathType PathOpen=" false"><PathPointArray><PathPointType Anchor="36.5 -359.5" LeftDirection=" 36.5 -359.5" RightDirection=" 36.5 -359.5"/><PathPointType Anchor="36.5 -330.5" LeftDirection=" 36.5 -330.5" RightDirection=" 36.5 -330.5"/><PathPointType Anchor="65.5 -330.5" LeftDirection=" 65.5 -330.5" RightDirection=" 65.5 -330.5"/><PathPointType Anchor="65.5 -359.5" LeftDirection=" 65.5 -359.5" RightDirection=" 65.5 -359.5"/></PathPointArray></GeometryPathType></PathGeometry></Properties></Rectangle><Polygon Self="u10e" AppliedObjectStyle=" ObjectStyle\ k[Normal Graphics Frame]" ItemTransform=" 1 0 0 1 0 0"><Properties><PathGeometry><GeometryPathType PathOpen=" false"><PathPointArray><PathPointType Anchor="113.71119986540519 -359.5" LeftDirection=" 113.71119986540519 -359.5" RightDirection=" 113.71119986540519 -359.5"/><PathPointType Anchor="97.28830013459482 -359.5" LeftDirection=" 97.28830013459482 -359.5" RightDirection=" 97.28830013459482 -359.5"/><PathPointType Anchor="89.07685026918963 -345.2773516293136" LeftDirection=" 89.07685026918963 -345.2773516293136" RightDirection=" 89.07685026918963 -345.2773516293136"/><PathPointType Anchor="97.28830013459482 -331.0547032586272" LeftDirection=" 97.28830013459482 -331.0547032586272" RightDirection=" 97.28830013459482 -331.0547032586272"/><PathPointType Anchor="113.71119986540518 -331.0547032586272" LeftDirection=" 113.71119986540518 -331.0547032586272" RightDirection=" 113.71119986540518 -331.0547032586272"/><PathPointType Anchor="121.92264973081038 -345.2773516293136" LeftDirection=" 121.92264973081038 -345.2773516293136" RightDirection=" 121.92264973081038 -345.2773516293136"/></PathPointArray></GeometryPathType></PathGeometry></Properties></Polygon><Oval Self="u10f" AppliedObjectStyle=" ObjectStyle\ k[Normal Graphics Frame]" ItemTransform=" 1 0 0 1 0 0"><Properties><PathGeometry><GeometryPathType PathOpen=" false"><PathPointArray><PathPointType Anchor="51 -288.5005" LeftDirection=" 42.99187117333334 -288.5005" RightDirection=" 59.00812882666667 -288.5005"/><PathPointType Anchor="65.5 -303.0005" LeftDirection=" 65.5 -294.9923711733333" RightDirection=" 65.5 -311.0086288266666"/><PathPointType Anchor="51 -317.5005" LeftDirection=" 59.00812882666667 -317.5005" RightDirection=" 42.99187117333334 -317.5005"/><PathPointType Anchor="36.5 -303.0005" LeftDirection=" 36.5 -311.0086288266666" RightDirection=" 36.5 -294.9923711733333"/></PathPointArray></GeometryPathType></PathGeometry></Properties></Oval><Rectangle Self="u110" AppliedObjectStyle=" ObjectStyle\ k[Normal Graphics Frame]" ItemTransform=" 1 0 0 1 0 0"><Properties><PathGeometry><GeometryPathType PathOpen=" false"><PathPointArray><PathPointType Anchor="90.99950000000001 -317.5005" LeftDirection=" 90.99950000000001 -317.5005" RightDirection=" 90.99950000000001 -317.5005"/><PathPointType Anchor="90.99950000000001 -288.5005" LeftDirection=" 90.99950000000001 -288.5005" RightDirection=" 90.99950000000001 -288.5005"/><PathPointType Anchor="119.99950000000001 -288.5005" LeftDirection=" 119.99950000000001 -288.5005" RightDirection=" 119.99950000000001 -288.5005"/><PathPointType Anchor="119.99950000000001 -317.5005" LeftDirection=" 119.99950000000001 -317.5005" RightDirection=" 119.99950000000001 -317.5005"/></PathPointArray></GeometryPathType></PathGeometry></Properties></Rectangle></Group>
図24 グループ
ボタン(Button)
<Button>エレメントは<State>エレメントに含まれ、ボタンのアピアランスを指定するページオブジェクトと、動作を指定する属性を含みます。InDesignでボタンの設定をしたオブジェクトは、PDFやSWFに書き出したときにインタラクティブな効果をもたらします。
スキーマの例35 ボタン
Button_Object = element Button {
attribute Self { xsd:string },
attribute Name { xsd:string }?,
attribute Description { xsd:string }?,
attribute VisibilityInPdf{ VisibilityInPdf_EnumValue }?,
attribute AllowOverrides{ xsd:boolean }?,
attribute FillColor{ xsd:string }?,
attribute FillTint{ xsd:double }?,
attribute OverprintFill{ xsd:boolean }?,
attribute StrokeWeight{ xsd:double }?,
attribute MiterLimit{ xsd:double {minInclusive="1" maxInclusive="500"} }?,
attribute EndCap{ EndCap_EnumValue }?,
attribute EndJoin{ EndJoin_EnumValue }?,
attribute StrokeType{ xsd:string }?,
attribute StrokeCornerAdjustment{ StrokeCornerAdjustment_EnumValue }?,
attribute StrokeDashAndGap{ list { xsd:double * } }?,
attribute LeftLineEnd{ ArrowHead_EnumValue }?,
attribute RightLineEnd{ ArrowHead_EnumValue }?,
attribute StrokeColor{ xsd:string }?,
attribute StrokeTint{ xsd:double }?,
attribute CornerRadius{ xsd:double }?,
attribute GradientFillStart{ UnitPointType_TypeDef }?,
attribute GradientFillLength{ xsd:double }?,
attribute GradientFillAngle{ xsd:double }?,
attribute GradientStrokeStart{ UnitPointType_TypeDef }?,
attribute GradientStrokeLength{ xsd:double }?,
attribute GradientStrokeAngle{ xsd:double }?,
attribute OverprintStroke{ xsd:boolean }?,
attribute GapColor{ xsd:string }?,
attribute GapTint{ xsd:double }?,
attribute OverprintGap{ xsd:boolean }?,
attribute StrokeAlignment{ StrokeAlignment_EnumValue }?,
attribute Nonprinting { xsd:boolean }?,
attribute ItemLayer{ xsd:string }?,
attribute Locked { xsd:boolean }?,
attribute LocalDisplaySetting{ DisplaySettingOptions_EnumValue }?,
attribute GradientFillHiliteLength{ xsd:double }?,
attribute GradientFillHiliteAngle{ xsd:double }?,
attribute GradientStrokeHiliteLength{ xsd:double }?,
attribute GradientStrokeHiliteAngle{ xsd:double }?,
attribute AppliedObjectStyle{ xsd:string }?,
attribute CornerOption{ CornerOptions_EnumValue }?,
attribute ItemTransform{ TransformationMatrixType_TypeDef }?,
element Properties {element PathBoundingBox{ RectangleBoundsType_TypeDef }?&
element PathGeometry{ element GeometryPathType { GeometryPathType_TypeDef }*
}?&
element Label { element KeyValuePair{ KeyValuePair_TypeDef }*
}?
}?,(AnchoredObjectSetting_Object?&TextWrapPreference_Object?&State_Object*&Behavior_Object*&GotoFirstPageBehavior_Object*&GotoLastPageBehavior_Object*&GotoNextPageBehavior_Object*&GotoPreviousPageBehavior_Object*&GotoNextViewBehavior_Object*&GotoPreviousViewBehavior_Object*&GotoURLBehavior_Object*&GotoAnchorBehavior_Object*&MovieBehavior_Object*&SoundBehavior_Object*&ShowHideFieldsBehavior_Object*&OpenFileBehavior_Object*&CloseWindowBehavior_Object*&QuitBehavior_Object*&ViewZoomBehavior_Object*&GotoPageBehavior_Object*)}
<Button>エレメントのほとんどのプロパティは、他のページオブジェクトと共有されています。これらのプロパティについては、「共通のPageItemプロパティ」を参照してください。<Button>エレメントにのみあるプロパティは下記の通りです。
| 名前 | 値 | 必須 | 説明 |
|---|---|---|---|
| Description | string | ボタンの詳細 | |
| Name | string | ボタンの名前 | |
| VisibilityInPdf | VisibilityInPdf_EnumValue | PDFでの表示/非表示。VisibleInPdf(表示可能)、HiddenInPdf(非表示)、VisibleButDoesNotPrintInPdf(表示可能・印刷不能)またはHiddenButPrintableInPdf(非表示・印刷可能) |
| 名前 | 値 | 必須 | 説明 |
|---|---|---|---|
| PathBoundingBox | RectangleBoundsType_TypeDef | ボタンの境界線。[x1, y1, x2, y2] |
スキーマの例36 State
State_Object = element State {
attribute Self { xsd:string },
attribute Name { xsd:string }?,
attribute Active { xsd:boolean }?,
attribute Enabled { xsd:boolean }?,
attribute Statetype { StateTypes_EnumValue }?,
(FormField_Object*&Button_Object*&Oval_Object*&Rectangle_Object*&GraphicLine_Object*&TextFrame_Object*&Graphic_Object*&ImportedPage_Object*&Image_Object*&EPS_Object*&WMF_Object*&PICT_Object*&PDF_Object*&Polygon_Object*&Group_Object*&EPSText_Object*)}
| 名前 | 値 | 必須 | 説明 |
|---|---|---|---|
| Active | boolean | trueのとき、ステータスはアクティブ(もしくは最前面) | |
| Enabled | boolean | trueのとき、ステータスを使用しているオブジェクトは、PDFで表示される。falseのとき、ステータスを使用しているオブジェクトは、ステータスをアクティブにするイベント(マウスオーバーなど)が行われても、PDFで表示されない | |
| Statetype | StateTypes_EnumValue | ステータス。Up、RolloverまたはDown |
属性として表されるButtonプロパティは、他のページオブジェクトのものと同じです。(「共通のPageItemプロパティ」参照)<Button>エレメントと他のページオブジェクトのエレメントとの主な違いは、<Button>エレメントには<State>エレメント(書き出されたPDFまたはSWFにおいて、ある動きに対しての外観を設定する)と、1つ以上の「動作」オブジェクト(後述)があることです。ボタンのステータスと動作については、InDesignのオンラインヘルプを参照してください。
IDMLの例29 Button
<Button Self="ud6" Name="GoToFirstPage" Description="" FillColor=" Color/Black" ItemTransform=" 1 0 0 1 0 0"><Properties><PathBoundingBox Left="36" Top="-336.25" Right="76" Bottom="-312"/></Properties><State Self="ud6i0" Name="Up" Active="true" Enabled="true" Statetype="Up"><Group Self="ud5" FillColor=" Color/Black" ItemTransform=" 1 -0 -0 1 -0 -0"><Polygon Self="ucc" ContentType=" Unassigned" FillColor=" Color/Black" StrokeWeight=" 0" ItemTransform=" 1 0 0 1 0 0"><Properties><PathGeometry><GeometryPathType PathOpen=" false"><PathPointArray><PathPointType Anchor="36 -324" LeftDirection=" 36 -324" RightDirection=" 36 -324"/><PathPointType Anchor="60 -312" LeftDirection=" 60 -312" RightDirection=" 60 -312"/><PathPointType Anchor="60 -336.25" LeftDirection=" 60 -336.25" RightDirection=" 60 -336.25"/></PathPointArray></GeometryPathType></PathGeometry></Properties><TransparencySetting><BevelAndEmbossSetting Applied="true" Style="Emboss" Size="3"/></TransparencySetting></Polygon><Rectangle Self="ud3" StoryTitle="$ ID/" ContentType=" Unassigned" FillColor=" Color/Black" StrokeWeight=" 0" StrokeColor=" Swatch/None" ItemTransform=" 1 0 0 1 0 0"><Properties><PathGeometry><GeometryPathType PathOpen=" false"><PathPointArray><PathPointType Anchor="66 -336.25" LeftDirection=" 66 -336.25" RightDirection=" 66 -336.25"/><PathPointType Anchor="66 -312" LeftDirection=" 66 -312" RightDirection=" 66 -312"/><PathPointType Anchor="76 -312" LeftDirection=" 76 -312" RightDirection=" 76 -312"/><PathPointType Anchor="76 -336.25" LeftDirection=" 76 -336.25" RightDirection=" 76 -336.25"/></PathPointArray></GeometryPathType></PathGeometry></Properties><TransparencySetting><BevelAndEmbossSetting Applied="true" Style="Emboss" Size="3"/></TransparencySetting></Rectangle></Group></State><GotoFirstPageBehavior Self="ud7" ZoomSetting=" InheritZoom" Name="Go To First Page" EnableBehavior=" true" BehaviorEvent=" MouseDown"/></Button>
図25 ボタン
動作(Behavior)
ドキュメントをPDF形式に書き出す際に特定の操作を実行するボタンを作成することができます。例えば、PDFドキュメントの別のページにジャンプするボタンや、ムービークリップを再生するボタンなどを作成することができます。これらを「動作」といいます。InDesignのボタン機能については、InDesignのドキュメントを参照してください。
スキーマの例37 Behavior
Behavior_Object = element Behavior {
attribute Self { xsd:string },
attribute Name { xsd:string }?,
attribute EnableBehavior{ xsd:boolean }?,
attribute BehaviorEvent{ BehaviorEvents_EnumValue }?,
element Properties {element Label { element KeyValuePair{ KeyValuePair_TypeDef }*
}?
}?}
Behaviorエレメントのスキーマには、多くの共通点があるので、すべてのBehaviorエレメントに共通の属性を下記の表に示します。固有のものは別記します。
| 名前 | 値 | 必須 | 説明 |
|---|---|---|---|
| Name | string | 動作の名前 | |
| EnableBehavior | boolean | trueのとき、ボタンの動作は有効 | |
| BehaviorEvent | BehaviorEvents_EnumValue | 動作のトリガーとなるイベント。MouseUp、MouseDown、MouseEnter、MouseExit、OnFocusまたはOnBlur |
GoToPage、GotoFirstPageBehavior、GotoLastPageBehavior、GotoNextPageBehavior、GotoPreviousPageBehavior、GotoNextViewBehaviorとGotoPreviousViewBehaviorエレメントには、ZoomSetting属性があります。
| 名前 | 値 | 必須 | 説明 |
|---|---|---|---|
| ZoomSetting | GoToZoomOptions_EnumValue | 拡大縮小率。InheritZoom、FitWindow、FitWidth、FitVisibleまたはActualSize |
GotoURLBehaviorエレメントにはURL属性があります。
| 名前 | 値 | 必須 | 説明 |
|---|---|---|---|
| URL | string | ハイパーリンク先のURL |
GotoAnchorBehaviorエレメントには、3つの属性が追加されます。ZoomSetting属性(上記参照)、AnchorName属性とFilePath属性です。
| 名前 | 値 | 必須 | 説明 |
|---|---|---|---|
| AnchorName | string | アンカーの名前 | |
| FilePath | string | アンカーを含むファイルのパス |
MovieBehaviorエレメントには、2つの属性が追加されます。MovieItem属性とOperation属性です。
| 名前 | 値 | 必須 | 説明 |
|---|---|---|---|
| MovieItem | string | ムービーのパス | |
| Operation | PlayOperations_EnumValue | Play、Stop、PauseまたはResume |
SoundBehaviorエレメントには、2つの属性が追加されます。SoundItem属性とOperation属性です。
| 名前 | 値 | 必須 | 説明 |
|---|---|---|---|
| SoundItem | string | 音声ファイルのパス | |
| Operation | PlayOperations_EnumValue | Play、Stop、PauseまたはResume |
ShowHideFieldsBehaviorエレメントには、2つの属性が追加されます。FieldsToShow属性とFieldsToHide属性です。
| 名前 | 値 | 必須 | 説明 |
|---|---|---|---|
| FieldsToShow | stringのリスト。スペースで区切る | 表示するフィールドの参照リスト。(参照するエレメントのSelf属性の値) | |
| FieldsToHide | stringのリスト。スペースで区切る | 非表示にするフィールドの参照リスト。(参照するエレメントのSelf属性の値) |
OpenFileBehaviorエレメントには、FilePath属性が追加されます。
| 名前 | 値 | 必須 | 説明 |
|---|---|---|---|
| FilePath | string | 開くファイルのパス |
ViewZoomBehaviorエレメントには、ViewZoomStyle属性が追加されます。
| 名前 | 値 | 必須 | 説明 |
|---|---|---|---|
| ViewZoomStyle | ViewZoomStyle_EnumValue | FullScreen、ZoomIn、ZoomOut、FitPage、ActualSize、FitWidth、FitVisible、Reflow、SinglePage、OneCulumn、TwoColumn、RotateCWまたはRotateCCW |
GotoPageBehavilrエレメントには、2つの属性が追加されます。ViewZoomStyle属性(上記参照)とPageNumver属性です。
| 名前 | 値 | 必須 | 説明 |
|---|---|---|---|
| PageNumver | int | 表示するページの番号 |
XMLエレメントとページオブジェクトの結合
InDesignドキュメントにおいて、XML構造に基づきXMLエレメントで結合されたページオブジェクトと、結合されていないページオブジェクトに違いはありません。区別するとしたら、<XMLElement>エレメントからの参照です。IDMLパッケージでは、このエレメントはBackingStroy.xmlファイルにあります。
下記は、<XMLElement>エレメントが、レイアウト上の<Rectangle>エレメントを参照している例です。
IDMLの例30 XMLElementとフレームの結合
<XMLElement Self="di2" MarkupTag=" XMLTag\cRoot"><XMLElement Self="di2i3" MarkupTag=" XMLTag\cFrame" XMLContent="ud6"/></XMLElement><!--From Spread_ub8.xml--><Rectangle Self="ud6" .../>
図26 XMLエレメントとフレームの結合
下記の例では、<XMLElement>エレメントが、同じパッケージ内の<Story>エレメントを参照し、<TextFrame>エレメントも同じ<Story>エレメントを参照しています。XMLエレメントは<Story>エレメントに表示されるテキストと結合されます。
IDMLの例31 TextFrameとXMLElementの結合
<!--From BackingStory. xml--><XMLElement Self="di2i3" MarkupTag=" XMLTag\ExampleXMLElement" XMLContent="ucf"/><!--From Story_ucf.xml--><Story Self="ucf" ...><!--From Spread_ub8.xml--><TextFrame Self="ucd" ParentStory=" ucf".../>
図27 XMLエレメントとテキストフレームの結合
10.3.5 ページ
スプレッドは、1ページ以上でできています。スプレッド内で、ページは<Page>エレメントとして現され、そのプロパティはドキュメントの設定(またはトラッププリセットのような、マスタースプレッドでの設定)とページマージンの設定をオーバーライドします。スプレッドのページのサイズは1種類で(InDesignでは、1ドキュメントに複数のページサイズをサポートしていません)、<Spread>エレメント内での出現順に、スプレッドに追加されます。スプレッド内でのページの位置は、<Spread>エレメントの<BindingLocation>属性で設定する、ドキュメントの綴じかたで決まります。綴じかたについての詳細は、InDesignのドキュメントを参照してください。
<Page>エレメントは<Spread>エレメント内で、スプレッドでの出現順に現れ、<DocumentPreference>エレメントのPageBinding属性で設定された綴じかたと関係しています。(「右綴じ」では最初のページはスプレッドの左、「左綴じ」では右になります)
Note:ページオブジェクトはページエレメントの子エレメントではなく、スプレッドでまとめられます。
スキーマの例38 ページのスキーマ
Page_Object = element Page {
attribute Self { xsd:string },
attribute Name { xsd:string }?,
attribute AppliedTrapPreset{ xsd:string }?,
attribute AppliedMaster{ xsd:string }?,
attribute OverrideList{ list { xsd:string * } }?,
attribute TabOrder{ list { xsd:string * } }?,
attribute GridStartingPoint{ GridStartingPointOptions_EnumValue }?,
attribute UseMasterGrid{ xsd:boolean }?,
element Properties {element Descriptor { list_type, element ListItem{
(string_type, xsd:string ) |
(enum_type, PageNumberStyle_EnumValue ) |
(bool_type, xsd:boolean ) |
(long_type, xsd:int {minInclusive="1" maxInclusive="999999"} )
}* }?&
element Label { element KeyValuePair{ KeyValuePair_TypeDef }*
}?,(MarginPreference_Object?&Guide_Object*&GridDataInformation_Object?)}
下記は、2ページものの(単純な)<Spread>エレメントの例です。右綴じで、最初のページは左、2ページ目は右です。
IDMLの例32 スプレッドでのページ
<Spread Self="uff" FlattenerOverride=" Default" ShowMasterItems=" true" PageCount=" 2" BindingLocation=" 1" AllowPageShuffle=" true" ItemTransform=" 1 0 0 1 0 972" AppliedMaster=" ucf"><Page Self="u104" Name="2" AppliedTrapPreset=" TrapPreset\ kkDefaultTrapStyleName" AppliedMaster=" ucf" OverrideList="" TabOrder="" GridStartingPoint=" TopOutside" UseMasterGrid=" true"><MarginPreference ColumnCount=" 1" ColumnGutter=" 12" Top="36" Bottom="36" Left="36" Right="36" ColumnDirection=" Horizontal" ColumnsPositions=" 0 540"/></Page><Page Self="u105" Name="3" AppliedTrapPreset=" TrapPreset\ kkDefaultTrapStyleName" AppliedMaster=" ucf" OverrideList="" TabOrder="" GridStartingPoint=" TopOutside" UseMasterGrid=" true"><MarginPreference ColumnCount=" 1" ColumnGutter=" 12" Top="36" Bottom="36" Left="36" Right="36" ColumnDirection=" Horizontal" ColumnsPositions=" 0 540"/></Page></Spread>
| 名前 | 値 | 必須 | 説明 |
|---|---|---|---|
| Name | string | ページの名前 | |
| AppliedTrapPreset | string | ページに適用されるトラッププリセットの名前 | |
| AppliedMaster | string | ページに適用されるマスタースプレッドの名前 | |
| OverrideList | stringのリスト。スペースで区切る | オーバーライドされたマスターページオブジェクトの参照。(オーバーライドするページオブジェクトのSelf属性値)マスターページオブジェクトのオーバーライドについてはInDesignのオンラインヘルプを参照のこと | |
| TabOrder | stringのリスト。スペースで区切る | 書き出されたPDFでの、ボタンのタブ順の参照(ページオブジェクトのSelf属性値) | |
| GridStartingPoint | GridStartingPointOptions_EnumValue | グリッドの開始位置。TopOutside、TopInside、BottomOutside、BottomInside、CeneterVertical、CenterHorizontalまたはCenterCopetely | |
| UseMasterGrid | boolean | trueのとき、マスターのグリッドを使用 | |
| Descriptor | ListItemエレメント | InCopyのアサインで使用されるプロパティ |
10.3.6 段組とマージン
ページの段組とマージンは<MarginPreference>オブジェクトで設定します。
スキーマの例39 マージンプリファレンス
MarginPreference_Object = element MarginPreference{
attribute Self { xsd:string },
attribute ColumnCount{ xsd:int {minInclusive="1" maxInclusive="216"} }?,
attribute ColumnGutter{ xsd:double {minInclusive="0" maxInclusive="1440"} }?,
attribute Top { xsd:double }?,
attribute Bottom { xsd:double }?,
attribute Left { xsd:double }?,
attribute Right { xsd:double }?,
attribute ColumnDirection{ HorizontalOrVertical_EnumValue }?,
attribute ColumnsPositions{ list { xsd:double * } }?
}
IDMLの例33 マージンプリファレンス
<MarginPreference ColumnCount=" 1" ColumnGutter=" 12" Top="36" Bottom="36" Left="36" Right="36" ColumnDirection=" Horizontal" ColumnsPositions=" 0 540"/>
10.3.7 ガイド
スプレッドには、ページオブジェクト以外にガイドを含めることができます。ガイドを使ってページオブジェクトを整列させたり、目印としてガイドをひくなど、ガイドの使いかたはInDesignのオンラインヘルプを参照してください。
スキーマの例40 ガイド
Guide_Object = element Guide {
attribute Self { xsd:string },
attribute Orientation { HorizontalOrVertical_EnumValue }?,
attribute Location { xsd:double }?,
attribute FitToPage{ xsd:boolean }?,
attribute ViewThreshold{ xsd:double {minInclusive="5" maxInclusive="4000"} }?,
attribute Locked { xsd:boolean }?,
attribute ItemLayer{ xsd:string }?,
attribute PageIndex{ xsd:short }?,
element Properties {element GuideColor{ InDesignUIColorType_TypeDef }?&
element Label { element KeyValuePair{ KeyValuePair_TypeDef }*
}?}
IDMLの例34 ガイド
<Guide Self="ue4" Orientation="Horizontal" Location="72" FitToPage=" true" ViewThreshold=" 5" Locked="false" ItemLayer=" ub1" PageIndex=" 1"><Properties><GuideColor type="enumeration">Cyan</GuideColor>
</Properties></Guide>
| 名前 | 値 | 必須 | 説明 |
|---|---|---|---|
| FitToPage | boolean | trueのとき、ページガイド。falseのとき、スプレッドガイド | |
| ItemLayer | string | ガイドをひくレイヤー | |
| Location | double | 現在のルーラーの原点を基準にした位置 | |
| Locked | boolean | trueのとき、ガイドはロックされる | |
| Orientation | HorizontalOrVertical_EnumValue | ガイドの方向。HorizontalまたはVertical | |
| PageIndex | short | ガイドのあるページのインデックス | |
| ViewThreshold | double | ガイドが表示されなくなる画面の拡大率(5.0-4000.0) |
| 名前 | 値 | 必須 | 説明 |
|---|---|---|---|
| GuideColor | InDesignUIColorType_TypeDef | ガイドのカラー。ListItemエレメント3つの配列(0-255のRGBの値またはUIColorの列挙) |
10.3.8 透明の分割・統合
透明効果(ドロップシャドウ、シャドウ(内側)、光彩(外側)、光彩(内側)、ベベルとエンボス、サテンまたはぼかしを含む)のアピアランスは、印刷やInDesignドキュメントの書き出し時に、スプレッドまたはドキュメントの分割・統合プリセットが影響します。(印刷物や、書き出されたファイルでの透明オブジェクトの実際のアピアランスは、出力機器もしくはファイルフォーマットの制約を受けます)ドキュメントの分割・統合プリセットは、独自のプリセットを割り当てられたスプレッド以外の、すべてのオブジェクトに適用されます。すなわち、スプレッドの分割・統合プリセットは、ドキュメントのプリセットをオーバーライドします。IDMLでは、これらのプリセットは<FlattenerPreference>エレメントで表されます。
スキーマの例41 FlattenerPereference
FlattenerPreference_Object = element FlattenerPreference{
attribute Self { xsd:string },
attribute LineArtAndTextResolution{ xsd:double }?,
attribute GradientAndMeshResolution{ xsd:double }?,
attribute ClipComplexRegions{ xsd:boolean }?,
attribute ConvertAllStrokesToOutlines{ xsd:boolean }?,
attribute ConvertAllTextToOutlines{ xsd:boolean }?,
element Properties {element RasterVectorBalance{(enum_type, FlattenerLevel_EnumValue ) |
(double_type, xsd:double {minInclusive="0" maxInclusive="100"} )
}?
}?}
下記は分割・統合プリセットをカスタマイズする例です。
IDMLの例35 FlattenerPreference
<Spread Self="ub8" FlattenerOverride=" Custom"><FlattenerPreference Self="ub8FlattenerPreference1" LineArtAndTextResolution=" 300" GradientAndMeshResolution=" 150" ClipComplexRegions=" true" ConvertAllStrokesToOutlines=" true" ConvertAllTextToOutlines=" false"><Properties><RasterVectorBalance type="double">75</RasterVectorBalance>
</Properties></FlattenerPreference></Spread>
























