-
Suppose I have the following table:
I want the row How to go about styling it? Show rule on the table or the cell? Any clever function needed? |
Beta Was this translation helpful? Give feedback.
Answered by
frozolotl
Jul 14, 2024
Replies: 1 comment 1 reply
-
You can't (easily) use a show rule here, but you can instead input the cells pre-colored: #let data = (
("one", "one"),
("one", "two"),
)
#table(
columns: 3,
table.header[*n*][*exp.*][*result*],
..data
.enumerate(start: 1)
.map(((n, (left, right))) => {
let cell = table.cell.with(fill: if left == right { green } else { red })
(cell[#n], cell(left), cell(right))
})
.flatten(),
) |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
jolitp
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can't (easily) use a show rule here, but you can instead input the cells pre-colored: