Skip to content

Instantly share code, notes, and snippets.

@NoamDev
Created November 15, 2024 06:49
Show Gist options
  • Select an option

  • Save NoamDev/1f94b046d35fd66c9529c25cae853245 to your computer and use it in GitHub Desktop.

Select an option

Save NoamDev/1f94b046d35fd66c9529c25cae853245 to your computer and use it in GitHub Desktop.
typst 2d array table
#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