Skip to content

cellx does not work if map-cells is used #98

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

You must be logged in to vote

Hello,

map-cells provides you a cellx as a parameter and expects you to return a cellx. When you return the cell's content, you are discarding all other properties from the cellx.

This means you need to do the following:

map-cells: cell => {
      if cell.y == 0 {
        cell.align = right  // no effect
        cell.fill = blue    // no effect
        cell.content = {
          set text(size: 14pt, fill: red)
          strong(cell.content)
        }
      }
      else {
        cell.content = {
          set text(size: 12pt)
          cell.content
        }
      }
      cell   // return the cell with the modified properties
    },

Note that there is no other way to provide data to tabl…

Replies: 1 comment 1 reply

Comment options

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

Answer selected by yoonghm
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