要約: | - 文字に使用するコア テキスト書式は text です。
- 段落に使用するコア テキスト書式は paragraph です。
|
文字書式のコア テキスト書式は
text で、段落書式のコア テキスト書式は
paragraph です。これらのコア テキスト書式を追加オプションとともに使用し、文字または段落についてさまざまなテキスト書式を定義できます。
text 文字書式で使用できるオプションの 1 つは
color で、これは
text によって書式設定された文字の色を設定します。
次の例では text 文字書式の color オプションの設定が示されています。
例:
text 書式の color オプションの設定 |
|
{text color = "red", All the characters within the curly braces are red.}
| |
テキスト書式内に複数のオプションを設定することができます。すべてのオプション設定はテキスト書式の内容より優先され、コンマで区切られます。次の例は、内側のテキスト ブロックのみが赤字で斜体になるように、大きなテキスト ブロック内で特定のテキストを書式設定する方法を示しています。この例では paragraph と text のコア テキスト書式の組み合わせを使用しています。
例:
paragraph および text 書式の組み合わせ |
|
{paragraph I don't want all the text in this paragraph to
be formatted; I want
{text color = "red",
font-style = "italic",
just a selected subset
}
of it to be red and italicized.}
| |
テキストの書式設定が簡単にできるように、Curl® 言語では事前定義されたテキスト書式のセットを提供しています。これらは Curl 言語に組み込まれたテキスト書式であり、これらを使用するとテキストを書式設定するたびにオプション設定を指定する必要がなくなります。もちろん、事前定義された書式をベースにして追加オプションを設定し、独自のテキスト書式を作成することもできます。さらに一歩進んで、作成したテキスト書式を基にしてこれを拡張することもできます。
このセクションには、コア テキスト書式および適用可能なオプションの一覧が示されています。後半のセクションでは、各カテゴリについて詳細に説明しています。個々の事前定義のテキスト書式については、『API リファレンス マニュアル』を参照してください。
テキスト書式を使用する場合の構文は次のとおりです。
構文: | {text-format
option1 = value,
option2 = value,
...
optionN = valueN,
The displayed content goes at the end
}
|
説明: | - text-format はテキスト書式を示します。コア テキスト書式、事前定義またはカスタム定義の書式を指定できます。
- option は、テキスト書式のカテゴリでサポートされているオプションです。
- value はオプションを設定する値です。すべてのテキスト書式には、既定のオプション設定があります。
|
任意の文字書式または段落書式内では、エスケープ文字が実行コードとして解釈されないようにエスケープ文字の前にバックスラッシュ (\) を使います。
注意: 特殊なテキスト書式の構文はそれぞれ異なります。特定の情報については、対応するセクションを参照してください。
テキスト書式カテゴリ | コア テキスト書式 | 適用可能なオプション |
文字書式 | {text ...} | color font-family font-size font-style font-weight text-underline? text-line-through? text-breakable? text-preserve-whitespace?
|
段落書式 | {paragraph ...} | paragraph-first-line-indent paragraph-justify paragraph-line-spacing paragraph-left-indent paragraph-right-indent paragraph-after-spacing paragraph-before-spacing
|
表テキスト書式 | {table ...} | cell-border-width cell-margin cell-border-color cell-border-style その他のオプション:
border-width border-style border-color width height margin background halign valign
|
Copyright © 1998-2019 SCSK Corporation.
All rights reserved.
Curl, the Curl logo, Surge, and the Surge logo are trademarks of SCSK Corporation.
that are registered in the United States. Surge
Lab, the Surge Lab logo, and the Surge Lab Visual Layout Editor (VLE)
logo are trademarks of SCSK Corporation.