set-text-color
set-text-color: color -> context -> context
テキストの色を変更するプリミティヴです。
Argument:
color : 変更したい色
context : 変更対象のテキスト処理文脈
たとえば、引数を赤色で印字するインラインコマンド \text-red は次のように定義できます。
code:satysfi
@require: color
let-inline ctx \text-red it =
let ctx = ctx |> set-text-color Color.red in
read-inline ctx it
本文中でこんなふうに使います:
code:satysfi
あああ\text-red{ここだけ赤色になる}いいい