Explorar o código

docs: generate PDFs with pandoc pipeline

Eric Streit hai 1 día
pai
achega
881e3db91d
Modificáronse 5 ficheiros con 48 adicións e 0 borrados
  1. 6 0
      README.md
  2. 32 0
      docs/Makefile
  3. BIN=BIN
      docs/comparison-PIM4-gm2-V3.pdf
  4. BIN=BIN
      docs/future-work-2026-10-25.pdf
  5. 10 0
      docs/pdf-header.tex

+ 6 - 0
README.md

@@ -71,6 +71,12 @@ tools/m2make/b_v3/M2make --separate --dialect iso \
 `.def` resolver and object linker.  The one-shot mode remains the default
 for the test suite and corpus.
 
+Documentation PDFs are generated with Pandoc:
+
+```sh
+make -C docs pdfs       # pandoc + lualatex; needs DejaVu and Symbola fonts
+```
+
 ## Layout (Blaise-adapted)
 
 ```text

+ 32 - 0
docs/Makefile

@@ -0,0 +1,32 @@
+# PDF build helpers for docs/.
+#
+# Requirements:
+#   pandoc, lualatex (TeX Live), DejaVu Sans/Mono and Symbola.
+#
+# Usage:
+#   make -C docs pdfs
+#   make -C docs clean
+
+PANDOC ?= pandoc
+PDF_ENGINE ?= lualatex
+HEADER := pdf-header.tex
+SOURCES := comparison-PIM4-gm2-V3.md future-work-2026-10-25.md
+PDFS := $(SOURCES:.md=.pdf)
+PANDOC_FLAGS := \
+	--from=markdown \
+	--pdf-engine=$(PDF_ENGINE) \
+	--pdf-engine-opt=-interaction=nonstopmode \
+	--include-in-header=$(HEADER) \
+	--variable=geometry:a4paper,margin=2cm \
+	--variable=fontsize=10pt \
+	--variable=linestretch=1.05
+
+.PHONY: pdfs clean
+
+pdfs: $(PDFS)
+
+%.pdf: %.md $(HEADER)
+	$(PANDOC) $(PANDOC_FLAGS) -o $@ $<
+
+clean:
+	rm -f $(PDFS)

BIN=BIN
docs/comparison-PIM4-gm2-V3.pdf


BIN=BIN
docs/future-work-2026-10-25.pdf


+ 10 - 0
docs/pdf-header.tex

@@ -0,0 +1,10 @@
+% Pandoc PDF header for the documentation.
+%
+% LuaLaTeX with a Symbola fallback keeps the status emoji
+% (yes/no/partial/warning) visible in the comparison tables.
+
+\usepackage{fontspec}
+\directlua{luaotfload.add_fallback("docsemojifallback",
+  {"Symbola:mode=node;"})}
+\setmainfont{DejaVu Sans}[RawFeature={fallback=docsemojifallback}]
+\setmonofont{DejaVu Sans Mono}