Translation:Object Styles

From IDMLWiki

Jump to: navigation, search

Contents

10.8.7 オブジェクトスタイル

段落スタイルや文字スタイルを使用して簡単にテキストを書式設定するように、オブジェクトスタイルを使用してグラフィックやフレームを簡単に書式設定できます。オブジェクトスタイルには、線、カラー、透明度、ドロップシャドウ、段落スタイル、テキストの回り込みなどの設定が含まれます。オブジェクト、塗り、線、およびテキストに対してさまざまな透明効果を割り当てることができます。ページオブジェクトは、ローカルで設定するのではなくオブジェクトスタイルを使うようにしてください。

オブジェクトスタイルは、オブジェクト、グループおよびフレーム(テキストフレームを含む)に適用できます。スタイルを使用すると、すべてのオブジェクト設定を消去して置換することも、その他の設定を変更せずに特定の設定のみを置換することもできます。定義内に設定カテゴリーを含めるか、または除外することで、スタイルが影響を及ぼす設定を制御できます。

InDesignドキュメントでのオブジェクトスタイルは、オブジェクトスタイルグループにまとめることができます。

InDesignドキュメントには、デフォルトのオブジェクトスタイルがあります。

  • [なし]
  • [基本グラフィックフレーム]
  • [基本テキストフレーム]
  • [基本グリッド]

[なし]以外のデフォルトオブジェクトスタイルは編集可なので、これらをオブジェクトの書式として使用するならば、IDMLで定義することができます。[なし]には書式が何もありません。このオブジェクトスタイルは、ページオブジェクトにローカルの書式を設定するときに使用します。

デフォルトオブジェクトスタイルについては、InDesignのドキュメントを参照してください。

IDMLパッケージでは、Styles.xmlドキュメントに<RootObjectStyleGroup>エレメントがあり、その中に<ObjectStyle>エレメントと<ObjectStyleGroup>エレメントがあります。<ObjectStyleGroup>エレメントの中に他の<ObjectStyleGroup>エレメントを入れることもできます。

スキーマの例120 ObjectStyleGroup
  1. ObjectStyleGroup_Object = element ObjectStyleGroup{ 
  2.   attribute Self { xsd:string },
  3.   attribute Name { xsd:string },
  4.   element Properties {
  5.     element Label { element KeyValuePair{  KeyValuePair_TypeDef }*
  6.     }?
  7.   }
  8.   ?
  9.   ,
  10. (
  11.   ObjectStyle_Object*&
  12.   ObjectStyleGroup_Object*
  13. )
  14. }
