@nguyenphp/antigravity-marketing 1.0.18 → 1.0.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. package/README.md +186 -78
  2. package/package.json +4 -3
  3. package/templates/.agent/skills/marketing-report-expert/SKILL.md +70 -0
  4. package/templates/.agent/skills/minimax-docx/LICENSE +21 -0
  5. package/templates/.agent/skills/minimax-docx/SKILL.md +274 -0
  6. package/templates/.agent/skills/minimax-docx/assets/styles/academic_styles.xml +250 -0
  7. package/templates/.agent/skills/minimax-docx/assets/styles/corporate_styles.xml +284 -0
  8. package/templates/.agent/skills/minimax-docx/assets/styles/default_styles.xml +449 -0
  9. package/templates/.agent/skills/minimax-docx/assets/xsd/aesthetic-rules.xsd +470 -0
  10. package/templates/.agent/skills/minimax-docx/assets/xsd/business-rules.xsd +130 -0
  11. package/templates/.agent/skills/minimax-docx/assets/xsd/common-types.xsd +159 -0
  12. package/templates/.agent/skills/minimax-docx/assets/xsd/wml-subset.xsd +589 -0
  13. package/templates/.agent/skills/minimax-docx/references/cjk_typography.md +357 -0
  14. package/templates/.agent/skills/minimax-docx/references/cjk_university_template_guide.md +184 -0
  15. package/templates/.agent/skills/minimax-docx/references/comments_guide.md +191 -0
  16. package/templates/.agent/skills/minimax-docx/references/design_good_bad_examples.md +829 -0
  17. package/templates/.agent/skills/minimax-docx/references/design_principles.md +819 -0
  18. package/templates/.agent/skills/minimax-docx/references/openxml_element_order.md +308 -0
  19. package/templates/.agent/skills/minimax-docx/references/openxml_encyclopedia_part1.md +4061 -0
  20. package/templates/.agent/skills/minimax-docx/references/openxml_encyclopedia_part2.md +2820 -0
  21. package/templates/.agent/skills/minimax-docx/references/openxml_encyclopedia_part3.md +3381 -0
  22. package/templates/.agent/skills/minimax-docx/references/openxml_namespaces.md +82 -0
  23. package/templates/.agent/skills/minimax-docx/references/openxml_units.md +72 -0
  24. package/templates/.agent/skills/minimax-docx/references/scenario_a_create.md +284 -0
  25. package/templates/.agent/skills/minimax-docx/references/scenario_b_edit_content.md +295 -0
  26. package/templates/.agent/skills/minimax-docx/references/scenario_c_apply_template.md +456 -0
  27. package/templates/.agent/skills/minimax-docx/references/track_changes_guide.md +200 -0
  28. package/templates/.agent/skills/minimax-docx/references/troubleshooting.md +506 -0
  29. package/templates/.agent/skills/minimax-docx/references/typography_guide.md +294 -0
  30. package/templates/.agent/skills/minimax-docx/references/xsd_validation_guide.md +158 -0
  31. package/templates/.agent/skills/minimax-docx/scripts/doc_to_docx.sh +40 -0
  32. package/templates/.agent/skills/minimax-docx/scripts/docx_preview.sh +37 -0
  33. package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Cli/MiniMaxAIDocx.Cli.csproj +19 -0
  34. package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Cli/Program.cs +18 -0
  35. package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Commands/AnalyzeCommand.cs +147 -0
  36. package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Commands/ApplyTemplateCommand.cs +322 -0
  37. package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Commands/CreateCommand.cs +324 -0
  38. package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Commands/DiffCommand.cs +155 -0
  39. package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Commands/EditContentCommand.cs +487 -0
  40. package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Commands/FixOrderCommand.cs +108 -0
  41. package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Commands/MergeRunsCommand.cs +122 -0
  42. package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Commands/ValidateCommand.cs +107 -0
  43. package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/MiniMaxAIDocx.Core.csproj +15 -0
  44. package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/OpenXml/CommentSynchronizer.cs +169 -0
  45. package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/OpenXml/ElementOrder.cs +80 -0
  46. package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/OpenXml/NamespaceConstants.cs +42 -0
  47. package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/OpenXml/RunMerger.cs +81 -0
  48. package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/OpenXml/StyleAnalyzer.cs +81 -0
  49. package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/OpenXml/TrackChangesHelper.cs +99 -0
  50. package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/OpenXml/UnitConverter.cs +23 -0
  51. package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/AestheticRecipeSamples.cs +1832 -0
  52. package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/AestheticRecipeSamples_Batch1.cs +910 -0
  53. package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/AestheticRecipeSamples_Batch2.cs +999 -0
  54. package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/AestheticRecipeSamples_Batch3.cs +1048 -0
  55. package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/AestheticRecipeSamples_Batch4.cs +1038 -0
  56. package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/CharacterFormattingSamples.cs +1020 -0
  57. package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/DocumentCreationSamples.cs +1121 -0
  58. package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/FieldAndTocSamples.cs +624 -0
  59. package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/FootnoteAndCommentSamples.cs +675 -0
  60. package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/HeaderFooterSamples.cs +838 -0
  61. package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/ImageSamples.cs +917 -0
  62. package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/ListAndNumberingSamples.cs +826 -0
  63. package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/ParagraphFormattingSamples.cs +1199 -0
  64. package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/StyleSystemSamples.cs +1487 -0
  65. package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/TableSamples.cs +1163 -0
  66. package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/TrackChangesSamples.cs +595 -0
  67. package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Typography/CjkHelper.cs +39 -0
  68. package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Typography/FontDefaults.cs +24 -0
  69. package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Typography/PageSizes.cs +20 -0
  70. package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Validation/BusinessRuleValidator.cs +224 -0
  71. package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Validation/GateCheckValidator.cs +148 -0
  72. package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Validation/ValidationResult.cs +23 -0
  73. package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Validation/XsdValidator.cs +69 -0
  74. package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.slnx +4 -0
  75. package/templates/.agent/skills/minimax-docx/scripts/env_check.sh +196 -0
  76. package/templates/.agent/skills/minimax-docx/scripts/setup.ps1 +274 -0
  77. package/templates/.agent/skills/minimax-docx/scripts/setup.sh +504 -0
  78. package/templates/.agent/skills/minimax-multimodal-toolkit/SKILL.md +359 -0
  79. package/templates/.agent/skills/minimax-pdf/README.md +222 -0
  80. package/templates/.agent/skills/minimax-pdf/SKILL.md +201 -0
  81. package/templates/.agent/skills/minimax-pdf/design/design.md +381 -0
  82. package/templates/.agent/skills/minimax-pdf/scripts/cover.py +1579 -0
  83. package/templates/.agent/skills/minimax-pdf/scripts/fill_inspect.py +200 -0
  84. package/templates/.agent/skills/minimax-pdf/scripts/fill_write.py +242 -0
  85. package/templates/.agent/skills/minimax-pdf/scripts/make.sh +491 -0
  86. package/templates/.agent/skills/minimax-pdf/scripts/merge.py +112 -0
  87. package/templates/.agent/skills/minimax-pdf/scripts/palette.py +559 -0
  88. package/templates/.agent/skills/minimax-pdf/scripts/reformat_parse.py +374 -0
  89. package/templates/.agent/skills/minimax-pdf/scripts/render_body.py +1055 -0
  90. package/templates/.agent/skills/minimax-pdf/scripts/render_cover.cjs +111 -0
  91. package/templates/.agent/skills/minimax-xlsx/SKILL.md +138 -0
  92. package/templates/.agent/skills/minimax-xlsx/references/create.md +691 -0
  93. package/templates/.agent/skills/minimax-xlsx/references/edit.md +684 -0
  94. package/templates/.agent/skills/minimax-xlsx/references/fix.md +37 -0
  95. package/templates/.agent/skills/minimax-xlsx/references/format.md +768 -0
  96. package/templates/.agent/skills/minimax-xlsx/references/ooxml-cheatsheet.md +231 -0
  97. package/templates/.agent/skills/minimax-xlsx/references/read-analyze.md +97 -0
  98. package/templates/.agent/skills/minimax-xlsx/references/validate.md +772 -0
  99. package/templates/.agent/skills/minimax-xlsx/scripts/formula_check.py +422 -0
  100. package/templates/.agent/skills/minimax-xlsx/scripts/libreoffice_recalc.py +248 -0
  101. package/templates/.agent/skills/minimax-xlsx/scripts/shared_strings_builder.py +163 -0
  102. package/templates/.agent/skills/minimax-xlsx/scripts/style_audit.py +575 -0
  103. package/templates/.agent/skills/minimax-xlsx/scripts/xlsx_add_column.py +395 -0
  104. package/templates/.agent/skills/minimax-xlsx/scripts/xlsx_insert_row.py +274 -0
  105. package/templates/.agent/skills/minimax-xlsx/scripts/xlsx_pack.py +87 -0
  106. package/templates/.agent/skills/minimax-xlsx/scripts/xlsx_reader.py +362 -0
  107. package/templates/.agent/skills/minimax-xlsx/scripts/xlsx_shift_rows.py +396 -0
  108. package/templates/.agent/skills/minimax-xlsx/scripts/xlsx_unpack.py +130 -0
  109. package/templates/.agent/skills/minimax-xlsx/templates/minimal_xlsx/[Content_Types].xml +9 -0
  110. package/templates/.agent/skills/minimax-xlsx/templates/minimal_xlsx/_rels/.rels +6 -0
  111. package/templates/.agent/skills/minimax-xlsx/templates/minimal_xlsx/xl/_rels/workbook.xml.rels +19 -0
  112. package/templates/.agent/skills/minimax-xlsx/templates/minimal_xlsx/xl/sharedStrings.xml +33 -0
  113. package/templates/.agent/skills/minimax-xlsx/templates/minimal_xlsx/xl/styles.xml +160 -0
  114. package/templates/.agent/skills/minimax-xlsx/templates/minimal_xlsx/xl/workbook.xml +30 -0
  115. package/templates/.agent/skills/minimax-xlsx/templates/minimal_xlsx/xl/worksheets/sheet1.xml +70 -0
  116. package/templates/.agent/skills/pptx-generator/SKILL.md +249 -0
  117. package/templates/.agent/skills/pptx-generator/references/design-system.md +392 -0
  118. package/templates/.agent/skills/pptx-generator/references/editing.md +162 -0
  119. package/templates/.agent/skills/pptx-generator/references/pitfalls.md +112 -0
  120. package/templates/.agent/skills/pptx-generator/references/pptxgenjs.md +420 -0
  121. package/templates/.agent/skills/pptx-generator/references/slide-types.md +413 -0
  122. package/templates/.agent/skills/tutorial-video-expert/SKILL.md +88 -0
  123. package/templates/.agent/skills/ui-ux-pro-max/SKILL.md +170 -585
  124. package/templates/.agent/skills/vision-analysis/SKILL.md +174 -0
  125. package/templates/.agent/workflows/analyze.md +3 -0
  126. package/templates/.agent/workflows/brand-report.md +44 -0
  127. package/templates/.agent/workflows/report.md +49 -0
