Multi-page Draw.io PPT Generator (Thesis Defense + General Presentation)
This skill supports two modes,
sharing ,
,
directories, and the full process including
Step 0 Custom Template,
Step 1 Confirm Content and Style,
Step 3 & 4 Output and Export.
Mode Recognition
| Mode | Use Case | Content Source | Default Page Order | Output File |
|---|
| Thesis Defense | Degree thesis defense, proposal defense, pre-defense | Structured extraction from paper-write | Cover → Table of Contents → Background → Current Status → Method → Innovation Points → Experiment → Conclusion → Acknowledgement → Q&A | |
| General Presentation | Work report, product introduction, speech | Extracted/generated from user messages | Cover → Table of Contents → Section Title → Content Pages → Summary → Acknowledgement → Q&A | general-presentation.drawio
|
Step 0: User Custom Template (Optional, shared by both modes)
If the user provides their own
template file:
- Template Placement: Put the file into the directory
- Run Style Extraction: Execute the following command under the skill root directory:
python scripts/analyze_pptx.py ppt_template/xxx.pptx reference/style-custom.md
- Read
reference/style-custom.md
as the "custom style" to proceed
Directory Convention:
stores templates,
is for style extraction,
stores style files
Step 1: Confirm Content and Style (Shared by both modes)
1.1 Confirm Content
- Thesis Defense: If the user only has the full paper: first call the "structured information extraction" of paper-write; if structured information is already provided: extract [Paper Title], [Discipline Direction], [Defense Duration], [Paper Structure/Table of Contents], [Core Content of Each Chapter], [Innovation Points/Contributions], etc. from the message, ask for missing information if any
- General Presentation: Extract slide outline and content from user messages, or expand to complete structure based on core requirements
1.2 Select Style
Both modes can choose one of the following styles, read the corresponding reference file to obtain color matching, font, layout rules and XML style fragments:
| # | Style | Main Color | Accent Color | Reference File |
|---|
| 1 | Classic Academic / Business Rigorous | | | reference/style1-classic-academic.md
|
| 2 | Modern Minimalist / Big Poster Style | | | reference/style2-minimal-bigtype.md
|
| 3 | Warm Academic / High Affinity | | | reference/style3-warm-academic.md
|
| 4 | Bright Tech / Modern Cutting-edge | | Same as main color | reference/style4-tech-modern.md
|
| 5 | Custom | Extracted from style-custom.md | | reference/style-custom.md
|
- Thesis Defense: Default to style 1 if not specified by the user
- General Presentation: Selected by the user or automatically recommended according to the context
Step 2: Generate Multi-page Draw.io XML
You must first read the reference file of the selected style, and generate XML based on this style.
- Canvas: 16:9 (pageWidth=1920, pageHeight=1080)
- Page order: Follow the default page order in the mode recognition table
- Number of pages: About 10–12 pages for 10 minutes, about 14–18 pages for 15 minutes
- With section title transition pages (one separate introduction page per chapter), about 11 pages for 10 minutes; about 9 pages without transition pages
- Section title transition page style: large number + chapter name, refer to style 2 or style 4 (no transition pages)
2.1 Default Page Order for Thesis Defense Mode (23 pages, shared by four styles)
When the user selects the thesis defense mode and does not specify the number of pages separately, all styles (style1–4) adopt a unified 23-page structure by default:
- Cover
- Table of Contents
- 01 Research Background and Significance (Section Title)
4–6. 01. Research Background and Significance (3 content pages)
- 02 Domestic and Foreign Research Status (Section Title)
8–9. 02. Domestic and Foreign Research Status (2 content pages)
- 03 Method Overview (Section Title)
11–13. 03. Method Overview (3 content pages)
- 04 Experimental Results (Section Title)
15–16. 04. Experimental Results (2 content pages)
- 05 System Design (Section Title)
18–19. 05. System Design and Implementation (2 content pages)
- 06 Summary and Outlook (Section Title)
-
- Summary and Outlook (1 content page)
- Existing Achievements
- Acknowledgement / Q & A
Each reference/styleX-*.md only defines style and layout (color, font, component layout), and no longer defines the page order repeatedly; if you need to modify the default page order, you should adjust it uniformly in this SKILL.
2.2 File Naming and Delivery (Recommended, Windows compatible)
- Recommended Naming (Generation/Export Stage): Prioritize ASCII file names (English letters/numbers/hyphens) to reduce problems such as garbled Chinese file names and files not found by commands in PowerShell/encoding environments.
- Recommended:
defense-style4-tech.drawio
,
- If Chinese name is required: it is recommended to complete the export with ASCII name first, and then rename it to Chinese in the file explorer
- Delivery Order (Recommended Process): Provide (source file) first → Execute command to export (delivery file) → Verify the number of pages
- Delivery Dependency: The receiver only needs to open (attach if necessary), no need to install Python; scripts/code are only used for automatic XML writing on the generation side (optional).
⚠️ List of Known Pitfalls (Check one by one before generation)
Before generating XML for each page, perform a quick self-check according to the checklist below (only keep high-frequency fatal items):
✅ Mandatory Checklist (10 items)
- Multi-page Structure: The root node must be , and each page has one (otherwise it will be exported as 1 page).
- Coordinate System per Page: starts from 0 in each ; background rectangle ; each page has and .
- Unique ID: All in the entire file must be unique; each must also be unique.
- One-time Writing: must be written completely at one time (do not overwrite/splice XML multiple times).
- Page Count Verification: The output by must be equal to the number of .
- Cell Count per Page: Cover ≥ 12, section title ≥ 8, content page ≥ 15 (avoid "blank pages").
- Only use real line breaks for line wrapping: When generating XML, multi-line body text must be written as real line breaks (use to splice in the code, and then write to the file at one time). It is forbidden to write / / in , and it is also forbidden to replace with literal through Shell; text style must include .
- Do not replace white text by mistake: The text in the top bar/dark block keeps ; when replacing the background color, prioritize modifying , do not replace all globally.
- Occlusion Check: Decorative blocks with background color should not cross the body area; do not place labels with background color between two columns of cards (it will press the text).
- Height Budget: The card/container for multi-line body text should be rather higher to leave blank space to avoid cutting text (body line height is about (1.4\times) font size).
Minimum Available Multi-page Template (only for structure demonstration)
xml
<mxfile host="app.diagrams.net">
<diagram id="p1" name="封面">
<mxGraphModel page="1" pageWidth="1920" pageHeight="1080">
<root>
<mxCell id="0"/><mxCell id="1" parent="0"/>
</root>
</mxGraphModel>
</diagram>
<diagram id="p2" name="目录">
<mxGraphModel page="1" pageWidth="1920" pageHeight="1080">
<root>
<mxCell id="0"/><mxCell id="1" parent="0"/>
</root>
</mxGraphModel>
</diagram>
</mxfile>
Step 3 & 4: Output Draw.io and Automatically Export PPT (Shared by both modes)
Step 3: Output Draw.io File
Write the generated XML
at one time into the
file in the workspace (use
for thesis defense,
general-presentation.drawio
for general presentation), and briefly describe the summary of each page.
The writing method must meet the requirements of Item 4 "One-time Writing" and Item 7 "Only use real line breaks for line wrapping" in the checklist.
Step 4: Automatically Export PPT (Mandatory Execution)
After generating
, perform the export (it is recommended to complete the export on the generation side before delivery):
- If not installed:
pip install drawio2pptx -q
- Switch to the directory where the file is located (you must cd/Set-Location first, otherwise the file cannot be found):
powershell
Set-Location "d:\你的项目目录"
drawio2pptx <文件名>.drawio <文件名>.pptx
- Verify the number of output pages: The output must contain
Saved xxx.pptx (N slides)
, and (N) is equal to the number of (corresponding to Item 5 "Page Count Verification" in the checklist)
Page count verification must meet the requirements of Item 5 "Page Count Verification" in the checklist.
Export Failure Troubleshooting (High Frequency)
- Permission denied: The target is being occupied by PowerPoint.
- Solution: Export to a new file name (such as ), or close the PPT first and then overwrite the export.
- Garbled Chinese file name / File not found: Terminal encoding causes abnormal path resolution.
- Solution: Use ASCII file names for generation and export (see 2.2).
Other Notes
- Unified Font Size Rules (All Styles):
- Chinese body text on content pages (paragraphs + list points) uniformly use 18 pt;
- Chapter titles on content pages are generally 30 pt, large numbers/chapter names on section title pages continue to follow the examples in each styleX;
- Secondary information such as date, footer, small labels, chart headers can keep the existing design between 13–16 pt.
- Font Recommendation: Chinese titles/body text prefer Microsoft Yahei or Song Typeface; numbers, English and formulas use Times New Roman. Each style reference can be fine-tuned on this basis (such as using Georgia for English titles).
- XML tags are closed correctly, special characters are escaped (→, →)
- Page layout: Full canvas background rectangle, title area 44–56pt, body text reserved space according to 18pt line height, sufficient blank space
- command is not supported under Windows, use PowerShell's instead for Shell output truncation