Translation:Nested Styles

From IDMLWiki

Jump to: navigation, search

Contents

10.8.3 先頭文字スタイル

先頭文字スタイルは、InDesignの段落フォーマットの機能です。ローカルのフォーマットまたは段落スタイルの一部として適用することができます。先頭文字スタイルを使うと、段落内の1文字以上のテキスト単位で、文字レベルのフォーマットをすることができます。先頭文字スタイルは2つの要素から成り立っています。スタイルを適用するテキストの範囲を区切る区切り文字と、適用する文字スタイルです。

先頭文字スタイルは、特に突き出し見出し(先頭の数文字が見出し文字となるような見出しスタイル)の作成に便利です。例えば、段落の最初の文字に文字スタイルを適用し、違う文字スタイルを最初のコロン(:)の範囲まで適用するように設定することができます。また、それぞれの先頭文字スタイルに、タブ文字や単語の末尾の文字などを、区切り文字として定義することもできます。

先頭文字スタイルのスキーマは、いくつかのテキストオブジェクト(特に<ParagraphStyle>エレメントと<ParagraphStyleRange>エレメント)に含まれています。

スキーマの例113 NestedStyle
  1. element AllNestedStyles { list_type, element ListItem {
  2.   record_type,
  3.   (
  4.     element AppliedCharacterStyle { object_type, xsd:string }&
  5.     element Delimiter {
  6.       (string_type, xsd:string ) |
  7.       (enum_type, NestedStyleDelimiters_EnumValue )
  8.     }&
  9.     element Repetition { long_type, xsd:int }&
  10.     element Inclusive { bool_type, xsd:boolean })
  11.   }*
  12. }?&
表115 エレメントとしてのNestedStyleプロパティ
名前 必須 説明
AppliedCharacterStyle string 適用する文字スタイル。文字スタイルのSelf属性の参照
Delimiter stringまたはNestedStyleDelimiters_EnumValue 区切り文字
Repetition int 繰り返し回数
Inclusive boolean trueのとき、区切り文字が先頭文字スタイルに含まれる

下記は、先頭文字スタイルでの文字スタイルと段落スタイルの使用例です。

IDMLの例80 NestedStyle
  1. <CharacterStyle Self="CharacterStyle/Note" Name="Note" FillColor="Color/C=15 M=100 Y=100 K=0" FontStyle="Bold">
  2.   <Properties>
  3.     <BasedOn type="string">$ID/[No character style]</BasedOn>
  4.     <PreviewColor type="enumeration">Nothing</PreviewColor>
  5.     <AppliedFont type="string">Myriad Pro</AppliedFont>
  6.   </Properties>
  7. </CharacterStyle>
  8. <ParagraphStyle Self="ParagraphStyle/note" Name="note" NextStyle="ParagraphStyle/paragraph">
  9.   <Properties>
  10.     <BasedOn type="object">ParagraphStyle/paragraph</BasedOn>
  11.     <PreviewColor type="enumeration">Nothing</PreviewColor>
  12.     <AllNestedStyles type="list">
  13.       <ListItem type="record">
  14.         <AppliedCharacterStyle type="object">CharacterStyle/Note </AppliedCharacterStyle>
  15.         <Delimiter type="string">:</Delimiter>
  16.         <Repetition type="long">1</Repetition>
  17.         <Inclusive type="boolean">true</Inclusive>
  18.       </ListItem>
  19.     </AllNestedStyles>
  20.   </Properties>
  21. </ParagraphStyle>
図55 先頭文字スタイル

Image:Fig055.png

Personal tools