Repeat-headers breaks inner tables' vlinexs on following pages
lf- opened this issue · 3 comments
lf- commented
This is kind of a strange bug I ran into while doing a homework, so please excuse the messy code that has been sanitized.
Built with tablex main
2f80d86, and typst 0.6.0.
Problem: the vlinex of the inner table in the first row of a new page gets vertically shifted:
#import "./tablex/tablex.typ": tablex, vlinex, hlinex
#lorem(500)
#let preflist(..args) = {
let args = args.pos()
let maxlength = 6
let parts = args.map(a => a + range(maxlength - a.len()).map(_ => [])).flatten()
tablex(
columns: 6,
auto-lines: false,
(), vlinex(),
..parts
)
}
#tablex(
columns: (40pt, 18pt, 18pt, 120pt, 120pt),
auto-vlines: false,
header-rows: 1,
repeat-header: true,
(), vlinex(), vlinex(), vlinex(), vlinex(), (),
hlinex(stroke: none),
[Aaaaa], [$a$], [$a$], [aaaaaaaaaaaaaaaaaa], [aaaaaaaaaaaaaaaaaaaaaaaa],
[1], [1], [1], [1 blah 1], preflist(
(1, 1, 1, 1, 1, 1),
(1, 1, 1, 1, 1),
(1, 1, 1, 1, 1),
(1, 1, 1, 1, 1),
(1, 1, 1, 1, 1, 1),
(1, 1, 1),
),
[1], [1], [1], [1 blah 1], preflist(
(1, 1, 1, 1, 1),
(1, 1, 1, 1, 1),
(1, 1, 1, 1, 1),
(1, 1, 1),
(1, 1, 1, 1, 1),
(1, 1, 1),
),
[1], [1], [1], [1 blah 1, blah 1], preflist(
(1, 1, 1, 1, 1),
(1, 1, 1, 1),
(1, 1, 1, 1, 1),
(1, 1),
(1, 1, 1, 1, 1),
(1, 1, 1),
),
[1], [1], [1], [1 blah 1], preflist(
(1, 1, 1, 1, 1),
(1, 1, 1, 1),
(1, 1, 1, 1),
(1, 1),
(1, 1, 1, 1),
(1, 1, 1),
),
[1], [1], [1], [1 blah 1], preflist(
(1, 1, 1, 1),
(1, 1, 1),
(1, 1),
(1, 1),
(1, 1, 1, 1),
(1, 1, 1),
),
[1], [1], [1], [1 blah 1, blah 1], preflist(
(1, 1, 1),
(1, 1, 1),
(1, 1),
(1, 1),
(1, 1, 1, 1),
(1, 1),
),
[1], [1], [1], [1 blah 1], preflist(
(1, 1, 1),
(1, 1, 1),
(1, 1),
(1, 1),
(1, 1, 1, 1),
(1, 1),
),
[1], [1], [1], [1 blah 1, blah 1], preflist(
(1, 1),
(1, 1),
(1, 1),
(1, 1),
(1, 1),
(1, 1),
),
[1], [1], [1], [1 blah 1], preflist(
(1, 1),
(1, 1),
(1, 1),
(1, 1),
(1, 1),
(1, 1),
),
hlinex(stroke: none),
)
PgBiel commented
Tablex in tablex always tends to generate problems it seems haha. I guess this is kind of a use case I wasn't anticipating at first (although it makes sense).
I'll eventually perform some local tests, but how do normal tables behave here? And does changing the inset
(padding) parameter help?
lf- commented
Not sure! I can't promise to remember to get back to test this: turning off repeat-headers will at least prevent it from happening so I did that.