Closed arbelt closed 1 week ago
Thanks a lot for looking at this. Unfortunately, this particular fix will break other things.
I'll be looking at this soon.
Got it — thanks!
Out of curiosity, what does it break? In my brief look-through, it seemed like nhead
basically kept track of column groupings, and all the header stuff I could tell was in the table.header
before the "// tinytable cell content after line". This change still worked with multiple layers of column headers, so just wondering what I missed, or if I misunderstood the nhead
.
lol, I can't even reproduce it now, but I swear there was something ;)
In any case, there are many things to fix with Typst: more compact styling functions, styling single cells twice doesn't work, and then the indexing thing. To fix all this, I need a near complete re-write of that portion of the code. It's underway here but real-work is crazy right now, so I'm not sure when it'll be merged: https://github.com/vincentarelbundock/tinytable/pull/339
Here's an example of breakage. The Brie group is not indented properly.
# Issue #139
tab <- tt(mtcars[1:10, 1:5]) |>
group_tt(i = list("Feta" = 2, "Brie" = 6)) |>
group_tt(j = list("First" = 2:3, "Second" = 4:5)) |>
style_tt(1:5, align = "c", background = "blue", color = "white")
tab
Sooo, your fix was correct, but there was a different bug in the indenting code.
Should be fixed in the main
branch now.
Thanks @arbelt !
I could very well be missing something, but it doesn't seem like
nhead
(which I'm assuming is # of header rows?) should be in the row offset for typst tables?