-
Notifications
You must be signed in to change notification settings - Fork 84
puripuri2100 edited this page Dec 15, 2018
·
2 revisions
表組みのためのコマンドは以下のパッケージによって提供されます。
- table.satyh
\tabular
- tabular.satyh
\tabular
- tabularx.satyh
\tabular
※table.satyhで提供される\tabular
を想定しています。
\tabular
コマンドの第一引数には表の中身を、第二引数には線の情報を与えます。
詳しくはThe SATySFibookの117ページを読んでください。
\tabular(fun t -> (
let (c, l, r) = (t#c, t#l, t#r) in
[
[l {左揃え}; c {中央揃え}; r {右揃え} ];
[l {左揃え} ; c {中央揃え}; c {ここは中央揃えです}];
]
))(fun xs ys -> (
let thin = stroke 0.5pt Color.black in
let thick = stroke 1pt Color.black in
match (ys, List.reverse ys) with
| (y0 :: y1 :: y2 :: _, ylast :: _) ->
( match (xs, List.reverse xs) with
| (x0 :: x1 :: _ :: x3 :: _, xlast :: _) ->
let gsY1 =
[y1] |> List.map (fun y ->
thin (Gr.line (x0, y) (xlast, y))) in
let gsY2 =
[y0; ylast] |> List.map (fun y ->
thick (Gr.line (x0, y) (xlast, y))) in
let gsX =
[x1] |> List.map (fun x ->
thin (Gr.line (x, y0) (x, ylast))) in
List.concat [
gsX; gsY1; gsY2;
]
| _ -> []
)
| _ -> []
));
- トップページ
- The SATySFibook Web公開版 第1版
- Wiki
- 目的別パッケージ一覧
- コマンドライン書式
- SATySFiコマンド一覧
- Satyrographos(パッケージマネージャ)
- 新しい言語機能の紹介
- 言語機能の構想