typst-tablex
typst-tablex copied to clipboard
Easily disable hlines and vlines at the edge of the table?
I have tried writing something like the following, but it seems clumsy. Is there a better way to turn off vlines and hlines inside a table? One issue I have is that I can't tell the dimensions of the table from inside map-hlines, so I can't automatically know the end of the table.
#tablex(
columns: (auto, auto, auto, auto, auto),
auto-vlines: false,
map-hlines: h => if (h.y == 0 or h.y == 2) { hlinex(stroke: none) } else { h },
(), vlinex(), vlinex(), vlinex(), vlinex(), (),
[a], [$u$], [$v$], [c], [d]
)
Does the following work?
#tablex(
columns: (auto, auto, auto, auto, auto),
auto-vlines: false,
hlinex(stroke: none),
(), vlinex(), vlinex(), vlinex(), vlinex(), (),
[a], [$u$], [$v$], [c], [d],
hlinex(stroke: none)
)
Although I agree it'd be nice to be able to tell how far a certain line is from the end of the table when mapping it, so we can consider that a feature request.
Indeed, this works. It is kind of a bodge, but it absolutely works.