Doc kit command
table.newStyle
New Table Style
Creates a table style with formatting for the whole table and its regions (header row, last row, banded rows…).
- Kit
- Doc 0.1.0 (.docx)
- Changes the document
- yes
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
apply | boolean | no | |
bandSize | integer | no | rows per band |
bandedColumns | object | no | a table style region's shortcuts |
bandedRows | object | no | a table style region's shortcuts |
basedOn | string | no | |
firstColumn | object | no | a table style region's shortcuts |
headerRow | object | no | a table style region's shortcuts |
lastColumn | object | no | a table style region's shortcuts |
lastRow | object | no | a table style region's shortcuts |
name | string | no | |
para | object | no | paragraph properties as paragraph.dialog answers them (alignment, indents, spacing…); colours (shading, border colors) are "RRGGBB"; a paragraph style that sets a property itself (Normal included) wins over the table style's |
wholeTable | object | no | a table style region's shortcuts |
Call through doc_run
text
doc_run {
"path": "<file>.docx",
"steps": [{ "command": "table.newStyle" }]
}The required parameters, with placeholders for their types: not a tested example. Optional: apply, bandSize, bandedColumns, bandedRows, basedOn, firstColumn, headerRow, lastColumn, lastRow, name, para, wholeTable. doc_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": {
"apply": {
"type": "boolean"
},
"bandSize": {
"description": "rows per band",
"type": "integer"
},
"bandedColumns": {
"additionalProperties": true,
"description": "a table style region's shortcuts",
"properties": {
"bold": {
"type": "boolean"
},
"borderColor": {
"oneOf": [
{
"description": "RRGGBB",
"type": "string"
},
{
"type": "null"
}
]
},
"borderWidth": {
"description": "points",
"type": "number"
},
"borders": {
"description": "true: single lines, false: none, null: inherit",
"oneOf": [
{
"type": "boolean"
},
{
"type": "null"
}
]
},
"color": {
"oneOf": [
{
"description": "RRGGBB",
"type": "string"
},
{
"type": "null"
}
]
},
"fill": {
"oneOf": [
{
"description": "RRGGBB",
"type": "string"
},
{
"type": "null"
}
]
},
"font": {
"type": "string"
},
"italic": {
"type": "boolean"
},
"size": {
"description": "points",
"type": "number"
}
},
"type": "object"
},
"bandedRows": {
"additionalProperties": true,
"description": "a table style region's shortcuts",
"properties": {
"bold": {
"type": "boolean"
},
"borderColor": {
"oneOf": [
{
"description": "RRGGBB",
"type": "string"
},
{
"type": "null"
}
]
},
"borderWidth": {
"description": "points",
"type": "number"
},
"borders": {
"description": "true: single lines, false: none, null: inherit",
"oneOf": [
{
"type": "boolean"
},
{
"type": "null"
}
]
},
"color": {
"oneOf": [
{
"description": "RRGGBB",
"type": "string"
},
{
"type": "null"
}
]
},
"fill": {
"oneOf": [
{
"description": "RRGGBB",
"type": "string"
},
{
"type": "null"
}
]
},
"font": {
"type": "string"
},
"italic": {
"type": "boolean"
},
"size": {
"description": "points",
"type": "number"
}
},
"type": "object"
},
"basedOn": {
"type": "string"
},
"firstColumn": {
"additionalProperties": true,
"description": "a table style region's shortcuts",
"properties": {
"bold": {
"type": "boolean"
},
"borderColor": {
"oneOf": [
{
"description": "RRGGBB",
"type": "string"
},
{
"type": "null"
}
]
},
"borderWidth": {
"description": "points",
"type": "number"
},
"borders": {
"description": "true: single lines, false: none, null: inherit",
"oneOf": [
{
"type": "boolean"
},
{
"type": "null"
}
]
},
"color": {
"oneOf": [
{
"description": "RRGGBB",
"type": "string"
},
{
"type": "null"
}
]
},
"fill": {
"oneOf": [
{
"description": "RRGGBB",
"type": "string"
},
{
"type": "null"
}
]
},
"font": {
"type": "string"
},
"italic": {
"type": "boolean"
},
"size": {
"description": "points",
"type": "number"
}
},
"type": "object"
},
"headerRow": {
"additionalProperties": true,
"description": "a table style region's shortcuts",
"properties": {
"bold": {
"type": "boolean"
},
"borderColor": {
"oneOf": [
{
"description": "RRGGBB",
"type": "string"
},
{
"type": "null"
}
]
},
"borderWidth": {
"description": "points",
"type": "number"
},
"borders": {
"description": "true: single lines, false: none, null: inherit",
"oneOf": [
{
"type": "boolean"
},
{
"type": "null"
}
]
},
"color": {
"oneOf": [
{
"description": "RRGGBB",
"type": "string"
},
{
"type": "null"
}
]
},
"fill": {
"oneOf": [
{
"description": "RRGGBB",
"type": "string"
},
{
"type": "null"
}
]
},
"font": {
"type": "string"
},
"italic": {
"type": "boolean"
},
"size": {
"description": "points",
"type": "number"
}
},
"type": "object"
},
"lastColumn": {
"additionalProperties": true,
"description": "a table style region's shortcuts",
"properties": {
"bold": {
"type": "boolean"
},
"borderColor": {
"oneOf": [
{
"description": "RRGGBB",
"type": "string"
},
{
"type": "null"
}
]
},
"borderWidth": {
"description": "points",
"type": "number"
},
"borders": {
"description": "true: single lines, false: none, null: inherit",
"oneOf": [
{
"type": "boolean"
},
{
"type": "null"
}
]
},
"color": {
"oneOf": [
{
"description": "RRGGBB",
"type": "string"
},
{
"type": "null"
}
]
},
"fill": {
"oneOf": [
{
"description": "RRGGBB",
"type": "string"
},
{
"type": "null"
}
]
},
"font": {
"type": "string"
},
"italic": {
"type": "boolean"
},
"size": {
"description": "points",
"type": "number"
}
},
"type": "object"
},
"lastRow": {
"additionalProperties": true,
"description": "a table style region's shortcuts",
"properties": {
"bold": {
"type": "boolean"
},
"borderColor": {
"oneOf": [
{
"description": "RRGGBB",
"type": "string"
},
{
"type": "null"
}
]
},
"borderWidth": {
"description": "points",
"type": "number"
},
"borders": {
"description": "true: single lines, false: none, null: inherit",
"oneOf": [
{
"type": "boolean"
},
{
"type": "null"
}
]
},
"color": {
"oneOf": [
{
"description": "RRGGBB",
"type": "string"
},
{
"type": "null"
}
]
},
"fill": {
"oneOf": [
{
"description": "RRGGBB",
"type": "string"
},
{
"type": "null"
}
]
},
"font": {
"type": "string"
},
"italic": {
"type": "boolean"
},
"size": {
"description": "points",
"type": "number"
}
},
"type": "object"
},
"name": {
"type": "string"
},
"para": {
"additionalProperties": true,
"description": "paragraph properties as paragraph.dialog answers them (alignment, indents, spacing…); colours (shading, border colors) are \"RRGGBB\"; a paragraph style that sets a property itself (Normal included) wins over the table style's",
"type": "object"
},
"wholeTable": {
"additionalProperties": true,
"description": "a table style region's shortcuts",
"properties": {
"bold": {
"type": "boolean"
},
"borderColor": {
"oneOf": [
{
"description": "RRGGBB",
"type": "string"
},
{
"type": "null"
}
]
},
"borderWidth": {
"description": "points",
"type": "number"
},
"borders": {
"description": "true: single lines, false: none, null: inherit",
"oneOf": [
{
"type": "boolean"
},
{
"type": "null"
}
]
},
"color": {
"oneOf": [
{
"description": "RRGGBB",
"type": "string"
},
{
"type": "null"
}
]
},
"fill": {
"oneOf": [
{
"description": "RRGGBB",
"type": "string"
},
{
"type": "null"
}
]
},
"font": {
"type": "string"
},
"italic": {
"type": "boolean"
},
"size": {
"description": "points",
"type": "number"
}
},
"type": "object"
}
},
"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.