Skip to content

How can I style the last hline of a table programmatically? #117

Closed Answered by PgBiel
maxigaz asked this question in Q&A
Discussion options

You must be logged in to vote

Try this:

#let ktable(..cells) = tablex(
  auto-vlines: false,

  map-hlines: h => {
    if h.stroke == auto {
      h.stroke = color.rgb("#CCC")
    }
    h
  },

  columns: (auto, auto, auto),
  header-rows: 1,

  [*Col 1*],
  [*Col 2*],
  [*Col 3*],

  ..cells,
  hlinex(stroke: color.rgb("#000"))
)

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@maxigaz
Comment options

Answer selected by maxigaz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants