Hi! I’m attempting to create a general style for tables in a report I’m working on.
This is the code that I’m using:
#let tableReg = table.with(
fill: (x, y) =>
if (calc.odd(y)) { rgb("EAF2F5") }
else if (y > 1) { rgb("fff7ff") },
stroke: (x,y) => (
top: if (y == 0) {black},
),
)
This is what it looks like:
I want to have black borders only on the edges of the table.
My idea is that I can achieve this by setting the stroke: left and stroke: right of cells on the left-most column and right-most column respectively. And setting stroke: bottom on the final rows cells.
I know the left cells stroke can be set with left: if (x == 0) {black}. However, the bottom and rightmost cells can have different indices depending on the underlying tables layout, so I’m not sure how to set the stroke for them.
How do I apply stroke to right-most cells in table?

