From 548e089979ebed56bf58939e7a9b5fafa502393e Mon Sep 17 00:00:00 2001
From: Caleb Maclennan
Date: Wed, 27 Dec 2023 12:33:26 +0300
Subject: [PATCH 1/8] Add make targets for using Speedata Publisher
---
Makefile | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/Makefile b/Makefile
index a0326d1..02fbef3 100644
--- a/Makefile
+++ b/Makefile
@@ -13,6 +13,7 @@ NPX ?= npx
PAGEDJS ?= $(NPX) pagedjs-cli
SED ?= sed
SILE ?= sile
+SPEEDATA ?= sp
TERA ?= tera
TOMLQ ?= tomlq
TYPST ?= typst
@@ -27,6 +28,8 @@ PAGEDJS_ARGS = -i $< -o $@
SILE_ARGS = -o $@ $<
+SPEEDATA_ARGS = --dummy --layout $< --jobname $*-speedata
+
TYPST_ARGS = compile $< $@
WEASYPRINT_ARGS = $< $@
@@ -70,6 +73,9 @@ node_modules:
%-sile.pdf %-sile.toml: %/sile.xml
$(call make_manifest,$(SILE) $(SILE_ARGS))
+%-speedata.pdf %-speedata.toml: %/speedata.xml
+ $(call make_manifest,$(SPEEDATA) $(SPEEDATA_ARGS))
+
%-typst.pdf %-typst.toml: %/typst.typ
$(call make_manifest,$(TYPST) $(TYPST_ARGS))
From fce96ebd176d89be8b7624cba73aa8e88f31c089 Mon Sep 17 00:00:00 2001
From: Caleb Maclennan
Date: Wed, 27 Dec 2023 12:35:39 +0300
Subject: [PATCH 2/8] Add hello-world example in speedata
---
content/hello-world.md | 2 +-
data/hello-world/speedata.xml | 14 ++++++++++++++
2 files changed, 15 insertions(+), 1 deletion(-)
create mode 100644 data/hello-world/speedata.xml
diff --git a/content/hello-world.md b/content/hello-world.md
index 76fddde..bffbb7a 100644
--- a/content/hello-world.md
+++ b/content/hello-world.md
@@ -1,7 +1,7 @@
+++
title = "Hello World!"
description = "Your most basic greeting."
-extra.typesetters = [ "sile", "typst", "xelatex", "pagedjs", "weasyprint" ]
+extra.typesetters = [ "sile", "typst", "xelatex", "pagedjs", "weasyprint", "speedata" ]
+++
Just the simplest way to get a phrase onto a numbered page.
diff --git a/data/hello-world/speedata.xml b/data/hello-world/speedata.xml
new file mode 100644
index 0000000..84fafd5
--- /dev/null
+++ b/data/hello-world/speedata.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+ Hello World
+
+
+
+
+
From eb29005da7572cc5316696cd1345dc9858dfdf22 Mon Sep 17 00:00:00 2001
From: Caleb Maclennan
Date: Wed, 27 Dec 2023 12:46:43 +0300
Subject: [PATCH 3/8] Fix source file loader to not tread XML as data
---
templates/page.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/templates/page.html b/templates/page.html
index 54ef571..df172e8 100644
--- a/templates/page.html
+++ b/templates/page.html
@@ -27,7 +27,7 @@ {{ typesetter }}
Input document
- {% set source = load_data(path=manifest.src) %}
+ {% set source = load_data(path=manifest.src, format="plain") %}
{{ source }}
Render command
From 94b09d351874a318a6c372263ad25730c2b09c7e Mon Sep 17 00:00:00 2001
From: Caleb Maclennan
Date: Wed, 27 Dec 2023 14:16:24 +0300
Subject: [PATCH 4/8] Get a page number on the speedata example
---
data/hello-world/speedata.xml | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/data/hello-world/speedata.xml b/data/hello-world/speedata.xml
index 84fafd5..700d1ef 100644
--- a/data/hello-world/speedata.xml
+++ b/data/hello-world/speedata.xml
@@ -2,6 +2,22 @@
xmlns="urn:speedata.de:2009/publisher/en"
xmlns:sd="urn:speedata:2009/publisher/functions/en">
+
+
+
+
+
+
+
+
From 3030a19ece0b4e4f6b639836fe282062ba62eafa Mon Sep 17 00:00:00 2001
From: Patrick Gundlach
Date: Fri, 28 Aug 2026 13:08:35 +0200
Subject: [PATCH 5/8] Add develop environment dependency on speedata Publisher
---
flake.lock | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
flake.nix | 6 ++++++
2 files changed, 61 insertions(+)
diff --git a/flake.lock b/flake.lock
index dee0d08..61a4dc1 100644
--- a/flake.lock
+++ b/flake.lock
@@ -52,6 +52,24 @@
"type": "github"
}
},
+ "flake-utils_3": {
+ "inputs": {
+ "systems": "systems_3"
+ },
+ "locked": {
+ "lastModified": 1731533236,
+ "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
+ "type": "github"
+ },
+ "original": {
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "type": "github"
+ }
+ },
"gitignore": {
"inputs": {
"nixpkgs": [
@@ -153,9 +171,31 @@
"gitignore": "gitignore",
"glu": "glu",
"nixpkgs": "nixpkgs",
+ "speedata-publisher": "speedata-publisher",
"teracli": "teracli"
}
},
+ "speedata-publisher": {
+ "inputs": {
+ "flake-utils": "flake-utils_3",
+ "nixpkgs": [
+ "nixpkgs"
+ ]
+ },
+ "locked": {
+ "lastModified": 1787918458,
+ "narHash": "sha256-BMmjjq6gqtt1LccJDubT2jCqWVR0sTE0bA98TaSBHcY=",
+ "owner": "speedata",
+ "repo": "publisher",
+ "rev": "19ead00e64069ed5fc62712f9cd184e51928058c",
+ "type": "github"
+ },
+ "original": {
+ "owner": "speedata",
+ "repo": "publisher",
+ "type": "github"
+ }
+ },
"systems": {
"locked": {
"lastModified": 1681028828,
@@ -186,6 +226,21 @@
"type": "github"
}
},
+ "systems_3": {
+ "locked": {
+ "lastModified": 1681028828,
+ "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
+ "owner": "nix-systems",
+ "repo": "default",
+ "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-systems",
+ "repo": "default",
+ "type": "github"
+ }
+ },
"teracli": {
"inputs": {
"naersk": "naersk",
diff --git a/flake.nix b/flake.nix
index 9191c01..5357236 100644
--- a/flake.nix
+++ b/flake.nix
@@ -17,6 +17,10 @@
url = "github:boxesandglue/glu";
inputs.nixpkgs.follows = "nixpkgs";
};
+ speedata-publisher = {
+ url = "github:speedata/publisher";
+ inputs.nixpkgs.follows = "nixpkgs";
+ };
};
outputs =
@@ -45,6 +49,7 @@
};
inherit (gitignore.lib) gitignoreSource;
glu = inputs.glu.packages.${system}.default;
+ speedata-publisher = inputs.speedata-publisher.packages.${system}.default;
polytype =
rec {
};
@@ -78,6 +83,7 @@
rustc
satysfi
sile
+ speedata-publisher
stix-two
teracli.defaultPackage.${system}
texliveFull
From ef8fd362fb243957ad2f125d78a8dab59d00e4ac Mon Sep 17 00:00:00 2001
From: Caleb Maclennan
Date: Fri, 28 Aug 2026 19:32:41 +0300
Subject: [PATCH 6/8] Expand Git ignore list to cover Speedata build artifacts
---
.gitignore | 27 +++++++++++++++++++++------
1 file changed, 21 insertions(+), 6 deletions(-)
diff --git a/.gitignore b/.gitignore
index cf6af24..820f9d9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,15 +1,30 @@
node_modules
-lua_modules
data/*.avif
data/*.pdf
data/*.toml
-data/*.aux
-data/*/*-aux
-data/*.log
-data/*-aux.json
-data/decasify.js
.fonts
static
public
+
+# SILE
+lua_modules
*.rockslock
+
+# PagedJS
+data/decasify.js
+
+# LaTeX
+data/*.aux
+data/*/*-aux
+data/*.log
+
+# Glu
+data/*-aux.json
all-system-fonts.css
+
+# Speedata
+data/*-aux.xml
+data/*-protocol.xml
+data/*.finished
+data/*.status
+data/*.vars
From de75bc59e971a780f7edae7703b398db1bca909d Mon Sep 17 00:00:00 2001
From: Caleb Maclennan
Date: Fri, 28 Aug 2026 19:34:00 +0300
Subject: [PATCH 7/8] Ensure XML content is passed through to source code
viewer widget
---
templates/page.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/templates/page.html b/templates/page.html
index 276d198..b730212 100644
--- a/templates/page.html
+++ b/templates/page.html
@@ -23,7 +23,7 @@ {{ typesetter }}
Input document
- {% set source = load_data(path=manifest.src) | safe %}
+ {% set source = load_data(path=manifest.src, format="plain") %}
{% set ext = manifest.src | split(pat=".") | last %}
{{ source }}
From 2a2fbeac313b84e90b1a6dcd0e034c8873dffaf9 Mon Sep 17 00:00:00 2001
From: Caleb Maclennan
Date: Fri, 28 Aug 2026 19:39:07 +0300
Subject: [PATCH 8/8] Highlight Speedata sources with XML syntax highlighting
---
src/codemirror.js | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/codemirror.js b/src/codemirror.js
index 64bff60..b3f6927 100644
--- a/src/codemirror.js
+++ b/src/codemirror.js
@@ -32,6 +32,7 @@ const languageMap = {
// Aliases to near-matches
pagedjs: html,
sile: latex,
+ speedata: xml,
weasyprint: html,
xelatex: latex,
};