🧪 Skills

中文word文档通用格式标准化

提供Word文档中文格式标准化功能,统一标题、正文、图片和图表格式,确保符合中文排版规范。

v1.0.0
❤️ 0
⬇️ 79
👁 1
Share

Description


name: Word中文格式标准化 name: Word中文格式标准化 description: 提供Word文档按中文格式标准化的功能,包括标题、正文、图片、图表等格式的统一处理。使用微软雅黑字体,设置标准化的字体大小、段前段后位置、行缩进等。适用于需要统一文档格式的场景,如企业文档、学术论文、报告等。

Word中文格式标准化

功能概述

本skill提供Word文档的中文格式标准化功能,确保文档符合中文排版规范,包括:

  • 标题和各级标题的格式化
  • 正文的字体大小和行距设置
  • 段前段后位置调整
  • 行缩进设置
  • 字体统一使用微软雅黑
  • 图片和图表的格式标准化

目录结构

sample_1/
├── SKILL.md              # 技能说明文件
├── scripts/
│   ├── format_word.py    # 核心格式化脚本
│   └── requirements.txt  # 依赖项
├── references/
│   ├── format_standard.md  # 格式标准说明
│   └── usage_guide.md      # 使用指南
└── assets/
    └── template.docx     # 模板文件

核心功能

标题格式

  • 标题:微软雅黑,2号字体,加粗,居中,段前12磅,段后6磅
  • 一级标题:微软雅黑,3号字体,加粗,左对齐,段前12磅,段后6磅
  • 二级标题:微软雅黑,4号字体,加粗,左对齐,段前6磅,段后3磅
  • 三级标题:微软雅黑,小4号字体,加粗,左对齐,段前3磅,段后3磅

正文格式

  • 字体:微软雅黑,5号字体
  • 行距:1.5倍行距
  • 段前:0磅
  • 段后:0磅
  • 首行缩进:2字符

图片和图表格式

  • 图片居中显示
  • 图片下方添加编号和说明
  • 图表标题在图表上方,居中显示
  • 图表数据标签清晰可见

使用方法

  1. 安装依赖:

    pip install -r scripts/requirements.txt
    
  2. 运行格式化脚本:

    python scripts/format_word.py <input_file> [output_file]
    

    其中:

    • <input_file>:要格式化的Word文档路径
    • [output_file]:可选,格式化后的文档保存路径,默认在原文件基础上加"_formatted"后缀

示例

命令行示例

# 格式化文档并保存为新文件
python scripts/format_word.py document.docx formatted_document.docx

# 直接在原文件基础上格式化
python scripts/format_word.py report.docx

预期效果

执行脚本后,文档将按照上述格式标准进行统一处理,确保整体风格一致,符合中文排版规范。

Reviews (0)

Sign in to write a review.

No reviews yet. Be the first to review!

Comments (0)

Sign in to join the discussion.

No comments yet. Be the first to share your thoughts!

Compatible Platforms

Pricing

Free

Related Configs