Layout kit command
file.new
Document
Replaces the open document with a new one from a page preset or size, with page count, facing pages, columns, gutter, margins and bleed.
- Kit
- Layout 0.1.0 (.klayout)
- Changes the document
- yes
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
bleed | number | no | points |
columns | integer | no | |
facingPages | boolean | no | |
gutter | number | no | points |
height | number | no | |
margins | number | object | no | |
pages | integer[] | no | |
preset | string | no | "Letter"|"A4"|… |
title | string | no | |
width | number | no |
Call through layout_run
text
layout_run {
"path": "<file>.klayout",
"steps": [{ "command": "file.new" }]
}The required parameters, with placeholders for their types: not a tested example. Optional: bleed, columns, facingPages, gutter, height, margins, pages, preset, title, width. layout_run answers the step’s result in completed[i].result.
Result
The kit gives no result schema for this command.
Parameter schema
json
{
"additionalProperties": false,
"properties": {
"bleed": {
"description": "points",
"type": "number"
},
"columns": {
"type": "integer"
},
"facingPages": {
"type": "boolean"
},
"gutter": {
"description": "points",
"type": "number"
},
"height": {
"type": "number"
},
"margins": {
"oneOf": [
{
"description": "points on every side",
"type": "number"
},
{
"additionalProperties": false,
"properties": {
"bottom": {
"type": "number"
},
"inside": {
"type": "number"
},
"outside": {
"type": "number"
},
"top": {
"type": "number"
}
},
"type": "object"
}
]
},
"pages": {
"items": {
"type": "integer"
},
"type": "array"
},
"preset": {
"description": "\"Letter\"|\"A4\"|…",
"type": "string"
},
"title": {
"type": "string"
},
"width": {
"type": "number"
}
},
"type": "object"
}Generated from the command list of @kition/[email protected] and the kit itself (layout_commands through @kition/[email protected], built from KitionAI/kition-layout@8767a18). As data: commands.jsonl.