スキーマの例121 ObjectStyle
  1. ObjectStyle_Object = element ObjectStyle{ 
  2.   attribute Self { xsd:string },
  3.   attribute Name { xsd:string },
  4.   attribute AppliedParagraphStyle{  xsd:string }?,
  5.   attribute ApplyNextParagraphStyle{  xsd:boolean }?,
  6.   attribute EnableFill{  xsd:boolean }?,
  7.   attribute EnableStroke{  xsd:boolean }?,
  8.   attribute EnableParagraphStyle{  xsd:boolean }?,
  9.   attribute EnableTextFrameGeneralOptions{  xsd:boolean }?,
  10.   attribute EnableTextFrameBaselineOptions{  xsd:boolean }?,
  11.   attribute EnableStoryOptions{  xsd:boolean }?,
  12.   attribute EnableTextWrapAndOthers{  xsd:boolean }?,
  13.   attribute EnableAnchoredObjectOptions{  xsd:boolean }?,
  14.   attribute FillColor{  xsd:string }?,
  15.   attribute FillTint{  xsd:double }?,
  16.   attribute OverprintFill{  xsd:boolean }?,
  17.   attribute StrokeWeight{  xsd:double }?,
  18.   attribute MiterLimit{  xsd:double {minInclusive="1" maxInclusive="500"} }?,
  19.   attribute EndCap{  EndCap_EnumValue }?,
  20.   attribute EndJoin{  EndJoin_EnumValue }?,
  21.   attribute StrokeType{  xsd:string }?,
  22.   attribute StrokeCornerAdjustment{  StrokeCornerAdjustment_EnumValue }?,
  23.   attribute StrokeDashAndGap{  list { xsd:double * } }?,
  24.   attribute LeftLineEnd{  ArrowHead_EnumValue }?,
  25.   attribute RightLineEnd{  ArrowHead_EnumValue }?,
  26.   attribute StrokeColor{  xsd:string }?,
  27.   attribute StrokeTint{  xsd:double }?,
  28.   attribute CornerRadius{  xsd:double }?,
  29.   attribute OverprintStroke{  xsd:boolean }?,
  30.   attribute GapColor{  xsd:string }?,
  31.   attribute GapTint{  xsd:double }?,
  32.   attribute OverprintGap{  xsd:boolean }?,
  33.   attribute StrokeAlignment{  StrokeAlignment_EnumValue }?,
  34.   attribute Nonprinting { xsd:boolean }?,
  35.   attribute GradientFillAngle{  xsd:double }?,
  36.   attribute GradientStrokeAngle{  xsd:double }?,
  37.   attribute AppliedNamedGrid{  xsd:string }?,
  38.   attribute KeyboardShortcut{  list { xsd:short ,xsd:short } }?,
  39.   attribute EnableFrameFittingOptions{  xsd:boolean }?,
  40.   attribute CornerOption{  CornerOptions_EnumValue }?,
  41.   attribute EnableStrokeAndCornerOptions{  xsd:boolean }?,
  42.   element Properties {
  43.     element BasedOn{ 
  44.       (object_type, xsd:string ) |
  45.       (string_type, xsd:string )
  46.     }?&
  47.     element Label { element KeyValuePair{  KeyValuePair_TypeDef }*
  48.     }?
  49.   }
  50.   ?
  51.   ,
  52. (
  53.   TextFramePreference_Object?&
  54.   BaselineFrameGridOption_Object?&
  55.   AnchoredObjectSetting_Object?&
  56.   TextWrapPreference_Object?&
  57.   StoryPreference_Object?&
  58.   FrameFittingOption_Object?&
  59.   TransparencySetting_Object?&
  60.   StrokeTransparencySetting_Object?&
  61.   FillTransparencySetting_Object?&
  62.   ContentTransparencySetting_Object?&
  63.   ObjectStyleObjectEffectsCategorySettings_Object?&
  64.   ObjectStyleStrokeEffectsCategorySettings_Object?&
  65.   ObjectStyleFillEffectsCategorySettings_Object?&
  66.   ObjectStyleContentEffectsCategorySettings_Object?
  67. )
  68. }

オブジェクトスタイルのほとんどの属性とエレメントは、他のエレメントと共有されています。下記のエレメントについては、「10.3 スプレッドとマスタースプレッド」の対応するセクションを参照してください。

  • <TextFramePreference>エレメント
  • <BaselineFrameGridOption>エレメント
  • <TextWrapPreference>エレメント
  • <FrameFittingOption>エレメント
  • <TransparencySetting>エレメント
  • <StrokeTransparencySetting>エレメント
  • <ContentTransparencySetting>エレメント

下記のエレメントについては、「10.4 ストーリー」を参照してください。

  • <AnchoredObjectSetting>エレメント
  • <StoryPreference>エレメント

<ObjectStyleObjectEffectsCategorySettings>エレメント、<ObjectStyleStrokeEffectsCategorySettings>エレメント、<ObjectStyleFillEffectsCategorySettings>エレメントおよび<ObjectStyleContentEffectsCategorySettings>エレメントは、<ObjectStyle>エレメント特有のものです。これらのエレメントには<ObjectStyle>のセクションの有効(true)無効(false)を設定する属性があります。例えば、オブジェクトスタイルのドロップシャドウの設定を、ページオブジェクトの塗りに適用させないようにするには、<ObjectStyleStrokeEffectsCategorySettings>エレメントのEnableDropShadow属性をfalseに設定します。

スキーマの例122 ObjectStyleObjectEffectsCategorySettings
  1. ObjectStyleObjectEffectsCategorySettings_Object = element ObjectStyleObjectEffectsCategorySettings{ 
  2.   attribute Self { xsd:string },
  3.   attribute EnableTransparency{  xsd:boolean }?,
  4.   attribute EnableDropShadow{  xsd:boolean }?,
  5.   attribute EnableFeather{  xsd:boolean }?,
  6.   attribute EnableInnerShadow{  xsd:boolean }?,
  7.   attribute EnableOuterGlow{  xsd:boolean }?,
  8.   attribute EnableInnerGlow{  xsd:boolean }?,
  9.   attribute EnableBevelEmboss{  xsd:boolean }?,
  10.   attribute EnableSatin{  xsd:boolean }?,
  11.   attribute EnableDirectionalFeather{  xsd:boolean }?,
  12.   attribute EnableGradientFeather{  xsd:boolean }?
  13. }
