Last active
February 6, 2021 12:59
-
-
Save monaqa/a814a52bb459bb04d236db1a483e4b3b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| *.satysfi-aux |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @require: standalone | |
| @require: list | |
| @require: gr | |
| @require: color | |
| % essential command | |
| let-block ctx +p it = line-break true true ctx (read-inline ctx it ++ inline-fil) | |
| let-inline ctx \embed-ib ibf = ibf ctx | |
| let pads = (0pt, 0pt, 0pt, 0pt) | |
| let centering ctx it = inline-fil ++ (read-inline ctx it) ++ inline-fil | |
| let normalcell ctx it = NormalCell(pads, centering ctx it) | |
| let multicell (r, c) ctx it = MultiCell(r, c, pads, centering ctx it) | |
| let emptycell = EmptyCell | |
| let graphicf xs ys = | |
| let x0 = xs |> List.nth 0 in | |
| let xlast = xs |> List.reverse |> List.nth 0 in | |
| let y0 = ys |> List.nth 0 in | |
| let ylast = ys |> List.reverse |> List.nth 0 in | |
| match (x0, xlast, y0, ylast) with | |
| | (Some(x0), Some(xlast), Some(y0), Some(ylast)) -> | |
| let path = Gr.rectangle (x0, y0) (xlast, ylast) in | |
| [stroke 0.5pt Color.black path] | |
| | _ -> [] | |
| in | |
| standalone'< | |
| +p{Table 1: \embed-ib(fun ctx -> ( | |
| let n = normalcell ctx {S} in | |
| tabular [ | |
| [n; n; n]; | |
| [n; n; n]; | |
| [n; n; n]; | |
| ] graphicf | |
| )); (not smashed)} | |
| +p{Table 2: \embed-ib(fun ctx -> ( | |
| let n = normalcell ctx {S} in | |
| let m12 = multicell (1, 2) ctx {S} in | |
| let e = emptycell in | |
| tabular [ | |
| [m12; e; n]; | |
| [n ; n; n]; | |
| [n ; n; n]; | |
| ] graphicf | |
| )); (not smashed)} | |
| +p{Table 3: \embed-ib(fun ctx -> ( | |
| let n = normalcell ctx {S} in | |
| let m13 = multicell (1, 3) ctx {S} in | |
| let e = emptycell in | |
| tabular [ | |
| [m13; e; e]; | |
| [n ; n; n]; | |
| [n ; n; n]; | |
| ] graphicf | |
| )); (smashed!)} | |
| +p{Table 4: \embed-ib(fun ctx -> ( | |
| let n = normalcell ctx {S} in | |
| let m21 = multicell (2, 1) ctx {S} in | |
| let e = emptycell in | |
| tabular [ | |
| [m21; n; n]; | |
| [e ; n; n]; | |
| [n ; n; n]; | |
| ] graphicf | |
| )); (not smashed)} | |
| +p{Table 5: \embed-ib(fun ctx -> ( | |
| let n = normalcell ctx {S} in | |
| let m21 = multicell (2, 1) ctx {S} in | |
| let m12 = multicell (1, 2) ctx {S} in | |
| let e = emptycell in | |
| tabular [ | |
| [m21; m12; e]; | |
| [e ; n ; n]; | |
| [n ; n ; n]; | |
| ] graphicf | |
| )); (smashed!)} | |
| +p{Table 6: \embed-ib(fun ctx -> ( | |
| let n = normalcell ctx {S} in | |
| let m21 = multicell (2, 1) ctx {S} in | |
| let e = emptycell in | |
| tabular [ | |
| [m21; m21; m21]; | |
| [e ; e ; e ]; | |
| [n ; n ; n ]; | |
| ] graphicf | |
| )); (smashed!)} | |
| > |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment