Translation:Nested Styles
From IDMLWiki
Contents |
10.8.3 先頭文字スタイル
先頭文字スタイルは、InDesignの段落フォーマットの機能です。ローカルのフォーマットまたは段落スタイルの一部として適用することができます。先頭文字スタイルを使うと、段落内の1文字以上のテキスト単位で、文字レベルのフォーマットをすることができます。先頭文字スタイルは2つの要素から成り立っています。スタイルを適用するテキストの範囲を区切る区切り文字と、適用する文字スタイルです。
先頭文字スタイルは、特に突き出し見出し(先頭の数文字が見出し文字となるような見出しスタイル)の作成に便利です。例えば、段落の最初の文字に文字スタイルを適用し、違う文字スタイルを最初のコロン(:)の範囲まで適用するように設定することができます。また、それぞれの先頭文字スタイルに、タブ文字や単語の末尾の文字などを、区切り文字として定義することもできます。
先頭文字スタイルのスキーマは、いくつかのテキストオブジェクト(特に<ParagraphStyle>エレメントと<ParagraphStyleRange>エレメント)に含まれています。
スキーマの例113 NestedStyle
element AllNestedStyles { list_type, element ListItem {
record_type,(element AppliedCharacterStyle { object_type, xsd:string }&
element Delimiter {(string_type, xsd:string ) |
(enum_type, NestedStyleDelimiters_EnumValue )
}&
element Repetition { long_type, xsd:int }&
element Inclusive { bool_type, xsd:boolean })
}*
}?&
| 名前 | 値 | 必須 | 説明 |
|---|---|---|---|
| AppliedCharacterStyle | string | ○ | 適用する文字スタイル。文字スタイルのSelf属性の参照 |
| Delimiter | stringまたはNestedStyleDelimiters_EnumValue | ○ | 区切り文字 |
| Repetition | int | ○ | 繰り返し回数 |
| Inclusive | boolean | ○ | trueのとき、区切り文字が先頭文字スタイルに含まれる |
下記は、先頭文字スタイルでの文字スタイルと段落スタイルの使用例です。
IDMLの例80 NestedStyle
<CharacterStyle Self="CharacterStyle/Note" Name="Note" FillColor="Color/C=15 M=100 Y=100 K=0" FontStyle="Bold"><Properties><BasedOn type="string">$ID/[No character style]</BasedOn>
<PreviewColor type="enumeration">Nothing</PreviewColor>
<AppliedFont type="string">Myriad Pro</AppliedFont>
</Properties></CharacterStyle><ParagraphStyle Self="ParagraphStyle/note" Name="note" NextStyle="ParagraphStyle/paragraph"><Properties><BasedOn type="object">ParagraphStyle/paragraph</BasedOn>
<PreviewColor type="enumeration">Nothing</PreviewColor>
<AllNestedStyles type="list"><ListItem type="record"><AppliedCharacterStyle type="object">CharacterStyle/Note </AppliedCharacterStyle>
<Delimiter type="string">:</Delimiter>
<Repetition type="long">1</Repetition>
<Inclusive type="boolean">true</Inclusive>
</ListItem></AllNestedStyles></Properties></ParagraphStyle>

