这个 skill 用来处理“PPT 比例改造 + 文字重排”。
它适合这类任务:
默认优先使用“保留源稿高度 + 套用参考稿宽高比”的方式,而不是直接把页面压成参考稿的绝对尺寸。
这样更稳的原因是:
python3 scripts/pptx_layout_dump.py /path/to/source.pptx --pretty
python3 scripts/pptx_layout_dump.py /path/to/reference.pptx --pretty
重点看:
默认公式:
target_width = source_height * (reference_width / reference_height)
target_height = source_height
如果用户明确要求精确尺寸,才直接使用参考稿的 width x height。
超宽重排时,默认先建立一个“居中的内容安全区”,把原始版心整体映射进去,再做小幅微调。
优先遵守这些规则:
优先把每页归为以下类型之一:
页面信息很多时,不要为了“看起来像超宽”而把内容排得过散。优先保证层级、可读性和块内安全。
python3 scripts/pptx_layout_dump.py /path/to/file.pptx --pretty
python3 scripts/pptx_ultrawide_relayout.py \
/path/to/source.pptx \
--reference /path/to/reference.pptx \
--output /path/to/output.pptx
默认行为:
如果用户明确要求精确尺寸:
python3 scripts/pptx_ultrawide_relayout.py \
/path/to/source.pptx \
--reference /path/to/reference.pptx \
--target-mode exact-reference \
--output /path/to/output.pptx
PPTX 本质是 zip 包。常见关键文件:
ppt/presentation.xmlppt/slides/slideN.xmlppt/theme/theme1.xml重点关注这些节点:
p:sldSz:画布宽高a:xfrm:元素位置和尺寸a:off:左上角坐标a:ext:宽高a:rPr:文本字号、字重、颜色、字体文字适配时优先这样做:
不要这样做:
共 1 个版本