{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "format": { "type": "string", "const": "ackw" },
    "version": { "type": "string", "const": "1.0" },
    "metadata": {
      "type": "object",
      "properties": {
        "id": { "type": "string", "minLength": 1 },
        "title": { "type": "string", "maxLength": 1000 },
        "language": {
          "type": "string",
          "pattern": "^[a-zA-Z]{2,8}(?:-[a-zA-Z0-9]{1,8})*$"
        },
        "authors": {
          "maxItems": 100,
          "type": "array",
          "items": { "$ref": "#/$defs/__schema0" }
        },
        "createdAt": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        },
        "modifiedAt": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        }
      },
      "required": ["id", "title", "language", "authors"],
      "additionalProperties": false
    },
    "generator": {
      "type": "object",
      "properties": {
        "name": { "type": "string", "minLength": 1, "maxLength": 200 },
        "version": { "type": "string", "minLength": 1, "maxLength": 100 }
      },
      "required": ["name", "version"],
      "additionalProperties": false
    },
    "settings": {
      "type": "object",
      "properties": {
        "styles": {
          "minItems": 1,
          "maxItems": 100,
          "type": "array",
          "items": { "$ref": "#/$defs/__schema1" }
        },
        "footnoteStyle": { "$ref": "#/$defs/__schema12" },
        "bibliographySources": {
          "maxItems": 500,
          "type": "array",
          "items": { "$ref": "#/$defs/__schema13" }
        },
        "indexTerms": {
          "type": "array",
          "items": { "$ref": "#/$defs/__schema14" }
        },
        "captionCategories": {
          "maxItems": 100,
          "type": "array",
          "items": { "$ref": "#/$defs/__schema15" }
        }
      },
      "required": ["styles"],
      "additionalProperties": false
    },
    "sections": {
      "minItems": 1,
      "type": "array",
      "items": { "$ref": "#/$defs/__schema17" }
    },
    "document": {
      "type": "object",
      "properties": {
        "type": { "type": "string", "const": "document" },
        "content": {
          "minItems": 1,
          "type": "array",
          "items": { "$ref": "#/$defs/__schema76" }
        }
      },
      "required": ["type", "content"],
      "additionalProperties": false
    }
  },
  "required": [
    "format",
    "version",
    "metadata",
    "generator",
    "settings",
    "sections",
    "document"
  ],
  "additionalProperties": false,
  "$defs": {
    "__schema0": { "type": "string", "minLength": 1, "maxLength": 300 },
    "__schema1": {
      "type": "object",
      "properties": {
        "id": { "type": "string", "minLength": 1, "maxLength": 100 },
        "name": { "type": "string", "minLength": 1, "maxLength": 80 },
        "level": {
          "default": 0,
          "type": "integer",
          "minimum": 0,
          "maximum": 6
        },
        "text": { "$ref": "#/$defs/__schema2" },
        "paragraph": { "$ref": "#/$defs/__schema7" }
      },
      "required": ["id"],
      "additionalProperties": false
    },
    "__schema2": { "default": {}, "$ref": "#/$defs/__schema3" },
    "__schema3": {
      "type": "object",
      "properties": {
        "fontFamily": { "$ref": "#/$defs/__schema4" },
        "fontSizePx": { "$ref": "#/$defs/__schema5" },
        "bold": { "type": "boolean" },
        "italic": { "type": "boolean" },
        "underline": { "type": "boolean" },
        "strike": { "type": "boolean" },
        "code": { "type": "boolean" },
        "verticalPosition": {
          "type": "string",
          "enum": ["normal", "superscript", "subscript"]
        },
        "color": { "$ref": "#/$defs/__schema6" },
        "underlineColor": {
          "anyOf": [{ "$ref": "#/$defs/__schema6" }, { "type": "null" }]
        },
        "highlightColor": {
          "anyOf": [{ "$ref": "#/$defs/__schema6" }, { "type": "null" }]
        }
      },
      "additionalProperties": false
    },
    "__schema4": {
      "type": "string",
      "enum": [
        "default",
        "inter",
        "sourceSerif4",
        "carlito",
        "caladea",
        "liberationSans",
        "liberationSerif",
        "liberationMono"
      ]
    },
    "__schema5": { "type": "number", "minimum": 8, "maximum": 200 },
    "__schema6": { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$" },
    "__schema7": { "default": {}, "$ref": "#/$defs/__schema8" },
    "__schema8": {
      "type": "object",
      "properties": {
        "pageBreakBefore": { "type": "boolean" },
        "indentLeftMm": { "$ref": "#/$defs/__schema9" },
        "indentRightMm": { "$ref": "#/$defs/__schema9" },
        "specialIndent": {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "enum": ["none", "firstLine", "hanging"]
            },
            "distanceMm": { "$ref": "#/$defs/__schema9" }
          },
          "required": ["type", "distanceMm"],
          "additionalProperties": false
        },
        "tabIntervalMm": { "type": "number", "minimum": 1, "maximum": 1000 },
        "tabStops": {
          "maxItems": 50,
          "type": "array",
          "items": { "$ref": "#/$defs/__schema10" }
        },
        "alignment": { "$ref": "#/$defs/__schema11" },
        "lineSpacing": { "type": "number", "minimum": 0, "maximum": 20 },
        "keepLinesTogether": { "type": "boolean" },
        "spacingBeforeMm": { "type": "number", "minimum": 0, "maximum": 1000 },
        "spacingAfterMm": { "type": "number", "minimum": 0, "maximum": 1000 }
      },
      "additionalProperties": false
    },
    "__schema9": { "type": "number", "minimum": 0, "maximum": 1000 },
    "__schema10": {
      "type": "object",
      "properties": {
        "positionMm": { "exclusiveMinimum": 0, "$ref": "#/$defs/__schema9" },
        "alignment": {
          "type": "string",
          "enum": ["left", "center", "right", "decimal"]
        }
      },
      "required": ["positionMm", "alignment"],
      "additionalProperties": false
    },
    "__schema11": {
      "type": "string",
      "enum": ["left", "center", "right", "justify"]
    },
    "__schema12": {
      "type": "object",
      "properties": {
        "text": { "$ref": "#/$defs/__schema2" },
        "paragraph": { "$ref": "#/$defs/__schema7" }
      },
      "additionalProperties": false
    },
    "__schema13": {
      "type": "object",
      "properties": {
        "id": { "type": "string", "minLength": 1, "maxLength": 100 },
        "title": { "type": "string", "minLength": 1, "maxLength": 500 },
        "author": { "type": "string", "maxLength": 300 },
        "year": { "type": "string", "maxLength": 30 },
        "url": {
          "anyOf": [
            { "type": "string", "const": "" },
            {
              "type": "string",
              "maxLength": 4096,
              "pattern": "^[Hh][Tt][Tt][Pp][Ss]?:\\/\\/[^\\s]+$"
            }
          ]
        }
      },
      "required": ["id", "title", "author", "year", "url"],
      "additionalProperties": false
    },
    "__schema14": { "type": "string", "minLength": 1, "maxLength": 150 },
    "__schema15": {
      "type": "object",
      "properties": {
        "id": { "$ref": "#/$defs/__schema16" },
        "name": { "type": "string", "minLength": 1, "maxLength": 80 }
      },
      "required": ["id", "name"],
      "additionalProperties": false
    },
    "__schema16": { "type": "string", "minLength": 1, "maxLength": 100 },
    "__schema17": {
      "type": "object",
      "properties": {
        "id": { "$ref": "#/$defs/__schema18" },
        "name": { "$ref": "#/$defs/__schema19" },
        "page": { "$ref": "#/$defs/__schema20" },
        "columns": { "$ref": "#/$defs/__schema32" },
        "pageNumbering": { "$ref": "#/$defs/__schema38" },
        "headerFooter": { "$ref": "#/$defs/__schema42" }
      },
      "required": ["id", "page", "columns"],
      "additionalProperties": false
    },
    "__schema18": { "type": "string", "minLength": 1 },
    "__schema19": { "type": "string", "minLength": 1, "maxLength": 120 },
    "__schema20": {
      "type": "object",
      "properties": {
        "widthMm": { "$ref": "#/$defs/__schema21" },
        "heightMm": { "$ref": "#/$defs/__schema22" },
        "margin": { "$ref": "#/$defs/__schema23" },
        "background": { "$ref": "#/$defs/__schema25" },
        "backgroundColor": { "$ref": "#/$defs/__schema31" }
      },
      "required": ["widthMm", "heightMm", "margin"],
      "additionalProperties": false
    },
    "__schema21": { "type": "number", "exclusiveMinimum": 0 },
    "__schema22": { "type": "number", "exclusiveMinimum": 0 },
    "__schema23": {
      "type": "object",
      "properties": {
        "topMm": { "default": 0, "$ref": "#/$defs/__schema24" },
        "rightMm": { "default": 0, "$ref": "#/$defs/__schema24" },
        "bottomMm": { "default": 0, "$ref": "#/$defs/__schema24" },
        "leftMm": { "default": 0, "$ref": "#/$defs/__schema24" }
      },
      "additionalProperties": false
    },
    "__schema24": { "type": "number", "minimum": 0, "maximum": 2000 },
    "__schema25": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "type": { "type": "string", "const": "image" },
            "respectMargins": { "$ref": "#/$defs/__schema26" },
            "opacity": { "$ref": "#/$defs/__schema27" },
            "rotationDegrees": { "$ref": "#/$defs/__schema28" },
            "position": { "$ref": "#/$defs/__schema29" },
            "image": {
              "type": "object",
              "properties": {
                "src": { "$ref": "#/$defs/__schema30" },
                "widthPx": { "type": "number", "exclusiveMinimum": 0 },
                "heightPx": { "type": "number", "exclusiveMinimum": 0 }
              },
              "required": ["src", "widthPx", "heightPx"],
              "additionalProperties": false
            },
            "sizing": {
              "type": "object",
              "properties": {
                "mode": {
                  "default": "contain",
                  "type": "string",
                  "enum": ["contain", "cover", "fixed"]
                },
                "widthMm": {
                  "default": 100,
                  "type": "number",
                  "minimum": 0.05,
                  "maximum": 2000
                },
                "heightMm": {
                  "default": 100,
                  "type": "number",
                  "minimum": 0.05,
                  "maximum": 2000
                }
              },
              "additionalProperties": false
            }
          },
          "required": ["type", "position", "sizing"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": { "type": "string", "const": "text" },
            "respectMargins": { "$ref": "#/$defs/__schema26" },
            "opacity": { "$ref": "#/$defs/__schema27" },
            "rotationDegrees": { "$ref": "#/$defs/__schema28" },
            "position": { "$ref": "#/$defs/__schema29" },
            "text": {
              "type": "string",
              "maxLength": 500,
              "pattern": "^[^\\r\\n]*$"
            },
            "fontFamily": { "default": "carlito", "$ref": "#/$defs/__schema4" },
            "fontSizePx": { "default": 64, "$ref": "#/$defs/__schema5" },
            "color": { "default": "#808080", "$ref": "#/$defs/__schema6" }
          },
          "required": ["type", "position", "text"],
          "additionalProperties": false
        }
      ]
    },
    "__schema26": { "type": "boolean" },
    "__schema27": {
      "default": 0.15,
      "type": "number",
      "minimum": 0,
      "maximum": 1
    },
    "__schema28": {
      "default": 0,
      "type": "number",
      "minimum": -360,
      "maximum": 360
    },
    "__schema29": {
      "type": "object",
      "properties": {
        "horizontal": {
          "default": "center",
          "type": "string",
          "enum": ["left", "center", "right"]
        },
        "vertical": {
          "default": "center",
          "type": "string",
          "enum": ["top", "center", "bottom"]
        },
        "offsetXMm": {
          "default": 0,
          "type": "number",
          "minimum": -2000,
          "maximum": 2000
        },
        "offsetYMm": {
          "default": 0,
          "type": "number",
          "minimum": -2000,
          "maximum": 2000
        }
      },
      "additionalProperties": false
    },
    "__schema30": {
      "type": "string",
      "pattern": "^(?:[Hh][Tt][Tt][Pp][Ss]?:\\/\\/[^\\s]+|[Dd][Aa][Tt][Aa]:[Ii][Mm][Aa][Gg][Ee]\\/(?:[Pp][Nn][Gg]|[Jj][Pp][Ee][Gg]|[Gg][Ii][Ff]|[Ww][Ee][Bb][Pp]);[Bb][Aa][Ss][Ee]64,[a-zA-Z0-9+/=\\s]+)$"
    },
    "__schema31": { "default": "#ffffff", "$ref": "#/$defs/__schema6" },
    "__schema32": {
      "type": "object",
      "properties": {
        "count": { "$ref": "#/$defs/__schema33" },
        "gapMm": { "$ref": "#/$defs/__schema34" },
        "widthsPercent": { "$ref": "#/$defs/__schema35" },
        "balance": { "$ref": "#/$defs/__schema37" }
      },
      "required": ["count"],
      "additionalProperties": false
    },
    "__schema33": { "type": "integer", "minimum": 1, "maximum": 20 },
    "__schema34": { "default": 8, "$ref": "#/$defs/__schema24" },
    "__schema35": {
      "minItems": 1,
      "maxItems": 20,
      "type": "array",
      "items": { "$ref": "#/$defs/__schema36" }
    },
    "__schema36": { "type": "number", "exclusiveMinimum": 0 },
    "__schema37": {
      "default": "sequential",
      "type": "string",
      "const": "sequential"
    },
    "__schema38": {
      "type": "object",
      "properties": {
        "mode": { "$ref": "#/$defs/__schema39" },
        "start": { "$ref": "#/$defs/__schema40" },
        "format": { "$ref": "#/$defs/__schema41" }
      },
      "required": ["mode", "format"],
      "additionalProperties": false
    },
    "__schema39": { "type": "string", "enum": ["continue", "restart"] },
    "__schema40": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "__schema41": {
      "type": "string",
      "enum": [
        "decimal",
        "lowerRoman",
        "upperRoman",
        "lowerAlpha",
        "upperAlpha"
      ]
    },
    "__schema42": {
      "type": "object",
      "properties": {
        "inheritPrevious": { "default": false, "type": "boolean" },
        "content": {
          "type": "object",
          "propertyNames": {
            "type": "string",
            "enum": [
              "header",
              "footer",
              "firstHeader",
              "firstFooter",
              "evenHeader",
              "evenFooter"
            ]
          },
          "additionalProperties": {
            "type": "object",
            "properties": {
              "type": { "type": "string", "const": "document" },
              "content": {
                "minItems": 1,
                "type": "array",
                "items": { "$ref": "#/$defs/__schema43" }
              }
            },
            "required": ["type", "content"],
            "additionalProperties": false
          }
        },
        "headerEnabled": { "default": true, "type": "boolean" },
        "footerEnabled": { "default": true, "type": "boolean" },
        "differentFirstPage": { "default": false, "type": "boolean" },
        "differentOddEvenPages": { "default": false, "type": "boolean" },
        "headerDistanceMm": { "default": 12.5, "$ref": "#/$defs/__schema24" },
        "footerDistanceMm": { "default": 12.5, "$ref": "#/$defs/__schema24" },
        "headerMinimumHeightMm": { "default": 0, "$ref": "#/$defs/__schema24" },
        "footerMinimumHeightMm": { "default": 0, "$ref": "#/$defs/__schema24" },
        "contentGapMm": { "default": 3, "$ref": "#/$defs/__schema24" }
      },
      "additionalProperties": false
    },
    "__schema43": {
      "oneOf": [
        { "$ref": "#/$defs/__schema44" },
        { "$ref": "#/$defs/__schema51" },
        { "$ref": "#/$defs/__schema52" },
        {
          "type": "object",
          "properties": {
            "type": { "$ref": "#/$defs/__schema54" },
            "attrs": { "$ref": "#/$defs/__schema55" },
            "content": { "$ref": "#/$defs/__schema59" }
          },
          "required": ["type", "attrs", "content"],
          "additionalProperties": false
        }
      ]
    },
    "__schema44": {
      "type": "object",
      "properties": {
        "type": { "type": "string", "const": "paragraph" },
        "attrs": {
          "type": "object",
          "properties": {
            "id": { "$ref": "#/$defs/__schema18" },
            "styleId": { "$ref": "#/$defs/__schema45" },
            "textStyle": { "$ref": "#/$defs/__schema46" },
            "paragraphStyle": { "$ref": "#/$defs/__schema47" }
          },
          "required": ["id"],
          "additionalProperties": false
        },
        "content": {
          "type": "array",
          "items": { "$ref": "#/$defs/__schema48" }
        }
      },
      "required": ["type", "attrs"],
      "additionalProperties": false
    },
    "__schema45": { "$ref": "#/$defs/__schema18" },
    "__schema46": { "$ref": "#/$defs/__schema3" },
    "__schema47": { "$ref": "#/$defs/__schema8" },
    "__schema48": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "type": { "type": "string", "const": "crossReference" },
            "attrs": {
              "type": "object",
              "properties": { "targetId": { "$ref": "#/$defs/__schema18" } },
              "required": ["targetId"],
              "additionalProperties": false
            },
            "textStyle": { "$ref": "#/$defs/__schema49" },
            "annotations": { "$ref": "#/$defs/__schema50" }
          },
          "required": ["type", "attrs"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": { "type": "string", "const": "text" },
            "text": { "type": "string", "minLength": 1 },
            "textStyle": { "$ref": "#/$defs/__schema49" },
            "annotations": { "$ref": "#/$defs/__schema50" }
          },
          "required": ["type", "text"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": { "type": "string", "enum": ["tab", "hardBreak"] },
            "textStyle": { "$ref": "#/$defs/__schema49" },
            "annotations": { "$ref": "#/$defs/__schema50" }
          },
          "required": ["type"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": { "type": "string", "const": "citation" },
            "attrs": {
              "type": "object",
              "properties": {
                "id": { "$ref": "#/$defs/__schema18" },
                "sourceId": { "$ref": "#/$defs/__schema18" }
              },
              "required": ["id", "sourceId"],
              "additionalProperties": false
            },
            "textStyle": { "$ref": "#/$defs/__schema49" },
            "annotations": { "$ref": "#/$defs/__schema50" }
          },
          "required": ["type", "attrs"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": { "type": "string", "const": "footnote" },
            "attrs": {
              "type": "object",
              "properties": {
                "id": { "$ref": "#/$defs/__schema18" },
                "text": { "type": "string", "minLength": 1, "maxLength": 4000 }
              },
              "required": ["id", "text"],
              "additionalProperties": false
            },
            "textStyle": { "$ref": "#/$defs/__schema49" },
            "annotations": { "$ref": "#/$defs/__schema50" }
          },
          "required": ["type", "attrs"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": { "type": "string", "const": "pageField" },
            "attrs": {
              "type": "object",
              "properties": {
                "field": {
                  "type": "string",
                  "enum": ["pageNumber", "totalPages"]
                }
              },
              "required": ["field"],
              "additionalProperties": false
            },
            "textStyle": { "$ref": "#/$defs/__schema49" },
            "annotations": { "$ref": "#/$defs/__schema50" }
          },
          "required": ["type", "attrs"],
          "additionalProperties": false
        }
      ]
    },
    "__schema49": { "$ref": "#/$defs/__schema3" },
    "__schema50": {
      "type": "array",
      "items": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "type": { "type": "string", "const": "link" },
              "attrs": {
                "type": "object",
                "properties": {
                  "href": {
                    "type": "string",
                    "maxLength": 4096,
                    "pattern": "^(?:[Hh][Tt][Tt][Pp][Ss]?:\\/\\/[^\\s]+|[Mm][Aa][Ii][Ll][Tt][Oo]:[^\\s@]+@[^\\s]+|[Tt][Ee][Ll]:[+\\d][\\d ()-]*|#[a-zA-Z0-9_-]+)$"
                  }
                },
                "required": ["href"],
                "additionalProperties": false
              }
            },
            "required": ["type", "attrs"],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "type": { "type": "string", "const": "indexEntry" },
              "attrs": {
                "type": "object",
                "properties": {
                  "term": { "type": "string", "minLength": 1, "maxLength": 150 }
                },
                "required": ["term"],
                "additionalProperties": false
              }
            },
            "required": ["type", "attrs"],
            "additionalProperties": false
          }
        ]
      }
    },
    "__schema51": {
      "type": "object",
      "properties": {
        "type": { "type": "string", "const": "heading" },
        "attrs": {
          "type": "object",
          "properties": {
            "id": { "$ref": "#/$defs/__schema18" },
            "styleId": { "$ref": "#/$defs/__schema45" },
            "textStyle": { "$ref": "#/$defs/__schema46" },
            "paragraphStyle": { "$ref": "#/$defs/__schema47" },
            "level": { "type": "integer", "minimum": 1, "maximum": 6 }
          },
          "required": ["id", "level"],
          "additionalProperties": false
        },
        "content": {
          "type": "array",
          "items": { "$ref": "#/$defs/__schema48" }
        }
      },
      "required": ["type", "attrs"],
      "additionalProperties": false
    },
    "__schema52": {
      "type": "object",
      "properties": {
        "type": { "type": "string", "enum": ["bulletList", "orderedList"] },
        "attrs": {
          "type": "object",
          "properties": {
            "id": { "$ref": "#/$defs/__schema18" },
            "order": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            }
          },
          "required": ["id"],
          "additionalProperties": false
        },
        "content": {
          "minItems": 1,
          "type": "array",
          "items": { "$ref": "#/$defs/__schema53" }
        }
      },
      "required": ["type", "attrs", "content"],
      "additionalProperties": false
    },
    "__schema53": {
      "type": "object",
      "properties": {
        "type": { "type": "string", "const": "listItem" },
        "attrs": {
          "type": "object",
          "properties": { "id": { "$ref": "#/$defs/__schema18" } },
          "required": ["id"],
          "additionalProperties": false
        },
        "content": {
          "minItems": 1,
          "type": "array",
          "items": { "$ref": "#/$defs/__schema43" }
        }
      },
      "required": ["type", "attrs", "content"],
      "additionalProperties": false
    },
    "__schema54": { "type": "string", "const": "cell" },
    "__schema55": {
      "type": "object",
      "properties": {
        "id": { "$ref": "#/$defs/__schema18" },
        "anchor": {
          "type": "object",
          "properties": { "blockId": { "$ref": "#/$defs/__schema18" } },
          "required": ["blockId"],
          "additionalProperties": false
        },
        "caption": {
          "type": "object",
          "properties": {
            "kind": { "$ref": "#/$defs/__schema16" },
            "alsoIn": {
              "maxItems": 100,
              "type": "array",
              "items": { "$ref": "#/$defs/__schema16" }
            },
            "text": { "type": "string", "maxLength": 1000 },
            "position": {
              "default": "below",
              "type": "string",
              "enum": ["above", "below"]
            },
            "style": { "$ref": "#/$defs/__schema12" }
          },
          "required": ["kind", "text"],
          "additionalProperties": false
        },
        "placement": {
          "type": "object",
          "properties": {
            "flow": {
              "default": "around",
              "type": "string",
              "enum": ["around", "through", "below"]
            },
            "horizontalOffsetPercent": {
              "default": 0,
              "type": "number",
              "minimum": -1000,
              "maximum": 1000
            },
            "offsetXMm": {
              "type": "number",
              "minimum": -2000,
              "maximum": 2000
            },
            "offsetYMm": {
              "default": 0,
              "type": "number",
              "minimum": -2000,
              "maximum": 2000
            }
          },
          "additionalProperties": false
        },
        "sizing": {
          "type": "object",
          "properties": {
            "width": {
              "type": "object",
              "properties": {
                "mode": { "type": "string", "enum": ["fixed", "auto", "fill"] },
                "percent": {
                  "default": 40,
                  "type": "number",
                  "minimum": 0.1,
                  "maximum": 1000
                }
              },
              "required": ["mode"],
              "additionalProperties": false
            },
            "height": {
              "type": "object",
              "properties": {
                "mode": { "$ref": "#/$defs/__schema56" },
                "valueMm": { "$ref": "#/$defs/__schema57" }
              },
              "additionalProperties": false
            }
          },
          "required": ["width", "height"],
          "additionalProperties": false
        },
        "rotationDegrees": {
          "default": 0,
          "type": "number",
          "minimum": -360,
          "maximum": 360
        },
        "keepTableRowsTogether": { "type": "boolean" },
        "backgroundColor": { "$ref": "#/$defs/__schema6" },
        "border": { "$ref": "#/$defs/__schema58" },
        "margin": { "$ref": "#/$defs/__schema23" },
        "padding": { "$ref": "#/$defs/__schema23" }
      },
      "required": ["id", "placement", "sizing"],
      "additionalProperties": false
    },
    "__schema56": {
      "default": "auto",
      "type": "string",
      "enum": ["auto", "fixed"]
    },
    "__schema57": { "type": "number", "minimum": 0.05, "maximum": 2000 },
    "__schema58": {
      "type": "object",
      "properties": {
        "widthPx": { "type": "number", "minimum": 0, "maximum": 12 },
        "color": { "$ref": "#/$defs/__schema6" },
        "style": { "type": "string", "enum": ["solid", "dashed", "dotted"] }
      },
      "required": ["widthPx", "color", "style"],
      "additionalProperties": false
    },
    "__schema59": {
      "type": "array",
      "prefixItems": [
        {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "type": { "type": "string", "const": "cellReferenceList" },
                "attrs": { "$ref": "#/$defs/__schema60" }
              },
              "required": ["type", "attrs"],
              "additionalProperties": false
            },
            { "$ref": "#/$defs/__schema61" },
            { "$ref": "#/$defs/__schema62" },
            { "$ref": "#/$defs/__schema63" },
            { "$ref": "#/$defs/__schema71" }
          ]
        }
      ],
      "items": false,
      "minItems": 1,
      "maxItems": 1
    },
    "__schema60": {
      "type": "object",
      "properties": {
        "kind": { "type": "string", "enum": ["bibliography", "index"] },
        "title": { "type": "string", "minLength": 1, "maxLength": 120 },
        "titleStyle": { "$ref": "#/$defs/__schema12" },
        "entryStyle": { "$ref": "#/$defs/__schema12" }
      },
      "required": ["kind", "title"],
      "additionalProperties": false
    },
    "__schema61": {
      "type": "object",
      "properties": {
        "type": { "type": "string", "const": "cellText" },
        "content": {
          "minItems": 1,
          "type": "array",
          "items": { "$ref": "#/$defs/__schema43" }
        }
      },
      "required": ["type", "content"],
      "additionalProperties": false
    },
    "__schema62": {
      "type": "object",
      "properties": {
        "type": { "type": "string", "const": "cellImage" },
        "attrs": {
          "type": "object",
          "properties": {
            "src": { "$ref": "#/$defs/__schema30" },
            "alt": { "type": "string" },
            "widthPx": { "type": "number", "exclusiveMinimum": 0 },
            "heightPx": { "type": "number", "exclusiveMinimum": 0 },
            "lockAspectRatio": { "default": true, "type": "boolean" }
          },
          "required": ["src", "alt"],
          "additionalProperties": false
        }
      },
      "required": ["type", "attrs"],
      "additionalProperties": false
    },
    "__schema63": {
      "type": "object",
      "properties": {
        "type": { "$ref": "#/$defs/__schema64" },
        "attrs": { "$ref": "#/$defs/__schema65" },
        "content": { "$ref": "#/$defs/__schema68" }
      },
      "required": ["type", "attrs", "content"],
      "additionalProperties": false
    },
    "__schema64": { "type": "string", "const": "cellTable" },
    "__schema65": {
      "type": "object",
      "properties": {
        "headerRow": { "default": false, "type": "boolean" },
        "textAlignment": { "$ref": "#/$defs/__schema11" },
        "verticalAlignment": { "$ref": "#/$defs/__schema66" },
        "columnWidthsPercent": {
          "minItems": 1,
          "maxItems": 20,
          "type": "array",
          "items": { "$ref": "#/$defs/__schema67" }
        }
      },
      "additionalProperties": false
    },
    "__schema66": { "type": "string", "enum": ["top", "center", "bottom"] },
    "__schema67": { "type": "number", "minimum": 1, "maximum": 100 },
    "__schema68": {
      "minItems": 1,
      "maxItems": 100,
      "type": "array",
      "items": { "$ref": "#/$defs/__schema69" }
    },
    "__schema69": {
      "type": "object",
      "properties": {
        "type": { "type": "string", "const": "tableRow" },
        "attrs": {
          "type": "object",
          "properties": { "id": { "$ref": "#/$defs/__schema18" } },
          "required": ["id"],
          "additionalProperties": false
        },
        "content": {
          "minItems": 1,
          "maxItems": 20,
          "type": "array",
          "items": { "$ref": "#/$defs/__schema70" }
        }
      },
      "required": ["type", "attrs", "content"],
      "additionalProperties": false
    },
    "__schema70": {
      "type": "object",
      "properties": {
        "type": { "type": "string", "const": "tableCell" },
        "attrs": {
          "type": "object",
          "properties": {
            "id": { "$ref": "#/$defs/__schema18" },
            "rowSpan": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 100
            },
            "columnSpan": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 20
            },
            "coveredBy": { "$ref": "#/$defs/__schema18" },
            "verticalAlignment": { "$ref": "#/$defs/__schema66" },
            "backgroundColor": { "$ref": "#/$defs/__schema6" },
            "borders": {
              "type": "object",
              "properties": {
                "top": { "$ref": "#/$defs/__schema58" },
                "right": { "$ref": "#/$defs/__schema58" },
                "bottom": { "$ref": "#/$defs/__schema58" },
                "left": { "$ref": "#/$defs/__schema58" }
              },
              "additionalProperties": false
            }
          },
          "required": ["id"],
          "additionalProperties": false
        },
        "content": {
          "minItems": 1,
          "type": "array",
          "items": { "$ref": "#/$defs/__schema43" }
        }
      },
      "required": ["type", "attrs", "content"],
      "additionalProperties": false
    },
    "__schema71": {
      "type": "object",
      "properties": {
        "type": { "type": "string", "const": "cellGroup" },
        "attrs": {
          "type": "object",
          "properties": {
            "mode": {
              "default": "free",
              "type": "string",
              "enum": ["free", "row", "column"]
            },
            "alignment": {
              "default": "start",
              "type": "string",
              "enum": ["start", "center", "end"]
            },
            "gapMm": {
              "default": 5,
              "type": "number",
              "minimum": 0,
              "maximum": 100
            },
            "distribution": {
              "default": "packed",
              "type": "string",
              "enum": ["packed", "even"]
            },
            "minHeightMm": { "default": 0, "$ref": "#/$defs/__schema24" }
          },
          "additionalProperties": false
        },
        "content": {
          "minItems": 1,
          "maxItems": 100,
          "type": "array",
          "items": { "$ref": "#/$defs/__schema72" }
        }
      },
      "required": ["type", "attrs", "content"],
      "additionalProperties": false
    },
    "__schema72": { "$ref": "#/$defs/__schema73" },
    "__schema73": {
      "type": "object",
      "properties": {
        "type": { "$ref": "#/$defs/__schema74" },
        "attrs": { "$ref": "#/$defs/__schema55" },
        "content": { "$ref": "#/$defs/__schema75" }
      },
      "required": ["type", "attrs", "content"],
      "additionalProperties": false
    },
    "__schema74": { "type": "string", "const": "cell" },
    "__schema75": {
      "type": "array",
      "prefixItems": [
        {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "type": { "type": "string", "const": "cellReferenceList" },
                "attrs": {
                  "oneOf": [
                    { "$ref": "#/$defs/__schema60" },
                    {
                      "type": "object",
                      "properties": {
                        "kind": { "type": "string", "const": "captions" },
                        "categoryId": { "type": "string" },
                        "title": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 120
                        },
                        "titleStyle": { "$ref": "#/$defs/__schema12" },
                        "entryStyle": { "$ref": "#/$defs/__schema12" }
                      },
                      "required": ["kind", "categoryId", "title"],
                      "additionalProperties": false
                    }
                  ]
                }
              },
              "required": ["type", "attrs"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "type": { "type": "string", "const": "cellTableOfContents" },
                "attrs": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 120
                    },
                    "maxLevel": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 6
                    },
                    "scope": {
                      "default": "document",
                      "type": "string",
                      "enum": ["document", "following"]
                    },
                    "showPageNumbers": { "default": true, "type": "boolean" },
                    "showLeaders": { "default": true, "type": "boolean" },
                    "styles": {
                      "type": "object",
                      "properties": {
                        "title": { "$ref": "#/$defs/__schema12" },
                        "levels": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string",
                            "enum": ["1", "2", "3", "4", "5", "6"]
                          },
                          "additionalProperties": {
                            "$ref": "#/$defs/__schema12"
                          }
                        }
                      },
                      "additionalProperties": false
                    }
                  },
                  "required": ["title", "maxLevel"],
                  "additionalProperties": false
                }
              },
              "required": ["type", "attrs"],
              "additionalProperties": false
            },
            { "$ref": "#/$defs/__schema61" },
            { "$ref": "#/$defs/__schema62" },
            { "$ref": "#/$defs/__schema63" },
            { "$ref": "#/$defs/__schema71" }
          ]
        }
      ],
      "items": false,
      "minItems": 1,
      "maxItems": 1
    },
    "__schema76": {
      "type": "object",
      "properties": {
        "type": { "type": "string", "const": "section" },
        "attrs": {
          "type": "object",
          "properties": { "sectionId": { "$ref": "#/$defs/__schema18" } },
          "required": ["sectionId"],
          "additionalProperties": false
        },
        "content": {
          "minItems": 1,
          "type": "array",
          "items": { "$ref": "#/$defs/__schema77" }
        }
      },
      "required": ["type", "attrs", "content"],
      "additionalProperties": false
    },
    "__schema77": {
      "oneOf": [
        { "$ref": "#/$defs/__schema44" },
        { "$ref": "#/$defs/__schema51" },
        { "$ref": "#/$defs/__schema52" },
        {
          "type": "object",
          "properties": {
            "type": { "type": "string", "const": "pageBreak" },
            "attrs": {
              "type": "object",
              "properties": { "id": { "$ref": "#/$defs/__schema18" } },
              "required": ["id"],
              "additionalProperties": false
            }
          },
          "required": ["type", "attrs"],
          "additionalProperties": false
        },
        { "$ref": "#/$defs/__schema73" }
      ]
    }
  },
  "$id": "urn:ack:ackw:1.0",
  "title": "ACKW document format 1.0",
  "description": "ACK-defined document format. Cross-reference, table-grid and editor capability checks supplement this structural schema."
}
