define_style
Define or replace paragraph and character styles with full formatting control, or clone existing styles by reading their definitions and reapplying them.
Instructions
Create or replace a custom style (paragraph or character) with full formatting control; get_styles returns existing definitions in this exact input shape, so cloning a style is one read + one define. Auto-backup: prev/anchor slots in .ks4w-backups (backup=False skips rotation only); atomic validated save. Refuses documents open in Word.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| backup | No | ||
| based_on | No | Normal | |
| style_id | Yes | ||
| file_path | Yes | ||
| next_style | No | ||
| style_type | No | paragraph | |
| character_formatting | No | ||
| paragraph_formatting | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||