From 548e089979ebed56bf58939e7a9b5fafa502393e Mon Sep 17 00:00:00 2001 From: Caleb Maclennan Date: Wed, 27 Dec 2023 12:33:26 +0300 Subject: [PATCH 1/4] 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/4] 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/4] 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/4] 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"> + + + + + + + +
+ + + +
+
+
+
+