How _not_ to repeat table hlines after page breaks?

It looks likes top and bottom hlines are repeated after page breaks? Is it possible to disable this behaviour?

#set page(height: 8em, width: auto, margin: 1em)

#table(
  columns: 1,
  stroke: none,
  table.hline(stroke: green, y: 0),
  lorem(2),
  table.hline(stroke: gray),
  ..range(4).map(_ => lorem(3)),
  table.hline(stroke: aqua),
)

I’ve also tried stroke: (x, y) => …, but the result is mysterious.

#set page(height: 8em, width: auto, margin: 1em)

#table(
  columns: 1,
  stroke: (x, y) => if y == 0 {
    (top: orange, rest: orange + 0.2pt)
  } else if y == 4 {
    (bottom: purple, rest: purple + 0.2pt)
  },
  lorem(2),
  ..range(4).map(_ => lorem(3)),
)

I’ve even tried #set table.footer(repeat: false). Thankfully, that doesn’t control table.hline.

Yeah, I’m gonna say that it looks like a bug. If you explicitly specify hline index, it must only be drawn in one place, not on every page. The same should be true for implicit index. I’m guessing this is an oversight (multipage was not considered, or it’s just a compromise to not overcomplicate things). Same thing happens with stroke callback.

1 Like