bold-test3.typ 677 B

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