スキーマの例123 ObjectStyleStrokeEffectsCategorySettings
  1. ObjectStyleStrokeEffectsCategorySettings_Object = element ObjectStyleStrokeEffectsCategorySettings{ 
  2.   attribute Self { xsd:string },
  3.   attribute EnableTransparency{  xsd:boolean }?,
  4.   attribute EnableDropShadow{  xsd:boolean }?,
  5.   attribute EnableFeather{  xsd:boolean }?,
  6.   attribute EnableInnerShadow{  xsd:boolean }?,
  7.   attribute EnableOuterGlow{  xsd:boolean }?,
  8.   attribute EnableInnerGlow{  xsd:boolean }?,
  9.   attribute EnableBevelEmboss{  xsd:boolean }?,
  10.   attribute EnableSatin{  xsd:boolean }?,
  11.   attribute EnableDirectionalFeather{  xsd:boolean }?,
  12.   attribute EnableGradientFeather{  xsd:boolean }?
  13. }
スキーマの例124 ObjectStyleFillEffectsCategorySettings
  1. ObjectStyleFillEffectsCategorySettings_Object = element ObjectStyleFillEffectsCategorySettings{ 
  2.   attribute Self { xsd:string },
  3.   attribute EnableTransparency{  xsd:boolean }?,
  4.   attribute EnableDropShadow{  xsd:boolean }?,
  5.   attribute EnableFeather{  xsd:boolean }?,
  6.   attribute EnableInnerShadow{  xsd:boolean }?,
  7.   attribute EnableOuterGlow{  xsd:boolean }?,
  8.   attribute EnableInnerGlow{  xsd:boolean }?,
  9.   attribute EnableBevelEmboss{  xsd:boolean }?,
  10.   attribute EnableSatin{  xsd:boolean }?,
  11.   attribute EnableDirectionalFeather{  xsd:boolean }?,
  12.   attribute EnableGradientFeather{  xsd:boolean }?
  13. }
スキーマの例125 ObjectStyleContentEffectsCategorySettings
  1. ObjectStyleContentEffectsCategorySettings_Object = element ObjectStyleContentEffectsCategorySettings{ 
  2.   attribute Self { xsd:string },
  3.   attribute EnableTransparency{  xsd:boolean }?,
  4.   attribute EnableDropShadow{  xsd:boolean }?,
  5.   attribute EnableFeather{  xsd:boolean }?,
  6.   attribute EnableInnerShadow{  xsd:boolean }?,
  7.   attribute EnableOuterGlow{  xsd:boolean }?,
  8.   attribute EnableInnerGlow{  xsd:boolean }?,
  9.   attribute EnableBevelEmboss{  xsd:boolean }?,
  10.   attribute EnableSatin{  xsd:boolean }?,
  11.   attribute EnableDirectionalFeather{  xsd:boolean }?,
  12.   attribute EnableGradientFeather{  xsd:boolean }?
  13. }

文字スタイルと同じように、オブジェクトスタイルはオブジェクトの書式をすべて設定する必要はありません。ページオブジェクトの塗りカラーはそのままでドロップシャドウだけを適用するオブジェクトスタイルを作れます。下記に例を示します。このオブジェクトスタイルと、基本になっているオブジェクトスタイルとの唯一の違いは、<TransparencySetting>エレメントのMode属性がDrop(ドロップシャドウ効果を適用する)に設定されていることです。<TransparencySetting>エレメントの属性については、「透明(Transparency)」を参照してください。

IDMLの例82 ObjectStyle
  1. <ObjectStyle Self="ObjectStyle\ DropShadow" Name="DropShadow">
  2.   <Properties>
  3.     <BasedOn type="object">ObjectStyle\[ Normal Graphics Frame]</BasedOn>
  4.   </Properties>
  5.   <TransparencySetting Self="ud4TransparencySetting1">
  6.     <DropShadowSetting Self="ud4TransparencySetting1DropShadowSetting1" Mode="Drop"/>
  7.   </TransparencySetting>
  8. </ObjectStyle>
図57 オブジェクトスタイル

Image:Fig057a.png

Image:Fig057b.png

Personal tools