Layout kit command

frame.thread

Thread Text Frames

Threads a text frame's story into another frame (or a new frame drawn on a spread).

Kit
Layout 0.1.0 (.klayout)
Changes the document
yes

Parameters

Parameters of frame.thread
NameTypeRequiredDescription
atintegernoread by the command beside its listed parameters
autoflowbooleannoShift-click: then add pages with frames on their margins, threaded, until the story fits
fromintegernoan object id from file.inspect or object.list
keepLoadedbooleannoload the text cursor again from the frame
orientationstringnoread by the command beside its listed parameters
pageintegerno1-based: a new text frame on the page's margins
positionstringnoread by the command beside its listed parameters
rectnumber[]no[x0, y0, x1, y1]; a new text frame there, spread coords
side"out" | "in"nodefault out: the frame follows `from`; in: it goes before `from`
spreadinteger | object | stringnothe spread (default spread 0, for frame.thread the source frame's spread); one that names no spread is refused
spreadGuidebooleannoread by the command beside its listed parameters
tointegernoan object id from file.inspect or object.list

Call through layout_run

text
layout_run {
  "path": "<file>.klayout",
  "steps": [{ "command": "frame.thread" }]
}

The required parameters, with placeholders for their types: not a tested example. Optional: at, autoflow, from, keepLoaded, orientation, page, position, rect, side, spread, spreadGuide, to. 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": {
    "at": {
      "description": "read by the command beside its listed parameters",
      "type": "integer"
    },
    "autoflow": {
      "description": "Shift-click: then add pages with frames on their margins, threaded, until the story fits",
      "type": "boolean"
    },
    "from": {
      "description": "an object id from file.inspect or object.list",
      "type": "integer",
      "x-khp-types": [
        "Item"
      ]
    },
    "keepLoaded": {
      "description": "load the text cursor again from the frame",
      "type": "boolean"
    },
    "orientation": {
      "description": "read by the command beside its listed parameters",
      "type": "string"
    },
    "page": {
      "description": "1-based: a new text frame on the page's margins",
      "type": "integer"
    },
    "position": {
      "description": "read by the command beside its listed parameters",
      "type": "string"
    },
    "rect": {
      "description": "[x0, y0, x1, y1]; a new text frame there, spread coords",
      "items": {
        "type": "number"
      },
      "type": "array"
    },
    "side": {
      "description": "default out: the frame follows `from`; in: it goes before `from`",
      "enum": [
        "out",
        "in"
      ],
      "type": "string"
    },
    "spread": {
      "description": "the spread (default spread 0, for frame.thread the source frame's spread); one that names no spread is refused",
      "oneOf": [
        {
          "description": "a spread counted from 0",
          "type": "integer"
        },
        {
          "additionalProperties": true,
          "description": "a spread reference {kind: doc|parent, index} (parent spreads counted from 0)",
          "type": "object"
        },
        {
          "description": "a parent spread's prefix or label, such as A or A-Parent",
          "type": "string"
        }
      ]
    },
    "spreadGuide": {
      "description": "read by the command beside its listed parameters",
      "type": "boolean"
    },
    "to": {
      "description": "an object id from file.inspect or object.list",
      "type": "integer",
      "x-khp-types": [
        "Item"
      ]
    }
  },
  "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.