Skip to content

Instantly share code, notes, and snippets.

@nekketsuuu
Last active May 28, 2018 09:40
Show Gist options
  • Save nekketsuuu/b88312af78cf2a4477536921089ef79b to your computer and use it in GitHub Desktop.
Save nekketsuuu/b88312af78cf2a4477536921089ef79b to your computer and use it in GitHub Desktop.
#!/bin/sh
satysfi test.saty --debug-show-bbox -o test.pdf
@require: math
let matrix lstf rulef =
let pads = (5pt, 5pt, 2pt, 2pt) in
let cellf ctx ma = NormalCell(pads, embed-math ctx ma) in
let multif ctx nr nc ma = MultiCell(nr, nc, pads, embed-math ctx ma) in
let empty = EmptyCell in
let content ctx =
%%% HERE %%%
let ctx = set-manual-rising 100pt ctx in
%%%%%%%%%%%%
tabular (lstf (cellf ctx) (multif ctx) empty) rulef in
let body = text-in-math MathOrd content in
${\paren{#body}}
let-math \matrix2x2 a b c d =
let lstf cellf multif empty = [
[cellf a; cellf b];
[cellf c; cellf d];
] in
let rulef xs ys = [] in
matrix lstf rulef
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@require: stdja
@require: math
@import: matrix
StdJa.document (|
title = {matrix test};
author = {nekketsuuu};
show-title = false;
show-toc = false;
|) '<
+math (${
xy\matrix2x2{a}{b}{c}{d}zw
});
>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment