#[
#let nhead = 1;
#let nrow = 12;
#let ncol = 8;

// start figure preamble
#figure(
  
  kind: "tinytable",
  supplement: none,
// end figure preamble

  #let fill-array = ( 
    // tinytable cell fill after
  )
  #let style-array = ( 
    // tinytable cell style after
  )
  #show table.cell: it => {
    let tmp = it
    let data = style-array.find(data => data.x == it.x and data.y == it.y)
    if data != none {
      set text(data.color)
      set text(data.fontsize)
      if data.underline == true { tmp = underline(tmp) }
      if data.italic == true { tmp = emph(tmp) }
      if data.bold == true { tmp = strong(tmp) }
      if data.mono == true { tmp = math.mono(tmp) }
      if data.strikeout == true { tmp = strike(tmp) }
      tmp
    } else {
      tmp
    }
  }

  #align(center, [

  table( // tinytable table start
    columns: (auto, auto, auto, auto, auto, auto, auto, auto),
    stroke: none,
    fill: (x, y) => {
      let data = fill-array.find(data => data.x == x and data.y == y)
      if data != none {
        data.fill
      }
    },

    // tinytable lines after
table.hline(y: 13, start: 0, end: 8, stroke: 0.1em + black),
table.hline(y: 1, start: 0, end: 8, stroke: 0.05em + black),
table.hline(y: 0, start: 0, end: 8, stroke: 0.1em + black),

    table.header(
      repeat: true,
[mpg], [cyl], [disp], [hp], [drat], [wt], [qsec], [vs],
    ),

    // tinytable cell content after
[21.0], [6], [160.0], [110], [3.90], [2.620], [16.46], [0],
[21.0], [6], [160.0], [110], [3.90], [2.875], [17.02], [0],
table.cell(colspan: 8)[I like (fake) hamburgers],
[22.8], [4], [108.0], [ 93], [3.85], [2.320], [18.61], [1],
table.cell(colspan: 8)[She prefers halloumi],
[21.4], [6], [258.0], [110], [3.08], [3.215], [19.44], [1],
[18.7], [8], [360.0], [175], [3.15], [3.440], [17.02], [0],
[18.1], [6], [225.0], [105], [2.76], [3.460], [20.22], [1],
table.cell(colspan: 8)[They love tofu],
[14.3], [8], [360.0], [245], [3.21], [3.570], [15.84], [0],
[24.4], [4], [146.7], [ 62], [3.69], [3.190], [20.00], [1],
[22.8], [4], [140.8], [ 95], [3.92], [3.150], [22.90], [1],
    table.footer(
      repeat: false,
      // tinytable notes after
    ),
  ) // end table

  ]) // end align

) // end figure
] 
