bold-test2.typ 656 B

12345678910111213141516171819202122
  1. #set text(font: "Times New Roman", size: 12pt)
  2. // C: strong вокруг всего header
  3. #show table.header: it => strong(it)
  4. #table(
  5. table.header([Aaa], [Bbb]),
  6. [ccc], [ddd],
  7. )
  8. #pagebreak()
  9. // D: пересборка детей шапки с сильным выделением содержимого ячеек
  10. #show table.header: it => table.header(..it.children.map(c => {
  11. if type(c) == content and c.func() == table.cell {
  12. let fields = c.fields
  13. let body = fields.remove("body")
  14. table.cell(..fields, strong(body))
  15. } else {
  16. strong(c)
  17. }
  18. }))
  19. #table(
  20. table.header([Aaa], table.cell(colspan: 2)[Ccc]),
  21. [ccc], [ddd], [eee],
  22. )