@nguyenphp/antigravity-marketing 1.0.18 → 1.0.20

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 (231) hide show
  1. package/README.md +130 -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
  128. package/templates/.agent/agents/backend-specialist.md +0 -263
  129. package/templates/.agent/agents/database-architect.md +0 -226
  130. package/templates/.agent/agents/debugger.md +0 -225
  131. package/templates/.agent/agents/devops-engineer.md +0 -242
  132. package/templates/.agent/agents/frontend-specialist.md +0 -527
  133. package/templates/.agent/agents/game-developer.md +0 -162
  134. package/templates/.agent/agents/mobile-developer.md +0 -377
  135. package/templates/.agent/agents/penetration-tester.md +0 -188
  136. package/templates/.agent/agents/security-auditor.md +0 -170
  137. package/templates/.agent/agents/test-engineer.md +0 -158
  138. package/templates/.agent/skills/api-patterns/SKILL.md +0 -81
  139. package/templates/.agent/skills/api-patterns/api-style.md +0 -42
  140. package/templates/.agent/skills/api-patterns/auth.md +0 -24
  141. package/templates/.agent/skills/api-patterns/documentation.md +0 -26
  142. package/templates/.agent/skills/api-patterns/graphql.md +0 -41
  143. package/templates/.agent/skills/api-patterns/rate-limiting.md +0 -31
  144. package/templates/.agent/skills/api-patterns/response.md +0 -37
  145. package/templates/.agent/skills/api-patterns/rest.md +0 -40
  146. package/templates/.agent/skills/api-patterns/scripts/api_validator.py +0 -211
  147. package/templates/.agent/skills/api-patterns/security-testing.md +0 -122
  148. package/templates/.agent/skills/api-patterns/trpc.md +0 -41
  149. package/templates/.agent/skills/api-patterns/versioning.md +0 -22
  150. package/templates/.agent/skills/app-builder/SKILL.md +0 -75
  151. package/templates/.agent/skills/app-builder/agent-coordination.md +0 -71
  152. package/templates/.agent/skills/app-builder/feature-building.md +0 -53
  153. package/templates/.agent/skills/app-builder/project-detection.md +0 -34
  154. package/templates/.agent/skills/app-builder/scaffolding.md +0 -118
  155. package/templates/.agent/skills/app-builder/tech-stack.md +0 -40
  156. package/templates/.agent/skills/app-builder/templates/SKILL.md +0 -39
  157. package/templates/.agent/skills/app-builder/templates/astro-static/TEMPLATE.md +0 -76
  158. package/templates/.agent/skills/app-builder/templates/chrome-extension/TEMPLATE.md +0 -92
  159. package/templates/.agent/skills/app-builder/templates/cli-tool/TEMPLATE.md +0 -88
  160. package/templates/.agent/skills/app-builder/templates/electron-desktop/TEMPLATE.md +0 -88
  161. package/templates/.agent/skills/app-builder/templates/express-api/TEMPLATE.md +0 -83
  162. package/templates/.agent/skills/app-builder/templates/flutter-app/TEMPLATE.md +0 -90
  163. package/templates/.agent/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +0 -90
  164. package/templates/.agent/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +0 -82
  165. package/templates/.agent/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +0 -100
  166. package/templates/.agent/skills/app-builder/templates/nextjs-static/TEMPLATE.md +0 -106
  167. package/templates/.agent/skills/app-builder/templates/nuxt-app/TEMPLATE.md +0 -101
  168. package/templates/.agent/skills/app-builder/templates/python-fastapi/TEMPLATE.md +0 -83
  169. package/templates/.agent/skills/app-builder/templates/react-native-app/TEMPLATE.md +0 -93
  170. package/templates/.agent/skills/architecture/SKILL.md +0 -55
  171. package/templates/.agent/skills/architecture/context-discovery.md +0 -43
  172. package/templates/.agent/skills/architecture/examples.md +0 -94
  173. package/templates/.agent/skills/architecture/pattern-selection.md +0 -68
  174. package/templates/.agent/skills/architecture/patterns-reference.md +0 -50
  175. package/templates/.agent/skills/architecture/trade-off-analysis.md +0 -77
  176. package/templates/.agent/skills/bash-linux/SKILL.md +0 -199
  177. package/templates/.agent/skills/behavioral-modes/SKILL.md +0 -242
  178. package/templates/.agent/skills/clean-code/SKILL.md +0 -201
  179. package/templates/.agent/skills/code-review-checklist/SKILL.md +0 -109
  180. package/templates/.agent/skills/database-design/SKILL.md +0 -52
  181. package/templates/.agent/skills/database-design/database-selection.md +0 -43
  182. package/templates/.agent/skills/database-design/indexing.md +0 -39
  183. package/templates/.agent/skills/database-design/migrations.md +0 -48
  184. package/templates/.agent/skills/database-design/optimization.md +0 -36
  185. package/templates/.agent/skills/database-design/orm-selection.md +0 -30
  186. package/templates/.agent/skills/database-design/schema-design.md +0 -56
  187. package/templates/.agent/skills/database-design/scripts/schema_validator.py +0 -172
  188. package/templates/.agent/skills/deployment-procedures/SKILL.md +0 -241
  189. package/templates/.agent/skills/docker-expert/SKILL.md +0 -409
  190. package/templates/.agent/skills/game-development/2d-games/SKILL.md +0 -119
  191. package/templates/.agent/skills/game-development/3d-games/SKILL.md +0 -135
  192. package/templates/.agent/skills/game-development/SKILL.md +0 -167
  193. package/templates/.agent/skills/game-development/game-art/SKILL.md +0 -185
  194. package/templates/.agent/skills/game-development/game-audio/SKILL.md +0 -190
  195. package/templates/.agent/skills/game-development/game-design/SKILL.md +0 -129
  196. package/templates/.agent/skills/game-development/mobile-games/SKILL.md +0 -108
  197. package/templates/.agent/skills/game-development/multiplayer/SKILL.md +0 -132
  198. package/templates/.agent/skills/game-development/pc-games/SKILL.md +0 -144
  199. package/templates/.agent/skills/game-development/vr-ar/SKILL.md +0 -123
  200. package/templates/.agent/skills/game-development/web-games/SKILL.md +0 -150
  201. package/templates/.agent/skills/lint-and-validate/SKILL.md +0 -45
  202. package/templates/.agent/skills/lint-and-validate/scripts/lint_runner.py +0 -172
  203. package/templates/.agent/skills/lint-and-validate/scripts/type_coverage.py +0 -173
  204. package/templates/.agent/skills/mcp-builder/SKILL.md +0 -176
  205. package/templates/.agent/skills/nestjs-expert/SKILL.md +0 -552
  206. package/templates/.agent/skills/nextjs-best-practices/SKILL.md +0 -203
  207. package/templates/.agent/skills/nodejs-best-practices/SKILL.md +0 -333
  208. package/templates/.agent/skills/parallel-agents/SKILL.md +0 -175
  209. package/templates/.agent/skills/performance-profiling/SKILL.md +0 -143
  210. package/templates/.agent/skills/performance-profiling/scripts/lighthouse_audit.py +0 -76
  211. package/templates/.agent/skills/powershell-windows/SKILL.md +0 -167
  212. package/templates/.agent/skills/prisma-expert/SKILL.md +0 -355
  213. package/templates/.agent/skills/python-patterns/SKILL.md +0 -441
  214. package/templates/.agent/skills/react-patterns/SKILL.md +0 -198
  215. package/templates/.agent/skills/red-team-tactics/SKILL.md +0 -199
  216. package/templates/.agent/skills/server-management/SKILL.md +0 -161
  217. package/templates/.agent/skills/systematic-debugging/SKILL.md +0 -109
  218. package/templates/.agent/skills/tdd-workflow/SKILL.md +0 -149
  219. package/templates/.agent/skills/testing-patterns/SKILL.md +0 -178
  220. package/templates/.agent/skills/testing-patterns/scripts/test_runner.py +0 -219
  221. package/templates/.agent/skills/typescript-expert/SKILL.md +0 -429
  222. package/templates/.agent/skills/vue-expert/SKILL.md +0 -374
  223. package/templates/.agent/skills/vulnerability-scanner/SKILL.md +0 -276
  224. package/templates/.agent/skills/vulnerability-scanner/checklists.md +0 -121
  225. package/templates/.agent/skills/vulnerability-scanner/scripts/security_scan.py +0 -458
  226. package/templates/.agent/skills/webapp-testing/SKILL.md +0 -187
  227. package/templates/.agent/skills/webapp-testing/scripts/playwright_runner.py +0 -173
  228. package/templates/.agent/workflows/debug.md +0 -103
  229. package/templates/.agent/workflows/deploy.md +0 -176
  230. package/templates/.agent/workflows/enhance.md +0 -63
  231. package/templates/.agent/workflows/test.md +0 -144
