I am adding styles to the tables like this because, I have large number of tables in my report.
Also I have tables with I have 0, 1 header , 2 and 3 headers row.
#show table.cell.where(y: 0): set text(fill: white, weight: "bold")
Also this is the typst code for one of my two row header table , as you ca see I can only see level one header styled
#table(
columns: (0.5fr, 2fr, 1fr, 1fr, 1fr, 1fr, 1fr), // Added a column for "Other"
inset: 8pt,
align: horizon,
stroke: 0.5pt,
table.header(
table.cell(rowspan: 2, text(hyphenate: auto)[*S. \ No.*]),
table.cell(rowspan: 2, [*Particulars*]),
table.cell(rowspan: 2, [*Total (A)*]),
table.cell(colspan: 2, [*Male*]),
table.cell(colspan: 2, [*Female*]),
[*No. (B) *],[*% (B / A) *],[*No. (C) *],[*% (C / A)*]
),
table.cell(colspan: 7, align(center)[#underline[*EMPLOYEES*]]),
"1.","Permanent (D)", "[Data]", "[Data]", "[Data]", "[Data]","[Data]",
"2.","Other than Permanent (E)", "[Data]", "[Data]", "[Data]", "[Data]","[Data]",
"3.",[*Total employees (D + E)*], "[Data]", "[Data]", "[Data]", "[Data]","[Data]",
table.cell(colspan: 7, align(center)[#underline[*WORKERS*]]),
"1.","Permanent (F)", "[Data]", "[Data]", "[Data]", "[Data]","[Data]",
"2.","Other than Permanent (G)", "[Data]", "[Data]", "[Data]", "[Data]","[Data]",
"3.",[*Total workers (F + G)*], "[Data]", "[Data]", "[Data]", "[Data]","[Data]",
)
Basically I want to know is there a way we can globally define styles for header .