main.typ 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. // ПРИМЕР ДЕЛОВОГО ПИСЬМА. Каталог можно целиком скопировать в корень проекта.
  2. #import "/.template/lib/index.typ": document, profiles, recipient, attachment, attachment-set, load-company, empty-private-settings, private-company-media
  3. #let company-id = "scientia" // "scientia" | "technology" | "too"
  4. #let document-mode = "final" // "final" | "draft" | "clean-copy"
  5. #let use-private-assets = false // true — читать .private/settings.typ
  6. #let private-settings = if use-private-assets {
  7. import "/.private/settings.typ": settings
  8. settings
  9. } else {
  10. empty-private-settings
  11. }
  12. #let company-media = private-company-media(private-settings, company-id)
  13. #let company = load-company(
  14. company-id,
  15. logo: auto,
  16. signature: company-media.signature,
  17. stamp: company-media.stamp,
  18. )
  19. #let addressee = recipient(
  20. company: "АО «Горнодобывающая компания»",
  21. title: "Техническому директору",
  22. name: "Иванову Ивану Ивановичу",
  23. address: "620000, г. Екатеринбург, ул. Примерная, 1",
  24. )
  25. #let attachments = attachment-set(
  26. items: (
  27. attachment(
  28. "materials",
  29. "Перечень передаваемых материалов",
  30. [#include "chapters/99-appendices.typ"],
  31. subtitle: none,
  32. number: auto,
  33. outlined: false,
  34. ),
  35. ),
  36. numbering: "arabic",
  37. start: 1,
  38. )
  39. #show: document.with(
  40. company: company,
  41. profile: profiles.letter(
  42. recipient: addressee,
  43. date: "01.01.2026",
  44. reference: "ИСХ-001/2026",
  45. title: "О направлении материалов этапа 1",
  46. signer: none,
  47. note: "Исп.: Петров П.П., +7 (000) 000-00-00",
  48. show_stamp: true,
  49. attachments: attachments,
  50. render_attachments: false,
  51. ),
  52. options: (
  53. mode: document-mode,
  54. watermark: if document-mode == "draft" { "ЧЕРНОВИК" } else { none },
  55. media-policy: if document-mode == "final" { "placeholder" } else { "reserve-space" },
  56. diagnostics: true,
  57. ),
  58. )
  59. #include "chapters/10-letter.typ"