@@ -0,0 +1,357 @@
1
+ # CJK Typography & Mixed-Script Guide
2
+
3
+ Rules for Chinese, Japanese, and Korean text in DOCX documents.
4
+
5
+ ## Table of Contents
6
+
7
+ 1. [Font Selection](#font-selection)
8
+ 2. [Font Size Names (CJK)](#font-size-names)
9
+ 3. [RunFonts Mapping](#runfonts-mapping)
10
+ 4. [Punctuation & Line Breaking](#punctuation--line-breaking)
11
+ 5. [Paragraph Indentation](#paragraph-indentation)
12
+ 6. [Line Spacing for CJK](#line-spacing)
13
+ 7. [Chinese Government Standard (GB/T 9704)](#gbt-9704)
14
+ 8. [Mixed CJK + Latin Best Practices](#mixed-script)
15
+ 9. [OpenXML Quick Reference](#openxml-quick-reference)
16
+
17
+ ---
18
+
19
+ ## Font Selection
20
+
21
+ ### Recommended CJK Fonts
22
+
23
+ | Language | Serif (正文) | Sans (标题) | Notes |
24
+ |----------|-------------|-------------|-------|
25
+ | **Simplified Chinese** | 宋体 (SimSun) | 微软雅黑 (Microsoft YaHei) | YaHei for screen, SimSun for print |
26
+ | **Simplified Chinese** | 仿宋 (FangSong) | 黑体 (SimHei) | Government documents |
27
+ | **Traditional Chinese** | 新細明體 (PMingLiU) | 微軟正黑體 (Microsoft JhengHei) | Taiwan standard |
28
+ | **Japanese** | MS 明朝 (MS Mincho) | MS ゴシック (MS Gothic) | Classic pairing |
29
+ | **Japanese** | 游明朝 (Yu Mincho) | 游ゴシック (Yu Gothic) | Modern, Windows 10+ |
30
+ | **Korean** | 바탕 (Batang) | 맑은 고딕 (Malgun Gothic) | Standard pairing |
31
+
32
+ ### Government Document Fonts (公文)
33
+
34
+ | Element | Font | Size |
35
+ |---------|------|------|
36
+ | 标题 (title) | 小标宋 (FZXiaoBiaoSong-B05S) | 二号 (22pt) |
37
+ | 一级标题 | 黑体 (SimHei) | 三号 (16pt) |
38
+ | 二级标题 | 楷体_GB2312 (KaiTi_GB2312) | 三号 (16pt) |
39
+ | 三级标题 | 仿宋_GB2312 加粗 | 三号 (16pt) |
40
+ | 正文 (body) | 仿宋_GB2312 (FangSong_GB2312) | 三号 (16pt) |
41
+ | 附注/页码 | 宋体 (SimSun) | 四号 (14pt) |
42
+
43
+ ---
44
+
45
+ ## Font Size Names
46
+
47
+ CJK uses named sizes. Map to points and `w:sz` half-point values:
48
+
49
+ | 字号 | Points | `w:sz` | Common Use |
50
+ |------|--------|--------|------------|
51
+ | 初号 | 42pt | 84 | Display title |
52
+ | 小初 | 36pt | 72 | Large title |
53
+ | 一号 | 26pt | 52 | Chapter heading |
54
+ | 小一 | 24pt | 48 | Major heading |
55
+ | 二号 | 22pt | 44 | Document title (公文) |
56
+ | 小二 | 18pt | 36 | Western H1 equivalent |
57
+ | 三号 | 16pt | 32 | CJK heading / 公文 body |
58
+ | 小三 | 15pt | 30 | Sub-heading |
59
+ | 四号 | 14pt | 28 | CJK subheading |
60
+ | 小四 | 12pt | 24 | Standard body (CJK) |
61
+ | 五号 | 10.5pt | 21 | Compact CJK body |
62
+ | 小五 | 9pt | 18 | Footnotes |
63
+ | 六号 | 7.5pt | 15 | Fine print |
64
+
65
+ ---
66
+
67
+ ## RunFonts Mapping
68
+
69
+ OpenXML uses four font slots to handle multilingual text:
70
+
71
+ ```xml
72
+ <w:rFonts
73
+ w:ascii="Calibri" <!-- Latin characters (U+0000–U+007F) -->
74
+ w:hAnsi="Calibri" <!-- Latin extended, Greek, Cyrillic -->
75
+ w:eastAsia="SimSun" <!-- CJK Unified Ideographs, Kana, Hangul -->
76
+ w:cs="Arial" <!-- Arabic, Hebrew, Thai, Devanagari -->
77
+ />
78
+ ```
79
+
80
+ **Word's character classification logic:**
81
+
82
+ 1. Character is in CJK range → uses `w:eastAsia` font
83
+ 2. Character is in complex script range → uses `w:cs` font
84
+ 3. Character is basic Latin (ASCII) → uses `w:ascii` font
85
+ 4. Everything else → uses `w:hAnsi` font
86
+
87
+ **Key**: `w:eastAsia` is the **only** way to set CJK fonts. Setting just `w:ascii` will NOT affect CJK characters. Mixed text within a single run auto-switches fonts at the character level — no need for separate runs.
88
+
89
+ ### Document Defaults
90
+
91
+ ```xml
92
+ <w:docDefaults>
93
+ <w:rPrDefault>
94
+ <w:rPr>
95
+ <w:rFonts w:ascii="Calibri" w:hAnsi="Calibri" w:eastAsia="SimSun" w:cs="Arial" />
96
+ <w:sz w:val="22" />
97
+ <w:szCs w:val="22" />
98
+ <w:lang w:val="en-US" w:eastAsia="zh-CN" />
99
+ </w:rPr>
100
+ </w:rPrDefault>
101
+ </w:docDefaults>
102
+ ```
103
+
104
+ `w:lang w:eastAsia` helps Word resolve ambiguous characters (e.g., punctuation shared between CJK and Latin).
105
+
106
+ ---
107
+
108
+ ## Punctuation & Line Breaking
109
+
110
+ ### Full-Width vs Half-Width
111
+
112
+ CJK text uses full-width punctuation:
113
+
114
+ | Type | CJK | Latin |
115
+ |------|-----|-------|
116
+ | Period | 。(U+3002) | . |
117
+ | Comma | ,(U+FF0C) 、(U+3001) | , |
118
+ | Colon | :(U+FF1A) | : |
119
+ | Semicolon | ;(U+FF1B) | ; |
120
+ | Quotes | 「」『』 or ""'' | "" '' |
121
+ | Parentheses | ()(U+FF08/09) | () |
122
+
123
+ In mixed text, use the punctuation style of the **surrounding language context**.
124
+
125
+ ### OpenXML Controls
126
+
127
+ ```xml
128
+ <w:pPr>
129
+ <w:adjustRightInd w:val="true" /> <!-- Adjust right indent for CJK punctuation -->
130
+ <w:snapToGrid w:val="true" /> <!-- Align to document grid -->
131
+ <w:kinsoku w:val="true" /> <!-- Enable CJK line breaking rules -->
132
+ <w:overflowPunct w:val="true" /> <!-- Allow punctuation to overflow margins -->
133
+ </w:pPr>
134
+ ```
135
+
136
+ ### Kinsoku Rules (禁則処理)
137
+
138
+ Prevents certain characters from appearing at the start or end of a line:
139
+ - **Cannot start a line**: `)」』】〉》。、,!?;:` and closing brackets
140
+ - **Cannot end a line**: `(「『【〈《` and opening brackets
141
+
142
+ Word applies these automatically when `w:kinsoku` is enabled.
143
+
144
+ ### Line Breaking
145
+
146
+ - CJK characters can break between **any two characters** (no word boundaries needed)
147
+ - Latin words within CJK text still follow word-boundary breaking
148
+ - `w:wordWrap w:val="false"` enables CJK-style breaking (break anywhere)
149
+
150
+ ---
151
+
152
+ ## Paragraph Indentation
153
+
154
+ ### Chinese Standard: 2-Character Indent
155
+
156
+ Chinese body text conventionally uses a 2-character first-line indent:
157
+
158
+ ```xml
159
+ <w:ind w:firstLineChars="200" /> <!-- 200 = 2 characters × 100 -->
160
+ ```
161
+
162
+ Preferred over `w:firstLine` with fixed DXA because `firstLineChars` scales with font size.
163
+
164
+ | Indent | Value |
165
+ |--------|-------|
166
+ | 1 character | `w:firstLineChars="100"` |
167
+ | 2 characters | `w:firstLineChars="200"` |
168
+ | 3 characters | `w:firstLineChars="300"` |
169
+
170
+ ---
171
+
172
+ ## Line Spacing
173
+
174
+ - CJK characters are taller than Latin characters at the same point size
175
+ - Default `1.0` line spacing may feel cramped with CJK text
176
+ - Recommended: `1.15–1.5` for mixed CJK+Latin, `1.0` with fixed 28pt for 公文
177
+
178
+ ### Auto Spacing
179
+
180
+ ```xml
181
+ <w:pPr>
182
+ <w:autoSpaceDE w:val="true"/> <!-- auto space between CJK and Latin -->
183
+ <w:autoSpaceDN w:val="true"/> <!-- auto space between CJK and numbers -->
184
+ </w:pPr>
185
+ ```
186
+
187
+ Adds ~¼ em spacing between CJK and non-CJK characters automatically. **Recommended: always enable.**
188
+
189
+ ---
190
+
191
+ ## GB/T 9704
192
+
193
+ Chinese government document standard (党政机关公文格式). These are **strict requirements**, not suggestions.
194
+
195
+ ### Page Setup
196
+
197
+ | Parameter | Value | OpenXML |
198
+ |-----------|-------|---------|
199
+ | Page size | A4 (210×297mm) | Width=11906, Height=16838 |
200
+ | Top margin | 37mm | 2098 DXA |
201
+ | Bottom margin | 35mm | 1984 DXA |
202
+ | Left margin | 28mm | 1588 DXA |
203
+ | Right margin | 26mm | 1474 DXA |
204
+ | Characters/line | 28 | |
205
+ | Lines/page | 22 | |
206
+ | Line spacing | Fixed 28pt | `line="560"` lineRule="exact" |
207
+
208
+ ### Document Structure
209
+
210
+ ```
211
+ ┌─────────────────────────────────┐
212
+ │ 发文机关标志 (红头) │ ← 小标宋 or 红色大字
213
+ │ ══════════════════ (红线) │ ← Red #FF0000, 2pt
214
+ ├─────────────────────────────────┤
215
+ │ 发文字号: X机发〔2025〕X号 │ ← 仿宋 三号, centered
216
+ │ │
217
+ │ 标题 (Title) │ ← 小标宋 二号, centered
218
+ │ │ 可分多行,回行居中
219
+ │ 主送机关: │ ← 仿宋 三号
220
+ │ │
221
+ │ 正文 (Body)... │ ← 仿宋_GB2312 三号
222
+ │ 一、一级标题 │ ← 黑体 三号
223
+ │ (一)二级标题 │ ← 楷体 三号
224
+ │ 1. 三级标题 │ ← 仿宋 三号 加粗
225
+ │ (1) 四级标题 │ ← 仿宋 三号
226
+ │ │
227
+ │ 附件: 1. xxx │ ← 仿宋 三号
228
+ │ │
229
+ │ 发文机关署名 │ ← 仿宋 三号
230
+ │ 成文日期 │ ← 仿宋 三号, 小写中文数字
231
+ ├─────────────────────────────────┤
232
+ │ ══════════════════ (版记线) │
233
+ │ 抄送: xxx │ ← 仿宋 四号
234
+ │ 印发机关及日期 │ ← 仿宋 四号
235
+ └─────────────────────────────────┘
236
+ ```
237
+
238
+ ### Numbering System
239
+
240
+ ```
241
+ 一、 ← 黑体 (SimHei), no indentation
242
+ (一) ← 楷体 (KaiTi), indented 2 chars
243
+ 1. ← 仿宋加粗 (FangSong Bold), indented 2 chars
244
+ (1) ← 仿宋 (FangSong), indented 2 chars
245
+ ```
246
+
247
+ ### Colors
248
+
249
+ | Element | Color | Requirement |
250
+ |---------|-------|-------------|
251
+ | All body text | Black #000000 | Mandatory |
252
+ | 红头 (agency name) | Red #FF0000 | Mandatory |
253
+ | 红线 (separator) | Red #FF0000 | Mandatory |
254
+ | 公章 (official seal) | Red | Mandatory |
255
+
256
+ ### Page Numbers
257
+
258
+ - Position: bottom center
259
+ - Format: `-X-` (dash-number-dash)
260
+ - Font: 宋体 四号 (SimSun 14pt, `sz="28"`)
261
+ - No page number on cover page if present
262
+
263
+ ---
264
+
265
+ ## Mixed Script
266
+
267
+ ### Font Size Harmony
268
+
269
+ CJK characters appear larger than Latin characters at the same point size. Compensation:
270
+
271
+ - If body is Calibri 11pt, pair with CJK at 11pt (same size — CJK looks slightly larger but acceptable)
272
+ - If precise visual match needed, CJK can be set 0.5–1pt smaller
273
+ - In practice, same point size is standard — don't over-optimize
274
+
275
+ ### Bold and Italic
276
+
277
+ - **Chinese/Japanese have no true italic.** Word synthesizes a slant which looks poor
278
+ - Use **bold** for emphasis in CJK text
279
+ - Use 着重号 (emphasis dots) for traditional emphasis: `<w:em w:val="dot"/>` on RunProperties
280
+
281
+ ---
282
+
283
+ ## OpenXML Quick Reference
284
+
285
+ ### Set EastAsia Font (C#)
286
+
287
+ ```csharp
288
+ new Run(
289
+ new RunProperties(
290
+ new RunFonts { EastAsia = "SimSun", Ascii = "Calibri", HighAnsi = "Calibri" },
291
+ new FontSize { Val = "32" } // 三号 = 16pt = sz 32
292
+ ),
293
+ new Text("这是正文内容")
294
+ );
295
+ ```
296
+
297
+ ### Document Defaults (C#)
298
+
299
+ ```csharp
300
+ new DocDefaults(new RunPropertiesDefault(new RunPropertiesBaseStyle(
301
+ new RunFonts {
302
+ Ascii = "Calibri", HighAnsi = "Calibri",
303
+ EastAsia = "Microsoft YaHei"
304
+ },
305
+ new Languages { Val = "en-US", EastAsia = "zh-CN" }
306
+ )));
307
+ ```
308
+
309
+ ### 公文 Style Definitions (C#)
310
+
311
+ ```csharp
312
+ // Title style — 小标宋 二号 centered
313
+ new Style(
314
+ new StyleName { Val = "GongWen Title" },
315
+ new BasedOn { Val = "Normal" },
316
+ new StyleRunProperties(
317
+ new RunFonts { EastAsia = "FZXiaoBiaoSong-B05S" },
318
+ new FontSize { Val = "44" }, // 二号 = 22pt
319
+ new Bold()
320
+ ),
321
+ new StyleParagraphProperties(
322
+ new Justification { Val = JustificationValues.Center },
323
+ new SpacingBetweenLines { Line = "560", LineRule = LineSpacingRuleValues.Exact }
324
+ )
325
+ ) { Type = StyleValues.Paragraph, StyleId = "GongWenTitle" };
326
+
327
+ // Body style — 仿宋_GB2312 三号
328
+ new Style(
329
+ new StyleName { Val = "GongWen Body" },
330
+ new StyleRunProperties(
331
+ new RunFonts { EastAsia = "FangSong_GB2312", Ascii = "FangSong_GB2312" },
332
+ new FontSize { Val = "32" } // 三号 = 16pt
333
+ ),
334
+ new StyleParagraphProperties(
335
+ new SpacingBetweenLines { Line = "560", LineRule = LineSpacingRuleValues.Exact }
336
+ )
337
+ ) { Type = StyleValues.Paragraph, StyleId = "GongWenBody" };
338
+ ```
339
+
340
+ ### Emphasis Dots (着重号)
341
+
342
+ ```csharp
343
+ new RunProperties(new Emphasis { Val = EmphasisMarkValues.Dot });
344
+ ```
345
+
346
+ ### East Asian Text Layout
347
+
348
+ ```xml
349
+ <!-- Snap to grid (align CJK chars to character grid) -->
350
+ <w:snapToGrid w:val="true"/>
351
+
352
+ <!-- Two-lines-in-one (双行合一) -->
353
+ <w:eastAsianLayout w:id="1" w:combine="true"/>
354
+
355
+ <!-- Vertical text in a cell -->
356
+ <w:textDirection w:val="tbRl"/>
357
+ ```
@@ -0,0 +1,184 @@
1
+ # Chinese University Thesis Template Guide (中国高校论文模板指南)
2
+
3
+ ## Why This Guide Exists
4
+
5
+ Chinese university thesis templates (.docx) have structural patterns that differ significantly
6
+ from Western templates. Agents that assume Western conventions (Heading1/Heading2/Normal) will
7
+ fail repeatedly. This guide documents the ACTUAL patterns found in Chinese templates.
8
+
9
+ ## Common StyleId Patterns
10
+
11
+ ### Pattern A: Numeric IDs (most common in Chinese Word templates)
12
+
13
+ | Style Purpose | styleId | w:name | w:basedOn |
14
+ |--------------|---------|--------|-----------|
15
+ | Normal body | `a` | "Normal" | — |
16
+ | Default paragraph font | `a0` | "Default Paragraph Font" | — |
17
+ | Heading 1 (章标题) | `1` | "heading 1" | `a` |
18
+ | Heading 2 (节标题) | `2` | "heading 2" | `a` |
19
+ | Heading 3 (小节标题) | `3` | "heading 3" | `a` |
20
+ | TOC 1 | `11` | "toc 1" | `a` |
21
+ | TOC 2 | `21` | "toc 2" | `a` |
22
+ | TOC 3 | `31` | "toc 3" | `a` |
23
+ | Header | `a3` | "header" | `a` |
24
+ | Footer | `a4` | "footer" | `a` |
25
+ | Table of Contents heading | `10` | "TOC Heading" | `1` |
26
+
27
+ ### Pattern B: English IDs (less common, usually from international templates)
28
+ Standard Heading1/Heading2/Heading3/Normal — these follow the Western pattern.
29
+
30
+ ### Pattern C: Mixed (some Chinese, some English)
31
+ Some templates define custom styles with Chinese names:
32
+ | Style Purpose | styleId | w:name |
33
+ |--------------|---------|--------|
34
+ | 论文标题 | `lunwenbiaoti` | "论文标题" |
35
+ | 章标题 | `zhangbiaoti` | "章标题" |
36
+ | 正文 | `zhengwen` | "正文" |
37
+
38
+ ### How to Identify Which Pattern
39
+
40
+ ```bash
41
+ # Extract all styleIds from the template
42
+ $CLI analyze --input template.docx --styles-only
43
+
44
+ # Or manually:
45
+ # unzip template.docx word/styles.xml
46
+ # Search for w:styleId= in the extracted file
47
+ ```
48
+
49
+ Look at the first few styleIds. If you see `1`, `2`, `3`, `a`, `a0` → Pattern A.
50
+ If you see `Heading1`, `Normal` → Pattern B.
51
+
52
+ ## Standard Thesis Structure
53
+
54
+ Chinese university theses follow a highly standardized structure:
55
+
56
+ ```
57
+ ┌─────────────────────────────────────┐
58
+ │ 封面 (Cover Page) │ ← Usually 1-2 pages
59
+ │ - 校名、校徽 │
60
+ │ - 论文题目 (title) │
61
+ │ - 作者、导师、院系、日期 │
62
+ ├─────────────────────────────────────┤
63
+ │ 学术诚信承诺书 / 独创性声明 │ ← 1 page
64
+ │ (Academic Integrity Declaration) │
65
+ ├─────────────────────────────────────┤
66
+ │ 中文摘要 (Chinese Abstract) │ ← 1-2 pages
67
+ │ - "摘 要" heading │
68
+ │ - Abstract body │
69
+ │ - "关键词:" line │
70
+ ├─────────────────────────────────────┤
71
+ │ 英文摘要 (English Abstract) │ ← 1-2 pages
72
+ │ - "ABSTRACT" heading │
73
+ │ - Abstract body │
74
+ │ - "Keywords:" line │
75
+ ├─────────────────────────────────────┤
76
+ │ 目录 (Table of Contents) │ ← 1-3 pages
77
+ │ - Often inside SDT block │
78
+ │ - Static example entries │
79
+ │ - TOC field code │
80
+ ├─────────────────────────────────────┤
81
+ │ 正文 (Body) │ ← Main content
82
+ │ 第1章 绪论 │
83
+ │ 1.1 研究背景 │
84
+ │ 1.2 研究目的和意义 │
85
+ │ 第2章 文献综述 │
86
+ │ ... │
87
+ │ 第N章 结论与展望 │
88
+ ├─────────────────────────────────────┤
89
+ │ 参考文献 (References) │ ← Styled differently
90
+ ├─────────────────────────────────────┤
91
+ │ 致谢 (Acknowledgments) │ ← Optional
92
+ ├─────────────────────────────────────┤
93
+ │ 附录 (Appendices) │ ← Optional
94
+ └─────────────────────────────────────┘
95
+ ```
96
+
97
+ ## Identifying Zone Boundaries in Templates
98
+
99
+ Templates contain EXAMPLE content that must be replaced. Here's how to find the zones:
100
+
101
+ ### Zone A (Front matter) — KEEP from template
102
+ - Starts at: paragraph 0
103
+ - Ends at: the paragraph BEFORE the first chapter heading
104
+ - Contains: cover, declaration, abstracts, TOC
105
+ - How to detect end: search for first paragraph with style `1` (or Heading1) containing "第1章" or "绪论"
106
+
107
+ ### Zone B (Body content) — REPLACE with user content
108
+ - Starts at: first chapter heading ("第1章...")
109
+ - Ends at: "参考文献" heading (inclusive) or last body paragraph before acknowledgments
110
+ - How to detect:
111
+ ```python
112
+ for i, el in enumerate(body_elements):
113
+ text = get_text(el)
114
+ style = get_style(el)
115
+ if style in ('1', 'Heading1') and ('第1章' in text or '绪论' in text):
116
+ zone_b_start = i
117
+ if '参考文献' in text:
118
+ zone_b_end = i
119
+ ```
120
+
121
+ ### Zone C (Back matter) — KEEP from template (or remove)
122
+ - Starts after: 参考文献
123
+ - Contains: 致谢, 附录, final sectPr
124
+
125
+ ## Font Expectations in Chinese Thesis Templates
126
+
127
+ | Element | Font | Size (字号) | Size (pt) | w:sz |
128
+ |---------|------|------------|-----------|------|
129
+ | 论文标题 | 华文中宋 or 黑体 | 二号 or 小二 | 22pt or 18pt | 44 or 36 |
130
+ | 章标题 (H1) | 黑体 | 三号 | 16pt | 32 |
131
+ | 节标题 (H2) | 黑体 | 四号 | 14pt | 28 |
132
+ | 小节标题 (H3) | 黑体 | 小四 | 12pt | 24 |
133
+ | 正文 | 宋体 | 小四 | 12pt | 24 |
134
+ | 页眉 | 宋体 | 五号 | 10.5pt | 21 |
135
+ | 页脚/页码 | 宋体 | 五号 | 10.5pt | 21 |
136
+ | 表格内容 | 宋体 | 五号 | 10.5pt | 21 |
137
+ | 参考文献条目 | 宋体 | 五号 | 10.5pt | 21 |
138
+
139
+ ## RunFonts for CJK Body Text
140
+
141
+ ```xml
142
+ <w:rFonts w:ascii="Times New Roman" w:hAnsi="Times New Roman"
143
+ w:eastAsia="宋体" w:cs="Times New Roman"/>
144
+ ```
145
+
146
+ For headings:
147
+ ```xml
148
+ <w:rFonts w:ascii="Times New Roman" w:hAnsi="Times New Roman"
149
+ w:eastAsia="黑体" w:cs="Times New Roman"/>
150
+ ```
151
+
152
+ IMPORTANT: When cleaning direct formatting, ALWAYS preserve w:eastAsia.
153
+ Removing it causes Chinese text to fall back to the wrong font.
154
+
155
+ ## Common Mistakes with Chinese Templates
156
+
157
+ 1. **Searching for `Heading1`** — Chinese templates use `1`, not `Heading1`
158
+ 2. **Clearing all rFonts** — Must keep eastAsia font declarations
159
+ 3. **Assuming "第1章" is the first paragraph** — It's typically paragraph 100+ after cover/abstract/TOC
160
+ 4. **Ignoring SDT blocks in TOC** — The TOC is wrapped in an SDT, not just field codes
161
+ 5. **Wrong line spacing** — Chinese theses typically use fixed 20pt (line="400") or 22pt (line="440"), not the 28pt used in government documents
162
+ 6. **Missing section breaks** — Each zone (abstract, TOC, body) usually has its own sectPr for different headers/footers
163
+
164
+ ## Style Mapping Quick Reference
165
+
166
+ When source document uses Western IDs and template uses Chinese numeric IDs:
167
+
168
+ ```json
169
+ {
170
+ "Heading1": "1",
171
+ "Heading2": "2",
172
+ "Heading3": "3",
173
+ "Heading4": "3",
174
+ "Normal": "a",
175
+ "BodyText": "a",
176
+ "ListParagraph": "a",
177
+ "Caption": "a",
178
+ "TOC1": "11",
179
+ "TOC2": "21",
180
+ "TOC3": "31"
181
+ }
182
+ ```
183
+
184
+ When source uses Chinese numeric IDs and template uses Western IDs — reverse the mapping.