If the table is small and can fit in 1 page, the performance is great, but when it is broken into parts on several pages, each edit compiles in 5 or 6 seconds.
#import "@preview/tablex:0.0.5": tablex, rowspanx, colspanx
#set page(margin: 2cm)
#let data = csv("./test.csv").flatten()
#let table-cells = ()
#for (i, a) in data.enumerate() {
let prev = [---]
let middle = [---]
if i > 0 {
prev = data.at(i - 1)
middle = calc.abs(float(a) - float(prev)) / 2
}
let row = (i, prev, a, "n", middle).map(n => [$#n$])
table-cells.push(row)
}
// #let table-cells = table-cells.slice(0, 20)
#set text(size: 11pt)
#set align(center)
#tablex(
columns: 5,
align: center + horizon,
header-rows: 2,
repeat-header: true,
rowspanx(2)[],
colspanx(2)[],
rowspanx(2)[],
rowspanx(2)[],
[],
[],
..table-cells.flatten(),
)
If the table is small and can fit in 1 page, the performance is great, but when it is broken into parts on several pages, each edit compiles in 5 or 6 seconds.
test.csv