Files
paperspec/schemas/runs.schema.json
T
alexmandClaude 17880686fa feat: scienting-math/1 sources and derived/math.jsonl; lode references; stress fixes
Math content may say its source is in scienting-math/1's canonical TeX (form,
in no hash); derived/math.jsonl holds papermath's tree, symbols and issues,
and the validator now checks derived files. A symbol annotation names its
symbol by key; lode claim references use lode's tag and pin syntax. The zip
reader refuses entries zipfile cannot read, and checkpoint lines end in LF only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017R7sgDNvUGWY2zFPCq2JH6
2026-10-17 06:44:28 -04:00

227 lines
4.8 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://paperspec.scient.ing/schemas/runs.schema.json",
"title": "Inline runs",
"description": "The runs of a sentence, cell, reference, authors or keywords node; spec/03-nodes.md.",
"$defs": {
"printed": {
"description": "The run's text as the paper prints it, kept by an emend correction (spec/03 §3.5, spec/11 §11.1).",
"type": "string",
"minLength": 1
}
},
"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
},
"printed": {
"$ref": "#/$defs/printed"
}
},
"required": [
"kind",
"text"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"const": "math"
},
"notation": {
"enum": [
"tex",
"typst"
]
},
"source": {
"type": "string",
"minLength": 1
},
"form": {
"$ref": "common.schema.json#/$defs/mathForm"
}
},
"required": [
"kind",
"notation",
"source"
],
"additionalProperties": false,
"if": {
"required": [
"form"
]
},
"then": {
"properties": {
"notation": {
"const": "tex"
}
}
}
},
{
"type": "object",
"properties": {
"kind": {
"const": "cite"
},
"refs": {
"type": "array",
"items": {
"$ref": "common.schema.json#/$defs/nodeId"
},
"uniqueItems": true
},
"text": {
"type": "string",
"minLength": 1
},
"printed": {
"$ref": "#/$defs/printed"
}
},
"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
},
"printed": {
"$ref": "#/$defs/printed"
}
},
"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
},
"printed": {
"$ref": "#/$defs/printed"
}
},
"required": [
"kind",
"footnote",
"text"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"const": "link"
},
"url": {
"$ref": "common.schema.json#/$defs/url"
},
"text": {
"type": "string",
"minLength": 1
},
"printed": {
"$ref": "#/$defs/printed"
}
},
"required": [
"kind",
"url",
"text"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"const": "equation"
},
"node": {
"$ref": "common.schema.json#/$defs/nodeId"
}
},
"required": [
"kind",
"node"
],
"additionalProperties": false
}
]
}
}