@@ -0,0 +1,1038 @@
1
+ // ============================================================================
2
+ // AestheticRecipeSamples_Batch4.cs — Nature Journal & HBR-style recipes
3
+ // ============================================================================
4
+ // Recipes 12-13: publication and business editorial formatting systems.
5
+ //
6
+ // UNIT REFERENCE:
7
+ // Font size: half-points (22 = 11pt, 24 = 12pt, 32 = 16pt)
8
+ // Spacing: DXA = twentieths of a point (1440 DXA = 1 inch)
9
+ // Borders: eighth-points (4 = 0.5pt, 8 = 1pt, 12 = 1.5pt)
10
+ // Line spacing "line": 240ths of single spacing (240 = 1.0x, 276 = 1.15x)
11
+ // ============================================================================
12
+
13
+ using DocumentFormat.OpenXml;
14
+ using DocumentFormat.OpenXml.Packaging;
15
+ using DocumentFormat.OpenXml.Wordprocessing;
16
+
17
+ using WpColumns = DocumentFormat.OpenXml.Wordprocessing.Columns;
18
+ using WpPageSize = DocumentFormat.OpenXml.Wordprocessing.PageSize;
19
+
20
+ namespace MiniMaxAIDocx.Core.Samples;
21
+
22
+ public static partial class AestheticRecipeSamples
23
+ {
24
+ // ════════════════════════════════════════════════════════════════════════
25
+ // RECIPE 12: NATURE JOURNAL
26
+ // ════════════════════════════════════════════════════════════════════════
27
+
28
+ /// <summary>
29
+ /// Recipe: Nature Journal Format
30
+ /// Source: Nature formatting guide (nature.com/nature/for-authors/formatting-guide)
31
+ /// Feel: Dense, authoritative, information-rich scientific publication.
32
+ /// Best for: Scientific research articles, peer-reviewed papers.
33
+ ///
34
+ /// Design rationale:
35
+ /// - A4 page (210mm x 297mm): international scientific standard.
36
+ /// - Two-column layout with 5mm gutter: maximizes information density while
37
+ /// keeping line length short (~88mm / ~45 characters) for rapid scanning.
38
+ /// Short lines reduce saccade distance, aiding speed-reading of dense text.
39
+ /// - 9pt Times New Roman body: Nature's actual body size. Smaller than typical
40
+ /// to fit more content per page; serif font maintains readability at this size.
41
+ /// - 14pt bold title spanning full width: clear visual anchor above the columns.
42
+ /// - Section headings bold, flush left, NOT numbered: Nature convention.
43
+ /// Unnumbered headings create a flowing narrative feel rather than a report feel.
44
+ /// - Single line spacing: tight vertical rhythm matches the dense two-column layout.
45
+ /// - "Figure 1 |" caption format with pipe separator: Nature's distinctive style.
46
+ /// - 7pt references: subordinate to body text, numbered with superscript citations.
47
+ /// - Abstract is full-width, single paragraph, max ~150 words: Nature requirement.
48
+ /// Placed between title and two-column body via continuous section break.
49
+ /// </summary>
50
+ public static void CreateNatureJournalDocument(string outputPath)
51
+ {
52
+ using var doc = WordprocessingDocument.Create(outputPath, WordprocessingDocumentType.Document);
53
+
54
+ var mainPart = doc.AddMainDocumentPart();
55
+ mainPart.Document = new Document(new Body());
56
+ var body = mainPart.Document.Body!;
57
+
58
+ // ── Styles ──
59
+ var stylesPart = mainPart.AddNewPart<StyleDefinitionsPart>();
60
+ stylesPart.Styles = new Styles();
61
+ var styles = stylesPart.Styles;
62
+
63
+ // DocDefaults: 9pt Times New Roman, single spacing, no indent
64
+ // 9pt = 18 half-points. Nature body text is compact.
65
+ styles.Append(new DocDefaults(
66
+ new RunPropertiesDefault(
67
+ new RunPropertiesBaseStyle(
68
+ new RunFonts
69
+ {
70
+ Ascii = "Times New Roman",
71
+ HighAnsi = "Times New Roman",
72
+ EastAsia = "SimSun",
73
+ ComplexScript = "Times New Roman"
74
+ },
75
+ new FontSize { Val = "18" }, // 9pt body
76
+ new FontSizeComplexScript { Val = "18" },
77
+ new Color { Val = "000000" },
78
+ new Languages { Val = "en-US", EastAsia = "zh-CN" }
79
+ )
80
+ ),
81
+ new ParagraphPropertiesDefault(
82
+ new ParagraphPropertiesBaseStyle(
83
+ new SpacingBetweenLines
84
+ {
85
+ // Single spacing: 240 = 1.0x
86
+ // Nature uses tight spacing to maximize content density
87
+ Line = "240",
88
+ LineRule = LineSpacingRuleValues.Auto,
89
+ After = "0"
90
+ }
91
+ )
92
+ )
93
+ ));
94
+
95
+ // ── Normal style ──
96
+ styles.Append(CreateParagraphStyle(
97
+ styleId: "Normal",
98
+ styleName: "Normal",
99
+ isDefault: true,
100
+ uiPriority: 0
101
+ ));
102
+
103
+ // ── Title style: 14pt bold, full width ──
104
+ // Title is placed before the two-column section so it spans full width
105
+ styles.Append(CreateHeadingStyle(
106
+ level: 1,
107
+ fontAscii: "Times New Roman",
108
+ fontHAnsi: "Times New Roman",
109
+ sizeHalfPts: "28", // 14pt
110
+ color: "000000",
111
+ bold: true,
112
+ spaceBefore: "0",
113
+ spaceAfter: "120", // 6pt after title
114
+ uiPriority: 9
115
+ ));
116
+
117
+ // ── Section headings: bold, flush left, not numbered ──
118
+ // Nature uses bold headings at body size — hierarchy through weight, not size
119
+ styles.Append(CreateHeadingStyle(
120
+ level: 2,
121
+ fontAscii: "Times New Roman",
122
+ fontHAnsi: "Times New Roman",
123
+ sizeHalfPts: "18", // 9pt — same as body
124
+ color: "000000",
125
+ bold: true,
126
+ spaceBefore: "200", // 10pt before section
127
+ spaceAfter: "80", // 4pt after
128
+ uiPriority: 9
129
+ ));
130
+
131
+ // ── Caption style: 8pt for figure/table captions ──
132
+ styles.Append(CreateCaptionStyle(
133
+ fontSizeHalfPts: "16", // 8pt (sz=16)
134
+ color: "000000",
135
+ italic: false // Nature captions are not italic
136
+ ));
137
+
138
+ // ══════════════════════════════════════════════════════════════════
139
+ // FULL-WIDTH SECTION: Title + Abstract
140
+ // In OpenXML, to switch from single-column to two-column, we place
141
+ // a continuous section break after the full-width content.
142
+ // The section break carries the single-column page setup.
143
+ // ══════════════════════════════════════════════════════════════════
144
+
145
+ // ── Title (full width) ──
146
+ AddSampleParagraph(body,
147
+ "Quantum entanglement distillation in noisy intermediate-scale devices",
148
+ "Heading1");
149
+
150
+ // ── Authors (full width, 9pt, not a heading) ──
151
+ body.Append(new Paragraph(
152
+ new ParagraphProperties(
153
+ new SpacingBetweenLines { After = "60" }
154
+ ),
155
+ new Run(
156
+ new RunProperties(
157
+ new FontSize { Val = "18" },
158
+ new FontSizeComplexScript { Val = "18" }
159
+ ),
160
+ new Text("A. Chen, B. Kumar, C. Nakamura & D. Okonkwo")
161
+ )
162
+ ));
163
+
164
+ // ── Affiliations ──
165
+ body.Append(new Paragraph(
166
+ new ParagraphProperties(
167
+ new SpacingBetweenLines { After = "120" }
168
+ ),
169
+ new Run(
170
+ new RunProperties(
171
+ new FontSize { Val = "14" }, // 7pt
172
+ new FontSizeComplexScript { Val = "14" },
173
+ new Italic(),
174
+ new Color { Val = "444444" }
175
+ ),
176
+ new Text("Department of Physics, University of Oxford, Oxford OX1 3PU, UK")
177
+ )
178
+ ));
179
+
180
+ // ── Abstract heading ──
181
+ body.Append(new Paragraph(
182
+ new ParagraphProperties(
183
+ new SpacingBetweenLines { Before = "120", After = "60" }
184
+ ),
185
+ new Run(
186
+ new RunProperties(new Bold()),
187
+ new Text("Abstract")
188
+ )
189
+ ));
190
+
191
+ // ── Abstract body (full width, single paragraph) ──
192
+ body.Append(new Paragraph(
193
+ new ParagraphProperties(
194
+ new SpacingBetweenLines { After = "120" }
195
+ ),
196
+ new Run(new Text(
197
+ "Entanglement distillation is essential for practical quantum communication "
198
+ + "and distributed quantum computing. Here we demonstrate a protocol that achieves "
199
+ + "high-fidelity entanglement distillation on noisy intermediate-scale quantum (NISQ) "
200
+ + "devices using adaptive error mitigation. Our approach reduces resource overhead by "
201
+ + "63% compared to conventional recurrence protocols while maintaining a fidelity above "
202
+ + "0.97 for Bell pairs subject to depolarizing noise up to 15%. We validate the protocol "
203
+ + "on a 127-qubit superconducting processor and present a theoretical framework for "
204
+ + "scaling to multi-party entanglement. These results establish a practical pathway "
205
+ + "toward noise-resilient quantum networks."
206
+ ))
207
+ ));
208
+
209
+ // ── Continuous section break: ends the full-width section ──
210
+ // This SectionProperties defines the PRECEDING content as single-column.
211
+ // A4: Width=11906, Height=16838 (DXA).
212
+ // Margins: Top/Bottom=1in(1440), Left/Right=0.75in(1080).
213
+ body.Append(new Paragraph(
214
+ new ParagraphProperties(
215
+ new SectionProperties(
216
+ new SectionType { Val = SectionMarkValues.Continuous },
217
+ new WpPageSize { Width = 11906U, Height = 16838U },
218
+ new PageMargin
219
+ {
220
+ Top = 1440, Bottom = 1440,
221
+ Left = 1080U, Right = 1080U,
222
+ Header = 720U, Footer = 720U, Gutter = 0U
223
+ }
224
+ // Single column (default) — no Columns element needed
225
+ )
226
+ )
227
+ ));
228
+
229
+ // ══════════════════════════════════════════════════════════════════
230
+ // TWO-COLUMN SECTION: Body text
231
+ // All content after the continuous break until the final section
232
+ // properties will be rendered in two columns.
233
+ // ══════════════════════════════════════════════════════════════════
234
+
235
+ // ── Body sections (two-column) ──
236
+ AddSampleParagraph(body, "Introduction", "Heading2");
237
+
238
+ body.Append(new Paragraph(new Run(new Text(
239
+ "Quantum entanglement is a fundamental resource for quantum information processing, "
240
+ + "enabling applications ranging from quantum key distribution to distributed quantum "
241
+ + "computation. However, entanglement is fragile and degrades rapidly under environmental "
242
+ + "noise, necessitating distillation protocols that extract high-fidelity entangled states "
243
+ + "from multiple noisy copies."
244
+ ))));
245
+
246
+ // Superscript citation example
247
+ body.Append(new Paragraph(
248
+ new Run(new Text(
249
+ "Previous approaches to entanglement distillation have relied on recurrence protocols"
250
+ ) { Space = SpaceProcessingModeValues.Preserve }),
251
+ new Run(
252
+ new RunProperties(new VerticalTextAlignment { Val = VerticalPositionValues.Superscript }),
253
+ new Text("1,2")
254
+ ),
255
+ new Run(new Text(
256
+ " or hashing protocols"
257
+ ) { Space = SpaceProcessingModeValues.Preserve }),
258
+ new Run(
259
+ new RunProperties(new VerticalTextAlignment { Val = VerticalPositionValues.Superscript }),
260
+ new Text("3")
261
+ ),
262
+ new Run(new Text(
263
+ ", both of which require significant quantum resources that exceed the capabilities "
264
+ + "of current hardware."
265
+ ))
266
+ ));
267
+
268
+ AddSampleParagraph(body, "Results", "Heading2");
269
+
270
+ body.Append(new Paragraph(new Run(new Text(
271
+ "We implemented our adaptive distillation protocol on a 127-qubit IBM Eagle processor. "
272
+ + "The protocol operates in three stages: initial Bell pair preparation, syndrome-based "
273
+ + "error detection, and adaptive recurrence with dynamically adjusted thresholds."
274
+ ))));
275
+
276
+ // ── Table with Nature "Table 1 |" format ──
277
+ body.Append(CreateNatureTable(
278
+ "Table 1 | Distillation performance metrics",
279
+ new[] { "Noise level", "Input fidelity", "Output fidelity", "Success rate" },
280
+ new[]
281
+ {
282
+ new[] { "5%", "0.912", "0.991", "72%" },
283
+ new[] { "10%", "0.847", "0.983", "58%" },
284
+ new[] { "15%", "0.781", "0.971", "41%" }
285
+ }
286
+ ));
287
+
288
+ AddSampleParagraph(body, "Discussion", "Heading2");
289
+
290
+ body.Append(new Paragraph(new Run(new Text(
291
+ "Our results demonstrate that adaptive error mitigation can substantially reduce the "
292
+ + "resource overhead of entanglement distillation. The key insight is that by monitoring "
293
+ + "syndrome patterns in real time, the protocol can dynamically adjust its acceptance "
294
+ + "thresholds, avoiding unnecessary rounds of distillation when noise is below expected levels."
295
+ ))));
296
+
297
+ // ── Figure caption in Nature style: "Figure 1 |" ──
298
+ body.Append(CreateNatureFigureCaption(1,
299
+ "Distillation fidelity as a function of input noise level. "
300
+ + "Blue circles show experimental data from the 127-qubit processor; "
301
+ + "solid line shows theoretical prediction. Error bars represent one standard deviation "
302
+ + "over 1,000 shots per data point."));
303
+
304
+ AddSampleParagraph(body, "Methods", "Heading2");
305
+
306
+ body.Append(new Paragraph(new Run(new Text(
307
+ "Bell pairs were prepared using the standard CNOT-Hadamard circuit. Depolarizing noise "
308
+ + "was introduced via randomized Pauli rotations calibrated to target error rates. "
309
+ + "Each experimental configuration was repeated 10,000 times to ensure statistical "
310
+ + "significance."
311
+ ))));
312
+
313
+ // ── References section ──
314
+ AddSampleParagraph(body, "References", "Heading2");
315
+
316
+ AddNatureReference(body, 1, "Bennett, C. H. et al. Purification of noisy entanglement "
317
+ + "and faithful teleportation via noisy channels. Phys. Rev. Lett. 76, 722\u2013725 (1996).");
318
+ AddNatureReference(body, 2, "Deutsch, D. et al. Quantum privacy amplification and the security "
319
+ + "of quantum cryptography over noisy channels. Phys. Rev. Lett. 77, 2818\u20132821 (1996).");
320
+ AddNatureReference(body, 3, "Bennett, C. H. et al. Mixed-state entanglement and quantum error "
321
+ + "correction. Phys. Rev. A 54, 3824\u20133851 (1996).");
322
+ AddNatureReference(body, 4, "Pan, J.-W. et al. Entanglement purification for quantum "
323
+ + "communication. Nature 410, 1067\u20131070 (2001).");
324
+
325
+ // ── Final section properties: two-column layout ──
326
+ // This defines the formatting for the body section.
327
+ var finalSectPr = new SectionProperties(
328
+ new SectionType { Val = SectionMarkValues.Continuous },
329
+ new WpPageSize { Width = 11906U, Height = 16838U },
330
+ new PageMargin
331
+ {
332
+ Top = 1440, Bottom = 1440,
333
+ Left = 1080U, Right = 1080U,
334
+ Header = 720U, Footer = 720U, Gutter = 0U
335
+ },
336
+ new WpColumns
337
+ {
338
+ ColumnCount = 2,
339
+ Space = "283" // ~5mm gutter between columns
340
+ }
341
+ );
342
+
343
+ // Page numbers: bottom center, 8pt
344
+ AddPageNumberFooter(mainPart, finalSectPr,
345
+ alignment: JustificationValues.Center,
346
+ fontSizeHalfPts: "16", // 8pt
347
+ color: "000000",
348
+ format: PageNumberFormat.Plain
349
+ );
350
+
351
+ body.Append(finalSectPr);
352
+ }
353
+
354
+ /// <summary>
355
+ /// Creates a Nature-style table with caption above.
356
+ /// Nature tables use "Table N |" format for the caption label, followed by
357
+ /// a description. The table itself has a clean three-line style (top rule,
358
+ /// header rule, bottom rule) with no vertical borders.
359
+ /// </summary>
360
+ private static Table CreateNatureTable(string captionText, string[] headers, string[][] data)
361
+ {
362
+ // The caption is placed as a paragraph before the table in the calling code,
363
+ // but here we embed it as part of the table structure for cohesion.
364
+ var table = new Table();
365
+
366
+ // Table properties: full width, three-line borders
367
+ var tblPr = new TableProperties(
368
+ new TableWidth { Width = "5000", Type = TableWidthUnitValues.Pct },
369
+ new TableBorders(
370
+ new TopBorder { Val = BorderValues.Single, Size = 8, Space = 0, Color = "000000" },
371
+ new BottomBorder { Val = BorderValues.Single, Size = 8, Space = 0, Color = "000000" },
372
+ new LeftBorder { Val = BorderValues.None, Size = 0, Space = 0, Color = "auto" },
373
+ new RightBorder { Val = BorderValues.None, Size = 0, Space = 0, Color = "auto" },
374
+ new InsideHorizontalBorder { Val = BorderValues.None, Size = 0, Space = 0, Color = "auto" },
375
+ new InsideVerticalBorder { Val = BorderValues.None, Size = 0, Space = 0, Color = "auto" }
376
+ ),
377
+ new TableCellMarginDefault(
378
+ new TopMargin { Width = "20", Type = TableWidthUnitValues.Dxa },
379
+ new StartMargin { Width = "40", Type = TableWidthUnitValues.Dxa },
380
+ new BottomMargin { Width = "20", Type = TableWidthUnitValues.Dxa },
381
+ new EndMargin { Width = "40", Type = TableWidthUnitValues.Dxa }
382
+ )
383
+ );
384
+ table.Append(tblPr);
385
+
386
+ // Grid columns
387
+ var grid = new TableGrid();
388
+ int colWidth = 9746 / headers.Length; // A4 minus margins
389
+ foreach (var _ in headers)
390
+ grid.Append(new GridColumn { Width = colWidth.ToString() });
391
+ table.Append(grid);
392
+
393
+ // Caption row spanning all columns
394
+ var captionRow = new TableRow();
395
+ var captionCell = new TableCell(
396
+ new TableCellProperties(
397
+ new TableCellWidth { Width = "0", Type = TableWidthUnitValues.Auto },
398
+ new GridSpan { Val = headers.Length },
399
+ new TableCellBorders(
400
+ new TopBorder { Val = BorderValues.None, Size = 0, Space = 0, Color = "auto" },
401
+ new BottomBorder { Val = BorderValues.None, Size = 0, Space = 0, Color = "auto" }
402
+ )
403
+ )
404
+ );
405
+
406
+ // Parse "Table 1 |" from the caption text — bold the label part
407
+ var captionPara = new Paragraph(
408
+ new ParagraphProperties(
409
+ new SpacingBetweenLines { After = "40" }
410
+ )
411
+ );
412
+ int pipeIdx = captionText.IndexOf('|');
413
+ if (pipeIdx > 0)
414
+ {
415
+ // Bold "Table 1 |"
416
+ captionPara.Append(new Run(
417
+ new RunProperties(
418
+ new Bold(),
419
+ new FontSize { Val = "16" },
420
+ new FontSizeComplexScript { Val = "16" }
421
+ ),
422
+ new Text(captionText.Substring(0, pipeIdx + 1)) { Space = SpaceProcessingModeValues.Preserve }
423
+ ));
424
+ // Regular description
425
+ captionPara.Append(new Run(
426
+ new RunProperties(
427
+ new FontSize { Val = "16" },
428
+ new FontSizeComplexScript { Val = "16" }
429
+ ),
430
+ new Text(captionText.Substring(pipeIdx + 1))
431
+ ));
432
+ }
433
+ else
434
+ {
435
+ captionPara.Append(new Run(
436
+ new RunProperties(
437
+ new Bold(),
438
+ new FontSize { Val = "16" },
439
+ new FontSizeComplexScript { Val = "16" }
440
+ ),
441
+ new Text(captionText)
442
+ ));
443
+ }
444
+
445
+ captionCell.Append(captionPara);
446
+ captionRow.Append(captionCell);
447
+ table.Append(captionRow);
448
+
449
+ // Header row with bottom border (the second "line" of three-line table)
450
+ var headerRow = new TableRow();
451
+ foreach (var h in headers)
452
+ {
453
+ headerRow.Append(new TableCell(
454
+ new TableCellProperties(
455
+ new TableCellWidth { Width = "0", Type = TableWidthUnitValues.Auto },
456
+ new TableCellBorders(
457
+ new BottomBorder { Val = BorderValues.Single, Size = 4, Space = 0, Color = "000000" }
458
+ )
459
+ ),
460
+ new Paragraph(
461
+ new ParagraphProperties(
462
+ new SpacingBetweenLines { After = "0" }
463
+ ),
464
+ new Run(
465
+ new RunProperties(new Bold(), new FontSize { Val = "16" }, new FontSizeComplexScript { Val = "16" }),
466
+ new Text(h)
467
+ )
468
+ )
469
+ ));
470
+ }
471
+ table.Append(headerRow);
472
+
473
+ // Data rows — no internal borders
474
+ foreach (var rowData in data)
475
+ {
476
+ var row = new TableRow();
477
+ foreach (var cell in rowData)
478
+ {
479
+ row.Append(new TableCell(
480
+ new TableCellProperties(
481
+ new TableCellWidth { Width = "0", Type = TableWidthUnitValues.Auto }
482
+ ),
483
+ new Paragraph(
484
+ new ParagraphProperties(
485
+ new SpacingBetweenLines { After = "0" }
486
+ ),
487
+ new Run(
488
+ new RunProperties(new FontSize { Val = "16" }, new FontSizeComplexScript { Val = "16" }),
489
+ new Text(cell)
490
+ )
491
+ )
492
+ ));
493
+ }
494
+ table.Append(row);
495
+ }
496
+
497
+ return table;
498
+ }
499
+
500
+ /// <summary>
501
+ /// Creates a Nature-style figure caption: "Figure N |" with bold label and pipe separator.
502
+ /// 8pt (sz=16), placed below the figure placeholder.
503
+ /// </summary>
504
+ private static Paragraph CreateNatureFigureCaption(int figureNumber, string description)
505
+ {
506
+ return new Paragraph(
507
+ new ParagraphProperties(
508
+ new SpacingBetweenLines { Before = "120", After = "120" }
509
+ ),
510
+ new Run(
511
+ new RunProperties(
512
+ new Bold(),
513
+ new FontSize { Val = "16" },
514
+ new FontSizeComplexScript { Val = "16" }
515
+ ),
516
+ new Text($"Figure {figureNumber} | ") { Space = SpaceProcessingModeValues.Preserve }
517
+ ),
518
+ new Run(
519
+ new RunProperties(
520
+ new FontSize { Val = "16" },
521
+ new FontSizeComplexScript { Val = "16" }
522
+ ),
523
+ new Text(description)
524
+ )
525
+ );
526
+ }
527
+
528
+ /// <summary>
529
+ /// Adds a Nature-style numbered reference in 7pt (sz=14).
530
+ /// References are numbered sequentially and appear in a compact list.
531
+ /// </summary>
532
+ private static void AddNatureReference(Body body, int number, string referenceText)
533
+ {
534
+ body.Append(new Paragraph(
535
+ new ParagraphProperties(
536
+ new SpacingBetweenLines { After = "20" },
537
+ new Indentation { Left = "240", Hanging = "240" } // Hanging indent for number
538
+ ),
539
+ new Run(
540
+ new RunProperties(
541
+ new FontSize { Val = "14" }, // 7pt
542
+ new FontSizeComplexScript { Val = "14" }
543
+ ),
544
+ new Text($"{number}. ") { Space = SpaceProcessingModeValues.Preserve }
545
+ ),
546
+ new Run(
547
+ new RunProperties(
548
+ new FontSize { Val = "14" },
549
+ new FontSizeComplexScript { Val = "14" }
550
+ ),
551
+ new Text(referenceText)
552
+ )
553
+ ));
554
+ }
555
+
556
+
557
+ // ════════════════════════════════════════════════════════════════════════
558
+ // RECIPE 13: HARVARD BUSINESS REVIEW STYLE
559
+ // ════════════════════════════════════════════════════════════════════════
560
+
561
+ /// <summary>
562
+ /// Recipe: Harvard Business Review (HBR) Published Format
563
+ /// Source: Analysis of Harvard Business Review published article formatting
564
+ /// Feel: Premium, editorial, executive-level business content.
565
+ /// Best for: Business strategy articles, thought leadership, executive presentations.
566
+ ///
567
+ /// Design rationale:
568
+ /// - US Letter with generous 1.25in margins (1800 DXA): creates a luxurious
569
+ /// text block width (~6in / 390pt) that signals premium editorial content.
570
+ /// Wider margins = shorter lines = more deliberate, executive-level reading pace.
571
+ /// - 11pt Georgia body (#333333): Georgia was designed specifically for screen
572
+ /// and print readability. Its larger x-height and open counters make it more
573
+ /// readable than Times New Roman at the same size. The warm serif conveys
574
+ /// authority and thoughtfulness appropriate for business strategy content.
575
+ /// - 24pt Georgia bold title (#1A1A1A): commanding but not aggressive.
576
+ /// Near-black (#1A1A1A) is softer than pure black while maintaining authority.
577
+ /// - 14pt subtitle/deck in #666666: the "deck" (magazine term) summarizes the
578
+ /// article's thesis. Medium gray subordinates it to the title without losing it.
579
+ /// - NO first-line indent: HBR uses block paragraphs with space-after (10pt/200 DXA).
580
+ /// This is the modern editorial convention — cleaner than academic indentation.
581
+ /// - 1.3x line spacing (line=312): slightly more open than 1.15x corporate standard,
582
+ /// signaling a more considered, editorial reading experience.
583
+ /// - "Exhibit" labels (not "Table"): HBR's distinctive terminology that signals
584
+ /// business/consulting context rather than academic/scientific.
585
+ /// - Pull quotes: 16pt italic Georgia in #666666, indented — a magazine convention
586
+ /// that breaks up long text and highlights key insights for scanning executives.
587
+ /// - Minimal section numbering: HBR uses a flowing narrative style, not a
588
+ /// numbered outline. Headings are signposts, not a hierarchy to navigate.
589
+ /// </summary>
590
+ public static void CreateHBRStyleDocument(string outputPath)
591
+ {
592
+ using var doc = WordprocessingDocument.Create(outputPath, WordprocessingDocumentType.Document);
593
+
594
+ var mainPart = doc.AddMainDocumentPart();
595
+ mainPart.Document = new Document(new Body());
596
+ var body = mainPart.Document.Body!;
597
+
598
+ // ── Styles ──
599
+ var stylesPart = mainPart.AddNewPart<StyleDefinitionsPart>();
600
+ stylesPart.Styles = new Styles();
601
+ var styles = stylesPart.Styles;
602
+
603
+ // DocDefaults: 11pt Georgia, 1.3x spacing, no first-line indent
604
+ styles.Append(new DocDefaults(
605
+ new RunPropertiesDefault(
606
+ new RunPropertiesBaseStyle(
607
+ new RunFonts
608
+ {
609
+ Ascii = "Georgia",
610
+ HighAnsi = "Georgia",
611
+ EastAsia = "SimSun",
612
+ ComplexScript = "Georgia"
613
+ },
614
+ new FontSize { Val = "22" }, // 11pt (sz=22)
615
+ new FontSizeComplexScript { Val = "22" },
616
+ new Color { Val = "333333" }, // Warm dark gray — premium feel
617
+ new Languages { Val = "en-US", EastAsia = "zh-CN" }
618
+ )
619
+ ),
620
+ new ParagraphPropertiesDefault(
621
+ new ParagraphPropertiesBaseStyle(
622
+ new SpacingBetweenLines
623
+ {
624
+ // 1.3x line spacing: 240 * 1.3 = 312
625
+ // More open than corporate 1.15x — signals editorial content
626
+ Line = "312",
627
+ LineRule = LineSpacingRuleValues.Auto,
628
+ After = "200" // 10pt after — block paragraph separation
629
+ }
630
+ )
631
+ )
632
+ ));
633
+
634
+ // ── Normal style ──
635
+ styles.Append(CreateParagraphStyle(
636
+ styleId: "Normal",
637
+ styleName: "Normal",
638
+ isDefault: true,
639
+ uiPriority: 0
640
+ ));
641
+
642
+ // ── Title: 24pt Georgia bold, near-black ──
643
+ styles.Append(CreateHeadingStyle(
644
+ level: 1,
645
+ fontAscii: "Georgia",
646
+ fontHAnsi: "Georgia",
647
+ sizeHalfPts: "48", // 24pt (sz=48)
648
+ color: "1A1A1A", // Near-black — authoritative but soft
649
+ bold: true,
650
+ spaceBefore: "0",
651
+ spaceAfter: "120", // 6pt after title
652
+ uiPriority: 9
653
+ ));
654
+
655
+ // ── H1: 18pt Georgia bold ──
656
+ styles.Append(CreateHeadingStyle(
657
+ level: 2,
658
+ fontAscii: "Georgia",
659
+ fontHAnsi: "Georgia",
660
+ sizeHalfPts: "36", // 18pt (sz=36)
661
+ color: "1A1A1A",
662
+ bold: true,
663
+ spaceBefore: "480", // 24pt before — clear section break
664
+ spaceAfter: "120", // 6pt after
665
+ uiPriority: 9
666
+ ));
667
+
668
+ // ── H2: 14pt Georgia bold ──
669
+ styles.Append(CreateHeadingStyle(
670
+ level: 3,
671
+ fontAscii: "Georgia",
672
+ fontHAnsi: "Georgia",
673
+ sizeHalfPts: "28", // 14pt (sz=28)
674
+ color: "1A1A1A",
675
+ bold: true,
676
+ spaceBefore: "360", // 18pt before
677
+ spaceAfter: "80", // 4pt after
678
+ uiPriority: 9
679
+ ));
680
+
681
+ // ── Caption style: 9pt Georgia, gray ──
682
+ styles.Append(CreateCaptionStyle(
683
+ fontSizeHalfPts: "18", // 9pt
684
+ color: "666666",
685
+ italic: false
686
+ ));
687
+
688
+ // ── Page setup: US Letter, 1.25in margins ──
689
+ // Letter = 8.5" x 11" = 12240 x 15840 DXA
690
+ // 1.25in = 1800 DXA on all sides
691
+ var sectPr = new SectionProperties(
692
+ new WpPageSize { Width = 12240U, Height = 15840U },
693
+ new PageMargin
694
+ {
695
+ Top = 1800, Bottom = 1800,
696
+ Left = 1800U, Right = 1800U,
697
+ Header = 720U, Footer = 720U, Gutter = 0U
698
+ }
699
+ );
700
+
701
+ // Page numbers: bottom center, 9pt gray
702
+ AddPageNumberFooter(mainPart, sectPr,
703
+ alignment: JustificationValues.Center,
704
+ fontSizeHalfPts: "18",
705
+ color: "999999",
706
+ format: PageNumberFormat.Plain
707
+ );
708
+
709
+ // ══════════════════════════════════════════════════════════════════
710
+ // SAMPLE CONTENT
711
+ // ══════════════════════════════════════════════════════════════════
712
+
713
+ // ── Title ──
714
+ AddSampleParagraph(body,
715
+ "The Hidden Architecture of Market-Creating Innovation",
716
+ "Heading1");
717
+
718
+ // ── Subtitle/deck: 14pt Georgia regular, #666666 ──
719
+ body.Append(new Paragraph(
720
+ new ParagraphProperties(
721
+ new SpacingBetweenLines { After = "360" } // Extra space after deck
722
+ ),
723
+ new Run(
724
+ new RunProperties(
725
+ new RunFonts { Ascii = "Georgia", HighAnsi = "Georgia" },
726
+ new FontSize { Val = "28" }, // 14pt (sz=28)
727
+ new FontSizeComplexScript { Val = "28" },
728
+ new Color { Val = "666666" }
729
+ ),
730
+ new Text("Why the most transformative companies don't compete on existing metrics "
731
+ + "-- and what leaders can learn from their approach to creating entirely new markets.")
732
+ )
733
+ ));
734
+
735
+ // ── Author byline ──
736
+ body.Append(new Paragraph(
737
+ new ParagraphProperties(
738
+ new SpacingBetweenLines { After = "360" }
739
+ ),
740
+ new Run(
741
+ new RunProperties(
742
+ new Italic(),
743
+ new Color { Val = "666666" }
744
+ ),
745
+ new Text("by Margaret Chen and Robert Stavros")
746
+ )
747
+ ));
748
+
749
+ // ── Opening paragraph ──
750
+ body.Append(new Paragraph(new Run(new Text(
751
+ "In the decade since Clayton Christensen's theory of disruptive innovation reshaped "
752
+ + "corporate strategy, a more nuanced pattern has emerged. The most transformative "
753
+ + "companies of the past five years have not merely disrupted existing markets. They "
754
+ + "have created entirely new ones, establishing value networks that their predecessors "
755
+ + "could not have imagined, let alone competed in."
756
+ ))));
757
+
758
+ body.Append(new Paragraph(new Run(new Text(
759
+ "Our research, spanning 47 companies across 12 industries over seven years, reveals "
760
+ + "a consistent architectural pattern in how these market-creating innovations unfold. "
761
+ + "The pattern is not about technology or timing. It is about the deliberate construction "
762
+ + "of what we call demand infrastructure: the ecosystem of complementary capabilities, "
763
+ + "customer behaviors, and institutional arrangements that make a new market viable."
764
+ ))));
765
+
766
+ // ── H1 section ──
767
+ AddSampleParagraph(body, "The Demand Infrastructure Framework", "Heading2");
768
+
769
+ body.Append(new Paragraph(new Run(new Text(
770
+ "Traditional frameworks for analyzing innovation focus on supply-side dynamics: "
771
+ + "technological capability, cost structure, and competitive positioning. These "
772
+ + "frameworks work well for sustaining innovations, where the market already exists "
773
+ + "and the question is how to serve it better or more cheaply."
774
+ ))));
775
+
776
+ body.Append(new Paragraph(new Run(new Text(
777
+ "Market-creating innovations, however, require a fundamentally different analytical "
778
+ + "lens. The central challenge is not building a better product but constructing the "
779
+ + "conditions under which demand for an entirely new category can emerge and sustain itself."
780
+ ))));
781
+
782
+ // ── Pull quote ──
783
+ AddHBRPullQuote(body,
784
+ "The most common strategic error is optimizing for a market that doesn't yet exist "
785
+ + "using metrics designed for markets that already do.");
786
+
787
+ // ── H2 section ──
788
+ AddSampleParagraph(body, "Three Pillars of Demand Infrastructure", "Heading3");
789
+
790
+ body.Append(new Paragraph(new Run(new Text(
791
+ "Our analysis identifies three structural pillars that distinguish successful "
792
+ + "market-creating innovations from those that fail despite strong technology and ample funding."
793
+ ))));
794
+
795
+ body.Append(new Paragraph(new Run(new Text(
796
+ "The first pillar is behavioral scaffolding: the creation of transitional products, "
797
+ + "services, or experiences that help potential customers develop the habits, skills, "
798
+ + "and mental models necessary to adopt the new category. The second is institutional "
799
+ + "alignment: the cultivation of regulatory frameworks, industry standards, and professional "
800
+ + "norms that legitimize the new market. The third is complementary supply: the development "
801
+ + "of adjacent products and services that make the core offering more valuable."
802
+ ))));
803
+
804
+ // ── Exhibit (HBR's term for tables) ──
805
+ body.Append(CreateHBRExhibit(
806
+ "Exhibit 1: Market-Creating Innovation Success Factors",
807
+ new[] { "Factor", "High success", "Low success", "Impact" },
808
+ new[]
809
+ {
810
+ new[] { "Behavioral scaffolding", "Present in 89%", "Present in 23%", "3.9x" },
811
+ new[] { "Institutional alignment", "Present in 76%", "Present in 31%", "2.5x" },
812
+ new[] { "Complementary supply", "Present in 82%", "Present in 44%", "1.9x" },
813
+ new[] { "All three pillars", "Present in 64%", "Present in 8%", "8.0x" }
814
+ }
815
+ ));
816
+
817
+ // ── Exhibit caption ──
818
+ body.Append(new Paragraph(
819
+ new ParagraphProperties(
820
+ new ParagraphStyleId { Val = "Caption" }
821
+ ),
822
+ new Run(new Text(
823
+ "Source: Authors' analysis of 47 market-creating innovations, 2018\u20132025. "
824
+ + "Success defined as achieving >$1B category revenue within five years of launch."
825
+ ))
826
+ ));
827
+
828
+ // ── More body text ──
829
+ AddSampleParagraph(body, "Implications for Leaders", "Heading2");
830
+
831
+ body.Append(new Paragraph(new Run(new Text(
832
+ "The demand infrastructure framework has profound implications for how leaders allocate "
833
+ + "resources and evaluate innovation investments. Rather than asking \"Is this technology "
834
+ + "superior?\" the critical question becomes \"Are we building the conditions under which "
835
+ + "customers can adopt this?\""
836
+ ))));
837
+
838
+ body.Append(new Paragraph(new Run(new Text(
839
+ "This shift in perspective explains why some of the most successful market creators "
840
+ + "invested as much in customer education, ecosystem development, and regulatory engagement "
841
+ + "as they did in product development. It also explains why technically superior solutions "
842
+ + "frequently lose to inferior ones that invest more heavily in demand infrastructure."
843
+ ))));
844
+
845
+ // ── Another pull quote ──
846
+ AddHBRPullQuote(body,
847
+ "Leaders who build demand infrastructure are not merely selling products. "
848
+ + "They are constructing the conditions under which entirely new forms of value become possible.");
849
+
850
+ AddSampleParagraph(body, "A Path Forward", "Heading3");
851
+
852
+ body.Append(new Paragraph(new Run(new Text(
853
+ "For organizations seeking to create new markets rather than compete in existing ones, "
854
+ + "we recommend a three-phase approach. First, map the behavioral, institutional, and "
855
+ + "complementary gaps that stand between your innovation and viable demand. Second, "
856
+ + "design a sequenced investment strategy that addresses these gaps in order of "
857
+ + "dependency. Third, establish metrics that track demand infrastructure development, "
858
+ + "not just product performance."
859
+ ))));
860
+
861
+ body.Append(new Paragraph(new Run(new Text(
862
+ "The organizations that master this approach will not merely win in existing markets. "
863
+ + "They will define the markets of the future."
864
+ ))));
865
+
866
+ // Section properties must be last child of body
867
+ body.Append(sectPr);
868
+ }
869
+
870
+ /// <summary>
871
+ /// Creates an HBR-style pull quote: 16pt italic Georgia, #666666, indented.
872
+ /// Pull quotes are a magazine editorial convention that breaks up long text
873
+ /// and highlights key insights for scanning executives.
874
+ /// Left and right indentation creates visual distinction from body text.
875
+ /// </summary>
876
+ private static void AddHBRPullQuote(Body body, string text)
877
+ {
878
+ body.Append(new Paragraph(
879
+ new ParagraphProperties(
880
+ new SpacingBetweenLines
881
+ {
882
+ Before = "360", // 18pt before
883
+ After = "360", // 18pt after
884
+ Line = "360", // 1.5x line spacing for pull quotes
885
+ LineRule = LineSpacingRuleValues.Auto
886
+ },
887
+ new Indentation
888
+ {
889
+ Left = "720", // 0.5in left indent
890
+ Right = "720" // 0.5in right indent
891
+ }
892
+ ),
893
+ new Run(
894
+ new RunProperties(
895
+ new RunFonts { Ascii = "Georgia", HighAnsi = "Georgia" },
896
+ new FontSize { Val = "32" }, // 16pt (sz=32)
897
+ new FontSizeComplexScript { Val = "32" },
898
+ new Italic(),
899
+ new Color { Val = "666666" }
900
+ ),
901
+ new Text(text)
902
+ )
903
+ ));
904
+ }
905
+
906
+ /// <summary>
907
+ /// Creates an HBR-style exhibit (table) with clean header-accent formatting.
908
+ /// HBR uses "Exhibit" terminology rather than "Table" to signal business/consulting context.
909
+ /// Design: bold exhibit label above, clean header with accent color, minimal borders.
910
+ /// </summary>
911
+ private static Table CreateHBRExhibit(string exhibitLabel, string[] headers, string[][] data)
912
+ {
913
+ var table = new Table();
914
+
915
+ // Table properties: full width, subtle borders
916
+ var tblPr = new TableProperties(
917
+ new TableWidth { Width = "5000", Type = TableWidthUnitValues.Pct },
918
+ new TableBorders(
919
+ new TopBorder { Val = BorderValues.Single, Size = 8, Space = 0, Color = "1A1A1A" },
920
+ new BottomBorder { Val = BorderValues.Single, Size = 4, Space = 0, Color = "CCCCCC" },
921
+ new LeftBorder { Val = BorderValues.None, Size = 0, Space = 0, Color = "auto" },
922
+ new RightBorder { Val = BorderValues.None, Size = 0, Space = 0, Color = "auto" },
923
+ new InsideHorizontalBorder { Val = BorderValues.Single, Size = 4, Space = 0, Color = "E0E0E0" },
924
+ new InsideVerticalBorder { Val = BorderValues.None, Size = 0, Space = 0, Color = "auto" }
925
+ ),
926
+ new TableCellMarginDefault(
927
+ new TopMargin { Width = "40", Type = TableWidthUnitValues.Dxa },
928
+ new StartMargin { Width = "60", Type = TableWidthUnitValues.Dxa },
929
+ new BottomMargin { Width = "40", Type = TableWidthUnitValues.Dxa },
930
+ new EndMargin { Width = "60", Type = TableWidthUnitValues.Dxa }
931
+ )
932
+ );
933
+ table.Append(tblPr);
934
+
935
+ // Grid columns
936
+ var grid = new TableGrid();
937
+ int colWidth = 8640 / headers.Length; // Letter width minus 1.25in margins each side
938
+ foreach (var _ in headers)
939
+ grid.Append(new GridColumn { Width = colWidth.ToString() });
940
+ table.Append(grid);
941
+
942
+ // Exhibit label row spanning all columns
943
+ var labelRow = new TableRow();
944
+ var labelCell = new TableCell(
945
+ new TableCellProperties(
946
+ new TableCellWidth { Width = "0", Type = TableWidthUnitValues.Auto },
947
+ new GridSpan { Val = headers.Length },
948
+ new TableCellBorders(
949
+ new BottomBorder { Val = BorderValues.None, Size = 0, Space = 0, Color = "auto" }
950
+ )
951
+ ),
952
+ new Paragraph(
953
+ new ParagraphProperties(
954
+ new SpacingBetweenLines { After = "80" }
955
+ ),
956
+ new Run(
957
+ new RunProperties(
958
+ new Bold(),
959
+ new RunFonts { Ascii = "Georgia", HighAnsi = "Georgia" },
960
+ new FontSize { Val = "20" }, // 10pt
961
+ new FontSizeComplexScript { Val = "20" },
962
+ new Color { Val = "1A1A1A" }
963
+ ),
964
+ new Text(exhibitLabel)
965
+ )
966
+ )
967
+ );
968
+ labelRow.Append(labelCell);
969
+ table.Append(labelRow);
970
+
971
+ // Header row with accent background
972
+ var headerRow = new TableRow();
973
+ foreach (var h in headers)
974
+ {
975
+ headerRow.Append(new TableCell(
976
+ new TableCellProperties(
977
+ new TableCellWidth { Width = "0", Type = TableWidthUnitValues.Auto },
978
+ new Shading
979
+ {
980
+ Val = ShadingPatternValues.Clear,
981
+ Color = "auto",
982
+ Fill = "F5F5F0" // Warm off-white header background
983
+ },
984
+ new TableCellBorders(
985
+ new BottomBorder { Val = BorderValues.Single, Size = 6, Space = 0, Color = "1A1A1A" }
986
+ )
987
+ ),
988
+ new Paragraph(
989
+ new ParagraphProperties(
990
+ new SpacingBetweenLines { After = "0" }
991
+ ),
992
+ new Run(
993
+ new RunProperties(
994
+ new Bold(),
995
+ new FontSize { Val = "20" }, // 10pt header text
996
+ new FontSizeComplexScript { Val = "20" },
997
+ new Color { Val = "1A1A1A" }
998
+ ),
999
+ new Text(h)
1000
+ )
1001
+ )
1002
+ ));
1003
+ }
1004
+ table.Append(headerRow);
1005
+
1006
+ // Data rows
1007
+ for (int i = 0; i < data.Length; i++)
1008
+ {
1009
+ var row = new TableRow();
1010
+ foreach (var cell in data[i])
1011
+ {
1012
+ var tcPr = new TableCellProperties(
1013
+ new TableCellWidth { Width = "0", Type = TableWidthUnitValues.Auto }
1014
+ );
1015
+
1016
+ row.Append(new TableCell(
1017
+ tcPr,
1018
+ new Paragraph(
1019
+ new ParagraphProperties(
1020
+ new SpacingBetweenLines { After = "0" }
1021
+ ),
1022
+ new Run(
1023
+ new RunProperties(
1024
+ new FontSize { Val = "20" },
1025
+ new FontSizeComplexScript { Val = "20" },
1026
+ new Color { Val = "333333" }
1027
+ ),
1028
+ new Text(cell)
1029
+ )
1030
+ )
1031
+ ));
1032
+ }
1033
+ table.Append(row);
1034
+ }
1035
+
1036
+ return table;
1037
+ }
1038
+ }