Last active
October 9, 2018 13:58
-
-
Save nekketsuuu/91f8be0a79f3a75f9c3049909df1d155 to your computer and use it in GitHub Desktop.
gfnさんへのリプライです: https://twitter.com/nekketsuuu/status/1049646583426383872
This file contains 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: stdjabook | |
@import: matrix | |
document (| | |
title = {\SATySFi;で行列}; | |
author = {\@nekketsuuu}; | |
show-title = false; | |
show-toc = false; | |
|) '< | |
+math(${ | |
\matrix!([ | |
[${1}; ${2}; ${3}]; | |
[${4}; ${5}; ${6}]; | |
[${7}; ${8}; ${9}]; | |
]) | |
}); | |
> |
This file contains 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: math | |
@require: table | |
module Matrix : sig | |
direct \matrix : [(math list) list] math-cmd | |
end = struct | |
let-math \matrix elmss = | |
let body = text-in-math MathInner (fun ctx -> ( | |
let cellss = fun t -> List.map (List.map (fun elm -> t#c {${#elm}})) elmss in | |
let grf = fun _ _ -> [] in | |
read-inline ctx {\tabular(cellss)(grf);})) | |
in ${\paren{#body}} | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment