How to modify the table grid structure?

Hi,

It’s a newbie question, the Guide left me wondering, unfortunately. The table is of a common enough sort, just not quite Hello, World.

So it rolls down, three lines at a time. What’s the proper way to define a table like this?

Hi. There is a section about merging cells.

The structure is:

#table(
  columns: 6,
  table.header([], [], [], [], table.cell(colspan: 2)[]),
  table.cell(rowspan: 3)[],
  [], [], [], [], [],
  [], [], [], [], [],
  [], [], [], [], [],
  table.cell(rowspan: 3)[],
  [], [], [], [], [],
  [], [], [], [], [],
  [], [], [], [], [],
)

image

You can import necessary element functions:

#import table: cell, header
#table(
  columns: 6,
  header([], [], [], [], cell(colspan: 2)[]),
  cell(rowspan: 3)[], [], [], [], [], [],
  [], [], [], [], [],
  [], [], [], [], [],
  cell(rowspan: 3)[], [], [], [], [], [],
  [], [], [], [], [],
  [], [], [], [], [],
)

Or use other ways of improving readablity of table with many cells:

#set underline(stroke: 0.06em, offset: 0.15em)

#counter(footnote).update(15)

#let падеж = table.cell.with(rowspan: 3)
#let u = underline
#let fn1 = footnote[16th]
#let fn2 = footnote[17th]

#show table.cell.where(y: 0): strong
#table(
  columns: 6,
  table.header(
    [Падеж],
    [Ед. ч.],
    [Мн. ч.],
    [Мн. отд. ч.],
    table.cell(colspan: 2)[Дв. ч. (оба варианта)],
  ),

  падеж[Номинатив \ (кто-что)],
  [quenta#fn1], [quenta#u[r]], [quenta#u[li]], [quenta#u[t]], [quent#u[u]],
  [málime], [málim#u[i]], [málim#u[éli]], [málime#u[t]], [málim#u[u]],
  [mahtar], [mahtar#u[i]], [mahtar#u[éli]], [mahtar#u[at]], [mahtar#u[u]],

  падеж[Генитив \ (кого-чего)],
  [quent#u[o]], [quentar#u[on]], [quenta#u[lion]], [quenta#u[to]], [quent#u[uo]],
  [málime#u[o]], [málim#u[ion]], [málim#u[élion]], [málim#u[éto]], [málim#u[úo]],
  [mahtar#u[o]#fn2], [mahtar#u[ion]], [mahtar#u[élion]], [mahtará#u[to]], [mahtar#u[úo]],
)

Though any top-level styling/imports will affect other tables, so scoping with curly braces or square brackets is necessary to prevent that.

2 Likes

(post deleted by author)

Thank you very much for a comprehensive answer!