Created
November 15, 2024 06:49
-
-
Save NoamDev/1f94b046d35fd66c9529c25cae853245 to your computer and use it in GitHub Desktop.
typst 2d array table
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
| #let tbl(arr) = { | |
| let rows = arr.len() | |
| let cols = calc.max(..for row in arr {(row.len(),)}) | |
| return table( | |
| rows: rows, | |
| columns: cols, | |
| ..for row in arr { | |
| row += ([],) * (cols - row.len()) | |
| row | |
| } | |
| ) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment