{ "$schema": "http://json-schema.org/draft-04/schema#", "title": "Theme Definition", "description": "A JSON schema for describing the available keys and value types for an Asciidoctor PDF theme. Status: Incomplete; early draft.", "definitions": { // FIXME add RGB and CMYK arrays "color": { "type": "string", "pattern": "^#?[a-fA-F0-9]{3,6}$" }, "font_style": { "type": "string", "enum": ["normal", "bold", "italic", "bold_italic"] }, "measurement": { "oneOf": [ { "type": "string", "pattern": "^[0-9]+(?:\\.[0-9]+)?(?:in|mm|cm|pt)?$" }, { // FIXME technically, numbers < 0 must have a leading 0 (e.g., 0.8) "type": "number" } ] }, "text_alignment": { "type": "string", "enum": ["left", "center", "right", "justify"] } }, "type": "object", "properties": { "page_background_color": { "$ref": "#/definitions/color", "default": "#FFFFFF" }, "page_background_image": { "type": "string" }, "page_layout": { "type": "string", "enum": ["portrait", "landscape"], "default": "portrait" }, "page_margin": { "type": "array", "minItems": 4, "maxItems": 4, "items": { "$ref": "#/definitions/measurement" }, "additionalItems": false }, "page_size": { "oneOf": [ { "type": "string", "enum": ["A4", "Executive", "Folio", "Legal", "Letter", "Tabloid"] }, { "type": "array", "minItems": 2, "maxItems": 2, "items": { "$ref": "#/definitions/measurement" } } ], "default": "Letter" }, "base_align": { "$ref": "#/definitions/text_alignment", "default": "left" }, "base_border_color": { "$ref": "#/definitions/color" }, "base_border_radius": { "type": "number" }, "base_border_width": { "type": "number" }, "base_font_color": { "$ref": "#/definitions/color", "default": "#000000" }, "base_font_family": { "type": "string", "default": "Helvetica" }, "base_font_size": { "type": "number", "default": 12 }, "base_font_style": { "$ref": "#/definitions/font_style", "default": "normal" }, "base_line_height": { "type": "number" }, "base_line_height_length": { "$ref": "#/definitions/measurement" }, "base_font_size_large": { "type": "number" }, "base_font_size_small": { "type": "number" } } }