wps_word_add_page_numbers
Add automatic page numbers to specified section footers, with alignment, numbering style, and restart options. Supports thesis pagination: cover clear, front matter Roman, body Arabic.
Instructions
在指定节的页脚添加自动页码(PAGE 域),居中/居左/居右可选。支持论文完整分节页码方案(封面无页码、前置页罗马数字、正文阿拉伯数字重新计数): ① 封面(第1节):{ section_index:1, clear:true } 清空页脚。 ② 前置页/摘要目录(第2节):{ section_index:2, link_to_previous:false, restart:true, start_number:1, number_style:"roman_lower" } 断开继承 + 独立编号 + 罗马数字。 ③ 正文(第3节):{ section_index:3, link_to_previous:false, restart:true, start_number:1, number_style:"arabic" } 断开继承 + 从 1 重新编号。 注意:每一节都必须显式调用一次(哪怕只是 link_to_previous:false),否则该节页脚会默认链接到上一节、继承其内容(包括继承"空")——这是最容易漏的坑。分节数量与结构可先用 wps_word_probe_sections 查看。页码是动态域,分页后自动更新。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| align | No | 页码在页脚中的位置,默认 center | |
| clear | No | true 表示清空该节页脚全部内容(封面无页码) | |
| restart | No | true 表示从此节重新编号 | |
| number_style | No | 数字样式:阿拉伯数字/大写罗马数字/小写罗马数字,论文前置页常用 roman_lower | |
| start_number | No | restart=true 时的起始页码,默认 1 | |
| section_index | No | 目标节序号(从 1 开始),默认 1。分节数量可用 wps_word_probe_sections 查看 | |
| link_to_previous | No | false 表示断开该节页脚与上一节的链接,使本页脚独立;true/不传保持继承(会连带继承上一节页脚是空的情况) |