Doc kit command

page.section

Section Properties

Answers the current section's page properties: size, orientation, margins, columns and header settings.

Kit
Doc 0.1.0 (.docx)
Changes the document
no

Parameters

None.

Call through doc_run

text
doc_run {
  "path": "<file>.docx",
  "steps": [{ "command": "page.section" }]
}

The required parameters, with placeholders for their types: not a tested example. doc_run answers the step’s result in completed[i].result.

Result

Result of page.section
NameTypeRequiredDescription
columnsobjectno
footernumberno
footersobjectno
gutternumberno
headernumberno
headersobjectno
landscapebooleanno
lineNumbersanyno
marginBottomnumberno
marginLeftnumberno
marginRightnumberno
marginTopnumberno
pageBordersanyno
pageHnumberno
pageNumFormatstringno
pageNumStartanyno
pageWnumberno
rtlbooleanno
startstringno
titlePagebooleanno
valignstringno
Result JSON Schema
json
{
  "additionalProperties": true,
  "properties": {
    "columns": {
      "additionalProperties": true,
      "properties": {
        "count": {
          "type": "number"
        },
        "separator": {
          "type": "boolean"
        },
        "space": {
          "type": "number"
        },
        "widths": {
          "type": "array"
        }
      },
      "type": "object"
    },
    "footer": {
      "type": "number"
    },
    "footers": {
      "additionalProperties": true,
      "properties": {
        "default": {},
        "even": {},
        "first": {}
      },
      "type": "object"
    },
    "gutter": {
      "type": "number"
    },
    "header": {
      "type": "number"
    },
    "headers": {
      "additionalProperties": true,
      "properties": {
        "default": {},
        "even": {},
        "first": {}
      },
      "type": "object"
    },
    "landscape": {
      "type": "boolean"
    },
    "lineNumbers": {},
    "marginBottom": {
      "type": "number"
    },
    "marginLeft": {
      "type": "number"
    },
    "marginRight": {
      "type": "number"
    },
    "marginTop": {
      "type": "number"
    },
    "pageBorders": {},
    "pageH": {
      "type": "number"
    },
    "pageNumFormat": {
      "type": "string"
    },
    "pageNumStart": {},
    "pageW": {
      "type": "number"
    },
    "rtl": {
      "type": "boolean"
    },
    "start": {
      "type": "string"
    },
    "titlePage": {
      "type": "boolean"
    },
    "valign": {
      "type": "string"
    }
  },
  "type": "object"
}

Generated from the command list of @kition/[email protected] and the kit itself (doc_commands through @kition/[email protected], built from KitionAI/kition-doc@41e14a8). As data: commands.jsonl.