#show figure: set block(breakable: true)
#figure( // start figure preamble
  
  kind: "tinytable",
  supplement: "Table", // end figure preamble

block[ // start block

#let nhead = 2;
#let nrow = 12;
#let ncol = 8;

  #let style-array = ( 
    // tinytable cell style after
    (y: (0,), x: (0, 1, 2, 3, 4, 5, 6, 7,), color: orange, underline: none, italic: none, bold: none, mono: none, strikeout: none, fontsize: none, indent: none, background: none, align: none),
    (y: (4, 6, 10,), x: (0, 1, 2, 3, 4, 5, 6, 7,), color: orange, underline: none, italic: none, bold: none, mono: none, strikeout: none, fontsize: none, indent: none, background: black, align: center),
    (y: (2, 3, 5, 7, 8, 9, 11, 12, 13, 14, 15, 16,), x: (0, 1, 2, 3, 4, 5, 6, 7,), color: none, underline: none, italic: none, bold: none, mono: none, strikeout: none, fontsize: none, indent: 1em, background: none, align: none),
  )

  // tinytable align-default-array before
  #let align-default-array = ( left, left, left, left, left, left, left, left, ) // tinytable align-default-array here
  #show table.cell: it => {
    let tmp = it
    let data = style-array.find(data => data.x.contains(it.x) and data.y.contains(it.y))
    if data != none {
      if data.fontsize != none { tmp = text(size: data.fontsize, tmp) }
      if data.color != none { tmp = text(fill: data.color, tmp) }
      if data.indent != none { tmp = pad(left: data.indent, tmp) }
      if data.underline != none { tmp = underline(tmp) }
      if data.italic != none { tmp = emph(tmp) }
      if data.bold != none { tmp = strong(tmp) }
      if data.mono != none { tmp = math.mono(tmp) }
      if data.strikeout != none { tmp = strike(tmp) }
      tmp
    } else {
      tmp
    }
  }

  #align(center, [

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

table.hline(y: 2, start: 0, end: 8, stroke: 0.05em + black),
table.hline(y: 14, start: 0, end: 8, stroke: 0.1em + black),
table.hline(y: 0, start: 0, end: 8, stroke: 0.1em + black),
    // tinytable lines before

    table.header(
      repeat: true,
table.cell(stroke: (bottom: .05em + black), colspan: 3, align: center)[Hamburgers],table.cell(stroke: (bottom: .05em + black), colspan: 2, align: center)[Halloumi],[ ],table.cell(stroke: (bottom: .05em + black), colspan: 1, align: center)[Tofu],[ ],
[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],
    // tinytable footer before
  ) // end table

  ]) // end align

] // end block
) // end figure 
