@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.
- package/README.md +130 -78
- package/package.json +4 -3
- package/templates/.agent/skills/marketing-report-expert/SKILL.md +70 -0
- package/templates/.agent/skills/minimax-docx/LICENSE +21 -0
- package/templates/.agent/skills/minimax-docx/SKILL.md +274 -0
- package/templates/.agent/skills/minimax-docx/assets/styles/academic_styles.xml +250 -0
- package/templates/.agent/skills/minimax-docx/assets/styles/corporate_styles.xml +284 -0
- package/templates/.agent/skills/minimax-docx/assets/styles/default_styles.xml +449 -0
- package/templates/.agent/skills/minimax-docx/assets/xsd/aesthetic-rules.xsd +470 -0
- package/templates/.agent/skills/minimax-docx/assets/xsd/business-rules.xsd +130 -0
- package/templates/.agent/skills/minimax-docx/assets/xsd/common-types.xsd +159 -0
- package/templates/.agent/skills/minimax-docx/assets/xsd/wml-subset.xsd +589 -0
- package/templates/.agent/skills/minimax-docx/references/cjk_typography.md +357 -0
- package/templates/.agent/skills/minimax-docx/references/cjk_university_template_guide.md +184 -0
- package/templates/.agent/skills/minimax-docx/references/comments_guide.md +191 -0
- package/templates/.agent/skills/minimax-docx/references/design_good_bad_examples.md +829 -0
- package/templates/.agent/skills/minimax-docx/references/design_principles.md +819 -0
- package/templates/.agent/skills/minimax-docx/references/openxml_element_order.md +308 -0
- package/templates/.agent/skills/minimax-docx/references/openxml_encyclopedia_part1.md +4061 -0
- package/templates/.agent/skills/minimax-docx/references/openxml_encyclopedia_part2.md +2820 -0
- package/templates/.agent/skills/minimax-docx/references/openxml_encyclopedia_part3.md +3381 -0
- package/templates/.agent/skills/minimax-docx/references/openxml_namespaces.md +82 -0
- package/templates/.agent/skills/minimax-docx/references/openxml_units.md +72 -0
- package/templates/.agent/skills/minimax-docx/references/scenario_a_create.md +284 -0
- package/templates/.agent/skills/minimax-docx/references/scenario_b_edit_content.md +295 -0
- package/templates/.agent/skills/minimax-docx/references/scenario_c_apply_template.md +456 -0
- package/templates/.agent/skills/minimax-docx/references/track_changes_guide.md +200 -0
- package/templates/.agent/skills/minimax-docx/references/troubleshooting.md +506 -0
- package/templates/.agent/skills/minimax-docx/references/typography_guide.md +294 -0
- package/templates/.agent/skills/minimax-docx/references/xsd_validation_guide.md +158 -0
- package/templates/.agent/skills/minimax-docx/scripts/doc_to_docx.sh +40 -0
- package/templates/.agent/skills/minimax-docx/scripts/docx_preview.sh +37 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Cli/MiniMaxAIDocx.Cli.csproj +19 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Cli/Program.cs +18 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Commands/AnalyzeCommand.cs +147 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Commands/ApplyTemplateCommand.cs +322 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Commands/CreateCommand.cs +324 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Commands/DiffCommand.cs +155 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Commands/EditContentCommand.cs +487 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Commands/FixOrderCommand.cs +108 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Commands/MergeRunsCommand.cs +122 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Commands/ValidateCommand.cs +107 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/MiniMaxAIDocx.Core.csproj +15 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/OpenXml/CommentSynchronizer.cs +169 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/OpenXml/ElementOrder.cs +80 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/OpenXml/NamespaceConstants.cs +42 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/OpenXml/RunMerger.cs +81 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/OpenXml/StyleAnalyzer.cs +81 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/OpenXml/TrackChangesHelper.cs +99 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/OpenXml/UnitConverter.cs +23 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/AestheticRecipeSamples.cs +1832 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/AestheticRecipeSamples_Batch1.cs +910 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/AestheticRecipeSamples_Batch2.cs +999 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/AestheticRecipeSamples_Batch3.cs +1048 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/AestheticRecipeSamples_Batch4.cs +1038 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/CharacterFormattingSamples.cs +1020 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/DocumentCreationSamples.cs +1121 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/FieldAndTocSamples.cs +624 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/FootnoteAndCommentSamples.cs +675 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/HeaderFooterSamples.cs +838 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/ImageSamples.cs +917 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/ListAndNumberingSamples.cs +826 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/ParagraphFormattingSamples.cs +1199 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/StyleSystemSamples.cs +1487 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/TableSamples.cs +1163 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/TrackChangesSamples.cs +595 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Typography/CjkHelper.cs +39 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Typography/FontDefaults.cs +24 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Typography/PageSizes.cs +20 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Validation/BusinessRuleValidator.cs +224 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Validation/GateCheckValidator.cs +148 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Validation/ValidationResult.cs +23 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Validation/XsdValidator.cs +69 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.slnx +4 -0
- package/templates/.agent/skills/minimax-docx/scripts/env_check.sh +196 -0
- package/templates/.agent/skills/minimax-docx/scripts/setup.ps1 +274 -0
- package/templates/.agent/skills/minimax-docx/scripts/setup.sh +504 -0
- package/templates/.agent/skills/minimax-multimodal-toolkit/SKILL.md +359 -0
- package/templates/.agent/skills/minimax-pdf/README.md +222 -0
- package/templates/.agent/skills/minimax-pdf/SKILL.md +201 -0
- package/templates/.agent/skills/minimax-pdf/design/design.md +381 -0
- package/templates/.agent/skills/minimax-pdf/scripts/cover.py +1579 -0
- package/templates/.agent/skills/minimax-pdf/scripts/fill_inspect.py +200 -0
- package/templates/.agent/skills/minimax-pdf/scripts/fill_write.py +242 -0
- package/templates/.agent/skills/minimax-pdf/scripts/make.sh +491 -0
- package/templates/.agent/skills/minimax-pdf/scripts/merge.py +112 -0
- package/templates/.agent/skills/minimax-pdf/scripts/palette.py +559 -0
- package/templates/.agent/skills/minimax-pdf/scripts/reformat_parse.py +374 -0
- package/templates/.agent/skills/minimax-pdf/scripts/render_body.py +1055 -0
- package/templates/.agent/skills/minimax-pdf/scripts/render_cover.cjs +111 -0
- package/templates/.agent/skills/minimax-xlsx/SKILL.md +138 -0
- package/templates/.agent/skills/minimax-xlsx/references/create.md +691 -0
- package/templates/.agent/skills/minimax-xlsx/references/edit.md +684 -0
- package/templates/.agent/skills/minimax-xlsx/references/fix.md +37 -0
- package/templates/.agent/skills/minimax-xlsx/references/format.md +768 -0
- package/templates/.agent/skills/minimax-xlsx/references/ooxml-cheatsheet.md +231 -0
- package/templates/.agent/skills/minimax-xlsx/references/read-analyze.md +97 -0
- package/templates/.agent/skills/minimax-xlsx/references/validate.md +772 -0
- package/templates/.agent/skills/minimax-xlsx/scripts/formula_check.py +422 -0
- package/templates/.agent/skills/minimax-xlsx/scripts/libreoffice_recalc.py +248 -0
- package/templates/.agent/skills/minimax-xlsx/scripts/shared_strings_builder.py +163 -0
- package/templates/.agent/skills/minimax-xlsx/scripts/style_audit.py +575 -0
- package/templates/.agent/skills/minimax-xlsx/scripts/xlsx_add_column.py +395 -0
- package/templates/.agent/skills/minimax-xlsx/scripts/xlsx_insert_row.py +274 -0
- package/templates/.agent/skills/minimax-xlsx/scripts/xlsx_pack.py +87 -0
- package/templates/.agent/skills/minimax-xlsx/scripts/xlsx_reader.py +362 -0
- package/templates/.agent/skills/minimax-xlsx/scripts/xlsx_shift_rows.py +396 -0
- package/templates/.agent/skills/minimax-xlsx/scripts/xlsx_unpack.py +130 -0
- package/templates/.agent/skills/minimax-xlsx/templates/minimal_xlsx/[Content_Types].xml +9 -0
- package/templates/.agent/skills/minimax-xlsx/templates/minimal_xlsx/_rels/.rels +6 -0
- package/templates/.agent/skills/minimax-xlsx/templates/minimal_xlsx/xl/_rels/workbook.xml.rels +19 -0
- package/templates/.agent/skills/minimax-xlsx/templates/minimal_xlsx/xl/sharedStrings.xml +33 -0
- package/templates/.agent/skills/minimax-xlsx/templates/minimal_xlsx/xl/styles.xml +160 -0
- package/templates/.agent/skills/minimax-xlsx/templates/minimal_xlsx/xl/workbook.xml +30 -0
- package/templates/.agent/skills/minimax-xlsx/templates/minimal_xlsx/xl/worksheets/sheet1.xml +70 -0
- package/templates/.agent/skills/pptx-generator/SKILL.md +249 -0
- package/templates/.agent/skills/pptx-generator/references/design-system.md +392 -0
- package/templates/.agent/skills/pptx-generator/references/editing.md +162 -0
- package/templates/.agent/skills/pptx-generator/references/pitfalls.md +112 -0
- package/templates/.agent/skills/pptx-generator/references/pptxgenjs.md +420 -0
- package/templates/.agent/skills/pptx-generator/references/slide-types.md +413 -0
- package/templates/.agent/skills/tutorial-video-expert/SKILL.md +88 -0
- package/templates/.agent/skills/ui-ux-pro-max/SKILL.md +170 -585
- package/templates/.agent/skills/vision-analysis/SKILL.md +174 -0
- package/templates/.agent/workflows/analyze.md +3 -0
- package/templates/.agent/workflows/brand-report.md +44 -0
- package/templates/.agent/workflows/report.md +49 -0
- package/templates/.agent/agents/backend-specialist.md +0 -263
- package/templates/.agent/agents/database-architect.md +0 -226
- package/templates/.agent/agents/debugger.md +0 -225
- package/templates/.agent/agents/devops-engineer.md +0 -242
- package/templates/.agent/agents/frontend-specialist.md +0 -527
- package/templates/.agent/agents/game-developer.md +0 -162
- package/templates/.agent/agents/mobile-developer.md +0 -377
- package/templates/.agent/agents/penetration-tester.md +0 -188
- package/templates/.agent/agents/security-auditor.md +0 -170
- package/templates/.agent/agents/test-engineer.md +0 -158
- package/templates/.agent/skills/api-patterns/SKILL.md +0 -81
- package/templates/.agent/skills/api-patterns/api-style.md +0 -42
- package/templates/.agent/skills/api-patterns/auth.md +0 -24
- package/templates/.agent/skills/api-patterns/documentation.md +0 -26
- package/templates/.agent/skills/api-patterns/graphql.md +0 -41
- package/templates/.agent/skills/api-patterns/rate-limiting.md +0 -31
- package/templates/.agent/skills/api-patterns/response.md +0 -37
- package/templates/.agent/skills/api-patterns/rest.md +0 -40
- package/templates/.agent/skills/api-patterns/scripts/api_validator.py +0 -211
- package/templates/.agent/skills/api-patterns/security-testing.md +0 -122
- package/templates/.agent/skills/api-patterns/trpc.md +0 -41
- package/templates/.agent/skills/api-patterns/versioning.md +0 -22
- package/templates/.agent/skills/app-builder/SKILL.md +0 -75
- package/templates/.agent/skills/app-builder/agent-coordination.md +0 -71
- package/templates/.agent/skills/app-builder/feature-building.md +0 -53
- package/templates/.agent/skills/app-builder/project-detection.md +0 -34
- package/templates/.agent/skills/app-builder/scaffolding.md +0 -118
- package/templates/.agent/skills/app-builder/tech-stack.md +0 -40
- package/templates/.agent/skills/app-builder/templates/SKILL.md +0 -39
- package/templates/.agent/skills/app-builder/templates/astro-static/TEMPLATE.md +0 -76
- package/templates/.agent/skills/app-builder/templates/chrome-extension/TEMPLATE.md +0 -92
- package/templates/.agent/skills/app-builder/templates/cli-tool/TEMPLATE.md +0 -88
- package/templates/.agent/skills/app-builder/templates/electron-desktop/TEMPLATE.md +0 -88
- package/templates/.agent/skills/app-builder/templates/express-api/TEMPLATE.md +0 -83
- package/templates/.agent/skills/app-builder/templates/flutter-app/TEMPLATE.md +0 -90
- package/templates/.agent/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +0 -90
- package/templates/.agent/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +0 -82
- package/templates/.agent/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +0 -100
- package/templates/.agent/skills/app-builder/templates/nextjs-static/TEMPLATE.md +0 -106
- package/templates/.agent/skills/app-builder/templates/nuxt-app/TEMPLATE.md +0 -101
- package/templates/.agent/skills/app-builder/templates/python-fastapi/TEMPLATE.md +0 -83
- package/templates/.agent/skills/app-builder/templates/react-native-app/TEMPLATE.md +0 -93
- package/templates/.agent/skills/architecture/SKILL.md +0 -55
- package/templates/.agent/skills/architecture/context-discovery.md +0 -43
- package/templates/.agent/skills/architecture/examples.md +0 -94
- package/templates/.agent/skills/architecture/pattern-selection.md +0 -68
- package/templates/.agent/skills/architecture/patterns-reference.md +0 -50
- package/templates/.agent/skills/architecture/trade-off-analysis.md +0 -77
- package/templates/.agent/skills/bash-linux/SKILL.md +0 -199
- package/templates/.agent/skills/behavioral-modes/SKILL.md +0 -242
- package/templates/.agent/skills/clean-code/SKILL.md +0 -201
- package/templates/.agent/skills/code-review-checklist/SKILL.md +0 -109
- package/templates/.agent/skills/database-design/SKILL.md +0 -52
- package/templates/.agent/skills/database-design/database-selection.md +0 -43
- package/templates/.agent/skills/database-design/indexing.md +0 -39
- package/templates/.agent/skills/database-design/migrations.md +0 -48
- package/templates/.agent/skills/database-design/optimization.md +0 -36
- package/templates/.agent/skills/database-design/orm-selection.md +0 -30
- package/templates/.agent/skills/database-design/schema-design.md +0 -56
- package/templates/.agent/skills/database-design/scripts/schema_validator.py +0 -172
- package/templates/.agent/skills/deployment-procedures/SKILL.md +0 -241
- package/templates/.agent/skills/docker-expert/SKILL.md +0 -409
- package/templates/.agent/skills/game-development/2d-games/SKILL.md +0 -119
- package/templates/.agent/skills/game-development/3d-games/SKILL.md +0 -135
- package/templates/.agent/skills/game-development/SKILL.md +0 -167
- package/templates/.agent/skills/game-development/game-art/SKILL.md +0 -185
- package/templates/.agent/skills/game-development/game-audio/SKILL.md +0 -190
- package/templates/.agent/skills/game-development/game-design/SKILL.md +0 -129
- package/templates/.agent/skills/game-development/mobile-games/SKILL.md +0 -108
- package/templates/.agent/skills/game-development/multiplayer/SKILL.md +0 -132
- package/templates/.agent/skills/game-development/pc-games/SKILL.md +0 -144
- package/templates/.agent/skills/game-development/vr-ar/SKILL.md +0 -123
- package/templates/.agent/skills/game-development/web-games/SKILL.md +0 -150
- package/templates/.agent/skills/lint-and-validate/SKILL.md +0 -45
- package/templates/.agent/skills/lint-and-validate/scripts/lint_runner.py +0 -172
- package/templates/.agent/skills/lint-and-validate/scripts/type_coverage.py +0 -173
- package/templates/.agent/skills/mcp-builder/SKILL.md +0 -176
- package/templates/.agent/skills/nestjs-expert/SKILL.md +0 -552
- package/templates/.agent/skills/nextjs-best-practices/SKILL.md +0 -203
- package/templates/.agent/skills/nodejs-best-practices/SKILL.md +0 -333
- package/templates/.agent/skills/parallel-agents/SKILL.md +0 -175
- package/templates/.agent/skills/performance-profiling/SKILL.md +0 -143
- package/templates/.agent/skills/performance-profiling/scripts/lighthouse_audit.py +0 -76
- package/templates/.agent/skills/powershell-windows/SKILL.md +0 -167
- package/templates/.agent/skills/prisma-expert/SKILL.md +0 -355
- package/templates/.agent/skills/python-patterns/SKILL.md +0 -441
- package/templates/.agent/skills/react-patterns/SKILL.md +0 -198
- package/templates/.agent/skills/red-team-tactics/SKILL.md +0 -199
- package/templates/.agent/skills/server-management/SKILL.md +0 -161
- package/templates/.agent/skills/systematic-debugging/SKILL.md +0 -109
- package/templates/.agent/skills/tdd-workflow/SKILL.md +0 -149
- package/templates/.agent/skills/testing-patterns/SKILL.md +0 -178
- package/templates/.agent/skills/testing-patterns/scripts/test_runner.py +0 -219
- package/templates/.agent/skills/typescript-expert/SKILL.md +0 -429
- package/templates/.agent/skills/vue-expert/SKILL.md +0 -374
- package/templates/.agent/skills/vulnerability-scanner/SKILL.md +0 -276
- package/templates/.agent/skills/vulnerability-scanner/checklists.md +0 -121
- package/templates/.agent/skills/vulnerability-scanner/scripts/security_scan.py +0 -458
- package/templates/.agent/skills/webapp-testing/SKILL.md +0 -187
- package/templates/.agent/skills/webapp-testing/scripts/playwright_runner.py +0 -173
- package/templates/.agent/workflows/debug.md +0 -103
- package/templates/.agent/workflows/deploy.md +0 -176
- package/templates/.agent/workflows/enhance.md +0 -63
- package/templates/.agent/workflows/test.md +0 -144
|
@@ -0,0 +1,1048 @@
|
|
|
1
|
+
// ============================================================================
|
|
2
|
+
// AestheticRecipeSamples_Batch3.cs — Recipes 10-11: Academic style guides
|
|
3
|
+
// ============================================================================
|
|
4
|
+
// Recipe 10: Chicago/Turabian (humanities dissertations, history papers)
|
|
5
|
+
// Recipe 11: Springer LNCS (computer science conference proceedings)
|
|
6
|
+
// ============================================================================
|
|
7
|
+
|
|
8
|
+
using DocumentFormat.OpenXml;
|
|
9
|
+
using DocumentFormat.OpenXml.Packaging;
|
|
10
|
+
using DocumentFormat.OpenXml.Wordprocessing;
|
|
11
|
+
|
|
12
|
+
using WpPageSize = DocumentFormat.OpenXml.Wordprocessing.PageSize;
|
|
13
|
+
|
|
14
|
+
namespace MiniMaxAIDocx.Core.Samples;
|
|
15
|
+
|
|
16
|
+
public static partial class AestheticRecipeSamples
|
|
17
|
+
{
|
|
18
|
+
// ════════════════════════════════════════════════════════════════════════
|
|
19
|
+
// RECIPE 10: CHICAGO / TURABIAN
|
|
20
|
+
// ════════════════════════════════════════════════════════════════════════
|
|
21
|
+
|
|
22
|
+
/// <summary>
|
|
23
|
+
/// Recipe: Chicago/Turabian Academic Document
|
|
24
|
+
/// Source: Turabian 9th edition (2018), Chicago Manual of Style 17th edition.
|
|
25
|
+
/// Best for: Humanities dissertations, history papers, theology, philosophy.
|
|
26
|
+
///
|
|
27
|
+
/// Design rationale:
|
|
28
|
+
/// - Times New Roman 12pt: standard for all Turabian submissions.
|
|
29
|
+
/// - Double spacing (line=480) throughout body text, as required by Turabian 9th ed. A.1.
|
|
30
|
+
/// - First-line indent 0.5in (720 DXA): Turabian A.1.3 — paragraphs separated by
|
|
31
|
+
/// indentation, not extra spacing.
|
|
32
|
+
/// - Left margin 1.5in (2160 DXA) for binding; all others 1in (1440 DXA):
|
|
33
|
+
/// Turabian A.1.1 specifies 1in minimum on all sides, 1.5in left for binding.
|
|
34
|
+
/// - Heading hierarchy (Turabian A.2.2):
|
|
35
|
+
/// H1: Centered, Bold, Title Case (first-level subheading)
|
|
36
|
+
/// H2: Centered, Regular (not bold), Title Case — this is the distinctive
|
|
37
|
+
/// Turabian feature: an unbold centered heading.
|
|
38
|
+
/// H3: Flush Left, Bold, Title Case
|
|
39
|
+
/// H4: Flush Left, Regular (not bold), Title Case
|
|
40
|
+
/// H5: Indented, Bold, run-in with period, sentence case (run-in = inline with text)
|
|
41
|
+
/// All headings are 12pt — the same size as body text.
|
|
42
|
+
/// - Page numbers: centered at bottom of page (Turabian A.1.5).
|
|
43
|
+
/// - Footnotes: 10pt (sz=20), single-spaced within, double-spaced between.
|
|
44
|
+
/// Turabian uses footnotes (not endnotes) as the primary citation system.
|
|
45
|
+
/// - Block quotes: indented 0.5in from left margin, single-spaced within,
|
|
46
|
+
/// used for quotations of 5+ lines (Turabian 25.2.2).
|
|
47
|
+
/// </summary>
|
|
48
|
+
public static void CreateChicagoTurabianDocument(string outputPath)
|
|
49
|
+
{
|
|
50
|
+
using var doc = WordprocessingDocument.Create(outputPath, WordprocessingDocumentType.Document);
|
|
51
|
+
|
|
52
|
+
var mainPart = doc.AddMainDocumentPart();
|
|
53
|
+
mainPart.Document = new Document(new Body());
|
|
54
|
+
var body = mainPart.Document.Body!;
|
|
55
|
+
|
|
56
|
+
// ── Styles ──
|
|
57
|
+
var stylesPart = mainPart.AddNewPart<StyleDefinitionsPart>();
|
|
58
|
+
stylesPart.Styles = new Styles();
|
|
59
|
+
var styles = stylesPart.Styles;
|
|
60
|
+
|
|
61
|
+
// DocDefaults: Times New Roman 12pt, double spacing, first-line indent
|
|
62
|
+
styles.Append(new DocDefaults(
|
|
63
|
+
new RunPropertiesDefault(
|
|
64
|
+
new RunPropertiesBaseStyle(
|
|
65
|
+
new RunFonts
|
|
66
|
+
{
|
|
67
|
+
Ascii = "Times New Roman",
|
|
68
|
+
HighAnsi = "Times New Roman",
|
|
69
|
+
EastAsia = "SimSun",
|
|
70
|
+
ComplexScript = "Times New Roman"
|
|
71
|
+
},
|
|
72
|
+
new FontSize { Val = "24" }, // 12pt (half-points)
|
|
73
|
+
new FontSizeComplexScript { Val = "24" },
|
|
74
|
+
new Color { Val = "000000" },
|
|
75
|
+
new Languages { Val = "en-US", EastAsia = "zh-CN" }
|
|
76
|
+
)
|
|
77
|
+
),
|
|
78
|
+
new ParagraphPropertiesDefault(
|
|
79
|
+
new ParagraphPropertiesBaseStyle(
|
|
80
|
+
new SpacingBetweenLines
|
|
81
|
+
{
|
|
82
|
+
// Double spacing: 480 = 2.0x (240 = single)
|
|
83
|
+
// Required throughout by Turabian A.1.2
|
|
84
|
+
Line = "480",
|
|
85
|
+
LineRule = LineSpacingRuleValues.Auto,
|
|
86
|
+
After = "0" // No space after — indent separates paragraphs
|
|
87
|
+
},
|
|
88
|
+
// First-line indent: 0.5in = 720 DXA (Turabian A.1.3)
|
|
89
|
+
new Indentation { FirstLine = "720" }
|
|
90
|
+
)
|
|
91
|
+
)
|
|
92
|
+
));
|
|
93
|
+
|
|
94
|
+
// ── Normal style ──
|
|
95
|
+
styles.Append(CreateParagraphStyle(
|
|
96
|
+
styleId: "Normal",
|
|
97
|
+
styleName: "Normal",
|
|
98
|
+
isDefault: true,
|
|
99
|
+
uiPriority: 0
|
|
100
|
+
));
|
|
101
|
+
|
|
102
|
+
// ── Heading 1: 12pt Bold, Centered, Title Case ──
|
|
103
|
+
// Turabian first-level subheading: centered and bold
|
|
104
|
+
styles.Append(CreateAcademicHeadingStyle(
|
|
105
|
+
level: 1,
|
|
106
|
+
sizeHalfPts: "24", // 12pt — same as body
|
|
107
|
+
bold: true,
|
|
108
|
+
italic: false,
|
|
109
|
+
centered: true,
|
|
110
|
+
spaceBefore: "480", // One blank double-spaced line before
|
|
111
|
+
spaceAfter: "0"
|
|
112
|
+
));
|
|
113
|
+
|
|
114
|
+
// ── Heading 2: 12pt Regular (NOT bold), Centered, Title Case ──
|
|
115
|
+
// Turabian second-level subheading: centered but NOT bold.
|
|
116
|
+
// This is the distinctive Turabian feature — an unbold centered heading.
|
|
117
|
+
// It contrasts with APA which makes all centered headings bold.
|
|
118
|
+
styles.Append(CreateAcademicHeadingStyle(
|
|
119
|
+
level: 2,
|
|
120
|
+
sizeHalfPts: "24", // 12pt — same as body
|
|
121
|
+
bold: false, // NOT bold — distinctive Turabian feature
|
|
122
|
+
italic: false,
|
|
123
|
+
centered: true,
|
|
124
|
+
spaceBefore: "480",
|
|
125
|
+
spaceAfter: "0"
|
|
126
|
+
));
|
|
127
|
+
|
|
128
|
+
// ── Heading 3: 12pt Bold, Flush Left, Title Case ──
|
|
129
|
+
// Turabian third-level subheading: flush left and bold
|
|
130
|
+
styles.Append(CreateAcademicHeadingStyle(
|
|
131
|
+
level: 3,
|
|
132
|
+
sizeHalfPts: "24", // 12pt — same as body
|
|
133
|
+
bold: true,
|
|
134
|
+
italic: false,
|
|
135
|
+
centered: false,
|
|
136
|
+
spaceBefore: "480",
|
|
137
|
+
spaceAfter: "0"
|
|
138
|
+
));
|
|
139
|
+
|
|
140
|
+
// ── Heading 4: 12pt Regular (NOT bold), Flush Left, Title Case ──
|
|
141
|
+
// Turabian fourth-level subheading: flush left, not bold
|
|
142
|
+
styles.Append(CreateAcademicHeadingStyle(
|
|
143
|
+
level: 4,
|
|
144
|
+
sizeHalfPts: "24", // 12pt — same as body
|
|
145
|
+
bold: false, // NOT bold
|
|
146
|
+
italic: false,
|
|
147
|
+
centered: false,
|
|
148
|
+
spaceBefore: "480",
|
|
149
|
+
spaceAfter: "0"
|
|
150
|
+
));
|
|
151
|
+
|
|
152
|
+
// ── Heading 5 style: 12pt Bold, Indented, run-in with period ──
|
|
153
|
+
// Turabian fifth-level: indented like a paragraph, bold, followed by a period,
|
|
154
|
+
// then the text runs in on the same line. We approximate with a style
|
|
155
|
+
// that has the indent but the run-in behavior is manual.
|
|
156
|
+
styles.Append(CreateTurabianHeading5Style());
|
|
157
|
+
|
|
158
|
+
// ── Block Quote style ──
|
|
159
|
+
// Turabian 25.2.2: quotations of 5+ lines are block-quoted.
|
|
160
|
+
// Indented 0.5in from left margin, single-spaced within.
|
|
161
|
+
styles.Append(CreateTurabianBlockQuoteStyle());
|
|
162
|
+
|
|
163
|
+
// ── Caption style ──
|
|
164
|
+
styles.Append(CreateCaptionStyle(
|
|
165
|
+
fontSizeHalfPts: "24", // 12pt — same as body
|
|
166
|
+
color: "000000",
|
|
167
|
+
italic: false
|
|
168
|
+
));
|
|
169
|
+
|
|
170
|
+
// ── Page setup: US Letter, 1in margins except 1.5in left for binding ──
|
|
171
|
+
// Turabian A.1.1: at least 1in on all sides, left may be 1.5in for binding
|
|
172
|
+
var sectPr = new SectionProperties(
|
|
173
|
+
new WpPageSize { Width = 12240U, Height = 15840U },
|
|
174
|
+
new PageMargin
|
|
175
|
+
{
|
|
176
|
+
Top = 1440, Bottom = 1440, // 1in
|
|
177
|
+
Left = 2160U, // 1.5in for binding
|
|
178
|
+
Right = 1440U, // 1in
|
|
179
|
+
Header = 720U, Footer = 720U, Gutter = 0U
|
|
180
|
+
}
|
|
181
|
+
);
|
|
182
|
+
|
|
183
|
+
// ── Page numbers: centered bottom (Turabian A.1.5) ──
|
|
184
|
+
AddPageNumberFooter(mainPart, sectPr,
|
|
185
|
+
alignment: JustificationValues.Center,
|
|
186
|
+
fontSizeHalfPts: "24", // 12pt — same as body
|
|
187
|
+
color: "000000",
|
|
188
|
+
format: PageNumberFormat.Plain
|
|
189
|
+
);
|
|
190
|
+
|
|
191
|
+
// ── Footnotes part setup ──
|
|
192
|
+
// Turabian uses footnotes as the primary citation system.
|
|
193
|
+
// Footnote text: 10pt (sz=20), single-spaced within, double-spaced between.
|
|
194
|
+
var footnotesPart = mainPart.AddNewPart<FootnotesPart>();
|
|
195
|
+
footnotesPart.Footnotes = new Footnotes(
|
|
196
|
+
// Required separator and continuation separator footnotes
|
|
197
|
+
new Footnote(
|
|
198
|
+
new Paragraph(
|
|
199
|
+
new ParagraphProperties(
|
|
200
|
+
new SpacingBetweenLines { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto }
|
|
201
|
+
),
|
|
202
|
+
new Run(new SeparatorMark())
|
|
203
|
+
)
|
|
204
|
+
)
|
|
205
|
+
{ Type = FootnoteEndnoteValues.Separator, Id = -1 },
|
|
206
|
+
new Footnote(
|
|
207
|
+
new Paragraph(
|
|
208
|
+
new ParagraphProperties(
|
|
209
|
+
new SpacingBetweenLines { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto }
|
|
210
|
+
),
|
|
211
|
+
new Run(new ContinuationSeparatorMark())
|
|
212
|
+
)
|
|
213
|
+
)
|
|
214
|
+
{ Type = FootnoteEndnoteValues.ContinuationSeparator, Id = 0 },
|
|
215
|
+
// Actual footnote (id=1): 10pt, single-spaced
|
|
216
|
+
new Footnote(
|
|
217
|
+
new Paragraph(
|
|
218
|
+
new ParagraphProperties(
|
|
219
|
+
new SpacingBetweenLines { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto },
|
|
220
|
+
new Indentation { FirstLine = "720" }
|
|
221
|
+
),
|
|
222
|
+
new Run(
|
|
223
|
+
new RunProperties(
|
|
224
|
+
new VerticalTextAlignment { Val = VerticalPositionValues.Superscript }
|
|
225
|
+
),
|
|
226
|
+
new FootnoteReferenceMark()
|
|
227
|
+
),
|
|
228
|
+
new Run(
|
|
229
|
+
new RunProperties(
|
|
230
|
+
new FontSize { Val = "20" }, // 10pt footnote text
|
|
231
|
+
new FontSizeComplexScript { Val = "20" }
|
|
232
|
+
),
|
|
233
|
+
new Text(" Kate L. Turabian, ") { Space = SpaceProcessingModeValues.Preserve }
|
|
234
|
+
),
|
|
235
|
+
new Run(
|
|
236
|
+
new RunProperties(
|
|
237
|
+
new FontSize { Val = "20" },
|
|
238
|
+
new FontSizeComplexScript { Val = "20" },
|
|
239
|
+
new Italic()
|
|
240
|
+
),
|
|
241
|
+
new Text("A Manual for Writers of Research Papers, Theses, and Dissertations")
|
|
242
|
+
),
|
|
243
|
+
new Run(
|
|
244
|
+
new RunProperties(
|
|
245
|
+
new FontSize { Val = "20" },
|
|
246
|
+
new FontSizeComplexScript { Val = "20" }
|
|
247
|
+
),
|
|
248
|
+
new Text(", 9th ed. (Chicago: University of Chicago Press, 2018), 1.")
|
|
249
|
+
)
|
|
250
|
+
)
|
|
251
|
+
)
|
|
252
|
+
{ Id = 1 }
|
|
253
|
+
);
|
|
254
|
+
footnotesPart.Footnotes.Save();
|
|
255
|
+
|
|
256
|
+
// ── Sample content ──
|
|
257
|
+
|
|
258
|
+
// Title — centered, no indent
|
|
259
|
+
body.Append(new Paragraph(
|
|
260
|
+
new ParagraphProperties(
|
|
261
|
+
new ParagraphStyleId { Val = "Heading1" },
|
|
262
|
+
new Indentation { FirstLine = "0" }
|
|
263
|
+
),
|
|
264
|
+
new Run(new Text("The Influence of Typographic Conventions on Scholarly Communication"))
|
|
265
|
+
));
|
|
266
|
+
|
|
267
|
+
// Body paragraph
|
|
268
|
+
AddAcademicParagraph(body, "The conventions governing the physical presentation of scholarly "
|
|
269
|
+
+ "writing have evolved considerably since the advent of the printing press. What began as "
|
|
270
|
+
+ "pragmatic considerations of legibility and economy have become codified standards that "
|
|
271
|
+
+ "signal disciplinary identity and methodological rigor.");
|
|
272
|
+
|
|
273
|
+
// Body paragraph with footnote reference
|
|
274
|
+
body.Append(new Paragraph(
|
|
275
|
+
new ParagraphProperties(
|
|
276
|
+
new ParagraphStyleId { Val = "Normal" }
|
|
277
|
+
),
|
|
278
|
+
new Run(new Text("The Chicago Manual of Style, now in its seventeenth edition, remains the "
|
|
279
|
+
+ "authoritative guide for humanities publishing.")),
|
|
280
|
+
new Run(
|
|
281
|
+
new RunProperties(
|
|
282
|
+
new VerticalTextAlignment { Val = VerticalPositionValues.Superscript }
|
|
283
|
+
),
|
|
284
|
+
new FootnoteReference { Id = 1 }
|
|
285
|
+
),
|
|
286
|
+
new Run(new Text(" Its companion volume for students, commonly known as Turabian, "
|
|
287
|
+
+ "translates these standards into practical formatting requirements for academic papers "
|
|
288
|
+
+ "and dissertations.") { Space = SpaceProcessingModeValues.Preserve })
|
|
289
|
+
));
|
|
290
|
+
|
|
291
|
+
// Heading 2 — centered, NOT bold (distinctive Turabian feature)
|
|
292
|
+
body.Append(new Paragraph(
|
|
293
|
+
new ParagraphProperties(
|
|
294
|
+
new ParagraphStyleId { Val = "Heading2" },
|
|
295
|
+
new Indentation { FirstLine = "0" }
|
|
296
|
+
),
|
|
297
|
+
new Run(new Text("Historical Development of Style Guides"))
|
|
298
|
+
));
|
|
299
|
+
|
|
300
|
+
AddAcademicParagraph(body, "The emergence of standardized formatting guidelines in the early "
|
|
301
|
+
+ "twentieth century reflected a growing professionalization of academic writing. "
|
|
302
|
+
+ "Universities increasingly required uniform presentation of theses and dissertations, "
|
|
303
|
+
+ "driven by the practical needs of library cataloguing and microfilm reproduction.");
|
|
304
|
+
|
|
305
|
+
// Heading 3 — flush left, bold
|
|
306
|
+
body.Append(new Paragraph(
|
|
307
|
+
new ParagraphProperties(
|
|
308
|
+
new ParagraphStyleId { Val = "Heading3" },
|
|
309
|
+
new Indentation { FirstLine = "0" }
|
|
310
|
+
),
|
|
311
|
+
new Run(new Text("The University of Chicago Tradition"))
|
|
312
|
+
));
|
|
313
|
+
|
|
314
|
+
AddAcademicParagraph(body, "Kate Turabian served as the dissertation secretary at the "
|
|
315
|
+
+ "University of Chicago from 1930 to 1958. During this period, she developed a set of "
|
|
316
|
+
+ "formatting guidelines that would eventually become the standard reference for student "
|
|
317
|
+
+ "writers across the humanities.");
|
|
318
|
+
|
|
319
|
+
// Heading 4 — flush left, NOT bold
|
|
320
|
+
body.Append(new Paragraph(
|
|
321
|
+
new ParagraphProperties(
|
|
322
|
+
new ParagraphStyleId { Val = "Heading4" },
|
|
323
|
+
new Indentation { FirstLine = "0" }
|
|
324
|
+
),
|
|
325
|
+
new Run(new Text("Margin Requirements and Binding Considerations"))
|
|
326
|
+
));
|
|
327
|
+
|
|
328
|
+
AddAcademicParagraph(body, "The requirement for a wider left margin originated in the physical "
|
|
329
|
+
+ "binding process. Theses submitted for library archiving were typically bound on the left "
|
|
330
|
+
+ "edge, necessitating additional space to ensure that text near the spine remained legible.");
|
|
331
|
+
|
|
332
|
+
// Heading 5 — indented, bold, run-in with period
|
|
333
|
+
// In Turabian, H5 runs into the paragraph text. We simulate by putting the
|
|
334
|
+
// heading and body text in the same paragraph.
|
|
335
|
+
body.Append(new Paragraph(
|
|
336
|
+
new ParagraphProperties(
|
|
337
|
+
new ParagraphStyleId { Val = "Heading5" }
|
|
338
|
+
),
|
|
339
|
+
new Run(
|
|
340
|
+
new RunProperties(new Bold()),
|
|
341
|
+
new Text("Modern adaptations.") { Space = SpaceProcessingModeValues.Preserve }
|
|
342
|
+
),
|
|
343
|
+
new Run(
|
|
344
|
+
new Text(" Contemporary editions of Turabian have adapted these physical requirements "
|
|
345
|
+
+ "for digital submission, though many programs still require the wider left margin "
|
|
346
|
+
+ "as a nod to tradition and to accommodate printed copies.") { Space = SpaceProcessingModeValues.Preserve }
|
|
347
|
+
)
|
|
348
|
+
));
|
|
349
|
+
|
|
350
|
+
// Block quote — indented 0.5in, single-spaced
|
|
351
|
+
body.Append(new Paragraph(
|
|
352
|
+
new ParagraphProperties(
|
|
353
|
+
new ParagraphStyleId { Val = "BlockQuote" }
|
|
354
|
+
),
|
|
355
|
+
new Run(new Text("A writer who undertakes a research project joins an ongoing conversation. "
|
|
356
|
+
+ "To enter that conversation, you must understand what others have written, consider "
|
|
357
|
+
+ "their claims, and respond with your own interpretation of the evidence. The format "
|
|
358
|
+
+ "of your paper — its margins, spacing, notes, and bibliography — signals your "
|
|
359
|
+
+ "participation in that scholarly community."))
|
|
360
|
+
));
|
|
361
|
+
|
|
362
|
+
AddAcademicParagraph(body, "This passage illustrates the centrality of formatting conventions "
|
|
363
|
+
+ "to the scholarly enterprise. The visual presentation of a document communicates not only "
|
|
364
|
+
+ "the content but also the author's membership in a disciplinary community.");
|
|
365
|
+
|
|
366
|
+
// Section properties must be last child of body
|
|
367
|
+
body.Append(sectPr);
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
/// <summary>
|
|
371
|
+
/// Creates the Turabian fifth-level heading style.
|
|
372
|
+
/// Turabian H5: Indented (same as paragraph indent, 0.5in), Bold, run-in with period.
|
|
373
|
+
/// The heading text is bold and followed by a period, then body text continues
|
|
374
|
+
/// on the same line in regular weight. This "run-in" behavior is unique to Turabian
|
|
375
|
+
/// and requires manual composition (bold run + regular run in same paragraph).
|
|
376
|
+
/// </summary>
|
|
377
|
+
private static Style CreateTurabianHeading5Style()
|
|
378
|
+
{
|
|
379
|
+
var rPr = new StyleRunProperties(
|
|
380
|
+
new RunFonts
|
|
381
|
+
{
|
|
382
|
+
Ascii = "Times New Roman",
|
|
383
|
+
HighAnsi = "Times New Roman",
|
|
384
|
+
EastAsia = "SimSun",
|
|
385
|
+
ComplexScript = "Times New Roman"
|
|
386
|
+
},
|
|
387
|
+
new FontSize { Val = "24" },
|
|
388
|
+
new FontSizeComplexScript { Val = "24" },
|
|
389
|
+
new Color { Val = "000000" },
|
|
390
|
+
new Bold()
|
|
391
|
+
);
|
|
392
|
+
|
|
393
|
+
var pPr = new StyleParagraphProperties(
|
|
394
|
+
new KeepNext(),
|
|
395
|
+
new KeepLines(),
|
|
396
|
+
new SpacingBetweenLines
|
|
397
|
+
{
|
|
398
|
+
Before = "480",
|
|
399
|
+
After = "0",
|
|
400
|
+
Line = "480",
|
|
401
|
+
LineRule = LineSpacingRuleValues.Auto
|
|
402
|
+
},
|
|
403
|
+
// Indented same as paragraph first-line indent (0.5in)
|
|
404
|
+
new Indentation { FirstLine = "720" },
|
|
405
|
+
new OutlineLevel { Val = 4 } // OutlineLevel is 0-based: level 5 = 4
|
|
406
|
+
);
|
|
407
|
+
|
|
408
|
+
return new Style(
|
|
409
|
+
new StyleName { Val = "heading 5" },
|
|
410
|
+
new BasedOn { Val = "Normal" },
|
|
411
|
+
new NextParagraphStyle { Val = "Normal" },
|
|
412
|
+
new UIPriority { Val = 9 },
|
|
413
|
+
new PrimaryStyle(),
|
|
414
|
+
pPr,
|
|
415
|
+
rPr
|
|
416
|
+
)
|
|
417
|
+
{
|
|
418
|
+
Type = StyleValues.Paragraph,
|
|
419
|
+
StyleId = "Heading5",
|
|
420
|
+
Default = false
|
|
421
|
+
};
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
/// <summary>
|
|
425
|
+
/// Creates a Turabian block quote style.
|
|
426
|
+
/// Turabian 25.2.2: prose quotations of five or more lines should be set off
|
|
427
|
+
/// as block quotations. Block quotes are indented 0.5in from the left margin,
|
|
428
|
+
/// single-spaced within (line=240), with no first-line indent, and with a blank
|
|
429
|
+
/// line (double-spaced) before and after.
|
|
430
|
+
/// </summary>
|
|
431
|
+
private static Style CreateTurabianBlockQuoteStyle()
|
|
432
|
+
{
|
|
433
|
+
return new Style(
|
|
434
|
+
new StyleName { Val = "Block Quote" },
|
|
435
|
+
new BasedOn { Val = "Normal" },
|
|
436
|
+
new NextParagraphStyle { Val = "Normal" },
|
|
437
|
+
new UIPriority { Val = 29 },
|
|
438
|
+
new PrimaryStyle(),
|
|
439
|
+
new StyleParagraphProperties(
|
|
440
|
+
new SpacingBetweenLines
|
|
441
|
+
{
|
|
442
|
+
Before = "240",
|
|
443
|
+
After = "240",
|
|
444
|
+
Line = "240", // Single-spaced within block quote
|
|
445
|
+
LineRule = LineSpacingRuleValues.Auto
|
|
446
|
+
},
|
|
447
|
+
new Indentation
|
|
448
|
+
{
|
|
449
|
+
Left = "720", // 0.5in from left margin
|
|
450
|
+
FirstLine = "0" // No first-line indent in block quotes
|
|
451
|
+
}
|
|
452
|
+
),
|
|
453
|
+
new StyleRunProperties(
|
|
454
|
+
new FontSize { Val = "24" }, // 12pt — same as body
|
|
455
|
+
new FontSizeComplexScript { Val = "24" }
|
|
456
|
+
)
|
|
457
|
+
)
|
|
458
|
+
{
|
|
459
|
+
Type = StyleValues.Paragraph,
|
|
460
|
+
StyleId = "BlockQuote",
|
|
461
|
+
Default = false
|
|
462
|
+
};
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
|
|
466
|
+
// ════════════════════════════════════════════════════════════════════════
|
|
467
|
+
// RECIPE 11: SPRINGER LNCS
|
|
468
|
+
// ════════════════════════════════════════════════════════════════════════
|
|
469
|
+
|
|
470
|
+
/// <summary>
|
|
471
|
+
/// Recipe: Springer LNCS (Lecture Notes in Computer Science)
|
|
472
|
+
/// Source: llncs.cls class file, Springer LNCS author instructions (2024).
|
|
473
|
+
/// Best for: Computer science conference proceedings, workshop papers, Springer volumes.
|
|
474
|
+
///
|
|
475
|
+
/// Design rationale:
|
|
476
|
+
/// - Times New Roman 10pt body (sz=20): LNCS uses a compact 10pt body to fit
|
|
477
|
+
/// more content per page. Conference proceedings have strict page limits
|
|
478
|
+
/// (typically 12-16 pages), so density matters.
|
|
479
|
+
/// - Text area: 122mm x 193mm on US Letter. This creates generous margins
|
|
480
|
+
/// (~44mm left/right, ~47mm top, ~55mm bottom) that give the dense text
|
|
481
|
+
/// breathing room. The narrow text column improves readability at 10pt.
|
|
482
|
+
/// Margins: Top=47mm(2669 DXA), Bottom=55mm(3118 DXA), Left=44mm(2494 DXA),
|
|
483
|
+
/// Right=44mm(2494 DXA).
|
|
484
|
+
/// - Title: 14pt bold centered (sz=28) — the only large element on the page.
|
|
485
|
+
/// - Author: 12pt centered (sz=24) — subordinate to title but clearly visible.
|
|
486
|
+
/// - H1 (Section): 12pt bold flush left, arabic numbered ("1 Introduction").
|
|
487
|
+
/// - H2 (Subsection): 10pt bold flush left, numbered "1.1".
|
|
488
|
+
/// - H3 (Subsubsection): 10pt bold italic run-in, numbered but discouraged.
|
|
489
|
+
/// - H4 (Paragraph): 10pt italic run-in, unnumbered.
|
|
490
|
+
/// - Single spacing (line=240) throughout — maximizes content density.
|
|
491
|
+
/// - First-line indent: ~15pt (283 DXA, ~0.5cm) — notably smaller than the
|
|
492
|
+
/// typical 0.5in, reflecting European typographic conventions.
|
|
493
|
+
/// - Paragraph spacing: 0pt — paragraphs separated only by indent.
|
|
494
|
+
/// - Abstract: "Abstract." bold prefix, 9pt body (sz=18).
|
|
495
|
+
/// - Captions and references: 9pt (sz=18).
|
|
496
|
+
/// - Page numbers: centered at bottom of page.
|
|
497
|
+
/// </summary>
|
|
498
|
+
public static void CreateSpringerLNCSDocument(string outputPath)
|
|
499
|
+
{
|
|
500
|
+
using var doc = WordprocessingDocument.Create(outputPath, WordprocessingDocumentType.Document);
|
|
501
|
+
|
|
502
|
+
var mainPart = doc.AddMainDocumentPart();
|
|
503
|
+
mainPart.Document = new Document(new Body());
|
|
504
|
+
var body = mainPart.Document.Body!;
|
|
505
|
+
|
|
506
|
+
// ── Styles ──
|
|
507
|
+
var stylesPart = mainPart.AddNewPart<StyleDefinitionsPart>();
|
|
508
|
+
stylesPart.Styles = new Styles();
|
|
509
|
+
var styles = stylesPart.Styles;
|
|
510
|
+
|
|
511
|
+
// DocDefaults: Times New Roman 10pt, single spacing, small first-line indent
|
|
512
|
+
styles.Append(new DocDefaults(
|
|
513
|
+
new RunPropertiesDefault(
|
|
514
|
+
new RunPropertiesBaseStyle(
|
|
515
|
+
new RunFonts
|
|
516
|
+
{
|
|
517
|
+
Ascii = "Times New Roman",
|
|
518
|
+
HighAnsi = "Times New Roman",
|
|
519
|
+
EastAsia = "SimSun",
|
|
520
|
+
ComplexScript = "Times New Roman"
|
|
521
|
+
},
|
|
522
|
+
new FontSize { Val = "20" }, // 10pt body (half-points)
|
|
523
|
+
new FontSizeComplexScript { Val = "20" },
|
|
524
|
+
new Color { Val = "000000" },
|
|
525
|
+
new Languages { Val = "en-US", EastAsia = "zh-CN" }
|
|
526
|
+
)
|
|
527
|
+
),
|
|
528
|
+
new ParagraphPropertiesDefault(
|
|
529
|
+
new ParagraphPropertiesBaseStyle(
|
|
530
|
+
new SpacingBetweenLines
|
|
531
|
+
{
|
|
532
|
+
// Single spacing: compact layout for proceedings
|
|
533
|
+
Line = "240",
|
|
534
|
+
LineRule = LineSpacingRuleValues.Auto,
|
|
535
|
+
After = "0"
|
|
536
|
+
},
|
|
537
|
+
// First-line indent: ~15pt = 283 DXA (~0.5cm)
|
|
538
|
+
// Smaller than the Anglo-American 0.5in, following European convention
|
|
539
|
+
new Indentation { FirstLine = "283" }
|
|
540
|
+
)
|
|
541
|
+
)
|
|
542
|
+
));
|
|
543
|
+
|
|
544
|
+
// ── Normal style ──
|
|
545
|
+
styles.Append(CreateParagraphStyle(
|
|
546
|
+
styleId: "Normal",
|
|
547
|
+
styleName: "Normal",
|
|
548
|
+
isDefault: true,
|
|
549
|
+
uiPriority: 0
|
|
550
|
+
));
|
|
551
|
+
|
|
552
|
+
// ── LNCS Title style: 14pt bold centered ──
|
|
553
|
+
styles.Append(CreateLNCSTitleStyle());
|
|
554
|
+
|
|
555
|
+
// ── LNCS Author style: 12pt centered ──
|
|
556
|
+
styles.Append(CreateLNCSAuthorStyle());
|
|
557
|
+
|
|
558
|
+
// ── LNCS Abstract style: 9pt, for the abstract body text ──
|
|
559
|
+
styles.Append(CreateLNCSAbstractStyle());
|
|
560
|
+
|
|
561
|
+
// ── Heading 1 (Section): 12pt bold flush left ──
|
|
562
|
+
// LNCS sections are numbered "1 Introduction", "2 Related Work", etc.
|
|
563
|
+
// Numbering is manual in the sample content for simplicity.
|
|
564
|
+
styles.Append(CreateHeadingStyle(
|
|
565
|
+
level: 1,
|
|
566
|
+
fontAscii: "Times New Roman",
|
|
567
|
+
fontHAnsi: "Times New Roman",
|
|
568
|
+
sizeHalfPts: "24", // 12pt
|
|
569
|
+
color: "000000",
|
|
570
|
+
bold: true,
|
|
571
|
+
spaceBefore: "240", // 12pt before
|
|
572
|
+
spaceAfter: "120", // 6pt after
|
|
573
|
+
uiPriority: 9
|
|
574
|
+
));
|
|
575
|
+
|
|
576
|
+
// ── Heading 2 (Subsection): 10pt bold flush left ──
|
|
577
|
+
// Numbered "1.1", "1.2", etc.
|
|
578
|
+
styles.Append(CreateHeadingStyle(
|
|
579
|
+
level: 2,
|
|
580
|
+
fontAscii: "Times New Roman",
|
|
581
|
+
fontHAnsi: "Times New Roman",
|
|
582
|
+
sizeHalfPts: "20", // 10pt — same as body
|
|
583
|
+
color: "000000",
|
|
584
|
+
bold: true,
|
|
585
|
+
spaceBefore: "200", // 10pt before
|
|
586
|
+
spaceAfter: "100", // 5pt after
|
|
587
|
+
uiPriority: 9
|
|
588
|
+
));
|
|
589
|
+
|
|
590
|
+
// ── Heading 3 (Subsubsection): 10pt bold italic, run-in ──
|
|
591
|
+
// LNCS discourages subsubsections but allows them.
|
|
592
|
+
// Run-in headings are composed manually (bold italic run + regular run).
|
|
593
|
+
styles.Append(CreateLNCSHeading3Style());
|
|
594
|
+
|
|
595
|
+
// ── Heading 4 (Paragraph): 10pt italic, run-in, unnumbered ──
|
|
596
|
+
styles.Append(CreateLNCSHeading4Style());
|
|
597
|
+
|
|
598
|
+
// ── Caption style: 9pt (sz=18) ──
|
|
599
|
+
styles.Append(CreateCaptionStyle(
|
|
600
|
+
fontSizeHalfPts: "18", // 9pt
|
|
601
|
+
color: "000000",
|
|
602
|
+
italic: false
|
|
603
|
+
));
|
|
604
|
+
|
|
605
|
+
// ── References style: 9pt (sz=18) ──
|
|
606
|
+
styles.Append(CreateLNCSReferencesStyle());
|
|
607
|
+
|
|
608
|
+
// ── Page setup: US Letter with LNCS text area 122x193mm ──
|
|
609
|
+
// US Letter = 215.9mm x 279.4mm = 12240 x 15840 DXA
|
|
610
|
+
// Text area = 122mm x 193mm centered on page
|
|
611
|
+
// Left/Right margin: (215.9-122)/2 ≈ 47mm ≈ 2669 DXA — but LNCS specifies ~44mm
|
|
612
|
+
// Top margin: ~47mm = 2669 DXA, Bottom: ~55mm = 3118 DXA
|
|
613
|
+
var sectPr = new SectionProperties(
|
|
614
|
+
new WpPageSize { Width = 12240U, Height = 15840U },
|
|
615
|
+
new PageMargin
|
|
616
|
+
{
|
|
617
|
+
Top = 2669, Bottom = 3118,
|
|
618
|
+
Left = 2494U, Right = 2494U,
|
|
619
|
+
Header = 720U, Footer = 720U, Gutter = 0U
|
|
620
|
+
}
|
|
621
|
+
);
|
|
622
|
+
|
|
623
|
+
// ── Page numbers: centered bottom ──
|
|
624
|
+
AddPageNumberFooter(mainPart, sectPr,
|
|
625
|
+
alignment: JustificationValues.Center,
|
|
626
|
+
fontSizeHalfPts: "20", // 10pt
|
|
627
|
+
color: "000000",
|
|
628
|
+
format: PageNumberFormat.Plain
|
|
629
|
+
);
|
|
630
|
+
|
|
631
|
+
// ── Sample content ──
|
|
632
|
+
|
|
633
|
+
// Title — 14pt bold centered
|
|
634
|
+
body.Append(new Paragraph(
|
|
635
|
+
new ParagraphProperties(
|
|
636
|
+
new ParagraphStyleId { Val = "LNCSTitle" }
|
|
637
|
+
),
|
|
638
|
+
new Run(new Text("Efficient Algorithms for Document Layout Analysis"))
|
|
639
|
+
));
|
|
640
|
+
|
|
641
|
+
// Author — 12pt centered
|
|
642
|
+
body.Append(new Paragraph(
|
|
643
|
+
new ParagraphProperties(
|
|
644
|
+
new ParagraphStyleId { Val = "LNCSAuthor" }
|
|
645
|
+
),
|
|
646
|
+
new Run(new Text("Jane Smith"))
|
|
647
|
+
));
|
|
648
|
+
|
|
649
|
+
// Author affiliation — 9pt centered
|
|
650
|
+
body.Append(new Paragraph(
|
|
651
|
+
new ParagraphProperties(
|
|
652
|
+
new Justification { Val = JustificationValues.Center },
|
|
653
|
+
new SpacingBetweenLines { After = "240" },
|
|
654
|
+
new Indentation { FirstLine = "0" }
|
|
655
|
+
),
|
|
656
|
+
new Run(
|
|
657
|
+
new RunProperties(
|
|
658
|
+
new FontSize { Val = "18" },
|
|
659
|
+
new FontSizeComplexScript { Val = "18" }
|
|
660
|
+
),
|
|
661
|
+
new Text("Department of Computer Science, Example University, City, Country")
|
|
662
|
+
)
|
|
663
|
+
));
|
|
664
|
+
|
|
665
|
+
// Abstract — "Abstract." bold prefix + 9pt body
|
|
666
|
+
body.Append(new Paragraph(
|
|
667
|
+
new ParagraphProperties(
|
|
668
|
+
new ParagraphStyleId { Val = "LNCSAbstract" }
|
|
669
|
+
),
|
|
670
|
+
new Run(
|
|
671
|
+
new RunProperties(
|
|
672
|
+
new Bold(),
|
|
673
|
+
new FontSize { Val = "18" },
|
|
674
|
+
new FontSizeComplexScript { Val = "18" }
|
|
675
|
+
),
|
|
676
|
+
new Text("Abstract.") { Space = SpaceProcessingModeValues.Preserve }
|
|
677
|
+
),
|
|
678
|
+
new Run(
|
|
679
|
+
new RunProperties(
|
|
680
|
+
new FontSize { Val = "18" },
|
|
681
|
+
new FontSizeComplexScript { Val = "18" }
|
|
682
|
+
),
|
|
683
|
+
new Text(" This paper presents efficient algorithms for analyzing the layout structure "
|
|
684
|
+
+ "of digitally typeset documents. We propose a novel approach based on hierarchical "
|
|
685
|
+
+ "decomposition that achieves O(n log n) complexity while maintaining high accuracy "
|
|
686
|
+
+ "on standard benchmarks. Experimental results on the ICDAR dataset demonstrate "
|
|
687
|
+
+ "a 12% improvement over existing methods.") { Space = SpaceProcessingModeValues.Preserve }
|
|
688
|
+
)
|
|
689
|
+
));
|
|
690
|
+
|
|
691
|
+
// Section 1 — numbered manually
|
|
692
|
+
body.Append(new Paragraph(
|
|
693
|
+
new ParagraphProperties(
|
|
694
|
+
new ParagraphStyleId { Val = "Heading1" },
|
|
695
|
+
new Indentation { FirstLine = "0" }
|
|
696
|
+
),
|
|
697
|
+
new Run(new Text("1 Introduction"))
|
|
698
|
+
));
|
|
699
|
+
|
|
700
|
+
body.Append(new Paragraph(
|
|
701
|
+
new ParagraphProperties(
|
|
702
|
+
new ParagraphStyleId { Val = "Normal" },
|
|
703
|
+
new Indentation { FirstLine = "0" } // First para after heading: no indent
|
|
704
|
+
),
|
|
705
|
+
new Run(new Text("Document layout analysis is a fundamental task in document image processing. "
|
|
706
|
+
+ "Given a document page, the goal is to identify and classify regions such as text blocks, "
|
|
707
|
+
+ "figures, tables, and captions. Accurate layout analysis is a prerequisite for downstream "
|
|
708
|
+
+ "tasks including optical character recognition and information extraction."))
|
|
709
|
+
));
|
|
710
|
+
|
|
711
|
+
body.Append(new Paragraph(
|
|
712
|
+
new ParagraphProperties(
|
|
713
|
+
new ParagraphStyleId { Val = "Normal" }
|
|
714
|
+
),
|
|
715
|
+
new Run(new Text("Previous approaches to this problem can be broadly categorized into "
|
|
716
|
+
+ "rule-based methods, which rely on hand-crafted heuristics, and learning-based methods, "
|
|
717
|
+
+ "which train classifiers on annotated datasets. While learning-based methods have shown "
|
|
718
|
+
+ "superior accuracy, their computational cost often limits practical deployment."))
|
|
719
|
+
));
|
|
720
|
+
|
|
721
|
+
// Section 2
|
|
722
|
+
body.Append(new Paragraph(
|
|
723
|
+
new ParagraphProperties(
|
|
724
|
+
new ParagraphStyleId { Val = "Heading1" },
|
|
725
|
+
new Indentation { FirstLine = "0" }
|
|
726
|
+
),
|
|
727
|
+
new Run(new Text("2 Related Work"))
|
|
728
|
+
));
|
|
729
|
+
|
|
730
|
+
body.Append(new Paragraph(
|
|
731
|
+
new ParagraphProperties(
|
|
732
|
+
new ParagraphStyleId { Val = "Normal" },
|
|
733
|
+
new Indentation { FirstLine = "0" }
|
|
734
|
+
),
|
|
735
|
+
new Run(new Text("The literature on document layout analysis spans several decades. "
|
|
736
|
+
+ "Early systems employed top-down recursive decomposition, while more recent work "
|
|
737
|
+
+ "has explored bottom-up aggregation of connected components."))
|
|
738
|
+
));
|
|
739
|
+
|
|
740
|
+
// Subsection 2.1
|
|
741
|
+
body.Append(new Paragraph(
|
|
742
|
+
new ParagraphProperties(
|
|
743
|
+
new ParagraphStyleId { Val = "Heading2" },
|
|
744
|
+
new Indentation { FirstLine = "0" }
|
|
745
|
+
),
|
|
746
|
+
new Run(new Text("2.1 Top-Down Approaches"))
|
|
747
|
+
));
|
|
748
|
+
|
|
749
|
+
body.Append(new Paragraph(
|
|
750
|
+
new ParagraphProperties(
|
|
751
|
+
new ParagraphStyleId { Val = "Normal" },
|
|
752
|
+
new Indentation { FirstLine = "0" }
|
|
753
|
+
),
|
|
754
|
+
new Run(new Text("Top-down methods recursively partition the document page into smaller "
|
|
755
|
+
+ "regions. The X-Y cut algorithm is the canonical example, splitting the page "
|
|
756
|
+
+ "alternately along horizontal and vertical whitespace gaps."))
|
|
757
|
+
));
|
|
758
|
+
|
|
759
|
+
// Section 3
|
|
760
|
+
body.Append(new Paragraph(
|
|
761
|
+
new ParagraphProperties(
|
|
762
|
+
new ParagraphStyleId { Val = "Heading1" },
|
|
763
|
+
new Indentation { FirstLine = "0" }
|
|
764
|
+
),
|
|
765
|
+
new Run(new Text("3 Proposed Method"))
|
|
766
|
+
));
|
|
767
|
+
|
|
768
|
+
body.Append(new Paragraph(
|
|
769
|
+
new ParagraphProperties(
|
|
770
|
+
new ParagraphStyleId { Val = "Normal" },
|
|
771
|
+
new Indentation { FirstLine = "0" }
|
|
772
|
+
),
|
|
773
|
+
new Run(new Text("We propose a hierarchical decomposition algorithm that combines the "
|
|
774
|
+
+ "efficiency of top-down splitting with the accuracy of bottom-up region growing."))
|
|
775
|
+
));
|
|
776
|
+
|
|
777
|
+
// Table — three-line style, common in CS papers
|
|
778
|
+
body.Append(CreateThreeLineTable(
|
|
779
|
+
new[] { "Method", "Precision", "Recall", "F1", "Time (ms)" },
|
|
780
|
+
new[]
|
|
781
|
+
{
|
|
782
|
+
new[] { "X-Y Cut", "0.82", "0.79", "0.80", "12" },
|
|
783
|
+
new[] { "RLSA", "0.85", "0.83", "0.84", "45" },
|
|
784
|
+
new[] { "Ours", "0.94", "0.91", "0.92", "18" }
|
|
785
|
+
}
|
|
786
|
+
));
|
|
787
|
+
|
|
788
|
+
// Caption — 9pt
|
|
789
|
+
body.Append(new Paragraph(
|
|
790
|
+
new ParagraphProperties(
|
|
791
|
+
new ParagraphStyleId { Val = "Caption" },
|
|
792
|
+
new Justification { Val = JustificationValues.Center },
|
|
793
|
+
new Indentation { FirstLine = "0" }
|
|
794
|
+
),
|
|
795
|
+
new Run(
|
|
796
|
+
new RunProperties(new Bold()),
|
|
797
|
+
new Text("Table 1.") { Space = SpaceProcessingModeValues.Preserve }
|
|
798
|
+
),
|
|
799
|
+
new Run(new Text(" Comparison of layout analysis methods on the ICDAR 2019 dataset.") { Space = SpaceProcessingModeValues.Preserve })
|
|
800
|
+
));
|
|
801
|
+
|
|
802
|
+
// References section
|
|
803
|
+
body.Append(new Paragraph(
|
|
804
|
+
new ParagraphProperties(
|
|
805
|
+
new ParagraphStyleId { Val = "Heading1" },
|
|
806
|
+
new Indentation { FirstLine = "0" }
|
|
807
|
+
),
|
|
808
|
+
new Run(new Text("References"))
|
|
809
|
+
));
|
|
810
|
+
|
|
811
|
+
// Reference entries — 9pt, numbered [1], [2], etc.
|
|
812
|
+
AddLNCSReference(body, "1", "Smith, J., Doe, A.: Document layout analysis using recursive decomposition. "
|
|
813
|
+
+ "In: Proceedings of ICDAR, pp. 112\u2013120 (2019)");
|
|
814
|
+
AddLNCSReference(body, "2", "Johnson, R.: A survey of page segmentation algorithms. "
|
|
815
|
+
+ "Pattern Recognition 45(3), 234\u2013251 (2018)");
|
|
816
|
+
AddLNCSReference(body, "3", "Williams, K., Brown, L.: Hierarchical methods for structured document "
|
|
817
|
+
+ "understanding. Int. J. Document Analysis 12(1), 45\u201367 (2020)");
|
|
818
|
+
|
|
819
|
+
// Section properties must be last child of body
|
|
820
|
+
body.Append(sectPr);
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
/// <summary>
|
|
824
|
+
/// LNCS Title style: 14pt bold centered, with spacing after for author line.
|
|
825
|
+
/// The title is the largest element in an LNCS paper — everything else is compact.
|
|
826
|
+
/// </summary>
|
|
827
|
+
private static Style CreateLNCSTitleStyle()
|
|
828
|
+
{
|
|
829
|
+
return new Style(
|
|
830
|
+
new StyleName { Val = "LNCS Title" },
|
|
831
|
+
new BasedOn { Val = "Normal" },
|
|
832
|
+
new NextParagraphStyle { Val = "Normal" },
|
|
833
|
+
new UIPriority { Val = 10 },
|
|
834
|
+
new PrimaryStyle(),
|
|
835
|
+
new StyleParagraphProperties(
|
|
836
|
+
new Justification { Val = JustificationValues.Center },
|
|
837
|
+
new SpacingBetweenLines { Before = "0", After = "240" },
|
|
838
|
+
new Indentation { FirstLine = "0" }
|
|
839
|
+
),
|
|
840
|
+
new StyleRunProperties(
|
|
841
|
+
new Bold(),
|
|
842
|
+
new FontSize { Val = "28" }, // 14pt
|
|
843
|
+
new FontSizeComplexScript { Val = "28" }
|
|
844
|
+
)
|
|
845
|
+
)
|
|
846
|
+
{
|
|
847
|
+
Type = StyleValues.Paragraph,
|
|
848
|
+
StyleId = "LNCSTitle",
|
|
849
|
+
Default = false
|
|
850
|
+
};
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
/// <summary>
|
|
854
|
+
/// LNCS Author style: 12pt centered, no bold.
|
|
855
|
+
/// Authors are listed below the title, followed by affiliations in smaller text.
|
|
856
|
+
/// </summary>
|
|
857
|
+
private static Style CreateLNCSAuthorStyle()
|
|
858
|
+
{
|
|
859
|
+
return new Style(
|
|
860
|
+
new StyleName { Val = "LNCS Author" },
|
|
861
|
+
new BasedOn { Val = "Normal" },
|
|
862
|
+
new NextParagraphStyle { Val = "Normal" },
|
|
863
|
+
new UIPriority { Val = 10 },
|
|
864
|
+
new PrimaryStyle(),
|
|
865
|
+
new StyleParagraphProperties(
|
|
866
|
+
new Justification { Val = JustificationValues.Center },
|
|
867
|
+
new SpacingBetweenLines { Before = "0", After = "60" },
|
|
868
|
+
new Indentation { FirstLine = "0" }
|
|
869
|
+
),
|
|
870
|
+
new StyleRunProperties(
|
|
871
|
+
new FontSize { Val = "24" }, // 12pt
|
|
872
|
+
new FontSizeComplexScript { Val = "24" }
|
|
873
|
+
)
|
|
874
|
+
)
|
|
875
|
+
{
|
|
876
|
+
Type = StyleValues.Paragraph,
|
|
877
|
+
StyleId = "LNCSAuthor",
|
|
878
|
+
Default = false
|
|
879
|
+
};
|
|
880
|
+
}
|
|
881
|
+
|
|
882
|
+
/// <summary>
|
|
883
|
+
/// LNCS Abstract style: 9pt body, slightly indented from both margins.
|
|
884
|
+
/// The abstract in LNCS papers is preceded by "Abstract." in bold.
|
|
885
|
+
/// </summary>
|
|
886
|
+
private static Style CreateLNCSAbstractStyle()
|
|
887
|
+
{
|
|
888
|
+
return new Style(
|
|
889
|
+
new StyleName { Val = "LNCS Abstract" },
|
|
890
|
+
new BasedOn { Val = "Normal" },
|
|
891
|
+
new NextParagraphStyle { Val = "Normal" },
|
|
892
|
+
new UIPriority { Val = 10 },
|
|
893
|
+
new PrimaryStyle(),
|
|
894
|
+
new StyleParagraphProperties(
|
|
895
|
+
new SpacingBetweenLines { Before = "120", After = "240" },
|
|
896
|
+
new Indentation { Left = "283", Right = "283", FirstLine = "0" }
|
|
897
|
+
),
|
|
898
|
+
new StyleRunProperties(
|
|
899
|
+
new FontSize { Val = "18" }, // 9pt
|
|
900
|
+
new FontSizeComplexScript { Val = "18" }
|
|
901
|
+
)
|
|
902
|
+
)
|
|
903
|
+
{
|
|
904
|
+
Type = StyleValues.Paragraph,
|
|
905
|
+
StyleId = "LNCSAbstract",
|
|
906
|
+
Default = false
|
|
907
|
+
};
|
|
908
|
+
}
|
|
909
|
+
|
|
910
|
+
/// <summary>
|
|
911
|
+
/// LNCS Heading 3 (Subsubsection): 10pt bold italic.
|
|
912
|
+
/// Run-in style — the heading is followed by body text on the same line.
|
|
913
|
+
/// Numbering (e.g., "1.1.1") is manual. LNCS discourages deep nesting.
|
|
914
|
+
/// </summary>
|
|
915
|
+
private static Style CreateLNCSHeading3Style()
|
|
916
|
+
{
|
|
917
|
+
return new Style(
|
|
918
|
+
new StyleName { Val = "heading 3" },
|
|
919
|
+
new BasedOn { Val = "Normal" },
|
|
920
|
+
new NextParagraphStyle { Val = "Normal" },
|
|
921
|
+
new UIPriority { Val = 9 },
|
|
922
|
+
new PrimaryStyle(),
|
|
923
|
+
new StyleParagraphProperties(
|
|
924
|
+
new KeepNext(),
|
|
925
|
+
new KeepLines(),
|
|
926
|
+
new SpacingBetweenLines { Before = "200", After = "100" },
|
|
927
|
+
new Indentation { FirstLine = "0" },
|
|
928
|
+
new OutlineLevel { Val = 2 }
|
|
929
|
+
),
|
|
930
|
+
new StyleRunProperties(
|
|
931
|
+
new RunFonts
|
|
932
|
+
{
|
|
933
|
+
Ascii = "Times New Roman",
|
|
934
|
+
HighAnsi = "Times New Roman",
|
|
935
|
+
EastAsia = "SimSun",
|
|
936
|
+
ComplexScript = "Times New Roman"
|
|
937
|
+
},
|
|
938
|
+
new FontSize { Val = "20" }, // 10pt — same as body
|
|
939
|
+
new FontSizeComplexScript { Val = "20" },
|
|
940
|
+
new Color { Val = "000000" },
|
|
941
|
+
new Bold(),
|
|
942
|
+
new Italic()
|
|
943
|
+
)
|
|
944
|
+
)
|
|
945
|
+
{
|
|
946
|
+
Type = StyleValues.Paragraph,
|
|
947
|
+
StyleId = "Heading3",
|
|
948
|
+
Default = false
|
|
949
|
+
};
|
|
950
|
+
}
|
|
951
|
+
|
|
952
|
+
/// <summary>
|
|
953
|
+
/// LNCS Heading 4 (Paragraph level): 10pt italic, run-in, unnumbered.
|
|
954
|
+
/// The lowest heading level in LNCS — used for paragraph-level subdivisions.
|
|
955
|
+
/// </summary>
|
|
956
|
+
private static Style CreateLNCSHeading4Style()
|
|
957
|
+
{
|
|
958
|
+
return new Style(
|
|
959
|
+
new StyleName { Val = "heading 4" },
|
|
960
|
+
new BasedOn { Val = "Normal" },
|
|
961
|
+
new NextParagraphStyle { Val = "Normal" },
|
|
962
|
+
new UIPriority { Val = 9 },
|
|
963
|
+
new PrimaryStyle(),
|
|
964
|
+
new StyleParagraphProperties(
|
|
965
|
+
new KeepNext(),
|
|
966
|
+
new KeepLines(),
|
|
967
|
+
new SpacingBetweenLines { Before = "200", After = "100" },
|
|
968
|
+
new Indentation { FirstLine = "0" },
|
|
969
|
+
new OutlineLevel { Val = 3 }
|
|
970
|
+
),
|
|
971
|
+
new StyleRunProperties(
|
|
972
|
+
new RunFonts
|
|
973
|
+
{
|
|
974
|
+
Ascii = "Times New Roman",
|
|
975
|
+
HighAnsi = "Times New Roman",
|
|
976
|
+
EastAsia = "SimSun",
|
|
977
|
+
ComplexScript = "Times New Roman"
|
|
978
|
+
},
|
|
979
|
+
new FontSize { Val = "20" }, // 10pt — same as body
|
|
980
|
+
new FontSizeComplexScript { Val = "20" },
|
|
981
|
+
new Color { Val = "000000" },
|
|
982
|
+
new Italic() // Italic only, no bold
|
|
983
|
+
)
|
|
984
|
+
)
|
|
985
|
+
{
|
|
986
|
+
Type = StyleValues.Paragraph,
|
|
987
|
+
StyleId = "Heading4",
|
|
988
|
+
Default = false
|
|
989
|
+
};
|
|
990
|
+
}
|
|
991
|
+
|
|
992
|
+
/// <summary>
|
|
993
|
+
/// LNCS References style: 9pt (sz=18), with hanging indent for numbered entries.
|
|
994
|
+
/// References in LNCS use numbered format [1], [2], etc.
|
|
995
|
+
/// </summary>
|
|
996
|
+
private static Style CreateLNCSReferencesStyle()
|
|
997
|
+
{
|
|
998
|
+
return new Style(
|
|
999
|
+
new StyleName { Val = "LNCS Reference" },
|
|
1000
|
+
new BasedOn { Val = "Normal" },
|
|
1001
|
+
new UIPriority { Val = 30 },
|
|
1002
|
+
new PrimaryStyle(),
|
|
1003
|
+
new StyleParagraphProperties(
|
|
1004
|
+
new SpacingBetweenLines { After = "40" },
|
|
1005
|
+
new Indentation
|
|
1006
|
+
{
|
|
1007
|
+
Left = "360", // Hanging indent body
|
|
1008
|
+
Hanging = "360" // Hanging amount (overrides first-line indent)
|
|
1009
|
+
}
|
|
1010
|
+
),
|
|
1011
|
+
new StyleRunProperties(
|
|
1012
|
+
new FontSize { Val = "18" }, // 9pt
|
|
1013
|
+
new FontSizeComplexScript { Val = "18" }
|
|
1014
|
+
)
|
|
1015
|
+
)
|
|
1016
|
+
{
|
|
1017
|
+
Type = StyleValues.Paragraph,
|
|
1018
|
+
StyleId = "LNCSReference",
|
|
1019
|
+
Default = false
|
|
1020
|
+
};
|
|
1021
|
+
}
|
|
1022
|
+
|
|
1023
|
+
/// <summary>
|
|
1024
|
+
/// Helper to add an LNCS-formatted reference entry with [N] numbering.
|
|
1025
|
+
/// </summary>
|
|
1026
|
+
private static void AddLNCSReference(Body body, string number, string text)
|
|
1027
|
+
{
|
|
1028
|
+
body.Append(new Paragraph(
|
|
1029
|
+
new ParagraphProperties(
|
|
1030
|
+
new ParagraphStyleId { Val = "LNCSReference" }
|
|
1031
|
+
),
|
|
1032
|
+
new Run(
|
|
1033
|
+
new RunProperties(
|
|
1034
|
+
new FontSize { Val = "18" },
|
|
1035
|
+
new FontSizeComplexScript { Val = "18" }
|
|
1036
|
+
),
|
|
1037
|
+
new Text($"[{number}] ") { Space = SpaceProcessingModeValues.Preserve }
|
|
1038
|
+
),
|
|
1039
|
+
new Run(
|
|
1040
|
+
new RunProperties(
|
|
1041
|
+
new FontSize { Val = "18" },
|
|
1042
|
+
new FontSizeComplexScript { Val = "18" }
|
|
1043
|
+
),
|
|
1044
|
+
new Text(text)
|
|
1045
|
+
)
|
|
1046
|
+
));
|
|
1047
|
+
}
|
|
1048
|
+
}
|