190 lines
4.0 KiB
JSON
190 lines
4.0 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "https://scient.ing/ns/schemas/runs.schema.json",
|
|
"title": "Inline runs",
|
|
"description": "The runs of a sentence, cell, reference, authors or keywords node; spec/03-nodes.md.",
|
|
"type": "array",
|
|
"minItems": 1,
|
|
"items": {
|
|
"oneOf": [
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"kind": {
|
|
"const": "text"
|
|
},
|
|
"text": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"style": {
|
|
"type": "array",
|
|
"items": {
|
|
"enum": [
|
|
"em",
|
|
"strong",
|
|
"sup",
|
|
"sub",
|
|
"sc",
|
|
"mono"
|
|
]
|
|
},
|
|
"minItems": 1,
|
|
"uniqueItems": true
|
|
}
|
|
},
|
|
"required": [
|
|
"kind",
|
|
"text"
|
|
],
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"kind": {
|
|
"const": "math"
|
|
},
|
|
"notation": {
|
|
"enum": [
|
|
"tex",
|
|
"typst"
|
|
]
|
|
},
|
|
"source": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
}
|
|
},
|
|
"required": [
|
|
"kind",
|
|
"notation",
|
|
"source"
|
|
],
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"kind": {
|
|
"const": "cite"
|
|
},
|
|
"refs": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "common.schema.json#/$defs/nodeId"
|
|
},
|
|
"uniqueItems": true
|
|
},
|
|
"text": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
}
|
|
},
|
|
"required": [
|
|
"kind",
|
|
"refs",
|
|
"text"
|
|
],
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"kind": {
|
|
"const": "xref"
|
|
},
|
|
"target": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "common.schema.json#/$defs/nodeId"
|
|
},
|
|
{
|
|
"$ref": "common.schema.json#/$defs/address"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"text": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
}
|
|
},
|
|
"required": [
|
|
"kind",
|
|
"target",
|
|
"text"
|
|
],
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"kind": {
|
|
"const": "fnmark"
|
|
},
|
|
"footnote": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "common.schema.json#/$defs/nodeId"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"text": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
}
|
|
},
|
|
"required": [
|
|
"kind",
|
|
"footnote",
|
|
"text"
|
|
],
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"kind": {
|
|
"const": "link"
|
|
},
|
|
"url": {
|
|
"$ref": "common.schema.json#/$defs/url"
|
|
},
|
|
"text": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
}
|
|
},
|
|
"required": [
|
|
"kind",
|
|
"url",
|
|
"text"
|
|
],
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"kind": {
|
|
"const": "equation"
|
|
},
|
|
"node": {
|
|
"$ref": "common.schema.json#/$defs/nodeId"
|
|
}
|
|
},
|
|
"required": [
|
|
"kind",
|
|
"node"
|
|
],
|
|
"additionalProperties": false
|
|
}
|
|
]
|
|
}
|
|
}
|