Table using zero formatting unit not following makeup

I’m using the zero package to typeset numbers, units and quantities. I have a table template function defined to style all my tables in the same way. One of the style elements is a bold first line. However, the unit produced by zi.#<some unit> doesn’t inherit the bold face. Is this by design? If so, how can I enforce the unit to “inherit” the styling of the table.cell rule?

#import "@preview/zero:0.5.0": num, format-table, zi
#{
  show table: format-table(none, auto, auto, auto, auto)
  show table.cell.where(y:0): set text(fill: white, weight: "bold")
  table(
    columns: 2,
    align: center,
    fill: (x,y) => (if y == 0 {(rgb("#984A9C"))} else {}),
    [name],[value\ (#zi.electronvolt())],
      [John],[55.72],
      [Mary],[22.72],
  )
}

You will want to follow the same advice provided by @Andrew in your previous post:

2 Likes