From 1de77d7befacf43b1f746645b6cf9fdce14f92c7 Mon Sep 17 00:00:00 2001
From: Luis <42945842+ldiaz94@users.noreply.github.com>
Date: Wed, 14 Oct 2026 12:23:45 +0100
Subject: [PATCH] site: the report's two volumes as PDFs, and its page count on the home page; make pdf makes one PDF to a volume
Co-Authored-By: Claude Sonnet 5.5
---
diff --git a/Makefile b/Makefile
index ac50bec..79ffa91 100644
--- a/Makefile
+++ b/Makefile
@@ -114,15 +114,15 @@
./raz -Werror -o build/Doc tools/Doc.raz
build/Doc man $(LIBDOC:%=lib/%.raz) > $@
-# the report as a PDF, by pandoc and Chromium; not part of check, as
-# CI has neither
-pdf: build/raz.pdf
+# the two volumes of the report as PDFs, by pandoc and Chromium; not
+# part of check, as CI has neither
+pdf: build/raz.pdf build/raz-lib.pdf
-build/raz.pdf: doc/raz.md doc/raz-lib.md doc/report.css | build
- pandoc doc/raz.md doc/raz-lib.md -s --toc --toc-depth=1 --shift-heading-level-by=-1 \
+build/%.pdf: doc/%.md doc/report.css | build
+ pandoc doc/$*.md -s --toc --toc-depth=1 --shift-heading-level-by=-1 \
--syntax-highlighting=none -c ../doc/report.css \
- -o build/raz.html
- chromium --headless --no-pdf-header-footer --print-to-pdf=$@ build/raz.html 2>/dev/null
+ -o build/$*.html
+ chromium --headless --no-pdf-header-footer --print-to-pdf=$@ build/$*.html 2>/dev/null
# raz, its library and its tools go together under $(PREFIX)/lib/raz,
# laid out as in the tarball; the link on PATH works since raz finds
@@ -170,7 +170,7 @@
# "Raz, Set, Go" (whose programs are run here, so the output shown is
# real), the report and the latest release's tarball. site/build.py
# says how; it needs ./raz and pandoc.
-site: raz
+site: raz pdf
python3 site/build.py
.PHONY: units tests seed-check seed-bench fixpoint check gdb bench kernels stress fmt loc man pdf dist site clean install uninstall
diff --git a/README.md b/README.md
index 0f20629..8c13ff4 100644
--- a/README.md
+++ b/README.md
@@ -42,7 +42,7 @@
| `examples/` | Small programs, each with the output it should give |
| `tools/Doc.raz` | Prints what a module exports, with its comments |
| `tools/Pretty.raz` | The formatter: fixes indentation and spacing |
-| `site/` | The website: home page, the tours "Raz, Set, Go" and "More Raz", the report and the latest release's tarball, as plain files in `site/public/`; `make site` rebuilds them |
+| `site/` | The website: home page, the tours "Raz, Set, Go" and "More Raz", the report and the latest release's tarball, as plain files in `site/public/`; `make site` rebuilds them, with the report's two PDFs (`make pdf`) |
| `editor/` | Support for vim and emacs |
| `conform/` | The conformance suite: what every implementation must do |
| `test/` | This compiler's own tests, and the scripts that run them |
diff --git a/site/build.py b/site/build.py
index ea2a4d4..bcc3826 100644
--- a/site/build.py
+++ b/site/build.py
@@ -380,9 +380,12 @@
text = text.replace("@SNIPPET@", highlight(snippet.rstrip("\n")))
text = text.replace("@OUTPUT@", html.escape(stdout.rstrip("\n")))
version, name, digest = releases[-1]
+ pages = re.search(r"Pages:\s+(\d+)", subprocess.run(
+ ["pdfinfo", os.path.join(ROOT, "build", "raz.pdf")],
+ capture_output=True, text=True, check=True).stdout).group(1)
earlier = ", ".join('%s' % (n, v)
for v, n, _ in reversed(releases[:-1]))
- text = text.replace("@EARLIER@", earlier)
+ text = text.replace("@EARLIER@", earlier).replace("@PAGES@", pages)
text = text.replace("@VERSION@", version).replace("@TARBALL@", name)
text = text.replace("@DIR@", name[:-len(".tar.gz")]).replace("@SHA256@", digest)
write("index.html", page("raz: a small systems language", text, 0, "home"))
@@ -418,6 +421,8 @@
build_tour(tour, lessons, nxt)
counts.append(len(lessons))
build_spec()
+ for pdf in ("raz.pdf", "raz-lib.pdf"): # made by make pdf
+ shutil.copy(os.path.join(ROOT, "build", pdf), OUT)
build_home(build_download())
print("site/public: %s lessons" % " + ".join(map(str, counts)))
diff --git a/site/content/home.html b/site/content/home.html
index e6765ac..2a07e19 100644
--- a/site/content/home.html
+++ b/site/content/home.html
@@ -22,6 +22,7 @@
~10,700 lines of compiler
~500K lines compiled a second
+ 1 report, @PAGES@ pages
static executables, no run time to install
@@ -58,8 +59,11 @@
volatile accesses, atomics and lock-free code, in 18 more.
The language, in writing
-The language is defined by the report, in two volumes (the language, then the library), which is
-short on purpose: whatever it doesn’t allow, raz doesn’t have.
+The language is defined by the report, which is
+short on purpose: whatever it doesn’t allow, raz doesn’t have.
+Its second volume describes the library. Both are on one page, and each is
+a PDF: the language (@PAGES@ pages) and
+the library.
Download
raz @VERSION@ is a tarball for x86-64 Linux with the compiler, raz,
diff --git a/site/content/spec.tmpl b/site/content/spec.tmpl
index d2124ea..33d9a85 100644
--- a/site/content/spec.tmpl
+++ b/site/content/spec.tmpl
@@ -1,2 +1,3 @@
+
Volume 1 as a PDF · Volume 2 as a PDF
$if(toc)$$toc$$endif$
$body$
diff --git a/site/public/index.html b/site/public/index.html
index 5c1a0f2..7d07356 100644
--- a/site/public/index.html
+++ b/site/public/index.html
@@ -42,6 +42,7 @@
~10,700 lines of compiler
~500K lines compiled a second
+ 1 report, 26 pages
static executables, no run time to install
@@ -104,8 +105,11 @@
volatile accesses, atomics and lock-free code, in 18 more.
The language, in writing
-The language is defined by the report, in two volumes (the language, then the library), which is
-short on purpose: whatever it doesn’t allow, raz doesn’t have.
+The language is defined by the report, which is
+short on purpose: whatever it doesn’t allow, raz doesn’t have.
+Its second volume describes the library. Both are on one page, and each is
+a PDF: the language (26 pages) and
+the library.
Download
raz 0.11.0 is a tarball for x86-64 Linux with the compiler, raz,
diff --git a/site/public/raz-lib.pdf b/site/public/raz-lib.pdf
new file mode 100644
index 0000000..40d9ba4
Binary files /dev/null and b/site/public/raz-lib.pdf differ
diff --git a/site/public/raz.pdf b/site/public/raz.pdf
new file mode 100644
index 0000000..0855957
Binary files /dev/null and b/site/public/raz.pdf differ
diff --git a/site/public/spec.html b/site/public/spec.html
index 49028f7..4e3a1fe 100644
--- a/site/public/spec.html
+++ b/site/public/spec.html
@@ -18,7 +18,8 @@
-