pptx-slide-specification

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

PPTX Slide Specification

PPTX幻灯片规范

Author final coordinates directly in
layout_tree
. No renderer may decide placement, shrink text, or infer layout after the audit.
直接在
layout_tree
中编写最终坐标。审核完成后,任何渲染器不得决定布局位置、缩小文本或推断布局。

Required contract

必需约定

  • The root JSON contains
    summary
    and
    slides
    .
  • Every slide has a stable
    id
    , a message-led
    title
    , an accessibility reading order, and a complete
    layout_tree
    .
  • A layout tree declares slide size, root group, id-keyed groups and objects, final inch bboxes, styles, z-indexes, and classifications.
  • Every meaningful object has
    id
    ,
    kind
    ,
    role
    ,
    classification
    ,
    content
    ,
    style
    ,
    bbox
    , and
    z_index
    .
  • Production
    summary
    contains an explicit
    layout_policy
    (safe margin, content bottom, footer top, minimum gap) and accessibility metadata.
  • 根JSON包含
    summary
    slides
    字段。
  • 每张幻灯片都有稳定的
    id
    、以信息为主的
    title
    、无障碍阅读顺序,以及完整的
    layout_tree
  • layout_tree声明幻灯片尺寸、根组、以id为键的组和对象、最终英寸边界框(bboxes)、样式、z-index和分类。
  • 每个有意义的对象都包含
    id
    kind
    role
    classification
    content
    style
    bbox
    z_index
    字段。
  • 生产环境的
    summary
    包含明确的
    layout_policy
    (安全边距、内容底部、页脚顶部、最小间距)和无障碍元数据。

Authoring rules

编写规则

  1. Use stable readable IDs, absolute groups, and positive inch dimensions.
  2. Keep normal content inside the safe margin and above the footer rail. Only background
    layout_design
    objects may be full bleed.
  3. Use native
    text
    ,
    shape
    ,
    line
    ,
    table
    , and
    image
    objects. Recreate labels and values from any supporting visual as native objects.
  4. Give meaningful images alt text. Record
    source_ref
    for sourced claims.
  5. Keep content text at 9 pt or greater; shorten, resize, or split dense content before reducing type.
  6. Use shared grids, consistent gaps, explicit color, explicit font size, and an intentional z-order.
  1. 使用稳定易读的ID、绝对组和正英寸尺寸。
  2. 将常规内容放在安全边距内且位于页脚栏上方。只有背景
    layout_design
    对象可以全屏显示。
  3. 使用原生的
    text
    shape
    line
    table
    image
    对象。将任何辅助视觉元素的标签和值重新创建为原生对象。
  4. 为有意义的图片添加替代文本。为引用的声明记录
    source_ref
  5. 内容文本保持9磅或更大字号;在缩小字号前,先缩短、调整大小或拆分密集内容。
  6. 使用共享网格、一致间距、明确颜色、明确字号和有意图的z顺序。

Build contract

构建约定

A task-local builder starts from a blank slide layout and maps all bboxes with
Inches(...)
. Explicitly set wrapping, disabled auto-size, text insets, anchors, alignment, fonts, colors, line settings, image aspect ratio, and hidden-slide state. Reject zero or negative geometry before adding an object.
See
references/layout-contract.md
for the compact schema and repair guidance.
任务本地构建器从空白幻灯片布局开始,使用
Inches(...)
映射所有边界框。明确设置环绕方式、禁用自动调整大小、文本内边距、锚点、对齐方式、字体、颜色、线条设置、图片宽高比和隐藏幻灯片状态。在添加对象前,拒绝零值或负值的几何参数。
有关紧凑架构和修复指南,请参阅
references/layout-contract.md